mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Build tools/arttool: long --> int
git-svn-id: https://svn.eduke32.com/eduke32@5415 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
13c7b771a3
commit
b98953cc7c
1 changed files with 19 additions and 19 deletions
|
@ -161,11 +161,11 @@ void usage()
|
|||
class ARTFile {
|
||||
private:
|
||||
Bstring filename_;
|
||||
long localtilestart_;
|
||||
long localtileend_;
|
||||
int localtilestart_;
|
||||
int localtileend_;
|
||||
short * tilesizx_;
|
||||
short * tilesizy_;
|
||||
long * picanm_;
|
||||
int * picanm_;
|
||||
|
||||
// for removing or replacing tile data
|
||||
int markprelength_, markskiplength_, markpostlength_;
|
||||
|
@ -179,7 +179,7 @@ private:
|
|||
Bfwrite(d,1,2,ofs); // 2 == sizeof(d)
|
||||
}
|
||||
|
||||
void writeLong(BFILE *ofs, long l)
|
||||
void writeLong(BFILE *ofs, int l)
|
||||
{
|
||||
Bassert(ofs);
|
||||
char d[4] = { static_cast<char>(l&255), static_cast<char>((l>>8)&255), static_cast<char>((l>>16)&255), static_cast<char>((l>>24)&255) };
|
||||
|
@ -197,17 +197,17 @@ private:
|
|||
return (short)s;
|
||||
}
|
||||
|
||||
long readLong(BFILE *ifs)
|
||||
int readLong(BFILE *ifs)
|
||||
{
|
||||
Bassert(ifs);
|
||||
unsigned char d[4];
|
||||
unsigned long l;
|
||||
unsigned int l;
|
||||
Bfread(d,1,4,ifs); // 4 == sizeof(d)
|
||||
l = (unsigned long)d[0];
|
||||
l |= (unsigned long)d[1] << 8;
|
||||
l |= (unsigned long)d[2] << 16;
|
||||
l |= (unsigned long)d[3] << 24;
|
||||
return (long)l;
|
||||
l = (unsigned int)d[0];
|
||||
l |= (unsigned int)d[1] << 8;
|
||||
l |= (unsigned int)d[2] << 16;
|
||||
l |= (unsigned int)d[3] << 24;
|
||||
return (int)l;
|
||||
}
|
||||
|
||||
void dispose()
|
||||
|
@ -237,7 +237,7 @@ private:
|
|||
|
||||
tilesizx_ = new short[ntiles];
|
||||
tilesizy_ = new short[ntiles];
|
||||
picanm_ = new long[ntiles];
|
||||
picanm_ = new int[ntiles];
|
||||
|
||||
for (i = 0; i < ntiles; ++i) {
|
||||
tilesizx_[i] = readShort(infile);
|
||||
|
@ -279,11 +279,11 @@ public:
|
|||
localtileend_ = start + ntiles - 1;
|
||||
tilesizx_ = new short[ntiles];
|
||||
tilesizy_ = new short[ntiles];
|
||||
picanm_ = new long[ntiles];
|
||||
picanm_ = new int[ntiles];
|
||||
|
||||
memset(tilesizx_, 0, sizeof(short)*ntiles);
|
||||
memset(tilesizy_, 0, sizeof(short)*ntiles);
|
||||
memset(picanm_, 0, sizeof(long)*ntiles);
|
||||
memset(picanm_, 0, sizeof(int)*ntiles);
|
||||
|
||||
markprelength_ = 0;
|
||||
markskiplength_ = 0;
|
||||
|
@ -366,7 +366,7 @@ public:
|
|||
|
||||
tile -= localtilestart_;
|
||||
picanm_[tile] &= ~(255<<8);
|
||||
picanm_[tile] |= ((long)((unsigned char)x) << 8);
|
||||
picanm_[tile] |= ((int)((unsigned char)x) << 8);
|
||||
}
|
||||
|
||||
void setYOfs(int tile, int y)
|
||||
|
@ -377,7 +377,7 @@ public:
|
|||
|
||||
tile -= localtilestart_;
|
||||
picanm_[tile] &= ~(255<<16);
|
||||
picanm_[tile] |= ((long)((unsigned char)y) << 16);
|
||||
picanm_[tile] |= ((int)((unsigned char)y) << 16);
|
||||
}
|
||||
|
||||
void setAnimType(int tile, int type)
|
||||
|
@ -388,7 +388,7 @@ public:
|
|||
|
||||
tile -= localtilestart_;
|
||||
picanm_[tile] &= ~(3<<6);
|
||||
picanm_[tile] |= ((long)(type&3) << 6);
|
||||
picanm_[tile] |= ((int)(type&3) << 6);
|
||||
}
|
||||
|
||||
void setAnimFrames(int tile, int frames)
|
||||
|
@ -399,7 +399,7 @@ public:
|
|||
|
||||
tile -= localtilestart_;
|
||||
picanm_[tile] &= ~(63);
|
||||
picanm_[tile] |= ((long)(frames&63));
|
||||
picanm_[tile] |= ((int)(frames&63));
|
||||
}
|
||||
|
||||
void setAnimSpeed(int tile, int speed)
|
||||
|
@ -410,7 +410,7 @@ public:
|
|||
|
||||
tile -= localtilestart_;
|
||||
picanm_[tile] &= ~(15<<24);
|
||||
picanm_[tile] |= ((long)(speed&15) << 24);
|
||||
picanm_[tile] |= ((int)(speed&15) << 24);
|
||||
}
|
||||
|
||||
int write()
|
||||
|
|
Loading…
Reference in a new issue