mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +00:00
SW: Update calls to functions that have been renamed.
Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@7509 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
864ab5cac5
commit
b242259be1
21 changed files with 209 additions and 200 deletions
|
@ -243,7 +243,7 @@ unsigned char *LoadAnm(short anim_num)
|
||||||
return NULL;
|
return NULL;
|
||||||
length = kfilelength(handle);
|
length = kfilelength(handle);
|
||||||
|
|
||||||
allocache((intptr_t *) &anm_ptr[anim_num], length + sizeof(anim_t), &walock[ANIM_TILE(ANIMnum)]);
|
cacheAllocateBlock((intptr_t *) &anm_ptr[anim_num], length + sizeof(anim_t), &walock[ANIM_TILE(ANIMnum)]);
|
||||||
animbuf = (unsigned char *)((intptr_t)anm_ptr[anim_num] + sizeof(anim_t));
|
animbuf = (unsigned char *)((intptr_t)anm_ptr[anim_num] + sizeof(anim_t));
|
||||||
|
|
||||||
kread(handle, animbuf, length);
|
kread(handle, animbuf, length);
|
||||||
|
@ -299,14 +299,15 @@ playanm(short anim_num)
|
||||||
tilesiz[ANIM_TILE(ANIMnum)].x = 200;
|
tilesiz[ANIM_TILE(ANIMnum)].x = 200;
|
||||||
tilesiz[ANIM_TILE(ANIMnum)].y = 320;
|
tilesiz[ANIM_TILE(ANIMnum)].y = 320;
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
|
|
||||||
setbrightness(gs.Brightness,ANIMvesapal,2);
|
paletteSetColorTable(0, ANIMvesapal);
|
||||||
|
videoSetPalette(gs.Brightness,0,2);
|
||||||
if (ANIMnum == 1)
|
if (ANIMnum == 1)
|
||||||
{
|
{
|
||||||
// draw the first frame
|
// draw the first frame
|
||||||
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(1);
|
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(1);
|
||||||
invalidatetile(ANIM_TILE(ANIMnum), 0, 1<<4);
|
tileInvalidate(ANIM_TILE(ANIMnum), 0, 1<<4);
|
||||||
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,10 +354,10 @@ playanm(short anim_num)
|
||||||
}
|
}
|
||||||
|
|
||||||
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(i);
|
waloff[ANIM_TILE(ANIMnum)] = (intptr_t)ANIM_DrawFrame(i);
|
||||||
invalidatetile(ANIM_TILE(ANIMnum), 0, 1<<4);
|
tileInvalidate(ANIM_TILE(ANIMnum), 0, 1<<4);
|
||||||
|
|
||||||
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0 << 16, 0 << 16, 65536L, 512, ANIM_TILE(ANIMnum), 0, 0, 2 + 4 + 8 + 16 + 64, 0, 0, xdim - 1, ydim - 1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pause on final frame
|
// pause on final frame
|
||||||
|
@ -368,10 +369,12 @@ playanm(short anim_num)
|
||||||
|
|
||||||
ENDOFANIMLOOP:
|
ENDOFANIMLOOP:
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
palookup[0] = palook_bak;
|
palookup[0] = palook_bak;
|
||||||
setbrightness(gs.Brightness, (unsigned char *)palette_data, 2);
|
|
||||||
|
paletteSetColorTable(0, (unsigned char *)palette_data);
|
||||||
|
videoSetPalette(gs.Brightness, 0, 2);
|
||||||
|
|
||||||
KB_FlushKeyboardQueue();
|
KB_FlushKeyboardQueue();
|
||||||
KB_ClearKeysDown();
|
KB_ClearKeysDown();
|
||||||
|
|
|
@ -441,7 +441,7 @@ void BorderSetView(PLAYERp UNUSED(pp), int *Xdim, int *Ydim, int *ScreenSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
// global windowxy1, windowxy2 coords set here
|
// global windowxy1, windowxy2 coords set here
|
||||||
setview(x, y, x2, y2);
|
videoSetViewableArea(x, y, x2, y2);
|
||||||
SetCrosshair();
|
SetCrosshair();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -694,7 +694,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
// reset Z's
|
// reset Z's
|
||||||
for (i = 0; i < save.zcount; i++)
|
for (i = 0; i < save.zcount; i++)
|
||||||
|
@ -719,7 +719,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
drawrooms(tx, ty, tz, tang, thoriz, tsectnum);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
// reset Z's
|
// reset Z's
|
||||||
for (i = 0; i < save.zcount; i++)
|
for (i = 0; i < save.zcount; i++)
|
||||||
|
|
|
@ -630,7 +630,7 @@ void DoTheCache(void)
|
||||||
{
|
{
|
||||||
if ((TEST(gotpic[i>>3], 1<<(i&7))) && (!waloff[i]))
|
if ((TEST(gotpic[i>>3], 1<<(i&7))) && (!waloff[i]))
|
||||||
{
|
{
|
||||||
loadtile(i);
|
tileLoad(i);
|
||||||
cnt++;
|
cnt++;
|
||||||
if (!(cnt&7))
|
if (!(cnt&7))
|
||||||
{
|
{
|
||||||
|
|
|
@ -278,32 +278,32 @@ InitPalette(void)
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
tempbuf[i] = i;
|
tempbuf[i] = i;
|
||||||
// palette for underwater
|
// palette for underwater
|
||||||
makepalookup(PALETTE_DIVE, tempbuf, 0, 0, 60, TRUE);
|
paletteMakeLookupTable(PALETTE_DIVE, tempbuf, 0, 0, 60, TRUE);
|
||||||
|
|
||||||
#define FOG_AMT 60
|
#define FOG_AMT 60
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
tempbuf[i] = i;
|
tempbuf[i] = i;
|
||||||
makepalookup(PALETTE_FOG, tempbuf, FOG_AMT, FOG_AMT, FOG_AMT, TRUE);
|
paletteMakeLookupTable(PALETTE_FOG, tempbuf, FOG_AMT, FOG_AMT, FOG_AMT, TRUE);
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < 256; i++)
|
||||||
tempbuf[i] = i;
|
tempbuf[i] = i;
|
||||||
makepalookup(PALETTE_DIVE_LAVA, tempbuf, 44, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_DIVE_LAVA, tempbuf, 44, 0, 0, TRUE);
|
||||||
|
|
||||||
//
|
//
|
||||||
// 1 Range changes
|
// 1 Range changes
|
||||||
//
|
//
|
||||||
|
|
||||||
MapColors(PALETTE_BROWN_RIPPER, BrownRipper, TRUE);
|
MapColors(PALETTE_BROWN_RIPPER, BrownRipper, TRUE);
|
||||||
makepalookup(PALETTE_BROWN_RIPPER, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_BROWN_RIPPER, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_SKEL_GORE, SkelGore, TRUE);
|
MapColors(PALETTE_SKEL_GORE, SkelGore, TRUE);
|
||||||
makepalookup(PALETTE_SKEL_GORE, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_SKEL_GORE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_ELECTRO_GORE, ElectroGore, TRUE);
|
MapColors(PALETTE_ELECTRO_GORE, ElectroGore, TRUE);
|
||||||
makepalookup(PALETTE_ELECTRO_GORE, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_ELECTRO_GORE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_MENU_HIGHLIGHT, MenuHighlight, TRUE);
|
MapColors(PALETTE_MENU_HIGHLIGHT, MenuHighlight, TRUE);
|
||||||
makepalookup(PALETTE_MENU_HIGHLIGHT, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_MENU_HIGHLIGHT, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Multiple range changes
|
// Multiple range changes
|
||||||
|
@ -312,44 +312,44 @@ InitPalette(void)
|
||||||
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[0], TRUE);
|
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[0], TRUE);
|
||||||
for (i = 1; i < SIZ(NinjaBasic); i++)
|
for (i = 1; i < SIZ(NinjaBasic); i++)
|
||||||
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[i], FALSE);
|
MapColors(PALETTE_BASIC_NINJA, NinjaBasic[i], FALSE);
|
||||||
makepalookup(PALETTE_BASIC_NINJA, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_BASIC_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_RED_NINJA, NinjaRed[0], TRUE);
|
MapColors(PALETTE_RED_NINJA, NinjaRed[0], TRUE);
|
||||||
for (i = 1; i < SIZ(NinjaRed); i++)
|
for (i = 1; i < SIZ(NinjaRed); i++)
|
||||||
MapColors(PALETTE_RED_NINJA, NinjaRed[i], FALSE);
|
MapColors(PALETTE_RED_NINJA, NinjaRed[i], FALSE);
|
||||||
makepalookup(PALETTE_RED_NINJA, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_RED_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[0], TRUE);
|
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[0], TRUE);
|
||||||
for (i = 1; i < SIZ(NinjaGreen); i++)
|
for (i = 1; i < SIZ(NinjaGreen); i++)
|
||||||
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[i], FALSE);
|
MapColors(PALETTE_GREEN_NINJA, NinjaGreen[i], FALSE);
|
||||||
makepalookup(PALETTE_GREEN_NINJA, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_GREEN_NINJA, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[0], TRUE);
|
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[0], TRUE);
|
||||||
for (i = 1; i < SIZ(AllToGreen); i++)
|
for (i = 1; i < SIZ(AllToGreen); i++)
|
||||||
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[i], FALSE);
|
MapColors(PALETTE_GREEN_LIGHTING, AllToGreen[i], FALSE);
|
||||||
makepalookup(PALETTE_GREEN_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_GREEN_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_RED_LIGHTING, AllToRed[0], TRUE);
|
MapColors(PALETTE_RED_LIGHTING, AllToRed[0], TRUE);
|
||||||
for (i = 1; i < SIZ(AllToRed); i++)
|
for (i = 1; i < SIZ(AllToRed); i++)
|
||||||
MapColors(PALETTE_RED_LIGHTING, AllToRed[i], FALSE);
|
MapColors(PALETTE_RED_LIGHTING, AllToRed[i], FALSE);
|
||||||
makepalookup(PALETTE_RED_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_RED_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[0], TRUE);
|
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[0], TRUE);
|
||||||
for (i = 1; i < SIZ(AllToBlue); i++)
|
for (i = 1; i < SIZ(AllToBlue); i++)
|
||||||
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[i], FALSE);
|
MapColors(PALETTE_BLUE_LIGHTING, AllToBlue[i], FALSE);
|
||||||
makepalookup(PALETTE_BLUE_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_BLUE_LIGHTING, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
MapColors(PALETTE_ILLUMINATE, Illuminate[0], TRUE);
|
MapColors(PALETTE_ILLUMINATE, Illuminate[0], TRUE);
|
||||||
for (i = 1; i < SIZ(Illuminate); i++)
|
for (i = 1; i < SIZ(Illuminate); i++)
|
||||||
MapColors(PALETTE_ILLUMINATE, Illuminate[i], FALSE);
|
MapColors(PALETTE_ILLUMINATE, Illuminate[i], FALSE);
|
||||||
makepalookup(PALETTE_ILLUMINATE, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_ILLUMINATE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
// PLAYER COLORS - ALSO USED FOR OTHER THINGS
|
// PLAYER COLORS - ALSO USED FOR OTHER THINGS
|
||||||
for (play = 0; play < PLAYER_COLOR_MAPS; play++)
|
for (play = 0; play < PLAYER_COLOR_MAPS; play++)
|
||||||
{
|
{
|
||||||
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], TRUE);
|
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], TRUE);
|
||||||
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], FALSE);
|
MapColors(PALETTE_PLAYER0 + play, PlayerColorMap[play][0], FALSE);
|
||||||
makepalookup(PALETTE_PLAYER0 + play, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_PLAYER0 + play, tempbuf, 0, 0, 0, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -361,7 +361,7 @@ InitPalette(void)
|
||||||
// invert the brown palette
|
// invert the brown palette
|
||||||
for (i = 0; i < 32; i++)
|
for (i = 0; i < 32; i++)
|
||||||
tempbuf[LT_BROWN + i] = (LT_BROWN + 32) - i;
|
tempbuf[LT_BROWN + i] = (LT_BROWN + 32) - i;
|
||||||
makepalookup(PALETTE_SLUDGE, tempbuf, 0, 0, 0, TRUE);
|
paletteMakeLookupTable(PALETTE_SLUDGE, tempbuf, 0, 0, 0, TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,7 +431,8 @@ void SetPaletteToVESA(unsigned char *pal)
|
||||||
|
|
||||||
VBE_setPalette(0, 256, pal_buff);
|
VBE_setPalette(0, 256, pal_buff);
|
||||||
*/
|
*/
|
||||||
setbrightness(0,pal,4|2);
|
paletteSetColorTable(0, pal);
|
||||||
|
videoSetPalette(0,0,4|2);
|
||||||
// fprintf(stderr,"SetPaletteToVESA() called\n");
|
// fprintf(stderr,"SetPaletteToVESA() called\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ const char *G_DefFile(void)
|
||||||
void SW_InitMultiPsky(void)
|
void SW_InitMultiPsky(void)
|
||||||
{
|
{
|
||||||
// default
|
// default
|
||||||
psky_t * const defaultsky = E_DefinePsky(DEFAULTPSKY);
|
psky_t * const defaultsky = tileSetupSky(DEFAULTPSKY);
|
||||||
defaultsky->lognumtiles = 1;
|
defaultsky->lognumtiles = 1;
|
||||||
defaultsky->horizfrac = 8192;
|
defaultsky->horizfrac = 8192;
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,7 +555,7 @@ int32_t CONFIG_ReadSetup(void)
|
||||||
CONTROL_ClearAssignments();
|
CONTROL_ClearAssignments();
|
||||||
CONFIG_SetDefaults();
|
CONFIG_SetDefaults();
|
||||||
|
|
||||||
if (SafeFileExists(setupfilename))
|
if (buildvfs_exists(setupfilename))
|
||||||
scripthandle = SCRIPT_Load(setupfilename);
|
scripthandle = SCRIPT_Load(setupfilename);
|
||||||
|
|
||||||
if (scripthandle < 0) return -1;
|
if (scripthandle < 0) return -1;
|
||||||
|
|
|
@ -1545,7 +1545,8 @@ int COVERsetgamemode(int mode, int xdim, int ydim, int bpp)
|
||||||
ScreenMode = mode;
|
ScreenMode = mode;
|
||||||
ScreenBPP = bpp;
|
ScreenBPP = bpp;
|
||||||
|
|
||||||
return (int)setgamemode(mode,xdim,ydim,bpp);
|
// [JM] Should I be using upscalefactor here, or some SW equivalent to Duke's ud.detail? !CHECKME!
|
||||||
|
return (int)videoSetGameMode(mode,xdim,ydim,bpp,upscalefactor);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheatResChange(void)
|
void CheatResChange(void)
|
||||||
|
@ -1674,7 +1675,7 @@ void ScreenCaptureKeys(void)
|
||||||
{
|
{
|
||||||
KEY_PRESSED(KEYSC_F12) = 0;
|
KEY_PRESSED(KEYSC_F12) = 0;
|
||||||
PauseAction();
|
PauseAction();
|
||||||
screencapture("swcpxxxx.tga", KEY_PRESSED(KEYSC_LSHIFT) | KEY_PRESSED(KEYSC_RSHIFT));
|
videoCaptureScreenTGA("swcpxxxx.tga", KEY_PRESSED(KEYSC_LSHIFT) | KEY_PRESSED(KEYSC_RSHIFT));
|
||||||
ResumeAction();
|
ResumeAction();
|
||||||
PutStringInfo(Player + myconnectindex, "Screen Captured");
|
PutStringInfo(Player + myconnectindex, "Screen Captured");
|
||||||
}
|
}
|
||||||
|
@ -2262,13 +2263,13 @@ drawscreen(PLAYERp pp)
|
||||||
|
|
||||||
if (HelpInputMode)
|
if (HelpInputMode)
|
||||||
{
|
{
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
// note - could put Order Info Pages at the top like this also
|
// note - could put Order Info Pages at the top like this also
|
||||||
|
|
||||||
rotatesprite(0,0,65536L,0,HelpPagePic[HelpPage],0,0,
|
rotatesprite(0,0,65536L,0,HelpPagePic[HelpPage],0,0,
|
||||||
(ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK|ROTATE_SPRITE_IGNORE_START_MOST),
|
(ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK|ROTATE_SPRITE_IGNORE_START_MOST),
|
||||||
0, 0, xdim-1, ydim-1);
|
0, 0, xdim-1, ydim-1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2289,7 +2290,7 @@ drawscreen(PLAYERp pp)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (getrendermode() >= 3)
|
if (videoGetRenderMode() >= REND_POLYMOST)
|
||||||
RedrawScreen = TRUE;
|
RedrawScreen = TRUE;
|
||||||
|
|
||||||
DrawScreen = TRUE;
|
DrawScreen = TRUE;
|
||||||
|
@ -2300,7 +2301,7 @@ drawscreen(PLAYERp pp)
|
||||||
RedrawCompass = TRUE;
|
RedrawCompass = TRUE;
|
||||||
RedrawScreen = FALSE;
|
RedrawScreen = FALSE;
|
||||||
// get rid of all PERM sprites!
|
// get rid of all PERM sprites!
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
// get rid of all PANF_KILL_AFTER_SHOW sprites!
|
// get rid of all PANF_KILL_AFTER_SHOW sprites!
|
||||||
pFlushPerms(pp);
|
pFlushPerms(pp);
|
||||||
SetBorder(pp,gs.BorderNum);
|
SetBorder(pp,gs.BorderNum);
|
||||||
|
@ -2420,7 +2421,7 @@ drawscreen(PLAYERp pp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAF_DebugView)
|
if (FAF_DebugView)
|
||||||
clearview(255);
|
videoClearViewableArea(255L);
|
||||||
|
|
||||||
OverlapDraw = TRUE;
|
OverlapDraw = TRUE;
|
||||||
DrawOverlapRoom(tx, ty, tz, tang, thoriz, tsectnum);
|
DrawOverlapRoom(tx, ty, tz, tang, thoriz, tsectnum);
|
||||||
|
@ -2441,7 +2442,7 @@ drawscreen(PLAYERp pp)
|
||||||
|
|
||||||
analyzesprites(tx, ty, tz, FALSE);
|
analyzesprites(tx, ty, tz, FALSE);
|
||||||
post_analyzesprites();
|
post_analyzesprites();
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
UpdatePanel();
|
UpdatePanel();
|
||||||
|
|
||||||
|
@ -2499,8 +2500,8 @@ drawscreen(PLAYERp pp)
|
||||||
|
|
||||||
if (dimensionmode == 6)
|
if (dimensionmode == 6)
|
||||||
{
|
{
|
||||||
clearview(0L);
|
videoClearViewableArea(0L);
|
||||||
drawmapview(tx, ty, zoom, tang);
|
renderDrawMapView(tx, ty, zoom, tang);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw the line map on top of texture 2d map or just stand alone
|
// Draw the line map on top of texture 2d map or just stand alone
|
||||||
|
@ -2555,7 +2556,7 @@ drawscreen(PLAYERp pp)
|
||||||
else
|
else
|
||||||
SecretInfo(pp);
|
SecretInfo(pp);
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
#if SYNC_TEST
|
#if SYNC_TEST
|
||||||
SyncStatMessage();
|
SyncStatMessage();
|
||||||
|
@ -2689,7 +2690,7 @@ ScreenLoadSaveSetup(PLAYERp pp)
|
||||||
ScreenTileLock();
|
ScreenTileLock();
|
||||||
|
|
||||||
if (!waloff[SAVE_SCREEN_TILE])
|
if (!waloff[SAVE_SCREEN_TILE])
|
||||||
allocache((intptr_t*)&waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, &walock[SAVE_SCREEN_TILE]);
|
cacheAllocateBlock((intptr_t*)&waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, &walock[SAVE_SCREEN_TILE]);
|
||||||
|
|
||||||
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_XSIZE;
|
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_XSIZE;
|
||||||
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_YSIZE;
|
tilesiz[SAVE_SCREEN_TILE].x = SAVE_SCREEN_YSIZE;
|
||||||
|
@ -2704,13 +2705,13 @@ ScreenSaveSetup(PLAYERp pp)
|
||||||
|
|
||||||
ScreenLoadSaveSetup(Player + myconnectindex);
|
ScreenLoadSaveSetup(Player + myconnectindex);
|
||||||
|
|
||||||
setviewtotile(SAVE_SCREEN_TILE, SAVE_SCREEN_YSIZE, SAVE_SCREEN_XSIZE);
|
renderSetTarget(SAVE_SCREEN_TILE, SAVE_SCREEN_YSIZE, SAVE_SCREEN_XSIZE);
|
||||||
|
|
||||||
ScreenSavePic = TRUE;
|
ScreenSavePic = TRUE;
|
||||||
drawscreen(Player + myconnectindex);
|
drawscreen(Player + myconnectindex);
|
||||||
ScreenSavePic = FALSE;
|
ScreenSavePic = FALSE;
|
||||||
|
|
||||||
setviewback();
|
renderRestoreTarget();
|
||||||
|
|
||||||
return SAVE_SCREEN_TILE;
|
return SAVE_SCREEN_TILE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -676,13 +676,13 @@ TerminateGame(void)
|
||||||
//uninitkeys();
|
//uninitkeys();
|
||||||
KB_Shutdown();
|
KB_Shutdown();
|
||||||
|
|
||||||
uninitengine();
|
engineUnInit();
|
||||||
TermSetup();
|
TermSetup();
|
||||||
|
|
||||||
//Terminate3DSounds(); // Kill the sounds linked list
|
//Terminate3DSounds(); // Kill the sounds linked list
|
||||||
UnInitSound();
|
UnInitSound();
|
||||||
|
|
||||||
uninittimer();
|
timerUninit();
|
||||||
|
|
||||||
if (CleanExit)
|
if (CleanExit)
|
||||||
DosScreen();
|
DosScreen();
|
||||||
|
@ -695,7 +695,7 @@ LoadLevel(const char *filename)
|
||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
if (loadboard(filename, SW_SHAREWARE ? 1 : 0, (vec3_t *)&Player[0], &Player[0].pang, &Player[0].cursectnum) == -1)
|
if (engineLoadBoard(filename, SW_SHAREWARE ? 1 : 0, (vec3_t *)&Player[0], &Player[0].pang, &Player[0].cursectnum) == -1)
|
||||||
{
|
{
|
||||||
TerminateGame();
|
TerminateGame();
|
||||||
#ifdef RENDERTYPEWIN
|
#ifdef RENDERTYPEWIN
|
||||||
|
@ -717,7 +717,7 @@ LoadImages(const char *filename)
|
||||||
short ndx;
|
short ndx;
|
||||||
FILE *fin;
|
FILE *fin;
|
||||||
|
|
||||||
if (loadpics(filename, 32*1048576) == -1)
|
if (artLoadFiles(filename, 32*1048576) == -1)
|
||||||
{
|
{
|
||||||
TerminateGame();
|
TerminateGame();
|
||||||
#ifdef RENDERTYPEWIN
|
#ifdef RENDERTYPEWIN
|
||||||
|
@ -803,10 +803,10 @@ void Set_GameMode(void)
|
||||||
uninitmultiplayers();
|
uninitmultiplayers();
|
||||||
//uninitkeys();
|
//uninitkeys();
|
||||||
KB_Shutdown();
|
KB_Shutdown();
|
||||||
uninitengine();
|
engineUnInit();
|
||||||
TermSetup();
|
TermSetup();
|
||||||
UnInitSound();
|
UnInitSound();
|
||||||
uninittimer();
|
timerUninit();
|
||||||
DosScreen();
|
DosScreen();
|
||||||
uninitgroupfile();
|
uninitgroupfile();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -830,10 +830,10 @@ void MultiSharewareCheck(void)
|
||||||
uninitmultiplayers();
|
uninitmultiplayers();
|
||||||
//uninitkeys();
|
//uninitkeys();
|
||||||
KB_Shutdown();
|
KB_Shutdown();
|
||||||
uninitengine();
|
engineUnInit();
|
||||||
TermSetup();
|
TermSetup();
|
||||||
UnInitSound();
|
UnInitSound();
|
||||||
uninittimer();
|
timerUninit();
|
||||||
uninitgroupfile();
|
uninitgroupfile();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
@ -889,7 +889,8 @@ void AnimateCacheCursor(void)
|
||||||
|
|
||||||
void COVERsetbrightness(int bright, unsigned char *pal)
|
void COVERsetbrightness(int bright, unsigned char *pal)
|
||||||
{
|
{
|
||||||
setbrightness(bright, pal, 0);
|
paletteSetColorTable(0, pal);
|
||||||
|
videoSetPalette(bright, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -915,7 +916,7 @@ InitGame(int32_t argc, char const * const * argv)
|
||||||
DSPRINTF(ds,"InitGame...");
|
DSPRINTF(ds,"InitGame...");
|
||||||
MONO_PRINT(ds);
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
if (initengine())
|
if (engineInit())
|
||||||
SW_FatalEngineError();
|
SW_FatalEngineError();
|
||||||
|
|
||||||
//initgroupfile(G_GrpFile()); // JBF: moving this close to start of program to detect shareware
|
//initgroupfile(G_GrpFile()); // JBF: moving this close to start of program to detect shareware
|
||||||
|
@ -923,7 +924,7 @@ InitGame(int32_t argc, char const * const * argv)
|
||||||
|
|
||||||
InitAutoNet();
|
InitAutoNet();
|
||||||
|
|
||||||
inittimer(120);
|
timerInit(120);
|
||||||
|
|
||||||
CON_InitConsole(); // Init console command list
|
CON_InitConsole(); // Init console command list
|
||||||
|
|
||||||
|
@ -1036,7 +1037,7 @@ InitGame(int32_t argc, char const * const * argv)
|
||||||
free(m);
|
free(m);
|
||||||
g_defModules.clear();
|
g_defModules.clear();
|
||||||
|
|
||||||
if (E_PostInit())
|
if (enginePostInit())
|
||||||
SW_FatalEngineError();
|
SW_FatalEngineError();
|
||||||
|
|
||||||
DemoModeMenuInit = TRUE;
|
DemoModeMenuInit = TRUE;
|
||||||
|
@ -1739,7 +1740,9 @@ LogoLevel(void)
|
||||||
{
|
{
|
||||||
kread(fin, pal, PAL_SIZE);
|
kread(fin, pal, PAL_SIZE);
|
||||||
kclose(fin);
|
kclose(fin);
|
||||||
setbrightness(gs.Brightness, pal, 2);
|
|
||||||
|
paletteSetColorTable(1, pal);
|
||||||
|
videoSetPalette(gs.Brightness, 1, 2);
|
||||||
}
|
}
|
||||||
DSPRINTF(ds,"Just read in 3drealms.pal...");
|
DSPRINTF(ds,"Just read in 3drealms.pal...");
|
||||||
MONO_PRINT(ds);
|
MONO_PRINT(ds);
|
||||||
|
@ -1752,9 +1755,9 @@ LogoLevel(void)
|
||||||
DSPRINTF(ds,"About to display 3drealms pic...");
|
DSPRINTF(ds,"About to display 3drealms pic...");
|
||||||
MONO_PRINT(ds);
|
MONO_PRINT(ds);
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, THREED_REALMS_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, THREED_REALMS_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
//FadeIn(0, 3);
|
//FadeIn(0, 3);
|
||||||
|
|
||||||
ResetKeys();
|
ResetKeys();
|
||||||
|
@ -1780,10 +1783,11 @@ LogoLevel(void)
|
||||||
|
|
||||||
palookup[0] = palook_bak;
|
palookup[0] = palook_bak;
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
//SetPaletteToVESA(backup_pal);
|
//SetPaletteToVESA(backup_pal);
|
||||||
setbrightness(gs.Brightness, &palette_data[0][0], 2);
|
paletteSetColorTable(0, &palette_data[0][0]);
|
||||||
|
videoSetPalette(gs.Brightness, 0, 2);
|
||||||
|
|
||||||
// put up a blank screen while loading
|
// put up a blank screen while loading
|
||||||
|
|
||||||
|
@ -1809,13 +1813,13 @@ CreditsLevel(void)
|
||||||
// put up a blank screen while loading
|
// put up a blank screen while loading
|
||||||
|
|
||||||
// get rid of all PERM sprites!
|
// get rid of all PERM sprites!
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
save = gs.BorderNum;
|
save = gs.BorderNum;
|
||||||
SetBorder(Player + myconnectindex,0);
|
SetBorder(Player + myconnectindex,0);
|
||||||
ClearStartMost();
|
ClearStartMost();
|
||||||
gs.BorderNum = save;
|
gs.BorderNum = save;
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
// Lo Wang feel like singing!
|
// Lo Wang feel like singing!
|
||||||
handle = PlaySound(DIGI_JG95012,&zero,&zero,&zero,v3df_none);
|
handle = PlaySound(DIGI_JG95012,&zero,&zero,&zero,v3df_none);
|
||||||
|
@ -1854,7 +1858,7 @@ CreditsLevel(void)
|
||||||
|
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, curpic, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, curpic, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
if (timer > 8*120)
|
if (timer > 8*120)
|
||||||
{
|
{
|
||||||
|
@ -1876,8 +1880,8 @@ CreditsLevel(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// put up a blank screen while loading
|
// put up a blank screen while loading
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
ResetKeys();
|
ResetKeys();
|
||||||
StopSong();
|
StopSong();
|
||||||
}
|
}
|
||||||
|
@ -1892,7 +1896,7 @@ SybexScreen(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, 5261, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, 5261, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
ResetKeys();
|
ResetKeys();
|
||||||
while (!KeyPressed() && !quitevent) handleevents();
|
while (!KeyPressed() && !quitevent) handleevents();
|
||||||
|
@ -1987,8 +1991,8 @@ TitleLevel(void)
|
||||||
//GetPaletteFromVESA(pal);
|
//GetPaletteFromVESA(pal);
|
||||||
//memcpy(backup_pal, pal, PAL_SIZE);
|
//memcpy(backup_pal, pal, PAL_SIZE);
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
// if ((fin = kopen4load("title.pal", 0)) != -1)
|
// if ((fin = kopen4load("title.pal", 0)) != -1)
|
||||||
// {
|
// {
|
||||||
|
@ -2006,7 +2010,7 @@ TitleLevel(void)
|
||||||
ototalclock = 0;
|
ototalclock = 0;
|
||||||
|
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
//FadeIn(0, 3);
|
//FadeIn(0, 3);
|
||||||
|
|
||||||
ResetKeys();
|
ResetKeys();
|
||||||
|
@ -2031,7 +2035,7 @@ TitleLevel(void)
|
||||||
//drawscreen as fast as you can
|
//drawscreen as fast as you can
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
if (totalclock > 5*120 || KeyPressed())
|
if (totalclock > 5*120 || KeyPressed())
|
||||||
{
|
{
|
||||||
|
@ -2055,22 +2059,22 @@ TitleLevel(void)
|
||||||
|
|
||||||
void DrawMenuLevelScreen(void)
|
void DrawMenuLevelScreen(void)
|
||||||
{
|
{
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawStatScreen(void)
|
void DrawStatScreen(void)
|
||||||
{
|
{
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, STAT_SCREEN_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, STAT_SCREEN_PIC, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawLoadLevelScreen(void)
|
void DrawLoadLevelScreen(void)
|
||||||
{
|
{
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, TITLE_PIC, 20, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2116,7 +2120,7 @@ MenuLevel(void)
|
||||||
MNU_DrawString(TEXT_TEST_COL(w), 180, ds, 1, 16);
|
MNU_DrawString(TEXT_TEST_COL(w), 180, ds, 1, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
waitforeverybody();
|
waitforeverybody();
|
||||||
FirstTimeIntoGame = TRUE;
|
FirstTimeIntoGame = TRUE;
|
||||||
|
@ -2146,8 +2150,8 @@ MenuLevel(void)
|
||||||
DemoMode = FALSE;
|
DemoMode = FALSE;
|
||||||
DemoPlaying = FALSE;
|
DemoPlaying = FALSE;
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
//FadeOut(0, 0);
|
//FadeOut(0, 0);
|
||||||
ready2send = 0;
|
ready2send = 0;
|
||||||
|
@ -2169,7 +2173,7 @@ MenuLevel(void)
|
||||||
MNU_DrawString(TEXT_TEST_COL(w), 180, ds, 1, 16);
|
MNU_DrawString(TEXT_TEST_COL(w), 180, ds, 1, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
//FadeIn(0, 3);
|
//FadeIn(0, 3);
|
||||||
|
|
||||||
waitforeverybody();
|
waitforeverybody();
|
||||||
|
@ -2259,7 +2263,7 @@ MenuLevel(void)
|
||||||
if (UsingMenus)
|
if (UsingMenus)
|
||||||
MNU_DrawMenu();
|
MNU_DrawMenu();
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderAdjust = TRUE;
|
BorderAdjust = TRUE;
|
||||||
|
@ -2269,8 +2273,8 @@ MenuLevel(void)
|
||||||
//ExitMenus();
|
//ExitMenus();
|
||||||
UsingMenus = FALSE;
|
UsingMenus = FALSE;
|
||||||
InMenuLevel = FALSE;
|
InMenuLevel = FALSE;
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2328,7 +2332,7 @@ LoadingLevelScreen(char *level_name)
|
||||||
MNU_MeasureString(ds, &w, &h);
|
MNU_MeasureString(ds, &w, &h);
|
||||||
MNU_DrawString(TEXT_TEST_COL(w), 180, ds,1,16);
|
MNU_DrawString(TEXT_TEST_COL(w), 180, ds,1,16);
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2502,8 +2506,8 @@ BonusScreen(PLAYERp pp)
|
||||||
|
|
||||||
if (Level < 0) Level = 0;
|
if (Level < 0) Level = 0;
|
||||||
|
|
||||||
clearview(0);
|
videoClearViewableArea(0L);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
KB_ClearKeysDown();
|
KB_ClearKeysDown();
|
||||||
|
|
||||||
|
@ -2518,10 +2522,10 @@ BonusScreen(PLAYERp pp)
|
||||||
// special case code because I don't care any more!
|
// special case code because I don't care any more!
|
||||||
if (FinishAnim)
|
if (FinishAnim)
|
||||||
{
|
{
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
rotatesprite(0, 0, RS_SCALE, 0, 5120, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(0, 0, RS_SCALE, 0, 5120, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
rotatesprite(158<<16, 86<<16, RS_SCALE, 0, State->Pic, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
rotatesprite(158<<16, 86<<16, RS_SCALE, 0, State->Pic, 0, 0, TITLE_ROT_FLAGS, 0, 0, xdim - 1, ydim - 1);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
FadeIn(0,0);
|
FadeIn(0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2612,7 +2616,7 @@ BonusScreen(PLAYERp pp)
|
||||||
MNU_MeasureString(ds, &w, &h);
|
MNU_MeasureString(ds, &w, &h);
|
||||||
MNU_DrawString(TEXT_TEST_COL(w), 185, ds,1,19);
|
MNU_DrawString(TEXT_TEST_COL(w), 185, ds,1,19);
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
ScreenCaptureKeys();
|
ScreenCaptureKeys();
|
||||||
|
|
||||||
if (State == State->NextState)
|
if (State == State->NextState)
|
||||||
|
@ -2712,7 +2716,7 @@ StatScreen(PLAYERp mpp)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
DrawStatScreen();
|
DrawStatScreen();
|
||||||
|
|
||||||
memset(death_total,0,sizeof(death_total));
|
memset(death_total,0,sizeof(death_total));
|
||||||
|
@ -2818,7 +2822,7 @@ StatScreen(PLAYERp mpp)
|
||||||
y += STAT_OFF_Y;
|
y += STAT_OFF_Y;
|
||||||
}
|
}
|
||||||
|
|
||||||
nextpage();
|
videoNextPage();
|
||||||
|
|
||||||
if (KeyPressed())
|
if (KeyPressed())
|
||||||
{
|
{
|
||||||
|
@ -3550,7 +3554,7 @@ int32_t app_main(int32_t argc, char const * const * argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
wm_setapptitle("Shadow Warrior");
|
wm_setapptitle("Shadow Warrior");
|
||||||
if (preinitengine())
|
if (enginePreInit())
|
||||||
{
|
{
|
||||||
wm_msgbox("Build Engine Initialisation Error",
|
wm_msgbox("Build Engine Initialisation Error",
|
||||||
"There was a problem initialising the Build engine: %s", engineerrstr);
|
"There was a problem initialising the Build engine: %s", engineerrstr);
|
||||||
|
@ -3564,7 +3568,7 @@ int32_t app_main(int32_t argc, char const * const * argv)
|
||||||
{
|
{
|
||||||
if (quitevent || !startwin_run())
|
if (quitevent || !startwin_run())
|
||||||
{
|
{
|
||||||
uninitengine();
|
engineUnInit();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5570,7 +5574,7 @@ void drawoverheadmap(int cposx, int cposy, int czoom, short cang)
|
||||||
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
||||||
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
||||||
|
|
||||||
drawline256(x1 + (xdim << 11), y1 + (ydim << 11), x2 + (xdim << 11), y2 + (ydim << 11), col);
|
renderDrawLine(x1 + (xdim << 11), y1 + (ydim << 11), x2 + (xdim << 11), y2 + (ydim << 11), col);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5637,11 +5641,11 @@ SHOWSPRITE:
|
||||||
x3 = mulscale16(x2, yxaspect);
|
x3 = mulscale16(x2, yxaspect);
|
||||||
y3 = mulscale16(y2, yxaspect);
|
y3 = mulscale16(y2, yxaspect);
|
||||||
|
|
||||||
drawline256(x1 - x2 + (xdim << 11), y1 - y3 + (ydim << 11),
|
renderDrawLine(x1 - x2 + (xdim << 11), y1 - y3 + (ydim << 11),
|
||||||
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
||||||
drawline256(x1 - y2 + (xdim << 11), y1 + x3 + (ydim << 11),
|
renderDrawLine(x1 - y2 + (xdim << 11), y1 + x3 + (ydim << 11),
|
||||||
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
||||||
drawline256(x1 + y2 + (xdim << 11), y1 - x3 + (ydim << 11),
|
renderDrawLine(x1 + y2 + (xdim << 11), y1 - x3 + (ydim << 11),
|
||||||
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
x1 + x2 + (xdim << 11), y1 + y3 + (ydim << 11), col);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -5699,7 +5703,7 @@ SHOWSPRITE:
|
||||||
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
||||||
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
||||||
|
|
||||||
drawline256(x1 + (xdim << 11), y1 + (ydim << 11),
|
renderDrawLine(x1 + (xdim << 11), y1 + (ydim << 11),
|
||||||
x2 + (xdim << 11), y2 + (ydim << 11), col);
|
x2 + (xdim << 11), y2 + (ydim << 11), col);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -5757,16 +5761,16 @@ SHOWSPRITE:
|
||||||
x4 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
x4 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
||||||
y4 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
y4 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
||||||
|
|
||||||
drawline256(x1 + (xdim << 11), y1 + (ydim << 11),
|
renderDrawLine(x1 + (xdim << 11), y1 + (ydim << 11),
|
||||||
x2 + (xdim << 11), y2 + (ydim << 11), col);
|
x2 + (xdim << 11), y2 + (ydim << 11), col);
|
||||||
|
|
||||||
drawline256(x2 + (xdim << 11), y2 + (ydim << 11),
|
renderDrawLine(x2 + (xdim << 11), y2 + (ydim << 11),
|
||||||
x3 + (xdim << 11), y3 + (ydim << 11), col);
|
x3 + (xdim << 11), y3 + (ydim << 11), col);
|
||||||
|
|
||||||
drawline256(x3 + (xdim << 11), y3 + (ydim << 11),
|
renderDrawLine(x3 + (xdim << 11), y3 + (ydim << 11),
|
||||||
x4 + (xdim << 11), y4 + (ydim << 11), col);
|
x4 + (xdim << 11), y4 + (ydim << 11), col);
|
||||||
|
|
||||||
drawline256(x4 + (xdim << 11), y4 + (ydim << 11),
|
renderDrawLine(x4 + (xdim << 11), y4 + (ydim << 11),
|
||||||
x1 + (xdim << 11), y1 + (ydim << 11), col);
|
x1 + (xdim << 11), y1 + (ydim << 11), col);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5804,7 +5808,7 @@ SHOWSPRITE:
|
||||||
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
x2 = mulscale16(ox, xvect) - mulscale16(oy, yvect);
|
||||||
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
y2 = mulscale16(oy, xvect2) + mulscale16(ox, yvect2);
|
||||||
|
|
||||||
drawline256(x1 + (xdim << 11), y1 + (ydim << 11), x2 + (xdim << 11), y2 + (ydim << 11), 24);
|
renderDrawLine(x1 + (xdim << 11), y1 + (ydim << 11), x2 + (xdim << 11), y2 + (ydim << 11), 24);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -627,10 +627,10 @@ DoPlayerNightVisionPalette(PLAYERp pp)
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
memcpy(palookup[PALETTE_DEFAULT], DefaultPalette, 256 * 32);
|
memcpy(palookup[PALETTE_DEFAULT], DefaultPalette, 256 * 32);
|
||||||
pp->FadeAmt = 0;
|
pp->FadeAmt = 0;
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness, &palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness, &palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
}
|
}
|
||||||
pp->NightVision = FALSE;
|
pp->NightVision = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,14 +752,14 @@ ExtInit(void)
|
||||||
Bmemcpy((void *)buildkeys,(void *)default_buildkeys,NUMBUILDKEYS); //Trick to make build use setup.dat keys
|
Bmemcpy((void *)buildkeys,(void *)default_buildkeys,NUMBUILDKEYS); //Trick to make build use setup.dat keys
|
||||||
if (option[4] > 0)
|
if (option[4] > 0)
|
||||||
option[4] = 0;
|
option[4] = 0;
|
||||||
if (initengine())
|
if (engineInit())
|
||||||
{
|
{
|
||||||
wm_msgbox("Build Engine Initialisation Error",
|
wm_msgbox("Build Engine Initialisation Error",
|
||||||
"There was a problem initialising the Build engine: %s", engineerrstr);
|
"There was a problem initialising the Build engine: %s", engineerrstr);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
initinput();
|
initinput();
|
||||||
initmouse();
|
mouseInit();
|
||||||
|
|
||||||
InitPalette();
|
InitPalette();
|
||||||
SW_InitMultiPsky();
|
SW_InitMultiPsky();
|
||||||
|
@ -2769,13 +2769,13 @@ DrawClipBox(short spritenum)
|
||||||
|
|
||||||
#define BOX_COLOR 3
|
#define BOX_COLOR 3
|
||||||
// upper
|
// upper
|
||||||
drawline16(x - radius, y - radius, x + radius, y - radius, BOX_COLOR);
|
editorDraw2dLine(x - radius, y - radius, x + radius, y - radius, BOX_COLOR);
|
||||||
// lower
|
// lower
|
||||||
drawline16(x - radius, y + radius, x + radius, y + radius, BOX_COLOR);
|
editorDraw2dLine(x - radius, y + radius, x + radius, y + radius, BOX_COLOR);
|
||||||
// left
|
// left
|
||||||
drawline16(x - radius, y - radius, x - radius, y + radius, BOX_COLOR);
|
editorDraw2dLine(x - radius, y - radius, x - radius, y + radius, BOX_COLOR);
|
||||||
// right
|
// right
|
||||||
drawline16(x + radius, y - radius, x + radius, y + radius, BOX_COLOR);
|
editorDraw2dLine(x + radius, y - radius, x + radius, y + radius, BOX_COLOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -3017,7 +3017,7 @@ ExtEditSpriteData(short spritenum) // F8
|
||||||
printext16(8, ydim16+32 + 8, 11, -1, "(2) Multi-Player Item Toggle", 0);
|
printext16(8, ydim16+32 + 8, 11, -1, "(2) Multi-Player Item Toggle", 0);
|
||||||
printext16(8, ydim16+32 + 16, 11, -1, "(3) Find Sprite", 0);
|
printext16(8, ydim16+32 + 16, 11, -1, "(3) Find Sprite", 0);
|
||||||
printext16(8, ydim16+32 + 24, 11, -1, "(4) Dbug Toggle (* Programming use only *) ", 0);
|
printext16(8, ydim16+32 + 24, 11, -1, "(4) Dbug Toggle (* Programming use only *) ", 0);
|
||||||
showframe(1);
|
videoShowFrame(1);
|
||||||
|
|
||||||
while (KEY_PRESSED(KEYSC_F8)) handleevents();
|
while (KEY_PRESSED(KEYSC_F8)) handleevents();
|
||||||
|
|
||||||
|
@ -3074,7 +3074,7 @@ DISPLAY:
|
||||||
printext16(8 + 240, ydim16+32 + 32, 11, -1, "TRUE", 0);
|
printext16(8 + 240, ydim16+32 + 32, 11, -1, "TRUE", 0);
|
||||||
else
|
else
|
||||||
printext16(8 + 240, ydim16+32 + 32, 11, -1, "FALSE", 0);
|
printext16(8 + 240, ydim16+32 + 32, 11, -1, "FALSE", 0);
|
||||||
showframe(1);
|
videoShowFrame(1);
|
||||||
|
|
||||||
// Disallow invalid settings
|
// Disallow invalid settings
|
||||||
if (!bFindPicNum && !bFindHiTag && !bFindLowTag)
|
if (!bFindPicNum && !bFindHiTag && !bFindLowTag)
|
||||||
|
@ -3619,7 +3619,7 @@ ShadeMenu(void) // F8
|
||||||
|
|
||||||
void faketimerhandler(void)
|
void faketimerhandler(void)
|
||||||
{
|
{
|
||||||
sampletimer();
|
timerUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Just thought you might want my getnumber16 code
|
//Just thought you might want my getnumber16 code
|
||||||
|
|
|
@ -488,21 +488,21 @@ void drawroomstotile(int daposx, int daposy, int daposz,
|
||||||
short daang, int dahoriz, short dacursectnum, short tilenume)
|
short daang, int dahoriz, short dacursectnum, short tilenume)
|
||||||
{
|
{
|
||||||
if (waloff[tilenume] == 0)
|
if (waloff[tilenume] == 0)
|
||||||
loadtile(tilenume);
|
tileLoad(tilenume);
|
||||||
|
|
||||||
PRODUCTION_ASSERT(waloff[tilenume]);
|
PRODUCTION_ASSERT(waloff[tilenume]);
|
||||||
|
|
||||||
setviewtotile(tilenume, tilesiz[tilenume].x, tilesiz[tilenume].y);
|
renderSetTarget(tilenume, tilesiz[tilenume].x, tilesiz[tilenume].y);
|
||||||
|
|
||||||
drawrooms(daposx, daposy, daposz, daang, dahoriz, dacursectnum);
|
drawrooms(daposx, daposy, daposz, daang, dahoriz, dacursectnum);
|
||||||
analyzesprites(daposx, daposy, daposz, FALSE);
|
analyzesprites(daposx, daposy, daposz, FALSE);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
setviewback();
|
renderRestoreTarget();
|
||||||
|
|
||||||
squarerotatetile(tilenume);
|
squarerotatetile(tilenume);
|
||||||
|
|
||||||
invalidatetile(tilenume, -1, -1);
|
tileInvalidate(tilenume, -1, -1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void
|
void
|
||||||
|
@ -542,7 +542,7 @@ drawroomstotile(int daposx, int daposy, int daposz,
|
||||||
// DRAWS TO TILE HERE
|
// DRAWS TO TILE HERE
|
||||||
drawrooms(daposx, daposy, daposz, daang, dahoriz, dacursectnum + MAXSECTORS);
|
drawrooms(daposx, daposy, daposz, daang, dahoriz, dacursectnum + MAXSECTORS);
|
||||||
analyzesprites(daposx, daposy, daposz, FALSE);
|
analyzesprites(daposx, daposy, daposz, FALSE);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
setviewback();
|
setviewback();
|
||||||
|
|
||||||
|
@ -647,7 +647,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
int tposx, tposy, thoriz;
|
int tposx, tposy, thoriz;
|
||||||
int tcx, tcy, tcz; // Camera
|
int tcx, tcy, tcz; // Camera
|
||||||
int tiltlock, *longptr;
|
int tiltlock, *longptr;
|
||||||
short tang;
|
fix16_t tang;
|
||||||
char ch, *ptr, *ptr2, *ptr3, *ptr4;
|
char ch, *ptr, *ptr2, *ptr3, *ptr4;
|
||||||
char tvisibility, palok;
|
char tvisibility, palok;
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
tilesiz[mirror[cnt].campic].x = tilesiz[mirror[cnt].campic].y = 0;
|
tilesiz[mirror[cnt].campic].x = tilesiz[mirror[cnt].campic].y = 0;
|
||||||
drawrooms(dx, dy, dz, tpang, tphoriz, sp->sectnum + MAXSECTORS);
|
drawrooms(dx, dy, dz, tpang, tphoriz, sp->sectnum + MAXSECTORS);
|
||||||
analyzesprites(dx, dy, dz, FALSE);
|
analyzesprites(dx, dy, dz, FALSE);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -889,15 +889,15 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
|
||||||
// Must call preparemirror before drawrooms and
|
// Must call preparemirror before drawrooms and
|
||||||
// completemirror after drawrooms
|
// completemirror after drawrooms
|
||||||
|
|
||||||
preparemirror(tx, ty, /*tz,*/ tpang, /*tphoriz,*/
|
renderPrepareMirror(tx, ty, /*tz,*/ fix16_from_int(tpang), /*tphoriz,*/
|
||||||
mirror[cnt].mirrorwall, /*mirror[cnt].mirrorsector,*/ &tposx, &tposy, &tang);
|
mirror[cnt].mirrorwall, /*mirror[cnt].mirrorsector,*/ &tposx, &tposy, &tang);
|
||||||
|
|
||||||
drawrooms(tposx, tposy, tz, tang, tphoriz, mirror[cnt].mirrorsector + MAXSECTORS);
|
drawrooms(tposx, tposy, tz, fix16_to_int(tang), tphoriz, mirror[cnt].mirrorsector + MAXSECTORS);
|
||||||
|
|
||||||
analyzesprites(tposx, tposy, tz, TRUE);
|
analyzesprites(tposx, tposy, tz, TRUE);
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
completemirror(); // Reverse screen x-wise in this
|
renderCompleteMirror(); // Reverse screen x-wise in this
|
||||||
// function
|
// function
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ JAnalyzeSprites(uspritetype * tspr)
|
||||||
// Take care of autosizing
|
// Take care of autosizing
|
||||||
DoAutoSize(tspr);
|
DoAutoSize(tspr);
|
||||||
|
|
||||||
if (getrendermode() == 3 && md_tilehasmodel(tspr->picnum, 0) >= 0 && usemodels) return;
|
if (videoGetRenderMode() >= REND_POLYMOST && md_tilehasmodel(tspr->picnum, 0) >= 0 && usemodels) return;
|
||||||
|
|
||||||
// Check for voxels
|
// Check for voxels
|
||||||
//if (bVoxelsOn)
|
//if (bVoxelsOn)
|
||||||
|
|
|
@ -170,8 +170,8 @@ static SWBOOL ApplyModeSettings(void)
|
||||||
|
|
||||||
if (lastx == newx && lasty == newy && lastbpp == newbpp && lastfs == newfs) return FALSE;
|
if (lastx == newx && lasty == newy && lastbpp == newbpp && lastfs == newfs) return FALSE;
|
||||||
|
|
||||||
if (setgamemode(newfs, newx, newy, newbpp))
|
if (videoSetGameMode(newfs, newx, newy, newbpp, upscalefactor))
|
||||||
setgamemode(lastfs, lastx, lasty, lastbpp);
|
videoSetGameMode(lastfs, lastx, lasty, lastbpp, upscalefactor);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
extern int32_t ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP; // Because I'm too lazy to include config.h
|
extern int32_t ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP; // Because I'm too lazy to include config.h
|
||||||
|
@ -741,8 +741,8 @@ MNU_ParentalCustom(void)
|
||||||
// clear keyboard buffer
|
// clear keyboard buffer
|
||||||
while (KB_KeyWaiting())
|
while (KB_KeyWaiting())
|
||||||
{
|
{
|
||||||
if (KB_Getch() == 0)
|
if (KB_GetCh() == 0)
|
||||||
KB_Getch();
|
KB_GetCh();
|
||||||
}
|
}
|
||||||
|
|
||||||
// toggle edit mode
|
// toggle edit mode
|
||||||
|
@ -925,14 +925,14 @@ SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
|
||||||
j = OPT_LINE(0)+(i-topitem)*8;
|
j = OPT_LINE(0)+(i-topitem)*8;
|
||||||
MNU_DrawSmallString(OPT_XS, j, ds, (i==currentkey) ? 0 : 12, 16);
|
MNU_DrawSmallString(OPT_XS, j, ds, (i==currentkey) ? 0 : 12, 16);
|
||||||
|
|
||||||
p = getkeyname(KeyboardKeys[i][0]);
|
p = keyGetName(KeyboardKeys[i][0]);
|
||||||
if (!p || KeyboardKeys[i][0]==0xff) p = " -";
|
if (!p || KeyboardKeys[i][0]==0xff) p = " -";
|
||||||
MNU_DrawSmallString(OPT_XSIDE, j, (char *)p, (i==currentkey) ? -5 : 12,
|
MNU_DrawSmallString(OPT_XSIDE, j, (char *)p, (i==currentkey) ? -5 : 12,
|
||||||
(i==currentkey && currentcol==0) ? 14 : 16);
|
(i==currentkey && currentcol==0) ? 14 : 16);
|
||||||
|
|
||||||
if (i == gamefunc_Show_Console) continue;
|
if (i == gamefunc_Show_Console) continue;
|
||||||
|
|
||||||
p = getkeyname(KeyboardKeys[i][1]);
|
p = keyGetName(KeyboardKeys[i][1]);
|
||||||
if (!p || KeyboardKeys[i][1]==0xff) p = " -";
|
if (!p || KeyboardKeys[i][1]==0xff) p = " -";
|
||||||
MNU_DrawSmallString(OPT_XSIDE + 4*14, j, (char *)p, (i==currentkey) ? -5 : 12,
|
MNU_DrawSmallString(OPT_XSIDE + 4*14, j, (char *)p, (i==currentkey) ? -5 : 12,
|
||||||
(i==currentkey && currentcol==1) ? 14 : 16);
|
(i==currentkey && currentcol==1) ? 14 : 16);
|
||||||
|
@ -1274,13 +1274,13 @@ static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
|
||||||
joybuttonssetupgroup.items = joybuttons_i[0];
|
joybuttonssetupgroup.items = joybuttons_i[0];
|
||||||
item = &joybuttons_i[0][0];
|
item = &joybuttons_i[0][0];
|
||||||
|
|
||||||
for (button = 0; button < joynumbuttons * 2 + (joynumhats > 0) * 4; )
|
for (button = 0; button < joystick.numButtons * 2 + (joystick.numHats > 0) * 4; )
|
||||||
{
|
{
|
||||||
if (button < joynumbuttons * 2)
|
if (button < joystick.numButtons * 2)
|
||||||
{
|
{
|
||||||
int dbutton = button / 2;
|
int dbutton = button / 2;
|
||||||
|
|
||||||
strcpy(JoystickButtonNames[dbutton], getjoyname(1, dbutton));
|
strcpy(JoystickButtonNames[dbutton], joyGetName(1, dbutton));
|
||||||
|
|
||||||
templayer.text = JoystickButtonNames[dbutton];
|
templayer.text = JoystickButtonNames[dbutton];
|
||||||
templayer.y = OPT_LINE(pageitem);
|
templayer.y = OPT_LINE(pageitem);
|
||||||
|
@ -1297,7 +1297,7 @@ static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
|
||||||
pageitem++;
|
pageitem++;
|
||||||
|
|
||||||
strcpy(JoystickButtonNames[dbutton + MAXJOYBUTTONS], "Double ");
|
strcpy(JoystickButtonNames[dbutton + MAXJOYBUTTONS], "Double ");
|
||||||
strcat(JoystickButtonNames[dbutton + MAXJOYBUTTONS], getjoyname(1, dbutton));
|
strcat(JoystickButtonNames[dbutton + MAXJOYBUTTONS], joyGetName(1, dbutton));
|
||||||
|
|
||||||
templayer.text = JoystickButtonNames[dbutton + MAXJOYBUTTONS];
|
templayer.text = JoystickButtonNames[dbutton + MAXJOYBUTTONS];
|
||||||
templayer.y = OPT_LINE(pageitem);
|
templayer.y = OPT_LINE(pageitem);
|
||||||
|
@ -1317,10 +1317,10 @@ static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int dir = button - joynumbuttons * 2;
|
int dir = button - joystick.numButtons * 2;
|
||||||
int dbutton = joynumbuttons + dir;
|
int dbutton = joystick.numButtons + dir;
|
||||||
|
|
||||||
strcpy(JoystickButtonNames[dbutton], getjoyname(2, 0));
|
strcpy(JoystickButtonNames[dbutton], joyGetName(2, 0));
|
||||||
strcat(JoystickButtonNames[dbutton], hatdirs[dir]);
|
strcat(JoystickButtonNames[dbutton], hatdirs[dir]);
|
||||||
|
|
||||||
templayer.text = JoystickButtonNames[dbutton];
|
templayer.text = JoystickButtonNames[dbutton];
|
||||||
|
@ -1339,11 +1339,11 @@ static SWBOOL MNU_JoystickButtonsInitialise(MenuItem_p mitem)
|
||||||
button++;
|
button++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pageitem == JOYSTICKITEMSPERPAGE || button == joynumbuttons * 2 + (joynumhats > 0) * 4)
|
if (pageitem == JOYSTICKITEMSPERPAGE || button == joystick.numButtons * 2 + (joystick.numHats > 0) * 4)
|
||||||
{
|
{
|
||||||
// next page
|
// next page
|
||||||
sprintf(JoystickButtonPageName[page], "Page %d / %d", page+1,
|
sprintf(JoystickButtonPageName[page], "Page %d / %d", page+1,
|
||||||
((joynumbuttons * 2 + (joynumhats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1);
|
((joystick.numButtons * 2 + (joystick.numHats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1);
|
||||||
|
|
||||||
temppagename.text = JoystickButtonPageName[page];
|
temppagename.text = JoystickButtonPageName[page];
|
||||||
memcpy(item, &temppagename, sizeof(MenuItem));
|
memcpy(item, &temppagename, sizeof(MenuItem));
|
||||||
|
@ -1435,7 +1435,7 @@ static SWBOOL MNU_JoystickButtonSetupCustom(UserCall call, MenuItem *item)
|
||||||
|
|
||||||
static SWBOOL MNU_JoystickButtonNextPage(void)
|
static SWBOOL MNU_JoystickButtonNextPage(void)
|
||||||
{
|
{
|
||||||
JoystickButtonPage = (JoystickButtonPage + 1) % (((joynumbuttons * 2 + (joynumhats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1);
|
JoystickButtonPage = (JoystickButtonPage + 1) % (((joystick.numButtons * 2 + (joystick.numHats > 0) * 4) / JOYSTICKITEMSPERPAGE) + 1);
|
||||||
joybuttonssetupgroup.items = &joybuttons_i[JoystickButtonPage][0];
|
joybuttonssetupgroup.items = &joybuttons_i[JoystickButtonPage][0];
|
||||||
joybuttonssetupgroup.cursor = 0;
|
joybuttonssetupgroup.cursor = 0;
|
||||||
MNU_ItemPreProcess(&joybuttonssetupgroup);
|
MNU_ItemPreProcess(&joybuttonssetupgroup);
|
||||||
|
@ -1484,13 +1484,13 @@ static SWBOOL MNU_JoystickAxesInitialise(MenuItem_p mitem)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (JoystickAxisPage < 0 || JoystickAxisPage >= joynumaxes)
|
if (JoystickAxisPage < 0 || JoystickAxisPage >= joystick.numAxes)
|
||||||
{
|
{
|
||||||
JoystickAxisPage = 0;
|
JoystickAxisPage = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(JoystickAxisName, getjoyname(0, JoystickAxisPage));
|
strcpy(JoystickAxisName, joyGetName(0, JoystickAxisPage));
|
||||||
sprintf(JoystickAxisPageName, "Page %d / %d", JoystickAxisPage+1, joynumaxes);
|
sprintf(JoystickAxisPageName, "Page %d / %d", JoystickAxisPage+1, joystick.numAxes);
|
||||||
slidersettings[sldr_joyaxisanalog] = MNU_ControlAxisOffset(JoystickAnalogAxes[JoystickAxisPage]);
|
slidersettings[sldr_joyaxisanalog] = MNU_ControlAxisOffset(JoystickAnalogAxes[JoystickAxisPage]);
|
||||||
slidersettings[sldr_joyaxisscale] = JoystickAnalogScale[JoystickAxisPage] >> 13;
|
slidersettings[sldr_joyaxisscale] = JoystickAnalogScale[JoystickAxisPage] >> 13;
|
||||||
slidersettings[sldr_joyaxisdead] = JoystickAnalogDead[JoystickAxisPage] >> 10;
|
slidersettings[sldr_joyaxisdead] = JoystickAnalogDead[JoystickAxisPage] >> 10;
|
||||||
|
@ -2201,7 +2201,7 @@ MNU_InitMenus(void)
|
||||||
if (validbpps[i] == bpp)
|
if (validbpps[i] == bpp)
|
||||||
slidersettings[sldr_videobpp] = i;
|
slidersettings[sldr_videobpp] = i;
|
||||||
|
|
||||||
i = checkvideomode(&newx, &newy, bpp, fullscreen, 1);
|
i = videoCheckMode(&newx, &newy, bpp, fullscreen, 1);
|
||||||
if (i != 0x7fffffff && i >= 0)
|
if (i != 0x7fffffff && i >= 0)
|
||||||
for (i=0; i<numvalidresolutions; i++)
|
for (i=0; i<numvalidresolutions; i++)
|
||||||
if (validresolutions[i].xdim == newx && validresolutions[i].ydim == newy)
|
if (validresolutions[i].xdim == newx && validresolutions[i].ydim == newy)
|
||||||
|
@ -2551,12 +2551,12 @@ MNU_InputSmallString(char *name, short pix_width)
|
||||||
|
|
||||||
while (KB_KeyWaiting())
|
while (KB_KeyWaiting())
|
||||||
{
|
{
|
||||||
ch = KB_Getch();
|
ch = KB_GetCh();
|
||||||
|
|
||||||
// skip any extended key
|
// skip any extended key
|
||||||
if (ch == 0)
|
if (ch == 0)
|
||||||
{
|
{
|
||||||
ch = KB_Getch();
|
ch = KB_GetCh();
|
||||||
if (ch == 104) // extended enter
|
if (ch == 104) // extended enter
|
||||||
ch = ascii_return;
|
ch = ascii_return;
|
||||||
else
|
else
|
||||||
|
@ -2644,7 +2644,7 @@ MNU_InputString(char *name, short pix_width)
|
||||||
|
|
||||||
while (KB_KeyWaiting())
|
while (KB_KeyWaiting())
|
||||||
{
|
{
|
||||||
ch = KB_Getch();
|
ch = KB_GetCh();
|
||||||
|
|
||||||
////DSPRINTF(ds, "%c %d", ch, ch);
|
////DSPRINTF(ds, "%c %d", ch, ch);
|
||||||
//MONO_PRINT(ds);
|
//MONO_PRINT(ds);
|
||||||
|
@ -2652,7 +2652,7 @@ MNU_InputString(char *name, short pix_width)
|
||||||
// skip most extended keys
|
// skip most extended keys
|
||||||
if (ch == 0)
|
if (ch == 0)
|
||||||
{
|
{
|
||||||
ch = KB_Getch();
|
ch = KB_GetCh();
|
||||||
|
|
||||||
////DSPRINTF(ds, "extended key %c %d", ch, ch);
|
////DSPRINTF(ds, "extended key %c %d", ch, ch);
|
||||||
//MONO_PRINT(ds);
|
//MONO_PRINT(ds);
|
||||||
|
@ -2698,12 +2698,12 @@ void LoadSaveMsg(const char *msg)
|
||||||
{
|
{
|
||||||
short w,h;
|
short w,h;
|
||||||
|
|
||||||
flushperms();
|
renderFlushPerms();
|
||||||
DrawMenuLevelScreen();
|
DrawMenuLevelScreen();
|
||||||
strcpy((char *)ds, (char *)msg);
|
strcpy((char *)ds, (char *)msg);
|
||||||
MNU_MeasureString(ds, &w, &h);
|
MNU_MeasureString(ds, &w, &h);
|
||||||
MNU_DrawString(TEXT_XCENTER(w), 170, ds, 1, 16);
|
MNU_DrawString(TEXT_XCENTER(w), 170, ds, 1, 16);
|
||||||
nextpage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2820,8 +2820,8 @@ MNU_GetSaveCustom(void)
|
||||||
// clear keyboard buffer
|
// clear keyboard buffer
|
||||||
while (KB_KeyWaiting())
|
while (KB_KeyWaiting())
|
||||||
{
|
{
|
||||||
if (KB_Getch() == 0)
|
if (KB_GetCh() == 0)
|
||||||
KB_Getch();
|
KB_GetCh();
|
||||||
}
|
}
|
||||||
|
|
||||||
// toggle edit mode
|
// toggle edit mode
|
||||||
|
@ -4884,7 +4884,7 @@ FadeIn(unsigned char startcolor, unsigned int clicks)
|
||||||
RGB_color color;
|
RGB_color color;
|
||||||
unsigned char temp_pal[768], *palette;
|
unsigned char temp_pal[768], *palette;
|
||||||
|
|
||||||
if (getrendermode() >= 3) return;
|
if (videoGetRenderMode() >= REND_POLYMOST) return;
|
||||||
|
|
||||||
palette = &palette_data[0][0];
|
palette = &palette_data[0][0];
|
||||||
|
|
||||||
|
@ -4942,7 +4942,7 @@ FadeOut(unsigned char targetcolor, unsigned int clicks)
|
||||||
RGB_color color;
|
RGB_color color;
|
||||||
unsigned char temp_pal[768];
|
unsigned char temp_pal[768];
|
||||||
|
|
||||||
if (getrendermode() >= 3) return;
|
if (videoGetRenderMode() >= REND_POLYMOST) return;
|
||||||
|
|
||||||
color.red = palette_data[targetcolor][0];
|
color.red = palette_data[targetcolor][0];
|
||||||
color.green = palette_data[targetcolor][1];
|
color.green = palette_data[targetcolor][1];
|
||||||
|
@ -5057,10 +5057,10 @@ SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor)
|
||||||
// Reset the palette
|
// Reset the palette
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
if (pp->FadeAmt <= 0)
|
if (pp->FadeAmt <= 0)
|
||||||
GetPaletteFromVESA(&ppalette[screenpeek][0]);
|
GetPaletteFromVESA(&ppalette[screenpeek][0]);
|
||||||
}
|
}
|
||||||
|
@ -5150,8 +5150,8 @@ SetFadeAmt(PLAYERp pp, short damage, unsigned char startcolor)
|
||||||
// Do initial palette set
|
// Do initial palette set
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3) set_pal(pp->temp_pal);
|
if (videoGetRenderMode() < REND_POLYMOST) set_pal(pp->temp_pal);
|
||||||
else setpalettefade(color.red, color.green, color.blue, faderamp[min(31,max(0,32-abs(pp->FadeAmt)))]);
|
else videoFadePalette(color.red, color.green, color.blue, faderamp[min(31,max(0,32-abs(pp->FadeAmt)))]);
|
||||||
if (damage < -1000)
|
if (damage < -1000)
|
||||||
pp->FadeAmt = 1000; // Don't call DoPaletteFlash for underwater stuff
|
pp->FadeAmt = 1000; // Don't call DoPaletteFlash for underwater stuff
|
||||||
}
|
}
|
||||||
|
@ -5174,10 +5174,10 @@ DoPaletteFlash(PLAYERp pp)
|
||||||
pp->StartColor = 0;
|
pp->StartColor = 0;
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
DoPlayerDivePalette(pp); // Check Dive again
|
DoPlayerDivePalette(pp); // Check Dive again
|
||||||
DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
||||||
|
@ -5213,10 +5213,10 @@ DoPaletteFlash(PLAYERp pp)
|
||||||
pp->StartColor = 0;
|
pp->StartColor = 0;
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
DoPlayerDivePalette(pp); // Check Dive again
|
DoPlayerDivePalette(pp); // Check Dive again
|
||||||
DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
||||||
|
@ -5249,10 +5249,10 @@ DoPaletteFlash(PLAYERp pp)
|
||||||
// Only hard set the palette if this is currently the player's view
|
// Only hard set the palette if this is currently the player's view
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3) set_pal(pp->temp_pal);
|
if (videoGetRenderMode() < REND_POLYMOST) set_pal(pp->temp_pal);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setpalettefade(
|
videoFadePalette(
|
||||||
palette_data[pp->StartColor][0],
|
palette_data[pp->StartColor][0],
|
||||||
palette_data[pp->StartColor][1],
|
palette_data[pp->StartColor][1],
|
||||||
palette_data[pp->StartColor][2],
|
palette_data[pp->StartColor][2],
|
||||||
|
@ -5267,10 +5267,10 @@ DoPaletteFlash(PLAYERp pp)
|
||||||
|
|
||||||
void ResetPalette(PLAYERp pp)
|
void ResetPalette(PLAYERp pp)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
//DoPlayerDivePalette(pp); // Check Dive again
|
//DoPlayerDivePalette(pp); // Check Dive again
|
||||||
//DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
//DoPlayerNightVisionPalette(pp); // Check Night Vision again
|
||||||
|
|
|
@ -951,7 +951,7 @@ faketimerhandler(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sampletimer();
|
timerUpdate();
|
||||||
if ((totalclock < ototalclock + synctics))
|
if ((totalclock < ototalclock + synctics))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1260,7 +1260,7 @@ getpackets(void)
|
||||||
PLAYERp pp;
|
PLAYERp pp;
|
||||||
SW_PACKET tempinput;
|
SW_PACKET tempinput;
|
||||||
|
|
||||||
sampletimer();
|
timerUpdate();
|
||||||
|
|
||||||
if (!CommEnabled)
|
if (!CommEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2332,10 +2332,10 @@ PlayerGameReset(PLAYERp pp)
|
||||||
|
|
||||||
if (pp == Player+screenpeek)
|
if (pp == Player+screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
}
|
}
|
||||||
pp->NightVision = FALSE;
|
pp->NightVision = FALSE;
|
||||||
|
@ -2436,10 +2436,10 @@ InitPlayerSprite(PLAYERp pp)
|
||||||
|
|
||||||
if (pp == Player+screenpeek)
|
if (pp == Player+screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5070,10 +5070,10 @@ DoPlayerDivePalette(PLAYERp pp)
|
||||||
{
|
{
|
||||||
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
memcpy(pp->temp_pal, palette_data, sizeof(palette_data));
|
||||||
memcpy(palookup[PALETTE_DEFAULT], DefaultPalette, 256 * 32);
|
memcpy(palookup[PALETTE_DEFAULT], DefaultPalette, 256 * 32);
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness, &palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness, &palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
pp->FadeAmt = 0;
|
pp->FadeAmt = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6934,10 +6934,10 @@ void DoPlayerDeathCheckKeys(PLAYERp pp)
|
||||||
|
|
||||||
if (pp == Player + screenpeek)
|
if (pp == Player + screenpeek)
|
||||||
{
|
{
|
||||||
if (getrendermode() < 3)
|
if (videoGetRenderMode() < REND_POLYMOST)
|
||||||
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
COVERsetbrightness(gs.Brightness,&palette_data[0][0]);
|
||||||
else
|
else
|
||||||
setpalettefade(0,0,0,0);
|
videoFadePalette(0,0,0,0);
|
||||||
//memcpy(&palette_data[0][0],&palette_data[0][0],768);
|
//memcpy(&palette_data[0][0],&palette_data[0][0],768);
|
||||||
memcpy(&pp->temp_pal[0],&palette_data[0][0],768);
|
memcpy(&pp->temp_pal[0],&palette_data[0][0],768);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
||||||
|
|
||||||
analyzesprites(tx, ty, tz, FALSE);
|
analyzesprites(tx, ty, tz, FALSE);
|
||||||
post_analyzesprites();
|
post_analyzesprites();
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1142,7 +1142,7 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum)
|
||||||
|
|
||||||
analyzesprites(tx, ty, tz, FALSE);
|
analyzesprites(tx, ty, tz, FALSE);
|
||||||
post_analyzesprites();
|
post_analyzesprites();
|
||||||
drawmasks();
|
renderDrawMasks();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,7 +301,7 @@ void *RTS_GetSound(int32_t lump)
|
||||||
if (lumpcache[lump] == (intptr_t)NULL)
|
if (lumpcache[lump] == (intptr_t)NULL)
|
||||||
{
|
{
|
||||||
lumplockbyte[lump] = CACHE_LOCK_START;
|
lumplockbyte[lump] = CACHE_LOCK_START;
|
||||||
allocache(&lumpcache[lump],(int)RTS_SoundLength(lump-1),&lumplockbyte[lump]);
|
cacheAllocateBlock(&lumpcache[lump],(int)RTS_SoundLength(lump-1),&lumplockbyte[lump]);
|
||||||
RTS_ReadLump(lump, lumpcache[lump]);
|
RTS_ReadLump(lump, lumpcache[lump]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -1313,10 +1313,10 @@ ScreenLoad(MFILE_READ fin)
|
||||||
{
|
{
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
setviewtotile(SAVE_SCREEN_TILE, SAVE_SCREEN_YSIZE, SAVE_SCREEN_XSIZE);
|
renderSetTarget(SAVE_SCREEN_TILE, SAVE_SCREEN_YSIZE, SAVE_SCREEN_XSIZE);
|
||||||
|
|
||||||
num = MREAD((void *)waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, 1, fin);
|
num = MREAD((void *)waloff[SAVE_SCREEN_TILE], SAVE_SCREEN_XSIZE * SAVE_SCREEN_YSIZE, 1, fin);
|
||||||
|
|
||||||
setviewback();
|
renderRestoreTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -770,7 +770,7 @@ SWBOOL CacheSound(int num, int type)
|
||||||
*/
|
*/
|
||||||
vp->lock = CACHE_UNLOCK_MAX;
|
vp->lock = CACHE_UNLOCK_MAX;
|
||||||
|
|
||||||
allocache((intptr_t*)&vp->data, length, &vp->lock);
|
cacheAllocateBlock((intptr_t*)&vp->data, length, &vp->lock);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// DEBUG
|
// DEBUG
|
||||||
|
|
|
@ -80,14 +80,14 @@ static void PopulateForm(int pgs)
|
||||||
|
|
||||||
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCVMODE);
|
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCVMODE);
|
||||||
|
|
||||||
mode = checkvideomode(&settings.xdim, &settings.ydim, settings.bpp, settings.fullscreen, 1);
|
mode = videoCheckMode(&settings.xdim, &settings.ydim, settings.bpp, settings.fullscreen, 1);
|
||||||
if (mode < 0)
|
if (mode < 0)
|
||||||
{
|
{
|
||||||
int cd[] = { 32, 24, 16, 15, 8, 0 };
|
int cd[] = { 32, 24, 16, 15, 8, 0 };
|
||||||
for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp) i++; else break; }
|
for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp) i++; else break; }
|
||||||
for (; cd[i]; i++)
|
for (; cd[i]; i++)
|
||||||
{
|
{
|
||||||
mode = checkvideomode(&settings.xdim, &settings.ydim, cd[i], settings.fullscreen, 1);
|
mode = videoCheckMode(&settings.xdim, &settings.ydim, cd[i], settings.fullscreen, 1);
|
||||||
if (mode < 0) continue;
|
if (mode < 0) continue;
|
||||||
settings.bpp = cd[i];
|
settings.bpp = cd[i];
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue