mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-01 04:33:02 +00:00
We had this collective consciousness bigbrain moment in VC together, and it can literally only happen in this branch because unlocks.pk3 is the only main-game asset that needs to change for it Solves the big problem we had with mixing up Item Capsules and ~~Battle Capsules~~ PRISON EGGS
88 lines
1.9 KiB
C
88 lines
1.9 KiB
C
// DR. ROBOTNIK'S RING RACERS
|
|
//-----------------------------------------------------------------------------
|
|
// Copyright (C) by Sally "TehRealSalt" Cochenour
|
|
// Copyright (C) by Kart Krew
|
|
//
|
|
// This program is free software distributed under the
|
|
// terms of the GNU General Public License, version 2.
|
|
// See the 'LICENSE' file for more details.
|
|
//-----------------------------------------------------------------------------
|
|
/// \file k_rank.h
|
|
/// \brief Grand Prix mode ranking
|
|
|
|
#ifndef __K_RANK__
|
|
#define __K_RANK__
|
|
|
|
#include "doomdef.h"
|
|
#include "doomstat.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct gpRank_t
|
|
{
|
|
UINT8 players;
|
|
UINT8 totalPlayers;
|
|
|
|
UINT8 position;
|
|
|
|
UINT32 winPoints;
|
|
UINT32 totalPoints;
|
|
|
|
UINT32 laps;
|
|
UINT32 totalLaps;
|
|
|
|
UINT32 continuesUsed;
|
|
|
|
UINT32 prisons;
|
|
UINT32 totalPrisons;
|
|
|
|
UINT32 rings;
|
|
UINT32 totalRings;
|
|
|
|
boolean specialWon;
|
|
};
|
|
|
|
// gp_rank_e was once defined here, but moved to doomstat.h to prevent circular dependency
|
|
|
|
// 3rd place is neutral, anything below is a penalty
|
|
#define RANK_NEUTRAL_POSITION (3)
|
|
|
|
/*--------------------------------------------------
|
|
void K_InitGrandPrixRank(gpRank_t *rankData);
|
|
|
|
Calculates rank requirements for a GP session.
|
|
|
|
Input Arguments:-
|
|
rankData - Pointer to struct that contains all
|
|
of the information required to calculate GP rank.
|
|
|
|
Return:-
|
|
N/A
|
|
--------------------------------------------------*/
|
|
|
|
void K_InitGrandPrixRank(gpRank_t *rankData);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData);
|
|
|
|
Calculates the player's grade using the
|
|
variables from gpRank.
|
|
|
|
Input Arguments:-
|
|
rankData - struct containing existing rank data.
|
|
|
|
Return:-
|
|
gp_rank_e representing the total grade.
|
|
--------------------------------------------------*/
|
|
|
|
gp_rank_e K_CalculateGPGrade(gpRank_t *rankData);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif
|