Skip to content

Commit

Permalink
AGI: Optionally enable copy protection in Software Farm's Gold Rush
Browse files Browse the repository at this point in the history
This version doesn't actually include the necessary documentation to
pass the copy protection, but it may still be fun for owners of it (like
me!) to see what it looked like.
  • Loading branch information
Torbjörn Andersson committed Aug 5, 2024
1 parent bb89abb commit ae360c1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
8 changes: 8 additions & 0 deletions engines/agi/cycle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ namespace Agi {
* @param n room number
*/
void AgiEngine::newRoom(int16 newRoomNr) {
// The Software Farm re-release of Gold Rush doesn't show the copy
// protection screen. In fact, it doesn't even include the "California
// Gold" book. But the copy protection is still present in the game
// data files, so allow it to be enabled.
if (getGameID() == GID_GOLDRUSH && _game.curLogicNr == 129 && newRoomNr == 73 && ConfMan.getBool("copy_protection")) {
newRoomNr = 125;
}

ScreenObjEntry *screenObjEgo = &_game.screenObjTable[SCREENOBJECTS_EGO_ENTRY];

// Loading trigger
Expand Down
1 change: 1 addition & 0 deletions engines/agi/detection.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct AGIGameDescription {
#define GAMEOPTION_USE_HERCULES_FONT GUIO_GAMEOPTIONS4
#define GAMEOPTION_COMMAND_PROMPT_WINDOW GUIO_GAMEOPTIONS5
#define GAMEOPTION_APPLE2GS_ADD_SPEED_MENU GUIO_GAMEOPTIONS6
#define GAMEOPTION_COPY_PROTECTION GUIO_GAMEOPTIONS7
// TODO: properly implement GAMEOPTIONs

} // End of namespace Agi
Expand Down
4 changes: 3 additions & 1 deletion engines/agi/detection_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
namespace Agi {

#define GAMEOPTIONS_DEFAULT GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_DEFAULT_COPY_PROTECTION GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_COPY_PROTECTION)
#define GAMEOPTIONS_AMIGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_APPLE2GS GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU)
#define GAMEOPTIONS_VGA GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW,GUIO_RENDERVGA)
Expand Down Expand Up @@ -130,6 +131,7 @@ namespace Agi {
#define BOOTER2(id,extra,fname,md5,size,ver,gid) GAME_LVFPN(id,extra,fname,md5,size,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V2,GAMEOPTIONS_DEFAULT)
#define GAME(id,extra,md5,ver,gid) GAME_LVFPN(id,extra,"logdir",md5,AD_NO_SIZE,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V2,GAMEOPTIONS_DEFAULT)
#define GAME3(id,extra,fname,md5,ver,gid) GAME_LVFPN(id,extra,fname,md5,AD_NO_SIZE,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V3,GAMEOPTIONS_DEFAULT)
#define GAME3_COPY_PROTECTION(id,extra,fname,md5,ver,gid) GAME_LVFPN(id,extra,fname,md5,AD_NO_SIZE,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V3,GAMEOPTIONS_DEFAULT_COPY_PROTECTION)
#define GAME3_PIRATED(id,extra,fname,md5,ver,gid) GAME_LVFPN_PIRATED(id,extra,fname,md5,AD_NO_SIZE,Common::EN_ANY,ver,0,gid,Common::kPlatformDOS,GType_V3,GAMEOPTIONS_DEFAULT)

#define GAME_P(id,extra,md5,ver,gid,platform) GAME_LVFPN(id,extra,"logdir",md5,AD_NO_SIZE,Common::EN_ANY,ver,0,gid,platform,GType_V2,GAMEOPTIONS_DEFAULT)
Expand Down Expand Up @@ -349,7 +351,7 @@ static const AGIGameDescription gameDescriptions[] = {
GAME3_PIRATED("goldrush", "2.01 1988-12-22", "grdir", "1ef85c37fcf7224f9731f20f169c8c53", 2399, GID_GOLDRUSH),

// Gold Rush! (PC 3.5", bought from The Software Farm) 3.0 1998-12-22 [AGI 3.002.149]
GAME3("goldrush", "3.0 1998-12-22 3.5\"", "grdir", "6882b6090473209da4cd78bb59f78dbe", 0x3149, GID_GOLDRUSH),
GAME3_COPY_PROTECTION("goldrush", "3.0 1998-12-22 3.5\"", "grdir", "6882b6090473209da4cd78bb59f78dbe", 0x3149, GID_GOLDRUSH),

{
// Gold Rush! (Mac) 2.01 12/22/88 [AGI 3.002.149]
Expand Down
12 changes: 12 additions & 0 deletions engines/agi/metaengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ static const ADExtraGuiOptionsMap optionsList[] = {
}
},

{
GAMEOPTION_COPY_PROTECTION,
{
_s("Enable copy protection"),
_s("Enable copy protection that had was disabled in this version of the game"),
"copy_protection",
false,
0,
0
}
},

AD_EXTRA_GUI_OPTIONS_TERMINATOR
};

Expand Down

0 comments on commit ae360c1

Please sign in to comment.