@@ -30,15 +30,15 @@ Library TERRA_Engine;
30
30
Uses TERRA_Utils, TERRA_Color, TERRA_Vector3D, TERRA_Vector2D, TERRA_Matrix4x4, TERRA_Matrix3x3,
31
31
TERRA_BoundingBox, TERRA_Texture, TERRA_Camera, TERRA_Ray, TERRA_Tilemap,
32
32
TERRA_Application, TERRA_ResourceManager, TERRA_Lights, TERRA_Shader, TERRA_FileManager,
33
- TERRA_Resource, TERRA_Client, TERRA_UI, TERRA_Skybox, TERRA_MusicManager,
33
+ TERRA_Resource, TERRA_Client, TERRA_UI, TERRA_Skybox, TERRA_MusicManager, TERRA_InputManager,
34
34
TERRA_Font, TERRA_Scene, TERRA_XML, TERRA_GraphicsManager, TERRA_SpriteManager,
35
35
TERRA_Mesh, TERRA_MeshAnimation, TERRA_Stream, TERRA_MemoryStream, TERRA_FileStream, TERRA_Viewport,
36
36
37
37
TERRA_Log, TERRA_Localization, TERRA_Widgets, TERRA_Image, TERRA_ShaderFactory,
38
38
TERRA_SoundManager, TERRA_Sound, TERRA_TextureAtlas, TERRA_Leaderboards,
39
39
TERRA_PNG, TERRA_Milkshape, TERRA_OBJ, TERRA_Collada, TERRA_TTF, TERRA_AngelCodeFont,
40
40
TERRA_ParticleRenderer, TERRA_ParticleEmitters, TERRA_OS,
41
- TERRA_FileUtils, TERRA_HTTP, TERRA_AIPath , TERRA_Session,
41
+ TERRA_FileUtils, TERRA_HTTP, TERRA_AIGridPath , TERRA_Session,
42
42
TERRA_Decals, TERRA_Billboards, TERRA_Network, TERRA_NetClient, TERRA_Sockets, TERRA_WAVE,
43
43
{ $IFNDEF MOBILE} TERRA_OGG,{ $ENDIF}
44
44
{ $IFNDEF IPHONE} TERRA_JPG,{ $ENDIF}
@@ -351,7 +351,7 @@ Procedure AI_DestroyPath(Var Path:TERRAPath); external {$IFNDEF STATIC_LINKING}T
351
351
352
352
Type
353
353
CustomNetClient = Class (NetClient)
354
- Procedure HandleMessageCustom (Msg:NetMessage; Sock:Socket );
354
+ Procedure HandleMessageCustom (Msg:NetMessage);
355
355
Procedure ConnectionStart ; Override;
356
356
Procedure ConnectionEnd (ErrorCode:Integer; ErrorLog:String); Override;
357
357
End ;
@@ -374,7 +374,7 @@ Begin
374
374
_OnConnectionEnd(ErrorCode);
375
375
End ;
376
376
377
- Procedure CustomNetClient.HandleMessageCustom (Msg:NetMessage; Sock:Socket );
377
+ Procedure CustomNetClient.HandleMessageCustom (Msg:NetMessage);
378
378
Var
379
379
S:Stream;
380
380
Begin
@@ -629,12 +629,12 @@ End;
629
629
Procedure Localization_SetLanguage (Lang:PAnsiChar); Cdecl;
630
630
Begin
631
631
If Lang<>Nil Then
632
- StringManager .Instance.SetLanguage(Lang);
632
+ LocalizationManager .Instance.SetLanguage(Lang);
633
633
End ;
634
634
635
635
Function Localization_GetString (ID:PAnsiChar):PAnsiChar; Cdecl;
636
636
Begin
637
- _Str[_StrIndex] := StringManager .Instance.GetString(ID);
637
+ _Str[_StrIndex] := LocalizationManager .Instance.GetString(ID);
638
638
_Str[_StrIndex, Length(_Str[_StrIndex]) + 1 ] := #0 ;
639
639
Result := @(_Str[_StrIndex, 1 ]);
640
640
Inc(_StrIndex);
@@ -644,22 +644,22 @@ End;
644
644
645
645
Procedure Input_SetKeyState (Key:Integer; State:Boolean); Cdecl;
646
646
Begin
647
- Application .Instance.Input .Keys.SetState(Key, State);
647
+ InputManager .Instance.Keys.SetState(Key, State);
648
648
End ;
649
649
650
650
Function Input_KeyDown (Key:Integer):Boolean; Cdecl;
651
651
Begin
652
- Result := Application .Instance.Input .Keys.IsDown(Key);
652
+ Result := InputManager .Instance.Keys.IsDown(Key);
653
653
End ;
654
654
655
655
Function Input_KeyPressed (Key:Integer):Boolean; Cdecl;
656
656
Begin
657
- Result := Application .Instance.Input .Keys.WasPressed(Key);
657
+ Result := InputManager .Instance.Keys.WasPressed(Key);
658
658
End ;
659
659
660
660
Function Input_GetMousePosition ():Vector2D; Cdecl;
661
661
Begin
662
- Result := VectorCreate2D(Application .Instance.Input. Mouse.X , Application .Instance.Input .Mouse.X);
662
+ Result := VectorCreate2D(InputManager .Instance.Mouse.X , InputManager .Instance.Mouse.X);
663
663
End ;
664
664
665
665
Function Stream_CreateBuffer (Size:Integer; Ptr:Pointer = Nil ):TERRAStream; Cdecl;
@@ -867,7 +867,7 @@ Begin
867
867
If Not ValidateType(MyFont, Font) Then
868
868
Exit;
869
869
870
- Result := Font (MyFont).GetTextWidth(Text)
870
+ Result := UIManager.Instance.FontRenderer.SetFont (MyFont).GetTextWidth(Text);
871
871
End ;
872
872
873
873
Function Font_GetTextHeight (MyFont:TERRAFont; Text:PAnsiChar):Single; Cdecl;
@@ -877,7 +877,7 @@ Begin
877
877
If Not ValidateType(MyFont, Font) Then
878
878
Exit;
879
879
880
- Result := Font (MyFont).GetTextHeight(Text)
880
+ Result := UIManager.Instance.FontRenderer.SetFont (MyFont).GetTextHeight(Text);
881
881
End ;
882
882
883
883
Function Font_GetTextRect (MyFont:TERRAFont; Text:PAnsiChar):Vector2D; Cdecl;
@@ -887,15 +887,15 @@ Begin
887
887
If Not ValidateType(MyFont, Font) Then
888
888
Exit;
889
889
890
- Result := Font (MyFont).GetTextRect(Text)
890
+ Result := UIManager.Instance.FontRenderer.SetFont (MyFont).GetTextRect(Text);
891
891
End ;
892
892
893
893
Procedure Font_DrawText (MyFont:TERRAFont; X:Single; Y:Single; Layer:Single; Text:PAnsiChar; Const MyColor:Color); Cdecl;
894
894
Begin
895
895
If Not ValidateType(MyFont, Font) Then
896
896
Exit;
897
897
898
- Font (MyFont).DrawText(X, Y, Layer, Text, MyColor );
898
+ UIManager.Instance.FontRenderer.SetFont (MyFont).SetColor(MyColor). DrawText(X, Y, Layer, Text);
899
899
End ;
900
900
901
901
// Tile sheet generator
@@ -1190,14 +1190,6 @@ Begin
1190
1190
MeshInstance(Instance).Scale := Scale;
1191
1191
End ;
1192
1192
1193
- Procedure MeshInstance_SetTransform (Instance:TERRAMeshInstance; Const Transform:Matrix4x4); Cdecl;
1194
- Begin
1195
- If Instance = Nil Then
1196
- Exit;
1197
-
1198
- MeshInstance(Instance).Transform := Transform;
1199
- End ;
1200
-
1201
1193
Procedure MeshInstance_Destroy (Var Instance:TERRAMeshInstance); Cdecl;
1202
1194
Begin
1203
1195
If Instance = Nil Then
@@ -3085,7 +3077,6 @@ Exports
3085
3077
MeshInstance_SetPosition,
3086
3078
MeshInstance_SetRotation,
3087
3079
MeshInstance_SetScale,
3088
- MeshInstance_SetTransform,
3089
3080
MeshInstance_PlayAnimation,
3090
3081
MeshInstance_CrossfadeAnimation,
3091
3082
MeshInstance_Destroy,
0 commit comments