From 1685caa03c95de2cbbe4a58daf8d7a47e688a86c Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 10 Aug 2006 15:28:12 +0000 Subject: [PATCH] August 10, 2006 (Changes by Graf Zahl) - Fixed: CheckActorInventory stored the return value in the wrong address on the ACS stack. - Fixed: Skin sounds weren't properly restored after a SNDINFO reset. - Added a more flexible ACS ChangeLevel function. It gets passed a level name instead of a level number and has several additional options (e.g. changing skill, starting the map without monsters and clearing the players' inventories. (UNTESTED!) - Changed Thing_Activate so that passing a tid of 0 activates the calling actor. - Changed Thing_Remove so that passing a tid of 0 removes the calling actor. - Added DECORATE parameters to A_Saw. SVN r283 (trunk) --- pcode.c | 1 + pcode.h | 1 + symbol.c | 1 + zdefs.acs | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/pcode.c b/pcode.c index ce8b860..0de69cc 100644 --- a/pcode.c +++ b/pcode.c @@ -437,6 +437,7 @@ static char *PCDNames[PCODE_COMMAND_COUNT] = "PCD_RSGLOBALARRAY", //[MW] end my p-codes "PCD_GETPLAYERINFO", + "PCD_CHANGELEVEL", }; diff --git a/pcode.h b/pcode.h index f3b08b3..0e3ab4d 100644 --- a/pcode.h +++ b/pcode.h @@ -387,6 +387,7 @@ typedef enum PCD_RSGLOBALARRAY, //[MW] end my p-codes PCD_GETPLAYERINFO, + PCD_CHANGELEVEL, PCODE_COMMAND_COUNT } pcd_t; diff --git a/symbol.c b/symbol.c index aaa0cfd..91fe361 100644 --- a/symbol.c +++ b/symbol.c @@ -174,6 +174,7 @@ static internFuncDef_t InternalFunctions[] = { "getsectorlightlevel", PCD_NOP, PCD_GETSECTORLIGHTLEVEL, 1, 0, 0, YES, NO }, { "playerclass", PCD_NOP, PCD_PLAYERCLASS, 1, 0, 0, YES, NO }, { "getplayerinfo", PCD_NOP, PCD_GETPLAYERINFO, 2, 0, 0, YES, NO }, + { "changelevel", PCD_NOP, PCD_CHANGELEVEL, 4, 8, 0, NO, NO }, { NULL, PCD_NOP, PCD_NOP, 0, 0, 0, NO, NO } }; diff --git a/zdefs.acs b/zdefs.acs index 6aef047..fb4967f 100644 --- a/zdefs.acs +++ b/zdefs.acs @@ -467,3 +467,9 @@ #define GK_FREE2 29 #define GK_FREE3 30 #define GK_CESCAPE 31 // color escape + +#define CHANGELEVEL_KEEPFACING 1 +#define CHANGELEVEL_RESETINVENTORY 2 +#define CHANGELEVEL_NOMONSTERS 4 +#define CHANGELEVEL_CHANGESKILL 8 +#define CHANGELEVEL_NOINTERMISSION 16