Engine:
* Changed order of game goals
* Added texture drawing (based on pixel width/height; unused in HEAD right now but working on some ideas)
* Added comments to trainings
--- a/hedgewars/uStore.pas Sat Mar 06 13:54:55 2010 +0000
+++ b/hedgewars/uStore.pas Sat Mar 06 13:55:58 2010 +0000
@@ -58,6 +58,7 @@
procedure DrawRotatedF(Sprite: TSprite; X, Y, Frame, Dir: LongInt; Angle: real);
procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
procedure DrawCentered(X, Top: LongInt; Source: PTexture);
+procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
procedure DrawFillRect(r: TSDL_Rect);
@@ -448,6 +449,11 @@
end;
procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
+begin
+DrawFromRect(X, Y, r^.w, r^.h, r, SourceTexture)
+end;
+
+procedure DrawFromRect(X, Y, W, H: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
var rr: TSDL_Rect;
_l, _r, _t, _b: real;
VertexBuffer, TextureBuffer: array [0..3] of TVertex2f;
@@ -455,8 +461,8 @@
if (SourceTexture^.h = 0) or (SourceTexture^.w = 0) then exit;
rr.x:= X;
rr.y:= Y;
-rr.w:= r^.w;
-rr.h:= r^.h;
+rr.w:= W;
+rr.h:= H;
_l:= r^.x / SourceTexture^.w * SourceTexture^.rx;
_r:= (r^.x + r^.w) / SourceTexture^.w * SourceTexture^.rx;
--- a/hedgewars/uWorld.pas Sat Mar 06 13:54:55 2010 +0000
+++ b/hedgewars/uWorld.pas Sat Mar 06 13:55:58 2010 +0000
@@ -120,6 +120,21 @@
// if special game flags/settings are changed, add them to the game mode notice window and then show it
g:= ''; // no text/things to note yet
+// check different game flags (goals/game modes first for now)
+g:= AddGoal(g, gfKing, gidKing); // king?
+g:= AddGoal(g, gfTreasureHunt, gidTreasureHunt, cTreasureHuntGoalScore); // treasure hunt?
+
+// other important flags
+g:= AddGoal(g, gfForts, gidForts); // forts?
+g:= AddGoal(g, gfLowGravity, gidLowGravity); // low gravity?
+g:= AddGoal(g, gfInvulnerable, gidInvulnerable); // invulnerability?
+g:= AddGoal(g, gfVampiric, gidVampiric); // vampirism?
+g:= AddGoal(g, gfKarma, gidKarma); // karma?
+g:= AddGoal(g, gfPlaceHog, gidPlaceHog); // placement?
+g:= AddGoal(g, gfArtillery, gidArtillery); // artillery?
+g:= AddGoal(g, gfSolidLand, gidSolidLand); // solid land?
+g:= AddGoal(g, gfSharedAmmo, gidSharedAmmo); // shared ammo?
+
// modified damage modificator?
if cDamagePercent <> 100 then
g:= AddGoal(g, gfAny, gidDamageModifier, cDamagePercent);
@@ -135,18 +150,6 @@
g:= AddGoal(g, gfMines, gidMineTimer, cMinesTime div 1000);
end;
-// check different game flags
-g:= AddGoal(g, gfForts, gidForts); // forts?
-g:= AddGoal(g, gfLowGravity, gidLowGravity); // low gravity?
-g:= AddGoal(g, gfInvulnerable, gidInvulnerable); // invulnerability?
-g:= AddGoal(g, gfVampiric, gidVampiric); // vampirism?
-g:= AddGoal(g, gfKarma, gidKarma); // karma?
-g:= AddGoal(g, gfKing, gidKing); // king?
-g:= AddGoal(g, gfPlaceHog, gidPlaceHog); // placement?
-g:= AddGoal(g, gfArtillery, gidArtillery); // artillery?
-g:= AddGoal(g, gfSolidLand, gidSolidLand); // solid land?
-g:= AddGoal(g, gfSharedAmmo, gidSharedAmmo); // shared ammo?
-
// if the string has been set, show it for (default timeframe) seconds
if g <> '' then ShowMission(trgoal[gidCaption], trgoal[gidSubCaption], g, 1, 0);
--- a/share/hedgewars/Data/Missions/Bazooka Training.hwt Sat Mar 06 13:54:55 2010 +0000
+++ b/share/hedgewars/Data/Missions/Bazooka Training.hwt Sat Mar 06 13:55:58 2010 +0000
@@ -18,7 +18,10 @@
local caption = {
["en"] = "Bazooka Training",
["de"] = "Bazooka-Training"
+ -- To add other languages, just add lines similar to the
+ -- existing ones - don't forget the trailing ","!
}
+
local subcaption = {
["en"] = "Aiming Practice",
["de"] = "Zielübung"
--- a/share/hedgewars/Data/Missions/Shotgun Training.hwt Sat Mar 06 13:54:55 2010 +0000
+++ b/share/hedgewars/Data/Missions/Shotgun Training.hwt Sat Mar 06 13:55:58 2010 +0000
@@ -18,7 +18,10 @@
local caption = {
["en"] = "Bazooka Training",
["de"] = "Bazooka-Training"
+ -- To add other languages, just add lines similar to the
+ -- existing ones - don't forget the trailing ","!
}
+
local subcaption = {
["en"] = "Aiming Practice",
["de"] = "Zielübung"