mirror of
https://github.com/ZDoom/acc.git
synced 2025-03-13 03:42:17 +00:00
Merge branch 'master' of https://github.com/rheit/acc
Conflicts: zdefs.acs
This commit is contained in:
commit
4138c32df0
5 changed files with 47 additions and 6 deletions
1
error.c
1
error.c
|
@ -104,6 +104,7 @@ static struct
|
|||
{ ERR_MISSING_COLON, "Missing colon." },
|
||||
{ ERR_BAD_EXPR, "Syntax error in expression." },
|
||||
{ ERR_BAD_CONST_EXPR, "Syntax error in constant expression." },
|
||||
{ ERR_DIV_BY_ZERO_IN_CONST_EXPR, "Division by zero in constant expression." },
|
||||
{ ERR_NO_DIRECT_VER, "Internal function has no direct version." },
|
||||
{ ERR_ILLEGAL_EXPR_IDENT, "%s : Illegal identifier in expression." },
|
||||
{ ERR_EXPR_FUNC_NO_RET_VAL, "Function call in expression has no return value." },
|
||||
|
|
1
error.h
1
error.h
|
@ -69,6 +69,7 @@ typedef enum
|
|||
ERR_MISSING_COLON,
|
||||
ERR_BAD_EXPR,
|
||||
ERR_BAD_CONST_EXPR,
|
||||
ERR_DIV_BY_ZERO_IN_CONST_EXPR,
|
||||
ERR_NO_DIRECT_VER,
|
||||
ERR_ILLEGAL_EXPR_IDENT,
|
||||
ERR_EXPR_FUNC_NO_RET_VAL,
|
||||
|
|
28
parse.c
28
parse.c
|
@ -825,8 +825,18 @@ static void OuterFunction(void)
|
|||
else
|
||||
{
|
||||
sym = SY_InsertGlobal(tk_String, SY_SCRIPTFUNC);
|
||||
sym->info.scriptFunc.address = (importing == IMPORT_Importing ? 0 : pc_Address);
|
||||
sym->info.scriptFunc.predefined = NO;
|
||||
if (importing == IMPORT_Importing)
|
||||
{
|
||||
sym->info.scriptFunc.address = 0;
|
||||
sym->info.scriptFunc.predefined = NO;
|
||||
}
|
||||
else
|
||||
{
|
||||
sym->info.scriptFunc.address = pc_Address;
|
||||
sym->info.scriptFunc.predefined = YES;
|
||||
// only for consistency with other speculated functions and pretty logs
|
||||
sym->info.scriptFunc.funcNumber = 0;
|
||||
}
|
||||
}
|
||||
defLine = tk_Line;
|
||||
|
||||
|
@ -3807,12 +3817,18 @@ static void SendExprCommand(pcd_t pcd)
|
|||
PushExStk(PopExStk()*PopExStk());
|
||||
break;
|
||||
case PCD_DIVIDE:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk()/operand2);
|
||||
break;
|
||||
case PCD_MODULUS:
|
||||
operand2 = PopExStk();
|
||||
PushExStk(PopExStk()%operand2);
|
||||
operand1 = PopExStk();
|
||||
if (operand2 != 0)
|
||||
{
|
||||
PushExStk(pcd == PCD_DIVIDE ? operand1/operand2 : operand1%operand2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ERR_Error(ERR_DIV_BY_ZERO_IN_CONST_EXPR, YES);
|
||||
PushExStk(operand1);
|
||||
}
|
||||
break;
|
||||
case PCD_EQ:
|
||||
PushExStk(PopExStk() == PopExStk());
|
||||
|
|
22
zdefs.acs
22
zdefs.acs
|
@ -984,6 +984,11 @@
|
|||
#define FHF_NORANDOMPUFFZ 1
|
||||
#define FHF_NOIMPACTDECAL 2
|
||||
|
||||
// PickActor flags
|
||||
|
||||
#define PICKAF_FORCETID 1
|
||||
#define PICKAF_RETURNTID 2
|
||||
|
||||
// magic value to set the ice translation through ACS
|
||||
#define TRANSLATION_ICE 0x100007
|
||||
|
||||
|
@ -1056,3 +1061,20 @@
|
|||
#define QF_MAX 1 << 3
|
||||
#define QF_FULLINTENSITY 1 << 4
|
||||
#define QF_WAVE 1 << 5
|
||||
|
||||
#define WARPF_ABSOLUTEOFFSET 0x1
|
||||
#define WARPF_ABSOLUTEANGLE 0x2
|
||||
#define WARPF_USECALLERANGLE 0x4
|
||||
#define WARPF_NOCHECKPOSITION 0x8
|
||||
#define WARPF_INTERPOLATE 0x10
|
||||
#define WARPF_WARPINTERPOLATION 0x20
|
||||
#define WARPF_COPYINTERPOLATION 0x40
|
||||
#define WARPF_STOP 0x80
|
||||
#define WARPF_TOFLOOR 0x100
|
||||
#define WARPF_TESTONLY 0x200
|
||||
#define WARPF_ABSOLUTEPOSITION 0x400
|
||||
#define WARPF_BOB 0x800
|
||||
#define WARPF_MOVEPTR 0x1000
|
||||
#define WARPF_USEPTR 0x2000
|
||||
#define WARPF_COPYVELOCITY 0x4000
|
||||
#define WARPF_COPYPITCH 0x8000
|
||||
|
|
|
@ -335,6 +335,7 @@ special
|
|||
-89:ChangeActorRoll(2,3),
|
||||
-90:GetActorRoll(1),
|
||||
-91:QuakeEx(8,12),
|
||||
-92:Warp(6,11),
|
||||
|
||||
// Zandronum's
|
||||
-100:ResetMap(0),
|
||||
|
|
Loading…
Reference in a new issue