diff --git a/Image/por_f_joe_vanda(--Y).png b/Image/por_f_joe_vanda(--Y).png new file mode 100644 index 0000000..3858db2 Binary files /dev/null and b/Image/por_f_joe_vanda(--Y).png differ diff --git a/Image/por_n_joe_mel(--Y).png b/Image/por_n_joe_mel(--Y).png new file mode 100644 index 0000000..51a055a Binary files /dev/null and b/Image/por_n_joe_mel(--Y).png differ diff --git a/Image/wall_commercial.png b/Image/wall_commercial.png new file mode 100644 index 0000000..f93b5a3 Binary files /dev/null and b/Image/wall_commercial.png differ diff --git a/Image/wall_earth.png b/Image/wall_earth.png index a9e6442..ac4f3f5 100644 Binary files a/Image/wall_earth.png and b/Image/wall_earth.png differ diff --git a/Image/wall_garage.png b/Image/wall_garage.png new file mode 100644 index 0000000..d00bdfd Binary files /dev/null and b/Image/wall_garage.png differ diff --git a/Image/wall_gold.png b/Image/wall_gold.png new file mode 100644 index 0000000..4ad379c Binary files /dev/null and b/Image/wall_gold.png differ diff --git a/Image/wall_hospital.png b/Image/wall_hospital.png new file mode 100644 index 0000000..a9df43d Binary files /dev/null and b/Image/wall_hospital.png differ diff --git a/Image/wall_neon.png b/Image/wall_neon.png new file mode 100644 index 0000000..47852ff Binary files /dev/null and b/Image/wall_neon.png differ diff --git a/Image/wall_organic.png b/Image/wall_organic.png new file mode 100644 index 0000000..2e92d3c Binary files /dev/null and b/Image/wall_organic.png differ diff --git a/Image/wall_restaurant.png b/Image/wall_restaurant.png new file mode 100644 index 0000000..d807b90 Binary files /dev/null and b/Image/wall_restaurant.png differ diff --git a/Image/wall_stainless.png b/Image/wall_stainless.png new file mode 100644 index 0000000..0aae28d Binary files /dev/null and b/Image/wall_stainless.png differ diff --git a/cosplay.pas b/cosplay.pas index 1202e67..a62f9f2 100644 --- a/cosplay.pas +++ b/cosplay.pas @@ -1,74 +1,82 @@ -program cosplay2; - -uses gears,sdlgfx,sdlmenus,colormenu,sdl; - -Procedure RedrawOpening; - { The opening menu redraw procedure. } -begin - ClrScreen; - ClearExtendedBorder( ZONE_Menu.GetRect() ); -end; - -Procedure BrowseByType( FPat: String; width,height,frames,ColorMode: Integer ); - { Browse the images by file pattern and color mode. } -var - FileMenu: RPGMenuPtr; - SpriteName: String; -begin - FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu ); - if FPat = '' then begin - { We want all the mecha. All of them!!! } - BuildFileMenu( FileMenu , Graphics_Directory + 'aer_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'ara_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'btr_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'gca_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'ger_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'ghu_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'hov_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'orn_*.png' ); - BuildFileMenu( FileMenu , Graphics_Directory + 'zoa_*.png' ); - - end else BuildFileMenu( FileMenu , Graphics_Directory + FPat ); - RPMSortAlpha( FileMenu ); - AddRPGMenuItem( FileMenu, MsgString( 'EXIT' ), -1 ); - SpriteName := ''; - - repeat - SpriteName := SelectFile( FileMenu , @RedrawOpening ); - if SpriteName <> '' then SelectColorPalette( ColorMode, SpriteName, '200 0 0 200 200 0 0 200 0', width, height, frames, @ClrScreen ); - until SpriteName = ''; - - DisposeRPGMenu( FileMenu ); -end; - -var - FileMenu: RPGMenuPtr; - N: Integer; - MySprite: SensibleSpritePtr; - -begin - FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu ); - - {MySprite := ConfirmSprite( 'Elisha_Demo.png', '80 40 120 255 230 200 166 47 32', 64, 64 );} - {SDL_SaveBmp( MySprite^.img , 'out.bmp' );} - - AddRPGMenuItem( FileMenu , 'Browse Portraits' , 1 ); - AddRPGMenuItem( FileMenu , 'Browse Mecha' , 2 ); - AddRPGMenuItem( FileMenu , 'Browse Monsters' , 3 ); - AddRPGMenuItem( FileMenu , 'Browse All' , 4 ); - - repeat - N := SelectMenu( FileMenu , @RedrawOpening ); - case N of - 1: BrowseByType( 'por_*.png' , 100, 150, 0, colormenu_mode_character ); - 2: BrowseByType( '' , 64, 64, 8, colormenu_mode_mecha ); - 3: BrowseByType( 'monster_*.png' , 64, 64, 8, colormenu_mode_allcolors ); - 4: BrowseByType( '*.png' , 211, 308, 0, colormenu_mode_allcolors ); - end; - - until N = -1; - - - - DisposeRPGMenu( FileMenu ); +unit cosplay; + +interface + uses gears,sdlgfx,sdlmenus,colormenu,sdl; + + Procedure DoCosplay(); + + +implementation + Procedure RedrawOpening; + { The opening menu redraw procedure. } + begin + ClrScreen; + ClearExtendedBorder( ZONE_Menu.GetRect() ); + end; + + Procedure BrowseByType( FPat: String; width,height,frames,ColorMode: Integer ); + { Browse the images by file pattern and color mode. } + var + FileMenu: RPGMenuPtr; + SpriteName: String; + begin + FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu ); + if FPat = '' then begin + { We want all the mecha. All of them!!! } + BuildFileMenu( FileMenu , Graphics_Directory + 'aer_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'ara_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'btr_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'gca_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'ger_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'ghu_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'hov_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'orn_*.png' ); + BuildFileMenu( FileMenu , Graphics_Directory + 'zoa_*.png' ); + + end else BuildFileMenu( FileMenu , Graphics_Directory + FPat ); + RPMSortAlpha( FileMenu ); + AddRPGMenuItem( FileMenu, MsgString( 'EXIT' ), -1 ); + SpriteName := ''; + + repeat + SpriteName := SelectFile( FileMenu , @RedrawOpening ); + if SpriteName <> '' then SelectColorPalette( ColorMode, SpriteName, '200 0 0 200 200 0 0 200 0', width, height, frames, @ClrScreen ); + until SpriteName = ''; + + DisposeRPGMenu( FileMenu ); + end; + + Procedure DoCosplay(); + + var + FileMenu: RPGMenuPtr; + N: Integer; + MySprite: SensibleSpritePtr; + + begin + FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu ); + + {MySprite := ConfirmSprite( 'Elisha_Demo.png', '80 40 120 255 230 200 166 47 32', 64, 64 );} + {SDL_SaveBmp( MySprite^.img , 'out.bmp' );} + + AddRPGMenuItem( FileMenu , 'Browse Portraits' , 1 ); + AddRPGMenuItem( FileMenu , 'Browse Mecha' , 2 ); + AddRPGMenuItem( FileMenu , 'Browse Monsters' , 3 ); + AddRPGMenuItem( FileMenu , 'Browse All' , 4 ); + + repeat + N := SelectMenu( FileMenu , @RedrawOpening ); + case N of + 1: BrowseByType( 'por_*.png' , 100, 150, 0, colormenu_mode_character ); + 2: BrowseByType( '' , 64, 64, 8, colormenu_mode_mecha ); + 3: BrowseByType( 'monster_*.png' , 64, 64, 8, colormenu_mode_allcolors ); + 4: BrowseByType( '*.png' , 211, 308, 0, colormenu_mode_allcolors ); + end; + + until N = -1; + + + + DisposeRPGMenu( FileMenu ); + end; end. diff --git a/gharena.pas b/gharena.pas index 7c91641..e7e912a 100644 --- a/gharena.pas +++ b/gharena.pas @@ -30,13 +30,13 @@ {$IFNDEF DEBUG} {$APPTYPE GUI} {$ENDIF} -uses gears,sdlgfx,arenahq,sdlmenus,randchar,navigate,sdlmap,ghchars; +uses gears,sdlgfx,arenahq,sdlmenus,randchar,navigate,sdlmap,ghchars,cosplay; {$ELSE} uses gears,congfx,arenahq,conmenus,randchar,navigate,context,mapedit; {$ENDIF} const - Version = '1.302'; + Version = '1.310'; var RPM: RPGMenuPtr; @@ -87,6 +87,9 @@ AddRPGMenuItem( RPM , 'Edit Map' , 6 ); {$ENDIF} AddRPGMenuItem( RPM , 'View Design Files' , 7 ); +{$IFDEF SDLMODE} + AddRPGMenuItem( RPM , 'View Color Selector' , 8 ); +{$ENDIF} AddRPGMenuItem( RPM , 'Quit Game' , -1 ); {GenNames();} @@ -124,6 +127,7 @@ {$ENDIF} {$IFDEF SDLMODE} 7: DesignDirBrowser( @RedrawOpening ); + 8: DoCosplay; {$ELSE} 7: DesignDirBrowser; {$ENDIF} diff --git a/history.txt b/history.txt index bcb2cbd..9d25ecf 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,10 @@ +1.310 February 7 2019 +- All old style walls have been replaced by thin walls (sdlmap.pp) +- Portraits may be assigned as unisex "por_n_*.png" (sdlinfo.pp) +- Cosplay changed from separate program to main menu option (cosplay.pas) +- Centers on player, shows active player in info box, at start of tactics turn (arenaplay.pp) +- Cannot sell items for higher price than you bought them (services.pp) +- Lancemate field of view also visible (conmap.pp, sdlmap.pp) - Fixed problem with SanitizeFilename on Windows (pcaction.pp,navigate.pp) - Some illegal characters removed from filenames (texutil.pp) - FillRectWithSprite can now accept x,y offsets (sdlgfx.pp) diff --git a/sdlinfo.pp b/sdlinfo.pp index f5f9d0e..5377de0 100644 --- a/sdlinfo.pp +++ b/sdlinfo.pp @@ -93,6 +93,7 @@ implementation end else begin PList := CreateFileList( Graphics_Directory + 'por_m_*.*' ); ExpandFileList( PList, Graphics_Directory + 'por_f_*.*' ); + ExpandFileList( PList, Graphics_Directory + 'por_n_*.*' ); end; DefaultPortraitList := PList; end; diff --git a/sdlmap.pp b/sdlmap.pp index 26f1cdc..c67e88a 100644 --- a/sdlmap.pp +++ b/sdlmap.pp @@ -110,7 +110,7 @@ implementation 0, 0 ); - NumThinWalls = 8; + NumThinWalls = 16; ThinWall_Earth = 1; ThinWall_RustySteel = 2; ThinWall_Stone = 3; @@ -119,13 +119,22 @@ implementation ThinWall_Wood = 6; ThinWall_Default = 7; ThinWall_Fortress = 8; + ThinWall_Hospital = 9; + ThinWall_Golden = 10; + ThinWall_Commercial = 11; + ThinWall_StainlessSteel = 12; + ThinWall_Neon = 13; + ThinWall_Restaurant = 14; + ThinWall_Garage = 15; + ThinWall_Organic = 16; + Terrain_Image: Array [1..NumTerr] of SmallInt = ( 1, 2, 3, 4, 5, 6, 7, 8, 9,10, - 11,12,-5,14,-3, 16,17,18,19,20, - 21,22,-Thinwall_Default,24,25, 26,-ThinWall_Wood,28,-ThinWall_RustySteel,30, - -1,32,-ThinWall_Fortress,34,-4, 36,37,38,39,40, - 41,42 + 11,12,-ThinWall_Residential,14,-Thinwall_Stone, 16,17,-ThinWall_Hospital,19,20, + 21,22,-Thinwall_Default,-ThinWall_Golden,25, 26,-ThinWall_Wood,28,-ThinWall_RustySteel,30, + -ThinWall_Earth,-ThinWall_Commercial,-ThinWall_Fortress,-ThinWall_StainlessSteel,-ThinWall_Industrial, -ThinWall_Neon,-ThinWall_Restaurant,-ThinWall_Garage,39,40, + 41,-ThinWall_Organic ); HalfTileWidth = 32; @@ -1597,6 +1606,15 @@ initialization Thin_Wall_Sprites[ ThinWall_Default ] := ConfirmSprite( 'wall_default.png' , '' , 64 , 96 ); Thin_Wall_Sprites[ ThinWall_Fortress ] := ConfirmSprite( 'wall_fortress.png' , '' , 64 , 96 ); + Thin_Wall_Sprites[ ThinWall_Hospital ] := ConfirmSprite( 'wall_hospital.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Golden ] := ConfirmSprite( 'wall_gold.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Commercial ] := ConfirmSprite( 'wall_commercial.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_StainlessSteel ] := ConfirmSprite( 'wall_stainless.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Neon ] := ConfirmSprite( 'wall_neon.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Restaurant ] := ConfirmSprite( 'wall_restaurant.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Garage ] := ConfirmSprite( 'wall_garage.png' , '' , 64 , 64 ); + Thin_Wall_Sprites[ ThinWall_Organic ] := ConfirmSprite( 'wall_organic.png' , '' , 64 , 64 ); + Thin_wall_Cap := ConfirmSprite( 'wall_cap.png' , '' , 64 , 96 ); {SDL_SetAlpha( Thin_wall_Cap^.Img , SDL_SRCAlpha , 128 );}