Skip to content

Commit

Permalink
Fixed ExpressDelivery info, started fixing chargen
Browse files Browse the repository at this point in the history
  • Loading branch information
jwvhewitt committed Nov 17, 2017
1 parent 9e42bc0 commit bcc21ea
Show file tree
Hide file tree
Showing 12 changed files with 254 additions and 128 deletions.
62 changes: 54 additions & 8 deletions chargen.pp
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,19 @@ implementation
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CharGenMenu );
RPM^.Mode := RPMNoCleanup;

{$IFDEF ASCII}
RCDescMessage := MsgString( 'RANDCHAR_SkillDesc' );
RCPromptMessage := '';
RCCaption := '';
AttachMenuDesc( RPM , ZONE_CharGenPrompt );

{$ELSE}
RCDescMessage := '';
RCPromptMessage := MsgString( 'RANDCHAR_SkillPrompt' );
RCCaption := '';
AttachMenuDesc( RPM , ZONE_CharGenDesc );

{$ENDIF}

for t := 1 to NumSkill do begin
if ( not SkillMan[ T ].Hidden ) then AddRPGMenuItem( RPM , SkillSelectorMsg( T ) , T , SkillDescription( T ) );
Expand All @@ -339,8 +349,6 @@ implementation

RPM^.dtexcolor := InfoGreen;

AttachMenuDesc( RPM , ZONE_CharGenPrompt );


{ Add RPGKeys for the left and right buttons, since these will be }
{ used to spend & retrieve points. }
Expand Down Expand Up @@ -560,11 +568,17 @@ implementation

{ Create the menu. }
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CharGenMenu );
{$IFDEF ASCII}
AttachMenuDesc( RPM , ZONE_CharGenPrompt );

RCDescMessage := MsgString( 'RANDCHAR_CityDesc' );
RCPromptMessage := '';
RCCaption := MsgString( 'RANDCHAR_CityPrompt' );
{$ELSE}
RCDescMessage := '';
RCPromptMessage := MsgString( 'RANDCHAR_CityPrompt' );
RCCaption := '';
AttachMenuDesc( RPM , ZONE_CharGenDesc );
{$ENDIF}

{ Add all faction-legal HOMETOWNs to the menu. }
N := 1;
Expand Down Expand Up @@ -802,9 +816,15 @@ implementation
AddRPGMenuItem( RPM , MsgString( 'RANDCHAR_FHDecline' ) , -1 );

if CanEdit then begin
{$IFDEF ASCII}
RCPromptMessage := '';
RCDescMessage := MsgString( 'RANDCHAR_FHDesc' );
RCCaption := MsgString( 'RANDCHAR_FHPrompt' );
{$ELSE}
RCPromptMessage := MsgString( 'RANDCHAR_FHPrompt' );
RCDescMessage := MsgString( 'RANDCHAR_FHDesc' );
RCCaption := '';
{$ENDIF}
end;

Context := SAttValue( PC^.SA , 'HOMETOWN_CONTEXT' ) + ' ' + SAttValue( PC^.SA , 'JOB_DESIG' ) + ' ' + SAttValue( PC^.SA , 'CG_FACDESIG' );
Expand Down Expand Up @@ -954,11 +974,19 @@ implementation

if CanEdit then begin
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CharGenMenu );
AttachMenuDesc( RPM , ZONE_CharGenPrompt );

{$IFDEF ASCII}
AttachMenuDesc( RPM , ZONE_CharGenPrompt );
RCPromptMessage := '';
RCDescMessage := MsgString( 'RANDCHAR_JobDesc' );
RCCaption := MsgString( 'RANDCHAR_JobPrompt' );
{$ELSE}
RCDescMessage := '';
RCPromptMessage := MsgString( 'RANDCHAR_JobPrompt' );
RCCaption := '';
AttachMenuDesc( RPM , ZONE_CharGenDesc );
{$ENDIF}


{ Fill the menu. }
Job := LegalJobList;
Expand Down Expand Up @@ -1008,9 +1036,17 @@ implementation
if CanEdit and ( LegalFactionList <> Nil ) then begin
{ Create the menus. }
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CharGenMenu );
AttachMenuDesc( RPM , ZONE_CharGenPrompt );
{$IFDEF ASCII}
AttachMenuDesc( RPM , ZONE_CharGenPrompt );
RCPromptMessage := '';
RCCaption := MsgString( 'RANDCHAR_FactionPrompt' );
RCDescMessage := MsgString( 'RANDCHAR_FactionDesc' );
{$ELSE}
AttachMenuDesc( RPM , ZONE_CharGenDesc );
RCDescMessage := '';
RCPromptMessage := MsgString( 'RANDCHAR_FactionPrompt' );
RCCaption := '';
{$ENDIF}

{ Add the factions. }
F := LegalFactionList;
Expand Down Expand Up @@ -1085,10 +1121,21 @@ implementation

{ Create the menu & set up the display. }
RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_CharGenMenu );

RPM^.Mode := RPMNoCleanup;
RCDescMessage := MsgString( 'RANDCHAR_ASPDesc' );

{$IFDEF ASCII}
AttachMenuDesc( RPM , ZONE_CharGenPrompt );
RCPromptMessage := '';
RCDescMessage := MsgString( 'RANDCHAR_ASPDesc' );
RCDescMessage := MsgString( 'RANDCHAR_JobDesc' );
RCCaption := MsgString( 'RANDCHAR_JobPrompt' );
{$ELSE}
RCDescMessage := '';
RCPromptMessage := MsgString( 'RANDCHAR_JobPrompt' );
RCCaption := '';
AttachMenuDesc( RPM , ZONE_CharGenDesc );
{$ENDIF}


for t := 1 to NumGearStats do begin
AddRPGMenuItem( RPM , StatSelectorMsg( T ) , 1 , MsgString( 'STATDESC_' + BStr( T ) ) );
Expand All @@ -1097,7 +1144,6 @@ implementation

RPM^.dtexcolor := InfoGreen;

AttachMenuDesc( RPM , ZONE_CharGenPrompt );

{ Add RPGKeys for the left and right buttons, since these will be }
{ used to spend & retrieve points. }
Expand Down
142 changes: 76 additions & 66 deletions cosplay2.pas
Original file line number Diff line number Diff line change
@@ -1,69 +1,79 @@
program cosplay2;
unit cosplay2;
{$LONGSTRINGS ON}

uses gears,ui4gh,sdlgfx,sdlmenus,colormenu;

Procedure RedrawOpening;
{ The opening menu redraw procedure. }
begin
ClrScreen;
InfoBox( ZONE_Menu );
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;

begin
FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu );

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 );
interface

uses gears,ui4gh,sdlgfx,sdlmenus,colormenu;

Procedure Cosplay();


implementation

Procedure RedrawOpening;
{ The opening menu redraw procedure. }
begin
ClrScreen;
InfoBox( ZONE_Menu );
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 Cosplay();

var
FileMenu: RPGMenuPtr;
N: Integer;

begin
FileMenu := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Menu );

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.
1 change: 1 addition & 0 deletions gamedata/messages.txt
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ RANDCHAR_SelectStatsCap <# points>
RANDCHAR_ASPPrompt <# points; # slots>
RANDCHAR_ASPDesc <Allocate stat points. Move up and down to choose a stat, then right and left to increase or decrease it. Select [DONE] to finish. Any remaining points will be spent randomly.>
RANDCHAR_SkillDesc <Purchase skill levels. Move up and down to choose a skill, then right and left to increase or decrease it. Select [DONE] when you are finished.>
RANDCHAR_SkillPrompt <Purchase skills>
RANDCHAR_ASPDone < [DONE]>
RANDCHAR_STPrompt <Traits: >
RANDCHAR_STDesc <Select up to three personality traits to describe your character. These traits will affect the way NPCs interact with you. If you do not wish to select any traits, choose [CANCEL].>
Expand Down
24 changes: 23 additions & 1 deletion gearhead2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{$IFDEF ASCII}
vidgfx,vidmap,vidmenus;
{$ELSE}
sdlgfx,sdlmap,sdlmenus;
sdlgfx,sdlmap,sdlmenus,cosplay2;
{$ENDIF}

const
Expand Down Expand Up @@ -183,12 +183,27 @@
DisposeRPGMenu( MekMenu );
end;

Procedure GenNames;
var
t: Integer;
mylist: SAttPtr;
begin
mylist := Nil;
for t := 1 to 10000 do begin
StoreSAtt( mylist, RandomName );
end;
SaveStringList( 'names.txt', mylist );
DisposeSAtt( mylist );
end;


var
RPM: RPGMenuPtr;
N: Integer;

begin
{GenNames;}

RPM := CreateRPGMenu( MenuItem , MenuSelect , ZONE_Title_Screen_Menu );
{$IFNDEF ASCII}
RPM^.mode := RPMNoCancel;
Expand All @@ -202,6 +217,10 @@

AddRPGMenuItem( RPM , 'View Design Files' , 4 );

{$IFNDEF ASCII}
AddRPGMenuItem( RPM , 'View Color Selector' , 8 );
{$ENDIF}

if XXRan_Debug then begin
AddRPGMenuItem( RPM , 'View Series Files' , 5 );
end;
Expand All @@ -221,6 +240,9 @@
5: SeriesDirBrowser;
6: RestoreArenaCampaign( @RedrawOpening );
7: StartArenaCampaign;
{$IFNDEF ASCII}
8: Cosplay;
{$ENDIF}
end;

{ Get rid of the console history from previous games. }
Expand Down
2 changes: 2 additions & 0 deletions history.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- ExpressDelivery info display now works (services.pp)
- Cosplay changed from separate program to main menu option (cosplay2.pas)
- Some illegal characters removed from filenames (texutil.pp)
- Obsolete memos no longer appear in browser (arenascript.pp)
- FillRectWithSprite can now accept offsets (sdlgfx.pp)
Expand Down
Binary file added image/prop_mesh6.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/prop_mesh7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sdlgfx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ interface


ZONE_Title_Screen_Version: DynamicRect = ( dx:-70; dy:-25; w:100; h:20; anchor: ANC_lowerright );
ZONE_Title_Screen_Menu: DynamicRect = ( dx:-100; dy:50; w:200; h:100; anchor: ANC_middle );
ZONE_Title_Screen_Menu: DynamicRect = ( dx:-100; dy:50; w:200; h:115; anchor: ANC_middle );
ZONE_TitleLogo: DynamicRect = ( dx: -312; dy: -161; w: 624; h: 162; anchor: ANC_Middle );

Animation_Phase_Period = 6000;
Expand Down
Loading

0 comments on commit bcc21ea

Please sign in to comment.