diff options
author | Fabian Greffrath | 2015-03-30 18:13:10 +0200 |
---|---|---|
committer | Fabian Greffrath | 2015-03-30 18:13:10 +0200 |
commit | 535b4edd143ceeae870e9c13cdac65ce17e2be48 (patch) | |
tree | 11fa61069a3a5f73160913881af8f345d9312b7c /src/hexen/p_switch.c | |
parent | 833d8a838b44a950ebde587db1d888bf0a98e690 (diff) | |
parent | e0eb95922fbda64aca169d62029a5be071e1273f (diff) | |
download | chocolate-doom-535b4edd143ceeae870e9c13cdac65ce17e2be48.tar.gz chocolate-doom-535b4edd143ceeae870e9c13cdac65ce17e2be48.tar.bz2 chocolate-doom-535b4edd143ceeae870e9c13cdac65ce17e2be48.zip |
Merge pull request #523 from chocolate-doom/hexndemo
Add support for the Hexen 4 Level Demo Version
Diffstat (limited to 'src/hexen/p_switch.c')
-rw-r--r-- | src/hexen/p_switch.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/hexen/p_switch.c b/src/hexen/p_switch.c index 9d86f92a..a90269a7 100644 --- a/src/hexen/p_switch.c +++ b/src/hexen/p_switch.c @@ -25,7 +25,14 @@ // CHANGE THE TEXTURE OF A WALL SWITCH TO ITS OPPOSITE // //================================================================== -switchlist_t alphSwitchList[] = { +switchlist_t alphSwitchListDemo[] = { + {"SW_1_UP", "SW_1_DN", SFX_SWITCH1}, + {"SW_2_UP", "SW_2_DN", SFX_SWITCH1}, + {"SW52_OFF", "SW52_ON", SFX_SWITCH2}, + {"\0", "\0", 0} +}; + +switchlist_t alphSwitchListFull[] = { {"SW_1_UP", "SW_1_DN", SFX_SWITCH1}, {"SW_2_UP", "SW_2_DN", SFX_SWITCH1}, {"VALVE1", "VALVE2", SFX_VALVE_TURN}, @@ -39,6 +46,8 @@ switchlist_t alphSwitchList[] = { {"\0", "\0", 0} }; +switchlist_t *alphSwitchList = NULL; + int switchlist[MAXSWITCHES * 2]; int numswitches; button_t buttonlist[MAXBUTTONS]; @@ -58,6 +67,18 @@ void P_InitSwitchList(void) int i; int index; + if (!alphSwitchList) + { + if (gamemode == shareware) + { + alphSwitchList = alphSwitchListDemo; + } + else + { + alphSwitchList = alphSwitchListFull; + } + } + for (index = 0, i = 0; i < MAXSWITCHES; i++) { if (!alphSwitchList[i].soundID) |