Merge branch 'master' into menu_for_real

This commit is contained in:
Christoph Oelckers 2019-12-05 21:08:46 +01:00
commit 223c6d628e
14 changed files with 36 additions and 44 deletions

View file

@ -6749,6 +6749,9 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
int32_t zoomsc, sx=*sxptr, sy=*syptr; int32_t zoomsc, sx=*sxptr, sy=*syptr;
int32_t ouryxaspect = yxaspect, ourxyaspect = xyaspect; int32_t ouryxaspect = yxaspect, ourxyaspect = xyaspect;
if ((dastat & RS_ALIGN_MASK) && (dastat & RS_ALIGN_MASK) != RS_ALIGN_MASK)
sx += NEGATE_ON_CONDITION(scale(120<<16,xdim,ydim) - (160<<16), !(dastat & RS_ALIGN_R));
sy += rotatesprite_y_offset; sy += rotatesprite_y_offset;
// screen center to s[xy], 320<<16 coords. // screen center to s[xy], 320<<16 coords.
@ -6776,17 +6779,7 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
// screen x center to sx1, scaled to viewport // screen x center to sx1, scaled to viewport
const int32_t scaledxofs = scale(normxofs, scale(xdimen, xdim, oxdim), 320); const int32_t scaledxofs = scale(normxofs, scale(xdimen, xdim, oxdim), 320);
int32_t xbord = 0; sx = ((twice_midcx)<<15) + scaledxofs;
if ((dastat & RS_ALIGN_MASK) && (dastat & RS_ALIGN_MASK) != RS_ALIGN_MASK)
{
xbord = scale(oxdim-xdim, twice_midcx, oxdim);
if ((dastat & RS_ALIGN_R)==0)
xbord = -xbord;
}
sx = ((twice_midcx+xbord)<<15) + scaledxofs;
zoomsc = xdimenscale; //= scale(xdimen,yxaspect,320); zoomsc = xdimenscale; //= scale(xdimen,yxaspect,320);
zoomsc = mulscale16(zoomsc, rotatesprite_yxaspect); zoomsc = mulscale16(zoomsc, rotatesprite_yxaspect);
@ -6808,9 +6801,7 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
if ((dastat & RS_ALIGN_MASK) == RS_ALIGN_MASK) if ((dastat & RS_ALIGN_MASK) == RS_ALIGN_MASK)
sy += (oydim-ydim)<<15; sy += (oydim-ydim)<<15;
else if ((dastat & RS_ALIGN_MASK) == RS_ALIGN_R) else
sx += (oxdim-xdim)<<16;
else if ((dastat & RS_ALIGN_MASK) == 0)
sx += (oxdim-xdim)<<15; sx += (oxdim-xdim)<<15;
if (dastat & RS_CENTERORIGIN) if (dastat & RS_CENTERORIGIN)

View file

@ -108,7 +108,9 @@ static struct
grpfile_t const * grp; grpfile_t const * grp;
char *gamedir; char *gamedir;
ud_setup_t shared; ud_setup_t shared;
#ifdef POLYMER
int polymer; int polymer;
#endif
} settings; } settings;
static int32_t retval = -1, mode = TAB_MESSAGES; static int32_t retval = -1, mode = TAB_MESSAGES;
@ -130,6 +132,7 @@ static void on_vmode3dcombo_changed(GtkComboBox *combobox, gpointer user_data)
gtk_tree_model_get(data, &iter, 1, &val, -1); gtk_tree_model_get(data, &iter, 1, &val, -1);
settings.shared.xdim = validmode[val].xdim; settings.shared.xdim = validmode[val].xdim;
settings.shared.ydim = validmode[val].ydim; settings.shared.ydim = validmode[val].ydim;
settings.shared.bpp = validmode[val].bpp;
} }
static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data) static void on_fullscreencheck_toggled(GtkToggleButton *togglebutton, gpointer user_data)
@ -272,7 +275,7 @@ static unsigned char GetModsDirNames(GtkListStore *list)
char *homedir; char *homedir;
char pdir[BMAX_PATH]; char pdir[BMAX_PATH];
unsigned char iternumb = 0; unsigned char iternumb = 0;
CACHE1D_FIND_REC *dirs = NULL; BUILDVFS_FIND_REC *dirs = NULL;
GtkTreeIter iter; GtkTreeIter iter;
pathsearchmode = 1; pathsearchmode = 1;
@ -280,7 +283,7 @@ static unsigned char GetModsDirNames(GtkListStore *list)
if ((homedir = Bgethomedir())) if ((homedir = Bgethomedir()))
{ {
Bsnprintf(pdir, sizeof(pdir), "%s/" ".eduke32", homedir); Bsnprintf(pdir, sizeof(pdir), "%s/" ".eduke32", homedir);
dirs = klistpath(pdir, "*", CACHE1D_FIND_DIR); dirs = klistpath(pdir, "*", BUILDVFS_FIND_DIR);
for (; dirs != NULL; dirs=dirs->next) for (; dirs != NULL; dirs=dirs->next)
{ {
if ((Bstrcmp(dirs->name, "autoload") == 0) || if ((Bstrcmp(dirs->name, "autoload") == 0) ||
@ -866,9 +869,7 @@ int32_t startwin_run(void)
settings.gamedir = g_modDir; settings.gamedir = g_modDir;
settings.grp = g_selectedGrp; settings.grp = g_selectedGrp;
#ifdef POLYMER #ifdef POLYMER
settings.polymer = (glrendmode == REND_POLYMER); settings.polymer = (glrendmode == REND_POLYMER) & (settings.shared.bpp != 8);
#else
settings.polymer = 0;
#endif #endif
PopulateForm(ALL); PopulateForm(ALL);
@ -878,7 +879,9 @@ int32_t startwin_run(void)
if (retval) // launch the game with these parameters if (retval) // launch the game with these parameters
{ {
ud.setup = settings.shared; ud.setup = settings.shared;
#ifdef POLYMER
glrendmode = (settings.polymer) ? REND_POLYMER : REND_POLYMOST; glrendmode = (settings.polymer) ? REND_POLYMER : REND_POLYMOST;
#endif
g_selectedGrp = settings.grp; g_selectedGrp = settings.grp;
Bstrcpy(g_modDir, (g_noSetup == 0 && settings.gamedir != NULL) ? settings.gamedir : "/"); Bstrcpy(g_modDir, (g_noSetup == 0 && settings.gamedir != NULL) ? settings.gamedir : "/");

View file

@ -494,7 +494,6 @@ int32_t Anim_Play(const char *fn)
// setpalette(0L,256L,tempbuf); // setpalette(0L,256L,tempbuf);
P_SetGamePalette(g_player[myconnectindex].ps, ANIMPAL, 8 + 2); P_SetGamePalette(g_player[myconnectindex].ps, ANIMPAL, 8 + 2);
timerUpdate();
ototalclock = totalclock; ototalclock = totalclock;
i = 1; i = 1;

View file

@ -1,4 +1,4 @@
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
/* /*
Copyright (C) 2016 EDuke32 developers and contributors Copyright (C) 2016 EDuke32 developers and contributors
@ -7639,8 +7639,6 @@ MAIN_LOOP_RESTART:
do do
{ {
timerUpdate();
if (ready2send == 0) break; if (ready2send == 0) break;
Net_GetInput(); Net_GetInput();
@ -7654,8 +7652,6 @@ MAIN_LOOP_RESTART:
G_MoveLoop(); G_MoveLoop();
} }
timerUpdate();
if (totalclock - moveClock >= TICSPERFRAME) if (totalclock - moveClock >= TICSPERFRAME)
{ {
// computing a tic takes longer than a tic, so we're slowing // computing a tic takes longer than a tic, so we're slowing

View file

@ -2863,7 +2863,6 @@ void Net_ReceiveDisconnect(ENetEvent *event)
void Net_GetPackets(void) void Net_GetPackets(void)
{ {
timerUpdate();
MUSIC_Update(); MUSIC_Update();
G_HandleSpecialKeys(); G_HandleSpecialKeys();

View file

@ -806,8 +806,10 @@ int32_t registerosdcommands(void)
OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer); OSD_RegisterFunction("inittimer","debug", osdcmd_inittimer);
#endif #endif
#if !defined NETCODE_DISABLE #if !defined NETCODE_DISABLE
//OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick); #if 0
//OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban); OSD_RegisterFunction("kick","kick <id>: kicks a multiplayer client. See listplayers.", osdcmd_kick);
OSD_RegisterFunction("kickban","kickban <id>: kicks a multiplayer client and prevents them from reconnecting. See listplayers.", osdcmd_kickban);
#endif
OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers); OSD_RegisterFunction("listplayers","listplayers: lists currently connected multiplayer clients", osdcmd_listplayers);
#endif #endif

View file

@ -643,7 +643,6 @@ void G_CacheMapData(void)
{ {
Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", lpc, pc, g_precacheCount); Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", lpc, pc, g_precacheCount);
G_DoLoadScreen(tempbuf, lpc); G_DoLoadScreen(tempbuf, lpc);
timerUpdate();
if (totalclock - tc >= 1) if (totalclock - tc >= 1)
{ {

View file

@ -322,8 +322,6 @@ static void G_SaveTimers(void)
static void G_RestoreTimers(void) static void G_RestoreTimers(void)
{ {
timerUpdate();
totalclock = g_timers.totalclock; totalclock = g_timers.totalclock;
totalclocklock = g_timers.totalclocklock; totalclocklock = g_timers.totalclocklock;
ototalclock = g_timers.ototalclock; ototalclock = g_timers.ototalclock;

View file

@ -441,10 +441,9 @@ static void BorderSetView(PLAYERp, int *Xdim, int *Ydim, int *ScreenSize)
y = DIV2(*Ydim) - DIV2((*ScreenSize **Ydim) / *Xdim); y = DIV2(*Ydim) - DIV2((*ScreenSize **Ydim) / *Xdim);
y2 = y + ((*ScreenSize **Ydim) / *Xdim) - 1; y2 = y + ((*ScreenSize **Ydim) / *Xdim) - 1;
if (ydim == 480 && gs.BorderNum == 2) // avoid a one-pixel tall HOM
{ if (gs.BorderNum == BORDER_BAR)
y2+=2; ++y2;
}
// global windowxy1, windowxy2 coords set here // global windowxy1, windowxy2 coords set here
videoSetViewableArea(x, y, x2, y2); videoSetViewableArea(x, y, x2, y2);

View file

@ -2591,7 +2591,7 @@ DrawCompass(PLAYERp pp)
start_ang = NORM_CANG(start_ang - 4); start_ang = NORM_CANG(start_ang - 4);
flags = ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER; flags = ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER;
if (RedrawCompass) if (RedrawCompass && !UsingMenus)
{ {
RedrawCompass = FALSE; RedrawCompass = FALSE;
SET(flags, ROTATE_SPRITE_ALL_PAGES); SET(flags, ROTATE_SPRITE_ALL_PAGES);

View file

@ -1692,7 +1692,6 @@ void CreditsLevel(void)
// get rid of all PERM sprites! // get rid of all PERM sprites!
renderFlushPerms(); renderFlushPerms();
save = gs.BorderNum; save = gs.BorderNum;
SetBorder(Player + myconnectindex,0);
ClearStartMost(); ClearStartMost();
gs.BorderNum = save; gs.BorderNum = save;
videoClearViewableArea(0L); videoClearViewableArea(0L);

View file

@ -138,7 +138,8 @@ void UpdateMiniBar(PLAYERp pp)
rotatesprite(x << 16, y << 16, (1 << 16), 0, rotatesprite(x << 16, y << 16, (1 << 16), 0,
MINI_BAR_HEALTH_BOX_PIC, 0, 0, MINI_BAR_HEALTH_BOX_PIC, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
x = MINI_BAR_HEALTH_BOX_X+3; x = MINI_BAR_HEALTH_BOX_X+3;
DisplayMiniBarNumber(pp, x, y+5, u->Health); DisplayMiniBarNumber(pp, x, y+5, u->Health);
@ -149,7 +150,8 @@ void UpdateMiniBar(PLAYERp pp)
rotatesprite(x << 16, y << 16, (1 << 16), 0, rotatesprite(x << 16, y << 16, (1 << 16), 0,
MINI_BAR_AMMO_BOX_PIC, 0, 0, MINI_BAR_AMMO_BOX_PIC, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
x = MINI_BAR_AMMO_BOX_X+3; x = MINI_BAR_AMMO_BOX_X+3;
DisplayMiniBarNumber(pp, x, y+5, pp->WpnAmmo[u->WeaponNum]); DisplayMiniBarNumber(pp, x, y+5, pp->WpnAmmo[u->WeaponNum]);
@ -163,7 +165,8 @@ void UpdateMiniBar(PLAYERp pp)
rotatesprite(x << 16, y << 16, (1 << 16), 0, rotatesprite(x << 16, y << 16, (1 << 16), 0,
MINI_BAR_INVENTORY_BOX_PIC, 0, 0, MINI_BAR_INVENTORY_BOX_PIC, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
id = &InventoryData[pp->InventoryNum]; id = &InventoryData[pp->InventoryNum];
@ -173,7 +176,8 @@ void UpdateMiniBar(PLAYERp pp)
rotatesprite(x << 16, y << 16, (1 << 16), 0, rotatesprite(x << 16, y << 16, (1 << 16), 0,
id->State->picndx, 0, 0, id->State->picndx, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
// will update the AUTO and % inventory values // will update the AUTO and % inventory values
PlayerUpdateInventory(pp, pp->InventoryNum); PlayerUpdateInventory(pp, pp->InventoryNum);

View file

@ -7597,7 +7597,8 @@ pDisplaySprites(PLAYERp pp)
} }
#if 1 #if 1
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW) && !TEST(psp->flags, PANF_NOT_ALL_PAGES)) extern SWBOOL UsingMenus;
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW) && !TEST(psp->flags, PANF_NOT_ALL_PAGES) && !UsingMenus)
{ {
psp->numpages = 0; psp->numpages = 0;
SET(flags, ROTATE_SPRITE_ALL_PAGES); SET(flags, ROTATE_SPRITE_ALL_PAGES);

View file

@ -284,7 +284,8 @@ void DisplayMiniBarNumber(PLAYERp pp, short xs, short ys, int number)
rotatesprite((long)x << 16, (long)ys << 16, (1 << 16), 0, rotatesprite((long)x << 16, (long)ys << 16, (1 << 16), 0,
pic, 0, 0, pic, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
size = tilesiz[PANEL_FONT_G + (*ptr - '0')].x + 1; size = tilesiz[PANEL_FONT_G + (*ptr - '0')].x + 1;
} }
@ -310,7 +311,8 @@ void DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const cha
pic = FRAG_FIRST_TILE + (*ptr - FRAG_FIRST_ASCII); pic = FRAG_FIRST_TILE + (*ptr - FRAG_FIRST_ASCII);
rotatesprite((int)x << 16, (int)ys << 16, (1 << 16), 0, pic, 0, pal, rotatesprite((int)x << 16, (int)ys << 16, (1 << 16), 0, pic, 0, pal,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
} }
} }