forked from Ports/perfect_dark
Merge pull request #597 from rafccq/port-no-doors
"No Doors" option in multiplayer
This commit is contained in:
10 files changed
+115
-213
No files matched your search
@@ -188,6 +188,7 @@ add_compile_options(
|
|||||||
-Wno-unused-but-set-variable
|
-Wno-unused-but-set-variable
|
||||||
-Wno-unused-value
|
-Wno-unused-value
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
|
-fdiagnostics-color=always
|
||||||
)
|
)
|
||||||
|
|
||||||
# C specific flags
|
# C specific flags
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
* Players cannot score unless their briefcase is at the home base.
|
* Players cannot score unless their briefcase is at the home base.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
struct menuitem g_CtcOptionsMenuItems[] = {
|
struct menuitem g_CtcOptionsMenuItems[] = {
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
@@ -60,40 +62,6 @@ struct menuitem g_CtcOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
0,
|
0,
|
||||||
@@ -143,7 +111,8 @@ struct menudialogdef g_CtcOptionsMenuDialog = {
|
|||||||
g_CtcOptionsMenuItems,
|
g_CtcOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
|
// NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct weaponobj g_CtcTokenObj0;
|
struct weaponobj g_CtcTokenObj0;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
* There are no callback functions or special logic.
|
* There are no callback functions or special logic.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
struct menuitem g_MpCombatOptionsMenuItems[] = {
|
struct menuitem g_MpCombatOptionsMenuItems[] = {
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
@@ -55,40 +57,6 @@ struct menuitem g_MpCombatOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_SEPARATOR,
|
MENUITEMTYPE_SEPARATOR,
|
||||||
0,
|
0,
|
||||||
@@ -138,5 +106,5 @@ struct menudialogdef g_MpCombatOptionsMenuDialog = {
|
|||||||
g_MpCombatOptionsMenuItems,
|
g_MpCombatOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
};
|
};
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
* cannot use weapons while uplinking.
|
* cannot use weapons while uplinking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
#define HTM_NUM_TERMINALS 1
|
#define HTM_NUM_TERMINALS 1
|
||||||
|
|
||||||
struct menuitem g_HtmOptionsMenuItems[] = {
|
struct menuitem g_HtmOptionsMenuItems[] = {
|
||||||
@@ -58,40 +60,6 @@ struct menuitem g_HtmOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
0,
|
0,
|
||||||
@@ -149,7 +117,7 @@ struct menudialogdef g_HtmOptionsMenuDialog = {
|
|||||||
g_HtmOptionsMenuItems,
|
g_HtmOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct weaponobj g_HtmUplinkObj;
|
struct weaponobj g_HtmUplinkObj;
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
* slightly slower but still have full access to their weaponry.
|
* slightly slower but still have full access to their weaponry.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
struct menuitem g_HtbOptionsMenuItems[] = {
|
struct menuitem g_HtbOptionsMenuItems[] = {
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
@@ -58,40 +60,6 @@ struct menuitem g_HtbOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
0,
|
0,
|
||||||
@@ -149,7 +117,7 @@ struct menudialogdef g_HtbOptionsMenuDialog = {
|
|||||||
g_HtbOptionsMenuItems,
|
g_HtbOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct defaultobj *var800869ec = NULL;
|
struct defaultobj *var800869ec = NULL;
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
* Points are awarded to each player in the hill at the time that it is won.
|
* Points are awarded to each player in the hill at the time that it is won.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
MenuItemHandlerResult menuhandlerMpHillTime(s32 operation, struct menuitem *item, union handlerdata *data)
|
MenuItemHandlerResult menuhandlerMpHillTime(s32 operation, struct menuitem *item, union handlerdata *data)
|
||||||
{
|
{
|
||||||
switch (operation) {
|
switch (operation) {
|
||||||
@@ -79,40 +81,6 @@ struct menuitem g_KohOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
0,
|
0,
|
||||||
@@ -178,7 +146,7 @@ struct menudialogdef g_KohOptionsMenuDialog = {
|
|||||||
g_KohOptionsMenuItems,
|
g_KohOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
};
|
};
|
||||||
|
|
||||||
void kohReadSave(struct savebuffer *buffer, u8 version)
|
void kohReadSave(struct savebuffer *buffer, u8 version)
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
* chosen as the victim.
|
* chosen as the victim.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
extern struct menudialogdef g_ExtGameOptionsMenuDialog;
|
||||||
|
|
||||||
struct menuitem g_PacOptionsMenuItems[] = {
|
struct menuitem g_PacOptionsMenuItems[] = {
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
@@ -56,40 +58,6 @@ struct menuitem g_PacOptionsMenuItems[] = {
|
|||||||
MPOPTION_NOAUTOAIM,
|
MPOPTION_NOAUTOAIM,
|
||||||
menuhandlerMpCheckboxOption,
|
menuhandlerMpCheckboxOption,
|
||||||
},
|
},
|
||||||
#ifndef PLATFORM_N64
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"Start Armed",
|
|
||||||
MPOPTION_SPAWNWITHWEAPON,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Drug Blur",
|
|
||||||
MPOPTION_NODRUGBLUR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR,
|
|
||||||
L_OPTIONS_257, // "Friendly Fire"
|
|
||||||
MPOPTION_FRIENDLYFIRE,
|
|
||||||
menuhandlerMpDisplayTeam,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
MENUITEMTYPE_CHECKBOX,
|
|
||||||
0,
|
|
||||||
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
|
||||||
(uintptr_t)"No Player on Radar",
|
|
||||||
MPOPTION_NOPLAYERONRADAR,
|
|
||||||
menuhandlerMpCheckboxOption,
|
|
||||||
},
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
MENUITEMTYPE_CHECKBOX,
|
MENUITEMTYPE_CHECKBOX,
|
||||||
0,
|
0,
|
||||||
@@ -147,7 +115,7 @@ struct menudialogdef g_PacOptionsMenuDialog = {
|
|||||||
g_PacOptionsMenuItems,
|
g_PacOptionsMenuItems,
|
||||||
mpOptionsMenuDialog,
|
mpOptionsMenuDialog,
|
||||||
MENUDIALOGFLAG_MPLOCKABLE,
|
MENUDIALOGFLAG_MPLOCKABLE,
|
||||||
NULL,
|
&g_ExtGameOptionsMenuDialog,
|
||||||
};
|
};
|
||||||
|
|
||||||
void pacReset(void)
|
void pacReset(void)
|
||||||
|
|||||||
@@ -6155,3 +6155,56 @@ void func0f17fcb0(s32 silent)
|
|||||||
sndStart(var80095200, SFX_EXPLOSION_809A, NULL, -1, -1, -1, -1, -1);
|
sndStart(var80095200, SFX_EXPLOSION_809A, NULL, -1, -1, -1, -1, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct menuitem g_MpExtGameOptionsMenuItems[] = {
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_CHECKBOX,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
||||||
|
(uintptr_t)"Start Armed",
|
||||||
|
MPOPTION_SPAWNWITHWEAPON,
|
||||||
|
menuhandlerMpCheckboxOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_CHECKBOX,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
||||||
|
(uintptr_t)"No Drug Blur",
|
||||||
|
MPOPTION_NODRUGBLUR,
|
||||||
|
menuhandlerMpCheckboxOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_CHECKBOX,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR,
|
||||||
|
L_OPTIONS_257, // "Friendly Fire"
|
||||||
|
MPOPTION_FRIENDLYFIRE,
|
||||||
|
menuhandlerMpDisplayTeam,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_CHECKBOX,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
||||||
|
(uintptr_t)"No Player on Radar",
|
||||||
|
MPOPTION_NOPLAYERONRADAR,
|
||||||
|
menuhandlerMpCheckboxOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MENUITEMTYPE_CHECKBOX,
|
||||||
|
0,
|
||||||
|
MENUITEMFLAG_LOCKABLEMINOR | MENUITEMFLAG_LITERAL_TEXT,
|
||||||
|
(uintptr_t)"No Doors",
|
||||||
|
MPOPTION_NODOORS,
|
||||||
|
menuhandlerMpCheckboxOption,
|
||||||
|
},
|
||||||
|
{ MENUITEMTYPE_END },
|
||||||
|
};
|
||||||
|
|
||||||
|
struct menudialogdef g_ExtGameOptionsMenuDialog = {
|
||||||
|
MENUDIALOGTYPE_DEFAULT,
|
||||||
|
(uintptr_t) "More Options\n",
|
||||||
|
g_MpExtGameOptionsMenuItems,
|
||||||
|
NULL,
|
||||||
|
MENUDIALOGFLAG_LITERAL_TEXT,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
+41
-3
@@ -1460,6 +1460,34 @@ void setupLoadFiles(s32 stagenum)
|
|||||||
g_Vars.maxprops = numobjs + numchrs + extra + 40;
|
g_Vars.maxprops = numobjs + numchrs + extra + 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setupMarkLiftDoors()
|
||||||
|
{
|
||||||
|
s32 index = 0;
|
||||||
|
|
||||||
|
struct defaultobj *obj = (struct defaultobj *)g_StageSetup.props;
|
||||||
|
while (obj->type != OBJTYPE_END) {
|
||||||
|
if (obj->type == OBJTYPE_LIFT) {
|
||||||
|
struct liftobj *lift = (struct liftobj *)obj;
|
||||||
|
for (int i = 0; i < ARRAYCOUNT(lift->doors); i++) {
|
||||||
|
if (lift->doors[i]) {
|
||||||
|
s32 doorindex = index + *(s32*)&lift->doors[i];
|
||||||
|
struct doorobj *door = (struct doorobj *)setupGetCmdByIndex(doorindex);
|
||||||
|
// we use this 'extra1' field here to mark the door, since its not used anywhere else
|
||||||
|
door->extra1 = 1;
|
||||||
|
|
||||||
|
if (door->sibling) {
|
||||||
|
s32 siblingidx = *(s32 *) &door->sibling + doorindex;
|
||||||
|
struct doorobj *sibling = (struct doorobj *) setupGetCmdByIndex(siblingidx);
|
||||||
|
sibling->extra1 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
obj = (struct defaultobj *) ((u32 *) obj + setupGetCmdLength((u32 *) obj));
|
||||||
|
index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void setupCreateProps(s32 stagenum)
|
void setupCreateProps(s32 stagenum)
|
||||||
{
|
{
|
||||||
s32 withchrs = !argFindByPrefix(1, "-nochr") && !argFindByPrefix(1, "-noprop");
|
s32 withchrs = !argFindByPrefix(1, "-nochr") && !argFindByPrefix(1, "-noprop");
|
||||||
@@ -1532,6 +1560,12 @@ void setupCreateProps(s32 stagenum)
|
|||||||
botmgrRemoveAll();
|
botmgrRemoveAll();
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
|
bool nodoors = (g_MpSetup.options & MPOPTION_NODOORS) != 0;
|
||||||
|
|
||||||
|
if (nodoors) {
|
||||||
|
setupMarkLiftDoors();
|
||||||
|
}
|
||||||
|
|
||||||
obj = (struct defaultobj *)g_StageSetup.props;
|
obj = (struct defaultobj *)g_StageSetup.props;
|
||||||
|
|
||||||
while (obj->type != OBJTYPE_END) {
|
while (obj->type != OBJTYPE_END) {
|
||||||
@@ -1552,11 +1586,15 @@ void setupCreateProps(s32 stagenum)
|
|||||||
bodyAllocateChr(stagenum, (struct packedchr *) obj, index);
|
bodyAllocateChr(stagenum, (struct packedchr *) obj, index);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OBJTYPE_DOOR:
|
case OBJTYPE_DOOR: {
|
||||||
if (withobjs && (obj->flags2 & diffflag) == 0) {
|
struct doorobj *door = (struct doorobj *) obj;
|
||||||
setupCreateDoor((struct doorobj *)obj, index);
|
// dont skip doors that are locked or are lift doors
|
||||||
|
bool skipdoor = nodoors && g_Vars.normmplayerisrunning && door->keyflags == 0 && door->extra1 == 0;
|
||||||
|
if (!skipdoor && withobjs && (obj->flags2 & diffflag) == 0) {
|
||||||
|
setupCreateDoor(door, index);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case OBJTYPE_DOORSCALE:
|
case OBJTYPE_DOORSCALE:
|
||||||
{
|
{
|
||||||
struct doorscaleobj *scale = (struct doorscaleobj *)obj;
|
struct doorscaleobj *scale = (struct doorscaleobj *)obj;
|
||||||
|
|||||||
@@ -2897,6 +2897,7 @@
|
|||||||
#define MPOPTION_AUTORANDOMWEAPON_END 0x01000000
|
#define MPOPTION_AUTORANDOMWEAPON_END 0x01000000
|
||||||
#define MPOPTION_FRIENDLYFIRE 0x02000000
|
#define MPOPTION_FRIENDLYFIRE 0x02000000
|
||||||
#define MPOPTION_NOPLAYERONRADAR 0x04000000
|
#define MPOPTION_NOPLAYERONRADAR 0x04000000
|
||||||
|
#define MPOPTION_NODOORS 0x08000000
|
||||||
|
|
||||||
#define MPPAUSEMODE_UNPAUSED 0
|
#define MPPAUSEMODE_UNPAUSED 0
|
||||||
#define MPPAUSEMODE_PAUSED 1
|
#define MPPAUSEMODE_PAUSED 1
|
||||||
|
|||||||
Reference in new issue
Block a user