Fix up handling of the Duke shareware beta a little bit, and change the dialog that pops up after running the shareware version too many times to take you to Steam instead of GOG (the Steam version is a better deal)

git-svn-id: https://svn.eduke32.com/eduke32@3884 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2013-06-13 21:17:03 +00:00
parent d43cfe6232
commit 8479e63b7c
3 changed files with 28 additions and 24 deletions

View file

@ -22,7 +22,7 @@ extern int32_t g_gameType;
#define NAPALM (g_gameType & GAMEFLAG_NAPALM) #define NAPALM (g_gameType & GAMEFLAG_NAPALM)
#define WW2GI (g_gameType & GAMEFLAG_WW2GI) #define WW2GI (g_gameType & GAMEFLAG_WW2GI)
#define SHAREWARE (g_gameType & GAMEFLAG_SHAREWARE) #define SHAREWARE (g_gameType & GAMEFLAG_SHAREWARE)
#define DUKEBETA (g_gameType & GAMEFLAG_DUKEBETA) #define DUKEBETA ((g_gameType & GAMEFLAG_DUKEBETA) != GAMEFLAG_SHAREWARE)
enum Games_t { enum Games_t {
GAME_DUKE = 0, GAME_DUKE = 0,

View file

@ -2681,6 +2681,9 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
{ {
int32_t cq = 0; int32_t cq = 0;
if (ud.fta_on == 0 || q < 0)
return;
if (q & MAXQUOTES) if (q & MAXQUOTES)
{ {
cq = 1; cq = 1;
@ -2693,9 +2696,6 @@ void P_DoQuote(int32_t q, DukePlayer_t *p)
return; return;
} }
if (ud.fta_on == 0)
return;
if (p->fta > 0 && q != QUOTE_RESERVED && q != QUOTE_RESERVED2) if (p->fta > 0 && q != QUOTE_RESERVED && q != QUOTE_RESERVED2)
if (p->ftq == QUOTE_RESERVED || p->ftq == QUOTE_RESERVED2) return; if (p->ftq == QUOTE_RESERVED || p->ftq == QUOTE_RESERVED2) return;
@ -10744,18 +10744,18 @@ static void G_Startup(void)
{ {
initprintf("*** You have run Duke Nukem 3D %d times. ***\n\n",ud.executions); initprintf("*** You have run Duke Nukem 3D %d times. ***\n\n",ud.executions);
if (ud.executions >= 50) if (ud.executions >= 50 && !DUKEBETA)
{ {
initprintf("IT IS NOW TIME TO UPGRADE TO THE COMPLETE VERSION!!!\n"); initprintf("IT IS NOW TIME TO UPGRADE TO THE COMPLETE VERSION!\n");
#ifdef _WIN32 #ifdef _WIN32
Bsprintf(tempbuf, "You have run Duke Nukem 3D shareware %d times. It is now time to upgrade to the complete version!\n\n" Bsprintf(tempbuf, "You have run Duke Nukem 3D shareware %d times. It is now time to upgrade to the complete version!\n\n"
"Purchase Duke Nukem 3D for $5.99 now?\n", ud.executions); "Upgrade Duke Nukem 3D now?\n", ud.executions);
if (wm_ynbox("Upgrade to the full version of Duke Nukem 3D","%s",tempbuf)) if (wm_ynbox("Upgrade to the full version of Duke Nukem 3D","%s",tempbuf))
{ {
SHELLEXECUTEINFOA sinfo; SHELLEXECUTEINFOA sinfo;
char *p = "http://www.gog.com/en/gamecard/duke_nukem_3d_atomic_edition/?pp=6c1e671f9af5b46d9c1a52067bdf0e53685674f7"; char *p = "http://store.steampowered.com/app/225140";
Bmemset(&sinfo, 0, sizeof(sinfo)); Bmemset(&sinfo, 0, sizeof(sinfo));
sinfo.cbSize = sizeof(sinfo); sinfo.cbSize = sizeof(sinfo);
@ -10767,6 +10767,8 @@ static void G_Startup(void)
if (!ShellExecuteExA(&sinfo)) if (!ShellExecuteExA(&sinfo))
G_GameExit("Error launching default system browser!"); G_GameExit("Error launching default system browser!");
quitevent = 1;
} }
#endif #endif
} }
@ -12629,7 +12631,7 @@ FRAGBONUS:
{ {
gametext(10,yy+9,"Par Time:",0,2+8+16); gametext(10,yy+9,"Par Time:",0,2+8+16);
yy+=10; yy+=10;
if (!NAM) if (!NAM && !DUKEBETA)
{ {
gametext(10,yy+9,"3D Realms' Time:",0,2+8+16); gametext(10,yy+9,"3D Realms' Time:",0,2+8+16);
yy+=10; yy+=10;

View file

@ -28,7 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define OBITQUOTEINDEX (MAXQUOTES-128) #define OBITQUOTEINDEX (MAXQUOTES-128)
#define SUICIDEQUOTEINDEX (MAXQUOTES-32) #define SUICIDEQUOTEINDEX (MAXQUOTES-32)
#define QUOTE_SHOW_MAP_OFF 1 #define NOBETAQUOTE(x) (DUKEBETA ? -1 : x)
#define QUOTE_SHOW_MAP_OFF NOBETAQUOTE(1)
#define QUOTE_ACTIVATED 2 #define QUOTE_ACTIVATED 2
#define QUOTE_MEDKIT 3 #define QUOTE_MEDKIT 3
#define QUOTE_LOCKED 4 #define QUOTE_LOCKED 4
@ -38,11 +40,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define QUOTE_UNLOCKED 8 #define QUOTE_UNLOCKED 8
#define QUOTE_FOUND_SECRET 9 #define QUOTE_FOUND_SECRET 9
#define QUOTE_SQUISHED 10 #define QUOTE_SQUISHED 10
#define QUOTE_USED_STEROIDS 12 #define QUOTE_USED_STEROIDS NOBETAQUOTE(12)
#define QUOTE_DEACTIVATED 15 #define QUOTE_DEACTIVATED 15
#define QUOTE_CHEAT_GODMODE_ON 17 #define QUOTE_CHEAT_GODMODE_ON 17
#define QUOTE_CHEAT_GODMODE_OFF 18 #define QUOTE_CHEAT_GODMODE_OFF 18
#define QUOTE_CROSSHAIR_OFF 21 #define QUOTE_CROSSHAIR_OFF NOBETAQUOTE(21)
#define QUOTE_CHEATS_DISABLED 22 #define QUOTE_CHEATS_DISABLED 22
#define QUOTE_MESSAGES_ON 23 #define QUOTE_MESSAGES_ON 23
#define QUOTE_MESSAGES_OFF 24 #define QUOTE_MESSAGES_OFF 24
@ -63,33 +65,33 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define QUOTE_WEAPON_RAISED 74 #define QUOTE_WEAPON_RAISED 74
#define QUOTE_BOOTS_ON 75 #define QUOTE_BOOTS_ON 75
#define QUOTE_SCUBA_ON 76 #define QUOTE_SCUBA_ON 76
#define QUOTE_CHEAT_ALLEN 79 #define QUOTE_CHEAT_ALLEN NOBETAQUOTE(79)
#define QUOTE_MIGHTY_FOOT 80 #define QUOTE_MIGHTY_FOOT 80
#define QUOTE_WEAPON_MODE_OFF 82 #define QUOTE_WEAPON_MODE_OFF NOBETAQUOTE(82)
#define QUOTE_MAP_FOLLOW_OFF 83 #define QUOTE_MAP_FOLLOW_OFF 83
#define QUOTE_RUN_MODE_OFF 85 #define QUOTE_RUN_MODE_OFF 85
#define QUOTE_JETPACK 88 #define QUOTE_JETPACK 88
#define QUOTE_SCUBA 89 #define QUOTE_SCUBA 89
#define QUOTE_STEROIDS 90 #define QUOTE_STEROIDS 90
#define QUOTE_HOLODUKE 91 #define QUOTE_HOLODUKE 91
#define QUOTE_CHEAT_TODD 99 #define QUOTE_CHEAT_TODD NOBETAQUOTE(99)
#define QUOTE_CHEAT_UNLOCK 100 #define QUOTE_CHEAT_UNLOCK NOBETAQUOTE(100)
#define QUOTE_NVG 101 #define QUOTE_NVG 101
#define QUOTE_WEREGONNAFRYYOURASS 102 #define QUOTE_WEREGONNAFRYYOURASS 102
#define QUOTE_SCREEN_SAVED 103 #define QUOTE_SCREEN_SAVED 103
#define QUOTE_CHEAT_BETA 105 #define QUOTE_CHEAT_BETA NOBETAQUOTE(105)
#define QUOTE_NVG_OFF 107 #define QUOTE_NVG_OFF 107
#define QUOTE_VIEW_MODE_OFF 109 #define QUOTE_VIEW_MODE_OFF NOBETAQUOTE(109)
#define QUOTE_SHOW_MAP_ON 111 #define QUOTE_SHOW_MAP_ON NOBETAQUOTE(111)
#define QUOTE_CHEAT_NOCLIP 113 #define QUOTE_CHEAT_NOCLIP NOBETAQUOTE(113)
#define QUOTE_SAVE_BAD_VERSION 114 #define QUOTE_SAVE_BAD_VERSION 114
#define QUOTE_RESERVED 115 #define QUOTE_RESERVED 115
#define QUOTE_RESERVED2 116 #define QUOTE_RESERVED2 116
#define QUOTE_RESERVED3 117 #define QUOTE_RESERVED3 117
#define QUOTE_SAVE_DEAD 118 #define QUOTE_SAVE_DEAD NOBETAQUOTE(118)
#define QUOTE_CHEAT_ALL_WEAPONS 119 #define QUOTE_CHEAT_ALL_WEAPONS NOBETAQUOTE(119)
#define QUOTE_CHEAT_ALL_INV 120 #define QUOTE_CHEAT_ALL_INV NOBETAQUOTE(120)
#define QUOTE_CHEAT_ALL_KEYS 121 #define QUOTE_CHEAT_ALL_KEYS NOBETAQUOTE(121)
#define QUOTE_RESERVED4 122 #define QUOTE_RESERVED4 122
#define QUOTE_SAVE_BAD_PLAYERS 124 #define QUOTE_SAVE_BAD_PLAYERS 124