diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 1ddfe6ee3..c5f88be55 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -1146,7 +1146,7 @@ RESTART: if (!bAddUserMap && !gGameStarted) { M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); } ready2send = 1; while (!gQuitGame) diff --git a/source/blood/src/d_menu.cpp b/source/blood/src/d_menu.cpp index 25540bb90..6b0e4657c 100644 --- a/source/blood/src/d_menu.cpp +++ b/source/blood/src/d_menu.cpp @@ -141,7 +141,7 @@ static std::unique_ptr itemBloodQAV; // This must be global to void UpdateNetworkMenus(void) { // For now disable the network menu item as it is not yet functional. - for (auto name : { NAME_MainMenu, NAME_IngameMenu }) + for (auto name : { NAME_Mainmenu, NAME_IngameMenu }) { FMenuDescriptor** desc = MenuDescriptors.CheckKey(name); if (desc != NULL && (*desc)->mType == MDESC_ListMenu) diff --git a/source/blood/src/demo.cpp b/source/blood/src/demo.cpp index 96afd1ec3..a769e05f3 100644 --- a/source/blood/src/demo.cpp +++ b/source/blood/src/demo.cpp @@ -293,7 +293,7 @@ void CDemo::ProcessKeys(void) if (!M_Active()) { M_StartControlPanel(true); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); } } diff --git a/source/blood/src/network.cpp b/source/blood/src/network.cpp index f316e3353..ad30377e6 100644 --- a/source/blood/src/network.cpp +++ b/source/blood/src/network.cpp @@ -519,7 +519,7 @@ void netGetPackets(void) // What are we trying to do here? Opening the menu, maybe? //inputState.SetKeyStatus(sc_Escape); M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); break; } } diff --git a/source/core/menu/menu.cpp b/source/core/menu/menu.cpp index 39989bfa5..2c75f9af8 100644 --- a/source/core/menu/menu.cpp +++ b/source/core/menu/menu.cpp @@ -425,17 +425,17 @@ bool M_SetMenu(FName menu, int param, FName caller) // skip the menu and go right into the first level. // For tracking memory leaks that normally require operating the menu to start the game so that they always get the same allocation number. GameStartupInfo.Episode = GameStartupInfo.Skill = 0; - menu = NAME_StartGame; + menu = NAME_Startgame; #endif if (DrawBackground == -1) { - if (menu == NAME_MainMenu) DrawBackground = 1; + if (menu == NAME_Mainmenu) DrawBackground = 1; else DrawBackground = 0; } // some menus need some special treatment (needs to be adjusted for the various frontends. switch (caller.GetIndex()) { - case NAME_EpisodeMenu: + case NAME_Episodemenu: case NAME_HuntMenu: case NAME_TargetMenu: // sent from the episode menu @@ -469,7 +469,7 @@ bool M_SetMenu(FName menu, int param, FName caller) gi->CustomMenuSelection(GameStartupInfo.CustomLevel1, param); break; - case NAME_SkillMenu: + case NAME_Skillmenu: GameStartupInfo.Skill = param; break; @@ -486,9 +486,9 @@ bool M_SetMenu(FName menu, int param, FName caller) switch (menu.GetIndex()) { - case NAME_StartGame: + case NAME_Startgame: M_ClearMenus(); // must be done before starting the level. - if (caller == NAME_MainMenu || caller == NAME_IngameMenu) GameStartupInfo.Episode = param; + if (caller == NAME_Mainmenu || caller == NAME_IngameMenu) GameStartupInfo.Episode = param; STAT_StartNewGame(gVolumeNames[GameStartupInfo.Episode], GameStartupInfo.Skill); inputState.ClearAllInput(); @@ -512,7 +512,7 @@ bool M_SetMenu(FName menu, int param, FName caller) } #endif - case NAME_SaveGameMenu: + case NAME_Savegamemenu: if (!gi->CanSave()) { // cannot save outside the game. @@ -521,12 +521,12 @@ bool M_SetMenu(FName menu, int param, FName caller) } break; - case NAME_QuitMenu: + case NAME_Quitmenu: // This is no separate class C_DoCommand("menu_quit"); return true; - case NAME_EndgameMenu: + case NAME_EndGameMenu: // This is no separate class C_DoCommand("menu_endgame"); return true; @@ -829,7 +829,7 @@ bool M_DoResponder (event_t *ev) ConsoleState != c_down && m_use_mouse) { M_StartControlPanel(true); - M_SetMenu(NAME_MainMenu, -1); + M_SetMenu(NAME_Mainmenu, -1); return true; } } @@ -1102,12 +1102,12 @@ CCMD(opensavemenu) if (gi->CanSave()) { M_StartControlPanel(true); - M_SetMenu(NAME_SaveGameMenu); + M_SetMenu(NAME_Savegamemenu); } } CCMD(openloadmenu) { M_StartControlPanel(true); - M_SetMenu(NAME_LoadGameMenu); + M_SetMenu(NAME_Loadgamemenu); } diff --git a/source/core/menu/menudef.cpp b/source/core/menu/menudef.cpp index a562dfdf8..bec79d96b 100644 --- a/source/core/menu/menudef.cpp +++ b/source/core/menu/menudef.cpp @@ -1253,7 +1253,7 @@ static void BuildEpisodeMenu() { // Build episode menu int addedVolumes = 0; - FMenuDescriptor **desc = MenuDescriptors.CheckKey(NAME_EpisodeMenu); + FMenuDescriptor **desc = MenuDescriptors.CheckKey(NAME_Episodemenu); if (desc != NULL && (*desc)->mType == MDESC_ListMenu) { FListMenuDescriptor *ld = static_cast(*desc); @@ -1265,7 +1265,7 @@ static void BuildEpisodeMenu() if (gVolumeNames[i].IsNotEmpty() && !(gVolumeFlags[i] & EF_HIDEFROMSP)) { - auto it = new FListMenuItemNativeText(ld->mXpos, y, ld->mLinespacing, gVolumeNames[i][0], gVolumeNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_SkillMenu, i); + auto it = new FListMenuItemNativeText(ld->mXpos, y, ld->mLinespacing, gVolumeNames[i][0], gVolumeNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_Skillmenu, i); if ((g_gameType & GAMEFLAG_DUKE) && (g_gameType & GAMEFLAG_SHAREWARE) && i > 0) { it->mEnabled = false; @@ -1301,7 +1301,7 @@ static void BuildEpisodeMenu() // Build skill menu int addedSkills = 0; - desc = MenuDescriptors.CheckKey(NAME_SkillMenu); + desc = MenuDescriptors.CheckKey(NAME_Skillmenu); if (desc != NULL && (*desc)->mType == MDESC_ListMenu) { FListMenuDescriptor* ld = static_cast(*desc); @@ -1312,7 +1312,7 @@ static void BuildEpisodeMenu() { if (gSkillNames[i].IsNotEmpty()) { - auto it = new FListMenuItemNativeText(ld->mXpos, y, ld->mLinespacing, gSkillNames[i][0], gSkillNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_StartGame, i); + auto it = new FListMenuItemNativeText(ld->mXpos, y, ld->mLinespacing, gSkillNames[i][0], gSkillNames[i], NIT_BigFont, NIT_ActiveState, 1, NAME_Startgame, i); y += ld->mLinespacing; ld->mItems.Push(it); addedSkills++; @@ -1321,7 +1321,7 @@ static void BuildEpisodeMenu() if (addedSkills == 0) { // Need to add one item with the default skill so that the menu does not break. - auto it = new FListMenuItemNativeText(ld->mXpos, 0, ld->mLinespacing, 0, "", NIT_BigFont, NIT_ActiveState, 1, NAME_StartGame, gDefaultSkill); + auto it = new FListMenuItemNativeText(ld->mXpos, 0, ld->mLinespacing, 0, "", NIT_BigFont, NIT_ActiveState, 1, NAME_Startgame, gDefaultSkill); ld->mItems.Push(it); } if (addedSkills == 1) @@ -1333,7 +1333,7 @@ static void BuildEpisodeMenu() if (g_MenuGameplayEntries[0].entry.isValid()) { int e = 0; - FMenuDescriptor** desc = MenuDescriptors.CheckKey(NAME_CustomGameMenu); + FMenuDescriptor** desc = MenuDescriptors.CheckKey("CustomGameMenu"); if (desc != NULL && (*desc)->mType == MDESC_ListMenu) { FListMenuDescriptor* ldo = static_cast(*desc); @@ -1345,7 +1345,7 @@ static void BuildEpisodeMenu() break; int s = 0; - FMenuDescriptor** sdesc = MenuDescriptors.CheckKey(FName(ENamedName(NAME_CustomSubMenu1 + e))); + FMenuDescriptor** sdesc = MenuDescriptors.CheckKey(FName(FStringf("CustomSubMenu%d", e+1))); if (sdesc != NULL && (*sdesc)->mType == MDESC_ListMenu) { FListMenuDescriptor* ld = static_cast(*sdesc); @@ -1356,7 +1356,7 @@ static void BuildEpisodeMenu() if (!subentry.isValid()) break; - auto li = new FListMenuItemNativeText(ld->mXpos, 0, ld->mLinespacing, 0, subentry.name, NIT_BigFont, NIT_ActiveColor, 1.f, subentry.flags & MGE_UserContent ? NAME_UsermapMenu : NAME_SkillMenu); + auto li = new FListMenuItemNativeText(ld->mXpos, 0, ld->mLinespacing, 0, subentry.name, NIT_BigFont, NIT_ActiveColor, 1.f, subentry.flags & MGE_UserContent ? NAME_UsermapMenu : NAME_Skillmenu); if (subentry.flags & MGE_Locked) li->mEnabled = false; if (subentry.flags & MGE_Hidden) li->mHidden = true; @@ -1364,7 +1364,7 @@ static void BuildEpisodeMenu() ++s; } } - FName link = entry.flags & MGE_UserContent ? NAME_UsermapMenu : s == 0 ? NAME_SkillMenu : NAME_CustomSubMenu1; + FName link = entry.flags & MGE_UserContent ? NAME_UsermapMenu : s == 0 ? NAME_Skillmenu : NAME_CustomSubMenu1; auto li = new FListMenuItemNativeText(ldo->mXpos, 0, ldo->mLinespacing, 0, entry.name, NIT_BigFont, NIT_ActiveColor, 1.f, link, e); if (entry.flags & MGE_Locked) li->mEnabled = false; @@ -1375,14 +1375,14 @@ static void BuildEpisodeMenu() } if (e > 0) { - for (auto name : { NAME_MainMenu, NAME_IngameMenu }) + for (auto name : { NAME_Mainmenu, NAME_IngameMenu }) { FMenuDescriptor** desc = MenuDescriptors.CheckKey(name); if (desc != NULL && (*desc)->mType == MDESC_ListMenu) { FListMenuDescriptor* ld = static_cast(*desc); auto li = ld->mItems[0]; - if (li->GetAction(nullptr) == NAME_EpisodeMenu) + if (li->GetAction(nullptr) == NAME_Episodemenu) { li->SetAction(NAME_CustomGameMenu); } diff --git a/source/core/menu/savegamemanager.cpp b/source/core/menu/savegamemanager.cpp index b6584d1d6..3489b8ac4 100644 --- a/source/core/menu/savegamemanager.cpp +++ b/source/core/menu/savegamemanager.cpp @@ -643,7 +643,7 @@ CCMD(quicksave) if (savegameManager.quickSaveSlot == NULL || savegameManager.quickSaveSlot == (FSaveGameNode*)1) { M_StartControlPanel(true); - M_SetMenu(NAME_SaveGameMenu); + M_SetMenu(NAME_Savegamemenu); return; } @@ -693,7 +693,7 @@ CCMD(quickload) M_StartControlPanel(true); // signal that whatever gets loaded should be the new quicksave savegameManager.quickSaveSlot = (FSaveGameNode*)1; - M_SetMenu(NAME_LoadGameMenu); + M_SetMenu(NAME_Loadgamemenu); return; } diff --git a/source/core/utility/namedef.h b/source/core/utility/namedef.h index fd63f637a..209471dde 100644 --- a/source/core/utility/namedef.h +++ b/source/core/utility/namedef.h @@ -1,32 +1,790 @@ // 'None' must always be the first name. - -// Windows.h is just dangerous! -#ifdef LoadMenu -#undef LoadMenu -#endif - xx(None) xx(Null) xx(_) + +xx(Super) +xx(Object) +xx(Actor) +xx(Class) +xx(Thinker) + xx(Untranslated) +xx(Doom) +xx(Heretic) +xx(Hexen) +xx(Strife) +xx(Raven) -xx(Controlmessage) +// blood spawning +xx(Blood) +xx(BloodSplatter) +xx(AxeBlood) +xx(Spray) -xx(MainMenu) +// Invulnerability types +xx(Ghost) +xx(Reflective) + +// Invisibility types +xx(Additive) +xx(Cumulative) +xx(Fuzzy) +xx(Opaque) +xx(Stencil) +xx(AddStencil) + +// Render styles +xx(Normal) +xx(SoulTrans) +xx(OptFuzzy) +xx(Add) +xx(Shaded) +xx(AddShaded) +xx(TranslucentStencil) +xx(Shadow) +xx(Subtract) +xx(Subtractive) +xx(FillColor) +xx(ColorBlend) +xx(ColorAdd) +xx(Multiply) + +// Healingradius types +xx(Mana) +xx(Armor) + +// Per-actor sound channels +xx(Auto) +xx(Weapon) +xx(Voice) +xx(Item) +xx(Body) +xx(SoundSlot5) +xx(SoundSlot6) +xx(SoundSlot7) + +// Hexen sound sequence names +xx(Platform) +xx(PlatformMetal) +xx(Silence) +xx(Lava) +xx(Water) +xx(Ice) +xx(Earth) +xx(PlatformMetal2) +xx(DoorNormal) +xx(DoorHeavy) +xx(DoorMetal) +xx(DoorCreak) +xx(DoorMetal2) +xx(Wind) + +xx(PointPusher) +xx(PointPuller) + +xx(UpperStackLookOnly) +xx(LowerStackLookOnly) +xx(StackPoint) +xx(SkyCamCompat) + +xx(BasicArmorBonus) +xx(BasicArmorPickup) +xx(SaveAmount) +xx(SavePercent) +xx(MaxAbsorb) +xx(MaxFullAbsorb) +xx(MaxAmount) +xx(ActualSaveAmount) +xx(ArmorType) +xx(HexenArmor) +xx(Slots) +xx(SlotsIncrement) +xx(InterHubAmount) +xx(Icon) +xx(AltHUDIcon) +xx(PickupFlash) + +xx(BulletPuff) +xx(StrifePuff) +xx(MaulerPuff) + +// Special bosses A_BossDeath knows about +xx(Fatso) +xx(Arachnotron) +xx(BaronOfHell) +xx(Cyberdemon) +xx(SpiderMastermind) +xx(Ironlich) +xx(Minotaur) +xx(Sorcerer2) + +// Bots check this +xx(Megasphere) +xx(MegasphereHealth) + +// Standard player classes +xx(DoomPlayer) +xx(HereticPlayer) +xx(StrifePlayer) +xx(FighterPlayer) +xx(ClericPlayer) +xx(MagePlayer) +xx(ChexPlayer) +xx(ChickenPlayer) +xx(PigPlayer) + +// Flechette names for the different Hexen player classes +xx(ArtiPoisonBag1) +xx(ArtiPoisonBag2) +xx(ArtiPoisonBag3) + +// Strife quests +xx(QuestItem) +xx(Sigil) +xx(ScriptedMarine) +xx(GiveSigilPiece) +xx(SetWeapon) +xx(SetSprite) + +// Armor +xx(BasicArmor) + +// The Wings of Wrath +xx(ArtiFly) + +// Doom ammo types +xx(Clip) +xx(Shell) +xx(RocketAmmo) +xx(Cell) + +// Hexen Mana +xx(Mana1) +xx(Mana2) + +// Hexen's fourth weapons +xx(FWeapQuietus) +xx(CWeapWraithverge) +xx(MWeapBloodscourge) + +// Misc Hexen classes +xx(LightningZap) + +// Ammo and weapon names for the Strife status bar +xx(ClipOfBullets) +xx(PoisonBolts) +xx(ElectricBolts) +xx(HEGrenadeRounds) +xx(PhosphorusGrenadeRounds) +xx(MiniMissiles) +xx(EnergyPod) + +xx(StrifeCrossbow) +xx(AssaultGun) +xx(FlameThrower) +xx(MiniMissileLauncher) +xx(StrifeGrenadeLauncher) +xx(Mauler) +xx(BackpackItem) +xx(PuzzleItem) +xx(PuzzleItemNumber) +xx(HealthPickup) +xx(autousemode) +xx(Ammo) +xx(WeaponGiver) +xx(DehackedPickup) +xx(PowerTargeter) +xx(PowerInvulnerable) +xx(PowerStrength) +xx(PowerInvisibility) +xx(PowerIronFeet) +xx(PowerLightAmp) +xx(PowerWeaponLevel2) +xx(PowerFlight) +xx(PowerSpeed) +xx(PowerTorch) +xx(PowerHighJump) +xx(PowerReflection) +xx(PowerDrain) +xx(Reflection) +xx(CustomInventory) +xx(Inventory) +xx(StateProvider) +xx(CallTryPickup) +xx(QuestItem25) +xx(QuestItem28) +xx(QuestItem29) +xx(PowerDoubleFiringSpeed) +xx(PowerInfiniteAmmo) +xx(PowerBuddha) + +xx(AcolyteBlue) +xx(SpectralLightningV1) +xx(SpectralLightningV2) +xx(TeleportDest) +xx(TeleportDest2) + +// Strife's spectres +xx(AlienSpectre1) +xx(AlienSpectre2) +xx(AlienSpectre3) +xx(AlienSpectre4) +xx(AlienSpectre5) +xx(Oracle) + +xx(Chicken) +xx(Pig) + +// Standard animator names. +xx(Spawn) +xx(See) +xx(Pain) +xx(Melee) +xx(Missile) +xx(Crash) +xx(Death) +xx(Raise) +xx(Wound) +xx(Heal) +xx(Crush) +xx(Yes) +xx(No) +xx(Greetings) +xx(Idle) +xx(GenericFreezeDeath) +xx(GenericCrush) + +// Bounce state names +xx(Bounce) +xx(Wall) +xx(Floor) +xx(Ceiling) +xx(Creature) + +// Compatible death names for the decorate parser. +xx(XDeath) +xx(Burn) +//xx(Ice) // already defined above +xx(Disintegrate) +xx(Smash) + +// Weapon animator names. +xx(Select) +xx(Deselect) +xx(DeadLowered) +xx(Ready) +xx(Fire) +xx(Hold) +xx(AltFire) +xx(AltHold) +xx(Flash) +xx(AltFlash) +xx(Reload) +xx(Zoom) +xx(User1) +xx(User2) +xx(User3) +xx(User4) + +// State names used by ASwitchableDecoration +xx(Active) +xx(Inactive) + +// State names used by ACustomInventory +xx(Pickup) +xx(Use) +xx(Drop) + +xx(Fist) +//xx(Berserk) +xx(Chainsaw) +xx(Pistol) +xx(Shotgun) +xx(SSG) +xx(Chaingun) +xx(Rocket) +xx(Plasma) +xx(BFG) +//xx(Railgun) +xx(Dagger) + +// Damage types +//xx(Fire) already defined above +//xx(Ice) +//xx(Disintegrate) +xx(Drowning) +xx(Slime) +//xx(Crush) +xx(Telefrag) +xx(Falling) +xx(Suicide) +xx(Exit) +xx(Railgun) +xx(Poison) +xx(Electric) +xx(BFGSplash) +xx(DrainLife) // A weapon like the Sigil that drains your life away. +xx(Massacre) // For death by a cheater! +//(Melee) already defined above, so don't define it again +xx(InstantDeath) // Strife "instant death" +xx(PoisonCloud) // makes monsters howl. +xx(Hitscan) // for normal guns and the like +xx(Quake) + +// Special death name for getting killed excessively. Could be used as +// a damage type if you wanted to force an extreme death. +xx(Extreme) +xx(MDK) +xx(Cast) // 'damage type' for the cast call + +// Special names for thingdef_exp.cpp +xx(Random) +xx(FRandom) +xx(Random2) +xx(RandomPick) +xx(FRandomPick) +xx(SetRandomSeed) +xx(BuiltinRandomSeed) +xx(BuiltinNew) +xx(GetClass) +xx(GetParentClass) +xx(GetClassName) +xx(GetDefaultByType) +xx(Exp) +xx(Log10) +xx(Ceil) +xx(ACos) +xx(ASin) +xx(ATan) +xx(Cos) +xx(Sin) +xx(Tan) +xx(CosH) +xx(SinH) +xx(TanH) +xx(Round) +xx(ATan2) +xx(VectorAngle) +xx(New) +xx(Alpha) +xx(Angle) +xx(Args) +xx(CeilingZ) +xx(FloorZ) +xx(Health) +xx(Pitch) +xx(SpecialName) +xx(Special) +xx(TID) +xx(TIDtoHate) +xx(WaterLevel) +xx(X) +xx(Y) +xx(Z) +xx(XY) +xx(MomX) +xx(MomY) +xx(MomZ) +xx(Threshold) +xx(DefThreshold) +xx(Abs) +xx(TeleportSpecial) +xx(Teleport) +xx(ACS_NamedExecuteWithResult) +xx(CallACS) +xx(Sqrt) +xx(CheckClass) +xx(IsPointerEqual) +xx(Pick) +xx(Mass) +xx(VelX) +xx(VelY) +xx(VelZ) +xx(Accuracy) +xx(Stamina) +xx(Radius) +xx(ReactionTime) +xx(MeleeRange) +xx(Speed) +xx(FastSpeed) +xx(HowlSound) +xx(Clamp) +xx(VisibleStartAngle) +xx(VisibleStartPitch) +xx(VisibleEndAngle) +xx(VisibleEndPitch) +xx(Format) +xx(PickupMsg) +xx(Respawnable) +xx(ExplosionDamage) +xx(ExplosionRadius) +xx(DontHurtShooter) + +// Various actor names which are used internally +xx(MapSpot) +xx(PatrolPoint) +xx(PatrolSpecial) +xx(Communicator) +xx(PowerScanner) + +// Textmap properties +//xx(X) +//xx(Y) +xx(ZFloor) +xx(ZCeiling) +xx(Height) +//xx(Tid) +//xx(Angle) +xx(Type) +//xx(Special) +xx(Arg0) +xx(Arg1) +xx(Arg2) +xx(Arg3) +xx(Arg4) +xx(Arg0Str) +xx(Arg1Str) +xx(Id) +xx(MoreIds) +xx(V1) +xx(V2) + +xx(Sidefront) +xx(Sideback) +xx(Offsetx) +xx(Offsety) +xx(Texturetop) +xx(Texturebottom) +xx(Texturemiddle) +xx(Sector) +xx(Heightfloor) +xx(Heightceiling) +xx(Lightlevel) +xx(Texturefloor) +xx(Textureceiling) +xx(Nodecals) + +xx(Skill1) +xx(Skill2) +xx(Skill3) +xx(Skill4) +xx(Skill5) +xx(Skill6) +xx(Skill7) +xx(Skill8) +xx(Skill9) +xx(Skill10) +xx(Skill11) +xx(Skill12) +xx(Skill13) +xx(Skill14) +xx(Skill15) +xx(Skill16) +xx(Medium) +xx(Hard) +xx(Ambush) +xx(Dormant) +xx(Class0) +xx(Class1) +xx(Class2) +xx(Class3) +xx(Class4) +xx(Class5) +xx(Class6) +xx(Class7) +xx(Class8) +xx(Class9) +xx(Class10) +xx(Class11) +xx(Class12) +xx(Class13) +xx(Class14) +xx(Class15) +xx(Class16) +xx(Single) +xx(Coop) +xx(Dm) +xx(Translucent) +xx(Invisible) +xx(Friend) +xx(Strifeally) +xx(Standing) +xx(Countsecret) +xx(Score) +xx(Roll) +xx(Scale) +xx(ScaleX) +xx(ScaleY) +xx(FriendlySeeBlocks) +xx(Floatbobphase) +xx(Floatbobstrength) +xx(Target) +xx(Master) +xx(Tracer) + +xx(Blocking) +xx(Blockmonsters) +xx(Twosided) +xx(Dontpegtop) +xx(Dontpegbottom) +xx(Secret) +xx(Blocksound) +xx(Dontdraw) +xx(Mapped) +xx(Monsteractivate) +xx(Blockplayers) +xx(Blockeverything) +xx(Zoneboundary) +xx(Jumpover) +xx(Blockfloaters) +xx(Clipmidtex) +xx(Wrapmidtex) +xx(Midtex3d) +xx(Checkswitchrange) +xx(Firstsideonly) +xx(Transparent) +xx(Passuse) +xx(Repeatspecial) +xx(Conversation) +xx(Locknumber) +xx(Midtex3dimpassible) +xx(Revealed) +xx(AutomapStyle) +xx(DrawFullHeight) + +xx(Playercross) +xx(Playeruse) +xx(Playeruseback) +xx(Monstercross) +xx(Impact) +xx(Playerpush) +xx(Missilecross) +xx(Anycross) +xx(Monsteruse) +xx(Monsterpush) + +xx(ZDoom) +xx(ZDoomTranslated) +xx(Vavoom) +xx(GZDoom) + +xx(Xpanningfloor) +xx(Ypanningfloor) +xx(Xpanningceiling) +xx(Ypanningceiling) +xx(Xscalefloor) +xx(Yscalefloor) +xx(Xscaleceiling) +xx(Yscaleceiling) +xx(Rotationfloor) +xx(Rotationceiling) +xx(Lightfloor) +xx(Lightceiling) +xx(Lightfloorabsolute) +xx(Lightceilingabsolute) +xx(Gravity) +xx(Lightcolor) +xx(Fadecolor) +xx(Color_Floor) +xx(Color_Ceiling) +xx(Color_Walltop) +xx(Color_Wallbottom) +xx(Color_Sprites) +xx(ColorAdd_Floor) +xx(ColorAdd_Ceiling) +xx(ColorAdd_Sprites) +xx(ColorAdd_Walls) +xx(NoSkyWalls) +xx(Desaturation) +xx(SoundSequence) +xx(Silent) +xx(Nofallingdamage) +xx(Dropactors) +xx(NoRespawn) +xx(Alphafloor) +xx(Alphaceiling) +xx(Renderstylefloor) +xx(Renderstyleceiling) +xx(Waterzone) +xx(portal_ceil_blocksound) +xx(portal_ceil_disabled) +xx(portal_ceil_nopass) +xx(portal_ceil_norender) +xx(portal_ceil_overlaytype) +xx(portal_ceil_useglobaltex) +xx(portal_floor_blocksound) +xx(portal_floor_disabled) +xx(portal_floor_nopass) +xx(portal_floor_norender) +xx(portal_floor_overlaytype) +xx(portal_floor_useglobaltex) +xx(scroll_ceil_x) +xx(scroll_ceil_y) +xx(scroll_ceil_type) +xx(scroll_floor_x) +xx(scroll_floor_y) +xx(scroll_floor_type) + +xx(offsetx_top) +xx(offsety_top) +xx(offsetx_mid) +xx(offsety_mid) +xx(offsetx_bottom) +xx(offsety_bottom) +xx(scalex_top) +xx(scaley_top) +xx(scalex_mid) +xx(scaley_mid) +xx(scalex_bottom) +xx(scaley_bottom) +xx(light) +xx(lightabsolute) +xx(lightfog) +xx(nofakecontrast) +xx(smoothlighting) +xx(blockprojectiles) +xx(blockuse) +xx(hidden) +xx(blocksight) +xx(blockhitscan) + +xx(nogradient_top) +xx(flipgradient_top) +xx(clampgradient_top) +xx(useowncolors_top) +xx(uppercolor_top) +xx(lowercolor_top) +xx(nogradient_mid) +xx(flipgradient_mid) +xx(clampgradient_mid) +xx(useowncolors_mid) +xx(uppercolor_mid) +xx(lowercolor_mid) +xx(nogradient_bottom) +xx(flipgradient_bottom) +xx(clampgradient_bottom) +xx(useowncolors_bottom) +xx(uppercolor_bottom) +xx(lowercolor_bottom) +xx(useowncoloradd_top) +xx(coloradd_top) +xx(useowncoloradd_mid) +xx(coloradd_mid) +xx(useowncoloradd_bottom) +xx(coloradd_bottom) +xx(colorization_top) +xx(colorization_mid) +xx(colorization_bottom) +xx(colorization_floor) +xx(colorization_ceiling) + +xx(Renderstyle) + +xx(ceilingplane_a) +xx(ceilingplane_b) +xx(ceilingplane_c) +xx(ceilingplane_d) +xx(floorplane_a) +xx(floorplane_b) +xx(floorplane_c) +xx(floorplane_d) +xx(damageamount) +xx(damagetype) +xx(damageinterval) +xx(leakiness) +xx(damageterraineffect) +xx(damagehazard) +xx(floorterrain) +xx(ceilingterrain) +xx(floor_reflect) +xx(ceiling_reflect) +xx(floorglowcolor) +xx(floorglowheight) +xx(ceilingglowcolor) +xx(ceilingglowheight) +xx(fogdensity) +xx(Static) +xx(Staticconst) +xx(DeathmatchStatusScreen) +xx(CoopStatusScreen) +xx(RavenStatusScreen) +xx(StatusbarWidget) +xx(StatusbarHead) +xx(StatusbarCondition) +xx(Next) +xx(Prev) +xx(Children) +xx(Owner) + +xx(HealthFloor) +xx(HealthCeiling) +xx(Health3D) +xx(DamageSpecial) +xx(DeathSpecial) +xx(HealthFloorGroup) +xx(HealthCeilingGroup) +xx(Health3DGroup) +xx(HealthGroup) + +// USDF keywords +xx(Amount) +xx(Text) +xx(Displaycost) +xx(Yesmessage) +xx(Nomessage) +xx(Log) +xx(Giveitem) +xx(Nextpage) +xx(Closedialog) +xx(Cost) +xx(Page) +xx(Count) +xx(Name) +xx(Panel) +xx(Dialog) +xx(Ifitem) +xx(Choice) +xx(Link) +xx(Goodbye) +xx(Require) +xx(Exclude) +xx(Userstring) +xx(Sky) +xx(Pagename) + +// Special menus +xx(Mainmenu) +xx(MainmenuTextOnly) +xx(Episodemenu) +xx(Playerclassmenu) +xx(HexenDefaultPlayerclassmenu) +xx(Skillmenu) +xx(Startgame) +xx(StartgameConfirm) +xx(StartgameConfirmed) +xx(Loadgamemenu) +xx(Savegamemenu) +xx(Readthismenu) +xx(Optionsmenu) +xx(Quitmenu) +xx(Savemenu) +xx(Playermenu) +xx(EndGameMenu) xx(IngameMenu) -xx(MultiMenu) xx(HelpMenu) -xx(CreditsMenu) -xx(SaveGameMenu) -xx(LoadGameMenu) xx(SoundMenu) xx(ConfirmPlayerReset) -xx(EpisodeMenu) xx(HuntMenu) xx(WeaponMenu) xx(TargetMenu) -xx(SkillMenu) +xx(UsermapMenu) +xx(EngineCredits) +xx(EngineCredits2) +xx(CreditsMenu) +xx(MultiMenu) + xx(CustomGameMenu) xx(CustomSubMenu1) xx(CustomSubMenu2) @@ -35,17 +793,329 @@ xx(CustomSubMenu4) xx(CustomSubMenu5) xx(CustomSubMenu6) xx(CustomSubMenu7) -xx(UsermapMenu) -xx(StartGame) -xx(ImageScroller) -xx(QuitMenu) -xx(EndgameMenu) + +xx(Playerbox) +xx(Team) +xx(Color) +xx(Red) +xx(Green) +xx(Blue) +xx(Skin) +xx(Gender) +xx(Autoaim) +xx(Switch) +xx(Playerdisplay) +xx(Controlmessage) +xx(Crosshairs) +xx(Colorpickermenu) xx(Mididevices) xx(Aldevices) xx(Alresamplers) -xx(AdvSoundOptions) -xx(JoystickConfigMenu) +xx(CustomizeControls) +xx(MessageOptions) +xx(AutomapOptions) +xx(ScoreboardOptions) +xx(MapColorMenu) +xx(GameplayOptions) +xx(CompatibilityOptions) +xx(MouseOptions) xx(JoystickOptions) -xx(EngineCredits) -xx(EngineCredits2) +xx(SoundOptions) +xx(AdvSoundOptions) +xx(ModReplayerOptions) +xx(VideoOptions) +xx(JoystickConfigMenu) +xx(VMEnterText) +xx(VMTestText) +xx(VideoModeMenu) +xx(res_0) +xx(res_1) +xx(res_2) +xx(res_3) +xx(res_4) +xx(res_5) +xx(res_6) +xx(res_7) +xx(res_8) +xx(res_9) +xx(AlwaysRun) + +// end sequences +xx(Inter_Chess) +xx(Inter_Strife) +xx(Inter_Strife_Good) +xx(Inter_Strife_Sad) +xx(Inter_Strife_Bad) +xx(Inter_Strife_Lose) +xx(Inter_Strife_MAP03) +xx(Inter_Strife_MAP10) +xx(Multiplayer) + +// more stuff +xx(ColorSet) +xx(NeverSwitchOnPickup) +xx(MoveBob) +xx(StillBob) +xx(ClassicFlight) +xx(WBobSpeed) +xx(PlayerClass) +xx(MonsterClass) +xx(MorphedMonster) +xx(Wi_NoAutostartMap) + +xx(Duration) +xx(MorphStyle) +xx(MorphFlash) +xx(UnMorphFlash) +xx(Powerup) +xx(EffectTics) +xx(PowerupGiver) +xx(BlendColor) +xx(Strength) +xx(Mode) +xx(PowerupType) +xx(PlayerPawn) +xx(Key) + +// Decorate compatibility functions +xx(BuiltinTypeCheck) +xx(BuiltinRandom) +xx(BuiltinRandom2) +xx(BuiltinFRandom) +xx(BuiltinCallLineSpecial) +xx(BuiltinNameToClass) +xx(BuiltinFindMultiNameState) +xx(BuiltinFindSingleNameState) +xx(BuiltinHandleRuntimeState) +xx(BuiltinGetDefault) +xx(BuiltinClassCast) +xx(BuiltinFormat) +xx(Damage) +xx(Noattack) + +// basic type names +xx(Default) +xx(sByte) +xx(Byte) +xx(Short) +xx(uShort) +xx(Int) +xx(uInt) +xx(Bool) +xx(uint8) +xx(int8) +xx(uint16) +xx(int16) +xx(Float) +xx(Float32) +xx(Float64) +xx(Double) +xx(String) +xx(Vector) +xx(Map) +xx(Array) +xx(Include) +xx(Sound) +xx(State) +xx(Fixed) +xx(Vector2) +xx(Vector3) +xx(let) + +xx(Min) +xx(Max) +xx(Min_Normal) +xx(Min_Denormal) +xx(Epsilon) +xx(NaN) +xx(Infinity) +xx(Dig) +xx(Min_Exp) +xx(Max_Exp) +xx(Mant_Dig) +xx(Min_10_Exp) +xx(Max_10_Exp) + +// implicit function parameters +xx(self) +xx(invoker) +xx(stateinfo) + +xx(__decorate_internal_int__) +xx(__decorate_internal_bool__) +xx(__decorate_internal_float__) +xx(ResolveState) + +xx(DamageFunction) +xx(Length) +xx(Unit) +xx(Size) +xx(Push) +xx(Insert) +xx(Copy) +xx(Move) +xx(Voidptr) +xx(StateLabel) +xx(SpriteID) +xx(TextureID) +xx(Overlay) +xx(IsValid) +xx(IsNull) +xx(Exists) +xx(SetInvalid) +xx(SetNull) + +xx(A_Punch) +xx(A_FirePistol) +xx(A_FireShotgun) +xx(A_FireShotgun2) +xx(A_FireCGun) +xx(A_FireMissile) +xx(A_Saw) +xx(A_FirePlasma) +xx(A_FireBFG) +xx(A_FireOldBFG) +xx(A_FireRailgun) + +// color channels +xx(a) +xx(r) +xx(g) +xx(b) + +// Special translation names +xx(RainPillar1) +xx(RainPillar2) +xx(RainPillar3) +xx(RainPillar4) +xx(RainPillar5) +xx(RainPillar6) +xx(RainPillar7) +xx(RainPillar8) + +xx(Player1) +xx(Player2) +xx(Player3) +xx(Player4) +xx(Player5) +xx(Player6) +xx(Player7) +xx(Player8) +xx(PlayerChunk) +xx(RestrictedToPlayerClass) +xx(ForbiddenToPlayerClass) + +xx(Prototype) +xx(Void) +xx(Label) +xx(Pointer) +xx(Enum) +xx(StaticArray) +xx(DynArray) +xx(Struct) +xx(ReflectType) +xx(MessageBoxMenu) + +xx(Both) +xx(Physical) +xx(Visual) + +xx(OptionMenuItemSubmenu) +xx(OptionMenuItemCommand) +xx(OptionMenuItemControlBase) +xx(OptionMenuItemOptionBase) +xx(OptionMenuSliderBase) +xx(OptionMenuFieldBase) +xx(OptionMenuItemColorPicker) +xx(OptionMenuItemStaticText) +xx(OptionMenuItemStaticTextSwitchable) + +// blacklisted former CVARs +xx(snd_waterlp) +xx(snd_output) +xx(snd_output_format) +xx(snd_speakermode) +xx(snd_resampler) + +// ScriptUtil entry points +xx(ScriptUtil) +xx(SetMarineWeapon) +xx(SetMarineSprite) +xx(GiveInventory) +xx(TakeInventory) +xx(ClearInventory) + +// Weapon member fields that need direct access +xx(Ammo1) +xx(Ammo2) +xx(AmmoType1) +xx(AmmoType2) +xx(AmmoGive1) +xx(AmmoGive2) +xx(AmmoUse1) +xx(SisterWeapon) +xx(BobStyle) +xx(Kickback) +xx(MinSelAmmo1) +xx(bDehAmmo) +xx(FOVScale) +xx(LookScale) +xx(YAdjust) +xx(Crosshair) +xx(WeaponFlags) +xx(DropTime) +xx(PickupSound) + +// PlayerPawn member fields +xx(ColorRangeStart) +xx(ColorRangeEnd) +xx(InvFirst) +xx(ForwardMove1) +xx(ForwardMove2) +xx(SideMove1) +xx(SideMove2) +xx(Face) +xx(Slot) +xx(SoundClass) +xx(ViewBob) +xx(DamageFade) +xx(MaxHealth) +xx(crouchsprite) +xx(UseRange) +xx(AttackZOffset) +xx(SpawnMask) +xx(ScoreIcon) +xx(ViewHeight) +xx(FallingScreamMinSpeed) +xx(FallingScreamMaxSpeed) +xx(GruntSpeed) +xx(JumpZ) +xx(MugShotMaxHealth) +xx(BonusHealth) +xx(PlayerFlags) +xx(InvSel) +xx(FullHeight) + +xx(BlueCard) +xx(YellowCard) +xx(RedCard) +xx(BlueSkull) +xx(YellowSkull) +xx(RedSkull) +xx(DynamicLight) +xx(SpotInnerAngle) +xx(SpotOuterAngle) +xx(lightflags) +xx(lighttype) +xx(InternalDynamicLight) +xx(_a_chase_default) +xx(MapMarker) +xx(Spawn2) +xx(LevelLocals) +xx(Level) +xx(PlayerTeam) +xx(PlayerColors) +xx(PlayerSkin) +xx(NewPlayerMenu) +xx(AltHud) diff --git a/source/core/utility/strnatcmp.c b/source/core/utility/strnatcmp.c deleted file mode 100644 index 58fa5571a..000000000 --- a/source/core/utility/strnatcmp.c +++ /dev/null @@ -1,176 +0,0 @@ -/* -*- mode: c; c-file-style: "k&r" -*- - - strnatcmp.c -- Perform 'natural order' comparisons of strings in C. - Copyright (C) 2000, 2004 by Martin Pool - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - - -/* partial change history: - * - * 2004-10-10 mbp: Lift out character type dependencies into macros. - * - * Eric Sosman pointed out that ctype functions take a parameter whose - * value must be that of an unsigned int, even on platforms that have - * negative chars in their default char type. - */ - -#include -#include - -#include "strnatcmp.h" - - -/* These are defined as macros to make it easier to adapt this code to - * different characters types or comparison functions. */ -static __inline int -nat_isdigit(nat_char a) -{ - return isdigit((unsigned char) a); -} - - -static __inline int -nat_isspace(nat_char a) -{ - return isspace((unsigned char) a); -} - - -static __inline nat_char -nat_toupper(nat_char a) -{ - return toupper((unsigned char) a); -} - - - -static int -compare_right(nat_char const *a, nat_char const *b) -{ - int bias = 0; - - /* The longest run of digits wins. That aside, the greatest - value wins, but we can't know that it will until we've scanned - both numbers to know that they have the same magnitude, so we - remember it in BIAS. */ - for (;; a++, b++) { - if (!nat_isdigit(*a) && !nat_isdigit(*b)) - return bias; - else if (!nat_isdigit(*a)) - return -1; - else if (!nat_isdigit(*b)) - return +1; - else if (*a < *b) { - if (!bias) - bias = -1; - } else if (*a > *b) { - if (!bias) - bias = +1; - } else if (!*a && !*b) - return bias; - } - - return 0; -} - - -static int -compare_left(nat_char const *a, nat_char const *b) -{ - /* Compare two left-aligned numbers: the first to have a - different value wins. */ - for (;; a++, b++) { - if (!nat_isdigit(*a) && !nat_isdigit(*b)) - return 0; - else if (!nat_isdigit(*a)) - return -1; - else if (!nat_isdigit(*b)) - return +1; - else if (*a < *b) - return -1; - else if (*a > *b) - return +1; - } - - return 0; -} - - -static int strnatcmp0(nat_char const *a, nat_char const *b, int fold_case) -{ - int ai, bi; - nat_char ca, cb; - int fractional, result; - - assert(a && b); - ai = bi = 0; - while (1) { - ca = a[ai]; cb = b[bi]; - - /* skip over leading spaces or zeros */ - while (nat_isspace(ca)) - ca = a[++ai]; - - while (nat_isspace(cb)) - cb = b[++bi]; - - /* process run of digits */ - if (nat_isdigit(ca) && nat_isdigit(cb)) { - fractional = (ca == '0' || cb == '0'); - - if (fractional) { - if ((result = compare_left(a+ai, b+bi)) != 0) - return result; - } else { - if ((result = compare_right(a+ai, b+bi)) != 0) - return result; - } - } - - if (!ca && !cb) { - /* The strings compare the same. Perhaps the caller - will want to call strcmp to break the tie. */ - return 0; - } - - if (fold_case) { - ca = nat_toupper(ca); - cb = nat_toupper(cb); - } - - if (ca < cb) - return -1; - else if (ca > cb) - return +1; - - ++ai; ++bi; - } -} - - - -int strnatcmp(nat_char const *a, nat_char const *b) { - return strnatcmp0(a, b, 0); -} - - -/* Compare, recognizing numeric string and ignoring case. */ -int strnatcasecmp(nat_char const *a, nat_char const *b) { - return strnatcmp0(a, b, 1); -} diff --git a/source/core/utility/strnatcmp.h b/source/core/utility/strnatcmp.h deleted file mode 100644 index 7d7462349..000000000 --- a/source/core/utility/strnatcmp.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- mode: c; c-file-style: "k&r" -*- - - strnatcmp.c -- Perform 'natural order' comparisons of strings in C. - Copyright (C) 2000, 2004 by Martin Pool - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* CUSTOMIZATION SECTION - * - * You can change this typedef, but must then also change the inline - * functions in strnatcmp.c */ -typedef char nat_char; - -int strnatcmp(nat_char const *a, nat_char const *b); -int strnatcasecmp(nat_char const *a, nat_char const *b); - -#ifdef __cplusplus -} -#endif diff --git a/source/core/utility/superfasthash.cpp b/source/core/utility/superfasthash.cpp deleted file mode 100644 index a443809f0..000000000 --- a/source/core/utility/superfasthash.cpp +++ /dev/null @@ -1,127 +0,0 @@ -#include -#include -#include - -/* ======================================================================== */ - -/* By Paul Hsieh (C) 2004, 2005. Covered under the Paul Hsieh derivative - license. See: - http://www.azillionmonkeys.com/qed/weblicense.html for license details. - - http://www.azillionmonkeys.com/qed/hash.html */ - -#undef get16bits -#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ - || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) -#define get16bits(d) (*((const uint16_t *) (d))) -#endif - -#if !defined (get16bits) -#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8)\ - +(uint32_t)(((const uint8_t *)(d))[0]) ) -#endif - -uint32_t SuperFastHash (const char *data, size_t len) -{ - uint32_t hash = 0, tmp; - size_t rem; - - if (len == 0 || data == NULL) return 0; - - rem = len & 3; - len >>= 2; - - /* Main loop */ - for (;len > 0; len--) - { - hash += get16bits (data); - tmp = (get16bits (data+2) << 11) ^ hash; - hash = (hash << 16) ^ tmp; - data += 2*sizeof (uint16_t); - hash += hash >> 11; - } - - /* Handle end cases */ - switch (rem) - { - case 3: hash += get16bits (data); - hash ^= hash << 16; - hash ^= data[sizeof (uint16_t)] << 18; - hash += hash >> 11; - break; - case 2: hash += get16bits (data); - hash ^= hash << 11; - hash += hash >> 17; - break; - case 1: hash += *data; - hash ^= hash << 10; - hash += hash >> 1; - } - - /* Force "avalanching" of final 127 bits */ - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - - return hash; -} - -/* A modified version to do a case-insensitive hash */ - -#undef get16bits -#define get16bits(d) ((((uint32_t)tolower(((const uint8_t *)(d))[1])) << 8)\ - +(uint32_t)tolower(((const uint8_t *)(d))[0]) ) - -uint32_t SuperFastHashI (const char *data, size_t len) -{ - uint32_t hash = 0, tmp; - size_t rem; - - if (len <= 0 || data == NULL) return 0; - - rem = len & 3; - len >>= 2; - - /* Main loop */ - for (;len > 0; len--) - { - hash += get16bits (data); - tmp = (get16bits (data+2) << 11) ^ hash; - hash = (hash << 16) ^ tmp; - data += 2*sizeof (uint16_t); - hash += hash >> 11; - } - - /* Handle end cases */ - switch (rem) - { - case 3: hash += get16bits (data); - hash ^= hash << 16; - hash ^= tolower(data[sizeof (uint16_t)]) << 18; - hash += hash >> 11; - break; - case 2: hash += get16bits (data); - hash ^= hash << 11; - hash += hash >> 17; - break; - case 1: hash += tolower(*data); - hash ^= hash << 10; - hash += hash >> 1; - } - - /* Force "avalanching" of final 127 bits */ - hash ^= hash << 3; - hash += hash >> 5; - hash ^= hash << 4; - hash += hash >> 17; - hash ^= hash << 25; - hash += hash >> 6; - - return hash; -} - -/* ======================================================================== */ - diff --git a/source/core/utility/superfasthash.h b/source/core/utility/superfasthash.h deleted file mode 100644 index 972025202..000000000 --- a/source/core/utility/superfasthash.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -#include - -uint32_t SuperFastHash (const char *data, size_t len); -uint32_t SuperFastHashI (const char *data, size_t len); - -inline unsigned int MakeKey(const char* s) -{ - if (s == NULL) - { - return 0; - } - return SuperFastHashI(s, strlen(s)); -} - -inline unsigned int MakeKey(const char* s, size_t len) -{ - return SuperFastHashI(s, len); -} - diff --git a/source/core/utility/w_zip.h b/source/core/utility/w_zip.h deleted file mode 100644 index af0ac90e2..000000000 --- a/source/core/utility/w_zip.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __W_ZIP -#define __W_ZIP - -#pragma pack(1) -// FZipCentralInfo -struct FZipEndOfCentralDirectory -{ - uint32_t Magic; - uint16_t DiskNumber; - uint16_t FirstDisk; - uint16_t NumEntries; - uint16_t NumEntriesOnAllDisks; - uint32_t DirectorySize; - uint32_t DirectoryOffset; - uint16_t ZipCommentLength; -}; - -// FZipFileInfo -struct FZipCentralDirectoryInfo -{ - uint32_t Magic; - uint8_t VersionMadeBy[2]; - uint8_t VersionToExtract[2]; - uint16_t Flags; - uint16_t Method; - uint16_t ModTime; - uint16_t ModDate; - uint32_t CRC32; - uint32_t CompressedSize; - uint32_t UncompressedSize; - uint16_t NameLength; - uint16_t ExtraLength; - uint16_t CommentLength; - uint16_t StartingDiskNumber; - uint16_t InternalAttributes; - uint32_t ExternalAttributes; - uint32_t LocalHeaderOffset; - // file name and other variable length info follows -}; - -// FZipLocalHeader -struct FZipLocalFileHeader -{ - uint32_t Magic; - uint8_t VersionToExtract[2]; - uint16_t Flags; - uint16_t Method; - uint16_t ModTime; - uint16_t ModDate; - uint32_t CRC32; - uint32_t CompressedSize; - uint32_t UncompressedSize; - uint16_t NameLength; - uint16_t ExtraLength; - // file name and other variable length info follows -}; - - -#pragma pack() - -#define ZIP_LOCALFILE MAKE_ID('P','K',3,4) -#define ZIP_CENTRALFILE MAKE_ID('P','K',1,2) -#define ZIP_ENDOFDIR MAKE_ID('P','K',5,6) - -// File header flags. -#define ZF_ENCRYPTED 0x1 - -#endif diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 8f75db897..44dbebec5 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -5488,7 +5488,7 @@ void G_BackToMenu(void) ud.warp_on = 0; g_player[myconnectindex].ps->gm = 0; M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); inputState.keyFlushChars(); } @@ -5791,7 +5791,7 @@ MAIN_LOOP_RESTART: if (g_networkMode != NET_DEDICATED_SERVER) { M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); if (G_PlaybackDemo()) { diff --git a/source/exhumed/src/d_menu.cpp b/source/exhumed/src/d_menu.cpp index 8a4fc6bfd..ef9df7fe8 100644 --- a/source/exhumed/src/d_menu.cpp +++ b/source/exhumed/src/d_menu.cpp @@ -47,7 +47,7 @@ int menu_Menu(int nVal) { MenuExitCondition = -2; M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); while (M_Active()) { auto nLogoTile = EXHUMED ? kExhumedLogo : kPowerslaveLogo; @@ -107,7 +107,7 @@ class PSMainMenu : public DListMenu void PreDraw() override { - if (mDesc->mMenuName == NAME_MainMenu) + if (mDesc->mMenuName == NAME_Mainmenu) menu_DoPlasma(); else { diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 138103815..8209162ea 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -6866,7 +6866,7 @@ void G_BackToMenu(void) ud.warp_on = 0; g_player[myconnectindex].ps->gm = 0; M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); inputState.keyFlushChars(); } @@ -7170,7 +7170,7 @@ MAIN_LOOP_RESTART: //if (g_networkMode != NET_DEDICATED_SERVER) { M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); if (G_PlaybackDemo()) { FX_StopAllSounds(); diff --git a/source/sw/src/d_menu.cpp b/source/sw/src/d_menu.cpp index 154a7a24f..481552d67 100644 --- a/source/sw/src/d_menu.cpp +++ b/source/sw/src/d_menu.cpp @@ -82,7 +82,7 @@ class SWMainMenu : public DListMenu for (unsigned e = 0; e < mDesc->mItems.Size(); ++e) { auto entry = mDesc->mItems[e]; - if (entry->GetAction(nullptr) == NAME_SaveGameMenu) + if (entry->GetAction(nullptr) == NAME_Savegamemenu) { entry->mEnabled = gi->CanSave(); } diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index e3fb0977c..59578033a 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -1667,7 +1667,7 @@ void MenuLevel(void) short w,h; M_StartControlPanel(false); - M_SetMenu(NAME_MainMenu); + M_SetMenu(NAME_Mainmenu); // do demos only if not playing multi play if (!CommEnabled && numplayers <= 1 && !FinishAnim && !NoDemoStartup) {