--- a/QTfrontend/CMakeLists.txt Wed Jul 26 13:44:11 2006 +0000
+++ b/QTfrontend/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -16,7 +16,8 @@
vertScrollArea.cpp
gameuiconfig.cpp
ui_hwform.cpp
- gamecfgwidget.cpp)
+ gamecfgwidget.cpp
+ pages.cpp)
if (WIN32)
set(hwfr_src ${hwfr_src} res/hedgewars.rc)
@@ -33,7 +34,8 @@
gameuiconfig.h
ui_hwform.h
gamecfgwidget.h
- predefteams.h)
+ predefteams.h
+ pages.h)
set(hwfr_rez
@@ -56,4 +58,4 @@
${QT_QTNETWORK_LIBRARY}
${QT_QTMAIN_LIBRARY})
-install_targets(/bin hedgewars)
+install(PROGRAMS "hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
--- a/hedgewars/CMakeLists.txt Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -39,7 +39,6 @@
message(FATAL_ERROR "No Pascal compiler found!")
endif (NOT pascal_compiler)
-add_custom_target(hwengine ALL
- ${pascal_compiler} ${pascal_compiler_flags})
+add_custom_command(COMMAND ${pascal_compiler} TARGET hwengine OUTPUTS hwengine ARGS ${pascal_compiler_flags})
-install_targets(/bin hwengine)
+install(PROGRAMS "hwengine${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
--- a/hedgewars/Data/CMakeLists.txt Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/Data/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,3 @@
+foreach(dir "Fonts" "Forts" "Graphics" "Locale" "Maps" "Sounds" "Themes")
+ add_subdirectory(${dir})
+endforeach(dir)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Fonts/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,1 @@
+install(FILES DejaVuSans.ttf DESTINATION Data/Fonts)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Forts/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,6 @@
+install(FILES
+ BarrelhouseL.png
+ BarrelhouseR.png
+ IslandL.png
+ IslandR.png
+ DESTINATION Data/Forts)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Graphics/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,35 @@
+add_subdirectory(Graves)
+install(FILES
+ Arrow.png
+ BigDigits.png
+ BlueWater.png
+ Bomb.png
+ Case.png
+ ClBomb.png
+ Clouds.png
+ ClParticle.png
+ Console.png
+ Crosshair.png
+ dynamite.png
+ Expl50.png
+ FirstAid.png
+ Flame.png
+ Frame.png
+ Girder.png
+ Grenade.png
+ Hedgehog.png
+ Lag.png
+ MineOff.png
+ MineOn.png
+ Power.png
+ PowerBar.png
+ RopeHook.png
+ RopeNode.png
+ SmokeTrace.png
+ Targetp.png
+ thinking.png
+ UFO.png
+ WindBar.png
+ WindL.png
+ WindR.png
+ DESTINATION Data/Graphics)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Graphics/Graves/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,6 @@
+install(FILES
+ Bone.png
+ coffin.png
+ Rip.png
+ Simple.png
+ DESTINATION Data/Graphics/Graves)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Locale/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,4 @@
+install(FILES
+ en.txt
+ ru.txt
+ DESTINATION Data/Locale)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Sounds/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,11 @@
+install(FILES
+ explosion.ogg
+ graveimpact.ogg
+ grenadeimpact.ogg
+ minetick.ogg
+ shotgunfire.ogg
+ shotgunreload.ogg
+ splash.ogg
+ throwpowerup.ogg
+ throwrelease.ogg
+ DESTINATION Data/Sounds)
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,5 @@
+foreach(dir avematan bubbles ethereal norsk steel tibet wood xtheme)
+ add_subdirectory(${dir})
+endforeach(dir)
+
+install(FILES themes.cfg DESTINATION Data/Themes)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/avematan/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,11 @@
+install(FILES
+ a.png
+ Border.png
+ e.png
+ horizont.png
+ inf.png
+ LandTex.png
+ Sky.png
+ sqrt.png
+ theme.cfg
+ DESTINATION Data/Themes/avematan)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/bubbles/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,8 @@
+install(FILES
+ Border.png
+ horizont.png
+ LandTex.png
+ round.png
+ Sky.png
+ theme.cfg
+ DESTINATION Data/Themes/bubbles)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/steel/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,12 @@
+install(FILES
+ 01.png
+ 02.png
+ Border.png
+ Clouds.16.png
+ Clouds.32.png
+ horizont.png
+ LandTex.png
+ Sky.16.png
+ Sky.32.png
+ theme.cfg
+ DESTINATION Data/Themes/steel)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/tibet/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,12 @@
+install(FILES
+ Border.png
+ chha.png
+ horizont.png
+ LandTex.png
+ ma.png
+ nga.png
+ sa.png
+ Sky.png
+ ta1.png
+ theme.cfg
+ DESTINATION Data/Themes/tibet)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/wood/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,11 @@
+install(FILES
+ Border.png
+ gr1.png
+ horizont.png
+ LandTex.png
+ leaf1.png
+ leaf2.png
+ Sky.png
+ tree.png
+ theme.cfg
+ DESTINATION Data/Themes/wood)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hedgewars/Data/Themes/xtheme/CMakeLists.txt Thu Jul 27 15:24:14 2006 +0000
@@ -0,0 +1,8 @@
+install(FILES
+ Border.png
+ horizont.png
+ LandTex.png
+ plant1.png
+ Sky.png
+ theme.cfg
+ DESTINATION Data/Themes/xtheme)
--- a/hedgewars/GSHandlers.inc Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/GSHandlers.inc Thu Jul 27 15:24:14 2006 +0000
@@ -675,7 +675,7 @@
////////////////////////////////////////////////////////////////////////////////
procedure doStepCase(Gear: PGear);
-var i: integer;
+var i, x, y: integer;
begin
if (Gear.Message and gm_Destroy) > 0 then
begin
@@ -685,10 +685,12 @@
if Gear.Damage > 0 then
begin
+ x:= round(Gear.X);
+ y:= round(Gear.Y);
DeleteGear(Gear);
- doMakeExplosion(round(Gear.X), round(Gear.Y), 25, EXPLAutoSound);
+ doMakeExplosion(x, y, 25, EXPLAutoSound);
for i:= 0 to 63 do
- AddGear(round(Gear.X), round(Gear.Y), gtFlame, 0);
+ AddGear(x, y, gtFlame, 0);
exit
end;
--- a/hedgewars/uGame.pas Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/uGame.pas Thu Jul 27 15:24:14 2006 +0000
@@ -66,7 +66,9 @@
if Lag > 100 then Lag:= 100
else if GameType = gmtSave then Lag:= 2500;
-for i:= 1 to Lag do
+i:= 1;
+while (GameState <> gsExit) and (i <= Lag) do
+ begin
if not CurrentTeam.ExtDriven then
begin
with CurrentTeam^ do
@@ -90,6 +92,8 @@
end
else ProcessGears
end;
+ inc(i)
+ end;
if not CurrentTeam.ExtDriven then isInLag:= false;
MoveCamera
--- a/hedgewars/uGears.pas Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/uGears.pas Thu Jul 27 15:24:14 2006 +0000
@@ -324,6 +324,7 @@
t:= Gear.NextGear;
if Gear.Active then Gear.doStep(Gear);
end;
+
if AllInactive then
case step of
stDelay: begin
--- a/hedgewars/uLand.pas Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/uLand.pas Thu Jul 27 15:24:14 2006 +0000
@@ -64,7 +64,7 @@
{$ENDIF}
end;
-procedure DrawBezierEdge(var pa: TPixAr);
+procedure DrawBezierEdge(var pa: TPixAr; Color: Longword);
var x, y, i: integer;
tx, ty, vx, vy, vlen, t: real;
r1, r2, r3, r4: real;
@@ -121,7 +121,7 @@
Y:= round(r1 + r2 + r3 + r4);
t:= t + 0.001;
if ((x and $FFFFF800) = 0) and ((y and $FFFFFC00) = 0) then
- Land[y, x]:= 0;
+ Land[y, x]:= Color;
end;
end;
end;
@@ -450,11 +450,13 @@
PointWave(Template, pa);
NormalizePoints(pa);
- DrawBezierEdge(pa);
+ DrawBezierEdge(pa, 0);
for i:= 0 to pred(FillPointsCount) do
with FillPoints^[i] do
- FillLand(x, y)
+ FillLand(x, y);
+
+ DrawBezierEdge(pa, COLOR_LAND);
end;
end;
--- a/hedgewars/uTeams.pas Wed Jul 26 13:44:11 2006 +0000
+++ b/hedgewars/uTeams.pas Thu Jul 27 15:24:14 2006 +0000
@@ -126,7 +126,7 @@
begin
FreeActionsList;
TargetPoint.X:= NoPointX;
-if CurrentTeam = nil then OutError('nil Team', true);
+TryDo(CurrentTeam <> nil, 'nil Team', true);
tteam:= CurrentTeam;
with CurrentTeam.Hedgehogs[CurrentTeam.CurrHedgehog] do
if Gear <> nil then Gear.Message:= 0;