2006-02-24 05:03:04 +00:00
|
|
|
|
|
|
|
//**************************************************************************
|
|
|
|
//**
|
|
|
|
//** pcode.h
|
|
|
|
//**
|
|
|
|
//**************************************************************************
|
|
|
|
|
|
|
|
#ifndef __PCODE_H__
|
|
|
|
#define __PCODE_H__
|
|
|
|
|
|
|
|
// HEADER FILES ------------------------------------------------------------
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "common.h"
|
|
|
|
|
|
|
|
// MACROS ------------------------------------------------------------------
|
|
|
|
|
2012-02-15 00:21:37 +00:00
|
|
|
// Values to indicate a script's type
|
2006-02-24 05:03:04 +00:00
|
|
|
enum
|
|
|
|
{
|
2012-02-15 00:21:37 +00:00
|
|
|
OPEN_SCRIPTS_BASE = 1,
|
|
|
|
RESPAWN_SCRIPTS_BASE = 2, // [BC]
|
|
|
|
DEATH_SCRIPTS_BASE = 3, // [BC]
|
|
|
|
ENTER_SCRIPTS_BASE = 4, // [BC]
|
|
|
|
PICKUP_SCRIPTS_BASE = 5, // [BC]
|
|
|
|
BLUE_RETURN_SCRIPTS_BASE = 6, // [BC]
|
|
|
|
RED_RETURN_SCRIPTS_BASE = 7, // [BC]
|
|
|
|
WHITE_RETURN_SCRIPTS_BASE = 8, // [BC]
|
|
|
|
LIGHTNING_SCRIPTS_BASE = 12,
|
|
|
|
UNLOADING_SCRIPTS_BASE = 13,
|
|
|
|
DISCONNECT_SCRIPTS_BASE = 14,
|
|
|
|
RETURN_SCRIPTS_BASE = 15,
|
2014-05-04 16:22:47 +00:00
|
|
|
EVENT_SCRIPTS_BASE = 16, // [BB]
|
2006-02-24 05:03:04 +00:00
|
|
|
};
|
|
|
|
|
2012-02-15 00:21:37 +00:00
|
|
|
// Values to indicate script flags (requires new-style .o)
|
2006-02-24 05:03:04 +00:00
|
|
|
enum
|
|
|
|
{
|
2012-02-15 00:21:37 +00:00
|
|
|
NET_SCRIPT_FLAG = 0x0001,
|
|
|
|
CLIENTSIDE_SCRIPT_FLAG = 0x0002, // [BB]
|
2006-02-24 05:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Or'ed with variable index when passing variables of type "out"
|
|
|
|
// An idea that was never realized.
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
OUTVAR_SCRIPT_SPEC = 0x40000000,
|
|
|
|
OUTVAR_MAP_SPEC = 0x80000000,
|
|
|
|
OUTVAR_WORLD_SPEC = 0xc0000000,
|
|
|
|
OUTVAR_GLOBAL_SPEC = 0x00000000
|
|
|
|
};
|
|
|
|
|
|
|
|
// TYPES -------------------------------------------------------------------
|
|
|
|
|
|
|
|
struct symbolNode_s; // Defined in symbol.h
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
PCD_NOP,
|
|
|
|
PCD_TERMINATE,
|
|
|
|
PCD_SUSPEND,
|
|
|
|
PCD_PUSHNUMBER,
|
|
|
|
PCD_LSPEC1,
|
|
|
|
PCD_LSPEC2,
|
|
|
|
PCD_LSPEC3,
|
|
|
|
PCD_LSPEC4,
|
|
|
|
PCD_LSPEC5,
|
|
|
|
PCD_LSPEC1DIRECT,
|
|
|
|
PCD_LSPEC2DIRECT,
|
|
|
|
PCD_LSPEC3DIRECT,
|
|
|
|
PCD_LSPEC4DIRECT,
|
|
|
|
PCD_LSPEC5DIRECT,
|
|
|
|
PCD_ADD,
|
|
|
|
PCD_SUBTRACT,
|
|
|
|
PCD_MULTIPLY,
|
|
|
|
PCD_DIVIDE,
|
|
|
|
PCD_MODULUS,
|
|
|
|
PCD_EQ,
|
|
|
|
PCD_NE,
|
|
|
|
PCD_LT,
|
|
|
|
PCD_GT,
|
|
|
|
PCD_LE,
|
|
|
|
PCD_GE,
|
|
|
|
PCD_ASSIGNSCRIPTVAR,
|
|
|
|
PCD_ASSIGNMAPVAR,
|
|
|
|
PCD_ASSIGNWORLDVAR,
|
|
|
|
PCD_PUSHSCRIPTVAR,
|
|
|
|
PCD_PUSHMAPVAR,
|
|
|
|
PCD_PUSHWORLDVAR,
|
|
|
|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
|
|
|
|
PCD_LSHIFT,
|
|
|
|
PCD_RSHIFT,
|
|
|
|
PCD_UNARYMINUS,
|
|
|
|
PCD_IFNOTGOTO,
|
|
|
|
PCD_LINESIDE,
|
|
|
|
PCD_SCRIPTWAIT,
|
|
|
|
PCD_SCRIPTWAITDIRECT,
|
|
|
|
PCD_CLEARLINESPECIAL,
|
|
|
|
PCD_CASEGOTO,
|
|
|
|
PCD_BEGINPRINT,
|
|
|
|
PCD_ENDPRINT,
|
|
|
|
PCD_PRINTSTRING,
|
|
|
|
PCD_PRINTNUMBER,
|
|
|
|
PCD_PRINTCHARACTER,
|
|
|
|
PCD_PLAYERCOUNT,
|
|
|
|
PCD_GAMETYPE,
|
|
|
|
PCD_GAMESKILL,
|
|
|
|
PCD_TIMER,
|
|
|
|
PCD_SECTORSOUND,
|
|
|
|
PCD_AMBIENTSOUND,
|
|
|
|
PCD_SOUNDSEQUENCE,
|
|
|
|
PCD_SETLINETEXTURE,
|
|
|
|
PCD_SETLINEBLOCKING,
|
|
|
|
PCD_SETLINESPECIAL,
|
|
|
|
PCD_THINGSOUND,
|
|
|
|
PCD_ENDPRINTBOLD,
|
|
|
|
// [RH] End of Hexen p-codes
|
|
|
|
PCD_ACTIVATORSOUND,
|
|
|
|
PCD_LOCALAMBIENTSOUND,
|
|
|
|
PCD_SETLINEMONSTERBLOCKING,
|
|
|
|
// [BC] Start of new pcodes
|
|
|
|
PCD_PLAYERBLUESKULL,
|
|
|
|
PCD_PLAYERREDSKULL,
|
|
|
|
PCD_PLAYERYELLOWSKULL,
|
|
|
|
PCD_PLAYERMASTERSKULL,
|
|
|
|
PCD_PLAYERBLUECARD,
|
|
|
|
PCD_PLAYERREDCARD,
|
|
|
|
PCD_PLAYERYELLOWCARD,
|
|
|
|
PCD_PLAYERMASTERCARD,
|
|
|
|
PCD_PLAYERBLACKSKULL,
|
|
|
|
PCD_PLAYERSILVERSKULL,
|
|
|
|
PCD_PLAYERGOLDSKULL,
|
|
|
|
PCD_PLAYERBLACKCARD,
|
|
|
|
PCD_PLAYERSILVERCARD,
|
2016-06-19 23:39:15 +00:00
|
|
|
PCD_ISNETWORKGAME,
|
2006-02-24 05:03:04 +00:00
|
|
|
PCD_PLAYERTEAM,
|
|
|
|
PCD_PLAYERHEALTH,
|
|
|
|
PCD_PLAYERARMORPOINTS,
|
|
|
|
PCD_PLAYERFRAGS,
|
|
|
|
PCD_PLAYEREXPERT,
|
|
|
|
PCD_BLUETEAMCOUNT,
|
|
|
|
PCD_REDTEAMCOUNT,
|
|
|
|
PCD_BLUETEAMSCORE,
|
|
|
|
PCD_REDTEAMSCORE,
|
|
|
|
PCD_ISONEFLAGCTF,
|
2009-04-18 01:44:46 +00:00
|
|
|
PCD_GETINVASIONWAVE,
|
|
|
|
PCD_GETINVASIONSTATE,
|
2006-02-24 05:03:04 +00:00
|
|
|
PCD_PRINTNAME,
|
|
|
|
PCD_MUSICCHANGE,
|
|
|
|
PCD_CONSOLECOMMANDDIRECT,
|
|
|
|
PCD_CONSOLECOMMAND,
|
|
|
|
PCD_SINGLEPLAYER,
|
|
|
|
// [RH] End of Skull Tag p-codes
|
|
|
|
PCD_FIXEDMUL,
|
|
|
|
PCD_FIXEDDIV,
|
|
|
|
PCD_SETGRAVITY,
|
|
|
|
PCD_SETGRAVITYDIRECT,
|
|
|
|
PCD_SETAIRCONTROL,
|
|
|
|
PCD_SETAIRCONTROLDIRECT,
|
|
|
|
PCD_CLEARINVENTORY,
|
|
|
|
PCD_GIVEINVENTORY,
|
|
|
|
PCD_GIVEINVENTORYDIRECT,
|
|
|
|
PCD_TAKEINVENTORY,
|
|
|
|
PCD_TAKEINVENTORYDIRECT,
|
|
|
|
PCD_CHECKINVENTORY,
|
|
|
|
PCD_CHECKINVENTORYDIRECT,
|
|
|
|
PCD_SPAWN,
|
|
|
|
PCD_SPAWNDIRECT,
|
|
|
|
PCD_SPAWNSPOT,
|
|
|
|
PCD_SPAWNSPOTDIRECT,
|
|
|
|
PCD_SETMUSIC,
|
|
|
|
PCD_SETMUSICDIRECT,
|
|
|
|
PCD_LOCALSETMUSIC,
|
|
|
|
PCD_LOCALSETMUSICDIRECT,
|
|
|
|
PCD_PRINTFIXED,
|
|
|
|
PCD_PRINTLOCALIZED,
|
|
|
|
PCD_MOREHUDMESSAGE,
|
|
|
|
PCD_OPTHUDMESSAGE,
|
|
|
|
PCD_ENDHUDMESSAGE,
|
|
|
|
PCD_ENDHUDMESSAGEBOLD,
|
|
|
|
PCD_SETSTYLE,
|
|
|
|
PCD_SETSTYLEDIRECT,
|
|
|
|
PCD_SETFONT,
|
|
|
|
PCD_SETFONTDIRECT,
|
|
|
|
PCD_PUSHBYTE, // Valid in compact-script mode only
|
|
|
|
PCD_LSPEC1DIRECTB, // "
|
|
|
|
PCD_LSPEC2DIRECTB, // "
|
|
|
|
PCD_LSPEC3DIRECTB, // "
|
|
|
|
PCD_LSPEC4DIRECTB, // "
|
|
|
|
PCD_LSPEC5DIRECTB, // "
|
|
|
|
PCD_DELAYDIRECTB, // "
|
|
|
|
PCD_RANDOMDIRECTB, // "
|
|
|
|
PCD_PUSHBYTES, // "
|
|
|
|
PCD_PUSH2BYTES, // "
|
|
|
|
PCD_PUSH3BYTES, // "
|
|
|
|
PCD_PUSH4BYTES, // "
|
|
|
|
PCD_PUSH5BYTES, // "
|
|
|
|
PCD_SETTHINGSPECIAL,
|
|
|
|
PCD_ASSIGNGLOBALVAR,
|
|
|
|
PCD_PUSHGLOBALVAR,
|
|
|
|
PCD_ADDGLOBALVAR,
|
|
|
|
PCD_SUBGLOBALVAR,
|
|
|
|
PCD_MULGLOBALVAR,
|
|
|
|
PCD_DIVGLOBALVAR,
|
|
|
|
PCD_MODGLOBALVAR,
|
|
|
|
PCD_INCGLOBALVAR,
|
|
|
|
PCD_DECGLOBALVAR,
|
|
|
|
PCD_FADETO,
|
|
|
|
PCD_FADERANGE,
|
|
|
|
PCD_CANCELFADE,
|
|
|
|
PCD_PLAYMOVIE,
|
|
|
|
PCD_SETFL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Y,
|
|
|
|
PCD_MULGLOBALARRAY,
|
|
|
|
PCD_DIVGLOBALARRAY,
|
|
|
|
PCD_MODGLOBALARRAY,
|
|
|
|
PCD_INCGLOBALARRAY,
|
|
|
|
PCD_DECGLOBALARRAY,
|
|
|
|
PCD_SETMARINEWEAPON,
|
|
|
|
PCD_SETACTORPROPERTY,
|
|
|
|
PCD_GETACTORPROPERTY,
|
|
|
|
PCD_PLAYERNUMBER,
|
|
|
|
PCD_ACTIVATORTID,
|
|
|
|
PCD_SETMARINESPRITE,
|
|
|
|
PCD_GETSCREENWIDTH,
|
|
|
|
PCD_GETSCREENHEIGHT,
|
|
|
|
PCD_THING_PROJECTILE2,
|
|
|
|
PCD_STRLEN,
|
|
|
|
PCD_SETHUDSIZE,
|
|
|
|
PCD_GETCVAR,
|
|
|
|
PCD_CASEGOTOSORTED,
|
|
|
|
PCD_SETRESULTVALUE,
|
|
|
|
PCD_GETLINEROWOFFSET,
|
|
|
|
PCD_GETACTORFLOORZ,
|
|
|
|
PCD_GETACTORANGLE,
|
|
|
|
PCD_GETSECTORFLOORZ,
|
|
|
|
PCD_GETSECTORCEILINGZ,
|
|
|
|
PCD_LSPEC5RESULT,
|
|
|
|
PCD_GETSIGILPIECES,
|
|
|
|
PCD_GETLEVELINFO,
|
|
|
|
PCD_CHANGESKY,
|
|
|
|
PCD_PLAYERINGAME,
|
|
|
|
PCD_PLAYERISBOT,
|
|
|
|
PCD_SETCAMERATOTEXTURE,
|
|
|
|
PCD_ENDLOG,
|
|
|
|
PCD_GETAMMOCAPACITY,
|
|
|
|
PCD_SETAMMOCAPACITY,
|
|
|
|
// [JB] start of new pcodes
|
|
|
|
PCD_PRINTMAPCHARARRAY,
|
|
|
|
PCD_PRINTWORLDCHARARRAY,
|
|
|
|
PCD_PRINTGLOBALCHARARRAY,
|
|
|
|
// [JB] end of new pcodes
|
|
|
|
PCD_SETACTORANGLE,
|
|
|
|
PCD_GRABINPUT,
|
|
|
|
PCD_SETMOUSEPOINTER,
|
|
|
|
PCD_MOVEMOUSEPOINTER,
|
2006-06-03 12:30:11 +00:00
|
|
|
PCD_SPAWNPROJECTILE,
|
2006-06-18 15:49:00 +00:00
|
|
|
PCD_GETSECTORLIGHTLEVEL,
|
|
|
|
PCD_GETACTORCEILINGZ,
|
|
|
|
PCD_SETACTORPOSITION,
|
|
|
|
PCD_CLEARACTORINVENTORY,
|
|
|
|
PCD_GIVEACTORINVENTORY,
|
|
|
|
PCD_TAKEACTORINVENTORY,
|
|
|
|
PCD_CHECKACTORINVENTORY,
|
2006-07-09 20:15:38 +00:00
|
|
|
PCD_THINGCOUNTNAME,
|
|
|
|
PCD_SPAWNSPOTFACING,
|
2006-07-13 10:17:56 +00:00
|
|
|
PCD_PLAYERCLASS,
|
2006-07-16 20:13:24 +00:00
|
|
|
//[MW] start my p-codes
|
|
|
|
PCD_ANDSCRIPTVAR,
|
|
|
|
PCD_ANDMAPVAR,
|
|
|
|
PCD_ANDWORLDVAR,
|
|
|
|
PCD_ANDGLOBALVAR,
|
|
|
|
PCD_ANDMAPARRAY,
|
|
|
|
PCD_ANDWORLDARRAY,
|
|
|
|
PCD_ANDGLOBALARRAY,
|
|
|
|
PCD_EORSCRIPTVAR,
|
|
|
|
PCD_EORMAPVAR,
|
|
|
|
PCD_EORWORLDVAR,
|
|
|
|
PCD_EORGLOBALVAR,
|
|
|
|
PCD_EORMAPARRAY,
|
|
|
|
PCD_EORWORLDARRAY,
|
|
|
|
PCD_EORGLOBALARRAY,
|
|
|
|
PCD_ORSCRIPTVAR,
|
|
|
|
PCD_ORMAPVAR,
|
|
|
|
PCD_ORWORLDVAR,
|
|
|
|
PCD_ORGLOBALVAR,
|
|
|
|
PCD_ORMAPARRAY,
|
|
|
|
PCD_ORWORLDARRAY,
|
|
|
|
PCD_ORGLOBALARRAY,
|
|
|
|
PCD_LSSCRIPTVAR,
|
|
|
|
PCD_LSMAPVAR,
|
|
|
|
PCD_LSWORLDVAR,
|
|
|
|
PCD_LSGLOBALVAR,
|
|
|
|
PCD_LSMAPARRAY,
|
|
|
|
PCD_LSWORLDARRAY,
|
|
|
|
PCD_LSGLOBALARRAY,
|
|
|
|
PCD_RSSCRIPTVAR,
|
|
|
|
PCD_RSMAPVAR,
|
|
|
|
PCD_RSWORLDVAR,
|
|
|
|
PCD_RSGLOBALVAR,
|
|
|
|
PCD_RSMAPARRAY,
|
|
|
|
PCD_RSWORLDARRAY,
|
|
|
|
PCD_RSGLOBALARRAY,
|
|
|
|
//[MW] end my p-codes
|
2006-07-30 22:56:20 +00:00
|
|
|
PCD_GETPLAYERINFO,
|
2006-08-10 15:28:12 +00:00
|
|
|
PCD_CHANGELEVEL,
|
2006-08-12 02:30:14 +00:00
|
|
|
PCD_SECTORDAMAGE,
|
|
|
|
PCD_REPLACETEXTURES,
|
2006-10-09 15:55:47 +00:00
|
|
|
PCD_NEGATEBINARY,
|
2006-10-22 10:32:41 +00:00
|
|
|
PCD_GETACTORPITCH,
|
|
|
|
PCD_SETACTORPITCH,
|
2007-02-24 12:09:36 +00:00
|
|
|
PCD_PRINTBIND,
|
2007-04-22 17:08:17 +00:00
|
|
|
PCD_SETACTORSTATE,
|
|
|
|
PCD_THINGDAMAGE2,
|
2007-12-25 08:44:13 +00:00
|
|
|
PCD_USEINVENTORY,
|
|
|
|
PCD_USEACTORINVENTORY,
|
2008-03-01 16:59:17 +00:00
|
|
|
PCD_CHECKACTORCEILINGTEXTURE,
|
|
|
|
PCD_CHECKACTORFLOORTEXTURE,
|
|
|
|
PCD_GETACTORLIGHTLEVEL,
|
2008-03-19 09:53:57 +00:00
|
|
|
PCD_SETMUGSHOTSTATE,
|
2008-03-21 12:24:13 +00:00
|
|
|
PCD_THINGCOUNTSECTOR,
|
|
|
|
PCD_THINGCOUNTNAMESECTOR,
|
2008-04-15 09:58:39 +00:00
|
|
|
PCD_CHECKPLAYERCAMERA,
|
2008-05-22 19:36:21 +00:00
|
|
|
PCD_MORPHACTOR,
|
|
|
|
PCD_UNMORPHACTOR,
|
2008-09-13 02:45:50 +00:00
|
|
|
PCD_GETPLAYERINPUT,
|
2008-12-07 02:11:38 +00:00
|
|
|
PCD_CLASSIFYACTOR,
|
2008-12-07 03:59:06 +00:00
|
|
|
PCD_PRINTBINARY,
|
|
|
|
PCD_PRINTHEX,
|
2009-05-11 21:07:27 +00:00
|
|
|
PCD_CALLFUNC,
|
2011-05-11 22:26:54 +00:00
|
|
|
PCD_SAVESTRING, // [FDARI]
|
2011-06-13 09:12:56 +00:00
|
|
|
PCD_PRINTMAPCHRANGE, // [FDARI] output range
|
|
|
|
PCD_PRINTWORLDCHRANGE,
|
|
|
|
PCD_PRINTGLOBALCHRANGE,
|
|
|
|
PCD_STRCPYTOMAPCHRANGE, // [FDARI] input range
|
|
|
|
PCD_STRCPYTOWORLDCHRANGE,
|
|
|
|
PCD_STRCPYTOGLOBALCHRANGE,
|
2012-07-11 03:59:01 +00:00
|
|
|
PCD_PUSHFUNCTION, // from Eternity
|
|
|
|
PCD_CALLSTACK, // from Eternity
|
|
|
|
PCD_SCRIPTWAITNAMED,
|
2012-09-20 02:26:58 +00:00
|
|
|
PCD_TRANSLATIONRANGE3,
|
2014-07-25 23:10:50 +00:00
|
|
|
PCD_GOTOSTACK,
|
2014-07-24 19:41:39 +00:00
|
|
|
PCD_ASSIGNSCRIPTARRAY,
|
|
|
|
PCD_PUSHSCRIPTARRAY,
|
|
|
|
PCD_ADDSCRIPTARRAY,
|
|
|
|
PCD_SUBSCRIPTARRAY,
|
|
|
|
PCD_MULSCRIPTARRAY,
|
|
|
|
PCD_DIVSCRIPTARRAY,
|
|
|
|
PCD_MODSCRIPTARRAY,
|
|
|
|
PCD_INCSCRIPTARRAY,
|
|
|
|
PCD_DECSCRIPTARRAY,
|
|
|
|
PCD_ANDSCRIPTARRAY,
|
|
|
|
PCD_EORSCRIPTARRAY,
|
|
|
|
PCD_ORSCRIPTARRAY,
|
|
|
|
PCD_LSSCRIPTARRAY,
|
|
|
|
PCD_RSSCRIPTARRAY,
|
|
|
|
PCD_PRINTSCRIPTCHARARRAY,
|
|
|
|
PCD_PRINTSCRIPTCHRANGE,
|
|
|
|
PCD_STRCPYTOSCRIPTCHRANGE,
|
2016-01-25 12:06:36 +00:00
|
|
|
PCD_LSPEC5EX,
|
|
|
|
PCD_LSPEC5EXRESULT,
|
2014-07-24 19:41:39 +00:00
|
|
|
|
2006-02-24 05:03:04 +00:00
|
|
|
PCODE_COMMAND_COUNT
|
|
|
|
} pcd_t;
|
|
|
|
|
|
|
|
// PUBLIC FUNCTION PROTOTYPES ----------------------------------------------
|
|
|
|
|
|
|
|
void PC_OpenObject(char *name, size_t size, int flags);
|
|
|
|
void PC_CloseObject(void);
|
|
|
|
void PC_Append(void *buffer, size_t size);
|
|
|
|
void PC_AppendByte(U_BYTE val);
|
|
|
|
void PC_AppendWord(U_WORD val);
|
2008-07-19 08:01:33 +00:00
|
|
|
void PC_AppendInt(U_INT val);
|
2006-02-24 05:03:04 +00:00
|
|
|
void PC_AppendString(char *string);
|
|
|
|
void PC_AppendCmd(pcd_t command);
|
2008-07-19 08:01:33 +00:00
|
|
|
void PC_AppendPushVal(U_INT val);
|
2006-02-24 05:03:04 +00:00
|
|
|
void PC_AppendShrink(U_BYTE val);
|
|
|
|
void PC_Write(void *buffer, size_t size, int address);
|
|
|
|
void PC_WriteByte(U_BYTE val, int address);
|
|
|
|
//void PC_WriteWord(U_WORD val, int address);
|
2008-07-19 08:01:33 +00:00
|
|
|
void PC_WriteInt(U_INT val, int address);
|
2006-02-24 05:03:04 +00:00
|
|
|
void PC_WriteString(char *string, int address);
|
|
|
|
void PC_WriteCmd(pcd_t command, int address);
|
|
|
|
void PC_Skip(size_t size);
|
|
|
|
//void PC_SkipByte(void);
|
|
|
|
//void PC_SkipWord(void);
|
2008-07-19 08:01:33 +00:00
|
|
|
void PC_SkipInt(void);
|
2012-02-15 00:21:37 +00:00
|
|
|
void PC_AddScript(int number, int type, int flags, int argCount);
|
2014-07-24 19:41:39 +00:00
|
|
|
void PC_SetScriptVarCount(int number, int type, int varCount, int arrayCount, int *arraySizes);
|
|
|
|
void PC_AddFunction(struct symbolNode_s *sym, int arrayCount, int *sizes);
|
2006-02-24 05:03:04 +00:00
|
|
|
void PC_PutMapVariable(int index, int value);
|
|
|
|
void PC_NameMapVariable(int index, struct symbolNode_s *sym);
|
|
|
|
void PC_AddArray(int index, int size);
|
|
|
|
void PC_InitArray(int index, int *entries, boolean hasStrings);
|
|
|
|
int PC_AddImport(char *name);
|
|
|
|
|
|
|
|
// PUBLIC DATA DECLARATIONS ------------------------------------------------
|
|
|
|
|
|
|
|
extern int pc_Address;
|
|
|
|
extern byte *pc_Buffer;
|
|
|
|
extern byte *pc_BufferPtr;
|
|
|
|
extern int pc_ScriptCount;
|
|
|
|
extern int pc_FunctionCount;
|
|
|
|
extern boolean pc_NoShrink;
|
|
|
|
extern boolean pc_HexenCase;
|
2012-03-08 22:06:57 +00:00
|
|
|
extern boolean pc_EnforceHexen;
|
|
|
|
extern boolean pc_WarnNotHexen;
|
2006-02-24 05:03:04 +00:00
|
|
|
extern boolean pc_WadAuthor;
|
|
|
|
extern boolean pc_EncryptStrings;
|
|
|
|
extern int pc_LastAppendedCommand;
|
|
|
|
|
|
|
|
#endif
|