mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
wip
This commit is contained in:
parent
e0858d501c
commit
708483ca78
11 changed files with 41 additions and 31 deletions
|
@ -7110,7 +7110,7 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
|
|||
|
||||
if (d4 >= u4) vlineasm4(d4-u4+1, (char *)(ylookup[u4]+p));
|
||||
|
||||
i = p+ylookup[d4+1];
|
||||
intptr_t i = p+ylookup[d4+1];
|
||||
if (y2ve[0] > d4) prevlineasm1(vince[0],palookupoffse[0],y2ve[0]-d4-1,vplce[0],bufplce[0],i+0);
|
||||
if (y2ve[1] > d4) prevlineasm1(vince[1],palookupoffse[1],y2ve[1]-d4-1,vplce[1],bufplce[1],i+1);
|
||||
if (y2ve[2] > d4) prevlineasm1(vince[2],palookupoffse[2],y2ve[2]-d4-1,vplce[2],bufplce[2],i+2);
|
||||
|
@ -7134,7 +7134,7 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
|
|||
|
||||
if (d4 >= u4) mvlineasm4(d4-u4+1, (char *)(ylookup[u4]+p));
|
||||
|
||||
i = p+ylookup[d4+1];
|
||||
intptr_t i = p+ylookup[d4+1];
|
||||
if (y2ve[0] > d4) mvlineasm1(vince[0],palookupoffse[0],y2ve[0]-d4-1,vplce[0],bufplce[0],i+0);
|
||||
if (y2ve[1] > d4) mvlineasm1(vince[1],palookupoffse[1],y2ve[1]-d4-1,vplce[1],bufplce[1],i+1);
|
||||
if (y2ve[2] > d4) mvlineasm1(vince[2],palookupoffse[2],y2ve[2]-d4-1,vplce[2],bufplce[2],i+2);
|
||||
|
|
|
@ -38,6 +38,8 @@ void kensetpalette(unsigned char *vgapal)
|
|||
//setbrightness(0, (char*)vgapal, 4 | 2);
|
||||
// TODO
|
||||
Bmemcpy(palette, vgapal, 768);
|
||||
for (auto &i : palette)
|
||||
i <<= 2;
|
||||
videoSetPalette(0, 0, /*4 | */2);
|
||||
#if 0
|
||||
char vesapal[1024];
|
||||
|
|
|
@ -3277,8 +3277,8 @@ int DoSpiritHead()
|
|||
}
|
||||
|
||||
// loc_135F9
|
||||
curx[i] = ebx << 8;
|
||||
cury[i] = esi << 8;
|
||||
curx[i] = ebx * 256;
|
||||
cury[i] = esi * 256;
|
||||
|
||||
//ecx += 2;
|
||||
// ecx++;
|
||||
|
|
|
@ -90,6 +90,9 @@ int LoadPaletteLookups()
|
|||
}
|
||||
|
||||
kread(hFile, buffer, 256*64);
|
||||
// TODO: dumb hack
|
||||
if (palookup[i])
|
||||
ALIGNED_FREE_AND_NULL(palookup[i]);
|
||||
paletteSetLookupTable(i, buffer);
|
||||
kclose(hFile);
|
||||
|
||||
|
|
|
@ -1860,12 +1860,13 @@ void ReadyCinemaText(uint16_t nVal)
|
|||
uint8_t AdvanceCinemaText()
|
||||
{
|
||||
int var_1C = nCDTrackLength;
|
||||
int tmp = nHeight + nCrawlY > 0;
|
||||
|
||||
if (nHeight + nCrawlY > 0 || nCDTrackLength && nCDTrackLength > 0)
|
||||
if (tmp || nCDTrackLength && nCDTrackLength > 0)
|
||||
{
|
||||
nextclock = totalclock + 14;
|
||||
|
||||
if ((nHeight + nCrawlY > 0) > 0)
|
||||
if (tmp > 0)
|
||||
{
|
||||
short y = nCrawlY;
|
||||
int edi = 0;
|
||||
|
|
|
@ -343,7 +343,7 @@ short FindWallSprites(short nSector)
|
|||
return nSprite;
|
||||
}
|
||||
|
||||
int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5, int nCount, int zList ...)
|
||||
int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5, int nCount, ...)
|
||||
{
|
||||
assert(ElevCount > 0);
|
||||
|
||||
|
@ -368,8 +368,9 @@ int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5,
|
|||
}
|
||||
|
||||
Elevator[ElevCount].nSprite = nWallSprite;
|
||||
|
||||
int *pZVals = (int*)&zList;
|
||||
|
||||
va_list zlist;
|
||||
va_start(zlist, nCount);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -381,14 +382,14 @@ int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5,
|
|||
|
||||
Elevator[ElevCount].nCountZOffsets++;
|
||||
|
||||
Elevator[ElevCount].zOffsets[nVal] = *pZVals;
|
||||
pZVals++;
|
||||
Elevator[ElevCount].zOffsets[nVal] = va_arg(zlist, int);
|
||||
}
|
||||
va_end(zlist);
|
||||
|
||||
return ElevCount;
|
||||
}
|
||||
|
||||
int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, int arg6, int nCount, int zList ...)
|
||||
int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, int arg6, int nCount, ...)
|
||||
{
|
||||
int edi = arg5;
|
||||
|
||||
|
@ -421,7 +422,8 @@ int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, i
|
|||
|
||||
Elevator[ElevCount].nSprite = nWallSprite;
|
||||
|
||||
int *pZVals = (int*)&zList;
|
||||
va_list zlist;
|
||||
va_start(zlist, nCount);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -433,9 +435,9 @@ int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, i
|
|||
|
||||
Elevator[ElevCount].nCountZOffsets++;
|
||||
|
||||
Elevator[ElevCount].zOffsets[nVal] = *pZVals;
|
||||
pZVals++;
|
||||
Elevator[ElevCount].zOffsets[nVal] = va_arg(zlist, int);
|
||||
}
|
||||
va_end(zlist);
|
||||
|
||||
return ElevCount;
|
||||
}
|
||||
|
@ -775,7 +777,7 @@ void InitWallFace()
|
|||
WallFaceCount = kMaxWallFace;
|
||||
}
|
||||
|
||||
int BuildWallFace(short nChannel, short nWall, short nCount, int nPics ...)
|
||||
int BuildWallFace(short nChannel, short nWall, short nCount, ...)
|
||||
{
|
||||
if (WallFaceCount <= 0) {
|
||||
bail2dos("Too many wall faces!\n");
|
||||
|
@ -791,16 +793,17 @@ int BuildWallFace(short nChannel, short nWall, short nCount, int nPics ...)
|
|||
nCount = 8;
|
||||
}
|
||||
|
||||
int *pPicNums = (int*)&nPics;
|
||||
va_list piclist;
|
||||
va_start(piclist, nCount);
|
||||
|
||||
while (WallFace[WallFaceCount].field_4 < nCount)
|
||||
{
|
||||
int i = WallFace[WallFaceCount].field_4;
|
||||
WallFace[WallFaceCount].field_4++;
|
||||
|
||||
WallFace[WallFaceCount].field_6[i] = *pPicNums;
|
||||
pPicNums++;
|
||||
WallFace[WallFaceCount].field_6[i] = va_arg(piclist, short);
|
||||
}
|
||||
va_end(piclist);
|
||||
|
||||
return WallFaceCount | 0x70000;
|
||||
}
|
||||
|
|
|
@ -59,10 +59,10 @@ void BuildDrip(int nSprite);
|
|||
|
||||
int BuildEnergyBlock(short nSector);
|
||||
|
||||
int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, int arg6, int nCount, int zList ...);
|
||||
int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5, int nCount, int zList ...);
|
||||
int BuildElevC(int arg1, int nChannel, int nSector, int nWallSprite, int arg5, int arg6, int nCount, ...);
|
||||
int BuildElevF(int nChannel, int nSector, int nWallSprite, int arg_4, int arg_5, int nCount, ...);
|
||||
|
||||
int BuildWallFace(short nChannel, short nWall, short nCount, int nPics ...);
|
||||
int BuildWallFace(short nChannel, short nWall, short nCount, ...);
|
||||
|
||||
int BuildSlide(int nChannel, int edx, int ebx, int ecx, int arg1, int arg2, int arg3);
|
||||
|
||||
|
|
|
@ -1358,7 +1358,7 @@ void runlist_ProcessSectorTag(int nSector, int lotag, int hitag)
|
|||
short nextSector = nextsectorneighborz(nSector, sector[nSector].ceilingz, -1, -1);
|
||||
assert(nextSector > -1);
|
||||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), var_18 * 100, var_18 * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), var_18 * 100, var_18 * 100, 2, (int)sector[nSector].floorz, (int)sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ void runlist_ProcessSectorTag(int nSector, int lotag, int hitag)
|
|||
|
||||
case 74:
|
||||
{
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), var_18 * 100, var_18 * 100, 2, sector[nSector].ceilingz, sector[nSector].floorz);
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), var_18 * 100, var_18 * 100, 2, (int)sector[nSector].ceilingz, (int)sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
|
||||
|
|
|
@ -834,10 +834,10 @@ void DrawStatus()
|
|||
|
||||
int x = (nViewLeft + nViewRight) / 2;
|
||||
|
||||
sprintf(coordBuf, "X %d", sprite[nSprite].x);
|
||||
sprintf(coordBuf, "X %d", (int)sprite[nSprite].x);
|
||||
printext(x, nViewTop + 1, coordBuf, kTile159, 255);
|
||||
|
||||
sprintf(coordBuf, "Y %d", sprite[nSprite].y);
|
||||
sprintf(coordBuf, "Y %d", (int)sprite[nSprite].y);
|
||||
printext(x, nViewTop + 10, coordBuf, kTile159, 255);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,13 +37,14 @@ void InitLink()
|
|||
LinkCount = kMaxLinks;
|
||||
}
|
||||
|
||||
int BuildLink(int nCount, int argList ...)
|
||||
int BuildLink(int nCount, ...)
|
||||
{
|
||||
if (LinkCount <= 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
int *pList = &argList;
|
||||
va_list list;
|
||||
va_start(list, nCount);
|
||||
|
||||
LinkCount--;
|
||||
|
||||
|
@ -57,12 +58,12 @@ int BuildLink(int nCount, int argList ...)
|
|||
}
|
||||
else
|
||||
{
|
||||
ebx = *pList;
|
||||
pList++;
|
||||
ebx = va_arg(list, int);
|
||||
}
|
||||
|
||||
LinkMap[LinkCount][i] = (int8_t)ebx;
|
||||
}
|
||||
va_end(list);
|
||||
|
||||
return LinkCount;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ void FuncSwPressWall(int, int, int);
|
|||
|
||||
int BuildSwPause(int nChannel, int nLink, int ebx);
|
||||
int BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx);
|
||||
int BuildLink(int nCount, int argList ...);
|
||||
int BuildLink(int nCount, ...);
|
||||
int BuildSwPressSector(int nChannel, int nLink, int nSector, int ecx);
|
||||
int BuildSwStepOn(int nChannel, int nLink, int nSector);
|
||||
int BuildSwReady(int nChannel, short nLink);
|
||||
|
|
Loading…
Reference in a new issue