equal
deleted
inserted
replaced
76 prevPoint: TPoint; |
76 prevPoint: TPoint; |
77 amSel: TAmmoType = amNothing; |
77 amSel: TAmmoType = amNothing; |
78 missionTex: PTexture; |
78 missionTex: PTexture; |
79 missionTimer: LongInt; |
79 missionTimer: LongInt; |
80 stereoDepth: GLfloat; |
80 stereoDepth: GLfloat; |
|
81 isFirstFrame: boolean; |
|
82 AMAnimType: LongInt; |
81 |
83 |
82 const cStereo_Sky = 0.0500; |
84 const cStereo_Sky = 0.0500; |
83 cStereo_Horizon = 0.0250; |
85 cStereo_Horizon = 0.0250; |
84 cStereo_MidDistance = 0.0175; |
86 cStereo_MidDistance = 0.0175; |
85 cStereo_Water_distant = 0.0125; |
87 cStereo_Water_distant = 0.0125; |
92 var t: ansistring; |
94 var t: ansistring; |
93 begin |
95 begin |
94 if (GameFlags and gf) <> 0 then |
96 if (GameFlags and gf) <> 0 then |
95 begin |
97 begin |
96 t:= inttostr(i); |
98 t:= inttostr(i); |
97 s:= s + format(trgoal[si], t) + '|' |
99 s:= s + FormatA(trgoal[si], t) + '|' |
98 end; |
100 end; |
99 AddGoal:= s; |
101 AddGoal:= s; |
100 end; |
102 end; |
101 |
103 |
102 function AddGoal(s: ansistring; gf: longword; si: TGoalStrId): ansistring; |
104 function AddGoal(s: ansistring; gf: longword; si: TGoalStrId): ansistring; |
380 const BORDERSIZE = 2; |
382 const BORDERSIZE = 2; |
381 var x, y, i, t, SlotsNumY, SlotsNumX, AMFrame: LongInt; |
383 var x, y, i, t, SlotsNumY, SlotsNumX, AMFrame: LongInt; |
382 STurns: LongInt; |
384 STurns: LongInt; |
383 amSurface: PSDL_Surface; |
385 amSurface: PSDL_Surface; |
384 AMRect: TSDL_Rect; |
386 AMRect: TSDL_Rect; |
385 tmpsurf: PSDL_Surface; |
387 {$IFDEF USE_AM_NUMCOLUMN}tmpsurf: PSDL_Surface;{$ENDIF} |
386 begin |
388 begin |
387 SlotsNum:= 0; |
389 SlotsNum:= 0; |
388 for i:= 0 to cMaxSlotIndex do |
390 for i:= 0 to cMaxSlotIndex do |
389 if((i = 0) and (Ammo^[i,1].Count > 0)) or ((i <> 0) and (Ammo^[i,0].Count > 0)) then |
391 if((i = 0) and (Ammo^[i,1].Count > 0)) or ((i <> 0) and (Ammo^[i,0].Count > 0)) then |
390 inc(SlotsNum); |
392 inc(SlotsNum); |
1749 else UndampenAudio(); |
1751 else UndampenAudio(); |
1750 end; |
1752 end; |
1751 |
1753 |
1752 procedure SetUtilityWidgetState(ammoType: TAmmoType); |
1754 procedure SetUtilityWidgetState(ammoType: TAmmoType); |
1753 begin |
1755 begin |
1754 {$IFDEF TOUCH_INTERFACE} |
1756 {$IFDEF USE_TOUCH_INTERFACE} |
1755 if(ammoType = amNothing)then |
1757 if(ammoType = amNothing)then |
1756 ammoType:= CurrentHedgehog^.CurAmmoType; |
1758 ammoType:= CurrentHedgehog^.CurAmmoType; |
1757 |
1759 |
1758 if(CurrentHedgehog <> nil)then |
1760 if(CurrentHedgehog <> nil)then |
1759 if (Ammoz[ammoType].Ammo.Propz and ammoprop_Timerable) <> 0 then |
1761 if (Ammoz[ammoType].Ammo.Propz and ammoprop_Timerable) <> 0 then |
1800 end; |
1802 end; |
1801 |
1803 |
1802 |
1804 |
1803 procedure initModule; |
1805 procedure initModule; |
1804 begin |
1806 begin |
1805 fpsTexture:= nil; |
1807 fpsTexture:= nil; |
1806 FollowGear:= nil; |
1808 FollowGear:= nil; |
1807 WindBarWidth:= 0; |
1809 WindBarWidth:= 0; |
1808 bShowAmmoMenu:= false; |
1810 bShowAmmoMenu:= false; |
1809 bSelected:= false; |
1811 bSelected:= false; |
1810 bShowFinger:= false; |
1812 bShowFinger:= false; |
1811 Frames:= 0; |
1813 Frames:= 0; |
1812 WorldDx:= -512; |
1814 WorldDx:= -512; |
1813 WorldDy:= -256; |
1815 WorldDy:= -256; |
1814 |
1816 |
1815 FPS:= 0; |
1817 FPS:= 0; |
1816 CountTicks:= 0; |
1818 CountTicks:= 0; |
1817 SoundTimerTicks:= 0; |
1819 SoundTimerTicks:= 0; |
1818 prevPoint.X:= 0; |
1820 prevPoint.X:= 0; |
1819 prevPoint.Y:= 0; |
1821 prevPoint.Y:= 0; |
1820 missionTimer:= 0; |
1822 missionTimer:= 0; |
1821 missionTex:= nil; |
1823 missionTex:= nil; |
1822 cOffsetY:= 0; |
1824 cOffsetY:= 0; |
1823 stereoDepth:= 0; |
1825 stereoDepth:= 0; |
1824 AMState:= AMHidden; |
1826 AMState:= AMHidden; |
|
1827 isFirstFrame:= true; |
1825 end; |
1828 end; |
1826 |
1829 |
1827 procedure freeModule; |
1830 procedure freeModule; |
1828 begin |
1831 begin |
1829 stereoDepth:= stereoDepth; // avoid hint |
1832 stereoDepth:= stereoDepth; // avoid hint |
1830 FreeTexture(fpsTexture); |
1833 FreeTexture(fpsTexture); |
1831 fpsTexture:= nil; |
1834 fpsTexture:= nil; |
1832 FreeTexture(timeTexture); |
1835 FreeTexture(timeTexture); |
1833 timeTexture:= nil; |
1836 timeTexture:= nil; |
1834 FreeTexture(missionTex); |
1837 FreeTexture(missionTex); |
1835 missionTex:= nil |
1838 missionTex:= nil |
1836 end; |
1839 end; |
1837 |
1840 |
1838 end. |
1841 end. |