Skip to content

Commit

Permalink
All walls are now thin walls
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvhewitt committed Feb 7, 2019
1 parent d364b80 commit 4314041
Show file tree
Hide file tree
Showing 16 changed files with 118 additions and 80 deletions.
Binary file added Image/por_f_joe_vanda(--Y).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/por_n_joe_mel(--Y).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_commercial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Image/wall_earth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_garage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_hospital.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_neon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_organic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_restaurant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Image/wall_stainless.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
154 changes: 81 additions & 73 deletions cosplay.pas
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 6 additions & 2 deletions gharena.pas
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();}
Expand Down Expand Up @@ -124,6 +127,7 @@
{$ENDIF}
{$IFDEF SDLMODE}
7: DesignDirBrowser( @RedrawOpening );
8: DoCosplay;
{$ELSE}
7: DesignDirBrowser;
{$ENDIF}
Expand Down
7 changes: 7 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions sdlinfo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
28 changes: 23 additions & 5 deletions sdlmap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ implementation
0, 0
);

NumThinWalls = 8;
NumThinWalls = 16;
ThinWall_Earth = 1;
ThinWall_RustySteel = 2;
ThinWall_Stone = 3;
Expand All @@ -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;
Expand Down Expand Up @@ -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 );}

Expand Down

0 comments on commit 4314041

Please sign in to comment.