mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-22 20:01:14 +00:00
Merge branch 'sonicitems' of https://git.magicalgirl.moe/KartKrew/Kart into sonicitems
This commit is contained in:
commit
fb975e7ae7
10 changed files with 560 additions and 400 deletions
|
@ -1487,12 +1487,12 @@ void CV_AddValue(consvar_t *var, INT32 increment)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newvalue == oldvalue)
|
if (newvalue == oldvalue)
|
||||||
gt = -1; // don't loop forever if there's none of a certain gametype
|
break; // don't loop forever if there's none of a certain gametype
|
||||||
|
|
||||||
if(!mapheaderinfo[newvalue])
|
if(!mapheaderinfo[newvalue])
|
||||||
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
continue; // Don't allocate the header. That just makes memory usage skyrocket.
|
||||||
|
|
||||||
} while (newvalue != oldvalue && !M_CanShowLevelInList(newvalue, gt));
|
} while (!M_CanShowLevelInList(newvalue, gt));
|
||||||
|
|
||||||
var->value = newvalue + 1;
|
var->value = newvalue + 1;
|
||||||
var->func();
|
var->func();
|
||||||
|
|
|
@ -139,6 +139,21 @@ static CV_PossibleValue_t backcolor_cons_t[] = {{0, "White"}, {1, "Gray"}, {2,
|
||||||
{0, NULL}};
|
{0, NULL}};
|
||||||
consvar_t cons_backcolor = {"con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cons_backcolor = {"con_backcolor", "Green", CV_CALL|CV_SAVE, backcolor_cons_t, CONS_backcolor_Change, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
|
static CV_PossibleValue_t menuhighlight_cons_t[] =
|
||||||
|
{
|
||||||
|
{0, "Default"},
|
||||||
|
{V_YELLOWMAP, "Always yellow"},
|
||||||
|
{V_PURPLEMAP, "Always purple"},
|
||||||
|
{V_GREENMAP, "Always green"},
|
||||||
|
{V_BLUEMAP, "Always blue"},
|
||||||
|
{V_REDMAP, "Always red"},
|
||||||
|
{V_GRAYMAP, "Always gray"},
|
||||||
|
{V_ORANGEMAP, "Always orange"},
|
||||||
|
{V_SKYMAP, "Always sky-blue"},
|
||||||
|
{0, NULL}
|
||||||
|
};
|
||||||
|
consvar_t cons_menuhighlight = {"menuhighlight", "Default", CV_SAVE, menuhighlight_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
static void CON_Print(char *msg);
|
static void CON_Print(char *msg);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -227,13 +242,7 @@ static void CONS_Bind_f(void)
|
||||||
// Font colormap colors
|
// Font colormap colors
|
||||||
// TODO: This could probably be improved somehow...
|
// TODO: This could probably be improved somehow...
|
||||||
// These colormaps are 99% identical, with just a few changed bytes
|
// These colormaps are 99% identical, with just a few changed bytes
|
||||||
UINT8 *yellowmap;
|
UINT8 *yellowmap, *purplemap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||||
UINT8 *purplemap;
|
|
||||||
UINT8 *lgreenmap;
|
|
||||||
UINT8 *bluemap;
|
|
||||||
UINT8 *graymap;
|
|
||||||
UINT8 *redmap;
|
|
||||||
UINT8 *orangemap;
|
|
||||||
|
|
||||||
// Console BG color
|
// Console BG color
|
||||||
UINT8 *consolebgmap = NULL;
|
UINT8 *consolebgmap = NULL;
|
||||||
|
@ -278,39 +287,34 @@ static void CONS_backcolor_Change(void)
|
||||||
static void CON_SetupColormaps(void)
|
static void CON_SetupColormaps(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*8), PU_STATIC, NULL);
|
||||||
|
|
||||||
yellowmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
purplemap = memorysrc;
|
||||||
graymap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
yellowmap = (purplemap+256);
|
||||||
purplemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
lgreenmap = (yellowmap+256);
|
||||||
lgreenmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
bluemap = (lgreenmap+256);
|
||||||
bluemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
redmap = (bluemap+256);
|
||||||
redmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
graymap = (redmap+256);
|
||||||
orangemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL);
|
orangemap = (graymap+256);
|
||||||
|
skymap = (orangemap+256);
|
||||||
|
|
||||||
// setup the other colormaps, for console text
|
// setup the other colormaps, for console text
|
||||||
|
|
||||||
// these don't need to be aligned, unless you convert the
|
// these don't need to be aligned, unless you convert the
|
||||||
// V_DrawMappedPatch() into optimised asm.
|
// V_DrawMappedPatch() into optimised asm.
|
||||||
|
|
||||||
for (i = 0; i < 256; i++)
|
for (i = 0; i < (256*8); i++, ++memorysrc)
|
||||||
{
|
*memorysrc = (UINT8)(i & 0xFF); // remap each color to itself...
|
||||||
yellowmap[i] = (UINT8)i; // remap each color to itself...
|
|
||||||
graymap[i] = (UINT8)i;
|
|
||||||
purplemap[i] = (UINT8)i;
|
|
||||||
lgreenmap[i] = (UINT8)i;
|
|
||||||
bluemap[i] = (UINT8)i;
|
|
||||||
redmap[i] = (UINT8)i;
|
|
||||||
orangemap[i] = (UINT8)i;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SRB2Kart: Different console font, new colors
|
// SRB2Kart: Different console font, new colors
|
||||||
yellowmap[120] = (UINT8)103;
|
|
||||||
purplemap[120] = (UINT8)194;
|
purplemap[120] = (UINT8)194;
|
||||||
|
yellowmap[120] = (UINT8)103;
|
||||||
lgreenmap[120] = (UINT8)162;
|
lgreenmap[120] = (UINT8)162;
|
||||||
bluemap[120] = (UINT8)228;
|
bluemap[120] = (UINT8)228;
|
||||||
graymap[120] = (UINT8)10;
|
graymap[120] = (UINT8)10;
|
||||||
redmap[120] = (UINT8)126;
|
redmap[120] = (UINT8)126; // battle
|
||||||
orangemap[120] = (UINT8)85;
|
orangemap[120] = (UINT8)85; // record attack
|
||||||
|
skymap[120] = (UINT8)215; // race
|
||||||
|
|
||||||
// Init back colormap
|
// Init back colormap
|
||||||
CON_SetupBackColormap();
|
CON_SetupBackColormap();
|
||||||
|
@ -367,6 +371,7 @@ void CON_Init(void)
|
||||||
CV_RegisterVar(&cons_height);
|
CV_RegisterVar(&cons_height);
|
||||||
CV_RegisterVar(&cons_backpic);
|
CV_RegisterVar(&cons_backpic);
|
||||||
CV_RegisterVar(&cons_backcolor);
|
CV_RegisterVar(&cons_backcolor);
|
||||||
|
CV_RegisterVar(&cons_menuhighlight);
|
||||||
COM_AddCommand("bind", CONS_Bind_f);
|
COM_AddCommand("bind", CONS_Bind_f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -36,9 +36,9 @@ extern INT32 con_clearlines; // lines of top of screen to refresh
|
||||||
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
extern boolean con_hudupdate; // hud messages have changed, need refresh
|
||||||
extern UINT32 con_scalefactor; // console text scale factor
|
extern UINT32 con_scalefactor; // console text scale factor
|
||||||
|
|
||||||
extern consvar_t cons_backcolor;
|
extern consvar_t cons_backcolor, cons_menuhighlight;
|
||||||
|
|
||||||
extern UINT8 *yellowmap, *purplemap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap;
|
extern UINT8 *yellowmap, *purplemap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap;
|
||||||
|
|
||||||
// Console bg color (auto updated to match)
|
// Console bg color (auto updated to match)
|
||||||
extern UINT8 *consolebgmap;
|
extern UINT8 *consolebgmap;
|
||||||
|
|
56
src/g_game.c
56
src/g_game.c
|
@ -312,13 +312,6 @@ static struct {
|
||||||
|
|
||||||
// Your naming conventions are stupid and useless.
|
// Your naming conventions are stupid and useless.
|
||||||
// There is no conflict here.
|
// There is no conflict here.
|
||||||
typedef struct demoghost {
|
|
||||||
UINT8 checksum[16];
|
|
||||||
UINT8 *buffer, *p, color;
|
|
||||||
UINT16 version;
|
|
||||||
mobj_t oldmo, *mo;
|
|
||||||
struct demoghost *next;
|
|
||||||
} demoghost;
|
|
||||||
demoghost *ghosts = NULL;
|
demoghost *ghosts = NULL;
|
||||||
|
|
||||||
boolean precache = true; // if true, load all graphics at start
|
boolean precache = true; // if true, load all graphics at start
|
||||||
|
@ -3050,6 +3043,7 @@ boolean G_BattleGametype(void)
|
||||||
// G_SometimesGetDifferentGametype
|
// G_SometimesGetDifferentGametype
|
||||||
//
|
//
|
||||||
// I pity the fool who adds more gametypes later, because it'll require some element of randomisation which needs to be synched...
|
// I pity the fool who adds more gametypes later, because it'll require some element of randomisation which needs to be synched...
|
||||||
|
// Although given this only gets called for the host, you could probably get away with M_Random.
|
||||||
//
|
//
|
||||||
INT16 G_SometimesGetDifferentGametype(void)
|
INT16 G_SometimesGetDifferentGametype(void)
|
||||||
{
|
{
|
||||||
|
@ -3067,13 +3061,16 @@ INT16 G_SometimesGetDifferentGametype(void)
|
||||||
// G_GetGametypeColor
|
// G_GetGametypeColor
|
||||||
//
|
//
|
||||||
// Pretty and consistent ^u^
|
// Pretty and consistent ^u^
|
||||||
|
// See also M_GetGametypeColor.
|
||||||
//
|
//
|
||||||
UINT8 G_GetGametypeColor(INT16 gt)
|
UINT8 G_GetGametypeColor(INT16 gt)
|
||||||
{
|
{
|
||||||
|
if (modeattacking) // == ATTACKING_RECORD)
|
||||||
|
return orangemap[120];
|
||||||
if (gt == GT_MATCH)
|
if (gt == GT_MATCH)
|
||||||
return 128; // red
|
return redmap[120];
|
||||||
if (gt == GT_RACE)
|
if (gt == GT_RACE)
|
||||||
return 215; // sky blue
|
return skymap[120];
|
||||||
return 247; // FALLBACK
|
return 247; // FALLBACK
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3991,6 +3988,13 @@ void G_DeferedInitNew(boolean pultmode, const char *mapname, INT32 pickedchar, U
|
||||||
|
|
||||||
if (demoplayback)
|
if (demoplayback)
|
||||||
COM_BufAddText("stopdemo\n");
|
COM_BufAddText("stopdemo\n");
|
||||||
|
|
||||||
|
while (ghosts)
|
||||||
|
{
|
||||||
|
demoghost *next = ghosts->next;
|
||||||
|
Z_Free(ghosts);
|
||||||
|
ghosts = next;
|
||||||
|
}
|
||||||
ghosts = NULL;
|
ghosts = NULL;
|
||||||
|
|
||||||
for (i = 0; i < NUMMAPS+1; i++)
|
for (i = 0; i < NUMMAPS+1; i++)
|
||||||
|
@ -4890,6 +4894,7 @@ void G_GhostTicker(void)
|
||||||
p->next = g->next;
|
p->next = g->next;
|
||||||
else
|
else
|
||||||
ghosts = g->next;
|
ghosts = g->next;
|
||||||
|
Z_Free(g);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
p = g;
|
p = g;
|
||||||
|
@ -5832,29 +5837,27 @@ void G_AddGhost(char *defdemoname)
|
||||||
mthing = playerstarts[0];
|
mthing = playerstarts[0];
|
||||||
I_Assert(mthing);
|
I_Assert(mthing);
|
||||||
{ // A bit more complex than P_SpawnPlayer because ghosts aren't solid and won't just push themselves out of the ceiling.
|
{ // A bit more complex than P_SpawnPlayer because ghosts aren't solid and won't just push themselves out of the ceiling.
|
||||||
fixed_t x,y,z;
|
fixed_t z,f,c;
|
||||||
sector_t *sector;
|
gh->mo = P_SpawnMobj(mthing->x << FRACBITS, mthing->y << FRACBITS, 0, MT_GHOST);
|
||||||
x = mthing->x << FRACBITS;
|
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
||||||
y = mthing->y << FRACBITS;
|
f = gh->mo->floorz;
|
||||||
sector = R_PointInSubsector(x, y)->sector;
|
c = gh->mo->ceilingz - mobjinfo[MT_PLAYER].height;
|
||||||
if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
if (!!(mthing->options & MTF_AMBUSH) ^ !!(mthing->options & MTF_OBJECTFLIP))
|
||||||
{
|
{
|
||||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
z = c;
|
||||||
if (mthing->options >> ZSHIFT)
|
if (mthing->options >> ZSHIFT)
|
||||||
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
z -= ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
if (z < sector->floorheight)
|
if (z < f)
|
||||||
z = sector->floorheight;
|
z = f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
z = sector->floorheight;
|
z = f;
|
||||||
if (mthing->options >> ZSHIFT)
|
if (mthing->options >> ZSHIFT)
|
||||||
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
z += ((mthing->options >> ZSHIFT) << FRACBITS);
|
||||||
if (z > sector->ceilingheight - mobjinfo[MT_PLAYER].height)
|
if (z > c)
|
||||||
z = sector->ceilingheight - mobjinfo[MT_PLAYER].height;
|
z = c;
|
||||||
}
|
}
|
||||||
gh->mo = P_SpawnMobj(x, y, z, MT_GHOST);
|
|
||||||
gh->mo->angle = FixedAngle(mthing->angle*FRACUNIT);
|
|
||||||
}
|
}
|
||||||
gh->mo->state = states+S_KART_STND1; // SRB2kart - was S_PLAY_STND
|
gh->mo->state = states+S_KART_STND1; // SRB2kart - was S_PLAY_STND
|
||||||
gh->mo->sprite = gh->mo->state->sprite;
|
gh->mo->sprite = gh->mo->state->sprite;
|
||||||
|
@ -6052,8 +6055,13 @@ boolean G_CheckDemoStatus(void)
|
||||||
{
|
{
|
||||||
boolean saved;
|
boolean saved;
|
||||||
|
|
||||||
if(ghosts) // ... ... ...
|
while (ghosts)
|
||||||
ghosts = NULL; // :)
|
{
|
||||||
|
demoghost *next = ghosts->next;
|
||||||
|
Z_Free(ghosts);
|
||||||
|
ghosts = next;
|
||||||
|
}
|
||||||
|
ghosts = NULL;
|
||||||
|
|
||||||
// DO NOT end metal sonic demos here
|
// DO NOT end metal sonic demos here
|
||||||
|
|
||||||
|
|
11
src/g_game.h
11
src/g_game.h
|
@ -167,6 +167,17 @@ void G_WriteMetalTic(mobj_t *metal);
|
||||||
void G_SaveMetal(UINT8 **buffer);
|
void G_SaveMetal(UINT8 **buffer);
|
||||||
void G_LoadMetal(UINT8 **buffer);
|
void G_LoadMetal(UINT8 **buffer);
|
||||||
|
|
||||||
|
// Your naming conventions are stupid and useless.
|
||||||
|
// There is no conflict here.
|
||||||
|
typedef struct demoghost {
|
||||||
|
UINT8 checksum[16];
|
||||||
|
UINT8 *buffer, *p, color;
|
||||||
|
UINT16 version;
|
||||||
|
mobj_t oldmo, *mo;
|
||||||
|
struct demoghost *next;
|
||||||
|
} demoghost;
|
||||||
|
extern demoghost *ghosts;
|
||||||
|
|
||||||
void G_DoPlayDemo(char *defdemoname);
|
void G_DoPlayDemo(char *defdemoname);
|
||||||
void G_TimeDemo(const char *name);
|
void G_TimeDemo(const char *name);
|
||||||
void G_AddGhost(char *defdemoname);
|
void G_AddGhost(char *defdemoname);
|
||||||
|
|
52
src/k_kart.c
52
src/k_kart.c
|
@ -5050,7 +5050,7 @@ void K_ReloadSkinIconGraphics(void)
|
||||||
K_LoadIconGraphics(skins[i].iconprefix, i);
|
K_LoadIconGraphics(skins[i].iconprefix, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flags, patch_t *AutomapPic)
|
static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags, patch_t *AutomapPic)
|
||||||
{
|
{
|
||||||
// amnum xpos & ypos are the icon's speed around the HUD.
|
// amnum xpos & ypos are the icon's speed around the HUD.
|
||||||
// The number being divided by is for how fast it moves.
|
// The number being divided by is for how fast it moves.
|
||||||
|
@ -5059,6 +5059,11 @@ static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flag
|
||||||
// am xpos & ypos are the icon's starting position. Withouht
|
// am xpos & ypos are the icon's starting position. Withouht
|
||||||
// it, they wouldn't 'spawn' on the top-right side of the HUD.
|
// it, they wouldn't 'spawn' on the top-right side of the HUD.
|
||||||
|
|
||||||
|
UINT8 skin = 0;
|
||||||
|
|
||||||
|
if (mo->skin)
|
||||||
|
skin = ((skin_t*)mo->skin)-skins;
|
||||||
|
|
||||||
fixed_t amnumxpos;
|
fixed_t amnumxpos;
|
||||||
fixed_t amnumypos;
|
fixed_t amnumypos;
|
||||||
INT32 amxpos;
|
INT32 amxpos;
|
||||||
|
@ -5102,32 +5107,28 @@ static void K_drawKartMinimapHead(player_t *player, INT32 x, INT32 y, INT32 flag
|
||||||
fixed_t yscale = FixedDiv(AutomapPic->height, mapheight);
|
fixed_t yscale = FixedDiv(AutomapPic->height, mapheight);
|
||||||
fixed_t zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
|
fixed_t zoom = FixedMul(min(xscale, yscale), FRACUNIT-FRACUNIT/20);
|
||||||
|
|
||||||
amnumxpos = (FixedMul(player->mo->x, zoom) - FixedMul(xoffset, zoom));
|
amnumxpos = (FixedMul(mo->x, zoom) - FixedMul(xoffset, zoom));
|
||||||
amnumypos = -(FixedMul(player->mo->y, zoom) - FixedMul(yoffset, zoom));
|
amnumypos = -(FixedMul(mo->y, zoom) - FixedMul(yoffset, zoom));
|
||||||
|
|
||||||
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (iconprefix[player->skin]->width/2))<<FRACBITS);
|
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (iconprefix[skin]->width/2))<<FRACBITS);
|
||||||
amypos = amnumypos + ((y + AutomapPic->height/2 - (iconprefix[player->skin]->height/2))<<FRACBITS);
|
amypos = amnumypos + ((y + AutomapPic->height/2 - (iconprefix[skin]->height/2))<<FRACBITS);
|
||||||
|
|
||||||
if (mirrormode)
|
if (mirrormode)
|
||||||
{
|
{
|
||||||
flags |= V_FLIP;
|
flags |= V_FLIP;
|
||||||
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (iconprefix[player->skin]->width/2))<<FRACBITS);
|
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (iconprefix[skin]->width/2))<<FRACBITS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!player->skincolor) // 'default' color
|
if (!mo->color) // 'default' color
|
||||||
V_DrawSciencePatch(amxpos, amypos, flags, iconprefix[player->skin], FRACUNIT);
|
V_DrawSciencePatch(amxpos, amypos, flags, iconprefix[skin], FRACUNIT);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UINT8 *colormap;
|
UINT8 *colormap;
|
||||||
if (player->mo->colorized)
|
if (mo->colorized)
|
||||||
{
|
colormap = R_GetTranslationColormap(TC_RAINBOW, mo->color, 0);
|
||||||
colormap = R_GetTranslationColormap(TC_RAINBOW, player->mo->color, 0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
colormap = R_GetTranslationColormap(skin, mo->color, 0);
|
||||||
colormap = R_GetTranslationColormap(player->skin, player->mo->color, 0);
|
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, iconprefix[skin], colormap);
|
||||||
}
|
|
||||||
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, iconprefix[player->skin], colormap);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5191,6 +5192,20 @@ static void K_drawKartMinimap(void)
|
||||||
y -= SHORT(AutomapPic->topoffset);
|
y -= SHORT(AutomapPic->topoffset);
|
||||||
|
|
||||||
// Player's tiny icons on the Automap. (drawn opposite direction so player 1 is drawn last in splitscreen)
|
// Player's tiny icons on the Automap. (drawn opposite direction so player 1 is drawn last in splitscreen)
|
||||||
|
if (ghosts)
|
||||||
|
{
|
||||||
|
demoghost *g = ghosts;
|
||||||
|
while (g)
|
||||||
|
{
|
||||||
|
K_drawKartMinimapHead(g->mo, x, y, splitflags, AutomapPic);
|
||||||
|
g = g->next;
|
||||||
|
}
|
||||||
|
if (!stplyr->mo || stplyr->spectator) // do we need the latter..?
|
||||||
|
return;
|
||||||
|
dop1later = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for (i = MAXPLAYERS-1; i >= 0; i--)
|
for (i = MAXPLAYERS-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (!playeringame[i])
|
if (!playeringame[i])
|
||||||
|
@ -5214,7 +5229,8 @@ static void K_drawKartMinimap(void)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
K_drawKartMinimapHead(&players[i], x, y, splitflags, AutomapPic);
|
K_drawKartMinimapHead(players[i].mo, x, y, splitflags, AutomapPic);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dop1later)
|
if (!dop1later)
|
||||||
|
@ -5222,7 +5238,7 @@ static void K_drawKartMinimap(void)
|
||||||
|
|
||||||
splitflags &= ~V_HUDTRANSHALF;
|
splitflags &= ~V_HUDTRANSHALF;
|
||||||
splitflags |= V_HUDTRANS;
|
splitflags |= V_HUDTRANS;
|
||||||
K_drawKartMinimapHead(stplyr, x, y, splitflags, AutomapPic);
|
K_drawKartMinimapHead(stplyr->mo, x, y, splitflags, AutomapPic);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_drawBattleFullscreen(void)
|
static void K_drawBattleFullscreen(void)
|
||||||
|
|
672
src/m_menu.c
672
src/m_menu.c
File diff suppressed because it is too large
Load diff
|
@ -819,7 +819,7 @@ static void ST_drawLevelTitle(void)
|
||||||
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
else if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOZONE))
|
||||||
V_DrawLevelTitle(zonexpos, bary+6, 0, M_GetText("ZONE"));
|
V_DrawLevelTitle(zonexpos, bary+6, 0, M_GetText("ZONE"));
|
||||||
|
|
||||||
if (strlen(actnum) > 0)
|
if (actnum[0])
|
||||||
V_DrawLevelTitle(ttlnumxpos+12, bary+6, 0, actnum);
|
V_DrawLevelTitle(ttlnumxpos+12, bary+6, 0, actnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -450,21 +450,29 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
y = FixedMul(y,dupy<<FRACBITS);
|
y = FixedMul(y,dupy<<FRACBITS);
|
||||||
x >>= FRACBITS;
|
x >>= FRACBITS;
|
||||||
y >>= FRACBITS;
|
y >>= FRACBITS;
|
||||||
desttop += (y*vid.width) + x;
|
|
||||||
|
|
||||||
// Center it if necessary
|
// Center it if necessary
|
||||||
if (!(scrn & V_SCALEPATCHMASK))
|
if (!(scrn & V_SCALEPATCHMASK))
|
||||||
{
|
{
|
||||||
|
// if it's meant to cover the whole screen, black out the rest
|
||||||
|
if (x == 0 && FixedMul(SHORT(patch->width)<<FRACBITS, pscale)>>FRACBITS == BASEVIDWIDTH
|
||||||
|
&& y == 0 && FixedMul(SHORT(patch->height)<<FRACBITS, pscale)>>FRACBITS == BASEVIDHEIGHT)
|
||||||
|
{
|
||||||
|
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
||||||
|
source = (const UINT8 *)(column) + 3;
|
||||||
|
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
||||||
|
}
|
||||||
|
|
||||||
if (vid.width != BASEVIDWIDTH * dupx)
|
if (vid.width != BASEVIDWIDTH * dupx)
|
||||||
{
|
{
|
||||||
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
|
||||||
// so center this imaginary screen
|
// so center this imaginary screen
|
||||||
if ((scrn & (V_HORZSCREEN|V_SNAPTOLEFT)) == (V_HORZSCREEN|V_SNAPTOLEFT))
|
if ((scrn & (V_HORZSCREEN|V_SNAPTOLEFT)) == (V_HORZSCREEN|V_SNAPTOLEFT))
|
||||||
desttop += (vid.width/2 - (BASEVIDWIDTH/2 * dupx));
|
x += (vid.width/2 - (BASEVIDWIDTH/2 * dupx));
|
||||||
else if (scrn & V_SNAPTORIGHT)
|
else if (scrn & V_SNAPTORIGHT)
|
||||||
desttop += (vid.width - (BASEVIDWIDTH * dupx));
|
x += (vid.width - (BASEVIDWIDTH * dupx));
|
||||||
else if (!(scrn & V_SNAPTOLEFT))
|
else if (!(scrn & V_SNAPTOLEFT))
|
||||||
desttop += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
|
||||||
}
|
}
|
||||||
if (vid.height != BASEVIDHEIGHT * dupy)
|
if (vid.height != BASEVIDHEIGHT * dupy)
|
||||||
{
|
{
|
||||||
|
@ -476,15 +484,9 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
|
||||||
else if (!(scrn & V_SNAPTOTOP))
|
else if (!(scrn & V_SNAPTOTOP))
|
||||||
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
desttop += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
|
||||||
}
|
}
|
||||||
// if it's meant to cover the whole screen, black out the rest
|
|
||||||
if (x == 0 && FixedMul(SHORT(patch->width)<<FRACBITS, pscale)>>FRACBITS == BASEVIDWIDTH
|
|
||||||
&& y == 0 && FixedMul(SHORT(patch->height)<<FRACBITS, pscale)>>FRACBITS == BASEVIDHEIGHT)
|
|
||||||
{
|
|
||||||
column = (const column_t *)((const UINT8 *)(patch) + LONG(patch->columnofs[0]));
|
|
||||||
source = (const UINT8 *)(column) + 3;
|
|
||||||
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, (column->topdelta == 0xff ? 31 : source[0]));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
desttop += (y*vid.width) + x;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pscale != FRACUNIT) // scale width properly
|
if (pscale != FRACUNIT) // scale width properly
|
||||||
|
@ -1118,7 +1120,7 @@ void V_DrawFadeConsBack(INT32 plines)
|
||||||
|
|
||||||
// Gets string colormap, used for 0x80 color codes
|
// Gets string colormap, used for 0x80 color codes
|
||||||
//
|
//
|
||||||
static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||||
{
|
{
|
||||||
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
|
||||||
{
|
{
|
||||||
|
@ -1136,6 +1138,8 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
|
||||||
return graymap;
|
return graymap;
|
||||||
case 7: // 0x87, orange
|
case 7: // 0x87, orange
|
||||||
return orangemap;
|
return orangemap;
|
||||||
|
case 8: // 0x88, sky
|
||||||
|
return skymap;
|
||||||
default: // reset
|
default: // reset
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ extern UINT8 hudtrans;
|
||||||
#define V_REDMAP 0x00005000
|
#define V_REDMAP 0x00005000
|
||||||
#define V_GRAYMAP 0x00006000
|
#define V_GRAYMAP 0x00006000
|
||||||
#define V_ORANGEMAP 0x00007000
|
#define V_ORANGEMAP 0x00007000
|
||||||
|
#define V_SKYMAP 0x00008000
|
||||||
|
|
||||||
// use bits 17-20 for alpha transparency
|
// use bits 17-20 for alpha transparency
|
||||||
#define V_ALPHASHIFT 16
|
#define V_ALPHASHIFT 16
|
||||||
|
@ -153,6 +154,7 @@ void V_DrawFadeConsBack(INT32 plines);
|
||||||
|
|
||||||
// draw a single character
|
// draw a single character
|
||||||
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed);
|
||||||
|
const UINT8 *V_GetStringColormap(INT32 colorflags);
|
||||||
|
|
||||||
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
|
void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue