mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'master' into terrain-lump
This commit is contained in:
commit
65adddd53e
4 changed files with 27 additions and 4 deletions
|
|
@ -108,8 +108,12 @@ static patch_t *ttcheckers; // *vroom* KART
|
|||
static patch_t *ttkflash; // flash screen
|
||||
*/
|
||||
|
||||
#define NOWAY
|
||||
|
||||
#ifdef NOWAY
|
||||
static patch_t *driver[2]; // Driving character on the waiting screen
|
||||
static UINT8 *waitcolormap; // colormap for the spinning character
|
||||
#endif
|
||||
|
||||
// ttmode user
|
||||
static patch_t *ttuser[TTMAX_USER];
|
||||
|
|
@ -2188,14 +2192,17 @@ void F_TitleDemoTicker(void)
|
|||
|
||||
void F_StartWaitingPlayers(void)
|
||||
{
|
||||
#ifdef NOWAY
|
||||
INT32 i;
|
||||
INT32 randskin;
|
||||
spritedef_t *sprdef;
|
||||
spriteframe_t *sprframe;
|
||||
#endif
|
||||
|
||||
wipegamestate = GS_TITLESCREEN; // technically wiping from title screen
|
||||
finalecount = 0;
|
||||
|
||||
#ifdef NOWAY
|
||||
randskin = M_RandomKey(numskins);
|
||||
|
||||
if (waitcolormap)
|
||||
|
|
@ -2208,8 +2215,9 @@ void F_StartWaitingPlayers(void)
|
|||
for (i = 0; i < 2; 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)
|
||||
|
|
@ -2226,14 +2234,17 @@ void F_WaitingPlayersTicker(void)
|
|||
|
||||
void F_WaitingPlayersDrawer(void)
|
||||
{
|
||||
#ifdef NOWAY
|
||||
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 *waittext2 = "the next race...";
|
||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31);
|
||||
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_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
|
||||
}
|
||||
|
||||
// ==================
|
||||
|
|
|
|||
|
|
@ -452,7 +452,9 @@ static void HWR_GenerateTexture(INT32 texnum, GLMapTexture_t *grtex)
|
|||
UINT8 *pdata;
|
||||
INT32 blockwidth, blockheight, blocksize;
|
||||
|
||||
#ifdef GLENCORE
|
||||
UINT8 *colormap = colormaps;
|
||||
#endif
|
||||
|
||||
INT32 i;
|
||||
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.format = textureformat;
|
||||
|
||||
#ifdef GLENCORE
|
||||
if (encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grtex->mipmap.colormap = Z_Calloc(sizeof(*grtex->mipmap.colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grtex->mipmap.colormap->source = colormap;
|
||||
M_Memcpy(grtex->mipmap.colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
#endif
|
||||
|
||||
blockwidth = texture->width;
|
||||
blockheight = texture->height;
|
||||
|
|
@ -891,7 +895,9 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|||
GLMipmap_t *grmip;
|
||||
patch_t *patch;
|
||||
|
||||
#ifdef GLENCORE
|
||||
UINT8 *colormap = colormaps;
|
||||
#endif
|
||||
|
||||
if (flatlumpnum == LUMPERROR)
|
||||
return;
|
||||
|
|
@ -899,12 +905,16 @@ void HWR_GetRawFlat(lumpnum_t flatlumpnum, boolean noencoremap)
|
|||
patch = HWR_GetCachedGLPatch(flatlumpnum);
|
||||
grmip = ((GLPatch_t *)Patch_AllocateHardwarePatch(patch))->mipmap;
|
||||
|
||||
#ifdef GLENCORE
|
||||
if (!noencoremap && encoremap)
|
||||
colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
grmip->colormap = Z_Calloc(sizeof(*grmip->colormap), PU_HWRPATCHCOLMIPMAP, NULL);
|
||||
grmip->colormap->source = colormap;
|
||||
M_Memcpy(grmip->colormap->data, colormap, 256 * sizeof(UINT8));
|
||||
#else
|
||||
(void)noencoremap;
|
||||
#endif
|
||||
|
||||
if (!grmip->downloaded && !grmip->data)
|
||||
HWR_CacheFlat(grmip, flatlumpnum);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
//#define HWR_LOADING_SCREEN
|
||||
|
||||
// SRB2Kart
|
||||
#define GLENCORE
|
||||
//#define GLENCORE
|
||||
|
||||
// -----------
|
||||
// structures
|
||||
|
|
|
|||
|
|
@ -5478,8 +5478,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
|||
{
|
||||
vis->colormap = colormaps;
|
||||
|
||||
#ifdef GLENCORE
|
||||
if (encoremap && (thing->flags & (MF_SCENERY|MF_NOTHINK)) && !(thing->flags & MF_DONTENCOREMAP))
|
||||
vis->colormap += COLORMAP_REMAPOFFSET;
|
||||
#endif
|
||||
}
|
||||
|
||||
// set top/bottom coords
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue