2016-08-12 01:42:11 +00:00
|
|
|
// SONIC ROBO BLAST 2 KART ~ ZarroTsu
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
/// \file k_kart.h
|
|
|
|
/// \brief SRB2kart stuff.
|
|
|
|
|
|
|
|
#ifndef __K_KART__
|
|
|
|
#define __K_KART__
|
|
|
|
|
2016-08-15 03:51:08 +00:00
|
|
|
#include "doomdef.h"
|
|
|
|
#include "d_player.h" // Need for player_t
|
|
|
|
|
2019-01-05 05:08:33 +00:00
|
|
|
#define KART_FULLTURN 800
|
|
|
|
|
2017-11-28 21:57:38 +00:00
|
|
|
UINT8 colortranslations[MAXSKINCOLORS][16];
|
2016-08-12 01:42:11 +00:00
|
|
|
extern const char *KartColor_Names[MAXSKINCOLORS];
|
2018-06-20 00:20:06 +00:00
|
|
|
extern const UINT8 KartColor_Opposite[MAXSKINCOLORS*2];
|
2018-02-05 23:55:52 +00:00
|
|
|
void K_RainbowColormap(UINT8 *dest_colormap, UINT8 skincolor);
|
2016-08-12 01:42:11 +00:00
|
|
|
void K_GenerateKartColormap(UINT8 *dest_colormap, INT32 skinnum, UINT8 color);
|
|
|
|
UINT8 K_GetKartColorByName(const char *name);
|
|
|
|
|
2016-08-15 03:51:08 +00:00
|
|
|
void K_RegisterKartStuff(void);
|
2016-08-12 01:42:11 +00:00
|
|
|
|
Winning positions scale with number of players
Anyone in the top 50% gets winning music & blue position, everyone below
gets the losing music & red position. For odd numbers, it rounds up.
2p: 1st wins, 2nd loses
3p: 1-2 win, 3rd loses
4p: 1-2 win, 3-4 lose
5p: 1-3 win, 4-5 lose
6p: 1-3 win, 4-6 lose
7p: 1-4 win, 5-7 lose
8p: 1-4 win, 5-8 lose (SMK)
12p: 1-6 win, 7-12 lose (modern MK)
16p: 1-8 win, 9-16 lose (max player count)
In big netgames you won't just hear the losing music all of the time now
:V
2018-02-21 00:11:09 +00:00
|
|
|
boolean K_IsPlayerLosing(player_t *player);
|
2018-07-01 08:36:09 +00:00
|
|
|
boolean K_IsPlayerWanted(player_t *player);
|
2018-09-06 23:27:07 +00:00
|
|
|
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
2018-09-30 05:23:59 +00:00
|
|
|
void K_MatchGenericExtraFlags(mobj_t *mo, mobj_t *master);
|
2018-06-25 02:15:22 +00:00
|
|
|
void K_RespawnChecker(player_t *player);
|
2017-11-04 17:32:47 +00:00
|
|
|
void K_KartMoveAnimation(player_t *player);
|
2018-11-25 13:48:46 +00:00
|
|
|
void K_KartPlayerHUDUpdate(player_t *player);
|
2016-08-15 03:51:08 +00:00
|
|
|
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
|
2018-02-05 00:00:36 +00:00
|
|
|
void K_KartPlayerAfterThink(player_t *player);
|
2018-07-27 00:12:42 +00:00
|
|
|
void K_DoInstashield(player_t *player);
|
2018-11-01 04:57:38 +00:00
|
|
|
void K_SpawnBattlePoints(player_t *source, player_t *victim, UINT8 amount);
|
2018-11-28 18:41:01 +00:00
|
|
|
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, mobj_t *inflictor, boolean trapitem);
|
2018-11-27 17:27:43 +00:00
|
|
|
void K_SquishPlayer(player_t *player, mobj_t *source, mobj_t *inflictor);
|
2018-10-19 00:49:30 +00:00
|
|
|
void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor);
|
2018-07-03 19:14:47 +00:00
|
|
|
void K_StealBumper(player_t *player, player_t *victim, boolean force);
|
2017-11-05 17:15:19 +00:00
|
|
|
void K_SpawnKartExplosion(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 number, mobjtype_t type, angle_t rotangle, boolean spawncenter, boolean ghostit, mobj_t *source);
|
2018-02-06 02:08:01 +00:00
|
|
|
void K_SpawnMineExplosion(mobj_t *source, UINT8 color);
|
2018-06-08 20:05:45 +00:00
|
|
|
void K_SpawnBoostTrail(player_t *player);
|
2018-06-10 20:10:24 +00:00
|
|
|
void K_SpawnSparkleTrail(mobj_t *mo);
|
2018-07-25 16:49:30 +00:00
|
|
|
void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent);
|
2018-06-08 20:05:45 +00:00
|
|
|
void K_DriftDustHandling(mobj_t *spawner);
|
2018-10-07 22:53:46 +00:00
|
|
|
void K_DoSneaker(player_t *player, INT32 type);
|
2018-09-27 17:32:07 +00:00
|
|
|
void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound);
|
2018-06-16 23:57:08 +00:00
|
|
|
void K_KillBananaChain(mobj_t *banana, mobj_t *inflictor, mobj_t *source);
|
Dropping items!
* Shield Drop...
* Whatever you've got orbiting or trailing you, DROP THEM WHERE THEY STAND. (Except for the ghost sink. That one's OK.)
* Pops your Thunder Shield.
* Happens upon ANY hit, except for deathpits.
* HUD Drop...
* Also does the above, except for the Thunder Shield thing.
* If there's any item left in your item box, pop it out as a little hovering, rotating Minecraft item!
* You can pick up the Minecraft item by driving over it if your item box is sufficiently empty, or the item which is contained within it is of the same type.
* Happens upon Size Down and battle elimination.
* Can also be forced on with `cv_kartdebughuddrop on`!
* Some other random stuff.
* Fix a bunch of `a->scale = b`'s into `P_SetScale(a, b)` form, for maximum validity.
* Make K_CleanHnextList and K_UpdateHnextList one function, since they only differed by one continue clause (and the type of their input parameter).
* Allow shrunken players to pick up item boxes again.
* Fix MF_NOCLIPTHING. (Gonna pass this fix to vanilla when I get the chance, too.)
* Break NiGHTS a little through my machinations.
2018-09-06 21:17:29 +00:00
|
|
|
void K_UpdateHnextList(player_t *player, boolean clean);
|
|
|
|
void K_DropHnextList(player_t *player);
|
2018-06-27 19:58:43 +00:00
|
|
|
void K_RepairOrbitChain(mobj_t *orbit);
|
2018-08-30 23:24:22 +00:00
|
|
|
player_t *K_FindJawzTarget(mobj_t *actor, player_t *source);
|
2017-11-11 03:28:20 +00:00
|
|
|
boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y);
|
2017-03-07 01:05:18 +00:00
|
|
|
INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue);
|
2018-11-08 02:04:57 +00:00
|
|
|
INT32 K_GetKartDriftSparkValue(player_t *player);
|
2018-11-28 05:45:33 +00:00
|
|
|
void K_KartUpdatePosition(player_t *player);
|
Dropping items!
* Shield Drop...
* Whatever you've got orbiting or trailing you, DROP THEM WHERE THEY STAND. (Except for the ghost sink. That one's OK.)
* Pops your Thunder Shield.
* Happens upon ANY hit, except for deathpits.
* HUD Drop...
* Also does the above, except for the Thunder Shield thing.
* If there's any item left in your item box, pop it out as a little hovering, rotating Minecraft item!
* You can pick up the Minecraft item by driving over it if your item box is sufficiently empty, or the item which is contained within it is of the same type.
* Happens upon Size Down and battle elimination.
* Can also be forced on with `cv_kartdebughuddrop on`!
* Some other random stuff.
* Fix a bunch of `a->scale = b`'s into `P_SetScale(a, b)` form, for maximum validity.
* Make K_CleanHnextList and K_UpdateHnextList one function, since they only differed by one continue clause (and the type of their input parameter).
* Allow shrunken players to pick up item boxes again.
* Fix MF_NOCLIPTHING. (Gonna pass this fix to vanilla when I get the chance, too.)
* Break NiGHTS a little through my machinations.
2018-09-06 21:17:29 +00:00
|
|
|
void K_DropItems(player_t *player);
|
2018-06-12 20:27:51 +00:00
|
|
|
void K_StripItems(player_t *player);
|
Dropping items!
* Shield Drop...
* Whatever you've got orbiting or trailing you, DROP THEM WHERE THEY STAND. (Except for the ghost sink. That one's OK.)
* Pops your Thunder Shield.
* Happens upon ANY hit, except for deathpits.
* HUD Drop...
* Also does the above, except for the Thunder Shield thing.
* If there's any item left in your item box, pop it out as a little hovering, rotating Minecraft item!
* You can pick up the Minecraft item by driving over it if your item box is sufficiently empty, or the item which is contained within it is of the same type.
* Happens upon Size Down and battle elimination.
* Can also be forced on with `cv_kartdebughuddrop on`!
* Some other random stuff.
* Fix a bunch of `a->scale = b`'s into `P_SetScale(a, b)` form, for maximum validity.
* Make K_CleanHnextList and K_UpdateHnextList one function, since they only differed by one continue clause (and the type of their input parameter).
* Allow shrunken players to pick up item boxes again.
* Fix MF_NOCLIPTHING. (Gonna pass this fix to vanilla when I get the chance, too.)
* Break NiGHTS a little through my machinations.
2018-09-06 21:17:29 +00:00
|
|
|
void K_StripOther(player_t *player);
|
2017-03-10 02:22:49 +00:00
|
|
|
void K_MomentumToFacing(player_t *player);
|
2017-02-24 01:36:43 +00:00
|
|
|
fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower);
|
2017-11-17 05:48:36 +00:00
|
|
|
fixed_t K_GetKartAccel(player_t *player);
|
2018-08-11 04:12:41 +00:00
|
|
|
UINT16 K_GetKartFlashing(player_t *player);
|
2017-04-20 01:04:44 +00:00
|
|
|
fixed_t K_3dKartMovement(player_t *player, boolean onground, fixed_t forwardmove);
|
2017-03-07 01:05:18 +00:00
|
|
|
void K_MoveKartPlayer(player_t *player, boolean onground);
|
2018-07-01 08:36:09 +00:00
|
|
|
void K_CalculateBattleWanted(void);
|
2018-07-03 19:14:47 +00:00
|
|
|
void K_CheckBumpers(void);
|
2018-07-20 23:11:36 +00:00
|
|
|
void K_CheckSpectateStatus(void);
|
2016-08-12 01:42:11 +00:00
|
|
|
|
2019-01-13 13:40:48 +00:00
|
|
|
// sound stuff for lua
|
|
|
|
void K_PlayAttackTaunt(mobj_t *source);
|
|
|
|
void K_PlayBoostTaunt(mobj_t *source);
|
|
|
|
void K_PlayOvertakeSound(mobj_t *source);
|
|
|
|
void K_PlayHitEmSound(mobj_t *source);
|
|
|
|
void K_PlayPowerGloatSound(mobj_t *source);
|
|
|
|
|
2018-09-23 22:07:38 +00:00
|
|
|
const char *K_GetItemPatch(UINT8 item, boolean tiny);
|
2017-12-25 15:05:36 +00:00
|
|
|
INT32 K_calcSplitFlags(INT32 snapflags);
|
2016-08-15 03:51:08 +00:00
|
|
|
void K_LoadKartHUDGraphics(void);
|
|
|
|
void K_drawKartHUD(void);
|
2018-07-22 15:16:03 +00:00
|
|
|
void K_drawKartFreePlay(UINT32 flashtime);
|
2018-11-04 12:15:13 +00:00
|
|
|
void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, UINT8 mode);
|
2016-08-12 01:42:11 +00:00
|
|
|
|
|
|
|
// =========================================================================
|
|
|
|
#endif // __K_KART__
|