Merge branch 'master' into rewrite-lightning
|
|
@ -113,7 +113,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
|||
set(CMAKE_PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
# Set EXE names so the assets CMakeLists can refer to its target
|
||||
set(SRB2_SDL2_EXE_NAME srb2kart CACHE STRING "Executable binary output name")
|
||||
set(SRB2_SDL2_EXE_NAME ringracers CACHE STRING "Executable binary output name")
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/src)
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ if("${SRB2_CPACK_GENERATOR}" STREQUAL "")
|
|||
endif()
|
||||
|
||||
set(CPACK_GENERATOR ${SRB2_CPACK_GENERATOR})
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sonic Robo Blast 2 Kart" CACHE STRING "Program name for display purposes")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dr. Robotnik's Ring Racers" CACHE STRING "Program name for display purposes")
|
||||
set(CPACK_PACKAGE_VENDOR "Kart Krew" CACHE STRING "Vendor name for display purposes")
|
||||
#set(CPACK_PACKAGE_DESCRIPTION_FILE )
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
|
||||
|
|
|
|||
BIN
srb2.png
|
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 2.7 KiB |
BIN
srb2banner.png
|
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 87 KiB |
|
|
@ -235,7 +235,7 @@ bin:=../bin
|
|||
endif
|
||||
|
||||
# default EXENAME (usually set by platform)
|
||||
EXENAME?=srb2
|
||||
EXENAME?=ringracers
|
||||
DBGNAME?=$(EXENAME).debug
|
||||
|
||||
exe:=$(bin)/$(EXENAME)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
# Makefile options for unices (linux, bsd...)
|
||||
#
|
||||
|
||||
EXENAME?=lsdl2srb2kart
|
||||
|
||||
opts+=-DUNIXCOMMON -DLUA_USE_POSIX
|
||||
libs+=-lm
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
#
|
||||
|
||||
ifndef MINGW64
|
||||
EXENAME?=srb2kart.exe
|
||||
EXENAME?=ringracers.exe
|
||||
else
|
||||
EXENAME?=srb2kart64.exe
|
||||
EXENAME?=ringracers64.exe
|
||||
endif
|
||||
|
||||
# disable dynamicbase if under msys2
|
||||
|
|
|
|||
|
|
@ -1576,7 +1576,7 @@ void CONS_Error(const char *msg)
|
|||
#if defined(RPC_NO_WINDOWS_H) && defined(_WINDOWS)
|
||||
if (!graphics_started)
|
||||
{
|
||||
MessageBoxA(vid.WndParent, msg, "SRB2Kart Warning", MB_OK);
|
||||
MessageBoxA(vid.WndParent, msg, "Dr. Robotnik's Ring Racers Warning", MB_OK);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1515,7 +1515,7 @@ static boolean CL_FinishedFileList(void)
|
|||
M_StartMessage(M_GetText(
|
||||
"You have too many WAD files loaded\n"
|
||||
"to add ones the server is using.\n"
|
||||
"Please restart SRB2Kart before connecting.\n\n"
|
||||
"Please restart Ring Racers before connecting.\n\n"
|
||||
"Press ESC\n"
|
||||
), NULL, MM_NOTHING);
|
||||
return false;
|
||||
|
|
@ -1529,7 +1529,7 @@ static boolean CL_FinishedFileList(void)
|
|||
"You have the wrong addons loaded.\n\n"
|
||||
"To play on this server, restart\n"
|
||||
"the game and don't load any addons.\n"
|
||||
"SRB2Kart will automatically add\n"
|
||||
"Ring Racers will automatically add\n"
|
||||
"everything you need when you join.\n\n"
|
||||
"Press ESC\n"
|
||||
), NULL, MM_NOTHING);
|
||||
|
|
@ -1923,7 +1923,6 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
|
|||
{
|
||||
if (cl_mode != CL_DOWNLOADFILES && cl_mode != CL_DOWNLOADSAVEGAME)
|
||||
{
|
||||
F_MenuPresTicker(true); // title sky
|
||||
F_TitleScreenTicker(true);
|
||||
F_TitleScreenDrawer();
|
||||
}
|
||||
|
|
@ -3065,7 +3064,7 @@ static void Joinable_OnChange(void)
|
|||
// called one time at init
|
||||
void D_ClientServerInit(void)
|
||||
{
|
||||
DEBFILE(va("- - -== SRB2Kart v%d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||
DEBFILE(va("- - -== Ring Racers v%d.%d "VERSIONSTRING" debugfile ==- - -\n",
|
||||
VERSION, SUBVERSION));
|
||||
|
||||
#ifndef NONET
|
||||
|
|
@ -3413,7 +3412,7 @@ static void Got_AddBot(UINT8 **p, INT32 playernum)
|
|||
{
|
||||
INT16 newplayernum;
|
||||
UINT8 skinnum = 0;
|
||||
UINT8 difficulty = MAXBOTDIFFICULTY;
|
||||
UINT8 difficulty = DIFFICULTBOT;
|
||||
|
||||
if (playernum != serverplayer && !IsPlayerAdmin(playernum))
|
||||
{
|
||||
|
|
@ -3716,10 +3715,10 @@ static void HandleConnect(SINT8 node)
|
|||
SV_SendRefuse(node, "Incompatible packet formats.");
|
||||
else if (strncmp(netbuffer->u.clientcfg.application, SRB2APPLICATION,
|
||||
sizeof netbuffer->u.clientcfg.application))
|
||||
SV_SendRefuse(node, "Different SRB2 modifications\nare not compatible.");
|
||||
SV_SendRefuse(node, "Different Ring Racers modifications\nare not compatible.");
|
||||
else if (netbuffer->u.clientcfg.version != VERSION
|
||||
|| netbuffer->u.clientcfg.subversion != SUBVERSION)
|
||||
SV_SendRefuse(node, va(M_GetText("Different SRB2Kart versions cannot\nplay a netgame!\n(server version %d.%d)"), VERSION, SUBVERSION));
|
||||
SV_SendRefuse(node, va(M_GetText("Different Ring Racers versions cannot\nplay a netgame!\n(server version %d.%d)"), VERSION, SUBVERSION));
|
||||
else if (!cv_allownewplayer.value && node)
|
||||
SV_SendRefuse(node, M_GetText("The server is not accepting\njoins for the moment."));
|
||||
else if (D_NumPlayers() >= maxplayers)
|
||||
|
|
@ -5092,6 +5091,8 @@ static void SV_Maketic(void)
|
|||
{
|
||||
INT32 i;
|
||||
|
||||
ps_botticcmd_time = 0;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i])
|
||||
|
|
@ -5099,7 +5100,9 @@ static void SV_Maketic(void)
|
|||
|
||||
if (K_PlayerUsesBotMovement(&players[i]))
|
||||
{
|
||||
precise_t t = I_GetPreciseTime();
|
||||
K_BuildBotTiccmd(&players[i], &netcmds[maketic%BACKUPTICS][i]);
|
||||
ps_botticcmd_time += I_GetPreciseTime() - t;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1233,8 +1233,8 @@ void D_SRB2Main(void)
|
|||
|
||||
// Print GPL notice for our console users (Linux)
|
||||
CONS_Printf(
|
||||
"\n\nSonic Robo Blast 2 Kart\n"
|
||||
"Copyright (C) 1998-2020 by Kart Krew & STJr\n\n"
|
||||
"\n\nDr. Robotnik's Ring Racers\n"
|
||||
"Copyright (C) 1998-2022 by Kart Krew & STJr\n\n"
|
||||
"This program comes with ABSOLUTELY NO WARRANTY.\n\n"
|
||||
"This is free software, and you are welcome to redistribute it\n"
|
||||
"and/or modify it under the terms of the GNU General Public License\n"
|
||||
|
|
|
|||
|
|
@ -399,9 +399,13 @@ static CV_PossibleValue_t kartbot_cons_t[] = {
|
|||
{7, "Lv.7"},
|
||||
{8, "Lv.8"},
|
||||
{9, "Lv.9"},
|
||||
{10,"Lv.10"},
|
||||
{11,"Lv.11"},
|
||||
{12,"Lv.12"},
|
||||
{13,"Lv.MAX"},
|
||||
{0, NULL}
|
||||
};
|
||||
consvar_t cv_kartbot = CVAR_INIT ("kartbot", "0", CV_NETVAR|CV_CHEAT, kartbot_cons_t, NULL);
|
||||
consvar_t cv_kartbot = CVAR_INIT ("kartbot", "0", CV_NETVAR, kartbot_cons_t, NULL);
|
||||
|
||||
consvar_t cv_karteliminatelast = CVAR_INIT ("karteliminatelast", "Yes", CV_NETVAR|CV_CHEAT|CV_CALL, CV_YesNo, KartEliminateLast_OnChange);
|
||||
|
||||
|
|
@ -4314,9 +4318,9 @@ static void Command_ListDoomednums_f(void)
|
|||
static void Command_Version_f(void)
|
||||
{
|
||||
#ifdef DEVELOP
|
||||
CONS_Printf("SRB2Kart %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
|
||||
CONS_Printf("Ring Racers %s-%s (%s %s)\n", compbranch, comprevision, compdate, comptime);
|
||||
#else
|
||||
CONS_Printf("SRB2Kart %s (%s %s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision, compbranch);
|
||||
CONS_Printf("Ring Racers %s (%s %s %s %s) ", VERSIONSTRING, compdate, comptime, comprevision, compbranch);
|
||||
#endif
|
||||
|
||||
// Base library
|
||||
|
|
|
|||
|
|
@ -1725,7 +1725,7 @@ void CURLPrepareFile(const char* url, int dfilenum)
|
|||
// Only allow HTTP and HTTPS
|
||||
curl_easy_setopt(http_handle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS);
|
||||
|
||||
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("SRB2Kart/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
||||
curl_easy_setopt(http_handle, CURLOPT_USERAGENT, va("Ring Racers/v%d.%d", VERSION, SUBVERSION)); // Set user agent as some servers won't accept invalid user agents.
|
||||
|
||||
// Authenticate if the user so wishes
|
||||
login = CURLGetLogin(url, NULL);
|
||||
|
|
|
|||
|
|
@ -2292,7 +2292,9 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
menupres[num].ttname[0] = 0;
|
||||
menupres[num].hidetitlepics = true;
|
||||
}
|
||||
else // if (fastcmp(word2, "OLD") || fastcmp(word2, "SSNTAILS"))
|
||||
else if (fastcmp(word2, "RINGRACERS"))
|
||||
menupres[num].ttmode = TTMODE_RINGRACERS;
|
||||
else if (fastcmp(word2, "OLD"))
|
||||
menupres[num].ttmode = TTMODE_OLD;
|
||||
titlechanged = true;
|
||||
}
|
||||
|
|
@ -3385,7 +3387,9 @@ void readmaincfg(MYFILE *f)
|
|||
ttname[0] = 0;
|
||||
hidetitlepics = true;
|
||||
}
|
||||
else // if (fastcmp(word2, "OLD") || fastcmp(word2, "SSNTAILS"))
|
||||
else if (fastcmp(word2, "RINGRACERS"))
|
||||
ttmode = TTMODE_RINGRACERS;
|
||||
else if (fastcmp(word2, "OLD") || fastcmp(word2, "SSNTAILS"))
|
||||
ttmode = TTMODE_OLD;
|
||||
titlechanged = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
|
||||
readcupheader(f, cup);
|
||||
}
|
||||
else if (fastcmp(word, "SRB2KART"))
|
||||
else if (fastcmp(word, "RINGRACERS"))
|
||||
{
|
||||
if (isdigit(word2[0]))
|
||||
{
|
||||
|
|
@ -584,7 +584,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
if (i != PATCHVERSION)
|
||||
{
|
||||
deh_warning(
|
||||
"Patch is for SRB2Kart version %d, "
|
||||
"Patch is for Ring Racers version %d, "
|
||||
"only version %d is supported",
|
||||
i,
|
||||
PATCHVERSION
|
||||
|
|
@ -594,12 +594,16 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
|
|||
else
|
||||
{
|
||||
deh_warning(
|
||||
"SRB2Kart version definition has incorrect format, "
|
||||
"use \"SRB2KART %d\"",
|
||||
"Ring Racers version definition has incorrect format, "
|
||||
"use \"RINGRACERS %d\"",
|
||||
PATCHVERSION
|
||||
);
|
||||
}
|
||||
}
|
||||
else if (fastcmp(word, "SRB2KART"))
|
||||
{
|
||||
deh_warning("Patch is only compatible with SRB2Kart.");
|
||||
}
|
||||
else if (fastcmp(word, "SRB2"))
|
||||
{
|
||||
deh_warning("Patch is only compatible with base SRB2.");
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include "doomdef.h"
|
||||
|
||||
// Feel free to provide your own, if you care enough to create another Discord app for this :P
|
||||
#define DISCORD_APPID "503531144395096085"
|
||||
#define DISCORD_APPID "977470696852684833"
|
||||
|
||||
// length of IP strings
|
||||
#define IP_SIZE 21
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ extern char logfilename[1024];
|
|||
// The string used in the alert that pops up in the event of an update being available.
|
||||
// Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!).
|
||||
#define UPDATE_ALERT_STRING \
|
||||
"A new update is available for SRB2Kart.\n"\
|
||||
"A new update is available for Ring Racers.\n"\
|
||||
"Please visit kartkrew.org to download it.\n"\
|
||||
"\n"\
|
||||
"You are using version: %s\n"\
|
||||
|
|
@ -443,9 +443,9 @@ enum {
|
|||
|
||||
// Name of local directory for config files and savegames
|
||||
#if (((defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)) && !defined (__CYGWIN__)) && !defined (__APPLE__)
|
||||
#define DEFAULTDIR ".srb2kart"
|
||||
#define DEFAULTDIR ".ringracers"
|
||||
#else
|
||||
#define DEFAULTDIR "srb2kart"
|
||||
#define DEFAULTDIR "ringracers"
|
||||
#endif
|
||||
|
||||
#include "g_state.h"
|
||||
|
|
|
|||
111
src/f_finale.c
|
|
@ -44,7 +44,7 @@
|
|||
// Stage of animation:
|
||||
// 0 = text, 1 = art screen
|
||||
INT32 finalecount;
|
||||
INT32 titlescrollxspeed = 5;
|
||||
INT32 titlescrollxspeed = 16;
|
||||
INT32 titlescrollyspeed = 0;
|
||||
UINT8 titlemapinaction = TITLEMAP_OFF;
|
||||
|
||||
|
|
@ -58,8 +58,6 @@ static tic_t stoptimer;
|
|||
|
||||
static boolean keypressed = false;
|
||||
|
||||
static tic_t xscrolltimer;
|
||||
static tic_t yscrolltimer;
|
||||
static INT32 menuanimtimer; // Title screen: background animation timing
|
||||
mobj_t *titlemapcameraref = NULL;
|
||||
|
||||
|
|
@ -81,7 +79,7 @@ static UINT32 demoIdleLeft;
|
|||
|
||||
// customizable title screen graphics
|
||||
|
||||
ttmode_enum ttmode = TTMODE_OLD;
|
||||
ttmode_enum ttmode = TTMODE_RINGRACERS;
|
||||
UINT8 ttscale = 1; // FRACUNIT / ttscale
|
||||
// ttmode user vars
|
||||
char ttname[9];
|
||||
|
|
@ -108,6 +106,13 @@ static patch_t *ttcheckers; // *vroom* KART
|
|||
static patch_t *ttkflash; // flash screen
|
||||
*/
|
||||
|
||||
static patch_t *kts_bumper; // DR ROBOTNIKS RING RACERS
|
||||
static patch_t *kts_eggman; // dr. robotnik himself
|
||||
static patch_t *kts_tails; // tails himself
|
||||
static patch_t *kts_tails_tails; // tails' tails
|
||||
static patch_t *kts_electricity[6]; // ring o' electricity
|
||||
static patch_t *kts_copyright; // (C) SEGA
|
||||
|
||||
#define NOWAY
|
||||
|
||||
#ifdef NOWAY
|
||||
|
|
@ -521,7 +526,7 @@ boolean F_IntroResponder(event_t *event)
|
|||
// CREDITS
|
||||
// =========
|
||||
static const char *credits[] = {
|
||||
"\1SRB2Kart",
|
||||
"\1Dr. Robotnik's Ring Racers",
|
||||
"\1Credits",
|
||||
"",
|
||||
"\1Game Design",
|
||||
|
|
@ -1688,10 +1693,10 @@ void F_InitMenuPresValues(void)
|
|||
// Set defaults for presentation values
|
||||
strncpy(curbgname, "TITLESKY", 9);
|
||||
curfadevalue = 16;
|
||||
curbgcolor = 31;
|
||||
curbgxspeed = (gamestate == GS_TIMEATTACK) ? 0 : titlescrollxspeed;
|
||||
curbgyspeed = (gamestate == GS_TIMEATTACK) ? 22 : titlescrollyspeed;
|
||||
curbghide = (gamestate == GS_TIMEATTACK) ? false : true;
|
||||
curbgcolor = -1;
|
||||
curbgxspeed = titlescrollxspeed;
|
||||
curbgyspeed = titlescrollyspeed;
|
||||
curbghide = false;
|
||||
|
||||
curhidepics = hidetitlepics;
|
||||
curttmode = ttmode;
|
||||
|
|
@ -1721,24 +1726,26 @@ void F_SkyScroll(INT32 scrollxspeed, INT32 scrollyspeed, const char *patchname)
|
|||
INT32 pw, ph; // scaled by dupz
|
||||
patch_t *pat;
|
||||
INT32 i, j;
|
||||
INT32 xscrolltimer, yscrolltimer;
|
||||
|
||||
if (rendermode == render_none)
|
||||
return;
|
||||
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 31);
|
||||
|
||||
if (!patchname || !patchname[0])
|
||||
{
|
||||
V_DrawFill(0, 0, vid.width, vid.height, 31);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!scrollxspeed && !scrollyspeed)
|
||||
{
|
||||
V_DrawPatchFill(W_CachePatchName(patchname, PU_PATCH_LOWPRIORITY));
|
||||
return;
|
||||
}
|
||||
|
||||
pat = W_CachePatchName(patchname, PU_PATCH_LOWPRIORITY);
|
||||
|
||||
if (scrollxspeed == 0 && scrollyspeed == 0)
|
||||
{
|
||||
V_DrawPatchFill(pat);
|
||||
return;
|
||||
}
|
||||
|
||||
patwidth = pat->width;
|
||||
patheight = pat->height;
|
||||
pw = patwidth * dupz;
|
||||
|
|
@ -1768,8 +1775,6 @@ void F_SkyScroll(INT32 scrollxspeed, INT32 scrollyspeed, const char *patchname)
|
|||
V_NOSCALESTART, pat);
|
||||
}
|
||||
}
|
||||
|
||||
W_UnlockCachedPatch(pat);
|
||||
}
|
||||
|
||||
#define LOADTTGFX(arr, name, maxf) \
|
||||
|
|
@ -1800,15 +1805,30 @@ else \
|
|||
|
||||
static void F_CacheTitleScreen(void)
|
||||
{
|
||||
UINT16 i;
|
||||
|
||||
switch(curttmode)
|
||||
{
|
||||
case TTMODE_OLD:
|
||||
case TTMODE_NONE:
|
||||
break;
|
||||
|
||||
case TTMODE_OLD:
|
||||
break; // idk do we still want this?
|
||||
|
||||
case TTMODE_RINGRACERS:
|
||||
kts_bumper = W_CachePatchName("KTSBUMPR1", PU_PATCH_LOWPRIORITY);
|
||||
kts_eggman = W_CachePatchName("KTSEGG01", PU_PATCH_LOWPRIORITY);
|
||||
kts_tails = W_CachePatchName("KTSTAL01", PU_PATCH_LOWPRIORITY);
|
||||
kts_tails_tails = W_CachePatchName("KTSTAL02", PU_PATCH_LOWPRIORITY);
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
kts_electricity[i] = W_CachePatchName(va("KTSELCT%.1d", i+1), PU_PATCH_LOWPRIORITY);
|
||||
}
|
||||
kts_copyright = W_CachePatchName("KTSCR", PU_PATCH_LOWPRIORITY);
|
||||
break;
|
||||
|
||||
case TTMODE_USER:
|
||||
{
|
||||
UINT16 i;
|
||||
lumpnum_t lumpnum;
|
||||
char lumpname[9];
|
||||
|
||||
|
|
@ -1932,8 +1952,46 @@ void F_TitleScreenDrawer(void)
|
|||
|
||||
switch(curttmode)
|
||||
{
|
||||
case TTMODE_OLD:
|
||||
case TTMODE_NONE:
|
||||
break;
|
||||
|
||||
case TTMODE_RINGRACERS:
|
||||
{
|
||||
const char *eggName = "eggman";
|
||||
INT32 eggSkin = R_SkinAvailable(eggName);
|
||||
skincolornum_t eggColor = SKINCOLOR_RED;
|
||||
UINT8 *eggColormap = NULL;
|
||||
|
||||
const char *tailsName = "tails";
|
||||
INT32 tailsSkin = R_SkinAvailable(tailsName);
|
||||
skincolornum_t tailsColor = SKINCOLOR_ORANGE;
|
||||
UINT8 *tailsColormap = NULL;
|
||||
|
||||
if (eggSkin != -1)
|
||||
{
|
||||
eggColor = skins[eggSkin].prefcolor;
|
||||
}
|
||||
eggColormap = R_GetTranslationColormap(TC_DEFAULT, eggColor, GTC_MENUCACHE);
|
||||
|
||||
if (tailsSkin != -1)
|
||||
{
|
||||
tailsColor = skins[tailsSkin].prefcolor;
|
||||
}
|
||||
tailsColormap = R_GetTranslationColormap(TC_DEFAULT, tailsColor, GTC_MENUCACHE);
|
||||
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_tails_tails, tailsColormap);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, V_ADD, kts_electricity[finalecount % 6], NULL);
|
||||
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_eggman, eggColormap);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_tails, tailsColormap);
|
||||
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_bumper, NULL);
|
||||
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT, 0, kts_copyright, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
case TTMODE_OLD:
|
||||
/*
|
||||
if (finalecount < 50)
|
||||
{
|
||||
|
|
@ -1974,7 +2032,7 @@ void F_TitleScreenDrawer(void)
|
|||
V_DrawSmallScaledPatch(84, 36, transval<<V_ALPHASHIFT, ttkflash);
|
||||
}
|
||||
*/
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 64, V_ALLOWLOWERCASE, "SRB2 Kart v2.0");
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 64, V_ALLOWLOWERCASE, "Dr. Robotnik's Ring Racers v2.0");
|
||||
|
||||
#ifdef DEVELOP
|
||||
#if defined(TESTERS)
|
||||
|
|
@ -2020,22 +2078,19 @@ void F_MenuPresTicker(boolean run)
|
|||
// (no longer) De-Demo'd Title Screen
|
||||
void F_TitleScreenTicker(boolean run)
|
||||
{
|
||||
F_MenuPresTicker(true); // title sky
|
||||
|
||||
if (run)
|
||||
{
|
||||
finalecount++;
|
||||
|
||||
if (finalecount == 10)
|
||||
{
|
||||
S_StartSound(NULL, sfx_s23e);
|
||||
}
|
||||
else if (finalecount == 50)
|
||||
if (finalecount == 1)
|
||||
{
|
||||
// Now start the music
|
||||
if (menupres[MN_MAIN].musname[0])
|
||||
S_ChangeMusic(menupres[MN_MAIN].musname, menupres[MN_MAIN].mustrack, menupres[MN_MAIN].muslooping);
|
||||
else
|
||||
S_ChangeMusicInternal("_title", looptitle);
|
||||
S_StartSound(NULL, sfx_s23c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,9 +80,9 @@ extern INT32 titlescrollyspeed;
|
|||
typedef enum
|
||||
{
|
||||
TTMODE_NONE = 0,
|
||||
TTMODE_RINGRACERS,
|
||||
TTMODE_OLD,
|
||||
TTMODE_USER,
|
||||
//TTMODE_RINGRACERS
|
||||
TTMODE_USER
|
||||
} ttmode_enum;
|
||||
|
||||
#define TTMAX_ALACROIX 30 // max frames for SONIC typeface, plus one for NULL terminating entry
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ closedir (DIR * dirp)
|
|||
|
||||
static CV_PossibleValue_t addons_cons_t[] = {{0, "Default"},
|
||||
#if 1
|
||||
{1, "HOME"}, {2, "SRB2"},
|
||||
{1, "HOME"}, {2, "RINGRACERS"},
|
||||
#endif
|
||||
{3, "CUSTOM"}, {0, NULL}};
|
||||
|
||||
|
|
|
|||
|
|
@ -2520,7 +2520,7 @@ void G_LoadDemoInfo(menudemo_t *pdemo)
|
|||
|
||||
if (memcmp(info_p, DEMOHEADER, 12))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is not a SRB2Kart replay file.\n"), pdemo->filepath);
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is not a Ring Racers replay file.\n"), pdemo->filepath);
|
||||
pdemo->type = MD_INVALID;
|
||||
sprintf(pdemo->title, "INVALID REPLAY");
|
||||
Z_Free(infobuffer);
|
||||
|
|
@ -2760,7 +2760,7 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
demo.playback = true;
|
||||
if (memcmp(demo_p, DEMOHEADER, 12))
|
||||
{
|
||||
snprintf(msg, 1024, M_GetText("%s is not a SRB2Kart replay file.\n"), pdemoname);
|
||||
snprintf(msg, 1024, M_GetText("%s is not a Ring Racers replay file.\n"), pdemoname);
|
||||
CONS_Alert(CONS_ERROR, "%s", msg);
|
||||
M_StartMessage(msg, NULL, MM_NOTHING);
|
||||
Z_Free(pdemoname);
|
||||
|
|
|
|||
|
|
@ -3972,7 +3972,7 @@ void G_LoadGameData(void)
|
|||
// Version check
|
||||
if (READUINT32(save_p) != 0xFCAFE211)
|
||||
{
|
||||
const char *gdfolder = "the SRB2Kart folder";
|
||||
const char *gdfolder = "the Ring Racers folder";
|
||||
if (strcmp(srb2home,"."))
|
||||
gdfolder = srb2home;
|
||||
|
||||
|
|
@ -4062,7 +4062,7 @@ void G_LoadGameData(void)
|
|||
// Landing point for corrupt gamedata
|
||||
datacorrupt:
|
||||
{
|
||||
const char *gdfolder = "the SRB2Kart folder";
|
||||
const char *gdfolder = "the Ring Racers folder";
|
||||
if (strcmp(srb2home,"."))
|
||||
gdfolder = srb2home;
|
||||
|
||||
|
|
|
|||
626
src/k_bot.c
|
|
@ -167,7 +167,7 @@ void K_UpdateMatchRaceBots(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (difficulty == 0 || bossinfo.boss == true)
|
||||
if (difficulty == 0 || !(gametyperules & GTR_BOTS) || bossinfo.boss == true)
|
||||
{
|
||||
wantedbots = 0;
|
||||
}
|
||||
|
|
@ -294,6 +294,67 @@ boolean K_BotCanTakeCut(player_t *player)
|
|||
return false;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static fixed_t K_BotSpeedScaled(player_t *player, fixed_t speed)
|
||||
|
||||
Gets the bot's speed value, adjusted for predictions.
|
||||
Mainly to make bots brake earlier when on friction sectors.
|
||||
|
||||
Input Arguments:-
|
||||
player - The bot player to calculate speed for.
|
||||
speed - Raw speed value.
|
||||
|
||||
Return:-
|
||||
The bot's speed value for calculations.
|
||||
--------------------------------------------------*/
|
||||
static fixed_t K_BotSpeedScaled(player_t *player, fixed_t speed)
|
||||
{
|
||||
fixed_t result = speed;
|
||||
|
||||
if (player->mo->movefactor != FRACUNIT)
|
||||
{
|
||||
fixed_t moveFactor = player->mo->movefactor;
|
||||
|
||||
if (moveFactor == 0)
|
||||
{
|
||||
moveFactor = 1;
|
||||
}
|
||||
|
||||
// Reverse against friction. Allows for bots to
|
||||
// acknowledge they'll be moving faster on ice,
|
||||
// and to steer harder / brake earlier.
|
||||
moveFactor = FixedDiv(FRACUNIT, moveFactor);
|
||||
|
||||
// The full value is way too strong, reduce it.
|
||||
moveFactor -= (moveFactor - FRACUNIT)*3/4;
|
||||
|
||||
result = FixedMul(result, moveFactor);
|
||||
}
|
||||
|
||||
if (player->mo->standingslope != NULL)
|
||||
{
|
||||
const pslope_t *slope = player->mo->standingslope;
|
||||
|
||||
if (!(slope->flags & SL_NOPHYSICS) && abs(slope->zdelta) >= FRACUNIT/21)
|
||||
{
|
||||
fixed_t slopeMul = FRACUNIT;
|
||||
angle_t angle = K_MomentumAngle(player->mo) - slope->xydirection;
|
||||
|
||||
if (P_MobjFlip(player->mo) * slope->zdelta < 0)
|
||||
angle ^= ANGLE_180;
|
||||
|
||||
// Going uphill: 0
|
||||
// Going downhill: FRACUNIT*2
|
||||
slopeMul = FRACUNIT + FINECOSINE(angle >> ANGLETOFINESHIFT);
|
||||
|
||||
// Range: 0.9 to 1.1
|
||||
result = FixedMul(result, (FRACUNIT*9/10) + (slopeMul/10));
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static line_t *K_FindBotController(mobj_t *mo)
|
||||
|
||||
|
|
@ -426,7 +487,7 @@ static UINT32 K_BotRubberbandDistance(player_t *player)
|
|||
fixed_t K_BotRubberband(player_t *player)
|
||||
{
|
||||
fixed_t rubberband = FRACUNIT;
|
||||
fixed_t max, min;
|
||||
fixed_t rubbermax, rubbermin;
|
||||
player_t *firstplace = NULL;
|
||||
line_t *botController = NULL;
|
||||
UINT8 i;
|
||||
|
|
@ -477,32 +538,34 @@ fixed_t K_BotRubberband(player_t *player)
|
|||
if (wanteddist > player->distancetofinish)
|
||||
{
|
||||
// Whoa, you're too far ahead! Slow back down a little.
|
||||
rubberband += (MAXBOTDIFFICULTY - player->botvars.difficulty) * (distdiff / 3);
|
||||
rubberband += (DIFFICULTBOT - min(DIFFICULTBOT, player->botvars.difficulty)) * (distdiff / 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Catch up to your position!
|
||||
rubberband += (2*player->botvars.difficulty) * distdiff;
|
||||
rubberband += player->botvars.difficulty * distdiff;
|
||||
}
|
||||
}
|
||||
|
||||
// Lv. 1: x1.0 max
|
||||
// Lv. 5: x1.5 max
|
||||
// Lv. 9: x2.0 max
|
||||
max = FRACUNIT + ((FRACUNIT * (player->botvars.difficulty - 1)) / (MAXBOTDIFFICULTY - 1));
|
||||
// Lv. 1: x1.0 max
|
||||
// Lv. 5: x1.4 max
|
||||
// Lv. 9: x1.8 max
|
||||
// Lv. MAX: x2.2 max
|
||||
rubbermax = FRACUNIT + ((FRACUNIT * (player->botvars.difficulty - 1)) / 10);
|
||||
|
||||
// Lv. 1: x0.75 min
|
||||
// Lv. 5: x0.875 min
|
||||
// Lv. 9: x1.0 min
|
||||
min = FRACUNIT - (((FRACUNIT/4) * (MAXBOTDIFFICULTY - player->botvars.difficulty)) / (MAXBOTDIFFICULTY - 1));
|
||||
// Lv. 1: x0.75 min
|
||||
// Lv. 5: x0.875 min
|
||||
// Lv. 9: x1.0 min
|
||||
// Lv. MAX: x1.0 min
|
||||
rubbermin = FRACUNIT - (((FRACUNIT/4) * (DIFFICULTBOT - min(DIFFICULTBOT, player->botvars.difficulty))) / (DIFFICULTBOT - 1));
|
||||
|
||||
if (rubberband > max)
|
||||
if (rubberband > rubbermax)
|
||||
{
|
||||
rubberband = max;
|
||||
rubberband = rubbermax;
|
||||
}
|
||||
else if (rubberband < min)
|
||||
else if (rubberband < rubbermin)
|
||||
{
|
||||
rubberband = min;
|
||||
rubberband = rubbermin;
|
||||
}
|
||||
|
||||
return rubberband;
|
||||
|
|
@ -573,8 +636,9 @@ fixed_t K_BotTopSpeedRubberband(player_t *player)
|
|||
--------------------------------------------------*/
|
||||
fixed_t K_BotFrictionRubberband(player_t *player, fixed_t frict)
|
||||
{
|
||||
const fixed_t value = 20776;
|
||||
fixed_t rubberband = K_BotRubberband(player) - FRACUNIT;
|
||||
fixed_t origFrict, newFrict;
|
||||
fixed_t newFrict = frict;
|
||||
|
||||
if (rubberband <= 0)
|
||||
{
|
||||
|
|
@ -584,30 +648,11 @@ fixed_t K_BotFrictionRubberband(player_t *player, fixed_t frict)
|
|||
|
||||
if (player->tiregrease > 0)
|
||||
{
|
||||
// This isn't great -- it means rubberbanding will slow down when they hit a spring
|
||||
// But it's better than the opposite where they accelerate into hyperspace :V
|
||||
// (would appreciate an actual fix though ... could try being additive instead of multiplicative)
|
||||
// Bots will lose all of their momentum without this.
|
||||
return frict;
|
||||
}
|
||||
|
||||
origFrict = FixedDiv(ORIG_FRICTION, FRACUNIT + (rubberband / 2));
|
||||
|
||||
if (frict == ORIG_FRICTION)
|
||||
{
|
||||
newFrict = origFrict;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do some mumbo jumbo to make our friction value
|
||||
// relative to what it WOULD be for ORIG_FRICTION.
|
||||
// (I hate multiplicative friction :/)
|
||||
|
||||
fixed_t offset = ORIG_FRICTION - frict;
|
||||
fixed_t ratio = FixedDiv(frict, ORIG_FRICTION);
|
||||
|
||||
offset = FixedDiv(offset, ratio);
|
||||
newFrict = frict + offset;
|
||||
}
|
||||
newFrict = frict - FixedMul(value, rubberband);
|
||||
|
||||
if (newFrict < 0)
|
||||
newFrict = 0;
|
||||
|
|
@ -673,7 +718,7 @@ static botprediction_t *K_CreateBotPrediction(player_t *player)
|
|||
const INT16 normal = KART_FULLTURN; // "Standard" handling to compare to
|
||||
|
||||
const tic_t futuresight = (TICRATE * normal) / max(1, handling); // How far ahead into the future to try and predict
|
||||
const fixed_t speed = P_AproxDistance(player->mo->momx, player->mo->momy);
|
||||
const fixed_t speed = K_BotSpeedScaled(player, P_AproxDistance(player->mo->momx, player->mo->momy));
|
||||
|
||||
const INT32 startDist = (768 * mapobjectscale) / FRACUNIT;
|
||||
const INT32 distance = ((speed / FRACUNIT) * futuresight) + startDist;
|
||||
|
|
@ -851,7 +896,7 @@ static UINT8 K_TrySpindash(player_t *player)
|
|||
{
|
||||
INT32 boosthold = starttime - K_GetSpindashChargeTime(player);
|
||||
|
||||
boosthold -= (MAXBOTDIFFICULTY - player->botvars.difficulty) * difficultyModifier;
|
||||
boosthold -= (DIFFICULTBOT - min(DIFFICULTBOT, player->botvars.difficulty)) * difficultyModifier;
|
||||
|
||||
if (leveltime >= (unsigned)boosthold)
|
||||
{
|
||||
|
|
@ -1017,6 +1062,264 @@ static void K_BotTrick(player_t *player, ticcmd_t *cmd, line_t *botController)
|
|||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static INT32 K_HandleBotTrack(player_t *player, ticcmd_t *cmd, botprediction_t *predict)
|
||||
|
||||
Determines inputs for standard track driving.
|
||||
|
||||
Input Arguments:-
|
||||
player - Player to generate the ticcmd for.
|
||||
cmd - The player's ticcmd to modify.
|
||||
predict - Pointer to the bot's prediction.
|
||||
|
||||
Return:-
|
||||
New value for turn amount.
|
||||
--------------------------------------------------*/
|
||||
static INT32 K_HandleBotTrack(player_t *player, ticcmd_t *cmd, botprediction_t *predict, angle_t destangle)
|
||||
{
|
||||
// Handle steering towards waypoints!
|
||||
INT32 turnamt = 0;
|
||||
SINT8 turnsign = 0;
|
||||
angle_t moveangle, angle;
|
||||
INT16 anglediff;
|
||||
|
||||
I_Assert(predict != NULL);
|
||||
|
||||
moveangle = player->mo->angle;
|
||||
angle = (moveangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
turnsign = -1; // Turn right
|
||||
anglediff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
turnsign = 1; // Turn left
|
||||
anglediff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
anglediff = abs(anglediff);
|
||||
turnamt = KART_FULLTURN * turnsign;
|
||||
|
||||
if (anglediff > 90)
|
||||
{
|
||||
// Wrong way!
|
||||
cmd->forwardmove = -MAXPLMOVE;
|
||||
cmd->buttons |= BT_BRAKE;
|
||||
}
|
||||
else
|
||||
{
|
||||
const fixed_t playerwidth = (player->mo->radius * 2);
|
||||
fixed_t realrad = predict->radius - (playerwidth * 4); // Remove a "safe" distance away from the edges of the road
|
||||
fixed_t rad = realrad;
|
||||
fixed_t dirdist = K_DistanceOfLineFromPoint(
|
||||
player->mo->x, player->mo->y,
|
||||
player->mo->x + FINECOSINE(moveangle >> ANGLETOFINESHIFT), player->mo->y + FINESINE(moveangle >> ANGLETOFINESHIFT),
|
||||
predict->x, predict->y
|
||||
);
|
||||
|
||||
if (realrad < player->mo->radius)
|
||||
{
|
||||
realrad = player->mo->radius;
|
||||
}
|
||||
|
||||
if (anglediff > 0)
|
||||
{
|
||||
// Become more precise based on how hard you need to turn
|
||||
// This makes predictions into turns a little nicer
|
||||
// Facing 90 degrees away from the predicted point gives you a 1/3 radius
|
||||
rad = FixedMul(rad, ((135 - anglediff) * FRACUNIT) / 135);
|
||||
}
|
||||
|
||||
if (rad > realrad)
|
||||
{
|
||||
rad = realrad;
|
||||
}
|
||||
else if (rad < playerwidth)
|
||||
{
|
||||
rad = playerwidth;
|
||||
}
|
||||
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
|
||||
// Full speed ahead!
|
||||
cmd->forwardmove = MAXPLMOVE;
|
||||
|
||||
if (dirdist <= rad)
|
||||
{
|
||||
fixed_t speedmul = FixedDiv(K_BotSpeedScaled(player, player->speed), K_GetKartSpeed(player, false));
|
||||
fixed_t speedrad = rad/4;
|
||||
|
||||
if (speedmul > FRACUNIT)
|
||||
{
|
||||
speedmul = FRACUNIT;
|
||||
}
|
||||
|
||||
// Increase radius with speed
|
||||
// At low speed, the CPU will try to be more accurate
|
||||
// At high speed, they're more likely to lawnmower
|
||||
speedrad += FixedMul(speedmul, rad - speedrad);
|
||||
|
||||
if (speedrad < playerwidth)
|
||||
{
|
||||
speedrad = playerwidth;
|
||||
}
|
||||
|
||||
if (dirdist <= speedrad)
|
||||
{
|
||||
// Don't turn at all
|
||||
turnamt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return turnamt;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static INT32 K_HandleBotReverse(player_t *player, ticcmd_t *cmd, botprediction_t *predict)
|
||||
|
||||
Determines inputs for reversing.
|
||||
|
||||
Input Arguments:-
|
||||
player - Player to generate the ticcmd for.
|
||||
cmd - The player's ticcmd to modify.
|
||||
predict - Pointer to the bot's prediction.
|
||||
|
||||
Return:-
|
||||
New value for turn amount.
|
||||
--------------------------------------------------*/
|
||||
static INT32 K_HandleBotReverse(player_t *player, ticcmd_t *cmd, botprediction_t *predict, angle_t destangle)
|
||||
{
|
||||
// Handle steering towards waypoints!
|
||||
INT32 turnamt = 0;
|
||||
SINT8 turnsign = 0;
|
||||
angle_t moveangle, angle;
|
||||
INT16 anglediff, momdiff;
|
||||
|
||||
if (predict != NULL)
|
||||
{
|
||||
// TODO: Should we reverse through bot controllers?
|
||||
return K_HandleBotTrack(player, cmd, predict, destangle);
|
||||
}
|
||||
|
||||
if (player->nextwaypoint == NULL
|
||||
|| player->nextwaypoint->mobj == NULL
|
||||
|| P_MobjWasRemoved(player->nextwaypoint->mobj))
|
||||
{
|
||||
// No data available...
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((player->nextwaypoint->prevwaypoints != NULL)
|
||||
&& (player->nextwaypoint->numprevwaypoints > 0U))
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0U; i < player->nextwaypoint->numprevwaypoints; i++)
|
||||
{
|
||||
if (!K_GetWaypointIsEnabled(player->nextwaypoint->prevwaypoints[i]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
destangle = R_PointToAngle2(
|
||||
player->nextwaypoint->prevwaypoints[i]->mobj->x, player->nextwaypoint->prevwaypoints[i]->mobj->y,
|
||||
player->nextwaypoint->mobj->x, player->nextwaypoint->mobj->y
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate turn direction first.
|
||||
moveangle = player->mo->angle;
|
||||
angle = (moveangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
turnsign = -1; // Turn right
|
||||
anglediff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
turnsign = 1; // Turn left
|
||||
anglediff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
anglediff = abs(anglediff);
|
||||
turnamt = KART_FULLTURN * turnsign;
|
||||
|
||||
// Now calculate momentum
|
||||
momdiff = 180;
|
||||
if (player->speed > player->mo->scale)
|
||||
{
|
||||
momdiff = 0;
|
||||
moveangle = K_MomentumAngle(player->mo);
|
||||
angle = (moveangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
momdiff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
momdiff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
momdiff = abs(momdiff);
|
||||
}
|
||||
|
||||
if (anglediff > 90 || momdiff < 90)
|
||||
{
|
||||
// We're not facing the track,
|
||||
// or we're going too fast.
|
||||
// Let's E-Brake.
|
||||
cmd->forwardmove = 0;
|
||||
cmd->buttons |= BT_ACCELERATE|BT_BRAKE;
|
||||
}
|
||||
else
|
||||
{
|
||||
fixed_t slopeMul = FRACUNIT;
|
||||
|
||||
if (player->mo->standingslope != NULL)
|
||||
{
|
||||
const pslope_t *slope = player->mo->standingslope;
|
||||
|
||||
if (!(slope->flags & SL_NOPHYSICS) && abs(slope->zdelta) >= FRACUNIT/21)
|
||||
{
|
||||
angle_t sangle = player->mo->angle - slope->xydirection;
|
||||
|
||||
if (P_MobjFlip(player->mo) * slope->zdelta < 0)
|
||||
sangle ^= ANGLE_180;
|
||||
|
||||
slopeMul = FRACUNIT - FINECOSINE(sangle >> ANGLETOFINESHIFT);
|
||||
}
|
||||
}
|
||||
|
||||
#define STEEP_SLOPE (FRACUNIT*11/10)
|
||||
if (slopeMul > STEEP_SLOPE)
|
||||
{
|
||||
// Slope is too steep to reverse -- EBrake.
|
||||
cmd->forwardmove = 0;
|
||||
cmd->buttons |= BT_ACCELERATE|BT_BRAKE;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd->forwardmove = -MAXPLMOVE;
|
||||
cmd->buttons |= BT_BRAKE; //|BT_LOOKBACK
|
||||
}
|
||||
#undef STEEP_SLOPE
|
||||
|
||||
if (anglediff < 10)
|
||||
{
|
||||
turnamt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
return turnamt;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
||||
|
||||
|
|
@ -1026,6 +1329,7 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
{
|
||||
botprediction_t *predict = NULL;
|
||||
boolean trySpindash = true;
|
||||
angle_t destangle = 0;
|
||||
UINT8 spindash = 0;
|
||||
INT32 turnamt = 0;
|
||||
line_t *botController = NULL;
|
||||
|
|
@ -1039,13 +1343,11 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
// Remove any existing controls
|
||||
memset(cmd, 0, sizeof(ticcmd_t));
|
||||
|
||||
if (
|
||||
gamestate != GS_LEVEL
|
||||
if (gamestate != GS_LEVEL
|
||||
|| player->mo->scale <= 1
|
||||
|| player->playerstate == PST_DEAD
|
||||
|| leveltime <= introtime
|
||||
|| (player->exiting && !(gametyperules & GTR_CIRCUIT))
|
||||
)
|
||||
|| !(gametyperules & GTR_BOTS))
|
||||
{
|
||||
// No need to do anything else.
|
||||
return;
|
||||
|
|
@ -1067,170 +1369,133 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
return;
|
||||
}
|
||||
|
||||
if ((player->nextwaypoint != NULL
|
||||
&& player->nextwaypoint->mobj != NULL
|
||||
&& !P_MobjWasRemoved(player->nextwaypoint->mobj))
|
||||
|| (botController != NULL))
|
||||
destangle = player->mo->angle;
|
||||
|
||||
if (botController != NULL && (botController->flags & ML_EFFECT1))
|
||||
{
|
||||
// Handle steering towards waypoints!
|
||||
SINT8 turnsign = 0;
|
||||
angle_t destangle, moveangle, angle;
|
||||
INT16 anglediff;
|
||||
const fixed_t dist = (player->mo->radius * 4);
|
||||
|
||||
if (botController != NULL && (botController->flags & ML_EFFECT1))
|
||||
{
|
||||
const fixed_t dist = (player->mo->radius * 4);
|
||||
// X Offset: Movement direction
|
||||
destangle = FixedAngle(sides[botController->sidenum[0]].textureoffset);
|
||||
|
||||
// X Offset: Movement direction
|
||||
destangle = FixedAngle(sides[botController->sidenum[0]].textureoffset);
|
||||
// Overwritten prediction
|
||||
predict = Z_Calloc(sizeof(botprediction_t), PU_STATIC, NULL);
|
||||
|
||||
// Overwritten prediction
|
||||
predict = Z_Calloc(sizeof(botprediction_t), PU_STATIC, NULL);
|
||||
|
||||
predict->x = player->mo->x + FixedMul(dist, FINECOSINE(destangle >> ANGLETOFINESHIFT));
|
||||
predict->y = player->mo->y + FixedMul(dist, FINESINE(destangle >> ANGLETOFINESHIFT));
|
||||
predict->radius = (DEFAULT_WAYPOINT_RADIUS / 4) * mapobjectscale;
|
||||
}
|
||||
else
|
||||
{
|
||||
predict = K_CreateBotPrediction(player);
|
||||
|
||||
K_NudgePredictionTowardsObjects(predict, player);
|
||||
|
||||
destangle = R_PointToAngle2(player->mo->x, player->mo->y, predict->x, predict->y);
|
||||
}
|
||||
|
||||
moveangle = player->mo->angle;
|
||||
angle = (moveangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
turnsign = -1; // Turn right
|
||||
anglediff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
turnsign = 1; // Turn left
|
||||
anglediff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
anglediff = abs(anglediff);
|
||||
turnamt = KART_FULLTURN * turnsign;
|
||||
|
||||
if (anglediff > 90)
|
||||
{
|
||||
// Wrong way!
|
||||
cmd->forwardmove = -MAXPLMOVE;
|
||||
cmd->buttons |= BT_BRAKE;
|
||||
}
|
||||
else
|
||||
{
|
||||
const fixed_t playerwidth = (player->mo->radius * 2);
|
||||
fixed_t realrad = predict->radius - (playerwidth * 4); // Remove a "safe" distance away from the edges of the road
|
||||
fixed_t rad = realrad;
|
||||
fixed_t dirdist = K_DistanceOfLineFromPoint(
|
||||
player->mo->x, player->mo->y,
|
||||
player->mo->x + FINECOSINE(moveangle >> ANGLETOFINESHIFT), player->mo->y + FINESINE(moveangle >> ANGLETOFINESHIFT),
|
||||
predict->x, predict->y
|
||||
);
|
||||
|
||||
if (anglediff > 0)
|
||||
{
|
||||
// Become more precise based on how hard you need to turn
|
||||
// This makes predictions into turns a little nicer
|
||||
// Facing 90 degrees away from the predicted point gives you a 1/3 radius
|
||||
rad = FixedMul(rad, ((135 - anglediff) * FRACUNIT) / 135);
|
||||
}
|
||||
|
||||
if (rad > realrad)
|
||||
{
|
||||
rad = realrad;
|
||||
}
|
||||
else if (rad < playerwidth)
|
||||
{
|
||||
rad = playerwidth;
|
||||
}
|
||||
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
|
||||
// Full speed ahead!
|
||||
cmd->forwardmove = MAXPLMOVE;
|
||||
|
||||
if (dirdist <= rad)
|
||||
{
|
||||
fixed_t speedmul = FixedDiv(player->speed, K_GetKartSpeed(player, false));
|
||||
fixed_t speedrad = rad/4;
|
||||
|
||||
if (speedmul > FRACUNIT)
|
||||
{
|
||||
speedmul = FRACUNIT;
|
||||
}
|
||||
|
||||
// Increase radius with speed
|
||||
// At low speed, the CPU will try to be more accurate
|
||||
// At high speed, they're more likely to lawnmower
|
||||
speedrad += FixedMul(speedmul, rad - speedrad);
|
||||
|
||||
if (speedrad < playerwidth)
|
||||
{
|
||||
speedrad = playerwidth;
|
||||
}
|
||||
|
||||
if (dirdist <= speedrad)
|
||||
{
|
||||
// Don't turn at all
|
||||
turnamt = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
predict->x = player->mo->x + FixedMul(dist, FINECOSINE(destangle >> ANGLETOFINESHIFT));
|
||||
predict->y = player->mo->y + FixedMul(dist, FINESINE(destangle >> ANGLETOFINESHIFT));
|
||||
predict->radius = (DEFAULT_WAYPOINT_RADIUS / 4) * mapobjectscale;
|
||||
}
|
||||
|
||||
if (leveltime <= starttime && finishBeamLine != NULL)
|
||||
{
|
||||
// Handle POSITION!!
|
||||
const fixed_t distBase = 384*mapobjectscale;
|
||||
const fixed_t distAdjust = 64*mapobjectscale;
|
||||
|
||||
const fixed_t closeDist = distBase + (distAdjust * (9 - player->kartweight));
|
||||
const fixed_t farDist = closeDist + (distAdjust * 2);
|
||||
|
||||
const tic_t futureSight = (TICRATE >> 1);
|
||||
|
||||
fixed_t distToFinish = K_DistanceOfLineFromPoint(
|
||||
finishBeamLine->v1->x, finishBeamLine->v1->y,
|
||||
finishBeamLine->v2->x, finishBeamLine->v2->y,
|
||||
player->mo->x, player->mo->y
|
||||
) - player->speed;
|
||||
) - (K_BotSpeedScaled(player, player->speed) * futureSight);
|
||||
|
||||
// Don't run the spindash code at all until we're in the right place
|
||||
trySpindash = false;
|
||||
|
||||
// If you're too far, enable spindash & stay still.
|
||||
// If you're too close, start backing up.
|
||||
|
||||
if (distToFinish < closeDist)
|
||||
{
|
||||
// Silly way of getting us to reverse, but it respects the above code
|
||||
// where we figure out what the shape of the track looks like.
|
||||
UINT16 oldButtons = cmd->buttons;
|
||||
|
||||
cmd->buttons &= ~(BT_ACCELERATE|BT_BRAKE);
|
||||
|
||||
if (oldButtons & BT_ACCELERATE)
|
||||
{
|
||||
cmd->buttons |= BT_BRAKE;
|
||||
}
|
||||
|
||||
if (oldButtons & BT_BRAKE)
|
||||
{
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
}
|
||||
|
||||
cmd->forwardmove = -cmd->forwardmove;
|
||||
// We're too close, we need to start backing up.
|
||||
turnamt = K_HandleBotReverse(player, cmd, predict, destangle);
|
||||
}
|
||||
else if (distToFinish < farDist)
|
||||
{
|
||||
// We're in about the right place, spindash now.
|
||||
cmd->forwardmove = 0;
|
||||
trySpindash = true;
|
||||
INT32 bullyTurn = INT32_MAX;
|
||||
|
||||
// We're in about the right place, let's do whatever we want to.
|
||||
|
||||
if (player->kartspeed >= 5)
|
||||
{
|
||||
// Faster characters want to spindash.
|
||||
// Slower characters will use their momentum.
|
||||
trySpindash = true;
|
||||
}
|
||||
|
||||
// Look for characters to bully.
|
||||
bullyTurn = K_PositionBully(player);
|
||||
if (bullyTurn == INT32_MAX)
|
||||
{
|
||||
// No one to bully, just go for a spindash as anyone.
|
||||
if (predict == NULL)
|
||||
{
|
||||
// Create a prediction.
|
||||
if (player->nextwaypoint != NULL
|
||||
&& player->nextwaypoint->mobj != NULL
|
||||
&& !P_MobjWasRemoved(player->nextwaypoint->mobj))
|
||||
{
|
||||
predict = K_CreateBotPrediction(player);
|
||||
K_NudgePredictionTowardsObjects(predict, player);
|
||||
destangle = R_PointToAngle2(player->mo->x, player->mo->y, predict->x, predict->y);
|
||||
}
|
||||
}
|
||||
|
||||
turnamt = K_HandleBotTrack(player, cmd, predict, destangle);
|
||||
cmd->buttons &= ~(BT_ACCELERATE|BT_BRAKE);
|
||||
cmd->forwardmove = 0;
|
||||
trySpindash = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
turnamt = bullyTurn;
|
||||
|
||||
// If already spindashing, wait until we get a relatively OK charge first.
|
||||
if (player->spindash == 0 || player->spindash > TICRATE)
|
||||
{
|
||||
trySpindash = false;
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
cmd->forwardmove = MAXPLMOVE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Too far away, we need to just drive up.
|
||||
if (predict == NULL)
|
||||
{
|
||||
// Create a prediction.
|
||||
if (player->nextwaypoint != NULL
|
||||
&& player->nextwaypoint->mobj != NULL
|
||||
&& !P_MobjWasRemoved(player->nextwaypoint->mobj))
|
||||
{
|
||||
predict = K_CreateBotPrediction(player);
|
||||
K_NudgePredictionTowardsObjects(predict, player);
|
||||
destangle = R_PointToAngle2(player->mo->x, player->mo->y, predict->x, predict->y);
|
||||
}
|
||||
}
|
||||
|
||||
turnamt = K_HandleBotTrack(player, cmd, predict, destangle);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Handle steering towards waypoints!
|
||||
if (predict == NULL)
|
||||
{
|
||||
// Create a prediction.
|
||||
if (player->nextwaypoint != NULL
|
||||
&& player->nextwaypoint->mobj != NULL
|
||||
&& !P_MobjWasRemoved(player->nextwaypoint->mobj))
|
||||
{
|
||||
predict = K_CreateBotPrediction(player);
|
||||
K_NudgePredictionTowardsObjects(predict, player);
|
||||
destangle = R_PointToAngle2(player->mo->x, player->mo->y, predict->x, predict->y);
|
||||
}
|
||||
}
|
||||
|
||||
turnamt = K_HandleBotTrack(player, cmd, predict, destangle);
|
||||
}
|
||||
|
||||
if (trySpindash == true)
|
||||
|
|
@ -1315,4 +1580,3 @@ void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
Z_Free(predict);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
20
src/k_bot.h
|
|
@ -18,7 +18,10 @@
|
|||
#include "r_defs.h"
|
||||
|
||||
// Maximum value of botvars.difficulty
|
||||
#define MAXBOTDIFFICULTY 9
|
||||
#define MAXBOTDIFFICULTY 13
|
||||
|
||||
// Level of a "difficult" bot. The max bot level was increased, but this keeps all of the same calculations.
|
||||
#define DIFFICULTBOT 9
|
||||
|
||||
// How many tics in a row do you need to turn in this direction before we'll let you turn.
|
||||
// Made it as small as possible without making it look like the bots are twitching constantly.
|
||||
|
|
@ -220,6 +223,21 @@ boolean K_BotHatesThisSector(player_t *player, sector_t *sec, fixed_t x, fixed_t
|
|||
void K_NudgePredictionTowardsObjects(botprediction_t *predict, player_t *player);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
INT32 K_PositionBully(player_t *player)
|
||||
|
||||
Calculates a turn value to reach a player that can be bullied.
|
||||
|
||||
Input Arguments:-
|
||||
player - Bot to run this for.
|
||||
|
||||
Return:-
|
||||
INT32_MAX if couldn't find anything, otherwise a steering value.
|
||||
--------------------------------------------------*/
|
||||
|
||||
INT32 K_PositionBully(player_t *player);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_BuildBotTiccmd(player_t *player, ticcmd_t *cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ struct globalsmuggle
|
|||
INT64 avoidAvgX[2], avoidAvgY[2];
|
||||
UINT32 avoidObjs[2];
|
||||
|
||||
fixed_t annoyscore;
|
||||
mobj_t *annoymo;
|
||||
|
||||
fixed_t closestlinedist;
|
||||
|
||||
fixed_t eggboxx, eggboxy;
|
||||
|
|
@ -771,3 +774,151 @@ void K_NudgePredictionTowardsObjects(botprediction_t *predict, player_t *player)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
static boolean K_FindPlayersToBully(mobj_t *thing)
|
||||
|
||||
Blockmap search function.
|
||||
Finds players around the bot to bump.
|
||||
|
||||
Input Arguments:-
|
||||
thing - Object passed in from iteration.
|
||||
|
||||
Return:-
|
||||
true continues searching, false ends the search early.
|
||||
--------------------------------------------------*/
|
||||
static boolean K_FindPlayersToBully(mobj_t *thing)
|
||||
{
|
||||
INT16 anglediff;
|
||||
fixed_t fulldist;
|
||||
fixed_t ourweight, theirweight, weightdiff;
|
||||
angle_t ourangle, destangle, angle;
|
||||
|
||||
if (!globalsmuggle.botmo || P_MobjWasRemoved(globalsmuggle.botmo) || !globalsmuggle.botmo->player)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (thing->health <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!thing->player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (globalsmuggle.botmo == thing)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
fulldist = R_PointToDist2(globalsmuggle.botmo->x, globalsmuggle.botmo->y, thing->x, thing->y) - thing->radius;
|
||||
|
||||
if (fulldist > globalsmuggle.distancetocheck)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (P_CheckSight(globalsmuggle.botmo, thing) == false)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
ourangle = globalsmuggle.botmo->angle;
|
||||
destangle = R_PointToAngle2(globalsmuggle.botmo->x, globalsmuggle.botmo->y, thing->x, thing->y);
|
||||
angle = (ourangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
anglediff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
anglediff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
anglediff = abs(anglediff);
|
||||
|
||||
ourweight = K_GetMobjWeight(globalsmuggle.botmo, thing);
|
||||
theirweight = K_GetMobjWeight(thing, globalsmuggle.botmo);
|
||||
weightdiff = 0;
|
||||
|
||||
if (anglediff >= 90)
|
||||
{
|
||||
weightdiff = theirweight - ourweight;
|
||||
}
|
||||
else
|
||||
{
|
||||
weightdiff = ourweight - theirweight;
|
||||
}
|
||||
|
||||
if (weightdiff > mapobjectscale && weightdiff > globalsmuggle.annoyscore)
|
||||
{
|
||||
globalsmuggle.annoyscore = weightdiff;
|
||||
globalsmuggle.annoymo = thing;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
INT32 K_PositionBully(player_t *player)
|
||||
|
||||
See header file for description.
|
||||
--------------------------------------------------*/
|
||||
INT32 K_PositionBully(player_t *player)
|
||||
{
|
||||
INT32 xl, xh, yl, yh, bx, by;
|
||||
|
||||
angle_t ourangle, destangle, angle;
|
||||
INT16 anglediff;
|
||||
|
||||
globalsmuggle.botmo = player->mo;
|
||||
globalsmuggle.distancetocheck = 1024*player->mo->scale;
|
||||
|
||||
globalsmuggle.annoymo = NULL;
|
||||
globalsmuggle.annoyscore = 0;
|
||||
|
||||
xl = (unsigned)(globalsmuggle.botmo->x - globalsmuggle.distancetocheck - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
xh = (unsigned)(globalsmuggle.botmo->x + globalsmuggle.distancetocheck - bmaporgx)>>MAPBLOCKSHIFT;
|
||||
yl = (unsigned)(globalsmuggle.botmo->y - globalsmuggle.distancetocheck - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
yh = (unsigned)(globalsmuggle.botmo->y + globalsmuggle.distancetocheck - bmaporgy)>>MAPBLOCKSHIFT;
|
||||
|
||||
BMBOUNDFIX(xl, xh, yl, yh);
|
||||
|
||||
for (bx = xl; bx <= xh; bx++)
|
||||
{
|
||||
for (by = yl; by <= yh; by++)
|
||||
{
|
||||
P_BlockThingsIterator(bx, by, K_FindPlayersToBully);
|
||||
}
|
||||
}
|
||||
|
||||
if (globalsmuggle.annoymo == NULL)
|
||||
{
|
||||
return INT32_MAX;
|
||||
}
|
||||
|
||||
ourangle = globalsmuggle.botmo->angle;
|
||||
destangle = R_PointToAngle2(globalsmuggle.botmo->x, globalsmuggle.botmo->y, globalsmuggle.annoymo->x, globalsmuggle.annoymo->y);
|
||||
angle = (ourangle - destangle);
|
||||
|
||||
if (angle < ANGLE_180)
|
||||
{
|
||||
anglediff = AngleFixed(angle)>>FRACBITS;
|
||||
}
|
||||
else
|
||||
{
|
||||
anglediff = 360-(AngleFixed(angle)>>FRACBITS);
|
||||
}
|
||||
|
||||
if (anglediff < 30)
|
||||
return 0;
|
||||
|
||||
if (anglediff < 0)
|
||||
return -KART_FULLTURN;
|
||||
|
||||
return KART_FULLTURN;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,6 +95,25 @@ INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers)
|
|||
return points;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
SINT8 K_BotDefaultSkin(void)
|
||||
|
||||
See header file for description.
|
||||
--------------------------------------------------*/
|
||||
SINT8 K_BotDefaultSkin(void)
|
||||
{
|
||||
const char *defaultbotskinname = "eggrobo";
|
||||
SINT8 defaultbotskin = R_SkinAvailable(defaultbotskinname);
|
||||
|
||||
if (defaultbotskin == -1)
|
||||
{
|
||||
// This shouldn't happen, but just in case
|
||||
defaultbotskin = 0;
|
||||
}
|
||||
|
||||
return defaultbotskin;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_InitGrandPrixBots(void)
|
||||
|
||||
|
|
@ -102,8 +121,7 @@ INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers)
|
|||
--------------------------------------------------*/
|
||||
void K_InitGrandPrixBots(void)
|
||||
{
|
||||
const char *defaultbotskinname = "eggrobo";
|
||||
SINT8 defaultbotskin = R_SkinAvailable(defaultbotskinname);
|
||||
const SINT8 defaultbotskin = K_BotDefaultSkin();
|
||||
|
||||
const UINT8 startingdifficulty = K_BotStartingDifficulty(grandprixinfo.gamespeed);
|
||||
UINT8 difficultylevels[MAXPLAYERS];
|
||||
|
|
@ -121,12 +139,6 @@ void K_InitGrandPrixBots(void)
|
|||
UINT8 newplayernum = 0;
|
||||
UINT8 i, j;
|
||||
|
||||
if (defaultbotskin == -1)
|
||||
{
|
||||
// This shouldn't happen, but just in case
|
||||
defaultbotskin = 0;
|
||||
}
|
||||
|
||||
memset(competitors, MAXPLAYERS, sizeof (competitors));
|
||||
memset(botskinlist, defaultbotskin, sizeof (botskinlist));
|
||||
|
||||
|
|
@ -144,7 +156,7 @@ void K_InitGrandPrixBots(void)
|
|||
}
|
||||
|
||||
#if MAXPLAYERS != 16
|
||||
I_Error("GP bot difficulty levels need rebalacned for the new player count!\n");
|
||||
I_Error("GP bot difficulty levels need rebalanced for the new player count!\n");
|
||||
#endif
|
||||
|
||||
if (grandprixinfo.masterbots)
|
||||
|
|
@ -500,6 +512,126 @@ void K_IncreaseBotDifficulty(player_t *bot)
|
|||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_RetireBots(void)
|
||||
|
||||
See header file for description.
|
||||
--------------------------------------------------*/
|
||||
void K_RetireBots(void)
|
||||
{
|
||||
const SINT8 defaultbotskin = K_BotDefaultSkin();
|
||||
SINT8 newDifficulty;
|
||||
|
||||
boolean skinusable[MAXSKINS];
|
||||
|
||||
UINT8 i;
|
||||
|
||||
if (grandprixinfo.gp == true && grandprixinfo.roundnum >= grandprixinfo.cup->numlevels)
|
||||
{
|
||||
// Was last map, no replacement.
|
||||
return;
|
||||
}
|
||||
|
||||
// init usable bot skins list
|
||||
for (i = 0; i < MAXSKINS; i++)
|
||||
{
|
||||
if (i < numskins)
|
||||
{
|
||||
skinusable[i] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
skinusable[i] = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator)
|
||||
{
|
||||
skinusable[players[i].skin] = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!grandprixinfo.gp) // Sure, let's let this happen all the time :)
|
||||
{
|
||||
newDifficulty = cv_kartbot.value;
|
||||
}
|
||||
else
|
||||
{
|
||||
const UINT8 startingdifficulty = K_BotStartingDifficulty(grandprixinfo.gamespeed);
|
||||
newDifficulty = startingdifficulty - 4 + grandprixinfo.roundnum;
|
||||
}
|
||||
|
||||
if (newDifficulty > MAXBOTDIFFICULTY)
|
||||
{
|
||||
newDifficulty = MAXBOTDIFFICULTY;
|
||||
}
|
||||
else if (newDifficulty < 1)
|
||||
{
|
||||
newDifficulty = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
player_t *bot = NULL;
|
||||
|
||||
if (!playeringame[i] || !players[i].bot)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
bot = &players[i];
|
||||
|
||||
if (bot->spectator)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bot->pflags & PF_NOCONTEST)
|
||||
{
|
||||
UINT8 skinnum = P_RandomKey(numskins);
|
||||
UINT8 loops = 0;
|
||||
|
||||
while (!skinusable[skinnum])
|
||||
{
|
||||
if (loops >= numskins)
|
||||
{
|
||||
// no more skins
|
||||
break;
|
||||
}
|
||||
|
||||
skinnum++;
|
||||
|
||||
if (skinnum >= numskins)
|
||||
{
|
||||
skinnum = 0;
|
||||
}
|
||||
|
||||
loops++;
|
||||
}
|
||||
|
||||
if (loops >= numskins)
|
||||
{
|
||||
// Use default skin
|
||||
skinnum = defaultbotskin;
|
||||
}
|
||||
|
||||
skinusable[skinnum] = false;
|
||||
|
||||
bot->botvars.difficulty = newDifficulty;
|
||||
bot->botvars.diffincrease = 0;
|
||||
|
||||
SetPlayerSkinByNum(bot - players, skinnum);
|
||||
bot->skincolor = skins[skinnum].prefcolor;
|
||||
sprintf(player_names[bot - players], "%s", skins[skinnum].realname);
|
||||
|
||||
bot->score = 0;
|
||||
bot->pflags &= ~PF_NOCONTEST;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_FakeBotResults(player_t *bot)
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,16 @@ UINT8 K_BotStartingDifficulty(SINT8 value);
|
|||
INT16 K_CalculateGPRankPoints(UINT8 position, UINT8 numplayers);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
SINT8 K_BotDefaultSkin(void);
|
||||
|
||||
Returns the skin number of the skin the game
|
||||
uses as a fallback option.
|
||||
--------------------------------------------------*/
|
||||
|
||||
SINT8 K_BotDefaultSkin(void);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_InitGrandPrixBots(void);
|
||||
|
||||
|
|
@ -95,6 +105,16 @@ void K_UpdateGrandPrixBots(void);
|
|||
void K_IncreaseBotDifficulty(player_t *bot);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_RetireBots(void);
|
||||
|
||||
Replaces PF_NOCONTEST bots, by refreshing their difficulty
|
||||
and changing their skin.
|
||||
--------------------------------------------------*/
|
||||
|
||||
void K_RetireBots(void);
|
||||
|
||||
|
||||
/*--------------------------------------------------
|
||||
void K_FakeBotResults(player_t *bot);
|
||||
|
||||
|
|
@ -136,7 +156,7 @@ void K_PlayerLoseLife(player_t *player);
|
|||
None
|
||||
|
||||
Return:-
|
||||
None
|
||||
true if can change important gameplay rules, otherwise false.
|
||||
--------------------------------------------------*/
|
||||
|
||||
boolean K_CanChangeRules(void);
|
||||
|
|
|
|||
|
|
@ -3106,7 +3106,7 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
if (K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
// Increase bot speed by 1-10% depending on difficulty
|
||||
fixed_t add = (player->botvars.difficulty * (FRACUNIT/10)) / MAXBOTDIFFICULTY;
|
||||
fixed_t add = (player->botvars.difficulty * (FRACUNIT/10)) / DIFFICULTBOT;
|
||||
finalspeed = FixedMul(finalspeed, FRACUNIT + add);
|
||||
|
||||
if (player->botvars.rival == true)
|
||||
|
|
@ -8101,7 +8101,7 @@ INT32 K_GetKartRingPower(player_t *player, boolean boosted)
|
|||
if (boosted == true && K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
// Double for Lv. 9
|
||||
ringPower += (player->botvars.difficulty * ringPower) / MAXBOTDIFFICULTY;
|
||||
ringPower += (player->botvars.difficulty * ringPower) / DIFFICULTBOT;
|
||||
}
|
||||
|
||||
return ringPower;
|
||||
|
|
|
|||
|
|
@ -3516,7 +3516,7 @@ void M_Init(void)
|
|||
quitmsg[QUIT3MSG1] = M_GetText("Come on, just ONE more netgame!\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG2] = M_GetText("Press 'N' to unlock\nthe Golden Kart!\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG3] = M_GetText("Couldn't handle\nthe banana meta?\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG4] = M_GetText("Every time you press 'Y', an\nSRB2Kart Developer cries...\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG4] = M_GetText("Every time you press 'Y', a\nRing Racers Developer cries...\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG5] = M_GetText("You'll be back to play soon, though...\n...right?\n\n(Press 'Y' to quit)");
|
||||
quitmsg[QUIT3MSG6] = M_GetText("Aww, is Eggman's Nightclub too\ndifficult for you?\n\n(Press 'Y' to quit)");
|
||||
|
||||
|
|
@ -8804,7 +8804,7 @@ static void M_ConnectMenuModChecks(INT32 choice)
|
|||
|
||||
if (modifiedgame)
|
||||
{
|
||||
M_StartMessage(M_GetText("You have addons loaded.\nYou won't be able to join netgames!\n\nTo play online, restart the game\nand don't load any addons.\nSRB2Kart will automatically add\neverything you need when you join.\n\n(Press a key)\n"), FUNCPTRCAST(M_ConnectMenu), MM_EVENTHANDLER);
|
||||
M_StartMessage(M_GetText("You have addons loaded.\nYou won't be able to join netgames!\n\nTo play online, restart the game\nand don't load any addons.\nRing Racers will automatically add\neverything you need when you join.\n\n(Press a key)\n"), FUNCPTRCAST(M_ConnectMenu), MM_EVENTHANDLER);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
36
src/m_misc.c
|
|
@ -650,7 +650,7 @@ void M_SaveConfig(const char *filename)
|
|||
}
|
||||
|
||||
// header message
|
||||
fprintf(f, "// SRB2Kart configuration file.\n");
|
||||
fprintf(f, "// Dr. Robotnik's Ring Racers configuration file.\n");
|
||||
|
||||
// print execversion FIRST, because subsequent consvars need to be filtered
|
||||
// always print current EXECVERSION
|
||||
|
|
@ -697,20 +697,20 @@ static void M_CreateScreenShotPalette(void)
|
|||
#if NUMSCREENS > 2
|
||||
static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
||||
{
|
||||
static char freename[13] = "kartXXXX.ext";
|
||||
static char freename[19] = "ringracersXXXX.ext";
|
||||
int i = 5000; // start in the middle: num screenshots divided by 2
|
||||
int add = i; // how much to add or subtract if wrong; gets divided by 2 each time
|
||||
int result; // -1 = guess too high, 0 = correct, 1 = guess too low
|
||||
|
||||
// find a file name to save it to
|
||||
strcpy(freename+9,ext);
|
||||
strcpy(freename+15,ext);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
freename[4] = (char)('0' + (char)(i/1000));
|
||||
freename[5] = (char)('0' + (char)((i/100)%10));
|
||||
freename[6] = (char)('0' + (char)((i/10)%10));
|
||||
freename[7] = (char)('0' + (char)(i%10));
|
||||
freename[10] = (char)('0' + (char)(i/1000));
|
||||
freename[11] = (char)('0' + (char)((i/100)%10));
|
||||
freename[12] = (char)('0' + (char)((i/10)%10));
|
||||
freename[13] = (char)('0' + (char)(i%10));
|
||||
|
||||
if (FIL_WriteFileOK(va(pandf,pathname,freename))) // access succeeds
|
||||
result = 1; // too low
|
||||
|
|
@ -719,10 +719,10 @@ static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
|||
if (!i)
|
||||
break; // not too high, so it must be equal! YAY!
|
||||
|
||||
freename[4] = (char)('0' + (char)((i-1)/1000));
|
||||
freename[5] = (char)('0' + (char)(((i-1)/100)%10));
|
||||
freename[6] = (char)('0' + (char)(((i-1)/10)%10));
|
||||
freename[7] = (char)('0' + (char)((i-1)%10));
|
||||
freename[10] = (char)('0' + (char)((i-1)/1000));
|
||||
freename[11] = (char)('0' + (char)(((i-1)/100)%10));
|
||||
freename[12] = (char)('0' + (char)(((i-1)/10)%10));
|
||||
freename[13] = (char)('0' + (char)((i-1)%10));
|
||||
if (!FIL_WriteFileOK(va(pandf,pathname,freename))) // access fails
|
||||
result = -1; // too high
|
||||
else
|
||||
|
|
@ -740,10 +740,10 @@ static const char *Newsnapshotfile(const char *pathname, const char *ext)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
freename[4] = (char)('0' + (char)(i/1000));
|
||||
freename[5] = (char)('0' + (char)((i/100)%10));
|
||||
freename[6] = (char)('0' + (char)((i/10)%10));
|
||||
freename[7] = (char)('0' + (char)(i%10));
|
||||
freename[10] = (char)('0' + (char)(i/1000));
|
||||
freename[11] = (char)('0' + (char)((i/100)%10));
|
||||
freename[12] = (char)('0' + (char)((i/10)%10));
|
||||
freename[13] = (char)('0' + (char)(i%10));
|
||||
|
||||
return freename;
|
||||
}
|
||||
|
|
@ -803,10 +803,10 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
|
|||
char keytxt[SRB2PNGTXT][12] = {
|
||||
"Title", "Description", "Playername", "Mapnum", "Mapname",
|
||||
"Location", "Interface", "Render Mode", "Revision", "Build Date", "Build Time"};
|
||||
char titletxt[] = "SRB2Kart " VERSIONSTRING;
|
||||
char titletxt[] = "Dr. Robotnik's Ring Racers " VERSIONSTRING;
|
||||
png_charp playertxt = cv_playername[0].zstring;
|
||||
char desctxt[] = "SRB2Kart Screenshot";
|
||||
char Movietxt[] = "SRB2Kart Movie";
|
||||
char desctxt[] = "Ring Racers Screenshot";
|
||||
char Movietxt[] = "Ring Racers Movie";
|
||||
size_t i;
|
||||
char interfacetxt[] =
|
||||
#ifdef HAVE_SDL
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ static precise_t ps_frametime = 0;
|
|||
precise_t ps_tictime = 0;
|
||||
|
||||
precise_t ps_playerthink_time = 0;
|
||||
precise_t ps_botticcmd_time = 0;
|
||||
precise_t ps_thinkertime = 0;
|
||||
|
||||
precise_t ps_thlist_times[NUM_THINKERLISTS];
|
||||
|
|
@ -363,6 +364,7 @@ static void M_DrawTickStats(void)
|
|||
|
||||
perfstatrow_t extra_thinker_time_row[] = {
|
||||
{"lthinkf", "LUAh_ThinkFrame:", &ps_lua_thinkframe_time},
|
||||
{"botcmd ", "Bot logic: ", &ps_botticcmd_time},
|
||||
{"other ", "Other: ", &extratime},
|
||||
{0}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
extern precise_t ps_tictime;
|
||||
|
||||
extern precise_t ps_playerthink_time;
|
||||
extern precise_t ps_botticcmd_time;
|
||||
extern precise_t ps_thinkertime;
|
||||
|
||||
extern precise_t ps_thlist_times[];
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
|
|||
|
||||
consvar_t cv_masterserver = CVAR_INIT ("masterserver", "https://ms.kartkrew.org/ms/api", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange);
|
||||
consvar_t cv_rendezvousserver = CVAR_INIT ("rendezvousserver", "relay.kartkrew.org", CV_SAVE|CV_CALL, NULL, RendezvousServer_OnChange);
|
||||
consvar_t cv_servername = CVAR_INIT ("servername", "SRB2Kart server", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Update_parameters);
|
||||
consvar_t cv_servername = CVAR_INIT ("servername", "Ring Racers server", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Update_parameters);
|
||||
consvar_t cv_server_contact = CVAR_INIT ("server_contact", "", CV_SAVE|CV_CALL|CV_NOINIT, NULL, Update_parameters);
|
||||
|
||||
consvar_t cv_masterserver_update_rate = CVAR_INIT ("masterserver_update_rate", "15", CV_SAVE|CV_CALL|CV_NOINIT, masterserver_update_rate_cons_t, MasterClient_Ticker);
|
||||
|
|
|
|||
|
|
@ -1,100 +1,97 @@
|
|||
/* XPM */
|
||||
static const char *SDL_icon_xpm[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"64 64 32 1",
|
||||
static const char * SDL_icon_xpm[] = {
|
||||
"64 64 30 1",
|
||||
" c None",
|
||||
". c #E7E7E7",
|
||||
"+ c #DFDFDF",
|
||||
"@ c #AFAFAF",
|
||||
"# c #979797",
|
||||
"$ c #8F8F8F",
|
||||
"% c #B7B7B7",
|
||||
"& c #F7F7F7",
|
||||
"* c #D7D7D7",
|
||||
"= c #4F4F4F",
|
||||
"- c #0F0F0F",
|
||||
"; c #070707",
|
||||
"> c #575757",
|
||||
", c #C7C7C7",
|
||||
"' c #676767",
|
||||
") c #7F7F7F",
|
||||
"! c #5F5F5F",
|
||||
"~ c #777777",
|
||||
"{ c #474747",
|
||||
"] c #878787",
|
||||
"^ c #6F6F6F",
|
||||
". c #000000",
|
||||
"+ c #FFFFFF",
|
||||
"@ c #B37347",
|
||||
"# c #E39767",
|
||||
"$ c #FFCB97",
|
||||
"% c #7F532F",
|
||||
"& c #FFCFB3",
|
||||
"* c #533F1F",
|
||||
"= c #874307",
|
||||
"- c #752900",
|
||||
"; c #5F0000",
|
||||
"> c #414183",
|
||||
", c #9B5B13",
|
||||
"' c #5252FF",
|
||||
") c #21224E",
|
||||
"! c #FF3F3F",
|
||||
"~ c #AF0000",
|
||||
"{ c #FF5F5F",
|
||||
"] c #470000",
|
||||
"^ c #FFB78B",
|
||||
"/ c #BFBFBF",
|
||||
"( c #373737",
|
||||
"_ c #1F1F1F",
|
||||
": c #272727",
|
||||
"< c #2F2F2F",
|
||||
"[ c #3F3F3F",
|
||||
"} c #EFEFEF",
|
||||
"| c #A7A7A7",
|
||||
"1 c #9F9F9F",
|
||||
"2 c #171717",
|
||||
"3 c #CFCFCF",
|
||||
" ",
|
||||
" .................... ",
|
||||
" ...+@##$$$$###@%&....... ",
|
||||
" ..*=-;;;-;;;;;;;;@........ ",
|
||||
" ..+-;;;;--;;;;;;;>.......... ",
|
||||
" ...,')!!'~>{!)$)>'....*]>^%&.. ",
|
||||
" ../(__(>:{<)$![[[%&...^!!!!!~*. ",
|
||||
" ..@;;;;;({=]:;;;;;~..*_;;;;;;;_.. ",
|
||||
" .}>;;;;;^#=;;;;;;>...<;;;;;;;;;|.. ",
|
||||
" ..*1)))))%]))))))%&..1])))))))))#}. ",
|
||||
" ..%[;;;;;[2;;;;;;;:..#;;;2[[-;;;;;=.. ",
|
||||
" .&:;[{;;;{;;;~={:;^.._;;'}...>;;;;;,. ",
|
||||
" .}<;;:{;_:2!'-;;;]*.&(_].|{=@.~___[/.. ",
|
||||
" ..*$))]@%//,111111}..|1*.@1111@.3111|&. ",
|
||||
" .,:;;;;;'#^;;;;;;;]./;;+);;;;;;$*;;;;.. ",
|
||||
" .^;;;;;;));;;;;;;;$.~;$*;;;;;;;-+^;;;#. ",
|
||||
" ..$;;;;;;>;;;;;;;;>}.^-.!;;;;;;;;)*:;;|. ",
|
||||
" .&@$|#)))|)))1||#]+..$/}]))))))))$.3))#.. ",
|
||||
" .#;;;[{;->;-^[;;;;].~;@];;;;;;;;;;1#;;-}. ",
|
||||
" .{;;;;{<[:(~-;;;;;$.(-.<;;;;;;;;;;{};;;3. ",
|
||||
" ..);;;;;~~[!;;;;;;-/.>=.>;;;;;;;;;;2}^;:3. ",
|
||||
" .&#)))))$}@)))))))@.}]3.*))))))))))).,)).. ",
|
||||
" .3;;;;;;;);;;;;;;;2+|;%.';;;;;;;;;;;]1;;1. ",
|
||||
" .1_(:;;;;{;;;[=[:;;.];}.);;;;;;;;;;;=,;;]. ",
|
||||
" .%2-(!2;2{;_':;;;;).1;..+:;;;;;;;;;;_.;;1. ",
|
||||
" .+))))@1$1#@))))))3.,@...1))))))))))].1#3. ",
|
||||
" .{;;;;;^<>);;;;;;;-.[). .-;;;;;;;;;;;3{;#. ",
|
||||
" ._;;;;;-~];;;;;;;;;};#. ._;;;;;;;;;;;/^;#. ",
|
||||
" .$'!!!!!1]!!!!!!!!%}[,. .'[[[[[[[[[[[,|>}. ",
|
||||
" ..'{::___!{___:(>___:[@...~[[[[[[[[[[[1#{,. ",
|
||||
" .+;-<=(;;[:;;(=-;;;;;;;;;;;;;;;;;;;;;;;;;). ",
|
||||
" .*;;;;[=;[_;{(;;;;;;;;;;;;;;;;;;;;;;;;;;-#. ",
|
||||
" .&)!!!!)$]~)$!!!!!!!!!!!!!!!!!!!!!!!!!!!^+. ",
|
||||
" .&(_____!$)!____________________________<3. ",
|
||||
" .%;;;;;;;@|;;;;;;;;;;;;==))))))))))))))]*&. ",
|
||||
" .*22;;;;;({;;;;;_-;;;;%.&.................. ",
|
||||
" .&+~#]!!!~]!=[!^>[[[[{}... ",
|
||||
" ../__:^^:(!_[$>[[[[[[{+. ",
|
||||
" .<;;;;<^2{;'2;;;;;;;;]. ",
|
||||
" .;;;;;;:~=>:;;;;;;;;;]. ",
|
||||
" .@!!!!!!]3|!!!!!!!!!!*. ",
|
||||
" .#_______#_____:<____~.. ",
|
||||
" .^_{[_;;;=2;;;<<-;;;;;,.................. ",
|
||||
" .@<;;{~2;_>;;((;;;;;;;3,-----------|.$-!. ",
|
||||
" ..@))))|@)|)$|)))))))#}&/))))))))))}./)/. ",
|
||||
" .&:;;;;;=>>;^;;;;;;;;;_.[;;;;;;;;;;^.{;|. ",
|
||||
" ..2;;;;;;{#<[;;;;;;;;;;+';;;;;;;;;;~*;;.. ",
|
||||
" .^;;;;;;;'%;;;;;;;;;;{&}#;;;;;;;;[+|;-.. ",
|
||||
" .&3$1$))))%))))1]))))]+&}$))))))@&./)@. ",
|
||||
" ..(;_<'{;;(-;;[2;;;;;;-@3;;;;;;;_}};;~. ",
|
||||
" .=;;;;:~<-(;-[;;;;;;;;:.=;;;;;;>.!;;,. ",
|
||||
" ./:;;;;;!!!;=-;;;;;;;;>.+$;;;;[.&_;=.. ",
|
||||
" ..&|)))))$,|%)))))))))]1&.|]]@&.|]]}. ",
|
||||
" .&;;;;;;;:@=;;;;;;;;;;;-/....3:;;;}. ",
|
||||
" ..!;;;;;;;([;;;;_2;;;;;;;>)){;;;;^.. ",
|
||||
" ..=2_:-;;;(;;;2<;;;;;;;;;;;;;;-).. ",
|
||||
" ...%$#@%#)#))|))))))))))))))|}&. ",
|
||||
" ..!;;;2!]{_-[;;;;;;;;;;;;;;;&.. ",
|
||||
" ..^-;;;;^)(:;;;;;;;;;;;;;;'.. ",
|
||||
" ..*'-;;;:]-;;;;;;;;;;;;-$.. ",
|
||||
" ....}./1))))))))))))]/... ",
|
||||
" ........}3||1#$$$]1... ",
|
||||
" ................... ",
|
||||
" "};
|
||||
"( c #E4E4E4",
|
||||
"_ c #979797",
|
||||
": c #7F0000",
|
||||
"< c #C39B2F",
|
||||
"[ c #DF0000",
|
||||
"} c #EBDB57",
|
||||
"| c #FFFF00",
|
||||
"1 c #000000",
|
||||
" ++++++++++++++++ ",
|
||||
" ++++++++++++++++ ",
|
||||
" ++++++++++++++++ ",
|
||||
" ++++++++++++++++ ",
|
||||
" ++++++++@@@@@@@@@@@@@@@@++++++++ ",
|
||||
" ++++++++@@@@@@@@@@@@@@@@++++++++ ",
|
||||
" ++++++++@@@@@@@@@@@@@@@@++++++++ ",
|
||||
" ++++++++@@@@@@@@@@@@@@@@++++++++ ",
|
||||
" ++++@@@@####$$$$$$$$$$$$$$$$####@@@@++++ ",
|
||||
" ++++@@@@####$$$$$$$$$$$$$$$$####@@@@++++ ",
|
||||
" ++++@@@@####$$$$$$$$$$$$$$$$####@@@@++++ ",
|
||||
" ++++@@@@####$$$$$$$$$$$$$$$$####@@@@++++ ",
|
||||
" ++++%%%%####$$$$&&&&++++++++&&&&$$$$####%%%%++++ ",
|
||||
" ++++%%%%####$$$$&&&&++++++++&&&&$$$$####%%%%++++ ",
|
||||
" ++++%%%%####$$$$&&&&++++++++&&&&$$$$####%%%%++++ ",
|
||||
" ++++%%%%####$$$$&&&&++++++++&&&&$$$$####%%%%++++ ",
|
||||
"++++++++****@@@@$$$$$$$$$$$$&&&&&&&&$$$$$$$$$$$$@@@@****++++++++",
|
||||
"++++++++****@@@@$$$$$$$$$$$$&&&&&&&&$$$$$$$$$$$$@@@@****++++++++",
|
||||
"++++++++****@@@@$$$$$$$$$$$$&&&&&&&&$$$$$$$$$$$$@@@@****++++++++",
|
||||
"++++++++****@@@@$$$$$$$$$$$$&&&&&&&&$$$$$$$$$$$$@@@@****++++++++",
|
||||
"====----;;;;####$$$$>>>>>>>>$$$$$$$$>>>>>>>>$$$$####;;;;----====",
|
||||
"====----;;;;####$$$$>>>>>>>>$$$$$$$$>>>>>>>>$$$$####;;;;----====",
|
||||
"====----;;;;####$$$$>>>>>>>>$$$$$$$$>>>>>>>>$$$$####;;;;----====",
|
||||
"====----;;;;####$$$$>>>>>>>>$$$$$$$$>>>>>>>>$$$$####;;;;----====",
|
||||
",,,,,,,,====----@@@@''''''''########''''''''@@@@----====,,,,,,,,",
|
||||
",,,,,,,,====----@@@@''''''''########''''''''@@@@----====,,,,,,,,",
|
||||
",,,,,,,,====----@@@@''''''''########''''''''@@@@----====,,,,,,,,",
|
||||
",,,,,,,,====----@@@@''''''''########''''''''@@@@----====,,,,,,,,",
|
||||
"----====,,,,====----))))))))!!!!!!!!))))))))----====,,,,====----",
|
||||
"----====,,,,====----))))))))!!!!!!!!))))))))----====,,,,====----",
|
||||
"----====,,,,====----))))))))!!!!!!!!))))))))----====,,,,====----",
|
||||
"----====,,,,====----))))))))!!!!!!!!))))))))----====,,,,====----",
|
||||
",,,,,,,,,,,,,,,,,,,,====~~~~{{{{{{{{~~~~====,,,,,,,,,,,,,,,,,,,,",
|
||||
",,,,,,,,,,,,,,,,,,,,====~~~~{{{{{{{{~~~~====,,,,,,,,,,,,,,,,,,,,",
|
||||
",,,,,,,,,,,,,,,,,,,,====~~~~{{{{{{{{~~~~====,,,,,,,,,,,,,,,,,,,,",
|
||||
",,,,,,,,,,,,,,,,,,,,====~~~~{{{{{{{{~~~~====,,,,,,,,,,,,,,,,,,,,",
|
||||
"----------------------------{{{{{{{{----------------------------",
|
||||
"----------------------------{{{{{{{{----------------------------",
|
||||
"----------------------------{{{{{{{{----------------------------",
|
||||
"----------------------------{{{{{{{{----------------------------",
|
||||
"]]]];;;;----^^^^////((((____((((((((____((((////^^^^----;;;;]]]]",
|
||||
"]]]];;;;----^^^^////((((____((((((((____((((////^^^^----;;;;]]]]",
|
||||
"]]]];;;;----^^^^////((((____((((((((____((((////^^^^----;;;;]]]]",
|
||||
"]]]];;;;----^^^^////((((____((((((((____((((////^^^^----;;;;]]]]",
|
||||
"::::::::<<<<@@@@^^^^++++////++++++++////++++^^^^@@@@<<<<::::::::",
|
||||
"::::::::<<<<@@@@^^^^++++////++++++++////++++^^^^@@@@<<<<::::::::",
|
||||
"::::::::<<<<@@@@^^^^++++////++++++++////++++^^^^@@@@<<<<::::::::",
|
||||
"::::::::<<<<@@@@^^^^++++////++++++++////++++^^^^@@@@<<<<::::::::",
|
||||
"::::::::<<<<<<<<----####^^^^$$$$$$$$^^^^####----<<<<<<<<::::::::",
|
||||
"::::::::<<<<<<<<----####^^^^$$$$$$$$^^^^####----<<<<<<<<::::::::",
|
||||
"::::::::<<<<<<<<----####^^^^$$$$$$$$^^^^####----<<<<<<<<::::::::",
|
||||
"::::::::<<<<<<<<----####^^^^$$$$$$$$^^^^####----<<<<<<<<::::::::",
|
||||
"~~~~[[[[}}}}||||||||@@@@----------------@@@@||||||||}}}}[[[[~~~~",
|
||||
"~~~~[[[[}}}}||||||||@@@@----------------@@@@||||||||}}}}[[[[~~~~",
|
||||
"~~~~[[[[}}}}||||||||@@@@----------------@@@@||||||||}}}}[[[[~~~~",
|
||||
"~~~~[[[[}}}}||||||||@@@@----------------@@@@||||||||}}}}[[[[~~~~",
|
||||
"[[[[[[[[||||||||<<<<~~~~~~~~~~~~~~~~~~~~~~~~<<<<||||||||[[[[[[[[",
|
||||
"[[[[[[[[||||||||<<<<~~~~~~~~~~~~~~~~~~~~~~~~<<<<||||||||[[[[[[[[",
|
||||
"[[[[[[[[||||||||<<<<~~~~~~~~~~~~~~~~~~~~~~~~<<<<||||||||[[[[[[[[",
|
||||
"[[[[[[[[||||||||<<<<~~~~~~~~~~~~~~~~~~~~~~~~<<<<||||||||[[[[[[[[",
|
||||
"[[[[[[[[||||<<<<~~~~[[[[[[[[[[[[[[[[[[[[[[[[~~~~<<<<||||[[[[[[[[",
|
||||
"[[[[[[[[||||<<<<~~~~[[[[[[[[[[[[[[[[[[[[[[[[~~~~<<<<||||[[[[[[[[",
|
||||
"[[[[[[[[||||<<<<~~~~[[[[[[[[[[[[[[[[[[[[[[[[~~~~<<<<||||[[[[[[[[",
|
||||
"[[[[[[[[||||<<<<~~~~[[[[[[[[[[[[[[[[[[[[[[[[~~~~<<<<||||[[[[[[[["};
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 99 KiB |
|
|
@ -269,7 +269,7 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
|
||||
// startup SRB2
|
||||
CONS_Printf("Setting up SRB2Kart...\n");
|
||||
CONS_Printf("Setting up Dr. Robotnik's Ring Racers...\n");
|
||||
D_SRB2Main();
|
||||
#ifdef LOGMESSAGES
|
||||
if (!M_CheckParm("-nolog"))
|
||||
|
|
|
|||
|
|
@ -145,10 +145,10 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T);
|
|||
|
||||
// Locations for searching for main.kart
|
||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION4 "/usr/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION1 "/usr/local/share/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION2 "/usr/local/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION3 "/usr/share/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION4 "/usr/games/RingRacers"
|
||||
#define DEFAULTSEARCHPATH1 "/usr/local/games"
|
||||
#define DEFAULTSEARCHPATH2 "/usr/games"
|
||||
#define DEFAULTSEARCHPATH3 "/usr/local"
|
||||
|
|
@ -247,8 +247,8 @@ static void write_backtrace(INT32 signal)
|
|||
void *array[BT_SIZE];
|
||||
char timestr[STR_SIZE];
|
||||
|
||||
const char *error = "An error occurred within SRB2! Send this stack trace to someone who can help!\n";
|
||||
const char *error2 = "(Or find crash-log.txt in your SRB2 directory.)\n"; // Shown only to stderr.
|
||||
const char *error = "An error occurred within Dr. Robotnik's Ring Racers! Send this stack trace to someone who can help!\n";
|
||||
const char *error2 = "(Or find crash-log.txt in your Ring Racers directory.)\n"; // Shown only to stderr.
|
||||
|
||||
fd = open(va("%s" PATHSEP "%s", srb2home, "crash-log.txt"), O_CREAT|O_APPEND|O_RDWR, S_IRUSR|S_IWUSR);
|
||||
|
||||
|
|
@ -682,7 +682,7 @@ static void I_StartupConsole(void)
|
|||
|
||||
if (gotConsole)
|
||||
{
|
||||
SetConsoleTitleA("SRB2Kart Console");
|
||||
SetConsoleTitleA("Dr. Robotnik's Ring Racers Console");
|
||||
consolevent = SDL_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -1513,8 +1513,8 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
|
|||
return;
|
||||
|
||||
if(mumble->uiVersion != 2) {
|
||||
wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRINGW, 256);
|
||||
wcsncpy(mumble->description, L"Sonic Robo Blast 2 Kart with integrated Mumble Link support.", 2048);
|
||||
wcsncpy(mumble->name, L"Dr. Robotnik's Ring Racers "VERSIONSTRINGW, 256);
|
||||
wcsncpy(mumble->description, L"Dr. Robotnik's Ring Racers with integrated Mumble Link support.", 2048);
|
||||
mumble->uiVersion = 2;
|
||||
}
|
||||
mumble->uiTick++;
|
||||
|
|
@ -1853,7 +1853,7 @@ INT32 I_StartupSystem(void)
|
|||
I_OutputMsg("Linked with SDL version: %d.%d.%d\n",
|
||||
SDLlinked.major, SDLlinked.minor, SDLlinked.patch);
|
||||
if (SDL_Init(0) < 0)
|
||||
I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
|
||||
I_Error("Dr. Robotnik's Ring Racers: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
|
||||
#ifndef NOMUMBLE
|
||||
I_SetupMumble();
|
||||
#endif
|
||||
|
|
@ -1976,7 +1976,7 @@ void I_Error(const char *error, ...)
|
|||
// on the target system
|
||||
if (!M_CheckParm("-dedicated"))
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"SRB2Kart "VERSIONSTRING" Recursive Error",
|
||||
"Dr. Robotnik's Ring Racers "VERSIONSTRING" Recursive Error",
|
||||
buffer, NULL);
|
||||
|
||||
W_Shutdown();
|
||||
|
|
@ -2025,7 +2025,7 @@ void I_Error(const char *error, ...)
|
|||
// on the target system
|
||||
if (!M_CheckParm("-dedicated"))
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"SRB2Kart "VERSIONSTRING" Error",
|
||||
"Dr. Robotnik's Ring Racers "VERSIONSTRING" Error",
|
||||
buffer, NULL);
|
||||
|
||||
// Note that SDL_ShowSimpleMessageBox does *not* require SDL to be
|
||||
|
|
|
|||
|
|
@ -1729,7 +1729,7 @@ INT32 VID_SetMode(INT32 modeNum)
|
|||
src_rect.w = vid.width;
|
||||
src_rect.h = vid.height;
|
||||
|
||||
//Impl_SetWindowName("SRB2Kart "VERSIONSTRING);
|
||||
//Impl_SetWindowName("Dr. Robotnik's Ring Racers "VERSIONSTRING);
|
||||
VID_CheckRenderer();
|
||||
return SDL_TRUE;
|
||||
}
|
||||
|
|
@ -1756,7 +1756,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
|||
#endif
|
||||
|
||||
// Create a window
|
||||
window = SDL_CreateWindow("SRB2Kart "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
window = SDL_CreateWindow("Dr. Robotnik's Ring Racers "VERSIONSTRING, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||
realwidth, realheight, flags);
|
||||
|
||||
|
||||
|
|
@ -1932,7 +1932,7 @@ void I_StartupGraphics(void)
|
|||
|
||||
// Create window
|
||||
//Impl_CreateWindow(USE_FULLSCREEN);
|
||||
//Impl_SetWindowName("SRB2Kart "VERSIONSTRING);
|
||||
//Impl_SetWindowName("Dr. Robotnik's Ring Racers "VERSIONSTRING);
|
||||
VID_SetMode(VID_GetModeForSize(BASEVIDWIDTH, BASEVIDHEIGHT));
|
||||
|
||||
vid.width = BASEVIDWIDTH; // Default size for startup
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 99 KiB |
|
|
@ -44,7 +44,7 @@ static char netmask[16] = {0};
|
|||
#include <pspthreadman.h>
|
||||
PSP_HEAP_SIZE_KB(24*1024);
|
||||
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU);
|
||||
PSP_MAIN_THREAD_NAME("SRB2Kart");
|
||||
PSP_MAIN_THREAD_NAME("Dr. Robotnik's Ring Racers");
|
||||
PSP_MAIN_THREAD_STACK_SIZE_KB(256);
|
||||
#endif
|
||||
|
||||
|
|
@ -228,7 +228,7 @@ int main(int argc, char **argv)
|
|||
#endif
|
||||
#endif
|
||||
// startup SRB2
|
||||
CONS_Printf("%s", M_GetText("Setting up SRB2...\n"));
|
||||
CONS_Printf("%s", M_GetText("Setting up Dr. Robotnik's Ring Racers...\n"));
|
||||
D_SRB2Main();
|
||||
CONS_Printf("%s", M_GetText("Entering main game loop...\n"));
|
||||
// never return
|
||||
|
|
|
|||
|
|
@ -155,9 +155,9 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
|
|||
//#define DEFAULTSEARCHPATH3 "/pc/home/alam/srb2code/data"
|
||||
#elif defined (GP2X)
|
||||
#define DEFAULTWADLOCATION1 "/mnt/sd"
|
||||
#define DEFAULTWADLOCATION2 "/mnt/sd/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION2 "/mnt/sd/RingRacers"
|
||||
#define DEFAULTWADLOCATION3 "/tmp/mnt/sd"
|
||||
#define DEFAULTWADLOCATION4 "/tmp/mnt/sd/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION4 "/tmp/mnt/sd/RingRacers"
|
||||
#define DEFAULTSEARCHPATH1 "/mnt/sd"
|
||||
#define DEFAULTSEARCHPATH2 "/tmp/mnt/sd"
|
||||
#elif defined (_WII)
|
||||
|
|
@ -184,10 +184,10 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
|
|||
#define DEFAULTSEARCHPATH1 "host0:/"
|
||||
#define DEFAULTSEARCHPATH2 "ms0:/PSP/GAME/SRB2PSP"
|
||||
#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION4 "/usr/games/SRB2Kart"
|
||||
#define DEFAULTWADLOCATION1 "/usr/local/share/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION2 "/usr/local/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION3 "/usr/share/games/RingRacers"
|
||||
#define DEFAULTWADLOCATION4 "/usr/games/RingRacers"
|
||||
#define DEFAULTSEARCHPATH1 "/usr/local/games"
|
||||
#define DEFAULTSEARCHPATH2 "/usr/games"
|
||||
#define DEFAULTSEARCHPATH3 "/usr/local"
|
||||
|
|
@ -196,21 +196,21 @@ void __set_fpscr(long); // in libgcc / kernel's startup.s?
|
|||
#ifdef __GNUC__
|
||||
#include <openxdk/debug.h>
|
||||
#endif
|
||||
#define DEFAULTWADLOCATION1 "c:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION2 "d:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION3 "e:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION4 "f:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION5 "g:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION6 "h:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION7 "i:\\srb2kart"
|
||||
#define DEFAULTWADLOCATION1 "c:\\ringracers"
|
||||
#define DEFAULTWADLOCATION2 "d:\\ringracers"
|
||||
#define DEFAULTWADLOCATION3 "e:\\ringracers"
|
||||
#define DEFAULTWADLOCATION4 "f:\\ringracers"
|
||||
#define DEFAULTWADLOCATION5 "g:\\ringracers"
|
||||
#define DEFAULTWADLOCATION6 "h:\\ringracers"
|
||||
#define DEFAULTWADLOCATION7 "i:\\ringracers"
|
||||
#elif defined (_WIN32_WCE)
|
||||
#define NOCWD
|
||||
#define NOHOME
|
||||
#define DEFAULTWADLOCATION1 "\\Storage Card\\SRB2Kart"
|
||||
#define DEFAULTWADLOCATION1 "\\Storage Card\\RingRacers"
|
||||
#define DEFAULTSEARCHPATH1 "\\Storage Card"
|
||||
#elif defined (_WIN32)
|
||||
#define DEFAULTWADLOCATION1 "c:\\games\\srb2kart"
|
||||
#define DEFAULTWADLOCATION2 "\\games\\srb2kart"
|
||||
#define DEFAULTWADLOCATION1 "c:\\games\\ringracers"
|
||||
#define DEFAULTWADLOCATION2 "\\games\\ringracers"
|
||||
#define DEFAULTSEARCHPATH1 "c:\\games"
|
||||
#define DEFAULTSEARCHPATH2 "\\games"
|
||||
#endif
|
||||
|
|
@ -701,7 +701,7 @@ static void I_StartupConsole(void)
|
|||
|
||||
if (gotConsole)
|
||||
{
|
||||
SetConsoleTitleA("SRB2Kart Console");
|
||||
SetConsoleTitleA("Dr. Robotnik's Ring Racers Console");
|
||||
consolevent = SDL_TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -2333,8 +2333,8 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
|
|||
return;
|
||||
|
||||
if(mumble->uiVersion != 2) {
|
||||
wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRING, 256);
|
||||
wcsncpy(mumble->description, L"Sonic Robo Blast 2 Kart with integrated Mumble Link support.", 2048);
|
||||
wcsncpy(mumble->name, L"Dr. Robotnik's Ring Racers "VERSIONSTRING, 256);
|
||||
wcsncpy(mumble->description, L"Dr. Robotnik's Ring Racers with integrated Mumble Link support.", 2048);
|
||||
mumble->uiVersion = 2;
|
||||
}
|
||||
mumble->uiTick++;
|
||||
|
|
@ -2905,7 +2905,7 @@ void I_StartupTimer(void)
|
|||
I_AddExitFunc(I_ShutdownTimer);
|
||||
#elif 0 //#elif !defined (_arch_dreamcast) && !defined(GP2X) // the DC have it own timer and GP2X have broken pthreads?
|
||||
if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0)
|
||||
I_Error("SRB2: Needs SDL_Timer, Error: %s", SDL_GetError());
|
||||
I_Error("Dr. Robotnik's Ring Racers: Needs SDL_Timer, Error: %s", SDL_GetError());
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -2925,13 +2925,13 @@ INT32 I_StartupSystem(void)
|
|||
const SDL_version *SDLlinked;
|
||||
#ifdef _XBOX
|
||||
#ifdef __GNUC__
|
||||
char DP[] =" Sonic Robo Blast 2!\n";
|
||||
char DP[] =" Dr. Robotnik's Ring Racers!\n";
|
||||
debugPrint(DP);
|
||||
#endif
|
||||
unlink("e:/Games/SRB2/stdout.txt");
|
||||
freopen("e:/Games/SRB2/stdout.txt", "w+", stdout);
|
||||
unlink("e:/Games/SRB2/stderr.txt");
|
||||
freopen("e:/Games/SRB2/stderr.txt", "w+", stderr);
|
||||
unlink("e:/Games/RingRacers/stdout.txt");
|
||||
freopen("e:/Games/RingRacers/stdout.txt", "w+", stdout);
|
||||
unlink("e:/Games/RingRacers/stderr.txt");
|
||||
freopen("e:/Games/RingRacers/stderr.txt", "w+", stderr);
|
||||
#endif
|
||||
#ifdef _arch_dreamcast
|
||||
#ifdef _DEBUG
|
||||
|
|
@ -2954,7 +2954,7 @@ INT32 I_StartupSystem(void)
|
|||
#else
|
||||
if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0)
|
||||
#endif
|
||||
I_Error("SRB2: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
|
||||
I_Error("Dr. Robotnik's Ring Racers: SDL System Error: %s", SDL_GetError()); //Alam: Oh no....
|
||||
#ifndef NOMUMBLE
|
||||
I_SetupMumble();
|
||||
#endif
|
||||
|
|
@ -3106,7 +3106,7 @@ void I_Error(const char *error, ...)
|
|||
}
|
||||
#endif
|
||||
OutputDebugStringA(buffer);
|
||||
MessageBoxA(vid.WndParent, buffer, "SRB2 Recursive Error", MB_OK|MB_ICONERROR);
|
||||
MessageBoxA(vid.WndParent, buffer, "Dr. Robotnik's Ring Racers Recursive Error", MB_OK|MB_ICONERROR);
|
||||
#else
|
||||
// Don't print garbage
|
||||
va_start(argptr, error);
|
||||
|
|
|
|||
|
|
@ -1719,7 +1719,7 @@ INT32 VID_SetMode(INT32 modeNum)
|
|||
BitsPerPixel = (Uint8)cv_scr_depth.value;
|
||||
//vid.bpp = BitsPerPixel==8?1:2;
|
||||
// Window title
|
||||
SDL_WM_SetCaption("SRB2Kart "VERSIONSTRING, "SRB2Kart");
|
||||
SDL_WM_SetCaption("Dr. Robotnik's Ring Racers "VERSIONSTRING, "Dr. Robotnik's Ring Racers");
|
||||
|
||||
if (render_soft == rendermode)
|
||||
{
|
||||
|
|
@ -1881,9 +1881,9 @@ void I_StartupGraphics(void)
|
|||
|
||||
// Window title
|
||||
#ifdef _WIN32_WCE
|
||||
SDL_WM_SetCaption("SRB2Kart "VERSIONSTRING, "SRB2Kart");
|
||||
SDL_WM_SetCaption("Dr. Robotnik's Ring Racers "VERSIONSTRING, "Dr. Robotnik's Ring Racers");
|
||||
#else
|
||||
SDL_WM_SetCaption("SRB2Kart: Starting up", "SRB2Kart");
|
||||
SDL_WM_SetCaption("Dr. Robotnik's Ring Racers: Starting up", "Dr. Robotnik's Ring Racers");
|
||||
#endif
|
||||
|
||||
// Window icon
|
||||
|
|
|
|||
|
|
@ -154,16 +154,16 @@ static SDL_mutex *Msc_Mutex = NULL;
|
|||
#ifdef _arch_dreamcast
|
||||
#define MIDI_PATH "/ram"
|
||||
#elif defined(GP2X)
|
||||
#define MIDI_PATH "/mnt/sd/srb2"
|
||||
#define MIDI_PATH2 "/tmp/mnt/sd/srb2"
|
||||
#define MIDI_PATH "/mnt/sd/ringracers"
|
||||
#define MIDI_PATH2 "/tmp/mnt/sd/ringracers"
|
||||
#else
|
||||
#define MIDI_PATH srb2home
|
||||
#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON)
|
||||
#define MIDI_PATH2 "/tmp"
|
||||
#endif
|
||||
#endif
|
||||
#define MIDI_TMPFILE "srb2music"
|
||||
#define MIDI_TMPFILE2 "srb2wav"
|
||||
#define MIDI_TMPFILE "ringracersmusic"
|
||||
#define MIDI_TMPFILE2 "ringracerswav"
|
||||
static INT32 musicvol = 62;
|
||||
|
||||
#if SDL_MIXER_VERSION_ATLEAST(1,2,2)
|
||||
|
|
@ -1932,7 +1932,7 @@ boolean I_StartDigSong(const char *musicname, boolean looping)
|
|||
loopstartDig = 0.0l;
|
||||
#else
|
||||
if (looping && strcmp(data, "OggS") == 0)
|
||||
I_OutputMsg("I_StartDigSong: SRB2 was not compiled with looping music support(no Mix_FadeInMusicPos)\n");
|
||||
I_OutputMsg("I_StartDigSong: Ring Racers was not compiled with looping music support(no Mix_FadeInMusicPos)\n");
|
||||
#endif
|
||||
|
||||
if (!LoadSong(data, lumplength, 1))
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 99 KiB |
|
|
@ -94,16 +94,16 @@ BEGIN
|
|||
BEGIN
|
||||
BLOCK "04090000"
|
||||
BEGIN
|
||||
VALUE "Comments", "Go go-karting with Dr. Eggman!\0"
|
||||
VALUE "Comments", "Go go-karting with Dr. Robotnik!\0"
|
||||
VALUE "CompanyName", "Kart Krew\0"
|
||||
VALUE "FileDescription", "SRB2Kart\0"
|
||||
VALUE "FileDescription", "Dr. Robotnik's Ring Racers\0"
|
||||
VALUE "FileVersion", VERSIONSTRING_RC
|
||||
VALUE "InternalName", "srb2kart\0"
|
||||
VALUE "InternalName", "drrr\0"
|
||||
VALUE "LegalCopyright", "Copyright 2018-2020 by Kart Krew\0"
|
||||
VALUE "LegalTrademarks", "Dr. Eggman and related characters are trademarks of Sega.\0"
|
||||
VALUE "OriginalFilename", "srb2kart.exe\0"
|
||||
VALUE "LegalTrademarks", "Dr. Robotnik and related characters are trademarks of Sega.\0"
|
||||
VALUE "OriginalFilename", "drrr.exe\0"
|
||||
VALUE "PrivateBuild", "\0"
|
||||
VALUE "ProductName", "SRB2Kart\0"
|
||||
VALUE "ProductName", "Dr. Robotnik's Ring Racers\0"
|
||||
VALUE "ProductVersion", VERSIONSTRING_RC
|
||||
VALUE "SpecialBuild", "\0"
|
||||
END
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ BOOL InitBugTrap(void)
|
|||
|
||||
if (g_hmodBugTrap)
|
||||
{
|
||||
lpfnBT_SetAppName(TEXT("Sonic Robo Blast 2"));
|
||||
lpfnBT_SetAppName(TEXT("Dr. Robotnik's Ring Racers"));
|
||||
lpfnBT_SetAppVersion(TEXT(VERSIONSTRING));
|
||||
lpfnBT_SetFlags(BTF_DETAILEDMODE | BTF_ATTACHREPORT);
|
||||
lpfnBT_SetSupportURL(TEXT("http://www.srb2.org/"));
|
||||
|
|
@ -454,7 +454,7 @@ LONG WINAPI RecordExceptionInfo(PEXCEPTION_POINTERS data/*, LPCSTR Message, LPST
|
|||
FPrintf(fileHandle, "Email Sonic Team Junior so we can fix the bugs\r\n"); // Tails
|
||||
FPrintf(fileHandle, "Make sure you tell us what you were doing to cause the crash, and if possible, record a demo!\r\n"); // Tails
|
||||
FPrintf(fileHandle, "\r\n\r\n\r\n\r\n");
|
||||
FPrintf(fileHandle, "SRB2Kart %s -ERROR LOG-\r\n\r\n", VERSIONSTRING);
|
||||
FPrintf(fileHandle, "Dr. Robotnik's Ring Racers %s -ERROR LOG-\r\n\r\n", VERSIONSTRING);
|
||||
FPrintf(fileHandle, "\r\n");
|
||||
// VirtualQuery can be used to get the allocation base associated with a
|
||||
// code address, which is the same as the ModuleHandle. This can be used
|
||||
|
|
|
|||
|
|
@ -325,8 +325,8 @@ static inline VOID OpenTextConsole(VOID)
|
|||
{
|
||||
if (AllocConsole()) //Let get the real console HANDLEs, because Mingw's Bash is bad!
|
||||
{
|
||||
SetConsoleTitleA("SRB2Kart Console");
|
||||
CONS_Printf(M_GetText("Hello, it's me, SRB2Kart's Console Window\n"));
|
||||
SetConsoleTitleA("Dr. Robotnik's Ring Racers Console");
|
||||
CONS_Printf(M_GetText("Hello, it's me, Dr. Robotnik's Ring Racers' Console Window\n"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -612,7 +612,7 @@ static int WINAPI HandledWinMain(HINSTANCE hInstance)
|
|||
#endif
|
||||
|
||||
// open a dummy window, both OpenGL and DirectX need one.
|
||||
if ((hWndMain = OpenMainWindow(hInstance, va("SRB2Kart "VERSIONSTRING))) == INVALID_HANDLE_VALUE)
|
||||
if ((hWndMain = OpenMainWindow(hInstance, va("Dr. Robotnik's Ring Racers "VERSIONSTRING))) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
tlErrorMessage(TEXT("Couldn't open window"));
|
||||
return FALSE;
|
||||
|
|
@ -624,7 +624,7 @@ static int WINAPI HandledWinMain(HINSTANCE hInstance)
|
|||
MakeCodeWritable();
|
||||
|
||||
// startup SRB2
|
||||
CONS_Printf("Setting up SRB2Kart...\n");
|
||||
CONS_Printf("Setting up Dr. Robotnik's Ring Racers...\n");
|
||||
D_SRB2Main();
|
||||
CONS_Printf("Entering main game loop...\n");
|
||||
// never return
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ boolean I_InitNetwork(void)
|
|||
{
|
||||
if (M_CheckParm ("-net"))
|
||||
{
|
||||
I_Error("The Win32 version of SRB2Kart doesn't work with external drivers like ipxsetup, sersetup, or doomatic\n"
|
||||
I_Error("The Win32 version of Dr. Robotnik's Ring Racers doesn't work with external drivers like ipxsetup, sersetup, or doomatic\n"
|
||||
"Read the documentation about \"-server\" and \"-connect\" parameters or just use the launcher\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ static void signal_handler(int num)
|
|||
}
|
||||
#endif
|
||||
|
||||
MessageBoxA(hWndMain, va("signal_handler(): %s", sigmsg), "SRB2Kart error", MB_OK|MB_ICONERROR);
|
||||
MessageBoxA(hWndMain, va("signal_handler(): %s", sigmsg), "Dr. Robotnik's Ring Racers error", MB_OK|MB_ICONERROR);
|
||||
|
||||
signal(num, SIG_DFL); // default signal action
|
||||
raise(num);
|
||||
|
|
@ -630,7 +630,7 @@ void I_Error(const char *error, ...)
|
|||
va_end(argptr);
|
||||
|
||||
OutputDebugStringA(txt);
|
||||
MessageBoxA(hWndMain, txt, "SRB2Kart Recursive Error", MB_OK|MB_ICONERROR);
|
||||
MessageBoxA(hWndMain, txt, "Dr. Robotnik's Ring Racers Recursive Error", MB_OK|MB_ICONERROR);
|
||||
W_Shutdown();
|
||||
exit(-1); // recursive errors detected
|
||||
}
|
||||
|
|
@ -673,7 +673,7 @@ void I_Error(const char *error, ...)
|
|||
}
|
||||
#endif
|
||||
|
||||
MessageBoxA(hWndMain, txt, "SRB2Kart Error", MB_OK|MB_ICONERROR);
|
||||
MessageBoxA(hWndMain, txt, "Dr. Robotnik's Ring Racers Error", MB_OK|MB_ICONERROR);
|
||||
|
||||
W_Shutdown();
|
||||
exit(-1);
|
||||
|
|
@ -3092,8 +3092,8 @@ void I_UpdateMumble(const mobj_t *mobj, const listener_t listener)
|
|||
return;
|
||||
|
||||
if(mumble->uiVersion != 2) {
|
||||
wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRINGW, 256);
|
||||
wcsncpy(mumble->description, L"SRB2Kart with integrated Mumble Link support.", 2048);
|
||||
wcsncpy(mumble->name, L"Dr. Robotnik's Ring Racers "VERSIONSTRINGW, 256);
|
||||
wcsncpy(mumble->description, L"Dr. Robotnik's Ring Racers with integrated Mumble Link support.", 2048);
|
||||
mumble->uiVersion = 2;
|
||||
}
|
||||
mumble->uiTick++;
|
||||
|
|
|
|||
|
|
@ -316,25 +316,27 @@ static void Y_CalculateMatchData(UINT8 rankingsmode, void (*comparison)(INT32))
|
|||
data.pos[data.numplayers] = data.numplayers+1;
|
||||
}
|
||||
|
||||
if ((powertype == PWRLV_DISABLED)
|
||||
&& (!rankingsmode)
|
||||
&& !(players[i].pflags & PF_NOCONTEST)
|
||||
&& (data.pos[data.numplayers] < (numplayersingame + numgriefers)))
|
||||
if (!rankingsmode)
|
||||
{
|
||||
// Online rank is handled further below in this file.
|
||||
data.increase[i] = K_CalculateGPRankPoints(data.pos[data.numplayers], numplayersingame + numgriefers);
|
||||
players[i].score += data.increase[i];
|
||||
}
|
||||
if ((powertype == PWRLV_DISABLED)
|
||||
&& !(players[i].pflags & PF_NOCONTEST)
|
||||
&& (data.pos[data.numplayers] < (numplayersingame + numgriefers)))
|
||||
{
|
||||
// Online rank is handled further below in this file.
|
||||
data.increase[i] = K_CalculateGPRankPoints(data.pos[data.numplayers], numplayersingame + numgriefers);
|
||||
players[i].score += data.increase[i];
|
||||
}
|
||||
|
||||
if (demo.recording && !rankingsmode)
|
||||
{
|
||||
G_WriteStanding(
|
||||
data.pos[data.numplayers],
|
||||
data.name[data.numplayers],
|
||||
*data.character[data.numplayers],
|
||||
*data.color[data.numplayers],
|
||||
data.val[data.numplayers]
|
||||
);
|
||||
if (demo.recording)
|
||||
{
|
||||
G_WriteStanding(
|
||||
data.pos[data.numplayers],
|
||||
data.name[data.numplayers],
|
||||
*data.character[data.numplayers],
|
||||
*data.color[data.numplayers],
|
||||
data.val[data.numplayers]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
data.numplayers++;
|
||||
|
|
@ -582,6 +584,12 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawScaledPatch(x+16, y-4, 0, W_CachePatchName(va("K_CHILI%d", cursorframe+1), PU_CACHE));
|
||||
}
|
||||
|
||||
if ((players[data.num[i]].pflags & PF_NOCONTEST) && players[data.num[i]].bot)
|
||||
{
|
||||
// RETIRED!!
|
||||
V_DrawScaledPatch(x+12, y-7, 0, W_CachePatchName("K_NOBLNS", PU_CACHE));
|
||||
}
|
||||
|
||||
STRBUFCPY(strtime, data.name[i]);
|
||||
|
||||
y2 = y;
|
||||
|
|
@ -803,6 +811,7 @@ void Y_Ticker(void)
|
|||
{
|
||||
if (!data.rankingsmode && sorttic != -1 && (intertic >= sorttic + 8))
|
||||
{
|
||||
K_RetireBots();
|
||||
Y_CalculateMatchData(1, Y_CompareRank);
|
||||
}
|
||||
|
||||
|
|
@ -1153,6 +1162,7 @@ void Y_StartIntermission(void)
|
|||
//
|
||||
void Y_EndIntermission(void)
|
||||
{
|
||||
K_RetireBots();
|
||||
Y_UnloadData();
|
||||
|
||||
endtic = -1;
|
||||
|
|
|
|||