diff --git a/src/command.c b/src/command.c index a159ebcd..3ac1abb1 100644 --- a/src/command.c +++ b/src/command.c @@ -63,9 +63,6 @@ CV_PossibleValue_t CV_Unsigned[] = {{0, "MIN"}, {999999999, "MAX"}, {0, NULL}}; CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}}; //SRB2kart -/*CV_PossibleValue_t karthud_cons_t[] = { - {0, "Off"}, {1, "Default"}, {2, "SMK"}, {3, "MK64"}, - {0, NULL}};*/ CV_PossibleValue_t kartspeed_cons_t[] = { {0, "Easy"}, {1, "Normal"}, {2, "Hard"}, {0, NULL}}; diff --git a/src/command.h b/src/command.h index 0c2ef912..dbac8bd8 100644 --- a/src/command.h +++ b/src/command.h @@ -127,7 +127,6 @@ extern CV_PossibleValue_t CV_Unsigned[]; extern CV_PossibleValue_t CV_Natural[]; // SRB2kart -//extern CV_PossibleValue_t karthud_cons_t[]; extern CV_PossibleValue_t kartspeed_cons_t[]; // register a variable for use at the console diff --git a/src/d_netcmd.c b/src/d_netcmd.c index fa2d0032..e79224c4 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -344,7 +344,6 @@ consvar_t cv_tripleorbinaut = {"tripleorbinaut", "On", CV_NETVAR|CV_CHEAT, C consvar_t cv_quadorbinaut = {"quadorbinaut", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_dualjawz = {"dualjawz", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -//consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; static CV_PossibleValue_t kartminimap_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}}; consvar_t cv_kartminimap = {"kartminimap", "4", CV_SAVE, kartminimap_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 66c712c5..0a1cc3b7 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -117,7 +117,6 @@ extern consvar_t cv_thundershield, cv_hyudoro, cv_pogospring, cv_kitchensink; extern consvar_t cv_triplesneaker, cv_triplebanana, cv_decabanana; extern consvar_t cv_tripleorbinaut, cv_quadorbinaut, cv_dualjawz; -//extern consvar_t cv_karthud; extern consvar_t cv_kartminimap; extern consvar_t cv_kartcheck; extern consvar_t cv_kartinvinsfx; diff --git a/src/dehacked.c b/src/dehacked.c index 576695d0..43c9c78b 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6247,6 +6247,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_DRIFTDUST3", "S_DRIFTDUST4", + // Fast lines + "S_FASTLINE1", + "S_FASTLINE2", + "S_FASTLINE3", + "S_FASTLINE4", + "S_FASTLINE5", + + // Fast dust release + "S_FASTDUST1", + "S_FASTDUST2", + "S_FASTDUST3", + "S_FASTDUST4", + "S_FASTDUST5", + "S_FASTDUST6", + "S_FASTDUST7", + // Thunder Shield Burst // Sneaker boost effect @@ -7220,6 +7236,8 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_RANDOMITEMPOP", "MT_RINGSPARKLE", + "MT_FASTLINE", + "MT_FASTDUST", "MT_BOOSTFLAME", "MT_BOOSTSMOKE", "MT_SNEAKERTRAIL", @@ -7547,66 +7565,66 @@ static const char *COLOR_ENUMS[] = { // Rejigged for Kart. "NONE", // 00 // SKINCOLOR_NONE "WHITE", // 01 // SKINCOLOR_WHITE "SILVER", // 02 // SKINCOLOR_SILVER - "CLOUDY", // 03 // SKINCOLOR_CLOUDY - "GREY", // 04 // SKINCOLOR_GREY + "GREY", // 03 // SKINCOLOR_GREY + "NICKEL", // 04 // SKINCOLOR_NICKEL "BLACK", // 05 // SKINCOLOR_BLACK - "SALMON", // 06 // SKINCOLOR_SALMON - "PINK", // 07 // SKINCOLOR_PINK - "ROSE", // 08 // SKINCOLOR_ROSE - "RASPBERRY", // 09 // SKINCOLOR_RASPBERRY - "RED", // 10 // SKINCOLOR_RED - "RUBY", // 11 // SKINCOLOR_RUBY - "CRIMSON", // 12 // SKINCOLOR_CRIMSON - "KETCHUP", // 13 // SKINCOLOR_KETCHUP - "DAWN", // 14 // SKINCOLOR_DAWN - "CREAMSICLE", // 15 // SKINCOLOR_CREAMSICLE - "ORANGE", // 16 // SKINCOLOR_ORANGE - "PUMPKIN", // 17 // SKINCOLOR_PUMPKIN - "ROSEWOOD", // 18 // SKINCOLOR_ROSEWOOD - "BURGUNDY", // 19 // SKINCOLOR_BURGUNDY - "BRONZE", // 20 // SKINCOLOR_BRONZE - "SEPIA", // 21 // SKINCOLOR_SEPIA - "BEIGE", // 22 // SKINCOLOR_BEIGE - "BROWN", // 23 // SKINCOLOR_BROWN - "LEATHER", // 24 // SKINCOLOR_LEATHER + "SEPIA", // 06 // SKINCOLOR_SEPIA + "BEIGE", // 07 // SKINCOLOR_BEIGE + "BROWN", // 08 // SKINCOLOR_BROWN + "LEATHER", // 09 // SKINCOLOR_LEATHER + "SALMON", // 10 // SKINCOLOR_SALMON + "PINK", // 11 // SKINCOLOR_PINK + "ROSE", // 12 // SKINCOLOR_ROSE + "RASPBERRY", // 13 // SKINCOLOR_RASPBERRY + "RED", // 14 // SKINCOLOR_RED + "RUBY", // 15 // SKINCOLOR_RUBY + "CRIMSON", // 16 // SKINCOLOR_CRIMSON + "KETCHUP", // 17 // SKINCOLOR_KETCHUP + "DAWN", // 18 // SKINCOLOR_DAWN + "CREAMSICLE", // 19 // SKINCOLOR_CREAMSICLE + "ORANGE", // 20 // SKINCOLOR_ORANGE + "PUMPKIN", // 21 // SKINCOLOR_PUMPKIN + "ROSEWOOD", // 22 // SKINCOLOR_ROSEWOOD + "BURGUNDY", // 23 // SKINCOLOR_BURGUNDY + "TANGERINE", // 24 // SKINCOLOR_TANGERINE "PEACH", // 25 // SKINCOLOR_PEACH "CARAMEL", // 26 // SKINCOLOR_CARAMEL - "TANGERINE", // 27 // SKINCOLOR_TANGERINE - "GOLD", // 28 // SKINCOLOR_GOLD - "VOMIT", // 29 // SKINCOLOR_VOMIT - "YELLOW", // 30 // SKINCOLOR_YELLOW - "MUSTARD", // 31 // SKINCOLOR_MUSTARD - "OLIVE", // 32 // SKINCOLOR_OLIVE + "GOLD", // 27 // SKINCOLOR_GOLD + "BRONZE", // 28 // SKINCOLOR_BRONZE + "YELLOW", // 29 // SKINCOLOR_YELLOW + "MUSTARD", // 30 // SKINCOLOR_MUSTARD + "OLIVE", // 31 // SKINCOLOR_OLIVE + "VOMIT", // 32 // SKINCOLOR_VOMIT "GARDEN", // 33 // SKINCOLOR_GARDEN "LIME", // 34 // SKINCOLOR_LIME "DREAM", // 35 // SKINCOLOR_DREAM "TEA", // 36 // SKINCOLOR_TEA "PISTACHIO", // 37 // SKINCOLOR_PISTACHIO - "MOSS", // 38 // SKINCOLOR_MOSS - "MINT", // 39 // SKINCOLOR_MINT - "GREEN", // 40 // SKINCOLOR_GREEN - "ROBOHOOD", // 41 // SKINCOLOR_ROBOHOOD + "ROBOHOOD", // 38 // SKINCOLOR_ROBOHOOD + "MOSS", // 39 // SKINCOLOR_MOSS + "MINT", // 40 // SKINCOLOR_MINT + "GREEN", // 41 // SKINCOLOR_GREEN "PINETREE", // 42 // SKINCOLOR_PINETREE "EMERALD", // 43 // SKINCOLOR_EMERALD "SWAMP", // 44 // SKINCOLOR_SWAMP "AQUA", // 45 // SKINCOLOR_AQUA "TEAL", // 46 // SKINCOLOR_TEAL "CYAN", // 47 // SKINCOLOR_CYAN - "CERULEAN", // 48 // SKINCOLOR_CERULEAN - "JAWZ", // 49 // SKINCOLOR_JAWZ - "SLATE", // 50 // SKINCOLOR_SLATE - "STEEL", // 51 // SKINCOLOR_STEEL - "PERIWINKLE", // 52 // SKINCOLOR_PERIWINKLE - "BLUE", // 53 // SKINCOLOR_BLUE - "SAPPHIRE", // 54 // SKINCOLOR_SAPPHIRE - "BLUEBERRY", // 55 // SKINCOLOR_BLUEBERRY - "NAVY", // 56 // SKINCOLOR_NAVY - "JET", // 57 // SKINCOLOR_JET + "JAWZ", // 48 // SKINCOLOR_JAWZ + "CERULEAN", // 49 // SKINCOLOR_CERULEAN + "NAVY", // 50 // SKINCOLOR_NAVY + "SLATE", // 51 // SKINCOLOR_SLATE + "STEEL", // 52 // SKINCOLOR_STEEL + "JET", // 53 // SKINCOLOR_JET + "PERIWINKLE", // 54 // SKINCOLOR_PERIWINKLE + "BLUE", // 55 // SKINCOLOR_BLUE + "SAPPHIRE", // 56 // SKINCOLOR_SAPPHIRE + "BLUEBERRY", // 57 // SKINCOLOR_BLUEBERRY "DUSK", // 58 // SKINCOLOR_DUSK "PURPLE", // 59 // SKINCOLOR_PURPLE "LAVENDER", // 60 // SKINCOLOR_LAVENDER - "INDIGO", // 61 // SKINCOLOR_INDIGO - "BYZANTIUM", // 62 // SKINCOLOR_BYZANTIUM + "BYZANTIUM", // 61 // SKINCOLOR_BYZANTIUM + "POMEGRANATE", // 62 // SKINCOLOR_POMEGRANATE "LILAC", // 63 // SKINCOLOR_LILAC // Super special awesome Super flashing colors! diff --git a/src/doomdef.h b/src/doomdef.h index 2e15cb7e..b5519f6f 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -234,9 +234,13 @@ typedef enum SKINCOLOR_NONE = 0, SKINCOLOR_WHITE, SKINCOLOR_SILVER, - SKINCOLOR_CLOUDY, SKINCOLOR_GREY, + SKINCOLOR_NICKEL, SKINCOLOR_BLACK, + SKINCOLOR_SEPIA, + SKINCOLOR_BEIGE, + SKINCOLOR_BROWN, + SKINCOLOR_LEATHER, SKINCOLOR_SALMON, SKINCOLOR_PINK, SKINCOLOR_ROSE, @@ -251,49 +255,45 @@ typedef enum SKINCOLOR_PUMPKIN, SKINCOLOR_ROSEWOOD, SKINCOLOR_BURGUNDY, - SKINCOLOR_BRONZE, - SKINCOLOR_SEPIA, - SKINCOLOR_BEIGE, - SKINCOLOR_BROWN, - SKINCOLOR_LEATHER, + SKINCOLOR_TANGERINE, SKINCOLOR_PEACH, SKINCOLOR_CARAMEL, - SKINCOLOR_TANGERINE, SKINCOLOR_GOLD, - SKINCOLOR_VOMIT, + SKINCOLOR_BRONZE, SKINCOLOR_YELLOW, SKINCOLOR_MUSTARD, SKINCOLOR_OLIVE, + SKINCOLOR_VOMIT, SKINCOLOR_GARDEN, SKINCOLOR_LIME, SKINCOLOR_DREAM, SKINCOLOR_TEA, SKINCOLOR_PISTACHIO, + SKINCOLOR_ROBOHOOD, SKINCOLOR_MOSS, SKINCOLOR_MINT, SKINCOLOR_GREEN, - SKINCOLOR_ROBOHOOD, SKINCOLOR_PINETREE, SKINCOLOR_EMERALD, SKINCOLOR_SWAMP, SKINCOLOR_AQUA, SKINCOLOR_TEAL, SKINCOLOR_CYAN, - SKINCOLOR_CERULEAN, SKINCOLOR_JAWZ, // Oni's torment + SKINCOLOR_CERULEAN, + SKINCOLOR_NAVY, SKINCOLOR_SLATE, SKINCOLOR_STEEL, + SKINCOLOR_JET, SKINCOLOR_PERIWINKLE, SKINCOLOR_BLUE, SKINCOLOR_SAPPHIRE, // sweet mother, i cannot weave – slender aphrodite has overcome me with longing for a girl SKINCOLOR_BLUEBERRY, - SKINCOLOR_NAVY, - SKINCOLOR_JET, SKINCOLOR_DUSK, SKINCOLOR_PURPLE, SKINCOLOR_LAVENDER, - SKINCOLOR_INDIGO, SKINCOLOR_BYZANTIUM, + SKINCOLOR_POMEGRANATE, SKINCOLOR_LILAC, // Careful! MAXSKINCOLORS cannot be greater than 0x40 -- Which it is now. diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 9dbf37dc..f1c5e555 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -5581,7 +5581,7 @@ static void HWR_DrawSkyBackground(player_t *player) // 0--1 (void)player; - HWR_GetTexture(skytexture); + HWR_GetTexture(texturetranslation[skytexture]); //Hurdler: the sky is the only texture who need 4.0f instead of 1.0 // because it's called just after clearing the screen @@ -5601,7 +5601,7 @@ static void HWR_DrawSkyBackground(player_t *player) // The only time this will probably be an issue is when a sky wider than 1024 is used as a sky AND a regular wall texture angle = (dup_viewangle + gr_xtoviewangle[0]); - dimensionmultiply = ((float)textures[skytexture]->width/256.0f); + dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->width/256.0f); if (atransform.mirror) { @@ -5616,7 +5616,7 @@ static void HWR_DrawSkyBackground(player_t *player) angle = aimingangle; aspectratio = (float)vid.width/(float)vid.height; - dimensionmultiply = ((float)textures[skytexture]->height/(128.0f*aspectratio)); + dimensionmultiply = ((float)textures[texturetranslation[skytexture]]->height/(128.0f*aspectratio)); angleturn = (((float)ANGLE_45-1.0f)*aspectratio)*dimensionmultiply; // Middle of the sky should always be at angle 0 diff --git a/src/hardware/hw_md2.c b/src/hardware/hw_md2.c index 2446b023..145a0150 100644 --- a/src/hardware/hw_md2.c +++ b/src/hardware/hw_md2.c @@ -948,6 +948,15 @@ spritemd2found: fclose(f); } +// Define for getting accurate color brightness readings according to how the human eye sees them. +// https://en.wikipedia.org/wiki/Relative_luminance +// 0.2126 to red +// 0.7152 to green +// 0.0722 to blue +// (See this same define in k_kart.c!) +#define SETBRIGHTNESS(brightness,r,g,b) \ + brightness = (UINT8)(((1063*((UINT16)r)/5000) + (3576*((UINT16)g)/5000) + (361*((UINT16)b)/5000)) / 3) + static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, GLMipmap_t *grmip, INT32 skinnum, skincolors_t color) { UINT8 i; @@ -978,40 +987,26 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, // Average all of the translation's colors { - UINT16 r, g, b; - UINT8 div = 0; + const UINT8 div = 6; + const UINT8 start = 4; + UINT32 r, g, b; - blendcolor = V_GetColor(colortranslations[color][0]); - r = (UINT16)blendcolor.s.red; - g = (UINT16)blendcolor.s.green; - b = (UINT16)blendcolor.s.blue; + blendcolor = V_GetColor(colortranslations[color][start]); + r = (UINT32)(blendcolor.s.red*blendcolor.s.red); + g = (UINT32)(blendcolor.s.green*blendcolor.s.green); + b = (UINT32)(blendcolor.s.blue*blendcolor.s.blue); - for (i = 1; i < 16; i++) + for (i = 1; i < div; i++) { - RGBA_t nextcolor = V_GetColor(colortranslations[color][i]); - UINT8 mul = 1; - // Weight these shades more. Indices 1-9 weren't randomly picked, they are commonly used on sprites and are generally what the colors "look" like - if (i >= 1 && i <= 9) - mul++; - // The mid & dark tons on the minimap icons get weighted even harder - if (i == 4 || i == 6) - mul += 2; - // And the shade between them, why not - if (i == 5) - mul++; - r += (UINT16)(nextcolor.s.red)*mul; - g += (UINT16)(nextcolor.s.green)*mul; - b += (UINT16)(nextcolor.s.blue)*mul; - div += mul; + RGBA_t nextcolor = V_GetColor(colortranslations[color][start+i]); + r += (UINT32)(nextcolor.s.red*nextcolor.s.red); + g += (UINT32)(nextcolor.s.green*nextcolor.s.green); + b += (UINT32)(nextcolor.s.blue*nextcolor.s.blue); } - // This shouldn't happen. - if (div < 1) - div = 1; - - blendcolor.s.red = (UINT8)(r/div); - blendcolor.s.green = (UINT8)(g/div); - blendcolor.s.blue = (UINT8)(b/div); + blendcolor.s.red = (UINT8)(FixedSqrt((r/div)<>FRACBITS); + blendcolor.s.green = (UINT8)(FixedSqrt((g/div)<>FRACBITS); + blendcolor.s.blue = (UINT8)(FixedSqrt((b/div)<>FRACBITS); } // rainbow support, could theoretically support boss ones too @@ -1028,11 +1023,11 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, { UINT32 tempcolor; UINT16 imagebright, blendbright, finalbright, colorbright; - imagebright = (image->s.red+image->s.green+image->s.blue)/3; - blendbright = (blendimage->s.red+blendimage->s.green+blendimage->s.blue)/3; + SETBRIGHTNESS(imagebright,image->s.red,image->s.green,image->s.blue); + SETBRIGHTNESS(blendbright,blendimage->s.red,blendimage->s.green,blendimage->s.blue); // slightly dumb average between the blend image color and base image colour, usually one or the other will be fully opaque anyway finalbright = (imagebright*(255-blendimage->s.alpha))/255 + (blendbright*blendimage->s.alpha)/255; - colorbright = (blendcolor.s.red+blendcolor.s.green+blendcolor.s.blue)/3; + SETBRIGHTNESS(colorbright,blendcolor.s.red,blendcolor.s.green,blendcolor.s.blue); tempcolor = (finalbright*blendcolor.s.red)/colorbright; tempcolor = min(255, tempcolor); @@ -1090,6 +1085,8 @@ static void HWR_CreateBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, return; } +#undef SETBRIGHTNESS + static void HWR_GetBlendedTexture(GLPatch_t *gpatch, GLPatch_t *blendgpatch, INT32 skinnum, const UINT8 *colormap, skincolors_t color) { // mostly copied from HWR_GetMappedPatch, hence the similarities and comment diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 36b2812e..36e4621b 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1366,54 +1366,24 @@ static void HU_drawMiniChat(void) } -// HU_DrawUpArrow -// You see, we don't have arrow graphics in 2.1 and I'm too lazy to include a 2 bytes file for it. - -static void HU_DrawUpArrow(INT32 x, INT32 y, INT32 options) -{ - // Ok I'm super lazy so let's make this as the worst draw function: - V_DrawFill(x+2, y, 1, 1, 103|options); - V_DrawFill(x+1, y+1, 3, 1, 103|options); - V_DrawFill(x, y+2, 5, 1, 103|options); // that's the yellow part, I swear - - V_DrawFill(x+3, y, 1, 1, 26|options); - V_DrawFill(x+4, y+1, 1, 1, 26|options); - V_DrawFill(x+5, y+2, 1, 1, 26|options); - V_DrawFill(x, y+3, 6, 1, 26|options); // that's the black part. no racism intended. i swear. -} - -// HU_DrawDownArrow -// Should we talk about anime waifus to pass the time? This feels retarded. - -static void HU_DrawDownArrow(INT32 x, INT32 y, INT32 options) -{ - // Ok I'm super lazy so let's make this as the worst draw function: - V_DrawFill(x, y, 6, 1, 26|options); - V_DrawFill(x, y+1, 5, 1, 26|options); - V_DrawFill(x+1, y+2, 3, 1, 26|options); - V_DrawFill(x+2, y+3, 1, 1, 26|options); // that's the black part. no racism intended. i swear. - - V_DrawFill(x, y, 5, 1, 103|options); - V_DrawFill(x+1, y+1, 3, 1, 103|options); - V_DrawFill(x+2, y+2, 1, 1, 103|options); // that's the yellow part, I swear -} - // HU_DrawChatLog // TODO: fix dumb word wrapping issues static void HU_drawChatLog(INT32 offset) { + INT32 charwidth = 4, charheight = 6; + INT32 x = chatx+2, y, dx = 0, dy = 0; + UINT32 i = 0; + INT32 chat_topy, chat_bottomy; + boolean atbottom = false; - // before we do anything, make sure that our scroll position isn't "illegal"; + // make sure that our scroll position isn't "illegal"; if (chat_scroll > chat_maxscroll) chat_scroll = chat_maxscroll; - INT32 charwidth = 4, charheight = 6; - INT32 x = chatx+2, y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0), dx = 0, dy = 0; - UINT32 i = 0; - INT32 chat_topy = y + chat_scroll*charheight; - INT32 chat_bottomy = chat_topy + cv_chatheight.value*charheight; - boolean atbottom = false; + y = chaty - offset*charheight - (chat_scroll*charheight) - cv_chatheight.value*charheight - 12 - (cv_kartspeedometer.value ? 16 : 0); + chat_topy = y + chat_scroll*charheight; + chat_bottomy = chat_topy + cv_chatheight.value*charheight; V_DrawFillConsoleMap(chatx, chat_topy, cv_chatwidth.value, cv_chatheight.value*charheight +2, 239|V_SNAPTOBOTTOM|V_SNAPTOLEFT); // log box @@ -1484,9 +1454,15 @@ static void HU_drawChatLog(INT32 offset) // draw arrows to indicate that we can (or not) scroll. if (chat_scroll > 0) - HU_DrawUpArrow(chatx-8, ((justscrolledup) ? (chat_topy-1) : (chat_topy)), V_SNAPTOBOTTOM | V_SNAPTOLEFT); + { + V_DrawCharacter(chatx-9, ((justscrolledup) ? (chat_topy-1) : (chat_topy)), + '\x1A' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // up arrow + } if (chat_scroll < chat_maxscroll) - HU_DrawDownArrow(chatx-8, chat_bottomy-((justscrolleddown) ? 3 : 4), V_SNAPTOBOTTOM | V_SNAPTOLEFT); + { + V_DrawCharacter(chatx-9, chat_bottomy-((justscrolleddown) ? 5 : 6), + '\x1B' | V_SNAPTOBOTTOM | V_SNAPTOLEFT, false); // down arrow + } justscrolleddown = false; justscrolledup = false; diff --git a/src/info.c b/src/info.c index 89c9deb1..70e08f9e 100644 --- a/src/info.c +++ b/src/info.c @@ -55,12 +55,12 @@ char sprnames[NUMSPRITES + 1][5] = "GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI", "SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO", //SRB2kart Sprites - "SPRG","BSPR","RNDM","RPOP","BOST","BOSM","KFRE","KINV","KINF","WIPD", - "DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM","BHOG","BHBM", - "BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE","AUDI","DECO", - "DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB","SHAD","BRNG", - "BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM","ITMO","ITMI", - "ITMN","WANT","PBOM","RETI","VIEW" + "SPRG","BSPR","RNDM","RPOP","FAST","DSHR","BOST","BOSM","KFRE","KINV", + "KINF","WIPD","DRIF","DUST","FITM","BANA","ORBN","JAWZ","SSMN","KRBM", + "BHOG","BHBM","BLIG","LIGH","THNS","SINK","SITR","KBLN","DEZL","POKE", + "AUDI","DECO","DOOD","SNES","GBAS","SPRS","BUZB","CHOM","SACO","CRAB", + "SHAD","BRNG","BUMP","FLEN","CLAS","PSHW","ISTA","ISTB","ARRO","ITEM", + "ITMO","ITMI","ITMN","WANT","PBOM","RETI","VIEW" }; // Doesn't work with g++, needs actionf_p1 (don't modify this comment) @@ -2581,6 +2581,20 @@ state_t states[NUMSTATES] = {SPR_DUST, FF_TRANS20|2, 3, {NULL}, 0, 0, S_DRIFTDUST4}, // S_DRIFTDUST3 {SPR_DUST, FF_TRANS20|3, 3, {NULL}, 0, 0, S_NULL}, // S_DRIFTDUST4 + {SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT, 1, {NULL}, 0, 0, S_FASTLINE2}, // S_FASTLINE1 + {SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|1, 1, {NULL}, 0, 0, S_FASTLINE3}, // S_FASTLINE2 + {SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|2, 1, {NULL}, 0, 0, S_FASTLINE4}, // S_FASTLINE3 + {SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|3, 1, {NULL}, 0, 0, S_FASTLINE5}, // S_FASTLINE4 + {SPR_FAST, FF_PAPERSPRITE|FF_FULLBRIGHT|4, 1, {NULL}, 0, 0, S_NULL}, // S_FASTLINE5 + + {SPR_DSHR, FF_PAPERSPRITE, 1, {NULL}, 0, 0, S_FASTDUST2}, // S_FASTDUST1 + {SPR_DSHR, FF_PAPERSPRITE|1, 1, {NULL}, 0, 0, S_FASTDUST3}, // S_FASTDUST2 + {SPR_DSHR, FF_PAPERSPRITE|2, 1, {NULL}, 0, 0, S_FASTDUST4}, // S_FASTDUST3 + {SPR_DSHR, FF_PAPERSPRITE|3, 1, {NULL}, 0, 0, S_FASTDUST5}, // S_FASTDUST4 + {SPR_DSHR, FF_PAPERSPRITE|4, 1, {NULL}, 0, 0, S_FASTDUST6}, // S_FASTDUST5 + {SPR_DSHR, FF_PAPERSPRITE|5, 1, {NULL}, 0, 0, S_FASTDUST7}, // S_FASTDUST6 + {SPR_DSHR, FF_PAPERSPRITE|6, 1, {NULL}, 0, 0, S_NULL}, // S_FASTDUST7 + {SPR_BOST, FF_FULLBRIGHT|FF_ANIMATE, TICRATE, {NULL}, 6, 1, S_BOOSTSMOKESPAWNER}, // S_BOOSTFLAME {SPR_NULL, 0, TICRATE/2, {NULL}, 0, 0, S_NULL}, // S_BOOSTSMOKESPAWNER @@ -14430,6 +14444,61 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_FASTLINE + -1, // doomednum + S_FASTLINE1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 8, // speed + 14*FRACUNIT, // radius + 14*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + + { // MT_FASTDUST + -1, // doomednum + S_FASTDUST1, // spawnstate + 1000, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 8, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 8, // speed + 14*FRACUNIT, // radius + 14*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOCLIP|MF_NOCLIPHEIGHT|MF_NOGRAVITY, // flags + S_NULL // raisestate +>>>>>>> master + }, + { // MT_BOOSTFLAME -1, // doomednum S_BOOSTFLAME, // spawnstate diff --git a/src/info.h b/src/info.h index 432b3456..c6461f15 100644 --- a/src/info.h +++ b/src/info.h @@ -582,6 +582,8 @@ typedef enum sprite SPR_RNDM, // Random Item Box SPR_RPOP, // Random Item Box Pop + SPR_FAST, // Speed boost trail + SPR_DSHR, // Speed boost dust release SPR_BOST, // Sneaker booster flame SPR_BOSM, // Sneaker booster smoke SPR_KFRE, // Sneaker fire trail @@ -3094,6 +3096,22 @@ typedef enum state S_DRIFTDUST3, S_DRIFTDUST4, + // Fast lines + S_FASTLINE1, + S_FASTLINE2, + S_FASTLINE3, + S_FASTLINE4, + S_FASTLINE5, + + // Fast dust release + S_FASTDUST1, + S_FASTDUST2, + S_FASTDUST3, + S_FASTDUST4, + S_FASTDUST5, + S_FASTDUST6, + S_FASTDUST7, + // Magnet Burst // Sneaker boost effect @@ -4084,6 +4102,8 @@ typedef enum mobj_type MT_RANDOMITEMPOP, MT_RINGSPARKLE, + MT_FASTLINE, + MT_FASTDUST, MT_BOOSTFLAME, MT_BOOSTSMOKE, MT_SNEAKERTRAIL, diff --git a/src/k_kart.c b/src/k_kart.c index a05880da..d923c5c9 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -45,147 +45,151 @@ const char *KartColor_Names[MAXSKINCOLORS] = "None", // 00 // SKINCOLOR_NONE "White", // 01 // SKINCOLOR_WHITE "Silver", // 02 // SKINCOLOR_SILVER - "Cloudy", // 03 // SKINCOLOR_CLOUDY - "Grey", // 04 // SKINCOLOR_GREY + "Grey", // 03 // SKINCOLOR_GREY + "Nickel", // 04 // SKINCOLOR_NICKEL "Black", // 05 // SKINCOLOR_BLACK - "Salmon", // 06 // SKINCOLOR_SALMON - "Pink", // 07 // SKINCOLOR_PINK - "Rose", // 08 // SKINCOLOR_ROSE - "Raspberry", // 09 // SKINCOLOR_RASPBERRY - "Red", // 10 // SKINCOLOR_RED - "Ruby", // 11 // SKINCOLOR_RUBY - "Crimson", // 12 // SKINCOLOR_CRIMSON - "Ketchup", // 13 // SKINCOLOR_KETCHUP - "Dawn", // 14 // SKINCOLOR_DAWN - "Creamsicle", // 15 // SKINCOLOR_CREAMSICLE - "Orange", // 16 // SKINCOLOR_ORANGE - "Pumpkin", // 17 // SKINCOLOR_PUMPKIN - "Rosewood", // 18 // SKINCOLOR_ROSEWOOD - "Burgundy", // 19 // SKINCOLOR_BURGUNDY - "Bronze", // 20 // SKINCOLOR_BRONZE - "Sepia", // 21 // SKINCOLOR_SEPIA - "Beige", // 22 // SKINCOLOR_BEIGE - "Brown", // 23 // SKINCOLOR_BROWN - "Leather", // 24 // SKINCOLOR_LEATHER + "Sepia", // 06 // SKINCOLOR_SEPIA + "Beige", // 07 // SKINCOLOR_BEIGE + "Brown", // 08 // SKINCOLOR_BROWN + "Leather", // 09 // SKINCOLOR_LEATHER + "Salmon", // 10 // SKINCOLOR_SALMON + "Pink", // 11 // SKINCOLOR_PINK + "Rose", // 12 // SKINCOLOR_ROSE + "Raspberry", // 13 // SKINCOLOR_RASPBERRY + "Red", // 14 // SKINCOLOR_RED + "Ruby", // 15 // SKINCOLOR_RUBY + "Crimson", // 16 // SKINCOLOR_CRIMSON + "Ketchup", // 17 // SKINCOLOR_KETCHUP + "Dawn", // 18 // SKINCOLOR_DAWN + "Creamsicle", // 19 // SKINCOLOR_CREAMSICLE + "Orange", // 20 // SKINCOLOR_ORANGE + "Pumpkin", // 21 // SKINCOLOR_PUMPKIN + "Rosewood", // 22 // SKINCOLOR_ROSEWOOD + "Burgundy", // 23 // SKINCOLOR_BURGUNDY + "Tangerine", // 24 // SKINCOLOR_TANGERINE "Peach", // 25 // SKINCOLOR_PEACH "Caramel", // 26 // SKINCOLOR_CARAMEL - "Tangerine", // 27 // SKINCOLOR_TANGERINE - "Gold", // 28 // SKINCOLOR_GOLD - "Vomit", // 29 // SKINCOLOR_VOMIT - "Yellow", // 30 // SKINCOLOR_YELLOW - "Mustard", // 31 // SKINCOLOR_MUSTARD - "Olive", // 32 // SKINCOLOR_OLIVE + "Gold", // 27 // SKINCOLOR_GOLD + "Bronze", // 28 // SKINCOLOR_BRONZE + "Yellow", // 29 // SKINCOLOR_YELLOW + "Mustard", // 30 // SKINCOLOR_MUSTARD + "Olive", // 31 // SKINCOLOR_OLIVE + "Vomit", // 32 // SKINCOLOR_VOMIT "Garden", // 33 // SKINCOLOR_GARDEN "Lime", // 34 // SKINCOLOR_LIME "Dream", // 35 // SKINCOLOR_DREAM "Tea", // 36 // SKINCOLOR_TEA "Pistachio", // 37 // SKINCOLOR_PISTACHIO - "Moss", // 38 // SKINCOLOR_MOSS - "Mint", // 39 // SKINCOLOR_MINT - "Green", // 40 // SKINCOLOR_GREEN - "Robo-Hood", // 41 // SKINCOLOR_ROBOHOOD + "Robo-Hood", // 38 // SKINCOLOR_ROBOHOOD + "Moss", // 39 // SKINCOLOR_MOSS + "Mint", // 40 // SKINCOLOR_MINT + "Green", // 41 // SKINCOLOR_GREEN "Pinetree", // 42 // SKINCOLOR_PINETREE "Emerald", // 43 // SKINCOLOR_EMERALD "Swamp", // 44 // SKINCOLOR_SWAMP "Aqua", // 45 // SKINCOLOR_AQUA "Teal", // 46 // SKINCOLOR_TEAL "Cyan", // 47 // SKINCOLOR_CYAN - "Cerulean", // 48 // SKINCOLOR_CERULEAN - "Jawz", // 49 // SKINCOLOR_JAWZ - "Slate", // 50 // SKINCOLOR_SLATE - "Steel", // 51 // SKINCOLOR_STEEL - "Periwinkle", // 52 // SKINCOLOR_PERIWINKLE - "Blue", // 53 // SKINCOLOR_BLUE - "Sapphire", // 54 // SKINCOLOR_SAPPHIRE - "Blueberry", // 55 // SKINCOLOR_BLUEBERRY - "Navy", // 56 // SKINCOLOR_NAVY - "Jet", // 57 // SKINCOLOR_JET + "Jawz", // 48 // SKINCOLOR_JAWZ + "Cerulean", // 49 // SKINCOLOR_CERULEAN + "Navy", // 50 // SKINCOLOR_NAVY + "Slate", // 51 // SKINCOLOR_SLATE + "Steel", // 52 // SKINCOLOR_STEEL + "Jet", // 53 // SKINCOLOR_JET + "Periwinkle", // 54 // SKINCOLOR_PERIWINKLE + "Blue", // 55 // SKINCOLOR_BLUE + "Sapphire", // 56 // SKINCOLOR_SAPPHIRE + "Blueberry", // 57 // SKINCOLOR_BLUEBERRY "Dusk", // 58 // SKINCOLOR_DUSK "Purple", // 59 // SKINCOLOR_PURPLE "Lavender", // 60 // SKINCOLOR_LAVENDER - "Indigo", // 61 // SKINCOLOR_INDIGO - "Byzantium", // 62 // SKINCOLOR_BYZANTIUM + "Byzantium", // 61 // SKINCOLOR_BYZANTIUM + "Pomegranate", // 62 // SKINCOLOR_POMEGRANATE "Lilac" // 63 // SKINCOLOR_LILAC }; // Color_Opposite replacement; frame setting has not been changed from 8 for most, should be done later const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] = { - SKINCOLOR_NONE,8, // 00 // SKINCOLOR_NONE - SKINCOLOR_BLACK,8, // 01 // SKINCOLOR_WHITE - SKINCOLOR_GREY,8, // 02 // SKINCOLOR_SILVER - SKINCOLOR_CLOUDY,8, // 03 // SKINCOLOR_CLOUDY - SKINCOLOR_SILVER,8, // 04 // SKINCOLOR_GREY - SKINCOLOR_WHITE,8, // 05 // SKINCOLOR_BLACK - SKINCOLOR_TEA,8, // 06 // SKINCOLOR_SALMON - SKINCOLOR_PISTACHIO,8, // 07 // SKINCOLOR_PINK - SKINCOLOR_MOSS,8, // 08 // SKINCOLOR_ROSE - SKINCOLOR_MINT,10, // 09 // SKINCOLOR_RASPBERRY - SKINCOLOR_GREEN,8, // 10 // SKINCOLOR_RED - SKINCOLOR_SAPPHIRE,8, // 11 // SKINCOLOR_RUBY - SKINCOLOR_PINETREE,6, // 12 // SKINCOLOR_CRIMSON - SKINCOLOR_MUSTARD,6, // 13 // SKINCOLOR_KETCHUP - SKINCOLOR_DUSK,8, // 14 // SKINCOLOR_DAWN - SKINCOLOR_PERIWINKLE,8, // 15 // SKINCOLOR_CREAMSICLE - SKINCOLOR_BLUE,8, // 16 // SKINCOLOR_ORANGE - SKINCOLOR_BLUEBERRY,8, // 17 // SKINCOLOR_PUMPKIN - SKINCOLOR_NAVY,8, // 18 // SKINCOLOR_ROSEWOOD - SKINCOLOR_JET,8, // 19 // SKINCOLOR_BURGUNDY - SKINCOLOR_AQUA,8, // 20 // SKINCOLOR_BRONZE - SKINCOLOR_LEATHER,6, // 21 // SKINCOLOR_SEPIA - SKINCOLOR_BROWN,2, // 22 // SKINCOLOR_BEIGE - SKINCOLOR_BEIGE,8, // 23 // SKINCOLOR_BROWN - SKINCOLOR_SEPIA,8, // 24 // SKINCOLOR_LEATHER - SKINCOLOR_SLATE,8, // 25 // SKINCOLOR_PEACH - SKINCOLOR_STEEL,8, // 26 // SKINCOLOR_CARAMEL - SKINCOLOR_LIME,8, // 27 // SKINCOLOR_TANGERINE - SKINCOLOR_CYAN,8, // 28 // SKINCOLOR_GOLD - SKINCOLOR_ROBOHOOD,8, // 29 // SKINCOLOR_VOMIT - SKINCOLOR_CERULEAN,8, // 30 // SKINCOLOR_YELLOW - SKINCOLOR_KETCHUP,8, // 31 // SKINCOLOR_MUSTARD - SKINCOLOR_TEAL,8, // 32 // SKINCOLOR_OLIVE - SKINCOLOR_LAVENDER,8, // 33 // SKINCOLOR_GARDEN - SKINCOLOR_TANGERINE,8, // 34 // SKINCOLOR_LIME - SKINCOLOR_BYZANTIUM,6, // 35 // SKINCOLOR_DREAM - SKINCOLOR_SALMON,8, // 36 // SKINCOLOR_TEA - SKINCOLOR_PINK,8, // 37 // SKINCOLOR_PISTACHIO - SKINCOLOR_ROSE,8, // 38 // SKINCOLOR_MOSS - SKINCOLOR_RASPBERRY,6, // 39 // SKINCOLOR_MINT - SKINCOLOR_RED,8, // 40 // SKINCOLOR_GREEN - SKINCOLOR_VOMIT,8, // 41 // SKINCOLOR_ROBOHOOD - SKINCOLOR_CRIMSON,8, // 42 // SKINCOLOR_PINETREE - SKINCOLOR_PURPLE,8, // 43 // SKINCOLOR_EMERALD - SKINCOLOR_INDIGO,6, // 44 // SKINCOLOR_SWAMP - SKINCOLOR_BRONZE,7, // 45 // SKINCOLOR_AQUA - SKINCOLOR_OLIVE,10, // 46 // SKINCOLOR_TEAL - SKINCOLOR_GOLD,8, // 47 // SKINCOLOR_CYAN - SKINCOLOR_YELLOW,8, // 48 // SKINCOLOR_CERULEAN - SKINCOLOR_LILAC,6, // 49 // SKINCOLOR_JAWZ - SKINCOLOR_PEACH,8, // 50 // SKINCOLOR_SLATE - SKINCOLOR_CARAMEL,8, // 51 // SKINCOLOR_STEEL - SKINCOLOR_CREAMSICLE,8, // 52 // SKINCOLOR_PERIWINKLE - SKINCOLOR_ORANGE,8, // 53 // SKINCOLOR_BLUE - SKINCOLOR_RUBY,8, // 54 // SKINCOLOR_SAPPHIRE - SKINCOLOR_PUMPKIN,8, // 55 // SKINCOLOR_BLUEBERRY - SKINCOLOR_ROSEWOOD,8, // 56 // SKINCOLOR_NAVY - SKINCOLOR_BURGUNDY,6, // 57 // SKINCOLOR_JET - SKINCOLOR_DAWN,8, // 58 // SKINCOLOR_DUSK - SKINCOLOR_EMERALD,8, // 59 // SKINCOLOR_PURPLE - SKINCOLOR_GARDEN,8, // 60 // SKINCOLOR_LAVENDER - SKINCOLOR_SWAMP,6, // 61 // SKINCOLOR_INDIGO - SKINCOLOR_DREAM,8, // 62 // SKINCOLOR_BYZANTIUM - SKINCOLOR_JAWZ,6 // 63 // SKINCOLOR_LILAC + SKINCOLOR_NONE,8, // 00 // SKINCOLOR_NONE + SKINCOLOR_BLACK,8, // 01 // SKINCOLOR_WHITE + SKINCOLOR_NICKEL,8, // 02 // SKINCOLOR_SILVER + SKINCOLOR_GREY,8, // 03 // SKINCOLOR_GREY + SKINCOLOR_SILVER,8, // 04 // SKINCOLOR_NICKEL + SKINCOLOR_WHITE,8, // 05 // SKINCOLOR_BLACK + SKINCOLOR_LEATHER,6, // 06 // SKINCOLOR_SEPIA + SKINCOLOR_BROWN,2, // 07 // SKINCOLOR_BEIGE + SKINCOLOR_BEIGE,8, // 08 // SKINCOLOR_BROWN + SKINCOLOR_SEPIA,8, // 09 // SKINCOLOR_LEATHER + SKINCOLOR_TEA,8, // 10 // SKINCOLOR_SALMON + SKINCOLOR_PISTACHIO,8, // 11 // SKINCOLOR_PINK + SKINCOLOR_MOSS,8, // 12 // SKINCOLOR_ROSE + SKINCOLOR_MINT,10, // 13 // SKINCOLOR_RASPBERRY + SKINCOLOR_GREEN,8, // 14 // SKINCOLOR_RED + SKINCOLOR_SAPPHIRE,8, // 15 // SKINCOLOR_RUBY + SKINCOLOR_PINETREE,6, // 16 // SKINCOLOR_CRIMSON + SKINCOLOR_MUSTARD,6, // 17 // SKINCOLOR_KETCHUP + SKINCOLOR_DUSK,8, // 18 // SKINCOLOR_DAWN + SKINCOLOR_PERIWINKLE,8, // 19 // SKINCOLOR_CREAMSICLE + SKINCOLOR_BLUE,8, // 20 // SKINCOLOR_ORANGE + SKINCOLOR_BLUEBERRY,8, // 21 // SKINCOLOR_PUMPKIN + SKINCOLOR_NAVY,8, // 22 // SKINCOLOR_ROSEWOOD + SKINCOLOR_JET,6, // 23 // SKINCOLOR_BURGUNDY + SKINCOLOR_LIME,8, // 24 // SKINCOLOR_TANGERINE + SKINCOLOR_CYAN,8, // 25 // SKINCOLOR_PEACH + SKINCOLOR_CERULEAN,8, // 26 // SKINCOLOR_CARAMEL + SKINCOLOR_SLATE,8, // 27 // SKINCOLOR_GOLD + SKINCOLOR_STEEL,8, // 28 // SKINCOLOR_BRONZE + SKINCOLOR_AQUA,8, // 29 // SKINCOLOR_YELLOW + SKINCOLOR_KETCHUP,8, // 30 // SKINCOLOR_MUSTARD + SKINCOLOR_TEAL,8, // 31 // SKINCOLOR_OLIVE + SKINCOLOR_ROBOHOOD,8, // 32 // SKINCOLOR_VOMIT + SKINCOLOR_LAVENDER,8, // 33 // SKINCOLOR_GARDEN + SKINCOLOR_TANGERINE,8, // 34 // SKINCOLOR_LIME + SKINCOLOR_POMEGRANATE,8, // 35 // SKINCOLOR_DREAM + SKINCOLOR_SALMON,8, // 36 // SKINCOLOR_TEA + SKINCOLOR_PINK,8, // 37 // SKINCOLOR_PISTACHIO + SKINCOLOR_VOMIT,8, // 38 // SKINCOLOR_ROBOHOOD + SKINCOLOR_ROSE,8, // 39 // SKINCOLOR_MOSS + SKINCOLOR_RASPBERRY,6, // 40 // SKINCOLOR_MINT + SKINCOLOR_RED,8, // 41 // SKINCOLOR_GREEN + SKINCOLOR_CRIMSON,8, // 42 // SKINCOLOR_PINETREE + SKINCOLOR_PURPLE,8, // 43 // SKINCOLOR_EMERALD + SKINCOLOR_BYZANTIUM,6, // 44 // SKINCOLOR_SWAMP + SKINCOLOR_YELLOW,8, // 45 // SKINCOLOR_AQUA + SKINCOLOR_OLIVE,8, // 46 // SKINCOLOR_TEAL + SKINCOLOR_PEACH,8, // 47 // SKINCOLOR_CYAN + SKINCOLOR_LILAC,6, // 48 // SKINCOLOR_JAWZ + SKINCOLOR_CARAMEL,8, // 49 // SKINCOLOR_CERULEAN + SKINCOLOR_ROSEWOOD,8, // 50 // SKINCOLOR_NAVY + SKINCOLOR_GOLD,8, // 51 // SKINCOLOR_SLATE + SKINCOLOR_BRONZE,8, // 52 // SKINCOLOR_STEEL + SKINCOLOR_BURGUNDY,6, // 53 // SKINCOLOR_JET + SKINCOLOR_CREAMSICLE,8, // 54 // SKINCOLOR_PERIWINKLE + SKINCOLOR_ORANGE,8, // 55 // SKINCOLOR_BLUE + SKINCOLOR_RUBY,8, // 56 // SKINCOLOR_SAPPHIRE + SKINCOLOR_PUMPKIN,8, // 57 // SKINCOLOR_BLUEBERRY + SKINCOLOR_DAWN,8, // 58 // SKINCOLOR_DUSK + SKINCOLOR_EMERALD,8, // 59 // SKINCOLOR_PURPLE + SKINCOLOR_GARDEN,8, // 60 // SKINCOLOR_LAVENDER + SKINCOLOR_SWAMP,8, // 61 // SKINCOLOR_BYZANTIUM + SKINCOLOR_DREAM,6, // 62 // SKINCOLOR_POMEGRANATE + SKINCOLOR_JAWZ,6 // 63 // SKINCOLOR_LILAC }; UINT8 colortranslations[MAXSKINCOLORS][16] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, // SKINCOLOR_NONE {120, 120, 120, 120, 0, 1, 3, 4, 6, 7, 10, 14, 18, 22, 25, 28}, // SKINCOLOR_WHITE - { 0, 1, 3, 5, 6, 8, 10, 11, 13, 15, 16, 18, 20, 24, 27, 30}, // SKINCOLOR_SILVER - { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_CLOUDY - { 8, 9, 10, 12, 13, 15, 16, 19, 19, 20, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_GREY + { 0, 1, 2, 4, 5, 7, 8, 10, 13, 15, 18, 20, 23, 25, 28, 30}, // SKINCOLOR_SILVER + { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31}, // SKINCOLOR_GREY + { 12, 14, 16, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}, // SKINCOLOR_NICKEL { 16, 17, 19, 21, 22, 24, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31}, // SKINCOLOR_BLACK + { 0, 1, 3, 5, 7, 9, 34, 36, 38, 40, 42, 44, 60, 61, 62, 63}, // SKINCOLOR_SEPIA + { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}, // SKINCOLOR_BEIGE + { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}, // SKINCOLOR_BROWN + { 51, 52, 53, 55, 56, 57, 58, 60, 61, 63, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_LEATHER {120, 120, 120, 121, 121, 122, 122, 123, 124, 125, 126, 128, 129, 131, 133, 135}, // SKINCOLOR_SALMON - {121, 121, 122, 144, 144, 145, 145, 146, 147, 148, 149, 150, 151, 134, 136, 138}, // SKINCOLOR_PINK + {121, 121, 144, 144, 145, 145, 146, 146, 147, 148, 149, 150, 151, 134, 136, 138}, // SKINCOLOR_PINK {144, 145, 146, 147, 148, 149, 150, 151, 134, 135, 136, 137, 138, 139, 140, 141}, // SKINCOLOR_ROSE {120, 121, 122, 123, 124, 125, 126, 127, 128, 130, 131, 133, 134, 136, 137, 139}, // SKINCOLOR_RASPBERRY {125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140}, // SKINCOLOR_RED @@ -198,61 +202,71 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = { { 84, 85, 86, 87, 88, 90, 92, 93, 94, 95, 152, 153, 154, 156, 157, 159}, // SKINCOLOR_PUMPKIN { 90, 91, 92, 93, 94, 152, 153, 154, 155, 156, 157, 158, 159, 139, 141, 143}, // SKINCOLOR_ROSEWOOD { 94, 95, 152, 153, 154, 156, 157, 159, 141, 141, 141, 142, 142, 143, 143, 31}, // SKINCOLOR_BURGUNDY - {112, 113, 114, 115, 116, 117, 118, 119, 156, 157, 158, 159, 141, 141, 142, 143}, // SKINCOLOR_BRONZE - { 0, 1, 3, 5, 7, 9, 34, 36, 38, 40, 42, 44, 60, 61, 62, 63}, // SKINCOLOR_SEPIA - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}, // SKINCOLOR_BEIGE - { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63}, // SKINCOLOR_BROWN - { 51, 52, 53, 55, 56, 57, 58, 60, 61, 63, 28, 28, 29, 29, 30, 31}, // SKINCOLOR_LEATHER + { 98, 98, 112, 112, 113, 113, 84, 85, 87, 89, 91, 93, 95, 153, 156, 159}, // SKINCOLOR_TANGERINE { 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 48, 50, 53, 56, 59}, // SKINCOLOR_PEACH { 64, 66, 68, 70, 72, 74, 76, 78, 48, 50, 52, 54, 56, 58, 60, 62}, // SKINCOLOR_CARAMEL - { 98, 98, 112, 112, 113, 113, 84, 85, 87, 89, 91, 93, 95, 153, 156, 159}, // SKINCOLOR_TANGERINE {112, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119}, // SKINCOLOR_GOLD - {121, 144, 145, 72, 73, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246}, // SKINCOLOR_VOMIT + {112, 113, 114, 115, 116, 117, 118, 119, 156, 157, 158, 159, 141, 141, 142, 143}, // SKINCOLOR_BRONZE { 96, 97, 98, 100, 101, 102, 104, 113, 114, 115, 116, 117, 118, 119, 156, 159}, // SKINCOLOR_YELLOW { 96, 98, 99, 112, 113, 114, 114, 106, 106, 107, 107, 108, 108, 109, 110, 111}, // SKINCOLOR_MUSTARD {105, 105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 111, 111, 31}, // SKINCOLOR_OLIVE + {121, 144, 145, 72, 73, 84, 114, 115, 107, 108, 109, 183, 223, 207, 30, 246}, // SKINCOLOR_VOMIT { 98, 99, 112, 101, 113, 114, 106, 179, 180, 180, 181, 182, 183, 173, 174, 175}, // SKINCOLOR_GARDEN { 96, 97, 99, 100, 102, 104, 160, 162, 164, 166, 168, 171, 223, 223, 207, 31}, // SKINCOLOR_LIME - { 96, 98, 99, 112, 113, 178, 179, 165, 203, 203, 204, 204, 205, 205, 206, 207}, // SKINCOLOR_DREAM - {120, 120, 176, 176, 176, 177, 177, 178, 178, 179, 180, 180, 181, 181, 182, 183}, // SKINCOLOR_TEA + {120, 120, 80, 80, 81, 177, 162, 164, 228, 228, 204, 204, 205, 205, 206, 207}, // SKINCOLOR_DREAM + {120, 120, 176, 176, 176, 177, 177, 178, 178, 179, 179, 180, 180, 181, 182, 183}, // SKINCOLOR_TEA {120, 120, 176, 176, 177, 177, 178, 179, 165, 166, 167, 168, 169, 170, 171, 172}, // SKINCOLOR_PISTACHIO + {176, 176, 177, 178, 165, 166, 167, 167, 168, 169, 182, 182, 182, 183, 183, 183}, // SKINCOLOR_ROBOHOOD {178, 178, 178, 179, 179, 180, 181, 182, 183, 172, 172, 173, 173, 174, 174, 175}, // SKINCOLOR_MOSS {120, 176, 176, 176, 177, 163, 164, 165, 167, 221, 221, 222, 223, 207, 207, 31}, // SKINCOLOR_MINT {160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175}, // SKINCOLOR_GREEN - {176, 176, 177, 178, 165, 166, 167, 167, 168, 169, 182, 182, 182, 183, 183, 183}, // SKINCOLOR_ROBOHOOD {160, 161, 162, 164, 165, 167, 169, 170, 171, 171, 172, 173, 174, 175, 30, 31}, // SKINCOLOR_PINETREE {160, 184, 184, 185, 185, 186, 186, 187, 187, 188, 188, 189, 189, 190, 191, 175}, // SKINCOLOR_EMERALD {186, 187, 188, 188, 188, 189, 189, 190, 190, 191, 175, 175, 30, 30, 31, 31}, // SKINCOLOR_SWAMP {120, 208, 208, 210, 212, 214, 220, 220, 220, 221, 221, 222, 222, 223, 223, 191}, // SKINCOLOR_AQUA {210, 213, 220, 220, 220, 216, 216, 221, 221, 221, 222, 222, 223, 223, 191, 31}, // SKINCOLOR_TEAL {120, 120, 208, 208, 209, 210, 211, 212, 213, 215, 216, 217, 218, 219, 222, 223}, // SKINCOLOR_CYAN - {208, 209, 211, 213, 215, 216, 216, 217, 217, 218, 218, 219, 205, 206, 207, 207}, // SKINCOLOR_CERULEAN {120, 120, 208, 209, 210, 226, 215, 216, 217, 229, 229, 205, 205, 206, 207, 31}, // SKINCOLOR_JAWZ + {208, 209, 211, 213, 215, 216, 216, 217, 217, 218, 218, 219, 205, 206, 207, 207}, // SKINCOLOR_CERULEAN + {215, 215, 215, 216, 216, 217, 218, 204, 204, 205, 205, 206, 207, 29, 30, 31}, // SKINCOLOR_NAVY {120, 120, 200, 200, 200, 201, 201, 201, 202, 202, 202, 203, 204, 205, 206, 207}, // SKINCOLOR_SLATE {120, 200, 200, 201, 201, 202, 202, 203, 203, 204, 204, 205, 205, 206, 207, 31}, // SKINCOLOR_STEEL + {200, 201, 202, 203, 204, 205, 206, 207, 28, 28, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_JET {120, 224, 225, 226, 226, 227, 228, 228, 229, 230, 231, 234, 235, 237, 239, 241}, // SKINCOLOR_PERIWINKLE {224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239}, // SKINCOLOR_BLUE {208, 209, 211, 213, 215, 217, 229, 230, 232, 234, 236, 238, 240, 242, 244, 246}, // SKINCOLOR_SAPPHIRE {228, 229, 230, 231, 232, 233, 234, 235, 237, 238, 239, 240, 242, 243, 244, 245}, // SKINCOLOR_BLUEBERRY - {215, 216, 217, 218, 204, 205, 206, 237, 238, 239, 240, 241, 242, 243, 244, 245}, // SKINCOLOR_NAVY - {200, 201, 202, 203, 204, 205, 206, 207, 28, 28, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_JET {192, 192, 248, 249, 250, 251, 204, 204, 205, 205, 206, 206, 207, 29, 30, 31}, // SKINCOLOR_DUSK {192, 192, 192, 193, 193, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199}, // SKINCOLOR_PURPLE {248, 248, 248, 249, 249, 250, 250, 251, 251, 252, 252, 253, 253, 254, 254, 255}, // SKINCOLOR_LAVENDER - {192, 193, 194, 195, 196, 197, 198, 199, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_INDIGO {192, 248, 249, 250, 251, 252, 253, 254, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_BYZANTIUM + {144, 145, 146, 147, 148, 149, 150, 251, 251, 252, 252, 253, 254, 255, 29, 30}, // SKINCOLOR_POMEGRANATE {120, 120, 120, 121, 121, 122, 122, 123, 192, 248, 249, 250, 251, 252, 253, 254}, // SKINCOLOR_LILAC /* Removed Colours {120, 121, 123, 124, 126, 127, 129, 130, 132, 133, 135, 136, 138, 139, 141, 143}, // old SKINCOLOR_RUBY, removed for other colors - { 80, 81, 83, 85, 86, 88, 90, 91, 93, 95, 152, 153, 154, 156, 157, 159}, // SKINCOLOR_AMBER, removed for other colors {224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246}, // old SKINCOLOR_SAPPHIRE, removed for other colors + { 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // old SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel + {215, 216, 217, 218, 204, 205, 206, 237, 238, 239, 240, 241, 242, 243, 244, 245}, // old SKINCOLOR_NAVY, too similar to Jet + { 80, 81, 83, 85, 86, 88, 90, 91, 93, 95, 152, 153, 154, 156, 157, 159}, // SKINCOLOR_AMBER, removed for other colors {160, 160, 160, 184, 184, 184, 185, 185, 185, 186, 187, 187, 188, 188, 189, 190}, // SKINCOLOR_JADE, removed for other colors {224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175}, // SKINCOLOR_FROST, merged into Aqua - { 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel + { 96, 97, 99, 100, 102, 104, 105, 105, 106, 107, 107, 108, 109, 109, 110, 111}, // SKINCOLOR_CANARY, replaced with Mustard + {192, 193, 194, 195, 196, 197, 198, 199, 255, 255, 29, 29, 30, 30, 31, 31}, // SKINCOLOR_INDIGO, too similar to Byzantium { 1, 145, 125, 73, 83, 114, 106, 180, 187, 168, 219, 205, 236, 206, 199, 255}, // SKINCOLOR_RAINBOW, is Vomit 2.0 */ }; +//#define SALLYALTRAINBOW // Sal's edited version of the below, which keeps a colors' lightness, and looks better with hue-shifted colors like Ruby & Dream. Not strictly *better*, just different... + +// Define for getting accurate color brightness readings according to how the human eye sees them. +// https://en.wikipedia.org/wiki/Relative_luminance +// 0.2126 to red +// 0.7152 to green +// 0.0722 to blue +// (See this same define in hw_md2.c!) +#define SETBRIGHTNESS(brightness,r,g,b) \ + brightness = (UINT8)(((1063*((UINT16)r)/5000) + (3576*((UINT16)g)/5000) + (361*((UINT16)b)/5000)) / 3) + /** \brief Generates the rainbow colourmaps that are used when a player has the invincibility power \param dest_colormap colormap to populate @@ -260,10 +274,12 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = { */ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor) { - INT32 i, j; + INT32 i; RGBA_t color; - UINT8 colorbrightnesses[16]; UINT8 brightness; +#ifndef SALLYALTRAINBOW + INT32 j; + UINT8 colorbrightnesses[16]; UINT16 brightdif; INT32 temp; @@ -271,8 +287,9 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor) for (i = 0; i < 16; i++) { color = V_GetColor(colortranslations[skincolor][i]); - colorbrightnesses[i] = (UINT8)(((UINT16)color.s.red + (UINT16)color.s.green + (UINT16)color.s.blue)/3); + SETBRIGHTNESS(colorbrightnesses[i], color.s.red, color.s.green, color.s.blue); } +#endif // next, for every colour in the palette, choose the transcolor that has the closest brightness for (i = 0; i < NUM_PALETTE_ENTRIES; i++) @@ -283,7 +300,11 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor) continue; } color = V_GetColor(i); - brightness = (UINT8)(((UINT16)color.s.red + (UINT16)color.s.green + (UINT16)color.s.blue)/3); + SETBRIGHTNESS(brightness, color.s.red, color.s.green, color.s.blue); +#ifdef SALLYALTRAINBOW + brightness = 15-(brightness/16); // Yes, 15. + dest_colormap[i] = colortranslations[skincolor][brightness]; +#else brightdif = 256; for (j = 0; j < 16; j++) { @@ -294,9 +315,12 @@ void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor) dest_colormap[i] = colortranslations[skincolor][j]; } } +#endif } } +#undef SETBRIGHTNESS + /** \brief Generates a translation colormap for Kart, to replace R_GenerateTranslationColormap in r_draw.c \param dest_colormap colormap to populate @@ -1223,6 +1247,61 @@ static void K_UpdateOffroad(player_t *player) player->kartstuff[k_offroad] = 0; } +// These have to go earlier than its sisters because of K_RespawnChecker... +static void K_MatchGenericExtraFlags(mobj_t *mo, mobj_t *master) +{ + // flipping + mo->eflags = (mo->eflags & ~MFE_VERTICALFLIP)|(master->eflags & MFE_VERTICALFLIP); + // visibility (usually for hyudoro) + mo->flags2 = (mo->flags2 & ~MF2_DONTDRAW)|(master->flags2 & MF2_DONTDRAW); + mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP1)|(master->eflags & MFE_DRAWONLYFORP1); + mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP2)|(master->eflags & MFE_DRAWONLYFORP2); + mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP3)|(master->eflags & MFE_DRAWONLYFORP3); + mo->eflags = (mo->eflags & ~MFE_DRAWONLYFORP4)|(master->eflags & MFE_DRAWONLYFORP4); +} + +static void K_SpawnDashDustRelease(player_t *player) +{ + fixed_t newx; + fixed_t newy; + mobj_t *dust; + angle_t travelangle; + INT32 i; + + I_Assert(player != NULL); + I_Assert(player->mo != NULL); + I_Assert(!P_MobjWasRemoved(player->mo)); + + if (!P_IsObjectOnGround(player->mo)) + return; + + if (player->speed == 0) + return; + + travelangle = player->mo->angle; + + if (player->kartstuff[k_drift] || player->kartstuff[k_driftend]) + travelangle -= (ANGLE_45/5)*player->kartstuff[k_drift]; + + for (i = 0; i < 2; i++) + { + newx = player->mo->x + P_ReturnThrustX(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_90, FixedMul(48*FRACUNIT, player->mo->scale)); + newy = player->mo->y + P_ReturnThrustY(player->mo, travelangle + ((i&1) ? -1 : 1)*ANGLE_90, FixedMul(48*FRACUNIT, player->mo->scale)); + dust = P_SpawnMobj(newx, newy, player->mo->z, MT_FASTDUST); + + P_SetTarget(&dust->target, player->mo); + dust->angle = travelangle - ((i&1) ? -1 : 1)*ANGLE_45; + dust->destscale = player->mo->scale; + P_SetScale(dust, player->mo->scale); + + dust->momx = 3*player->mo->momx/5; + dust->momy = 3*player->mo->momy/5; + //dust->momz = 3*player->mo->momz/5; + + K_MatchGenericExtraFlags(dust, player->mo); + } +} + /** \brief Calculates the respawn timer and drop-boosting \param player player object passed from K_KartPlayerThink @@ -1303,6 +1382,7 @@ void K_RespawnChecker(player_t *player) { S_StartSound(player->mo, sfx_s23c); player->kartstuff[k_startboost] = 50; + K_SpawnDashDustRelease(player); } player->mo->colorized = false; player->kartstuff[k_dropdash] = 0; @@ -1469,7 +1549,7 @@ void K_MomentumToFacing(player_t *player) player->mo->momy = FixedMul(player->mo->momy - player->cmomy, player->mo->friction) + player->cmomy; } -// if speed is true it gets the speed boost power, otherwise it gets the acceleration +// sets k_boostpower, k_speedboost, and k_accelboost to whatever we need it to be static void K_GetKartBoostPower(player_t *player) { fixed_t boostpower = FRACUNIT; @@ -2189,16 +2269,25 @@ static mobj_t *K_SpawnKartMissile(mobj_t *source, mobjtype_t type, angle_t angle th->momx = FixedMul(finalspeed, FINECOSINE(an>>ANGLETOFINESHIFT)); th->momy = FixedMul(finalspeed, FINESINE(an>>ANGLETOFINESHIFT)); - if (type == MT_ORBINAUT) + switch (type) { - if (source && source->player) - th->color = source->player->skincolor; - else - th->color = SKINCOLOR_CLOUDY; - } - else if (type == MT_JAWZ || type == MT_JAWZ_DUD) - { - S_StartSound(th, th->info->activesound); + case MT_ORBINAUT: + if (source && source->player) + th->color = source->player->skincolor; + else + th->color = SKINCOLOR_GREY; + break; + case MT_JAWZ: + if (source && source->player) + th->cvmem = source->player->skincolor; + else + th->cvmem = SKINCOLOR_RED; + //fallthrough + case MT_JAWZ_DUD: + S_StartSound(th, th->info->activesound); + break; + default: + break; } x = x + P_ReturnThrustX(source, an, source->radius + th->radius); @@ -2249,12 +2338,16 @@ static void K_SpawnDriftSparks(player_t *player) spark->momy = player->mo->momy/2; //spark->momz = player->mo->momz/2; - if (player->kartstuff[k_driftcharge] >= K_GetKartDriftSparkValue(player)*2) + if (player->kartstuff[k_driftcharge] >= K_GetKartDriftSparkValue(player)*4) { - if (player->kartstuff[k_driftcharge] <= (K_GetKartDriftSparkValue(player)*2)+(32*3)) - spark->color = SKINCOLOR_DUSK; // transition + spark->color = (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))); + } + else if (player->kartstuff[k_driftcharge] >= K_GetKartDriftSparkValue(player)*2) + { + if (player->kartstuff[k_driftcharge] <= (K_GetKartDriftSparkValue(player)*2)+(24*3)) + spark->color = SKINCOLOR_RASPBERRY; // transition else - spark->color = SKINCOLOR_RUBY; + spark->color = SKINCOLOR_KETCHUP; } else spark->color = SKINCOLOR_SAPPHIRE; @@ -2280,12 +2373,7 @@ static void K_SpawnDriftSparks(player_t *player) P_SetMobjState(spark, S_DRIFTSPARK_A1); } - spark->flags2 = (spark->flags2 & ~MF2_DONTDRAW)|(player->mo->eflags & MF2_DONTDRAW); - spark->eflags = (spark->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP); - spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP1)|(player->mo->eflags & MFE_DRAWONLYFORP1); - spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP2)|(player->mo->eflags & MFE_DRAWONLYFORP2); - spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP3)|(player->mo->eflags & MFE_DRAWONLYFORP3); - spark->eflags = (spark->eflags & ~MFE_DRAWONLYFORP4)|(player->mo->eflags & MFE_DRAWONLYFORP4); + K_MatchGenericExtraFlags(spark, player->mo); } } @@ -2336,7 +2424,7 @@ void K_SpawnBoostTrail(player_t *player) flame->fuse = TICRATE*2; flame->destscale = player->mo->scale; P_SetScale(flame, player->mo->scale); - flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP); + flame->eflags = (flame->eflags & ~MFE_VERTICALFLIP)|(player->mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags so that a stolen sneaker can be seen flame->momx = 8; P_XYMovement(flame); @@ -2376,7 +2464,7 @@ void K_SpawnSparkleTrail(mobj_t *mo) P_SetTarget(&sparkle->target, mo); sparkle->destscale = mo->destscale; P_SetScale(sparkle, mo->scale); - sparkle->eflags = (sparkle->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); + sparkle->eflags = (sparkle->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags so that a stolen invincibility can be seen sparkle->color = mo->color; //sparkle->colorized = mo->colorized; } @@ -2397,7 +2485,7 @@ void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent) dust->angle = R_PointToAngle2(0,0,mo->momx,mo->momy); dust->destscale = mo->scale; P_SetScale(dust, mo->scale); - dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); + dust->eflags = (dust->eflags & ~MFE_VERTICALFLIP)|(mo->eflags & MFE_VERTICALFLIP); // not K_MatchGenericExtraFlags because hyudoro shouldn't be able to wipeout if (translucent) dust->flags2 |= MF2_SHADOW; @@ -2799,6 +2887,7 @@ void K_DoSneaker(player_t *player, boolean doPFlag) } player->kartstuff[k_sneakertimer] = sneakertime; + K_SpawnDashDustRelease(player); if (doPFlag) { @@ -2899,7 +2988,7 @@ void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, boolean mute) mo->momz = FixedMul(vertispeed, vscale); if (!mute) - S_StartSound(mo, sfx_kc2f); + S_StartSound(mo, sfx_kpogos); } void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source) @@ -3309,6 +3398,19 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) K_UpdateOffroad(player); K_GetKartBoostPower(player); + // Speed lines + if ((player->kartstuff[k_sneakertimer] || player->kartstuff[k_driftboost] || player->kartstuff[k_startboost]) && player->speed > 0) + { + mobj_t *fast = P_SpawnMobj(player->mo->x + (P_RandomRange(-36,36)<mo->y + (P_RandomRange(-36,36)<mo->z + (player->mo->height/2) + (P_RandomRange(-20,20)<angle = R_PointToAngle2(0, 0, player->mo->momx, player->mo->momy); + fast->momx = 3*player->mo->momx/4; + fast->momy = 3*player->mo->momy/4; + fast->momz = 3*player->mo->momz/4; + } + if (player->kartstuff[k_eggmanexplode]) // You're gonna diiiiie { const INT32 flashtime = 4<<(player->kartstuff[k_eggmanexplode]/TICRATE); @@ -3418,7 +3520,11 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) player->kartstuff[k_thunderanim]--;*/ if (player->kartstuff[k_sneakertimer]) + { player->kartstuff[k_sneakertimer]--; + if (player->kartstuff[k_wipeoutslow] > 0 && player->kartstuff[k_wipeoutslow] < wipeoutslowtime+1) + player->kartstuff[k_wipeoutslow] = wipeoutslowtime+1; + } if (player->kartstuff[k_floorboost]) player->kartstuff[k_floorboost]--; @@ -3747,6 +3853,7 @@ static void K_KartDrift(player_t *player, boolean onground) { fixed_t dsone = K_GetKartDriftSparkValue(player); fixed_t dstwo = dsone*2; + fixed_t dsthree = dstwo*2; // Drifting is actually straffing + automatic turning. // Holding the Jump button will enable drifting. @@ -3766,15 +3873,27 @@ static void K_KartDrift(player_t *player, boolean onground) { player->kartstuff[k_driftboost] = 20; S_StartSound(player->mo, sfx_s23c); + //K_SpawnDashDustRelease(player); player->kartstuff[k_driftcharge] = 0; } else if ((player->kartstuff[k_drift] != -5 && player->kartstuff[k_drift] != 5) // || (player->kartstuff[k_drift] >= 1 && player->kartstuff[k_turndir] != 1) || (player->kartstuff[k_drift] <= -1 && player->kartstuff[k_turndir] != -1)) - && player->kartstuff[k_driftcharge] >= dstwo + && player->kartstuff[k_driftcharge] < dsthree && onground) { player->kartstuff[k_driftboost] = 50; S_StartSound(player->mo, sfx_s23c); + //K_SpawnDashDustRelease(player); + player->kartstuff[k_driftcharge] = 0; + } + else if ((player->kartstuff[k_drift] != -5 && player->kartstuff[k_drift] != 5) + // || (player->kartstuff[k_drift] >= 1 && player->kartstuff[k_turndir] != 1) || (player->kartstuff[k_drift] <= -1 && player->kartstuff[k_turndir] != -1)) + && player->kartstuff[k_driftcharge] >= dsthree + && onground) + { + player->kartstuff[k_driftboost] = 125; + S_StartSound(player->mo, sfx_s23c); + //K_SpawnDashDustRelease(player); player->kartstuff[k_driftcharge] = 0; } @@ -4506,9 +4625,6 @@ void K_MoveKartPlayer(player_t *player, boolean onground) } } - /*if (player->kartstuff[k_growshrinktimer] > 1) - player->powers[pw_flashing] = 2;*/ - // Friction if (player->speed > 0 && cmd->forwardmove == 0 && player->mo->friction == 59392) player->mo->friction += 4608; @@ -4617,13 +4733,17 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) // Let everyone hear this one S_StartSound(player->mo, sfx_s25f); } - else if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player)) + else { - if (player->kartstuff[k_boostcharge] <= 40) - S_StartSound(player->mo, sfx_cdfm01); // You were almost there! - else - S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time. - } + K_SpawnDashDustRelease(player); // already handled for perfect boosts by K_DoSneaker + if ((!player->kartstuff[k_floorboost] || player->kartstuff[k_floorboost] == 3) && P_IsLocalPlayer(player)) + { + if (player->kartstuff[k_boostcharge] <= 40) + S_StartSound(player->mo, sfx_cdfm01); // You were almost there! + else + S_StartSound(player->mo, sfx_s23c); // Nope, better luck next time. + } + } } // You overcharged your engine? Those things are expensive!!! else if (player->kartstuff[k_boostcharge] > 50) @@ -6553,6 +6673,7 @@ static void K_drawKartFirstPerson(void) { fixed_t dsone = K_GetKartDriftSparkValue(stplyr); fixed_t dstwo = dsone*2; + fixed_t dsthree = dstwo*2; #ifndef DONTLIKETOASTERSFPTWEAKS { @@ -6591,8 +6712,10 @@ static void K_drawKartFirstPerson(void) } // drift sparks! - if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dstwo)) - colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_TANGERINE, 0); + if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsthree)) + colmap = R_GetTranslationColormap(TC_RAINBOW, (UINT8)(1 + (leveltime % (MAXSKINCOLORS-1))), 0); + else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dstwo)) + colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_KETCHUP, 0); else if ((leveltime & 1) && (stplyr->kartstuff[k_driftcharge] >= dsone)) colmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_SAPPHIRE, 0); else diff --git a/src/m_menu.c b/src/m_menu.c index e697b915..0d878d88 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -224,6 +224,7 @@ menu_t SR_MainDef, SR_UnlockChecklistDef; // Misc. Main Menu static void M_SinglePlayerMenu(INT32 choice); static void M_Options(INT32 choice); +static void M_Manual(INT32 choice); static void M_SelectableClearMenus(INT32 choice); static void M_Retry(INT32 choice); static void M_EndGame(INT32 choice); @@ -625,11 +626,19 @@ static menuitem_t MISC_ChangeLevelMenu[] = static menuitem_t MISC_HelpMenu[] = { - {IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN01", M_HandleImageDef, 0}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN02", M_HandleImageDef, 0}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "HELPN03", M_HandleImageDef, 0}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "HELPM01", M_HandleImageDef, 0}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "HELPM02", M_HandleImageDef, 0}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL00", M_HandleImageDef, 0}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL01", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL02", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL03", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL04", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL05", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL06", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL07", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL08", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL09", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL10", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL11", M_HandleImageDef, 1}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "MANUAL12", M_HandleImageDef, 0}, }; // -------------------------------- @@ -1057,8 +1066,9 @@ static menuitem_t OP_MainMenu[] = {IT_SUBMENU|IT_STRING, NULL, "Gameplay Options...", &OP_GameOptionsDef, 90}, {IT_SUBMENU|IT_STRING, NULL, "Server Options...", &OP_ServerOptionsDef, 100}, - {IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 120}, - {IT_SUBMENU|IT_STRING, NULL, "Erase Data...", &OP_EraseDataDef, 130}, + {IT_CALL|IT_STRING, NULL, "Tricks & Secrets (F1)", M_Manual, 120}, + {IT_CALL|IT_STRING, NULL, "Play Credits", M_Credits, 130}, + {IT_SUBMENU|IT_STRING, NULL, "Erase Data...", &OP_EraseDataDef, 140}, }; static menuitem_t OP_ControlsMenu[] = @@ -1520,6 +1530,8 @@ static menuitem_t OP_ServerOptionsMenu[] = {IT_STRING | IT_CVAR, NULL, "Karma Comeback", &cv_kartcomeback, 66}, };*/ +#define ITEMTOGGLEBOTTOMRIGHT + static menuitem_t OP_MonitorToggleMenu[] = { // Mostly handled by the drawing function. @@ -1532,10 +1544,10 @@ static menuitem_t OP_MonitorToggleMenu[] = {IT_KEYHANDLER | IT_NOTHING, NULL, "Bananas x3", M_HandleMonitorToggles, KRITEM_TRIPLEBANANA}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Bananas x10", M_HandleMonitorToggles, KRITEM_TENFOLDBANANA}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Eggman Monitors", M_HandleMonitorToggles, KITEM_EGGMAN}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts", M_HandleMonitorToggles, KITEM_ORBINAUT}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts", M_HandleMonitorToggles, KITEM_ORBINAUT}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts x3", M_HandleMonitorToggles, KRITEM_TRIPLEORBINAUT}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Orbinauts x4", M_HandleMonitorToggles, KRITEM_QUADORBINAUT}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "Mines", M_HandleMonitorToggles, KITEM_MINE}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "Mines", M_HandleMonitorToggles, KITEM_MINE}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Jawz", M_HandleMonitorToggles, KITEM_JAWZ}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Jawz x2", M_HandleMonitorToggles, KRITEM_DUALJAWZ}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Ballhogs", M_HandleMonitorToggles, KITEM_BALLHOG}, @@ -1546,7 +1558,10 @@ static menuitem_t OP_MonitorToggleMenu[] = {IT_KEYHANDLER | IT_NOTHING, NULL, "Thunder Shields", M_HandleMonitorToggles, KITEM_THUNDERSHIELD}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Hyudoros", M_HandleMonitorToggles, KITEM_HYUDORO}, {IT_KEYHANDLER | IT_NOTHING, NULL, "Pogo Springs", M_HandleMonitorToggles, KITEM_POGOSPRING}, - {IT_KEYHANDLER | IT_NOTHING, NULL, "Kitchen Sinks", M_HandleMonitorToggles, KITEM_KITCHENSINK}, + {IT_KEYHANDLER | IT_NOTHING, NULL, "Kitchen Sinks", M_HandleMonitorToggles, KITEM_KITCHENSINK}, +#ifdef ITEMTOGGLEBOTTOMRIGHT + {IT_KEYHANDLER | IT_NOTHING, NULL, "---", M_HandleMonitorToggles, 255}, +#endif }; // ========================================================================== @@ -2482,7 +2497,7 @@ boolean M_Responder(event_t *ev) if (modeattacking) return true; M_StartControlPanel(); - currentMenu = &MISC_HelpDef; + M_Manual(INT32_MAX); itemOn = 0; return true; @@ -2737,10 +2752,9 @@ boolean M_Responder(event_t *ev) } // Why _does_ backspace go back anyway? - // Sal: Because it supports gamepads better. And still makes sense for keyboard. - currentMenu->lastOn = itemOn; - if (currentMenu->prevMenu) - M_SetupNextMenu(currentMenu->prevMenu); + //currentMenu->lastOn = itemOn; + //if (currentMenu->prevMenu) + // M_SetupNextMenu(currentMenu->prevMenu); return false; default: @@ -4170,6 +4184,9 @@ static void M_StopMessage(INT32 choice) // You can even put multiple images in one menu! static void M_DrawImageDef(void) { + // this is probably what the V_DrawFixedPatch screen-fill bullshit was for, right + //V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); -- never mind, screen fade + // Grr. Need to autodetect for pic_ts. pic_t *pictest = (pic_t *)W_CachePatchName(currentMenu->menuitems[itemOn].text,PU_CACHE); if (!pictest->zero) @@ -4183,41 +4200,59 @@ static void M_DrawImageDef(void) V_DrawSmallScaledPatch(0,0,0,patch); } - if (currentMenu->numitems > 1) - V_DrawString(0,192,V_TRANSLUCENT, va("PAGE %d of %hd", itemOn+1, currentMenu->numitems)); + if (currentMenu->menuitems[itemOn].alphaKey) + { + V_DrawString(2,BASEVIDHEIGHT-10, V_YELLOWMAP, va("%d", (itemOn<<1)-1)); // intentionally not highlightflags, unlike below + V_DrawRightAlignedString(BASEVIDWIDTH-2,BASEVIDHEIGHT-10, V_YELLOWMAP, va("%d", itemOn<<1)); // ditto + } + else + { + INT32 x = ((itemOn ? 3 : 1)*BASEVIDWIDTH)>>2, y = (BASEVIDHEIGHT>>1) - 4; + V_DrawCenteredString(x, y-10, highlightflags, "USE ARROW KEYS"); + V_DrawCharacter(x - 10 - (skullAnimCounter/5), y, + '\x1C' | highlightflags, false); // left arrow + V_DrawCharacter(x + 2 + (skullAnimCounter/5), y, + '\x1D' | highlightflags, false); // right arrow + V_DrawCenteredString(x, y+10, highlightflags, "TO LEAF THROUGH"); + } } // Handles the ImageDefs. Just a specialized function that // uses left and right movement. static void M_HandleImageDef(INT32 choice) { + boolean exitmenu = false; + switch (choice) { case KEY_RIGHTARROW: - if (currentMenu->numitems == 1) - break; - - S_StartSound(NULL, sfx_menu1); if (itemOn >= (INT16)(currentMenu->numitems-1)) - itemOn = 0; - else itemOn++; + break; + S_StartSound(NULL, sfx_menu1); + itemOn++; break; case KEY_LEFTARROW: - if (currentMenu->numitems == 1) + if (!itemOn) break; S_StartSound(NULL, sfx_menu1); - if (!itemOn) - itemOn = currentMenu->numitems - 1; - else itemOn--; + itemOn--; break; case KEY_ESCAPE: case KEY_ENTER: - M_ClearMenus(true); + exitmenu = true; break; } + + if (exitmenu) + { + if (currentMenu->prevMenu) + M_SetupNextMenu(currentMenu->prevMenu); + else + M_ClearMenus(true); + } } // ====================== @@ -4326,13 +4361,21 @@ static void M_Options(INT32 choice) OP_MainMenu[5].status = OP_MainMenu[6].status = (Playing() && !(server || IsPlayerAdmin(consoleplayer))) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); // if the player is playing _at all_, disable the erase data & credits options - OP_MainMenu[7].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); - OP_MainMenu[8].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); + OP_MainMenu[8].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_CALL); + OP_MainMenu[9].status = (Playing()) ? (IT_GRAYEDOUT) : (IT_STRING|IT_SUBMENU); OP_MainDef.prevMenu = currentMenu; M_SetupNextMenu(&OP_MainDef); } +static void M_Manual(INT32 choice) +{ + (void)choice; + + MISC_HelpDef.prevMenu = (choice == INT32_MAX ? NULL : currentMenu); + M_SetupNextMenu(&MISC_HelpDef); +} + static void M_RetryResponse(INT32 ch) { if (ch != 'y' && ch != KEY_ENTER) @@ -5520,7 +5563,8 @@ static void M_DrawStatsMaps(int location) boolean dotopname = true, dobottomarrow = (location < statsMax); if (location) - V_DrawString(10, y-(skullAnimCounter/5), highlightflags, "\x1A"); + V_DrawCharacter(10, y-(skullAnimCounter/5), + '\x1A' | highlightflags, false); // up arrow while (statsMapList[++i] != -1) { @@ -5602,7 +5646,8 @@ static void M_DrawStatsMaps(int location) } bottomarrow: if (dobottomarrow) - V_DrawString(10, y-8 + (skullAnimCounter/5), highlightflags, "\x1B"); + V_DrawCharacter(10, y-8 + (skullAnimCounter/5), + '\x1B' | highlightflags, false); // up arrow } static void M_DrawLevelStats(void) @@ -8480,8 +8525,9 @@ static void M_DrawMonitorToggles(void) //const INT32 row = itemOn%height; INT32 leftdraw, rightdraw, totaldraw; INT32 x = currentMenu->x, y = currentMenu->y+(spacing/4); + INT32 onx = 0, ony = 0; consvar_t *cv; - INT32 i; + INT32 i, translucent, drawnum; M_DrawMenuTitle(); @@ -8509,25 +8555,30 @@ static void M_DrawMonitorToggles(void) for (j = 0; j < height; j++) { const INT32 thisitem = (i*height)+j; - const boolean selected = (thisitem == itemOn); INT32 drawnum = 0; - INT32 translucent = 0; if (thisitem >= currentMenu->numitems) continue; + if (thisitem == itemOn) + { + onx = x; + ony = y; + y += spacing; + continue; + } + +#ifdef ITEMTOGGLEBOTTOMRIGHT + if (currentMenu->menuitems[thisitem].alphaKey == 255) + { + V_DrawScaledPatch(x, y, V_TRANSLUCENT, W_CachePatchName("K_ISBG", PU_CACHE)); + continue; + } +#endif if (currentMenu->menuitems[thisitem].alphaKey == 0) { - if (selected) - { - V_DrawScaledPatch(x-1, y-2, 0, W_CachePatchName("K_ITBG", PU_CACHE)); - V_DrawScaledPatch(x-1, y-2, 0, W_CachePatchName("K_ITTOGL", PU_CACHE)); - } - else - { - V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE)); - V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISTOGL", PU_CACHE)); - } + V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE)); + V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISTOGL", PU_CACHE)); continue; } @@ -8541,56 +8592,33 @@ static void M_DrawMonitorToggles(void) break; case KRITEM_TRIPLESNEAKER: case KRITEM_TRIPLEBANANA: + case KRITEM_TRIPLEORBINAUT: drawnum = 3; break; - case KRITEM_TRIPLEORBINAUT: - if (!selected) - drawnum = 3; - break; case KRITEM_QUADORBINAUT: - if (!selected) - drawnum = 4; + drawnum = 4; break; case KRITEM_TENFOLDBANANA: drawnum = 10; break; default: + drawnum = 0; break; } - if (selected) - { - if (cv->value) - V_DrawScaledPatch(x-1, y-2, 0, W_CachePatchName("K_ITBG", PU_CACHE)); - else - V_DrawScaledPatch(x-1, y-2, 0, W_CachePatchName("K_ITBGD", PU_CACHE)); + if (cv->value) + V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE)); + else + V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBGD", PU_CACHE)); - if (drawnum != 0) - { - V_DrawScaledPatch(x-1, y-2, 0, W_CachePatchName("K_ITMUL", PU_CACHE)); - V_DrawScaledPatch(x-1, y-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, !selected), PU_CACHE)); - V_DrawScaledPatch(x+27, y+39, translucent, W_CachePatchName("K_ITX", PU_CACHE)); - V_DrawKartString(x+37, y+34, translucent, va("%d", drawnum)); - } - else - V_DrawScaledPatch(x-1, y-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, !selected), PU_CACHE)); + if (drawnum != 0) + { + V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISMUL", PU_CACHE)); + V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, true), PU_CACHE)); + V_DrawString(x+24, y+31, V_ALLOWLOWERCASE|translucent, va("x%d", drawnum)); } else - { - if (cv->value) - V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBG", PU_CACHE)); - else - V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISBGD", PU_CACHE)); - - if (drawnum != 0) - { - V_DrawScaledPatch(x, y, 0, W_CachePatchName("K_ISMUL", PU_CACHE)); - V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, !selected), PU_CACHE)); - V_DrawString(x+24, y+31, V_ALLOWLOWERCASE|translucent, va("x%d", drawnum)); - } - else - V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, !selected), PU_CACHE)); - } + V_DrawScaledPatch(x, y, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[thisitem].alphaKey, true), PU_CACHE)); y += spacing; } @@ -8599,6 +8627,56 @@ static void M_DrawMonitorToggles(void) y = currentMenu->y+(spacing/4); } + { +#ifdef ITEMTOGGLEBOTTOMRIGHT + if (currentMenu->menuitems[itemOn].alphaKey == 255) + V_DrawScaledPatch(onx-1, ony-2, V_TRANSLUCENT, W_CachePatchName("K_ITBG", PU_CACHE)); + else +#endif + if (currentMenu->menuitems[itemOn].alphaKey == 0) + { + V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE)); + V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITTOGL", PU_CACHE)); + } + else + { + cv = kartitemcvs[currentMenu->menuitems[itemOn].alphaKey-1]; + translucent = (cv->value ? 0 : V_TRANSLUCENT); + + switch (currentMenu->menuitems[itemOn].alphaKey) + { + case KRITEM_DUALJAWZ: + drawnum = 2; + break; + case KRITEM_TRIPLESNEAKER: + case KRITEM_TRIPLEBANANA: + drawnum = 3; + break; + case KRITEM_TENFOLDBANANA: + drawnum = 10; + break; + default: + drawnum = 0; + break; + } + + if (cv->value) + V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBG", PU_CACHE)); + else + V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITBGD", PU_CACHE)); + + if (drawnum != 0) + { + V_DrawScaledPatch(onx-1, ony-2, 0, W_CachePatchName("K_ITMUL", PU_CACHE)); + V_DrawScaledPatch(onx-1, ony-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[itemOn].alphaKey, false), PU_CACHE)); + V_DrawScaledPatch(onx+27, ony+39, translucent, W_CachePatchName("K_ITX", PU_CACHE)); + V_DrawKartString(onx+37, ony+34, translucent, va("%d", drawnum)); + } + else + V_DrawScaledPatch(onx-1, ony-2, translucent, W_CachePatchName(K_GetItemPatch(currentMenu->menuitems[itemOn].alphaKey, false), PU_CACHE)); + } + } + V_DrawCenteredString(BASEVIDWIDTH/2, currentMenu->y, highlightflags, va("* %s *", currentMenu->menuitems[itemOn].text)); } @@ -8608,6 +8686,7 @@ static void M_HandleMonitorToggles(INT32 choice) INT32 column = itemOn/height, row = itemOn%height; INT16 next; UINT8 i; + boolean exitmenu = false; switch (choice) { @@ -8656,6 +8735,11 @@ static void M_HandleMonitorToggles(INT32 choice) break; case KEY_ENTER: +#ifdef ITEMTOGGLEBOTTOMRIGHT + if (currentMenu->menuitems[itemOn].alphaKey == 255) + S_StartSound(NULL, sfx_lose); + else +#endif if (currentMenu->menuitems[itemOn].alphaKey == 0) { INT32 v = cv_sneaker.value; @@ -8674,9 +8758,17 @@ static void M_HandleMonitorToggles(INT32 choice) break; case KEY_ESCAPE: - M_ClearMenus(true); + exitmenu = true; break; } + + if (exitmenu) + { + if (currentMenu->prevMenu) + M_SetupNextMenu(currentMenu->prevMenu); + else + M_ClearMenus(true); + } } // ========= @@ -8794,7 +8886,6 @@ static void M_HandleFogColor(INT32 choice) break; case KEY_ESCAPE: - S_StartSound(NULL, sfx_menu1); exitmenu = true; break; diff --git a/src/p_enemy.c b/src/p_enemy.c index 83011674..ded0a20f 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8172,21 +8172,20 @@ void A_JawzChase(mobj_t *actor) if (actor->tracer) { - if (!actor->tracer->health) - P_SetTarget(&actor->tracer, NULL); - - if (actor->tracer && actor->tracer->health) + if (actor->tracer->health) { mobj_t *ret; ret = P_SpawnMobj(actor->tracer->x, actor->tracer->y, actor->tracer->z, MT_PLAYERRETICULE); P_SetTarget(&ret->target, actor->tracer); ret->frame |= ((leveltime % 10) / 2) + 5; - ret->color = actor->target->player->skincolor; + ret->color = actor->cvmem; P_Thrust(actor, R_PointToAngle2(actor->x, actor->y, actor->tracer->x, actor->tracer->y), actor->info->speed); return; } + else + P_SetTarget(&actor->tracer, NULL); } if (actor->extravalue1) // Disable looking by setting this diff --git a/src/p_map.c b/src/p_map.c index 88045a3e..41d61cb0 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -188,7 +188,7 @@ boolean P_DoSpring(mobj_t *spring, mobj_t *object) P_InstaThrustEvenIn2D(object, spring->angle, FixedMul(horizspeed,FixedSqrt(FixedMul(hscale, spring->scale)))); else { - fixed_t finalSpeed = horizspeed; + fixed_t finalSpeed = FixedDiv(horizspeed, hscale); fixed_t pSpeed = object->player->speed; if (pSpeed > finalSpeed) diff --git a/src/r_plane.c b/src/r_plane.c index 68be24b2..cf973ebc 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -720,7 +720,7 @@ void R_DrawPlanes(void) dc_iscale = FixedMul(skyscale, FINECOSINE(xtoviewangle[x]>>ANGLETOFINESHIFT)); dc_x = x; dc_source = - R_GetColumn(skytexture, + R_GetColumn(texturetranslation[skytexture], angle); wallcolfunc(); } diff --git a/src/sounds.c b/src/sounds.c index ec88786c..921450d6 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -811,6 +811,7 @@ sfxinfo_t S_sfx[NUMSFX] = {"noooo1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"noooo2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"hogbom", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, + {"kpogos", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, {"ddash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, {"dbgsal", false, 110, 8, -1, NULL, 0, -1, -1, LUMPERROR}, diff --git a/src/sounds.h b/src/sounds.h index 980c097e..8e065e69 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -883,6 +883,7 @@ typedef enum sfx_noooo1, sfx_noooo2, sfx_hogbom, + sfx_kpogos, sfx_ddash, sfx_dbgsal,