This is a fork of Zandronum Beta for Mac Os (Silicon and Intel)
修訂 | 4e2b0310c6f306b57a81986f15ef7984d5bd19b9 (tree) |
---|---|
時間 | 2022-10-22 23:08:42 |
作者 | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Added two bit mask constants of GAMEMODE flags: one for all game types (i.e. cooperative, deathmatch, teamgame), and another for all earn types (i.e. kills, frags, points, wins).
@@ -470,12 +470,12 @@ | ||
470 | 470 | I_Error( "\"%s\" has no short name.", name.GetChars( )); |
471 | 471 | |
472 | 472 | // [AK] Get the game mode type (cooperative, deathmatch, or team game). There shouldn't be more than one enabled or none at all. |
473 | - ULONG ulFlags = g_GameModes[i].ulFlags & ( GMF_COOPERATIVE | GMF_DEATHMATCH | GMF_TEAMGAME ); | |
473 | + ULONG ulFlags = g_GameModes[i].ulFlags & GAMETYPE_MASK; | |
474 | 474 | if (( ulFlags == 0 ) || (( ulFlags & ( ulFlags - 1 )) != 0 )) |
475 | 475 | I_Error( "Can't determine if \"%s\" is cooperative, deathmatch, or team-based.", name.GetChars( )); |
476 | 476 | |
477 | 477 | // [AK] Get the type of "players earn" flag this game mode is currently using. |
478 | - ulFlags = g_GameModes[i].ulFlags & ( GMF_PLAYERSEARNKILLS | GMF_PLAYERSEARNFRAGS | GMF_PLAYERSEARNPOINTS | GMF_PLAYERSEARNWINS ); | |
478 | + ulFlags = g_GameModes[i].ulFlags & EARNTYPE_MASK; | |
479 | 479 | |
480 | 480 | // [AK] If all of these flags were removed or if more than one was added, then throw an error. |
481 | 481 | if ( ulFlags == 0 ) |
@@ -63,6 +63,9 @@ | ||
63 | 63 | // to go into a separate header for technical reasons. |
64 | 64 | #include "gamemode_enums.h" |
65 | 65 | |
66 | +#define GAMETYPE_MASK ( GMF_COOPERATIVE | GMF_DEATHMATCH | GMF_TEAMGAME ) | |
67 | +#define EARNTYPE_MASK ( GMF_PLAYERSEARNKILLS | GMF_PLAYERSEARNFRAGS | GMF_PLAYERSEARNPOINTS | GMF_PLAYERSEARNWINS ) | |
68 | + | |
66 | 69 | // [CK] Event defines |
67 | 70 | #define GAMEEVENT_CAPTURE_NOASSIST -1 // The third arg meaning no player assisted |
68 | 71 | #define GAMEEVENT_RETURN_TIMEOUTRETURN 0 |