mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
127 lines
3.4 KiB
C
127 lines
3.4 KiB
C
// SONIC ROBO BLAST 2 KART
|
|
//-----------------------------------------------------------------------------
|
|
// Copyright (C) 2018-2020 by Sally "TehRealSalt" Cochenour
|
|
// Copyright (C) 2018-2020 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_grandprix.h
|
|
/// \brief Grand Prix mode game logic & bot behaviors
|
|
|
|
#ifndef __K_GRANDPRIX__
|
|
#define __K_GRANDPRIX__
|
|
|
|
#include "doomdef.h"
|
|
#include "doomstat.h"
|
|
|
|
extern struct grandprixinfo
|
|
{
|
|
UINT8 roundnum; ///< Round number -- if 0, then we're not in a Grand Prix.
|
|
cupheader_t *cup; ///< Which cup are we playing?
|
|
UINT8 gamespeed; ///< Copy of gamespeed, just to make sure you can't cheat it with cvars
|
|
boolean encore; ///< Ditto, but for encore mode
|
|
boolean masterbots; ///< If true, all bots should be max difficulty (Master Mode)
|
|
boolean initalize; ///< If true, we need to initialize a new session.
|
|
boolean wonround; ///< If false, then we retry the map instead of going to the next.
|
|
} grandprixinfo;
|
|
|
|
|
|
/*--------------------------------------------------
|
|
UINT8 K_BotStartingDifficulty(SINT8 value);
|
|
|
|
Determines the starting difficulty of the bots
|
|
for a specific game speed.
|
|
|
|
Input Arguments:-
|
|
value - Game speed value to use.
|
|
|
|
Return:-
|
|
Bot difficulty level.
|
|
--------------------------------------------------*/
|
|
|
|
UINT8 K_BotStartingDifficulty(SINT8 value);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers);
|
|
|
|
Calculates the number of points that a player would
|
|
recieve if they won the round.
|
|
|
|
Input Arguments:-
|
|
position - Finishing position.
|
|
numplayers - Number of players in the game.
|
|
|
|
Return:-
|
|
Number of points to give.
|
|
--------------------------------------------------*/
|
|
|
|
INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
void K_InitGrandPrixBots(void);
|
|
|
|
Spawns bots specifically tailored for Grand Prix mode.
|
|
--------------------------------------------------*/
|
|
|
|
void K_InitGrandPrixBots(void);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
void K_UpdateGrandPrixBots(void);
|
|
|
|
Updates bot settings based on the the results of the race.
|
|
--------------------------------------------------*/
|
|
|
|
void K_UpdateGrandPrixBots(void);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
void K_IncreaseBotDifficulty(player_t *bot);
|
|
|
|
Increases the difficulty of this bot when they finish the race.
|
|
|
|
Input Arguments:-
|
|
bot - Player to do this for.
|
|
|
|
Return:-
|
|
None
|
|
--------------------------------------------------*/
|
|
|
|
void K_IncreaseBotDifficulty(player_t *bot);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
void K_FakeBotResults(player_t *bot);
|
|
|
|
Fakes the results of the race, when all human players have
|
|
already finished and only bots were remaining.
|
|
|
|
Input Arguments:-
|
|
bot - Player to do this for.
|
|
|
|
Return:-
|
|
None
|
|
--------------------------------------------------*/
|
|
|
|
void K_FakeBotResults(player_t *bot);
|
|
|
|
|
|
/*--------------------------------------------------
|
|
void K_PlayerLoseLife(player_t *player);
|
|
|
|
Removes a life from a human player.
|
|
|
|
Input Arguments:-
|
|
player - Player to do this for.
|
|
|
|
Return:-
|
|
None
|
|
--------------------------------------------------*/
|
|
|
|
void K_PlayerLoseLife(player_t *player);
|
|
|
|
#endif
|