39 procedure RenderWeaponTooltip(atype: TAmmoType); |
39 procedure RenderWeaponTooltip(atype: TAmmoType); |
40 procedure ShowWeaponTooltip(x, y: LongInt); |
40 procedure ShowWeaponTooltip(x, y: LongInt); |
41 procedure FreeWeaponTooltip; |
41 procedure FreeWeaponTooltip; |
42 procedure MakeCrossHairs; |
42 procedure MakeCrossHairs; |
43 |
43 |
|
44 procedure WarpMouse(x, y: Word); inline; |
|
45 procedure SwapBuffers; inline; |
|
46 |
44 implementation |
47 implementation |
45 uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands, uDebug, uWorld; |
48 uses uMisc, uConsole, uMobile, uVariables, uUtils, uTextures, uRender, uRenderUtils, uCommands, |
|
49 uDebug{$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF}; |
46 |
50 |
47 //type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
51 //type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
48 |
52 |
49 var MaxTextureSize: LongInt; |
53 var MaxTextureSize: LongInt; |
|
54 {$IFDEF SDL13} |
|
55 SDLwindow: PSDL_Window; |
|
56 SDLGLcontext: PSDL_GLContext; |
|
57 {$ELSE} |
50 SDLPrimSurface: PSDL_Surface; |
58 SDLPrimSurface: PSDL_Surface; |
51 {$IFDEF SDL13}SDLGLcontext: PSDL_GLContext;{$ENDIF} |
59 {$ENDIF} |
52 |
|
53 // cGPUVendor: TGPUVendor; |
|
54 |
60 |
55 function WriteInRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect; |
61 function WriteInRect(Surface: PSDL_Surface; X, Y: LongInt; Color: LongWord; Font: THWFont; s: ansistring): TSDL_Rect; |
56 var w, h: LongInt; |
62 var w, h: LongInt; |
57 tmpsurf: PSDL_Surface; |
63 tmpsurf: PSDL_Surface; |
58 clr: TSDL_Color; |
64 clr: TSDL_Color; |
1122 var ai: TAmmoType; |
1124 var ai: TAmmoType; |
1123 i: LongInt; |
1125 i: LongInt; |
1124 begin |
1126 begin |
1125 RegisterVariable('fullscr', @chFullScr, true); |
1127 RegisterVariable('fullscr', @chFullScr, true); |
1126 |
1128 |
1127 SDLPrimSurface:= nil; |
|
1128 |
|
1129 cScaleFactor:= 2.0; |
1129 cScaleFactor:= 2.0; |
1130 Step:= 0; |
1130 Step:= 0; |
1131 ProgrTex:= nil; |
1131 ProgrTex:= nil; |
1132 SupportNPOTT:= false; |
1132 SupportNPOTT:= false; |
1133 // cGPUVendor:= gvUnknown; |
|
1134 |
1133 |
1135 // init all ammo name texture pointers |
1134 // init all ammo name texture pointers |
1136 for ai:= Low(TAmmoType) to High(TAmmoType) do |
1135 for ai:= Low(TAmmoType) to High(TAmmoType) do |
1137 begin |
1136 begin |
1138 Ammoz[ai].NameTex := nil; |
1137 Ammoz[ai].NameTex := nil; |
1139 end; |
1138 end; |
1140 // init all count texture pointers |
1139 // init all count texture pointers |
1141 for i:= Low(CountTexz) to High(CountTexz) do |
1140 for i:= Low(CountTexz) to High(CountTexz) do |
1142 CountTexz[i] := nil; |
1141 CountTexz[i] := nil; |
1143 {$IFDEF SDL13} |
1142 {$IFDEF SDL13} |
1144 SDLGLcontext := nil; |
1143 SDLwindow:= nil; |
|
1144 SDLGLcontext:= nil; |
|
1145 {$ELSE} |
|
1146 SDLPrimSurface:= nil; |
1145 {$ENDIF} |
1147 {$ENDIF} |
1146 end; |
1148 end; |
1147 |
1149 |
1148 procedure freeModule; |
1150 procedure freeModule; |
1149 begin |
1151 begin |