summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Haley2010-09-22 18:10:40 +0000
committerJames Haley2010-09-22 18:10:40 +0000
commitd57be3f239cc500bb600c6b9f932ae742dc2b8c7 (patch)
tree60d9ebcb660e35ba9c707395945848c63cdb3e61
parent8bbfd5b68a289ddf933f78d369606f1f22dd91c6 (diff)
downloadchocolate-doom-d57be3f239cc500bb600c6b9f932ae742dc2b8c7.tar.gz
chocolate-doom-d57be3f239cc500bb600c6b9f932ae742dc2b8c7.tar.bz2
chocolate-doom-d57be3f239cc500bb600c6b9f932ae742dc2b8c7.zip
Added linetype 180 to P_ShootSpecialLine and vetted other line types.
Removed episode parameter from G_DeferedInitNew, started work on the "Name Your Character" menu, and adjusted the temporary code in M_ChooseSkill so that the game starts in Tarnhill rather than in the Sanctuary. Subversion-branch: /branches/strife-branch Subversion-revision: 2131
-rw-r--r--src/strife/g_game.c22
-rw-r--r--src/strife/g_game.h3
-rw-r--r--src/strife/m_menu.c90
-rw-r--r--src/strife/p_spec.c74
4 files changed, 126 insertions, 63 deletions
diff --git a/src/strife/g_game.c b/src/strife/g_game.c
index 3c456e4b..c443830f 100644
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -1730,22 +1730,22 @@ void G_DoSaveGame (void)
//
-// G_InitNew
-// Can be called by the startup code or the menu task,
-// consoleplayer, displayplayer, playeringame[] should be set.
-//
skill_t d_skill;
int d_episode;
int d_map;
-
-void
-G_DeferedInitNew
-( skill_t skill,
- int episode,
- int map)
+
+//
+// G_DeferedInitNew
+//
+// Can be called by the startup code or the menu task,
+// consoleplayer, displayplayer, playeringame[] should be set.
+//
+// haleyjd 09/22/10: [STRIFE] Removed episode parameter
+//
+void G_DeferedInitNew(skill_t skill, int map)
{
d_skill = skill;
- d_episode = episode;
+ d_episode = 1; // STRIFE-TODO: no such thing as episodes.
d_map = map;
gameaction = ga_newgame;
}
diff --git a/src/strife/g_game.h b/src/strife/g_game.h
index dbd5a9d6..52a1d2c7 100644
--- a/src/strife/g_game.h
+++ b/src/strife/g_game.h
@@ -43,7 +43,8 @@ void G_InitNew (skill_t skill, int episode, int map);
// Can be called by the startup code or M_Responder.
// A normal game starts at map 1,
// but a warp test can start elsewhere
-void G_DeferedInitNew (skill_t skill, int episode, int map);
+// [STRIFE] Removed episode parameter
+void G_DeferedInitNew (skill_t skill, int map);
void G_DeferedPlayDemo (char* demo);
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index 74700c9f..c29b9fb5 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -542,6 +542,58 @@ void M_ReadSaveStrings(void)
}
}
+//
+// M_DrawNameChar
+//
+// haleyjd 09/22/10: [STRIFE] New function
+// Handler for drawing the "Name Your Character" menu.
+//
+void M_DrawNameChar(void)
+{
+ int i;
+
+ M_WriteText(72, 28, DEH_String("Name Your Character"));
+
+ for (i = 0;i < load_end; i++)
+ {
+ M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i);
+ M_WriteText(LoadDef.x,LoadDef.y+LINEHEIGHT*i,savegamestrings[i]);
+ }
+
+ if (saveStringEnter)
+ {
+ i = M_StringWidth(savegamestrings[saveSlot]); // STRIFE-TODO: verify variable
+ M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*saveSlot,"_");
+ }
+}
+
+//
+// M_DoNameChar
+//
+// haleyjd 09/22/10: [STRIFE] New function
+// Handler for items in the "Name Your Character" menu.
+//
+void M_DoNameChar(int choice)
+{
+ int map;
+
+ // STRIFE-TODO
+ // dword_9F144 = 1;
+ // ClearTmp();
+ // G_WriteSaveName(...);
+ // quickSaveSlot = v5; // VERIFY VARIABLE
+ // SaveDef.lastOn = v5;
+ // ClearSlot();
+ // FromCurr(...);
+
+ if(isdemoversion)
+ map = 33;
+ else
+ map = 2;
+
+ //G_DeferedInitNew(skill, map);
+ M_ClearMenus(0);
+}
//
// M_LoadGame & Cie.
@@ -555,8 +607,8 @@ void M_DrawLoad(void)
for (i = 0;i < load_end; i++)
{
- M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i);
- M_WriteText(LoadDef.x,LoadDef.y+LINEHEIGHT*i,savegamestrings[i]);
+ M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i);
+ M_WriteText(LoadDef.x,LoadDef.y+LINEHEIGHT*i,savegamestrings[i]);
}
}
@@ -568,15 +620,15 @@ void M_DrawLoad(void)
void M_DrawSaveLoadBorder(int x,int y)
{
int i;
-
+
V_DrawPatchDirect(x - 8, y + 7,
W_CacheLumpName(DEH_String("M_LSLEFT"), PU_CACHE));
-
+
for (i = 0;i < 24;i++)
{
- V_DrawPatchDirect(x, y + 7,
+ V_DrawPatchDirect(x, y + 7,
W_CacheLumpName(DEH_String("M_LSCNTR"), PU_CACHE));
- x += 8;
+ x += 8;
}
V_DrawPatchDirect(x, y + 7,
@@ -591,7 +643,7 @@ void M_DrawSaveLoadBorder(int x,int y)
void M_LoadSelect(int choice)
{
char name[256];
-
+
strcpy(name, P_SaveGameFile(choice));
G_LoadGame (name);
@@ -605,10 +657,10 @@ void M_LoadGame (int choice)
{
if (netgame)
{
- M_StartMessage(DEH_String(LOADNET),NULL,false);
- return;
+ M_StartMessage(DEH_String(LOADNET),NULL,false);
+ return;
}
-
+
M_SetupNextMenu(&LoadDef);
M_ReadSaveStrings();
}
@@ -620,18 +672,18 @@ void M_LoadGame (int choice)
void M_DrawSave(void)
{
int i;
-
+
V_DrawPatchDirect(72, 28, W_CacheLumpName(DEH_String("M_SAVEG"), PU_CACHE));
for (i = 0;i < load_end; i++)
{
- M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i);
- M_WriteText(LoadDef.x,LoadDef.y+LINEHEIGHT*i,savegamestrings[i]);
+ M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i);
+ M_WriteText(LoadDef.x,LoadDef.y+LINEHEIGHT*i,savegamestrings[i]);
}
-
+
if (saveStringEnter)
{
- i = M_StringWidth(savegamestrings[saveSlot]);
- M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*saveSlot,"_");
+ i = M_StringWidth(savegamestrings[saveSlot]);
+ M_WriteText(LoadDef.x + i,LoadDef.y+LINEHEIGHT*saveSlot,"_");
}
}
@@ -936,7 +988,7 @@ void M_VerifyNightmare(int key)
if (key != key_menu_confirm)
return;
- G_DeferedInitNew(nightmare,epi+1,1);
+ G_DeferedInitNew(nightmare, 1);
M_ClearMenus (0);
}
*/
@@ -944,7 +996,9 @@ void M_VerifyNightmare(int key)
void M_ChooseSkill(int choice)
{
// haleyjd 09/07/10: Removed nightmare confirmation
- G_DeferedInitNew(choice,epi+1,1);
+ // STRIFE-TODO: This is not done here, but on the "Name your Character" menu.
+ // I have modified the starting map to 2 until the naming menu is functional.
+ G_DeferedInitNew(choice, 2);
M_ClearMenus (0);
}
diff --git a/src/strife/p_spec.c b/src/strife/p_spec.c
index aa2eb367..8e34b0c9 100644
--- a/src/strife/p_spec.c
+++ b/src/strife/p_spec.c
@@ -1399,46 +1399,54 @@ P_ShootSpecialLine
line_t* line )
{
int ok;
-
+
// Impacts that other things can activate.
if (!thing->player)
{
- ok = 0;
- switch(line->special)
- {
- case 46:
- case 182: // villsa [STRIFE] for windows
- // OPEN DOOR IMPACT
- ok = 1;
- break;
- }
- if (!ok)
- return;
+ ok = 0;
+ switch(line->special)
+ {
+ case 46:
+ case 182: // villsa [STRIFE] for windows
+ // OPEN DOOR IMPACT
+ ok = 1;
+ break;
+ }
+ if (!ok)
+ return;
}
switch(line->special)
{
- case 24:
- // RAISE FLOOR
- EV_DoFloor(line,raiseFloor);
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 46:
- // OPEN DOOR
- EV_DoDoor(line,open);
- P_ChangeSwitchTexture(line,1);
- break;
-
- case 47:
- // RAISE FLOOR NEAR AND CHANGE
- EV_DoPlat(line,raiseToNearestAndChange,0);
- P_ChangeSwitchTexture(line,0);
- break;
-
- case 182:
- // villsa [STRIFE] break glass
- P_ChangeSwitchTexture(line, 0);
+ case 24:
+ // RAISE FLOOR - [STRIFE] Verified unmodified
+ EV_DoFloor(line,raiseFloor);
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 46:
+ // OPEN DOOR - [STRIFE] Verified unmodified.
+ EV_DoDoor(line,open);
+ P_ChangeSwitchTexture(line,1);
+ break;
+
+ case 47: // STRIFE-TODO: plat type changed to 4 ????
+ // RAISE FLOOR NEAR AND CHANGE
+ EV_DoPlat(line,raiseToNearestAndChange,0);
+ P_ChangeSwitchTexture(line,0);
+ break;
+
+ case 180:
+ // haleyjd 09/22/10: [STRIFE] G1 Raise Floor 512 & Change
+ EV_DoFloor(line, raiseFloor512AndChange);
+ P_ChangeSwitchTexture(line, 0);
+ break;
+
+ case 182:
+ // villsa [STRIFE] G1 Break Glass
+ // haleyjd: note that 182 is also a W1 type in P_CrossSpecialLine, but
+ // can only be activated in that manner by an MF_MISSILE object.
+ P_ChangeSwitchTexture(line, 0);
break;
}
}