Merge branch 'master' into terrain-lump

This commit is contained in:
Sally Coolatta 2021-12-09 16:24:43 -05:00
commit 65adddd53e
4 changed files with 27 additions and 4 deletions

View file

@ -108,8 +108,12 @@ static patch_t *ttcheckers; // *vroom* KART
static patch_t *ttkflash; // flash screen static patch_t *ttkflash; // flash screen
*/ */
#define NOWAY
#ifdef NOWAY
static patch_t *driver[2]; // Driving character on the waiting screen static patch_t *driver[2]; // Driving character on the waiting screen
static UINT8 *waitcolormap; // colormap for the spinning character static UINT8 *waitcolormap; // colormap for the spinning character
#endif
// ttmode user // ttmode user
static patch_t *ttuser[TTMAX_USER]; static patch_t *ttuser[TTMAX_USER];
@ -2188,14 +2192,17 @@ void F_TitleDemoTicker(void)
void F_StartWaitingPlayers(void) void F_StartWaitingPlayers(void)
{ {
#ifdef NOWAY
INT32 i; INT32 i;
INT32 randskin; INT32 randskin;
spritedef_t *sprdef; spritedef_t *sprdef;
spriteframe_t *sprframe; spriteframe_t *sprframe;
#endif
wipegamestate = GS_TITLESCREEN; // technically wiping from title screen wipegamestate = GS_TITLESCREEN; // technically wiping from title screen
finalecount = 0; finalecount = 0;
#ifdef NOWAY
randskin = M_RandomKey(numskins); randskin = M_RandomKey(numskins);
if (waitcolormap) if (waitcolormap)
@ -2208,8 +2215,9 @@ void F_StartWaitingPlayers(void)
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
sprframe = &sprdef->spriteframes[i]; sprframe = &sprdef->spriteframes[i];
driver[i] = W_CachePatchNum(sprframe->lumppat[0], PU_LEVEL); driver[i] = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE);
} }
#endif
} }
void F_WaitingPlayersTicker(void) void F_WaitingPlayersTicker(void)
@ -2226,14 +2234,17 @@ void F_WaitingPlayersTicker(void)
void F_WaitingPlayersDrawer(void) void F_WaitingPlayersDrawer(void)
{ {
#ifdef NOWAY
UINT32 frame = (finalecount % 8) / 4; // The game only tics every other frame while waitingplayers UINT32 frame = (finalecount % 8) / 4; // The game only tics every other frame while waitingplayers
INT32 flags = V_FLIP; #endif
const char *waittext1 = "You will join"; const char *waittext1 = "You will join";
const char *waittext2 = "the next race..."; const char *waittext2 = "the next race...";
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
V_DrawCreditString((160 - (V_CreditStringWidth(waittext1)>>1))<<FRACBITS, 48<<FRACBITS, 0, waittext1); V_DrawCreditString((160 - (V_CreditStringWidth(waittext1)>>1))<<FRACBITS, 48<<FRACBITS, 0, waittext1);
V_DrawCreditString((160 - (V_CreditStringWidth(waittext2)>>1))<<FRACBITS, 64<<FRACBITS, 0, waittext2); V_DrawCreditString((160 - (V_CreditStringWidth(waittext2)>>1))<<FRACBITS, 64<<FRACBITS, 0, waittext2);
V_DrawFixedPatch((160<<FRACBITS) - driver[frame]->width / 2, 150<<FRACBITS, 1<<FRACBITS, flags, driver[frame], waitcolormap); #ifdef NOWAY
V_DrawFixedPatch((160<<FRACBITS) - driver[frame]->width / 2, 150<<FRACBITS, 1<<FRACBITS, V_FLIP, driver[frame], waitcolormap);
#endif
} }
// ================== // ==================

View file

@ -452,7 +452,9 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
UINT8 *pdata; UINT8 *pdata;
INT32 blockwidth, blockheight, blocksize; INT32 blockwidth, blockheight, blocksize;
#ifdef GLENCORE
UINT8 *colormap = colormaps; UINT8 *colormap = colormaps;
#endif
INT32 i; INT32 i;
boolean skyspecial = false; //poor hack for Legacy large skies.. boolean skyspecial = false; //poor hack for Legacy large skies..
@ -477,12 +479,14 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
grtex->mipmap.height = (UINT16)texture->height; grtex->mipmap.height = (UINT16)texture->height;
grtex->mipmap.format = textureformat; grtex->mipmap.format = textureformat;
#ifdef GLENCORE
if (encoremap) if (encoremap)
colormap += COLORMAP_REMAPOFFSET; colormap += COLORMAP_REMAPOFFSET;
grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL); grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);
grtex->mipmap.colormap->source = colormap; grtex->mipmap.colormap->source = colormap;
M_Memcpy(grtex->mipmap.colormap->data, colormap, 256 * sizeof(UINT8)); M_Memcpy(grtex->mipmap.colormap->data, colormap, 256 * sizeof(UINT8));
#endif
blockwidth = texture->width; blockwidth = texture->width;
blockheight = texture->height; blockheight = texture->height;
@ -891,7 +895,9 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
GLMipmap_t *grmip; GLMipmap_t *grmip;
patch_t *patch; patch_t *patch;
#ifdef GLENCORE
UINT8 *colormap = colormaps; UINT8 *colormap = colormaps;
#endif
if (flatlumpnum == LUMPERROR) if (flatlumpnum == LUMPERROR)
return; return;
@ -899,12 +905,16 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
patch = HWR_GetCachedGLPatch(flatlumpnum); patch = HWR_GetCachedGLPatch(flatlumpnum);
grmip = ((GLPatch_t *)Patch_AllocateHardwarePatch(patch))->mipmap; grmip = ((GLPatch_t *)Patch_AllocateHardwarePatch(patch))->mipmap;
#ifdef GLENCORE
if (!noencoremap && encoremap) if (!noencoremap && encoremap)
colormap += COLORMAP_REMAPOFFSET; colormap += COLORMAP_REMAPOFFSET;
grmip->colormap = Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL); grmip->colormap = Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
grmip->colormap->source = colormap; grmip->colormap->source = colormap;
M_Memcpy(grmip->colormap->data, colormap, 256 * sizeof(UINT8)); M_Memcpy(grmip->colormap->data, colormap, 256 * sizeof(UINT8));
#else
(void)noencoremap;
#endif
if (!grmip->downloaded && !grmip->data) if (!grmip->downloaded && !grmip->data)
HWR_CacheFlat(grmip, flatlumpnum); HWR_CacheFlat(grmip, flatlumpnum);

View file

@ -26,7 +26,7 @@
//#define HWR_LOADING_SCREEN //#define HWR_LOADING_SCREEN
// SRB2Kart // SRB2Kart
#define GLENCORE //#define GLENCORE
// ----------- // -----------
// structures // structures

View file

@ -5478,8 +5478,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
{ {
vis->colormap = colormaps; vis->colormap = colormaps;
#ifdef GLENCORE
if (encoremap && (thing->flags & (MF_SCENERY|MF_NOTHINK)) && !(thing->flags & MF_DONTENCOREMAP)) if (encoremap && (thing->flags & (MF_SCENERY|MF_NOTHINK)) && !(thing->flags & MF_DONTENCOREMAP))
vis->colormap += COLORMAP_REMAPOFFSET; vis->colormap += COLORMAP_REMAPOFFSET;
#endif
} }
// set top/bottom coords // set top/bottom coords