60 procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF}; |
60 procedure SwapBuffers; {$IFDEF USE_VIDEO_RECORDING}cdecl{$ELSE}inline{$ENDIF}; |
61 procedure SetSkyColor(r, g, b: real); |
61 procedure SetSkyColor(r, g, b: real); |
62 |
62 |
63 implementation |
63 implementation |
64 uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils, |
64 uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils, |
65 uCommands, uPhysFSLayer, uDebug, adler32 |
65 uCommands, uPhysFSLayer, uDebug, uLocale, uInputHandler, adler32 |
66 {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF}; |
66 {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF}; |
67 |
67 |
68 //type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
68 //type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple); |
69 |
69 |
70 var |
70 var |
187 md:= 0; |
187 md:= 0; |
188 {$ENDIF} |
188 {$ENDIF} |
189 for t:= 0 to Pred(TeamsCount) do |
189 for t:= 0 to Pred(TeamsCount) do |
190 with TeamsArray[t]^ do |
190 with TeamsArray[t]^ do |
191 begin |
191 begin |
192 NameTagTex:= RenderStringTexLim(ansistring(TeamName), Clan^.Color, Font, cTeamHealthWidth); |
192 if ExtDriven then |
|
193 NameTagTex:= RenderStringTexLim(ansistring(TeamName), Clan^.Color, Font, cTeamHealthWidth) |
|
194 else NameTagTex:= RenderStringTex(ansistring(TeamName), Clan^.Color, Font); |
193 if length(Owner) > 0 then |
195 if length(Owner) > 0 then |
194 OwnerTex:= RenderStringTexLim(ansistring(Owner), Clan^.Color, Font, cTeamHealthWidth); |
196 if ExtDriven then |
|
197 OwnerTex:= RenderStringTexLim(ansistring(Owner), Clan^.Color, Font, cTeamHealthWidth) |
|
198 else OwnerTex:= RenderStringTex(ansistring(Owner), Clan^.Color, Font); |
195 |
199 |
196 r.x:= 0; |
200 r.x:= 0; |
197 r.y:= 0; |
201 r.y:= 0; |
198 r.w:= 32; |
202 r.w:= 32; |
199 r.h:= 32; |
203 r.h:= 32; |
259 texsurf:= nil; |
263 texsurf:= nil; |
260 |
264 |
261 if not allOK then exit; |
265 if not allOK then exit; |
262 |
266 |
263 AIKillsTex := RenderStringTex(ansistring(inttostr(stats.AIKills)), Clan^.Color, fnt16); |
267 AIKillsTex := RenderStringTex(ansistring(inttostr(stats.AIKills)), Clan^.Color, fnt16); |
|
268 LuaTeamValueTex := RenderStringTex(LuaTeamValue, Clan^.Color, fnt16); |
264 |
269 |
265 dec(drY, r.h + 2); |
270 dec(drY, r.h + 2); |
266 DrawHealthY:= drY; |
271 DrawHealthY:= drY; |
267 for i:= 0 to cMaxHHIndex do |
272 for i:= 0 to cMaxHHIndex do |
268 with Hedgehogs[i] do |
273 with Hedgehogs[i] do |
269 if Gear <> nil then |
274 if Gear <> nil then |
270 begin |
275 begin |
271 NameTagTex:= RenderStringTexLim(ansistring(Name), Clan^.Color, fnt16, cTeamHealthWidth); |
276 if ExtDriven then |
|
277 NameTagTex:= RenderStringTexLim(ansistring(Name), Clan^.Color, fnt16, cTeamHealthWidth) |
|
278 else NameTagTex:= RenderStringTex(ansistring(Name), Clan^.Color, fnt16); |
272 if Hat = 'NoHat' then |
279 if Hat = 'NoHat' then |
273 begin |
280 begin |
274 if (month = 4) and (md = 20) then |
281 if (month = 4) and (md = 20) then |
275 Hat := 'eastertop' // Easter |
282 Hat := 'eastertop' // Easter |
276 else if (month = 12) and ((md = 24) or (md = 25) or (md = 26)) then |
283 else if (month = 12) and ((md = 24) or (md = 25) or (md = 26)) then |
370 procedure StoreLoad(reload: boolean); |
377 procedure StoreLoad(reload: boolean); |
371 var ii: TSprite; |
378 var ii: TSprite; |
372 ai: TAmmoType; |
379 ai: TAmmoType; |
373 tmpsurf, tmpoverlay: PSDL_Surface; |
380 tmpsurf, tmpoverlay: PSDL_Surface; |
374 i, y, imflags: LongInt; |
381 i, y, imflags: LongInt; |
|
382 keyConfirm, keyQuit: shortstring; |
375 begin |
383 begin |
376 AddFileLog('StoreLoad()'); |
384 AddFileLog('StoreLoad()'); |
377 |
385 |
378 if not cOnlyStats then |
386 if not cOnlyStats then |
379 begin |
387 begin |
497 |
505 |
498 InitHealth; |
506 InitHealth; |
499 |
507 |
500 PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig); |
508 PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig); |
501 AFKTexture:= RenderStringTex(trmsg[sidAFK], cYellowColor, fntBig); |
509 AFKTexture:= RenderStringTex(trmsg[sidAFK], cYellowColor, fntBig); |
502 ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], cYellowColor, fntBig); |
510 keyConfirm:= KeyBindToName('confirm'); |
|
511 keyQuit:= KeyBindToName('quit'); |
|
512 ConfirmTexture:= RenderStringTex(Format(trmsg[sidConfirm], [keyConfirm, keyQuit]), cYellowColor, fntBig); |
503 SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig); |
513 SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig); |
504 |
514 |
505 if not reload then |
515 if not reload then |
506 AddProgress; |
516 AddProgress; |
507 |
517 |
996 |
1006 |
997 // default (no extra text) |
1007 // default (no extra text) |
998 extra:= _S''; |
1008 extra:= _S''; |
999 extracolor:= 0; |
1009 extracolor:= 0; |
1000 |
1010 |
1001 if (CurrentTeam <> nil) and (Ammoz[atype].SkipTurns >= CurrentTeam^.Clan^.TurnNumber) then // weapon or utility is not yet available |
1011 if (trluaammoe[Ammoz[atype].NameId] = true) then |
1002 begin |
1012 if (CurrentTeam <> nil) and (Ammoz[atype].SkipTurns >= CurrentTeam^.Clan^.TurnNumber) then // weapon or utility is not yet available |
1003 if (atype = amTardis) and (suddenDeathDmg) then |
1013 begin |
1004 extra:= trmsg[sidNotAvailableInSD] |
1014 if (atype = amTardis) and (SuddenDeathActive) then |
1005 else |
1015 extra:= trmsg[sidNotAvailableInSD] |
1006 extra:= trmsg[sidNotYetAvailable]; |
1016 else |
1007 extracolor:= LongInt($ffc77070); |
1017 extra:= trmsg[sidNotYetAvailable]; |
1008 end |
1018 extracolor:= LongInt($ffc77070); |
1009 else if (Ammoz[atype].Ammo.Propz and ammoprop_NoRoundEnd) <> 0 then // weapon or utility will not end your turn |
1019 end |
1010 begin |
1020 else if (((GameFlags and gfInfAttack) <> 0) and ((Ammoz[atype].Ammo.Propz and ammoprop_ForceTurnEnd) = 0)) or ((Ammoz[atype].Ammo.Propz and ammoprop_NoRoundEnd) <> 0) then |
1011 extra:= trmsg[sidNoEndTurn]; |
1021 // weapon or utility will not end your turn |
1012 extracolor:= LongInt($ff70c770); |
1022 begin |
1013 end |
1023 extra:= trmsg[sidNoEndTurn]; |
1014 else |
1024 extracolor:= LongInt($ff70c770); |
1015 begin |
1025 end; |
1016 extra:= _S''; |
|
1017 extracolor:= 0; |
|
1018 end; |
|
1019 |
1026 |
1020 if length(trluaammo[Ammoz[atype].NameId]) > 0 then |
1027 if length(trluaammo[Ammoz[atype].NameId]) > 0 then |
1021 ammoname := trluaammo[Ammoz[atype].NameId] |
1028 ammoname := trluaammo[Ammoz[atype].NameId] |
1022 else |
1029 else |
1023 ammoname := trammo[Ammoz[atype].NameId]; |
1030 ammoname := trammo[Ammoz[atype].NameId]; |