void ShowNetGameInfo (int choice) { CMenu m (30); char mTexts [30][200]; int i, j, nInMenu, opt = 0; #if !DBG if (choice >= networkData.nActiveGames) return; #endif memset (mTexts, 0, sizeof (mTexts)); for (i = 0; i < 20; i++) m.AddText (reinterpret_cast<char*> (mTexts + i)); sprintf (mTexts [opt], TXT_NGI_GAME, szHighlight, AGI.szGameName); opt++; sprintf (mTexts [opt], TXT_NGI_MISSION, szHighlight, AGI.szMissionTitle); opt++; sprintf (mTexts [opt], TXT_NGI_LEVEL, szHighlight, AGI.nLevel); opt++; sprintf (mTexts [opt], TXT_NGI_SKILL, szHighlight, MENU_DIFFICULTY_TEXT (AGI.difficulty)); opt++; opt++; #if !DBG if (!*AXI.szGameName) { sprintf (mTexts [opt], "Gamehost is not using D2X-XL or running in pure mode"); opt++; } else #endif { if (AXI.bShadows || AXI.bUseParticles || AXI.bBrightObjects || (!AXI.bCompetition && AXI.bUseLightning)) { INITFLAGS ("Graphics Fx: "); ADDFLAG (AXI.bShadows, "Shadows"); ADDFLAG (AXI.bUseParticles, "Smoke"); if (!AXI.bCompetition) ADDFLAG (AXI.bUseLightning, "Lightnings"); ADDFLAG (AXI.bBrightObjects, "Bright Objects"); } else strcpy (mTexts [opt], "Graphics Fx: None"); opt++; if (!AXI.bCompetition && (AXI.bLightTrails || AXI.bShockwaves || AXI.bTracers)) { INITFLAGS ("Weapon Fx: "); ADDFLAG (AXI.bLightTrails, "Light trails"); ADDFLAG (AXI.bShockwaves, "Shockwaves"); ADDFLAG (AXI.bTracers, "Tracers"); ADDFLAG (AXI.bShowWeapons, "Weapons"); } else sprintf (mTexts [opt], "Weapon Fx: None"); opt++; if (!AXI.bCompetition && (AXI.bDamageExplosions || AXI.bPlayerShield)) { INITFLAGS ("Ship Fx: "); ADDFLAG (AXI.bPlayerShield, "Shield"); ADDFLAG (AXI.bDamageExplosions, "Damage"); ADDFLAG (AXI.bGatlingSpeedUp, "Gatling speedup"); } else sprintf (mTexts [opt], "Ship Fx: None"); opt++; if (AXI.nWeaponIcons || (!AXI.bCompetition && (AXI.bTargetIndicators || AXI.bDamageIndicators))) { INITFLAGS ("HUD extensions: "); ADDFLAG (AXI.nWeaponIcons != 0, "Icons"); ADDFLAG (!AXI.bCompetition && AXI.bTargetIndicators, "Tgt indicators"); ADDFLAG (!AXI.bCompetition && AXI.bDamageIndicators, "Dmg indicators"); ADDFLAG (!AXI.bCompetition && AXI.bMslLockIndicators, "Trk indicators"); } else strcat (mTexts [opt], "HUD extensions: None"); opt++; if (!AXI.bCompetition && AXI.bRadarEnabled) { INITFLAGS ("Radar: "); ADDFLAG ((AGI.gameFlags & NETGAME_FLAG_SHOW_MAP) != 0, "Players"); ADDFLAG (AXI.nRadar, "Radar"); ADDFLAG (AXI.bPowerupsOnRadar, "Powerups"); ADDFLAG (AXI.bRobotsOnRadar, "Robots"); } else strcat (mTexts [opt], "Radar: off"); opt++; if (!AXI.bCompetition && (AXI.bMouseLook || AXI.bFastPitch)) { INITFLAGS ("Controls ext.: "); ADDFLAG (AXI.bMouseLook, "mouselook"); ADDFLAG (AXI.bFastPitch, "fast pitch"); } else strcat (mTexts [opt], "Controls ext.: None"); opt++; if (!AXI.bCompetition && (AXI.bDualMissileLaunch || !AXI.bFriendlyFire || AXI.bInhibitSuicide || AXI.bEnableCheats || AXI.bDarkness || (AXI.nFusionRamp != 2))) { INITFLAGS ("Gameplay ext.: "); ADDFLAG (AXI.bEnableCheats, "Cheats"); ADDFLAG (AXI.bDarkness, "Darkness"); ADDFLAG (AXI.bSmokeGrenades, "Smoke Grens"); ADDFLAG (AXI.bDualMissileLaunch, "Dual Msls"); ADDFLAG (AXI.nFusionRamp != 2, "Fusion ramp"); ADDFLAG (!AXI.bFriendlyFire, "no FF"); ADDFLAG (AXI.bInhibitSuicide, "no suicide"); ADDFLAG (AXI.bKillMissiles, "shoot msls"); ADDFLAG (AXI.bTripleFusion, "tri fusion"); ADDFLAG (AXI.bEnhancedShakers, "enh shakers"); ADDFLAG (AXI.nHitboxes, "hit boxes"); } else strcat (mTexts [opt], "Gameplay ext.: None"); opt++; } bAlreadyShowingInfo = 1; nInMenu = gameStates.menus.nInMenu; gameStates.menus.nInMenu = 0; gameStates.menus.bNoBackground = 0; m.TinyMenu (NULL, TXT_NETGAME_INFO); gameStates.menus.bNoBackground = 0; gameStates.app.bGameRunning = 0; gameStates.menus.nInMenu = nInMenu; bAlreadyShowingInfo = 0; }
static String flagsToString(png_uint_32 flags) { String result, delim; ADDFLAG(flags, PNG_FLAG_ZLIB_CUSTOM_STRATEGY ); ADDFLAG(flags, PNG_FLAG_ZLIB_CUSTOM_LEVEL ); ADDFLAG(flags, PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL ); ADDFLAG(flags, PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS ); ADDFLAG(flags, PNG_FLAG_ZLIB_CUSTOM_METHOD ); ADDFLAG(flags, PNG_FLAG_ZLIB_FINISHED ); ADDFLAG(flags, PNG_FLAG_ROW_INIT ); ADDFLAG(flags, PNG_FLAG_FILLER_AFTER ); ADDFLAG(flags, PNG_FLAG_CRC_ANCILLARY_USE ); ADDFLAG(flags, PNG_FLAG_CRC_ANCILLARY_NOWARN ); ADDFLAG(flags, PNG_FLAG_CRC_CRITICAL_USE ); ADDFLAG(flags, PNG_FLAG_CRC_CRITICAL_IGNORE ); ADDFLAG(flags, PNG_FLAG_ASSUME_sRGB ); ADDFLAG(flags, PNG_FLAG_OPTIMIZE_ALPHA ); ADDFLAG(flags, PNG_FLAG_DETECT_UNINITIALIZED ); ADDFLAG(flags, PNG_FLAG_KEEP_UNKNOWN_CHUNKS ); ADDFLAG(flags, PNG_FLAG_KEEP_UNSAFE_CHUNKS ); ADDFLAG(flags, PNG_FLAG_LIBRARY_MISMATCH ); ADDFLAG(flags, PNG_FLAG_STRIP_ERROR_NUMBERS ); ADDFLAG(flags, PNG_FLAG_STRIP_ERROR_TEXT ); ADDFLAG(flags, PNG_FLAG_MALLOC_NULL_MEM_OK ); ADDFLAG(flags, PNG_FLAG_BENIGN_ERRORS_WARN ); ADDFLAG(flags, PNG_FLAG_ZTXT_CUSTOM_STRATEGY ); ADDFLAG(flags, PNG_FLAG_ZTXT_CUSTOM_LEVEL ); ADDFLAG(flags, PNG_FLAG_ZTXT_CUSTOM_MEM_LEVEL ); ADDFLAG(flags, PNG_FLAG_ZTXT_CUSTOM_WINDOW_BITS ); ADDFLAG(flags, PNG_FLAG_ZTXT_CUSTOM_METHOD ); return result; }
static String transToString(png_uint_32 trans) { String result, delim; ADDFLAG(trans, PNG_BGR ); ADDFLAG(trans, PNG_INTERLACE ); ADDFLAG(trans, PNG_PACK ); ADDFLAG(trans, PNG_SHIFT ); ADDFLAG(trans, PNG_SWAP_BYTES ); ADDFLAG(trans, PNG_INVERT_MONO ); ADDFLAG(trans, PNG_QUANTIZE ); ADDFLAG(trans, PNG_COMPOSE ); ADDFLAG(trans, PNG_BACKGROUND_EXPAND ); ADDFLAG(trans, PNG_EXPAND_16 ); ADDFLAG(trans, PNG_16_TO_8 ); ADDFLAG(trans, PNG_RGBA ); ADDFLAG(trans, PNG_EXPAND ); ADDFLAG(trans, PNG_GAMMA ); ADDFLAG(trans, PNG_GRAY_TO_RGB ); ADDFLAG(trans, PNG_FILLER ); ADDFLAG(trans, PNG_PACKSWAP ); ADDFLAG(trans, PNG_SWAP_ALPHA ); ADDFLAG(trans, PNG_STRIP_ALPHA ); ADDFLAG(trans, PNG_INVERT_ALPHA ); ADDFLAG(trans, PNG_USER_TRANSFORM ); ADDFLAG(trans, PNG_RGB_TO_GRAY_ERR ); ADDFLAG(trans, PNG_RGB_TO_GRAY_WARN ); ADDFLAG(trans, PNG_ENCODE_ALPHA ); ADDFLAG(trans, PNG_ADD_ALPHA ); ADDFLAG(trans, PNG_EXPAND_tRNS ); ADDFLAG(trans, PNG_SCALE_16_TO_8 ); return result; }
static String modeToString(png_uint_32 mode) { String result, delim; ADDFLAG(mode, PNG_HAVE_IHDR ); ADDFLAG(mode, PNG_HAVE_PLTE ); ADDFLAG(mode, PNG_HAVE_IDAT ); ADDFLAG(mode, PNG_AFTER_IDAT ); ADDFLAG(mode, PNG_HAVE_IEND ); ADDFLAG(mode, PNG_HAVE_gAMA ); ADDFLAG(mode, PNG_HAVE_cHRM ); ADDFLAG(mode, PNG_HAVE_sRGB ); ADDFLAG(mode, PNG_HAVE_CHUNK_HEADER ); ADDFLAG(mode, PNG_WROTE_tIME ); ADDFLAG(mode, PNG_WROTE_INFO_BEFORE_PLTE ); ADDFLAG(mode, PNG_BACKGROUND_IS_GRAY ); ADDFLAG(mode, PNG_HAVE_PNG_SIGNATURE ); ADDFLAG(mode, PNG_HAVE_CHUNK_AFTER_IDAT ); ADDFLAG(mode, PNG_HAVE_iCCP ); return result; }