mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- widen sector index in engineLoadBoard to 32 bit
This commit is contained in:
parent
762ebafc2a
commit
94b2b0af31
7 changed files with 10 additions and 16 deletions
|
@ -377,7 +377,7 @@ int32_t engineInit(void);
|
|||
void engineUnInit(void);
|
||||
void initspritelists(void);
|
||||
|
||||
void engineLoadBoard(const char *filename, int flags, vec3_t *dapos, int16_t *daang, int16_t *dacursectnum);
|
||||
void engineLoadBoard(const char *filename, int flags, vec3_t *dapos, int16_t *daang, int *dacursectnum);
|
||||
void loadMapBackup(const char* filename);
|
||||
void G_LoadMapHack(const char* filename, const unsigned char*);
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ static void ReadSpriteV5(FileReader& fr, spritetype& spr)
|
|||
}
|
||||
|
||||
|
||||
static void insertAllSprites(const char* filename, const vec3_t* pos, int16_t* cursectnum, int16_t numsprites)
|
||||
static void insertAllSprites(const char* filename, const vec3_t* pos, int* cursectnum, int16_t numsprites)
|
||||
{
|
||||
// This function is stupid because it exploits side effects of insertsprite and should be redone by only inserting the valid sprites.
|
||||
int i, realnumsprites = numsprites;
|
||||
|
@ -372,7 +372,7 @@ static void insertAllSprites(const char* filename, const vec3_t* pos, int16_t* c
|
|||
|
||||
void addBlockingPairs();
|
||||
|
||||
void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang, int16_t* cursectnum)
|
||||
void engineLoadBoard(const char* filename, int flags, vec3_t* pos, int16_t* ang, int* cursectnum)
|
||||
{
|
||||
inputState.ClearAllInput();
|
||||
memset(sector, 0, sizeof(*sector) * MAXSECTORS);
|
||||
|
@ -468,6 +468,7 @@ void loadMapBackup(const char* filename)
|
|||
{
|
||||
vec3_t pos;
|
||||
int16_t scratch;
|
||||
int scratch2;
|
||||
|
||||
if (isBlood())
|
||||
{
|
||||
|
@ -475,7 +476,7 @@ void loadMapBackup(const char* filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
engineLoadBoard(filename, 0, &pos, &scratch, &scratch);
|
||||
engineLoadBoard(filename, 0, &pos, &scratch, &scratch2);
|
||||
initspritelists();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -947,7 +947,7 @@ static int LoadTheMap(MapRecord *mi, struct player_struct *p, int gamemode)
|
|||
}
|
||||
|
||||
currentLevel = mi;
|
||||
int16_t sect; // engine still needs 16 bit here.
|
||||
int sect;
|
||||
engineLoadBoard(mi->fileName, isShareware(), &p->pos, &lbang, §);// &p->cursectnum);
|
||||
p->cursectnum = sect;
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ extern int initx;
|
|||
extern int inity;
|
||||
extern int initz;
|
||||
extern short inita;
|
||||
extern short initsect;
|
||||
extern int initsect;
|
||||
|
||||
extern short nCurChunkNum;
|
||||
extern DExhumedActor* nBodyGunSprite[50];
|
||||
|
|
|
@ -41,7 +41,8 @@ enum
|
|||
};
|
||||
|
||||
int initx, inity, initz;
|
||||
short inita, initsect;
|
||||
short inita;
|
||||
int initsect;
|
||||
|
||||
short nCurChunkNum = 0;
|
||||
|
||||
|
|
|
@ -69,12 +69,6 @@ static int osdcmd_doors(CCmdFuncPtr parm)
|
|||
return CCMD_OK;
|
||||
}
|
||||
|
||||
extern int initx;
|
||||
extern int inity;
|
||||
extern int initz;
|
||||
extern short inita;
|
||||
extern short initsect;
|
||||
|
||||
static int osdcmd_spawn(CCmdFuncPtr parm)
|
||||
{
|
||||
if (parm->numparms != 1) return CCMD_SHOWHELP;
|
||||
|
|
|
@ -322,9 +322,7 @@ void InitLevel(MapRecord *maprec)
|
|||
|
||||
int16_t ang;
|
||||
currentLevel = maprec;
|
||||
short sect16 = -1;
|
||||
engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].pos, &ang, §16);
|
||||
Player[0].cursectnum = sect16;
|
||||
engineLoadBoard(maprec->fileName, SW_SHAREWARE ? 1 : 0, &Player[0].pos, &ang, &Player[0].cursectnum);
|
||||
|
||||
SECRET_SetMapName(currentLevel->DisplayName(), currentLevel->name);
|
||||
STAT_NewLevel(currentLevel->fileName);
|
||||
|
|
Loading…
Reference in a new issue