| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/Main/hoard/hoard.cpp $ |
| 21 | * $Revision: 1.1.1.1 $ |
| 22 | * $Date: 2003/08/26 03:57:53 $ |
| 23 | * $Author: kevinb $ |
| 24 | * |
| 25 | * <insert description of file here> |
| 26 | * |
| 27 | * $Log: hoard.cpp,v $ |
| 28 | * Revision 1.1.1.1 2003/08/26 03:57:53 kevinb |
| 29 | * initial 1.5 import |
| 30 | * |
| 31 | * |
| 32 | * 91 10/21/99 9:27p Jeff |
| 33 | * B.A. Macintosh code merge |
| 34 | * |
| 35 | * 90 8/11/99 6:37p Jeff |
| 36 | * added input command for min count to score |
| 37 | * |
| 38 | * 89 7/12/99 1:22p Jeff |
| 39 | * updated for new netflags |
| 40 | * |
| 41 | * 88 7/12/99 1:16p Jeff |
| 42 | * fixed bug when a player dies they sometimes pickup their orb |
| 43 | * |
| 44 | * 87 7/11/99 6:44p Jeff |
| 45 | * cleaner plr if the list is too long |
| 46 | * |
| 47 | * 86 5/23/99 3:08a Jeff |
| 48 | * fixed stats display |
| 49 | * |
| 50 | * 85 5/23/99 3:04a Jason |
| 51 | * fixed bug with player rankings not being updated correctly |
| 52 | * |
| 53 | * 84 5/20/99 9:40p Jeff |
| 54 | * fixed hardlock for a client just joining the game if someone has a |
| 55 | * hoard orb |
| 56 | * |
| 57 | * 83 5/12/99 11:04p Jeff |
| 58 | * dmfc and multiplayer games now have endian friendly packets (*whew*) |
| 59 | * |
| 60 | * 82 5/12/99 11:28a Jeff |
| 61 | * added sourcesafe comment block |
| 62 | * |
| 63 | * $NoKeywords: $ |
| 64 | */ |
| 65 | |
| 66 | #include "gamedll_header.h"cxx . . $ `<file>/netgames/includes/gamedll_header.h`/ |
| 67 | #include <string.h> |
| 68 | #include "idmfc.h"cxx . . $ `<file>/netgames/includes/idmfc.h`/ |
| 69 | #include "Hoard.h"cxx . . $ `<file>/netgames/hoard/Hoard.h`/ |
| 70 | #include "hoardstr.h"cxx . . $ `<file>/netgames/hoard/hoardstr.h`/ |
| 71 | #include "hoardaux.h"cxx . . $ `<file>/netgames/hoard/hoardaux.h`/ |
| 72 | |
| 73 | #include <algorithm> |
| 74 | |
| 75 | IDMFCcxx . . $ IDMFC# *DMFCBasecxx . . $ DMFCBase. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 76 | static IDmfcStatscxx . . $ IDmfcStats# *dstatcxx . . $ dstat. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 77 | static IMenuItemcxx . . $ IMenuItem# *OSMenuSavecxx . . $ OSMenuSave. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 78 | static objectcxx . . $ object# *dObjectscxx . . $ dObjects. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 79 | static playercxx . . $ player# *dPlayerscxx . . $ dPlayers. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 80 | |
| 81 | #define SPID_INVINFOcxx . . $ `netgames/hoard/hoard.cpp:81:9`! 1 // packet for hoard inventory info |
| 82 | #define SPID_GAMECONFIGcxx . . $ `netgames/hoard/hoard.cpp:82:9`! 2 |
| 83 | |
| 84 | #define HOARD_CONFIG_DLGcxx . . $ `netgames/hoard/hoard.cpp:84:9`! 1234 |
| 85 | #define HCM_PLAYERCOLORcxx . . $ `netgames/hoard/hoard.cpp:85:9`! 0 |
| 86 | #define HCM_NORMALcxx . . $ `netgames/hoard/hoard.cpp:86:9`! 1 |
| 87 | |
| 88 | struct tPlayerStatcxx . . $ tPlayerStat# { |
| 89 | int Scorecxx . . $ tPlayerStat#Score.[2]; |
| 90 | int HighestScorecxx . . $ tPlayerStat#HighestScore.[2]; |
| 91 | }; |
| 92 | static int pack_pstatcxx . . $ pack_pstat(60b9885aab282f36).(tPlayerStatcxx . . $ tPlayerStat# *user_info, uint8_tcxx . . $ uint8_t# *data); |
| 93 | static int unpack_pstatcxx . . $ unpack_pstat(60b9885aab282f36).(tPlayerStatcxx . . $ tPlayerStat# *user_info, uint8_tcxx . . $ uint8_t# *data); |
| 94 | int pack_pstatcxx . . $ pack_pstat(60b9885aab282f36).(tPlayerStatcxx . . $ tPlayerStat# *user_info, uint8_tcxx . . $ uint8_t# *data) { |
| 95 | int count = 0; |
| 96 | MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(user_info->Scorecxx . . $ tPlayerStat#Score.[0], data, &count); |
| 97 | MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(user_info->Scorecxx . . $ tPlayerStat#Score.[1], data, &count); |
| 98 | MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(user_info->HighestScorecxx . . $ tPlayerStat#HighestScore.[0], data, &count); |
| 99 | MultiAddIntcxx . . $ MultiAddInt(49f79918a3afee3).(user_info->HighestScorecxx . . $ tPlayerStat#HighestScore.[1], data, &count); |
| 100 | return count; |
| 101 | } |
| 102 | |
| 103 | int unpack_pstatcxx . . $ unpack_pstat(60b9885aab282f36).(tPlayerStatcxx . . $ tPlayerStat# *user_info, uint8_tcxx . . $ uint8_t# *data) { |
| 104 | int count = 0; |
| 105 | user_info->Scorecxx . . $ tPlayerStat#Score.[0] = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 106 | user_info->Scorecxx . . $ tPlayerStat#Score.[1] = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 107 | user_info->HighestScorecxx . . $ tPlayerStat#HighestScore.[0] = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 108 | user_info->HighestScorecxx . . $ tPlayerStat#HighestScore.[1] = MultiGetIntcxx . . $ MultiGetInt(7337501fe74387bd).(data, &count); |
| 109 | return count; |
| 110 | } |
| 111 | |
| 112 | static tGameConfigcxx . . $ tGameConfig# configcxx . . $ config.; |
| 113 | |
| 114 | static int SortedPlayerscxx . . $ SortedPlayers.[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!]; // sorted player nums |
| 115 | static bool DisplayScoreScreencxx . . $ DisplayScoreScreen.; |
| 116 | static int HoardIDcxx . . $ HoardID. = 0; |
| 117 | static int HoardOrbIconcxx . . $ HoardOrbIcon. = BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!; |
| 118 | static bool DisplayBlinkcxx . . $ DisplayBlink. = true; |
| 119 | static int WhoJustScoredcxx . . $ WhoJustScored. = -1; |
| 120 | static int WhoJustScoredTimercxx . . $ WhoJustScoredTimer. = -1; |
| 121 | static uint8_tcxx . . $ uint8_t# HUD_color_modelcxx . . $ HUD_color_model. = HCM_PLAYERCOLORcxx . . $ `netgames/hoard/hoard.cpp:85:9`!; |
| 122 | static int Highlight_bmpcxx . . $ Highlight_bmp. = -1; |
| 123 | static bool display_my_welcomecxx . . $ display_my_welcome. = false; |
| 124 | |
| 125 | static void OnTimercxx . . $ OnTimer(49f6e7a06ebc5aa8).(void); |
| 126 | static void OnTimerKillcxx . . $ OnTimerKill(49f6e7a06ebc5aa8).(void); |
| 127 | static void DisplayWelcomeMessagecxx . . $ DisplayWelcomeMessage(d4f767463ce0a6b3).(int player_num); |
| 128 | static void DisplayHUDScorescxx . . $ DisplayHUDScores(c7a20e4e05358911).(struct tHUDItemcxx . . $ tHUDItem# *hitem); |
| 129 | static void SortPlayerScorescxx . . $ SortPlayerScores(621ccea12ecf5b06).(int *sortedindex, int size); |
| 130 | static void DisplayWelcomeMessagecxx . . $ DisplayWelcomeMessage(d4f767463ce0a6b3).(int player_num); |
| 131 | static void DoBallsEffectcxx . . $ DoBallsEffect(3e454b8ccf442868).(int i, int count); |
| 132 | static void ReceiveHoardInvcxx . . $ ReceiveHoardInv(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 133 | static void SendHoardInvcxx . . $ SendHoardInv(d4f767463ce0a6b3).(int playernum); |
| 134 | static void SaveStatsToFilecxx . . $ SaveStatsToFile(fda57c8427c60377).(char *filename); |
| 135 | static void ReceiveGameConfigcxx . . $ ReceiveGameConfig(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data); |
| 136 | static void OnClientPlayerEntersGamecxx . . $ OnClientPlayerEntersGame(d4f767463ce0a6b3).(int player_num); |
| 137 | |
| 138 | static bool Config_displayedcxx . . $ Config_displayed. = false; |
| 139 | |
| 140 | /////////////////////////////////////////////// |
| 141 | // localization info |
| 142 | static char **StringTablecxx . . $ StringTable.; |
| 143 | static int StringTableSizecxx . . $ StringTableSize. = 0; |
| 144 | static const char *_ErrorStringcxx . . $ _ErrorString. = "Missing String"; |
| 145 | const char *GetStringFromTablecxx . . $ GetStringFromTable(f7ae7e56280f18ae).(int d) { |
| 146 | if ((d < 0) || (d >= StringTableSizecxx . . $ StringTableSize.)) |
| 147 | return _ErrorStringcxx . . $ _ErrorString.; |
| 148 | else |
| 149 | return StringTablecxx . . $ StringTable.[d]; |
| 150 | } |
| 151 | /////////////////////////////////////////////// |
| 152 | |
| 153 | // This function gets called by the game when it wants to learn some info about the game |
| 154 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLGetGameInfocxx . . $ DLLGetGameInfo(e5c6dce1fbda187a).(tDLLOptionscxx . . $ tDLLOptions# *options) { |
| 155 | options->flagscxx . . $ tDLLOptions#flags. = DOF_MAXTEAMScxx . . $ `netgames/includes/gamedll_header.h:105:9`!; |
| 156 | options->max_teamscxx . . $ tDLLOptions#max_teams. = 1; |
| 157 | strcpy(options->game_namecxx . . $ tDLLOptions#game_name., TXT_GAMENAMEcxx . . $ `netgames/hoard/hoardstr.h:62:9`!); |
| 158 | strcpy(options->requirementscxx . . $ tDLLOptions#requirements., "MINGOALS1"); |
| 159 | } |
| 160 | |
| 161 | void DetermineScorecxx . . $ DetermineScore(74c02bb7c84e7fae).(int precord_num, int column_num, char *buffer, int buffer_size) { |
| 162 | player_recordcxx . . $ player_record# *pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(precord_num); |
| 163 | if (!pr || pr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.) { |
| 164 | buffer[0] = '\0'; |
| 165 | return; |
| 166 | } |
| 167 | tPlayerStatcxx . . $ tPlayerStat# *stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 168 | |
| 169 | if (column_num == 2) { |
| 170 | // Score |
| 171 | snprintf(buffer, buffer_size, "%d[%d]", stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 172 | } else { |
| 173 | // Highest Score |
| 174 | snprintf(buffer, buffer_size, "%d[%d]", stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | void ShowStatBitmapcxx . . $ ShowStatBitmap(dac02d3a3b31dff4).(int precord_num, int column_num, int x, int y, int w, int h, uint8_tcxx . . $ uint8_t# alpha_to_use) { |
| 179 | player_recordcxx . . $ player_record# *pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(precord_num); |
| 180 | float ratio = DEFAULT_HUD_WIDTHcxx . . $ `Descent3/hud.h:261:9`! / ((float)DMFCBasecxx . . $ DMFCBase.->GetGameWindowWcxx . . $ IDMFC#GetGameWindowW(b126dc7c1de90089).()); |
| 181 | |
| 182 | if (pr && pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) { |
| 183 | DLLRenderHUDText(GR_GREYcxx . . $ `netgames/includes/DMFC.h:432:9`!, alpha_to_use, 0, x, y, "%d", DLLInvGetTypeIDCount(pr->pnumcxx . . $ player_record#pnum., OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.)); |
| 184 | x += (ratio * ((float)DLLgrtext_GetTextLineWidth("12"))) + 1; |
| 185 | DLLRenderHUDQuad(x, y, 10, 10, 0, 0, 1, 1, HoardOrbIconcxx . . $ HoardOrbIcon., alpha_to_use, 0); |
| 186 | } |
| 187 | } |
| 188 | |
| 189 | // We import these from DMFC |
| 190 | bool StringParseNumbercxx . . $ StringParseNumber(8de6ed5103590a5a).(const char *string, int *number, const char **newpos); |
| 191 | bool StringParseWordcxx . . $ StringParseWord(a346a35e515f1bd).(const char *string, char *word, int size, const char **newpos); |
| 192 | /* |
| 193 | bool StringParseWord(const char *string,char *word,int size,const char **newpos) |
| 194 | { |
| 195 | *newpos = string; |
| 196 | word[0] = '\0'; |
| 197 | |
| 198 | //get through all the whitespace |
| 199 | while( *string && *string==' ') string++; |
| 200 | if(!(*string)){ |
| 201 | //nothing is left in the string |
| 202 | *newpos = string; |
| 203 | return false; |
| 204 | } |
| 205 | |
| 206 | //we're at the beginning of a word |
| 207 | while( *string && *string!=' '){ |
| 208 | if(size>1){ |
| 209 | *word = *string; |
| 210 | size--; |
| 211 | } |
| 212 | |
| 213 | word++; |
| 214 | string++; |
| 215 | } |
| 216 | |
| 217 | //tack on an ending \0 |
| 218 | *word = '\0'; |
| 219 | |
| 220 | *newpos = string; |
| 221 | return true; |
| 222 | } |
| 223 | |
| 224 | bool StringParseNumber(const char *string,int *number,const char **newpos) |
| 225 | { |
| 226 | char temp[10]; |
| 227 | bool ret = StringParseWord(string,temp,10,newpos); |
| 228 | if(!ret){ |
| 229 | *number = 0; |
| 230 | return false; |
| 231 | } |
| 232 | |
| 233 | *number = atoi(temp); |
| 234 | return true; |
| 235 | } |
| 236 | */ |
| 237 | void DMFCInputCommand_MinCountcxx . . $ DMFCInputCommand_MinCount(85c52e162fed56f9).(const char *input_string) { |
| 238 | if (DMFCBasecxx . . $ DMFCBase.->GetLocalRolecxx . . $ IDMFC#GetLocalRole(b126dc7c1de90089).() != LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) |
| 239 | return; |
| 240 | if (!DMFCBasecxx . . $ DMFCBase.->IAmDedicatedServercxx . . $ IDMFC#IAmDedicatedServer(c9857a73d68e59ba).()) |
| 241 | return; |
| 242 | |
| 243 | char s[20]; |
| 244 | |
| 245 | // parse "$mincount" |
| 246 | if (!StringParseWordcxx . . $ StringParseWord(a346a35e515f1bd).(input_string, s, 20, &input_string)) { |
| 247 | DMFCBasecxx . . $ DMFCBase.->DisplayInputCommandHelpcxx . . $ IDMFC#DisplayInputCommandHelp(85c52e162fed56f9).("mincount"); |
| 248 | return; |
| 249 | } |
| 250 | |
| 251 | // parse count |
| 252 | int count; |
| 253 | if (!StringParseNumbercxx . . $ StringParseNumber(8de6ed5103590a5a).(input_string, &count, &input_string)) { |
| 254 | DMFCBasecxx . . $ DMFCBase.->DisplayInputCommandHelpcxx . . $ IDMFC#DisplayInputCommandHelp(85c52e162fed56f9).("mincount"); |
| 255 | return; |
| 256 | } |
| 257 | |
| 258 | if (count < 1) |
| 259 | count = 1; |
| 260 | if (count > 12) |
| 261 | count = 12; |
| 262 | |
| 263 | configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard. = count; |
| 264 | DLLAddHUDMessage("Hoard Orb Score Minimum Count Set To %d", count); |
| 265 | } |
| 266 | |
| 267 | // Initializes the game function pointers |
| 268 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLGameInitcxx . . $ DLLGameInit(937c1f75cb8fa6b1).(int *api_func, uint8_tcxx . . $ uint8_t# *all_ok, int num_teams_to_use) { |
| 269 | *all_ok = 1; |
| 270 | DMFCBasecxx . . $ DMFCBase. = CreateDMFC(); |
| 271 | if (!DMFCBasecxx . . $ DMFCBase.) { |
| 272 | *all_ok = 0; |
| 273 | return; |
| 274 | } |
| 275 | |
| 276 | dstatcxx . . $ dstat. = CreateDmfcStats(); |
| 277 | if (!dstatcxx . . $ dstat.) { |
| 278 | *all_ok = 0; |
| 279 | return; |
| 280 | } |
| 281 | |
| 282 | DMFCBasecxx . . $ DMFCBase.->LoadFunctionscxx . . $ IDMFC#LoadFunctions(11b0e290e57a7e53).(api_func); |
| 283 | |
| 284 | // Setup event handlers |
| 285 | DMFCBasecxx . . $ DMFCBase.->Set_OnIntervalcxx . . $ IDMFC#Set_OnInterval(964b12a25712bdc3).(OnIntervalcxx . . $ OnInterval(49f6e7a06ebc5aa8).); |
| 286 | DMFCBasecxx . . $ DMFCBase.->Set_OnHUDIntervalcxx . . $ IDMFC#Set_OnHUDInterval(964b12a25712bdc3).(OnHUDIntervalcxx . . $ OnHUDInterval(49f6e7a06ebc5aa8).); |
| 287 | DMFCBasecxx . . $ DMFCBase.->Set_OnKeypresscxx . . $ IDMFC#Set_OnKeypress(94eb4457dc8d4d10).(OnKeypresscxx . . $ OnKeypress(d4f767463ce0a6b3).); |
| 288 | DMFCBasecxx . . $ DMFCBase.->Set_OnServerGameCreatedcxx . . $ IDMFC#Set_OnServerGameCreated(964b12a25712bdc3).(OnServerGameCreatedcxx . . $ OnServerGameCreated(49f6e7a06ebc5aa8).); |
| 289 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientLevelStartcxx . . $ IDMFC#Set_OnClientLevelStart(964b12a25712bdc3).(OnClientLevelStartcxx . . $ OnClientLevelStart(49f6e7a06ebc5aa8).); |
| 290 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientLevelEndcxx . . $ IDMFC#Set_OnClientLevelEnd(964b12a25712bdc3).(OnClientLevelEndcxx . . $ OnClientLevelEnd(49f6e7a06ebc5aa8).); |
| 291 | DMFCBasecxx . . $ DMFCBase.->Set_OnGameStateRequestcxx . . $ IDMFC#Set_OnGameStateRequest(94eb4457dc8d4d10).(OnGameStateRequestcxx . . $ OnGameStateRequest(d4f767463ce0a6b3).); |
| 292 | DMFCBasecxx . . $ DMFCBase.->Set_OnPlayerConnectcxx . . $ IDMFC#Set_OnPlayerConnect(94eb4457dc8d4d10).(OnPlayerConnectcxx . . $ OnPlayerConnect(d4f767463ce0a6b3).); |
| 293 | DMFCBasecxx . . $ DMFCBase.->Set_OnServerPlayerChangeSegmentcxx . . $ IDMFC#Set_OnServerPlayerChangeSegment(d20c6d03e4c9e417).(OnServerPlayerChangeSegmentcxx . . $ OnServerPlayerChangeSegment(b1146eedae1e1d0b).); |
| 294 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientPlayerChangeSegmentcxx . . $ IDMFC#Set_OnClientPlayerChangeSegment(d20c6d03e4c9e417).(OnClientPlayerChangeSegmentcxx . . $ OnClientPlayerChangeSegment(b1146eedae1e1d0b).); |
| 295 | DMFCBasecxx . . $ DMFCBase.->Set_OnServerCollidecxx . . $ IDMFC#Set_OnServerCollide(74ea2c9f51d3637e).(OnServerCollidecxx . . $ OnServerCollide(6273fa812ac58a8).); |
| 296 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientCollidecxx . . $ IDMFC#Set_OnClientCollide(74ea2c9f51d3637e).(OnClientCollidecxx . . $ OnClientCollide(6273fa812ac58a8).); |
| 297 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientPlayerKilledcxx . . $ IDMFC#Set_OnClientPlayerKilled(7da43329b4117518).(OnClientPlayerKilledcxx . . $ OnClientPlayerKilled(766a1b7183ffa4b4).); |
| 298 | DMFCBasecxx . . $ DMFCBase.->Set_OnPLRIntervalcxx . . $ IDMFC#Set_OnPLRInterval(964b12a25712bdc3).(OnPLRIntervalcxx . . $ OnPLRInterval(49f6e7a06ebc5aa8).); |
| 299 | DMFCBasecxx . . $ DMFCBase.->Set_OnPrintScorescxx . . $ IDMFC#Set_OnPrintScores(94eb4457dc8d4d10).(OnPrintScorescxx . . $ OnPrintScores(d4f767463ce0a6b3).); |
| 300 | DMFCBasecxx . . $ DMFCBase.->Set_OnPLRInitcxx . . $ IDMFC#Set_OnPLRInit(964b12a25712bdc3).(OnPLRInitcxx . . $ OnPLRInit(49f6e7a06ebc5aa8).); |
| 301 | DMFCBasecxx . . $ DMFCBase.->Set_OnSaveStatsToFilecxx . . $ IDMFC#Set_OnSaveStatsToFile(964b12a25712bdc3).(OnSaveStatsToFilecxx . . $ OnSaveStatsToFile(49f6e7a06ebc5aa8).); |
| 302 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientShowUIcxx . . $ IDMFC#Set_OnClientShowUI(5275d8c1b1c0b8a7).(OnClientShowUIcxx . . $ OnClientShowUI(6ca3d68f5c5f0975).); |
| 303 | DMFCBasecxx . . $ DMFCBase.->Set_OnDisconnectSaveStatsToFilecxx . . $ IDMFC#Set_OnDisconnectSaveStatsToFile(964b12a25712bdc3).(OnDisconnectSaveStatsToFilecxx . . $ OnDisconnectSaveStatsToFile(49f6e7a06ebc5aa8).); |
| 304 | DMFCBasecxx . . $ DMFCBase.->Set_OnLevelEndSaveStatsToFilecxx . . $ IDMFC#Set_OnLevelEndSaveStatsToFile(964b12a25712bdc3).(OnLevelEndSaveStatsToFilecxx . . $ OnLevelEndSaveStatsToFile(49f6e7a06ebc5aa8).); |
| 305 | DMFCBasecxx . . $ DMFCBase.->Set_OnClientPlayerEntersGamecxx . . $ IDMFC#Set_OnClientPlayerEntersGame(94eb4457dc8d4d10).(OnClientPlayerEntersGamecxx . . $ OnClientPlayerEntersGame(d4f767463ce0a6b3).); |
| 306 | |
| 307 | // Setup arrays for easier to read code |
| 308 | dObjectscxx . . $ dObjects. = DMFCBasecxx . . $ DMFCBase.->GetObjectscxx . . $ IDMFC#GetObjects(26f25deff401d7e4).(); |
| 309 | dPlayerscxx . . $ dPlayers. = DMFCBasecxx . . $ DMFCBase.->GetPlayerscxx . . $ IDMFC#GetPlayers(51ff8e716a252304).(); |
| 310 | |
| 311 | DLLCreateStringTable("Hoard.str", &StringTablecxx . . $ StringTable., &StringTableSizecxx . . $ StringTableSize.); |
| 312 | DLLmprintfcxx . . $ `netgames/includes/DMFC.h:343:9`!(0, "%d strings loaded from string table\n", StringTableSize); |
| 313 | if (!StringTableSizecxx . . $ StringTableSize.) { |
| 314 | *all_ok = 0; |
| 315 | return; |
| 316 | } |
| 317 | |
| 318 | // setup default config |
| 319 | configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard. = 1; |
| 320 | |
| 321 | if (DMFCBasecxx . . $ DMFCBase.->AddInputCommandcxx . . $ IDMFC#AddInputCommand(e7187a5a7118c77f).("mincount", |
| 322 | "[Dedicated Server Only]\nSets the minimum number of hoard orbs needed to score.\n", |
| 323 | DMFCInputCommand_MinCountcxx . . $ DMFCInputCommand_MinCount(85c52e162fed56f9)., true) < 1) |
| 324 | mprintfcxx . . $ `netgames/includes/DMFC.h:423:9`!(0, "Hoard Warning: Error Adding Input Command\n"); |
| 325 | |
| 326 | HoardGameInitcxx . . $ HoardGameInit(d4f767463ce0a6b3).(1); |
| 327 | |
| 328 | // add the death and suicide messages |
| 329 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH1cxx . . $ `netgames/hoard/hoardstr.h:31:9`!, true); |
| 330 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH2cxx . . $ `netgames/hoard/hoardstr.h:32:9`!, true); |
| 331 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH3cxx . . $ `netgames/hoard/hoardstr.h:33:9`!, false); |
| 332 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH4cxx . . $ `netgames/hoard/hoardstr.h:34:9`!, false); |
| 333 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH5cxx . . $ `netgames/hoard/hoardstr.h:35:9`!, true); |
| 334 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH6cxx . . $ `netgames/hoard/hoardstr.h:36:9`!, true); |
| 335 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH7cxx . . $ `netgames/hoard/hoardstr.h:37:9`!, false); |
| 336 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH8cxx . . $ `netgames/hoard/hoardstr.h:38:9`!, true); |
| 337 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH9cxx . . $ `netgames/hoard/hoardstr.h:39:9`!, true); |
| 338 | DMFCBasecxx . . $ DMFCBase.->AddDeathMessagecxx . . $ IDMFC#AddDeathMessage(90ef5b561fbcb8de).(TXT_DEATH10cxx . . $ `netgames/hoard/hoardstr.h:40:9`!, true); |
| 339 | |
| 340 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE1cxx . . $ `netgames/hoard/hoardstr.h:41:9`!); |
| 341 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE2cxx . . $ `netgames/hoard/hoardstr.h:42:9`!); |
| 342 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE3cxx . . $ `netgames/hoard/hoardstr.h:43:9`!); |
| 343 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE4cxx . . $ `netgames/hoard/hoardstr.h:44:9`!); |
| 344 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE5cxx . . $ `netgames/hoard/hoardstr.h:45:9`!); |
| 345 | DMFCBasecxx . . $ DMFCBase.->AddSuicideMessagecxx . . $ IDMFC#AddSuicideMessage(85c52e162fed56f9).(TXT_SUICIDE6cxx . . $ `netgames/hoard/hoardstr.h:46:9`!); |
| 346 | |
| 347 | HoardIDcxx . . $ HoardID. = DLLFindObjectIDName("Hoardorb"); |
| 348 | if (HoardIDcxx . . $ HoardID. == -1) { |
| 349 | DLLmprintfcxx . . $ `netgames/includes/DMFC.h:343:9`!(0, "HOARD: BIG WARNING, COULDN'T FIND HOARD ORB ID...YOUR GAME IS IN JEOPARDY!\n"); |
| 350 | *all_ok = 0; |
| 351 | return; |
| 352 | } |
| 353 | |
| 354 | DMFCBasecxx . . $ DMFCBase.->SetupPlayerRecordcxx . . $ IDMFC#SetupPlayerRecord(7df49e8a00e47932).(sizeof(tPlayerStatcxx . . $ tPlayerStat#), (int (*)(void *, uint8_tcxx . . $ uint8_t# *))pack_pstatcxx . . $ pack_pstat(60b9885aab282f36)., |
| 355 | (int (*)(void *, uint8_tcxx . . $ uint8_t# *))unpack_pstatcxx . . $ unpack_pstat(60b9885aab282f36).); |
| 356 | |
| 357 | DMFCBasecxx . . $ DMFCBase.->RegisterPacketReceivercxx . . $ IDMFC#RegisterPacketReceiver(6efe5766e3bef270).(SPID_INVINFOcxx . . $ `netgames/hoard/hoard.cpp:81:9`!, ReceiveHoardInvcxx . . $ ReceiveHoardInv(f25546b61a629de7).); |
| 358 | DMFCBasecxx . . $ DMFCBase.->RegisterPacketReceivercxx . . $ IDMFC#RegisterPacketReceiver(6efe5766e3bef270).(SPID_GAMECONFIGcxx . . $ `netgames/hoard/hoard.cpp:82:9`!, ReceiveGameConfigcxx . . $ ReceiveGameConfig(f25546b61a629de7).); |
| 359 | |
| 360 | DMFCBasecxx . . $ DMFCBase.->SetNumberOfTeamscxx . . $ IDMFC#SetNumberOfTeams(d4f767463ce0a6b3).(1); |
| 361 | (DMFCBasecxx . . $ DMFCBase.->GetNetgameInfocxx . . $ IDMFC#GetNetgameInfo(242e78cd5130aa12).())->flagscxx . . $ netgame_info#flags. |= (NF_DAMAGE_FRIENDLYcxx . . $ `Descent3/multi_external.h:235:9`! | NF_TRACK_RANKcxx . . $ `Descent3/multi_external.h:243:9`!); |
| 362 | |
| 363 | DMFCBasecxx . . $ DMFCBase.->AddHUDItemCallbackcxx . . $ IDMFC#AddHUDItemCallback(97c9b33f56b4265c).(HI_TEXTcxx . . $ `netgames/includes/DMFC.h:440:9`!, DisplayHUDScorescxx . . $ DisplayHUDScores(c7a20e4e05358911).); |
| 364 | |
| 365 | DisplayScoreScreencxx . . $ DisplayScoreScreen. = false; |
| 366 | |
| 367 | HoardOrbIconcxx . . $ HoardOrbIcon. = DLLbm_AllocLoadFileBitmap("HoardICON.ogf", 0, BITMAP_FORMAT_1555cxx . . $ `lib/bitmap.h:56:9`!); |
| 368 | if (HoardOrbIconcxx . . $ HoardOrbIcon. == -1) { |
| 369 | *all_ok = 0; |
| 370 | return; |
| 371 | } |
| 372 | |
| 373 | Highlight_bmpcxx . . $ Highlight_bmp. = DLLbm_AllocBitmap(32, 32, 0); |
| 374 | if (Highlight_bmpcxx . . $ Highlight_bmp. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 375 | uint16_tcxx . . $ uint16_t# *data = DLLbm_data(Highlight_bmpcxx . . $ Highlight_bmp., 0); |
| 376 | if (!data) { |
| 377 | // bail on out of here |
| 378 | *all_ok = 0; |
| 379 | return; |
| 380 | } |
| 381 | for (int x = 0; x < 32 * 32; x++) { |
| 382 | data[x] = GR_RGB16cxx . . $ GR_RGB16(6461fafb79bad5b9).(50, 50, 50) | OPAQUE_FLAGcxx . . $ `lib/grdefs.h:72:9`!; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | // Initialize the Stats Manager |
| 387 | // ---------------------------- |
| 388 | tDmfcStatsInitcxx . . $ tDmfcStatsInit# tsi; |
| 389 | tDmfcStatsColumnInfocxx . . $ tDmfcStatsColumnInfo# pl_col[8]; |
| 390 | char gname[20]; |
| 391 | strcpy(gname, TXT_STATGAMENAMEcxx . . $ `netgames/hoard/hoardstr.h:80:9`!); |
| 392 | |
| 393 | tsi.flagscxx . . $ tDmfcStatsInit#flags. = DSIF_SHOW_PICcxx . . $ `netgames/includes/DMFC.h:619:9`! | DSIF_SHOW_OBSERVERICONcxx . . $ `netgames/includes/DMFC.h:627:9`!; |
| 394 | tsi.cColumnCountDetailedcxx . . $ tDmfcStatsInit#cColumnCountDetailed. = 0; |
| 395 | tsi.cColumnCountPlayerListcxx . . $ tDmfcStatsInit#cColumnCountPlayerList. = 8; |
| 396 | tsi.clbDetailedColumncxx . . $ tDmfcStatsInit#clbDetailedColumn. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 397 | tsi.clbDetailedColumnBMPcxx . . $ tDmfcStatsInit#clbDetailedColumnBMP. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 398 | tsi.clbPlayerColumncxx . . $ tDmfcStatsInit#clbPlayerColumn. = DetermineScorecxx . . $ DetermineScore(74c02bb7c84e7fae).; |
| 399 | tsi.clbPlayerColumnBMPcxx . . $ tDmfcStatsInit#clbPlayerColumnBMP. = ShowStatBitmapcxx . . $ ShowStatBitmap(dac02d3a3b31dff4).; |
| 400 | tsi.DetailedColumnscxx . . $ tDmfcStatsInit#DetailedColumns. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 401 | tsi.GameNamecxx . . $ tDmfcStatsInit#GameName. = gname; |
| 402 | tsi.MaxNumberDisplayedcxx . . $ tDmfcStatsInit#MaxNumberDisplayed. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 403 | tsi.PlayerListColumnscxx . . $ tDmfcStatsInit#PlayerListColumns. = pl_col; |
| 404 | tsi.SortedPlayerRecordscxx . . $ tDmfcStatsInit#SortedPlayerRecords. = SortedPlayerscxx . . $ SortedPlayers.; |
| 405 | |
| 406 | pl_col[0].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_TEAMcxx . . $ DSCOLOR_TEAM.; |
| 407 | pl_col[0].titlecxx . . $ tDmfcStatsColumnInfo#title.[0] = '\0'; |
| 408 | pl_col[0].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_BMPcxx . . $ DSCOL_BMP.; |
| 409 | pl_col[0].widthcxx . . $ tDmfcStatsColumnInfo#width. = 27; |
| 410 | |
| 411 | pl_col[1].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 412 | strcpy(pl_col[1].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_PILOTcxx . . $ `netgames/hoard/hoardstr.h:51:9`!); |
| 413 | pl_col[1].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_PILOT_NAMEcxx . . $ DSCOL_PILOT_NAME.; |
| 414 | pl_col[1].widthcxx . . $ tDmfcStatsColumnInfo#width. = 84; |
| 415 | |
| 416 | pl_col[2].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 417 | strcpy(pl_col[2].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_SCOREcxx . . $ `netgames/hoard/hoardstr.h:63:9`!); |
| 418 | pl_col[2].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_CUSTOMcxx . . $ DSCOL_CUSTOM.; |
| 419 | pl_col[2].widthcxx . . $ tDmfcStatsColumnInfo#width. = 49; |
| 420 | |
| 421 | pl_col[3].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 422 | strcpy(pl_col[3].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_HIGHESTcxx . . $ `netgames/hoard/hoardstr.h:64:9`!); |
| 423 | pl_col[3].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_CUSTOMcxx . . $ DSCOL_CUSTOM.; |
| 424 | pl_col[3].widthcxx . . $ tDmfcStatsColumnInfo#width. = 65; |
| 425 | |
| 426 | pl_col[4].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 427 | strcpy(pl_col[4].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_KILLS_SHORTcxx . . $ `netgames/hoard/hoardstr.h:83:9`!); |
| 428 | pl_col[4].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_KILLS_LEVELcxx . . $ DSCOL_KILLS_LEVEL.; |
| 429 | pl_col[4].widthcxx . . $ tDmfcStatsColumnInfo#width. = 40; |
| 430 | |
| 431 | pl_col[5].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 432 | strcpy(pl_col[5].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_DEATHS_SHORTcxx . . $ `netgames/hoard/hoardstr.h:84:9`!); |
| 433 | pl_col[5].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_DEATHS_LEVELcxx . . $ DSCOL_DEATHS_LEVEL.; |
| 434 | pl_col[5].widthcxx . . $ tDmfcStatsColumnInfo#width. = 40; |
| 435 | |
| 436 | pl_col[6].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 437 | strcpy(pl_col[6].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_SUICIDES_SHORTcxx . . $ `netgames/hoard/hoardstr.h:85:9`!); |
| 438 | pl_col[6].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_SUICIDES_LEVELcxx . . $ DSCOL_SUICIDES_LEVEL.; |
| 439 | pl_col[6].widthcxx . . $ tDmfcStatsColumnInfo#width. = 40; |
| 440 | |
| 441 | pl_col[7].color_typecxx . . $ tDmfcStatsColumnInfo#color_type. = DSCOLOR_SHIPCOLORcxx . . $ DSCOLOR_SHIPCOLOR.; |
| 442 | strcpy(pl_col[7].titlecxx . . $ tDmfcStatsColumnInfo#title., TXT_PINGcxx . . $ `netgames/hoard/hoardstr.h:65:9`!); |
| 443 | pl_col[7].typecxx . . $ tDmfcStatsColumnInfo#type. = DSCOL_PINGcxx . . $ DSCOL_PING.; |
| 444 | pl_col[7].widthcxx . . $ tDmfcStatsColumnInfo#width. = 40; |
| 445 | |
| 446 | dstatcxx . . $ dstat.->Initializecxx . . $ IDmfcStats#Initialize(645910a8ad01b658).(&tsi); |
| 447 | } |
| 448 | |
| 449 | // Called when the DLL is shutdown |
| 450 | void DLLFUNCCALLcxx . . $ `lib/module.h:93:10`! DLLGameClosecxx . . $ DLLGameClose(49f6e7a06ebc5aa8).() { |
| 451 | if (Highlight_bmpcxx . . $ Highlight_bmp. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 452 | DLLbm_FreeBitmap(Highlight_bmpcxx . . $ Highlight_bmp.); |
| 453 | |
| 454 | DLLDestroyStringTable(StringTablecxx . . $ StringTable., StringTableSizecxx . . $ StringTableSize.); |
| 455 | if (HoardOrbIconcxx . . $ HoardOrbIcon. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) |
| 456 | DLLbm_FreeBitmap(HoardOrbIconcxx . . $ HoardOrbIcon.); |
| 457 | |
| 458 | if (dstatcxx . . $ dstat.) { |
| 459 | dstatcxx . . $ dstat.->DestroyPointercxx . . $ IObject#DestroyPointer(49f6e7a06ebc5aa8).(); |
| 460 | dstatcxx . . $ dstat. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 461 | } |
| 462 | |
| 463 | if (DMFCBasecxx . . $ DMFCBase.) { |
| 464 | DMFCBasecxx . . $ DMFCBase.->GameClosecxx . . $ IDMFC#GameClose(49f6e7a06ebc5aa8).(); |
| 465 | DMFCBasecxx . . $ DMFCBase.->DestroyPointercxx . . $ IObject#DestroyPointer(49f6e7a06ebc5aa8).(); |
| 466 | DMFCBasecxx . . $ DMFCBase. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | // DMFCApp::GameInit |
| 471 | // |
| 472 | // Sets up all the DLL functions and pointers and preps the class for use. This ABSOLUTLY must be |
| 473 | // called, so if you override DMFCApp::GameInit, make sure that you put a call to this somewhere in |
| 474 | // the override. |
| 475 | void ShowGameConfigDialogcxx . . $ ShowGameConfigDialog(d4f767463ce0a6b3).(int i); |
| 476 | void SwitchHUDColorcxx . . $ SwitchHUDColor(d4f767463ce0a6b3).(int i); |
| 477 | void HoardGameInitcxx . . $ HoardGameInit(d4f767463ce0a6b3).(int teams) { |
| 478 | IMenuItemcxx . . $ IMenuItem# *lev1, *lev2; |
| 479 | lev1 = CreateMenuItemWArgs(TXT_GAMENAMEcxx . . $ `netgames/hoard/hoardstr.h:62:9`!, MIT_NORMALcxx . . $ `netgames/includes/DMFC.h:513:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 480 | |
| 481 | lev2 = CreateMenuItemWArgs(TXT_HUDSCORECOLORScxx . . $ `netgames/hoard/hoardstr.h:66:9`!, MIT_STATEcxx . . $ `netgames/includes/DMFC.h:515:9`!, 0, SwitchHUDColorcxx . . $ SwitchHUDColor(d4f767463ce0a6b3).); |
| 482 | lev2->SetStateItemListcxx . . $ IMenuItem#SetStateItemList(d49b86907ad5c83b).(2, TXT_PLAYERCOLORScxx . . $ `netgames/hoard/hoardstr.h:67:9`!, TXT_NORMALcxx . . $ `netgames/hoard/hoardstr.h:68:9`!); |
| 483 | lev2->SetStatecxx . . $ IMenuItem#SetState(d4f767463ce0a6b3).(HUD_color_modelcxx . . $ HUD_color_model.); |
| 484 | lev1->AddSubMenucxx . . $ IMenuItem#AddSubMenu(7cad07ba2f70ae18).(lev2); |
| 485 | |
| 486 | // lev2 = CreateMenuItemWArgs(TXT_GAMECONFIG,MIT_NORMAL,0,ShowGameConfigDialog); |
| 487 | // lev1->AddSubMenu(lev2); |
| 488 | |
| 489 | IMenuItemcxx . . $ IMenuItem# *MainMenu = DMFCBasecxx . . $ DMFCBase.->GetOnScreenMenucxx . . $ IDMFC#GetOnScreenMenu(8efbf9c7cdf9c614).(); |
| 490 | MainMenu->AddSubMenucxx . . $ IMenuItem#AddSubMenu(7cad07ba2f70ae18).(lev1); |
| 491 | |
| 492 | DMFCBasecxx . . $ DMFCBase.->GameInitcxx . . $ IDMFC#GameInit(d4f767463ce0a6b3).(teams); |
| 493 | } |
| 494 | |
| 495 | void OnPrintScorescxx . . $ OnPrintScores(d4f767463ce0a6b3).(int level) { |
| 496 | char buffer[256]; |
| 497 | char name[50]; |
| 498 | memset(buffer, ' ', 256); |
| 499 | |
| 500 | size_t t; |
| 501 | size_t pos[6]; |
| 502 | size_t len[6]; |
| 503 | pos[0] = 0; |
| 504 | t = len[0] = 20; // give ample room for pilot name |
| 505 | pos[1] = pos[0] + t + 1; |
| 506 | t = len[1] = strlen(TXT_POINTScxx . . $ `netgames/hoard/hoardstr.h:53:9`!); |
| 507 | pos[2] = pos[1] + t + 1; |
| 508 | t = len[2] = strlen(TXT_KILLScxx . . $ `netgames/hoard/hoardstr.h:56:9`!); |
| 509 | pos[3] = pos[2] + t + 1; |
| 510 | t = len[3] = strlen(TXT_DEATHScxx . . $ `netgames/hoard/hoardstr.h:57:9`!); |
| 511 | pos[4] = pos[3] + t + 1; |
| 512 | t = len[4] = strlen(TXT_SUICIDEScxx . . $ `netgames/hoard/hoardstr.h:58:9`!); |
| 513 | pos[5] = pos[4] + t + 1; |
| 514 | t = len[5] = strlen(TXT_PINGcxx . . $ `netgames/hoard/hoardstr.h:65:9`!); |
| 515 | |
| 516 | memcpy(&buffer[pos[0]], TXT_PILOTcxx . . $ `netgames/hoard/hoardstr.h:51:9`!, strlen(TXT_PILOTcxx . . $ `netgames/hoard/hoardstr.h:51:9`!)); |
| 517 | memcpy(&buffer[pos[1]], TXT_POINTScxx . . $ `netgames/hoard/hoardstr.h:53:9`!, len[1]); |
| 518 | memcpy(&buffer[pos[2]], TXT_KILLScxx . . $ `netgames/hoard/hoardstr.h:56:9`!, len[2]); |
| 519 | memcpy(&buffer[pos[3]], TXT_DEATHScxx . . $ `netgames/hoard/hoardstr.h:57:9`!, len[3]); |
| 520 | memcpy(&buffer[pos[4]], TXT_SUICIDEScxx . . $ `netgames/hoard/hoardstr.h:58:9`!, len[4]); |
| 521 | memcpy(&buffer[pos[5]], TXT_PINGcxx . . $ `netgames/hoard/hoardstr.h:65:9`!, len[5]); |
| 522 | buffer[pos[5] + len[5] + 1] = '\n'; |
| 523 | buffer[pos[5] + len[5] + 2] = '\0'; |
| 524 | DPrintf(buffer); |
| 525 | |
| 526 | int slot; |
| 527 | player_recordcxx . . $ player_record# *pr; |
| 528 | int pcount; |
| 529 | |
| 530 | if (level < 0 || level >= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!) |
| 531 | pcount = MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; |
| 532 | else |
| 533 | pcount = level; |
| 534 | |
| 535 | int sortedplayers[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!]; |
| 536 | DMFCBasecxx . . $ DMFCBase.->GetSortedPlayerSlotscxx . . $ IDMFC#GetSortedPlayerSlots(621ccea12ecf5b06).(sortedplayers, MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!); |
| 537 | |
| 538 | for (int i = 0; i < pcount; i++) { |
| 539 | slot = sortedplayers[i]; |
| 540 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(slot); |
| 541 | if ((pr) && (pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.)) { |
| 542 | |
| 543 | if (DMFCBasecxx . . $ DMFCBase.->IsPlayerDedicatedServercxx . . $ IDMFC#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(pr)) |
| 544 | continue; // skip dedicated server |
| 545 | |
| 546 | snprintf(name, sizeof(name), "%s%s:", (pr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) ? "*" : "", pr->callsigncxx . . $ player_record#callsign.); |
| 547 | name[19] = '\0'; |
| 548 | |
| 549 | tPlayerStatcxx . . $ tPlayerStat# *stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 550 | |
| 551 | memset(buffer, ' ', 256); |
| 552 | t = strlen(name); |
| 553 | memcpy(&buffer[pos[0]], name, (t < len[0]) ? t : len[0]); |
| 554 | snprintf(name, sizeof(name), "%d[%d]", (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0, |
| 555 | (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] : 0); |
| 556 | t = strlen(name); |
| 557 | memcpy(&buffer[pos[1]], name, (t < len[1]) ? t : len[1]); |
| 558 | snprintf(name, sizeof(name), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 559 | t = strlen(name); |
| 560 | memcpy(&buffer[pos[2]], name, (t < len[2]) ? t : len[2]); |
| 561 | snprintf(name, sizeof(name), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 562 | t = strlen(name); |
| 563 | memcpy(&buffer[pos[3]], name, (t < len[3]) ? t : len[3]); |
| 564 | snprintf(name, sizeof(name), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 565 | t = strlen(name); |
| 566 | memcpy(&buffer[pos[4]], name, (t < len[4]) ? t : len[4]); |
| 567 | |
| 568 | if (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) |
| 569 | snprintf(name, sizeof(name), "%.0f", (DMFCBasecxx . . $ DMFCBase.->GetNetPlayerscxx . . $ IDMFC#GetNetPlayers(d09959b2d64446dd).())[pr->pnumcxx . . $ player_record#pnum.].ping_timecxx . . $ netplayer#ping_time. * 1000.0f); |
| 570 | else |
| 571 | strcpy(name, "---"); |
| 572 | t = strlen(name); |
| 573 | memcpy(&buffer[pos[5]], name, (t < len[5]) ? t : len[5]); |
| 574 | buffer[pos[5] + len[5] + 1] = '\n'; |
| 575 | buffer[pos[5] + len[5] + 2] = '\0'; |
| 576 | DPrintf(buffer); |
| 577 | } |
| 578 | } |
| 579 | } |
| 580 | |
| 581 | void OnHUDIntervalcxx . . $ OnHUDInterval(49f6e7a06ebc5aa8).(void) { |
| 582 | dstatcxx . . $ dstat.->DoFramecxx . . $ IDmfcStats#DoFrame(49f6e7a06ebc5aa8).(); |
| 583 | DMFCBasecxx . . $ DMFCBase.->DisplayOutrageLogocxx . . $ IDMFC#DisplayOutrageLogo(49f6e7a06ebc5aa8).(); |
| 584 | |
| 585 | DMFCBasecxx . . $ DMFCBase.->OnHUDIntervalcxx . . $ IDMFC#OnHUDInterval(49f6e7a06ebc5aa8).(); |
| 586 | } |
| 587 | |
| 588 | void OnIntervalcxx . . $ OnInterval(49f6e7a06ebc5aa8).(void) { |
| 589 | SortPlayerScorescxx . . $ SortPlayerScores(621ccea12ecf5b06).(SortedPlayerscxx . . $ SortedPlayers., MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!); |
| 590 | DMFCBasecxx . . $ DMFCBase.->OnIntervalcxx . . $ IDMFC#OnInterval(49f6e7a06ebc5aa8).(); |
| 591 | } |
| 592 | |
| 593 | void OnKeypresscxx . . $ OnKeypress(d4f767463ce0a6b3).(int key) { |
| 594 | dllinfocxx . . $ dllinfo# *Data = DMFCBasecxx . . $ DMFCBase.->GetDLLInfoCallDatacxx . . $ IDMFC#GetDLLInfoCallData(4458c5bdce97a5c3).(); |
| 595 | |
| 596 | switch (key) { |
| 597 | case K_F7cxx . . $ `netgames/includes/DMFCKeyCodes.h:118:9`!: |
| 598 | DisplayScoreScreencxx . . $ DisplayScoreScreen. = !DisplayScoreScreencxx . . $ DisplayScoreScreen.; |
| 599 | DMFCBasecxx . . $ DMFCBase.->EnableOnScreenMenucxx . . $ IDMFC#EnableOnScreenMenu(b45ddcbc8423892c).(false); |
| 600 | dstatcxx . . $ dstat.->Enablecxx . . $ IDmfcStats#Enable(b45ddcbc8423892c).(DisplayScoreScreencxx . . $ DisplayScoreScreen.); |
| 601 | break; |
| 602 | case K_PAGEDOWNcxx . . $ `netgames/includes/DMFCKeyCodes.h:147:9`!: |
| 603 | if (DisplayScoreScreencxx . . $ DisplayScoreScreen.) { |
| 604 | dstatcxx . . $ dstat.->ScrollDowncxx . . $ IDmfcStats#ScrollDown(49f6e7a06ebc5aa8).(); |
| 605 | Data->iRetcxx . . $ dllinfo#$anonymous_type_0#iRet. = 1; |
| 606 | } |
| 607 | break; |
| 608 | case K_PAGEUPcxx . . $ `netgames/includes/DMFCKeyCodes.h:144:9`!: |
| 609 | if (DisplayScoreScreencxx . . $ DisplayScoreScreen.) { |
| 610 | dstatcxx . . $ dstat.->ScrollUpcxx . . $ IDmfcStats#ScrollUp(49f6e7a06ebc5aa8).(); |
| 611 | Data->iRetcxx . . $ dllinfo#$anonymous_type_0#iRet. = 1; |
| 612 | } |
| 613 | break; |
| 614 | case K_F6cxx . . $ `netgames/includes/DMFCKeyCodes.h:117:9`!: |
| 615 | DisplayScoreScreencxx . . $ DisplayScoreScreen. = false; |
| 616 | dstatcxx . . $ dstat.->Enablecxx . . $ IDmfcStats#Enable(b45ddcbc8423892c).(false); |
| 617 | break; |
| 618 | case K_ESCcxx . . $ `netgames/includes/DMFCKeyCodes.h:97:9`!: |
| 619 | if (DisplayScoreScreencxx . . $ DisplayScoreScreen.) { |
| 620 | dstatcxx . . $ dstat.->Enablecxx . . $ IDmfcStats#Enable(b45ddcbc8423892c).(false); |
| 621 | DisplayScoreScreencxx . . $ DisplayScoreScreen. = false; |
| 622 | Data->iRetcxx . . $ dllinfo#$anonymous_type_0#iRet. = 1; |
| 623 | } |
| 624 | break; |
| 625 | } |
| 626 | |
| 627 | DMFCBasecxx . . $ DMFCBase.->OnKeypresscxx . . $ IDMFC#OnKeypress(d4f767463ce0a6b3).(key); |
| 628 | } |
| 629 | |
| 630 | // The server has just started, so clear out all the stats and game info |
| 631 | void OnServerGameCreatedcxx . . $ OnServerGameCreated(49f6e7a06ebc5aa8).(void) { |
| 632 | DMFCBasecxx . . $ DMFCBase.->OnServerGameCreatedcxx . . $ IDMFC#OnServerGameCreated(49f6e7a06ebc5aa8).(); |
| 633 | player_recordcxx . . $ player_record# *pr; |
| 634 | tPlayerStatcxx . . $ tPlayerStat# *stat; |
| 635 | for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 636 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(i); |
| 637 | if (pr) |
| 638 | stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 639 | else |
| 640 | stat = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 641 | if (stat) { |
| 642 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 643 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] = 0; |
| 644 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 645 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] = 0; |
| 646 | } |
| 647 | } |
| 648 | } |
| 649 | |
| 650 | // The server has started a new level, so clear out level scores |
| 651 | void OnClientLevelStartcxx . . $ OnClientLevelStart(49f6e7a06ebc5aa8).(void) { |
| 652 | DMFCBasecxx . . $ DMFCBase.->OnClientLevelStartcxx . . $ IDMFC#OnClientLevelStart(49f6e7a06ebc5aa8).(); |
| 653 | player_recordcxx . . $ player_record# *pr; |
| 654 | tPlayerStatcxx . . $ tPlayerStat# *stat; |
| 655 | for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 656 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(i); |
| 657 | if (pr) |
| 658 | stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 659 | else |
| 660 | stat = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 661 | |
| 662 | if (stat) { |
| 663 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 664 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 665 | } |
| 666 | } |
| 667 | DMFCBasecxx . . $ DMFCBase.->RequestGameStatecxx . . $ IDMFC#RequestGameState(49f6e7a06ebc5aa8).(); |
| 668 | int grooms[4]; |
| 669 | grooms[0] = grooms[1] = grooms[2] = grooms[3] = DLLFindTextureName("GreenBase"); |
| 670 | DLLMultiPaintGoalRooms(grooms); |
| 671 | |
| 672 | // display the config dialog |
| 673 | if (!Config_displayedcxx . . $ Config_displayed. && DMFCBasecxx . . $ DMFCBase.->GetLocalRolecxx . . $ IDMFC#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 674 | DMFCBasecxx . . $ DMFCBase.->StartUIWindowcxx . . $ IDMFC#StartUIWindow(6ca3d68f5c5f0975).(HOARD_CONFIG_DLGcxx . . $ `netgames/hoard/hoard.cpp:84:9`!, &configcxx . . $ config.); |
| 675 | Config_displayedcxx . . $ Config_displayed. = true; |
| 676 | } |
| 677 | } |
| 678 | |
| 679 | void OnClientShowUIcxx . . $ OnClientShowUI(6ca3d68f5c5f0975).(int id, void *user_data) { |
| 680 | if (id == HOARD_CONFIG_DLGcxx . . $ `netgames/hoard/hoard.cpp:84:9`!) |
| 681 | DisplayHoardConfigDialogcxx . . $ DisplayHoardConfigDialog(666fb5f7c2d7194b).((tGameConfigcxx . . $ tGameConfig# *)user_data); |
| 682 | |
| 683 | if (id == 0xEEE1) { |
| 684 | // block off wait for players dialog |
| 685 | DisplayHoardConfigDialogcxx . . $ DisplayHoardConfigDialog(666fb5f7c2d7194b).(&configcxx . . $ config.); |
| 686 | return; |
| 687 | } |
| 688 | |
| 689 | DMFCBasecxx . . $ DMFCBase.->OnClientShowUIcxx . . $ IDMFC#OnClientShowUI(6ca3d68f5c5f0975).(id, user_data); |
| 690 | } |
| 691 | |
| 692 | void OnClientLevelEndcxx . . $ OnClientLevelEnd(49f6e7a06ebc5aa8).(void) { DMFCBasecxx . . $ DMFCBase.->OnClientLevelEndcxx . . $ IDMFC#OnClientLevelEnd(49f6e7a06ebc5aa8).(); } |
| 693 | |
| 694 | // We need to send all the inventory info out to the new player |
| 695 | void OnGameStateRequestcxx . . $ OnGameStateRequest(d4f767463ce0a6b3).(int player_num) { |
| 696 | SendHoardInvcxx . . $ SendHoardInv(d4f767463ce0a6b3).(player_num); |
| 697 | DMFCBasecxx . . $ DMFCBase.->OnGameStateRequestcxx . . $ IDMFC#OnGameStateRequest(d4f767463ce0a6b3).(player_num); |
| 698 | } |
| 699 | |
| 700 | // A new player has entered the game, zero there stats out |
| 701 | void OnPlayerConnectcxx . . $ OnPlayerConnect(d4f767463ce0a6b3).(int player_num) { |
| 702 | DMFCBasecxx . . $ DMFCBase.->OnPlayerConnectcxx . . $ IDMFC#OnPlayerConnect(d4f767463ce0a6b3).(player_num); |
| 703 | |
| 704 | tPlayerStatcxx . . $ tPlayerStat# *stat = (tPlayerStatcxx . . $ tPlayerStat# *)DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordDatacxx . . $ IDMFC#GetPlayerRecordData(d1680a912d714170).(player_num); |
| 705 | if (stat) { |
| 706 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 707 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] = 0; |
| 708 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = 0; |
| 709 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] = 0; |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | void OnServerPlayerChangeSegmentcxx . . $ OnServerPlayerChangeSegment(b1146eedae1e1d0b).(int player_num, int newseg, int oldseg) { |
| 714 | int g1, g2, g3, g4; |
| 715 | g1 = DLLGetGoalRoomForTeam(0); |
| 716 | g2 = DLLGetGoalRoomForTeam(1); |
| 717 | g3 = DLLGetGoalRoomForTeam(2); |
| 718 | g4 = DLLGetGoalRoomForTeam(3); |
| 719 | |
| 720 | int count = DLLInvCheckItem(player_num, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.); |
| 721 | |
| 722 | if ((count) && ((newseg == g1) || (newseg == g2) || (newseg == g3) || (newseg == g4))) { |
| 723 | |
| 724 | DMFCBasecxx . . $ DMFCBase.->CallClientEventcxx . . $ IDMFC#CallClientEvent(d7a7761809021567).(EVT_CLIENT_GAMEPLAYERCHANGESEGcxx . . $ `lib/d3events.h:97:9`!, DMFCBasecxx . . $ DMFCBase.->GetMeObjNumcxx . . $ IDMFC#GetMeObjNum(b126dc7c1de90089).(), DMFCBasecxx . . $ DMFCBase.->GetItObjNumcxx . . $ IDMFC#GetItObjNum(b126dc7c1de90089).(), -1); |
| 725 | DMFCBasecxx . . $ DMFCBase.->CallOnClientPlayerChangeSegmentcxx . . $ IDMFC#CallOnClientPlayerChangeSegment(b1146eedae1e1d0b).(player_num, newseg, oldseg); |
| 726 | } |
| 727 | DMFCBasecxx . . $ DMFCBase.->OnServerPlayerChangeSegmentcxx . . $ IDMFC#OnServerPlayerChangeSegment(b1146eedae1e1d0b).(player_num, newseg, oldseg); |
| 728 | } |
| 729 | |
| 730 | void OnClientPlayerChangeSegmentcxx . . $ OnClientPlayerChangeSegment(b1146eedae1e1d0b).(int player_num, int newseg, int oldseg) { |
| 731 | int score, count, i; |
| 732 | |
| 733 | count = DLLInvGetTypeIDCount(player_num, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.); |
| 734 | score = count; |
| 735 | |
| 736 | if (count < configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard.) { |
| 737 | if (player_num == DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()) |
| 738 | DLLAddHUDMessage(TXT_NEEDMOREOBScxx . . $ `netgames/hoard/hoardstr.h:70:9`!, configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard.); |
| 739 | return; |
| 740 | } |
| 741 | |
| 742 | for (i = 0; i < count; i++) { |
| 743 | score += i; |
| 744 | DLLInvRemove(player_num, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.); |
| 745 | } |
| 746 | |
| 747 | if (score == 0) |
| 748 | return; |
| 749 | |
| 750 | tPlayerStatcxx . . $ tPlayerStat# *stat; |
| 751 | stat = (tPlayerStatcxx . . $ tPlayerStat# *)DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordDatacxx . . $ IDMFC#GetPlayerRecordData(d1680a912d714170).(player_num); |
| 752 | |
| 753 | if (stat) { |
| 754 | // increment scores |
| 755 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] += score; |
| 756 | stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] += score; |
| 757 | if (stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] < score) |
| 758 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] = score; |
| 759 | if (stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] < score) |
| 760 | stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] = score; |
| 761 | } |
| 762 | |
| 763 | char buffer[100]; |
| 764 | if (score == 1) |
| 765 | snprintf(buffer, sizeof(buffer), TXT_SCOREONEcxx . . $ `netgames/hoard/hoardstr.h:47:9`!, dPlayerscxx . . $ dPlayers.[player_num].callsigncxx . . $ player#callsign., |
| 766 | (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0); |
| 767 | else |
| 768 | snprintf(buffer, sizeof(buffer), TXT_SCOREMULTIcxx . . $ `netgames/hoard/hoardstr.h:48:9`!, dPlayerscxx . . $ dPlayers.[player_num].callsigncxx . . $ player#callsign., score, |
| 769 | (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0); |
| 770 | int sound = DLLFindSoundName("PwrHoardScore"); |
| 771 | if (sound != -1) |
| 772 | DLLPlay3dSound(sound, &dObjectscxx . . $ dObjects.[dPlayerscxx . . $ dPlayers.[DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()].objnumcxx . . $ player#objnum.], 1, 0); |
| 773 | |
| 774 | // Set a Timer to display |
| 775 | if (WhoJustScoredTimercxx . . $ WhoJustScoredTimer. != -1) |
| 776 | DMFCBasecxx . . $ DMFCBase.->KillTimercxx . . $ IDMFC#KillTimer(d4f767463ce0a6b3).(WhoJustScoredTimercxx . . $ WhoJustScoredTimer.); |
| 777 | WhoJustScoredTimercxx . . $ WhoJustScoredTimer. = DMFCBasecxx . . $ DMFCBase.->SetTimerIntervalcxx . . $ IDMFC#SetTimerInterval(695c251031f3a34d).(OnTimercxx . . $ OnTimer(49f6e7a06ebc5aa8)., 0.5f, 5.0f, OnTimerKillcxx . . $ OnTimerKill(49f6e7a06ebc5aa8).); |
| 778 | WhoJustScoredcxx . . $ WhoJustScored. = player_num; |
| 779 | |
| 780 | // remove the balls |
| 781 | DLLPlayerSetRotatingBall(player_num, 0, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 782 | |
| 783 | DLLAddHUDMessage(buffer); |
| 784 | |
| 785 | if (DMFCBasecxx . . $ DMFCBase.->GetLocalRolecxx . . $ IDMFC#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 786 | // check the score to see if we hit the limit |
| 787 | if (DMFCBasecxx . . $ DMFCBase.->GetScoreLimitcxx . . $ IDMFC#GetScoreLimit(18a3c31ed0aa5760).(&score)) { |
| 788 | if (score <= ((stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0)) { |
| 789 | DLLmprintfcxx . . $ `netgames/includes/DMFC.h:343:9`!(0, "Score limit reached\n"); |
| 790 | DMFCBasecxx . . $ DMFCBase.->EndLevelcxx . . $ IDMFC#EndLevel(49f6e7a06ebc5aa8).(); |
| 791 | } |
| 792 | } |
| 793 | } |
| 794 | DMFCBasecxx . . $ DMFCBase.->OnClientPlayerChangeSegmentcxx . . $ IDMFC#OnClientPlayerChangeSegment(b1146eedae1e1d0b).(player_num, newseg, oldseg); |
| 795 | } |
| 796 | |
| 797 | // A new player has entered the game, zero there stats out |
| 798 | void OnClientPlayerEntersGamecxx . . $ OnClientPlayerEntersGame(d4f767463ce0a6b3).(int player_num) { |
| 799 | DMFCBasecxx . . $ DMFCBase.->OnClientPlayerEntersGamecxx . . $ IDMFC#OnClientPlayerEntersGame(d4f767463ce0a6b3).(player_num); |
| 800 | if (player_num != DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()) |
| 801 | DisplayWelcomeMessagecxx . . $ DisplayWelcomeMessage(d4f767463ce0a6b3).(player_num); |
| 802 | else |
| 803 | display_my_welcomecxx . . $ display_my_welcome. = true; |
| 804 | } |
| 805 | |
| 806 | void OnServerCollidecxx . . $ OnServerCollide(6273fa812ac58a8).(objectcxx . . $ object# *me_obj, objectcxx . . $ object# *it_obj) { |
| 807 | // see if we need to send this event to the clients |
| 808 | // only if me==player it==hoard powerup |
| 809 | |
| 810 | if (!me_obj || !it_obj) { |
| 811 | DMFCBasecxx . . $ DMFCBase.->OnServerCollidecxx . . $ IDMFC#OnServerCollide(6273fa812ac58a8).(me_obj, it_obj); |
| 812 | return; |
| 813 | } |
| 814 | |
| 815 | if ((me_obj->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) && (it_obj->typecxx . . $ object#type. == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) && (it_obj->idcxx . . $ object#id. == HoardIDcxx . . $ HoardID.)) { |
| 816 | // check to make sure the player isn't dying or dead |
| 817 | playercxx . . $ player# *plyr_ptr = &dPlayerscxx . . $ dPlayers.[me_obj->idcxx . . $ object#id.]; |
| 818 | if ((plyr_ptr->flagscxx . . $ player#flags. & PLAYER_FLAGS_DYINGcxx . . $ `Descent3/player_external.h:80:9`!) || (plyr_ptr->flagscxx . . $ player#flags. & PLAYER_FLAGS_DEADcxx . . $ `Descent3/player_external.h:81:9`!)) { |
| 819 | // this player is dying or dead...ignore it |
| 820 | DMFCBasecxx . . $ DMFCBase.->OnServerCollidecxx . . $ IDMFC#OnServerCollide(6273fa812ac58a8).(me_obj, it_obj); |
| 821 | return; |
| 822 | } |
| 823 | |
| 824 | DMFCBasecxx . . $ DMFCBase.->CallClientEventcxx . . $ IDMFC#CallClientEvent(d7a7761809021567).(EVT_CLIENT_GAMECOLLIDEcxx . . $ `lib/d3events.h:95:9`!, DMFCBasecxx . . $ DMFCBase.->GetMeObjNumcxx . . $ IDMFC#GetMeObjNum(b126dc7c1de90089).(), DMFCBasecxx . . $ DMFCBase.->GetItObjNumcxx . . $ IDMFC#GetItObjNum(b126dc7c1de90089).(), -1); |
| 825 | DMFCBasecxx . . $ DMFCBase.->CallOnClientCollidecxx . . $ IDMFC#CallOnClientCollide(6273fa812ac58a8).(me_obj, it_obj); |
| 826 | |
| 827 | // test to see if they are in a goal room, if so score |
| 828 | int current_room = me_obj->roomnumcxx . . $ object#roomnum.; |
| 829 | int g1, g2, g3, g4; |
| 830 | g1 = DLLGetGoalRoomForTeam(0); |
| 831 | g2 = DLLGetGoalRoomForTeam(1); |
| 832 | g3 = DLLGetGoalRoomForTeam(2); |
| 833 | g4 = DLLGetGoalRoomForTeam(3); |
| 834 | |
| 835 | if ((current_room == g1) || (current_room == g2) || (current_room == g3) || (current_room == g4)) { |
| 836 | DMFCBasecxx . . $ DMFCBase.->CallClientEventcxx . . $ IDMFC#CallClientEvent(d7a7761809021567).(EVT_CLIENT_GAMEPLAYERCHANGESEGcxx . . $ `lib/d3events.h:97:9`!, DMFCBasecxx . . $ DMFCBase.->GetMeObjNumcxx . . $ IDMFC#GetMeObjNum(b126dc7c1de90089).(), DMFCBasecxx . . $ DMFCBase.->GetItObjNumcxx . . $ IDMFC#GetItObjNum(b126dc7c1de90089).(), -1); |
| 837 | DMFCBasecxx . . $ DMFCBase.->CallOnClientPlayerChangeSegmentcxx . . $ IDMFC#CallOnClientPlayerChangeSegment(b1146eedae1e1d0b).(me_obj->idcxx . . $ object#id., current_room, current_room); |
| 838 | } |
| 839 | } |
| 840 | DMFCBasecxx . . $ DMFCBase.->OnServerCollidecxx . . $ IDMFC#OnServerCollide(6273fa812ac58a8).(me_obj, it_obj); |
| 841 | } |
| 842 | |
| 843 | void OnClientCollidecxx . . $ OnClientCollide(6273fa812ac58a8).(objectcxx . . $ object# *me_obj, objectcxx . . $ object# *it_obj) { |
| 844 | int playernum = me_obj->idcxx . . $ object#id.; |
| 845 | int count = DLLInvGetTypeIDCount(playernum, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.); |
| 846 | |
| 847 | if (count < 12) { |
| 848 | if (DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).() == playernum) { |
| 849 | DLLAddHUDMessage(TXT_GOTHOARDcxx . . $ `netgames/hoard/hoardstr.h:49:9`!); |
| 850 | } |
| 851 | int sound = DLLFindSoundName("PwrHoardPickup"); |
| 852 | if (sound != -1) |
| 853 | DLLPlay3dSound(sound, me_obj, 1, 0); |
| 854 | if (it_obj->typecxx . . $ object#type. == OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!) { |
| 855 | DLLInvAddTypeID(playernum, it_obj->typecxx . . $ object#type., it_obj->idcxx . . $ object#id., -1, -1, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 856 | if (DMFCBasecxx . . $ DMFCBase.->GetLocalRolecxx . . $ IDMFC#GetLocalRole(b126dc7c1de90089).() == LR_SERVERcxx . . $ `Descent3/multi_external.h:129:9`!) { |
| 857 | DLLSetObjectDeadFlag(it_obj, true, false); |
| 858 | } |
| 859 | } else |
| 860 | DLLmprintfcxx . . $ `netgames/includes/DMFC.h:343:9`!(0, "HOARD BIG WARNING: TRYING TO ADD NONPOWERUP TO INVENTORY! (%d)\n", it_obj->type); |
| 861 | |
| 862 | // add rotating balls if necessary |
| 863 | DoBallsEffectcxx . . $ DoBallsEffect(3e454b8ccf442868).(playernum, count + 1); |
| 864 | } else { |
| 865 | // they have max orbs |
| 866 | if (DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).() == playernum) { |
| 867 | DLLAddHUDMessage(TXT_MAXHOARDScxx . . $ `netgames/hoard/hoardstr.h:50:9`!); |
| 868 | } |
| 869 | } |
| 870 | DMFCBasecxx . . $ DMFCBase.->OnClientCollidecxx . . $ IDMFC#OnClientCollide(6273fa812ac58a8).(me_obj, it_obj); |
| 871 | } |
| 872 | |
| 873 | // used for the clients when a player dies, to print out a message and other stuff |
| 874 | void OnClientPlayerKilledcxx . . $ OnClientPlayerKilled(766a1b7183ffa4b4).(objectcxx . . $ object# *killer_obj, int victim_pnum) { |
| 875 | int kpnum = -1; |
| 876 | |
| 877 | if (killer_obj) { |
| 878 | if ((killer_obj->typecxx . . $ object#type. == OBJ_PLAYERcxx . . $ `Descent3/object_external.h:164:9`!) || (killer_obj->typecxx . . $ object#type. == OBJ_GHOSTcxx . . $ `Descent3/object_external.h:172:9`!)) |
| 879 | kpnum = killer_obj->idcxx . . $ object#id.; |
| 880 | else if (killer_obj->typecxx . . $ object#type. == OBJ_ROBOTcxx . . $ `Descent3/object_external.h:162:9`!) { |
| 881 | // countermeasure kill |
| 882 | kpnum = DMFCBasecxx . . $ DMFCBase.->GetCounterMeasureOwnercxx . . $ IDMFC#GetCounterMeasureOwner(2da2a862cad4c994).(killer_obj); |
| 883 | } else { |
| 884 | kpnum = -1; |
| 885 | } |
| 886 | } else |
| 887 | kpnum = -1; |
| 888 | |
| 889 | // add an extra hoard to the inventory if they didn't kill themselves |
| 890 | if (kpnum != victim_pnum) { |
| 891 | DLLInvAddTypeID(victim_pnum, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID., -1, -1, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 892 | } |
| 893 | |
| 894 | // remove the balls |
| 895 | DLLPlayerSetRotatingBall(victim_pnum, 0, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 896 | |
| 897 | DMFCBasecxx . . $ DMFCBase.->OnClientPlayerKilledcxx . . $ IDMFC#OnClientPlayerKilled(766a1b7183ffa4b4).(killer_obj, victim_pnum); |
| 898 | } |
| 899 | |
| 900 | bool compare_slotscxx . . $ compare_slots(cf9ef193275fa6d8).(int a, int b) { |
| 901 | int ascore, bscore; |
| 902 | player_recordcxx . . $ player_record# *apr, *bpr; |
| 903 | tPlayerStatcxx . . $ tPlayerStat# *astat, *bstat; |
| 904 | |
| 905 | apr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(a); |
| 906 | bpr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(b); |
| 907 | if (!apr) |
| 908 | return true; |
| 909 | if (!bpr) |
| 910 | return false; |
| 911 | if (apr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.) |
| 912 | return true; |
| 913 | if (bpr->statecxx . . $ player_record#state. == STATE_EMPTYcxx . . $ STATE_EMPTY.) |
| 914 | return false; |
| 915 | astat = (tPlayerStatcxx . . $ tPlayerStat# *)apr->user_infocxx . . $ player_record#user_info.; |
| 916 | bstat = (tPlayerStatcxx . . $ tPlayerStat# *)bpr->user_infocxx . . $ player_record#user_info.; |
| 917 | |
| 918 | if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) { |
| 919 | // both players were in the game |
| 920 | ascore = (astat) ? astat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0; |
| 921 | bscore = (bstat) ? bstat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0; |
| 922 | return (ascore < bscore); |
| 923 | } |
| 924 | if ((apr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) && (bpr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.)) { |
| 925 | // apr gets priority since he was in the game on exit |
| 926 | return false; |
| 927 | } |
| 928 | if ((apr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) && (bpr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.)) { |
| 929 | // bpr gets priority since he was in the game on exit |
| 930 | return true; |
| 931 | } |
| 932 | // if we got here then both players were disconnected |
| 933 | ascore = (astat) ? astat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0; |
| 934 | bscore = (bstat) ? bstat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0; |
| 935 | return (ascore < bscore); |
| 936 | } |
| 937 | void OnPLRInitcxx . . $ OnPLRInit(49f6e7a06ebc5aa8).(void) { |
| 938 | int i, t, j; |
| 939 | |
| 940 | for (i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 941 | SortedPlayerscxx . . $ SortedPlayers.[i] = i; |
| 942 | } |
| 943 | |
| 944 | for (i = 1; i <= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! - 1; i++) { |
| 945 | t = SortedPlayerscxx . . $ SortedPlayers.[i]; |
| 946 | // Shift elements down until |
| 947 | // insertion point found. |
| 948 | for (j = i - 1; j >= 0 && compare_slotscxx . . $ compare_slots(cf9ef193275fa6d8).(SortedPlayerscxx . . $ SortedPlayers.[j], t); j--) { |
| 949 | SortedPlayerscxx . . $ SortedPlayers.[j + 1] = SortedPlayerscxx . . $ SortedPlayers.[j]; |
| 950 | } |
| 951 | // insert |
| 952 | SortedPlayerscxx . . $ SortedPlayers.[j + 1] = t; |
| 953 | } |
| 954 | |
| 955 | DMFCBasecxx . . $ DMFCBase.->OnPLRInitcxx . . $ IDMFC#OnPLRInit(49f6e7a06ebc5aa8).(); |
| 956 | } |
| 957 | |
| 958 | void OnPLRIntervalcxx . . $ OnPLRInterval(49f6e7a06ebc5aa8).(void) { |
| 959 | #define PLAYERS_COLcxx . . $ `netgames/hoard/hoard.cpp:959:9`! 100 |
| 960 | #define SCORE_COLcxx . . $ `netgames/hoard/hoard.cpp:960:9`! 200 |
| 961 | #define HIGH_COLcxx . . $ `netgames/hoard/hoard.cpp:961:9`! 260 |
| 962 | #define KILLS_COLcxx . . $ `netgames/hoard/hoard.cpp:962:9`! 320 |
| 963 | #define DEATHS_COLcxx . . $ `netgames/hoard/hoard.cpp:963:9`! 380 |
| 964 | #define SUICIDES_COLcxx . . $ `netgames/hoard/hoard.cpp:964:9`! 440 |
| 965 | |
| 966 | DMFCBasecxx . . $ DMFCBase.->OnPLRIntervalcxx . . $ IDMFC#OnPLRInterval(49f6e7a06ebc5aa8).(); |
| 967 | |
| 968 | int y = 40; |
| 969 | int height = DLLgrfont_GetHeight((DMFCBasecxx . . $ DMFCBase.->GetGameFontTranslateArraycxx . . $ IDMFC#GetGameFontTranslateArray(a7741f82f5fc3640).())[SMALL_UI_FONT_INDEXcxx . . $ `Descent3/gamefont.h:99:9`!]) + 1; |
| 970 | |
| 971 | DLLgrtext_SetFont((DMFCBasecxx . . $ DMFCBase.->GetGameFontTranslateArraycxx . . $ IDMFC#GetGameFontTranslateArray(a7741f82f5fc3640).())[SMALL_UI_FONT_INDEXcxx . . $ `Descent3/gamefont.h:99:9`!]); |
| 972 | |
| 973 | // print out header |
| 974 | DLLgrtext_SetColor(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(255, 255, 150)); |
| 975 | DLLgrtext_Printf(PLAYERS_COLcxx . . $ `netgames/hoard/hoard.cpp:959:9`!, y, TXT_PILOTcxx . . $ `netgames/hoard/hoardstr.h:51:9`!); |
| 976 | DLLgrtext_Printf(SCORE_COLcxx . . $ `netgames/hoard/hoard.cpp:960:9`!, y, TXT_LEVELcxx . . $ `netgames/hoard/hoardstr.h:52:9`!); |
| 977 | DLLgrtext_Printf(SCORE_COLcxx . . $ `netgames/hoard/hoard.cpp:960:9`!, y + height, TXT_POINTScxx . . $ `netgames/hoard/hoardstr.h:53:9`!); |
| 978 | DLLgrtext_Printf(HIGH_COLcxx . . $ `netgames/hoard/hoard.cpp:961:9`!, y, TXT_HIGHcxx . . $ `netgames/hoard/hoardstr.h:54:9`!); |
| 979 | DLLgrtext_Printf(HIGH_COLcxx . . $ `netgames/hoard/hoard.cpp:961:9`!, y + height, TXT_GOALcxx . . $ `netgames/hoard/hoardstr.h:55:9`!); |
| 980 | DLLgrtext_Printf(KILLS_COLcxx . . $ `netgames/hoard/hoard.cpp:962:9`!, y, TXT_KILLScxx . . $ `netgames/hoard/hoardstr.h:56:9`!); |
| 981 | DLLgrtext_Printf(DEATHS_COLcxx . . $ `netgames/hoard/hoard.cpp:963:9`!, y, TXT_DEATHScxx . . $ `netgames/hoard/hoardstr.h:57:9`!); |
| 982 | DLLgrtext_Printf(SUICIDES_COLcxx . . $ `netgames/hoard/hoard.cpp:964:9`!, y, TXT_SUICIDEScxx . . $ `netgames/hoard/hoardstr.h:58:9`!); |
| 983 | y += (2 * height); |
| 984 | |
| 985 | // print out player stats |
| 986 | int rank = 1; |
| 987 | int slot; |
| 988 | player_recordcxx . . $ player_record# *pr; |
| 989 | tPlayerStatcxx . . $ tPlayerStat# *stat; |
| 990 | |
| 991 | for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 992 | slot = SortedPlayerscxx . . $ SortedPlayers.[i]; |
| 993 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(slot); |
| 994 | if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) { |
| 995 | |
| 996 | if (DMFCBasecxx . . $ DMFCBase.->IsPlayerDedicatedServercxx . . $ IDMFC#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(pr)) |
| 997 | continue; // skip dedicated server |
| 998 | |
| 999 | int pnum = DMFCBasecxx . . $ DMFCBase.->WasPlayerInGameAtLevelEndcxx . . $ IDMFC#WasPlayerInGameAtLevelEnd(7864480464b09eea).(slot); |
| 1000 | if (pnum != -1) { |
| 1001 | DLLgrtext_SetColor((DMFCBasecxx . . $ DMFCBase.->GetPlayerColorscxx . . $ IDMFC#GetPlayerColors(ac695d451f96e4aa).())[pnum]); |
| 1002 | } else { |
| 1003 | DLLgrtext_SetColor(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(128, 128, 128)); |
| 1004 | } |
| 1005 | |
| 1006 | stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 1007 | |
| 1008 | DLLgrtext_Printf(PLAYERS_COLcxx . . $ `netgames/hoard/hoard.cpp:959:9`!, y, "%d)%s", rank, pr->callsigncxx . . $ player_record#callsign.); |
| 1009 | DLLgrtext_Printf(SCORE_COLcxx . . $ `netgames/hoard/hoard.cpp:960:9`!, y, "%d[%d]", (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0, |
| 1010 | (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] : 0); |
| 1011 | DLLgrtext_Printf(HIGH_COLcxx . . $ `netgames/hoard/hoard.cpp:961:9`!, y, "%d[%d]", (stat) ? stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0, |
| 1012 | (stat) ? stat->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!] : 0); |
| 1013 | DLLgrtext_Printf(KILLS_COLcxx . . $ `netgames/hoard/hoard.cpp:962:9`!, y, "%d[%d]", pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1014 | DLLgrtext_Printf(DEATHS_COLcxx . . $ `netgames/hoard/hoard.cpp:963:9`!, y, "%d[%d]", pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1015 | DLLgrtext_Printf(SUICIDES_COLcxx . . $ `netgames/hoard/hoard.cpp:964:9`!, y, "%d[%d]", pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1016 | |
| 1017 | y += height; |
| 1018 | rank++; |
| 1019 | |
| 1020 | if (y >= 440) |
| 1021 | goto quick_exit; |
| 1022 | } |
| 1023 | } |
| 1024 | |
| 1025 | quick_exit:; |
| 1026 | } |
| 1027 | |
| 1028 | void SaveStatsToFilecxx . . $ SaveStatsToFile(fda57c8427c60377).(char *filename) { |
| 1029 | CFILEcxx . . $ CFILE# *file; |
| 1030 | DLLOpenCFILE(&file, filenamecxx . . $ std/filesystem/__cxx11/path#path(835bc3a16b770d4d)., "wt"); |
| 1031 | if (!file) { |
| 1032 | DLLmprintfcxx . . $ `netgames/includes/DMFC.h:343:9`!(0, "Unable to open output file\n"); |
| 1033 | return; |
| 1034 | } |
| 1035 | |
| 1036 | // write out game stats |
| 1037 | #define BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`! 150 |
| 1038 | char buffer[BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!]; |
| 1039 | char tempbuffer[25]; |
| 1040 | int sortedslots[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!]; |
| 1041 | player_recordcxx . . $ player_record# *pr, *dpr; |
| 1042 | tPInfoStatcxx . . $ tPInfoStat# stat; |
| 1043 | tPlayerStatcxx . . $ tPlayerStat# *ps; |
| 1044 | int count, p; |
| 1045 | |
| 1046 | // sort the stats |
| 1047 | SortPlayerScorescxx . . $ SortPlayerScores(621ccea12ecf5b06).(sortedslots, MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!); |
| 1048 | count = 1; |
| 1049 | |
| 1050 | snprintf(buffer, sizeof(buffer), TXT_STATSSAVEAcxx . . $ `netgames/hoard/hoardstr.h:71:9`!, (DMFCBasecxx . . $ DMFCBase.->GetNetgameInfocxx . . $ IDMFC#GetNetgameInfo(242e78cd5130aa12).())->namecxx . . $ netgame_info#name., |
| 1051 | (DMFCBasecxx . . $ DMFCBase.->GetCurrentMissioncxx . . $ IDMFC#GetCurrentMission(d7a4f7ca6f9cb411).())->cur_levelcxx . . $ tMission#cur_level.); |
| 1052 | DLLcf_WriteString(file, buffer); |
| 1053 | |
| 1054 | snprintf(buffer, sizeof(buffer), "%s", TXT_SAVESTATSBcxx . . $ `netgames/hoard/hoardstr.h:72:9`!); |
| 1055 | DLLcf_WriteString(file, buffer); |
| 1056 | |
| 1057 | snprintf(buffer, sizeof(buffer), "%s", TXT_SAVESTATSCcxx . . $ `netgames/hoard/hoardstr.h:73:9`!); |
| 1058 | DLLcf_WriteString(file, buffer); |
| 1059 | strcpy( |
| 1060 | buffer, |
| 1061 | "-------------------------------------------------------------------------------------------------------------"); |
| 1062 | DLLcf_WriteString(file, buffer); |
| 1063 | |
| 1064 | for (p = 0; p < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; p++) { |
| 1065 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(sortedslots[p]); |
| 1066 | if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) { |
| 1067 | |
| 1068 | if (DMFCBasecxx . . $ DMFCBase.->IsPlayerDedicatedServercxx . . $ IDMFC#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(pr)) |
| 1069 | continue; // skip dedicated server |
| 1070 | |
| 1071 | memset(buffer, ' ', BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!); |
| 1072 | |
| 1073 | ps = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 1074 | |
| 1075 | snprintf(tempbuffer, sizeof(tempbuffer), "%d)", count); |
| 1076 | memcpy(&buffer[0], tempbuffer, strlen(tempbuffer)); |
| 1077 | |
| 1078 | snprintf(tempbuffer, sizeof(tempbuffer), "%s%s", (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) ? "" : "*", pr->callsigncxx . . $ player_record#callsign.); |
| 1079 | memcpy(&buffer[7], tempbuffer, strlen(tempbuffer)); |
| 1080 | |
| 1081 | if (ps) { |
| 1082 | snprintf(tempbuffer, sizeof(tempbuffer), "%d[%d]", ps->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], ps->Scorecxx . . $ tPlayerStat#Score.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1083 | memcpy(&buffer[35], tempbuffer, strlen(tempbuffer)); |
| 1084 | } |
| 1085 | |
| 1086 | snprintf(tempbuffer, sizeof(tempbuffer), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], |
| 1087 | pr->dstatscxx . . $ player_record#dstats..killscxx . . $ t_dstat#kills.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1088 | memcpy(&buffer[47], tempbuffer, strlen(tempbuffer)); |
| 1089 | |
| 1090 | snprintf(tempbuffer, sizeof(tempbuffer), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], |
| 1091 | pr->dstatscxx . . $ player_record#dstats..deathscxx . . $ t_dstat#deaths.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1092 | memcpy(&buffer[59], tempbuffer, strlen(tempbuffer)); |
| 1093 | |
| 1094 | snprintf(tempbuffer, sizeof(tempbuffer), "%d[%d]", pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], |
| 1095 | pr->dstatscxx . . $ player_record#dstats..suicidescxx . . $ t_dstat#suicides.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1096 | memcpy(&buffer[70], tempbuffer, strlen(tempbuffer)); |
| 1097 | |
| 1098 | if (ps) { |
| 1099 | snprintf(tempbuffer, sizeof(tempbuffer), "%d[%d]", ps->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!], |
| 1100 | ps->HighestScorecxx . . $ tPlayerStat#HighestScore.[DSTAT_OVERALLcxx . . $ `netgames/includes/DMFC.h:528:9`!]); |
| 1101 | memcpy(&buffer[81], tempbuffer, strlen(tempbuffer)); |
| 1102 | } |
| 1103 | |
| 1104 | snprintf(tempbuffer, sizeof(tempbuffer), "%s", DMFCBasecxx . . $ DMFCBase.->GetTimeStringcxx . . $ IDMFC#GetTimeString(3b344d7a46e3c2ff).(DMFCBasecxx . . $ DMFCBase.->GetTimeInGamecxx . . $ IDMFC#GetTimeInGame(5cde91ea12d43f46).(sortedslots[p]))); |
| 1105 | memcpy(&buffer[96], tempbuffer, strlen(tempbuffer)); |
| 1106 | |
| 1107 | size_t pos = 96 + strlen(tempbuffer) + 1; |
| 1108 | |
| 1109 | if (pos < BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!) |
| 1110 | buffer[pos] = '\0'; |
| 1111 | |
| 1112 | buffer[BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`! - 1] = '\0'; |
| 1113 | DLLcf_WriteString(file, buffer); |
| 1114 | count++; |
| 1115 | } |
| 1116 | } |
| 1117 | |
| 1118 | DLLcf_WriteString(file, TXT_SAVESTATSDcxx . . $ `netgames/hoard/hoardstr.h:76:9`!); |
| 1119 | |
| 1120 | count = 1; |
| 1121 | for (p = 0; p < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; p++) { |
| 1122 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(p); |
| 1123 | if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) { |
| 1124 | |
| 1125 | if (DMFCBasecxx . . $ DMFCBase.->IsPlayerDedicatedServercxx . . $ IDMFC#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(pr)) |
| 1126 | continue; // skip dedicated server |
| 1127 | |
| 1128 | // Write out header |
| 1129 | snprintf(buffer, sizeof(buffer), "%d) %s%s", count, (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME.) ? "" : "*", pr->callsigncxx . . $ player_record#callsign.); |
| 1130 | DLLcf_WriteString(file, buffer); |
| 1131 | size_t length = strlen(buffer); |
| 1132 | memset(buffer, '=', length); |
| 1133 | buffer[length] = '\0'; |
| 1134 | DLLcf_WriteString(file, buffer); |
| 1135 | |
| 1136 | // time in game |
| 1137 | snprintf(buffer, sizeof(buffer), TXT_TIMEINGAMEcxx . . $ `netgames/hoard/hoardstr.h:77:9`!, DMFCBasecxx . . $ DMFCBase.->GetTimeStringcxx . . $ IDMFC#GetTimeString(3b344d7a46e3c2ff).(DMFCBasecxx . . $ DMFCBase.->GetTimeInGamecxx . . $ IDMFC#GetTimeInGame(5cde91ea12d43f46).(p))); |
| 1138 | DLLcf_WriteString(file, buffer); |
| 1139 | |
| 1140 | if (DMFCBasecxx . . $ DMFCBase.->FindPInfoStatFirstcxx . . $ IDMFC#FindPInfoStatFirst(e8124cb919632806).(p, &stat)) { |
| 1141 | snprintf(buffer, sizeof(buffer), "%s", TXT_SAVESTATSEcxx . . $ `netgames/hoard/hoardstr.h:78:9`!); |
| 1142 | DLLcf_WriteString(file, buffer); |
| 1143 | |
| 1144 | if (stat.slotcxx . . $ tPInfoStat#slot. != p) { |
| 1145 | memset(buffer, ' ', BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!); |
| 1146 | dpr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(stat.slotcxx . . $ tPInfoStat#slot.); |
| 1147 | |
| 1148 | if (dpr) { |
| 1149 | snprintf(tempbuffer, sizeof(tempbuffer), "%s", dpr->callsigncxx . . $ player_record#callsign.); |
| 1150 | memcpy(buffer, tempbuffer, strlen(tempbuffer)); |
| 1151 | |
| 1152 | snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.killscxx . . $ tPInfoStat#kills.); |
| 1153 | memcpy(&buffer[30], tempbuffer, strlen(tempbuffer)); |
| 1154 | |
| 1155 | snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.deathscxx . . $ tPInfoStat#deaths.); |
| 1156 | memcpy(&buffer[40], tempbuffer, strlen(tempbuffer)); |
| 1157 | |
| 1158 | size_t pos = 40 + strlen(tempbuffer) + 1; |
| 1159 | if (pos < BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!) |
| 1160 | buffer[pos] = '\0'; |
| 1161 | |
| 1162 | buffer[BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`! - 1] = '\0'; |
| 1163 | DLLcf_WriteString(file, buffer); |
| 1164 | } |
| 1165 | } |
| 1166 | |
| 1167 | while (DMFCBasecxx . . $ DMFCBase.->FindPInfoStatNextcxx . . $ IDMFC#FindPInfoStatNext(4ead3766c292904).(&stat)) { |
| 1168 | if (stat.slotcxx . . $ tPInfoStat#slot. != p) { |
| 1169 | memset(buffer, ' ', BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!); |
| 1170 | dpr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(stat.slotcxx . . $ tPInfoStat#slot.); |
| 1171 | if (dpr) { |
| 1172 | snprintf(tempbuffer, sizeof(tempbuffer), "%s", dpr->callsigncxx . . $ player_record#callsign.); |
| 1173 | memcpy(buffer, tempbuffer, strlen(tempbuffer)); |
| 1174 | |
| 1175 | snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.killscxx . . $ tPInfoStat#kills.); |
| 1176 | memcpy(&buffer[30], tempbuffer, strlen(tempbuffer)); |
| 1177 | |
| 1178 | snprintf(tempbuffer, sizeof(tempbuffer), "%d", stat.deathscxx . . $ tPInfoStat#deaths.); |
| 1179 | memcpy(&buffer[40], tempbuffer, strlen(tempbuffer)); |
| 1180 | |
| 1181 | size_t pos = 40 + strlen(tempbuffer) + 1; |
| 1182 | if (pos < BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`!) |
| 1183 | buffer[pos] = '\0'; |
| 1184 | |
| 1185 | buffer[BUFSIZEcxx . . $ `netgames/hoard/hoard.cpp:1037:9`! - 1] = '\0'; |
| 1186 | DLLcf_WriteString(file, buffer); |
| 1187 | } |
| 1188 | } |
| 1189 | } |
| 1190 | } |
| 1191 | DMFCBasecxx . . $ DMFCBase.->FindPInfoStatClosecxx . . $ IDMFC#FindPInfoStatClose(49f6e7a06ebc5aa8).(); |
| 1192 | DLLcf_WriteString(file, ""); // skip a line |
| 1193 | count++; |
| 1194 | } |
| 1195 | } |
| 1196 | |
| 1197 | // done writing stats |
| 1198 | DLLcfclose(file); |
| 1199 | DLLAddHUDMessage(TXT_STATSSAVEDcxx . . $ `netgames/hoard/hoardstr.h:79:9`!); |
| 1200 | } |
| 1201 | |
| 1202 | #define ROOTFILENAMEcxx . . $ `netgames/hoard/hoard.cpp:1202:9`! "Hoard" |
| 1203 | void OnSaveStatsToFilecxx . . $ OnSaveStatsToFile(49f6e7a06ebc5aa8).(void) { |
| 1204 | char filename[256]; |
| 1205 | DMFCBasecxx . . $ DMFCBase.->GenerateStatFilenamecxx . . $ IDMFC#GenerateStatFilename(4d4dad76095ad7d8).(filename, ROOTFILENAMEcxx . . $ `netgames/hoard/hoard.cpp:1202:9`!, false); |
| 1206 | SaveStatsToFilecxx . . $ SaveStatsToFile(fda57c8427c60377).(filename); |
| 1207 | } |
| 1208 | |
| 1209 | void OnLevelEndSaveStatsToFilecxx . . $ OnLevelEndSaveStatsToFile(49f6e7a06ebc5aa8).(void) { |
| 1210 | char filename[256]; |
| 1211 | DMFCBasecxx . . $ DMFCBase.->GenerateStatFilenamecxx . . $ IDMFC#GenerateStatFilename(4d4dad76095ad7d8).(filename, ROOTFILENAMEcxx . . $ `netgames/hoard/hoard.cpp:1202:9`!, true); |
| 1212 | SaveStatsToFilecxx . . $ SaveStatsToFile(fda57c8427c60377).(filename); |
| 1213 | } |
| 1214 | |
| 1215 | void OnDisconnectSaveStatsToFilecxx . . $ OnDisconnectSaveStatsToFile(49f6e7a06ebc5aa8).(void) { |
| 1216 | char filename[256]; |
| 1217 | DMFCBasecxx . . $ DMFCBase.->GenerateStatFilenamecxx . . $ IDMFC#GenerateStatFilename(4d4dad76095ad7d8).(filename, ROOTFILENAMEcxx . . $ `netgames/hoard/hoard.cpp:1202:9`!, false); |
| 1218 | SaveStatsToFilecxx . . $ SaveStatsToFile(fda57c8427c60377).(filename); |
| 1219 | } |
| 1220 | |
| 1221 | // handles a hoard inventory packet |
| 1222 | void ReceiveHoardInvcxx . . $ ReceiveHoardInv(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 1223 | int x, i, count = 0; |
| 1224 | int size; |
| 1225 | |
| 1226 | for (x = 0; x < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; x++) { |
| 1227 | // see if we have a valid player |
| 1228 | size = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 1229 | |
| 1230 | if (DMFCBasecxx . . $ DMFCBase.->CheckPlayerNumcxx . . $ IDMFC#CheckPlayerNum(83c267b20bac841a).(x)) { |
| 1231 | // we have a valid player, add orbs |
| 1232 | ASSERTcxx . . $ `netgames/includes/DMFC.h:370:9`!(size >= 0); |
| 1233 | DoBallsEffectcxx . . $ DoBallsEffect(3e454b8ccf442868).(x, size); |
| 1234 | for (i = 0; i < size; i++) { |
| 1235 | DLLInvAddTypeID(x, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID., -1, -1, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1236 | } // end for |
| 1237 | } // end if |
| 1238 | } // end for |
| 1239 | } |
| 1240 | |
| 1241 | // sends a hoard inventory packet to a player |
| 1242 | void SendHoardInvcxx . . $ SendHoardInv(d4f767463ce0a6b3).(int playernum) { |
| 1243 | uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 1244 | int i; |
| 1245 | int count = 0; |
| 1246 | |
| 1247 | DMFCBasecxx . . $ DMFCBase.->StartPacketcxx . . $ IDMFC#StartPacket(261852a8f74abaa0).(data, SPID_INVINFOcxx . . $ `netgames/hoard/hoard.cpp:81:9`!, &count); |
| 1248 | |
| 1249 | for (i = 0; i < DLLMAX_PLAYERScxx . . $ `netgames/includes/DMFC.h:425:9`!; i++) { |
| 1250 | if (DMFCBasecxx . . $ DMFCBase.->CheckPlayerNumcxx . . $ IDMFC#CheckPlayerNum(83c267b20bac841a).(i)) { |
| 1251 | MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(DLLInvGetTypeIDCount(i, OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.), data, &count); |
| 1252 | } else { |
| 1253 | MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(0, data, &count); |
| 1254 | } |
| 1255 | } |
| 1256 | |
| 1257 | DMFCBasecxx . . $ DMFCBase.->SendPacketcxx . . $ IDMFC#SendPacket(49a5bbab55ea8abc).(data, count, playernum); |
| 1258 | |
| 1259 | SendGameConfigcxx . . $ SendGameConfig(d4f767463ce0a6b3).(playernum); |
| 1260 | } |
| 1261 | |
| 1262 | void DisplayHUDScorescxx . . $ DisplayHUDScores(c7a20e4e05358911).(struct tHUDItemcxx . . $ tHUDItem# *hitem) { |
| 1263 | if (display_my_welcomecxx . . $ display_my_welcome.) { |
| 1264 | DisplayWelcomeMessagecxx . . $ DisplayWelcomeMessage(d4f767463ce0a6b3).(DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()); |
| 1265 | display_my_welcomecxx . . $ display_my_welcome. = false; |
| 1266 | } |
| 1267 | |
| 1268 | if (DisplayScoreScreencxx . . $ DisplayScoreScreen.) |
| 1269 | return; |
| 1270 | |
| 1271 | int x = 520; |
| 1272 | int height = DLLgrfont_GetHeight((DMFCBasecxx . . $ DMFCBase.->GetGameFontTranslateArraycxx . . $ IDMFC#GetGameFontTranslateArray(a7741f82f5fc3640).())[HUD_FONT_INDEXcxx . . $ `Descent3/gamefont.h:97:9`!]) + 3; |
| 1273 | uint8_tcxx . . $ uint8_t# alpha = DMFCBasecxx . . $ DMFCBase.->ConvertHUDAlphacxx . . $ IDMFC#ConvertHUDAlpha(50106d451684defa).((uint8_tcxx . . $ uint8_t#)((DisplayScoreScreencxx . . $ DisplayScoreScreen.) ? 128 : 255)); |
| 1274 | int y = (DMFCBasecxx . . $ DMFCBase.->GetGameWindowHcxx . . $ IDMFC#GetGameWindowH(b126dc7c1de90089).() / 2) - ((height * 5) / 2); |
| 1275 | int rank = 1; |
| 1276 | ddgr_colorcxx . . $ ddgr_color# color; |
| 1277 | |
| 1278 | char name[50]; |
| 1279 | player_recordcxx . . $ player_record# *pr; |
| 1280 | tPlayerStatcxx . . $ tPlayerStat# *stat; |
| 1281 | |
| 1282 | // determine coordinates to use here |
| 1283 | // we'll use a virtual width of 85 pixels on a 640x480 screen |
| 1284 | // so first determine the new width |
| 1285 | int name_width = 85.0f * DMFCBasecxx . . $ DMFCBase.->GetHudAspectXcxx . . $ IDMFC#GetHudAspectX(9b8c9e39889c762c).(); |
| 1286 | int score_width = DLLgrtext_GetTextLineWidth("888"); |
| 1287 | int name_x = DMFCBasecxx . . $ DMFCBase.->GetGameWindowWcxx . . $ IDMFC#GetGameWindowW(b126dc7c1de90089).() - name_width - score_width - 10; |
| 1288 | int score_x = DMFCBasecxx . . $ DMFCBase.->GetGameWindowWcxx . . $ IDMFC#GetGameWindowW(b126dc7c1de90089).() - score_width - 5; |
| 1289 | DLLgrtext_SetAlpha(alpha); |
| 1290 | |
| 1291 | for (int i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 1292 | int slot = SortedPlayerscxx . . $ SortedPlayers.[i]; |
| 1293 | pr = DMFCBasecxx . . $ DMFCBase.->GetPlayerRecordcxx . . $ IDMFC#GetPlayerRecord(6359c6f28dd028ae).(slot); |
| 1294 | if (pr && pr->statecxx . . $ player_record#state. != STATE_EMPTYcxx . . $ STATE_EMPTY.) { |
| 1295 | |
| 1296 | if (DMFCBasecxx . . $ DMFCBase.->IsPlayerDedicatedServercxx . . $ IDMFC#IsPlayerDedicatedServer(6a9c0d4ad435bebf).(pr)) |
| 1297 | continue; // skip dedicated server |
| 1298 | |
| 1299 | if ((pr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) || (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME. && !DMFCBasecxx . . $ DMFCBase.->IsPlayerObservercxx . . $ IDMFC#IsPlayerObserver(83c267b20bac841a).(pr->pnumcxx . . $ player_record#pnum.))) { |
| 1300 | |
| 1301 | stat = (tPlayerStatcxx . . $ tPlayerStat# *)pr->user_infocxx . . $ player_record#user_info.; |
| 1302 | strcpy(name, pr->callsigncxx . . $ player_record#callsign.); |
| 1303 | DMFCBasecxx . . $ DMFCBase.->ClipStringcxx . . $ IDMFC#ClipString(8677479218165cd4).(name_width, name, true); |
| 1304 | |
| 1305 | if (pr->statecxx . . $ player_record#state. == STATE_INGAMEcxx . . $ STATE_INGAME. && pr->pnumcxx . . $ player_record#pnum. == DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()) { |
| 1306 | |
| 1307 | switch (HUD_color_modelcxx . . $ HUD_color_model.) { |
| 1308 | case HCM_PLAYERCOLORcxx . . $ `netgames/hoard/hoard.cpp:85:9`!: |
| 1309 | color = (DMFCBasecxx . . $ DMFCBase.->GetPlayerColorscxx . . $ IDMFC#GetPlayerColors(ac695d451f96e4aa).())[pr->pnumcxx . . $ player_record#pnum.]; |
| 1310 | break; |
| 1311 | case HCM_NORMALcxx . . $ `netgames/hoard/hoard.cpp:86:9`!: |
| 1312 | color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(40, 255, 40); |
| 1313 | break; |
| 1314 | }; |
| 1315 | |
| 1316 | if (Highlight_bmpcxx . . $ Highlight_bmp. > BAD_BITMAP_HANDLEcxx . . $ `lib/bitmap.h:42:9`!) { |
| 1317 | // draw the highlight bar in the background |
| 1318 | DLLrend_SetAlphaValue(alpha * 0.50f); |
| 1319 | DLLrend_SetZBufferState(0); |
| 1320 | DLLrend_SetTextureType(TT_LINEARcxx . . $ TT_LINEAR.); |
| 1321 | DLLrend_SetLighting(LS_NONEcxx . . $ LS_NONE.); |
| 1322 | DLLrend_SetAlphaType(AT_CONSTANT_TEXTUREcxx . . $ `lib/renderer.h:402:9`!); |
| 1323 | |
| 1324 | DLLrend_DrawScaledBitmap(name_x - 2, y - 2, score_x + score_width + 2, y + height - 1, Highlight_bmpcxx . . $ Highlight_bmp., 0, 0, |
| 1325 | 1, 1, 1.0f, -1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1326 | DLLrend_SetZBufferState(1); |
| 1327 | } |
| 1328 | |
| 1329 | if ((WhoJustScoredcxx . . $ WhoJustScored. != pr->pnumcxx . . $ player_record#pnum.) || (DisplayBlinkcxx . . $ DisplayBlink.)) { |
| 1330 | DLLgrtext_SetColor(color); |
| 1331 | DLLgrtext_Printf(name_x, y, name); |
| 1332 | DLLgrtext_Printf(score_x, y, "%d", (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0); |
| 1333 | } |
| 1334 | y += height; |
| 1335 | } else if (rank < 6) { |
| 1336 | if (pr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) { |
| 1337 | color = GR_GREYcxx . . $ `netgames/includes/DMFC.h:432:9`!; |
| 1338 | } else { |
| 1339 | switch (HUD_color_modelcxx . . $ HUD_color_model.) { |
| 1340 | case HCM_PLAYERCOLORcxx . . $ `netgames/hoard/hoard.cpp:85:9`!: |
| 1341 | color = (DMFCBasecxx . . $ DMFCBase.->GetPlayerColorscxx . . $ IDMFC#GetPlayerColors(ac695d451f96e4aa).())[pr->pnumcxx . . $ player_record#pnum.]; |
| 1342 | break; |
| 1343 | case HCM_NORMALcxx . . $ `netgames/hoard/hoard.cpp:86:9`!: |
| 1344 | color = GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(40, 255, 40); |
| 1345 | break; |
| 1346 | }; |
| 1347 | } |
| 1348 | |
| 1349 | if ((pr->statecxx . . $ player_record#state. == STATE_DISCONNECTEDcxx . . $ STATE_DISCONNECTED.) || (WhoJustScoredcxx . . $ WhoJustScored. != pr->pnumcxx . . $ player_record#pnum.) || (DisplayBlinkcxx . . $ DisplayBlink.)) { |
| 1350 | DLLgrtext_SetColor(color); |
| 1351 | DLLgrtext_Printf(name_x, y, name); |
| 1352 | DLLgrtext_Printf(score_x, y, "%d", (stat) ? stat->Scorecxx . . $ tPlayerStat#Score.[DSTAT_LEVELcxx . . $ `netgames/includes/DMFC.h:527:9`!] : 0); |
| 1353 | } |
| 1354 | y += height; |
| 1355 | } |
| 1356 | rank++; |
| 1357 | } |
| 1358 | } |
| 1359 | } |
| 1360 | |
| 1361 | // draw the hoard orb count |
| 1362 | int w = DLLbm_w(HoardOrbIconcxx . . $ HoardOrbIcon., 0); |
| 1363 | char buffer[4]; |
| 1364 | snprintf(buffer, sizeof(buffer), "%d", DLLInvGetTypeIDCount(DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).(), OBJ_POWERUPcxx . . $ `Descent3/object_external.h:167:9`!, HoardIDcxx . . $ HoardID.)); |
| 1365 | int x1, x2, y1, y2; |
| 1366 | x1 = DMFCBasecxx . . $ DMFCBase.->GetGameWindowWcxx . . $ IDMFC#GetGameWindowW(b126dc7c1de90089).() - 5 - DLLbm_w(HoardOrbIconcxx . . $ HoardOrbIcon., 0); |
| 1367 | y1 = 25; |
| 1368 | x2 = x1 + DLLbm_w(HoardOrbIconcxx . . $ HoardOrbIcon., 0); |
| 1369 | y2 = y1 + DLLbm_h(HoardOrbIconcxx . . $ HoardOrbIcon., 0); |
| 1370 | |
| 1371 | DLLrend_SetAlphaValue(alpha); |
| 1372 | DLLrend_SetZBufferState(0); |
| 1373 | DLLrend_SetTextureType(TT_LINEARcxx . . $ TT_LINEAR.); |
| 1374 | DLLrend_SetLighting(LS_NONEcxx . . $ LS_NONE.); |
| 1375 | DLLrend_SetAlphaType(AT_CONSTANT_TEXTUREcxx . . $ `lib/renderer.h:402:9`!); |
| 1376 | DLLrend_DrawScaledBitmap(x1, y1, x2, y2, HoardOrbIconcxx . . $ HoardOrbIcon., 0, 0, 1, 1, 1.0f, -1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!); |
| 1377 | DLLrend_SetZBufferState(1); |
| 1378 | |
| 1379 | x1 += w / 2; |
| 1380 | y1 += DLLbm_h(HoardOrbIconcxx . . $ HoardOrbIcon., 0) / 2; |
| 1381 | x1 -= ((float)DLLgrtext_GetTextLineWidth(buffer)) / 2.0f; |
| 1382 | y1 -= ((height - 3) / 2.0); |
| 1383 | |
| 1384 | DLLgrtext_SetColor(GR_RGBcxx . . $ GR_RGB(530956271a9518a5).(128, 128, 128)); |
| 1385 | DLLgrtext_SetAlpha(stdcxx . . $ std/::mincxx . . $ std/min(2a338fce5842aa6a).(alpha + 30, 255)); |
| 1386 | DLLgrtext_Printf(x1, y1, buffer); |
| 1387 | } |
| 1388 | |
| 1389 | void SortPlayerScorescxx . . $ SortPlayerScores(621ccea12ecf5b06).(int *sortedindex, int size) { |
| 1390 | int tempsort[MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!]; |
| 1391 | int i, t, j; |
| 1392 | |
| 1393 | for (i = 0; i < MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!; i++) { |
| 1394 | tempsort[i] = i; |
| 1395 | } |
| 1396 | |
| 1397 | for (i = 1; i <= MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! - 1; i++) { |
| 1398 | t = tempsort[i]; |
| 1399 | // Shift elements down until |
| 1400 | // insertion point found. |
| 1401 | for (j = i - 1; j >= 0 && compare_slotscxx . . $ compare_slots(cf9ef193275fa6d8).(tempsort[j], t); j--) { |
| 1402 | tempsort[j + 1] = tempsort[j]; |
| 1403 | } |
| 1404 | // insert |
| 1405 | tempsort[j + 1] = t; |
| 1406 | } |
| 1407 | |
| 1408 | // copy the array over |
| 1409 | memcpy(sortedindex, tempsort, ((size > MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`!) ? MAX_PLAYER_RECORDScxx . . $ `netgames/includes/DMFC.h:526:9`! : size) * sizeof(int)); |
| 1410 | } |
| 1411 | |
| 1412 | void DisplayWelcomeMessagecxx . . $ DisplayWelcomeMessage(d4f767463ce0a6b3).(int player_num) { |
| 1413 | char name_buffer[64]; |
| 1414 | strcpy(name_buffer, (DMFCBasecxx . . $ DMFCBase.->GetPlayerscxx . . $ IDMFC#GetPlayers(51ff8e716a252304).())[player_num].callsigncxx . . $ player#callsign.); |
| 1415 | |
| 1416 | if (player_num == DMFCBasecxx . . $ DMFCBase.->GetPlayerNumcxx . . $ IDMFC#GetPlayerNum(b126dc7c1de90089).()) { |
| 1417 | DLLAddHUDMessage(TXT_WELCOMEcxx . . $ `netgames/hoard/hoardstr.h:59:9`!, name_buffer); |
| 1418 | } else { |
| 1419 | DLLAddHUDMessage(TXT_JOINEDcxx . . $ `netgames/hoard/hoardstr.h:60:9`!, name_buffer); |
| 1420 | } |
| 1421 | } |
| 1422 | |
| 1423 | void DoBallsEffectcxx . . $ DoBallsEffect(3e454b8ccf442868).(int i, int count) { |
| 1424 | float redb[4]; |
| 1425 | float greenb[4]; |
| 1426 | float blueb[4]; |
| 1427 | |
| 1428 | for (int x = 0; x < 4; x++) { |
| 1429 | redb[x] = blueb[x] = 0; |
| 1430 | greenb[x] = 1; |
| 1431 | } |
| 1432 | |
| 1433 | switch (count) { |
| 1434 | case 0: |
| 1435 | DLLPlayerSetRotatingBall(i, 0, 0, redb, greenb, blueb); |
| 1436 | break; |
| 1437 | case 1: |
| 1438 | DLLPlayerSetRotatingBall(i, 1, 4, redb, greenb, blueb); |
| 1439 | break; |
| 1440 | case 2: |
| 1441 | DLLPlayerSetRotatingBall(i, 1, 3, redb, greenb, blueb); |
| 1442 | break; |
| 1443 | case 3: |
| 1444 | DLLPlayerSetRotatingBall(i, 1, 2, redb, greenb, blueb); |
| 1445 | break; |
| 1446 | case 4: |
| 1447 | DLLPlayerSetRotatingBall(i, 1, 1, redb, greenb, blueb); |
| 1448 | break; |
| 1449 | case 5: |
| 1450 | DLLPlayerSetRotatingBall(i, 2, 4, redb, greenb, blueb); |
| 1451 | break; |
| 1452 | case 6: |
| 1453 | DLLPlayerSetRotatingBall(i, 2, 3, redb, greenb, blueb); |
| 1454 | break; |
| 1455 | case 7: |
| 1456 | DLLPlayerSetRotatingBall(i, 2, 2, redb, greenb, blueb); |
| 1457 | break; |
| 1458 | case 8: |
| 1459 | DLLPlayerSetRotatingBall(i, 2, 1, redb, greenb, blueb); |
| 1460 | break; |
| 1461 | case 9: |
| 1462 | DLLPlayerSetRotatingBall(i, 3, 4, redb, greenb, blueb); |
| 1463 | break; |
| 1464 | case 10: |
| 1465 | DLLPlayerSetRotatingBall(i, 3, 3, redb, greenb, blueb); |
| 1466 | break; |
| 1467 | case 11: |
| 1468 | DLLPlayerSetRotatingBall(i, 3, 2, redb, greenb, blueb); |
| 1469 | break; |
| 1470 | case 12: |
| 1471 | DLLPlayerSetRotatingBall(i, 3, 1, redb, greenb, blueb); |
| 1472 | break; |
| 1473 | } |
| 1474 | } |
| 1475 | |
| 1476 | ///////////////////////////////// |
| 1477 | // Timer event handlers |
| 1478 | void OnTimercxx . . $ OnTimer(49f6e7a06ebc5aa8).(void) { DisplayBlinkcxx . . $ DisplayBlink. = !DisplayBlinkcxx . . $ DisplayBlink.; } |
| 1479 | void OnTimerKillcxx . . $ OnTimerKill(49f6e7a06ebc5aa8).(void) { |
| 1480 | DisplayBlinkcxx . . $ DisplayBlink. = true; |
| 1481 | WhoJustScoredcxx . . $ WhoJustScored. = WhoJustScoredTimercxx . . $ WhoJustScoredTimer. = -1; |
| 1482 | } |
| 1483 | |
| 1484 | // game config send/receive |
| 1485 | void SendGameConfigcxx . . $ SendGameConfig(d4f767463ce0a6b3).(int towho) { |
| 1486 | uint8_tcxx . . $ uint8_t# data[MAX_GAME_DATA_SIZEcxx . . $ `Descent3/multi_external.h:134:9`!]; |
| 1487 | int count = 0; |
| 1488 | |
| 1489 | DMFCBasecxx . . $ DMFCBase.->StartPacketcxx . . $ IDMFC#StartPacket(261852a8f74abaa0).(data, SPID_GAMECONFIGcxx . . $ `netgames/hoard/hoard.cpp:82:9`!, &count); |
| 1490 | |
| 1491 | MultiAddBytecxx . . $ MultiAddByte(3bbe8835367eaa4e).(configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard., data, &count); |
| 1492 | |
| 1493 | DMFCBasecxx . . $ DMFCBase.->SendPacketcxx . . $ IDMFC#SendPacket(49a5bbab55ea8abc).(data, count, towho); |
| 1494 | } |
| 1495 | |
| 1496 | void ReceiveGameConfigcxx . . $ ReceiveGameConfig(f25546b61a629de7).(uint8_tcxx . . $ uint8_t# *data) { |
| 1497 | int count = 0; |
| 1498 | configcxx . . $ config..min_hoardcxx . . $ tGameConfig#min_hoard. = MultiGetBytecxx . . $ MultiGetByte(96e36f15bd3e0281).(data, &count); |
| 1499 | } |
| 1500 | |
| 1501 | void ShowGameConfigDialogcxx . . $ ShowGameConfigDialog(d4f767463ce0a6b3).(int i) { |
| 1502 | DMFCBasecxx . . $ DMFCBase.->EnableOnScreenMenucxx . . $ IDMFC#EnableOnScreenMenu(b45ddcbc8423892c).(false); |
| 1503 | DMFCBasecxx . . $ DMFCBase.->StartUIWindowcxx . . $ IDMFC#StartUIWindow(6ca3d68f5c5f0975).(HOARD_CONFIG_DLGcxx . . $ `netgames/hoard/hoard.cpp:84:9`!, &configcxx . . $ config.); |
| 1504 | } |
| 1505 | |
| 1506 | void SwitchHUDColorcxx . . $ SwitchHUDColor(d4f767463ce0a6b3).(int i) { HUD_color_modelcxx . . $ HUD_color_model. = i; } |