mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- use 4 byte entries for the script.
We no longer store pointers in here.
This commit is contained in:
parent
cb1824ca25
commit
693b15a556
6 changed files with 7 additions and 10 deletions
|
@ -4889,11 +4889,10 @@ void alterang(int a, int g_i, int g_p)
|
||||||
{
|
{
|
||||||
short aang, angdif, goalang, j;
|
short aang, angdif, goalang, j;
|
||||||
int ticselapsed;
|
int ticselapsed;
|
||||||
intptr_t* moveptr;
|
|
||||||
int* g_t = hittype[g_i].t_data;
|
int* g_t = hittype[g_i].t_data;
|
||||||
auto* g_sp = &sprite[g_i];
|
auto* g_sp = &sprite[g_i];
|
||||||
|
|
||||||
moveptr = &ScriptCode[g_t[1]];
|
auto moveptr = &ScriptCode[g_t[1]];
|
||||||
|
|
||||||
ticselapsed = (g_t[0]) & 31;
|
ticselapsed = (g_t[0]) & 31;
|
||||||
|
|
||||||
|
|
|
@ -3963,7 +3963,6 @@ void move_d(int g_i, int g_p, int g_x)
|
||||||
auto g_sp = &sprite[g_i];
|
auto g_sp = &sprite[g_i];
|
||||||
auto g_t = hittype[g_i].t_data;
|
auto g_t = hittype[g_i].t_data;
|
||||||
int l;
|
int l;
|
||||||
intptr_t* moveptr;
|
|
||||||
short a, goalang, angdif;
|
short a, goalang, angdif;
|
||||||
int daxvel;
|
int daxvel;
|
||||||
|
|
||||||
|
@ -4030,7 +4029,7 @@ void move_d(int g_i, int g_p, int g_x)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
moveptr = &ScriptCode[g_t[1]];
|
auto moveptr = &ScriptCode[g_t[1]];
|
||||||
|
|
||||||
if (a & geth) g_sp->xvel += (*moveptr - g_sp->xvel) >> 1;
|
if (a & geth) g_sp->xvel += (*moveptr - g_sp->xvel) >> 1;
|
||||||
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
|
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
|
||||||
|
|
|
@ -4057,7 +4057,6 @@ void move_r(int g_i, int g_p, int g_x)
|
||||||
auto g_sp = &sprite[g_i];
|
auto g_sp = &sprite[g_i];
|
||||||
auto g_t = hittype[g_i].t_data;
|
auto g_t = hittype[g_i].t_data;
|
||||||
int l;
|
int l;
|
||||||
intptr_t *moveptr;
|
|
||||||
short a, goalang, angdif;
|
short a, goalang, angdif;
|
||||||
int daxvel;
|
int daxvel;
|
||||||
|
|
||||||
|
@ -4203,7 +4202,7 @@ void move_r(int g_i, int g_p, int g_x)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
moveptr = &ScriptCode[g_t[1]];
|
auto moveptr = &ScriptCode[g_t[1]];
|
||||||
|
|
||||||
if (a & geth) g_sp->xvel += (*moveptr - g_sp->xvel) >> 1;
|
if (a & geth) g_sp->xvel += (*moveptr - g_sp->xvel) >> 1;
|
||||||
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
|
if (a & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1;
|
||||||
|
|
|
@ -61,7 +61,7 @@ int checking_ifelse;
|
||||||
extern char tempbuf[];
|
extern char tempbuf[];
|
||||||
extern int* labelcode;
|
extern int* labelcode;
|
||||||
|
|
||||||
TArray<intptr_t> ScriptCode;
|
TArray<int> ScriptCode;
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
|
|
|
@ -46,7 +46,7 @@ static int g_x;
|
||||||
static int* g_t;
|
static int* g_t;
|
||||||
static uint8_t killit_flag;
|
static uint8_t killit_flag;
|
||||||
static spritetype* g_sp;
|
static spritetype* g_sp;
|
||||||
static intptr_t* insptr;
|
static int* insptr;
|
||||||
|
|
||||||
int parse(void);
|
int parse(void);
|
||||||
int furthestcanseepoint(int i, spritetype* ts, int* dax, int* day);
|
int furthestcanseepoint(int i, spritetype* ts, int* dax, int* day);
|
||||||
|
@ -1620,7 +1620,7 @@ void OnEvent(int iEventID, int p, int i, int x)
|
||||||
int* og_t;
|
int* og_t;
|
||||||
spritetype* og_sp;
|
spritetype* og_sp;
|
||||||
uint8_t okillit_flag;
|
uint8_t okillit_flag;
|
||||||
intptr_t* oinsptr;
|
int* oinsptr;
|
||||||
|
|
||||||
char done;
|
char done;
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ enum
|
||||||
EVENT_MAXEVENT = EVENT_NUMEVENTS - 1
|
EVENT_MAXEVENT = EVENT_NUMEVENTS - 1
|
||||||
};
|
};
|
||||||
|
|
||||||
extern TArray<intptr_t> ScriptCode;
|
extern TArray<int> ScriptCode;
|
||||||
|
|
||||||
|
|
||||||
void OnEvent(int id, int pnum = -1, int snum = -1, int dist = -1);
|
void OnEvent(int id, int pnum = -1, int snum = -1, int dist = -1);
|
||||||
|
|
Loading…
Reference in a new issue