RingRacers/src/k_race.h
James R e437656633 Remove restrictions on numlaps, merge with gptest
- numlaps 0 now sets the race to 0 laps.
  - Players will finish upon crossing the finishing line
    immediately after POSITION.

- gptest merged with numlaps.
  - numlaps works in GP.

- Warping to sprint maps with numlaps already set now lets
  numlaps exceed the map default. It was previous capped
  at map default ONLY when loading into the level (so you
  could still exceed it by setting numlaps during
  POSITION). Now it's consistent.

- numlaps can now be set at any time during the race.
2023-03-29 03:53:21 -07:00

93 lines
2 KiB
C

// SONIC ROBO BLAST 2 KART
//-----------------------------------------------------------------------------
// 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_race.h
/// \brief Race Mode specific code.
#ifndef __K_RACE__
#define __K_RACE__
#include "r_defs.h"
#ifdef __cplusplus
extern "C" {
#endif
extern line_t *finishBeamLine;
#define FINISHLINEBEAM_SPACING (48*mapobjectscale)
/*--------------------------------------------------
void K_ClearFinishBeamLine(void);
Clears variables for finishBeamLine.
Separate from K_FreeFinishBeamLine since this
needs called when PU_LEVEL is freed.
Input Arguments:-
None
Return:-
None
--------------------------------------------------*/
void K_ClearFinishBeamLine(void);
/*--------------------------------------------------
boolean K_GenerateFinishBeamLine(void);
Finds pre-placed "beam points" to create a finish line out of,
or tries to automatically create it from a finish linedef in the map.
The result is stored in the "finishBeamLine" variable.
Input Arguments:-
None
Return:-
True if successful, otherwise false.
--------------------------------------------------*/
boolean K_GenerateFinishBeamLine(void);
/*--------------------------------------------------
void K_RunFinishLineBeam(void);
Updates the finish line beam effect.
Input Arguments:-
None
Return:-
None
--------------------------------------------------*/
void K_RunFinishLineBeam(void);
/*--------------------------------------------------
UINT8 K_RaceLapCount(INT16 mapNum);
Returns the effective final lap count of the race.
Input Arguments:-
mapNum - The level to count laps for, 0-indexed.
Return:-
The lap count to finish.
--------------------------------------------------*/
UINT8 K_RaceLapCount(INT16 mapNum);
#ifdef __cplusplus
} // extern "C"
#endif
#endif