- Quick hack for hats
authorunc0rr
Sun, 01 Jun 2008 20:01:45 +0000
changeset 970 1bd9a4eafbc3
parent 969 7e8a87136fae
child 971 d2c49b730771
- Quick hack for hats - Fix fullscreen command
hedgewars/CCHandlers.inc
hedgewars/uConsole.pas
hedgewars/uConsts.pas
hedgewars/uGears.pas
--- a/hedgewars/CCHandlers.inc	Sun Jun 01 18:54:10 2008 +0000
+++ b/hedgewars/CCHandlers.inc	Sun Jun 01 20:01:45 2008 +0000
@@ -419,7 +419,7 @@
     buf: array[byte] of char;
 {$ENDIF}
 begin
-if Length(s) = 0 then cFullScreen:= not cFullScreen
+if Length(s) = 0 then exit //cFullScreen:= not cFullScreen
                  else cFullScreen:= s = '1';
 
 {$IFDEF DEBUGFILE}
--- a/hedgewars/uConsole.pas	Sun Jun 01 18:54:10 2008 +0000
+++ b/hedgewars/uConsole.pas	Sun Jun 01 20:01:45 2008 +0000
@@ -310,7 +310,7 @@
 RegisterVariable('put'     , vtCommand, @chPut          , false);
 RegisterVariable('ljump'   , vtCommand, @chLJump        , false);
 RegisterVariable('hjump'   , vtCommand, @chHJump        , false);
-//RegisterVariable('fullscr' , vtCommand, @chFullScr      , true );
+RegisterVariable('fullscr' , vtCommand, @chFullScr      , true );
 RegisterVariable('+volup'  , vtCommand, @chVol_p        , true );
 RegisterVariable('-volup'  , vtCommand, @chVol_m        , true );
 RegisterVariable('+voldown', vtCommand, @chVol_m        , true );
--- a/hedgewars/uConsts.pas	Sun Jun 01 18:54:10 2008 +0000
+++ b/hedgewars/uConsts.pas	Sun Jun 01 20:01:45 2008 +0000
@@ -29,7 +29,7 @@
 
      TPathType  = (ptNone, ptData, ptGraphics, ptThemes, ptCurrTheme, ptTeams, ptMaps,
                    ptMapCurrent, ptDemos, ptSounds, ptGraves, ptFonts, ptForts,
-                   ptLocale, ptAmmoMenu, ptHedgehog, ptVoices);
+                   ptLocale, ptAmmoMenu, ptHedgehog, ptVoices, ptHats);
 
      TSprite    = (sprWater, sprCloud, sprBomb, sprBigDigit, sprFrame,
                    sprLag, sprArrow, sprGrenade, sprTargetP, sprUFO,
@@ -44,7 +44,8 @@
                    sprFlake, sprHandRope, sprHandBazooka, sprHandShotgun,
                    sprHandDEagle, sprHandAirAttack, sprHandBaseball, sprPHammer,
                    sprHandBlowTorch, sprBlowTorch, sprTeleport, sprHHDeath,
-                   sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft);
+                   sprShotgun, sprDEagle, sprHHIdle, sprMortar, sprTurnsLeft,
+                   sprHat);
 
      TGearType  = (gtAmmo_Bomb, gtHedgehog, gtAmmo_Grenade, gtHealthTag,
                    gtGrave, gtUFO, gtShotgunShot, gtPickHammer, gtRope,
@@ -253,7 +254,8 @@
                                                'Locale',                        // ptLocale
                                                'Graphics/AmmoMenu',             // ptAmmoMenu
                                                'Graphics/Hedgehog',             // ptHedgehog
-                                               'Sounds/voices'                  // ptVoices
+                                               'Sounds/voices',                 // ptVoices
+                                               'Graphics/Hats'                  // ptHats
                                                );
 
       SpritesData: array[TSprite] of record
@@ -389,7 +391,9 @@
                      (FileName:     'Mortar'; Path: ptGraphics; AltPath: ptNone; Texture: nil; Surface: nil;
                       Width:  16; Height: 16; saveSurf: false),// sprMortar
                      (FileName:  'TurnsLeft'; Path: ptAmmoMenu; AltPath: ptNone; Texture: nil; Surface: nil;
-                      Width:  16; Height: 16; saveSurf: false) // sprTurnsLeft
+                      Width:  16; Height: 16; saveSurf: false),// sprTurnsLeft
+                     (FileName:    'Samurai'; Path: ptHats    ; AltPath: ptNone; Texture: nil; Surface: nil;
+                      Width:  32; Height: 32; saveSurf: false) // sprHat
                      );
 
       Soundz: array[TSound] of record
--- a/hedgewars/uGears.pas	Sun Jun 01 18:54:10 2008 +0000
+++ b/hedgewars/uGears.pas	Sun Jun 01 20:01:45 2008 +0000
@@ -663,12 +663,20 @@
 
 
 if defaultPos then
+	begin
 	DrawRotatedF(sprHHIdle,
 		hwRound(Gear^.X) + 1 + WorldDx,
 		hwRound(Gear^.Y) - 3 + WorldDy,
 		(RealTicks div 128 + Gear^.Pos) mod 19,
 		hwSign(Gear^.dX),
 		0);
+	DrawRotatedF(sprHat,
+		hwRound(Gear^.X) + 1 + WorldDx,
+		hwRound(Gear^.Y) - 8 + WorldDy,
+		(RealTicks div 128 + Gear^.Pos) mod 19,
+		hwSign(Gear^.dX),
+		0);
+	end;
 
 with PHedgehog(Gear^.Hedgehog)^ do
 	if (Gear^.State{ and not gstAnimation}) = 0 then