diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index a03b1c3d1..28d3f2105 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -4889,11 +4889,10 @@ void alterang(int a, int g_i, int g_p) { short aang, angdif, goalang, j; int ticselapsed; - intptr_t* moveptr; int* g_t = hittype[g_i].t_data; auto* g_sp = &sprite[g_i]; - moveptr = &ScriptCode[g_t[1]]; + auto moveptr = &ScriptCode[g_t[1]]; ticselapsed = (g_t[0]) & 31; diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 44569b262..c62547eaa 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -3963,7 +3963,6 @@ void move_d(int g_i, int g_p, int g_x) auto g_sp = &sprite[g_i]; auto g_t = hittype[g_i].t_data; int l; - intptr_t* moveptr; short a, goalang, angdif; int daxvel; @@ -4030,7 +4029,7 @@ void move_d(int g_i, int g_p, int g_x) 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 & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1; diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index eda40950b..6e1934f66 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -4057,7 +4057,6 @@ void move_r(int g_i, int g_p, int g_x) auto g_sp = &sprite[g_i]; auto g_t = hittype[g_i].t_data; int l; - intptr_t *moveptr; short a, goalang, angdif; int daxvel; @@ -4203,7 +4202,7 @@ void move_r(int g_i, int g_p, int g_x) 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 & getv) g_sp->zvel += ((*(moveptr + 1) << 4) - g_sp->zvel) >> 1; diff --git a/source/games/duke/src/gamedef.cpp b/source/games/duke/src/gamedef.cpp index 6938b5d07..c75dba1f2 100644 --- a/source/games/duke/src/gamedef.cpp +++ b/source/games/duke/src/gamedef.cpp @@ -61,7 +61,7 @@ int checking_ifelse; extern char tempbuf[]; extern int* labelcode; -TArray ScriptCode; +TArray ScriptCode; //--------------------------------------------------------------------------- // diff --git a/source/games/duke/src/gameexec.cpp b/source/games/duke/src/gameexec.cpp index a613fda0c..8eb7e3a0d 100644 --- a/source/games/duke/src/gameexec.cpp +++ b/source/games/duke/src/gameexec.cpp @@ -46,7 +46,7 @@ static int g_x; static int* g_t; static uint8_t killit_flag; static spritetype* g_sp; -static intptr_t* insptr; +static int* insptr; int parse(void); 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; spritetype* og_sp; uint8_t okillit_flag; - intptr_t* oinsptr; + int* oinsptr; char done; diff --git a/source/games/duke/src/gameexec.h b/source/games/duke/src/gameexec.h index 7cf424f3e..f86e28104 100644 --- a/source/games/duke/src/gameexec.h +++ b/source/games/duke/src/gameexec.h @@ -77,7 +77,7 @@ enum EVENT_MAXEVENT = EVENT_NUMEVENTS - 1 }; -extern TArray ScriptCode; +extern TArray ScriptCode; void OnEvent(int id, int pnum = -1, int snum = -1, int dist = -1);