mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Replace msx/msy global arrays with vec2_t g_origins. Bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@5580 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
72d7f042de
commit
10fca8594d
9 changed files with 28 additions and 34 deletions
|
@ -761,7 +761,7 @@ static void A_MoveSector(int i)
|
|||
|
||||
for (i = sector[s->sectnum].wallptr; i < endwall; i++)
|
||||
{
|
||||
vec2_t const v = { msx[j], msy[j] };
|
||||
vec2_t const v = g_origins[j];
|
||||
vec2_t t;
|
||||
rotatepoint(zerovec, v, k & 2047, &t);
|
||||
dragpoint(i, s->x + t.x, s->y + t.y, 0);
|
||||
|
@ -1579,7 +1579,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
case STAT_STANDABLE:
|
||||
case STAT_PLAYER:
|
||||
{
|
||||
vec3_t vect = { msx[t[4]+1], msy[t[4]+1], sprite[j].z };
|
||||
vec3_t vect = { g_origins[t[4]+1].x, g_origins[t[4]+1].y, sprite[j].z };
|
||||
|
||||
s->ang = getangle(vect.x-s->x, vect.y-s->y);
|
||||
setsprite(j, &vect);
|
||||
|
@ -1680,7 +1680,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
if ((sector[sect].floorz-s->z) > 8192)
|
||||
s->picnum++;
|
||||
|
||||
if (s->z < msx[t[4]+2])
|
||||
if (s->z < g_origins[t[4]+2].x)
|
||||
{
|
||||
t[0]++;
|
||||
s->xvel = 0;
|
||||
|
@ -1692,9 +1692,9 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
{
|
||||
if (s->xvel < 192)
|
||||
s->xvel += 8;
|
||||
s->ang = getangle(msx[t[4]]-s->x,msy[t[4]]-s->y);
|
||||
s->ang = getangle(g_origins[t[4]].x - s->x, g_origins[t[4]].y - s->y);
|
||||
A_SetSprite(i,CLIPMASK0);
|
||||
if (((s->x-msx[t[4]])*(s->x-msx[t[4]])+(s->y-msy[t[4]])*(s->y-msy[t[4]])) < (128*128))
|
||||
if (((s->x-g_origins[t[4]].x)*(s->x-g_origins[t[4]].x)+(s->y-g_origins[t[4]].y)*(s->y-g_origins[t[4]].y)) < (128*128))
|
||||
t[0]++;
|
||||
}
|
||||
|
||||
|
@ -1705,7 +1705,7 @@ ACTOR_STATIC void G_MoveStandables(void)
|
|||
vec3_t vect;
|
||||
Bmemcpy(&vect,s,sizeof(vec3_t));
|
||||
vect.z -= (34<<8);
|
||||
setsprite(msy[t[4]+2],&vect);
|
||||
setsprite(g_origins[t[4]+2].y, &vect);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -794,7 +794,7 @@ void CONFIG_WriteSetup(uint32_t flags)
|
|||
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Misc", "Executions",++ud.executions,FALSE,FALSE);
|
||||
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup","ConfigVersion",BYTEVERSION_JF,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup","ConfigVersion",BYTEVERSION_EDUKE32,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "ForceSetup",ud.config.ForceSetup,FALSE,FALSE);
|
||||
SCRIPT_PutNumber(ud.config.scripthandle, "Setup", "NoAutoLoad",ud.config.NoAutoLoad,FALSE,FALSE);
|
||||
|
||||
|
|
|
@ -54,16 +54,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
// increase by 3, because atomic GRP adds 1, and Shareware adds 2
|
||||
#ifdef LUNATIC
|
||||
// Lunatic
|
||||
# define BYTEVERSION_JF 303
|
||||
# define BYTEVERSION_EDUKE32 306
|
||||
#else
|
||||
// Non-Lua build
|
||||
# define BYTEVERSION_JF 303
|
||||
# define BYTEVERSION_EDUKE32 306
|
||||
#endif
|
||||
|
||||
//#define BYTEVERSION_13 27
|
||||
//#define BYTEVERSION_14 116
|
||||
//#define BYTEVERSION_15 117
|
||||
#define BYTEVERSION (BYTEVERSION_JF+(PLUTOPAK?1:(VOLUMEONE<<1)))
|
||||
#define BYTEVERSION (BYTEVERSION_EDUKE32+(PLUTOPAK?1:(VOLUMEONE<<1)))
|
||||
|
||||
#define NUMPAGES 1
|
||||
|
||||
|
|
|
@ -5988,28 +5988,23 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
sp->z = sector[sect].ceilingz+(48<<8);
|
||||
T5 = tempwallptr;
|
||||
|
||||
msx[tempwallptr] = sp->x;
|
||||
msy[tempwallptr] = sp->y;
|
||||
msx[tempwallptr+2] = sp->z;
|
||||
g_origins[tempwallptr] = *(vec2_t *) sp;
|
||||
g_origins[tempwallptr+2].x = sp->z;
|
||||
|
||||
s = headspritestat[STAT_DEFAULT];
|
||||
while (s >= 0)
|
||||
{
|
||||
if (sprite[s].picnum == CRANEPOLE && SHT == (sprite[s].hitag))
|
||||
{
|
||||
msy[tempwallptr+2] = s;
|
||||
g_origins[tempwallptr+2].y = s;
|
||||
|
||||
T2 = sprite[s].sectnum;
|
||||
|
||||
sprite[s].xrepeat = 48;
|
||||
sprite[s].yrepeat = 128;
|
||||
|
||||
msx[tempwallptr+1] = sprite[s].x;
|
||||
msy[tempwallptr+1] = sprite[s].y;
|
||||
|
||||
sprite[s].x = sp->x;
|
||||
sprite[s].y = sp->y;
|
||||
sprite[s].z = sp->z;
|
||||
g_origins[tempwallptr+1] = *(vec2_t *)&sprite[s];
|
||||
*(vec3_t *) &sprite[s] = *(vec3_t *) sp;
|
||||
sprite[s].shade = sp->shade;
|
||||
|
||||
setsprite(s,(vec3_t *)&sprite[s]);
|
||||
|
@ -6887,10 +6882,11 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
T2 = tempwallptr;
|
||||
for (s=startwall; s<endwall; s++)
|
||||
{
|
||||
msx[tempwallptr] = wall[s].x-sp->x;
|
||||
msy[tempwallptr] = wall[s].y-sp->y;
|
||||
g_origins[tempwallptr].x = wall[s].x-sp->x;
|
||||
g_origins[tempwallptr].y = wall[s].y-sp->y;
|
||||
|
||||
tempwallptr++;
|
||||
if (EDUKE32_PREDICT_FALSE(tempwallptr > 2047))
|
||||
if (EDUKE32_PREDICT_FALSE(tempwallptr >= MAXANIMPOINTS))
|
||||
{
|
||||
Bsprintf(tempbuf, "Too many moving sectors at (%d,%d).\n",
|
||||
TrackerCast(wall[s].x),TrackerCast(wall[s].y));
|
||||
|
@ -11593,7 +11589,7 @@ int32_t app_main(int32_t argc, char const * const * argv)
|
|||
G_ScanGroups();
|
||||
|
||||
#ifdef STARTUP_SETUP_WINDOW
|
||||
if (i < 0 || (!g_noSetup && (ud.configversion != BYTEVERSION_JF || ud.config.ForceSetup)) || g_commandSetup)
|
||||
if (i < 0 || (!g_noSetup && (ud.configversion != BYTEVERSION_EDUKE32 || ud.config.ForceSetup)) || g_commandSetup)
|
||||
{
|
||||
if (quitevent || !startwin_run())
|
||||
{
|
||||
|
|
|
@ -4036,10 +4036,10 @@ DO_DEFSTATE:
|
|||
g_scriptPtr--;
|
||||
C_GetNextValue(LABEL_DEFINE);
|
||||
g_scriptPtr--;
|
||||
if (EDUKE32_PREDICT_FALSE(*g_scriptPtr > BYTEVERSION_JF))
|
||||
if (EDUKE32_PREDICT_FALSE(*g_scriptPtr > BYTEVERSION_EDUKE32))
|
||||
{
|
||||
g_numCompilerWarnings++;
|
||||
initprintf("%s:%d: warning: need build %d, found build %d\n",g_szScriptFileName,g_lineNumber,k,BYTEVERSION_JF);
|
||||
initprintf("%s:%d: warning: need build %d, found build %d\n",g_szScriptFileName,g_lineNumber,k,BYTEVERSION_EDUKE32);
|
||||
}
|
||||
continue;
|
||||
|
||||
|
|
|
@ -5727,8 +5727,7 @@ void G_SaveMapState(void)
|
|||
Bmemcpy(&save->SpriteDeletionQueue[0],&SpriteDeletionQueue[0],sizeof(SpriteDeletionQueue));
|
||||
Bmemcpy(&save->g_spriteDeleteQueuePos,&g_spriteDeleteQueuePos,sizeof(g_spriteDeleteQueuePos));
|
||||
Bmemcpy(&save->animwall[0],&animwall[0],sizeof(animwall));
|
||||
Bmemcpy(&save->msx[0],&msx[0],sizeof(msx));
|
||||
Bmemcpy(&save->msy[0],&msy[0],sizeof(msy));
|
||||
Bmemcpy(&save->origins[0],&g_origins[0],sizeof(g_origins));
|
||||
Bmemcpy(&save->g_mirrorWall[0],&g_mirrorWall[0],sizeof(g_mirrorWall));
|
||||
Bmemcpy(&save->g_mirrorSector[0],&g_mirrorSector[0],sizeof(g_mirrorSector));
|
||||
Bmemcpy(&save->g_mirrorCount,&g_mirrorCount,sizeof(g_mirrorCount));
|
||||
|
@ -5851,8 +5850,7 @@ void G_RestoreMapState(void)
|
|||
Bmemcpy(&SpriteDeletionQueue[0],&save->SpriteDeletionQueue[0],sizeof(SpriteDeletionQueue));
|
||||
Bmemcpy(&g_spriteDeleteQueuePos,&save->g_spriteDeleteQueuePos,sizeof(g_spriteDeleteQueuePos));
|
||||
Bmemcpy(&animwall[0],&save->animwall[0],sizeof(animwall));
|
||||
Bmemcpy(&msx[0],&save->msx[0],sizeof(msx));
|
||||
Bmemcpy(&msy[0],&save->msy[0],sizeof(msy));
|
||||
Bmemcpy(&g_origins[0],&save->origins[0],sizeof(g_origins));
|
||||
Bmemcpy(&g_mirrorWall[0],&save->g_mirrorWall[0],sizeof(g_mirrorWall));
|
||||
Bmemcpy(&g_mirrorSector[0],&save->g_mirrorSector[0],sizeof(g_mirrorSector));
|
||||
Bmemcpy(&g_mirrorCount,&save->g_mirrorCount,sizeof(g_mirrorCount));
|
||||
|
|
|
@ -111,7 +111,7 @@ G_EXTERN int32_t g_scriptDebug;
|
|||
G_EXTERN int32_t g_showShareware;
|
||||
G_EXTERN int8_t g_numPlayerSprites;
|
||||
G_EXTERN int32_t g_tripbombLaserMode;
|
||||
G_EXTERN int32_t msx[2048],msy[2048];
|
||||
G_EXTERN vec2_t g_origins[MAXANIMPOINTS];
|
||||
G_EXTERN int32_t neartaghitdist,lockclock,g_startArmorAmount;
|
||||
G_EXTERN int32_t playerswhenstarted;
|
||||
G_EXTERN int32_t screenpeek;
|
||||
|
|
|
@ -1134,8 +1134,7 @@ static const dataspec_t svgm_anmisc[] =
|
|||
{ 0, &animateptr[0], sizeof(animateptr[0]), MAXANIMATES },
|
||||
{ DS_SAVEFN|DS_LOADFN , (void *)&sv_postanimateptr, 0, 1 },
|
||||
{ 0, &g_curViewscreen, sizeof(g_curViewscreen), 1 },
|
||||
{ 0, &msx[0], sizeof(msx[0]), ARRAY_SIZE(msx) },
|
||||
{ 0, &msy[0], sizeof(msy[0]), ARRAY_SIZE(msy) },
|
||||
{ 0, &g_origins[0], sizeof(g_origins[0]), ARRAY_SIZE(g_origins) },
|
||||
{ 0, &g_spriteDeleteQueuePos, sizeof(g_spriteDeleteQueuePos), 1 },
|
||||
{ DS_NOCHK, &g_spriteDeleteQueueSize, sizeof(g_spriteDeleteQueueSize), 1 },
|
||||
{ DS_CNT(g_spriteDeleteQueueSize), &SpriteDeletionQueue[0], sizeof(int16_t), (intptr_t)&g_spriteDeleteQueueSize },
|
||||
|
|
|
@ -35,6 +35,7 @@ extern "C" {
|
|||
#define MAXCYCLERS 1024
|
||||
#define MAXANIMATES 1024
|
||||
#define MAXANIMWALLS 512
|
||||
#define MAXANIMPOINTS 2048
|
||||
|
||||
#define VIEWSCREEN_ACTIVE_DISTANCE 8192
|
||||
|
||||
|
@ -48,7 +49,7 @@ typedef struct {
|
|||
int32_t animategoal[MAXANIMATES], animatevel[MAXANIMATES], g_animateCount;
|
||||
intptr_t animateptr[MAXANIMATES];
|
||||
int32_t lockclock;
|
||||
int32_t msx[2048], msy[2048];
|
||||
vec2_t origins[MAXANIMPOINTS];
|
||||
int32_t randomseed, g_globalRandom;
|
||||
int32_t pskyidx;
|
||||
|
||||
|
|
Loading…
Reference in a new issue