From dc3d5ce1a5001ef7d9b7fd3ebb785d64fa095576 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 8 Nov 2026 16:44:36 +0000 Subject: [PATCH] Maintenance: Resubmission of 14942 (gate: three existing in-class helpers whose lines changed lacked an annotation; marked // INLINED Batch #14943 by ragnarok-clanker: no function's compiled code changes; checked with 741 compiled unit(s), including every includer of Source/ActorPickNode.h, Source/Client/Browser/BrowserClientSite.h, Source/Client/Browser/BrowserPopupDispatch.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Mode/CMode.h, Source/Client/Mode/ModeDragState.h, Source/Client/Replay.h, Source/Client/Session.h, Source/Client/Stove/StoveMgr.h, Source/Contents/AchievementMgr.h, Source/Contents/ActorNameCard.h, Source/Contents/Actors/CharacterRender.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/GroundScope.h, Source/Contents/Actors/Item.h, Source/Contents/Actors/Npc.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObjectState.h, Source/Contents/Actors/Skill.h, Source/Contents/AdventureGuideMgr.h, Source/Contents/Camera/Camera.h, Source/Contents/Camera/CameraState.h, Source/Contents/CashEmotionMgr.h, Source/Contents/Configuration/GameSettingsMgr.h, Source/Contents/EffectResourceSwitcher.h, Source/Contents/Effects/AMachineEffect.h, Source/Contents/Effects/AcidifiedThrow.h, Source/Contents/Effects/AxeBoomerang.h, Source/Contents/Effects/BlastForge.h, Source/Contents/Effects/CaneOfEvilEyeEffect.h, Source/Contents/Effects/CharacterParticleBundle.h, Source/Contents/Effects/CloudKillEffect.h, Source/Contents/Effects/Effect.h, Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/EffectEmitter.h, Source/Contents/Effects/EffectMaker.h, Source/Contents/Effects/EffectPrimitiveState.h, Source/Contents/Effects/FuumaShouakuEffect.h, Source/Contents/Effects/GravityControlEffect.h, Source/Contents/Effects/HealSpEffect.h, Source/Contents/Effects/Level99Effect.h, Source/Contents/Effects/MapChainEffect.h, Source/Contents/Effects/MonsterSkillEffects.h, Source/Contents/Effects/MsgEffect.h, Source/Contents/Effects/NyanggrassEffect.h, Source/Contents/Effects/Particle.h, Source/Contents/Effects/PowderingEffect.h, Source/Contents/Effects/RagEffectState.h, Source/Contents/Effects/RectUpEffect.h, Source/Contents/Effects/ShadowExceedEffect.h, Source/Contents/Effects/SkillEffects.h, Source/Contents/Effects/SpriteParticle.h, Source/Contents/Effects/StormCannonEffect.h, Source/Contents/Effects/ThrowEffects.h, Source/Contents/EntryQueueMgr.h, Source/Contents/EquipmentResourceMgr.h, Source/Contents/FlyingShipRouteInfo.h, Source/Contents/Ground/GroundGeometry.h, Source/Contents/GuildInfo.h, Source/Contents/Items/ItemDescription.h, Source/Contents/Items/ItemInfo.h, Source/Contents/MapSkyMgr.h, Source/Contents/Messenger/MessengerWindows.h, Source/Contents/Models/ModelNode.h, Source/Contents/NavigationManager.h, Source/Contents/Party/AdventurerAgencyMgr.h, Source/Contents/RDamageVar.h, Source/Contents/RenewQuestMgr.h, Source/Contents/ReputeMgr.h, Source/Contents/RodexMailStore.h, Source/Contents/RouletteMgr.h, Source/Contents/Schedule/Schedule.h, Source/Contents/SignBoard/SignBoard.h, Source/Contents/Skills/ClientSkills.h, Source/Contents/Skills/PlayerSkillBundle.h, Source/Contents/Skills/SkillInfo.h, Source/Contents/SpriteLayerDrawing.h, Source/Contents/TipBoxTitles.h, Source/Contents/UserData/AccountLinkedUserDataMgr.h, Source/Contents/UserData/NormalItemSlots.h, Source/Contents/World/World.h, Source/Contents/WorldView/WorldViewData.h, Source/Render/Primitives/LightmappedPrimitive.h, Source/Render/Primitives/RenderPrimitive.h, Source/Render/Renderer.h, Source/Render/Textures/SpritePixels.h, Source/Render/Textures/Texture.h, Source/Resource/EZeffectResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/World/GroundResource.h, Source/Resource/World/WorldResource.h, Source/Resource/XmlNode.h, Source/UI/AdventureGuide/UIAdventureGuide.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UIDescriptRace.h, Source/UI/Buttons/UIItemTagButton.h, Source/UI/Buttons/UISlotBmpButton.h, Source/UI/Buttons/UISpriteButton.h, Source/UI/Buttons/UITVTextButton.h, Source/UI/Buttons/UITextureButton.h, Source/UI/CashEmotion/UICashEmotionListWnd.h, Source/UI/CashEmotion/UICashEmotionPack.h, Source/UI/CashShop/UICashShopWnd.h, Source/UI/Chat/UIChatRoomMakeWnd.h, Source/UI/Chat/UIChatRoomTitle.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Chat/UISubChatHisWnd.h, Source/UI/Chat/UISubChatMiniWnd.h, Source/UI/Chat/UIWhisperWnd.h, Source/UI/Clan/UIClanWnd.h, Source/UI/Dialogs/UIBookWnd.h, Source/UI/Dialogs/UIChooseWarpWnd.h, Source/UI/Dialogs/UIMenuWnd.h, Source/UI/Dialogs/UIMiniMapWnd.h, Source/UI/Dialogs/UIMinimapZoomWnd.h, Source/UI/Dialogs/UINpcEditDialogWnd.h, Source/UI/Dialogs/UIPasswordWnd.h, Source/UI/Dialogs/UISayDialogWnd.h, Source/UI/Dialogs/UISelectCartWnd.h, Source/UI/Dialogs/UITipboxWnd.h, Source/UI/Edit/UIEditBoxEx.h, Source/UI/Edit/UIEditCtrl.h, Source/UI/Edit/UIEditCtrl_Currency.h, Source/UI/Edit/UIItemTagCtrl.h, Source/UI/Enchant/EnchantUI.h, Source/UI/Exchange/UIExchangeUI.h, Source/UI/FrameSkin.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/Gauges/UIPcGage.h, Source/UI/Guild/UIGuildHelperWnd.h, Source/UI/Guild/UIGuildWnd.h, Source/UI/Guild/UIGuild_Storage_Log.h, Source/UI/Item/UIEquipmentPropertiesWnd.h, Source/UI/Item/UIItemBaseWnd.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemShopWnd.h, Source/UI/Item/UIItemShopWnd2.h, Source/UI/Item/UIItemStoreFindWnd.h, Source/UI/Item/UIItemStoreSubWnd.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIMerchantItemLogWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/UICardItemIllustWnd.h, Source/UI/Items/UIEquipWnd.h, Source/UI/Items/UIExchangeWnd.h, Source/UI/Items/UIGameItem.h, Source/UI/Items/UIItemCollectionWnd.h, Source/UI/Items/UIItemIdentifyWnd.h, Source/UI/Items/UIItemParamChangeDisplayWnd.h, Source/UI/Items/UISwapEquipmentWnd.h, Source/UI/Layout/WindowGeometry.h, Source/UI/Lists/UIChatHisBox.h, Source/UI/Lists/UIComboBoxV2Wnd.h, Source/UI/Lists/UIImgMenu.h, Source/UI/Lists/UIListBoxID.h, Source/UI/Lists/UIListBoxTemplate.h, Source/UI/Lists/UIMemberListBox.h, Source/UI/Lists/UITabControl.h, Source/UI/Lists/UITagListBox.h, Source/UI/Lists/UITreeView.h, Source/UI/Menu/UIMenuIconWnd.h, Source/UI/Navigation/UINavigationV4Wnd.h, Source/UI/ProbabilityTable/UIProbabilityTable.h, Source/UI/Quest/UIQuestDisplay.h, Source/UI/Quest/UIRenewQuestUI.h, Source/UI/Quest/UIRenewQuestWnd.h, Source/UI/Rodex/UIRodexComposeWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/RuneSystem/UIRuneSystemWindows.h, Source/UI/RuneSystem/UIRuneSystemWnd.h, Source/UI/Shop/UIMerchantItemMyShopWnd.h, Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h, Source/UI/Shop/UIMerchantItemPurchaseWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/Shop/UIMerchantShopTitle.h, Source/UI/Skill/UISkillDescribeWnd.h, Source/UI/Skill/UISkillListWnd.h, Source/UI/SkillDelayInfo/SkillDelayInfo.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/Text/CreateLineInfo.h, Source/UI/Text/UIAchWnd.h, Source/UI/Text/UIBalloonText.h, Source/UI/Text/UINameBalloonText.h, Source/UI/Text/UIStaticTextControl.h, Source/UI/Text/UIString.h, Source/UI/Text/UITextViewerControl.h, Source/UI/UIBarGraph.h, Source/UI/UIBartermarketWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/UIMacroBlackListCheckWnd.h, Source/UI/UIMacroDetectorWnd.h, Source/UI/UIMacroReport.h, Source/UI/UIMacroUserInfoWnd.h, Source/UI/UIPreviewEquipWnd.h, Source/UI/UIRefiningWnd.h, Source/UI/UIScrollWnd.h, Source/UI/UISlotBitmap.h, Source/UI/Window/FuncDrawWNDChar.h, Source/UI/Window/UIBattleMsgOptionWnd.h, Source/UI/Window/UIChatRoomWnd.h, Source/UI/Window/UICollectionSystemWnd.h, Source/UI/Window/UIControl.h, Source/UI/Window/UIHomunInfoWnd.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UIJobListWnd.h, Source/UI/Window/UILoginOTPWnd.h, Source/UI/Window/UILoginWnd.h, Source/UI/Window/UIMakeCharWnd.h, Source/UI/Window/UIMonsterDisplayWnd.h, Source/UI/Window/UIMonsterInfoWnd.h, Source/UI/Window/UINavigationHelpWnd.h, Source/UI/Window/UINavigationWnd.h, Source/UI/Window/UINewMakeCharWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINoticeWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIRegisterMgr.h, Source/UI/Window/UIRoMapWnd.h, Source/UI/Window/UIRodexContentsWnd.h, Source/UI/Window/UISecondCostumeWnd.h, Source/UI/Window/UISeekPartyMBWnd.h, Source/UI/Window/UISeekPartyWnd.h, Source/UI/Window/UISelCharForUServerWnd.h, Source/UI/Window/UISerachStoreInfoWnd.h, Source/UI/Window/UITransMenuWnd.h, Source/UI/Window/UIWindow.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl, Source/Utility/Lexicon/LexiconSerializer.h. --- Source/ActorPickNode.cpp | 8 +- Source/ActorPickNode.h | 2 +- Source/Archive/GPak.cpp | 22 +- .../Client/Application/ApplicationWindow.cpp | 6 +- Source/Client/Application/Launcher.cpp | 2 +- Source/Client/Browser/BrowserClientSite.cpp | 2 +- Source/Client/Browser/BrowserClientSite.h | 2 +- Source/Client/Browser/BrowserPopupDispatch.h | 4 +- Source/Client/Input/Language.cpp | 6 +- Source/Client/Mode/CGameMode.h | 206 +- Source/Client/Mode/CLoginMode.h | 52 +- Source/Client/Mode/CMode.h | 4 +- Source/Client/Mode/GameMode.cpp | 1922 ++-- Source/Client/Mode/GameModeActorEffects.cpp | 2 +- Source/Client/Mode/GameModeEquipWindow.cpp | 26 +- Source/Client/Mode/GameModeHandlers.cpp | 430 +- Source/Client/Mode/GameModeItemLists.cpp | 42 +- Source/Client/Mode/GameModeMiniMap.cpp | 68 +- Source/Client/Mode/GameModeNames.cpp | 16 +- Source/Client/Mode/GameModeNotices.cpp | 1010 +- Source/Client/Mode/GameModePackets.cpp | 4232 ++++---- Source/Client/Mode/LoginMode.cpp | 410 +- Source/Client/Mode/ModeCursor.cpp | 4 +- Source/Client/Mode/ModeDragState.cpp | 38 +- Source/Client/Mode/ModeDragState.h | 14 +- Source/Client/ModeCursorDrawing.cpp | 6 +- Source/Client/Replay.cpp | 386 +- Source/Client/Replay.h | 36 +- Source/Client/ReplayPacketRecorder.cpp | 10 +- Source/Client/Session.cpp | 954 +- Source/Client/Session.h | 556 +- Source/Client/SessionAchievements.cpp | 34 +- Source/Client/SessionParty.cpp | 2 +- Source/Client/SessionPredicates.cpp | 22 +- Source/Client/SessionState.cpp | 1102 +-- Source/Client/Stove/StoveMgr.cpp | 74 +- Source/Client/Stove/StoveMgr.h | 14 +- Source/Contents/AchievementMgr.cpp | 28 +- Source/Contents/AchievementMgr.h | 30 +- Source/Contents/ActorGeometry.cpp | 26 +- Source/Contents/ActorMovementRoute.cpp | 4 +- Source/Contents/ActorNameCache.cpp | 20 +- Source/Contents/ActorNameCard.cpp | 14 +- Source/Contents/ActorNameCard.h | 24 +- Source/Contents/Actors/CharacterRender.cpp | 136 +- Source/Contents/Actors/CharacterRender.h | 80 +- Source/Contents/Actors/EffectActors.h | 2 +- Source/Contents/Actors/GameActor.cpp | 500 +- Source/Contents/Actors/GameActor.h | 260 +- Source/Contents/Actors/GameObject.cpp | 910 +- Source/Contents/Actors/GrannyGameActor.h | 8 +- Source/Contents/Actors/GroundScope.cpp | 2 +- Source/Contents/Actors/GroundScope.h | 2 +- Source/Contents/Actors/Item.cpp | 18 +- Source/Contents/Actors/Item.h | 2 +- Source/Contents/Actors/MercenaryAI.cpp | 70 +- Source/Contents/Actors/MousePointer.cpp | 6 +- Source/Contents/Actors/Npc.h | 40 +- Source/Contents/Actors/Pc.h | 200 +- Source/Contents/Actors/Player.cpp | 1660 ++-- Source/Contents/Actors/RenderObject.cpp | 1076 +-- Source/Contents/Actors/RenderObjectState.cpp | 68 +- Source/Contents/Actors/RenderObjectState.h | 82 +- Source/Contents/Actors/Skill.cpp | 126 +- Source/Contents/Actors/Skill.h | 2 +- .../Contents/Actors/SpriteDrawingPolicy.cpp | 8 +- Source/Contents/AdventureGuideMgr.cpp | 78 +- Source/Contents/AdventureGuideMgr.h | 54 +- Source/Contents/Camera/Camera.h | 2 +- Source/Contents/Camera/CameraState.h | 2 +- Source/Contents/CashEmotionMgr.cpp | 312 +- Source/Contents/CashEmotionMgr.h | 34 +- Source/Contents/ClientItemLists.cpp | 566 +- Source/Contents/ClientState.cpp | 372 +- Source/Contents/ClientTiming.cpp | 122 +- .../Contents/Configuration/GameSettingsMgr.h | 4 +- .../Contents/Configuration/ServiceOptions.cpp | 40 +- Source/Contents/EffectResourceSwitcher.cpp | 66 +- Source/Contents/EffectResourceSwitcher.h | 28 +- Source/Contents/Effects/AMachineEffect.cpp | 36 +- Source/Contents/Effects/AMachineEffect.h | 6 +- Source/Contents/Effects/AcidifiedThrow.cpp | 128 +- Source/Contents/Effects/AcidifiedThrow.h | 10 +- .../Effects/AnimatedEmitterEffect.cpp | 4 +- Source/Contents/Effects/ArrowEffect.cpp | 6 +- .../Contents/Effects/AstralStrikeEffect.cpp | 6 +- Source/Contents/Effects/AxeBoomerang.cpp | 72 +- Source/Contents/Effects/AxeBoomerang.h | 18 +- Source/Contents/Effects/Bash.cpp | 48 +- Source/Contents/Effects/BindTrapEffect.cpp | 16 +- Source/Contents/Effects/BlastForge.cpp | 176 +- Source/Contents/Effects/BlastForge.h | 12 +- .../Contents/Effects/CaneOfEvilEyeEffect.cpp | 98 +- Source/Contents/Effects/CaneOfEvilEyeEffect.h | 8 +- Source/Contents/Effects/CartCannon.cpp | 2 +- Source/Contents/Effects/CellRangeEffect.cpp | 16 +- .../Effects/CharacterParticleBundle.cpp | 20 +- .../Effects/CharacterParticleBundle.h | 2 +- .../Contents/Effects/ChargingPierceEffect.cpp | 24 +- .../Contents/Effects/CherryBlossomEffect.cpp | 22 +- Source/Contents/Effects/ClimaxEffect.cpp | 4 +- Source/Contents/Effects/CloudEffect.cpp | 32 +- Source/Contents/Effects/CloudKillEffect.cpp | 96 +- Source/Contents/Effects/CloudKillEffect.h | 8 +- Source/Contents/Effects/CommonFloorEffect.cpp | 30 +- Source/Contents/Effects/Competentia.cpp | 2 +- Source/Contents/Effects/CresciveBolt.cpp | 2 +- .../Contents/Effects/DummyEffectLauncher.cpp | 4 +- Source/Contents/Effects/EZ2STREffect.cpp | 26 +- Source/Contents/Effects/Effect.cpp | 14 +- Source/Contents/Effects/Effect.h | 24 +- Source/Contents/Effects/EffectActor.cpp | 4 +- Source/Contents/Effects/EffectActor.h | 2 +- Source/Contents/Effects/EffectEmitter.h | 24 +- Source/Contents/Effects/EffectLists.cpp | 6 +- Source/Contents/Effects/EffectMaker.cpp | 56 +- Source/Contents/Effects/EffectMaker.h | 18 +- Source/Contents/Effects/EffectMemoryMgr.cpp | 10 +- Source/Contents/Effects/EffectPrim.cpp | 18 +- .../Contents/Effects/EffectPrimitiveArcs.cpp | 20 +- .../Contents/Effects/EffectPrimitiveColor.cpp | 16 +- .../Effects/EffectPrimitiveMotion.cpp | 18 +- .../Effects/EffectPrimitiveRecords.cpp | 2 +- .../Effects/EffectPrimitiveRendering.cpp | 92 +- .../Effects/EffectPrimitiveSprites.cpp | 20 +- .../Contents/Effects/EffectPrimitiveState.cpp | 12 +- .../Contents/Effects/EffectPrimitiveState.h | 16 +- Source/Contents/Effects/EffectVisibility.cpp | 6 +- Source/Contents/Effects/ElectricEffect.cpp | 46 +- Source/Contents/Effects/EmitterEffect.cpp | 52 +- Source/Contents/Effects/EnergyOrbEffect.cpp | 52 +- Source/Contents/Effects/EvilLandEffect.cpp | 24 +- Source/Contents/Effects/EvilsPawEffect.cpp | 14 +- .../Contents/Effects/FlowerCastingEffect.cpp | 72 +- Source/Contents/Effects/FortuneKissEffect.cpp | 22 +- Source/Contents/Effects/FriggSongEffect.cpp | 54 +- .../Contents/Effects/FuumaShouakuEffect.cpp | 30 +- Source/Contents/Effects/FuumaShouakuEffect.h | 8 +- Source/Contents/Effects/GlassWallEffect.cpp | 32 +- .../Contents/Effects/GravityControlEffect.h | 6 +- Source/Contents/Effects/HealEffect.cpp | 164 +- Source/Contents/Effects/HealSpEffect.cpp | 50 +- Source/Contents/Effects/HealSpEffect.h | 4 +- Source/Contents/Effects/HitLineEffect.cpp | 48 +- .../Effects/JupitelThunderStormEffect.cpp | 6 +- Source/Contents/Effects/Level150Effect.cpp | 106 +- Source/Contents/Effects/Level99Effect.cpp | 74 +- Source/Contents/Effects/Level99Effect.h | 4 +- Source/Contents/Effects/Level99Orb1Effect.cpp | 22 +- Source/Contents/Effects/Level99Orb2Effect.cpp | 24 +- Source/Contents/Effects/LightSphereEffect.cpp | 62 +- Source/Contents/Effects/MagicFloorEffect.cpp | 80 +- Source/Contents/Effects/MagnumBreak.cpp | 78 +- .../Contents/Effects/MandraAttackEffect.cpp | 4 +- Source/Contents/Effects/MapChainEffect.cpp | 82 +- Source/Contents/Effects/MapChainEffect.h | 10 +- .../Contents/Effects/MapMagicZoneEffect.cpp | 88 +- Source/Contents/Effects/MappillarEffect.cpp | 60 +- Source/Contents/Effects/MeteorEffect.cpp | 46 +- .../Contents/Effects/MonsterSkillEffects.cpp | 1032 +- Source/Contents/Effects/MonsterSkillEffects.h | 128 +- Source/Contents/Effects/MsgEffect.cpp | 170 +- Source/Contents/Effects/MsgEffect.h | 14 +- Source/Contents/Effects/NyanggrassEffect.cpp | 26 +- Source/Contents/Effects/NyanggrassEffect.h | 4 +- Source/Contents/Effects/Particle.cpp | 50 +- Source/Contents/Effects/Particle.h | 54 +- .../Contents/Effects/PartyMemberEffects.cpp | 10 +- Source/Contents/Effects/PokJukEffect.cpp | 42 +- Source/Contents/Effects/PowderingEffect.cpp | 110 +- Source/Contents/Effects/PowderingEffect.h | 4 +- Source/Contents/Effects/RagEffect.cpp | 8558 ++++++++--------- Source/Contents/Effects/RagEffectState.h | 6 +- Source/Contents/Effects/RainbowEffect.cpp | 44 +- Source/Contents/Effects/RectUpEffect.cpp | 78 +- Source/Contents/Effects/RectUpEffect.h | 6 +- Source/Contents/Effects/RedLineEffect.cpp | 72 +- Source/Contents/Effects/RichManKim.cpp | 24 +- Source/Contents/Effects/RotateBgEffect.cpp | 68 +- Source/Contents/Effects/RotateItemEffect.cpp | 36 +- Source/Contents/Effects/RotateLineEffect.cpp | 42 +- .../Contents/Effects/SaintCastingEffect.cpp | 60 +- Source/Contents/Effects/ScatterEffect.cpp | 18 +- .../Contents/Effects/ShadowExceedEffect.cpp | 22 +- Source/Contents/Effects/ShadowExceedEffect.h | 4 +- .../Effects/ShadowExceedNewEffect.cpp | 40 +- Source/Contents/Effects/SkillEffects.h | 50 +- Source/Contents/Effects/SmokeEffect.cpp | 24 +- Source/Contents/Effects/SoulCollectEffect.cpp | 22 +- Source/Contents/Effects/SoulUnityEffect.cpp | 10 +- Source/Contents/Effects/SphereWind2Effect.cpp | 54 +- Source/Contents/Effects/SphereWindEffect.cpp | 42 +- Source/Contents/Effects/SpriteEffect.cpp | 38 +- Source/Contents/Effects/SpriteParticle.cpp | 48 +- Source/Contents/Effects/SpriteParticle.h | 14 +- Source/Contents/Effects/SquareRangeEffect.cpp | 4 +- Source/Contents/Effects/StarEffect.cpp | 42 +- Source/Contents/Effects/StarEmperorEffect.cpp | 54 +- Source/Contents/Effects/StealEffect.cpp | 18 +- Source/Contents/Effects/StormCannonEffect.h | 2 +- Source/Contents/Effects/StormGustEffect.cpp | 36 +- Source/Contents/Effects/StormKickEffect.cpp | 86 +- Source/Contents/Effects/SunStanceEffect.cpp | 14 +- .../Contents/Effects/TalismanMarkEffect.cpp | 58 +- Source/Contents/Effects/TetraBallEffect.cpp | 4 +- Source/Contents/Effects/ThrowEffects.cpp | 266 +- Source/Contents/Effects/ThrowEffects.h | 22 +- Source/Contents/Effects/TriangleShotArrow.cpp | 2 +- .../Contents/Effects/ViolentQuakeEffect.cpp | 14 +- Source/Contents/Effects/WindEffect.cpp | 34 +- Source/Contents/Emblems/EmblemDataMgr.cpp | 4 +- Source/Contents/EnchantMgr.cpp | 2 +- Source/Contents/EntryQueueMgr.cpp | 2 +- Source/Contents/EntryQueueMgr.h | 34 +- Source/Contents/EquipmentResourceMgr.h | 6 +- Source/Contents/EquipmentResources.cpp | 6 +- Source/Contents/FlyingShipRouteInfo.cpp | 18 +- Source/Contents/FlyingShipRouteInfo.h | 26 +- Source/Contents/Ground/GroundDecals.cpp | 8 +- Source/Contents/Ground/GroundGeometry.cpp | 6 +- Source/Contents/Ground/GroundGeometry.h | 12 +- Source/Contents/Ground/GroundLightmaps.cpp | 2 +- Source/Contents/Ground/GroundSamples.cpp | 8 +- .../Contents/Ground/GroundWaterRendering.cpp | 2 +- Source/Contents/GuildInfo.cpp | 122 +- Source/Contents/GuildInfo.h | 106 +- Source/Contents/HeadResources.cpp | 10 +- Source/Contents/HitSounds.cpp | 8 +- Source/Contents/Items/BarterMarketItemMgr.cpp | 4 +- Source/Contents/Items/ItemDescription.cpp | 10 +- Source/Contents/Items/ItemDescription.h | 6 +- Source/Contents/Items/ItemInfo.cpp | 266 +- Source/Contents/Items/ItemInfo.h | 74 +- Source/Contents/Items/ItemInfoMgr.cpp | 2 +- Source/Contents/Items/ItemLink.cpp | 12 +- Source/Contents/Items/ItemNaming.cpp | 66 +- .../Contents/Items/SelectPackageItemMgr.cpp | 16 +- Source/Contents/Jobs/JobInheritance.cpp | 94 +- .../Contents/Jobs/JobNameInitialization.cpp | 4 +- Source/Contents/MapNameTable.cpp | 2 +- Source/Contents/MapSkyMgr.cpp | 36 +- Source/Contents/MapSkyMgr.h | 2 +- Source/Contents/Messenger/ClientMessenger.cpp | 735 +- Source/Contents/Messenger/MessengerMember.cpp | 116 +- Source/Contents/Messenger/MessengerWindows.h | 6 +- Source/Contents/Models/ModelLighting.cpp | 2 +- Source/Contents/Models/ModelNode.cpp | 2 +- Source/Contents/Models/ModelNode.h | 2 +- Source/Contents/Models/ModelRendering.cpp | 20 +- Source/Contents/MonsterSpeech.cpp | 4 +- Source/Contents/NavigationLink.cpp | 8 +- Source/Contents/NavigationManager.h | 96 +- Source/Contents/NavigationRequest.cpp | 14 +- Source/Contents/NavigationRoute.cpp | 180 +- Source/Contents/NavigationSource.cpp | 104 +- Source/Contents/Party/AdventurerAgencyMgr.cpp | 2 +- Source/Contents/Party/AdventurerAgencyMgr.h | 2 +- Source/Contents/Party/AgencyRequests.cpp | 20 +- Source/Contents/Party/PartyJoinResult.cpp | 4 +- .../Party/StopRecruitingCompletion.cpp | 6 +- Source/Contents/PetStatus.cpp | 6 +- Source/Contents/RDamageVar.h | 4 +- Source/Contents/RenewQuestMgr.cpp | 100 +- Source/Contents/RenewQuestMgr.h | 18 +- Source/Contents/ReputeMgr.cpp | 4 +- Source/Contents/ReputeMgr.h | 4 +- Source/Contents/RobeTopLayer.cpp | 4 +- Source/Contents/RodexMailStore.cpp | 14 +- Source/Contents/RodexMailStore.h | 48 +- Source/Contents/RouletteMgr.cpp | 16 +- Source/Contents/RouletteMgr.h | 4 +- Source/Contents/Schedule/EmotionSchedule.cpp | 10 +- Source/Contents/Schedule/Schedule.cpp | 6 +- Source/Contents/Schedule/Schedule.h | 8 +- Source/Contents/Schedule/TimeScheduler.cpp | 6 +- Source/Contents/SignBoard/SignBoard.cpp | 42 +- Source/Contents/SignBoard/SignBoard.h | 12 +- Source/Contents/Skills/AutomaticSkills.cpp | 4 +- Source/Contents/Skills/ClientSkills.cpp | 206 +- Source/Contents/Skills/ClientSkills.h | 14 +- Source/Contents/Skills/PlayerSkillBundle.cpp | 12 +- Source/Contents/Skills/PlayerSkillBundle.h | 2 +- Source/Contents/Skills/SkillActionAlitea.cpp | 8 +- Source/Contents/Skills/SkillActionDruid.cpp | 2 +- Source/Contents/Skills/SkillActionInfo.cpp | 4 +- Source/Contents/Skills/SkillActionKarnos.cpp | 2 +- .../Contents/Skills/SkillActionSkyEmperor.cpp | 2 +- .../Skills/SkillActionSpiritHandler.cpp | 2 +- .../Contents/Skills/SkillActionWindHawk.cpp | 2 +- Source/Contents/Skills/SkillInfo.cpp | 36 +- Source/Contents/Skills/SkillInfo.h | 28 +- Source/Contents/Skills/SkillLevelRegistry.cpp | 2 +- Source/Contents/Skills/SkillTreeScript.cpp | 14 +- Source/Contents/Sound/SoundMaker.cpp | 600 +- Source/Contents/SpriteLayerDepth.cpp | 10 +- Source/Contents/SpriteLayerDrawing.cpp | 120 +- Source/Contents/SpriteLayerDrawing.h | 12 +- Source/Contents/SpriteRidingOffset.cpp | 2 +- Source/Contents/SpriteRobe.cpp | 22 +- Source/Contents/SpriteRobeCommands.cpp | 18 +- Source/Contents/SpriteShadow.cpp | 14 +- Source/Contents/Store/MCStoreInfoBackup.cpp | 6 +- Source/Contents/Store/StoreBackupData.cpp | 32 +- Source/Contents/TipBoxTitles.cpp | 54 +- Source/Contents/TipBoxTitles.h | 36 +- .../UserData/AccountLinkedUserDataMgr.cpp | 8 +- .../UserData/AccountLinkedUserDataMgr.h | 2 +- .../Contents/UserData/CharacterConfigLoad.cpp | 2 +- .../Contents/UserData/CharacterConfigSave.cpp | 6 +- Source/Contents/UserData/NormalItemSlots.cpp | 82 +- Source/Contents/UserData/NormalItemSlots.h | 60 +- Source/Contents/World/SkyBox.cpp | 4 +- Source/Contents/World/World.h | 28 +- Source/Contents/World/WorldModelLoading.cpp | 2 +- Source/Contents/World/WorldModelView.cpp | 16 +- Source/Contents/World/WorldObjects.cpp | 108 +- Source/Contents/World/WorldProximity.cpp | 28 +- Source/Contents/World/WorldSpatialTree.cpp | 14 +- Source/Contents/WorldView/WorldViewData.cpp | 34 +- Source/Contents/WorldView/WorldViewData.h | 30 +- Source/EntityInit.cpp | 102 +- Source/File/FileCreation.cpp | 16 +- Source/Network/ActorNamePacket.cpp | 4 +- Source/Network/ClientKeepalive.cpp | 4 +- Source/Network/Packets/SkillUpdatePacket.cpp | 34 +- Source/Render/ActionSpriteDrawing.cpp | 6 +- Source/Render/AlphaQueuesDX7.cpp | 2 +- Source/Render/DX7/RendererDX7Operations.cpp | 20 +- Source/Render/DX7/TextureDX7.cpp | 2 +- Source/Render/DX9/AlphaQueuesDX9.cpp | 2 +- Source/Render/DX9/QueuedDrawingDX9.cpp | 12 +- Source/Render/DX9/RendererDX9Operations.cpp | 2 +- Source/Render/DX9/TextureDX9.cpp | 2 +- .../Primitives/LightmappedPrimitive.cpp | 2 +- .../Render/Primitives/LightmappedPrimitive.h | 8 +- Source/Render/Primitives/RenderPrimitive.cpp | 2 +- Source/Render/Primitives/RenderPrimitive.h | 14 +- Source/Render/Primitives/RenderQueues.cpp | 8 +- Source/Render/Primitives/ScreenLine.cpp | 42 +- Source/Render/Renderer.cpp | 6 +- Source/Render/Renderer.h | 6 +- Source/Render/ScreenGeometry.cpp | 8 +- Source/Render/ScreenRectangle.cpp | 4 +- Source/Render/SpriteGeometry.cpp | 8 +- Source/Render/SpriteQuad.cpp | 6 +- Source/Render/Textures/BitmapPixels.cpp | 2 +- Source/Render/Textures/SpriteAtlas.cpp | 4 +- Source/Render/Textures/SpritePixels.h | 14 +- Source/Render/Textures/Texture.cpp | 14 +- Source/Render/Textures/Texture.h | 6 +- Source/Render/Textures/TextureCache.cpp | 10 +- Source/Resource/EZeffectResource.cpp | 4 +- Source/Resource/EZeffectResource.h | 4 +- .../Resource/Models/AnimatedModelResource.cpp | 24 +- .../Resource/Models/AnimatedModelResource.h | 8 +- Source/Resource/Models/GrannyModelResource.h | 16 +- Source/Resource/Models/ModelResource.cpp | 20 +- Source/Resource/Sprites/ActionResource.cpp | 10 +- Source/Resource/Sprites/ActionResource.h | 6 +- Source/Resource/Sprites/SpriteResource.cpp | 22 +- Source/Resource/World/GroundResource.cpp | 4 +- Source/Resource/World/GroundResource.h | 2 +- Source/Resource/World/WorldResource.cpp | 2 +- Source/Resource/World/WorldResource.h | 2 +- Source/Resource/XmlNode.cpp | 6 +- Source/Resource/XmlNode.h | 4 +- Source/Resource/XmlParsing.cpp | 20 +- Source/Script/LuaScript.cpp | 60 +- Source/Security/NProtectGameGuardMgr.cpp | 2 +- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 2510 ++--- Source/UI/AdventureGuide/UIAdventureGuide.cpp | 590 +- Source/UI/AdventureGuide/UIAdventureGuide.h | 22 +- Source/UI/Buttons/UIBasicButton.cpp | 2 +- Source/UI/Buttons/UIBitmapButton.cpp | 2 +- Source/UI/Buttons/UIBmpRadioBtn.cpp | 2 +- Source/UI/Buttons/UIBmpRadioBtn.h | 2 +- Source/UI/Buttons/UIBmpTextButton.cpp | 4 +- Source/UI/Buttons/UIBmpTextButton2.cpp | 4 +- Source/UI/Buttons/UIButton.cpp | 36 +- Source/UI/Buttons/UICheckBox.cpp | 16 +- Source/UI/Buttons/UIColorButton.cpp | 2 +- Source/UI/Buttons/UIDescriptRace.cpp | 2 +- Source/UI/Buttons/UIDescriptRace.h | 2 +- Source/UI/Buttons/UIItemTagButton.h | 4 +- Source/UI/Buttons/UIRadioBtn.cpp | 8 +- Source/UI/Buttons/UISlotBmpButton.cpp | 2 +- Source/UI/Buttons/UISlotBmpButton.h | 8 +- Source/UI/Buttons/UISpriteButton.h | 14 +- Source/UI/Buttons/UITVTextButton.h | 8 +- Source/UI/Buttons/UITagButton.cpp | 4 +- Source/UI/Buttons/UITextButton.cpp | 272 +- Source/UI/Buttons/UITextureButton.cpp | 8 +- Source/UI/Buttons/UITextureButton.h | 6 +- Source/UI/CashEmotion/UICashEmotionListWnd.h | 8 +- Source/UI/CashEmotion/UICashEmotionPack.h | 4 +- Source/UI/CashShop/UICashShopWnd.cpp | 174 +- Source/UI/CashShop/UICashShopWnd.h | 12 +- Source/UI/Chat/ChatSuggestions.cpp | 34 +- Source/UI/Chat/UIChatRoomMakeWnd.h | 2 +- Source/UI/Chat/UIChatRoomTitle.cpp | 4 +- Source/UI/Chat/UIChatRoomTitle.h | 6 +- Source/UI/Chat/UINewChatWnd.cpp | 106 +- Source/UI/Chat/UINewChatWnd.h | 16 +- Source/UI/Chat/UISubChatHisWnd.cpp | 22 +- Source/UI/Chat/UISubChatHisWnd.h | 16 +- Source/UI/Chat/UISubChatMiniWnd.h | 2 +- Source/UI/Chat/UIWhisperWnd.cpp | 2 +- Source/UI/Chat/UIWhisperWnd.h | 4 +- Source/UI/Clan/UIClanWnd.cpp | 8 +- Source/UI/Clan/UIClanWnd.h | 4 +- Source/UI/Dialogs/UIBookWnd.h | 2 +- Source/UI/Dialogs/UIChooseWarpWnd.h | 2 +- Source/UI/Dialogs/UIEditctrlWnd.cpp | 46 +- Source/UI/Dialogs/UIEmailAddressWnd.cpp | 2 +- Source/UI/Dialogs/UIMenuWnd.h | 4 +- Source/UI/Dialogs/UIMiniMapWnd.h | 10 +- Source/UI/Dialogs/UIMinimapZoomWnd.cpp | 6 +- Source/UI/Dialogs/UIMinimapZoomWnd.h | 6 +- Source/UI/Dialogs/UINpcEditDialogWnd.h | 2 +- Source/UI/Dialogs/UIPasswordWnd.cpp | 96 +- Source/UI/Dialogs/UIPasswordWnd.h | 40 +- Source/UI/Dialogs/UISayDialogWnd.h | 6 +- Source/UI/Dialogs/UISelectCartWnd.h | 8 +- Source/UI/Dialogs/UITipboxWnd.h | 20 +- Source/UI/Edit/ItemTagRetirement.cpp | 58 +- Source/UI/Edit/UIEditBoxEx.cpp | 116 +- Source/UI/Edit/UIEditBoxEx.h | 18 +- Source/UI/Edit/UIEditCtrl.cpp | 1910 ++-- Source/UI/Edit/UIEditCtrl.h | 42 +- Source/UI/Edit/UIEditCtrl3.cpp | 18 +- Source/UI/Edit/UIEditCtrl_Currency.cpp | 4 +- Source/UI/Edit/UIEditCtrl_Currency.h | 8 +- Source/UI/Edit/UIEditLinks.cpp | 22 +- Source/UI/Edit/UIEditVariants.cpp | 448 +- Source/UI/Edit/UIItemTagCtrl.h | 4 +- Source/UI/Emotion/UIEmotionWnd.cpp | 2 +- Source/UI/Enchant/EnchantUI.h | 26 +- Source/UI/Enchant/UIEnchantUI.cpp | 294 +- Source/UI/EntryQueue/UIEntryQueueWnd.cpp | 32 +- Source/UI/Exchange/UIExchangeUI.cpp | 366 +- Source/UI/Exchange/UIExchangeUI.h | 26 +- Source/UI/FrameSkin.cpp | 8 +- Source/UI/FrameSkin.h | 4 +- Source/UI/GameSettings/GameSettingsUI.cpp | 132 +- Source/UI/GameSettings/GameSettingsUI.h | 10 +- Source/UI/Gauges/UIPcGage.h | 8 +- Source/UI/Gauges/UIPetInfoBarGraph.cpp | 8 +- Source/UI/Gauges/UIPlayerGage.cpp | 12 +- Source/UI/Guild/UIGuildHelperWnd.cpp | 18 +- Source/UI/Guild/UIGuildHelperWnd.h | 6 +- Source/UI/Guild/UIGuildWnd.cpp | 508 +- Source/UI/Guild/UIGuildWnd.h | 26 +- Source/UI/Guild/UIGuild_Storage_Log.cpp | 56 +- Source/UI/Guild/UIGuild_Storage_Log.h | 36 +- Source/UI/Item/UIEquipmentPropertiesWnd.cpp | 80 +- Source/UI/Item/UIEquipmentPropertiesWnd.h | 4 +- Source/UI/Item/UIItemBaseWnd.h | 4 +- Source/UI/Item/UIItemPurchaseWnd.h | 2 +- Source/UI/Item/UIItemSellWnd2.h | 2 +- Source/UI/Item/UIItemShopWnd.h | 8 +- Source/UI/Item/UIItemShopWnd2.h | 6 +- Source/UI/Item/UIItemStoreFindWnd.h | 4 +- Source/UI/Item/UIItemStoreSubWnd.h | 6 +- Source/UI/Item/UIItemStoreWnd.h | 28 +- Source/UI/Item/UIItemWnd.h | 20 +- Source/UI/Item/UIMerchantItemLogWnd.cpp | 24 +- Source/UI/Item/UIMerchantItemLogWnd.h | 4 +- Source/UI/Item/UIParaItemShopWnd.cpp | 126 +- Source/UI/Item/UIParaItemShopWnd.h | 6 +- Source/UI/Items/MergeItemWnd.cpp | 12 +- Source/UI/Items/UICardItemIllustWnd.h | 2 +- Source/UI/Items/UIEquipWnd.h | 26 +- Source/UI/Items/UIExchangeWnd.h | 22 +- Source/UI/Items/UIGameItem.cpp | 14 +- Source/UI/Items/UIGameItem.h | 4 +- Source/UI/Items/UIItemCollectionWnd.h | 18 +- Source/UI/Items/UIItemIdentifyWnd.h | 2 +- .../UI/Items/UIItemParamChangeDisplayWnd.cpp | 10 +- Source/UI/Items/UIItemParamChangeDisplayWnd.h | 12 +- Source/UI/Items/UIItemRepairWnd.cpp | 4 +- Source/UI/Items/UIMakeTargetListWnd.cpp | 2 +- Source/UI/Items/UIMakeTargetProcessWnd.cpp | 24 +- Source/UI/Items/UISwapEquipmentWnd.cpp | 142 +- Source/UI/Items/UISwapEquipmentWnd.h | 18 +- Source/UI/Items/UIWeaponRefineWnd.cpp | 2 +- Source/UI/Layout/WindowGeometry.h | 4 +- Source/UI/Layout/WindowSnapping.cpp | 2 +- Source/UI/Lists/UIChatHisBox.cpp | 22 +- Source/UI/Lists/UIChatHisBox.h | 8 +- Source/UI/Lists/UIComboBox.cpp | 8 +- Source/UI/Lists/UIComboBoxDefWnd.cpp | 74 +- Source/UI/Lists/UIComboBoxEx.cpp | 2 +- Source/UI/Lists/UIComboBoxV2Wnd.cpp | 2 +- Source/UI/Lists/UIComboBoxV2Wnd.h | 2 +- Source/UI/Lists/UIImgMenu.h | 6 +- Source/UI/Lists/UIListBox.cpp | 14 +- Source/UI/Lists/UIListBoxID.h | 4 +- Source/UI/Lists/UIListBoxTemplate.h | 64 +- Source/UI/Lists/UIMemberListBox.h | 4 +- Source/UI/Lists/UIScrollBar.cpp | 264 +- Source/UI/Lists/UITabControl.h | 8 +- Source/UI/Lists/UITagListBox.cpp | 46 +- Source/UI/Lists/UITagListBox.h | 10 +- Source/UI/Lists/UITreeView.cpp | 12 +- Source/UI/Lists/UITreeView.h | 14 +- Source/UI/Menu/UIMenuIconWnd.cpp | 106 +- Source/UI/Menu/UIMenuIconWnd.h | 12 +- Source/UI/MiniPartyManager.cpp | 26 +- Source/UI/MiniPartyPlacement.cpp | 2 +- Source/UI/MiniPartyUsableArea.cpp | 4 +- Source/UI/Navigation/UINavigationV4Wnd.cpp | 6 +- Source/UI/Navigation/UINavigationV4Wnd.h | 46 +- Source/UI/Party/UIAdvenPartyBoardWnd.cpp | 6 +- Source/UI/Party/UIMiniPartyWnd.cpp | 16 +- Source/UI/Party/UIPartyInfoWnd.cpp | 2 +- Source/UI/Party/UIRegisterPartyWnd.cpp | 2 +- Source/UI/Party/UIRequestJoinPartyWnd.cpp | 2 +- .../ProbabilityTable/UIProbabilityTable.cpp | 16 +- .../UI/ProbabilityTable/UIProbabilityTable.h | 2 +- Source/UI/Quest/UIOngoingQuestInfo.cpp | 28 +- Source/UI/Quest/UIQuestDisplay.cpp | 6 +- Source/UI/Quest/UIQuestDisplay.h | 2 +- Source/UI/Quest/UIRecommendedQuestInfo.cpp | 12 +- Source/UI/Quest/UIRenewQuestUI.cpp | 154 +- Source/UI/Quest/UIRenewQuestUI.h | 8 +- Source/UI/Quest/UIRenewQuestWnd.cpp | 48 +- Source/UI/Quest/UIRenewQuestWnd.h | 4 +- Source/UI/Rodex/UIRodexComposeWnd.cpp | 282 +- Source/UI/Rodex/UIRodexComposeWnd.h | 26 +- Source/UI/Rodex/UIRodexInboxWnd.cpp | 612 +- Source/UI/Rodex/UIRodexInboxWnd.h | 40 +- Source/UI/RuneSystem/UIRuneSystemWindows.h | 12 +- Source/UI/RuneSystem/UIRuneSystemWnd.cpp | 164 +- Source/UI/RuneSystem/UIRuneSystemWnd.h | 12 +- .../UISelectPackageItemBox.cpp | 40 +- Source/UI/Shop/MerchantShopRefresh.cpp | 22 +- Source/UI/Shop/UIMerchantItemMyShopWnd.h | 12 +- Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h | 2 +- Source/UI/Shop/UIMerchantItemPurchaseWnd.h | 8 +- Source/UI/Shop/UIMerchantItemShopWnd.h | 12 +- Source/UI/Shop/UIMerchantMirrorItemWnd.h | 2 +- Source/UI/Shop/UIMerchantShopMakeWnd.h | 34 +- Source/UI/Shop/UIMerchantShopTitle.cpp | 18 +- Source/UI/Shop/UIMerchantShopTitle.h | 2 +- Source/UI/Shortcuts/ShortcutActivation.cpp | 2 +- Source/UI/Shortcuts/ShortcutBindings.cpp | 20 +- Source/UI/Shortcuts/ShortcutCooldowns.cpp | 58 +- Source/UI/Shortcuts/ShortcutDetails.cpp | 4 +- Source/UI/Shortcuts/ShortcutDrop.cpp | 14 +- Source/UI/Shortcuts/ShortcutPainting.cpp | 12 +- Source/UI/Shortcuts/ShortcutPress.cpp | 8 +- Source/UI/Shortcuts/ShortcutTooltip.cpp | 4 +- Source/UI/Shortcuts/ShortcutVisibility.cpp | 6 +- Source/UI/Shortcuts/UIQuickSlotWnd.cpp | 30 +- Source/UI/Shortcuts/UIShortCutWnd.cpp | 208 +- Source/UI/Skill/UISkillDescribeWnd.h | 6 +- Source/UI/Skill/UISkillListWnd.h | 4 +- Source/UI/SkillDelayInfo/SkillDelayInfo.h | 6 +- Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp | 52 +- Source/UI/StylingShop/UIStylingShopWnd.cpp | 486 +- Source/UI/StylingShop/UIStylingShopWnd.h | 62 +- Source/UI/Text/CreateLineInfo.h | 14 +- Source/UI/Text/ItemLinkDisplay.cpp | 2 +- Source/UI/Text/NavigationLink.cpp | 24 +- Source/UI/Text/UIAchWnd.cpp | 232 +- Source/UI/Text/UIAchWnd.h | 40 +- Source/UI/Text/UIBalloonText.cpp | 52 +- Source/UI/Text/UIBalloonText.h | 4 +- Source/UI/Text/UINameBalloonText.h | 2 +- Source/UI/Text/UIStaticTextControl.h | 10 +- Source/UI/Text/UIString.h | 18 +- Source/UI/Text/UITextViewer.cpp | 18 +- Source/UI/Text/UITextViewerControl.h | 4 +- Source/UI/Text/UITextViewerLinks.cpp | 8 +- Source/UI/Text/UITextViewerMessages.cpp | 8 +- Source/UI/UIBarGraph.h | 2 +- Source/UI/UIBartermarketWnd.cpp | 156 +- Source/UI/UIBartermarketWnd.h | 20 +- Source/UI/UICaptchaPreviewWnd.cpp | 2 +- Source/UI/UIChangeMaterialWnd.cpp | 76 +- Source/UI/UIChangeMaterialWnd.h | 8 +- Source/UI/UIGradeEnchantWnd.cpp | 166 +- Source/UI/UIGradeEnchantWnd.h | 38 +- Source/UI/UIHotkeyGuideWnd.cpp | 2 +- Source/UI/UIItemReformWnd.cpp | 26 +- Source/UI/UILapineBoxWnd.cpp | 58 +- Source/UI/UILapineScrollBar.cpp | 18 +- Source/UI/UILapineScrollBar.h | 2 +- Source/UI/UILapineUpgradeBoxWnd.cpp | 76 +- Source/UI/UIMacroBlackListCheckWnd.cpp | 10 +- Source/UI/UIMacroBlackListCheckWnd.h | 2 +- Source/UI/UIMacroDetectorWnd.cpp | 6 +- Source/UI/UIMacroDetectorWnd.h | 4 +- Source/UI/UIMacroReport.cpp | 124 +- Source/UI/UIMacroReport.h | 14 +- Source/UI/UIMacroUserInfoWnd.cpp | 56 +- Source/UI/UIMacroUserInfoWnd.h | 14 +- Source/UI/UIPreviewEquipWnd.cpp | 300 +- Source/UI/UIPreviewEquipWnd.h | 2 +- Source/UI/UIRefiningWnd.cpp | 118 +- Source/UI/UIRefiningWnd.h | 10 +- Source/UI/UIReputeWnd.cpp | 4 +- Source/UI/UIScrollWnd.cpp | 50 +- Source/UI/UIScrollWnd.h | 4 +- Source/UI/UISlotBitmap.cpp | 8 +- Source/UI/UISlotBitmap.h | 2 +- Source/UI/UIStaticBitmap.cpp | 2 +- Source/UI/Window/FrameFocus.cpp | 10 +- Source/UI/Window/FuncDrawWNDChar.cpp | 38 +- Source/UI/Window/FuncDrawWNDChar.h | 12 +- Source/UI/Window/UIBalloonOpenBtn.cpp | 2 +- Source/UI/Window/UIBasicInfoWnd.cpp | 68 +- Source/UI/Window/UIBattleMsgOptionWnd.cpp | 94 +- Source/UI/Window/UIBattleMsgOptionWnd.h | 12 +- Source/UI/Window/UIBitmapTab.cpp | 10 +- Source/UI/Window/UIChatRoomWnd.h | 8 +- Source/UI/Window/UICollectionSystemWnd.cpp | 16 +- Source/UI/Window/UICollectionSystemWnd.h | 4 +- Source/UI/Window/UIControl.cpp | 134 +- Source/UI/Window/UIControl.h | 10 +- Source/UI/Window/UIEmblemWnd.cpp | 2 +- Source/UI/Window/UIEscOptionWnd.cpp | 2 +- Source/UI/Window/UIFrameWnd.cpp | 86 +- Source/UI/Window/UIHomunInfoWnd.h | 4 +- Source/UI/Window/UIHotKeyWnd.cpp | 98 +- Source/UI/Window/UIHotKeyWnd.h | 22 +- Source/UI/Window/UIJobListWnd.cpp | 4 +- Source/UI/Window/UIJobListWnd.h | 2 +- Source/UI/Window/UILocaleTextWnd.cpp | 114 +- Source/UI/Window/UILoginOTPWnd.h | 6 +- Source/UI/Window/UILoginWnd.h | 10 +- Source/UI/Window/UIMakeCharWnd.h | 12 +- Source/UI/Window/UIMessageBox.cpp | 426 +- Source/UI/Window/UIMileageWnd.cpp | 2 +- Source/UI/Window/UIMonsterDisplayWnd.h | 2 +- Source/UI/Window/UIMonsterInfoWnd.h | 2 +- Source/UI/Window/UINavigationHelpWnd.cpp | 2 +- Source/UI/Window/UINavigationHelpWnd.h | 2 +- Source/UI/Window/UINavigationWnd.cpp | 212 +- Source/UI/Window/UINavigationWnd.h | 12 +- Source/UI/Window/UINewMakeCharWnd.cpp | 52 +- Source/UI/Window/UINewMakeCharWnd.h | 24 +- Source/UI/Window/UINewSelectCharWnd.cpp | 46 +- Source/UI/Window/UINewSelectCharWnd.h | 2 +- Source/UI/Window/UINewSkillListWnd.cpp | 74 +- Source/UI/Window/UINormalMB.cpp | 2 +- Source/UI/Window/UINoticeWnd.h | 2 +- Source/UI/Window/UIOpenRoulletteWnd.cpp | 2 +- Source/UI/Window/UIPetEvolutionWnd.cpp | 8 +- Source/UI/Window/UIPetInfoWnd.h | 8 +- Source/UI/Window/UIRegisterMgr.h | 4 +- Source/UI/Window/UIRoMapWnd.cpp | 156 +- Source/UI/Window/UIRoMapWnd.h | 14 +- Source/UI/Window/UIRodexContentsWnd.cpp | 86 +- Source/UI/Window/UIRodexContentsWnd.h | 6 +- Source/UI/Window/UIRoulletteWnd.cpp | 34 +- Source/UI/Window/UISecondCostumeWnd.cpp | 36 +- Source/UI/Window/UISecondCostumeWnd.h | 4 +- Source/UI/Window/UISeekPartyListWnd.cpp | 4 +- Source/UI/Window/UISeekPartyMBWnd.cpp | 62 +- Source/UI/Window/UISeekPartyMBWnd.h | 8 +- Source/UI/Window/UISeekPartyWnd.cpp | 2 +- Source/UI/Window/UISeekPartyWnd.h | 2 +- Source/UI/Window/UISelCharForUServerWnd.cpp | 132 +- Source/UI/Window/UISelCharForUServerWnd.h | 8 +- Source/UI/Window/UISerachStoreInfoWnd.cpp | 162 +- Source/UI/Window/UISerachStoreInfoWnd.h | 14 +- Source/UI/Window/UITab.cpp | 18 +- Source/UI/Window/UITransMenuWnd.cpp | 16 +- Source/UI/Window/UITransMenuWnd.h | 10 +- Source/UI/Window/UIVideoWnd.cpp | 2 +- Source/UI/Window/UIWindow.cpp | 338 +- Source/UI/Window/UIWindow.h | 10 +- Source/UI/Window/UIWindowFactory.cpp | 8 +- Source/UI/Window/UIWindowMgr.cpp | 2180 ++--- Source/UI/Window/UIWindowMgr.h | 372 +- Source/UI/Window/UIWindowMgr.inl | 2 +- Source/UI/Window/UIWordDisplayWnd.cpp | 2 +- Source/UI/Window/UIZeroChatWnd.cpp | 14 +- Source/UI/Window/WindowDialogs.cpp | 24 +- Source/UI/Window/WindowMgrState.cpp | 198 +- Source/UI/Window/WindowMouseHit.cpp | 34 +- Source/UI/Window/WindowOrdering.cpp | 28 +- Source/UI/Window/WindowRetirement.cpp | 12 +- Source/UI/WindowBackground.cpp | 4 +- Source/UI/WindowOverlay.cpp | 4 +- Source/UI/WindowSprite.cpp | 18 +- Source/Utility/Lexicon/LexiconSerializer.cpp | 2 +- Source/Utility/Lexicon/LexiconSerializer.h | 4 +- 689 files changed, 29026 insertions(+), 29023 deletions(-) diff --git a/Source/ActorPickNode.cpp b/Source/ActorPickNode.cpp index 842bc5cce..cd2dcfd03 100644 --- a/Source/ActorPickNode.cpp +++ b/Source/ActorPickNode.cpp @@ -199,14 +199,14 @@ CView::CView() { this->frame.up[2] = 0.0f; this->camera.yaw = 0.0f; this->shake.enabled = 0; - this->unknown_01B4 = nullptr; + this->skyBox = nullptr; this->shake.start = 0; - *reinterpret_cast(&this->shake.unknown_0010) = 0; + *reinterpret_cast(&this->shake.resetFlags) = 0; } CView::~CView() { - if (this->unknown_01B4) { - delete this->unknown_01B4; + if (this->skyBox) { + delete this->skyBox; } } diff --git a/Source/ActorPickNode.h b/Source/ActorPickNode.h index 9a7325149..c3ab54e63 100644 --- a/Source/ActorPickNode.h +++ b/Source/ActorPickNode.h @@ -19,7 +19,7 @@ struct ActorPickInfo { /* 0018 */ std::uint32_t accountId; /* 001C */ int job; /* 0020 */ int kind; - /* 0024 */ int unknown_0024; + /* 0024 */ int healthState; }; struct ActorPickBounds { diff --git a/Source/Archive/GPak.cpp b/Source/Archive/GPak.cpp index 94d96e037..e92547471 100644 --- a/Source/Archive/GPak.cpp +++ b/Source/Archive/GPak.cpp @@ -1219,24 +1219,24 @@ PakAuxiliary::PakAuxiliary() { struct PakState_656DF0 { PakState_656DF0(); - /* 0000 */ std::uint32_t unknown_0000; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ std::uint32_t unknown_000C; - /* 0010 */ std::uint32_t unknown_0010; - /* 0014 */ std::uint32_t unknown_0014; - /* 0018 */ std::uint32_t unknown_0018; - /* 001C */ std::uint32_t unknown_001C; - /* 0020 */ std::uint32_t unknown_0020; + /* 0000 */ std::uint32_t stateA; + /* 0004 */ std::uint32_t stateB; + /* 0008 */ std::uint32_t stateC; + /* 000C */ std::uint32_t stateD; + /* 0010 */ std::uint32_t stateE; + /* 0014 */ std::uint32_t stateF; + /* 0018 */ std::uint32_t stateG; + /* 001C */ std::uint32_t stateH; + /* 0020 */ std::uint32_t enabled; }; static_assert(sizeof(PakState_656DF0) == 0x24); -static_assert(offsetof(PakState_656DF0, unknown_0020) == 0x20); +static_assert(offsetof(PakState_656DF0, enabled) == 0x20); // OFFSET: 0x00656DF0 // FUNCTION: fn_05081 PakState_656DF0::PakState_656DF0() - : unknown_0000(0), unknown_0004(0), unknown_0008(0), unknown_000C(0), unknown_0010(0), unknown_0014(0), unknown_0018(0), unknown_001C(0), unknown_0020(1) { + : stateA(0), stateB(0), stateC(0), stateD(0), stateE(0), stateF(0), stateG(0), stateH(0), enabled(1) { } // OFFSET: 0x00657640 diff --git a/Source/Client/Application/ApplicationWindow.cpp b/Source/Client/Application/ApplicationWindow.cpp index ca17c03ef..3a6ba177b 100644 --- a/Source/Client/Application/ApplicationWindow.cpp +++ b/Source/Client/Application/ApplicationWindow.cpp @@ -199,7 +199,7 @@ LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lPa if (g_windowMgr.ProcessKeyDown(wParam, lParam, ~(static_cast(lParam) >> 30) & 1)) { return 0; } - if (!g_windowMgr.unknown_0025) { + if (!g_windowMgr.imeInputActive) { g_windowMgr.RefreshWindow01C8Edits(); return 0; } @@ -209,7 +209,7 @@ LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lPa if (!g_windowMgr.GetHoverWindow() || g_windowMgr.GetHoverWindow()->SendMsg(nullptr, WM_KEYDOWN, wParam, lParam, 0, 0) != 3) { g_serverLanguage->KeyDown(wParam, lParam); } - if (g_session.unknown_5480 && !g_session.unknown_5488) { + if (g_session.quitBlocked && !g_session.quitAllowed) { g_windowMgr.RefreshWindow01C8Edits(); } return 0; @@ -220,7 +220,7 @@ LRESULT CALLBACK WindowProc(HWND window, UINT message, WPARAM wParam, LPARAM lPa } return 0; case WM_CHAR: - if (!g_windowMgr.LookupWindow(WID_VIDEOWND) && g_windowMgr.unknown_0025) { + if (!g_windowMgr.LookupWindow(WID_VIDEOWND) && g_windowMgr.imeInputActive) { if (g_windowMgr.GetHoverWindow() && g_windowMgr.GetHoverWindow()->SendMsg(nullptr, WM_CHAR, wParam, lParam, 0, 0) == 3) { return 0; } diff --git a/Source/Client/Application/Launcher.cpp b/Source/Client/Application/Launcher.cpp index b27bcd61d..325e77f3b 100644 --- a/Source/Client/Application/Launcher.cpp +++ b/Source/Client/Application/Launcher.cpp @@ -1062,7 +1062,7 @@ void ShutdownManagers() { DestroyPlayerNameDictionary(); for (unsigned int attempt = 0; attempt < 30; ++attempt) { - if (g_adventurerAgencyMgr->pending + g_accountLinkedUserDataMgr->unknown_0028 == 0) { + if (g_adventurerAgencyMgr->pending + g_accountLinkedUserDataMgr->m_pendingLoads == 0) { break; } diff --git a/Source/Client/Browser/BrowserClientSite.cpp b/Source/Client/Browser/BrowserClientSite.cpp index 993f0e30f..5f50bc589 100644 --- a/Source/Client/Browser/BrowserClientSite.cpp +++ b/Source/Client/Browser/BrowserClientSite.cpp @@ -3,7 +3,7 @@ // OFFSET: 0x00AB1310 // FUNCTION: fn_17334 BrowserClientSite::BrowserClientSite(HWND window, IUnknown* browser) - : unknown_0004(0), m_window(window), m_browser(browser) { + : referenceCount(0), m_window(window), m_browser(browser) { this->m_inPlace = new BrowserInPlaceSite(this); this->m_documentUI = new BrowserDocumentUI(this); this->m_events = new BrowserPopupDispatch(this); diff --git a/Source/Client/Browser/BrowserClientSite.h b/Source/Client/Browser/BrowserClientSite.h index 4b0e1ffd7..c1d191268 100644 --- a/Source/Client/Browser/BrowserClientSite.h +++ b/Source/Client/Browser/BrowserClientSite.h @@ -27,7 +27,7 @@ public: friend class BrowserInPlaceSite; private: - /* 0004 */ int unknown_0004; + /* 0004 */ int referenceCount; /* 0008 */ HWND m_window; /* 000C */ IUnknown* m_browser; /* 0010 */ BrowserInPlaceSite* m_inPlace; diff --git a/Source/Client/Browser/BrowserPopupDispatch.h b/Source/Client/Browser/BrowserPopupDispatch.h index 8904ea4eb..ca79cb29f 100644 --- a/Source/Client/Browser/BrowserPopupDispatch.h +++ b/Source/Client/Browser/BrowserPopupDispatch.h @@ -9,7 +9,7 @@ class BrowserClientSite; class BrowserPopupDispatch final : public IDispatch { public: // INLINED - explicit BrowserPopupDispatch(BrowserClientSite* site) : unknown_0004(0), m_site(site) { + explicit BrowserPopupDispatch(BrowserClientSite* site) : m_dispatchState(0), m_site(site) { } ~BrowserPopupDispatch(); @@ -23,7 +23,7 @@ public: Invoke(DISPID id, REFIID iid, LCID locale, WORD flags, DISPPARAMS* args, VARIANT* result, EXCEPINFO* error, UINT* argumentError) override; private: - /* 0004 */ int unknown_0004; + /* 0004 */ int m_dispatchState; /* 0008 */ BrowserClientSite* m_site; }; diff --git a/Source/Client/Input/Language.cpp b/Source/Client/Input/Language.cpp index 97a88327a..52f51ad8f 100644 --- a/Source/Client/Input/Language.cpp +++ b/Source/Client/Input/Language.cpp @@ -414,7 +414,7 @@ UIChatHisBox2::UIChatHisBox2() // OFFSET: 0x0086C830 // FUNCTION: fn_11031 -UIChatHisBox3::UIChatHisBox3() : UIChatHisBox2(), unknown_0130(1), unknown_0134(12) { +UIChatHisBox3::UIChatHisBox3() : UIChatHisBox2(), autoScroll(1), fontHeight(12) { } // OFFSET: 0x00999FF0 @@ -425,8 +425,8 @@ UIColoringTextViewer::UIColoringTextViewer() : UIListBox(), color(0), lineLimit( // OFFSET: 0x007ECF50 // FUNCTION: fn_09805 UIMacroDetectorWnd::UIMacroDetectorWnd() - : UIFrameWnd(0), m_button(nullptr), m_imageData(nullptr), m_imageSize(0), m_imageReceived(0), unknown_00D0(0), totalDuration(0), - startTick(0), messageDuration(0), m_lastAnswer(), message(), unknown_0110(0), messageTick(3000), m_image(nullptr), m_editCtrl(nullptr) { + : UIFrameWnd(0), m_button(nullptr), m_imageData(nullptr), m_imageSize(0), m_imageReceived(0), remainingAttempts(0), totalDuration(0), + startTick(0), messageDuration(0), m_lastAnswer(), message(), lastCountdownTick(0), messageTick(3000), m_image(nullptr), m_editCtrl(nullptr) { std::memset(this->m_captchaKey, 0, sizeof(this->m_captchaKey)); g_windowMgr.CloseWindow(WID_ESCOPTIONWND); g_windowMgr.CloseWindow(WID_CHOOSEWARPWND); diff --git a/Source/Client/Mode/CGameMode.h b/Source/Client/Mode/CGameMode.h index df53fffdc..e74881c26 100644 --- a/Source/Client/Mode/CGameMode.h +++ b/Source/Client/Mode/CGameMode.h @@ -92,10 +92,10 @@ struct MiniMapPing { }; struct MinimapMarker { - /* 0000 */ std::int16_t unknown_0000; - /* 0002 */ std::int16_t unknown_0002; - /* 0004 */ std::int16_t unknown_0004; - /* 0006 */ std::int16_t unknown_0006; + /* 0000 */ std::int16_t x; + /* 0002 */ std::int16_t y; + /* 0004 */ std::int16_t effectType; + /* 0006 */ std::int16_t questIconId; }; class CGameMode : public CMode { @@ -106,122 +106,122 @@ public: void ReceiveBuyingStoreResult(const BuyingStoreResultPacket* packet); void ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets); void ReceiveMacroReporterList(int count, const int* aids); - /* 0058 */ unsigned char unknown_0058[0x10]; + /* 0058 */ unsigned char areaBounds[0x10]; /* 0068 */ char mapName[16]; /* 0078 */ unsigned char unknown_0078[0xC]; - /* 0084 */ std::vector unknown_0084; - /* 0090 */ unsigned char unknown_0090[0x3C]; + /* 0084 */ std::vector mapResources; + /* 0090 */ unsigned char minimapBmpName[0x3C]; /* 00CC */ CWorld* scene; /* 00D0 */ CView* camera; /* 00D4 */ CMousePointer* mousePointer; - /* 00D8 */ unsigned char unknown_00D8[0x04]; - /* 00DC */ int unknown_00DC; - /* 00E0 */ int unknown_00E0; - /* 00E4 */ int unknown_00E4; - /* 00E8 */ int unknown_00E8; - /* 00EC */ unsigned char unknown_00EC[0x0C]; - /* 00F8 */ int unknown_00F8; - /* 00FC */ int unknown_00FC; - /* 0100 */ unsigned char unknown_0100[0x18]; - /* 0118 */ std::string unknown_0118; + /* 00D8 */ unsigned char leftBtnClickTick[0x04]; + /* 00DC */ int oldMouseX; + /* 00E0 */ int oldMouseY; + /* 00E4 */ int rBtnClickX; + /* 00E8 */ int rBtnClickY; + /* 00EC */ unsigned char lastActorIds[0x0C]; + /* 00F8 */ int isAutoMoveClickOn; + /* 00FC */ int isWaitingEnterRoom; + /* 0100 */ unsigned char equipmentRequestState[0x18]; + /* 0118 */ std::string refuseWhisperName; /* 0130 */ std::string unknown_0130; /* 0148 */ std::string exchangeName; /* 0160 */ CActorNameCardHolder nameCard; - /* 0194 */ std::map unknown_0194; - /* 019C */ std::map> unknown_019C; - /* 01A4 */ std::list unknown_01A4; - /* 01AC */ std::map unknown_01AC; - /* 01B4 */ std::map unknown_01B4; - /* 01BC */ std::map unknown_01BC; - /* 01C4 */ std::map unknown_01C4; + /* 0194 */ std::map guildMemberStatusCache; + /* 019C */ std::map> actorPosList; + /* 01A4 */ std::list pickupReqItemNaidList; + /* 01AC */ std::map chatRoomActorIds; + /* 01B4 */ std::map partyPosList; + /* 01BC */ std::map guildPosList; + /* 01C4 */ std::map compassPosList; /* 01CC */ std::vector actorMenuIds; /* 01D8 */ std::list m_skillUnitIds; - /* 01E0 */ unsigned char unknown_01E0[4]; + /* 01E0 */ unsigned char windowInvalidateTick[4]; /* 01E4 */ std::vector loopSounds; /* 01F0 */ std::map minimapMarkers; - /* 01F8 */ int unknown_01F8; - /* 01FC */ std::string unknown_01FC; - /* 0214 */ std::string unknown_0214; - /* 022C */ std::string unknown_022C; - /* 0244 */ int unknown_0244; - /* 0248 */ std::uint32_t unknown_0248; - /* 024C */ int unknown_024C; - /* 0250 */ int unknown_0250; - /* 0254 */ int unknown_0254; + /* 01F8 */ int hoveredStatusIconId; + /* 01FC */ std::string lastWhisperMenuCharacterName; + /* 0214 */ std::string lastWhisper; + /* 022C */ std::string lastWhisperName; + /* 0244 */ int noMove; + /* 0248 */ std::uint32_t noMoveStartTick; + /* 024C */ int isOnQuest; + /* 0250 */ int isPlayerDead; + /* 0254 */ int canRotateView; /* 0258 */ int hasViewParameters; /* 025C */ std::int16_t viewParameters[9]; - /* 026E */ unsigned char unknown_026E[0x1A]; - /* 0288 */ float unknown_0288; - /* 028C */ unsigned char unknown_028C[0x08]; - /* 0294 */ char unknown_0294[0x18]; + /* 026E */ unsigned char requestTimers[0x1A]; + /* 0288 */ float fixedLongitude; + /* 028C */ unsigned char lastCoupleIds[0x08]; + /* 0294 */ char coupleName[0x18]; /* 02AC */ UINameBalloonText* nameBalloon; /* 02B0 */ UINameBalloonText* itemNameBalloon; /* 02B4 */ UIWindow* itemWindow; - /* 02B8 */ unsigned char unknown_02B8[0x14]; - /* 02CC */ int unknown_02CC; - /* 02D0 */ unsigned char unknown_02D0[0x04]; - /* 02D4 */ int unknown_02D4; + /* 02B8 */ unsigned char balloonDisplayState[0x14]; + /* 02CC */ int waitingUseItemAck; + /* 02D0 */ unsigned char waitingItemThrowAck[0x04]; + /* 02D4 */ int waitingReqStatusAck; /* 02D8 */ std::uint32_t balloonActorId; - /* 02DC */ int unknown_02DC; - /* 02E0 */ int unknown_02E0; - /* 02E4 */ unsigned char unknown_02E4[0x08]; - /* 02EC */ std::string unknown_02EC; + /* 02DC */ int lastNaid; + /* 02E0 */ int menuTargetAid; + /* 02E4 */ unsigned char nameBalloonSize[0x08]; + /* 02EC */ std::string menuTargetName; /* 0304 */ unsigned char unknown_0304[0x04]; /* 0308 */ ModeDragState drag; - /* 03C8 */ std::string unknown_03C8; - /* 03E0 */ std::string unknown_03E0; - /* 03F8 */ int unknown_03F8; - /* 03FC */ int unknown_03FC; - /* 0400 */ int unknown_0400; - /* 0404 */ int unknown_0404; - /* 0408 */ void* unknown_0408; - /* 040C */ int unknown_040C; - /* 0410 */ int unknown_0410; - /* 0414 */ int unknown_0414; - /* 0418 */ unsigned char unknown_0418; + /* 03C8 */ std::string chatRoomTitle; + /* 03E0 */ std::string chatRoomPassword; + /* 03F8 */ int chatRoomPublic; + /* 03FC */ int chatRoomMemberCount; + /* 0400 */ int chatRoomMemberLimit; + /* 0404 */ int chatRoomId; + /* 0408 */ void* skillUseType; + /* 040C */ int skillId; + /* 0410 */ int skillAttackRange; + /* 0414 */ int skillUseLevel; + /* 0418 */ unsigned char ignoreSkillInterval; /* 041C */ int miniMapTooltipId; /* 0420 */ std::string miniMapTooltipText; - /* 0438 */ std::string unknown_0438; - /* 0450 */ int unknown_0450; - /* 0454 */ int unknown_0454; - /* 0458 */ int unknown_0458; - /* 045C */ unsigned char unknown_045C[0x08]; - /* 0464 */ int unknown_0464; - /* 0468 */ int unknown_0468; - /* 046C */ std::string unknown_046C[11]; - /* 0574 */ unsigned char unknown_0574[0x2C]; - /* 05A0 */ int unknown_05A0; - /* 05A4 */ unsigned char unknown_05A4[0x0C]; + /* 0438 */ std::string lastChat; + /* 0450 */ int sameChatRepeatCount; + /* 0454 */ int serverTimeSyncCount; + /* 0458 */ int checkGroundAlpha; + /* 045C */ unsigned char cardAndSkillBalloonIds[0x08]; + /* 0464 */ int countdownStartTick; + /* 0468 */ int recordChatCount; + /* 046C */ std::string recordChat[11]; + /* 0574 */ unsigned char recordChatTime[0x2C]; + /* 05A0 */ int strikeCount; + /* 05A4 */ unsigned char strikeTime[0x0C]; /* 05B0 */ int forcedAttack; - /* 05B4 */ int unknown_05B4; - /* 05B8 */ int unknown_05B8; + /* 05B4 */ int yggdrasilUsePending; + /* 05B8 */ int lastPickItemTime; /* 05BC */ int chatLogLines; /* 05C0 */ unsigned char unknown_05C0[0x04]; - /* 05C4 */ int unknown_05C4; - /* 05C8 */ int unknown_05C8; - /* 05CC */ unsigned char unknown_05CC[0x02]; - /* 05CE */ unsigned char unknown_05CE; + /* 05C4 */ int bossMonsterX; + /* 05C8 */ int bossMonsterY; + /* 05CC */ unsigned char bossAlarmAndCopyNameFlags[0x02]; + /* 05CE */ unsigned char inventoryChanged; /* 05CF */ unsigned char unknown_05CF; - /* 05D0 */ UIWindow* unknown_05D0; - /* 05D4 */ std::list unknown_05D4; + /* 05D0 */ UIWindow* statusIconTooltip; + /* 05D4 */ std::list periodicTicks; /* 05DC */ std::map miniMapTooltipWindows; /* 05E4 */ std::uint32_t wheelTick; /* 05E8 */ std::uint32_t replayPauseTick; - /* 05EC */ unsigned char unknown_05EC[0x08]; - /* 05F4 */ int unknown_05F4; - /* 05F8 */ int unknown_05F8; - /* 05FC */ UIWindow* unknown_05FC; - /* 0600 */ std::uint32_t unknown_0600; - /* 0604 */ std::list unknown_0604; - /* 060C */ unsigned char unknown_060C[0x4]; + /* 05EC */ unsigned char replayDragState[0x08]; + /* 05F4 */ int mouseRollCount; + /* 05F8 */ int mouseRollMax; + /* 05FC */ UIWindow* achievementBalloon; + /* 0600 */ std::uint32_t achievementBalloonTick; + /* 0604 */ std::list notificationWindows; + /* 060C */ unsigned char sameMapMove[0x4]; /* 0610 */ std::vector spriteMirrorActorIds; /* 061C */ UIBroadcastBalloon* broadcastBalloon; /* 0620 */ UIBroadcastBalloon* noticeBalloon; - /* 0624 */ unsigned char unknown_0624[0x4]; - /* 0628 */ std::unordered_set unknown_0628; - /* 0648 */ unsigned char unknown_0648; + /* 0624 */ unsigned char isInitializing[0x4]; + /* 0628 */ std::unordered_set petFriendlyNoticeIds; + /* 0648 */ unsigned char recordItemPickups; /* 0649 */ unsigned char unknown_0649[0x3]; - /* 064C */ std::unordered_map unknown_064C; + /* 064C */ std::unordered_map itemPickupCounts; /* 066C */ unsigned char unknown_066C[0x4]; std::string MapName(); @@ -978,31 +978,31 @@ void DecodeSrcDst(const unsigned char* packed, int* srcX, int* srcY, int* dstX, #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(CGameMode, mapName) == 0x68); -static_assert(offsetof(CGameMode, unknown_0194) == 0x194); -static_assert(offsetof(CGameMode, unknown_019C) == 0x19C); -static_assert(offsetof(CGameMode, unknown_01A4) == 0x1A4); -static_assert(offsetof(CGameMode, unknown_01AC) == 0x1AC); -static_assert(offsetof(CGameMode, unknown_0118) == 0x118); -static_assert(offsetof(CGameMode, unknown_0084) == 0x84); +static_assert(offsetof(CGameMode, guildMemberStatusCache) == 0x194); +static_assert(offsetof(CGameMode, actorPosList) == 0x19C); +static_assert(offsetof(CGameMode, pickupReqItemNaidList) == 0x1A4); +static_assert(offsetof(CGameMode, chatRoomActorIds) == 0x1AC); +static_assert(offsetof(CGameMode, refuseWhisperName) == 0x118); +static_assert(offsetof(CGameMode, mapResources) == 0x84); static_assert(offsetof(CGameMode, scene) == 0xCC); static_assert(offsetof(CGameMode, broadcastBalloon) == 0x61C); static_assert(offsetof(CGameMode, camera) == 0xD0); static_assert(offsetof(CGameMode, nameCard) == 0x160); -static_assert(offsetof(CGameMode, unknown_01BC) == 0x1BC); -static_assert(offsetof(CGameMode, unknown_01C4) == 0x1C4); +static_assert(offsetof(CGameMode, guildPosList) == 0x1BC); +static_assert(offsetof(CGameMode, compassPosList) == 0x1C4); static_assert(offsetof(CGameMode, actorMenuIds) == 0x1CC); static_assert(offsetof(CGameMode, m_skillUnitIds) == 0x1D8); -static_assert(offsetof(CGameMode, unknown_00E4) == 0xE4); +static_assert(offsetof(CGameMode, rBtnClickX) == 0xE4); static_assert(offsetof(CGameMode, loopSounds) == 0x1E4); static_assert(offsetof(CGameMode, minimapMarkers) == 0x1F0); -static_assert(offsetof(CGameMode, unknown_0294) == 0x294); +static_assert(offsetof(CGameMode, coupleName) == 0x294); static_assert(offsetof(CGameMode, drag) == 0x308); -static_assert(offsetof(CGameMode, unknown_024C) == 0x24C); -static_assert(offsetof(CGameMode, unknown_02DC) == 0x2DC); -static_assert(offsetof(CGameMode, unknown_05D0) == 0x5D0); -static_assert(offsetof(CGameMode, unknown_0604) == 0x604); -static_assert(offsetof(CGameMode, unknown_0628) == 0x628); -static_assert(offsetof(CGameMode, unknown_064C) == 0x64C); +static_assert(offsetof(CGameMode, isOnQuest) == 0x24C); +static_assert(offsetof(CGameMode, lastNaid) == 0x2DC); +static_assert(offsetof(CGameMode, statusIconTooltip) == 0x5D0); +static_assert(offsetof(CGameMode, notificationWindows) == 0x604); +static_assert(offsetof(CGameMode, petFriendlyNoticeIds) == 0x628); +static_assert(offsetof(CGameMode, itemPickupCounts) == 0x64C); static_assert(offsetof(CGameMode, unknown_066C) == 0x66C); static_assert(sizeof(CGameMode) == 0x670); #endif diff --git a/Source/Client/Mode/CLoginMode.h b/Source/Client/Mode/CLoginMode.h index a76520ffd..a8f4a2409 100644 --- a/Source/Client/Mode/CLoginMode.h +++ b/Source/Client/Mode/CLoginMode.h @@ -33,7 +33,7 @@ struct ConnectionEndpoint; struct CharacterInfo { /* 0000 */ std::uint32_t gid; /* 0004 */ std::int64_t exp; - /* 000C */ unsigned char unknown_000C[0x24]; + /* 000C */ unsigned char progressionData[0x24]; /* 0030 */ std::int16_t jobPoint; /* 0032 */ std::int64_t hp; /* 003A */ std::int64_t maxHp; @@ -42,7 +42,7 @@ struct CharacterInfo { /* 0052 */ std::int16_t speed; /* 0054 */ std::int16_t job; /* 0056 */ std::int16_t head; - /* 0058 */ std::int16_t unknown_0058; + /* 0058 */ std::int16_t bodyCostume; /* 005A */ std::int16_t weapon; /* 005C */ std::int16_t level; /* 005E */ std::int16_t skillPoint; @@ -55,7 +55,7 @@ struct CharacterInfo { /* 006C */ char name[24]; /* 0084 */ unsigned char stats[6]; /* 008A */ unsigned char slot; - /* 008B */ unsigned char unknown_008B[0x3]; + /* 008B */ unsigned char characterFlags[0x3]; /* 008E */ char mapName[16]; /* 009E */ std::int32_t deleteDate; /* 00A2 */ std::int32_t robe; @@ -66,9 +66,9 @@ struct CharacterInfo { struct CharacterSlotExtension { /* 0000 */ unsigned char unknown_0000; - /* 0001 */ std::uint32_t unknown_0001; - /* 0005 */ std::uint32_t unknown_0005; - /* 0009 */ std::uint32_t unknown_0009; + /* 0001 */ std::uint32_t code; + /* 0005 */ std::uint32_t time1; + /* 0009 */ std::uint32_t time2; /* 000D */ unsigned char unknown_000D[7]; }; #pragma pack(pop) @@ -102,17 +102,17 @@ public: void SubD97780(int value); void SendKeepalive(); /* 0058 */ int charParams[6]; - /* 0070 */ int unknown_0070; - /* 0074 */ int unknown_0074; - /* 0078 */ bool unknown_0078; - /* 0079 */ unsigned char unknown_0079[0x3F]; + /* 0070 */ int characterParameter7; + /* 0074 */ int characterParameter8; + /* 0078 */ bool makingCharNameFirstByte; + /* 0079 */ unsigned char makingCharNameTail[0x3F]; /* 00B8 */ unsigned char billingInfo[0x80]; - /* 0138 */ unsigned char unknown_0138[0x8C]; - /* 01C4 */ int unknown_01C4; - /* 01C8 */ unsigned char unknown_01C8[0x4]; + /* 0138 */ unsigned char loginCredentials[0x8C]; + /* 01C4 */ int serverCount; + /* 01C8 */ unsigned char selectedServerStorage[0x4]; /* 01CC */ int characterCount; - /* 01D0 */ unsigned char unknown_01D0[0x8]; - /* 01D8 */ int unknown_01D8; + /* 01D0 */ unsigned char loginExtra[0x8]; + /* 01D8 */ int receivedCharacterCount; /* 01DC */ int unknown_01DC; /* 01E0 */ bool characterDeleted; /* 01E1 */ unsigned char unknown_01E1[0x3]; @@ -121,24 +121,24 @@ public: /* 4068 */ CharacterInfo characters[68]; /* 6EE4 */ std::string wallpaperName; /* 6EFC */ CharacterSlotExtension slotExtension; - /* 6F10 */ std::uint32_t unknown_6F10; + /* 6F10 */ std::uint32_t nextKeepaliveTime; /* 6F14 */ UIWindow* window_6F14; /* 6F18 */ int passwordRetryCount; - /* 6F1C */ std::vector unknown_6F1C; - /* 6F28 */ int unknown_6F28; + /* 6F1C */ std::vector noticeCommands; + /* 6F28 */ int authChallengeId; /* 6F2C */ std::vector unknown_6F2C; - /* 6F38 */ std::vector unknown_6F38; + /* 6F38 */ std::vector accountInfo; /* 6F44 */ unsigned char savedInlineCharset; /* 6F45 */ unsigned char unknown_6F45[0x3]; - /* 6F48 */ int unknown_6F48; - /* 6F4C */ int unknown_6F4C; + /* 6F48 */ int selectedAccount; + /* 6F4C */ int selectedSecondaryAccount; /* 6F50 */ std::string unknown_6F50; /* 6F68 */ std::vector mapStates; - /* 6F74 */ bool unknown_6F74; - /* 6F75 */ bool unknown_6F75; - /* 6F76 */ bool unknown_6F76; + /* 6F74 */ bool loginResponseReceived; + /* 6F75 */ bool otpPending; + /* 6F76 */ bool otpTimedOut; /* 6F77 */ unsigned char unknown_6F77[0x1]; - /* 6F78 */ int unknown_6F78; + /* 6F78 */ int remainingLoginSeconds; int Run() override; void Initialize(const char* name) override; @@ -213,7 +213,7 @@ static_assert(offsetof(CharacterInfo, sex) == 0xAE); static_assert(sizeof(MapStateEntry) == 0x14); static_assert(sizeof(CharacterSlotExtension) == 0x14); static_assert(offsetof(CLoginMode, characterCount) == 0x1CC); -static_assert(offsetof(CLoginMode, unknown_01D8) == 0x1D8); +static_assert(offsetof(CLoginMode, receivedCharacterCount) == 0x1D8); static_assert(offsetof(CLoginMode, characters) == 0x4068); static_assert(offsetof(CLoginMode, slotExtension) == 0x6EFC); static_assert(offsetof(CLoginMode, unknown_6F50) == 0x6F50); diff --git a/Source/Client/Mode/CMode.h b/Source/Client/Mode/CMode.h index b7a7c5cac..cbd7bfcf7 100644 --- a/Source/Client/Mode/CMode.h +++ b/Source/Client/Mode/CMode.h @@ -17,11 +17,11 @@ public: /* 000C */ int pendingCursorType; /* 0010 */ int fadeInRequested; /* 0014 */ int running; - /* 0018 */ int unknown_0018; + /* 0018 */ int connectionReady; /* 001C */ UITransBalloonText* tooltip; /* 0020 */ std::uint32_t tooltipTick; /* 0024 */ std::uint32_t cursorTick; - /* 0028 */ int unknown_0028; + /* 0028 */ int lockOnMouse; /* 002C */ int screenshotRequested; /* 0030 */ float cursorOffsetX; /* 0034 */ float cursorOffsetY; diff --git a/Source/Client/Mode/GameMode.cpp b/Source/Client/Mode/GameMode.cpp index 31b3a726b..b09260e30 100644 --- a/Source/Client/Mode/GameMode.cpp +++ b/Source/Client/Mode/GameMode.cpp @@ -107,10 +107,10 @@ struct GameModeTextRecord { /* 0004 */ std::int16_t length; /* 0006 */ int firstLength; /* 000A */ int secondLength; - /* 000E */ int unknown_000E; - /* 0012 */ int unknown_0012; - /* 0016 */ int unknown_0016; - /* 001A */ int unknown_001A; + /* 000E */ int roomOptionA; + /* 0012 */ int roomOptionB; + /* 0016 */ int roomOptionC; + /* 001A */ int roomOptionD; /* 001E */ char buffer[0x172]; }; #pragma pack(pop) @@ -352,7 +352,7 @@ std::vector g_activeSkillEffects; // OFFSET: 0x00CCF480 // FUNCTION: fn_21242 void CGameMode::PushUnknown01A4(int value) { - this->unknown_01A4.push_back(value); + this->pickupReqItemNaidList.push_back(value); } // OFFSET: 0x00CCF530 @@ -378,10 +378,10 @@ bool CGameMode::IsOverWeight(bool notify) { // OFFSET: 0x00CCFCF0 // FUNCTION: fn_21247 __declspec(noinline) void CGameMode::CompleteUnknown0194(std::uint32_t id, const std::string& text) { - auto it = this->unknown_0194.find(id); - if (it != this->unknown_0194.end()) { + auto it = this->guildMemberStatusCache.find(id); + if (it != this->guildMemberStatusCache.end()) { this->SendMsg(MM_GUILD_MEMBER_STATUS_CHANGE, reinterpret_cast(text.c_str()), it->second, 0, 0); - this->unknown_0194.erase(it); + this->guildMemberStatusCache.erase(it); } } @@ -405,7 +405,7 @@ int CGameMode::GetSkillAttackRange(int id, int level) { int reduction = 0; g_session.m_hotkeyScript->Call("GetSkillAttackRange", "ddd>dd", id, level, skill.level, &range, &reduction); - range += skill.unknown_001C - reduction; + range += skill.range - reduction; return range; } @@ -453,7 +453,7 @@ std::string CGameMode::LocationText() { // FUNCTION: fn_21284 bool CGameMode::HasInventoryItem(int id) { const ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, id, 0); - return item.unknown_0000[1] != 0 && item.quantity > 0; + return item.identity[1] != 0 && item.quantity > 0; } // OFFSET: 0x00CD58B0 @@ -461,31 +461,31 @@ bool CGameMode::HasInventoryItem(int id) { bool CGameMode::HasResurrectionItem() { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, 7621, 0); const CWorld* world = this->scene; - if (world->unknown_0048 || world->unknown_004C || world->unknown_0054) { + if (world->isPKZone || world->isSiegeMode || world->isEventPVPMode) { return false; } - if (item.unknown_0000[1] != 0 && item.quantity > 0) { + if (item.identity[1] != 0 && item.quantity > 0) { return true; } item = LookupClientItem(g_session.m_inventoryItems, 6833, 0); - if (item.unknown_0000[1] != 0 && item.quantity > 0) { + if (item.identity[1] != 0 && item.quantity > 0) { return true; } item = LookupClientItem(g_session.m_inventoryItems, 6316, 0); - if (item.unknown_0000[1] != 0 && item.quantity > 0) { + if (item.identity[1] != 0 && item.quantity > 0) { return true; } item = LookupClientItem(g_session.m_inventoryItems, 6293, 0); - if (item.unknown_0000[1] != 0 && item.quantity > 0) { + if (item.identity[1] != 0 && item.quantity > 0) { return true; } item = LookupClientItem(g_session.m_inventoryItems, 25310, 0); - if (item.unknown_0000[1] != 0 && item.quantity > 0) { + if (item.identity[1] != 0 && item.quantity > 0) { return true; } @@ -519,9 +519,9 @@ void CGameMode::SetDragIds(int source, int id) { // FUNCTION: fn_21363 void CGameMode::UpdateUnknown0628(int id, bool add) { if (add == true) { - this->unknown_0628.insert(id); + this->petFriendlyNoticeIds.insert(id); } else { - this->unknown_0628.erase(id); + this->petFriendlyNoticeIds.erase(id); } } @@ -553,8 +553,8 @@ MinimapMarker* CGameMode::FindMinimapMarker(std::uint32_t key) { // OFFSET: 0x00CF05E0 // FUNCTION: fn_21415 std::string CGameMode::GetUnknown0084(unsigned int index) { - if (!this->unknown_0084.empty() && index <= this->unknown_0084.size()) { - return this->unknown_0084[index]; + if (!this->mapResources.empty() && index <= this->mapResources.size()) { + return this->mapResources[index]; } return ""; @@ -593,7 +593,7 @@ std::string CGameMode::GetActiveSkillEffectTimeText(int skillId, int* activeSkil } *activeSkillId = effectId; - const std::uint32_t expiration = effect.unknown_0004; + const std::uint32_t expiration = effect.expiration; if (expiration == 999999 || expiration == 0) { break; } @@ -692,15 +692,15 @@ void CGameMode::RecordChatRoomSettings() { GameModeTextRecord record; std::memset(record.buffer, 0, sizeof(record.buffer)); record.header = 0x038808AE; - record.firstLength = static_cast(this->unknown_03C8.size()); - record.secondLength = static_cast(this->unknown_03E0.size()); - record.unknown_000E = this->unknown_03F8; - record.unknown_0012 = this->unknown_03FC; - record.unknown_0016 = this->unknown_0400; - record.unknown_001A = this->unknown_0404; + record.firstLength = static_cast(this->chatRoomTitle.size()); + record.secondLength = static_cast(this->chatRoomPassword.size()); + record.roomOptionA = this->chatRoomPublic; + record.roomOptionB = this->chatRoomMemberCount; + record.roomOptionC = this->chatRoomMemberLimit; + record.roomOptionD = this->chatRoomId; - std::memcpy(record.buffer, this->unknown_03C8.data(), record.firstLength); - std::memcpy(record.buffer + record.firstLength, this->unknown_03E0.data(), record.secondLength); + std::memcpy(record.buffer, this->chatRoomTitle.data(), record.firstLength); + std::memcpy(record.buffer + record.firstLength, this->chatRoomPassword.data(), record.secondLength); record.length = static_cast(offsetof(GameModeTextRecord, buffer) + record.firstLength + record.secondLength); Replay::Instance().Record(static_cast(record.length), &record, 0x2A, 0); @@ -789,7 +789,7 @@ unsigned CGameMode::ReadReplayGroundSkills(const std::vector& dat // OFFSET: 0x00CEFE50 // FUNCTION: fn_21407 void UIWindowMgr::ClearUnknown04DC() { - this->unknown_04DC.assign("", 0); + this->chatInputText.assign("", 0); } // GLOBAL: gl_24846 @@ -822,7 +822,7 @@ bool CGameMode::ShowRestrictedNotice(int grade) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NO_SAME_SENTANCE)), 255, 0, 0, 0); - g_windowMgr.unknown_04DC.assign("", 0); + g_windowMgr.chatInputText.assign("", 0); return true; } @@ -841,10 +841,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MM_ITEMTHROW: if (!this->IsMenuWindowOpen() && - *reinterpret_cast(&this->unknown_0100[4]) + 2000U <= timeGetTime() && - this->unknown_02CC == 0 && *reinterpret_cast(this->unknown_02D0) == 0 && argument1 != 0 && - this->unknown_0250 == 0) { - *reinterpret_cast(this->unknown_02D0) = 1; + *reinterpret_cast(&this->equipmentRequestState[4]) + 2000U <= timeGetTime() && + this->waitingUseItemAck == 0 && *reinterpret_cast(this->waitingItemThrowAck) == 0 && argument1 != 0 && + this->isPlayerDead == 0) { + *reinterpret_cast(this->waitingItemThrowAck) = 1; const std::uint16_t packet[3] = { 0x363, static_cast(argument1), static_cast(argument2) }; @@ -1015,7 +1015,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_UPGRADE_SKILLLEVEL: { - *reinterpret_cast(&this->unknown_0100[0x0C]) = 1; + *reinterpret_cast(&this->equipmentRequestState[0x0C]) = 1; const GameModePacketWord packet{0x112, static_cast(argument1)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; @@ -1030,9 +1030,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_WEAR_EQUIP_ARROW: if (!this->IsMenuWindowOpen() && - *reinterpret_cast(&this->unknown_0100[4]) + 2000U <= timeGetTime() && - this->unknown_0250 == 0) { - *reinterpret_cast(&this->unknown_0100[4]) = timeGetTime(); + *reinterpret_cast(&this->equipmentRequestState[4]) + 2000U <= timeGetTime() && + this->isPlayerDead == 0) { + *reinterpret_cast(&this->equipmentRequestState[4]) = timeGetTime(); const GameModePacketWordDword packet{ static_cast(ID_CZ_REQ_WEAR_EQUIP_V5), static_cast(argument1), static_cast(argument2) @@ -1041,7 +1041,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } return 0; case MM_CLOSE_DIALOG: { - this->unknown_024C = 0; + this->isOnQuest = 0; g_windowMgr.CloseWindow(WID_SAYDIALOGWND); g_windowMgr.CloseWindow(WID_CHOOSEWND); const GameModePacketDword packet{0x146, static_cast(argument1)}; @@ -1156,7 +1156,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_ITEMCOMPOSITION_LIST: { - *reinterpret_cast(this->unknown_045C) = argument1; + *reinterpret_cast(this->cardAndSkillBalloonIds) = argument1; const GameModePacketWord packet{0x17A, static_cast(argument1)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; @@ -1200,7 +1200,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQUEST_ACT: - if (this->scene->player->unknown_02CC != 0 && (argument1 == 0 || argument1 == 7)) { + if (this->scene->player->isRiding != 0 && (argument1 == 0 || argument1 == 7)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_ATTACK_IN_RIDING_STATE)), 0xFF, 0, 0, 0); } else { const GameModePacketDwordByte packet{ @@ -1279,12 +1279,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_GIVE_MANNER_POINT_PLUS: - this->SendMsg(MM_REQ_GIVE_MANNER_POINT, this->unknown_02E0, 0, argument1, 0); - g_session.DeleteProhibitionLog(this->unknown_02E0, argument1); + this->SendMsg(MM_REQ_GIVE_MANNER_POINT, this->menuTargetAid, 0, argument1, 0); + g_session.DeleteProhibitionLog(this->menuTargetAid, argument1); return 0; case MM_REQ_GIVE_MANNER_POINT_MINUS: - this->SendMsg(MM_REQ_GIVE_MANNER_POINT, this->unknown_02E0, 1, argument1, 0); - g_session.AddProhibitionLog(this->unknown_02E0, argument1); + this->SendMsg(MM_REQ_GIVE_MANNER_POINT, this->menuTargetAid, 1, argument1, 0); + g_session.AddProhibitionLog(this->menuTargetAid, argument1); return 0; case MM_ARROW_FROM_LIST: { const GameModePacketDword packet{0x1AE, static_cast(argument1)}; @@ -1353,8 +1353,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_JOIN_COUPLE: { const GameModePacketDwordDwordDword packet{ 0x1E3, - *reinterpret_cast(&this->unknown_028C[0]), - *reinterpret_cast(&this->unknown_028C[4]), + *reinterpret_cast(&this->lastCoupleIds[0]), + *reinterpret_cast(&this->lastCoupleIds[4]), static_cast(argument2) }; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); @@ -1363,8 +1363,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_JOIN_BABY: { const GameModePacketDwordDwordDword packet{ 0x1F7, - *reinterpret_cast(&this->unknown_028C[0]), - *reinterpret_cast(&this->unknown_028C[4]), + *reinterpret_cast(&this->lastCoupleIds[0]), + *reinterpret_cast(&this->lastCoupleIds[4]), static_cast(argument2) }; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); @@ -1629,8 +1629,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_ADVANCED_STATUS_CHANGE: - if (this->unknown_02D4 == 0 && this->unknown_0250 == 0) { - this->unknown_02D4 = 1; + if (this->waitingReqStatusAck == 0 && this->isPlayerDead == 0) { + this->waitingReqStatusAck = 1; const GameModePacketWordWord packet{ 0xB24, static_cast(argument1), static_cast(argument2) }; @@ -1655,7 +1655,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_RELEASE_QUEST_SH: - this->unknown_024C = 0; + this->isOnQuest = 0; g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND); g_windowMgr.CloseWindow(WID_MERCHANTITEMPURCHASEWND); g_windowMgr.CloseWindow(WID_ITEMCOLLECTIONWND); @@ -1669,25 +1669,25 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_SETLOCKONMOUSE: - this->unknown_0028 = argument1; + this->lockOnMouse = argument1; if (argument1 == 0) { - *reinterpret_cast(this->unknown_00EC) = 0; - *reinterpret_cast(&this->unknown_00EC[4]) = 0; + *reinterpret_cast(this->lastActorIds) = 0; + *reinterpret_cast(&this->lastActorIds[4]) = 0; } return 0; case MM_REQ_STATUS: - if (this->unknown_02D4 == 0) { - this->unknown_02D4 = 1; - if (this->unknown_0250 == 0) { + if (this->waitingReqStatusAck == 0) { + this->waitingReqStatusAck = 1; + if (this->isPlayerDead == 0) { const std::uint16_t packet = 0xBA; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); } } return 0; case MM_STATUS_CHANGE: - if (this->unknown_02D4 == 0) { - this->unknown_02D4 = 1; - if (this->unknown_0250 == 0) { + if (this->waitingReqStatusAck == 0) { + this->waitingReqStatusAck = 1; + if (this->isPlayerDead == 0) { const GameModePacketBB packet{ 0xBB, static_cast(argument1), static_cast(argument2) }; @@ -1696,7 +1696,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } return 0; case MM_CANCEL_DRAG: - if (g_replayAnimationScaling == 0 || this->unknown_05EC[0] == 0) { + if (g_replayAnimationScaling == 0 || this->replayDragState[0] == 0) { this->drag.source = 0; this->drag.id = 0; this->drag.quantity = 0; @@ -1706,36 +1706,36 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_QUERYRSWNAME: return reinterpret_cast(this->mapName); case MM_PLAYER_EMOTION_END: - this->unknown_026E[0x16] = 0; + this->requestTimers[0x16] = 0; return 0; case MM_ACK_SELL: - if (this->unknown_0250 == 0) { + if (this->isPlayerDead == 0) { const GameModePacketC5 packet{0xC5, static_cast(argument1), 1}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); } return 0; case MM_ACK_BUY: - if (this->unknown_0250 == 0) { + if (this->isPlayerDead == 0) { const GameModePacketC5 packet{0xC5, static_cast(argument1), 0}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); } return 0; case MM_DELETEPARTYPOSALL: - this->unknown_01B4.clear(); + this->partyPosList.clear(); return 0; case MM_CANCEL_USE_SKILL: - this->unknown_0408 = nullptr; - this->unknown_040C = 0; - this->unknown_0414 = 0; + this->skillUseType = nullptr; + this->skillId = 0; + this->skillUseLevel = 0; g_pickInvert = 0; return 0; case MM_DELETEGUILDPOSALL: - this->unknown_01BC.clear(); + this->guildPosList.clear(); return 0; case MM_GET_SKILL_USE_TYPE: - return reinterpret_cast(this->unknown_0408); + return reinterpret_cast(this->skillUseType); case MM_GET_SKILL_USE_LEVEL: - return this->unknown_0414; + return this->skillUseLevel; case MM_SEND_NUMBER_TO_NPC: if (this->scene->GetGameActorByAID(argument1) != nullptr) { const GameModePacketDwordDword packet{ @@ -1745,7 +1745,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } return 0; case MM_INITWHISPERMENU: - this->unknown_01FC = reinterpret_cast(argument1); + this->lastWhisperMenuCharacterName = reinterpret_cast(argument1); this->actorMenuIds.clear(); this->actorMenuIds.push_back(0xB); this->actorMenuIds.push_back(0x15); @@ -1826,25 +1826,25 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case 0x127: return 0; case MM_CHATMSG: { - if (g_windowMgr.unknown_04DC.empty() || g_session.IsBerserkActive() == 1) { + if (g_windowMgr.chatInputText.empty() || g_session.IsBerserkActive() == 1) { return 0; } char text[0x16A]; - std::strcpy(text, g_windowMgr.unknown_04DC.c_str()); + std::strcpy(text, g_windowMgr.chatInputText.c_str()); if (g_forbiddenWords.Contains(text)) { std::string replacement; g_forbiddenWords.Mask(text, &replacement); - g_windowMgr.unknown_04DC.assign(text); + g_windowMgr.chatInputText.assign(text); } - if (this->unknown_0438 == text) { - ++this->unknown_0450; + if (this->lastChat == text) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(text); + this->lastChat.assign(text); char extendedPair[0x16A]; char extendedByte[0x16A]; char shortenedByte[0x16A]; @@ -1874,37 +1874,37 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i shortenedPair[length - 1] = shortenedPair[length + 1]; } } - auto* chatTicks = reinterpret_cast(this->unknown_0574); - if (this->unknown_0468 == 10) { + auto* chatTicks = reinterpret_cast(this->recordChatTime); + if (this->recordChatCount == 10) { for (int i = 0; i < 10; ++i) { - this->unknown_046C[i] = this->unknown_046C[i + 1]; + this->recordChat[i] = this->recordChat[i + 1]; chatTicks[i] = chatTicks[i + 1]; } } - this->unknown_046C[this->unknown_0468].assign(text); - chatTicks[this->unknown_0468] = timeGetTime(); - ++this->unknown_0468; - if (this->unknown_0468 > 10) { - this->unknown_0468 = 10; + this->recordChat[this->recordChatCount].assign(text); + chatTicks[this->recordChatCount] = timeGetTime(); + ++this->recordChatCount; + if (this->recordChatCount > 10) { + this->recordChatCount = 10; } int matches = 0; - for (int i = 0; i <= this->unknown_0468; ++i) { + for (int i = 0; i <= this->recordChatCount; ++i) { if (i == 10) { const std::uint32_t elapsed = timeGetTime() - chatTicks[0]; if (elapsed != 0 && elapsed < 10000) { this->RequestAdminStatus(); - this->unknown_05A0 = 0; + this->strikeCount = 0; break; } if (elapsed != 0 && elapsed < 30000) { - for (int j = 0; j < this->unknown_0468; ++j) { - if (this->unknown_046C[j].size() < 20) { + for (int j = 0; j < this->recordChatCount; ++j) { + if (this->recordChat[j].size() < 20) { break; } - if (j == this->unknown_0468 - 1) { + if (j == this->recordChatCount - 1) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast("TOO FAST CHATTING!"), 0x6E96FF, 0, 0, 0); this->RequestAdminStatus(); - this->unknown_05A0 = 0; + this->strikeCount = 0; } } } @@ -1927,12 +1927,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::sprintf(middle, "%s %s%s", prefix, name, suffix); std::sprintf(last, GetMessageString(0x319)); } - if (this->unknown_046C[9] == last && this->unknown_046C[7] == first && - this->scene->player->render.unknown_0070 != 3) { + if (this->recordChat[9] == last && this->recordChat[7] == first && + this->scene->player->render.state != 3) { if ((g_session.IsSuperNoviceJob(g_session.GetDisplayJob()) && - g_session.m_level >= *reinterpret_cast(g_session.unknown_7EE8)) || + g_session.m_level >= *reinterpret_cast(g_session.maxBaseLevel)) || (g_session.IsSuperNovice2Job(g_session.GetDisplayJob()) && - g_session.m_level >= *reinterpret_cast(g_session.unknown_7EF0))) { + g_session.m_level >= *reinterpret_cast(g_session.jobLevelLimits))) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MSG_SUPERNOVICE_CHOPOKGI_CAPPEDLEVEL)), 0xFF, 0, 0, 0); break; } @@ -1942,31 +1942,31 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } } if (length > 6 && - (this->unknown_046C[i] == text || this->unknown_046C[i] == extendedPair || - this->unknown_046C[i] == extendedByte || this->unknown_046C[i] == shortenedByte || - this->unknown_046C[i] == shortenedPair) && + (this->recordChat[i] == text || this->recordChat[i] == extendedPair || + this->recordChat[i] == extendedByte || this->recordChat[i] == shortenedByte || + this->recordChat[i] == shortenedPair) && chatTicks[0] < timeGetTime() && timeGetTime() - chatTicks[i] < 30000 && ++matches >= 3) { - auto* repeatTicks = reinterpret_cast(this->unknown_05A4); - if (this->unknown_05A0 == 3) { + auto* repeatTicks = reinterpret_cast(this->strikeTime); + if (this->strikeCount == 3) { repeatTicks[0] = repeatTicks[1]; repeatTicks[1] = repeatTicks[2]; - this->unknown_05A0 = 2; + this->strikeCount = 2; } - repeatTicks[this->unknown_05A0] = timeGetTime(); - if (this->unknown_05A0 >= 2 && repeatTicks[2] - repeatTicks[0] < 90000) { + repeatTicks[this->strikeCount] = timeGetTime(); + if (this->strikeCount >= 2 && repeatTicks[2] - repeatTicks[0] < 90000) { this->RequestAdminStatus(); - this->unknown_05A0 = 0; - } else if (this->unknown_05A0 < 3) { - ++this->unknown_05A0; + this->strikeCount = 0; + } else if (this->strikeCount < 3) { + ++this->strikeCount; } break; } } - if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.unknown_04DC) == true) { + if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.chatInputText) == true) { return 0; } char message[0x169]{}; - const char* input = g_windowMgr.unknown_04DC.c_str(); + const char* input = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", name, prefix, input); @@ -1991,11 +1991,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i for (int i = 0; i < count; ++i) { const ITEM_INFO item = g_session.GetItem1730At(i); const std::uint16_t entry[2] = { - static_cast(item.unknown_0000[1]), static_cast(item.quantity) + static_cast(item.identity[1]), static_cast(item.quantity) }; std::memcpy(packet + 4 + i * 4, entry, sizeof(entry)); } - if (count != 0 && this->unknown_0250 == 0) { + if (count != 0 && this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(size), packet); } g_session.ClearTradeItems(); @@ -2006,10 +2006,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_ADDPARTYPOS: { const std::uint32_t accountId = static_cast(argument1); - this->unknown_01B4[accountId].x = argument2; - this->unknown_01B4[accountId].y = argument3; + this->partyPosList[accountId].x = argument2; + this->partyPosList[accountId].y = argument3; const MessengerMember member = g_session.PartyByAccount(accountId); - this->unknown_01B4[accountId].color = member.color; + this->partyPosList[accountId].color = member.color; return 0; } case MM_USING_SKILL: { @@ -2017,15 +2017,15 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } const auto* skill = reinterpret_cast(argument1); - if (argument3 == 0 && this->scene->player->unknown_02CC != 0 && + if (argument3 == 0 && this->scene->player->isRiding != 0 && !g_session.IsHomunculusSkill(skill->id) && !g_session.IsMercenarySkill(skill->id)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_USE_SKILL_IN_RIDING_STATE)), 0xFF, 0, 0, 0); g_session.m_automaticSkills.Complete(skill->id); return 0; } this->SendMsg(MM_CANCEL_USE_SKILL, 0, 0, 0, 0); - this->unknown_0418 = argument4 == -1; - switch (skill->unknown_000C) { + this->ignoreSkillInterval = argument4 == -1; + switch (skill->type) { case 1: this->SendMsg(MM_HANG_USE_SKILL, 2, argument1, argument2, 0); return 0; @@ -2035,10 +2035,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case 4: { std::uint32_t target; if (g_session.IsHomunculusSkill(skill->id)) { - target = *reinterpret_cast(&g_session.unknown_5570[8]); + target = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); } else { const bool mercenary = g_session.IsMercenarySkill(skill->id) != 0; - target = mercenary ? *reinterpret_cast(&g_session.unknown_5620[8]) : g_session.m_aid; + target = mercenary ? *reinterpret_cast(&g_session.companionTargetState[8]) : g_session.m_aid; } this->SendMsg(MM_USE_SKILL, skill->id, target, argument2, argument3); this->SendMsg(MM_HANG_USE_SKILL, 0, 0, 0, 0); @@ -2059,7 +2059,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_REQ_JOIN_GUILD: { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(argument1)); - if (actor == nullptr || actor->unknown_0305 != 0) { + if (actor == nullptr || actor->hasSp != 0) { return 0; } const GameModePacketDwordDwordDword packet{ @@ -2069,7 +2069,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_JOIN_GUILD2: { - if (g_guildInfo.m_guildId == 0 || g_guildInfo.unknown_00AC == 0) { + if (g_guildInfo.m_guildId == 0 || g_guildInfo.canInvite == 0) { return 0; } const char* name = reinterpret_cast(argument1); @@ -2104,14 +2104,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(output + 10, &item.id, 4); output += 14; } - if (count > 0 && this->unknown_0250 == 0) { + if (count > 0 && this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(size), packet); } return 0; } case MM_ADDREGISTERPOS: - this->unknown_019C[static_cast(argument1)].first = argument2; - this->unknown_019C[static_cast(argument1)].second = argument3; + this->actorPosList[static_cast(argument1)].first = argument2; + this->actorPosList[static_cast(argument1)].second = argument3; return 0; case MM_ACK_EXCHANGE_ITEM: { this->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); @@ -2130,17 +2130,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i packet.packetId = 0x2C4; std::strncpy(reinterpret_cast(packet.payload), name, sizeof(packet.payload)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { const std::string message = std::string(name) + LookupMessage(MSI_CHARACTER_PARTY_INVITATION_TO_JOIN); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message.c_str()), 0xFFFF00, 0, 0, 0); } return 0; } case MM_REQ_CHANGE_GUILD_POSITIONINFO: { - if (g_guildInfo.unknown_00B4 == 0) { + if (g_guildInfo.isMaster == 0) { return 0; } - auto& positions = reinterpret_cast&>(g_guildInfo.unknown_010C); + auto& positions = reinterpret_cast&>(g_guildInfo.pendingPositionChanges); const std::int16_t length = static_cast(4U + 40U * positions.size()); if (length > 0x800) { return 0; @@ -2154,7 +2154,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const auto& position = entry.second; const int flags = (position.canInvite != 0 ? 1 : 0) | (position.canExpel != 0 ? 0x10 : 0) | (position.canStorage != 0 ? 0x100 : 0); - std::memcpy(output, &position.unknown_0004, 4); + std::memcpy(output, &position.positionId, 4); std::memcpy(output + 4, &flags, 4); std::memcpy(output + 8, &position.id, 4); std::memcpy(output + 12, &position.tax, 4); @@ -2176,14 +2176,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CONFORM_MAKEGROUP: { - if (g_forbiddenWords.Contains(g_session.unknown_54AC.c_str())) { + if (g_forbiddenWords.Contains(g_session.partyRequestName.c_str())) { g_windowMgr.Confirm(LookupMessage(MSI_BAD_SENTANGE), 0, true, false, 0, "Message", 280, 120, 0); return 0; } unsigned char packet[28]; const std::uint16_t packetId = 0x1E8; std::memcpy(packet, &packetId, sizeof(packetId)); - std::strncpy(reinterpret_cast(packet + 2), g_session.unknown_54AC.c_str(), 24); + std::strncpy(reinterpret_cast(packet + 2), g_session.partyRequestName.c_str(), 24); packet[26] = static_cast(argument2); packet[27] = static_cast(argument3); GetRagConnection().Send(g_packetLengths.FixedLength(packetId), packet); @@ -2205,8 +2205,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 8, &argument2, 4); for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1760At(index); - if (item.unknown_0000[1] != 0) { - const std::uint16_t itemIndex = static_cast(item.unknown_0000[1]); + if (item.identity[1] != 0) { + const std::uint16_t itemIndex = static_cast(item.identity[1]); const int itemId = std::atoi(item.itemId.c_str()); const std::uint16_t quantity = static_cast(item.quantity); std::memcpy(packet + 12 + index * 8, &itemIndex, 2); @@ -2350,7 +2350,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } if (this->drag.source == 1) { if (!g_session.HasInventoryItem(this->drag.id) || - *reinterpret_cast(&this->unknown_0100[4]) + 2000U > timeGetTime()) { + *reinterpret_cast(&this->equipmentRequestState[4]) + 2000U > timeGetTime()) { this->drag.source = 0; return 0; } @@ -2370,7 +2370,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } } else { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, this->drag.id); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CAN_DROP_ITEM_TO_ITEMWND)), 0xFF, 0, 0, 0); } @@ -2379,7 +2379,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } if (this->drag.source == 1) { - if (g_windowMgr.unknown_01D4 == nullptr) { + if (g_windowMgr.itemWnd == nullptr) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_OPEN_ITEMWND_TO_THROW)), 0xFF, 0, 0, 0); this->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return 0; @@ -2403,8 +2403,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } this->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); } - if (this->unknown_024C == 0 && !g_windowMgr.LookupWindow(WID_EXCHANGEUI) && - !g_windowMgr.unknown_01E0 && !g_windowMgr.window_0288 && !g_windowMgr.unknown_0458 && + if (this->isOnQuest == 0 && !g_windowMgr.LookupWindow(WID_EXCHANGEUI) && + !g_windowMgr.equipWnd && !g_windowMgr.window_0288 && !g_windowMgr.rodexComposeWnd && !g_windowMgr.LookupWindow(WID_LAPINEBOXWND) && !g_windowMgr.LookupWindow(WID_LAPINEUPGRADEBOXWND) && !g_windowMgr.LookupWindow(WID_REFININGWND) && !g_windowMgr.LookupWindow(0x128) && !g_windowMgr.LookupWindow(WID_BARTERMARKETWND) && !g_windowMgr.LookupWindow(WID_GRADEENCHANTWND)) { @@ -2429,11 +2429,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (g_windowMgr.LookupWindow(0x128)) { return 0; } - if (g_windowMgr.unknown_01E0) { + if (g_windowMgr.equipWnd) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CLOSEEQUIPWND)), 0xFF, 0, 0, 0); } - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_UISCRIPT_ERROR_GUIDE_MSG)), 0xFF, 0, 0, 0); } @@ -2442,14 +2442,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_REQ_ENTER_ROOM: { UIWindow* window = g_windowMgr.window_027C; - std::uint32_t& lastTick = *reinterpret_cast(&this->unknown_026E[0xE]); + std::uint32_t& lastTick = *reinterpret_cast(&this->requestTimers[0xE]); if (timeGetTime() > lastTick + 1000U) { - this->unknown_00FC = 0; + this->isWaitingEnterRoom = 0; } - if (window || this->unknown_00FC) { + if (window || this->isWaitingEnterRoom) { return 0; } - this->unknown_00FC = 1; + this->isWaitingEnterRoom = 1; lastTick = timeGetTime(); GameModePacketDwordDwordDword packet; packet.packetId = 0xD9; @@ -2467,7 +2467,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_JOIN_GROUP: { if (argument2 == 0) { - g_session.unknown_54C4.clear(); + g_session.partyName.clear(); } else { g_windowMgr.EnsureWindow(WID_MESSENGERGROUPWND); } @@ -2476,22 +2476,22 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_USESKILL_LEVEL_PLUS: { - if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, this->unknown_040C)) { - CSkillInfo skill = g_session.m_skillBundle.Lookup(this->unknown_040C); + if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, this->skillId)) { + CSkillInfo skill = g_session.m_skillBundle.Lookup(this->skillId); if (skill.available) { - this->unknown_0414 += argument1; - if (this->unknown_0414 > skill.level) { - this->unknown_0414 = skill.level; + this->skillUseLevel += argument1; + if (this->skillUseLevel > skill.level) { + this->skillUseLevel = skill.level; } - if (this->unknown_0414 <= 0) { - this->unknown_0414 = 1; + if (this->skillUseLevel <= 0) { + this->skillUseLevel = 1; } } } return 0; } case MM_REQ_DISORGANIZE_GUILD: { - if (g_guildInfo.unknown_00B4 == 0) { + if (g_guildInfo.isMaster == 0) { return 0; } GameModePacketText40 packet; @@ -2499,7 +2499,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const char* name = reinterpret_cast(argument1); std::strncpy(packet.text, name, 39); packet.text[39] = 0; - if (std::strcmp(name, g_guildInfo.unknown_0000.c_str()) != 0) { + if (std::strcmp(name, g_guildInfo.guildName.c_str()) != 0) { g_windowMgr.Confirm(LookupMessage(MSI_DISORGANIZE_GUILD_FAILURE), 0, true, false, 0, "Message", 280, 120, 0); return 0; } @@ -2508,7 +2508,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_COMMAND_PET: { if (argument3 == 1) { - const int foodId = g_session.GetPetFood(g_session.unknown_103C); + const int foodId = g_session.GetPetFood(g_session.petJob); int quantity; { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, foodId, 0); @@ -2546,23 +2546,23 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 4, &argument2, sizeof(argument2)); std::strncpy(reinterpret_cast(packet + 12), reinterpret_cast(argument1), 79); packet[91] = 0; - if (g_windowMgr.unknown_040C) { - const auto* window = static_cast(g_windowMgr.unknown_040C); - std::memcpy(packet + 92, &window->unknown_018A, sizeof(window->unknown_018A)); - std::memcpy(packet + 94, &window->unknown_018C, sizeof(window->unknown_018C)); + if (g_windowMgr.buyingShopMakeWnd) { + const auto* window = static_cast(g_windowMgr.buyingShopMakeWnd); + std::memcpy(packet + 92, &window->selectedRow, sizeof(window->selectedRow)); + std::memcpy(packet + 94, &window->selectedColumn, sizeof(window->selectedColumn)); } if (!g_replayAnimationScaling) { - g_session.unknown_550C = reinterpret_cast(packet + 12); + g_session.storeTitle = reinterpret_cast(packet + 12); } unsigned char* output = packet + 96; for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1768At(index); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { const int itemId = std::atoi(item.itemId.c_str()); const std::uint16_t quantity = static_cast(item.quantity); std::memcpy(output, &itemId, sizeof(itemId)); std::memcpy(output + 4, &quantity, sizeof(quantity)); - std::memcpy(output + 6, &item.unknown_0014[1], sizeof(item.unknown_0014[1])); + std::memcpy(output + 6, &item.prices[1], sizeof(item.prices[1])); output += 10; } } @@ -2570,14 +2570,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_DELETEREGISTERPOS: - this->unknown_019C.erase(static_cast(argument1)); + this->actorPosList.erase(static_cast(argument1)); return 0; case MM_REQ_LEAVE_GROUP: { - if (g_session.unknown_5948 == 1 || g_session.unknown_5948 == 2) { + if (g_session.memorialDungeonState == 1 || g_session.memorialDungeonState == 2) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MUST_PASSWORD_EXCEED_CHAR)), 0xFF, 0, 0, 0); } const int count = g_session.PartyCount(); - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { if (count > 1) { bool online = false; bool transferred = false; @@ -2605,7 +2605,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_adventurerAgencyMgr->RequestStop(); } } - if (g_windowMgr.unknown_042C != nullptr) { + if (g_windowMgr.partyInvitationToWnd != nullptr) { g_windowMgr.CloseWindow(WID_PARTYINVITATIONTOWND); } const std::uint16_t packet = 0x100; @@ -2617,7 +2617,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_session.m_automaticSkills.Complete(argument1); return 0; } - if (argument4 == 0 && this->scene->player->unknown_02CC != 0 && + if (argument4 == 0 && this->scene->player->isRiding != 0 && !g_session.IsHomunculusSkill(argument1) && !g_session.IsMercenarySkill(argument1)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_USE_SKILL_IN_RIDING_STATE)), 0xFF, 11, 0, 0); g_session.m_automaticSkills.Complete(argument1); @@ -2628,11 +2628,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } this->RecordReplayMessage(event, argument1, argument2, argument3); if (argument1 == 10000) { - if (static_cast(argument2) == g_session.unknown_1010) { + if (static_cast(argument2) == g_session.petGid) { return 0; } const CGameActor* actor = static_cast(this->scene->GetGameActorByAID(argument2)); - if (actor != nullptr && actor->unknown_0314 == 0) { + if (actor != nullptr && actor->objectType == 0) { return 0; } g_windowMgr.EnsureWindow(WID_PETTAMINGDECEIVEWND)->SendMsg(nullptr, UM_SET_TARGET, 0, argument2, 0, 0); @@ -2652,15 +2652,15 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } if (argument1 == 40000) { - if (static_cast(argument2) != g_session.unknown_1010) { + if (static_cast(argument2) != g_session.petGid) { g_windowMgr.EnsureWindow(WID_COLLECTIONSYSTEMWND)->SendMsg(nullptr, UM_SET_TARGET, 0, argument2, 0, 0); } return 0; } - if (g_windowMgr.unknown_0304 != nullptr) { + if (g_windowMgr.merchantItemMyShopWnd != nullptr) { return 0; } - if (this->unknown_0418 == 0 && !g_session.IsRequestReady(argument1)) { + if (this->ignoreSkillInterval == 0 && !g_session.IsRequestReady(argument1)) { char message[260]; const char* name = CSkillInfo::DisplayName(*g_session.m_hotkeyScript, argument1); std::sprintf(message, LookupMessage(MSI_SKILLINTERVAL2), name); @@ -2678,18 +2678,18 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } } if ((!g_session.IsHomunculusSkill(argument1) && !g_session.IsMercenarySkill(argument1) && - this->scene->player->render.unknown_0070 == 6) || g_windowMgr.window_027C != nullptr) { + this->scene->player->render.state == 6) || g_windowMgr.window_027C != nullptr) { g_session.m_automaticSkills.Complete(argument1); return 0; } if (argument1 == 154 || argument1 == 41) { - if (*reinterpret_cast(g_session.unknown_5570) < (argument1 == 154 ? 40 : 30)) { + if (*reinterpret_cast(g_session.spAndHomunculusStats) < (argument1 == 154 ? 40 : 30)) { char message[256]; std::sprintf(message, LookupMessage(MSI_USESKILL_FAIL_SP_INSUFFICIENT)); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message), 0xFF, 11, 0, 0); return 0; } - if (g_session.unknown_5C1C <= 0) { + if (g_session.replayPacketMode <= 0) { char message[256]; std::sprintf(message, LookupMessage(MSI_MUST_EQUIP_CART)); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message), 0xFF, 11, 0, 0); @@ -2733,9 +2733,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_ADDGUILDPOS: - this->unknown_01BC[static_cast(argument1)].x = argument2; - this->unknown_01BC[static_cast(argument1)].y = argument3; - this->unknown_01BC[static_cast(argument1)].color = 0xFFFFA6D2; + this->guildPosList[static_cast(argument1)].x = argument2; + this->guildPosList[static_cast(argument1)].y = argument3; + this->guildPosList[static_cast(argument1)].color = 0xFFFFA6D2; return 0; case MM_NPC_MARKET_PURCHASE: { unsigned char packet[2048]{}; @@ -2755,7 +2755,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 4 + index * 8, &id, sizeof(id)); std::memcpy(packet + 8 + index * 8, &item.quantity, sizeof(item.quantity)); } - if (this->unknown_0250 == 0) { + if (this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(packetLength), packet); } g_windowMgr.LookupWindow(WID_PARAITEMPURCHASEWND)->Show(0); @@ -2781,10 +2781,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_STOVE_AUTHENTICATION: { - if (g_stoveMgr->unknown_0008 != 0) { + if (g_stoveMgr->m_pendingOperation != 0) { return 0; } - g_stoveMgr->unknown_0008 = argument1; + g_stoveMgr->m_pendingOperation = argument1; unsigned char packet[610]{}; const std::uint16_t packetId = 0xC0F; std::memcpy(packet, &packetId, sizeof(packetId)); @@ -2801,17 +2801,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } if (this->IsMenuWindowOpen() || - *reinterpret_cast(&this->unknown_0100[8]) + 2000U > timeGetTime() || - this->unknown_0250 != 0) { + *reinterpret_cast(&this->equipmentRequestState[8]) + 2000U > timeGetTime() || + this->isPlayerDead != 0) { return 0; } ITEM_INFO item(0); item = argument2 != 0 ? g_session.GetItem2B50(argument1) : g_session.GetItem17F0(argument1); - if (item.unknown_0000[1] == 0 || item.quantity <= 0) { + if (item.identity[1] == 0 || item.quantity <= 0) { return 0; } - *reinterpret_cast(&this->unknown_0100[8]) = timeGetTime(); - const GameModePacketWord packet{0xAB, static_cast(item.unknown_0000[1])}; + *reinterpret_cast(&this->equipmentRequestState[8]) = timeGetTime(); + const GameModePacketWord packet{0xAB, static_cast(item.identity[1])}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 1; } @@ -2824,12 +2824,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i UIPlayerGage* gauge = new UIPlayerGage; this->itemWindow = gauge; gauge->SetFirstValues( - [] { return static_cast(g_session.unknown_5568); }, - [] { return static_cast(g_session.unknown_556C); } + [] { return static_cast(g_session.hp); }, + [] { return static_cast(g_session.maxHp); } ); gauge->SetSecondValues( - [] { return static_cast(*reinterpret_cast(&g_session.unknown_5570[0])); }, - [] { return static_cast(*reinterpret_cast(&g_session.unknown_5570[4])); } + [] { return static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[0])); }, + [] { return static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[4])); } ); if (g_session.IsTreeGroupThree(g_session.GetDisplayJob()) == true) { gauge->SetFourthValues( @@ -2843,29 +2843,29 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } CGameActor* player = this->scene->player; gauge->Move(player->render.screenX - 30, - static_cast(static_cast(ScaleByScreenHeight(12)) * player->render.unknown_005C + + static_cast(static_cast(ScaleByScreenHeight(12)) * player->render.distanceScale + static_cast(player->render.screenY))); g_windowMgr.AddRenderedFront(gauge); return 0; } case MM_HANG_USE_SKILL: { - if (g_windowMgr.LookupWindow(WID_COLLECTIONSYSTEMWND) != nullptr || g_windowMgr.unknown_0304 != nullptr) { + if (g_windowMgr.LookupWindow(WID_COLLECTIONSYSTEMWND) != nullptr || g_windowMgr.merchantItemMyShopWnd != nullptr) { return 0; } - this->unknown_0408 = reinterpret_cast(argument1); + this->skillUseType = reinterpret_cast(argument1); if (argument2 == 0) { return 0; } const CSkillInfo* skill = reinterpret_cast(argument2); - this->unknown_040C = skill->id; - this->unknown_0410 = skill->unknown_001C; + this->skillId = skill->id; + this->skillAttackRange = skill->range; if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, skill->id)) { - this->unknown_0414 = argument3; + this->skillUseLevel = argument3; } else { - const CSkillInfo learned = g_session.LookupSkill(this->unknown_040C); - this->unknown_0414 = learned.available != 0 ? learned.level : 0; + const CSkillInfo learned = g_session.LookupSkill(this->skillId); + this->skillUseLevel = learned.available != 0 ? learned.level : 0; } - g_pickInvert = IsSupportSkill(this->unknown_040C); + g_pickInvert = IsSupportSkill(this->skillId); return 0; } case MM_MAKE_SKILL_USED_MSG: { @@ -2910,7 +2910,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } if (argument1 == WE_CALLPARTNER) { - std::sprintf(text, "%s", this->unknown_0294); + std::sprintf(text, "%s", this->coupleName); std::strcpy(skillName, CSkillInfo::DisplayName(*g_session.m_hotkeyScript, argument1)); if (g_serviceType == 0) { std::strcat(skillName, " \xA2\xBD"); @@ -2932,10 +2932,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_CHANGE_MEMBERPOS: { - if (g_guildInfo.unknown_00B4 == 0) { + if (g_guildInfo.isMaster == 0) { return 0; } - const std::int16_t length = static_cast(4U + 12U * g_guildInfo.unknown_0104.size()); + const std::int16_t length = static_cast(4U + 12U * g_guildInfo.pendingMemberPositions.size()); if (length > 2048) { return 0; } @@ -2943,11 +2943,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const std::uint16_t header[2] = {0x155, static_cast(length)}; std::memcpy(packet, header, sizeof(header)); unsigned char* output = packet + sizeof(header); - for (const auto& entry : g_guildInfo.unknown_0104) { + for (const auto& entry : g_guildInfo.pendingMemberPositions) { std::memcpy(output, &entry.second, sizeof(entry.second)); output += sizeof(entry.second); } - g_guildInfo.unknown_0104.clear(); + g_guildInfo.pendingMemberPositions.clear(); GetRagConnection().Send(length, packet); return 0; } @@ -2965,7 +2965,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const GameModePacketWordWord packet{ 0xA04, static_cast(argument1), static_cast(argument2) }; - *reinterpret_cast(&g_session.unknown_52E8[0x24]) = static_cast(argument2); + *reinterpret_cast(&g_session.commandTables[0x24]) = static_cast(argument2); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; } @@ -2994,25 +2994,25 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_LIMIT_HAVE_ITEM_CNT)), 255, 0, 0, 0); return 0; } - if (*reinterpret_cast(&this->unknown_0100[4]) + 2000U > timeGetTime() || this->unknown_0250 != 0) { + if (*reinterpret_cast(&this->equipmentRequestState[4]) + 2000U > timeGetTime() || this->isPlayerDead != 0) { return 0; } const EquipSlots slots = g_session.GetEquipSlots(argument2); const ITEM_INFO equipped = g_session.GetItem17F0(slots.values[2]); - if (equipped.unknown_005D != 0) { + if (equipped.damaged != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_DAMAGED_ITEM)), 255, 0, 0, 0); return 0; } - if (equipped.unknown_0000[1] > 0 && equipped.quantity == 1) { - g_session.GetEquipSlots(equipped.unknown_0000[3]); + if (equipped.identity[1] > 0 && equipped.quantity == 1) { + g_session.GetEquipSlots(equipped.identity[3]); } const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, static_cast(argument1)); - if (item.unknown_0064 == 1) { + if (item.bindOnEquip == 1) { UIWindow* window = g_windowMgr.EnsureWindow(WID_YOURITEMWND); - *reinterpret_cast(&this->unknown_0100[4]) = timeGetTime(); + *reinterpret_cast(&this->equipmentRequestState[4]) = timeGetTime(); window->SendMsg(nullptr, UM_SET_BABY_MSG, argument1, argument2, 0, 0); } else { - *reinterpret_cast(&this->unknown_0100[4]) = timeGetTime(); + *reinterpret_cast(&this->equipmentRequestState[4]) = timeGetTime(); const GameModePacketWordDword packet{0x998, static_cast(argument1), static_cast(argument2)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); } @@ -3022,7 +3022,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (this->IsMenuWindowOpen()) { return 0; } - if (g_serviceType == 6 && g_windowMgr.unknown_0284 != nullptr) { + if (g_serviceType == 6 && g_windowMgr.exchangeAcceptWnd != nullptr) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CHARACTER_IS_DEALING)), 255, 0, 0, 0); return 0; @@ -3066,13 +3066,13 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1720At(index); const std::int32_t itemId = std::atoi(item.itemId.c_str()); - const std::uint16_t identity = static_cast(item.unknown_0000[1]); + const std::uint16_t identity = static_cast(item.identity[1]); unsigned char* entry = packet + 4 + index * 10; std::memcpy(entry, &itemId, sizeof(itemId)); std::memcpy(entry + 4, &item.quantity, sizeof(item.quantity)); std::memcpy(entry + 8, &identity, sizeof(identity)); } - if (this->unknown_0250 == 0) { + if (this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(length), packet); } if (UIWindow* window = g_windowMgr.LookupWindow(WID_PARAITEMPURCHASEWND)) { @@ -3090,11 +3090,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_CLICK_TO_BUYING_STORE: { - if ((this->scene != nullptr && this->scene->player != nullptr && this->scene->player->render.unknown_0070 == 3) || - static_cast(argument1) == g_session.m_aid || g_windowMgr.unknown_0418 != nullptr) { + if ((this->scene != nullptr && this->scene->player != nullptr && this->scene->player->render.state == 3) || + static_cast(argument1) == g_session.m_aid || g_windowMgr.buyingShopItemsWnd != nullptr) { return 0; } - std::uint32_t& lastRequest = *reinterpret_cast(&this->unknown_026E[0x12]); + std::uint32_t& lastRequest = *reinterpret_cast(&this->requestTimers[0x12]); if (timeGetTime() <= lastRequest + 1000U) { return 0; } @@ -3120,31 +3120,31 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHAT_ALLY: { - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) == 0 || g_guildInfo.m_guildId == 0 || g_session.IsBerserkActive() == 1) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) == 0 || g_guildInfo.m_guildId == 0 || g_session.IsBerserkActive() == 1) { return 0; } char filtered[0x16A]; - strncpy_s(filtered, sizeof(filtered), g_windowMgr.unknown_04DC.c_str(), static_cast(-1)); + strncpy_s(filtered, sizeof(filtered), g_windowMgr.chatInputText.c_str(), static_cast(-1)); if (g_forbiddenWords.Contains(filtered)) { std::string masked; g_forbiddenWords.Mask(filtered, &masked); - g_windowMgr.unknown_04DC.assign(filtered, std::strlen(filtered)); + g_windowMgr.chatInputText.assign(filtered, std::strlen(filtered)); return 0; } - if (this->unknown_0438 == filtered) { - ++this->unknown_0450; + if (this->lastChat == filtered) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(filtered, std::strlen(filtered)); - if (g_navigationLinkParser->HasUnownedItemLink(std::string(g_windowMgr.unknown_04DC.c_str()))) { + this->lastChat.assign(filtered, std::strlen(filtered)); + if (g_navigationLinkParser->HasUnownedItemLink(std::string(g_windowMgr.chatInputText.c_str()))) { return 0; } char text[0x169]{}; - const char* message = g_windowMgr.unknown_04DC.c_str(); + const char* message = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); const char separator[4]{' ', ':', ' ', 0}; @@ -3168,41 +3168,41 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_WHISPERMSG: { - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) == 0 || g_session.IsBerserkActive() == 1) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) == 0 || g_session.IsBerserkActive() == 1) { return 0; } char text[0x152]; - std::strncpy(text, g_windowMgr.unknown_04DC.c_str(), 0x151); + std::strncpy(text, g_windowMgr.chatInputText.c_str(), 0x151); text[0x151] = 0; if (g_forbiddenWords.Contains(text)) { std::string replacement(""); g_forbiddenWords.Mask(text, &replacement); - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } if (g_pendingWhisperCount == 0) { - if (this->unknown_0438 == text) { - ++this->unknown_0450; + if (this->lastChat == text) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } } - if (g_windowToggleFlag == 0 && this->ShowRestrictedNotice(this->unknown_0450)) { + if (g_windowToggleFlag == 0 && this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(text, std::strlen(text)); + this->lastChat.assign(text, std::strlen(text)); char target[25] = {}; std::strcpy(target, reinterpret_cast(argument1)); - this->unknown_022C.assign(target, std::strlen(target)); - if (std::strcmp(this->unknown_022C.c_str(), g_session.DecodePlayerName()) != 0) { + this->lastWhisperName.assign(target, std::strlen(target)); + if (std::strcmp(this->lastWhisperName.c_str(), g_session.DecodePlayerName()) != 0) { char message[0x152]; if (g_inlineCharset != 0) { std::strcpy(message, g_serverLanguage->Prefix(false)); - std::strncpy(message + 3, g_windowMgr.unknown_04DC.c_str(), 0x14E); + std::strncpy(message + 3, g_windowMgr.chatInputText.c_str(), 0x14E); } else { - std::strncpy(message, g_windowMgr.unknown_04DC.c_str(), 0x151); + std::strncpy(message, g_windowMgr.chatInputText.c_str(), 0x151); } message[0x151] = 0; - this->unknown_0214.assign(message, std::strlen(message)); + this->lastWhisper.assign(message, std::strlen(message)); const std::size_t length = std::strlen(message); if (length - 1 <= 0x14F) { g_windowMgr.ClearUnknown04DC(); @@ -3222,12 +3222,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_RELEASE_QUEST: - this->unknown_024C = 0; - if (argument1 == 0 && g_windowMgr.unknown_01F8 != nullptr) { - g_windowMgr.unknown_01F8->SendMsg(nullptr, UM_CANCEL_NPC_CHOICE, 0, 0, 0, 0); + this->isOnQuest = 0; + if (argument1 == 0 && g_windowMgr.choose3Wnd != nullptr) { + g_windowMgr.choose3Wnd->SendMsg(nullptr, UM_CANCEL_NPC_CHOICE, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_CHOOSEWND); } - if (g_windowMgr.unknown_01F0 != nullptr) { + if (g_windowMgr.sayDialogWnd != nullptr) { if (CMode* mode = g_modeMgr.GetGameMode()) { mode->SendMsg(MM_CLOSE_DIALOG, 0, 0, 0, 0); } @@ -3254,12 +3254,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MM_CREATE_CHATROOM: { const ChatRoomSetting& setting = *reinterpret_cast(argument1); - this->unknown_03C8 = setting.title; - this->unknown_03F8 = setting.isPublic; - this->unknown_03FC = setting.unknown_0034; - this->unknown_0400 = setting.limit; - this->unknown_0404 = setting.roomId; - this->unknown_03E0 = setting.password; + this->chatRoomTitle = setting.title; + this->chatRoomPublic = setting.isPublic; + this->chatRoomMemberCount = setting.memberCount; + this->chatRoomMemberLimit = setting.limit; + this->chatRoomId = setting.roomId; + this->chatRoomPassword = setting.password; unsigned char packet[0x800]; const std::uint16_t packetId = 0xD5; const std::uint16_t packetLength = static_cast(setting.title.size() + 15); @@ -3276,14 +3276,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_DELETEPARTYPOS: { - const auto found = this->unknown_01B4.find(static_cast(argument1)); - if (found != this->unknown_01B4.end()) { - this->unknown_01B4.erase(found); + const auto found = this->partyPosList.find(static_cast(argument1)); + if (found != this->partyPosList.end()) { + this->partyPosList.erase(found); } return 0; } case MM_REQ_BAN_GUILD: { - if (g_guildInfo.unknown_00B4 == 0 && g_guildInfo.unknown_00B0 == 0) { + if (g_guildInfo.isMaster == 0 && g_guildInfo.canExpel == 0) { return 0; } unsigned char packet[54]; @@ -3314,7 +3314,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } case MM_HOMUN_WAIT: { CGameActor* actor = static_cast(this->scene->GetGameActorByAID( - *reinterpret_cast(&g_session.unknown_5570[8]))); + *reinterpret_cast(&g_session.spAndHomunculusStats[8]))); if (actor != nullptr && actor->HasUnknown030CEntry()) { const int message[6] = {9, 0, 0, 0, 0, 0}; actor->SetUnknown0318(reinterpret_cast(message), 0); @@ -3322,7 +3322,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_BUY_CASH_POINT: { - if (g_session.GetList2Size() == 0 || this->unknown_0250 != 0) { + if (g_session.GetList2Size() == 0 || this->isPlayerDead != 0) { g_session.ClearTradeItems(); return 0; } @@ -3346,7 +3346,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 10 + index * 6, &quantity, sizeof(quantity)); std::memcpy(packet + 12 + index * 6, &itemId, sizeof(itemId)); } - if (count != 0 && this->unknown_0250 == 0) { + if (count != 0 && this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(packetLength), packet); } g_session.ClearTradeItems(); @@ -3371,7 +3371,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(output + 8, &entry.value, sizeof(entry.value)); output += 12; } - if (count > 0 && this->unknown_0250 == 0) { + if (count > 0 && this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(packetLength), packet); } return 0; @@ -3381,7 +3381,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANT_USE_WHEN_OPENED_EXCHANGEWND)), 0xFF, 0, 0, 0); return 0; } - if (this->IsMenuWindowOpen() || this->unknown_02CC != 0 || *reinterpret_cast(this->unknown_02D0) != 0 || argument1 == 0 || this->unknown_0250 != 0) { + if (this->IsMenuWindowOpen() || this->waitingUseItemAck != 0 || *reinterpret_cast(this->waitingItemThrowAck) != 0 || argument1 == 0 || this->isPlayerDead != 0) { return 0; } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); @@ -3390,7 +3390,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i if (StateFlag01(state) || ((bodyState == 4 || bodyState == 1) && item.GetItemId() != 0x31B5)) { return 0; } - if (this->scene->player->render.unknown_0070 == 6 && + if (this->scene->player->render.state == 6 && (item.GetItemId() == 0x259 || item.GetItemId() == 0x25A || item.GetItemId() == 0x263 || item.GetItemId() == 0x25D || item.GetItemId() == 0x25E || item.GetItemId() == 0x5813)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANT_USE_WHEN_SITDOWN)), 0xFF, 0, 0, 0); @@ -3404,7 +3404,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GENDER_CHANGE_MESSAGE_CONFIRM)), 0xFF, 0, 0, 0); return 0; } - if (this->scene->player->unknown_02CC != 0) { + if (this->scene->player->isRiding != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RUNESYSTEM_REWARD_HEAVY_INVENTORY)), 0xFF, 0, 0, 0); return 0; } @@ -3417,7 +3417,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GENDER_CHANGE_MESSAGE_OK)), 0xFF, 0, 0, 0); return 0; } - if (g_session.unknown_8128[4] != 0) { + if (g_session.feedOptions[4] != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GENDER_CHANGE_MESSAGE_CANCEL)), 0xFF, 0, 0, 0); return 0; } @@ -3433,13 +3433,13 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MACRO_CHECKER_MAP_BANNED_MAP)), 0, 0, 0, 0); } - this->unknown_02CC = 1; + this->waitingUseItemAck = 1; const GameModePacketWordDword packet{0x439, static_cast(argument1), g_session.m_aid}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; } case MM_MAKE_GROUP: { - if (g_session.unknown_5460 != 0) { + if (g_session.partyBlocked != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOPARTY)), 0x6E96FF, 0, 0, 0); return 0; } @@ -3457,11 +3457,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); g_windowMgr.EnsureWindow(WID_PARTYSETTINGWND_PARTYCOUNT); - g_session.unknown_54AC = name; + g_session.partyRequestName = name; return 0; } case MM_REQ_EXPEL_GROUP_MEMBER: { - if (g_session.unknown_5464 == 0) { + if (g_session.partyLeader == 0) { return 0; } GameModePacketDwordPayload24 packet; @@ -3480,7 +3480,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i packet[2] = static_cast(request[0]); packet[3] = static_cast(request[1]); packet[4] = static_cast(request[2]); - if (this->unknown_0418 == 0 && !g_session.IsRequestReady(packet[2])) { + if (this->ignoreSkillInterval == 0 && !g_session.IsRequestReady(packet[2])) { char text[1024]; const char* skillName = CSkillInfo::DisplayName(*g_session.m_hotkeyScript, packet[2]); std::sprintf(text, LookupMessage(MSI_SKILLINTERVAL2), skillName); @@ -3501,26 +3501,26 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHAT_BATTLEFIELD: { - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) == 0 || g_session.IsBerserkActive() == 1) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) == 0 || g_session.IsBerserkActive() == 1) { return 0; } char text[4096]; - std::strcpy(text, g_windowMgr.unknown_04DC.c_str()); + std::strcpy(text, g_windowMgr.chatInputText.c_str()); if (g_forbiddenWords.Contains(text)) { std::string masked; g_forbiddenWords.Mask(text, &masked); - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } - if (this->unknown_0438 == text) { - ++this->unknown_0450; + if (this->lastChat == text) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(text, std::strlen(text)); - const char* message = g_windowMgr.unknown_04DC.c_str(); + this->lastChat.assign(text, std::strlen(text)); + const char* message = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); char formatted[16384]; @@ -3583,7 +3583,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_MENUSELECTED: { - if (g_windowMgr.unknown_0210) { + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } if (g_windowMgr.window_0288 || static_cast(argument1) >= this->actorMenuIds.size()) { @@ -3592,36 +3592,36 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const int action = this->actorMenuIds[argument1]; switch (action) { case MENUID_DEAL: - if (this->unknown_024C == 1 || g_windowMgr.unknown_01F0 || g_windowMgr.unknown_01F8 || g_windowMgr.unknown_01F4) { + if (this->isOnQuest == 1 || g_windowMgr.sayDialogWnd || g_windowMgr.choose3Wnd || g_windowMgr.sayDialogOverlayWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_BUSY)), 0xFFFFFF, 0, 0, 0); } else if (static_cast(g_modeMgr.GetGameMode())->scene->player->GetStateFlags() != 2) { - this->SendMsg(MM_REQ_EXCHANGE_ITEM, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_REQ_EXCHANGE_ITEM, this->menuTargetAid, 0, 0, 0); } return 0; case MENUID_INVITE_IN_PARTY: case 58: { - const std::string name = this->ActorName(this->unknown_02E0); + const std::string name = this->ActorName(this->menuTargetAid); this->SendMsg(action == 5 ? 0x3B : 0x10C, reinterpret_cast(name.c_str()), 0, 0, 0); return 0; } case MENUID_ADD_TO_FRIEND_CHAR_LIST: - g_windowMgr.RequestAddFriend(this->ActorName(this->unknown_02E0).c_str()); + g_windowMgr.RequestAddFriend(this->ActorName(this->menuTargetAid).c_str()); return 0; case MENUID_WRITE_CHAT_TO_FILE: - g_windowMgr.SendMsgToNamedWindow(this->unknown_01FC.c_str()); + g_windowMgr.SendMsgToNamedWindow(this->lastWhisperMenuCharacterName.c_str()); return 0; case MENUID_REQ_EX_LIST: case MENUID_REQ_IN: { - std::string name = this->ActorName(this->unknown_02E0); + std::string name = this->ActorName(this->menuTargetAid); this->ExecuteTalkType(action == 12 ? 0x12 : 0x13, &name); return 0; } case MENUID_MAKE_WHISPER_WINDOW: { - const std::string name = this->ActorName(this->unknown_02E0); + const std::string name = this->ActorName(this->menuTargetAid); const char* category = g_windowMgr.IsFriend(name.c_str()) ? LookupMessage(MSI_FRIEND) : - (g_session.IsGuildMemberAccount(this->unknown_02E0) ? "GuildMember" : nullptr); + (g_session.IsGuildMemberAccount(this->menuTargetAid) ? "GuildMember" : nullptr); std::string code; - if (auto* actor = dynamic_cast(this->scene->GetGameActorByAID(this->unknown_02E0))) { + if (auto* actor = dynamic_cast(this->scene->GetGameActorByAID(this->menuTargetAid))) { code = ShortcutFilename(actor->GetPkState()); } g_windowMgr.SendNotice(UIM_MAKE_WHISPER_WINDOW, reinterpret_cast(name.c_str()), reinterpret_cast(category), @@ -3629,10 +3629,10 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MENUID_ADD_TO_FRIEND_CHAR_LIST_FROM_WINDOW: - g_windowMgr.RequestAddFriend(this->unknown_01FC.c_str()); + g_windowMgr.RequestAddFriend(this->lastWhisperMenuCharacterName.c_str()); return 0; case MENUID_INVITE_IN_GUILD: - this->SendMsg(MM_REQ_JOIN_GUILD, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_REQ_JOIN_GUILD, this->menuTargetAid, 0, 0, 0); return 0; case 23: case 24: { @@ -3650,17 +3650,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MENUID_ALLY_GUILD: - this->SendMsg(MM_REQ_ALLY_GUILD, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_REQ_ALLY_GUILD, this->menuTargetAid, 0, 0, 0); return 0; case MENUID_HOSTILE_GUILD: - this->SendMsg(MM_REQ_HOSTILE_GUILD, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_REQ_HOSTILE_GUILD, this->menuTargetAid, 0, 0, 0); return 0; case MENUID_DISCONNECT_CHARACTER: - this->SendMsg(MM_DISCONNECT_CHARACTER, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_DISCONNECT_CHARACTER, this->menuTargetAid, 0, 0, 0); return 0; case MENUID_PET_FEEDING: case MENUID_HOMUN_FEEDING: { - if (action == 29 && g_windowMgr.unknown_0458) { + if (action == 29 && g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_REFINING_FAIL_ITEM_DISAPPEAR)), 0xFF, 0, 0, 0); return 0; } @@ -3683,17 +3683,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; case MENUID_COPY_GID: { char text[512]; - std::sprintf(text, "%s : %d (GID)", g_session.m_serverName.c_str(), this->unknown_02E0); + std::sprintf(text, "%s : %d (GID)", g_session.m_serverName.c_str(), this->menuTargetAid); CLanguageBase* language = g_serverLanguage; language->ResetInput(); language->Insert(text); return 0; } case MENUID_SHOW_CHAT_PROHIBIT_LOG: - g_windowMgr.EnsureWindow(WID_PROHIBITLISTWND)->SendMsg(nullptr, UM_SETINFO, this->unknown_02E0, 0, 0, 0); + g_windowMgr.EnsureWindow(WID_PROHIBITLISTWND)->SendMsg(nullptr, UM_SETINFO, this->menuTargetAid, 0, 0, 0); return 0; case MENUID_INVITE_IN_BABY: - this->SendMsg(MM_REQ_JOIN_BABY, this->unknown_02E0, 0, 0, 0); + this->SendMsg(MM_REQ_JOIN_BABY, this->menuTargetAid, 0, 0, 0); return 0; case MENUID_HOMUN_SHOWINFO: this->SendMsg(MM_COMMAND_HOMUN, 0, 0, 0, 0); @@ -3702,7 +3702,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } return 0; case MENUID_HOMUN_FOLLOW: { - auto* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.unknown_5570[8]))); + auto* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.spAndHomunculusStats[8]))); if (actor && actor->HasUnknown030CEntry()) { float value[6] = {}; const int type = 9; @@ -3718,8 +3718,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } return 0; case MENUID_MER_FOLLOW: { - auto* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.unknown_5620[8]))); - if (actor && actor->unknown_0310 && *reinterpret_cast(actor->unknown_0310 + 4)) { + auto* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.companionTargetState[8]))); + if (actor && actor->merAI && *reinterpret_cast(actor->merAI + 4)) { float value[6] = {}; const int type = 9; std::memcpy(value, &type, sizeof(type)); @@ -3734,12 +3734,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } const GameModePacketDword packet{static_cast(action == 42 ? 0x2D6 : action == 44 ? 0x7F5 : 0xAF9), - static_cast(this->unknown_02E0)}; + static_cast(this->menuTargetAid)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; } case 57: { - auto* actor = dynamic_cast(this->scene->GetGameActorByAID(this->unknown_02E0)); + auto* actor = dynamic_cast(this->scene->GetGameActorByAID(this->menuTargetAid)); if (!actor) { return 0; } @@ -3765,8 +3765,8 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } } case MM_REQ_EMOTION: { - auto& tick = *reinterpret_cast(&this->unknown_026E[0xA]); - if (this->unknown_026E[0x16] || timeGetTime() <= tick + 2500U) { + auto& tick = *reinterpret_cast(&this->requestTimers[0xA]); + if (this->requestTimers[0x16] || timeGetTime() <= tick + 2500U) { return 0; } const bool doram = g_session.IsDoramJob(g_session.GetDisplayJob()); @@ -3784,7 +3784,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } const GameModePacketWordWord packet{0xBE9, static_cast(argument2), static_cast(argument1)}; tick = timeGetTime(); - this->unknown_026E[0x16] = 1; + this->requestTimers[0x16] = 1; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; } @@ -3803,15 +3803,15 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i packet[84] = 0; } if (!g_replayAnimationScaling) { - g_session.unknown_550C = title; + g_session.storeTitle = title; } unsigned char* entry = packet + 85; for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1768At(index); - if (item.unknown_0000[1]) { - *reinterpret_cast(entry) = static_cast(item.unknown_0000[1]); + if (item.identity[1]) { + *reinterpret_cast(entry) = static_cast(item.identity[1]); *reinterpret_cast(entry + 2) = static_cast(item.quantity); - *reinterpret_cast(entry + 4) = item.unknown_0014[1]; + *reinterpret_cast(entry + 4) = item.prices[1]; entry += 8; } } @@ -3866,7 +3866,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.Confirm(LookupMessage(MSI_NAMELENGTH_TOO_LONG), 0, true, false, 0, "Message", 280, 120, 0); return 0; } - if (static_cast(g_modeMgr.GetGameMode())->scene->player->unknown_0305 == 1) { + if (static_cast(g_modeMgr.GetGameMode())->scene->player->hasSp == 1) { std::sprintf(text, LookupMessage(MSI_TIME_LINE_MINUTE2)); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0x6E96FF, 0, 0, 0); return 0; @@ -3880,9 +3880,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_DELETEGUILDPOS: { - const auto entry = this->unknown_01BC.find(static_cast(argument1)); - if (entry != this->unknown_01BC.end()) { - this->unknown_01BC.erase(entry); + const auto entry = this->guildPosList.find(static_cast(argument1)); + if (entry != this->guildPosList.end()) { + this->guildPosList.erase(entry); } return 0; } @@ -3890,13 +3890,13 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i int message = 0; if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { message = 0xBB9; - } else if (this->unknown_0250) { + } else if (this->isPlayerDead) { message = 0xBB7; - } else if (g_windowMgr.unknown_0304 || g_windowMgr.unknown_0308 || g_windowMgr.unknown_02FC) { + } else if (g_windowMgr.merchantItemMyShopWnd || g_windowMgr.merchantItemPurchaseWnd || g_windowMgr.merchantShopMakeWnd) { message = 0xBBA; - } else if (static_cast(g_modeMgr.GetGameMode())->scene->player->unknown_0264[3]) { + } else if (static_cast(g_modeMgr.GetGameMode())->scene->player->actorWindows[3]) { message = 0xBB8; - } else if (g_windowMgr.unknown_01F0 || g_windowMgr.unknown_01F8) { + } else if (g_windowMgr.sayDialogWnd || g_windowMgr.choose3Wnd) { message = 0xBBB; } if (message) { @@ -3905,14 +3905,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } ITEM_INFO item(0); item = argument2 ? g_session.GetItem6B68(argument1) : g_session.GetItem61B8(argument1); - if (item.unknown_0000[1] && item.quantity > 0) { - const GameModePacketWord packet{0xA99, static_cast(item.unknown_0000[1])}; + if (item.identity[1] && item.quantity > 0) { + const GameModePacketWord packet{0xA99, static_cast(item.identity[1])}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); } return 0; } case MM_GET_ACCOUNT_LIMITED_SALE_LIST: { - auto& tick = *reinterpret_cast(&g_session.unknown_807C[0x18]); + auto& tick = *reinterpret_cast(&g_session.webServiceLoginData[0x18]); if (timeGetTime() - tick < 5000U) { const char* message = LookupMessage(MSI_CONNECT_SNS_FAIL_CONNECT); const std::string text = FormatOwnedString("%d%s", 5U - (timeGetTime() - tick) / 1000U, message); @@ -3928,9 +3928,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i int message = 0; if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { message = 0x6A3; - } else if (this->IsMenuWindowOpen() || this->unknown_02CC || *reinterpret_cast(this->unknown_02D0)) { + } else if (this->IsMenuWindowOpen() || this->waitingUseItemAck || *reinterpret_cast(this->waitingItemThrowAck)) { message = 0xF84; - } else if (this->unknown_0250) { + } else if (this->isPlayerDead) { message = 0xBB7; } else if (StateFlag01(this->scene->player->GetStateFlags())) { message = 0xF83; @@ -3944,14 +3944,14 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PACKAGEITEM_SETTINGFAIL)), 0xFF, 0, 0, 0); return 0; } - if (this->scene->player->render.unknown_0070 == 6) { + if (this->scene->player->render.state == 6) { const int itemId = item.GetItemId(); if (itemId == 0x259 || itemId == 0x25A || itemId == 0x263 || itemId == 0x25D || itemId == 0x25E || itemId == 0x5813) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANT_USE_WHEN_SITDOWN)), 0xFF, 0, 0, 0); return 0; } } - this->unknown_02CC = 1; + this->waitingUseItemAck = 1; unsigned char packet[16]; *reinterpret_cast(packet) = 0xBAF; *reinterpret_cast(packet + 2) = static_cast(argument1); @@ -3973,16 +3973,16 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MAXEXCHANGE_IS_10_KIND)), 0xFF, 0, 0, 0); return 0; } - if (*reinterpret_cast(this->unknown_0100) != 0) { + if (*reinterpret_cast(this->equipmentRequestState) != 0) { return 0; } - *reinterpret_cast(this->unknown_0100) = 1; + *reinterpret_cast(this->equipmentRequestState) = 1; const GameModePacketWordDword packet{0xE8, static_cast(argument1), static_cast(argument2)}; - *reinterpret_cast(&this->unknown_0100[0x10]) = argument2; + *reinterpret_cast(&this->equipmentRequestState[0x10]) = argument2; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); if (Replay::Instance().state == 2) { std::uint16_t record[5] = {0x08AE, 0x0387, 10}; - std::memcpy(record + 3, &this->unknown_0100[0x10], sizeof(int)); + std::memcpy(record + 3, &this->equipmentRequestState[0x10], sizeof(int)); Replay::Instance().Record(10, record, 0x2A, 0); } return 0; @@ -4001,9 +4001,9 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 8, &argument2, sizeof(argument2)); for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1760At(index); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { *reinterpret_cast(packet + 12 + index * 4) = static_cast(item.quantity); - *reinterpret_cast(packet + 14 + index * 4) = static_cast(item.unknown_0000[1]); + *reinterpret_cast(packet + 14 + index * 4) = static_cast(item.identity[1]); } } if (count != 0) { @@ -4012,13 +4012,13 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_REQ_BUY_FROMMC: { - if (this->scene != nullptr && this->scene->player != nullptr && this->scene->player->render.unknown_0070 == 3) { + if (this->scene != nullptr && this->scene->player != nullptr && this->scene->player->render.state == 3) { return 0; } - if (static_cast(argument1) == g_session.m_aid || g_windowMgr.unknown_0300 != nullptr) { + if (static_cast(argument1) == g_session.m_aid || g_windowMgr.merchantItemShopWnd != nullptr) { return 0; } - auto& previousTick = *reinterpret_cast(&this->unknown_026E[0x12]); + auto& previousTick = *reinterpret_cast(&this->requestTimers[0x12]); if (timeGetTime() <= previousTick + 1000U) { return 0; } @@ -4074,26 +4074,26 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHAT_CLAN: { - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) == 0 || !g_clanInfo->m_hasClan || g_session.IsBerserkActive() == 1) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) == 0 || !g_clanInfo->m_hasClan || g_session.IsBerserkActive() == 1) { return 0; } char text[0x16A]; - strcpy_s(text, sizeof(text), g_windowMgr.unknown_04DC.c_str()); + strcpy_s(text, sizeof(text), g_windowMgr.chatInputText.c_str()); if (g_forbiddenWords.Contains(text)) { std::string replacement(""); g_forbiddenWords.Mask(text, &replacement); - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } - if (this->unknown_0438 == text) { - ++this->unknown_0450; - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->lastChat == text) { + ++this->sameChatRepeatCount; + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - this->unknown_0438.assign(text, std::strlen(text)); - const char* message = g_windowMgr.unknown_04DC.c_str(); + this->lastChat.assign(text, std::strlen(text)); + const char* message = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); const char* playerName = g_session.DecodePlayerName(); char formatted[0x400]; @@ -4120,30 +4120,30 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_CHAT)), 0xFF, 0, 0, 0); return 0; } - if (this->unknown_0250 != 0) { + if (this->isPlayerDead != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_MERCHANTSHOP)), 0xFF, 0, 0, 0); return 0; } - if (g_windowMgr.unknown_0304 != nullptr || g_windowMgr.unknown_0308 != nullptr || g_windowMgr.unknown_02FC != nullptr) { + if (g_windowMgr.merchantItemMyShopWnd != nullptr || g_windowMgr.merchantItemPurchaseWnd != nullptr || g_windowMgr.merchantShopMakeWnd != nullptr) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MDUNGEON_CREATE_FAIL_PARTY_ONLINE)), 0xFF, 0, 0, 0); return 0; } - if (static_cast(g_modeMgr.GetGameMode())->scene->player->unknown_0264[3] != 0) { + if (static_cast(g_modeMgr.GetGameMode())->scene->player->actorWindows[3] != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_USE_NPC)), 0xFF, 0, 0, 0); return 0; } - if (g_windowMgr.unknown_01F0 != nullptr || g_windowMgr.unknown_01F8 != nullptr) { + if (g_windowMgr.sayDialogWnd != nullptr || g_windowMgr.choose3Wnd != nullptr) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_USESKILL_FAIL_NEED_MORE_ARROW_CNT)), 0xFF, 0, 0, 0); return 0; } ITEM_INFO item = g_session.FindItemByIdentity(static_cast(argument1), argument2); - if (!item.identified || item.unknown_005D != 0) { + if (!item.identified || item.damaged != 0) { return 0; } - const bool special = item.unknown_0000[1] > 0 && - (item.unknown_0000[0] == 10 || item.unknown_0000[0] == 16 || item.unknown_0000[0] == 17 || item.unknown_0000[0] == 19); + const bool special = item.identity[1] > 0 && + (item.identity[0] == 10 || item.identity[0] == 16 || item.identity[0] == 17 || item.identity[0] == 19); if (special) { - if (static_cast(argument1) == g_session.unknown_7EC8) { + if (static_cast(argument1) == g_session.swapArrowIndex) { return 0; } } else { @@ -4155,12 +4155,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } else { equipped = g_session.GetItem61B8(slots.values[index]); } - if (static_cast(argument1) == equipped.unknown_0000[1]) { + if (static_cast(argument1) == equipped.identity[1]) { return 0; } } } - *reinterpret_cast(&this->unknown_0100[4]) = timeGetTime(); + *reinterpret_cast(&this->equipmentRequestState[4]) = timeGetTime(); const GameModePacketWordDword packet{0xA97, static_cast(argument1), static_cast(argument2)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; @@ -4189,7 +4189,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet + 4 + index * 6, &quantity, sizeof(quantity)); std::memcpy(packet + 6 + index * 6, &itemId, sizeof(itemId)); } - if (count != 0 && this->unknown_0250 == 0) { + if (count != 0 && this->isPlayerDead == 0) { GetRagConnection().Send(static_cast(length), packet); } g_session.ClearTradeItems(); @@ -4203,12 +4203,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } const ChatRoomSetting& settings = *reinterpret_cast(argument1); - this->unknown_03C8 = settings.title; - this->unknown_03F8 = settings.isPublic; - this->unknown_03FC = settings.unknown_0034; - this->unknown_0400 = settings.limit; - this->unknown_0404 = settings.roomId; - this->unknown_03E0 = settings.password; + this->chatRoomTitle = settings.title; + this->chatRoomPublic = settings.isPublic; + this->chatRoomMemberCount = settings.memberCount; + this->chatRoomMemberLimit = settings.limit; + this->chatRoomId = settings.roomId; + this->chatRoomPassword = settings.password; unsigned char packet[0x800]; const std::uint16_t header[3] = { 0xDE, static_cast(settings.title.size() + 15), static_cast(settings.limit) @@ -4223,30 +4223,30 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHAT_PARTY: { - if (g_windowMgr.unknown_04DC.empty() || g_session.IsBerserkActive() == 1) { + if (g_windowMgr.chatInputText.empty() || g_session.IsBerserkActive() == 1) { return 0; } char text[0x800]; - std::strcpy(text, g_windowMgr.unknown_04DC.c_str()); + std::strcpy(text, g_windowMgr.chatInputText.c_str()); if (g_forbiddenWords.Contains(text)) { std::string masked; g_forbiddenWords.Mask(text, &masked); - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } - if (this->unknown_0438 == text) { - ++this->unknown_0450; + if (this->lastChat == text) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(text, std::strlen(text)); - if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.unknown_04DC)) { + this->lastChat.assign(text, std::strlen(text)); + if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.chatInputText)) { return 0; } char message[0x169] = {}; - const char* input = g_windowMgr.unknown_04DC.c_str(); + const char* input = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); const char* name = g_session.DecodePlayerName(); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", name, prefix, input); @@ -4260,15 +4260,15 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_USESKILL_LEVEL_MINUS: { - if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, this->unknown_040C)) { - const CSkillInfo skill = g_session.m_skillBundle.Lookup(this->unknown_040C); + if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, this->skillId)) { + const CSkillInfo skill = g_session.m_skillBundle.Lookup(this->skillId); if (skill.available != 0) { - this->unknown_0414 -= argument1; - if (this->unknown_0414 > skill.level) { - this->unknown_0414 = skill.level; + this->skillUseLevel -= argument1; + if (this->skillUseLevel > skill.level) { + this->skillUseLevel = skill.level; } - if (this->unknown_0414 <= 0) { - this->unknown_0414 = 1; + if (this->skillUseLevel <= 0) { + this->skillUseLevel = 1; } } } @@ -4344,7 +4344,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1730At(index); const std::uint16_t entry[2] = { - static_cast(item.unknown_0000[1]), static_cast(item.quantity) + static_cast(item.identity[1]), static_cast(item.quantity) }; std::memcpy(packet + 12 + index * 4, entry, sizeof(entry)); } @@ -4355,11 +4355,11 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_WHISPER_FILTER: - if (g_session.unknown_5460 != 0) { + if (g_session.partyBlocked != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOPARTY)), 0x6E96FF, 0, 0, 0); } else if (g_session.PartyCount() == 0) { g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_HEIGHT_220); - g_session.unknown_54AC = reinterpret_cast(argument1); + g_session.partyRequestName = reinterpret_cast(argument1); } return 0; case MM_REFRESH_PLAYERGAGE: { @@ -4368,12 +4368,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } UIPlayerGage* gauge = static_cast(this->itemWindow); gauge->SetFirstValues( - [] { return static_cast(g_session.unknown_5568); }, - [] { return static_cast(g_session.unknown_556C); } + [] { return static_cast(g_session.hp); }, + [] { return static_cast(g_session.maxHp); } ); gauge->SetSecondValues( - [] { return static_cast(*reinterpret_cast(&g_session.unknown_5570[0])); }, - [] { return static_cast(*reinterpret_cast(&g_session.unknown_5570[4])); } + [] { return static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[0])); }, + [] { return static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[4])); } ); if (g_session.IsTreeGroupThree(g_session.GetDisplayJob())) { gauge->SetFourthValues( @@ -4388,12 +4388,12 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i CPlayer* player = this->scene->player; const int offset = ScaleByScreenHeight(12); gauge->Move(player->render.screenX - 30, - static_cast(static_cast(player->render.screenY) + static_cast(offset) * player->render.unknown_005C)); + static_cast(static_cast(player->render.screenY) + static_cast(offset) * player->render.distanceScale)); return 0; } case MM_SOCKETERROR: - this->unknown_0244 = 1; - this->unknown_0248 = timeGetTime(); + this->noMove = 1; + this->noMoveStartTick = timeGetTime(); GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_UNABLE_TO_CONNECT_SERVER), 0, true, true, 0, "Message", 280, 120, 0) != 0x10D) { this->SendMsg(MM_QUIT_TO_IDENTRY, 0, 0, 0, 0); @@ -4402,17 +4402,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i case MM_BROADCASTMSG: { std::string text; if (argument1 == 0 || argument1 == 1) { - text = std::string(g_session.DecodePlayerName()) + ": " + g_windowMgr.unknown_04DC.c_str(); + text = std::string(g_session.DecodePlayerName()) + ": " + g_windowMgr.chatInputText.c_str(); } else if (argument1 == 4 || argument1 == 5) { - text = std::string("blue") + g_windowMgr.unknown_04DC.c_str(); + text = std::string("blue") + g_windowMgr.chatInputText.c_str(); } else { - text = g_windowMgr.unknown_04DC.c_str(); + text = g_windowMgr.chatInputText.c_str(); } char message[0x16A]; std::strcpy(message, text.c_str()); message[0x169] = 0; const std::size_t length = std::strlen(message) + 1; - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) != 0) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) != 0) { std::uint16_t packetId; if (argument1 == 0 || argument1 == 2 || argument1 == 4) { packetId = 0x99; @@ -4435,18 +4435,18 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i } const auto* request = reinterpret_cast(argument1); if (request[1] == 0x2D) { - if (this->unknown_0244 == 1) { + if (this->noMove == 1) { return 0; } - this->unknown_0244 = 1; - this->unknown_0248 = timeGetTime(); + this->noMove = 1; + this->noMoveStartTick = timeGetTime(); } const GameModePacketDwordByte packet{0x90, request[0], *reinterpret_cast(request + 2)}; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetId), &packet); return 0; } case MM_USE_SKILL_TOGROUND: { - if (this->scene->player->unknown_02CC != 0 && !g_session.IsHomunculusSkill(argument1) && !g_session.IsMercenarySkill(argument1)) { + if (this->scene->player->isRiding != 0 && !g_session.IsHomunculusSkill(argument1) && !g_session.IsMercenarySkill(argument1)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_USE_SKILL_IN_RIDING_STATE)), 0xFF, 0, 0, 0); return 0; } @@ -4458,7 +4458,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i const int x = request[1]; const int y = request[2]; int level = request[3]; - if (this->unknown_0418 == 0 && !g_session.IsRequestReady(skill)) { + if (this->ignoreSkillInterval == 0 && !g_session.IsRequestReady(skill)) { char message[0x800]; const char* name = CSkillInfo::DisplayName(*g_session.m_hotkeyScript, skill); std::sprintf(message, LookupMessage(MSI_SKILLINTERVAL2), name); @@ -4476,7 +4476,7 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_SEND_GUILD_EMBLEM: { - if (g_guildInfo.unknown_00B4 == 0 || static_cast(static_cast(argument2) + 4) > 0x800) { + if (g_guildInfo.isMaster == 0 || static_cast(static_cast(argument2) + 4) > 0x800) { return 0; } unsigned char packet[0x800]; @@ -4487,30 +4487,30 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i return 0; } case MM_CHAT_GUILD: { - if (std::strlen(g_windowMgr.unknown_04DC.c_str()) == 0 || g_guildInfo.m_guildId == 0 || g_session.IsBerserkActive() == 1) { + if (std::strlen(g_windowMgr.chatInputText.c_str()) == 0 || g_guildInfo.m_guildId == 0 || g_session.IsBerserkActive() == 1) { return 0; } char text[0x800]; - std::strcpy(text, g_windowMgr.unknown_04DC.c_str()); + std::strcpy(text, g_windowMgr.chatInputText.c_str()); if (g_forbiddenWords.Contains(text)) { std::string masked; g_forbiddenWords.Mask(text, &masked); - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } - if (this->unknown_0438 == text) { - ++this->unknown_0450; + if (this->lastChat == text) { + ++this->sameChatRepeatCount; } else { - this->unknown_0450 = 0; + this->sameChatRepeatCount = 0; } - if (this->ShowRestrictedNotice(this->unknown_0450)) { + if (this->ShowRestrictedNotice(this->sameChatRepeatCount)) { return 0; } - this->unknown_0438.assign(text, std::strlen(text)); - if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.unknown_04DC.c_str())) { + this->lastChat.assign(text, std::strlen(text)); + if (g_navigationLinkParser->HasUnownedItemLink(g_windowMgr.chatInputText.c_str())) { return 0; } char message[0x169] = {}; - const char* body = g_windowMgr.unknown_04DC.c_str(); + const char* body = g_windowMgr.chatInputText.c_str(); const char* prefix = g_serverLanguage->Prefix(false); StringFormat(message, sizeof(message), static_cast(-1), "%s : %s%s", g_session.DecodePlayerName(), prefix, body); g_windowMgr.ClearUnknown04DC(); @@ -4536,17 +4536,17 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memset(packet + 4, 0, 6); } if (g_replayAnimationScaling == 0) { - g_session.unknown_550C = reinterpret_cast(packet + 9); + g_session.storeTitle = reinterpret_cast(packet + 9); } unsigned char* output = packet + 0x59; for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1768At(index); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { const int id = std::atoi(item.itemId.c_str()); const std::uint16_t quantity = static_cast(item.quantity); std::memcpy(output, &id, 4); std::memcpy(output + 4, &quantity, 2); - std::memcpy(output + 6, &item.unknown_0014[1], 4); + std::memcpy(output + 6, &item.prices[1], 4); output += 10; } } @@ -4563,20 +4563,20 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i std::memcpy(packet, header, sizeof(header)); std::strncpy(reinterpret_cast(packet + 4), reinterpret_cast(argument1), 0x4F); packet[0x53] = 0; - if (g_windowMgr.unknown_02FC != nullptr) { - const auto* shop = reinterpret_cast(g_windowMgr.unknown_02FC); - std::memcpy(packet + 0x54, &shop->unknown_018A, 2); - std::memcpy(packet + 0x56, &shop->unknown_018C, 2); + if (g_windowMgr.merchantShopMakeWnd != nullptr) { + const auto* shop = reinterpret_cast(g_windowMgr.merchantShopMakeWnd); + std::memcpy(packet + 0x54, &shop->selectedRow, 2); + std::memcpy(packet + 0x56, &shop->selectedColumn, 2); } unsigned char* output = packet + 0x58; for (int index = 0; index < count; ++index) { const ITEM_INFO item = g_session.GetItem1768At(index); - if (item.unknown_0000[1] != 0) { - const std::uint16_t id = static_cast(item.unknown_0000[1]); + if (item.identity[1] != 0) { + const std::uint16_t id = static_cast(item.identity[1]); const std::uint16_t quantity = static_cast(item.quantity); std::memcpy(output, &id, 2); std::memcpy(output + 2, &quantity, 2); - std::memcpy(output + 4, &item.unknown_0014[1], 4); + std::memcpy(output + 4, &item.prices[1], 4); output += 8; } } @@ -4591,24 +4591,24 @@ int CGameMode::SendMsg(int event, int argument1, int argument2, int argument3, i // OFFSET: 0x00CCD880 // FUNCTION: fn_21217 CGameMode::CGameMode() - : scene(nullptr), unknown_0408(nullptr), unknown_040C(0), unknown_0410(0), unknown_0414(0), unknown_0418(0), unknown_05C4(0), unknown_05C8(0), - broadcastBalloon(nullptr), noticeBalloon(nullptr), unknown_0648(0) { - this->unknown_0624[0] = 0; + : scene(nullptr), skillUseType(nullptr), skillId(0), skillAttackRange(0), skillUseLevel(0), ignoreSkillInterval(0), bossMonsterX(0), bossMonsterY(0), + broadcastBalloon(nullptr), noticeBalloon(nullptr), recordItemPickups(0) { + this->isInitializing[0] = 0; this->camera = nullptr; this->mousePointer = nullptr; this->replayPauseTick = 0; - this->unknown_05EC[0] = 0; + this->replayDragState[0] = 0; this->itemWindow = nullptr; - this->unknown_060C[0] = 0; + this->sameMapMove[0] = 0; } // OFFSET: 0x00CEFE70 // FUNCTION: fn_21408 void CGameMode::RemoveUnknown0604(int window) { UIWindow* target = reinterpret_cast(window); - for (std::list::iterator it = this->unknown_0604.begin(); it != this->unknown_0604.end(); ++it) { + for (std::list::iterator it = this->notificationWindows.begin(); it != this->notificationWindows.end(); ++it) { if (*it == target) { - this->unknown_0604.erase(it); + this->notificationWindows.erase(it); return; } } @@ -4617,15 +4617,15 @@ void CGameMode::RemoveUnknown0604(int window) { // OFFSET: 0x00CEFB30 // FUNCTION: fn_21404 void CGameMode::AddUnknown0604(UIWindow* window) { - this->unknown_0604.push_back(window); + this->notificationWindows.push_back(window); } #pragma pack(push, 1) struct AdminStatusRequestPacket { /* 0000 */ std::uint16_t id; /* 0002 */ std::uint32_t accountId; - /* 0006 */ unsigned char unknown_0006; - /* 0007 */ std::uint16_t unknown_0007; + /* 0006 */ unsigned char requestType; + /* 0007 */ std::uint16_t requestValue; }; #pragma pack(pop) static_assert(sizeof(AdminStatusRequestPacket) == 9); @@ -4644,8 +4644,8 @@ void CGameMode::RequestAdminStatus() { AdminStatusRequestPacket packet = {}; packet.id = 0x149; packet.accountId = static_cast(g_session.m_aid); - packet.unknown_0006 = 2; - packet.unknown_0007 = 0xA; + packet.requestType = 2; + packet.requestValue = 0xA; GetRagConnection().Send(g_packetLengths.FixedLength(packet.id), &packet); } @@ -4668,29 +4668,29 @@ void CGameMode::PlaceWindowAtActor(UIWindow* window, CGameActor* actor) { const bool raised = g_serviceOptions.Get(0x5C) != 0; int offsetX = 0; int offsetY = 0; - switch (actor->render.unknown_00A8 != 0 ? raised : 0) { + switch (actor->render.isCharacter != 0 ? raised : 0) { case NAME_BALLOON_BOTTOM: offsetX = -(width / 2); - offsetY = static_cast(static_cast(g_renderer->viewport.height * 20 / 480) * actor->render.unknown_005C); + offsetY = static_cast(static_cast(g_renderer->viewport.height * 20 / 480) * actor->render.distanceScale); break; case NAME_BALLOON_TOP: offsetX = -(width / 2); - offsetY = static_cast(static_cast(g_renderer->viewport.height * -100 / 480) * actor->render.unknown_005C); + offsetY = static_cast(static_cast(g_renderer->viewport.height * -100 / 480) * actor->render.distanceScale); break; case NAME_BALLOON_LEFT: offsetX = static_cast( - static_cast(g_renderer->viewport.width * -30 / 640) * actor->render.unknown_005C - static_cast(width / 2) + static_cast(g_renderer->viewport.width * -30 / 640) * actor->render.distanceScale - static_cast(width / 2) ); offsetY = static_cast( - static_cast(g_renderer->viewport.height * -25 / 480) * actor->render.unknown_005C - static_cast(height / 2) + static_cast(g_renderer->viewport.height * -25 / 480) * actor->render.distanceScale - static_cast(height / 2) ); break; case NAME_BALLOON_RIGHT: offsetX = static_cast( - static_cast(g_renderer->viewport.width * 30 / 640) * actor->render.unknown_005C - static_cast(width / 2) + static_cast(g_renderer->viewport.width * 30 / 640) * actor->render.distanceScale - static_cast(width / 2) ); offsetY = static_cast( - static_cast(g_renderer->viewport.height * -25 / 480) * actor->render.unknown_005C - static_cast(height / 2) + static_cast(g_renderer->viewport.height * -25 / 480) * actor->render.distanceScale - static_cast(height / 2) ); break; } @@ -4737,27 +4737,27 @@ std::uint64_t CGameMode::LaunchDummyEffect(const vector3d* position, int effectI // OFFSET: 0x00CDFB00 // FUNCTION: fn_21326 void CGameMode::RequestPlayerAction(int target, int argument) { - int value = this->unknown_040C; + int value = this->skillId; if (value != 10000) { const int maxWeight = g_session.m_maxWeight < 1 ? 1 : g_session.m_maxWeight; if (g_session.m_weight * 100 / maxWeight >= 90) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NO_ATTACK_OVERWEIGHT)), 0xFF, 0, 0, 0); - value = this->unknown_040C; + value = this->skillId; if (value != 40000) { return; } } } - switch (reinterpret_cast(this->unknown_0408)) { + switch (reinterpret_cast(this->skillUseType)) { case SUT_NOSKILL: this->scene->player->SendMsg(nullptr, AM_PROCEEDATTACK, 0, target, 0, argument, argument >> 31, 0, 0, 0, 0, 0, 0, 0, 0); break; case SUT_TO_CHARACTER: case SUT_TO_ALL: this->scene->player->SendMsg(nullptr, AM_PROCEEDSKILL, 0, target, 0, value, value >> 31, 0, 0, 0, 0, 0, 0, 0, 0); - this->scene->player->SendMsg(nullptr, AM_SET_SKILL_USE_LEVEL, 0, this->unknown_0414, this->unknown_0414 >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->scene->player->SendMsg(nullptr, AM_SET_SKILL_USE_LEVEL, 0, this->skillUseLevel, this->skillUseLevel >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } } @@ -4870,14 +4870,14 @@ bool CGameMode::IsEffectId994Group(int id) { // OFFSET: 0x00CF0950 // FUNCTION: fn_21419 bool CGameMode::ConfirmDraggedItemUse() { - if (g_session.unknown_16EC != this->drag.id) { + if (g_session.equippedArrowIndex != this->drag.id) { return false; } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, this->drag.id); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { if (g_replayAnimationScaling) { - this->unknown_05EC[0] = 0; + this->replayDragState[0] = 0; } g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); g_windowMgr.Confirm(LookupMessage(MSI_UNEQUIP_ARROW), 0, true, false, 0, "Message", 280, 120, 0); @@ -4890,8 +4890,8 @@ bool CGameMode::ConfirmDraggedItemUse() { // OFFSET: 0x00CFE480 // FUNCTION: fn_21432 void CGameMode::RefreshStatusStateEffect(int actorId) { - if (g_windowMgr.unknown_0508 != 2 && actorId == static_cast(g_session.m_aid)) { - this->scene->player->unknown_0544->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); + if (g_windowMgr.windowVisibilityState != 2 && actorId == static_cast(g_session.m_aid)) { + this->scene->player->skillEffect->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); } } @@ -4906,7 +4906,7 @@ void __stdcall LaunchBulletSpriteEffect(const vector3d* position, int actorId, f g_effectMgr->Spawn(0, 0x964, position->x, position->y, position->z, actorId, -1, 0, 0) ); if (effect != nullptr) { - effect->unknown_00F4 = scale; + effect->delayFrames = scale; effect->SetBulletSprite(job); } } @@ -4939,9 +4939,9 @@ void CGameMode::IgnorePacket() { // OFFSET: 0x00CE8EC0 // FUNCTION: fn_21343 void CGameMode::RemoveUnknown01A4(int value) { - for (std::list::iterator it = this->unknown_01A4.begin(); it != this->unknown_01A4.end(); ++it) { + for (std::list::iterator it = this->pickupReqItemNaidList.begin(); it != this->pickupReqItemNaidList.end(); ++it) { if (*it == value) { - this->unknown_01A4.erase(it); + this->pickupReqItemNaidList.erase(it); return; } } @@ -5045,7 +5045,7 @@ static_assert(offsetof(GameModeTextRecord, buffer) == 0x1E); // OFFSET: 0x00CFE4D0 // FUNCTION: fn_21433 void CGameMode::NotifyUnknown0604(int value) { - for (std::list::iterator it = this->unknown_0604.begin(); it != this->unknown_0604.end(); ++it) { + for (std::list::iterator it = this->notificationWindows.begin(); it != this->notificationWindows.end(); ++it) { (*it)->SendMsg(nullptr, UM_REFRESH, value, 0, 0, 0); } } @@ -5206,19 +5206,19 @@ void CGameMode::UpdatePetFriendlyWindow(int previousFriendly) { } if (g_session.GetPetFriendlyState(g_session.m_petFriendly) == 0 && g_session.m_petFriendly <= 100) { - if (this->unknown_0628.find(g_session.unknown_1010) == this->unknown_0628.end()) { + if (this->petFriendlyNoticeIds.find(g_session.petGid) == this->petFriendlyNoticeIds.end()) { if (g_windowMgr.window_038C == nullptr) { g_windowMgr.EnsureWindow(WID_PETINFOWND); } - this->UpdateUnknown0628(g_session.unknown_1010, true); + this->UpdateUnknown0628(g_session.petGid, true); } } if (previousFriendly < g_session.m_petFriendly && g_session.m_petFriendly > 99) { - auto it = this->unknown_0628.find(g_session.unknown_1010); - if (it != this->unknown_0628.end()) { - this->unknown_0628.erase(it); + auto it = this->petFriendlyNoticeIds.find(g_session.petGid); + if (it != this->petFriendlyNoticeIds.end()) { + this->petFriendlyNoticeIds.erase(it); } } } @@ -5330,8 +5330,8 @@ std::vector CGameMode::SaveActiveSkillEffects() { } for (ActiveSkillEffect effect : g_activeSkillEffects) { - if (effect.unknown_0004 != 0 && effect.unknown_0004 != 999999) { - effect.unknown_0004 -= timeGetTime(); + if (effect.expiration != 0 && effect.expiration != 999999) { + effect.expiration -= timeGetTime(); } const std::vector chunk = MakeRecordChunk(0x4A43, effect); @@ -5357,7 +5357,7 @@ std::vector CGameMode::SaveUnknown024C() { } { - const std::vector chunk = MakeRecordChunk(14011, this->unknown_024C); + const std::vector chunk = MakeRecordChunk(14011, this->isOnQuest); data.insert(data.end(), chunk.begin(), chunk.end()); } @@ -5445,7 +5445,7 @@ void CGameMode::InitializeCamera() { } const bool indoor = g_session.IsUnknownName5248(this->mapName); - this->unknown_0254 = !indoor; + this->canRotateView = !indoor; float pitchRange = 10.0f; float maxDistance = g_cameraBaseDistance; float pitch; @@ -5456,9 +5456,9 @@ void CGameMode::InitializeCamera() { pitch = g_outdoorCameraPitch; distance = g_outdoorCameraDistance; } else { - this->unknown_0288 = 45.0f; + this->fixedLongitude = 45.0f; this->camera->camera.yaw = 45.0f; - this->camera->camera.desiredYaw = this->unknown_0288; + this->camera->camera.desiredYaw = this->fixedLongitude; pitch = g_indoorCameraPitch; distance = g_indoorCameraDistance; } @@ -5643,7 +5643,7 @@ int CGameMode::Run() { // OFFSET: 0x00CDFC40 // FUNCTION: fn_21327 void CGameMode::TargetActorByAid(int aid) { - if (this->unknown_0250 != 0) { + if (this->isPlayerDead != 0) { return; } @@ -5651,13 +5651,13 @@ void CGameMode::TargetActorByAid(int aid) { const unsigned char forceOption = g_serviceOptions.Get(0x6D); const int shiftHeld = HIBYTE(GetAsyncKeyState(VK_SHIFT)); int force = shiftHeld; - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); const bool skillMode = mode == 2 || mode == 4; const bool allowed = aid != static_cast(g_session.m_aid) || mode == 4; if (skillMode == true) { - const bool support = IsSupportSkill(this->unknown_040C); - const bool optionalSelf = IsOptionalSelfTargetSkill(this->unknown_040C); + const bool support = IsSupportSkill(this->skillId); + const bool optionalSelf = IsOptionalSelfTargetSkill(this->skillId); if (support == true) { force = 1; } @@ -5666,8 +5666,8 @@ void CGameMode::TargetActorByAid(int aid) { } CWorld* scene = this->scene; - if (scene->unknown_0048 == 0 && scene->unknown_0054 == 0) { - if (scene->unknown_004C != 0) { + if (scene->isPKZone == 0 && scene->isEventPVPMode == 0) { + if (scene->isSiegeMode != 0) { CGameActor* actor = static_cast(scene->GetGameActorByAID(aid)); if (actor != nullptr && !g_session.IsLocalPlayerAid(actor->GetGdid())) { GuildInfo* guildInfo = &g_guildInfo; @@ -5683,7 +5683,7 @@ void CGameMode::TargetActorByAid(int aid) { if (allowed && g_mouse.buttons[0] == 1 && force != 0 && !HIBYTE(GetAsyncKeyState(VK_MENU))) { this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - *reinterpret_cast(&this->unknown_00D8[0x20]) = 0; + *reinterpret_cast(&this->leftBtnClickTick[0x20]) = 0; if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(aid, 0); this->forcedAttack = 1; @@ -5729,12 +5729,12 @@ std::vector CGameMode::WriteReplaySkillState() { data.insert(data.end(), chunk.begin(), chunk.end()); } - for (CRenderObject* object : this->scene->unknown_0020) { + for (CRenderObject* object : this->scene->skills) { CSkill* skill = static_cast(object); SkillEntryPacket packet; packet.packetType = 0x11F; packet.aid = skill->skillAid; - packet.creatorAid = static_cast(skill->unknown_0410); + packet.creatorAid = static_cast(skill->sourceActorId); packet.job = static_cast(skill->GetEffectiveJob(-1)); packet.isVisible = 1; @@ -5930,8 +5930,8 @@ std::vector CGameMode::SaveActorStates() { CGameActor* actor = static_cast(*it); CPc* pc = static_cast(actor); - if (actor->unknown_03E0Low == 0) { - if (actor->render.unknown_0070 == 1) { + if (actor->storedActorEntry == 0) { + if (actor->render.state == 1) { std::vector entry = this->BuildActorEntryPacket(actor, 0x9FD); const std::vector chunk = MakeDataChunk(0xD6, entry); data.insert(data.end(), chunk.begin(), chunk.end()); @@ -5942,7 +5942,7 @@ std::vector CGameMode::SaveActorStates() { } } - UIChatRoomTitle* room = reinterpret_cast(actor->unknown_0264[1]); + UIChatRoomTitle* room = reinterpret_cast(actor->actorWindows[1]); if (room != nullptr) { scratch.resize(sizeof(ChatRoomEntryPacket), 0); auto* packet = reinterpret_cast(scratch.data()); @@ -5959,25 +5959,25 @@ std::vector CGameMode::SaveActorStates() { data.insert(data.end(), chunk.begin(), chunk.end()); } - if (actor->unknown_03E0Low == 1) { + if (actor->storedActorEntry == 1) { std::vector record; record.resize(sizeof(GameModeStoredRecord00DA), 0); auto* stored = reinterpret_cast(record.data()); stored->value0002 = actor->render.accountId; stored->value0006 = actor->GetEffectiveJob(-1); - stored->value000E = static_cast(actor->unknown_0260); - stored->value000A = static_cast(actor->unknown_0158[5]); - stored->value000C = static_cast(*reinterpret_cast(actor->unknown_0170)); - stored->value000F = static_cast(pc->unknown_0440); + stored->value000E = static_cast(actor->sex); + stored->value000A = static_cast(actor->movementState[5]); + stored->value000C = static_cast(*reinterpret_cast(actor->destinationAndSpeed)); + stored->value000F = static_cast(pc->head); const std::int64_t value = actor->GetWeapon(); stored->value0011 = static_cast(value); stored->value0015 = static_cast(value >> 32); - stored->value0019 = static_cast(pc->unknown_0450); - stored->value001B = static_cast(pc->unknown_0454); - stored->value001D = static_cast(pc->unknown_0458); - stored->value001F = static_cast(pc->unknown_0444); - stored->value0021 = static_cast(actor->render.unknown_0048); - stored->value0023 = static_cast(pc->unknown_049C); + stored->value0019 = static_cast(pc->accessory); + stored->value001B = static_cast(pc->accessory2); + stored->value001D = static_cast(pc->accessory3); + stored->value001F = static_cast(pc->headPalette); + stored->value0021 = static_cast(actor->render.bodyPalette); + stored->value0023 = static_cast(pc->robe); stored->value003D = static_cast(actor->GetBodyCostume()); { std::string name = this->nameCard.Name(actor->render.accountId); @@ -5988,7 +5988,7 @@ std::vector CGameMode::SaveActorStates() { data.insert(data.end(), chunk.begin(), chunk.end()); } - UIMerchantShopTitle* shop = reinterpret_cast(actor->unknown_0264[2]); + UIMerchantShopTitle* shop = reinterpret_cast(actor->actorWindows[2]); if (shop != nullptr) { scratch.resize(sizeof(ShopEntryPacket), 0); auto* packet = reinterpret_cast(scratch.data()); @@ -6000,18 +6000,18 @@ std::vector CGameMode::SaveActorStates() { data.insert(data.end(), chunk.begin(), chunk.end()); } - if (actor->unknown_0264[3] != 0) { + if (actor->actorWindows[3] != 0) { scratch.resize(sizeof(ProgressPacket), 0); auto* packet = reinterpret_cast(scratch.data()); packet->color = 0; packet->packetType = 0x2F0; - packet->seconds = (actor->unknown_0280 - actor->unknown_0284) / 1000; + packet->seconds = (actor->skillRechargeEndTick - actor->skillRechargeStartTick) / 1000; const std::vector chunk = MakeDataChunk(0xCB, scratch); data.insert(data.end(), chunk.begin(), chunk.end()); } - UIMerchantShopTitle* buyingShop = reinterpret_cast(actor->unknown_0264[4]); + UIMerchantShopTitle* buyingShop = reinterpret_cast(actor->actorWindows[4]); if (buyingShop != nullptr) { scratch.resize(sizeof(ShopEntryPacket), 0); auto* packet = reinterpret_cast(scratch.data()); @@ -6139,8 +6139,8 @@ struct GameModeUiDragMessage { /* 000E */ int y; /* 0012 */ int source; /* 0016 */ std::uint32_t id; - /* 001A */ std::uint32_t unknown_001A; - /* 001E */ std::uint32_t unknown_001E; + /* 001A */ std::uint32_t price; + /* 001E */ std::uint32_t realPrice; /* 0022 */ int quantity; /* 0026 */ int slot; /* 002A */ std::uint32_t itemType; @@ -6195,20 +6195,20 @@ void CGameMode::ProcessUiMessage(unsigned char* message) { break; } case 903: - *reinterpret_cast(&this->unknown_0100[0x10]) = values->values[0]; + *reinterpret_cast(&this->equipmentRequestState[0x10]) = values->values[0]; break; case 904: { char buffer[200]; std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, values->text, values->values[0]); - this->unknown_03C8 = buffer; + this->chatRoomTitle = buffer; std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, values->text + values->values[0], values->values[1]); - this->unknown_03E0 = buffer; - this->unknown_03F8 = values->values[2]; - this->unknown_03FC = values->values[3]; - this->unknown_0400 = values->values[4]; - this->unknown_0404 = values->values[5]; + this->chatRoomPassword = buffer; + this->chatRoomPublic = values->values[2]; + this->chatRoomMemberCount = values->values[3]; + this->chatRoomMemberLimit = values->values[4]; + this->chatRoomId = values->values[5]; break; } case 905: @@ -6217,16 +6217,16 @@ void CGameMode::ProcessUiMessage(unsigned char* message) { break; case 906: { const GameModeUiWhisperMessage* whisper = reinterpret_cast(message); - this->unknown_022C = whisper->target; - this->unknown_0214 = whisper->text; + this->lastWhisperName = whisper->target; + this->lastWhisper = whisper->text; break; } case 907: { const GameModeUiKindTextMessage* text = reinterpret_cast(message); if (text->kind == 0x29) { - g_session.unknown_550C = text->text; + g_session.storeTitle = text->text; } else if (text->kind == 0xAE) { - g_session.unknown_550C = text->text; + g_session.storeTitle = text->text; } break; } @@ -6288,8 +6288,8 @@ void CGameMode::ReceiveUiDragMessage(const unsigned char* message) { ModeDragState drag; drag.source = packet->source; drag.id = packet->id; - drag.unknown_0310 = packet->unknown_001A; - drag.unknown_0314 = packet->unknown_001E; + drag.itemValue = packet->price; + drag.price = packet->realPrice; drag.quantity = packet->quantity; drag.slot = packet->slot; drag.type = packet->itemType; @@ -6316,15 +6316,15 @@ void CGameMode::ReceiveUiDragMessage(const unsigned char* message) { const int kind = packet->windowId; if (kind == 0x17 || kind == 0x2C) { if (packet->itemType <= 3 || packet->itemType == 7) { - this->unknown_05EC[0] = this->IsAllowedPair(kind, packet->source); + this->replayDragState[0] = this->IsAllowedPair(kind, packet->source); } } else if (kind == 0x16) { if (packet->itemType <= 3 || packet->itemType == 7) { - this->unknown_05EC[0] = this->IsAllowedPair(0x16, packet->source); + this->replayDragState[0] = this->IsAllowedPair(0x16, packet->source); } } } else { - this->unknown_05EC[0] = this->IsAllowedPair(packet->windowId, packet->source); + this->replayDragState[0] = this->IsAllowedPair(packet->windowId, packet->source); } if (window != nullptr) { @@ -6333,8 +6333,8 @@ void CGameMode::ReceiveUiDragMessage(const unsigned char* message) { const int kind = packet->windowId; if (kind == 0x24 || kind == 0x9F) { - this->unknown_05EC[0] = 0; - } else if (this->unknown_05EC[0] == 1 && g_windowMgr.window_01EC != nullptr) { + this->replayDragState[0] = 0; + } else if (this->replayDragState[0] == 1 && g_windowMgr.window_01EC != nullptr) { if (drag.type == 6) { const ItemCardName card = FindItemCardName(std::atoi(drag.name.c_str())); g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETTEXT, 0, reinterpret_cast(card.name), 0, 0); @@ -6357,7 +6357,7 @@ std::vector CGameMode::SaveGroundItems() { data.insert(data.end(), chunk.begin(), chunk.end()); } - for (CRenderObject* object : this->scene->unknown_0018) { + for (CRenderObject* object : this->scene->items) { CItem* item = static_cast(object); ItemEntryPacket packet; packet.packetType = 0x9D; @@ -6440,7 +6440,7 @@ void CGameMode::EnsureNameBalloon(UINameBalloonText*& balloon) { // OFFSET: 0x00CDD240 // FUNCTION: fn_21315 void __stdcall OpenWordDisplay(CGameActor* actor) { - if (actor->unknown_018C || IsAdminAccount(actor->render.accountId)) { + if (actor->actorTitleWindow || IsAdminAccount(actor->render.accountId)) { return; } @@ -6453,7 +6453,7 @@ void __stdcall OpenWordDisplay(CGameActor* actor) { UIWordDisplayWnd* window = new UIWordDisplayWnd(); window->SendMsg(nullptr, AM_UPDATEGAGE, actor->render.accountId, 0, 0, 0); g_windowMgr.AddRendered(window); - actor->unknown_018C = reinterpret_cast(window); + actor->actorTitleWindow = reinterpret_cast(window); } // OFFSET: 0x00CFF070 @@ -6509,7 +6509,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int g_session.ClearEntryList5BD4(); g_session.ClearShortcutSlots(); g_session.ClearSecondaryShortcutSlots(); - g_session.unknown_6184 = 0; + g_session.playerAppearanceState = 0; g_session.ResetInventoryItems(); g_session.ClearPartyMembers(); @@ -6527,16 +6527,16 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int GetRagConnection().Close(); g_activeSkillEffects.clear(); - this->unknown_0244 = 1; - this->unknown_0248 = timeGetTime(); + this->noMove = 1; + this->noMoveStartTick = timeGetTime(); this->scene->player->SendMsg(nullptr, AM_FREEZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (g_screenShakeDuration > 0) { g_screenShakeDuration = g_screenShakeMode == 2 ? 10001 : g_screenShakeDuration; } if (g_replayAnimationScaling == 0) { - this->unknown_0018 = GetRagConnection().Connect(g_zoneServerEndpoint); - if (!this->unknown_0018) { + this->connectionReady = GetRagConnection().Connect(g_zoneServerEndpoint); + if (!this->connectionReady) { GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_SERVER_CONNECTION_FAILED), 1, true, true, 0, "Message", 280, 120, 0) != 269) { this->SendMsg(MM_QUIT_TO_IDENTRY, 0, 0, 0, 0); @@ -6553,7 +6553,7 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int packet.clientTime = timeGetTime(); packet.aid = g_session.m_aid; packet.gid = g_session.m_gid; - packet.authCode = *reinterpret_cast(&g_session.unknown_0EA0[0x04]); + packet.authCode = *reinterpret_cast(&g_session.characterLoginData[0x04]); packet.sex = static_cast(g_session.SyncUnknown0E98()); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); g_session.SetOption(17, 1, 0); @@ -6561,15 +6561,15 @@ void CGameMode::ChangeZoneServer(std::string mapName, int x, int y, int ip, int } static_cast(g_windowMgr.EnsureWindow(WID_WAITWND))->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); - g_windowMgr.unknown_0474 = 185; + g_windowMgr.modalResponse = 185; } // OFFSET: 0x00CE1FA0 // FUNCTION: fn_21333 void CGameMode::UpdateBalloons() { if (this->nameBalloon) { - if (*reinterpret_cast(&this->unknown_02B8[0x0C]) == 0) { - *reinterpret_cast(&this->unknown_02B8[0x0C]) = 1; + if (*reinterpret_cast(&this->balloonDisplayState[0x0C]) == 0) { + *reinterpret_cast(&this->balloonDisplayState[0x0C]) = 1; if (this->balloonActorId == g_session.m_aid) { this->PlaceWindowAtActor(this->nameBalloon, reinterpret_cast(this->scene->player)); } else { @@ -6590,8 +6590,8 @@ void CGameMode::UpdateBalloons() { } if (this->itemNameBalloon) { - if (*reinterpret_cast(&this->unknown_02B8[0x10]) == 0) { - *reinterpret_cast(&this->unknown_02B8[0x10]) = 1; + if (*reinterpret_cast(&this->balloonDisplayState[0x10]) == 0) { + *reinterpret_cast(&this->balloonDisplayState[0x10]) = 1; if (this->balloonActorId == g_session.m_aid) { this->PlaceWindowAtActor(this->itemNameBalloon, reinterpret_cast(this->scene->player)); } else { @@ -6611,10 +6611,10 @@ void CGameMode::UpdateBalloons() { } } - UIWindow*& skillBalloon = *reinterpret_cast(&this->unknown_02B8[0x00]); - UIWindow*& hintBalloon = *reinterpret_cast(&this->unknown_02B8[0x04]); - int& shownSkill = *reinterpret_cast(&this->unknown_045C[0x04]); - if (this->unknown_0408 == nullptr) { + UIWindow*& skillBalloon = *reinterpret_cast(&this->balloonDisplayState[0x00]); + UIWindow*& hintBalloon = *reinterpret_cast(&this->balloonDisplayState[0x04]); + int& shownSkill = *reinterpret_cast(&this->cardAndSkillBalloonIds[0x04]); + if (this->skillUseType == nullptr) { if (skillBalloon) { g_windowMgr.Schedule(skillBalloon); skillBalloon = nullptr; @@ -6632,8 +6632,8 @@ void CGameMode::UpdateBalloons() { created = true; } - if (this->unknown_040C != shownSkill || created == true) { - shownSkill = this->unknown_040C; + if (this->skillId != shownSkill || created == true) { + shownSkill = this->skillId; std::string text; if (shownSkill == 10000) { const char source[] = {'\xBC', '\x82', '\x2D', '\x77', '\xD2', '\xDD', '\xC6', '\x1F', '\xB2', '\x8C', '\x33', '\x70', '\xD3', '\xCA', '\xD1', '\x3F'}; @@ -6677,7 +6677,7 @@ void CGameMode::UpdateBalloons() { CPlayer* player = this->scene->player; const int x = player->render.screenX - 30; const int y = player->render.screenY; - const int offset = static_cast(static_cast(12 * g_renderer->viewport.height / 480) * player->render.unknown_005C); + const int offset = static_cast(static_cast(12 * g_renderer->viewport.height / 480) * player->render.distanceScale); if (IsScreenShakeActive()) { this->itemWindow->Move(x, y - offset); } else { @@ -6685,9 +6685,9 @@ void CGameMode::UpdateBalloons() { } } - if (this->unknown_05FC && timeGetTime() > this->unknown_0600 + 10000) { - g_windowMgr.Schedule(this->unknown_05FC); - this->unknown_05FC = nullptr; + if (this->achievementBalloon && timeGetTime() > this->achievementBalloonTick + 10000) { + g_windowMgr.Schedule(this->achievementBalloon); + this->achievementBalloon = nullptr; } } @@ -6735,7 +6735,7 @@ void CGameMode::End() { RegCloseKey(key); } - if (this->unknown_0254) { + if (this->canRotateView) { g_outdoorCameraPitch = g_cameraPitch; g_outdoorCameraDistance = g_cameraDistance; } else { @@ -7228,11 +7228,11 @@ int g_window315Enabled = 1; void CGameMode::InitializeState() { this->ClearTooltip(); this->nameCard.Clear(); - this->unknown_019C.clear(); - this->unknown_01A4.clear(); + this->actorPosList.clear(); + this->pickupReqItemNaidList.clear(); this->actorMenuIds.clear(); - this->unknown_01B4.clear(); - this->unknown_01C4.clear(); + this->partyPosList.clear(); + this->compassPosList.clear(); this->m_skillUnitIds.clear(); this->spriteMirrorActorIds.clear(); this->minimapMarkers.clear(); @@ -7255,7 +7255,7 @@ void CGameMode::InitializeState() { g_windowMgr.EnsureWindow(WID_NCASH_CALLWND); } - if (g_session.unknown_593C) { + if (g_session.memorialWindowOpen) { g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND); } @@ -7294,53 +7294,53 @@ void CGameMode::InitializeState() { this->fadeInRequested = 1; this->cursorOffsetX = 0.0f; this->cursorOffsetY = 0.0f; - *reinterpret_cast(this->unknown_00D8) = 0; - *reinterpret_cast(&this->unknown_00D8[4]) = g_mouse.x; - *reinterpret_cast(&this->unknown_00D8[8]) = g_mouse.y; - this->unknown_00E4 = g_mouse.x; - this->unknown_00E8 = g_mouse.y; - this->unknown_0244 = 0; - this->unknown_024C = 0; - this->unknown_0250 = 0; - *reinterpret_cast(&this->unknown_0294[0x18]) = 0; - *reinterpret_cast(&this->unknown_0294[0x1C]) = 0; - *reinterpret_cast(this->unknown_02B8) = 0; - *reinterpret_cast(&this->unknown_02B8[4]) = 0; - *reinterpret_cast(&this->unknown_02B8[8]) = 0; + *reinterpret_cast(this->leftBtnClickTick) = 0; + *reinterpret_cast(&this->leftBtnClickTick[4]) = g_mouse.x; + *reinterpret_cast(&this->leftBtnClickTick[8]) = g_mouse.y; + this->rBtnClickX = g_mouse.x; + this->rBtnClickY = g_mouse.y; + this->noMove = 0; + this->isOnQuest = 0; + this->isPlayerDead = 0; + *reinterpret_cast(&this->coupleName[0x18]) = 0; + *reinterpret_cast(&this->coupleName[0x1C]) = 0; + *reinterpret_cast(this->balloonDisplayState) = 0; + *reinterpret_cast(&this->balloonDisplayState[4]) = 0; + *reinterpret_cast(&this->balloonDisplayState[8]) = 0; this->itemWindow = nullptr; - this->unknown_05D0 = nullptr; - this->unknown_01F8 = -1; + this->statusIconTooltip = nullptr; + this->hoveredStatusIconId = -1; this->balloonActorId = 0; - *reinterpret_cast(this->unknown_02E4) = 0; - *reinterpret_cast(&this->unknown_02E4[4]) = 0; - *reinterpret_cast(&this->unknown_02B8[0x0C]) = 1; - *reinterpret_cast(&this->unknown_02B8[0x10]) = 1; - this->unknown_02CC = 0; - *reinterpret_cast(this->unknown_02D0) = 0; - this->unknown_02D4 = 0; + *reinterpret_cast(this->nameBalloonSize) = 0; + *reinterpret_cast(&this->nameBalloonSize[4]) = 0; + *reinterpret_cast(&this->balloonDisplayState[0x0C]) = 1; + *reinterpret_cast(&this->balloonDisplayState[0x10]) = 1; + this->waitingUseItemAck = 0; + *reinterpret_cast(this->waitingItemThrowAck) = 0; + this->waitingReqStatusAck = 0; this->drag.Clear(); - this->unknown_02DC = 0; - this->unknown_02E0 = 0; - *reinterpret_cast(this->unknown_00EC) = 0; - *reinterpret_cast(&this->unknown_00EC[4]) = 0; - *reinterpret_cast(&this->unknown_00EC[8]) = 0; - this->unknown_00F8 = 1; - this->unknown_00FC = 0; - *reinterpret_cast(this->unknown_0100) = 0; - *reinterpret_cast(&this->unknown_0100[0x04]) = timeGetTime() - 2000; - *reinterpret_cast(&this->unknown_0100[0x08]) = timeGetTime() - 2000; - *reinterpret_cast(&this->unknown_0100[0x0C]) = 0; - *reinterpret_cast(&this->unknown_0100[0x10]) = 0; - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; - this->unknown_0450 = 0; - this->unknown_0454 = 0; - this->unknown_0438 = ""; - this->unknown_0408 = nullptr; - this->unknown_040C = 0; + this->lastNaid = 0; + this->menuTargetAid = 0; + *reinterpret_cast(this->lastActorIds) = 0; + *reinterpret_cast(&this->lastActorIds[4]) = 0; + *reinterpret_cast(&this->lastActorIds[8]) = 0; + this->isAutoMoveClickOn = 1; + this->isWaitingEnterRoom = 0; + *reinterpret_cast(this->equipmentRequestState) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x08]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x0C]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x10]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; + this->sameChatRepeatCount = 0; + this->serverTimeSyncCount = 0; + this->lastChat = ""; + this->skillUseType = nullptr; + this->skillId = 0; g_pickInvert = 0; - *reinterpret_cast(this->unknown_045C) = 0; + *reinterpret_cast(this->cardAndSkillBalloonIds) = 0; this->miniMapTooltipId = -1; - *reinterpret_cast(&this->unknown_045C[4]) = -1; + *reinterpret_cast(&this->cardAndSkillBalloonIds[4]) = -1; char subKey[512]; std::strcpy(subKey, g_subKey); @@ -7362,19 +7362,19 @@ void CGameMode::InitializeState() { } g_mouse.Reset(); - *reinterpret_cast(&this->unknown_026E[0x02]) = 1; - this->unknown_026E[0x16] = 0; - *reinterpret_cast(&this->unknown_026E[0x06]) = timeGetTime(); - *reinterpret_cast(&this->unknown_026E[0x0A]) = timeGetTime(); - this->unknown_0248 = timeGetTime(); - *reinterpret_cast(this->unknown_01E0) = timeGetTime(); + *reinterpret_cast(&this->requestTimers[0x02]) = 1; + this->requestTimers[0x16] = 0; + *reinterpret_cast(&this->requestTimers[0x06]) = timeGetTime(); + *reinterpret_cast(&this->requestTimers[0x0A]) = timeGetTime(); + this->noMoveStartTick = timeGetTime(); + *reinterpret_cast(this->windowInvalidateTick) = timeGetTime(); this->broadcastBalloon = nullptr; - *reinterpret_cast(&this->unknown_026E[0x0E]) = timeGetTime(); - *reinterpret_cast(&this->unknown_026E[0x12]) = timeGetTime(); - this->unknown_05CE = 1; - std::memset(&this->unknown_05EC[1], 0, 6); - *reinterpret_cast(&this->unknown_05EC[0x08]) = 0; - *reinterpret_cast(&this->unknown_05EC[0x0C]) = 0; + *reinterpret_cast(&this->requestTimers[0x0E]) = timeGetTime(); + *reinterpret_cast(&this->requestTimers[0x12]) = timeGetTime(); + this->inventoryChanged = 1; + std::memset(&this->replayDragState[1], 0, 6); + *reinterpret_cast(&this->replayDragState[0x08]) = 0; + *reinterpret_cast(&this->replayDragState[0x0C]) = 0; g_soundMgr->SetListenerYaw(this->camera->camera.desiredYaw); this->SendMsg(MM_TOGGLE_PLAYERGAGE, 0, 0, 0, 0); @@ -7383,7 +7383,7 @@ void CGameMode::InitializeState() { g_guildInfo.Init(); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_LIST_COMMAND)), 0xFFE6E6, 0, 0, 0); - inet_ntoa(*reinterpret_cast(&g_session.unknown_0EA0[0x0C])); + inet_ntoa(*reinterpret_cast(&g_session.characterLoginData[0x0C])); if (!g_accountLinkedUserDataMgr->m_loaded) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_OFFER_GUILD_EXP_MAX_RATE)), 255, 0, 0, 0); } @@ -7414,7 +7414,7 @@ void CGameMode::InitializeState() { } SendGameTick( - true, *reinterpret_cast(&this->unknown_026E[0x02]), *reinterpret_cast(&this->unknown_026E[0x06]), g_gameTickInterval, + true, *reinterpret_cast(&this->requestTimers[0x02]), *reinterpret_cast(&this->requestTimers[0x06]), g_gameTickInterval, GetRagConnection(), g_packetLengths, g_pingLogEnabled, g_pingLogFirstTick, g_pingLogTicks ); g_weatherEffect.ResetEffect(); @@ -7436,11 +7436,11 @@ void CGameMode::InitializeState() { g_weatherEffect.Fireworks(); } - *reinterpret_cast(&g_session.unknown_5570[0x08]) = -1; - g_session.unknown_5614 = 0; + *reinterpret_cast(&g_session.spAndHomunculusStats[0x08]) = -1; + g_session.homunAlive = 0; g_session.ClearHomunStatus(); - *reinterpret_cast(&g_session.unknown_5620[0x08]) = -1; - g_session.unknown_56B0 = 0; + *reinterpret_cast(&g_session.companionTargetState[0x08]) = -1; + g_session.mercenaryAlive = 0; g_session.ResetMercenaryStats(); g_windowMgr.FocusWindow01C8Edit(); @@ -7456,7 +7456,7 @@ void CGameMode::InitializeState() { if (replayState == 3) { Replay::Instance().SetState(2); g_windowMgr.EnsureWindow(WID_REPLAYRECCONTROLWND); - g_windowMgr.window_4F164->Move(Replay::Instance().unknown_01F4, Replay::Instance().unknown_01F8); + g_windowMgr.window_4F164->Move(Replay::Instance().recordingState, Replay::Instance().playbackState); g_windowMgr.window_4F164->SendMsg(nullptr, 123, 0, 0, 0, 0); } else if (replayState == 8) { Replay::Instance().SetState(7); @@ -7470,8 +7470,8 @@ void CGameMode::InitializeState() { } } - this->unknown_05FC = nullptr; - this->unknown_0600 = 0; + this->achievementBalloon = nullptr; + this->achievementBalloonTick = 0; s_signBoardMgr->Initialize(); g_statusRefreshSuppressed = 0; int& localMapMove = g_session.m_localMapMove; @@ -7480,7 +7480,7 @@ void CGameMode::InitializeState() { } g_guildInfo.ClearUnknown0114(); - this->unknown_02EC = ""; + this->menuTargetName = ""; } // OFFSET: 0x00CE46B0 @@ -7488,14 +7488,14 @@ void CGameMode::InitializeState() { void CGameMode::ProcessRightButtonDrag() { switch (g_mouse.buttons[1]) { case 1: { - if (g_windowMgr.unknown_0210) { + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } this->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); this->SendMsg(MM_CANCEL_USE_SKILL, 0, 0, 0, 0); - this->unknown_00E4 = g_mouse.x; - this->unknown_00E8 = g_mouse.y; + this->rBtnClickX = g_mouse.x; + this->rBtnClickY = g_mouse.y; if (!g_serviceOptions.Get(0x78)) { return; } @@ -7506,7 +7506,7 @@ void CGameMode::ProcessRightButtonDrag() { } AutomaticSkills* automatic = &g_session.m_automaticSkills; - if (shortcuts->m_slots[4]->unknown_0000 && automatic->Contains(static_cast(shortcuts->m_slots[4]->itemId))) { + if (shortcuts->m_slots[4]->enabled && automatic->Contains(static_cast(shortcuts->m_slots[4]->itemId))) { g_session.SetOption(AutomaticSkills::CancelOption(static_cast(shortcuts->m_slots[4]->itemId)), 1, 0); } else { automatic->DisableAll(); @@ -7519,7 +7519,7 @@ void CGameMode::ProcessRightButtonDrag() { if (!HIBYTE(GetAsyncKeyState(VK_MENU)) && !HIBYTE(GetAsyncKeyState(VK_SHIFT))) { this->SetCursorAction(4); if (this->hasViewParameters) { - float yaw = static_cast(g_mouse.x) + this->camera->camera.desiredYaw - static_cast(this->unknown_00DC); + float yaw = static_cast(g_mouse.x) + this->camera->camera.desiredYaw - static_cast(this->oldMouseX); const float low = static_cast(this->viewParameters[3]); const float high = static_cast(this->viewParameters[4]); if (yaw < low) { @@ -7529,10 +7529,10 @@ void CGameMode::ProcessRightButtonDrag() { yaw = high; } this->camera->camera.desiredYaw = yaw; - } else if (this->unknown_0254 == 0 && g_session.IsAdminSubMode(6) == 0) { - float yaw = static_cast(g_mouse.x) + this->camera->camera.desiredYaw - static_cast(this->unknown_00DC); - const float low = this->unknown_0288 - 20.0f; - const float high = this->unknown_0288 + 20.0f; + } else if (this->canRotateView == 0 && g_session.IsAdminSubMode(6) == 0) { + float yaw = static_cast(g_mouse.x) + this->camera->camera.desiredYaw - static_cast(this->oldMouseX); + const float low = this->fixedLongitude - 20.0f; + const float high = this->fixedLongitude + 20.0f; if (yaw < low) { yaw = low; } @@ -7541,15 +7541,15 @@ void CGameMode::ProcessRightButtonDrag() { } this->camera->camera.desiredYaw = yaw; } else { - this->camera->camera.AddYaw(static_cast(g_mouse.x - this->unknown_00DC)); + this->camera->camera.AddYaw(static_cast(g_mouse.x - this->oldMouseX)); } g_soundMgr->SetListenerYaw(this->camera->camera.desiredYaw); } if (!HIBYTE(GetAsyncKeyState(VK_MENU)) && HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - const float range = this->unknown_0254 ? 42.0f : 10.0f; - g_cameraPitch = this->camera->camera.desiredPitch - static_cast((g_mouse.y - this->unknown_00E0) / 2); + const float range = this->canRotateView ? 42.0f : 10.0f; + g_cameraPitch = this->camera->camera.desiredPitch - static_cast((g_mouse.y - this->oldMouseY) / 2); float limit; if (this->hasViewParameters) { if (g_cameraPitch < static_cast(this->viewParameters[7])) { @@ -7574,8 +7574,8 @@ void CGameMode::ProcessRightButtonDrag() { } if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) { - g_cameraDistance = this->camera->camera.desiredDistance - static_cast((g_mouse.y - this->unknown_00E0) / 2); - float maxDistance = this->unknown_0254 ? g_serviceOptionJitterScale : g_cameraBaseDistance; + g_cameraDistance = this->camera->camera.desiredDistance - static_cast((g_mouse.y - this->oldMouseY) / 2); + float maxDistance = this->canRotateView ? g_serviceOptionJitterScale : g_cameraBaseDistance; if (this->hasViewParameters) { if (g_cameraDistance < static_cast(this->viewParameters[0])) { g_cameraDistance = static_cast(this->viewParameters[0]); @@ -7607,7 +7607,7 @@ void CGameMode::ProcessRightButtonDrag() { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { this->camera->camera.desiredPitch = -50.0f; } - if (!g_serviceOptions.Get(0x78) && this->unknown_0254 && !HIBYTE(GetAsyncKeyState(VK_SHIFT)) && !HIBYTE(GetAsyncKeyState(VK_CONTROL))) { + if (!g_serviceOptions.Get(0x78) && this->canRotateView && !HIBYTE(GetAsyncKeyState(VK_SHIFT)) && !HIBYTE(GetAsyncKeyState(VK_CONTROL))) { this->camera->camera.desiredYaw = 0.0f; } return; @@ -7622,22 +7622,22 @@ void CGameMode::ProcessMouseWheel(int requireControl) { } this->wheelTick = timeGetTime(); - if (g_mouse.wheel == 0 || this->unknown_0408 != nullptr) { + if (g_mouse.wheel == 0 || this->skillUseType != nullptr) { return; } CSkillInfo wheelSkill = g_session.m_skillBundle.Lookup(0x27F); if (wheelSkill.level > 0) { - const int count = this->unknown_05F4; - if (count > this->unknown_05F8) { - this->unknown_05F8 = count; + const int count = this->mouseRollCount; + if (count > this->mouseRollMax) { + this->mouseRollMax = count; } - this->unknown_05F4 = count + 4; + this->mouseRollCount = count + 4; } if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { const float step = g_mouse.wheel > 0 ? -5.0f : 5.0f; - const float range = this->unknown_0254 ? 20.0f : 10.0f; + const float range = this->canRotateView ? 20.0f : 10.0f; g_cameraPitch = this->camera->camera.desiredPitch - step; float limit; if (this->hasViewParameters) { @@ -7669,14 +7669,14 @@ void CGameMode::ProcessMouseWheel(int requireControl) { if (g_serviceOptions.Get(0x79)) { UIShortCutWnd* shortcuts = static_cast(g_windowMgr.window_01E8); - *reinterpret_cast(&g_session.unknown_544C[0x00]) = 1; + *reinterpret_cast(&g_session.mapTransitionFlag[0x00]) = 1; AutomaticSkills* automatic = &g_session.m_automaticSkills; if (g_mouse.wheel > 0) { if (!shortcuts) { return; } - if (shortcuts->m_slots[3]->unknown_0000 && automatic->Contains(shortcuts->m_slots[3]->itemId)) { + if (shortcuts->m_slots[3]->enabled && automatic->Contains(shortcuts->m_slots[3]->itemId)) { g_session.SetOption(AutomaticSkills::CancelOption(static_cast(shortcuts->m_slots[3]->itemId)), 1, 0); } else { automatic->DisableAll(); @@ -7688,7 +7688,7 @@ void CGameMode::ProcessMouseWheel(int requireControl) { return; } - if (shortcuts->m_slots[2]->unknown_0000 && automatic->Contains(shortcuts->m_slots[2]->itemId)) { + if (shortcuts->m_slots[2]->enabled && automatic->Contains(shortcuts->m_slots[2]->itemId)) { g_session.SetOption(AutomaticSkills::CancelOption(static_cast(shortcuts->m_slots[2]->itemId)), 1, 0); } else { automatic->DisableAll(); @@ -7701,7 +7701,7 @@ void CGameMode::ProcessMouseWheel(int requireControl) { const float step = g_mouse.wheel > 0 ? -24.3f : 24.3f; g_cameraDistance = this->camera->camera.desiredDistance - step; - float maxDistance = this->unknown_0254 ? g_serviceOptionJitterScale : g_cameraBaseDistance; + float maxDistance = this->canRotateView ? g_serviceOptionJitterScale : g_cameraBaseDistance; CSkillInfo zoomSkill = g_session.m_skillBundle.Lookup(0x1B9); bool extendedZoom = false; if (this->hasViewParameters) { @@ -7709,7 +7709,7 @@ void CGameMode::ProcessMouseWheel(int requireControl) { g_cameraDistance = static_cast(this->viewParameters[0]); } maxDistance = static_cast(this->viewParameters[1] + this->viewParameters[0]); - } else if (zoomSkill.level <= 0 && this->scene->player->render.unknown_0070 == 6 && !this->scene->player->HasId(0x14E)) { + } else if (zoomSkill.level <= 0 && this->scene->player->render.state == 6 && !this->scene->player->HasId(0x14E)) { switch (g_session.m_job) { case JT_STAR: case JT_STAR_B: @@ -7779,13 +7779,13 @@ static_assert(sizeof(EquipmentProperties::CEquipmentPropertiesMgr) == 0x1FC); // OFFSET: 0x00CDDA50 // FUNCTION: fn_21320 void CGameMode::Initialize(const char* name) { - this->unknown_0624[0] = 1; - this->unknown_0468 = 0; + this->isInitializing[0] = 1; + this->recordChatCount = 0; this->nameCard.SetName(g_session.m_aid, g_session.DecodePlayerName()); g_playerNameDictionary->Set(g_session.m_gid, g_session.DecodePlayerName()); - this->unknown_05C4 = -1; - this->unknown_05C8 = -1; - *reinterpret_cast(this->unknown_05CC) = 0; + this->bossMonsterX = -1; + this->bossMonsterY = -1; + *reinterpret_cast(this->bossAlarmAndCopyNameFlags) = 0; if (Replay::Instance().state == 6) { const std::vector data = Replay::Instance().ReadSection(0x12); @@ -7807,8 +7807,8 @@ void CGameMode::Initialize(const char* name) { ActiveSkillEffect effect; std::memcpy(&effect, data.data() + offset, header.size); offset += header.size; - if (effect.unknown_0004 != 999999) { - g_cooldownOwner->Register(effect.id, effect.unknown_0014, effect.unknown_0004 - effect.unknown_0018, effect.unknown_0014 - effect.unknown_0018); + if (effect.expiration != 999999) { + g_cooldownOwner->Register(effect.id, effect.totalDuration, effect.expiration - effect.remainingDuration, effect.totalDuration - effect.remainingDuration); } g_activeSkillEffects.push_back(effect); } else { @@ -7831,7 +7831,7 @@ void CGameMode::Initialize(const char* name) { miniMap.append(name, std::strlen(name)); miniMap.resize(miniMap.size() - 4); miniMap.append(".bmp", 4); - std::strcpy(reinterpret_cast(this->unknown_0090), miniMap.c_str()); + std::strcpy(reinterpret_cast(this->minimapBmpName), miniMap.c_str()); g_renderer->ClearDepth(1); g_session.m_weight = 0; @@ -7856,13 +7856,13 @@ void CGameMode::Initialize(const char* name) { this->camera->Reset(); this->scene->InitWorld(); - this->unknown_0458 = 0; + this->checkGroundAlpha = 0; this->InitializeCamera(); this->mousePointer = new CMousePointer(); this->scene->objects.push_back(this->mousePointer); g_soundMgr->SetDefaultName(g_session.GetBgmFileName(std::string(this->mapName).c_str())); - g_weatherEffect.unknown_0001 = g_serviceOptions.Get(0x77) == 0; + g_weatherEffect.enabled = g_serviceOptions.Get(0x77) == 0; if (g_serviceOptions.Get(0x3C)) { int found = 0; const std::vector* fog = g_session.GetFogParameters(this->mapName, &found); @@ -7886,12 +7886,12 @@ void CGameMode::Initialize(const char* name) { ShowCurrentMapName(); ResetTimer(); this->forcedAttack = 0; - this->unknown_0464 = 0; + this->countdownStartTick = 0; this->chatLogLines = 0; - this->unknown_05A0 = 0; - this->unknown_05D4.resize(6); + this->strikeCount = 0; + this->periodicTicks.resize(6); - if (*reinterpret_cast(g_session.unknown_5554) && g_session.IsAdminSubMode(7)) { + if (*reinterpret_cast(g_session.whisperRecordStorage) && g_session.IsAdminSubMode(7)) { char message[256]; std::sprintf(message, "Now Auto chat Save System is ENABLED."); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message), 0xFFFF, 0, 0, 0); @@ -7949,7 +7949,7 @@ void CGameMode::Initialize(const char* name) { } if (header.type == 14011) { - std::memcpy(&this->unknown_024C, data.data() + offset, header.size); + std::memcpy(&this->isOnQuest, data.data() + offset, header.size); } offset += header.size; } @@ -7991,7 +7991,7 @@ void CGameMode::Initialize(const char* name) { } g_session.SetOption(0x14, 0, 0); - this->unknown_0624[0] = 0; + this->isInitializing[0] = 0; } @@ -8010,14 +8010,14 @@ void CGameMode::ReceiveSkillList(int packetType, const std::vector(&this->unknown_0100[0x0C]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x0C]) = 0; CSkillInfo skill = g_session.LookupSkill(id); skill.level = level; - skill.unknown_0014 = spCost; - skill.unknown_0018 = upgradable; - skill.unknown_001C = range; - skill.unknown_000C = type; - skill.unknown_0030 = unknown; + skill.spCost = spCost; + skill.upgradable = upgradable; + skill.range = range; + skill.type = type; + skill.learnedLevel = unknown; skill.id = id; if (g_session.IsHomunculusSkill(id)) { @@ -8081,7 +8081,7 @@ void CGameMode::ShowActorNameBalloon(std::uint32_t id) { return; } - int& placed = *reinterpret_cast(&this->unknown_02B8[0x0C]); + int& placed = *reinterpret_cast(&this->balloonDisplayState[0x0C]); if (this->balloonActorId != id && this->balloonActorId != 0) { this->balloonActorId = id; placed = 1; @@ -8098,7 +8098,7 @@ void CGameMode::ShowActorNameBalloon(std::uint32_t id) { placed = 0; this->UpdateNameBalloon(gameActor); - if (this->unknown_05CC[1] && g_session.IsPlayerJobId(gameActor->GetEffectiveJob(-1)) && IsAdminAccount(g_session.m_aid)) { + if (this->bossAlarmAndCopyNameFlags[1] && g_session.IsPlayerJobId(gameActor->GetEffectiveJob(-1)) && IsAdminAccount(g_session.m_aid)) { g_windowMgr.SelectWhisperName(this->ActorName(id).c_str()); } return; @@ -8122,8 +8122,8 @@ void CGameMode::ShowActorNameBalloon(std::uint32_t id) { this->nameBalloon->SetIcon("", 0); this->nameBalloon->m_textColor = 0x95EFFF; this->nameBalloon->m_outlineColor = 0; - *reinterpret_cast(&this->unknown_02E4[0]) = this->nameBalloon->geometry.width; - *reinterpret_cast(&this->unknown_02E4[4]) = this->nameBalloon->geometry.height; + *reinterpret_cast(&this->nameBalloonSize[0]) = this->nameBalloon->geometry.width; + *reinterpret_cast(&this->nameBalloonSize[4]) = this->nameBalloon->geometry.height; this->PlaceWindowAtActor(this->nameBalloon, reinterpret_cast(item)); } @@ -8133,18 +8133,18 @@ void CGameMode::ShowActorNameBalloon(std::uint32_t id) { void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* actor) { const unsigned char selfTargetOption = g_serviceOptions.Get(0x69); const unsigned char forceOption = g_serviceOptions.Get(0x6D); - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int attack; if (mode == 2 || mode == 4) { const int shiftHeld = HIBYTE(GetAsyncKeyState(VK_SHIFT)); - attack = IsSupportSkill(this->unknown_040C) ? shiftHeld : shiftHeld == 0; + attack = IsSupportSkill(this->skillId) ? shiftHeld : shiftHeld == 0; this->SetCursorAction(11); } else { attack = HIBYTE(GetAsyncKeyState(VK_SHIFT)) == 0; - if (actor->unknown_0314 == 7) { + if (actor->objectType == 7) { this->SetCursorAction(0); - } else if (g_session.GetMapProperty08() != 0 || this->scene->unknown_004C != 0) { + } else if (g_session.GetMapProperty08() != 0 || this->scene->isSiegeMode != 0) { if (g_session.IsLocalPlayerAid(actor->GetGdid())) { attack = 0; this->SetCursorAction(0); @@ -8160,9 +8160,9 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* attack = 1; } - const std::uint32_t& homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); - const std::uint32_t& mercenaryAid = *reinterpret_cast(&g_session.unknown_5620[8]); - if (g_session.unknown_5614 != 0) { + const std::uint32_t& homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); + const std::uint32_t& mercenaryAid = *reinterpret_cast(&g_session.companionTargetState[8]); + if (g_session.homunAlive != 0) { if (g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); @@ -8172,7 +8172,7 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* message.target = actor->render.accountId; homun->SetUnknown0330(reinterpret_cast(&message), 0); } - } else if (g_session.unknown_5610 != 0 && g_groundMarkAid == actor->render.accountId) { + } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == actor->render.accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry()) { AiMessage message = {}; @@ -8180,25 +8180,25 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* message.target = g_groundMarkAid; homun->SetUnknown0318(reinterpret_cast(&message), 0); } - g_session.unknown_5610 = 0; + g_session.attackHomunEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAid = actor->render.accountId; - g_session.unknown_5600 = 0; - g_session.unknown_5604 = 0; - g_session.unknown_5608 = 0; - g_session.unknown_5610 = 1; + g_session.homunEnemyX = 0; + g_session.homunEnemyY = 0; + g_session.moveHomunEnemy = 0; + g_session.attackHomunEnemy = 1; } - g_session.unknown_560C = 1; + g_session.selectHomunEnemy = 1; } - if (g_session.unknown_5614 != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->unknown_040C)) { + if (g_session.homunAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry()) { AiMessage message = {}; message.type = 7; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = actor->render.accountId; homun->SetUnknown0318(reinterpret_cast(&message), 0); } @@ -8206,7 +8206,7 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* } } - if (g_session.unknown_56B0 != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { + if (g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { @@ -8215,7 +8215,7 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* message.target = actor->render.accountId; mercenary->SetUnknown0330(reinterpret_cast(&message), 1); } - } else if (g_session.unknown_56AC != 0 && g_groundMarkAltAid == actor->render.accountId) { + } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == actor->render.accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; @@ -8223,27 +8223,27 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* message.target = g_groundMarkAltAid; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } - g_session.unknown_56AC = 0; + g_session.attackMercenaryEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAltAid = actor->render.accountId; - g_session.unknown_569C = 0; - g_session.unknown_56A0 = 0; - g_session.unknown_56A4 = 0; - g_session.unknown_56AC = 1; + g_session.mercenaryEnemyX = 0; + g_session.mercenaryEnemyY = 0; + g_session.moveMercenaryEnemy = 0; + g_session.attackMercenaryEnemy = 1; } - g_session.unknown_56A8 = 1; + g_session.selectMercenaryEnemy = 1; } - int& targetAid = *reinterpret_cast(&this->unknown_00EC[0x04]); + int& targetAid = *reinterpret_cast(&this->lastActorIds[0x04]); int& forced = this->forcedAttack; - if (attack != 0 && g_session.unknown_56B0 != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->unknown_040C)) { + if (attack != 0 && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; message.type = 7; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = actor->render.accountId; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } @@ -8252,8 +8252,8 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* if (g_mouse.buttons[0] == 1 && attack != 0 && !HIBYTE(GetAsyncKeyState(VK_MENU))) { this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - *reinterpret_cast(&this->unknown_00EC[0x08]) = targetAid; - this->unknown_00F8 = 0; + *reinterpret_cast(&this->lastActorIds[0x08]) = targetAid; + this->isAutoMoveClickOn = 0; if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(targetAid, 0); forced = 1; @@ -8265,12 +8265,12 @@ void CGameMode::ProcessActorClick(int& handled, ActorPickInfo* pick, CGameActor* targetAid = 0; } - if ((this->unknown_00DC != g_mouse.x || this->unknown_00E0 != g_mouse.y) && forced == 0 && g_mouse.buttons[0] == 0) { + if ((this->oldMouseX != g_mouse.x || this->oldMouseY != g_mouse.y) && forced == 0 && g_mouse.buttons[0] == 0) { targetAid = 0; } this->ShowActorNameBalloon(targetAid); - if (actor->render.unknown_0070 == 3) { + if (actor->render.state == 3) { targetAid = 0; } } @@ -8303,7 +8303,7 @@ __forceinline void CGameMode::ShowHoverActorName(CGameActor* actor) { return; } - if (actor->unknown_02F8 == 1 && (this->scene->unknown_0048 == 1 || this->scene->unknown_004C == 1)) { + if (actor->hasHp == 1 && (this->scene->isPKZone == 1 || this->scene->isSiegeMode == 1)) { card.name = "??????"; } else { const std::string name = this->nameCard.Name(actor->render.accountId); @@ -8316,7 +8316,7 @@ __forceinline void CGameMode::ShowHoverActorName(CGameActor* actor) { if (actor->GetEffectiveJob(-1) == 20269) { monsterType = 0; } else { - monsterType = actor->unknown_0304; + monsterType = actor->hpGaugeFlags; } balloon->SetName(card, actor->IsPlayerClass(actor->GetEffectiveJob(-1)) == 0, monsterType); } else { @@ -8324,14 +8324,14 @@ __forceinline void CGameMode::ShowHoverActorName(CGameActor* actor) { } const unsigned char showEmblem = g_serviceOptions.Get(0x40); - if ((g_session.IsNpcJob(actor->GetEffectiveJob(-1)) || g_session.IsMonsterActor(actor)) && card.unknown_0094) { - this->itemNameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.unknown_0094).c_str(), 0); - } else if (g_session.IsAllyActor(actor->render.accountId, actor->GetEffectiveJob(-1)) && card.unknown_0094) { - this->nameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.unknown_0094).c_str(), 0); + if ((g_session.IsNpcJob(actor->GetEffectiveJob(-1)) || g_session.IsMonsterActor(actor)) && card.groupIconId) { + this->itemNameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.groupIconId).c_str(), 0); + } else if (g_session.IsAllyActor(actor->render.accountId, actor->GetEffectiveJob(-1)) && card.groupIconId) { + this->nameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.groupIconId).c_str(), 0); } else if (actor->GetGdid() && showEmblem) { std::string emblem = g_guildMgr->GetEmblemFilename(actor->GetGdid()); const unsigned char framedEmblem = g_serviceOptions.Get(0xF3); - this->itemNameBalloon->SetIcon(emblem.c_str(), static_cast(g_modeMgr.GetGameMode())->scene->unknown_004C == 1 && framedEmblem ? 1 : 0); + this->itemNameBalloon->SetIcon(emblem.c_str(), static_cast(g_modeMgr.GetGameMode())->scene->isSiegeMode == 1 && framedEmblem ? 1 : 0); } else { this->itemNameBalloon->SetIcon("", 0); } @@ -8349,26 +8349,26 @@ __forceinline void CGameMode::ShowHoverActorName(CGameActor* actor) { int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) { if (g_mouse.buttons[0] == 1 && pick) { UIMacroReporterWnd* reporter = static_cast(g_windowMgr.LookupWindow(WID_MACROREPORTERWND)); - if (reporter && reporter->unknown_010C == true && reporter->m_mode == 0) { + if (reporter && reporter->activeOnly == true && reporter->m_mode == 0) { reporter->AddPickedActor(reinterpret_cast(pick)); return -1; } } - if (g_windowMgr.LookupWindow(WID_COLLECTIONSYSTEMWND) || reinterpret_cast(this->unknown_0408) == 1) { + if (g_windowMgr.LookupWindow(WID_COLLECTIONSYSTEMWND) || reinterpret_cast(this->skillUseType) == 1) { return result; } int& lockedPick = this->forcedAttack; - int& pickTarget = *reinterpret_cast(&this->unknown_00EC[0x00]); - int& clickTarget = *reinterpret_cast(&this->unknown_00EC[0x04]); + int& pickTarget = *reinterpret_cast(&this->lastActorIds[0x00]); + int& clickTarget = *reinterpret_cast(&this->lastActorIds[0x04]); - if (this->unknown_0028 == 0) { + if (this->lockOnMouse == 0) { if (!pick) { if (lockedPick != 0 || g_mouse.buttons[0] == 1) { return result; } - if (this->unknown_00DC == g_mouse.x && this->unknown_00E0 == g_mouse.y) { + if (this->oldMouseX == g_mouse.x && this->oldMouseY == g_mouse.y) { return result; } pickTarget = 0; @@ -8392,7 +8392,7 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) { return 1; } if (!pick && clickTarget == 0 && pickTarget == 0) { - this->unknown_0028 = 0; + this->lockOnMouse = 0; } } } @@ -8426,7 +8426,7 @@ int CGameMode::ProcessMousePick(int result, ActorPickInfo* pick) { pickTarget = 0; return result; } - if (lockedPick != 0 && *reinterpret_cast(&actor->render.unknown_0060) == 3) { + if (lockedPick != 0 && *reinterpret_cast(&actor->render.motionFinishThreshold) == 3) { lockedPick = 0; } this->ProcessActorPick(result, pick, actor); @@ -8474,9 +8474,9 @@ int CGameMode::ProcessGroundClick(int result) { } } - UIMerchantShopMakeWnd* shop = reinterpret_cast(g_windowMgr.unknown_02FC); - if (!shop && g_windowMgr.unknown_040C) { - shop = reinterpret_cast(g_windowMgr.unknown_040C); + UIMerchantShopMakeWnd* shop = reinterpret_cast(g_windowMgr.merchantShopMakeWnd); + if (!shop && g_windowMgr.buyingShopMakeWnd) { + shop = reinterpret_cast(g_windowMgr.buyingShopMakeWnd); } bool shopSuspended = false; @@ -8497,11 +8497,11 @@ int CGameMode::ProcessGroundClick(int result) { shop->SetSuspended(1); } } else if (shop->HasSelection() == true) { - drawCell(this->scene->ground, this->camera->frame.view.values, shop->unknown_018A, shop->unknown_018C, 0x66FF0000); + drawCell(this->scene->ground, this->camera->frame.view.values, shop->selectedRow, shop->selectedColumn, 0x66FF0000); } } - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); if (mode == 2 || mode == 3 || mode == 4) { return result; } @@ -8512,12 +8512,12 @@ int CGameMode::ProcessGroundClick(int result) { return result; } - const std::uint32_t homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); - const std::uint32_t mercenaryAid = *reinterpret_cast(&g_session.unknown_5620[8]); - if (g_session.unknown_5614 != 0) { + const std::uint32_t homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); + const std::uint32_t mercenaryAid = *reinterpret_cast(&g_session.companionTargetState[8]); + if (g_session.homunAlive != 0) { if (HIBYTE(GetAsyncKeyState(VK_MENU)) && g_mouse.buttons[1] == 1) { - if (g_session.unknown_560C != 0) { - g_session.unknown_560C = 0; + if (g_session.selectHomunEnemy != 0) { + g_session.selectHomunEnemy = 0; return result; } @@ -8533,10 +8533,10 @@ int CGameMode::ProcessGroundClick(int result) { return result; } - g_session.unknown_5600 = column; - g_session.unknown_5604 = row; + g_session.homunEnemyX = column; + g_session.homunEnemyY = row; g_groundMarkAid = 0; - g_session.unknown_5610 = 0; + g_session.attackHomunEnemy = 0; if (homun && homun->HasUnknown030CEntry()) { AiMessage message = {}; message.type = 1; @@ -8544,19 +8544,19 @@ int CGameMode::ProcessGroundClick(int result) { message.y = row; homun->SetUnknown0318(reinterpret_cast(&message), 0); } - g_session.unknown_5608 = 1; + g_session.moveHomunEnemy = 1; return result; } - if (g_session.unknown_5614 != 0 && g_mouse.buttons[1] == 1) { + if (g_session.homunAlive != 0 && g_mouse.buttons[1] == 1) { g_session.ClearHomunStatus(); } } - if (g_session.unknown_56B0 != 0) { + if (g_session.mercenaryAlive != 0) { if (HIBYTE(GetAsyncKeyState(VK_MENU)) && g_mouse.buttons[0] == 1) { - if (g_session.unknown_56A8 != 0) { - g_session.unknown_56A8 = 0; + if (g_session.selectMercenaryEnemy != 0) { + g_session.selectMercenaryEnemy = 0; return result; } @@ -8572,10 +8572,10 @@ int CGameMode::ProcessGroundClick(int result) { return result; } - g_session.unknown_569C = column; - g_session.unknown_56A0 = row; + g_session.mercenaryEnemyX = column; + g_session.mercenaryEnemyY = row; g_groundMarkAltAid = 0; - g_session.unknown_56AC = 0; + g_session.attackMercenaryEnemy = 0; if (mercenary && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; message.type = 1; @@ -8583,23 +8583,23 @@ int CGameMode::ProcessGroundClick(int result) { message.y = row; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } - g_session.unknown_56A4 = 1; + g_session.moveMercenaryEnemy = 1; return result; } - if (g_session.unknown_56B0 != 0 && g_mouse.buttons[0] == 1) { + if (g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1) { g_session.ResetMercenaryStats(); - if (reinterpret_cast(this->unknown_0408) == 1 && g_session.IsMercenarySkill(this->unknown_040C)) { + if (reinterpret_cast(this->skillUseType) == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { - const std::uint32_t state = mercenary->render.unknown_0070; + const std::uint32_t state = mercenary->render.state; if (state == 1 || state == 0 || state == 4) { AiMessage message; message.type = 8; message.x = column; message.y = row; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = 0; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); return 1; @@ -8609,19 +8609,19 @@ int CGameMode::ProcessGroundClick(int result) { } } - if (reinterpret_cast(this->unknown_0408) == 1 && g_mouse.buttons[0] == 1 && (result == 0 || result == 2)) { + if (reinterpret_cast(this->skillUseType) == 1 && g_mouse.buttons[0] == 1 && (result == 0 || result == 2)) { result = 1; - if (g_session.IsHomunculusSkill(this->unknown_040C) == 1 && g_session.unknown_5614 == 1) { + if (g_session.IsHomunculusSkill(this->skillId) == 1 && g_session.homunAlive == 1) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry() == true) { - const std::uint32_t state = homun->render.unknown_0070; + const std::uint32_t state = homun->render.state; if (state == 0 || state == 1 || state == 4) { AiMessage message; message.type = 8; message.x = column; message.y = row; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = 0; homun->SetUnknown0318(reinterpret_cast(&message), 0); return 1; @@ -8630,9 +8630,9 @@ int CGameMode::ProcessGroundClick(int result) { } if (this->scene->player) { - const int skill = this->unknown_040C; + const int skill = this->skillId; this->scene->player->SendMsg(nullptr, AM_PROCEEDGROUNDSKILL, 0, skill, skill >> 31, column, column >> 31, row, row >> 31, 0, 0, 0, 0, 0, 0); - const int level = this->unknown_0414; + const int level = this->skillUseLevel; this->scene->player->SendMsg(nullptr, AM_SET_SKILL_USE_LEVEL, 0, level, level >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -8640,7 +8640,7 @@ int CGameMode::ProcessGroundClick(int result) { if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) { return result; } - if (this->unknown_0244 != 0) { + if (this->noMove != 0) { return result; } if (result != 0 && result != 2) { @@ -8650,7 +8650,7 @@ int CGameMode::ProcessGroundClick(int result) { return result; } - if (*reinterpret_cast(g_session.unknown_546C) != 0) { + if (*reinterpret_cast(g_session.showEffects) != 0) { g_groundOverlayA = column; g_groundOverlayB = row; g_groundOverlaySkip = 0; @@ -8667,13 +8667,13 @@ int CGameMode::ProcessGroundClick(int result) { g_groundOverlaySkip = shopSuspended == true ? 1 : skip; } - std::uint32_t& clickTick = *reinterpret_cast(&this->unknown_00D8[0]); + std::uint32_t& clickTick = *reinterpret_cast(&this->leftBtnClickTick[0]); const bool elapsed = timeGetTime() > clickTick + 600; - if (this->scene->player->unknown_0508 == 0 && g_mouse.buttons[0] == 2) { + if (this->scene->player->proceedType == 0 && g_mouse.buttons[0] == 2) { if (!elapsed) { return result; } - if (this->unknown_00F8 == 0) { + if (this->isAutoMoveClickOn == 0) { return result; } } else { @@ -8687,7 +8687,7 @@ int CGameMode::ProcessGroundClick(int result) { g_windowMgr.UpdateNavigationList(); clickTick = timeGetTime(); - if (HIBYTE(GetAsyncKeyState(VK_SHIFT)) || g_windowMgr.window_027C || this->scene->player->render.unknown_0070 == 6) { + if (HIBYTE(GetAsyncKeyState(VK_SHIFT)) || g_windowMgr.window_027C || this->scene->player->render.state == 6) { this->scene->player->SendMsg(nullptr, AM_REQ_CHANGE_DIR, 0, column, column >> 31, row, row >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return result; } @@ -8696,7 +8696,7 @@ int CGameMode::ProcessGroundClick(int result) { CPlayer* player = this->scene->player; const TerrainHeightCell* cell = this->scene->terrain->CellAt(column, row); if (cell && cell->type != 1 && cell->type != 5 && - (column != *reinterpret_cast(&player->unknown_04F8) || row != player->unknown_04FC)) { + (column != *reinterpret_cast(&player->destCellX) || row != player->destCellZ)) { int startColumn; int startRow; int startSubColumn; @@ -8711,7 +8711,7 @@ int CGameMode::ProcessGroundClick(int result) { return result; } - if (g_windowMgr.unknown_0210) { + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->scene->player) { @@ -8765,7 +8765,7 @@ void CGameMode::Update() { g_playerNameDictionary->Update(); this->nameCard.ProcessRequests(); g_guildMgr->UpdateEmblemRequests( - *g_emblemDataMgr, g_session.m_aid, g_session.m_accountName, reinterpret_cast(&g_session.unknown_807C[0x08]), GetRagConnection(), + *g_emblemDataMgr, g_session.m_aid, g_session.m_accountName, reinterpret_cast(&g_session.webServiceLoginData[0x08]), GetRagConnection(), *g_asyncWorkMgr ); g_asyncWorkMgr->Update(1000); @@ -8791,11 +8791,11 @@ void CGameMode::Update() { g_followLostTick = 0; if (timeGetTime() - g_followUpdateTick > 1000) { g_followUpdateTick = timeGetTime(); - int x = actor->unknown_0158[5]; - int y = *reinterpret_cast(actor->unknown_0170); + int x = actor->movementState[5]; + int y = *reinterpret_cast(actor->destinationAndSpeed); int cellX = x; int cellY = y; - if (g_windowMgr.window_027C == nullptr && this->scene->player->render.unknown_0070 != 6) { + if (g_windowMgr.window_027C == nullptr && this->scene->player->render.state != 6) { bool reachable = true; if (!this->IsValidCell(x, y)) { reachable = this->GetClosestValidCell(&cellX, &cellY); @@ -8803,7 +8803,7 @@ void CGameMode::Update() { y = cellY; } if (reachable) { - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->scene->player->SendMsg(nullptr, AM_REQ_MOVE, 0, x, x >> 31, y, y >> 31, 0, 0, 0, 0, 0, 0, 0, 0); @@ -8830,13 +8830,13 @@ void CGameMode::Update() { g_nProtectGameGuardMgr->Stop(); g_ggHashMgr->VerifyPendingFiles(); - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { Base_RunCallback(); } if (g_updateTick > 0) { SendGameTick( - false, *reinterpret_cast(&this->unknown_026E[0x02]), *reinterpret_cast(&this->unknown_026E[0x06]), g_gameTickInterval, + false, *reinterpret_cast(&this->requestTimers[0x02]), *reinterpret_cast(&this->requestTimers[0x06]), g_gameTickInterval, GetRagConnection(), g_packetLengths, g_pingLogEnabled, g_pingLogFirstTick, g_pingLogTicks ); if (timeGetTime() > g_spriteAtlasClearTick) { @@ -8881,12 +8881,12 @@ void CGameMode::Update() { g_windowMgr.CenterSurface0478(); g_windowMgr.DrawWindows(); g_mapInfoMgr->DrawMapName(*GetRenderSystemHolder()->system); - if (this->scene->unknown_0048 != 0 || *reinterpret_cast(&g_session.unknown_5454[0x08]) != 0) { + if (this->scene->isPKZone != 0 || *reinterpret_cast(&g_session.interactionFlags[0x08]) != 0) { this->DrawMiniMapCoordinates(); this->DrawTimeAttackTimer(); } - if (*reinterpret_cast(&g_session.unknown_07A4[0x08]) != 0) { - this->DrawTimeAttackCountdown(*reinterpret_cast(&g_session.unknown_07A4[0x00]), *reinterpret_cast(g_session.unknown_079C)); + if (*reinterpret_cast(&g_session.timeAttackState[0x08]) != 0) { + this->DrawTimeAttackCountdown(*reinterpret_cast(&g_session.timeAttackState[0x00]), *reinterpret_cast(g_session.timeAttackMode)); } if (this->drag.source != 0 && (g_windowMgr.window_01EC == nullptr || g_windowMgr.window_01EC->geometry.visible == 0)) { @@ -8916,7 +8916,7 @@ void CGameMode::Update() { this->TakeScreenshot(); for (int index = 0; index < 6; ++index) { - unsigned char& pending = this->unknown_05EC[1 + index]; + unsigned char& pending = this->replayDragState[1 + index]; if (pending == 0) { continue; } @@ -8937,7 +8937,7 @@ void CGameMode::Update() { packet.statusId = 17; } packet.amount = 1; - if (this->unknown_0250 == 0) { + if (this->isPlayerDead == 0) { GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); --pending; } @@ -8955,24 +8955,24 @@ void CGameMode::ProcessInput() { this->ProcessRightButtonDrag(); this->ProcessMouseWheel(handled); - if (timeGetTime() > *reinterpret_cast(this->unknown_01E0) + 1000) { + if (timeGetTime() > *reinterpret_cast(this->windowInvalidateTick) + 1000) { g_windowMgr.InvalidateRegisteredWindows(); - *reinterpret_cast(this->unknown_01E0) = timeGetTime(); + *reinterpret_cast(this->windowInvalidateTick) = timeGetTime(); } if (handled == 2) { handled = 0; } - if (this->unknown_0408 != nullptr) { - if (*reinterpret_cast(&g_session.unknown_544C[0x00]) == 0) { + if (this->skillUseType != nullptr) { + if (*reinterpret_cast(&g_session.mapTransitionFlag[0x00]) == 0) { if (g_mouse.wheel > 0) { this->SendMsg(MM_USESKILL_LEVEL_PLUS, 1, 0, 0, 0); } else if (g_mouse.wheel < 0) { this->SendMsg(MM_USESKILL_LEVEL_MINUS, 1, 0, 0, 0); } } - *reinterpret_cast(&g_session.unknown_544C[0x00]) = 0; + *reinterpret_cast(&g_session.mapTransitionFlag[0x00]) = 0; } if (g_mouse.buttons[0] == 3) { @@ -8980,15 +8980,15 @@ void CGameMode::ProcessInput() { this->scene->player->SendMsg(nullptr, AM_ATTACKCLICKUP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } this->SendMsg(MM_DROP, g_mouse.x, g_mouse.y, 0, 0); - UIMenuWnd* menu = static_cast(g_windowMgr.unknown_0210); + UIMenuWnd* menu = static_cast(g_windowMgr.menuWnd); if (menu) { - if (menu->unknown_00DC) { - menu->unknown_00DC = 0; + if (menu->m_menuFlags) { + menu->m_menuFlags = 0; } else { g_windowMgr.CloseWindow(WID_MENUWND); } } - this->unknown_00F8 = 1; + this->isAutoMoveClickOn = 1; } g_pickModifierKey = HIBYTE(GetAsyncKeyState(VK_SHIFT)); @@ -9001,15 +9001,15 @@ void CGameMode::ProcessInput() { this->cursorOffsetX = 0.0f; this->cursorOffsetY = 0.0f; if (handled == 0) { - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); g_session.UpdateUnknown1708(mode == 2 || mode == 4); if (pick) { bool offset; - if (this->unknown_040C == 0xE7) { + if (this->skillId == 0xE7) { offset = g_session.IsSkillIdInRange6001(pick->job) && pick->kind == 4; } else { int eligible; - if (g_session.unknown_1708 && g_session.IsMonsterClass(pick->job)) { + if (g_session.monsterInfoEnabled && g_session.IsMonsterClass(pick->job)) { eligible = 1; } else if (g_serviceOptions.Get(0x2F)) { eligible = pick->kind == 1; @@ -9029,11 +9029,11 @@ void CGameMode::ProcessInput() { MarkScreenWorldOcclusion( this->scene->player->render.screenX, this->scene->player->render.screenY, g_renderer->viewport.uiScaleY, this->camera->frame.eye, this->camera->frame.inverse.values, this->scene->player->render.position.y, this->camera->camera.distance, this->scene->spatial, *this->scene->ground, - this->unknown_0458 != 0 + this->checkGroundAlpha != 0 ); } - if (this->unknown_0250 == 0 && (this->unknown_024C == 0 || this->scene->player->unknown_0264[3] != 0) && !blocker && g_windowMgr.window_0288 == nullptr && + if (this->isPlayerDead == 0 && (this->isOnQuest == 0 || this->scene->player->actorWindows[3] != 0) && !blocker && g_windowMgr.window_0288 == nullptr && !g_windowMgr.LookupWindow(WID_RUNESYSTEMWND)) { handled = this->ProcessGroundClick(this->ProcessMousePick(handled, pick)); this->UpdateHoverNameBalloon(); @@ -9047,10 +9047,10 @@ void CGameMode::ProcessInput() { if ((handled == 1 || g_mouse.buttons[0] == 1) && g_mouse.buttons[0] == 1) { g_unknown173AD3F = false; this->SendMsg(MM_CANCEL_USE_SKILL, 0, 0, 0, 0); - if (timeGetTime() > this->unknown_0248 + 5000) { - this->unknown_0244 = 0; + if (timeGetTime() > this->noMoveStartTick + 5000) { + this->noMove = 0; } - *reinterpret_cast(this->unknown_00D8) = timeGetTime(); + *reinterpret_cast(this->leftBtnClickTick) = timeGetTime(); } const bool statusIcons = g_serviceOptions.Get(0xC9) != 0; @@ -9059,7 +9059,7 @@ void CGameMode::ProcessInput() { } if (handled == 0) { - if (this->unknown_0408 != nullptr) { + if (this->skillUseType != nullptr) { this->SetCursorAction(10); } else if (g_mouse.buttons[1] != 2) { int column = -1; @@ -9074,8 +9074,8 @@ void CGameMode::ProcessInput() { } } - this->unknown_00DC = g_mouse.x; - this->unknown_00E0 = g_mouse.y; + this->oldMouseX = g_mouse.x; + this->oldMouseY = g_mouse.y; } // OFFSET: 0x00CE1010 @@ -9092,24 +9092,24 @@ void CGameMode::UpdateHoverNameBalloon() { this->ShowHoverActorName(actor); } } else { - if (!this->unknown_0028) { + if (!this->lockOnMouse) { this->SendMsg(MM_HIDEMOUSEPOINTER, 0, 0, 0, 0); return; } - actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&this->unknown_00EC[8]))); + actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(&this->lastActorIds[8]))); if (!actor) { return; } - if (!actor->unknown_0314 && actor->render.visible == 1 && actor->render.enabled == 1 && !StateFlag02(actor->GetStateFlags())) { - *reinterpret_cast(&this->unknown_02B8[0x10]) = 0; + if (!actor->objectType && actor->render.visible == 1 && actor->render.enabled == 1 && !StateFlag02(actor->GetStateFlags())) { + *reinterpret_cast(&this->balloonDisplayState[0x10]) = 0; this->ShowHoverActorName(actor); } } if (actor->GetEffectiveJob(-1) != 45 && - (actor->unknown_0314 || (actor->render.visible == 1 && actor->render.enabled == 1 && !StateFlag02(actor->GetStateFlags())))) { + (actor->objectType || (actor->render.visible == 1 && actor->render.enabled == 1 && !StateFlag02(actor->GetStateFlags())))) { this->SendMsg(MM_SHOWMOUSEPOINTER, static_cast(actor->render.position.x), static_cast(actor->render.position.z), 0, 0); return; } @@ -9182,15 +9182,15 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { break; case TT_REQ_WHISPER_PC_EX: case TT_REQ_WHISPER_PC_IN: { - this->unknown_0118 = parts[0]; - if (this->unknown_0118.size() > 0x18) { + this->refuseWhisperName = parts[0]; + if (this->refuseWhisperName.size() > 0x18) { break; } TalkWhisperSettingPacket packet; if (talkType == TT_REQ_WHISPER_PC_EX) { - g_whisperBlockMgr->Add(this->unknown_0118); + g_whisperBlockMgr->Add(this->refuseWhisperName); } else { - g_whisperBlockMgr->Remove(this->unknown_0118); + g_whisperBlockMgr->Remove(this->refuseWhisperName); } packet.id = ID_CZ_SETTING_WHISPER_PC; StringFormat(packet.name, 0x18, static_cast(-1), "%s", parts[0].c_str()); @@ -9242,7 +9242,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { char text[364]; int party = 0; int alternate = 0; - std::strcpy(text, g_windowMgr.unknown_04DC.c_str()); + std::strcpy(text, g_windowMgr.chatInputText.c_str()); if (text[0] == '%') { if (std::strlen(text) <= 1) { break; @@ -9278,11 +9278,11 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { this->SendMsg(MM_CHATMSG, 0, 0, 0, 0); break; } - if (g_session.unknown_5484 != 0) { + if (g_session.battleChat != 0) { this->SendMsg(MM_CHAT_BATTLEFIELD, 0, 0, 0, 0); break; } - const int sendMode = *reinterpret_cast(&g_session.unknown_5490[8]); + const int sendMode = *reinterpret_cast(&g_session.itemSendState[8]); if (sendMode == 2 && g_guildInfo.m_guildId != 0) { this->SendMsg(alternate ? MM_CHATMSG : MM_CHAT_GUILD, 0, 0, 0, 0); break; @@ -9320,7 +9320,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { g_session.HiFriends(nullptr); std::sprintf(text, "[ To Friends ] : (Hi) *^_^*"); } else { - char* message = const_cast(g_windowMgr.unknown_04DC.c_str()); + char* message = const_cast(g_windowMgr.chatInputText.c_str()); std::string copy(message); g_session.HiFriends(message); if (g_serviceType == 0) { @@ -9412,9 +9412,9 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { } break; case TT_BATTLECHAT_ON_OFF: - g_session.unknown_5484 = 1 - g_session.unknown_5484; + g_session.battleChat = 1 - g_session.battleChat; g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(g_session.unknown_5484 ? 0x555 : 0x556)), 0x64FFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(g_session.battleChat ? 0x555 : 0x556)), 0x64FFFF, 0, 0, 0); break; case TT_AUTO_MSG_ON_OFF: g_windowToggleFlag = !g_windowToggleFlag; @@ -9862,8 +9862,8 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { } case TT_COPY_NAME: if (IsAdminAccount(g_session.m_aid)) { - const unsigned char enabled = this->unknown_05CC[1]; - this->unknown_05CC[1] = enabled == 0; + const unsigned char enabled = this->bossAlarmAndCopyNameFlags[1]; + this->bossAlarmAndCopyNameFlags[1] = enabled == 0; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(enabled == 0 ? "Copy_Name_On!!" : "Copy_Name_Off!!"), 0x64FFFF, 0, 0, 0); } break; @@ -9876,7 +9876,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { break; } case TT_REQ_OPEN_EQUIPEDITEM_ONOFF: - this->SendMsg(MM_OPEN_EQUIPEDITEM_CHANGE, *reinterpret_cast(g_session.unknown_5974) == 0, 0, 0, 0); + this->SendMsg(MM_OPEN_EQUIPEDITEM_CHANGE, *reinterpret_cast(g_session.equipmentViewState) == 0, 0, 0, 0); break; case TT_SHOW_WEB_ADDRESSBAR: { CWebBrowser* browser = g_windowMgr.activeBrowser; @@ -10048,14 +10048,14 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { break; } case TT_PROBABILITY_TEST: { - this->unknown_0648 = this->unknown_0648 == 0; + this->recordItemPickups = this->recordItemPickups == 0; std::string server("Dev"); if (g_serviceMode == 0 && server.compare(0, 3, g_launchServerName, std::strlen(g_launchServerName)) != 0) { break; } SYSTEMTIME time; GetLocalTime(&time); - if (this->unknown_0648 == 1) { + if (this->recordItemPickups == 1) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast("확률 로그 시작"), 0x64FFFF, 0, 0, 0); std::string name(FormatString("ProbabilityLog(%02d-%02d-%02d).txt", time.wYear, time.wMonth, time.wDay)); FILE* file = std::fopen(name.c_str(), "a"); @@ -10069,7 +10069,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { std::string name(FormatString("ProbabilityLog(%02d-%02d-%02d).txt", time.wYear, time.wMonth, time.wDay)); FILE* file = std::fopen(name.c_str(), "a"); if (file) { - for (const auto& entry : this->unknown_064C) { + for (const auto& entry : this->itemPickupCounts) { int itemId = entry.first; int count = entry.second; ITEM_INFO item; @@ -10083,7 +10083,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { time.wSecond); std::fclose(file); } - this->unknown_064C.clear(); + this->itemPickupCounts.clear(); } break; } @@ -10106,7 +10106,7 @@ void CGameMode::ExecuteTalkType(int talkType, std::string* arguments) { void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* actor) { const unsigned char selfTargetOption = g_serviceOptions.Get(0x69); const unsigned char forceOption = g_serviceOptions.Get(0x6D); - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int skillMode; int shiftHeld; @@ -10116,8 +10116,8 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (mode == 2 || mode == 4) { skillMode = 1; shiftHeld = HIBYTE(GetAsyncKeyState(VK_SHIFT)); - optionalSelf = IsOptionalSelfTargetSkill(this->unknown_040C); - support = IsSupportSkill(this->unknown_040C); + optionalSelf = IsOptionalSelfTargetSkill(this->skillId); + support = IsSupportSkill(this->skillId); attack = shiftHeld; if (support) { attack = shiftHeld == 0; @@ -10132,8 +10132,8 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* bool resetCursor = false; if (pick) { - if (this->scene->unknown_0050 != 0) { - if (actor && g_session.unknown_0F24[0] != actor->render.unknown_00FB) { + if (this->scene->isBattleFieldMode != 0) { + if (actor && g_session.playerTeam[0] != actor->render.unknown_00FB) { attack = 1; } } else { @@ -10148,9 +10148,9 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* } CWorld* scene = this->scene; - if (scene->unknown_004C == 0) { - if (pick->unknown_0024 != 0 || scene->unknown_0048 != 0 || scene->unknown_0054 != 0 || - *reinterpret_cast(&g_session.unknown_5454[4]) != 0) { + if (scene->isSiegeMode == 0) { + if (pick->healthState != 0 || scene->isPKZone != 0 || scene->isEventPVPMode != 0 || + *reinterpret_cast(&g_session.interactionFlags[4]) != 0) { if (!g_session.IsPartyMember(actor->render.accountId, true)) { attack = 1; } @@ -10159,15 +10159,15 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* GuildInfo* guildInfo = &g_guildInfo; bool friendly = true; bool known = true; - switch (actor->unknown_0314) { + switch (actor->objectType) { case 8: case 9: case 10: case 13: case 14: { - CGameActor* summoner = static_cast(scene->GetGameActorByAID(actor->unknown_02EC)); + CGameActor* summoner = static_cast(scene->GetGameActorByAID(actor->emblemVersion)); if (!summoner) { - known = this->scene->player->render.accountId == static_cast(actor->unknown_02EC); + known = this->scene->player->render.accountId == static_cast(actor->emblemVersion); } else if (!g_session.IsLocalPlayerAid(summoner->GetGdid())) { friendly = guildInfo->HasRelatedGuild(summoner->GetGdid()); } @@ -10199,19 +10199,19 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* if (resetCursor) { this->SetCursorAction(0); - } else if (attack && actor->render.unknown_0070 != 3) { + } else if (attack && actor->render.state != 3) { this->SetCursorAction(skillMode ? 11 : 5); handled = 1; - } else if (skillMode && actor->render.unknown_0070 != 3) { + } else if (skillMode && actor->render.state != 3) { this->SetCursorAction(10); } else { this->SetCursorAction(0); } - const std::uint32_t homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); - const std::uint32_t mercenaryAid = *reinterpret_cast(&g_session.unknown_5620[8]); - const bool engaged = (attack || this->scene->unknown_004C != 0) && actor->render.unknown_0070 != 3 && !skillMode; - if (engaged && g_session.unknown_5614 != 0 && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { + const std::uint32_t homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); + const std::uint32_t mercenaryAid = *reinterpret_cast(&g_session.companionTargetState[8]); + const bool engaged = (attack || this->scene->isSiegeMode != 0) && actor->render.state != 3 && !skillMode; + if (engaged && g_session.homunAlive != 0 && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry()) { @@ -10220,7 +10220,7 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* message.target = actor->render.accountId; homun->SetUnknown0330(reinterpret_cast(&message), 0); } - } else if (g_session.unknown_5610 != 0 && g_groundMarkAid == actor->render.accountId) { + } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == actor->render.accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry()) { AiMessage message = {}; @@ -10228,32 +10228,32 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* message.target = g_groundMarkAid; homun->SetUnknown0318(reinterpret_cast(&message), 0); } - g_session.unknown_5610 = 0; + g_session.attackHomunEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAid = actor->render.accountId; - g_session.unknown_5600 = 0; - g_session.unknown_5604 = 0; - g_session.unknown_5608 = 0; - g_session.unknown_5610 = 1; + g_session.homunEnemyX = 0; + g_session.homunEnemyY = 0; + g_session.moveHomunEnemy = 0; + g_session.attackHomunEnemy = 1; } - g_session.unknown_560C = 1; + g_session.selectHomunEnemy = 1; } - if (g_session.unknown_5614 != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->unknown_040C)) { + if (g_session.homunAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun && homun->HasUnknown030CEntry()) { AiMessage message = {}; message.type = 7; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = actor->render.accountId; homun->SetUnknown0318(reinterpret_cast(&message), 0); } return; } - if (engaged && g_session.unknown_56B0 != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { + if (engaged && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { @@ -10262,7 +10262,7 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* message.target = actor->render.accountId; mercenary->SetUnknown0330(reinterpret_cast(&message), 1); } - } else if (g_session.unknown_56AC != 0 && g_groundMarkAltAid == actor->render.accountId) { + } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == actor->render.accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; @@ -10270,25 +10270,25 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* message.target = g_groundMarkAltAid; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } - g_session.unknown_56AC = 0; + g_session.attackMercenaryEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAltAid = actor->render.accountId; - g_session.unknown_569C = 0; - g_session.unknown_56A0 = 0; - g_session.unknown_56A4 = 0; - g_session.unknown_56AC = 1; + g_session.mercenaryEnemyX = 0; + g_session.mercenaryEnemyY = 0; + g_session.moveMercenaryEnemy = 0; + g_session.attackMercenaryEnemy = 1; } - g_session.unknown_56A8 = 1; + g_session.selectMercenaryEnemy = 1; } - if (attack != 0 && g_session.unknown_56B0 != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->unknown_040C)) { + if (attack != 0 && g_session.mercenaryAlive != 0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; message.type = 7; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = actor->render.accountId; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } @@ -10298,8 +10298,8 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* int& forced = this->forcedAttack; if (g_mouse.buttons[0] == 1 && attack != 0 && !HIBYTE(GetAsyncKeyState(VK_MENU))) { this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - *reinterpret_cast(&this->unknown_00EC[0x08]) = actor->render.accountId; - *reinterpret_cast(&this->unknown_00EC[0x0C]) = 0; + *reinterpret_cast(&this->lastActorIds[0x08]) = actor->render.accountId; + *reinterpret_cast(&this->lastActorIds[0x0C]) = 0; if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(actor->render.accountId, 0); if (!skillMode) { @@ -10317,11 +10317,11 @@ void CGameMode::ProcessActorPick(int& handled, ActorPickInfo* pick, CGameActor* } this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); g_hoverActorGid = actor->GetPkState(); - *reinterpret_cast(&this->unknown_00EC[0x0C]) = 0; + *reinterpret_cast(&this->lastActorIds[0x0C]) = 0; } - int& balloonAid = *reinterpret_cast(&this->unknown_00EC[0x00]); - if (this->unknown_00DC == g_mouse.x && this->unknown_00E0 == g_mouse.y) { + int& balloonAid = *reinterpret_cast(&this->lastActorIds[0x00]); + if (this->oldMouseX == g_mouse.x && this->oldMouseY == g_mouse.y) { this->ShowActorNameBalloon(balloonAid); return; } @@ -10340,15 +10340,15 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { return std::string(); }; - if (this->unknown_05D0) { - this->unknown_05D0->Show(0); + if (this->statusIconTooltip) { + this->statusIconTooltip->Show(0); } if (g_activeSkillEffects.begin() == g_activeSkillEffects.end()) { return; } - int& hoveredId = this->unknown_01F8; + int& hoveredId = this->hoveredStatusIconId; const int count = static_cast(g_activeSkillEffects.end() - g_activeSkillEffects.begin()); const int rows = (g_renderer->viewport.height - 169) / 35; const int right = g_renderer->viewport.width - 18; @@ -10380,8 +10380,8 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { const int id = g_statusIconIds[slot]; if (id == -1) { hoveredId = -1; - if (this->unknown_05D0) { - static_cast(this->unknown_05D0)->SetText(" ", 35); + if (this->statusIconTooltip) { + static_cast(this->statusIconTooltip)->SetText(" ", 35); } return; } @@ -10396,22 +10396,22 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { timeText = this->GetActiveSkillEffectTimeText(id, &activeId); } - if (hoveredId == id && this->unknown_05D0 && id != 0x175 && id != 0x2B7) { - if (firstLine(this->unknown_05D0).size() != 0) { - this->unknown_05D0->Show(1); + if (hoveredId == id && this->statusIconTooltip && id != 0x175 && id != 0x2B7) { + if (firstLine(this->statusIconTooltip).size() != 0) { + this->statusIconTooltip->Show(1); } } else { - if (!this->unknown_05D0) { - this->unknown_05D0 = new UITransBalloonText(); - this->unknown_05D0->SetSize(50, 50); - g_windowMgr.AddRendered(this->unknown_05D0); - static_cast(this->unknown_05D0)->SetFontHeight(11); - static_cast(this->unknown_05D0)->m_borderColor = 0xC0C0C0; + if (!this->statusIconTooltip) { + this->statusIconTooltip = new UITransBalloonText(); + this->statusIconTooltip->SetSize(50, 50); + g_windowMgr.AddRendered(this->statusIconTooltip); + static_cast(this->statusIconTooltip)->SetFontHeight(11); + static_cast(this->statusIconTooltip)->m_borderColor = 0xC0C0C0; } else { - static_cast(this->unknown_05D0)->SetText(" ", 35); + static_cast(this->statusIconTooltip)->SetText(" ", 35); } - UITransBalloonText* balloon = static_cast(this->unknown_05D0); + UITransBalloonText* balloon = static_cast(this->statusIconTooltip); std::string extra; int line = 1; std::uint32_t color = 0; @@ -10455,10 +10455,10 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { } if (id == 0x175) { - if (timeGetTime() - g_session.unknown_7ED4 > 10000) { - g_session.unknown_7ED0 = 0; - } else if (g_session.unknown_7ED0 != 0) { - extra = static_cast(FormatOwnedString(LookupMessage(MSI_MUST_ID_EXCEED_CHAR), g_session.unknown_7ED0)); + if (timeGetTime() - g_session.nameValidationTick > 10000) { + g_session.minimumNameLength = 0; + } else if (g_session.minimumNameLength != 0) { + extra = static_cast(FormatOwnedString(LookupMessage(MSI_MUST_ID_EXCEED_CHAR), g_session.minimumNameLength)); } if (extra.size() != 0) { @@ -10467,8 +10467,8 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { } } else { { - ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_16EC); - if (item.unknown_0000[1] != 0) { + ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.equippedArrowIndex); + if (item.identity[1] != 0) { extra = static_cast(FormatOwnedString("%s : %d", item.DisplayName(0).c_str(), item.quantity)); color = 0xFABEBE; } @@ -10479,28 +10479,28 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { } } - const std::string first = firstLine(this->unknown_05D0); + const std::string first = firstLine(this->statusIconTooltip); if (!(first.size() == 1 && first[0] == ' ')) { - this->unknown_05D0->Show(1); - const int windowHeight = this->unknown_05D0->geometry.height; - const int left = right - 30 + (slot / rows) * -45 - this->unknown_05D0->geometry.width; + this->statusIconTooltip->Show(1); + const int windowHeight = this->statusIconTooltip->geometry.height; + const int left = right - 30 + (slot / rows) * -45 - this->statusIconTooltip->geometry.width; const int top = (slot % rows) * 35; int windowY = g_renderer->viewport.height - windowHeight; if (windowHeight + 171 + top <= g_renderer->viewport.height) { windowY = top + 171; } - this->unknown_05D0->Move(left, windowY); + this->statusIconTooltip->Move(left, windowY); } hoveredId = id; } - if (hasLimit != 0 && timeText.size() != 0 && limitLine != -1 && this->unknown_05D0) { + if (hasLimit != 0 && timeText.size() != 0 && limitLine != -1 && this->statusIconTooltip) { const char* text = nullptr; if (g_session.m_hotkeyScript->Call("GetStateIconDescript", "dd>s", activeId, limitLine, &text)) { std::string description(text); description = static_cast(FormatOwnedString(description.c_str(), timeText.c_str())); - static_cast(this->unknown_05D0)->ChangeText(description.c_str(), limitLine - 1); + static_cast(this->statusIconTooltip)->ChangeText(description.c_str(), limitLine - 1); } } } @@ -10510,9 +10510,9 @@ void CGameMode::ProcessStatusIconTooltip(int x, int y) { int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { const unsigned char selfTargetOption = g_serviceOptions.Get(0x69); const unsigned char forceOption = g_serviceOptions.Get(0x6D); - const int& siegeMode = *reinterpret_cast(&g_session.unknown_5454[4]); - const std::uint32_t& homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); - const std::uint32_t& mercenaryAid = *reinterpret_cast(&g_session.unknown_5620[8]); + const int& siegeMode = *reinterpret_cast(&g_session.interactionFlags[4]); + const std::uint32_t& homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); + const std::uint32_t& mercenaryAid = *reinterpret_cast(&g_session.companionTargetState[8]); GuildInfo* guildInfo = &g_guildInfo; if (pick->accountId != g_session.m_aid) { @@ -10531,7 +10531,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } else { result = 1; if (IsPlayerJob(pick->job)) { - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int skillMode; int shift; int support; @@ -10539,7 +10539,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (mode == 2 || mode == 4) { skillMode = 1; shift = HIBYTE(GetAsyncKeyState(VK_SHIFT)); - support = IsSupportSkill(this->unknown_040C); + support = IsSupportSkill(this->skillId); attack = shift; if (support) { skillMode = 1; @@ -10554,7 +10554,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { CWorld* scene = this->scene; CGameActor* actor = static_cast(scene->GetGameActorByAID(pick->accountId)); - if (scene->unknown_0050 == 0) { + if (scene->isBattleFieldMode == 0) { if (g_session.GetMapProperty07()) { if (!g_session.IsPartyMember(pick->accountId, true)) { attack = 1; @@ -10565,14 +10565,14 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } } - if (this->scene->unknown_004C != 0) { + if (this->scene->isSiegeMode != 0) { if (actor != nullptr) { if (!g_session.IsLocalPlayerAid(actor->GetGdid()) && !guildInfo->HasRelatedGuild(actor->GetGdid())) { attack = 1; } else { attack = 0; if (skillMode) { - const bool optionalSelf = IsOptionalSelfTargetSkill(this->unknown_040C); + const bool optionalSelf = IsOptionalSelfTargetSkill(this->skillId); attack = support; if ((selfTargetOption != 0 || shift != 0) && optionalSelf == true) { attack = 1; @@ -10580,25 +10580,25 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } } } - } else if (pick->unknown_0024 != 0 || this->scene->unknown_0048 != 0 || this->scene->unknown_0054 != 0 || siegeMode != 0) { + } else if (pick->healthState != 0 || this->scene->isPKZone != 0 || this->scene->isEventPVPMode != 0 || siegeMode != 0) { if (!g_session.IsPartyMember(pick->accountId, true)) { attack = 1; } } - } else if (actor != nullptr && g_session.unknown_0F24[0] != actor->render.unknown_00FB) { + } else if (actor != nullptr && g_session.playerTeam[0] != actor->render.unknown_00FB) { attack = 1; } - const int state = actor != nullptr ? actor->render.unknown_0070 : 3; + const int state = actor != nullptr ? actor->render.state : 3; if (attack && state != 3) { this->SetCursorAction(skillMode ? 11 : 5); result = 1; - *reinterpret_cast(&this->unknown_00EC[0]) = pick->accountId; + *reinterpret_cast(&this->lastActorIds[0]) = pick->accountId; } else { this->SetCursorAction(skillMode && state != 3 ? 10 : 0); result = 0; - if (g_mouse.buttons[0] == 0 && this->unknown_0028 == 0 && *reinterpret_cast(&this->unknown_00EC[4]) == 0) { - *reinterpret_cast(&this->unknown_00EC[0]) = pick->accountId; + if (g_mouse.buttons[0] == 0 && this->lockOnMouse == 0 && *reinterpret_cast(&this->lastActorIds[4]) == 0) { + *reinterpret_cast(&this->lastActorIds[0]) = pick->accountId; } } } else if (g_session.IsNpcJob(pick->job) == true) { @@ -10607,14 +10607,14 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { result = 2; } } else if (g_session.IsMonsterClass(pick->job)) { - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int skillMode; int attack; if (mode == 2 || mode == 4) { skillMode = 1; const int shift = HIBYTE(GetAsyncKeyState(VK_SHIFT)); attack = shift == 0; - if (IsSupportSkill(this->unknown_040C)) { + if (IsSupportSkill(this->skillId)) { attack = shift; skillMode = 1; } @@ -10630,15 +10630,15 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (g_session.GetMapProperty08() && actor != nullptr && g_session.IsLocalPlayerAid(actor->GetGdid())) { attack = 0; } - if (this->scene->unknown_004C != 0 && actor != nullptr && g_session.IsLocalPlayerAid(actor->GetGdid())) { + if (this->scene->isSiegeMode != 0 && actor != nullptr && g_session.IsLocalPlayerAid(actor->GetGdid())) { attack = 0; } - if (this->unknown_00F8 != 0) { + if (this->isAutoMoveClickOn != 0) { if (attack) { if (skillMode) { this->SetCursorAction(11); - } else if (actor != nullptr && actor->unknown_0314 == 7) { + } else if (actor != nullptr && actor->objectType == 7) { this->SetCursorAction(0); } else { this->SetCursorAction(5); @@ -10648,8 +10648,8 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } } - if (g_mouse.buttons[0] == 0 && this->unknown_0028 == 0) { - *reinterpret_cast(&this->unknown_00EC[4]) = pick->accountId; + if (g_mouse.buttons[0] == 0 && this->lockOnMouse == 0) { + *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; } if (g_mouse.buttons[0] == 2 || g_mouse.buttons[1] == 2) { result = 2; @@ -10700,10 +10700,10 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { case UNT_SOLIDTRAP: case UNT_SWIFTTRAP: case UNT_FLAMETRAP: - action = reinterpret_cast(this->unknown_0408) == 5 ? 10 : 5; + action = reinterpret_cast(this->skillUseType) == 5 ? 10 : 5; break; default: - action = reinterpret_cast(this->unknown_0408) == 5 ? 10 : 0; + action = reinterpret_cast(this->skillUseType) == 5 ? 10 : 0; break; } } else { @@ -10718,10 +10718,10 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { case UNT_SOLIDTRAP: case UNT_SWIFTTRAP: case UNT_FLAMETRAP: - action = reinterpret_cast(this->unknown_0408) == 5 ? 10 : 5; + action = reinterpret_cast(this->skillUseType) == 5 ? 10 : 5; break; default: - action = reinterpret_cast(this->unknown_0408) == 5 ? 10 : 0; + action = reinterpret_cast(this->skillUseType) == 5 ? 10 : 0; break; } } @@ -10746,25 +10746,25 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { result = 0; this->SetCursorAction(0); CGameActor* actor = static_cast(this->scene->GetGameActorByAID(pick->accountId)); - if (actor != nullptr && actor->render.unknown_0070 != 3) { - if (g_session.m_aid == static_cast(actor->unknown_02EC)) { - if (actor->unknown_0314 == 8 && this->unknown_040C == 0xE7) { + if (actor != nullptr && actor->render.state != 3) { + if (g_session.m_aid == static_cast(actor->emblemVersion)) { + if (actor->objectType == 8 && this->skillId == 0xE7) { result = 1; this->SetCursorAction(11); - *reinterpret_cast(&this->unknown_00EC[4]) = pick->accountId; + *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; } } else { CWorld* scene = this->scene; - if (scene->unknown_0048 == 1 || siegeMode == 1 || scene->unknown_004C == 1) { - if (scene->unknown_004C == 1) { - CGameActor* owner = static_cast(scene->GetGameActorByAID(actor->unknown_02EC)); + if (scene->isPKZone == 1 || siegeMode == 1 || scene->isSiegeMode == 1) { + if (scene->isSiegeMode == 1) { + CGameActor* owner = static_cast(scene->GetGameActorByAID(actor->emblemVersion)); if (owner == nullptr || g_session.IsLocalPlayerAid(owner->GetGdid()) == 1 || guildInfo->HasRelatedGuild(owner->GetGdid()) == true) { break; } } result = 1; this->SetCursorAction(5); - *reinterpret_cast(&this->unknown_00EC[4]) = pick->accountId; + *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; } } } @@ -10784,7 +10784,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } if (g_session.IsAllyActor(pick->accountId, pick->job) == 1) { - const int state = this->scene->player->render.unknown_0070; + const int state = this->scene->player->render.state; if (state != 0 && state != 6) { return result; } @@ -10813,11 +10813,11 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { const int job = pick->job; if (g_session.IsMonsterClass(job)) { - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int attack; if (mode == 2 || mode == 4) { const int shift = HIBYTE(GetAsyncKeyState(VK_SHIFT)); - const bool support = IsSupportSkill(this->unknown_040C); + const bool support = IsSupportSkill(this->skillId); attack = shift == 0; if (support) { attack = shift; @@ -10829,7 +10829,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { attack = 1; } - if (g_session.unknown_5614 && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { + if (g_session.homunAlive && g_mouse.buttons[1] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun != nullptr && homun->HasUnknown030CEntry()) { @@ -10838,7 +10838,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.target = pick->accountId; homun->SetUnknown0330(reinterpret_cast(&message), 0); } - } else if (g_session.unknown_5610 != 0 && g_groundMarkAid == pick->accountId) { + } else if (g_session.attackHomunEnemy != 0 && g_groundMarkAid == pick->accountId) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun != nullptr && homun->HasUnknown030CEntry()) { AiMessage message = {}; @@ -10846,34 +10846,34 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.target = g_groundMarkAid; homun->SetUnknown0318(reinterpret_cast(&message), 0); } - g_session.unknown_5610 = 0; + g_session.attackHomunEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAid = pick->accountId; - g_session.unknown_5600 = 0; - g_session.unknown_5604 = 0; - g_session.unknown_5608 = 0; - g_session.unknown_5610 = 1; + g_session.homunEnemyX = 0; + g_session.homunEnemyY = 0; + g_session.moveHomunEnemy = 0; + g_session.attackHomunEnemy = 1; } - g_session.unknown_560C = 1; + g_session.selectHomunEnemy = 1; } - if (g_session.unknown_5614 && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->unknown_040C)) { + if (g_session.homunAlive && g_mouse.buttons[0] == 1 && g_session.IsHomunculusSkill(this->skillId)) { CGameActor* homun = static_cast(this->scene->GetGameActorByAID(homunAid)); if (homun != nullptr && homun->HasUnknown030CEntry()) { AiMessage message; message.type = 7; message.x = 0; message.y = 0; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = pick->accountId; homun->SetUnknown0318(reinterpret_cast(&message), 0); } return result; } - if (g_session.unknown_56B0 && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { + if (g_session.mercenaryAlive && g_mouse.buttons[0] == 1 && HIBYTE(GetAsyncKeyState(VK_MENU))) { if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { @@ -10882,7 +10882,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.target = pick->accountId; mercenary->SetUnknown0330(reinterpret_cast(&message), 1); } - } else if (g_session.unknown_56AC != 0 && g_groundMarkAltAid == pick->accountId) { + } else if (g_session.attackMercenaryEnemy != 0 && g_groundMarkAltAid == pick->accountId) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { AiMessage message = {}; @@ -10890,27 +10890,27 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.target = g_groundMarkAltAid; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } - g_session.unknown_56AC = 0; + g_session.attackMercenaryEnemy = 0; } else { this->SetCursorAction(11); g_groundMarkAltAid = pick->accountId; - g_session.unknown_569C = 0; - g_session.unknown_56A0 = 0; - g_session.unknown_56A4 = 0; - g_session.unknown_56AC = 1; + g_session.mercenaryEnemyX = 0; + g_session.mercenaryEnemyY = 0; + g_session.moveMercenaryEnemy = 0; + g_session.attackMercenaryEnemy = 1; } - g_session.unknown_56A8 = 1; + g_session.selectMercenaryEnemy = 1; } - if (attack && g_session.unknown_56B0 && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->unknown_040C)) { + if (attack && g_session.mercenaryAlive && g_mouse.buttons[0] == 1 && g_session.IsMercenarySkill(this->skillId)) { CGameActor* mercenary = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (mercenary != nullptr && mercenary->HasUnknown0310Entry()) { AiMessage message; message.type = 7; message.x = 0; message.y = 0; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = pick->accountId; mercenary->SetUnknown0318(reinterpret_cast(&message), 1); } @@ -10919,9 +10919,9 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (g_mouse.buttons[0] == 1 && attack && !HIBYTE(GetAsyncKeyState(VK_MENU))) { this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - *reinterpret_cast(&this->unknown_00EC[8]) = pick->accountId; - *reinterpret_cast(&this->unknown_00EC[4]) = pick->accountId; - this->unknown_00F8 = 0; + *reinterpret_cast(&this->lastActorIds[8]) = pick->accountId; + *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; + this->isAutoMoveClickOn = 0; if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(pick->accountId, 0); this->forcedAttack = 1; @@ -10933,7 +10933,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } if (this->forcedAttack == 0 && g_mouse.buttons[0] == 3) { - *reinterpret_cast(&this->unknown_00EC[4]) = 0; + *reinterpret_cast(&this->lastActorIds[4]) = 0; } return result; } @@ -10942,18 +10942,18 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { break; } - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int attack; if (mode == 2 || mode == 4) { const int shift = HIBYTE(GetAsyncKeyState(VK_SHIFT)); attack = shift; - if (IsSupportSkill(this->unknown_040C)) { + if (IsSupportSkill(this->skillId)) { attack = shift == 0; } } else { attack = HIBYTE(GetAsyncKeyState(VK_SHIFT)); } - if (pick->unknown_0024 != 0 || this->scene->unknown_0048 != 0 || siegeMode != 0) { + if (pick->healthState != 0 || this->scene->isPKZone != 0 || siegeMode != 0) { attack = 1; } if (selfTargetOption != 0) { @@ -10963,20 +10963,20 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { if (attack && g_mouse.buttons[0] == 1) { int index = 0; CGameActor* companion; - if (g_session.IsHomunculusSkill(this->unknown_040C) && g_session.unknown_5614) { + if (g_session.IsHomunculusSkill(this->skillId) && g_session.homunAlive) { companion = static_cast(this->scene->GetGameActorByAID(homunAid)); if (companion != nullptr && companion->HasUnknown030CEntry()) { AiMessage message; message.type = 7; message.x = 0; message.y = 0; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = pick->accountId; companion->SetUnknown0318(reinterpret_cast(&message), index); return result; } - } else if (g_session.IsMercenarySkill(this->unknown_040C) && g_session.unknown_56B0) { + } else if (g_session.IsMercenarySkill(this->skillId) && g_session.mercenaryAlive) { companion = static_cast(this->scene->GetGameActorByAID(mercenaryAid)); if (companion != nullptr && companion->HasUnknown0310Entry()) { index = 1; @@ -10984,8 +10984,8 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { message.type = 7; message.x = 0; message.y = 0; - message.level = this->unknown_0414; - message.skill = this->unknown_040C; + message.level = this->skillUseLevel; + message.skill = this->skillId; message.target = pick->accountId; companion->SetUnknown0318(reinterpret_cast(&message), index); return result; @@ -10999,9 +10999,9 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { } this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - *reinterpret_cast(&this->unknown_00EC[8]) = pick->accountId; - *reinterpret_cast(&this->unknown_00EC[4]) = pick->accountId; - this->unknown_00F8 = 0; + *reinterpret_cast(&this->lastActorIds[8]) = pick->accountId; + *reinterpret_cast(&this->lastActorIds[4]) = pick->accountId; + this->isAutoMoveClickOn = 0; if (g_session.GetSceneUnknown004C() == 0 && (HIBYTE(GetAsyncKeyState(VK_CONTROL)) || forceOption != 0)) { this->RequestPlayerAction(pick->accountId, 0); this->forcedAttack = 1; @@ -11023,14 +11023,14 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { case UNT_SOLIDTRAP: case UNT_SWIFTTRAP: case UNT_FLAMETRAP: { - const int skill = this->unknown_040C; + const int skill = this->skillId; if (skill == 0xD7 || skill == 0xD8 || skill == 0xD9 || skill == 0xDA) { return result; } this->SendMsg(MM_SETLOCKONMOUSE, 1, 0, 0, 0); - this->unknown_00F8 = 0; - const int skillUse = reinterpret_cast(&this->unknown_0408); + this->isAutoMoveClickOn = 0; + const int skillUse = reinterpret_cast(&this->skillUseType); if (!HIBYTE(GetAsyncKeyState(VK_CONTROL)) && forceOption == 0) { this->scene->player->SendMsg(nullptr, AM_PROCEEDTOUCHSKILL, 0, pick->accountId, 0, skillUse, skillUse >> 31, 1, 0, 0, 0, 0, 0, 0, 0); this->forcedAttack = 0; @@ -11041,8 +11041,8 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { return result; } default: - if (reinterpret_cast(this->unknown_0408) == 5) { - const long long skillUse = static_cast(reinterpret_cast(this)) + offsetof(CGameMode, unknown_0408); + if (reinterpret_cast(this->skillUseType) == 5) { + const long long skillUse = static_cast(reinterpret_cast(this)) + offsetof(CGameMode, skillUseType); this->scene->player->SendMsg(nullptr, AM_PROCEEDTOUCHSKILL, 0, pick->accountId, 0, static_cast(skillUse), static_cast(skillUse >> 32), 0, 0, 0, 0, 0, 0, 0, 0); } return result; @@ -11051,7 +11051,7 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { this->SetCursorAction(0); return 0; case 1: - if (g_mouse.buttons[0] == 1 && reinterpret_cast(this->unknown_0408) == 0) { + if (g_mouse.buttons[0] == 1 && reinterpret_cast(this->skillUseType) == 0) { this->scene->player->SendMsg(nullptr, AM_PROCEEDPICKUPITEM, 0, pick->accountId, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; @@ -11059,8 +11059,8 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { this->SetCursorAction(0); if (g_session.IsMercenaryJob(pick->job)) { CWorld* scene = this->scene; - if (this->unknown_040C == 0xE7 || ((scene->unknown_0048 != 0 || scene->unknown_004C != 0 || siegeMode != 0) && !g_session.IsHomunAid(pick->accountId))) { - if ((this->scene->unknown_0048 != 0 || this->scene->unknown_004C != 0 || siegeMode != 0) && !g_session.IsHomunAid(pick->accountId)) { + if (this->skillId == 0xE7 || ((scene->isPKZone != 0 || scene->isSiegeMode != 0 || siegeMode != 0) && !g_session.IsHomunAid(pick->accountId))) { + if ((this->scene->isPKZone != 0 || this->scene->isSiegeMode != 0 || siegeMode != 0) && !g_session.IsHomunAid(pick->accountId)) { this->SetCursorAction(5); } this->RequestPlayerAction(pick->accountId, 1); @@ -11070,18 +11070,18 @@ int CGameMode::HandleActorPick(ActorPickInfo* pick, int result) { break; } - const std::intptr_t mode = reinterpret_cast(this->unknown_0408); + const std::intptr_t mode = reinterpret_cast(this->skillUseType); int attack; if (mode == 2 || mode == 4) { const int shift = HIBYTE(GetAsyncKeyState(VK_SHIFT)); attack = shift; - if (IsSupportSkill(this->unknown_040C)) { + if (IsSupportSkill(this->skillId)) { attack = shift == 0; } } else { attack = HIBYTE(GetAsyncKeyState(VK_SHIFT)); } - if (pick->unknown_0024 != 0 || this->scene->unknown_0048 != 0 || this->scene->unknown_004C != 0 || siegeMode != 0) { + if (pick->healthState != 0 || this->scene->isPKZone != 0 || this->scene->isSiegeMode != 0 || siegeMode != 0) { attack = 1; } diff --git a/Source/Client/Mode/GameModeActorEffects.cpp b/Source/Client/Mode/GameModeActorEffects.cpp index 7256b129c..b3b059a6a 100644 --- a/Source/Client/Mode/GameModeActorEffects.cpp +++ b/Source/Client/Mode/GameModeActorEffects.cpp @@ -10,7 +10,7 @@ void CGameMode::RefreshActorJobEffects(bool playerOnly) { if (!playerOnly) { for (std::list::iterator it = this->scene->actors.begin(); it != this->scene->actors.end(); ++it) { CGameActor* actor = static_cast(*it); - if (actor->unknown_02B4 != 0) { + if (actor->hasLevelAura != 0) { actor->ResetJobEffects(); actor->UpdateMaxLevelAura(); } diff --git a/Source/Client/Mode/GameModeEquipWindow.cpp b/Source/Client/Mode/GameModeEquipWindow.cpp index b3a3126ae..1d31dbe1b 100644 --- a/Source/Client/Mode/GameModeEquipWindow.cpp +++ b/Source/Client/Mode/GameModeEquipWindow.cpp @@ -23,25 +23,25 @@ void CGameMode::ReceiveEquipWindowMicroscope(const unsigned char* packet) { const unsigned char* entry = packet + 45; for (int index = 0; index < count; ++index, entry += 37) { ITEM_INFO item; - item.unknown_0000[0] = entry[6]; - item.unknown_0000[2] = *reinterpret_cast(entry + 7); - item.unknown_0000[1] = *reinterpret_cast(entry); - item.unknown_0000[3] = *reinterpret_cast(entry + 9); + item.identity[0] = entry[6]; + item.identity[2] = *reinterpret_cast(entry + 7); + item.identity[1] = *reinterpret_cast(entry); + item.identity[3] = *reinterpret_cast(entry + 9); item.quantity = 1; - std::memcpy(item.unknown_001C, entry + 12, sizeof(item.unknown_001C)); + std::memcpy(item.cards, entry + 12, sizeof(item.cards)); item.SetItemId(*reinterpret_cast(entry + 2)); const unsigned char flags = entry[36]; item.identified = flags & 1; - item.unknown_005D = (flags >> 1) & 1; - item.unknown_0060 = entry[11]; - item.unknown_0068 = *reinterpret_cast(entry + 28); - item.unknown_0064 = *reinterpret_cast(entry + 32); - item.unknown_0070 = *reinterpret_cast(entry + 34); - item.unknown_0074[0] = (flags >> 2) & 1; + item.damaged = (flags >> 1) & 1; + item.refiningLevel = entry[11]; + item.expireTime = *reinterpret_cast(entry + 28); + item.bindOnEquip = *reinterpret_cast(entry + 32); + item.sprite = *reinterpret_cast(entry + 34); + item.flags[0] = (flags >> 2) & 1; - if (item.unknown_0000[3] != 0) { - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (item.identity[3] != 0) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem3500(item); } else { g_session.Equip(item); diff --git a/Source/Client/Mode/GameModeHandlers.cpp b/Source/Client/Mode/GameModeHandlers.cpp index 2569740a9..3241ccab4 100644 --- a/Source/Client/Mode/GameModeHandlers.cpp +++ b/Source/Client/Mode/GameModeHandlers.cpp @@ -129,33 +129,33 @@ struct RuneRewardStepsPacket : RuneListPacket { }; struct PackageItemTestEntry { /* 0000 */ int itemId; - /* 0004 */ std::uint16_t unknown_0004; + /* 0004 */ std::uint16_t rate; /* 0006 */ int count; }; struct Item1718BasicRecord { /* 0000 */ std::int32_t itemId; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint32_t unknown_0008; + /* 0004 */ std::uint32_t price; + /* 0008 */ std::uint32_t realPrice; /* 000C */ unsigned char type; - /* 000D */ std::uint16_t unknown_000D; - /* 000F */ std::uint32_t unknown_000F; + /* 000D */ std::uint16_t sprite; + /* 000F */ std::uint32_t location; }; struct Item1718IndexRecord { /* 0000 */ std::int16_t index; - /* 0002 */ std::uint32_t unknown_0002; - /* 0006 */ std::uint32_t unknown_0006; + /* 0002 */ std::uint32_t price; + /* 0006 */ std::uint32_t realPrice; }; struct HomunculusInfoPacket { /* 0000 */ std::int16_t id; /* 0002 */ char name[24]; - /* 001A */ unsigned char unknown_001A; - /* 001B */ std::int16_t unknown_001B; - /* 001D */ std::int16_t unknown_001D; - /* 001F */ std::int16_t unknown_001F; - /* 0021 */ int unknown_0021; + /* 001A */ unsigned char flags; + /* 001B */ std::int16_t level; + /* 001D */ std::int16_t hunger; + /* 001F */ std::int16_t intimacy; + /* 0021 */ int accessory; /* 0025 */ std::int16_t stats[8]; /* 0035 */ std::int16_t hp; /* 0037 */ std::int16_t maxHp; @@ -163,17 +163,17 @@ struct HomunculusInfoPacket { /* 003B */ std::int16_t maxSp; /* 003D */ int exp; /* 0041 */ int maxExp; - /* 0045 */ std::int16_t unknown_0045; - /* 0047 */ std::int16_t unknown_0047; + /* 0045 */ std::int16_t skillPoints; + /* 0047 */ std::int16_t attackRange; }; struct HomunculusInfoPacket2 { /* 0000 */ std::int16_t id; /* 0002 */ char name[24]; - /* 001A */ unsigned char unknown_001A; - /* 001B */ std::int16_t unknown_001B; - /* 001D */ std::int16_t unknown_001D; - /* 001F */ std::int16_t unknown_001F; + /* 001A */ unsigned char flags; + /* 001B */ std::int16_t level; + /* 001D */ std::int16_t hunger; + /* 001F */ std::int16_t intimacy; /* 0021 */ std::int16_t stats[8]; /* 0031 */ int hp; /* 0035 */ int maxHp; @@ -181,17 +181,17 @@ struct HomunculusInfoPacket2 { /* 003B */ std::int16_t maxSp; /* 003D */ int exp; /* 0041 */ int maxExp; - /* 0045 */ std::int16_t unknown_0045; - /* 0047 */ std::int16_t unknown_0047; + /* 0045 */ std::int16_t skillPoints; + /* 0047 */ std::int16_t attackRange; }; struct HomunculusInfoPacket3 { /* 0000 */ std::int16_t id; /* 0002 */ char name[24]; - /* 001A */ unsigned char unknown_001A; - /* 001B */ std::int16_t unknown_001B; - /* 001D */ std::int16_t unknown_001D; - /* 001F */ std::int16_t unknown_001F; + /* 001A */ unsigned char flags; + /* 001B */ std::int16_t level; + /* 001D */ std::int16_t hunger; + /* 001F */ std::int16_t intimacy; /* 0021 */ std::int16_t stats[8]; /* 0031 */ int hp; /* 0035 */ int maxHp; @@ -199,8 +199,8 @@ struct HomunculusInfoPacket3 { /* 003D */ int maxSp; /* 0041 */ std::int64_t exp; /* 0049 */ std::int64_t maxExp; - /* 0051 */ std::int16_t unknown_0051; - /* 0053 */ std::int16_t unknown_0053; + /* 0051 */ std::int16_t skillPoints; + /* 0053 */ std::int16_t attackRange; }; struct ItemRewardOption { @@ -398,7 +398,7 @@ void CGameMode::ReceiveGroundSkillExtended(const unsigned char* record) { const int y = packet.y; skill->SendMsg(nullptr, AM_SET_SKILL, 0, address, address >> 31, x, x >> 31, y, y >> 31, 0, 0, 0, 0, 0, 0); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); return; } case UNT_SHINKIROU: @@ -434,12 +434,12 @@ void CGameMode::ReceiveGroundSkillExtended(const unsigned char* record) { } skill = new (std::nothrow) CSkill(packet.aid); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); if (!skill) { return; } } - skill->unknown_0410 = packet.owner; + skill->sourceActorId = packet.owner; const int address = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -478,12 +478,12 @@ void CGameMode::SpawnGroundSkill(std::uint32_t aid, std::uint32_t owner, int val } skill = new (std::nothrow) CSkill(aid); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); if (!skill) { return; } } - skill->unknown_0410 = owner; + skill->sourceActorId = owner; const int address = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -619,8 +619,8 @@ void CGameMode::ReceivePendingResult(const unsigned char* packet) { case 8: g_pendingAid = *reinterpret_cast(packet + 2); g_pendingGid = *reinterpret_cast(packet + 6); - if (g_windowMgr.unknown_0250) { - g_windowMgr.unknown_0250->Invalidate(); + if (g_windowMgr.itemShopWnd) { + g_windowMgr.itemShopWnd->Invalidate(); } if (*reinterpret_cast(packet + 10) == 8) { text = LookupMessage(MSI_CASH_FAILED_BUY_SOME); @@ -675,11 +675,11 @@ void CGameMode::ReceiveItem1718BasicList(const unsigned char* packet) { RawItemBasic item = {}; _itoa(record.itemId, item.itemId, 10); - item.unknown_0004 = record.unknown_0004; - item.unknown_0008 = record.unknown_0008; - item.unknown_000C = record.type; - item.unknown_0034 = record.unknown_000F; - item.unknown_0038 = record.unknown_000D; + item.price = record.price; + item.realPrice = record.realPrice; + item.type = record.type; + item.location = record.location; + item.sprite = record.sprite; item.id = -1; item.identified = 1; g_session.AddItem1718(item, 0); @@ -756,13 +756,13 @@ void CGameMode::ReceiveItem1718IndexList(const unsigned char* packet) { for (int i = 0; i < count; ++i) { const Item1718IndexRecord record = records[i]; ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, record.index); - if (owned.unknown_0000[1] != 0 && (owned.unknown_0074[0] == 0 || g_session.unknown_61A8[10] == 0)) { + if (owned.identity[1] != 0 && (owned.flags[0] == 0 || g_session.hotkeyAndSortOptions[10] == 0)) { RawItemBasic item = {}; item.id = record.index; strcpy_s(item.itemId, sizeof(item.itemId), owned.itemId.c_str()); - item.unknown_0004 = record.unknown_0002; - item.unknown_0008 = record.unknown_0006; - item.unknown_000C = owned.unknown_0000[0]; + item.price = record.price; + item.realPrice = record.realPrice; + item.type = owned.identity[0]; item.identified = owned.identified; g_session.AddItem1718(item, 1); } @@ -889,54 +889,54 @@ void CGameMode::ReceivePlayerMessage82(const unsigned char* packet) { } player->SendMsg(nullptr, AM_MAKE_SKILL_RECHARGEGAGE, 0, *reinterpret_cast(packet + 6) * 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - g_session.unknown_555C[0x0A] = true; + g_session.playerStatusFlags[0x0A] = true; } // OFFSET: 0x00D3D390 // FUNCTION: fn_21802 void CGameMode::ReceiveHomunculusInfo(const unsigned char* data) { const HomunculusInfoPacket* packet = reinterpret_cast(data); - char* name = reinterpret_cast(&g_session.unknown_5570[0x0C]); - int* stats = reinterpret_cast(&g_session.unknown_5570[0x2C]); + char* name = reinterpret_cast(&g_session.spAndHomunculusStats[0x0C]); + int* stats = reinterpret_cast(&g_session.spAndHomunculusStats[0x2C]); if (g_serviceType == 10 || g_serviceType == 12 || g_serviceType == 15) { std::sprintf(name, "%s", packet->name); } else { std::sprintf(name, packet->name); } - g_session.unknown_55D4 = packet->unknown_001F; - g_session.unknown_55D8 = packet->unknown_0021; - g_session.unknown_55F8 = packet->unknown_001A; + g_session.homunFriendly = packet->intimacy; + g_session.homunAccessory = packet->accessory; + g_session.homunNameModified = packet->flags; for (int i = 0; i < 8; ++i) { stats[i] = packet->stats[i]; } - *reinterpret_cast(g_session.unknown_55C0) = packet->unknown_001B; + *reinterpret_cast(g_session.homunLevel) = packet->level; g_session.m_homunHp = packet->hp; g_session.RefreshHomunculusInfo(); g_session.m_homunSp = packet->sp; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_55C8) = packet->maxHp; + *reinterpret_cast(g_session.homunMaxHp) = packet->maxHp; g_session.RefreshHomunculusInfo(); - g_session.unknown_55D0 = packet->maxSp; + g_session.homunMaxSp = packet->maxSp; g_session.RefreshHomunculusInfo(); g_session.m_homunExp = packet->exp; g_session.RefreshHomunculusInfo(); g_session.m_homunMaxExp = packet->maxExp; g_session.RefreshHomunculusInfo(); - g_session.unknown_55F0 = packet->unknown_001D; + g_session.homunHunger = packet->hunger; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_1664) = packet->unknown_0045; + *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_5620[4]) = packet->unknown_0047; + *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; if (g_windowMgr.window_03C4) { g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - int& notified = *reinterpret_cast(&g_session.unknown_5620[0]); - const std::int16_t state = packet->unknown_001D; + int& notified = *reinterpret_cast(&g_session.companionTargetState[0]); + const std::int16_t state = packet->hunger; if ((state == 1 || state == 5 || state == 10) && notified != state) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_HOMUN_HUNGRY)), 0xFF, 0, 0, 0); - notified = packet->unknown_001D; + notified = packet->hunger; } } @@ -948,52 +948,52 @@ void CGameMode::ReceiveHomunculusInfo3(const unsigned char* data) { } const HomunculusInfoPacket3* packet = reinterpret_cast(data); - int* stats = reinterpret_cast(&g_session.unknown_5570[0x2C]); - StringFormat(reinterpret_cast(&g_session.unknown_5570[0x0C]), 32, static_cast(-1), "%s", packet->name); - g_session.unknown_55F8 = packet->unknown_001A; - *reinterpret_cast(g_session.unknown_55C0) = packet->unknown_001B; - g_session.unknown_55F0 = packet->unknown_001D; + int* stats = reinterpret_cast(&g_session.spAndHomunculusStats[0x2C]); + StringFormat(reinterpret_cast(&g_session.spAndHomunculusStats[0x0C]), 32, static_cast(-1), "%s", packet->name); + g_session.homunNameModified = packet->flags; + *reinterpret_cast(g_session.homunLevel) = packet->level; + g_session.homunHunger = packet->hunger; g_session.RefreshHomunculusInfo(); - int& notified = *reinterpret_cast(&g_session.unknown_5620[0]); - const int state = packet->unknown_001D; + int& notified = *reinterpret_cast(&g_session.companionTargetState[0]); + const int state = packet->hunger; switch (state) { case 1: case 5: case 10: if (notified != state) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_HOMUN_HUNGRY)), 0xFF, 0, 0, 0); - notified = packet->unknown_001D; + notified = packet->hunger; } } - g_session.unknown_55D4 = packet->unknown_001F; + g_session.homunFriendly = packet->intimacy; for (int i = 0; i < 8; ++i) { stats[i] = packet->stats[i]; } g_session.m_homunHp = packet->hp; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_55C8) = packet->maxHp; + *reinterpret_cast(g_session.homunMaxHp) = packet->maxHp; g_session.RefreshHomunculusInfo(); g_session.m_homunSp = packet->sp; g_session.RefreshHomunculusInfo(); - g_session.unknown_55D0 = packet->maxSp; + g_session.homunMaxSp = packet->maxSp; g_session.RefreshHomunculusInfo(); g_session.m_homunExp = packet->exp; g_session.RefreshHomunculusInfo(); g_session.m_homunMaxExp = packet->maxExp; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_1664) = packet->unknown_0051; + *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); if (g_windowMgr.window_03C4) { g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - *reinterpret_cast(&g_session.unknown_5620[4]) = packet->unknown_0053; + *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; if (UIHomunInfoWnd* window = static_cast(g_windowMgr.window_03C0)) { window->expBar->FillBackground(0xFFFFFF); window->expBar->SetValues(g_session.m_homunExp, g_session.m_homunMaxExp); - window->intimacyBar->SetValues(&g_session.unknown_55F0, &g_session.unknown_55F4); + window->intimacyBar->SetValues(&g_session.homunHunger, &g_session.homunMaxHunger); } } @@ -1001,46 +1001,46 @@ void CGameMode::ReceiveHomunculusInfo3(const unsigned char* data) { // FUNCTION: fn_21804 void CGameMode::ReceiveHomunculusInfo2(const unsigned char* data) { const HomunculusInfoPacket2* packet = reinterpret_cast(data); - char* name = reinterpret_cast(&g_session.unknown_5570[0x0C]); - int* stats = reinterpret_cast(&g_session.unknown_5570[0x2C]); + char* name = reinterpret_cast(&g_session.spAndHomunculusStats[0x0C]); + int* stats = reinterpret_cast(&g_session.spAndHomunculusStats[0x2C]); if (g_serviceType == 10 || g_serviceType == 12 || g_serviceType == 15) { std::sprintf(name, "%s", packet->name); } else { std::sprintf(name, packet->name); } - g_session.unknown_55D4 = packet->unknown_001F; - g_session.unknown_55F8 = packet->unknown_001A; + g_session.homunFriendly = packet->intimacy; + g_session.homunNameModified = packet->flags; for (int i = 0; i < 8; ++i) { stats[i] = packet->stats[i]; } - *reinterpret_cast(g_session.unknown_55C0) = packet->unknown_001B; + *reinterpret_cast(g_session.homunLevel) = packet->level; g_session.m_homunHp = packet->hp; g_session.RefreshHomunculusInfo(); g_session.m_homunSp = packet->sp; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_55C8) = packet->maxHp; + *reinterpret_cast(g_session.homunMaxHp) = packet->maxHp; g_session.RefreshHomunculusInfo(); - g_session.unknown_55D0 = packet->maxSp; + g_session.homunMaxSp = packet->maxSp; g_session.RefreshHomunculusInfo(); g_session.m_homunExp = packet->exp; g_session.RefreshHomunculusInfo(); g_session.m_homunMaxExp = packet->maxExp; g_session.RefreshHomunculusInfo(); - g_session.unknown_55F0 = packet->unknown_001D; + g_session.homunHunger = packet->hunger; g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_1664) = packet->unknown_0045; + *reinterpret_cast(g_session.companionSkillPoints) = packet->skillPoints; g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_5620[4]) = packet->unknown_0047; + *reinterpret_cast(&g_session.companionTargetState[4]) = packet->attackRange; if (g_windowMgr.window_03C4) { g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - int& notified = *reinterpret_cast(&g_session.unknown_5620[0]); - const std::int16_t state = packet->unknown_001D; + int& notified = *reinterpret_cast(&g_session.companionTargetState[0]); + const std::int16_t state = packet->hunger; if ((state == 1 || state == 5 || state == 10) && notified != state) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_HOMUN_HUNGRY)), 0xFF, 0, 0, 0); - notified = packet->unknown_001D; + notified = packet->hunger; } } @@ -1055,14 +1055,14 @@ void CGameMode::ReceiveMinimapMarker(const unsigned char* data) { y = -1; } - this->minimapMarkers[packet->key].unknown_0000 = x; - this->minimapMarkers[packet->key].unknown_0002 = y; - this->minimapMarkers[packet->key].unknown_0004 = packet->type; - this->minimapMarkers[packet->key].unknown_0006 = packet->color; + this->minimapMarkers[packet->key].x = x; + this->minimapMarkers[packet->key].y = y; + this->minimapMarkers[packet->key].effectType = packet->type; + this->minimapMarkers[packet->key].questIconId = packet->color; if (g_windowMgr.window_4F1CC) { for (auto it = this->minimapMarkers.begin(); it != this->minimapMarkers.end(); ++it) { - if (0 != it->second.unknown_0006) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.unknown_0004, it->second.unknown_0006, it->second.unknown_0000, it->second.unknown_0002); + if (0 != it->second.questIconId) { + g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); } } } @@ -1094,7 +1094,7 @@ void CGameMode::ReceiveBookOpen(const unsigned char* packet) { // OFFSET: 0x00D3DF40 // FUNCTION: fn_21807 void CGameMode::ReceiveResultNotice00FC(const unsigned char* packet) { - this->unknown_00FC = 0; + this->isWaitingEnterRoom = 0; switch (packet[2]) { case ENTERROOM_FULL: @@ -1241,26 +1241,26 @@ void CGameMode::ReceiveBillingInfo(const unsigned char* packet) { struct ActorMessage32 { /* 0000 */ std::string text; /* 0018 */ std::string extra; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; - /* 003C */ int unknown_003C; + /* 0030 */ int flags; + /* 0034 */ int userCount; + /* 0038 */ int maxUsers; + /* 003C */ int chatId; }; // OFFSET: 0x00D3E8B0 // FUNCTION: fn_21810 void CGameMode::ReceiveServerRateNotice(const unsigned char* packet) { - g_session.unknown_54A0 = *reinterpret_cast(packet + 2); - g_session.unknown_54A4 = packet[6]; - g_session.unknown_54A8 = packet[7]; - if (g_windowMgr.unknown_030C) { - reinterpret_cast(g_windowMgr.unknown_030C)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + g_session.partyExpShare = *reinterpret_cast(packet + 2); + g_session.partyItemCollect = packet[6]; + g_session.partyItemDistribute = packet[7]; + if (g_windowMgr.partySettingWnd) { + reinterpret_cast(g_windowMgr.partySettingWnd)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } char text[128]; std::memset(text, 0, sizeof(text)); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - switch (g_session.unknown_54A0) { + switch (g_session.partyExpShare) { case EXP_NOTSHARED: std::sprintf(text, "%s - %s : %s", LookupMessage(MSI_PARTYSETTING), LookupMessage(MSI_HOWEXPDIV), LookupMessage(MSI_EXPDIV1)); break; @@ -1275,7 +1275,7 @@ void CGameMode::ReceiveServerRateNotice(const unsigned char* packet) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0xFFFF, 12, 0, 0); } - switch (g_session.unknown_54A4) { + switch (g_session.partyItemCollect) { case 0: std::sprintf(text, "%s - %s : %s", LookupMessage(MSI_PARTYSETTING), LookupMessage(MSI_HOWITEMCOLLECT), LookupMessage(MSI_EXPDIV1)); break; @@ -1287,7 +1287,7 @@ void CGameMode::ReceiveServerRateNotice(const unsigned char* packet) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0xFFFF, 12, 0, 0); } - switch (g_session.unknown_54A8) { + switch (g_session.partyItemDistribute) { case 0: std::sprintf(text, "%s - %s : %s", LookupMessage(MSI_PARTYSETTING), LookupMessage(MSI_HOWITEMDIV), LookupMessage(MSI_EXPDIV1)); break; @@ -1303,7 +1303,7 @@ void CGameMode::ReceiveServerRateNotice(const unsigned char* packet) { // OFFSET: 0x00D3F130 // FUNCTION: fn_21811 void CGameMode::ReceiveActorMessage32(const unsigned char* packet) { - this->unknown_01AC[*reinterpret_cast(packet + 8)] = *reinterpret_cast(packet + 4); + this->chatRoomActorIds[*reinterpret_cast(packet + 8)] = *reinterpret_cast(packet + 4); CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 4)); if (!actor) { return; @@ -1311,10 +1311,10 @@ void CGameMode::ReceiveActorMessage32(const unsigned char* packet) { ActorMessage32 message; message.text.assign(reinterpret_cast(packet + 17), *reinterpret_cast(packet + 2) - 17); - message.unknown_0030 = packet[16]; - message.unknown_0034 = *reinterpret_cast(packet + 14); - message.unknown_0038 = *reinterpret_cast(packet + 12); - message.unknown_003C = *reinterpret_cast(packet + 8); + message.flags = packet[16]; + message.userCount = *reinterpret_cast(packet + 14); + message.maxUsers = *reinterpret_cast(packet + 12); + message.chatId = *reinterpret_cast(packet + 8); if (message.text.size() > 60) { message.text.resize(60); } @@ -1466,23 +1466,23 @@ void CGameMode::ReceiveResultNotice0118(const unsigned char* packet) { case WT_EXCLUDE_WHISPER: switch (packet[3]) { case WHIPSER_SETTING_FAILED: - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->unknown_0118 + LookupMessage(MSI_WHISPERIGNOREFAILED1)).c_str()), 0xFFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->refuseWhisperName + LookupMessage(MSI_WHISPERIGNOREFAILED1)).c_str()), 0xFFFF, 0, 0, 0); break; case WHISPER_SETTING_FAILED_OVERCOUNT: - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->unknown_0118 + LookupMessage(MSI_WHISPERIGNOREFAILED2)).c_str()), 0xFFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->refuseWhisperName + LookupMessage(MSI_WHISPERIGNOREFAILED2)).c_str()), 0xFFFF, 0, 0, 0); break; } break; case WT_INCLUDE_WHISPER: switch (packet[3]) { case WHISPER_SETTING_SUCCEED: - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->unknown_0118 + LookupMessage(MSI_WHISPERNOIGNORESUCCESS)).c_str()), 0xFFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->refuseWhisperName + LookupMessage(MSI_WHISPERNOIGNORESUCCESS)).c_str()), 0xFFFF, 0, 0, 0); break; case WHIPSER_SETTING_FAILED: - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->unknown_0118 + LookupMessage(MSI_WHISPERNOIGNOREFAILED1)).c_str()), 0xFFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->refuseWhisperName + LookupMessage(MSI_WHISPERNOIGNOREFAILED1)).c_str()), 0xFFFF, 0, 0, 0); break; case WHISPER_SETTING_FAILED_OVERCOUNT: - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->unknown_0118 + LookupMessage(MSI_WHISPERNOIGNOREFAILED2)).c_str()), 0xFFFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast((this->refuseWhisperName + LookupMessage(MSI_WHISPERNOIGNOREFAILED2)).c_str()), 0xFFFF, 0, 0, 0); break; } break; @@ -1531,7 +1531,7 @@ void CGameMode::ReceivePackageItemTest(const unsigned char* packet) { item.SetItemId(current.itemId); int nameCapacity = sizeof(itemName); item.GetIdDisplayName(itemName, nameCapacity, 0); - std::fprintf(file, "%s\t\t\t%d\t%c%d%c\n", itemName, current.count, '(', current.unknown_0004, ')'); + std::fprintf(file, "%s\t\t\t%d\t%c%d%c\n", itemName, current.count, '(', current.rate, ')'); total += current.count; ++entry; } @@ -1561,8 +1561,8 @@ struct SummonHpUpdatePacket { // FUNCTION: fn_21999 void CGameMode::ReceiveSummonHpInit(const unsigned char* buffer) { const SummonHpInitPacket* packet = reinterpret_cast(buffer); - g_session.unknown_0784[packet->summonId] = packet->hp; - g_session.unknown_078C[packet->summonId] = packet->maxHp; + g_session.summonHp[packet->summonId] = packet->hp; + g_session.summonMaxHp[packet->summonId] = packet->maxHp; CRenderObject* actor = this->scene->GetGameActorByAID(packet->summonId); if (actor != nullptr) { @@ -1581,10 +1581,10 @@ void CGameMode::ReceiveSummonHpUpdate(const unsigned char* buffer) { switch (packet->varId) { case 5: - g_session.unknown_0784[packet->summonId] = packet->value; + g_session.summonHp[packet->summonId] = packet->value; break; case 6: - g_session.unknown_078C[packet->summonId] = packet->value; + g_session.summonMaxHp[packet->summonId] = packet->value; break; } @@ -1913,15 +1913,15 @@ void CGameMode::ReceiveRuneRewardSteps(const unsigned char* data) { void CGameMode::ReceiveRodexMailDeleteResult(int mailId, int result) { int message; if (result == 0) { - if (g_windowMgr.unknown_045C) { - reinterpret_cast(g_windowMgr.unknown_045C)->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.rodexContentsWnd) { + reinterpret_cast(g_windowMgr.rodexContentsWnd)->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } std::map::iterator mail = g_rodexMailStore->m_mails0.find(mailId); if (mail != g_rodexMailStore->m_mails0.end()) { if (!mail->second.isRead) { - --g_rodexMailStore->unknown_0018; - if (g_rodexMailStore->unknown_0018 == 0) { + --g_rodexMailStore->unreadCount; + if (g_rodexMailStore->unreadCount == 0) { if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { window->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 476, 0, 0); } @@ -1929,8 +1929,8 @@ void CGameMode::ReceiveRodexMailDeleteResult(int mailId, int result) { } g_rodexMailStore->m_mails0.erase(mail); - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->RemoveInboxMail(mailId); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->RemoveInboxMail(mailId); } } message = 3865; @@ -2124,13 +2124,13 @@ void CGameMode::ReceiveServiceRequest(unsigned char type, int value) { // FUNCTION: fn_22037 void CGameMode::ReceiveGradeEnchantResult(const unsigned char* packet) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(packet + 2)); - if (item.unknown_0000[1]) { + if (item.identity[1]) { const int result = *reinterpret_cast(packet + 6); if (result == ENCHANTGRADE_UPGRADE_SUCCESS || result == ENCHANTGRADE_UPGRADE_DOWNGRADE) { if (result == ENCHANTGRADE_UPGRADE_SUCCESS) { - item.unknown_0060 = 0; + item.refiningLevel = 0; } - item.unknown_0088 = *reinterpret_cast(packet + 4); + item.grade = *reinterpret_cast(packet + 4); g_session.UpdateInventoryItem(item, 1); } } @@ -2163,37 +2163,37 @@ void CGameMode::ReceiveAchievementUpdate( __time32_t completedAt, unsigned char rewarded ) { const SessionRecord6144 previous = g_session.FindRecord6144(id); - if (reinterpret_cast(&previous.unknown_0000)[1] == 0 && achieved == 1) { - this->unknown_0600 = timeGetTime(); - if (!this->unknown_05FC) { + if (reinterpret_cast(&previous.completionFlags)[1] == 0 && achieved == 1) { + this->achievementBalloonTick = timeGetTime(); + if (!this->achievementBalloon) { UIAchBalloonText* balloon = new UIAchBalloonText(); - this->unknown_05FC = balloon; + this->achievementBalloon = balloon; balloon->SetSize(g_renderer->viewport.width, 50); - g_windowMgr.AddRenderedFront(this->unknown_05FC); + g_windowMgr.AddRenderedFront(this->achievementBalloon); } AchievementInfo info; - info.unknown_004C = -1; - info.unknown_0050 = -1; - info.unknown_0054 = -1; + info.rewardItemId = -1; + info.rewardTitleId = -1; + info.rewardBuffId = -1; g_achievementMgr->GetAchievement(info, id); const std::string text = FormatOwnedString(LookupMessage(MSI_NOTICE_NEXT_ROULLETE_STAGE), info.title.c_str()); - static_cast(this->unknown_05FC)->WrapText(text.c_str(), 72); - static_cast(this->unknown_05FC)->m_fontHeight = 20; - static_cast(this->unknown_05FC)->m_textColor = 0xFFFFFF; - static_cast(this->unknown_05FC)->m_outlineColor = 0; - this->unknown_05FC->Move(0, 50); + static_cast(this->achievementBalloon)->WrapText(text.c_str(), 72); + static_cast(this->achievementBalloon)->m_fontHeight = 20; + static_cast(this->achievementBalloon)->m_textColor = 0xFFFFFF; + static_cast(this->achievementBalloon)->m_outlineColor = 0; + this->achievementBalloon->Move(0, 50); g_effectMgr->Spawn(g_session.m_aid, 0x446, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { window->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 0x1D9, 1, 0); } } - g_session.unknown_614C = unknown01738784; - g_session.unknown_6150 = unknown01738788; - g_session.unknown_6154 = completed; - g_session.unknown_6158 = total; + g_session.achievementScore = unknown01738784; + g_session.achievementLevel = unknown01738788; + g_session.achievementCompleted = completed; + g_session.achievementTotal = total; AchievementRecordPacket record; record.id = id; @@ -2238,14 +2238,14 @@ void CGameMode::ReceiveItemReward2(const unsigned char* data) { const ItemRewardPacket2* packet = reinterpret_cast(data); ITEM_INFO item; if (packet->result == 0) { - item.unknown_0000[1] = packet->index; + item.identity[1] = packet->index; item.quantity = packet->quantity; item.SetItemId(packet->itemId); - item.unknown_0000[0] = packet->type; + item.identity[0] = packet->type; item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); int count = 0; for (int i = 0; i < 5; ++i) { @@ -2253,13 +2253,13 @@ void CGameMode::ReceiveItemReward2(const unsigned char* data) { ++count; } } - item.unknown_0000[2] = packet->expireTime; - item.unknown_0098 = count; + item.identity[2] = packet->expireTime; + item.optionCount = count; for (std::int64_t index = 0; index < count; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + reinterpret_cast(item.options)[index] = packet->options[index]; } - item.unknown_0074[0] = packet->bound; - item.unknown_0088 = packet->grade; + item.flags[0] = packet->bound; + item.grade = packet->grade; } const std::uint16_t value = packet->value; @@ -2267,8 +2267,8 @@ void CGameMode::ReceiveItemReward2(const unsigned char* data) { switch (packet->result) { case 0: g_session.AddStackedItem(reward); - g_session.RemoveItem1710(reward.unknown_0000[1], reward.quantity); - g_session.unknown_6140 = value; + g_session.RemoveItem1710(reward.identity[1], reward.quantity); + g_session.achievementResult = value; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL)), 0x64FFFF, 0, 0, 0); break; case 1: @@ -2293,23 +2293,23 @@ void CGameMode::ReceiveItemReward(const unsigned char* data) { switch (packet->result) { case 0: { ITEM_INFO item; - item.unknown_0000[1] = packet->index; + item.identity[1] = packet->index; item.quantity = packet->quantity; item.SetItemId(packet->itemId); - item.unknown_0000[0] = packet->type; + item.identity[0] = packet->type; item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0098 = CountItemRandomOptions(reinterpret_cast(packet->options)); - item.unknown_0000[2] = packet->expireTime; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); + item.optionCount = CountItemRandomOptions(reinterpret_cast(packet->options)); + item.identity[2] = packet->expireTime; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet->options[index]; } - item.unknown_0074[0] = packet->bound; + item.flags[0] = packet->bound; g_session.AddStackedItem(item); g_session.RemoveItem1710(packet->index, packet->quantity); - g_session.unknown_6140 = packet->value; + g_session.achievementResult = packet->value; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL)), 0x64FFFF, 0, 0, 0); break; } @@ -2376,7 +2376,7 @@ void CGameMode::ToggleWindow169(unsigned char enable) { #pragma pack(push, 1) struct RequestWindow169Packet { /* 0000 */ std::int16_t id; - /* 0002 */ unsigned char unknown_0002; + /* 0002 */ unsigned char flags; }; #pragma pack(pop) @@ -2388,7 +2388,7 @@ void CGameMode::RequestWindow169(unsigned char enable) { if (!window) { RequestWindow169Packet packet; packet.id = 0x0BE0; - packet.unknown_0002 = 0; + packet.flags = 0; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } } else if (window) { @@ -2642,10 +2642,10 @@ void CGameMode::Zc_Skill_Entry(const unsigned char* record) { } skill = new CSkill(packet.aid); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); } - skill->unknown_0410 = packet.owner; + skill->sourceActorId = packet.owner; const int address = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -2667,7 +2667,7 @@ void CGameMode::Zc_Skill_Entry2(const unsigned char* record) { if (packet.graffiti == 1) { CGraffiSkill* skill = new CGraffiSkill; this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); skill->SendMsg(nullptr, AM_SETMASTERGID, 0, packet.aid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); const int address = reinterpret_cast(packet.text); skill->SendMsg(nullptr, AM_SET_SKILL, 0, address, address >> 31, data.x, data.x >> 31, data.y, data.y >> 31, 0, 0, 0, 0, 0, 0); @@ -2692,7 +2692,7 @@ void CGameMode::Zc_Skill_Entry2(const unsigned char* record) { } skill = new CSkill(0); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); } const int address = reinterpret_cast(&data); @@ -2709,7 +2709,7 @@ void CGameMode::ReceiveGroundSkill8(const unsigned char* record) { } CGraffiSkill* skill = new CGraffiSkill; this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); skill->SendMsg(nullptr, AM_SETMASTERGID, 0, packet.aid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); const int address = reinterpret_cast(packet.text); const int x = packet.x; @@ -2747,12 +2747,12 @@ void CGameMode::ReceiveGroundSkill8(const unsigned char* record) { } skill = new CSkill(packet.aid); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); if (!skill) { return; } } - skill->unknown_0410 = packet.owner; + skill->sourceActorId = packet.owner; const int address = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -2767,7 +2767,7 @@ void CGameMode::ReceiveGroundSkill32(const unsigned char* record) { } CGraffiSkill* skill = new CGraffiSkill; this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); skill->SendMsg(nullptr, AM_SETMASTERGID, 0, packet.aid, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); const int address = reinterpret_cast(packet.text); const int x = packet.x; @@ -2807,12 +2807,12 @@ void CGameMode::ReceiveGroundSkill32(const unsigned char* record) { } skill = new (std::nothrow) CSkill(packet.aid); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); if (!skill) { return; } } - skill->unknown_0410 = packet.owner; + skill->sourceActorId = packet.owner; const int address = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -2844,12 +2844,12 @@ void CGameMode::ReceiveSpriteChange2Mirrored(const unsigned char* packet) { #pragma pack(push, 1) struct Item1718PendingRecord { - /* 0000 */ std::uint32_t unknown_0000; - /* 0004 */ std::uint32_t unknown_0004; + /* 0000 */ std::uint32_t price; + /* 0004 */ std::uint32_t realPrice; /* 0008 */ unsigned char type; /* 0009 */ std::int32_t itemId; - /* 000D */ std::uint16_t unknown_000D; - /* 000F */ std::uint32_t unknown_000F; + /* 000D */ std::uint16_t sprite; + /* 000F */ std::uint32_t location; /* 0013 */ unsigned char unknown_0013[6]; }; #pragma pack(pop) @@ -2858,9 +2858,9 @@ static_assert(sizeof(Item1718PendingRecord) == 0x19); struct Unknown015D4818Values { /* 0000 */ std::uint32_t unknown_0000[2]; - /* 0008 */ std::uint32_t unknown_0008; + /* 0008 */ std::uint32_t location; /* 000C */ std::uint32_t unknown_000C[25]; - /* 0070 */ std::uint32_t unknown_0070; + /* 0070 */ std::uint32_t sprite; }; struct Unknown015D4818Entry { @@ -2879,7 +2879,7 @@ Unknown015D4818* g_unknown_015D4818; // OFFSET: 0x00D3BD40 // FUNCTION: fn_21790 void CGameMode::ReceivePendingItem1718List(const unsigned char* packet) { - if (g_windowMgr.unknown_01E4 || g_windowMgr.LookupWindow(WID_CASHSHOP_WND)) { + if (g_windowMgr.nCashWnd || g_windowMgr.LookupWindow(WID_CASHSHOP_WND)) { return; } @@ -2895,22 +2895,22 @@ void CGameMode::ReceivePendingItem1718List(const unsigned char* packet) { for (int i = 0; i < count; ++i, ++record) { RawItemBasic item = {}; _itoa(record->itemId, item.itemId, 10); - item.unknown_0004 = record->unknown_0000; - item.unknown_0008 = record->unknown_0004; - item.unknown_000C = record->type; + item.price = record->price; + item.realPrice = record->realPrice; + item.type = record->type; item.id = -1; item.identified = 1; g_session.AddItem1718(item, 0); if (g_unknown_015D4818 && g_unknown_015D4818->entry) { Unknown015D4818Values& values = g_unknown_015D4818->entry->values; - values.unknown_0070 = record->unknown_000D; - values.unknown_0008 = record->unknown_000F; + values.sprite = record->sprite; + values.location = record->location; } } g_pendingAid = *reinterpret_cast(packet + 4); g_pendingGid = *reinterpret_cast(packet + 8); - this->unknown_024C = 1; + this->isOnQuest = 1; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMSHOPWND); window->SendMsg(nullptr, UM_SETTITLE, 0, 1, 0, 0); @@ -2959,7 +2959,7 @@ struct SearchStoreOption { }; struct SearchStoreItemPacket { - /* 0000 */ unsigned char unknown_0000[8]; + /* 0000 */ unsigned char storeIdentity[8]; /* 0008 */ char storeName[80]; /* 0058 */ int itemId; /* 005C */ unsigned char kind; @@ -2984,7 +2984,7 @@ struct SearchStoreItemPacketOld { } } - /* 0000 */ unsigned char unknown_0000[8]; + /* 0000 */ unsigned char storeIdentity[8]; /* 0008 */ char storeName[80]; /* 0058 */ int itemId; /* 005C */ unsigned char kind; @@ -3009,21 +3009,21 @@ void CGameMode::ReceiveSearchStoreItems(const unsigned char* packet) { if (window) { window->SendMsg(nullptr, UM_REFRESH, 1, 387, 0, 0); } - g_session.unknown_5BD4.clear(); + g_session.storeSearchResults.clear(); } - reinterpret_cast(&g_session.unknown_5BE4)[1] = header->hasNext; - g_session.unknown_5BE0 = header->count; + reinterpret_cast(&g_session.storeSearchPageFlags)[1] = header->hasNext; + g_session.storeSearchCount = header->count; const unsigned int count = (header->length - 7) / sizeof(SearchStoreItemPacket); for (long long i = 0; i < count; ++i) { const SearchStoreItemPacket record = items[i]; SessionEntry5BD4 entry; - std::memcpy(entry.unknown_0000, record.unknown_0000, sizeof(entry.unknown_0000)); + std::memcpy(entry.storeIdentity, record.storeIdentity, sizeof(entry.storeIdentity)); std::memcpy(entry.storeName, record.storeName, sizeof(entry.storeName)); entry.price = record.price; entry.quantity = record.quantity; entry.item.SetItemId(record.itemId); - entry.item.unknown_0060 = record.refine; - entry.item.unknown_0000[0] = record.kind; + entry.item.refiningLevel = record.refine; + entry.item.identity[0] = record.kind; entry.item.identified = 1; int optionCount = 0; for (int j = 0; j < 5; ++j) { @@ -3031,15 +3031,15 @@ void CGameMode::ReceiveSearchStoreItems(const unsigned char* packet) { ++optionCount; } } - entry.item.unknown_0098 = optionCount; + entry.item.optionCount = optionCount; for (long long j = 0; j < optionCount; ++j) { - reinterpret_cast(entry.item.unknown_009C)[j] = record.options[j]; + reinterpret_cast(entry.item.options)[j] = record.options[j]; } for (long long j = 0; j < 4; ++j) { - reinterpret_cast(entry.item.unknown_001C)[j] = record.cards[j]; + reinterpret_cast(entry.item.cards)[j] = record.cards[j]; } - entry.item.unknown_0088 = record.grade; - g_session.unknown_5BD4.push_back(entry); + entry.item.grade = record.grade; + g_session.storeSearchResults.push_back(entry); } if (window) { window->SendMsg(nullptr, UM_REFRESH, 1, 184, 0, 0); @@ -3056,22 +3056,22 @@ void CGameMode::ReceiveSearchStoreItemsOld(const unsigned char* packet) { if (window) { window->SendMsg(nullptr, UM_REFRESH, 1, 387, 0, 0); } - g_session.unknown_5BD4.clear(); + g_session.storeSearchResults.clear(); } - reinterpret_cast(&g_session.unknown_5BE4)[1] = header->hasNext; - g_session.unknown_5BE0 = header->count; + reinterpret_cast(&g_session.storeSearchPageFlags)[1] = header->hasNext; + g_session.storeSearchCount = header->count; const int count = (header->length - 7) / sizeof(SearchStoreItemPacketOld); for (int i = 0; i < count; ++i) { SearchStoreItemPacketOld record; record = *next++; SessionEntry5BD4 entry; - std::memcpy(entry.unknown_0000, record.unknown_0000, sizeof(entry.unknown_0000)); + std::memcpy(entry.storeIdentity, record.storeIdentity, sizeof(entry.storeIdentity)); std::memcpy(entry.storeName, record.storeName, sizeof(entry.storeName)); entry.price = record.price; entry.quantity = record.quantity; entry.item.SetItemId(record.itemId); - entry.item.unknown_0060 = record.refine; - entry.item.unknown_0000[0] = record.kind; + entry.item.refiningLevel = record.refine; + entry.item.identity[0] = record.kind; entry.item.identified = 1; const SearchStoreOption* options = reinterpret_cast(record.options); int optionCount = 0; @@ -3080,12 +3080,12 @@ void CGameMode::ReceiveSearchStoreItemsOld(const unsigned char* packet) { ++optionCount; } } - entry.item.unknown_0098 = optionCount; + entry.item.optionCount = optionCount; for (int j = 0; j < optionCount; ++j) { - reinterpret_cast(entry.item.unknown_009C)[j] = options[j]; + reinterpret_cast(entry.item.options)[j] = options[j]; } - std::memcpy(entry.item.unknown_001C, record.cards, sizeof(record.cards)); - g_session.unknown_5BD4.push_back(entry); + std::memcpy(entry.item.cards, record.cards, sizeof(record.cards)); + g_session.storeSearchResults.push_back(entry); } if (window) { window->SendMsg(nullptr, UM_REFRESH, 1, 184, 0, 0); diff --git a/Source/Client/Mode/GameModeItemLists.cpp b/Source/Client/Mode/GameModeItemLists.cpp index 184d4bb8c..3a6d37402 100644 --- a/Source/Client/Mode/GameModeItemLists.cpp +++ b/Source/Client/Mode/GameModeItemLists.cpp @@ -71,24 +71,24 @@ namespace { // INLINED __forceinline void FillEquipListItem(ITEM_INFO& item, const EquipListRecord& record, const EquipListOption* options) { - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = record.index; - item.unknown_0000[2] = record.location; - item.unknown_0000[3] = record.wearState; + item.identity[0] = record.type; + item.identity[1] = record.index; + item.identity[2] = record.location; + item.identity[3] = record.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.flags & 1; - item.unknown_005D = (record.flags >> 1) & 1; - item.unknown_0060 = record.refine; - item.unknown_0068 = record.expireTime; - item.unknown_0064 = record.bindOnEquip; - item.unknown_0070 = record.sprite; - item.unknown_0074[0] = (record.flags >> 2) & 1; - item.unknown_0098 = CountEquipListOptions(options); - item.unknown_0088 = 0; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = (record.flags >> 1) & 1; + item.refiningLevel = record.refine; + item.expireTime = record.expireTime; + item.bindOnEquip = record.bindOnEquip; + item.sprite = record.sprite; + item.flags[0] = (record.flags >> 2) & 1; + item.optionCount = CountEquipListOptions(options); + item.grade = 0; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } } } @@ -122,24 +122,24 @@ void CGameMode::ReceiveEquipListPart(unsigned char listType, int count, const un ITEM_INFO item; FillEquipListItem(item, record, options); - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem2B50(item, &equipped); } else { g_session.EquipUnknown17F0(item, &equipped); } } - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).itemId.c_str()); + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).itemId.c_str()); if (!g_petEvolutionMgr->IsAutoFeeding(petEgg) && g_petAutoFeed == true) { g_session.SendPetAutoFeedOption(0); } diff --git a/Source/Client/Mode/GameModeMiniMap.cpp b/Source/Client/Mode/GameModeMiniMap.cpp index b265536c2..988d46b3c 100644 --- a/Source/Client/Mode/GameModeMiniMap.cpp +++ b/Source/Client/Mode/GameModeMiniMap.cpp @@ -164,9 +164,9 @@ void CGameMode::FindWalkableCellToward(float x, float z, float originX, float or // OFFSET: 0x00CD0300 // FUNCTION: fn_21252 void CGameMode::RemoveMiniMapPing(std::uint32_t id) { - const auto found = this->unknown_01C4.find(id); - if (found != this->unknown_01C4.end()) { - this->unknown_01C4.erase(found); + const auto found = this->compassPosList.find(id); + if (found != this->compassPosList.end()) { + this->compassPosList.erase(found); } } @@ -175,11 +175,11 @@ void CGameMode::RemoveMiniMapPing(std::uint32_t id) { void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { int index = 0; if (g_windowMgr.window_4F1CC) { - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 0, this->unknown_01B4.size(), 0, 0); - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 1, this->unknown_01BC.size(), 0, 0); + g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 0, this->partyPosList.size(), 0, 0); + g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_COUNT, 1, this->guildPosList.size(), 0, 0); } - for (auto it = this->unknown_01B4.begin(); it != this->unknown_01B4.end(); ++it) { + for (auto it = this->partyPosList.begin(); it != this->partyPosList.end(); ++it) { this->DrawMiniMapMarker(view, it->second.x, it->second.y, 2, std::string(), 2, it->second.color, false); if (g_windowMgr.window_4F1CC) { g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 0, index, it->second.x, it->second.y); @@ -187,8 +187,8 @@ void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { ++index; } - for (auto it = this->unknown_01BC.begin(); it != this->unknown_01BC.end(); ++it) { - if (this->unknown_01B4.find(it->first) == this->unknown_01B4.end()) { + for (auto it = this->guildPosList.begin(); it != this->guildPosList.end(); ++it) { + if (this->partyPosList.find(it->first) == this->partyPosList.end()) { this->DrawMiniMapMarker(view, it->second.x, it->second.y, 2, std::string(), 1, it->second.color, false); if (g_windowMgr.window_4F1CC) { g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_MARK_POS, 1, index, it->second.x, it->second.y); @@ -198,16 +198,16 @@ void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { } for (auto it = this->minimapMarkers.begin(); it != this->minimapMarkers.end(); ++it) { - if (it->second.unknown_0006 != 0) { - const std::string name = FormatOwnedString("유저인터페이스\\basic_interface\\quest_%d.bmp", it->second.unknown_0006); - this->DrawMiniMapMarker(view, it->second.unknown_0000, it->second.unknown_0002, 4, name, 0, 0, true); + if (it->second.questIconId != 0) { + const std::string name = FormatOwnedString("유저인터페이스\\basic_interface\\quest_%d.bmp", it->second.questIconId); + this->DrawMiniMapMarker(view, it->second.x, it->second.y, 4, name, 0, 0, true); } } - if (g_session.unknown_5BE8 > -1) { - const int y = g_session.unknown_5BEC; + if (g_session.storeSearchX > -1) { + const int y = g_session.storeSearchY; if (y > -1) { - this->DrawMiniMapMarker(view, g_session.unknown_5BE8, y, 4, "유저인터페이스\\basic_interface\\search_store.bmp", 0, 0, true); + this->DrawMiniMapMarker(view, g_session.storeSearchX, y, 4, "유저인터페이스\\basic_interface\\search_store.bmp", 0, 0, true); } } } @@ -215,7 +215,7 @@ void CGameMode::DrawMiniMapMembers(const TextureRegion& view) { // OFFSET: 0x00CD0DD0 // FUNCTION: fn_21255 void CGameMode::DrawMiniMap() { - if (!g_windowMgr.unknown_01C0) { + if (!g_windowMgr.minimapZoomWnd) { return; } @@ -227,7 +227,7 @@ void CGameMode::DrawMiniMap() { int row; this->WorldCell(player->render.position.x, player->render.position.z, column, row); - const float half = 1.0f / (g_windowMgr.unknown_0050 * 2.0f); + const float half = 1.0f / (g_windowMgr.minimapZoom * 2.0f); const float u = static_cast(column) / static_cast(width); const float v = static_cast(height - row) / static_cast(height); TextureRegion view; @@ -266,13 +266,13 @@ void CGameMode::DrawMiniMap() { const int reduction = g_textureReduction; g_textureReduction = 1; - CTexture* texture = g_texMgr.Load(reinterpret_cast(this->unknown_0090), 0, false, true, false); + CTexture* texture = g_texMgr.Load(reinterpret_cast(this->minimapBmpName), 0, false, true, false); RECT rect; rect.left = static_cast(centerX - 64.0f); rect.top = 16; rect.right = static_cast(centerX + 64.0f); rect.bottom = 144; - this->DrawTexture(rect, 0, 0.0998f, g_windowMgr.unknown_005C, texture, view); + this->DrawTexture(rect, 0, 0.0998f, g_windowMgr.minimapColor, texture, view); this->DrawMiniMapMarker(view, column, row, 5, "유저인터페이스\\map\\map_arrow.bmp", 4, 0xFFFFFFFF, false); @@ -285,11 +285,11 @@ void CGameMode::DrawMiniMap() { } } - if (this->unknown_05CC[0]) { - this->DrawMiniMapMarker(view, this->unknown_05C4, this->unknown_05C8, 6, "유저인터페이스\\map\\bossmonster.bmp", 5, 0, true); + if (this->bossAlarmAndCopyNameFlags[0]) { + this->DrawMiniMapMarker(view, this->bossMonsterX, this->bossMonsterY, 6, "유저인터페이스\\map\\bossmonster.bmp", 5, 0, true); } - if (g_windowMgr.unknown_0054) { + if (g_windowMgr.minimapMarkersVisible) { for (int index = 0;; ++index) { const TownInfo info = g_townInfoMgr->GetTownInfo(std::string(this->mapName), index); if (info.image.size() == 0 || info.type == 8 || info.type == 9) { @@ -301,15 +301,15 @@ void CGameMode::DrawMiniMap() { this->DrawMiniMapMembers(view); - if (this->unknown_01C4.size() != 0) { - for (auto it = this->unknown_01C4.begin(); it != this->unknown_01C4.end();) { + if (this->compassPosList.size() != 0) { + for (auto it = this->compassPosList.begin(); it != this->compassPosList.end();) { if (it->second.persistent == 0 && timeGetTime() > it->second.tick + 15000) { - it = this->unknown_01C4.erase(it); + it = this->compassPosList.erase(it); } else { ++it; } } - for (auto it = this->unknown_01C4.begin(); it != this->unknown_01C4.end(); ++it) { + for (auto it = this->compassPosList.begin(); it != this->compassPosList.end(); ++it) { if (static_cast(timeGetTime() - it->second.tick) % 1000 < 500) { this->DrawMiniMapMarker(view, it->second.x, it->second.y, 1, std::string(""), 3, it->second.color, false); } @@ -487,7 +487,7 @@ void CGameMode::DrawMiniMapMarker( if (g_windowMgr.window_4F1CC) { g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_SET_PLAYER_POS, x, y, 0, 0); } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C0)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.minimapZoomWnd)) { window->Invalidate(); } } @@ -579,11 +579,11 @@ int g_minimapCoordinateDigitValues[4]; // OFFSET: 0x00CD2A10 // FUNCTION: fn_21261 void CGameMode::DrawMiniMapNumber() { - if (this->unknown_0408 == nullptr || this->unknown_0414 == 0) { + if (this->skillUseType == nullptr || this->skillUseLevel == 0) { return; } - const int number = this->unknown_0414; + const int number = this->skillUseLevel; if (number != g_minimapCoordinateValue) { g_minimapCoordinateValue = number; int value = number; @@ -734,12 +734,12 @@ void CGameMode::DrawTimeAttackCountdown(std::uint32_t value, int mode) { std::uint32_t remaining = 0; switch (mode) { case 0: - if (this->unknown_0464 == 0) { - this->unknown_0464 = timeGetTime(); + if (this->countdownStartTick == 0) { + this->countdownStartTick = timeGetTime(); } remaining = value; - if (timeGetTime() - this->unknown_0464 > 5000) { - this->unknown_0464 = 0; + if (timeGetTime() - this->countdownStartTick > 5000) { + this->countdownStartTick = 0; g_session.m_timeAttackVisible = 0; } break; @@ -936,7 +936,7 @@ int CGameMode::UpdateMiniMapTooltip() { int id = tooltipId; if (id > 9 || id == -1) { this->RefreshMiniMapTooltips(); - if (tooltipId == -1 && g_windowMgr.unknown_0348 != nullptr) { + if (tooltipId == -1 && g_windowMgr.illustWnd != nullptr) { return g_windowMgr.CloseWindow(WID_ILLUSTWND); } return tooltipId; @@ -946,7 +946,7 @@ int CGameMode::UpdateMiniMapTooltip() { return id; } - UIWindow* window = g_windowMgr.unknown_0348; + UIWindow* window = g_windowMgr.illustWnd; if (window == nullptr) { window = g_windowMgr.EnsureWindow(WID_ILLUSTWND); g_miniMapTooltipId = tooltipId; diff --git a/Source/Client/Mode/GameModeNames.cpp b/Source/Client/Mode/GameModeNames.cpp index bdac45496..fbf3334c1 100644 --- a/Source/Client/Mode/GameModeNames.cpp +++ b/Source/Client/Mode/GameModeNames.cpp @@ -25,11 +25,11 @@ __declspec(noinline) void TraceSelection(int selection) { // FUNCTION: fn_23368 ITEM_INFO CSession::GetItem17F0(int index) const { if (index == 15) { - return LookupClientItemByIdentity(this->m_inventoryItems, this->unknown_16EC); + return LookupClientItemByIdentity(this->m_inventoryItems, this->equippedArrowIndex); } if (static_cast(index) <= 9) { - return this->unknown_17F0[index]; + return this->equippedItems[index]; } return ITEM_INFO(0); @@ -40,7 +40,7 @@ ITEM_INFO CSession::GetItem17F0(int index) const { __declspec(noinline) unsigned char CSession::IsAllyActor(std::uint32_t aid, int job) { CGameActor* actor = static_cast(this->FindGameActor(aid)); if (actor) { - switch (actor->unknown_0314) { + switch (actor->objectType) { case 1: case 6: case 12: @@ -54,8 +54,8 @@ __declspec(noinline) unsigned char CSession::IsAllyActor(std::uint32_t aid, int // OFFSET: 0x00CD3400 // FUNCTION: fn_21263 std::uint32_t CGameMode::FindUnknown01AC(std::uint32_t key) { - const auto found = this->unknown_01AC.find(key); - if (found != this->unknown_01AC.end()) { + const auto found = this->chatRoomActorIds.find(key); + if (found != this->chatRoomActorIds.end()) { return found->second; } @@ -99,13 +99,13 @@ const CActorNameCard& CGameMode::LookupNameCard(std::uint32_t id) { // OFFSET: 0x00CD3580 // FUNCTION: fn_21267 const char* CSession::Text8104() const { - return this->unknown_8104.c_str(); + return this->damageSkinAuxiliaryName.c_str(); } // OFFSET: 0x00CD35A0 // FUNCTION: fn_21268 const char* CSession::Text80EC() const { - return this->unknown_80EC.c_str(); + return this->damageSpriteName.c_str(); } // OFFSET: 0x00CD3A30 @@ -115,7 +115,7 @@ const char* CGameMode::DragItemName() { case 2: case 24: { const ITEM_INFO item = g_session.GetItem17F0(this->drag.slot); - return item.unknown_0000[1] > 0 ? item.itemId.c_str() : nullptr; + return item.identity[1] > 0 ? item.itemId.c_str() : nullptr; } default: if (this->drag.name.size() == 0) { diff --git a/Source/Client/Mode/GameModeNotices.cpp b/Source/Client/Mode/GameModeNotices.cpp index c23c009da..3113e49fa 100644 --- a/Source/Client/Mode/GameModeNotices.cpp +++ b/Source/Client/Mode/GameModeNotices.cpp @@ -300,7 +300,7 @@ static int CountItemSlotOptions(const ItemSlotOption* options) { // FUNCTION: fn_21839 void CGameMode::ReceiveStatus(const unsigned char* data) { const auto* packet = reinterpret_cast(data); - int* bonusStats = reinterpret_cast(g_session.unknown_169C); + int* bonusStats = reinterpret_cast(g_session.combatStats); g_session.m_standardStats[0] = packet->stats[0]; g_session.InvalidateWindowFrames(); g_session.m_standardStats[1] = packet->stats[2]; @@ -326,7 +326,7 @@ void CGameMode::ReceiveStatus(const unsigned char* data) { bonusStats[5] = packet->stats[11]; g_session.InvalidateWindowFrames(); - *reinterpret_cast(g_session.unknown_1654) = packet->statusPoint; + *reinterpret_cast(g_session.statusPoints) = packet->statusPoint; g_session.InvalidateWindowFrames(); bonusStats[7] = packet->values[0]; @@ -358,7 +358,7 @@ void CGameMode::ReceiveStatus(const unsigned char* data) { bonusStats[9] = packet->values[13]; g_session.InvalidateWindowFrames(); - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.statusWnd)) { window->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } } @@ -369,22 +369,22 @@ void CGameMode::ReceiveStatusChange(const unsigned char* data) { const auto* packet = reinterpret_cast(data); switch (packet->type) { case SP_USTR: - reinterpret_cast(g_session.unknown_169C)[0] = packet->value; + reinterpret_cast(g_session.combatStats)[0] = packet->value; break; case SP_UAGI: - reinterpret_cast(g_session.unknown_169C)[1] = packet->value; + reinterpret_cast(g_session.combatStats)[1] = packet->value; break; case SP_UVIT: - reinterpret_cast(g_session.unknown_169C)[2] = packet->value; + reinterpret_cast(g_session.combatStats)[2] = packet->value; break; case SP_UINT: - reinterpret_cast(g_session.unknown_169C)[3] = packet->value; + reinterpret_cast(g_session.combatStats)[3] = packet->value; break; case SP_UDEX: - reinterpret_cast(g_session.unknown_169C)[4] = packet->value; + reinterpret_cast(g_session.combatStats)[4] = packet->value; break; case SP_ULUK: - reinterpret_cast(g_session.unknown_169C)[5] = packet->value; + reinterpret_cast(g_session.combatStats)[5] = packet->value; break; case SP_UPOW: g_session.m_traits.points[0] = packet->value; @@ -405,7 +405,7 @@ void CGameMode::ReceiveStatusChange(const unsigned char* data) { g_session.m_traits.points[5] = packet->value; break; default: - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.statusWnd)) { window->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } return; @@ -413,7 +413,7 @@ void CGameMode::ReceiveStatusChange(const unsigned char* data) { g_session.InvalidateWindowFrames(); - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.statusWnd)) { window->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } } @@ -428,14 +428,14 @@ void CGameMode::ReceiveStatusChangeEffect(const unsigned char* data) { // OFFSET: 0x00D45B90 // FUNCTION: fn_21841 void CGameMode::ReceiveStatusChangeAck(const unsigned char* data) { - this->unknown_02D4 = 0; - UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C4); + this->waitingReqStatusAck = 0; + UIWindow* window = reinterpret_cast(g_windowMgr.statusWnd); const auto* packet = reinterpret_cast(data); if (!packet->result) { return; } - int* bonusStats = reinterpret_cast(g_session.unknown_169C); + int* bonusStats = reinterpret_cast(g_session.combatStats); switch (packet->type) { case SP_STR: g_session.m_standardStats[0] = packet->value; @@ -603,10 +603,10 @@ void CGameMode::ReceiveRodexMailDeleted(const unsigned char* packet) { } if (mail != end) { - mail->second.unknown_0190 = 1; + mail->second.isReturned = 1; if (!mail->second.isRead) { - --g_rodexMailStore->unknown_0018; - if (g_rodexMailStore->unknown_0018 == 0) { + --g_rodexMailStore->unreadCount; + if (g_rodexMailStore->unreadCount == 0) { UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND); if (window) { window->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 476, 0, 0); @@ -616,8 +616,8 @@ void CGameMode::ReceiveRodexMailDeleted(const unsigned char* packet) { } refresh: - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->Invalidate(); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->Invalidate(); } } @@ -667,25 +667,25 @@ void CGameMode::ReceiveRouletteResult(const unsigned char* packet) { break; case GENERATE_ROULETTE_FAILED: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_RECV_ITEM_OVERCOUNT)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.EnableRouletteWnd(); } return; case GENERATE_ROULETTE_NO_ENOUGH_POINT: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_RECV_ITEM_OVERWEIGHT)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.EnableRouletteWnd(); } return; case 4: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_JPN_PERSONALINFO_DEATHMSG)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.EnableRouletteWnd(); } return; case 5: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RODEX_DELETE)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.EnableRouletteWnd(); } return; @@ -741,7 +741,7 @@ void CGameMode::NotifyWindow4F258(int result) { switch (result) { case 0: if (!g_windowMgr.modalWindows.empty() && g_windowMgr.modalWindows.back()) { - g_windowMgr.unknown_0474 = 188; + g_windowMgr.modalResponse = 188; } break; case 1: @@ -807,14 +807,14 @@ void CGameMode::ReceiveBasicInfoResult(unsigned char result) { case 1: case 2: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_USESKILL_FAIL_NEED_CHARMS)), 0xFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); } break; } - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); } } @@ -845,8 +845,8 @@ void CGameMode::ReceiveUnknown0454Result(const unsigned char* data) { break; } - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -907,12 +907,12 @@ void CGameMode::ReceiveActorPairFreeze(const unsigned char* data) { CRenderObject* second = packet->secondAid == g_session.m_aid ? this->scene->player : this->scene->GetGameActorByAID(packet->secondAid); if (first && second) { first->SetFrameSequence(96, 4, 4, 96, 4, 1, 99999999, 0); - first->render.unknown_00A3 = 1; + first->render.colorLocked = 1; first->SetColor(-1, 64, 64, 64); first->render.instant.Set(3, 1); second->render.instant.Set(3, 1); second->render.isMotionFreezed = true; - second->render.unknown_00A3 = 1; + second->render.colorLocked = 1; second->SetColor(-1, 64, 64, 64); } } else { @@ -920,14 +920,14 @@ void CGameMode::ReceiveActorPairFreeze(const unsigned char* data) { CRenderObject* second = packet->secondAid == g_session.m_aid ? this->scene->player : this->scene->GetGameActorByAID(packet->secondAid); if (first) { first->SetFrameSequence(96, 4, 4, 96, 4, 1, 1, 0); - first->render.unknown_00A3 = 0; + first->render.colorLocked = 0; first->SetColor(-1, 255, 255, 255); first->render.instant.Set(3, 0); } if (second) { second->render.isMotionFreezed = false; - second->render.unknown_00A3 = 0; + second->render.colorLocked = 0; second->SetColor(-1, 255, 255, 255); second->render.instant.Set(3, 0); } @@ -982,7 +982,7 @@ void CGameMode::ReceiveActorEffect347(const unsigned char* data) { // OFFSET: 0x00D6E9D0 // FUNCTION: fn_22109 void CGameMode::ReceiveUnknown0294Text(const unsigned char* data) { - std::sprintf(this->unknown_0294, reinterpret_cast(data + 2)); + std::sprintf(this->coupleName, reinterpret_cast(data + 2)); } // OFFSET: 0x00D6E9F0 @@ -1039,9 +1039,9 @@ void CGameMode::ReceiveUnknown7FBC(const unsigned char* data) { const auto* packet = reinterpret_cast(data); if (100 >= packet->value) { - g_session.unknown_7FBC = packet->value; - if (g_windowMgr.unknown_01D4) { - reinterpret_cast(g_windowMgr.unknown_01D4)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + g_session.extraInventorySlots = packet->value; + if (g_windowMgr.itemWnd) { + reinterpret_cast(g_windowMgr.itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } } @@ -1148,16 +1148,16 @@ void CGameMode::ReceivePartyItemPickup(const unsigned char* data) { MessengerMember member = g_session.PartyByAccount(packet->aid); if (packet->aid != g_session.m_aid && member.valid) { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->itemId; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->itemId; + item.identity[3] = 0; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0088 = packet->grade; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.grade = packet->grade; std::string name = item.DisplayName(0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_ITEM_PICKUP_PARTY), member.name.c_str(), name.c_str()).c_str()), 0xFFFF00, 9, 0, 0); @@ -1262,10 +1262,10 @@ struct MessageBoxPacket { struct Item1784Entry { /* 0000 */ int itemId; /* 0004 */ int quantity; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ std::uint32_t unknown_000C; - /* 0010 */ std::uint32_t unknown_0010; - /* 0014 */ std::uint32_t unknown_0014; + /* 0008 */ std::uint32_t purchaseParameter; + /* 000C */ std::uint32_t price; + /* 0010 */ std::uint32_t saleParameter1; + /* 0014 */ std::uint32_t saleParameter2; }; struct Item1784ListPacket { @@ -1317,13 +1317,13 @@ __declspec(noinline) void ReceiveShortcutPage(int position, const ShortcutPagePa g_session.ClearShortcutSlots(); memcpy_s(g_session.m_shortcutSlots, sizeof(g_session.m_shortcutSlots), payload, sizeof(payload->slots)); g_session.ClearSlots06EB(); - g_session.unknown_06EB = payload->slot06EB; - g_session.unknown_06F2 = payload->slot06F2; - base = g_session.unknown_06FC; + g_session.quickSlot = payload->slot06EB; + g_session.alternateQuickSlot = payload->slot06F2; + base = g_session.mainShortcutRow; } else if (bank == 1) { g_session.ClearSecondaryShortcutSlots(); memcpy_s(g_session.m_secondaryShortcutSlots, sizeof(g_session.m_secondaryShortcutSlots), payload, sizeof(payload->slots)); - base = g_session.unknown_06A8; + base = g_session.alternateShortcutRow; } if (g_windowMgr.window_01E8) { @@ -1336,11 +1336,11 @@ __declspec(noinline) void ReceiveShortcutPage(int position, const ShortcutPagePa void CGameMode::ResendMinimapMarkers() { if (g_windowMgr.window_4F1CC) { for (auto it = this->minimapMarkers.begin(); it != this->minimapMarkers.end(); ++it) { - if (0 == it->second.unknown_0006) { + if (0 == it->second.questIconId) { continue; } - g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.unknown_0004, it->second.unknown_0006, it->second.unknown_0000, it->second.unknown_0002); + g_windowMgr.window_4F1CC->SendMsg(nullptr, UM_MINIMAP_ADD_QUEST_MARK, it->second.effectType, it->second.questIconId, it->second.x, it->second.y); } } } @@ -1352,7 +1352,7 @@ void CGameMode::ReceiveJobTitle(unsigned char result, int job) { return; } - g_session.unknown_615C = job; + g_session.jobTitle = job; std::string title = GetJobTitleString(job); CActorNameCard card = this->LookupNameCard(g_session.m_aid); this->nameCard.SetValue4(g_session.m_aid, title); @@ -1415,7 +1415,7 @@ void CGameMode::NotifyCaptchaRegistered() { // FUNCTION: fn_22120 void CGameMode::ReceiveItem1784List(const unsigned char* data) { const auto* packet = reinterpret_cast(data); - if (g_session.unknown_5912 || packet->flag != 0) { + if (g_session.characterRenameEnabled || packet->flag != 0) { return; } @@ -1430,18 +1430,18 @@ void CGameMode::ReceiveItem1784List(const unsigned char* data) { memcpy_s(&entry, sizeof(entry), &packet->entries[i], sizeof(entry)); ITEM_INFO item; - item.unknown_0000[1] = -1; + item.identity[1] = -1; item.SetItemId(entry.itemId); - item.unknown_0078[3] = entry.unknown_0008; + item.saleData[3] = entry.purchaseParameter; item.quantity = entry.quantity; - item.unknown_0014[0] = entry.unknown_000C; - item.unknown_0078[1] = entry.unknown_0010; - item.unknown_0078[2] = entry.unknown_0014; - item.unknown_0064 = 8; + item.prices[0] = entry.price; + item.saleData[1] = entry.saleParameter1; + item.saleData[2] = entry.saleParameter2; + item.bindOnEquip = 8; item.identified = 1; item.GetIdDisplayName(name, capacity, 0); item.SetName(name); - g_session.unknown_1784[9].push_back(item); + g_session.inventoryCategories[9].push_back(item); } UIWindow* window = g_windowMgr.LookupWindow(WID_CASHSHOP_WND); @@ -1466,8 +1466,8 @@ void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_COMPOUNDING_SUCCEESS)), 0xFFFF00, 0, 0, 0); ITEM_INFO card = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->cardIndex); ITEM_INFO equip = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->equipIndex); - if (equip.unknown_0000[1] != 0 && card.unknown_0000[1] != 0) { - int* cards = reinterpret_cast(equip.unknown_001C); + if (equip.identity[1] != 0 && card.identity[1] != 0) { + int* cards = reinterpret_cast(equip.cards); for (int i = 0; i < 4; ++i) { if (cards[i] == 0) { cards[i] = std::atoi(card.itemId.c_str()); @@ -1491,8 +1491,8 @@ void CGameMode::ReceiveCardCompositionResult(const unsigned char* data) { void CGameMode::ReceiveRefineResult(const unsigned char* data) { const auto* packet = reinterpret_cast(data); ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); - if (item.unknown_0000[1] != 0) { - item.unknown_0060 = packet->refine; + if (item.identity[1] != 0) { + item.refiningLevel = packet->refine; g_session.UpdateInventoryItem(item, 1); } @@ -1531,7 +1531,7 @@ void CGameMode::ReceiveRefineResult(const unsigned char* data) { } ITEM_INFO refined = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); - refined.unknown_0060 = packet->refine; + refined.refiningLevel = packet->refine; g_session.UpdateInventoryItem(refined, 1); } @@ -1685,7 +1685,7 @@ void CGameMode::ReceiveRouletteInfo(const unsigned char* packet) { g_rouletteMgr->SetResult(static_cast(g_rouletteMgr->m_index), 1, 0); } - if (!g_windowMgr.unknown_0464) { + if (!g_windowMgr.roulletteWnd) { g_windowMgr.EnsureWindow(WID_ROULLETTEWND); } } @@ -1873,10 +1873,10 @@ void CGameMode::ReceiveStorageClose(const AchievementStatePacket* packet) { // OFFSET: 0x00D6C460 // FUNCTION: fn_22081 void CGameMode::ReceiveAchievementList(int count, int unknown01738784, short unknown01738788, int completed, int total, const AchievementRecordPacket* packets) { - g_session.unknown_614C = unknown01738784; - g_session.unknown_6150 = unknown01738788; - g_session.unknown_6154 = completed; - g_session.unknown_6158 = total; + g_session.achievementScore = unknown01738784; + g_session.achievementLevel = unknown01738788; + g_session.achievementCompleted = completed; + g_session.achievementTotal = total; for (int i = 0; i < count; ++i) { g_session.UpdateRecord6144(packets[i]); @@ -1943,7 +1943,7 @@ void CGameMode::ReceiveRouletteClose(const unsigned char* packet) { switch (reinterpret_cast(packet)->value) { case CLOSE_ROULETTE_SUCCESS: g_rouletteMgr->Reset(); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.CloseWindow(WID_ROULLETTEWND); } break; @@ -1986,7 +1986,7 @@ void CGameMode::ReceiveRouletteOpen(const unsigned char* packet) { const auto* open = reinterpret_cast(packet); switch (open->result) { case OPEN_ROULETTE_SUCCESS: - g_rouletteMgr->unknown_0004 = open->serial; + g_rouletteMgr->m_serial = open->serial; g_rouletteMgr->m_stage = open->stage; g_rouletteMgr->SetAdditionItem(open->additionItemId); g_rouletteMgr->m_goldPoint = open->goldPoint; @@ -2002,7 +2002,7 @@ void CGameMode::ReceiveRouletteOpen(const unsigned char* packet) { PacketIdOnly request; request.id = 0xA1B; GetRagConnection().Send(g_packetLengths.FixedLength(request.id), &request); - } else if (!g_windowMgr.unknown_0464) { + } else if (!g_windowMgr.roulletteWnd) { g_windowMgr.EnsureWindow(WID_ROULLETTEWND); } break; @@ -2017,13 +2017,13 @@ void CGameMode::ReceiveRouletteOpen(const unsigned char* packet) { void CGameMode::ReceiveRodexOpen(const unsigned char* packet) { const auto* open = reinterpret_cast(packet); if (open->result == 1) { - if (!g_windowMgr.unknown_0458) { + if (!g_windowMgr.rodexComposeWnd) { g_session.RestoreItems5C68(); g_session.ClearItemQuantities(); g_windowMgr.EnsureWindow(WID_RODEXCOMPOSEWND); const char* text = open->text; if (text) { - reinterpret_cast(g_windowMgr.unknown_0458)->SetContentsText(text); + reinterpret_cast(g_windowMgr.rodexComposeWnd)->SetContentsText(text); } } } else { @@ -2064,7 +2064,7 @@ void CGameMode::ReceiveStackedItemReturn(const unsigned char* packet) { const auto* result = reinterpret_cast(packet); if (result->result == 1) { g_session.ReturnStackedItem(result->index, result->count); - g_session.unknown_6140 = result->value; + g_session.achievementResult = result->value; } else { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_JOINED_IN_CLAN)), 0x64FFFF, 0, 0, 0); } @@ -2074,8 +2074,8 @@ void CGameMode::ReceiveStackedItemReturn(const unsigned char* packet) { // FUNCTION: fn_22095 void CGameMode::ReceiveRodexRecipient(int id, unsigned short job, unsigned short level, const char* name) { if (id) { - if (g_windowMgr.unknown_0458) { - reinterpret_cast(g_windowMgr.unknown_0458)->SetRecipient(id, job, level, name); + if (g_windowMgr.rodexComposeWnd) { + reinterpret_cast(g_windowMgr.rodexComposeWnd)->SetRecipient(id, job, level, name); } } else { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_TAIWAN_PERSONALINFO_DEATHMSG)), 0x64FFFF, 0, 0, 0); @@ -2163,20 +2163,20 @@ void CGameMode::ReceiveItemSlotAddOptions(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = packet->type; + item.identity[0] = packet->type; item.SetItemId(packet->itemId); item.quantity = packet->slot; - item.unknown_005D = packet->damaged; + item.damaged = packet->damaged; item.identified = packet->identified; - item.unknown_0060 = packet->refine; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0000[1] = 0xFFFFFFFF; - item.unknown_0098 = CountItemSlotOptions(packet->options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + item.refiningLevel = packet->refine; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); + item.identity[1] = 0xFFFFFFFF; + item.optionCount = CountItemSlotOptions(packet->options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet->options[index]; } - item.unknown_0000[2] = packet->expireTime; - item.unknown_0070 = packet->bindType; + item.identity[2] = packet->expireTime; + item.sprite = packet->bindType; g_session.AddItemSlot(item); } @@ -2194,21 +2194,21 @@ void CGameMode::ReceiveItemSlotAddGrade(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = packet->type; + item.identity[0] = packet->type; item.SetItemId(packet->itemId); item.quantity = packet->slot; - item.unknown_005D = packet->damaged; + item.damaged = packet->damaged; item.identified = packet->identified; - item.unknown_0060 = packet->refine; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0000[1] = 0xFFFFFFFF; - item.unknown_0098 = CountItemSlotOptions(packet->options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + item.refiningLevel = packet->refine; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); + item.identity[1] = 0xFFFFFFFF; + item.optionCount = CountItemSlotOptions(packet->options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet->options[index]; } - item.unknown_0000[2] = packet->expireTime; - item.unknown_0070 = packet->bindType; - item.unknown_0088 = packet->grade; + item.identity[2] = packet->expireTime; + item.sprite = packet->bindType; + item.grade = packet->grade; g_session.AddItemSlot(item); } @@ -2236,11 +2236,11 @@ void CGameMode::ReceiveItemOptionsRefresh(const unsigned char* data) { } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); - if (item.unknown_0000[1] != 0) { - item.unknown_0060 = packet->refine; - item.unknown_0098 = CountItemSlotOptions(packet->options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + if (item.identity[1] != 0) { + item.refiningLevel = packet->refine; + item.optionCount = CountItemSlotOptions(packet->options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet->options[index]; } g_session.UpdateInventoryItem(item, 1); } @@ -2493,8 +2493,8 @@ void CGameMode::ReceiveTypedNotice(const unsigned char* data) { // OFFSET: 0x00D6BE80 // FUNCTION: fn_22076 void CGameMode::ReceiveRodexMailReturn(const unsigned char* data) { - if (g_windowMgr.unknown_045C) { - reinterpret_cast(g_windowMgr.unknown_045C)->SetZenyButtonDisabled(0); + if (g_windowMgr.rodexContentsWnd) { + reinterpret_cast(g_windowMgr.rodexContentsWnd)->SetZenyButtonDisabled(0); } const auto* packet = reinterpret_cast(data); @@ -2507,25 +2507,25 @@ void CGameMode::ReceiveRodexMailReturn(const unsigned char* data) { case MAIL_INBOX_NORMAL: mail = g_rodexMailStore->m_mails0.find(packet->mailId); if (mail != g_rodexMailStore->m_mails0.end()) { - mail->second.unknown_0001 -= 2; + mail->second.type -= 2; } break; case MAIL_INBOX_ACCOUNT: mail = g_rodexMailStore->m_mails1.find(packet->mailId); if (mail != g_rodexMailStore->m_mails1.end()) { - mail->second.unknown_0001 -= 2; + mail->second.type -= 2; } break; case MAIL_INBOX_RETURNED: mail = g_rodexMailStore->m_mails2.find(packet->mailId); if (mail != g_rodexMailStore->m_mails2.end()) { - mail->second.unknown_0001 -= 2; + mail->second.type -= 2; } break; } - if (g_windowMgr.unknown_045C) { - reinterpret_cast(g_windowMgr.unknown_045C)->DisableZenyButton(); + if (g_windowMgr.rodexContentsWnd) { + reinterpret_cast(g_windowMgr.rodexContentsWnd)->DisableZenyButton(); } break; } @@ -2624,8 +2624,8 @@ void CGameMode::ReceiveExtraInventoryResult(const unsigned char* data) { int message; switch (packet->result) { case 0: { - const int nextSlots = g_session.unknown_7FBC + 110; - const int slots = g_session.unknown_7FBC + 100; + const int nextSlots = g_session.extraInventorySlots + 110; + const int slots = g_session.extraInventorySlots + 100; const char* name = FindItemDescription(packet->itemId).identifiedName; const int answer = g_windowMgr.Confirm( FormatOwnedString(LookupMessage(MSI_INVENTORY_EXTEND_FAILED_NO_ITEM), name, slots, nextSlots).c_str(), 2, false, false, 0, "Message", 280, 120, 0); @@ -2663,7 +2663,7 @@ void CGameMode::ReceiveWindow348Result(unsigned char result, std::int16_t index) g_windowMgr.CloseWindow(WID_ITEMREFORMWND); g_effectMgr->Spawn(g_session.m_aid, 1608, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - if (item.unknown_0000[1] <= 0) { + if (item.identity[1] <= 0) { return; } UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); @@ -2685,8 +2685,8 @@ void CGameMode::ReceiveWindow348Result(unsigned char result, std::int16_t index) // OFFSET: 0x00D69E60 // FUNCTION: fn_22056 void CGameMode::ReceiveRodexItemReturn(const unsigned char* data) { - if (g_windowMgr.unknown_045C) { - reinterpret_cast(g_windowMgr.unknown_045C)->SetItemButtonDisabled(0); + if (g_windowMgr.rodexContentsWnd) { + reinterpret_cast(g_windowMgr.rodexContentsWnd)->SetItemButtonDisabled(0); } const auto* packet = reinterpret_cast(data); @@ -2700,30 +2700,30 @@ void CGameMode::ReceiveRodexItemReturn(const unsigned char* data) { case MAIL_INBOX_NORMAL: mail = g_rodexMailStore->m_mails0.find(packet->mailId); if (mail != g_rodexMailStore->m_mails0.end()) { - mail->second.unknown_0001 -= 4; + mail->second.type -= 4; } break; case MAIL_INBOX_ACCOUNT: mail = g_rodexMailStore->m_mails1.find(packet->mailId); if (mail != g_rodexMailStore->m_mails1.end()) { - mail->second.unknown_0001 -= 4; + mail->second.type -= 4; } break; case MAIL_INBOX_RETURNED: mail = g_rodexMailStore->m_mails2.find(packet->mailId); if (mail != g_rodexMailStore->m_mails2.end()) { - mail->second.unknown_0001 -= 4; + mail->second.type -= 4; } break; } - if (g_windowMgr.unknown_045C) { - auto* contents = reinterpret_cast(g_windowMgr.unknown_045C); + if (g_windowMgr.rodexContentsWnd) { + auto* contents = reinterpret_cast(g_windowMgr.rodexContentsWnd); contents->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); contents->DisableItemButton(); } - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } break; } @@ -3031,7 +3031,7 @@ void CGameMode::ReceiveTradeItemFilter(const unsigned char* data) { const int count = g_session.GetList0Size(); for (int i = 0; i < count; ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } if (packet->type == 1 && !this->IsEffectId994Group(std::atoi(item.itemId.c_str()))) { @@ -3040,16 +3040,16 @@ void CGameMode::ReceiveTradeItemFilter(const unsigned char* data) { if (packet->type == 2 && !this->IsEffectId990Group(std::atoi(item.itemId.c_str()))) { continue; } - if (item.unknown_0000[1] == g_session.unknown_16EC) { + if (item.identity[1] == g_session.equippedArrowIndex) { continue; } RawItemBasic raw = {}; - raw.id = item.unknown_0000[1]; + raw.id = item.identity[1]; strcpy_s(raw.itemId, sizeof(raw.itemId), item.itemId.c_str()); - raw.unknown_000C = item.unknown_0000[0]; + raw.type = item.identity[0]; raw.identified = item.identified; - raw.unknown_0004 = 1; - raw.unknown_0008 = 2; + raw.price = 1; + raw.realPrice = 2; g_session.AddItem1718(raw, 1); } UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMSHOPWND2); @@ -3062,9 +3062,9 @@ void CGameMode::ReceiveTradeItemFilter(const unsigned char* data) { // FUNCTION: fn_21623 void CGameMode::ReceiveExchangeItemAddAck(const unsigned char* data) { const auto* packet = reinterpret_cast(data); - int& exchangeAmount = *reinterpret_cast(&this->unknown_0100[0x10]); - *reinterpret_cast(&this->unknown_0100[0x00]) = 0; - this->unknown_05CE = 1; + int& exchangeAmount = *reinterpret_cast(&this->equipmentRequestState[0x10]); + *reinterpret_cast(&this->equipmentRequestState[0x00]) = 0; + this->inventoryChanged = 1; switch (packet->result) { case EXITEM_ADD_SUCCEED: if (packet->index != 0) { @@ -3075,7 +3075,7 @@ void CGameMode::ReceiveExchangeItemAddAck(const unsigned char* data) { g_session.m_zeny -= exchangeAmount; g_session.RefreshHpSpWindows(); g_session.InvalidateWindowFrames(); - g_session.SetUnknown5210(g_session.unknown_5210 + exchangeAmount); + g_session.SetUnknown5210(g_session.exchangeMoney + exchangeAmount); } break; case EXITEM_ADD_FAILED_OVERWEIGHT: @@ -3101,7 +3101,7 @@ void CGameMode::ReceiveExchangeRequestAck2(const unsigned char* data) { switch (packet->result) { case TRADE_ACK_ACCEPT: { this->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); - *reinterpret_cast(&this->unknown_0100[0x14]) = 1; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 1; g_session.ResetSlots(); g_session.ClearItemSlotQuantities(); g_windowMgr.CloseWindow(WID_EXCHANGEUI); @@ -3143,7 +3143,7 @@ void CGameMode::ReceiveExchangeRequestAck(const unsigned char* data) { switch (packet->result) { case TRADE_ACK_ACCEPT: { this->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); - *reinterpret_cast(&this->unknown_0100[0x14]) = 1; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 1; g_session.ResetSlots(); g_session.ClearItemSlotQuantities(); g_windowMgr.CloseWindow(WID_EXCHANGEUI); @@ -3175,10 +3175,10 @@ void CGameMode::ReceiveExchangeRequestAck(const unsigned char* data) { #pragma pack(push, 1) struct GuildStorageLogPacketEntry { - /* 0000 */ int unknown_0000; + /* 0000 */ int logId; /* 0004 */ int itemId; - /* 0008 */ int unknown_0008; - /* 000C */ unsigned char unknown_000C; + /* 0008 */ int quantity; + /* 000C */ unsigned char operation; /* 000D */ int refine; /* 0011 */ unsigned char unknown_0011[8]; /* 0019 */ unsigned char identified; @@ -3186,7 +3186,7 @@ struct GuildStorageLogPacketEntry { /* 001C */ unsigned char cards[16]; /* 002C */ char name[24]; /* 0044 */ char date[24]; - /* 005C */ unsigned char unknown_005C; + /* 005C */ unsigned char highlighted; }; struct GuildStorageLogPacket { @@ -3206,66 +3206,66 @@ void CGameMode::ReceiveGuildStorageLog(const unsigned char* data) { for (int i = 0; i < packet->count; ++i) { const GuildStorageLogPacketEntry& source = packet->entries[i]; ITEM_INFO item; - item.unknown_00B8[0] = source.unknown_0000; - item.unknown_00B8[1] = source.unknown_0008; - item.unknown_00C0 = source.unknown_000C; - std::strcpy(reinterpret_cast(item.unknown_00C1), source.name); - std::strcpy(reinterpret_cast(item.unknown_00D9), source.date); + item.recordIds[0] = source.logId; + item.recordIds[1] = source.quantity; + item.recordType = source.operation; + std::strcpy(reinterpret_cast(item.recordName), source.name); + std::strcpy(reinterpret_cast(item.recordDate), source.date); char number[16] = {}; item.itemId = _itoa(source.itemId, number, 10); item.identified = source.identified; - item.unknown_0000[0] = source.count; - item.unknown_0060 = source.refine; - std::memcpy(item.unknown_001C, source.cards, sizeof(source.cards)); + item.identity[0] = source.count; + item.refiningLevel = source.refine; + std::memcpy(item.cards, source.cards, sizeof(source.cards)); GuildStorageLogEntry entry; - entry.unknown_0000 = item.unknown_00B8[0]; - entry.unknown_0004 = item.unknown_00B8[1]; - entry.unknown_0008 = item.unknown_00C0; - std::strcpy(entry.unknown_0009, reinterpret_cast(item.unknown_00C1)); - std::strcpy(entry.unknown_0021, reinterpret_cast(item.unknown_00D9)); - entry.unknown_003C = item.DisplayName(0); - entry.unknown_0054 = item.identified; - entry.unknown_0058 = item.unknown_0000[0]; - entry.unknown_005C = item.unknown_0060; - std::memcpy(entry.unknown_0060, item.unknown_001C, sizeof(entry.unknown_0060)); - entry.unknown_0070 = source.unknown_005C; + entry.logId = item.recordIds[0]; + entry.quantity = item.recordIds[1]; + entry.operation = item.recordType; + std::strcpy(entry.characterName, reinterpret_cast(item.recordName)); + std::strcpy(entry.timestamp, reinterpret_cast(item.recordDate)); + entry.itemName = item.DisplayName(0); + entry.identified = item.identified; + entry.itemType = item.identity[0]; + entry.refineLevel = item.refiningLevel; + std::memcpy(entry.cards, item.cards, sizeof(entry.cards)); + entry.category = source.highlighted; g_guildStorageLogs[0].push_back(entry); } } else if (packet->result == 1) { for (int i = 0; i < packet->count; ++i) { const GuildStorageLogPacketEntry& source = packet->entries[i]; ITEM_INFO item; - item.unknown_00B8[0] = source.unknown_0000; - item.unknown_00B8[1] = source.unknown_0008; - item.unknown_00C0 = source.unknown_000C; - std::strcpy(reinterpret_cast(item.unknown_00C1), source.name); - std::strcpy(reinterpret_cast(item.unknown_00D9), source.date); + item.recordIds[0] = source.logId; + item.recordIds[1] = source.quantity; + item.recordType = source.operation; + std::strcpy(reinterpret_cast(item.recordName), source.name); + std::strcpy(reinterpret_cast(item.recordDate), source.date); char number[16] = {}; item.itemId = _itoa(source.itemId, number, 10); item.identified = source.identified; - item.unknown_0000[0] = source.count; - item.unknown_0060 = source.refine; - std::memcpy(item.unknown_001C, source.cards, sizeof(source.cards)); + item.identity[0] = source.count; + item.refiningLevel = source.refine; + std::memcpy(item.cards, source.cards, sizeof(source.cards)); GuildStorageLogEntry entry; - entry.unknown_0000 = item.unknown_00B8[0]; - entry.unknown_0004 = item.unknown_00B8[1]; - entry.unknown_0008 = item.unknown_00C0; - std::strcpy(entry.unknown_0009, reinterpret_cast(item.unknown_00C1)); - std::strcpy(entry.unknown_0021, reinterpret_cast(item.unknown_00D9)); - entry.unknown_003C = item.DisplayName(0); - entry.unknown_0054 = item.identified; - entry.unknown_0058 = item.unknown_0000[0]; - entry.unknown_005C = item.unknown_0060; - std::memcpy(entry.unknown_0060, item.unknown_001C, sizeof(entry.unknown_0060)); - entry.unknown_0070 = source.unknown_005C; + entry.logId = item.recordIds[0]; + entry.quantity = item.recordIds[1]; + entry.operation = item.recordType; + std::strcpy(entry.characterName, reinterpret_cast(item.recordName)); + std::strcpy(entry.timestamp, reinterpret_cast(item.recordDate)); + entry.itemName = item.DisplayName(0); + entry.identified = item.identified; + entry.itemType = item.identity[0]; + entry.refineLevel = item.refiningLevel; + std::memcpy(entry.cards, item.cards, sizeof(entry.cards)); + entry.category = source.highlighted; g_guildStorageLogs[0].push_back(entry); } GuildStorageLogEntry pivot; std::sort(g_guildStorageLogs[0].begin(), g_guildStorageLogs[0].end(), [&pivot](const GuildStorageLogEntry& left, const GuildStorageLogEntry& right) { - return std::strcmp(left.unknown_0021, right.unknown_0021) > 0; + return std::strcmp(left.timestamp, right.timestamp) > 0; }); for (auto it = g_guildStorageLogs[0].begin(); it != g_guildStorageLogs[0].end(); ++it) { - if (it->unknown_0008 == 1) { + if (it->operation == 1) { g_guildStorageLogs[1].push_back(*it); } else { g_guildStorageLogs[2].push_back(*it); @@ -3297,17 +3297,17 @@ void CGameMode::ReceiveStorageEquipList(const unsigned char* data) { const auto* record = reinterpret_cast(data + sizeof(StorageListHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.quantity = 1; item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->damaged; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; + item.damaged = record->damaged; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; g_session.AddItem1738(item, 0); } @@ -3323,19 +3323,19 @@ void CGameMode::ReceiveStorageEquipList2(const unsigned char* data) { const auto* record = reinterpret_cast(data + sizeof(StorageListHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.quantity = 1; item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->damaged; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->sprite; + item.damaged = record->damaged; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->sprite; g_session.AddItem1738(item, 0); } @@ -3356,20 +3356,20 @@ void CGameMode::ReceiveStorageEquipList3(const unsigned char* data) { const auto* record = reinterpret_cast(data + sizeof(NamedStorageListHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = (record->flags >> 1) & 1; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->sprite; - item.unknown_0074[0] = (record->flags >> 2) & 1; + item.damaged = (record->flags >> 1) & 1; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->sprite; + item.flags[0] = (record->flags >> 2) & 1; g_session.AddItem1738(item, 0); } @@ -3396,24 +3396,24 @@ void CGameMode::ReceiveStorageEquipList4(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = record.type; - item.unknown_0000[2] = record.location; - item.unknown_0000[1] = record.index; - item.unknown_0000[3] = record.wearState; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + item.identity[0] = record.type; + item.identity[2] = record.location; + item.identity[1] = record.index; + item.identity[3] = record.wearState; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.quantity = 1; item.SetItemId(record.itemId); item.identified = record.flags & 1; - item.unknown_005D = (record.flags >> 1) & 1; - item.unknown_0060 = record.refine; - item.unknown_0068 = record.expireTime; - item.unknown_0064 = record.bindOnEquip; - item.unknown_0070 = record.sprite; - item.unknown_0074[0] = (record.flags >> 2) & 1; - item.unknown_0098 = CountItemSlotOptions(options); - item.unknown_0088 = 0; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = (record.flags >> 1) & 1; + item.refiningLevel = record.refine; + item.expireTime = record.expireTime; + item.bindOnEquip = record.bindOnEquip; + item.sprite = record.sprite; + item.flags[0] = (record.flags >> 2) & 1; + item.optionCount = CountItemSlotOptions(options); + item.grade = 0; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } g_session.AddItem1738(item, 0); } @@ -3441,24 +3441,24 @@ void CGameMode::ReceiveStorageEquipList5(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.quantity = 1; item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = (record->flags >> 1) & 1; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->sprite; - item.unknown_0074[0] = (record->flags >> 2) & 1; - item.unknown_0098 = CountItemSlotOptions(options); - item.unknown_0088 = 0; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = (record->flags >> 1) & 1; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->sprite; + item.flags[0] = (record->flags >> 2) & 1; + item.optionCount = CountItemSlotOptions(options); + item.grade = 0; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } g_session.AddItem1738(item, 0); } @@ -3480,18 +3480,18 @@ void CGameMode::ReceiveStorageNormalList(const unsigned char* data) { const auto* record = reinterpret_cast(data + sizeof(NamedStorageListHeader)); for (unsigned int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; - item.unknown_0000[2] = 0; + item.identity[0] = record->type; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); + item.identity[1] = record->index; + item.identity[3] = record->wearState; + item.identity[2] = 0; item.quantity = record->amount; item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0074[0] = (record->flags >> 1) & 1; - item.unknown_0068 = record->expireTime; - item.unknown_0060 = 0; + item.flags[0] = (record->flags >> 1) & 1; + item.expireTime = record->expireTime; + item.refiningLevel = 0; g_session.AddItem1738(item, 0); } @@ -3512,18 +3512,18 @@ void CGameMode::ReceiveStorageNormalList2(const unsigned char* data) { const auto* record = reinterpret_cast(data + sizeof(NamedStorageListHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; - item.unknown_0000[2] = 0; + item.identity[0] = record->type; + std::memcpy(item.cards, record->cards, sizeof(record->cards)); + item.identity[1] = record->index; + item.identity[3] = record->wearState; + item.identity[2] = 0; item.quantity = record->amount; item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0074[0] = (record->flags >> 1) & 1; - item.unknown_0068 = record->expireTime; - item.unknown_0060 = 0; + item.flags[0] = (record->flags >> 1) & 1; + item.expireTime = record->expireTime; + item.refiningLevel = 0; g_session.AddItem1738(item, 0); } @@ -3534,11 +3534,11 @@ void CGameMode::ReceiveStorageNormalList2(const unsigned char* data) { // FUNCTION: fn_22094 void CGameMode::ReceiveItemUpgrade(std::uint16_t index, std::uint16_t refine, ItemCardSlots cards, ItemSlotOptions options) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - item.unknown_0060 = refine; - std::memcpy(item.unknown_001C, cards.cards, sizeof(cards.cards)); - item.unknown_0098 = CountItemSlotOptions(options.options); - for (int i = 0; i < item.unknown_0098; ++i) { - reinterpret_cast(item.unknown_009C)[i] = options.options[i]; + item.refiningLevel = refine; + std::memcpy(item.cards, cards.cards, sizeof(cards.cards)); + item.optionCount = CountItemSlotOptions(options.options); + for (int i = 0; i < item.optionCount; ++i) { + reinterpret_cast(item.options)[i] = options.options[i]; } g_session.UpdateInventoryItem(item, 1); if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)) { @@ -3549,10 +3549,10 @@ void CGameMode::ReceiveItemUpgrade(std::uint16_t index, std::uint16_t refine, It // OFFSET: 0x00D6E640 // FUNCTION: fn_22103 void CGameMode::ReceiveFeedConfig(unsigned char state, unsigned char option) { - *reinterpret_cast(g_session.unknown_5974) = state; + *reinterpret_cast(g_session.equipmentViewState) = state; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(state + 0x54E)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); @@ -3562,10 +3562,10 @@ void CGameMode::ReceiveFeedConfig(unsigned char state, unsigned char option) { // OFFSET: 0x00D6E6F0 // FUNCTION: fn_22104 void CGameMode::ReceiveFeedConfig2(unsigned char state, unsigned char option, bool petAutoFeed) { - *reinterpret_cast(g_session.unknown_5974) = state; + *reinterpret_cast(g_session.equipmentViewState) = state; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(state + 0x54E)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); @@ -3576,10 +3576,10 @@ void CGameMode::ReceiveFeedConfig2(unsigned char state, unsigned char option, bo // OFFSET: 0x00D6E7A0 // FUNCTION: fn_22105 void CGameMode::ReceiveFeedConfig3(unsigned char state, unsigned char option, bool petAutoFeed, bool homunculusAutoFeed) { - *reinterpret_cast(g_session.unknown_5974) = state; + *reinterpret_cast(g_session.equipmentViewState) = state; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(state + 0x54E)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); @@ -3591,27 +3591,27 @@ void CGameMode::ReceiveFeedConfig3(unsigned char state, unsigned char option, bo // OFFSET: 0x00D6E860 // FUNCTION: fn_22106 void CGameMode::ReceiveFeedConfig4(unsigned char state, unsigned char option, bool petAutoFeed, bool homunculusAutoFeed, int value) { - *reinterpret_cast(g_session.unknown_5974) = state; + *reinterpret_cast(g_session.equipmentViewState) = state; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(state + 0x54E)), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } g_serviceOptions.Set(231, option); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(option + 0xBA2)), 0x64FFFF, 0, 0, 0); g_windowMgr.RefreshGameSettingOption(231); g_session.SetPetAutoFeed(petAutoFeed); g_session.SetHomunculusAutoFeed(homunculusAutoFeed); - *reinterpret_cast(g_session.unknown_8128) = value; + *reinterpret_cast(g_session.feedOptions) = value; } // OFFSET: 0x00D713E0 // FUNCTION: fn_22133 void CGameMode::ReceiveLongParChange(const unsigned char* data) { const auto* packet = reinterpret_cast(data); - std::int64_t& exp = *reinterpret_cast(&g_session.unknown_162C[0x04]); - std::int64_t& nextExp = *reinterpret_cast(&g_session.unknown_162C[0x0C]); - std::int64_t& nextJobExp = *reinterpret_cast(&g_session.unknown_162C[0x14]); - std::int64_t& jobExp = *reinterpret_cast(&g_session.unknown_162C[0x1C]); + std::int64_t& exp = *reinterpret_cast(&g_session.playerExperienceState[0x04]); + std::int64_t& nextExp = *reinterpret_cast(&g_session.playerExperienceState[0x0C]); + std::int64_t& nextJobExp = *reinterpret_cast(&g_session.playerExperienceState[0x14]); + std::int64_t& jobExp = *reinterpret_cast(&g_session.playerExperienceState[0x1C]); bool refresh = true; switch (packet->type) { case SP_BASEEXP: @@ -3633,8 +3633,8 @@ void CGameMode::ReceiveLongParChange(const unsigned char* data) { jobExp = packet->value; break; case SP_ZENY: - if (*reinterpret_cast(&this->unknown_0100[0x14])) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14])) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.m_zeny = static_cast(packet->value); @@ -3654,8 +3654,8 @@ void CGameMode::ReceiveLongParChange(const unsigned char* data) { g_session.InvalidateWindowFrames(); } - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->baseExpBar)->SetValues(exp, nextExp); - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->jobExpBar)->SetValues(jobExp, nextJobExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->baseExpBar)->SetValues(exp, nextExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->jobExpBar)->SetValues(jobExp, nextJobExp); } // OFFSET: 0x00D73A10 @@ -3741,7 +3741,7 @@ void CGameMode::ReceiveNotifyEffect(const unsigned char* packet) { } if (g_session.IsMercenaryJob(gameActor->GetEffectiveJob(-1)) && *reinterpret_cast(packet + 6) == EF_HO_UP) { - ++gameActor->unknown_0210; + ++gameActor->characterLevel; gameActor->ResetJobEffects(); gameActor->UpdateMaxLevelAura(); } @@ -3752,9 +3752,9 @@ void CGameMode::ReceiveNotifyEffect(const unsigned char* packet) { #pragma pack(push, 1) struct TypedItemEntry { /* 0000 */ int itemId; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint16_t unknown_0008; - /* 000A */ std::uint32_t unknown_000A; + /* 0004 */ std::uint32_t price; + /* 0008 */ std::uint16_t viewId; + /* 000A */ std::uint32_t equipLocation; }; struct TypedItemListPacket { @@ -3779,26 +3779,26 @@ void CGameMode::ReceiveTypedItemList(const unsigned char* data) { const int itemId = entry.itemId; char name[256]; ITEM_INFO item; - item.unknown_0000[1] = -1; - item.unknown_0014[0] = entry.unknown_0004; - item.unknown_0014[1] = entry.unknown_0004; - item.unknown_0000[0] = 4; + item.identity[1] = -1; + item.prices[0] = entry.price; + item.prices[1] = entry.price; + item.identity[0] = 4; item.identified = 1; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; std::uint16_t type = packet->type; if (type == 8) { type = 0xFFFF; } - item.unknown_0070 = entry.unknown_0008; - item.unknown_0000[2] = entry.unknown_000A; - item.unknown_0064 = type; + item.sprite = entry.viewId; + item.identity[2] = entry.equipLocation; + item.bindOnEquip = type; item.SetItemId(itemId); int capacity = sizeof(name); item.GetIdDisplayName(name, capacity, 0); item.SetName(name); if (static_cast(packet->type) <= 10) { - g_session.unknown_1784[packet->type].push_back(item); + g_session.inventoryCategories[packet->type].push_back(item); } } } @@ -3827,11 +3827,11 @@ void CGameMode::ReceiveVendingItemList( const VendingItemRecord record = records[i]; ITEM_INFO item; ++i; - item.unknown_0014[0] = record.price; - item.unknown_0014[1] = record.price; + item.prices[0] = record.price; + item.prices[1] = record.price; item.quantity = record.amount; - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = i; + item.identity[0] = record.type; + item.identity[1] = i; item.identified = 1; item.SetItemId(record.itemId); g_session.AddItem1758(item); @@ -3852,11 +3852,11 @@ void CGameMode::ReceiveVendingItemList( const VendingItemRecord record = records[i]; ITEM_INFO item; ++i; - item.unknown_0014[0] = record.price; - item.unknown_0014[1] = record.price; + item.prices[0] = record.price; + item.prices[1] = record.price; item.quantity = record.amount; - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = i; + item.identity[0] = record.type; + item.identity[1] = i; item.identified = 1; item.SetItemId(record.itemId); g_session.AddItem1748(item); @@ -3870,7 +3870,7 @@ void CGameMode::ReceiveVendingItemList( UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMPURCHASEWND_MODE_1); window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); window->SendMsg(nullptr, UM_SETNAID, aid, storeId, 0, 0); - UIWindow* list = reinterpret_cast(g_windowMgr.unknown_0420); + UIWindow* list = reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd); if (list) { g_session.RefreshItems1750(); } else { @@ -3881,7 +3881,7 @@ void CGameMode::ReceiveVendingItemList( } } - this->unknown_024C = 1; + this->isOnQuest = 1; } #pragma pack(push, 1) @@ -3903,22 +3903,22 @@ struct VendingItemRecord2 { // INLINED static __forceinline void FillVendingItem(ITEM_INFO& item, const VendingItemRecord2& record) { - item.unknown_0000[1] = record.index; - item.unknown_0014[0] = record.price; - item.unknown_0014[1] = record.price; - item.unknown_0000[0] = record.type; + item.identity[1] = record.index; + item.prices[0] = record.price; + item.prices[1] = record.price; + item.identity[0] = record.type; item.quantity = record.amount; item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; + item.damaged = record.damaged; + item.refiningLevel = record.refine; item.SetItemId(record.itemId); - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); - item.unknown_0098 = CountItemSlotOptions(record.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); + item.optionCount = CountItemSlotOptions(record.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } - item.unknown_0000[2] = record.location; - item.unknown_0070 = record.sprite; + item.identity[2] = record.location; + item.sprite = record.sprite; } // OFFSET: 0x00D47720 @@ -3931,11 +3931,11 @@ void CGameMode::ReceiveVendingItemSoldNow(const unsigned char* data) { // OFFSET: 0x00D6C410 // FUNCTION: fn_22080 void CGameMode::ReceiveTraitStatusChangeAck(unsigned char result, unsigned short statusId, unsigned char value) { - this->unknown_02D4 = 0; + this->waitingReqStatusAck = 0; if (result == 1) { std::map& traitStats = g_session.m_traits.stats; traitStats[statusId] = value; - if (UIStatusWnd* window = reinterpret_cast(g_windowMgr.unknown_01C4)) { + if (UIStatusWnd* window = reinterpret_cast(g_windowMgr.statusWnd)) { window->ValidatePlacement(); } } @@ -3961,7 +3961,7 @@ void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int coun window->SendMsg(nullptr, UM_SETNAID, aid, 0, 0, 0); window->SetDuration(duration); } - this->unknown_024C = 1; + this->isOnQuest = 1; } else { g_session.ClearItems1748(); g_session.ClearItems1760(); @@ -3979,7 +3979,7 @@ void CGameMode::ReceiveVendingItemList2(int aid, int storeId, char own, int coun UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMPURCHASEWND); window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); window->SendMsg(nullptr, UM_SETNAID, aid, storeId, 0, 0); - this->unknown_024C = 1; + this->isOnQuest = 1; } } @@ -4359,7 +4359,7 @@ void CGameMode::ReceiveAcceptEnter(const unsigned char* data) { g_session.SetServerTime(packet->startTime); g_session.SetPlayerPosition((packet->posDir[0] << 2) | (packet->posDir[1] >> 6), ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4), packet->posDir[2] & 0xF); - g_session.unknown_0F30[0] = packet->font; + g_session.chatFont[0] = packet->font; char mapName[36]; sprintf(mapName, "%s.rsw", g_session.m_navigationPlayerMap); @@ -4418,18 +4418,18 @@ void CGameMode::ReceiveRodexMailList(const unsigned char* packet) { if (mails) { RodexMail mail; mail.isRead = entry->isRead; - mail.unknown_0001 = entry->type; - mail.unknown_0024.assign(entry->title, entry->titleLength); - mail.unknown_0004.assign(entry->sender, std::min(std::strlen(entry->sender), 24)); - mail.unknown_0020 = _time32(nullptr) + entry->expireTime; - if (entry->openType == MAIL_INBOX_NORMAL && !(mail.unknown_0001 & 8) && !g_session.HasUnknown809C(mail.unknown_0004)) { - mail.unknown_0194 = g_session.IsKnownName(mail.unknown_0004); + mail.type = entry->type; + mail.title.assign(entry->title, entry->titleLength); + mail.sender.assign(entry->sender, std::min(std::strlen(entry->sender), 24)); + mail.expiresAt = _time32(nullptr) + entry->expireTime; + if (entry->openType == MAIL_INBOX_NORMAL && !(mail.type & 8) && !g_session.HasUnknown809C(mail.sender)) { + mail.isKnownSender = g_session.IsKnownName(mail.sender); } else { - mail.unknown_0194 = 1; + mail.isKnownSender = 1; } if (mails->find(entry->mailId) == mails->end() && !mail.isRead) { - ++g_rodexMailStore->unknown_0018; + ++g_rodexMailStore->unreadCount; } mails->insert(std::pair(entry->mailId, mail)); } @@ -4438,7 +4438,7 @@ void CGameMode::ReceiveRodexMailList(const unsigned char* packet) { } if (packet[4] == 1) { - g_rodexMailStore->unknown_001C = true; + g_rodexMailStore->isPageComplete = true; UIWindow* window = g_windowMgr.LookupWindow(WID_RODEXINBOXWND); if (window) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -4560,7 +4560,7 @@ struct ItemFallEntry { /* 0034 */ int falling; /* 0038 */ int count; /* 003C */ unsigned char identified; - /* 003E */ std::uint16_t unknown_003E; + /* 003E */ std::uint16_t type; /* 0040 */ unsigned char showEffect; /* 0042 */ std::uint16_t grade; }; @@ -4578,7 +4578,7 @@ void CGameMode::ReceiveItemDropEntry(const unsigned char* data) { entry.subRow = packet->subRow; entry.count = packet->count; entry.identified = packet->identified; - entry.unknown_003E = packet->type; + entry.type = packet->type; entry.showEffect = packet->showEffect; entry.grade = packet->grade; entry.falling = 1; @@ -4587,7 +4587,7 @@ void CGameMode::ReceiveItemDropEntry(const unsigned char* data) { if (!item) { item = new CItem; this->scene->objects.push_back(item); - this->scene->unknown_0018.push_back(item); + this->scene->items.push_back(item); } const std::int64_t entryAddress = reinterpret_cast(&entry); @@ -4627,17 +4627,17 @@ void CGameMode::ReceiveSpriteChange(const unsigned char* data) { g_session.m_head = packet->value; break; case LOOK_WEAPON: - *reinterpret_cast(&g_session.unknown_0EDC[0x4]) = packet->value; - *reinterpret_cast(&g_session.unknown_0EDC[0x8]) = 0; + *reinterpret_cast(&g_session.weaponAppearance[0x4]) = packet->value; + *reinterpret_cast(&g_session.weaponAppearance[0x8]) = 0; break; case LOOK_HEAD_BOTTOM: - *reinterpret_cast(&g_session.unknown_0EF4[0x0]) = packet->value; + *reinterpret_cast(&g_session.accessoryAppearance[0x0]) = packet->value; break; case LOOK_HEAD_TOP: - *reinterpret_cast(&g_session.unknown_0EF4[0x4]) = packet->value; + *reinterpret_cast(&g_session.accessoryAppearance[0x4]) = packet->value; break; case LOOK_HEAD_MID: - *reinterpret_cast(&g_session.unknown_0EF4[0x8]) = packet->value; + *reinterpret_cast(&g_session.accessoryAppearance[0x8]) = packet->value; break; case LOOK_HAIR_COLOR: g_session.m_headPalette = packet->value; @@ -4648,7 +4648,7 @@ void CGameMode::ReceiveSpriteChange(const unsigned char* data) { break; } case LOOK_SHIELD: - *reinterpret_cast(&g_session.unknown_0EDC[0xC]) = packet->value; + *reinterpret_cast(&g_session.weaponAppearance[0xC]) = packet->value; break; } if (!actor) { @@ -4726,22 +4726,22 @@ void CGameMode::ReceiveSpriteChange2(const unsigned char* data) { g_session.m_head = value; break; case LOOK_WEAPON: { - *reinterpret_cast(&g_session.unknown_0EDC[0x4]) = value; + *reinterpret_cast(&g_session.weaponAppearance[0x4]) = value; const int shield = static_cast(packet->value >> 32); - *reinterpret_cast(&g_session.unknown_0EDC[0x8]) = shield; + *reinterpret_cast(&g_session.weaponAppearance[0x8]) = shield; if (value != 0 && GetWeaponViewValue(shield) == -1) { - *reinterpret_cast(&g_session.unknown_0EDC[0xC]) = shield; + *reinterpret_cast(&g_session.weaponAppearance[0xC]) = shield; } break; } case LOOK_HEAD_BOTTOM: - *reinterpret_cast(&g_session.unknown_0EF4[0x0]) = value; + *reinterpret_cast(&g_session.accessoryAppearance[0x0]) = value; break; case LOOK_HEAD_TOP: - *reinterpret_cast(&g_session.unknown_0EF4[0x4]) = value; + *reinterpret_cast(&g_session.accessoryAppearance[0x4]) = value; break; case LOOK_HEAD_MID: - *reinterpret_cast(&g_session.unknown_0EF4[0x8]) = value; + *reinterpret_cast(&g_session.accessoryAppearance[0x8]) = value; break; case LOOK_HAIR_COLOR: g_session.m_headPalette = value; @@ -4750,9 +4750,9 @@ void CGameMode::ReceiveSpriteChange2(const unsigned char* data) { g_session.UpdateBodyStyle(g_session.GetDisplayJob(), value, bodyCostume); break; case LOOK_RESET_COSTUMES: - *reinterpret_cast(&g_session.unknown_0EF4[0x0]) = 0; - *reinterpret_cast(&g_session.unknown_0EF4[0x4]) = 0; - *reinterpret_cast(&g_session.unknown_0EF4[0x8]) = 0; + *reinterpret_cast(&g_session.accessoryAppearance[0x0]) = 0; + *reinterpret_cast(&g_session.accessoryAppearance[0x4]) = 0; + *reinterpret_cast(&g_session.accessoryAppearance[0x8]) = 0; g_session.m_robe = 0; break; case LOOK_ROBE: @@ -4890,39 +4890,39 @@ void CGameMode::ReceiveMapProperty(const unsigned char* data) { g_mapPropertyMgr->SetValue(packet->mapId, 20, (packet->flags >> 8) & 1); g_mapPropertyMgr->SetValue(packet->mapId, 40, (packet->flags >> 9) & 1); g_mapPropertyMgr->SetValue(packet->mapId, 41, (packet->flags >> 10) & 1); - g_session.unknown_0000 = packet->mapId; + g_session.mapPropertyId = packet->mapId; - g_serviceOptions.Set(229, *reinterpret_cast(&g_session.unknown_5454[0x0]) != 0); - *reinterpret_cast(&g_session.unknown_5454[0x4]) = 0; - *reinterpret_cast(&g_session.unknown_5454[0x8]) = 0; - g_session.unknown_5460 = 0; + g_serviceOptions.Set(229, *reinterpret_cast(&g_session.interactionFlags[0x0]) != 0); + *reinterpret_cast(&g_session.interactionFlags[0x4]) = 0; + *reinterpret_cast(&g_session.interactionFlags[0x8]) = 0; + g_session.partyBlocked = 0; if (g_session.GetMapProperty0F()) { g_serviceOptions.Set(229, 1); } if (g_session.GetMapProperty10()) { - *reinterpret_cast(&g_session.unknown_5454[0x4]) = 1; + *reinterpret_cast(&g_session.interactionFlags[0x4]) = 1; } if (g_session.GetMapProperty11()) { - *reinterpret_cast(&g_session.unknown_5454[0x8]) = 1; + *reinterpret_cast(&g_session.interactionFlags[0x8]) = 1; } if (g_session.GetMapProperty12()) { - g_session.unknown_5460 = 1; + g_session.partyBlocked = 1; } if (g_session.GetMapProperty09()) { - this->scene->unknown_004C = 1; + this->scene->isSiegeMode = 1; } if (g_session.GetMapProperty13()) { - this->scene->unknown_0050 = 1; + this->scene->isBattleFieldMode = 1; } - if (GetBaseJob(g_session.GetDisplayJob()) == 0xFCF && !g_mapPropertyMgr->GetValue(g_session.unknown_0000, 41)) { + if (GetBaseJob(g_session.GetDisplayJob()) == 0xFCF && !g_mapPropertyMgr->GetValue(g_session.mapPropertyId, 41)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RANKING_NAME)), 0xFFFF64, 0, 0, 0); } - if (GetBaseJob(g_session.GetDisplayJob()) == 0x1082 && !g_mapPropertyMgr->GetValue(g_session.unknown_0000, 41)) { + if (GetBaseJob(g_session.GetDisplayJob()) == 0x1082 && !g_mapPropertyMgr->GetValue(g_session.mapPropertyId, 41)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RANKING_NAME)), 0xFFFF64, 0, 0, 0); } if ((g_session.GetDisplayJob() == 0x108F || g_session.GetDisplayJob() == 0x1091 || g_session.GetDisplayJob() == 0x10CE) && - !g_mapPropertyMgr->GetValue(g_session.unknown_0000, 41)) { + !g_mapPropertyMgr->GetValue(g_session.mapPropertyId, 41)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RANKING_NAME)), 0xFFFF64, 0, 0, 0); } if (g_mapPropertyMgr->GetValue(packet->mapId, 20)) { @@ -4963,10 +4963,10 @@ void CGameMode::ReceiveStovePurchaseResult(const unsigned char* data) { message = static_cast(FormatOwnedString("%s아이템 %d개 지급 완료", name, packet->count)); } case 2: - if (g_stoveMgr->unknown_0008 == 2) { + if (g_stoveMgr->m_pendingOperation == 2) { FetchStoveTermsAgreement(); - } else if (g_stoveMgr->unknown_0008 == 3) { - g_stoveMgr->unknown_0008 = 0; + } else if (g_stoveMgr->m_pendingOperation == 3) { + g_stoveMgr->m_pendingOperation = 0; UICashShopWnd* window = static_cast(g_windowMgr.LookupWindow(WID_CASHSHOP_WND)); g_stoveMgr->StartPurchase(window->m_cart->m_cartItems); } @@ -4988,7 +4988,7 @@ void CGameMode::ReceiveStovePurchaseResult(const unsigned char* data) { break; } - g_stoveMgr->unknown_0008 = 0; + g_stoveMgr->m_pendingOperation = 0; if (message.size() != 0) { g_windowMgr.Confirm(message.c_str(), 0, true, false, 0, "Message", 280, 120, 0); } @@ -5011,23 +5011,23 @@ struct OngoingQuestEntry { struct OngoingQuestHunt { /* 0000 */ int huntId; - /* 0004 */ int unknown_0004; + /* 0004 */ int conditionFlags; /* 0008 */ int mobId; - /* 000C */ std::int16_t unknown_000C; - /* 000E */ std::int16_t unknown_000E; - /* 0010 */ std::int16_t unknown_0010; - /* 0012 */ std::int16_t unknown_0012; + /* 000C */ std::int16_t minLevel; + /* 000E */ std::int16_t maxLevel; + /* 0010 */ std::int16_t count; + /* 0012 */ std::int16_t maxCount; /* 0014 */ char name[24]; }; struct OngoingQuestHunt2 { /* 0000 */ std::int64_t huntId; - /* 0008 */ int unknown_0008; + /* 0008 */ int conditionFlags; /* 000C */ int mobId; - /* 0010 */ std::int16_t unknown_0010; - /* 0012 */ std::int16_t unknown_0012; - /* 0014 */ std::int16_t unknown_0014; - /* 0016 */ std::int16_t unknown_0016; + /* 0010 */ std::int16_t minLevel; + /* 0012 */ std::int16_t maxLevel; + /* 0014 */ std::int16_t count; + /* 0016 */ std::int16_t maxCount; /* 0018 */ char name[24]; }; #pragma pack(pop) @@ -5062,12 +5062,12 @@ void CGameMode::ReceiveOngoingQuestList(const unsigned char* data) { const OngoingQuestHunt* hunt = hunts; for (int i = 0; i < entry->huntCount; ++i, ++hunt) { info.m_huntId[i] = hunt->huntId; - info.m_huntUnknown01A0[i] = hunt->unknown_0004; + info.m_huntUnknown01A0[i] = hunt->conditionFlags; info.m_huntUnknown00D4[i] = hunt->mobId; - info.m_huntUnknown00E0[i] = hunt->unknown_0010; - info.m_huntUnknown0180[i] = hunt->unknown_0012; - info.m_huntUnknown01AC[i] = hunt->unknown_000C; - info.m_huntUnknown01B2[i] = hunt->unknown_000E; + info.m_huntUnknown00E0[i] = hunt->count; + info.m_huntUnknown0180[i] = hunt->maxCount; + info.m_huntUnknown01AC[i] = hunt->minLevel; + info.m_huntUnknown01B2[i] = hunt->maxLevel; const int mobId = hunt->mobId; if ((mobId < 1001 || mobId > 3998) && static_cast(mobId - 20021) > 11978) { if (mobId == 0x1099) { @@ -5122,12 +5122,12 @@ void CGameMode::ReceiveOngoingQuestList2(const unsigned char* data) { const OngoingQuestHunt2* hunt = hunts; for (int i = 0; i < entry->huntCount; ++i, ++hunt) { info.m_huntId[i] = hunt->huntId; - info.m_huntUnknown01A0[i] = hunt->unknown_0008; + info.m_huntUnknown01A0[i] = hunt->conditionFlags; info.m_huntUnknown00D4[i] = hunt->mobId; - info.m_huntUnknown00E0[i] = hunt->unknown_0014; - info.m_huntUnknown0180[i] = hunt->unknown_0016; - info.m_huntUnknown01AC[i] = hunt->unknown_0010; - info.m_huntUnknown01B2[i] = hunt->unknown_0012; + info.m_huntUnknown00E0[i] = hunt->count; + info.m_huntUnknown0180[i] = hunt->maxCount; + info.m_huntUnknown01AC[i] = hunt->minLevel; + info.m_huntUnknown01B2[i] = hunt->maxLevel; const int mobId = hunt->mobId; if ((mobId < 1001 || mobId > 3998) && static_cast(mobId - 20021) > 11978) { if (mobId == 0x1099) { @@ -5193,23 +5193,23 @@ void CGameMode::ReceiveShopItemListPacket(const unsigned char* data) { for (long long i = 0; i < count; ++i) { const ShopItemListEntry& entry = entries[i]; ITEM_INFO item; - item.unknown_0000[1] = entry.index; - item.unknown_0014[0] = entry.price; - item.unknown_0000[0] = entry.type; + item.identity[1] = entry.index; + item.prices[0] = entry.price; + item.identity[0] = entry.type; item.quantity = entry.amount; item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0014[1] = entry.price; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.prices[1] = entry.price; item.SetItemId(entry.itemId); - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); - item.unknown_0098 = CountItemSlotOptions(entry.options); - for (long long option = 0; option < static_cast(item.unknown_0098); ++option) { - reinterpret_cast(item.unknown_009C)[option] = entry.options[option]; + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); + item.optionCount = CountItemSlotOptions(entry.options); + for (long long option = 0; option < static_cast(item.optionCount); ++option) { + reinterpret_cast(item.options)[option] = entry.options[option]; } - item.unknown_0000[2] = entry.location; - item.unknown_0070 = entry.sprite; - item.unknown_0088 = entry.grade; + item.identity[2] = entry.location; + item.sprite = entry.sprite; + item.grade = entry.grade; items.push_back(item); } @@ -5326,7 +5326,7 @@ struct RodexMailItem { /* 0018 */ std::uint32_t expireTime; /* 001C */ unsigned char type; /* 001D */ std::uint16_t bindType; - /* 001F */ std::uint16_t unknown_001F; + /* 001F */ std::uint16_t wearState; /* 0021 */ ItemSlotOption options[5]; /* 003A */ unsigned char refine; /* 003B */ unsigned char grade; @@ -5350,7 +5350,7 @@ void CGameMode::ReceiveRodexReadMail(const unsigned char* data) { const auto* packet = reinterpret_cast(data); g_session.ClearItemQuantities(); g_rodexMailStore->currentMailId = packet->mailId; - g_rodexMailStore->unknown_0010 = packet->type; + g_rodexMailStore->inboxType = packet->type; std::map* mails; switch (packet->type) { @@ -5373,45 +5373,45 @@ void CGameMode::ReceiveRodexReadMail(const unsigned char* data) { } RodexMail& mail = found->second; - if (!mail.isRead && --g_rodexMailStore->unknown_0018 == 0) { + if (!mail.isRead && --g_rodexMailStore->unreadCount == 0) { if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { window->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 476, 0, 0); } } - mail.unknown_003C.append(packet->text, packet->textLength); + mail.body.append(packet->text, packet->textLength); mail.hasItem = packet->itemCount; mail.zeny = packet->zeny; mail.isRead = 1; - auto* mailItems = reinterpret_cast(mail.unknown_0055.data()); + auto* mailItems = reinterpret_cast(mail.attachments.data()); const auto* packetItems = reinterpret_cast(packet->text + packet->textLength); for (long long i = 0; i < packet->itemCount; ++i) { RodexMailItem& record = mailItems[i]; memcpy_s(&record, sizeof(RodexMailItem), &packetItems[i], sizeof(RodexMailItem)); ITEM_INFO item; - item.unknown_0000[0] = record.type; - item.unknown_0000[2] = record.expireTime; + item.identity[0] = record.type; + item.identity[2] = record.expireTime; item.quantity = record.quantity; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; - item.unknown_0064 = record.unknown_001F; - item.unknown_0070 = record.bindType; - item.unknown_0098 = CountItemSlotOptions(record.options); - for (long long option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = record.options[option]; + item.damaged = record.damaged; + item.refiningLevel = record.refine; + item.bindOnEquip = record.wearState; + item.sprite = record.bindType; + item.optionCount = CountItemSlotOptions(record.options); + for (long long option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = record.options[option]; } - item.unknown_0088 = record.grade; + item.grade = record.grade; g_session.AddItemToFreeSlot(item); } if (!g_windowMgr.CloseWindow(WID_RODEXCONTENTSWND)) { g_windowMgr.EnsureWindow(WID_RODEXCONTENTSWND); - g_windowMgr.unknown_045C->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + g_windowMgr.rodexContentsWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -5442,15 +5442,15 @@ struct RodexMailPagePacket { void CGameMode::ReceiveRodexMailListRefresh(const unsigned char* data) { const auto* packet = reinterpret_cast(data); const RodexMailPageEntry* entry = packet->entries; - g_rodexMailStore->unknown_0010 = packet->type; - g_rodexMailStore->unknown_001C = packet->isEnd; + g_rodexMailStore->inboxType = packet->type; + g_rodexMailStore->isPageComplete = packet->isEnd; std::map* mails; - if (g_rodexMailStore->unknown_0010 == 0) { + if (g_rodexMailStore->inboxType == 0) { mails = &g_rodexMailStore->m_mails0; - } else if (g_rodexMailStore->unknown_0010 == 1) { + } else if (g_rodexMailStore->inboxType == 1) { mails = &g_rodexMailStore->m_mails1; - } else if (g_rodexMailStore->unknown_0010 == 2) { + } else if (g_rodexMailStore->inboxType == 2) { mails = &g_rodexMailStore->m_mails2; } mails->clear(); @@ -5458,19 +5458,19 @@ void CGameMode::ReceiveRodexMailListRefresh(const unsigned char* data) { for (int i = 0; i < packet->count; ++i) { RodexMail mail; mail.isRead = entry->isRead; - mail.unknown_0001 = entry->type; - mail.unknown_0020 = _time32(nullptr) + entry->expireTime; - mail.unknown_0004.assign(entry->sender, (std::min)(std::strlen(entry->sender), static_cast(24))); - mail.unknown_0024.assign(entry->title, entry->titleLength); + mail.type = entry->type; + mail.expiresAt = _time32(nullptr) + entry->expireTime; + mail.sender.assign(entry->sender, (std::min)(std::strlen(entry->sender), static_cast(24))); + mail.title.assign(entry->title, entry->titleLength); if (mails->find(entry->mailId) == mails->end()) { mails->insert(std::make_pair(entry->mailId, mail)); } entry = reinterpret_cast(reinterpret_cast(entry) + 0x2C + entry->titleLength); } - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->InitializeMailActions(); - reinterpret_cast(g_windowMgr.unknown_0454)->SetButtonsDisabled(0); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->InitializeMailActions(); + reinterpret_cast(g_windowMgr.rodexInboxWnd)->SetButtonsDisabled(0); } } @@ -5682,22 +5682,22 @@ void CGameMode::ReceiveQuestHuntUpdate2(const unsigned char* data) { void CGameMode::ReceiveRodexMailListAppend(const unsigned char* data) { const auto* packet = reinterpret_cast(data); const RodexMailPageEntry* entry = packet->entries; - g_rodexMailStore->unknown_0010 = packet->type; - g_rodexMailStore->unknown_001C = packet->isEnd; + g_rodexMailStore->inboxType = packet->type; + g_rodexMailStore->isPageComplete = packet->isEnd; if (packet->count != 0) { for (int i = 1; i < packet->count + 1; ++i) { RodexMail mail; mail.isRead = entry->isRead; - mail.unknown_0001 = entry->type; - mail.unknown_0020 = _time32(nullptr) + entry->expireTime; - mail.unknown_0004.assign(entry->sender, (std::min)(std::strlen(entry->sender), static_cast(24))); - if (packet->type == MAIL_INBOX_NORMAL && (mail.unknown_0001 & 8) == MAIL_INBOX_NORMAL && !g_session.HasUnknown809C(mail.unknown_0004)) { - mail.unknown_0194 = g_session.IsKnownName(mail.unknown_0004); + mail.type = entry->type; + mail.expiresAt = _time32(nullptr) + entry->expireTime; + mail.sender.assign(entry->sender, (std::min)(std::strlen(entry->sender), static_cast(24))); + if (packet->type == MAIL_INBOX_NORMAL && (mail.type & 8) == MAIL_INBOX_NORMAL && !g_session.HasUnknown809C(mail.sender)) { + mail.isKnownSender = g_session.IsKnownName(mail.sender); } else { - mail.unknown_0194 = 1; + mail.isKnownSender = 1; } - mail.unknown_0024.append(entry->title, entry->titleLength); + mail.title.append(entry->title, entry->titleLength); switch (packet->type) { case MAIL_INBOX_NORMAL: @@ -5720,10 +5720,10 @@ void CGameMode::ReceiveRodexMailListAppend(const unsigned char* data) { } } - if (g_windowMgr.unknown_0454) { - static_cast(g_windowMgr.unknown_0454)->RefreshMailLists(); - static_cast(g_windowMgr.unknown_0454)->SetButtonsDisabled(0); - static_cast(g_windowMgr.unknown_0454)->ClearChecks(); + if (g_windowMgr.rodexInboxWnd) { + static_cast(g_windowMgr.rodexInboxWnd)->RefreshMailLists(); + static_cast(g_windowMgr.rodexInboxWnd)->SetButtonsDisabled(0); + static_cast(g_windowMgr.rodexInboxWnd)->ClearChecks(); } } @@ -5769,7 +5769,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { if (packet->aid == g_session.m_aid) { ActiveSkillEffect effect; effect.id = packet->type; - effect.unknown_0004 = 999999; + effect.expiration = 999999; if (!this->IsExcludedSkillEffectId(packet->type)) { for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end();) { if (it->id == packet->type) { @@ -6171,7 +6171,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; case EFST_DA_ILLUSION: if (packet->aid == g_session.m_aid) { - g_session.unknown_5450 = 1; + g_session.guildLeader = 1; } std::sprintf(message, ""); break; @@ -6216,7 +6216,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; case EFST_CASH_BOSS_ALARM: if (packet->aid == g_session.m_aid) { - this->unknown_05CC[0] = 1; + this->bossAlarmAndCopyNameFlags[0] = 1; } std::sprintf(message, LookupMessage(MSI_BOSS_ALARM)); break; @@ -6812,7 +6812,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; case EFST_DA_ILLUSION: if (packet->aid == g_session.m_aid) { - g_session.unknown_5450 = 0; + g_session.guildLeader = 0; } std::sprintf(message, ""); break; @@ -6851,7 +6851,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { break; case EFST_CASH_BOSS_ALARM: if (packet->aid == g_session.m_aid) { - this->unknown_05CC[0] = 0; + this->bossAlarmAndCopyNameFlags[0] = 0; } break; case EFST_ON_PUSH_CART: @@ -6887,7 +6887,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { } break; case EFST_SU_STOOP: - if (packet->aid == g_session.m_aid && !this->scene->player->render.unknown_0114) { + if (packet->aid == g_session.m_aid && !this->scene->player->render.specialMotionLocked) { this->scene->player->SetState(0, 1); } break; @@ -6913,7 +6913,7 @@ void CGameMode::ReceiveStatusChangeNotice(const unsigned char* data) { } actor->SetMadogearType(0); if (packet->aid == g_session.m_aid) { - g_session.unknown_8074 = 0; + g_session.madogearType = 0; } actor->SendMsg(nullptr, AM_DELETE_CHICKEN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; @@ -7084,7 +7084,7 @@ void CGameMode::ReceiveGuildMemberExpelled(const unsigned char* data) { return; } - if (guildInfo->unknown_00C0) { + if (guildInfo->membersRequested) { guildInfo->DeleteMember(name); } @@ -7102,7 +7102,7 @@ void CGameMode::ReceiveGuildMemberExpelled(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.name = name; - entry.unknown_0034 = reason; + entry.reason = reason; guildInfo->AddUnknown00EC(entry); } @@ -7127,7 +7127,7 @@ struct GuildPositionUpdatePacket { void CGameMode::ReceiveGuildPositionUpdate(const unsigned char* data) { const auto* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; - if (!guildInfo->unknown_00C4) { + if (!guildInfo->positionsRequested) { return; } @@ -7145,13 +7145,13 @@ void CGameMode::ReceiveGuildPositionUpdate(const unsigned char* data) { guildInfo->m_positions[position.positionId] = name; GuildInfo::Unknown00D4Entry entry; - entry.unknown_0004 = position.positionId; - entry.unknown_0008 = guildInfo->m_positions[position.positionId]; - entry.unknown_0020 = position.mode & 1; - entry.unknown_0024 = (position.mode >> 4) & 1; - entry.unknown_0028 = position.payRate; - entry.unknown_002C = (position.mode >> 8) & 1; - entry.unknown_0000 = position.ranking; + entry.positionId = position.positionId; + entry.name = guildInfo->m_positions[position.positionId]; + entry.canInvite = position.mode & 1; + entry.canExpel = (position.mode >> 4) & 1; + entry.tax = position.payRate; + entry.canStorage = (position.mode >> 8) & 1; + entry.ranking = position.ranking; guildInfo->UpdateUnknown00D4(entry); } @@ -7179,7 +7179,7 @@ void CGameMode::ReceiveGuildMemberLeft(const unsigned char* data) { return; } - if (guildInfo->unknown_00C0) { + if (guildInfo->membersRequested) { guildInfo->DeleteMember(name); } @@ -7242,7 +7242,7 @@ void CGameMode::ReceiveGuildExpulsion2(const unsigned char* data) { return; } - if (guildInfo->unknown_00C0) { + if (guildInfo->membersRequested) { guildInfo->DeleteMemberByCharacterId(static_cast(packet->characterId)); } @@ -7265,7 +7265,7 @@ void CGameMode::ReceiveGuildExpulsion2(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.name = name.c_str(); - entry.unknown_0034 = reason; + entry.reason = reason; guildInfo->AddUnknown00EC(entry); } @@ -7287,7 +7287,7 @@ void CGameMode::ReceiveGuildLeave2(const unsigned char* data) { return; } - if (guildInfo->unknown_00C0) { + if (guildInfo->membersRequested) { guildInfo->DeleteMemberByCharacterId(static_cast(packet->characterId)); } @@ -7361,7 +7361,7 @@ void CGameMode::ReceivePartyInfo2(const unsigned char* data) { struct EquipItemUpdatePacket { /* 0000 */ std::int16_t id; /* 0002 */ std::uint16_t itemId; - /* 0004 */ unsigned char unknown_0004; + /* 0004 */ unsigned char damaged; /* 0005 */ std::uint32_t cards[4]; /* 0015 */ ItemSlotOption options[5]; /* 002E */ unsigned char refine; @@ -7375,21 +7375,21 @@ void CGameMode::RefreshInventoryOrEquipItem(std::uint16_t itemId, unsigned char ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, itemId); int lookup = 0; int slot = 0; - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = g_session.FindItem17F0(itemId, &slot); lookup = 1; - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = g_session.FindItem2B50(itemId, &slot); lookup = 2; } } - item.unknown_005D = unknownValue; - item.unknown_0060 = refine; - std::memcpy(item.unknown_001C, cards.cards, sizeof(cards.cards)); - item.unknown_0098 = CountItemSlotOptions(options.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options.options[index]; + item.damaged = unknownValue; + item.refiningLevel = refine; + std::memcpy(item.cards, cards.cards, sizeof(cards.cards)); + item.optionCount = CountItemSlotOptions(options.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options.options[index]; } if (lookup == 0) { @@ -7412,25 +7412,25 @@ void CGameMode::RefreshInventoryOrEquipItem2(const unsigned char* data) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->itemId); long long lookup = 0; int slot = 0; - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = g_session.FindItem17F0(packet->itemId, &slot); lookup = 1; - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = g_session.FindItem2B50(packet->itemId, &slot); lookup = 2; } } - item.unknown_005D = packet->unknown_0004; - item.unknown_0060 = packet->refine; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; for (long long index = 0; index < 4; ++index) { - reinterpret_cast(item.unknown_001C)[index] = packet->cards[index]; + reinterpret_cast(item.cards)[index] = packet->cards[index]; } - item.unknown_0098 = CountItemSlotOptions(packet->options); - for (long long index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet->options[index]; + item.optionCount = CountItemSlotOptions(packet->options); + for (long long index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet->options[index]; } - item.unknown_0088 = packet->unknown_002F; + item.grade = packet->unknown_002F; if (lookup == 0) { g_session.UpdateInventoryItem(item, 1); @@ -7533,17 +7533,17 @@ struct GuildStorageLogItem { #pragma pack(push, 1) struct GuildStorageLogItemRecord { - /* 0000 */ std::uint32_t unknown_0000; + /* 0000 */ std::uint32_t logId; /* 0004 */ std::uint32_t itemId; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ unsigned char unknown_000C; + /* 0008 */ std::uint32_t quantity; + /* 000C */ unsigned char operation; /* 000D */ unsigned char unknown_000D[8]; /* 0015 */ unsigned char identified; /* 0016 */ std::int16_t type; /* 0018 */ std::uint32_t cards[4]; /* 0028 */ char name[24]; /* 0040 */ char characterName[24]; - /* 0058 */ unsigned char unknown_0058; + /* 0058 */ unsigned char highlighted; /* 0059 */ unsigned char refine; /* 005A */ unsigned char grade; }; @@ -7567,19 +7567,19 @@ void CGameMode::ReceiveGuildStorageLogItems(const unsigned char* data) { for (long long index = 0; index < packet->count; ++index) { const GuildStorageLogItemRecord& record = packet->records[index]; ITEM_INFO item; - item.unknown_00B8[0] = record.unknown_0000; - item.unknown_00B8[1] = record.unknown_0008; - item.unknown_00C0 = record.unknown_000C; - strncpy_s(reinterpret_cast(item.unknown_00C1), sizeof(item.unknown_00C1), record.name, _TRUNCATE); - strncpy_s(reinterpret_cast(item.unknown_00D9), sizeof(item.unknown_00D9), record.characterName, _TRUNCATE); + item.recordIds[0] = record.logId; + item.recordIds[1] = record.quantity; + item.recordType = record.operation; + strncpy_s(reinterpret_cast(item.recordName), sizeof(item.recordName), record.name, _TRUNCATE); + strncpy_s(reinterpret_cast(item.recordDate), sizeof(item.recordDate), record.characterName, _TRUNCATE); char number[16] = {}; item.itemId = _itoa(record.itemId, number, 10); item.identified = record.identified; - item.unknown_0000[0] = record.type; - item.unknown_0060 = record.refine; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); - item.unknown_0088 = record.grade; - items.push_back({item, record.unknown_0058}); + item.identity[0] = record.type; + item.refiningLevel = record.refine; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); + item.grade = record.grade; + items.push_back({item, record.highlighted}); } } @@ -7629,7 +7629,7 @@ void CGameMode::ApplyStatusIcons(int level, unsigned int flags) { } } - auto previous = statusLevelEffects.find(*reinterpret_cast(&g_session.unknown_0F0C[0])); + auto previous = statusLevelEffects.find(*reinterpret_cast(&g_session.statusLevelEffects[0])); if (previous != statusLevelEffects.end()) { this->ApplyStatusChange(aid, 0, previous->second, 9999, 0, 0, 0, 0, 9999); } @@ -7654,7 +7654,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t line.append(message.data()); if (g_windowMgr.ShowWhisperFrom(name.c_str(), line.c_str(), 0x222222, static_cast(unknown_0004)) != 0) { - if (g_session.unknown_56B8[0] != 0) { + if (g_session.autoReplyState[0] != 0) { char notice[24]; std::sprintf(notice, LookupMessage(MSI_AUTO_MSG2)); const char length = static_cast(std::strlen(notice)); @@ -7663,7 +7663,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t head[length] = '\0'; if (std::strcmp(head, notice) != 0) { std::string reply(LookupMessage(MSI_AUTO_MSG2)); - reply.append(reinterpret_cast(g_session.unknown_56B8[4]).c_str()); + reply.append(reinterpret_cast(g_session.autoReplyState[4]).c_str()); g_windowMgr.SetUnknown04DC(reply.c_str()); g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(name.c_str()), 0, 0, 0); } @@ -7763,7 +7763,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t } } - if (g_session.unknown_56B8[0] != 0) { + if (g_session.autoReplyState[0] != 0) { char notice[24]; std::sprintf(notice, LookupMessage(MSI_AUTO_MSG2)); const char length = static_cast(std::strlen(notice)); @@ -7772,7 +7772,7 @@ void CGameMode::ProcessWhisper(int unknown_0004, std::string name, std::string t head[length] = '\0'; if (std::strcmp(head, notice) != 0) { std::string reply(LookupMessage(MSI_AUTO_MSG2)); - reply.append(reinterpret_cast(g_session.unknown_56B8[4]).c_str()); + reply.append(reinterpret_cast(g_session.autoReplyState[4]).c_str()); g_windowMgr.SetUnknown04DC(reply.c_str()); g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(name.c_str()), 0, 0, 0); } diff --git a/Source/Client/Mode/GameModePackets.cpp b/Source/Client/Mode/GameModePackets.cpp index 732fe18bf..05bf8cae7 100644 --- a/Source/Client/Mode/GameModePackets.cpp +++ b/Source/Client/Mode/GameModePackets.cpp @@ -159,13 +159,13 @@ __declspec(noinline) void CGameMode::ReceiveItemDisappear(std::uint32_t itemAid) #pragma pack(push, 1) struct TradeItemRecord { /* 0000 */ int itemId; - /* 0004 */ unsigned char unknown_0004; - /* 0005 */ int unknown_0005; + /* 0004 */ unsigned char type; + /* 0005 */ int price; /* 0009 */ int quantity; - /* 000D */ std::uint16_t unknown_000D; - /* 000F */ unsigned char unknown_000F; + /* 000D */ std::uint16_t weight; + /* 000F */ unsigned char refine; /* 0010 */ std::uint32_t cards[4]; - /* 0020 */ std::uint16_t unknown_0020; + /* 0020 */ std::uint16_t index; }; #pragma pack(pop) @@ -186,7 +186,7 @@ namespace { /* 0002 */ std::uint16_t length; /* 0004 */ std::uint32_t unknown_0004; /* 0008 */ int value; - /* 000C */ unsigned char unknown_000C[0x18]; + /* 000C */ unsigned char name[0x18]; }; struct EnchantSimulationRecord { @@ -202,11 +202,11 @@ namespace { /* 0000 */ int itemId; /* 0004 */ unsigned char refine; /* 0005 */ unsigned char packageType; - /* 0006 */ int unknown_0006; - /* 000A */ int unknown_000A; + /* 0006 */ int itemRefine; + /* 000A */ int reportValue; /* 000E */ char text[24]; - /* 0026 */ int unknown_0026; - /* 002A */ int unknown_002A; + /* 0026 */ int reportCount; + /* 002A */ int reportTotal; /* 002E */ int count; }; @@ -233,7 +233,7 @@ namespace { /* 0007 */ unsigned char identified; /* 0008 */ std::uint16_t location; /* 000A */ std::uint16_t wearState; - /* 000C */ unsigned char unknown_000C; + /* 000C */ unsigned char damaged; /* 000D */ unsigned char refine; /* 000E */ std::uint32_t cards[4]; /* 001E */ std::uint32_t expireTime; @@ -246,7 +246,7 @@ namespace { /* 0007 */ unsigned char identified; /* 0008 */ std::uint16_t location; /* 000A */ std::uint16_t wearState; - /* 000C */ unsigned char unknown_000C; + /* 000C */ unsigned char damaged; /* 000D */ unsigned char refine; /* 000E */ std::uint32_t cards[4]; /* 001E */ std::uint32_t expireTime; @@ -331,7 +331,7 @@ namespace { struct ChatEntryListPacket { /* 0000 */ std::uint16_t packetType; /* 0002 */ std::int16_t length; - /* 0004 */ std::uint16_t unknown_0004; + /* 0004 */ std::uint16_t skillId; /* 0006 */ ChatTextEntry entries[1]; }; @@ -342,17 +342,17 @@ namespace { }; struct ActorSkillMessage { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; + /* 0000 */ int skillId; + /* 0004 */ int damage; + /* 0008 */ int actionType; + /* 000C */ int targetId; + /* 0010 */ int tick; + /* 0014 */ int skillLevel; + /* 0018 */ int hitCount; + /* 001C */ int cellX; + /* 0020 */ int cellY; + /* 0024 */ int attackMotion; + /* 0028 */ int damageMotion; }; struct DispelPacket { @@ -389,7 +389,7 @@ namespace { }; struct Item1758StoreRecord { - /* 0000 */ std::uint32_t unknown_0000; + /* 0000 */ std::uint32_t price; /* 0004 */ std::int16_t index; /* 0006 */ std::int16_t amount; /* 0008 */ unsigned char type; @@ -404,14 +404,14 @@ namespace { struct Item1718Record { /* 0000 */ std::int32_t itemId; /* 0004 */ unsigned char type; - /* 0005 */ std::uint32_t unknown_0005; + /* 0005 */ std::uint32_t price; /* 0009 */ std::int32_t quantity; - /* 000D */ std::uint16_t unknown_000D; - /* 000F */ std::uint32_t unknown_000F; + /* 000D */ std::uint16_t weight; + /* 000F */ std::uint32_t itemFlags; }; struct Item1748Record { - /* 0000 */ std::uint32_t unknown_0000; + /* 0000 */ std::uint32_t price; /* 0004 */ std::int16_t amount; /* 0006 */ std::int16_t index; /* 0008 */ unsigned char type; @@ -421,7 +421,7 @@ namespace { /* 000F */ unsigned char refine; /* 0010 */ std::uint32_t cards[4]; /* 0020 */ StoreItemOption options[5]; - /* 0039 */ std::int32_t unknown_0039; + /* 0039 */ std::int32_t location; /* 003D */ std::uint16_t sprite; }; #pragma pack(pop) @@ -538,8 +538,8 @@ void CGameMode::ReceiveUnknown05C4Result(const unsigned char* data) { char message[256]; char name[51] = {}; std::sprintf(name, "%s", packet->name); - this->unknown_05C4 = -1; - this->unknown_05C8 = -1; + this->bossMonsterX = -1; + this->bossMonsterY = -1; switch (packet->result) { case BOSS_INFO_NOT: @@ -549,8 +549,8 @@ void CGameMode::ReceiveUnknown05C4Result(const unsigned char* data) { return; case BOSS_INFO_ALIVE: case BOSS_INFO_ALIVE_WITHMSG: - this->unknown_05C4 = packet->first; - this->unknown_05C8 = packet->second; + this->bossMonsterX = packet->first; + this->bossMonsterY = packet->second; if (packet->result != 2) { return; } @@ -705,23 +705,23 @@ __declspec(noinline) void CGameMode::ReceiveRentalItemTime(const unsigned char* // OFFSET: 0x00D264E0 // FUNCTION: fn_21679 void CGameMode::ReceiveUnknownD264E0(const unsigned char* packet) { - if (UIWindow* window = g_windowMgr.unknown_01F0) { + if (UIWindow* window = g_windowMgr.sayDialogWnd) { window->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); window->SendMsg(nullptr, UM_ENABLECLOSEBUTTON, 0, 0, 0, 0); } else { - this->unknown_024C = 0; - this->unknown_02DC = *reinterpret_cast(packet + 2); + this->isOnQuest = 0; + this->lastNaid = *reinterpret_cast(packet + 2); g_windowMgr.CloseWindow(WID_SAYDIALOGWND); g_windowMgr.CloseWindow(WID_CHOOSEWND); g_windowMgr.CloseWindow(WID_SAYDIALOGWND_OVERLAY); } - if (UIWindow* window = g_windowMgr.unknown_01F4) { + if (UIWindow* window = g_windowMgr.sayDialogOverlayWnd) { window->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); window->SendMsg(nullptr, UM_ENABLECLOSEBUTTON, 0, 0, 0, 0); } else { - this->unknown_024C = 0; - this->unknown_02DC = *reinterpret_cast(packet + 2); + this->isOnQuest = 0; + this->lastNaid = *reinterpret_cast(packet + 2); g_windowMgr.CloseWindow(WID_SAYDIALOGWND_OVERLAY); g_windowMgr.CloseWindow(WID_CHOOSEWND); g_windowMgr.CloseWindow(WID_SAYDIALOGWND_OVERLAY); @@ -866,23 +866,23 @@ void CGameMode::ReceiveItem1738EquipList(const unsigned char* data) { StoreEquipEntry entry; ReadStoreEquipEntry(entry, *record); ITEM_INFO item; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = entry.index; - item.unknown_0000[2] = entry.location; - item.unknown_0000[3] = entry.wearState; + item.identity[0] = entry.type; + item.identity[1] = entry.index; + item.identity[2] = entry.location; + item.identity[3] = entry.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); item.SetItemId(entry.itemId); item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0068 = entry.expireTime; - item.unknown_0064 = entry.bindOnEquip; - *reinterpret_cast(item.unknown_0074) = entry.sprite; - *reinterpret_cast(item.unknown_0078) = entry.placeEtcTab; - item.unknown_0098 = CountStoreItemOptions(entry.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = entry.options[index]; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.expireTime = entry.expireTime; + item.bindOnEquip = entry.bindOnEquip; + *reinterpret_cast(item.flags) = entry.sprite; + *reinterpret_cast(item.saleData) = entry.placeEtcTab; + item.optionCount = CountStoreItemOptions(entry.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = entry.options[index]; } g_session.AddItem1738(item, 1); } @@ -906,23 +906,23 @@ void CGameMode::ReceiveItem1738EquipListOptions(const unsigned char* data) { StoreEquipEntry entry; ReadStoreEquipEntry(entry, *record); ITEM_INFO item; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = entry.index; - item.unknown_0000[2] = entry.location; - item.unknown_0000[3] = entry.wearState; + item.identity[0] = entry.type; + item.identity[1] = entry.index; + item.identity[2] = entry.location; + item.identity[3] = entry.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); item.SetItemId(entry.itemId); item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0068 = entry.expireTime; - item.unknown_0064 = entry.bindOnEquip; - *reinterpret_cast(item.unknown_0074) = entry.sprite; - *reinterpret_cast(item.unknown_0078) = entry.placeEtcTab; - item.unknown_0098 = CountStoreItemOptions(entry.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = entry.options[index]; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.expireTime = entry.expireTime; + item.bindOnEquip = entry.bindOnEquip; + *reinterpret_cast(item.flags) = entry.sprite; + *reinterpret_cast(item.saleData) = entry.placeEtcTab; + item.optionCount = CountStoreItemOptions(entry.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = entry.options[index]; } g_session.AddItem1738(item, 1); } @@ -944,18 +944,18 @@ void CGameMode::ReceiveItem1738NormalList(const unsigned char* data) { const StoreNormalRecord* record = reinterpret_cast(data + sizeof(ItemStoreListHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; - item.unknown_0000[2] = 0; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[3] = record->location; + item.identity[2] = 0; item.quantity = record->amount; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.damaged = 0; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.AddItem1738(item, 0); } @@ -1180,11 +1180,11 @@ void CGameMode::ReceiveRandomUpgradeSimulation(const unsigned char* packet) { ITEM_INFO item; item.SetItemId(record->itemId); item.identified = 1; - item.unknown_0000[0] = 0x15; + item.identity[0] = 0x15; ITEM_INFO result; result.SetItemId(record->resultItemId); result.identified = 1; - result.unknown_0000[0] = 0x15; + result.identity[0] = 0x15; std::fprintf(file, "\t\t%s\t%s\t%d\t\t%.5f%%\n", ToUtf8(item.DisplayName(0), g_textCodePage).c_str(), ToUtf8(result.DisplayName(0), g_textCodePage).c_str(), record->count, static_cast(record->rate) / 1000.0f); total += record->count; @@ -1219,7 +1219,7 @@ void CGameMode::ReceiveEnchantSimulation(const unsigned char* packet) { ITEM_INFO item; item.SetItemId(record->itemId); item.identified = 1; - item.unknown_0000[0] = 6; + item.identity[0] = 6; std::fprintf(file, "\t\t%s\t%d\t%.5f%%\n", ToUtf8(item.DisplayName(0), g_textCodePage).c_str(), record->count, static_cast(record->rate) / 1000.0f); total += record->count; @@ -1266,14 +1266,14 @@ void CGameMode::ReceivePackageSimulation(const unsigned char* packet) { for (const PackageSimulationRecord* package : packages[type]) { ITEM_INFO item; item.SetItemId(package->itemId); - item.unknown_0088 = package->refine; + item.grade = package->refine; item.identified = 1; - item.unknown_0060 = package->unknown_0006; - if (package->refine != 0 || package->unknown_0006 != 0) { - item.unknown_0000[0] = 0x15; + item.refiningLevel = package->itemRefine; + if (package->refine != 0 || package->itemRefine != 0) { + item.identity[0] = 0x15; } std::fprintf(file, "\t%-24s\t\t\t\t\t\t\t%d\t(%d)\t%d/%d\t%s\n", ToUtf8(item.DisplayName(0), g_textCodePage).c_str(), package->count, - package->unknown_000A, package->unknown_0026, package->unknown_002A, ToUtf8(std::string(package->text), g_textCodePage).c_str()); + package->reportValue, package->reportCount, package->reportTotal, ToUtf8(std::string(package->text), g_textCodePage).c_str()); unpacked += package->count; } std::fprintf(file, "\n\t\t\t\t\tUnpacked\t%d\tPackages\n", unpacked); @@ -1299,7 +1299,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknownD612A0(const unsigned char* p // FUNCTION: fn_22152 __declspec(noinline) void CGameMode::ReceiveUnknownD77BF0(const unsigned char* packet) { if (packet[2] == 1) { - if (!g_windowMgr.unknown_0450) { + if (!g_windowMgr.openMailBoxWnd) { g_windowMgr.EnsureWindow(WID_OPENMAILBOXWND); } @@ -1332,9 +1332,9 @@ void CGameMode::ReceiveHpSpRecovery(const unsigned char* packet, int variant) { switch (type) { case SP_HP: { g_session.UpdateRandomStats(); - const int hp = g_session.unknown_5568 + amount; - if (g_session.unknown_5568 != hp) { - g_session.unknown_5568 = hp; + const int hp = g_session.hp + amount; + if (g_session.hp != hp) { + g_session.hp = hp; g_session.RefreshHpSpWindows(); } player->SendMsg(nullptr, AM_MAKE_NUMBER, 0, amount, amount >> 31, static_cast(0xFF00FF00), 0, 114, 0, 0, 0, 0, 0, 0, 0); @@ -1343,7 +1343,7 @@ void CGameMode::ReceiveHpSpRecovery(const unsigned char* packet, int variant) { } case SP_SP: { g_session.UpdateRandomStats(); - int& sp = *reinterpret_cast(&g_session.unknown_5570[0]); + int& sp = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); const int value = sp + amount; if (sp != value) { sp = value; @@ -1378,7 +1378,7 @@ __declspec(noinline) void CGameMode::ReceiveUnknown173A5BC(const unsigned char* __declspec(noinline) void CGameMode::ReceiveUnknown16FC588(const unsigned char* packet) { const signed char value = *reinterpret_cast(packet + 2); if (value != 1 && value != 2) { - g_navigationManager.unknown_1280 = 0; + g_navigationManager.routeSide = 0; } } @@ -1409,8 +1409,8 @@ __declspec(noinline) void CGameMode::ReceiveCharViewResult(const unsigned char* case 0: { CMode* mode = g_modeMgr.gameMode; CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; - if (player->render.unknown_0070 != 0 && mode != nullptr) { - mode->SendMsg(MM_REQUEST_ACT, 3, player->unknown_051C, 0, 0); + if (player->render.state != 0 && mode != nullptr) { + mode->SendMsg(MM_REQUEST_ACT, 3, player->proceedTargetGid, 0, 0); } return; } @@ -1435,7 +1435,7 @@ __declspec(noinline) void CGameMode::ResetItemLists(const unsigned char*) { __declspec(noinline) void CGameMode::ClearItemLists(const unsigned char* packet) { const std::uint16_t slot = *reinterpret_cast(packet + 2); g_session.ClearUnknown1710(slot); - this->unknown_05CE = 1; + this->inventoryChanged = 1; RefreshItemWindows(&g_windowMgr); g_session.ClearUnknown1740(slot); g_session.RefreshItem1740Window(); @@ -1446,13 +1446,13 @@ __declspec(noinline) void CGameMode::ClearItemLists(const unsigned char* packet) // OFFSET: 0x00D31E50 // FUNCTION: fn_21736 __declspec(noinline) void CGameMode::ReceiveMemorialDungeonInfo(const unsigned char* packet) { - g_session.unknown_5950 = reinterpret_cast(packet + 2); - g_session.unknown_596C = *reinterpret_cast(packet + 63); - g_session.unknown_5970 = *reinterpret_cast(packet + 67); + g_session.memorialDungeonName = reinterpret_cast(packet + 2); + g_session.memorialCreationTime = *reinterpret_cast(packet + 63); + g_session.memorialExpirationTime = *reinterpret_cast(packet + 67); const int state = *reinterpret_cast(packet + 67) != 0 ? 1 : 2; - const int previous = g_session.unknown_5948; - g_session.unknown_5948 = state; - if (previous != state || state != 2 || g_session.unknown_593C != 0) { + const int previous = g_session.memorialDungeonState; + g_session.memorialDungeonState = state; + if (previous != state || state != 2 || g_session.memorialWindowOpen != 0) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } @@ -1462,12 +1462,12 @@ __declspec(noinline) void CGameMode::ReceiveMemorialDungeonInfo(const unsigned c // OFFSET: 0x00D31EE0 // FUNCTION: fn_21737 __declspec(noinline) void CGameMode::ReceiveMemorialDungeonNotify(const unsigned char* packet) { - const int previous = g_session.unknown_5948; - g_session.unknown_5970 = *reinterpret_cast(packet + 6); + const int previous = g_session.memorialDungeonState; + g_session.memorialExpirationTime = *reinterpret_cast(packet + 6); const int time = *reinterpret_cast(packet + 6); - g_session.unknown_5948 = 0 != time ? 1 : 2; + g_session.memorialDungeonState = 0 != time ? 1 : 2; if (*reinterpret_cast(packet + 2) == 0) { - if (previous != (time != 0 ? 1 : 2) || time != 0 || g_session.unknown_593C != 0) { + if (previous != (time != 0 ? 1 : 2) || time != 0 || g_session.memorialWindowOpen != 0) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } @@ -1489,9 +1489,9 @@ __declspec(noinline) void CGameMode::ReceiveMemorialDungeonNotify(const unsigned // OFFSET: 0x00D31FD0 // FUNCTION: fn_21738 __declspec(noinline) void CGameMode::ReceiveMemorialDungeonSubscriptionInfo(const unsigned char* packet) { - g_session.unknown_5950 = reinterpret_cast(packet + 2); - g_session.unknown_5968 = *reinterpret_cast(packet + 63); - g_session.unknown_5948 = 0; + g_session.memorialDungeonName = reinterpret_cast(packet + 2); + g_session.memorialQueuePosition = *reinterpret_cast(packet + 63); + g_session.memorialDungeonState = 0; if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } @@ -1500,14 +1500,14 @@ __declspec(noinline) void CGameMode::ReceiveMemorialDungeonSubscriptionInfo(cons // OFFSET: 0x00D32040 // FUNCTION: fn_21739 __declspec(noinline) void CGameMode::ReceiveMemorialDungeonSubscriptionNotify(const unsigned char* packet) { - g_session.unknown_5968 = *reinterpret_cast(packet + 2); + g_session.memorialQueuePosition = *reinterpret_cast(packet + 2); UIWindow* window = g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND); if (!window) { return; } if (*reinterpret_cast(packet + 2) > -1) { - g_session.unknown_5948 = 0; + g_session.memorialDungeonState = 0; window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); return; } @@ -1519,7 +1519,7 @@ __declspec(noinline) void CGameMode::ReceiveMemorialDungeonSubscriptionNotify(co // OFFSET: 0x00D320D0 // FUNCTION: fn_21740 void CGameMode::ReceiveWindow17Entries(const unsigned char* packet) { - this->unknown_024C = 1; + this->isOnQuest = 1; g_windowMgr.CloseWindow(WID_CHOOSEWND); if (UIWindow* window = g_windowMgr.EnsureWindow(WID_CHOOSEWND)) { const int length = *reinterpret_cast(packet + 2) - 9; @@ -1533,8 +1533,8 @@ void CGameMode::ReceiveWindow17Entries(const unsigned char* packet) { window->SendMsg(nullptr, UM_SETNAID, *reinterpret_cast(packet + 4), 0, 0, 0); } - if (g_windowMgr.unknown_01F0) { - g_windowMgr.unknown_01F0->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); + if (g_windowMgr.sayDialogWnd) { + g_windowMgr.sayDialogWnd->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); } } @@ -1590,7 +1590,7 @@ void CGameMode::IgnorePacket478(const unsigned char*) { // OFFSET: 0x00D3A1D0 // FUNCTION: fn_21775 void CGameMode::ClearUnknown0244(const unsigned char*) { - this->unknown_0244 = 0; + this->noMove = 0; } #pragma pack(push, 1) @@ -1623,10 +1623,10 @@ void CGameMode::ReceiveZoneServerChange(const char* mapName, std::int16_t x, std // FUNCTION: fn_21688 __declspec(noinline) void CGameMode::ReceiveActorStatusBlock(const unsigned char* packet) { g_session.SetUnknown5BC0(*reinterpret_cast(packet + 2)); - g_session.unknown_5BC4 = *reinterpret_cast(packet + 6); - g_session.unknown_5BC8 = *reinterpret_cast(packet + 0xE); - g_session.unknown_5BCC = *reinterpret_cast(packet + 0xA); - g_session.unknown_5BD0 = *reinterpret_cast(packet + 0x12); + g_session.elementalHp = *reinterpret_cast(packet + 6); + g_session.elementalSp = *reinterpret_cast(packet + 0xE); + g_session.elementalMaxHp = *reinterpret_cast(packet + 0xA); + g_session.elementalMaxSp = *reinterpret_cast(packet + 0x12); if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(packet + 2))) { actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -1635,23 +1635,23 @@ __declspec(noinline) void CGameMode::ReceiveActorStatusBlock(const unsigned char // OFFSET: 0x00D27320 // FUNCTION: fn_21689 __declspec(noinline) void CGameMode::ReceiveActorStatusUpdate(const unsigned char* packet) { - if (g_session.unknown_5BC0 != -1) { + if (g_session.elementalGid != -1) { const unsigned int field = *reinterpret_cast(packet + 2) - 5; switch (field) { case 0: - g_session.unknown_5BC4 = *reinterpret_cast(packet + 4); + g_session.elementalHp = *reinterpret_cast(packet + 4); break; case 2: - g_session.unknown_5BC8 = *reinterpret_cast(packet + 4); + g_session.elementalSp = *reinterpret_cast(packet + 4); break; case 1: - g_session.unknown_5BCC = *reinterpret_cast(packet + 4); + g_session.elementalMaxHp = *reinterpret_cast(packet + 4); break; case 3: - g_session.unknown_5BD0 = *reinterpret_cast(packet + 4); + g_session.elementalMaxSp = *reinterpret_cast(packet + 4); break; } - if (CRenderObject* actor = this->scene->GetGameActorByAID(g_session.unknown_5BC0)) { + if (CRenderObject* actor = this->scene->GetGameActorByAID(g_session.elementalGid)) { actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -1699,24 +1699,24 @@ __declspec(noinline) void CGameMode::ReceiveItem1740EquipList(const unsigned cha StoreEquipEntry entry; ReadStoreEquipEntry(entry, *record); ITEM_INFO item; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = entry.index; - item.unknown_0000[2] = entry.location; - item.unknown_0000[3] = entry.wearState; + item.identity[0] = entry.type; + item.identity[1] = entry.index; + item.identity[2] = entry.location; + item.identity[3] = entry.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); item.SetItemId(entry.itemId); item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0068 = entry.expireTime; - item.unknown_0064 = entry.bindOnEquip; - item.unknown_0070 = entry.sprite; - item.unknown_0074[0] = entry.placeEtcTab; - item.unknown_0088 = 0; - item.unknown_0098 = CountStoreItemOptions(entry.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = entry.options[index]; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.expireTime = entry.expireTime; + item.bindOnEquip = entry.bindOnEquip; + item.sprite = entry.sprite; + item.flags[0] = entry.placeEtcTab; + item.grade = 0; + item.optionCount = CountStoreItemOptions(entry.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = entry.options[index]; } g_session.AddItem1740(item); } @@ -1733,24 +1733,24 @@ void CGameMode::ReceiveItem1740EquipListOptions(const unsigned char* packet) { StoreEquipEntry entry; ReadStoreEquipEntry(entry, *record); ITEM_INFO item; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = entry.index; - item.unknown_0000[2] = entry.location; - item.unknown_0000[3] = entry.wearState; + item.identity[0] = entry.type; + item.identity[1] = entry.index; + item.identity[2] = entry.location; + item.identity[3] = entry.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); item.SetItemId(entry.itemId); item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0068 = entry.expireTime; - item.unknown_0064 = entry.bindOnEquip; - item.unknown_0070 = entry.sprite; - item.unknown_0074[0] = entry.placeEtcTab; - item.unknown_0088 = 0; - item.unknown_0098 = CountStoreItemOptions(entry.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = entry.options[index]; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.expireTime = entry.expireTime; + item.bindOnEquip = entry.bindOnEquip; + item.sprite = entry.sprite; + item.flags[0] = entry.placeEtcTab; + item.grade = 0; + item.optionCount = CountStoreItemOptions(entry.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = entry.options[index]; } g_session.AddItem1740(item); } @@ -1762,11 +1762,11 @@ void CGameMode::ReceiveItem1740EquipListOptions(const unsigned char* packet) { // FUNCTION: fn_21682 __declspec(noinline) void CGameMode::ReceiveUnknownD26800(const unsigned char* packet) { const unsigned char value = packet[2]; - *reinterpret_cast(g_session.unknown_5974) = value; + *reinterpret_cast(g_session.equipmentViewState) = value; const char* text = LookupMessage(value != 0 ? 0x54F : 0x54E); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -1820,7 +1820,7 @@ __declspec(noinline) void CGameMode::ReceiveRouletteSetResult(const unsigned cha g_rouletteMgr->SetAdditionItem(*reinterpret_cast(packet + 3)); g_rouletteMgr->SetResult(0, 0, 0); g_rouletteMgr->Reset(); - if (g_windowMgr.unknown_0464) { + if (g_windowMgr.roulletteWnd) { g_windowMgr.RefreshRouletteWnd(); } break; @@ -1872,21 +1872,21 @@ void CGameMode::ReceiveWhisperResult(unsigned char kind, int argument) { case ACKWHISPER_SUCCESS: { std::string line(g_session.DecodePlayerName()); line.append(" : ", 3); - line.append(this->unknown_0214.data(), this->unknown_0214.size()); - if (g_windowMgr.ShowWhisperFrom(this->unknown_022C.c_str(), line.c_str(), 0x7800, static_cast(argument)) != 0) { + line.append(this->lastWhisper.data(), this->lastWhisper.size()); + if (g_windowMgr.ShowWhisperFrom(this->lastWhisperName.c_str(), line.c_str(), 0x7800, static_cast(argument)) != 0) { return; } - const std::string copied = this->unknown_022C; + const std::string copied = this->lastWhisperName; std::string message; - if (g_windowMgr.IsFriend(this->unknown_022C.c_str()) || g_session.IsGuildMemberName(this->unknown_022C.c_str())) { + if (g_windowMgr.IsFriend(this->lastWhisperName.c_str()) || g_session.IsGuildMemberName(this->lastWhisperName.c_str())) { message = "[ To " + copied + " ("; message += ShortcutFilename(static_cast(argument)); - message += ") ] : " + this->unknown_0214; + message += ") ] : " + this->lastWhisper; } else { message = "( To " + copied + " ("; message += ShortcutFilename(static_cast(argument)); - message += ") : " + this->unknown_0214; + message += ") : " + this->lastWhisper; } if (g_pendingWhisperCount <= 0) { @@ -1901,7 +1901,7 @@ void CGameMode::ReceiveWhisperResult(unsigned char kind, int argument) { return; } case ACKWHISPER_TARGET_OFFLINE: { - const std::string text = "(" + this->unknown_022C + ")" + LookupMessage(MSI_NOT_EXIST_CHARACTER); + const std::string text = "(" + this->lastWhisperName + ")" + LookupMessage(MSI_NOT_EXIST_CHARACTER); if (g_pendingWhisperCount > 0) { --g_pendingWhisperCount; return; @@ -1910,17 +1910,17 @@ void CGameMode::ReceiveWhisperResult(unsigned char kind, int argument) { return; } case ACKWHISPER_IGNORED: { - const std::string text = "(" + this->unknown_022C + ")" + LookupMessage(MSI_NO_RECEIVE_MODE); + const std::string text = "(" + this->lastWhisperName + ")" + LookupMessage(MSI_NO_RECEIVE_MODE); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFFFF, 2, 0, 0); return; } case ACKWHISPER_ALL_IGNORED: { - const std::string text = "(" + this->unknown_022C + ")" + LookupMessage(MSI_NO_RECEIVE_MODE_FOR_ALL); + const std::string text = "(" + this->lastWhisperName + ")" + LookupMessage(MSI_NO_RECEIVE_MODE_FOR_ALL); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFFFF, 2, 0, 0); return; } default: { - const std::string text = "(" + this->unknown_022C + ")" + LookupMessage(MSI_NOT_EXIST_CHARACTER); + const std::string text = "(" + this->lastWhisperName + ")" + LookupMessage(MSI_NOT_EXIST_CHARACTER); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFFFF, 2, 0, 0); if (g_session.m_whisperRecord != 0) { this->WriteChatLog(text.c_str()); @@ -1948,9 +1948,9 @@ void __stdcall ProcessVendingSale(int field8, int itemIdWord, int quantityWord, const int itemId = static_cast(itemIdWord); const int quantity = static_cast(quantityWord); ITEM_INFO item = g_session.FindItem1758(static_cast(itemId)); - item.unknown_0000[1] = static_cast(itemId); + item.identity[1] = static_cast(itemId); item.quantity = quantity; - item.unknown_0014[0] = static_cast(field14); + item.prices[0] = static_cast(field14); UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMLOGWND_MODE_0); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&item), field18, field8, 0); g_session.RemoveItem1758(item); @@ -1958,19 +1958,19 @@ void __stdcall ProcessVendingSale(int field8, int itemIdWord, int quantityWord, g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_ITEM_IS_SOLD), item.DisplayName(0).c_str(), quantity).c_str()), 0xFFFF64, 0, 0, 0 ); - if (g_windowMgr.unknown_02F4 != nullptr) { - g_windowMgr.unknown_02F4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.merchantItemWnd != nullptr) { + g_windowMgr.merchantItemWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } if (g_session.GetList9Size() == 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_IS_SOLD_OUT)), 0xFF00, 0, 0, 0); - if (g_windowMgr.unknown_0304 != nullptr) { - g_windowMgr.unknown_0304->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); - g_windowMgr.unknown_0304->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.merchantItemMyShopWnd != nullptr) { + g_windowMgr.merchantItemMyShopWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + g_windowMgr.merchantItemMyShopWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } - } else if (g_windowMgr.unknown_0304 != nullptr) { - g_windowMgr.unknown_0304->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + } else if (g_windowMgr.merchantItemMyShopWnd != nullptr) { + g_windowMgr.merchantItemMyShopWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.unknown_0304 != nullptr && g_session.m_muteSellSound) { + if (g_windowMgr.merchantItemMyShopWnd != nullptr && g_session.m_muteSellSound) { g_soundMgr->PlayWave("effect\\ef_steal.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } } @@ -1981,21 +1981,21 @@ void __declspec(noinline) __stdcall ProcessBuyingStorePurchase(int field14, int ITEM_INFO item = g_session.FindItem1758ByItemId(itemId); item.SetItemId(itemId); item.quantity = quantity; - item.unknown_0014[0] = static_cast(field8); + item.prices[0] = static_cast(field8); UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMLOGWND_MODE_1); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&item), field10, field14, 0); g_session.RemoveItem1758ByItemId(item); - if (g_windowMgr.unknown_01D4 != nullptr) { - g_windowMgr.unknown_01D4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemWnd != nullptr) { + g_windowMgr.itemWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - if (g_windowMgr.unknown_0414 != nullptr) { - g_windowMgr.unknown_0414->SendMsg(nullptr, UM_SET_BUYING_SHOP_ZENY, fieldC, 0, 0, 0); - g_windowMgr.unknown_0414->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.buyingShopMyItemsWnd != nullptr) { + g_windowMgr.buyingShopMyItemsWnd->SendMsg(nullptr, UM_SET_BUYING_SHOP_ZENY, fieldC, 0, 0, 0); + g_windowMgr.buyingShopMyItemsWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); if (g_session.m_muteSellSound) { g_soundMgr->PlayWave("effect\\ef_steal.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); } if (g_session.GetList9Size() == 0) { - g_windowMgr.unknown_0414->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + g_windowMgr.buyingShopMyItemsWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } } } @@ -2020,17 +2020,17 @@ __declspec(noinline) void CGameMode::ReceiveItem1740BasicList(const unsigned cha const Item1740Record* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[2] = record->location; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[2] = record->location; + item.identity[3] = record->wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->unknown_000C; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; + item.damaged = record->damaged; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; g_session.AddItem1740(item); } @@ -2045,19 +2045,19 @@ __declspec(noinline) void CGameMode::ReceiveItem1740BasicListBind(const unsigned const Item1740EquipRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[2] = record->location; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[2] = record->location; + item.identity[3] = record->wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->unknown_000C; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->sprite; + item.damaged = record->damaged; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->sprite; g_session.AddItem1740(item); } @@ -2074,18 +2074,18 @@ __declspec(noinline) void CGameMode::ReceiveItemInventoryList(const unsigned cha const StoreNormalRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; - item.unknown_0000[2] = 0; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[3] = record->location; + item.identity[2] = 0; item.quantity = record->amount; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.damaged = 0; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.UpdateInventoryItem(item, 0); } @@ -2176,7 +2176,7 @@ void CGameMode::ReceiveShopItemList( } } - this->unknown_024C = 1; + this->isOnQuest = 1; } // OFFSET: 0x00D79AF0 @@ -2234,37 +2234,37 @@ __declspec(noinline) void CGameMode::ReceiveActorMessage7(const unsigned char* p // OFFSET: 0x00D7AEB0 // FUNCTION: fn_22194 __declspec(noinline) void CGameMode::Zc_Start_Baby(const unsigned char*) { - this->unknown_040C = 20001; - this->unknown_0410 = 5; - this->unknown_0414 = 0; - this->unknown_0408 = reinterpret_cast(2); + this->skillId = 20001; + this->skillAttackRange = 5; + this->skillUseLevel = 0; + this->skillUseType = reinterpret_cast(2); } // OFFSET: 0x00D7AEE0 // FUNCTION: fn_22195 __declspec(noinline) void CGameMode::Zc_Start_Capture(const unsigned char*) { - this->unknown_040C = 10000; - this->unknown_0410 = 5; - this->unknown_0414 = 0; - this->unknown_0408 = reinterpret_cast(2); + this->skillId = 10000; + this->skillAttackRange = 5; + this->skillUseLevel = 0; + this->skillUseType = reinterpret_cast(2); } // OFFSET: 0x00D7AF10 // FUNCTION: fn_22196 __declspec(noinline) void CGameMode::Zc_Start_Collection(const unsigned char*) { - this->unknown_040C = 40000; - this->unknown_0410 = 1; - this->unknown_0414 = 0; - this->unknown_0408 = reinterpret_cast(2); + this->skillId = 40000; + this->skillAttackRange = 1; + this->skillUseLevel = 0; + this->skillUseType = reinterpret_cast(2); } // OFFSET: 0x00D7AF40 // FUNCTION: fn_22197 __declspec(noinline) void CGameMode::Zc_Start_Couple(const unsigned char*) { - this->unknown_040C = 20000; - this->unknown_0410 = 5; - this->unknown_0414 = 0; - this->unknown_0408 = reinterpret_cast(2); + this->skillId = 20000; + this->skillAttackRange = 5; + this->skillUseLevel = 0; + this->skillUseType = reinterpret_cast(2); } // OFFSET: 0x00D591A0 @@ -2275,7 +2275,7 @@ void CGameMode::ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, return; } - actor->unknown_0210 = static_cast(flag); + actor->characterLevel = static_cast(flag); if (!StateFlag06(state)) { actor->UpdateMaxLevelAura(); } @@ -2371,7 +2371,7 @@ void CGameMode::ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, actor->render.isMotionFreezed = true; break; } - actor->render.unknown_00A3 = 1; + actor->render.colorLocked = 1; actor->SetColor(-1, 64, 64, 64); } @@ -2394,7 +2394,7 @@ void CGameMode::ApplyActorStatusEffects(std::uint32_t aid, int state, int flag, if (options & 0x20) { actor->render.isMotionFreezed = true; - actor->render.unknown_00A3 = 1; + actor->render.colorLocked = 1; actor->SetColor(-1, 64, 64, 64); } @@ -2564,7 +2564,7 @@ __declspec(noinline) void CGameMode::ReceiveLapineUpgradeBoxValue(int value) { // OFFSET: 0x00D7B420 // FUNCTION: fn_22203 __declspec(noinline) void CGameMode::Zc_Trycapture_Monster(const unsigned char* packet) { - UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0394); + UIWindow* window = reinterpret_cast(g_windowMgr.petTamingDeceiveWnd); if (packet[2] != 0) { if (window) { window->SendMsg(nullptr, UM_SET_TARGET, 1, 7, 0, 0); @@ -2653,7 +2653,7 @@ __declspec(noinline) void CGameMode::ReceiveRouletteBonusPoints(const unsigned c break; } - if (g_windowMgr.unknown_0464 != nullptr) { + if (g_windowMgr.roulletteWnd != nullptr) { g_windowMgr.RefreshRouletteWnd(); } } @@ -2742,7 +2742,7 @@ __declspec(noinline) void CGameMode::ReceiveChatEntries(unsigned char* data) { const int count = (packet->length - 6) / static_cast(sizeof(ChatTextEntry)); g_windowMgr.CloseWindow(WID_CHOOSEWARPWND); UIWindow* window = g_windowMgr.EnsureWindow(WID_CHOOSEWARPWND); - window->SendMsg(nullptr, UM_SETSKID, packet->unknown_0004, 0, 0, 0); + window->SendMsg(nullptr, UM_SETSKID, packet->skillId, 0, 0, 0); for (int i = 0; i < count; ++i) { ChatTextEntry* entry = &packet->entries[i]; entry->text[15] = '\0'; @@ -2779,7 +2779,7 @@ __declspec(noinline) void CGameMode::ReceivePacket0B73(const unsigned char* data } } - effect->unknown_00B0 = packet->value; + effect->effectLevel = packet->value; effect->Open(); } @@ -2833,8 +2833,8 @@ void LaunchRollingCutterEffect(CGameActor* actor) { // FUNCTION: fn_21721 __declspec(noinline) void CGameMode::ReceiveInventoryItemUpdate(const unsigned char* packet) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(packet + 2)); - if (item.unknown_0000[1] != 0) { - item.unknown_0074[0] = *reinterpret_cast(packet + 4) == 0; + if (item.identity[1] != 0) { + item.flags[0] = *reinterpret_cast(packet + 4) == 0; g_session.UpdateInventoryItem(item, 1); } } @@ -2850,7 +2850,7 @@ __declspec(noinline) void CGameMode::OpenWindow154() { // OFFSET: 0x00D2D990 // FUNCTION: fn_21722 __declspec(noinline) void CGameMode::ReceiveUnknownD2D990(const unsigned char*) { - if (g_windowMgr.unknown_03F8) { + if (g_windowMgr.memorialDunWnd) { g_windowMgr.CloseWindow(WID_MEMORIALDUNWND); GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_MEMORIAL_DUN_ERROR), 0, true, true, 0, "Message", 280, 120, 0) != 269) { @@ -2869,8 +2869,8 @@ void CGameMode::ReceiveUnknownD4E3F0(const unsigned char* packet) { const std::int16_t* ids = reinterpret_cast(packet + 4); for (unsigned int index = count; index != 0; --index, ++ids) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *ids); - if (item.unknown_0000[1] != 0) { - window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.unknown_0000[1], 0, 0); + if (item.identity[1] != 0) { + window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.identity[1], 0, 0); } } @@ -2883,13 +2883,13 @@ void CGameMode::ReceiveUnknownD4E2A0(const unsigned char* packet) { unsigned int count = *reinterpret_cast(packet + 2) - 4; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOMPOSITIONWND); window->SendMsg(nullptr, UM_CLEAR_ITEM, 0, 0, 0, 0); - window->SendMsg(nullptr, UM_SET_CARD_ITEM_INDEX, *reinterpret_cast(this->unknown_045C), 0, 0, 0); + window->SendMsg(nullptr, UM_SET_CARD_ITEM_INDEX, *reinterpret_cast(this->cardAndSkillBalloonIds), 0, 0, 0); count >>= 1; const std::int16_t* ids = reinterpret_cast(packet + 4); for (unsigned int index = count; index != 0; --index, ++ids) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *ids); - if (item.unknown_0000[1] != 0) { - window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.unknown_0000[1], 0, 0); + if (item.identity[1] != 0) { + window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.identity[1], 0, 0); } } @@ -2900,17 +2900,17 @@ void CGameMode::ReceiveUnknownD4E2A0(const unsigned char* packet) { // FUNCTION: fn_22149 void CGameMode::ReceiveNotifySkill(const unsigned char* packet) { ActorSkillMessage message; - message.unknown_0000 = *reinterpret_cast(packet + 2); - message.unknown_0004 = *reinterpret_cast(packet + 0x18); - message.unknown_0008 = packet[0x20]; - message.unknown_000C = *reinterpret_cast(packet + 8); - message.unknown_0010 = *reinterpret_cast(packet + 0xC); - message.unknown_0014 = *reinterpret_cast(packet + 0x1C); - message.unknown_0018 = *reinterpret_cast(packet + 0x1E); - message.unknown_001C = -1; - message.unknown_0020 = -1; - message.unknown_0024 = *reinterpret_cast(packet + 0x10); - message.unknown_0028 = *reinterpret_cast(packet + 0x14); + message.skillId = *reinterpret_cast(packet + 2); + message.damage = *reinterpret_cast(packet + 0x18); + message.actionType = packet[0x20]; + message.targetId = *reinterpret_cast(packet + 8); + message.tick = *reinterpret_cast(packet + 0xC); + message.skillLevel = *reinterpret_cast(packet + 0x1C); + message.hitCount = *reinterpret_cast(packet + 0x1E); + message.cellX = -1; + message.cellY = -1; + message.attackMotion = *reinterpret_cast(packet + 0x10); + message.damageMotion = *reinterpret_cast(packet + 0x14); const std::uint16_t skillId = *reinterpret_cast(packet + 2); const std::uint32_t sourceAid = *reinterpret_cast(packet + 4); @@ -3381,7 +3381,7 @@ void CGameMode::ReceiveNotifySkill(const unsigned char* packet) { this->SendMsg(MM_MAKE_SKILL_USED_MSG, skillId, reinterpret_cast(source), *reinterpret_cast(packet + 0x1C), 0); return; } - const unsigned char kind = source->unknown_0314; + const unsigned char kind = source->objectType; if (kind == 10 || kind == 13 || kind == 14) { this->SendMsg(MM_MAKE_SKILL_USED_MSG, skillId, reinterpret_cast(source), *reinterpret_cast(packet + 0x1C), 0); } @@ -3389,7 +3389,7 @@ void CGameMode::ReceiveNotifySkill(const unsigned char* packet) { int action; int loopType; - g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.unknown_0000, &action, &loopType); + g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.skillId, &action, &loopType); if (action != -1 && gameActor != nullptr) { gameActor->SetAction(action * 8 - 8, 1, loopType == 0); } @@ -3399,17 +3399,17 @@ void CGameMode::ReceiveNotifySkill(const unsigned char* packet) { // FUNCTION: fn_22150 void CGameMode::ReceiveActorSkillAction(const unsigned char* packet) { ActorSkillMessage message; - message.unknown_0000 = *reinterpret_cast(packet + 2); - message.unknown_0004 = *reinterpret_cast(packet + 0x18); - message.unknown_0008 = packet[0x1E]; - message.unknown_000C = *reinterpret_cast(packet + 8); - message.unknown_0010 = *reinterpret_cast(packet + 0xC); - message.unknown_0014 = *reinterpret_cast(packet + 0x1A); - message.unknown_0018 = *reinterpret_cast(packet + 0x1C); - message.unknown_001C = -1; - message.unknown_0020 = -1; - message.unknown_0024 = *reinterpret_cast(packet + 0x10); - message.unknown_0028 = *reinterpret_cast(packet + 0x14); + message.skillId = *reinterpret_cast(packet + 2); + message.damage = *reinterpret_cast(packet + 0x18); + message.actionType = packet[0x1E]; + message.targetId = *reinterpret_cast(packet + 8); + message.tick = *reinterpret_cast(packet + 0xC); + message.skillLevel = *reinterpret_cast(packet + 0x1A); + message.hitCount = *reinterpret_cast(packet + 0x1C); + message.cellX = -1; + message.cellY = -1; + message.attackMotion = *reinterpret_cast(packet + 0x10); + message.damageMotion = *reinterpret_cast(packet + 0x14); CGameActor* actor = nullptr; CGameActor* gameActor = nullptr; @@ -3440,7 +3440,7 @@ void CGameMode::ReceiveActorSkillAction(const unsigned char* packet) { int action; int loopType; - g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.unknown_0000, &action, &loopType); + g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.skillId, &action, &loopType); if (action != -1 && gameActor != nullptr) { gameActor->SetAction(action * 8 - 8, 1, loopType == 0); } @@ -3450,17 +3450,17 @@ void CGameMode::ReceiveActorSkillAction(const unsigned char* packet) { // FUNCTION: fn_22151 void CGameMode::ReceiveActorSkillMessage(const unsigned char* packet) { ActorSkillMessage message; - message.unknown_0000 = *reinterpret_cast(packet + 2); - message.unknown_0004 = *reinterpret_cast(packet + 0x1C); - message.unknown_0008 = packet[0x22]; - message.unknown_000C = *reinterpret_cast(packet + 8); - message.unknown_0010 = *reinterpret_cast(packet + 0xC); - message.unknown_0014 = *reinterpret_cast(packet + 0x1E); - message.unknown_0018 = *reinterpret_cast(packet + 0x20); - message.unknown_001C = *reinterpret_cast(packet + 0x18); - message.unknown_0020 = *reinterpret_cast(packet + 0x1A); - message.unknown_0024 = *reinterpret_cast(packet + 0x10); - message.unknown_0028 = *reinterpret_cast(packet + 0x14); + message.skillId = *reinterpret_cast(packet + 2); + message.damage = *reinterpret_cast(packet + 0x1C); + message.actionType = packet[0x22]; + message.targetId = *reinterpret_cast(packet + 8); + message.tick = *reinterpret_cast(packet + 0xC); + message.skillLevel = *reinterpret_cast(packet + 0x1E); + message.hitCount = *reinterpret_cast(packet + 0x20); + message.cellX = *reinterpret_cast(packet + 0x18); + message.cellY = *reinterpret_cast(packet + 0x1A); + message.attackMotion = *reinterpret_cast(packet + 0x10); + message.damageMotion = *reinterpret_cast(packet + 0x14); CGameActor* actor = nullptr; int job = -1; @@ -3490,7 +3490,7 @@ void CGameMode::ReceiveActorSkillMessage(const unsigned char* packet) { int action; int loopType; - g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.unknown_0000, &action, &loopType); + g_session.GetMonsterSkillInfo(g_session.GetJobName(job, -1), message.skillId, &action, &loopType); } // OFFSET: 0x00D25310 @@ -3501,18 +3501,18 @@ __declspec(noinline) void CGameMode::ReceiveItem1740List(const unsigned char* pa const auto* record = reinterpret_cast(packet + 4); for (int index = count; index > 0; --index, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[2] = 0; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[2] = 0; + item.identity[3] = record->location; item.quantity = record->amount; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.AddItem1740(item); } @@ -3529,7 +3529,7 @@ void CGameMode::ReceiveDispel(const unsigned char* packet) { this->scene->player->SendMsg(nullptr, AM_DELETE_MAGIC_TARGET, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->scene->player->SendMsg(nullptr, AM_DELETE_SKILL_RECHARGEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); CPlayer* player = this->scene->player; - if (player->render.unknown_0070 == 8) { + if (player->render.state == 8) { player->SetState(0, 1); } return; @@ -3544,7 +3544,7 @@ void CGameMode::ReceiveDispel(const unsigned char* packet) { actor->SendMsg(nullptr, AM_DELETE_MAGIC_TARGET, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); actor->SendMsg(nullptr, AM_DELETE_SKILL_RECHARGEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); g_effectMgr->Retire(dispel->aid, 1114); - if (actor->render.unknown_0070 == 8) { + if (actor->render.state == 8) { actor->SetState(0, 1); } } @@ -3553,7 +3553,7 @@ void CGameMode::ReceiveDispel(const unsigned char* packet) { // FUNCTION: fn_21748 __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* packet) { if (g_replayAnimationScaling == 0) { - reinterpret_cast(g_windowMgr.unknown_040C)->PrintBuyList(); + reinterpret_cast(g_windowMgr.buyingShopMakeWnd)->PrintBuyList(); } g_session.ClearItems1768(); @@ -3566,11 +3566,11 @@ __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* pa for (int index = 0; index < count; ++index, ++record) { const Item1758Record entry = *record; ITEM_INFO item; - item.unknown_0014[0] = entry.price; - item.unknown_0014[1] = entry.price; + item.prices[0] = entry.price; + item.prices[1] = entry.price; item.quantity = entry.quantity; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = index + 1; + item.identity[0] = entry.type; + item.identity[1] = index + 1; item.identified = 1; item.SetItemId(entry.itemId); g_session.AddItem1758(item); @@ -3579,7 +3579,7 @@ __declspec(noinline) void CGameMode::ReceiveItem1758List(const unsigned char* pa UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTITEMMYSHOPWND_MODE_1); window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); window->SendMsg(nullptr, UM_SET_BUYING_SHOP_ZENY, *reinterpret_cast(packet + 8), 0, 0, 0); - this->unknown_024C = 1; + this->isOnQuest = 1; } // OFFSET: 0x00D50810 @@ -3604,19 +3604,19 @@ void CGameMode::ReceiveUnknownD50810(const unsigned char* packet) { for (int i = 0; i < count; ++i, ++record) { const Item1758StoreRecord entry = *record; ITEM_INFO item; - item.unknown_0000[0] = entry.type; - item.unknown_0000[1] = entry.index; - item.unknown_0014[0] = entry.unknown_0000; - item.unknown_0014[1] = entry.unknown_0000; + item.identity[0] = entry.type; + item.identity[1] = entry.index; + item.prices[0] = entry.price; + item.prices[1] = entry.price; item.quantity = entry.amount; - std::memcpy(item.unknown_001C, entry.cards, sizeof(entry.cards)); + std::memcpy(item.cards, entry.cards, sizeof(entry.cards)); item.SetItemId(entry.itemId); item.identified = entry.identified; - item.unknown_005D = entry.damaged; - item.unknown_0060 = entry.refine; - item.unknown_0098 = CountStoreItemOptions(entry.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = entry.options[index]; + item.damaged = entry.damaged; + item.refiningLevel = entry.refine; + item.optionCount = CountStoreItemOptions(entry.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = entry.options[index]; } g_session.AddItem1758(item); } @@ -3632,21 +3632,21 @@ void CGameMode::ReceiveItem1748List(const unsigned char* packet) { for (int i = 0; i < count; ++i) { const Item1748Record record = *reinterpret_cast(packet + 0x0C + i * sizeof(Item1748Record)); ITEM_INFO item; - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = record.index; - item.unknown_0000[2] = record.unknown_0039; - item.unknown_0014[0] = record.unknown_0000; - item.unknown_0014[1] = record.unknown_0000; + item.identity[0] = record.type; + item.identity[1] = record.index; + item.identity[2] = record.location; + item.prices[0] = record.price; + item.prices[1] = record.price; item.quantity = record.amount; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; - item.unknown_0070 = record.sprite; - item.unknown_0098 = CountStoreItemOptions(record.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + item.damaged = record.damaged; + item.refiningLevel = record.refine; + item.sprite = record.sprite; + item.optionCount = CountStoreItemOptions(record.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } g_session.AddItem1748(item); } @@ -3657,7 +3657,7 @@ void CGameMode::ReceiveItem1748List(const unsigned char* packet) { UIWindow* optionsWindow = g_windowMgr.EnsureWindow(WID_MERCHANTITEMPURCHASEWND); optionsWindow->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); optionsWindow->SendMsg(nullptr, UM_SETNAID, *reinterpret_cast(packet + 4), *reinterpret_cast(packet + 8), 0, 0); - this->unknown_024C = 1; + this->isOnQuest = 1; } // OFFSET: 0x00D5F5C0 @@ -3677,9 +3677,9 @@ void CGameMode::ReceiveActorStatusValue(std::uint32_t aid, int status, int amoun case EF_HPTIME: if (aid == g_session.m_aid) { g_session.UpdateRandomStats(); - const int hp = g_session.unknown_5568 + amount; - if (g_session.unknown_5568 != hp) { - g_session.unknown_5568 = hp; + const int hp = g_session.hp + amount; + if (g_session.hp != hp) { + g_session.hp = hp; g_session.RefreshHpSpWindows(); } } @@ -3688,7 +3688,7 @@ void CGameMode::ReceiveActorStatusValue(std::uint32_t aid, int status, int amoun case EF_SPTIME: if (aid == g_session.m_aid) { g_session.UpdateRandomStats(); - int& sp = *reinterpret_cast(&g_session.unknown_5570[0]); + int& sp = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); const int value = sp + amount; if (sp != value) { sp = value; @@ -3746,14 +3746,14 @@ void CGameMode::ReceiveItem1718List(const unsigned char* packet) { RawItemBasic item = {}; _itoa(entry.itemId, item.itemId, 10); - item.unknown_0004 = entry.unknown_0005; - item.unknown_0008 = entry.unknown_0005; - item.unknown_000C = entry.type; - item.unknown_0034 = entry.unknown_000F; + item.price = entry.price; + item.realPrice = entry.price; + item.type = entry.type; + item.location = entry.itemFlags; item.id = -1; item.identified = 1; - item.unknown_0038 = FindItemDescription(std::atoi(item.itemId)).unknown_0040; - g_session.AddItem1718(item, entry.quantity, static_cast(entry.unknown_000D / 10)); + item.sprite = FindItemDescription(std::atoi(item.itemId)).viewId; + g_session.AddItem1718(item, entry.quantity, static_cast(entry.weight / 10)); } if (UIWindow* window = g_windowMgr.EnsureWindow(WID_PARAITEMSHOPWND)) { @@ -3776,16 +3776,16 @@ void ReceiveTradeItems(int count, const TradeItemRecord* records) { const TradeItemRecord& record = records[i]; ITEM_INFO item; item.SetItemId(record.itemId); - item.unknown_0000[0] = record.unknown_0004; - item.unknown_006C = record.unknown_000D / 10; + item.identity[0] = record.type; + item.priceFactor = record.weight / 10; item.quantity = record.quantity; - item.unknown_0014[0] = record.unknown_0005; - item.unknown_0014[1] = record.unknown_0005; - item.unknown_0060 = record.unknown_000F; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); - item.unknown_0000[1] = record.unknown_0020; + item.prices[0] = record.price; + item.prices[1] = record.price; + item.refiningLevel = record.refine; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); + item.identity[1] = record.index; item.identified = 1; - item.unknown_0074[3] = 1; + item.flags[3] = 1; if (item.quantity > 0) { g_session.AppendItem1718(item); } @@ -3804,7 +3804,7 @@ void ReceiveTradeItems(int count, const TradeItemRecord* records) { // OFFSET: 0x00D7A2F0 // FUNCTION: fn_22190 void CGameMode::ShowSpecialPopup(int popupId) { - if (this->unknown_060C[0]) { + if (this->sameMapMove[0]) { return; } @@ -3992,7 +3992,7 @@ void CGameMode::UpdateActorSpiritCount(std::uint32_t aid, std::int16_t count) { if (!coins) { return; } - static_cast(coins)->unknown_00E4 = count; + static_cast(coins)->coinCount = count; coins->Open(); return; } @@ -4026,7 +4026,7 @@ void CGameMode::UpdateActorSpiritCount(std::uint32_t aid, std::int16_t count) { } for (auto it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end(); ++it) { if (it->id == 1244) { - it->unknown_0008 = count; + it->value1 = count; break; } } @@ -4065,12 +4065,12 @@ void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { const BuyingStoreItemRecord entry = *record; ITEM_INFO item; ++index; - item.unknown_0014[0] = entry.price; - item.unknown_0014[1] = entry.price; - item.unknown_0000[0] = entry.type; + item.prices[0] = entry.price; + item.prices[1] = entry.price; + item.identity[0] = entry.type; item.quantity = entry.count; item.identified = 1; - item.unknown_0000[1] = index; + item.identity[1] = index; item.SetItemId(entry.itemId); lists->AddItem1748(item); ++record; @@ -4085,7 +4085,7 @@ void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); window->SendMsg(nullptr, UM_SETNAID, *reinterpret_cast(packet + 4), *reinterpret_cast(packet + 8), 0, 0); - window = reinterpret_cast(g_windowMgr.unknown_0420); + window = reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd); if (window) { g_session.RefreshItems1750(); window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -4093,14 +4093,14 @@ void CGameMode::ReceiveBuyingStoreItemList(const unsigned char* packet) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - this->unknown_024C = 1; + this->isOnQuest = 1; } // OFFSET: 0x00D5F3E0 // FUNCTION: fn_21969 void CGameMode::SetActorNameCard(std::uint32_t id, const char* name, const char* value1, const char* value2, const char* value3, int job) { if (id == g_session.m_aid) { - g_session.unknown_615C = job; + g_session.jobTitle = job; } std::string jobTitle = GetJobTitleString(job); @@ -4217,37 +4217,37 @@ void CGameMode::ReceiveStatusBonus(const unsigned char* data) { case SP_STR: g_session.m_standardStats[0] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_166C = packet->bonus; + g_session.strengthBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_AGI: g_session.m_standardStats[1] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_1670 = packet->bonus; + g_session.agilityBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_VIT: g_session.m_standardStats[2] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_1674 = packet->bonus; + g_session.vitalityBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_INT: g_session.m_standardStats[3] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_1678 = packet->bonus; + g_session.intelligenceBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_DEX: g_session.m_standardStats[4] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_167C = packet->bonus; + g_session.dexterityBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_LUK: g_session.m_standardStats[5] = packet->value; g_session.InvalidateWindowFrames(); - g_session.unknown_1680 = packet->bonus; + g_session.luckBonus = packet->bonus; g_session.InvalidateWindowFrames(); break; case SP_POW: @@ -4314,8 +4314,8 @@ __declspec(noinline) void CGameMode::ReceiveSwapEquipmentList(const unsigned cha const SwapEquipmentRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item = g_session.FindItemByIdentity(record->index, record->location); - item.unknown_0000[3] = record->location; - if (item.unknown_0000[1] == 0) { + item.identity[3] = record->location; + if (item.identity[1] == 0) { break; } @@ -4374,15 +4374,15 @@ namespace { struct GuildMemberRecord { /* 0000 */ int accountId; /* 0004 */ int characterId; - /* 0008 */ std::int16_t unknown_0008; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; + /* 0008 */ std::int16_t head; + /* 000A */ std::int16_t headPalette; + /* 000C */ std::int16_t sex; /* 000E */ std::int16_t job; /* 0010 */ std::int16_t level; /* 0012 */ int exp; /* 0016 */ int online; /* 001A */ int positionId; - /* 001E */ int unknown_001E; + /* 001E */ int lastTimeOffline; }; #pragma pack(pop) @@ -4395,7 +4395,7 @@ void CGameMode::ReceiveGuildMemberList(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildMemberRecord); - guildInfo->unknown_0064 = count; + guildInfo->memberCount = count; guildInfo->ClearMembers(); const GuildMemberRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); @@ -4403,16 +4403,16 @@ void CGameMode::ReceiveGuildMemberList(const unsigned char* data) { GuildInfo::Member member; member.accountId = record->accountId; member.characterId = record->characterId; - member.unknown_0020 = record->unknown_0008; - member.unknown_0024 = record->unknown_000A; + member.head = record->head; + member.headPalette = record->headPalette; member.job = record->job; - member.unknown_002C = record->unknown_000C; + member.sex = record->sex; member.positionId = record->positionId; member.level = record->level; member.exp = record->exp; member.online = record->online; member.expRatio = 0.0f; - *reinterpret_cast(member.unknown_0074) = record->unknown_001E; + *reinterpret_cast(member.lastOfflineTime) = record->lastTimeOffline; if (member.characterId == g_session.m_gid) { member.name = g_session.DecodePlayerName(); } @@ -4430,9 +4430,9 @@ namespace { struct GuildMemberMemoRecord { /* 0000 */ int accountId; /* 0004 */ int characterId; - /* 0008 */ std::int16_t unknown_0008; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; + /* 0008 */ std::int16_t head; + /* 000A */ std::int16_t headPalette; + /* 000C */ std::int16_t sex; /* 000E */ std::int16_t job; /* 0010 */ std::int16_t level; /* 0012 */ int exp; @@ -4452,7 +4452,7 @@ void CGameMode::ReceiveGuildMemberMemoList(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildMemberMemoRecord); - guildInfo->unknown_0064 = count; + guildInfo->memberCount = count; guildInfo->ClearMembers(); const GuildMemberMemoRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); @@ -4460,10 +4460,10 @@ void CGameMode::ReceiveGuildMemberMemoList(const unsigned char* data) { GuildInfo::Member member; member.accountId = record->accountId; member.characterId = record->characterId; - member.unknown_0020 = record->unknown_0008; - member.unknown_0024 = record->unknown_000A; + member.head = record->head; + member.headPalette = record->headPalette; member.job = record->job; - member.unknown_002C = record->unknown_000C; + member.sex = record->sex; member.positionId = record->positionId; member.level = record->level; member.exp = record->exp; @@ -4477,7 +4477,7 @@ void CGameMode::ReceiveGuildMemberMemoList(const unsigned char* data) { std::memcpy(name, record->name, sizeof(record->name)); name[24] = '\0'; member.name = name; - member.unknown_0050 = memo; + member.memo = memo; member.positionName.clear(); guildInfo->AddMember(member); } @@ -4499,14 +4499,14 @@ __declspec(noinline) void CGameMode::ReceiveOpenStore(const unsigned char* packe } const unsigned int count = packet[2]; - int& storeCount = *reinterpret_cast(&g_session.unknown_0F44[4]); + int& storeCount = *reinterpret_cast(&g_session.storeSlotCounts[4]); if (count < 2) { storeCount = 2; } else { storeCount = count > 5 ? 5 : count; } g_session.ClearItems1768(); - if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.unknown_02FC) { + if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.merchantShopMakeWnd) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND_MODE_1)) { static_cast(window)->AddActionButton(); } @@ -4526,8 +4526,8 @@ struct ACTSTRUCT { /* 0010 */ std::uint32_t targetId; /* 0014 */ std::uint32_t tick; /* 0018 */ int count; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; + /* 001C */ int attackMotion; + /* 0020 */ int damageMotion; /* 0024 */ int attackMT; /* 0028 */ int attackedMT; /* 002C */ bool spDamaged; @@ -4539,8 +4539,8 @@ ACTSTRUCT::~ACTSTRUCT() = default; // OFFSET: 0x00D3A770 // FUNCTION: fn_21779 __declspec(noinline) void CGameMode::ReceiveSearchStoreOpen(const unsigned char* packet) { - g_session.unknown_5BE0 = packet[4]; - reinterpret_cast(&g_session.unknown_5BE4)[1] = *reinterpret_cast(packet + 2); + g_session.storeSearchCount = packet[4]; + reinterpret_cast(&g_session.storeSearchPageFlags)[1] = *reinterpret_cast(packet + 2); g_windowMgr.EnsureWindow(WID_SEARCH_STORE_INFO); } @@ -4558,20 +4558,20 @@ static_assert(sizeof(ParChangePacket) == 8); // FUNCTION: fn_21780 void CGameMode::ReceiveParChange(unsigned char* data) { auto* packet = reinterpret_cast(data); - int* derivedStats = reinterpret_cast(g_session.unknown_169C); + int* derivedStats = reinterpret_cast(g_session.combatStats); g_modeMgr.GetGameMode(); std::string text; switch (packet->type) { case SP_SPEED: - if (*reinterpret_cast(&g_session.unknown_16F4[0]) != packet->value) { - *reinterpret_cast(&g_session.unknown_16F4[0]) = packet->value; + if (*reinterpret_cast(&g_session.healthPoints[0]) != packet->value) { + *reinterpret_cast(&g_session.healthPoints[0]) = packet->value; g_session.InvalidateWindowFrames(); } break; case SP_KARMA: - *reinterpret_cast(&g_session.unknown_1704[0]) = packet->value; + *reinterpret_cast(&g_session.optionFlags[0]) = packet->value; g_session.InvalidateWindowFrames(); break; case SP_MANNER: @@ -4584,7 +4584,7 @@ void CGameMode::ReceiveParChange(unsigned char* data) { this->scene->player->SendMsg(nullptr, AM_DELETE_PROHIBITEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFFFF, 0, 0, 0); - *reinterpret_cast(&g_session.unknown_16F4[4]) = packet->value; + *reinterpret_cast(&g_session.healthPoints[4]) = packet->value; g_session.InvalidateWindowFrames(); break; case SP_UNBREAKABLE: @@ -4593,22 +4593,22 @@ void CGameMode::ReceiveParChange(unsigned char* data) { } break; case SP_HP: - if (g_session.unknown_556C > 0 && (packet->value * 100) / g_session.unknown_556C < 25 && - this->scene->GetGameActorByAID(g_session.unknown_1010) && rand() % 100 < 50 && + if (g_session.maxHp > 0 && (packet->value * 100) / g_session.maxHp < 25 && + this->scene->GetGameActorByAID(g_session.petGid) && rand() % 100 < 50 && g_session.CheckInterval(5000)) { - const int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1044); + const int hungerLevel = g_session.GetPetHungryState(g_session.petHunger); const int friendlyLevel = g_session.GetPetFriendlyState(g_session.m_petFriendly); - this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.unknown_103C, 2, hungerLevel), 0, 0, 0); + this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.petJob, 2, hungerLevel), 0, 0, 0); this->SendMsg(MM_PET_ACT, g_session.GetPetActionNumber(hungerLevel, friendlyLevel, 2), 0, 0, 0); } - if (g_session.unknown_5568 != packet->value) { - g_session.unknown_5568 = packet->value; + if (g_session.hp != packet->value) { + g_session.hp = packet->value; g_session.RefreshHpSpWindows(); } break; case SP_MAXHP: - if (g_session.unknown_556C != packet->value) { - g_session.unknown_556C = packet->value; + if (g_session.maxHp != packet->value) { + g_session.maxHp = packet->value; g_session.RefreshHpSpWindows(); } if (g_windowMgr.window_02C8) { @@ -4616,28 +4616,28 @@ void CGameMode::ReceiveParChange(unsigned char* data) { } break; case SP_SP: - if (*reinterpret_cast(&g_session.unknown_5570[0]) != packet->value) { - *reinterpret_cast(&g_session.unknown_5570[0]) = packet->value; + if (*reinterpret_cast(&g_session.spAndHomunculusStats[0]) != packet->value) { + *reinterpret_cast(&g_session.spAndHomunculusStats[0]) = packet->value; g_session.RefreshHpSpWindows(); } break; case SP_MAXSP: - if (*reinterpret_cast(&g_session.unknown_5570[4]) != packet->value) { - *reinterpret_cast(&g_session.unknown_5570[4]) = packet->value; + if (*reinterpret_cast(&g_session.spAndHomunculusStats[4]) != packet->value) { + *reinterpret_cast(&g_session.spAndHomunculusStats[4]) = packet->value; g_session.RefreshHpSpWindows(); } break; case SP_STATUSPOINT: - *reinterpret_cast(&g_session.unknown_1654[0]) = packet->value; + *reinterpret_cast(&g_session.statusPoints[0]) = packet->value; g_session.InvalidateWindowFrames(); - if (g_windowMgr.unknown_01C4) { - g_windowMgr.unknown_01C4->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); + if (g_windowMgr.statusWnd) { + g_windowMgr.statusWnd->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } break; case SP_BASELEVEL: { g_session.m_level = packet->value; g_session.InvalidateWindowFrames(); - this->scene->player->unknown_0210 = static_cast(g_session.m_level); + this->scene->player->characterLevel = static_cast(g_session.m_level); g_soundMgr->PlayWave("levelup.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); const int job = g_session.GetDisplayJob(); @@ -4685,15 +4685,15 @@ void CGameMode::ReceiveParChange(unsigned char* data) { if (g_replayAnimationScaling == 0) { g_windowMgr.EnsureWindow(WID_NOTIFYLEVELUPWND); } - if (this->scene->GetGameActorByAID(g_session.unknown_1010)) { - const int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1044); + if (this->scene->GetGameActorByAID(g_session.petGid)) { + const int hungerLevel = g_session.GetPetHungryState(g_session.petHunger); const int friendlyLevel = g_session.GetPetFriendlyState(g_session.m_petFriendly); - this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.unknown_103C, 6, hungerLevel), 0, 0, 0); + this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.petJob, 6, hungerLevel), 0, 0, 0); this->SendMsg(MM_PET_ACT, g_session.GetPetActionNumber(hungerLevel, friendlyLevel, 6), 0, 0, 0); } if (g_replayAnimationScaling == 0) { - if (g_windowMgr.unknown_01DC) { - reinterpret_cast(g_windowMgr.unknown_01DC)->SetHeight(g_windowMgr.unknown_01DC->geometry.height); + if (g_windowMgr.basicInfoWnd) { + reinterpret_cast(g_windowMgr.basicInfoWnd)->SetHeight(g_windowMgr.basicInfoWnd->geometry.height); } } this->RefreshActorJobEffects(true); @@ -4709,8 +4709,8 @@ void CGameMode::ReceiveParChange(unsigned char* data) { if (g_replayAnimationScaling == 0) { g_windowMgr.EnsureWindow(WID_NOTIFYJOBLEVELUPWND); - if (g_windowMgr.unknown_01DC) { - reinterpret_cast(g_windowMgr.unknown_01DC)->SetHeight(g_windowMgr.unknown_01DC->geometry.height); + if (g_windowMgr.basicInfoWnd) { + reinterpret_cast(g_windowMgr.basicInfoWnd)->SetHeight(g_windowMgr.basicInfoWnd->geometry.height); } } if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { @@ -4871,7 +4871,7 @@ void CGameMode::ReceiveParChange(unsigned char* data) { g_session.InvalidateWindowFrames(); break; case 169: - reinterpret_cast(g_session.unknown_8128[4]) = packet->value != 0; + reinterpret_cast(g_session.feedOptions[4]) = packet->value != 0; break; case SP_POW: case SP_STA: @@ -4889,8 +4889,8 @@ void CGameMode::ReceiveParChange(unsigned char* data) { case SP_AP: case SP_MAXAP: g_session.SetTraitStat(packet->type, packet->value); - if (g_windowMgr.unknown_01C4) { - static_cast(g_windowMgr.unknown_01C4)->ValidatePlacement(); + if (g_windowMgr.statusWnd) { + static_cast(g_windowMgr.statusWnd)->ValidatePlacement(); } g_session.InvalidateWindowFrames(); break; @@ -4995,31 +4995,31 @@ void CGameMode::ApplyStatusChange( } } } else if (type == EFST_DAILYSENDMAILCNT) { - g_rodexMailStore->unknown_0014 = value2; + g_rodexMailStore->dailySendCount = value2; } if (type != EFST_DAILYSENDMAILCNT) { ActiveSkillEffect effect; effect.id = type; - effect.unknown_0004 = remaining == 9999 ? 999999 : now + remaining; + effect.expiration = remaining == 9999 ? 999999 : now + remaining; if (type >= 363 && type <= 367) { - effect.unknown_0008 = value1 & 3; + effect.value1 = value1 & 3; } else if (type == EFST_ROLLINGCUTTER || type == EFST_HEAD_EQUIPMENT_EFFECT || type == EFST_MADOGEAR_TYPE) { - effect.unknown_0008 = value1; + effect.value1 = value1; } if (type == EFST_CLIMAX || type == EFST_E_SLASH_COUNT) { - effect.unknown_0008 = value1; + effect.value1 = value1; } else if (type == EFST_ABYSSFORCEWEAPON) { - effect.unknown_0008 = value2; + effect.value1 = value2; } else if (CSkillActionMgr::GetInstance()->HasEfstAction(type) == true) { - effect.unknown_000C = value2; - effect.unknown_0008 = value1; - effect.unknown_0010 = value3; + effect.value2 = value2; + effect.value1 = value1; + effect.value3 = value3; } for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end();) { - if (it->id == type && (it->id != EFST_HEAD_EQUIPMENT_EFFECT || it->unknown_0008 == effect.unknown_0008)) { + if (it->id == type && (it->id != EFST_HEAD_EQUIPMENT_EFFECT || it->value1 == effect.value1)) { g_cooldownOwner->Remove(it->id); g_activeSkillEffects.erase(it); it = g_activeSkillEffects.begin(); @@ -5028,9 +5028,9 @@ void CGameMode::ApplyStatusChange( } } - effect.unknown_0014 = total; - effect.unknown_0018 = remaining; - if (effect.unknown_0004 != 999999) { + effect.totalDuration = total; + effect.remainingDuration = remaining; + if (effect.expiration != 999999) { g_cooldownOwner->Register(effect.id, total, now, total - remaining); } g_activeSkillEffects.push_back(effect); @@ -5595,7 +5595,7 @@ void CGameMode::ApplyStatusChange( break; case EFST_DA_ILLUSION: if (aid == g_session.m_aid) { - g_session.unknown_5450 = 1; + g_session.guildLeader = 1; } std::sprintf(message, ""); break; @@ -5665,7 +5665,7 @@ void CGameMode::ApplyStatusChange( } case EFST_CASH_BOSS_ALARM: if (aid == g_session.m_aid) { - this->unknown_05CC[0] = 1; + this->bossAlarmAndCopyNameFlags[0] = 1; } std::sprintf(message, LookupMessage(MSI_BOSS_ALARM)); break; @@ -5730,8 +5730,8 @@ void CGameMode::ApplyStatusChange( } break; case EFST_OVERHEAT: - g_session.unknown_7ED4 = timeGetTime(); - g_session.unknown_7ED0 = value2 == 0 ? value1 : 0; + g_session.nameValidationTick = timeGetTime(); + g_session.minimumNameLength = value2 == 0 ? value1 : 0; if (value1 == 0) { for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end();) { if (it->id == EFST_OVERHEAT) { @@ -5766,12 +5766,12 @@ void CGameMode::ApplyStatusChange( if (value1 == 2) { actor->SetMadogearType(2); if (aid == g_session.m_aid) { - g_session.unknown_8074 = 2; + g_session.madogearType = 2; } } else { actor->SetMadogearType(1); if (aid == g_session.m_aid) { - g_session.unknown_8074 = 1; + g_session.madogearType = 1; } } actor->SendMsg(nullptr, AM_MAKE_CHICKEN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -5877,7 +5877,7 @@ void CGameMode::ApplyStatusChange( } else { if (aid == g_session.m_aid) { for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end();) { - if (it->id == type && (it->id != EFST_HEAD_EQUIPMENT_EFFECT || it->unknown_0008 == value1)) { + if (it->id == type && (it->id != EFST_HEAD_EQUIPMENT_EFFECT || it->value1 == value1)) { g_activeSkillEffects.erase(it); it = g_activeSkillEffects.begin(); } else { @@ -6325,7 +6325,7 @@ void CGameMode::ApplyStatusChange( break; case EFST_DA_ILLUSION: if (aid == g_session.m_aid) { - g_session.unknown_5450 = 0; + g_session.guildLeader = 0; } std::sprintf(message, ""); break; @@ -6364,7 +6364,7 @@ void CGameMode::ApplyStatusChange( break; case EFST_CASH_BOSS_ALARM: if (aid == g_session.m_aid) { - this->unknown_05CC[0] = 0; + this->bossAlarmAndCopyNameFlags[0] = 0; } break; case EFST_SUHIDE: @@ -6556,13 +6556,13 @@ __declspec(noinline) void CGameMode::ReceiveActorColorChat(const unsigned char* // OFFSET: 0x00D1F400 // FUNCTION: fn_21637 __declspec(noinline) void CGameMode::ReceiveWearEquipAck(unsigned char result, std::uint16_t index, std::uint16_t look, int location) { - *reinterpret_cast(&this->unknown_0100[0x04]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; switch (result) { case ITEM_EQUIP_ACK_OK: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - if (item.unknown_0000[1] > 0) { - item.unknown_0070 = look; - item.unknown_0000[3] = location; + if (item.identity[1] > 0) { + item.sprite = look; + item.identity[3] = location; g_session.OnItemEquipped(item); } break; @@ -6627,11 +6627,11 @@ __declspec(noinline) void CGameMode::ReceiveParaItemResult(unsigned char success ITEM_INFO item; item.SetItemId(entry->itemId); item.quantity = entry->quantity; - item.unknown_0014[0] = entry->location; - item.unknown_0014[1] = entry->location; - item.unknown_0060 = entry->refine; - std::memcpy(item.unknown_001C, entry->cards, sizeof(entry->cards)); - item.unknown_0000[1] = entry->index; + item.prices[0] = entry->location; + item.prices[1] = entry->location; + item.refiningLevel = entry->refine; + std::memcpy(item.cards, entry->cards, sizeof(entry->cards)); + item.identity[1] = entry->index; item.identified = 1; window->AddItem(item); } @@ -6683,10 +6683,10 @@ __declspec(noinline) void CGameMode::OpenBuyingStoreMake(unsigned char slotCount g_session.m_buyingStoreSlotCount = count > 5 ? 5 : count; } g_session.ClearItems1768(); - if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.unknown_02FC) { + if (!g_windowMgr.window_027C && !g_windowMgr.window_0274 && !g_windowMgr.merchantShopMakeWnd) { g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND_MODE_1); - if (g_windowMgr.unknown_040C) { - static_cast(g_windowMgr.unknown_040C)->SetItems(0, nullptr); + if (g_windowMgr.buyingShopMakeWnd) { + static_cast(g_windowMgr.buyingShopMakeWnd)->SetItems(0, nullptr); } return; } @@ -6716,8 +6716,8 @@ __declspec(noinline) void CGameMode::OpenVendingMake(unsigned char slotCount, in g_session.ClearItems1768(); if (!g_windowMgr.window_027C && !g_windowMgr.window_0274) { g_windowMgr.EnsureWindow(WID_MERCHANTSHOPMAKEWND); - if (g_windowMgr.unknown_02FC) { - static_cast(g_windowMgr.unknown_02FC)->SetItems(itemCount, items); + if (g_windowMgr.merchantShopMakeWnd) { + static_cast(g_windowMgr.merchantShopMakeWnd)->SetItems(itemCount, items); } return; } @@ -6750,7 +6750,7 @@ struct ItemFallEntry { /* 0034 */ int falling; /* 0038 */ int count; /* 003C */ unsigned char identified; - /* 003E */ std::uint16_t unknown_003E; + /* 003E */ std::uint16_t type; /* 0040 */ unsigned char showEffect; /* 0042 */ std::uint16_t grade; }; @@ -6774,7 +6774,7 @@ void CGameMode::ReceiveItemFallEntry(const unsigned char* packet) { if (!item) { item = new CItem; this->scene->objects.push_back(item); - this->scene->unknown_0018.push_back(item); + this->scene->items.push_back(item); } const int entryAddress = reinterpret_cast(&entry); @@ -6786,11 +6786,11 @@ void CGameMode::ReceiveItemFallEntry(const unsigned char* packet) { __declspec(noinline) void CGameMode::ReceiveFeedOption(const unsigned char* packet) { switch (*reinterpret_cast(packet + 2)) { case CONFIG_OPEN_EQUIPMENT_WINDOW: { - *reinterpret_cast(g_session.unknown_5974) = *reinterpret_cast(packet + 6); - const char* text = LookupMessage((*reinterpret_cast(g_session.unknown_5974) != 0) + 0x54E); + *reinterpret_cast(g_session.equipmentViewState) = *reinterpret_cast(packet + 6); + const char* text = LookupMessage((*reinterpret_cast(g_session.equipmentViewState) != 0) + 0x54E); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0x64FFFF, 0, 0, 0); - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } break; } @@ -6808,7 +6808,7 @@ __declspec(noinline) void CGameMode::ReceiveFeedOption(const unsigned char* pack g_session.SetHomunculusAutoFeed(*reinterpret_cast(packet + 6) > 0); break; case CONFIG_DISABLE_SHOWCOSTUMES: - *reinterpret_cast(g_session.unknown_8128) = *reinterpret_cast(packet + 6); + *reinterpret_cast(g_session.feedOptions) = *reinterpret_cast(packet + 6); break; case 6: SetPetInfoAlert(*reinterpret_cast(packet + 6) != 0); @@ -6819,7 +6819,7 @@ __declspec(noinline) void CGameMode::ReceiveFeedOption(const unsigned char* pack // OFFSET: 0x00D1E7B0 // FUNCTION: fn_21635 __declspec(noinline) void CGameMode::ReceiveTakeOffEquipResult(unsigned char result, int location, std::uint16_t identity) { - *reinterpret_cast(&this->unknown_0100[0x08]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x08]) = timeGetTime() - 2000; switch (result) { case 0: if (location) { @@ -6845,14 +6845,14 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(packet + 4))); switch (static_cast(packet[3])) { case HO_PRE_INIT: - *reinterpret_cast(&g_session.unknown_5570[0x08]) = *reinterpret_cast(packet + 4); + *reinterpret_cast(&g_session.spAndHomunculusStats[0x08]) = *reinterpret_cast(packet + 4); if (actor) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; g_session.m_homunJob = actor->GetEffectiveJob(-1); } break; case HO_RELATIONSHIP_CHANGED: - g_session.unknown_55D4 = *reinterpret_cast(packet + 8); + g_session.homunFriendly = *reinterpret_cast(packet + 8); if (actor) { g_session.m_homunJob = actor->GetEffectiveJob(-1); } @@ -6865,7 +6865,7 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { } break; case HO_FULLNESS_CHANGED: - g_session.unknown_55F0 = *reinterpret_cast(packet + 8); + g_session.homunHunger = *reinterpret_cast(packet + 8); g_session.RefreshHomunculusInfo(); if (actor) { g_session.m_homunJob = actor->GetEffectiveJob(-1); @@ -6881,9 +6881,9 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { case HO_ACCESSARY_CHANGED: if (actor) { if (*reinterpret_cast(packet + 8)) { - g_session.unknown_55D8 = *reinterpret_cast(packet + 8); + g_session.homunAccessory = *reinterpret_cast(packet + 8); } else { - g_session.unknown_55D8 = 0; + g_session.homunAccessory = 0; actor->SetSprJob(actor->GetEffectiveJob(-1)); } if (g_session.IsHomunAid(*reinterpret_cast(packet + 4)) && g_windowMgr.window_03C0) { @@ -6897,23 +6897,23 @@ void CGameMode::ReceiveHomunculusChange(const unsigned char* packet) { // OFFSET: 0x00D26950 // FUNCTION: fn_21683 __declspec(noinline) void CGameMode::ReceiveItemConsumed(const unsigned char* packet) { - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_FRIEND_ADD__ALREADY_REQUEST)), 0x64FFFF, 0, 0, 0); g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_WRITE_RODEX, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_RODEXCOMPOSEWND); } - if (*reinterpret_cast(&this->unknown_0100[0x14])) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14])) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.RemoveItem1710( *reinterpret_cast(packet + 4), *reinterpret_cast(packet + 6) ); - *reinterpret_cast(&this->unknown_02B8[0x18]) = 0; - this->unknown_05CE = 1; - if (g_session.unknown_103C != -1 && g_session.unknown_1050 == *reinterpret_cast(packet + 4)) { + *reinterpret_cast(&this->balloonDisplayState[0x18]) = 0; + this->inventoryChanged = 1; + if (g_session.petJob != -1 && g_session.petEggIndex == *reinterpret_cast(packet + 4)) { g_session.ResetUnknown1050(); EquipmentProperties::CEquipmentPropertiesMgr* properties = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); int itemId = -1; @@ -6930,12 +6930,12 @@ __declspec(noinline) void CGameMode::ReceivePartyLeaderChange(const unsigned cha if (member.valid != 0) { g_session.SetPartyLeader(*reinterpret_cast(packet + 2), 1); g_session.SetPartyLeader(*reinterpret_cast(packet + 6), 0); - g_session.unknown_5464 = *reinterpret_cast(packet + 6) == g_session.m_aid; + g_session.partyLeader = *reinterpret_cast(packet + 6) == g_session.m_aid; std::sprintf(text, LookupMessage(MSI_NOTIFY_PARTY_ROLE_MASTER), member.name.c_str()); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0xFFFF, 12, 0, 0); RefreshPartyWindows(&g_session); - if (g_windowMgr.unknown_03F8) { - g_windowMgr.unknown_03F8->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.memorialDunWnd) { + g_windowMgr.memorialDunWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } } @@ -6984,15 +6984,15 @@ std::FILE* CGameMode::OpenRandomOptionSimulatorFile(const std::string& folder, c #pragma pack(push, 1) struct RandomOptionSimulationRecord { /* 0000 */ int optionId; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; + /* 0004 */ int firstRatioNumerator; + /* 0008 */ int firstRatioDenominator; /* 000C */ unsigned char optionType; /* 000D */ int rate; - /* 0011 */ int unknown_0011; - /* 0015 */ int unknown_0015; - /* 0019 */ int unknown_0019; - /* 001D */ int unknown_001D; - /* 0021 */ int unknown_0021; + /* 0011 */ int secondRatioNumerator; + /* 0015 */ int secondRatioDenominator; + /* 0019 */ int reportValue; + /* 001D */ int firstRatioValue; + /* 0021 */ int secondRatioValue; }; #pragma pack(pop) @@ -7003,7 +7003,7 @@ static_assert(sizeof(RandomOptionSimulationRecord) == 0x25); void CGameMode::ReceiveRandomOptionSimulation(const unsigned char* packet) { const SimulationPacketHeader* header = reinterpret_cast(packet); std::string itemName; - const char* name = reinterpret_cast(header->unknown_000C); + const char* name = reinterpret_cast(header->name); std::FILE* file = this->OpenRandomOptionSimulatorFile("\\PackageItemTest", std::string(name)); if (!file) { return; @@ -7036,14 +7036,14 @@ void CGameMode::ReceiveRandomOptionSimulation(const unsigned char* packet) { std::fprintf(file, "\t%s", ToUtf8(std::string(optionName), g_textCodePage).c_str()); if (type == 5) { std::fprintf( - file, "\t\t%d\t%d\t(%d/%d)\t%d\t(%d/%d)\t%.2f%%\n", option->unknown_0019, option->unknown_001D, option->unknown_0004, - option->unknown_0008, option->unknown_0021, option->unknown_0011, option->unknown_0015, + file, "\t\t%d\t%d\t(%d/%d)\t%d\t(%d/%d)\t%.2f%%\n", option->reportValue, option->firstRatioValue, option->firstRatioNumerator, + option->firstRatioDenominator, option->secondRatioValue, option->secondRatioNumerator, option->secondRatioDenominator, static_cast(option->rate / 100.0) ); } else { std::fprintf( - file, "\t\t%d\t%d\t(%d/%d)\t%d\t(%d/%d)\n", option->unknown_0019, option->unknown_001D, option->unknown_0004, - option->unknown_0008, option->unknown_0021, option->unknown_0011, option->unknown_0015 + file, "\t\t%d\t%d\t(%d/%d)\t%d\t(%d/%d)\n", option->reportValue, option->firstRatioValue, option->firstRatioNumerator, + option->firstRatioDenominator, option->secondRatioValue, option->secondRatioNumerator, option->secondRatioDenominator ); } } @@ -7096,7 +7096,7 @@ void CGameMode::ReceiveBuyingStoreOpenResult(const unsigned char* packet) { void CGameMode::ReceiveItemObtainNotice(const unsigned char* packet) { ITEM_INFO item; item.SetItemId(*reinterpret_cast(packet + 6)); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; switch (*reinterpret_cast(packet + 2)) { case MSG_WEAPONREFINE_SUCCESS: @@ -7126,7 +7126,7 @@ void CGameMode::ReceiveItemObtainNotice(const unsigned char* packet) { // FUNCTION: fn_22219 __declspec(noinline) void CGameMode::ReceiveTakeOffEquipItemResult(const unsigned char* packet) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(packet + 2)); - item.unknown_0000[3] = *reinterpret_cast(packet + 4); + item.identity[3] = *reinterpret_cast(packet + 4); switch (*reinterpret_cast(packet + 8)) { case 0: { if (g_session.IsCostumeLocation(*reinterpret_cast(packet + 4))) { @@ -7271,15 +7271,15 @@ __declspec(noinline) void CGameMode::ReceivePartyItemPickupNotice(const unsigned MessengerMember member = g_session.PartyByAccount(aid); if (aid != g_session.m_aid && member.valid) { ITEM_INFO item; - item.unknown_0000[0] = packet[0x1F]; - item.unknown_0000[2] = *reinterpret_cast(packet + 0x1D); - item.unknown_0000[1] = *reinterpret_cast(packet + 6); - item.unknown_0000[3] = 0; + item.identity[0] = packet[0x1F]; + item.identity[2] = *reinterpret_cast(packet + 0x1D); + item.identity[1] = *reinterpret_cast(packet + 6); + item.identity[3] = 0; item.SetItemId(*reinterpret_cast(packet + 6)); - std::memcpy(item.unknown_001C, packet + 0x0D, sizeof(item.unknown_001C)); + std::memcpy(item.cards, packet + 0x0D, sizeof(item.cards)); item.identified = packet[0x0A]; - item.unknown_005D = packet[0x0B]; - item.unknown_0060 = packet[0x0C]; + item.damaged = packet[0x0B]; + item.refiningLevel = packet[0x0C]; g_windowMgr.SendNotice( UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_ITEM_PICKUP_PARTY), member.name.c_str(), item.DisplayName(0).c_str()).c_str()), @@ -7293,8 +7293,8 @@ __declspec(noinline) void CGameMode::ReceivePartyItemPickupNotice(const unsigned __declspec(noinline) void CGameMode::ReceiveEquipCardChange(const unsigned char* packet) { const EquipSlots slots = g_session.GetEquipSlots(*reinterpret_cast(packet + 2)); ITEM_INFO item = g_session.GetItem17F0(slots.values[2]); - if (item.unknown_0000[1] != 0) { - int* cards = reinterpret_cast(item.unknown_001C); + if (item.identity[1] != 0) { + int* cards = reinterpret_cast(item.cards); switch (packet[0xA]) { case 1: cards[*reinterpret_cast(packet + 4)] = *reinterpret_cast(packet + 6); @@ -7319,22 +7319,22 @@ void CGameMode::ReceiveEquipWindowMicroscope2(const unsigned char* packet) { const unsigned char* entry = packet + 45; for (int index = 0; index < count; ++index, entry += 38) { ITEM_INFO item; - item.unknown_0000[0] = entry[6]; - item.unknown_0000[2] = *reinterpret_cast(entry + 8); - item.unknown_0000[1] = *reinterpret_cast(entry); - item.unknown_0000[3] = *reinterpret_cast(entry + 10); + item.identity[0] = entry[6]; + item.identity[2] = *reinterpret_cast(entry + 8); + item.identity[1] = *reinterpret_cast(entry); + item.identity[3] = *reinterpret_cast(entry + 10); item.quantity = 1; - std::memcpy(item.unknown_001C, entry + 14, sizeof(item.unknown_001C)); + std::memcpy(item.cards, entry + 14, sizeof(item.cards)); item.SetItemId(*reinterpret_cast(entry + 2)); item.identified = entry[7]; - item.unknown_005D = entry[12]; - item.unknown_0060 = entry[13]; - item.unknown_0068 = *reinterpret_cast(entry + 30); - item.unknown_0064 = *reinterpret_cast(entry + 34); - item.unknown_0070 = *reinterpret_cast(entry + 36); + item.damaged = entry[12]; + item.refiningLevel = entry[13]; + item.expireTime = *reinterpret_cast(entry + 30); + item.bindOnEquip = *reinterpret_cast(entry + 34); + item.sprite = *reinterpret_cast(entry + 36); - if (item.unknown_0000[3] != 0) { - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (item.identity[3] != 0) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem3500(item); } else { g_session.Equip(item); @@ -7369,24 +7369,24 @@ void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) { const unsigned char* entry = packet + 45; for (int index = 0; index < count; ++index, entry += 41) { ITEM_INFO item; - item.unknown_0000[0] = entry[6]; - item.unknown_0000[2] = *reinterpret_cast(entry + 7); - item.unknown_0000[1] = *reinterpret_cast(entry); - item.unknown_0000[3] = *reinterpret_cast(entry + 11); + item.identity[0] = entry[6]; + item.identity[2] = *reinterpret_cast(entry + 7); + item.identity[1] = *reinterpret_cast(entry); + item.identity[3] = *reinterpret_cast(entry + 11); item.quantity = 1; - std::memcpy(item.unknown_001C, entry + 16, sizeof(item.unknown_001C)); + std::memcpy(item.cards, entry + 16, sizeof(item.cards)); item.SetItemId(*reinterpret_cast(entry + 2)); const unsigned char flags = entry[40]; item.identified = flags & 1; - item.unknown_005D = (flags >> 1) & 1; - item.unknown_0060 = entry[15]; - item.unknown_0068 = *reinterpret_cast(entry + 32); - item.unknown_0064 = *reinterpret_cast(entry + 36); - item.unknown_0070 = *reinterpret_cast(entry + 38); + item.damaged = (flags >> 1) & 1; + item.refiningLevel = entry[15]; + item.expireTime = *reinterpret_cast(entry + 32); + item.bindOnEquip = *reinterpret_cast(entry + 36); + item.sprite = *reinterpret_cast(entry + 38); - if (item.unknown_0000[3] != 0) { - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (item.identity[3] != 0) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem3500(item); } else { g_session.Equip(item); @@ -7414,7 +7414,7 @@ void CGameMode::ReceiveEquipWindowMicroscope3(const unsigned char* packet) { // FUNCTION: fn_21877 void CGameMode::ReceiveGuildMemberAdd(const unsigned char* packet) { GuildInfo* guildInfo = &g_guildInfo; - if (guildInfo->unknown_00C0 == 0) { + if (guildInfo->membersRequested == 0) { return; } @@ -7429,13 +7429,13 @@ void CGameMode::ReceiveGuildMemberAdd(const unsigned char* packet) { member.accountId = *reinterpret_cast(packet + 2); member.characterId = *reinterpret_cast(packet + 6); member.name = name; - member.unknown_0020 = *reinterpret_cast(packet + 0xA); - member.unknown_0024 = *reinterpret_cast(packet + 0xC); + member.head = *reinterpret_cast(packet + 0xA); + member.headPalette = *reinterpret_cast(packet + 0xC); member.job = *reinterpret_cast(packet + 0x10); - member.unknown_002C = *reinterpret_cast(packet + 0xE); + member.sex = *reinterpret_cast(packet + 0xE); member.positionId = *reinterpret_cast(packet + 0x1C); member.level = *reinterpret_cast(packet + 0x12); - member.unknown_0050 = memo; + member.memo = memo; member.exp = *reinterpret_cast(packet + 0x14); member.online = *reinterpret_cast(packet + 0x18); guildInfo->AddMember(member); @@ -7451,26 +7451,26 @@ void CGameMode::ReceiveGuildMemberAdd(const unsigned char* packet) { void CGameMode::ReceiveGuildPositionInfo(const unsigned char* packet) { GuildInfo* guildInfo = &g_guildInfo; const int count = static_cast(*reinterpret_cast(packet + 2) - 4) >> 4; - guildInfo->unknown_00D4.clear(); + guildInfo->positions.clear(); const unsigned char* entry = packet + 4; for (int index = 0; index < count; ++index, entry += 16) { const int positionId = *reinterpret_cast(entry); GuildInfo::Unknown00D4Entry position; - position.unknown_0008 = guildInfo->m_positions[positionId]; + position.name = guildInfo->m_positions[positionId]; const unsigned int mode = *reinterpret_cast(entry + 4); - position.unknown_0000 = *reinterpret_cast(entry + 8); - position.unknown_0004 = positionId; - position.unknown_0020 = mode & 1; - position.unknown_0024 = (mode >> 4) & 1; - position.unknown_0028 = *reinterpret_cast(entry + 12); - position.unknown_002C = (mode >> 8) & 1; - guildInfo->unknown_00D4.push_back(position); + position.ranking = *reinterpret_cast(entry + 8); + position.positionId = positionId; + position.canInvite = mode & 1; + position.canExpel = (mode >> 4) & 1; + position.tax = *reinterpret_cast(entry + 12); + position.canStorage = (mode >> 8) & 1; + guildInfo->positions.push_back(position); } - guildInfo->unknown_00D4.sort([](const GuildInfo::Unknown00D4Entry& left, const GuildInfo::Unknown00D4Entry& right) { - return left.unknown_0004 < right.unknown_0004; + guildInfo->positions.sort([](const GuildInfo::Unknown00D4Entry& left, const GuildInfo::Unknown00D4Entry& right) { + return left.positionId < right.positionId; }); g_windowMgr.RefreshGuildWindows(); } @@ -7524,22 +7524,22 @@ __declspec(noinline) void CGameMode::AddMiniMapEffectMarker(const unsigned char* struct ActorMessage32 { /* 0000 */ std::string text; /* 0018 */ std::string extra; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; - /* 003C */ int unknown_003C; + /* 0030 */ int flags; + /* 0034 */ int userCount; + /* 0038 */ int maxUsers; + /* 003C */ int chatId; }; // OFFSET: 0x00D25AC0 // FUNCTION: fn_21675 void CGameMode::ReceiveActorMessage34(const unsigned char* packet) { - this->unknown_01AC[*reinterpret_cast(packet + 8)] = *reinterpret_cast(packet + 4); + this->chatRoomActorIds[*reinterpret_cast(packet + 8)] = *reinterpret_cast(packet + 4); ActorMessage32 message; message.text.assign(reinterpret_cast(packet + 17), *reinterpret_cast(packet + 2) - 17); - message.unknown_0030 = packet[16]; - message.unknown_0034 = *reinterpret_cast(packet + 14); - message.unknown_0038 = *reinterpret_cast(packet + 12); - message.unknown_003C = *reinterpret_cast(packet + 8); + message.flags = packet[16]; + message.userCount = *reinterpret_cast(packet + 14); + message.maxUsers = *reinterpret_cast(packet + 12); + message.chatId = *reinterpret_cast(packet + 8); if (message.text.size() > 60) { message.text.resize(60); } @@ -7560,21 +7560,21 @@ struct AddQuestPacket { struct AddQuestHunt64 { /* 0000 */ std::int64_t huntId; - /* 0008 */ int unknown_0008; + /* 0008 */ int condition; /* 000C */ int mobId; - /* 0010 */ std::int16_t unknown_0010; - /* 0012 */ std::int16_t unknown_0012; - /* 0014 */ std::int16_t unknown_0014; + /* 0010 */ std::int16_t minLevel; + /* 0012 */ std::int16_t maxLevel; + /* 0014 */ std::int16_t count; /* 0016 */ char name[24]; }; struct AddQuestHunt { /* 0000 */ int huntId; - /* 0004 */ int unknown_0004; + /* 0004 */ int condition; /* 0008 */ int mobId; - /* 000C */ std::int16_t unknown_000C; - /* 000E */ std::int16_t unknown_000E; - /* 0010 */ std::int16_t unknown_0010; + /* 000C */ std::int16_t minLevel; + /* 000E */ std::int16_t maxLevel; + /* 0010 */ std::int16_t count; /* 0012 */ char name[24]; }; #pragma pack(pop) @@ -7607,11 +7607,11 @@ void CGameMode::ReceiveAddQuest64(const unsigned char* data) { for (int i = 0; i < packet->huntCount; ++i) { const AddQuestHunt64& hunt = hunts[i]; info.m_huntId[i] = hunt.huntId; - info.m_huntUnknown01A0[i] = hunt.unknown_0008; + info.m_huntUnknown01A0[i] = hunt.condition; info.m_huntUnknown00D4[i] = hunt.mobId; - info.m_huntUnknown00E0[i] = hunt.unknown_0014; - info.m_huntUnknown01AC[i] = hunt.unknown_0010; - info.m_huntUnknown01B2[i] = hunt.unknown_0012; + info.m_huntUnknown00E0[i] = hunt.count; + info.m_huntUnknown01AC[i] = hunt.minLevel; + info.m_huntUnknown01B2[i] = hunt.maxLevel; const int mobId = hunt.mobId; if ((mobId < 1001 || mobId > 3998) && static_cast(mobId - 20021) > 11978) { if (mobId == 0x1099) { @@ -7660,11 +7660,11 @@ void CGameMode::ReceiveAddQuest(const unsigned char* data) { for (int i = 0; i < packet->huntCount; ++i) { const AddQuestHunt& hunt = hunts[i]; info.m_huntId[i] = hunt.huntId; - info.m_huntUnknown01A0[i] = hunt.unknown_0004; + info.m_huntUnknown01A0[i] = hunt.condition; info.m_huntUnknown00D4[i] = hunt.mobId; - info.m_huntUnknown00E0[i] = hunt.unknown_0010; - info.m_huntUnknown01AC[i] = hunt.unknown_000C; - info.m_huntUnknown01B2[i] = hunt.unknown_000E; + info.m_huntUnknown00E0[i] = hunt.count; + info.m_huntUnknown01AC[i] = hunt.minLevel; + info.m_huntUnknown01B2[i] = hunt.maxLevel; const int mobId = hunt.mobId; if ((mobId < 1001 || mobId > 3998) && static_cast(mobId - 20021) > 11978) { if (mobId == 0x1099) { @@ -7913,66 +7913,66 @@ namespace { // INLINED __forceinline void FillEquipWindowItem(ITEM_INFO& item, const StoreEquipEntry& record) { - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = record.index; - item.unknown_0000[2] = record.location; - item.unknown_0000[3] = record.wearState; + item.identity[0] = record.type; + item.identity[1] = record.index; + item.identity[2] = record.location; + item.identity[3] = record.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; - item.unknown_0068 = record.expireTime; - item.unknown_0064 = record.bindOnEquip; - item.unknown_0070 = record.sprite; - item.unknown_0074[0] = record.placeEtcTab; - item.unknown_0098 = CountStoreItemOptions(record.options); - item.unknown_0088 = 0; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + item.damaged = record.damaged; + item.refiningLevel = record.refine; + item.expireTime = record.expireTime; + item.bindOnEquip = record.bindOnEquip; + item.sprite = record.sprite; + item.flags[0] = record.placeEtcTab; + item.optionCount = CountStoreItemOptions(record.options); + item.grade = 0; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } } // INLINED __forceinline void FillEquipWindowGradeItem(ITEM_INFO& item, const StoreEquipEntry& record) { - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = record.index; - item.unknown_0000[2] = record.location; - item.unknown_0000[3] = record.wearState; + item.identity[0] = record.type; + item.identity[1] = record.index; + item.identity[2] = record.location; + item.identity[3] = record.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; - item.unknown_0068 = record.expireTime; - item.unknown_0064 = record.bindOnEquip; - item.unknown_0070 = record.sprite; - item.unknown_0074[0] = record.placeEtcTab; - item.unknown_0098 = CountStoreItemOptions(record.options); - item.unknown_0088 = record.grade; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + item.damaged = record.damaged; + item.refiningLevel = record.refine; + item.expireTime = record.expireTime; + item.bindOnEquip = record.bindOnEquip; + item.sprite = record.sprite; + item.flags[0] = record.placeEtcTab; + item.optionCount = CountStoreItemOptions(record.options); + item.grade = record.grade; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } } // INLINED __forceinline void EquipWindowItem(const ITEM_INFO& item) { - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] != 0) { - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (item.identity[3] != 0) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem3500(item); } else { g_session.Equip(item); } } - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).itemId.c_str()); + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).itemId.c_str()); if (!g_petEvolutionMgr->IsAutoFeeding(petEgg) && g_petAutoFeed == true) { g_session.SendPetAutoFeedOption(0); } @@ -8095,24 +8095,24 @@ void CGameMode::ReceiveEquipWindowMicroscope6(const unsigned char* packet) { namespace { // INLINED __forceinline void AddInventoryEquipItem(const ITEM_INFO& item) { - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem2B50(item, &equipped); } else { g_session.EquipUnknown17F0(item, &equipped); } } - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).itemId.c_str()); + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).itemId.c_str()); if (!g_petEvolutionMgr->IsAutoFeeding(petEgg) && g_petAutoFeed == true) { g_session.SendPetAutoFeedOption(0); } @@ -8270,27 +8270,27 @@ namespace { // FUNCTION: fn_21725 void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { const ItemPickupAck2Packet* packet = reinterpret_cast(data); - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (packet->result) { case PICKUP_SUCCEED: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } g_session.AddItem1710(item, 1); @@ -8306,22 +8306,22 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { } case RECEIVE_ITEM: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -8335,13 +8335,13 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); int amount = packet->amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { amount -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); @@ -8350,8 +8350,8 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&this->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -8367,29 +8367,29 @@ void CGameMode::ReceiveItemPickupAck2(const unsigned char* data) { // FUNCTION: fn_21726 void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { const ItemPickupAck3Packet* packet = reinterpret_cast(data); - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (packet->result) { case PICKUP_SUCCEED: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[1] = 1; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[1] = 1; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } g_session.AddItem1710(item, 1); @@ -8408,23 +8408,23 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { } case RECEIVE_ITEM: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -8438,13 +8438,13 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); int amount = packet->amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { amount -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); @@ -8453,8 +8453,8 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&this->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -8473,26 +8473,26 @@ void CGameMode::ReceiveItemPickupAck3(const unsigned char* data) { // FUNCTION: fn_21727 void CGameMode::ReceiveItemPickupAck(const unsigned char* data) { const ItemPickupAckPacket* packet = reinterpret_cast(data); - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (packet->result) { case PICKUP_SUCCEED: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } g_session.AddItem1710(item, 1); @@ -8508,21 +8508,21 @@ void CGameMode::ReceiveItemPickupAck(const unsigned char* data) { } case RECEIVE_ITEM: { ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; if (std::atoi(item.itemId.c_str()) == 607) { - this->unknown_05B8 = 0; + this->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -8536,14 +8536,14 @@ void CGameMode::ReceiveItemPickupAck(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); std::string text; int amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { text = FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), packet->amount - current.quantity); amount = packet->amount - current.quantity; } else { @@ -8556,8 +8556,8 @@ void CGameMode::ReceiveItemPickupAck(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&this->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -8575,35 +8575,35 @@ void CGameMode::ReceiveItemPickupAck5( std::uint16_t index, std::uint16_t amount, int itemId, unsigned char identified, unsigned char damaged, unsigned char refine, ItemCardSlots slots, std::uint32_t location, unsigned char type, unsigned char result, std::uint32_t expireTime, std::uint16_t bindOnEquip ) { - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (result) { case PICKUP_SUCCEED: { { StoreItemOption options[5] = {}; ITEM_INFO item; - item.unknown_0000[0] = type; - item.unknown_0000[2] = location; - item.unknown_0000[1] = index; - item.unknown_0000[3] = 0; + item.identity[0] = type; + item.identity[2] = location; + item.identity[1] = index; + item.identity[3] = 0; item.quantity = amount; item.SetItemId(itemId); - std::memcpy(item.unknown_001C, slots.cards, sizeof(slots.cards)); + std::memcpy(item.cards, slots.cards, sizeof(slots.cards)); item.identified = identified; - item.unknown_005D = damaged; - item.unknown_0060 = refine; - item.unknown_0068 = expireTime; - item.unknown_0064 = bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = damaged; + item.refiningLevel = refine; + item.expireTime = expireTime; + item.bindOnEquip = bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (type == 10 || type == 16 || type == 17 || type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } g_session.AddItem1710(item, 1); @@ -8625,28 +8625,28 @@ void CGameMode::ReceiveItemPickupAck5( case RECEIVE_ITEM: { StoreItemOption options[5] = {}; ITEM_INFO item; - item.unknown_0000[0] = type; - item.unknown_0000[2] = location; - item.unknown_0000[1] = index; - item.unknown_0000[3] = 0; + item.identity[0] = type; + item.identity[2] = location; + item.identity[1] = index; + item.identity[3] = 0; item.quantity = amount; item.SetItemId(itemId); - std::memcpy(item.unknown_001C, slots.cards, sizeof(slots.cards)); + std::memcpy(item.cards, slots.cards, sizeof(slots.cards)); item.identified = identified; - item.unknown_005D = damaged; - item.unknown_0060 = refine; - item.unknown_0068 = expireTime; - item.unknown_0064 = bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = damaged; + item.refiningLevel = refine; + item.expireTime = expireTime; + item.bindOnEquip = bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (type == 10 || type == 16 || type == 17 || type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (type) { case TYPE_ARMOR: @@ -8660,13 +8660,13 @@ void CGameMode::ReceiveItemPickupAck5( case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, index); int count = amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { count -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), count).c_str()), 0xFFFF00, 6, 0, 0); @@ -8675,8 +8675,8 @@ void CGameMode::ReceiveItemPickupAck5( window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, count, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -8695,35 +8695,35 @@ void CGameMode::ReceiveItemPickupAck5( // FUNCTION: fn_21730 void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) { const ItemPickupAck7Packet* packet = reinterpret_cast(data); - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (packet->result) { case PICKUP_SUCCEED: { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } g_session.AddItem1710(item, 1); @@ -8744,28 +8744,28 @@ void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -8779,13 +8779,13 @@ void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); int amount = packet->amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { amount -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); @@ -8794,8 +8794,8 @@ void CGameMode::ReceiveItemPickupAck7(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -8841,7 +8841,7 @@ void CGameMode::ReceiveEquipItemDamaged(const unsigned char* packet) { } else { const EquipSlots slots = g_session.GetEquipSlots(location); ITEM_INFO item = g_session.GetItem17F0(slots.values[2]); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { text = FormatOwnedString(LookupMessage(MSI_DAMAGED_EQUIP), item.DisplayName(0).c_str()); } } @@ -9000,8 +9000,8 @@ void CGameMode::ReceiveFeedResult(const unsigned char* data) { if (packet->packetType == 0x1A3) { if (packet->result != 0) { const int friendlyLevel = g_session.GetPetFriendlyState(g_session.m_petFriendly); - const int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1054); - const int emotion = g_session.GetPetEmotionNumber(g_session.unknown_103C, 0, hungerLevel); + const int hungerLevel = g_session.GetPetHungryState(g_session.petPreviousHunger); + const int emotion = g_session.GetPetEmotionNumber(g_session.petJob, 0, hungerLevel); const int action = g_session.GetPetActionNumber(hungerLevel, friendlyLevel, 0); this->SendMsg(MM_PET_ACT, emotion, 0, 0, 0); this->SendMsg(MM_PET_ACT, action, 0, 0, 0); @@ -9039,7 +9039,7 @@ void CGameMode::ReceiveFeedResult(const unsigned char* data) { const std::string text = FormatOwnedString(LookupMessage(MSI_NOT_EXIST_PET_FOOD), item.DisplayName(0).c_str()); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0x1E1EF5, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY2, reinterpret_cast(text.c_str()), 0x1E1EF5, 0, 0, 0); - if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.unknown_5570[8]))) { + if (CRenderObject* actor = this->scene->GetGameActorByAID(*reinterpret_cast(&g_session.spAndHomunculusStats[8]))) { const int emotion = g_cashEmotionMgr->GetSpecialEmotion(CashEmotionSpecial::Sweat); actor->SendMsg(nullptr, AM_CASH_EMOTION, 0, 0, 0, emotion, emotion >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -9067,11 +9067,11 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); switch (packet->type) { case CHANGESTATEPET_INIT: - g_session.unknown_1010 = packet->aid; + g_session.petGid = packet->aid; if (actor) { - g_session.unknown_103C = actor->GetEffectiveJob(-1); + g_session.petJob = actor->GetEffectiveJob(-1); actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - actor->unknown_0314 = 7; + actor->objectType = 7; } break; case CHANGESTATEPET_INTIMACY: { @@ -9079,12 +9079,12 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { const int friendlyState = g_session.GetPetFriendlyState(previousFriendly); g_session.m_petFriendly = packet->value; if (actor) { - g_session.unknown_103C = actor->GetEffectiveJob(-1); + g_session.petJob = actor->GetEffectiveJob(-1); } if (UIPetInfoWnd* window = static_cast(g_windowMgr.window_038C)) { window->UpdateFriendlyGauge(); } - if (g_session.GetDisplayJob() >= 0xFD2 && g_session.GetDisplayJob() <= 0xFD4 && packet->value < 100 && g_session.unknown_1044 < 30) { + if (g_session.GetDisplayJob() >= 0xFD2 && g_session.GetDisplayJob() <= 0xFD4 && packet->value < 100 && g_session.petHunger < 30) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PET_STARVING)), 0x3232FF, 0, 0, 0); } if (friendlyState != g_session.GetPetFriendlyState(g_session.m_petFriendly)) { @@ -9097,10 +9097,10 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { break; } case CHANGESTATEPET_HUNGER: - g_session.unknown_1054 = g_session.unknown_1044; - g_session.unknown_1044 = packet->value; + g_session.petPreviousHunger = g_session.petHunger; + g_session.petHunger = packet->value; if (actor) { - g_session.unknown_103C = actor->GetEffectiveJob(-1); + g_session.petJob = actor->GetEffectiveJob(-1); actor->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (g_windowMgr.window_038C) { @@ -9114,12 +9114,12 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { if (packet->value != 0) { const char* actionName = g_session.GetPetAccActName(packet->value); actor->SetActionName(ResourceMgr::Instance(), actionName); - g_session.unknown_1038 = packet->value; + g_session.petAccessory = packet->value; } else { - g_session.unknown_1038 = 0; + g_session.petAccessory = 0; actor->SetSprJob(actor->GetEffectiveJob(-1)); } - if (packet->aid == g_session.unknown_1010 && g_windowMgr.window_038C) { + if (packet->aid == g_session.petGid && g_windowMgr.window_038C) { g_windowMgr.window_038C->Invalidate(); } break; @@ -9144,9 +9144,9 @@ void CGameMode::ReceivePetChangeState(const unsigned char* data) { int found = 0; ITEM_INFO item = window->GetSelectedItem(&found); if (found == 1) { - item.unknown_005D = 1; + item.damaged = 1; g_session.UpdateInventoryItem(item, 1); - g_session.unknown_1050 = item.unknown_0000[1]; + g_session.petEggIndex = item.identity[1]; if (UIWindow* inventory = g_windowMgr.LookupWindow(WID_ITEMWND)) { inventory->Invalidate(); } @@ -9211,21 +9211,21 @@ void CGameMode::ReceiveGuildInfo(const unsigned char* data) { g_forbiddenWords.Mask(guildName, &masked); } - guildInfo->unknown_0000 = guildName; - g_guildInfo.unknown_0018 = masterName; - g_guildInfo.unknown_00B4 = g_guildInfo.unknown_0018 == g_session.DecodePlayerName(); - guildInfo->unknown_0074 = manageLand; + guildInfo->guildName = guildName; + g_guildInfo.masterName = masterName; + g_guildInfo.isMaster = g_guildInfo.masterName == g_session.DecodePlayerName(); + guildInfo->manageLand = manageLand; g_guildInfo.m_guildId = packet->guildId; - guildInfo->unknown_0060 = packet->level; - guildInfo->unknown_0064 = packet->userCount; - guildInfo->unknown_0068 = packet->userCount; - guildInfo->unknown_006C = packet->maxUserCount; - guildInfo->unknown_0070 = packet->averageLevel; - guildInfo->unknown_008C = packet->exp; - guildInfo->unknown_0090 = packet->maxExp; - guildInfo->unknown_0098 = packet->point; - guildInfo->unknown_009C = packet->honor; - guildInfo->unknown_00A0 = packet->virtue; + guildInfo->guildLevel = packet->level; + guildInfo->memberCount = packet->userCount; + guildInfo->onlineMemberCount = packet->userCount; + guildInfo->maxMemberCount = packet->maxUserCount; + guildInfo->memberAverageLevel = packet->averageLevel; + guildInfo->exp = packet->exp; + guildInfo->nextExp = packet->maxExp; + guildInfo->points = packet->point; + guildInfo->honor = packet->honor; + guildInfo->virtue = packet->virtue; g_guildMgr->SetEmblemVersion(packet->guildId, packet->emblemVersion); g_windowMgr.RefreshGuildWindows(); } @@ -9269,7 +9269,7 @@ void CGameMode::ReceiveSkillFailure(const unsigned char* data) { notice = LookupMessage(MSI_NOT_ENOUGH_SKILLLEVE1); break; case ZCSK_EMOTION: - this->unknown_026E[0x16] = 0; + this->requestTimers[0x16] = 0; notice = LookupMessage(MSI_NOT_ENOUGH_SKILLLEVE2); break; case ZCSK_SIT: @@ -9666,15 +9666,15 @@ void CGameMode::ReceiveSkillFailure(const unsigned char* data) { // FUNCTION: fn_21690 void CGameMode::ReceiveChatRoomMemberList(const unsigned char* data) { const ChatRoomMemberListPacket* packet = reinterpret_cast(data); - this->unknown_00FC = 0; - CGameActor* actor = static_cast(this->scene->GetGameActorByAID(this->unknown_01AC[packet->roomId])); + this->isWaitingEnterRoom = 0; + CGameActor* actor = static_cast(this->scene->GetGameActorByAID(this->chatRoomActorIds[packet->roomId])); ChatRoomTitleInfo info; bool joined = false; if (actor) { - if (UIChatRoomTitle* room = reinterpret_cast(actor->unknown_0264[1])) { + if (UIChatRoomTitle* room = reinterpret_cast(actor->actorWindows[1])) { info.title = room->title; - info.unknown_0018 = room->unknown_0098; + info.password = room->password; info.type = room->roomType; info.memberCount = room->memberCount; info.memberLimit = room->memberLimit; @@ -9706,12 +9706,12 @@ void CGameMode::ReceiveChatRoomMemberList(const unsigned char* data) { window->SendMsg(nullptr, UM_ADDMEMBER, reinterpret_cast(it->first.c_str()), it->second, 0, 0); } - this->unknown_03C8 = info.title; - this->unknown_03E0 = info.unknown_0018; - this->unknown_03F8 = info.type; - this->unknown_03FC = info.memberCount; - this->unknown_0400 = info.memberLimit; - this->unknown_0404 = info.id; + this->chatRoomTitle = info.title; + this->chatRoomPassword = info.password; + this->chatRoomPublic = info.type; + this->chatRoomMemberCount = info.memberCount; + this->chatRoomMemberLimit = info.memberLimit; + this->chatRoomId = info.id; } } } @@ -9769,39 +9769,39 @@ namespace { // FUNCTION: fn_21731 void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { const ItemPickupAckV8Packet* packet = reinterpret_cast(data); - this->unknown_01A4.erase(this->unknown_01A4.begin(), this->unknown_01A4.end()); + this->pickupReqItemNaidList.erase(this->pickupReqItemNaidList.begin(), this->pickupReqItemNaidList.end()); switch (packet->result) { case PICKUP_SUCCEED: { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[0] = packet->favorite; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[0] = packet->favorite; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } - item.unknown_0088 = 0; - item.unknown_0070 = packet->look; + item.grade = 0; + item.sprite = packet->look; g_session.AddItem1710(item, 1); g_windowMgr.SendNotice( @@ -9821,29 +9821,29 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[0] = packet->favorite; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[0] = packet->favorite; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -9857,15 +9857,15 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } - item.unknown_0088 = 0; - item.unknown_0070 = packet->look; + item.grade = 0; + item.sprite = packet->look; const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); int amount = packet->amount; - if (current.unknown_0000[1] > 0) { + if (current.identity[1] > 0) { amount -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); @@ -9874,8 +9874,8 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -9894,39 +9894,39 @@ void CGameMode::ReceiveItemPickupAck8(const unsigned char* data) { // FUNCTION: fn_21732 void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { const ItemPickupAckV9Packet* packet = reinterpret_cast(data); - this->unknown_01A4.clear(); + this->pickupReqItemNaidList.clear(); if (packet->result == 0) { { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } - item.unknown_0074[0] = packet->favorite; + item.flags[0] = packet->favorite; if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } - item.unknown_0070 = packet->look; - item.unknown_0088 = packet->grade; + item.sprite = packet->look; + item.grade = packet->grade; g_session.AddItem1710(item, 1); g_windowMgr.SendNotice( @@ -9942,10 +9942,10 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { } } - if (this->unknown_0648 == 1) { - auto found = this->unknown_064C.find(packet->itemId); - if (found == this->unknown_064C.end()) { - this->unknown_064C.insert(std::make_pair(packet->itemId, packet->amount)); + if (this->recordItemPickups == 1) { + auto found = this->itemPickupCounts.find(packet->itemId); + if (found == this->itemPickupCounts.end()) { + this->itemPickupCounts.insert(std::make_pair(packet->itemId, packet->amount)); } else { found->second += packet->amount; } @@ -9954,29 +9954,29 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { StoreItemOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[0] = packet->type; - item.unknown_0000[2] = packet->location; - item.unknown_0000[1] = packet->index; - item.unknown_0000[3] = 0; + item.identity[0] = packet->type; + item.identity[2] = packet->location; + item.identity[1] = packet->index; + item.identity[3] = 0; item.quantity = packet->amount; item.SetItemId(packet->itemId); - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0068 = packet->expireTime; - item.unknown_0064 = packet->bindOnEquip; - item.unknown_0074[1] = 1; - item.unknown_0098 = CountStoreItemOptions(options); - for (int option = 0; option < item.unknown_0098; ++option) { - reinterpret_cast(item.unknown_009C)[option] = options[option]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.expireTime = packet->expireTime; + item.bindOnEquip = packet->bindOnEquip; + item.flags[1] = 1; + item.optionCount = CountStoreItemOptions(options); + for (int option = 0; option < item.optionCount; ++option) { + reinterpret_cast(item.options)[option] = options[option]; } - item.unknown_0074[0] = packet->favorite; + item.flags[0] = packet->favorite; if (std::atoi(item.itemId.c_str()) == 607) { - static_cast(g_modeMgr.GetGameMode())->unknown_05B8 = 0; + static_cast(g_modeMgr.GetGameMode())->lastPickItemTime = 0; } if (packet->type == 10 || packet->type == 16 || packet->type == 17 || packet->type == 19) { - item.unknown_0000[3] = 0x8000; + item.identity[3] = 0x8000; } switch (packet->type) { case TYPE_ARMOR: @@ -9990,15 +9990,15 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { case TYPE_GUN: break; default: - item.unknown_0000[2] = 0; + item.identity[2] = 0; break; } - item.unknown_0070 = packet->look; - item.unknown_0088 = packet->grade; + item.sprite = packet->look; + item.grade = packet->grade; const ITEM_INFO current = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); int amount = packet->amount; - if (current.unknown_0000[1] != 0) { + if (current.identity[1] != 0) { amount -= current.quantity; } g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); @@ -10007,8 +10007,8 @@ void CGameMode::ReceiveItemPickupAck9(const unsigned char* data) { window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, item.identified, 0, 0, 0); window->SendMsg(nullptr, UM_SETTITLE, 0, amount, reinterpret_cast(item.itemId.c_str()), 0); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&item), 0, 0, 0); - if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) != 0) { - *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) != 0) { + *reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.UpdateInventoryItem(item, 1); @@ -10032,7 +10032,7 @@ void CGameMode::ReceiveActorChat(const unsigned char* data) { memcpy_s(text.data(), text.size(), data + 8, length); const std::uint32_t aid = *reinterpret_cast(data + 4); CGameActor* speaker = static_cast(this->scene->GetGameActorByAID(aid)); - if (speaker && !speaker->unknown_0314 && g_forbiddenWords.Contains(text.data()) == true) { + if (speaker && !speaker->objectType && g_forbiddenWords.Contains(text.data()) == true) { std::string masked; g_forbiddenWords.Mask(text.data(), &masked); } @@ -10106,7 +10106,7 @@ static_assert(sizeof(EffectNumberPacket) == 0xE); // FUNCTION: fn_21764 void CGameMode::ReceiveEffectNumber(const unsigned char* data) { const EffectNumberPacket* packet = reinterpret_cast(data); - if (*reinterpret_cast(&g_session.unknown_5454[0x8]) == 0 && this->scene->unknown_0048 == 0) { + if (*reinterpret_cast(&g_session.interactionFlags[0x8]) == 0 && this->scene->isPKZone == 0) { return; } @@ -10114,14 +10114,14 @@ void CGameMode::ReceiveEffectNumber(const unsigned char* data) { CGameActor* actor; if (packet->aid == g_session.m_aid && (actor = this->scene->player) != nullptr) { if (packet->count == 1) { - if (static_cast(actor)->unknown_0494 != 1) { + if (static_cast(actor)->pkRank != 1) { g_session.m_timeAttackStart = timeGetTime(); } } else { g_session.m_timeAttackStart = 0; } - const int previous = this->scene->player->unknown_0494; + const int previous = this->scene->player->pkRank; const int count = packet->count; if (previous != count) { if (previous > 10) { @@ -10138,8 +10138,8 @@ void CGameMode::ReceiveEffectNumber(const unsigned char* data) { CPlayer* player = this->scene->player; g_soundMgr->PlayWave("effect\\number_change.wav", player->render.position.x, 0.0f, player->render.position.z, 250, 40, 1.0f, 0); } - this->scene->player->unknown_0498 = packet->value; - this->scene->player->unknown_0494 = packet->count; + this->scene->player->pkTotal = packet->value; + this->scene->player->pkRank = packet->count; } else { actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); const std::uint32_t state = actor->GetStateFlags(); @@ -10187,7 +10187,7 @@ void CGameMode::ReceiveGuildBanList(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildBanRecord); - guildInfo->unknown_00EC.clear(); + guildInfo->bannedMembers.clear(); const GuildBanRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { @@ -10200,8 +10200,8 @@ void CGameMode::ReceiveGuildBanList(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.name = name; - entry.unknown_0034 = reason; - guildInfo->unknown_00EC.push_back(entry); + entry.reason = reason; + guildInfo->bannedMembers.push_back(entry); } g_windowMgr.RefreshGuildWindows(); @@ -10213,7 +10213,7 @@ void CGameMode::ReceiveGuildBanList2(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildBanCharacterRecord); - guildInfo->unknown_00EC.clear(); + guildInfo->bannedMembers.clear(); const GuildBanCharacterRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { @@ -10224,12 +10224,12 @@ void CGameMode::ReceiveGuildBanList2(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.characterId = record->characterId; entry.name = LookupPlayerName(entry.characterId); - entry.unknown_0034 = reason; + entry.reason = reason; if (entry.name.size() == 0) { entry.name = LookupMessage(MSI_NAMELESS_USER) + g_gameModeNamelessTag; } if (entry.characterId != 0) { - guildInfo->unknown_00EC.push_back(entry); + guildInfo->bannedMembers.push_back(entry); } } @@ -10242,7 +10242,7 @@ void CGameMode::ReceiveGuildBanList3(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const std::int64_t count = (packet->length - static_cast(sizeof(PacketLengthHeader))) / static_cast(sizeof(GuildBanNamedRecord)); - guildInfo->unknown_00EC.clear(); + guildInfo->bannedMembers.clear(); const GuildBanNamedRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { @@ -10252,7 +10252,7 @@ void CGameMode::ReceiveGuildBanList3(const unsigned char* data) { GuildInfo::Unknown00ECEntry entry; entry.characterId = record->characterId; - entry.unknown_0034 = reason; + entry.reason = reason; if (!g_playerNameDictionary->Contains(record->characterId)) { const int characterId = record->characterId; std::string name(record->name, record->name + sizeof(record->name)); @@ -10263,7 +10263,7 @@ void CGameMode::ReceiveGuildBanList3(const unsigned char* data) { entry.name = LookupMessage(MSI_NAMELESS_USER) + g_gameModeNamelessTag; } if (entry.characterId != 0) { - guildInfo->unknown_00EC.push_back(entry); + guildInfo->bannedMembers.push_back(entry); } } @@ -10309,8 +10309,8 @@ void CGameMode::ReceiveActorAction( act.targetId = targetAid; act.tick = tick; act.count = count; - act.unknown_001C = -1; - act.unknown_0020 = -1; + act.attackMotion = -1; + act.damageMotion = -1; act.attackMT = attackMT; act.attackedMT = attackedMT; act.spDamaged = spDamaged != 0; @@ -10334,13 +10334,13 @@ void CGameMode::ReceiveActorAction( } } - if (actor->render.unknown_0070 == 0 && static_cast(actor)->hitTargetAid != targetAid && act.type != 1 && act.type != 2 && act.type != 3) { + if (actor->render.state == 0 && static_cast(actor)->hitTargetAid != targetAid && act.type != 1 && act.type != 2 && act.type != 3) { if (sourceAid == g_session.m_aid) { - if (this->scene->GetGameActorByAID(g_session.unknown_1010)) { - const int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1044); + if (this->scene->GetGameActorByAID(g_session.petGid)) { + const int hungerLevel = g_session.GetPetHungryState(g_session.petHunger); const int action = g_session.GetPetActionNumber(hungerLevel, g_session.GetPetFriendlyState(g_session.m_petFriendly), 1); if (rand() % 100 < 25 && g_session.CheckInterval(60000) == true) { - this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.unknown_103C, 1, hungerLevel), 0, 0, 0); + this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.petJob, 1, hungerLevel), 0, 0, 0); this->SendMsg(MM_PET_ACT, action, 0, 0, 0); } } @@ -10375,7 +10375,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { const ActorDisappearPacket* packet = reinterpret_cast(data); this->nameCard.Erase(packet->aid); g_session.EraseUnknownKey(packet->aid); - if (g_session.unknown_5BC0 == packet->aid) { + if (g_session.elementalGid == packet->aid) { g_session.SetUnknown5BC0(-1); } @@ -10395,20 +10395,20 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { case CLR_DEAD: { if (CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid))) { CPlayer* player = this->scene->player; - if (packet->aid == static_cast(player->unknown_051C)) { - player->unknown_051C = 0; + if (packet->aid == static_cast(player->proceedTargetGid)) { + player->proceedTargetGid = 0; } actor->SendMsg(nullptr, AM_WILL_BE_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); const int job = actor->GetEffectiveJob(-1); - if (g_session.IsMonsterClass(job) || actor->unknown_0314 == 9 || g_session.IsSkillIdInRange6001(job) || + if (g_session.IsMonsterClass(job) || actor->objectType == 9 || g_session.IsSkillIdInRange6001(job) || actor->GetEffectiveJob(-1) == 0x235) { this->SendMsg(MM_DELETEREGISTERPOS, packet->aid, 0, 0, 0); } - if (g_windowMgr.unknown_041C) { - g_windowMgr.unknown_041C->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.buyingShopPurchaseWnd) { + g_windowMgr.buyingShopPurchaseWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } - if (g_windowMgr.unknown_0308) { - g_windowMgr.unknown_0308->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.merchantItemPurchaseWnd) { + g_windowMgr.merchantItemPurchaseWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } } if (packet->aid != g_session.m_aid) { @@ -10417,8 +10417,8 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { this->scene->player->SendMsg(nullptr, AM_CANCELATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->scene->player->SendMsg(nullptr, AM_WILL_BE_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_024C = 1; - this->unknown_0250 = 1; + this->isOnQuest = 1; + this->isPlayerDead = 1; g_windowMgr.CloseWindow(WID_QUITWND); g_windowMgr.CloseWindow(WID_SAYDIALOGWND); g_windowMgr.CloseWindow(WID_CHOOSEWND); @@ -10427,28 +10427,28 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { g_windowMgr.CloseWindow(WID_ITEMPURCHASEWND); g_windowMgr.CloseWindow(WID_ITEMSELLWND); g_windowMgr.CloseWindow(WID_RUNESYSTEMWND); - if (g_windowMgr.unknown_02FC) { - g_windowMgr.unknown_02FC->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.merchantShopMakeWnd) { + g_windowMgr.merchantShopMakeWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } - if (g_windowMgr.unknown_040C) { - g_windowMgr.unknown_040C->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.buyingShopMakeWnd) { + g_windowMgr.buyingShopMakeWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } - if (g_windowMgr.unknown_0304) { - g_windowMgr.unknown_0304->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.merchantItemMyShopWnd) { + g_windowMgr.merchantItemMyShopWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } - if (g_windowMgr.unknown_0414) { - g_windowMgr.unknown_0414->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (g_windowMgr.buyingShopMyItemsWnd) { + g_windowMgr.buyingShopMyItemsWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); } - if (g_windowMgr.unknown_0308) { - g_windowMgr.unknown_0308->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.merchantItemPurchaseWnd) { + g_windowMgr.merchantItemPurchaseWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } - if (g_windowMgr.unknown_041C) { - g_windowMgr.unknown_041C->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); + if (g_windowMgr.buyingShopPurchaseWnd) { + g_windowMgr.buyingShopPurchaseWnd->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } - if (this->scene->GetGameActorByAID(g_session.unknown_1010)) { - const int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1044); + if (this->scene->GetGameActorByAID(g_session.petGid)) { + const int hungerLevel = g_session.GetPetHungryState(g_session.petHunger); const int action = g_session.GetPetActionNumber(hungerLevel, g_session.GetPetFriendlyState(g_session.m_petFriendly), 3); - this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.unknown_103C, 3, hungerLevel), 0, 0, 0); + this->SendMsg(MM_PET_ACT, g_session.GetPetEmotionNumber(g_session.petJob, 3, hungerLevel), 0, 0, 0); this->SendMsg(MM_PET_ACT, action, 0, 0, 0); } if (g_serviceType == 4) { @@ -10463,7 +10463,7 @@ void CGameMode::ReceiveActorDisappear(const unsigned char* data) { if (CRenderObject* actor = this->scene->GetGameActorByAID(packet->aid)) { this->LaunchDummyEffect(&actor->render.position, 0x13A, 600, 0); } - if (g_windowMgr.unknown_0300 && static_cast(g_windowMgr.unknown_0300)->unknown_0100 == static_cast(packet->aid)) { + if (g_windowMgr.merchantItemShopWnd && static_cast(g_windowMgr.merchantItemShopWnd)->ownerAid == static_cast(packet->aid)) { this->SendMsg(MM_RELEASE_QUEST_SH, 0, 0, 0, 0); g_session.ClearItems1760And1748(); } @@ -10574,20 +10574,20 @@ void CGameMode::ReceiveGuildInfo2(const unsigned char* data) { g_forbiddenWords.Mask(guildName, &masked); } - guildInfo->unknown_0000 = guildName; - g_guildInfo.unknown_0018 = masterName; - g_guildInfo.unknown_00B4 = g_guildInfo.unknown_0018 == g_session.DecodePlayerName(); - guildInfo->unknown_0074 = manageLand; + guildInfo->guildName = guildName; + g_guildInfo.masterName = masterName; + g_guildInfo.isMaster = g_guildInfo.masterName == g_session.DecodePlayerName(); + guildInfo->manageLand = manageLand; g_guildInfo.m_guildId = packet->guildId; - guildInfo->unknown_0060 = packet->level; - guildInfo->unknown_0064 = packet->userCount; - guildInfo->unknown_006C = packet->maxUserCount; - guildInfo->unknown_0070 = packet->averageLevel; - guildInfo->unknown_008C = packet->exp; - guildInfo->unknown_0090 = packet->maxExp; - guildInfo->unknown_0098 = packet->point; - guildInfo->unknown_009C = packet->honor; - guildInfo->unknown_00A0 = packet->virtue; + guildInfo->guildLevel = packet->level; + guildInfo->memberCount = packet->userCount; + guildInfo->maxMemberCount = packet->maxUserCount; + guildInfo->memberAverageLevel = packet->averageLevel; + guildInfo->exp = packet->exp; + guildInfo->nextExp = packet->maxExp; + guildInfo->points = packet->point; + guildInfo->honor = packet->honor; + guildInfo->virtue = packet->virtue; g_guildMgr->SetEmblemVersion(packet->guildId, packet->emblemVersion); g_windowMgr.RefreshGuildWindows(); } @@ -10615,22 +10615,22 @@ void CGameMode::ReceiveGuildInfo3(const unsigned char* data) { } if (masterName == g_session.DecodePlayerName()) { - g_guildInfo.unknown_00B4 = 1; + g_guildInfo.isMaster = 1; } - guildInfo->unknown_0000 = guildName; - g_guildInfo.unknown_0018 = masterName; - g_guildInfo.unknown_00D0 = packet->masterCharacterId; - guildInfo->unknown_0074 = manageLand; + guildInfo->guildName = guildName; + g_guildInfo.masterName = masterName; + g_guildInfo.masterCharacterId = packet->masterCharacterId; + guildInfo->manageLand = manageLand; g_guildInfo.m_guildId = packet->guildId; - guildInfo->unknown_0060 = packet->level; - guildInfo->unknown_0068 = packet->userCount; - guildInfo->unknown_006C = packet->maxUserCount; - guildInfo->unknown_0070 = packet->averageLevel; - guildInfo->unknown_008C = packet->exp; - guildInfo->unknown_0090 = packet->maxExp; - guildInfo->unknown_0098 = packet->point; - guildInfo->unknown_009C = packet->honor; - guildInfo->unknown_00A0 = packet->virtue; + guildInfo->guildLevel = packet->level; + guildInfo->onlineMemberCount = packet->userCount; + guildInfo->maxMemberCount = packet->maxUserCount; + guildInfo->memberAverageLevel = packet->averageLevel; + guildInfo->exp = packet->exp; + guildInfo->nextExp = packet->maxExp; + guildInfo->points = packet->point; + guildInfo->honor = packet->honor; + guildInfo->virtue = packet->virtue; g_guildMgr->SetEmblemVersion(packet->guildId, packet->emblemVersion); g_windowMgr.RefreshGuildWindows(); } @@ -10646,17 +10646,17 @@ void CGameMode::ReceiveGuildInfo4(const unsigned char* data) { std::string name(packet->masterName, packet->masterName + sizeof(packet->masterName)); SetPlayerName(characterId, name.c_str()); } - g_guildInfo.unknown_0018 = LookupPlayerName(packet->masterCharacterId); - if (g_guildInfo.unknown_0018.size() == 0) { - g_guildInfo.unknown_0018 = LookupMessage(MSI_NAMELESS_USER) + g_gameModeNamelessTag; + g_guildInfo.masterName = LookupPlayerName(packet->masterCharacterId); + if (g_guildInfo.masterName.size() == 0) { + g_guildInfo.masterName = LookupMessage(MSI_NAMELESS_USER) + g_gameModeNamelessTag; } char guildName[25]; guildName[24] = '\0'; char manageLand[25]; manageLand[24] = '\0'; - if (g_guildInfo.unknown_0018 == g_session.DecodePlayerName()) { - g_guildInfo.unknown_00B4 = 1; + if (g_guildInfo.masterName == g_session.DecodePlayerName()) { + g_guildInfo.isMaster = 1; } std::memcpy(guildName, packet->guildName, sizeof(packet->guildName)); std::memcpy(manageLand, packet->manageLand, sizeof(manageLand) - 1); @@ -10665,19 +10665,19 @@ void CGameMode::ReceiveGuildInfo4(const unsigned char* data) { g_forbiddenWords.Mask(guildName, &masked); } - guildInfo->unknown_0000 = guildName; - g_guildInfo.unknown_00D0 = packet->masterCharacterId; - guildInfo->unknown_0074 = manageLand; + guildInfo->guildName = guildName; + g_guildInfo.masterCharacterId = packet->masterCharacterId; + guildInfo->manageLand = manageLand; g_guildInfo.m_guildId = packet->guildId; - guildInfo->unknown_0060 = packet->level; - guildInfo->unknown_0068 = packet->userCount; - guildInfo->unknown_006C = packet->maxUserCount; - guildInfo->unknown_0070 = packet->averageLevel; - guildInfo->unknown_008C = packet->exp; - guildInfo->unknown_0090 = packet->maxExp; - guildInfo->unknown_0098 = packet->point; - guildInfo->unknown_009C = packet->honor; - guildInfo->unknown_00A0 = packet->virtue; + guildInfo->guildLevel = packet->level; + guildInfo->onlineMemberCount = packet->userCount; + guildInfo->maxMemberCount = packet->maxUserCount; + guildInfo->memberAverageLevel = packet->averageLevel; + guildInfo->exp = packet->exp; + guildInfo->nextExp = packet->maxExp; + guildInfo->points = packet->point; + guildInfo->honor = packet->honor; + guildInfo->virtue = packet->virtue; g_guildMgr->SetEmblemVersion(packet->guildId, packet->emblemVersion); g_windowMgr.RefreshGuildWindows(); } @@ -10699,8 +10699,8 @@ void CGameMode::ReceiveGuildNotice(unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; packet->notice[119] = '\0'; packet->subject[59] = '\0'; - guildInfo->unknown_0030 = packet->subject; - guildInfo->unknown_0048 = packet->notice; + guildInfo->subject = packet->subject; + guildInfo->notice = packet->notice; if (!g_serviceOptions.Get(0xA5)) { return; } @@ -10733,8 +10733,8 @@ void CGameMode::ReceiveGuildNotice(unsigned char* data) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(noticeLine.c_str()), 0x80FFFF, 0, 0, 0); } - guildInfo->unknown_0030 = subject; - guildInfo->unknown_0048 = notice; + guildInfo->subject = subject; + guildInfo->notice = notice; } #pragma pack(push, 1) @@ -10742,15 +10742,15 @@ struct GuildMemberAddV2Packet { /* 0000 */ std::uint16_t packetType; /* 0002 */ int accountId; /* 0006 */ std::uint32_t characterId; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; - /* 000E */ std::int16_t unknown_000E; + /* 000A */ std::int16_t head; + /* 000C */ std::int16_t headPalette; + /* 000E */ std::int16_t sex; /* 0010 */ std::int16_t job; /* 0012 */ std::int16_t level; /* 0014 */ int exp; /* 0018 */ int online; /* 001C */ int positionId; - /* 0020 */ int unknown_0020; + /* 0020 */ int lastTimeOffline; /* 0024 */ char name[24]; }; @@ -10758,9 +10758,9 @@ struct GuildMemberAddV3Packet { /* 0000 */ std::uint16_t packetType; /* 0002 */ int accountId; /* 0006 */ std::uint32_t characterId; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; - /* 000E */ std::int16_t unknown_000E; + /* 000A */ std::int16_t head; + /* 000C */ std::int16_t headPalette; + /* 000E */ std::int16_t sex; /* 0010 */ std::int16_t job; /* 0012 */ std::int16_t level; /* 0014 */ int exp; @@ -10778,22 +10778,22 @@ static_assert(sizeof(GuildMemberAddV3Packet) == 0x52); void CGameMode::ReceiveGuildMemberAdd2(const unsigned char* data) { const GuildMemberAddV2Packet* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; - if (guildInfo->unknown_00C0 == 0) { + if (guildInfo->membersRequested == 0) { return; } GuildInfo::Member member; member.accountId = packet->accountId; member.characterId = packet->characterId; - member.unknown_0020 = packet->unknown_000A; - member.unknown_0024 = packet->unknown_000C; + member.head = packet->head; + member.headPalette = packet->headPalette; member.job = packet->job; - member.unknown_002C = packet->unknown_000E; + member.sex = packet->sex; member.positionId = packet->positionId; member.level = packet->level; member.exp = packet->exp; member.online = packet->online; - *reinterpret_cast(member.unknown_0074) = packet->unknown_0020; + *reinterpret_cast(member.lastOfflineTime) = packet->lastTimeOffline; if (!g_playerNameDictionary->Contains(packet->characterId)) { const std::uint32_t characterId = packet->characterId; std::string name(packet->name, packet->name + sizeof(packet->name)); @@ -10814,7 +10814,7 @@ void CGameMode::ReceiveGuildMemberAdd2(const unsigned char* data) { void CGameMode::ReceiveGuildMemberAdd3(const unsigned char* data) { const GuildMemberAddV3Packet* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; - if (guildInfo->unknown_00C0 == 0) { + if (guildInfo->membersRequested == 0) { return; } @@ -10826,13 +10826,13 @@ void CGameMode::ReceiveGuildMemberAdd3(const unsigned char* data) { member.accountId = packet->accountId; member.characterId = packet->characterId; member.name = LookupPlayerName(member.characterId); - member.unknown_0020 = packet->unknown_000A; - member.unknown_0024 = packet->unknown_000C; + member.head = packet->head; + member.headPalette = packet->headPalette; member.job = packet->job; - member.unknown_002C = packet->unknown_000E; + member.sex = packet->sex; member.positionId = packet->positionId; member.level = packet->level; - member.unknown_0050 = memo; + member.memo = memo; member.exp = packet->exp; member.online = packet->online; if (member.name.size() == 0) { @@ -10849,24 +10849,24 @@ namespace { struct GuildMemberNamedRecord { /* 0000 */ int accountId; /* 0004 */ std::uint32_t characterId; - /* 0008 */ std::int16_t unknown_0008; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; + /* 0008 */ std::int16_t head; + /* 000A */ std::int16_t headPalette; + /* 000C */ std::int16_t sex; /* 000E */ std::int16_t job; /* 0010 */ std::int16_t level; /* 0012 */ int exp; /* 0016 */ int online; /* 001A */ int positionId; - /* 001E */ int unknown_001E; + /* 001E */ int lastTimeOffline; /* 0022 */ char name[24]; }; struct GuildMemberMemoOnlyRecord { /* 0000 */ int accountId; /* 0004 */ std::uint32_t characterId; - /* 0008 */ std::int16_t unknown_0008; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; + /* 0008 */ std::int16_t head; + /* 000A */ std::int16_t headPalette; + /* 000C */ std::int16_t sex; /* 000E */ std::int16_t job; /* 0010 */ std::int16_t level; /* 0012 */ int exp; @@ -10894,7 +10894,7 @@ void CGameMode::ReceiveGuildMemberList2(const unsigned char* data) { const PacketLengthHeader* packet = reinterpret_cast(data); const std::int64_t count = (packet->length - static_cast(sizeof(PacketLengthHeader))) / static_cast(sizeof(GuildMemberNamedRecord)); - guildInfo->unknown_0064 = static_cast(count); + guildInfo->memberCount = static_cast(count); guildInfo->ClearMembers(); const GuildMemberNamedRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); @@ -10902,15 +10902,15 @@ void CGameMode::ReceiveGuildMemberList2(const unsigned char* data) { GuildInfo::Member member; member.accountId = record->accountId; member.characterId = record->characterId; - member.unknown_0020 = record->unknown_0008; - member.unknown_0024 = record->unknown_000A; + member.head = record->head; + member.headPalette = record->headPalette; member.job = record->job; - member.unknown_002C = record->unknown_000C; + member.sex = record->sex; member.positionId = record->positionId; member.level = record->level; member.exp = record->exp; member.online = record->online; - *reinterpret_cast(member.unknown_0074) = record->unknown_001E; + *reinterpret_cast(member.lastOfflineTime) = record->lastTimeOffline; member.expRatio = 0.0f; if (member.characterId == g_session.m_gid) { member.name = g_session.DecodePlayerName(); @@ -10940,7 +10940,7 @@ void CGameMode::ReceiveGuildMemberList3(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildMemberMemoOnlyRecord); - guildInfo->unknown_0064 = count; + guildInfo->memberCount = count; guildInfo->ClearMembers(); const GuildMemberMemoOnlyRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); @@ -10948,10 +10948,10 @@ void CGameMode::ReceiveGuildMemberList3(const unsigned char* data) { GuildInfo::Member member; member.accountId = record->accountId; member.characterId = record->characterId; - member.unknown_0020 = record->unknown_0008; - member.unknown_0024 = record->unknown_000A; + member.head = record->head; + member.headPalette = record->headPalette; member.job = record->job; - member.unknown_002C = record->unknown_000C; + member.sex = record->sex; member.positionId = record->positionId; member.level = record->level; member.exp = record->exp; @@ -10969,7 +10969,7 @@ void CGameMode::ReceiveGuildMemberList3(const unsigned char* data) { char memo[51]; std::memcpy(memo, record->memo, sizeof(record->memo)); memo[50] = '\0'; - member.unknown_0050 = memo; + member.memo = memo; member.positionName.clear(); guildInfo->AddMember(member); } @@ -10984,7 +10984,7 @@ void CGameMode::ReceiveGuildRelationList(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; const PacketLengthHeader* packet = reinterpret_cast(data); const int count = (packet->length - sizeof(PacketLengthHeader)) / sizeof(GuildRelationRecord); - guildInfo->unknown_00E4.clear(); + guildInfo->relatedGuilds.clear(); const GuildRelationRecord* record = reinterpret_cast(data + sizeof(PacketLengthHeader)); for (int i = 0; i < count; ++i, ++record) { @@ -10997,10 +10997,10 @@ void CGameMode::ReceiveGuildRelationList(const unsigned char* data) { } GuildInfo::RelatedGuild guild; - guild.unknown_0000 = record->guildId; - guild.unknown_0004 = record->relation; - guild.unknown_0008 = name; - guildInfo->unknown_00E4.push_back(guild); + guild.guildId = record->guildId; + guild.relation = record->relation; + guild.name = name; + guildInfo->relatedGuilds.push_back(guild); } g_windowMgr.RefreshGuildWindows(); @@ -11042,7 +11042,7 @@ static_assert(sizeof(GuildPositionNameEntry) == 0x1C); struct GuildStorageLogItem { /* 0000 */ ITEM_INFO item; - /* 00F8 */ unsigned char unknown_00F8; + /* 00F8 */ unsigned char logFlags; }; static_assert(sizeof(GuildStorageLogItem) == 0x100); @@ -11080,11 +11080,11 @@ void CGameMode::ReceiveMapMove(const unsigned char* data) { mapName.append(".rsw", 4); g_modeMgr.Switch(1, mapName.c_str()); static_cast(g_windowMgr.EnsureWindow(WID_WAITWND))->SetMessage(LookupMessage(MSI_PLEASE_BE_PATIENT), 17, 1); - g_windowMgr.unknown_0474 = 185; + g_windowMgr.modalResponse = 185; g_session.ClearEntryList5BD4(); sameMap = 0; } - this->unknown_060C[0] = sameMap; + this->sameMapMove[0] = sameMap; for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end(); ++it) { if (it->id == 200 || it->id == 201 || it->id == 4) { @@ -11124,18 +11124,18 @@ void CGameMode::ReceiveGuildPositionNames(const unsigned char* data) { void CGameMode::ApplyGuildStorageLog(std::uint16_t result, const std::vector& items) { for (std::vector::const_iterator it = items.begin(); it != items.end(); ++it) { GuildStorageLogEntry entry; - entry.unknown_0000 = it->item.unknown_00B8[0]; - entry.unknown_0004 = it->item.unknown_00B8[1]; - entry.unknown_0008 = it->item.unknown_00C0; - strncpy_s(entry.unknown_0009, sizeof(entry.unknown_0009), reinterpret_cast(it->item.unknown_00C1), _TRUNCATE); - strncpy_s(entry.unknown_0021, sizeof(entry.unknown_0021), reinterpret_cast(it->item.unknown_00D9), _TRUNCATE); - entry.unknown_003C = it->item.DisplayName(0); - entry.unknown_0054 = it->item.identified; - entry.unknown_0058 = it->item.unknown_0000[0]; - entry.unknown_005C = it->item.unknown_0060; - std::memcpy(entry.unknown_0060, it->item.unknown_001C, sizeof(entry.unknown_0060)); - entry.unknown_0070 = it->unknown_00F8; - entry.unknown_0072 = it->item.unknown_0088; + entry.logId = it->item.recordIds[0]; + entry.quantity = it->item.recordIds[1]; + entry.operation = it->item.recordType; + strncpy_s(entry.characterName, sizeof(entry.characterName), reinterpret_cast(it->item.recordName), _TRUNCATE); + strncpy_s(entry.timestamp, sizeof(entry.timestamp), reinterpret_cast(it->item.recordDate), _TRUNCATE); + entry.itemName = it->item.DisplayName(0); + entry.identified = it->item.identified; + entry.itemType = it->item.identity[0]; + entry.refineLevel = it->item.refiningLevel; + std::memcpy(entry.cards, it->item.cards, sizeof(entry.cards)); + entry.category = it->logFlags; + entry.grade = it->item.grade; g_guildStorageLogs[0].push_back(entry); } @@ -11146,10 +11146,10 @@ void CGameMode::ApplyGuildStorageLog(std::uint16_t result, const std::vector 0; + return std::strcmp(left.timestamp, right.timestamp) > 0; }); for (std::vector::iterator it = g_guildStorageLogs[0].begin(); it != g_guildStorageLogs[0].end(); ++it) { - if (it->unknown_0008 == 1) { + if (it->operation == 1) { g_guildStorageLogs[1].push_back(*it); } else { g_guildStorageLogs[2].push_back(*it); @@ -11206,8 +11206,8 @@ void LaunchSkillCastEffect(CGameMode* mode, CGameActor* source, CGameActor* targ return; } - if (g_session.IsSkillIdInRange6018(target->GetEffectiveJob(-1)) || target->unknown_0314 == 9) { - if (mode->scene->unknown_0048 != 0 || mode->scene->unknown_004C != 0 || !IsSupportSkill(skillId)) { + if (g_session.IsSkillIdInRange6018(target->GetEffectiveJob(-1)) || target->objectType == 9) { + if (mode->scene->isPKZone != 0 || mode->scene->isSiegeMode != 0 || !IsSupportSkill(skillId)) { source->SendMsg(nullptr, AM_SET_TARGET_AID, 0, target->render.accountId, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -11288,7 +11288,7 @@ void CGameMode::ReceiveEquipItemNotice(const unsigned char* data) { } ITEM_INFO item = g_session.FindItem1770(packet->index); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { switch (packet->result) { case 1: g_windowMgr.SendNotice( @@ -11350,7 +11350,7 @@ void NoticeSkillUse(CGameActor* target, CGameActor* source, std::uint16_t skillI } if (name.empty()) { const CActorNameCard& card = static_cast(g_modeMgr.GetGameMode())->LookupNameCard(source->render.accountId); - name = card.unknown_007C.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.unknown_007C; + name = card.displayName.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.displayName; } StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_NOTIFY_TARGET_WHO), name.c_str()); message += text; @@ -11372,7 +11372,7 @@ void ApplyActorSkillState(CGameActor* actor, std::uint16_t skillId, int duration case KN_BOWLINGBASH: case HN_DOUBLEBOWLINGBASH: actor->render.isMotionFreezed = true; - actor->unknown_0278 = timeGetTime() + duration; + actor->freezeEndTick = timeGetTime() + duration; break; case MO_CALLSPIRITS: case MO_KITRANSLATION: @@ -11475,10 +11475,10 @@ __declspec(noinline) void SetActiveSkillEffect184(unsigned char enable) { if (enable == 1) { ActiveSkillEffect effect; effect.id = 184; - effect.unknown_0004 = 999999; - effect.unknown_0008 = 0; - effect.unknown_0014 = 9999; - effect.unknown_0018 = 9999; + effect.expiration = 999999; + effect.value1 = 0; + effect.totalDuration = 9999; + effect.remainingDuration = 9999; g_activeSkillEffects.push_back(effect); return; } @@ -11497,10 +11497,10 @@ __declspec(noinline) void SetActiveSkillEffect184(unsigned char enable) { // OFFSET: 0x00D316D0 // FUNCTION: fn_21734 void CGameMode::ReceiveExpChange(const unsigned char* packet) { - std::int64_t& exp = *reinterpret_cast(&g_session.unknown_162C[0x04]); - std::int64_t& nextExp = *reinterpret_cast(&g_session.unknown_162C[0x0C]); - std::int64_t& nextJobExp = *reinterpret_cast(&g_session.unknown_162C[0x14]); - std::int64_t& jobExp = *reinterpret_cast(&g_session.unknown_162C[0x1C]); + std::int64_t& exp = *reinterpret_cast(&g_session.playerExperienceState[0x04]); + std::int64_t& nextExp = *reinterpret_cast(&g_session.playerExperienceState[0x0C]); + std::int64_t& nextJobExp = *reinterpret_cast(&g_session.playerExperienceState[0x14]); + std::int64_t& jobExp = *reinterpret_cast(&g_session.playerExperienceState[0x1C]); switch (*reinterpret_cast(packet + 2)) { case SP_BASEEXP: if (g_session.IsAdminSubMode(2)) { @@ -11518,16 +11518,16 @@ void CGameMode::ReceiveExpChange(const unsigned char* packet) { } exp = *reinterpret_cast(packet + 4); g_session.InvalidateWindowFrames(); - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->baseExpBar)->SetValues(exp, nextExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->baseExpBar)->SetValues(exp, nextExp); break; case SP_JOBEXP: jobExp = *reinterpret_cast(packet + 4); g_session.InvalidateWindowFrames(); - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->jobExpBar)->SetValues(jobExp, nextJobExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->jobExpBar)->SetValues(jobExp, nextJobExp); break; case SP_ZENY: - if (*reinterpret_cast(&this->unknown_0100[0x14])) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14])) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } g_session.m_zeny = *reinterpret_cast(packet + 4); @@ -11537,12 +11537,12 @@ void CGameMode::ReceiveExpChange(const unsigned char* packet) { case SP_NEXTBASEEXP: nextExp = *reinterpret_cast(packet + 4); g_session.InvalidateWindowFrames(); - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->baseExpBar)->SetValues(exp, nextExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->baseExpBar)->SetValues(exp, nextExp); break; case SP_NEXTJOBEXP: nextJobExp = *reinterpret_cast(packet + 4); g_session.InvalidateWindowFrames(); - static_cast(reinterpret_cast(g_windowMgr.unknown_01DC)->jobExpBar)->SetValues(jobExp, nextJobExp); + static_cast(reinterpret_cast(g_windowMgr.basicInfoWnd)->jobExpBar)->SetValues(jobExp, nextJobExp); break; } } @@ -11600,8 +11600,8 @@ void CGameMode::ReceiveParaResultList(const unsigned char* packet) { for (int i = 0; i < count; ++i) { RawItemBasic item = {}; _itoa(record->itemId, item.itemId, 10); - item.unknown_0004 = record->location; - item.unknown_0008 = record->location; + item.price = record->location; + item.realPrice = record->location; item.id = -1; item.identified = 1; window->AddItem(item, record->quantity); @@ -11622,31 +11622,31 @@ void CGameMode::ReceiveEquipItemListFlags(const unsigned char* packet) { const unsigned char* record = packet + 4; for (int i = 0; i < count; ++i) { ITEM_INFO item; - item.unknown_0000[0] = record[6]; - std::memcpy(item.unknown_001C, record + 0x0C, sizeof(item.unknown_001C)); - item.unknown_0000[2] = *reinterpret_cast(record + 7); - item.unknown_0000[1] = *reinterpret_cast(record); - item.unknown_0000[3] = *reinterpret_cast(record + 9); + item.identity[0] = record[6]; + std::memcpy(item.cards, record + 0x0C, sizeof(item.cards)); + item.identity[2] = *reinterpret_cast(record + 7); + item.identity[1] = *reinterpret_cast(record); + item.identity[3] = *reinterpret_cast(record + 9); item.quantity = 1; item.SetItemId(*reinterpret_cast(record + 2)); const unsigned char flags = record[0x24]; item.identified = flags & 1; - item.unknown_005D = (flags >> 1) & 1; - item.unknown_0074[0] = (flags >> 2) & 1; - item.unknown_0060 = record[0x0B]; - item.unknown_0068 = *reinterpret_cast(record + 0x1C); - item.unknown_0064 = *reinterpret_cast(record + 0x20); - item.unknown_0070 = *reinterpret_cast(record + 0x22); - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + item.damaged = (flags >> 1) & 1; + item.flags[0] = (flags >> 2) & 1; + item.refiningLevel = record[0x0B]; + item.expireTime = *reinterpret_cast(record + 0x1C); + item.bindOnEquip = *reinterpret_cast(record + 0x20); + item.sprite = *reinterpret_cast(record + 0x22); + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem2B50(item, &equipped); } else { g_session.EquipUnknown17F0(item, &equipped); @@ -11667,24 +11667,24 @@ __declspec(noinline) void CGameMode::ReceiveEquipItemList34(const unsigned char* const unsigned char* record = packet + 4; for (int i = 0; i < count; ++i) { ITEM_INFO item; - item.unknown_0000[1] = *reinterpret_cast(record); - item.unknown_0000[0] = record[6]; - item.unknown_0000[2] = *reinterpret_cast(record + 8); - item.unknown_0000[3] = *reinterpret_cast(record + 10); + item.identity[1] = *reinterpret_cast(record); + item.identity[0] = record[6]; + item.identity[2] = *reinterpret_cast(record + 8); + item.identity[3] = *reinterpret_cast(record + 10); item.quantity = 1; - std::memcpy(item.unknown_001C, record + 0x0E, sizeof(item.unknown_001C)); + std::memcpy(item.cards, record + 0x0E, sizeof(item.cards)); item.SetItemId(*reinterpret_cast(record + 2)); item.identified = record[7]; - item.unknown_005D = record[0x0C]; - item.unknown_0060 = record[0x0D]; - item.unknown_0068 = *reinterpret_cast(record + 0x1E); + item.damaged = record[0x0C]; + item.refiningLevel = record[0x0D]; + item.expireTime = *reinterpret_cast(record + 0x1E); if (g_session.IsPetEgg(std::atoi(item.itemId.c_str()))) { - if (item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (item.damaged) { + g_session.petEggIndex = item.identity[1]; } } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { @@ -11707,31 +11707,31 @@ void CGameMode::ReceiveEquipItemList38(const unsigned char* packet) { const unsigned char* record = packet + 4; for (int i = 0; i < count; ++i) { ITEM_INFO item; - item.unknown_0000[1] = *reinterpret_cast(record); - item.unknown_0000[0] = record[6]; - item.unknown_0000[2] = *reinterpret_cast(record + 8); - item.unknown_0000[3] = *reinterpret_cast(record + 10); + item.identity[1] = *reinterpret_cast(record); + item.identity[0] = record[6]; + item.identity[2] = *reinterpret_cast(record + 8); + item.identity[3] = *reinterpret_cast(record + 10); item.quantity = 1; - std::memcpy(item.unknown_001C, record + 0x0E, sizeof(item.unknown_001C)); + std::memcpy(item.cards, record + 0x0E, sizeof(item.cards)); item.SetItemId(*reinterpret_cast(record + 2)); item.identified = record[7]; - item.unknown_005D = record[0x0C]; - item.unknown_0060 = record[0x0D]; - item.unknown_0068 = *reinterpret_cast(record + 0x1E); - item.unknown_0064 = *reinterpret_cast(record + 0x22); - item.unknown_0070 = *reinterpret_cast(record + 0x24); + item.damaged = record[0x0C]; + item.refiningLevel = record[0x0D]; + item.expireTime = *reinterpret_cast(record + 0x1E); + item.bindOnEquip = *reinterpret_cast(record + 0x22); + item.sprite = *reinterpret_cast(record + 0x24); if (g_session.IsPetEgg(std::atoi(item.itemId.c_str()))) { - if (item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (item.damaged) { + g_session.petEggIndex = item.identity[1]; } } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem2B50(item, &equipped); } else { g_session.EquipUnknown17F0(item, &equipped); @@ -11756,7 +11756,7 @@ __declspec(noinline) void CGameMode::ApplyRefiningMaterial(short itemId, unsigne // FUNCTION: fn_21865 void CGameMode::ReceiveAddRelatedGuild(const unsigned char* data) { GuildInfo* guildInfo = &g_guildInfo; - if (guildInfo->unknown_00BC == 0) { + if (guildInfo->infoRequested == 0) { return; } @@ -11769,10 +11769,10 @@ void CGameMode::ReceiveAddRelatedGuild(const unsigned char* data) { } GuildInfo::RelatedGuild guild; - guild.unknown_0000 = *reinterpret_cast(data + 6); - guild.unknown_0004 = *reinterpret_cast(data + 2); - guild.unknown_0008 = name; - guildInfo->unknown_00E4.push_back(guild); + guild.guildId = *reinterpret_cast(data + 6); + guild.relation = *reinterpret_cast(data + 2); + guild.name = name; + guildInfo->relatedGuilds.push_back(guild); g_windowMgr.RefreshGuildWindows(); } @@ -11786,9 +11786,9 @@ void CGameMode::ReceiveEquipItemResult(const unsigned char* packet) { } ITEM_INFO item = g_session.FindItemByIdentity(*reinterpret_cast(packet + 2), *reinterpret_cast(packet + 4)); - item.unknown_0000[3] = *reinterpret_cast(packet + 4); + item.identity[3] = *reinterpret_cast(packet + 4); ITEM_DESC description = FindItemDescription(std::atoi(item.itemId.c_str())); - item.unknown_0070 = description.unknown_0040; + item.sprite = description.viewId; if (g_session.IsCostumeLocation(*reinterpret_cast(packet + 4))) { g_session.EquipItem6B68(item); } else { @@ -11806,15 +11806,15 @@ struct GuildMemberAddV4Packet { /* 0000 */ std::uint16_t packetType; /* 0002 */ int accountId; /* 0006 */ std::uint32_t characterId; - /* 000A */ std::int16_t unknown_000A; - /* 000C */ std::int16_t unknown_000C; - /* 000E */ std::int16_t unknown_000E; + /* 000A */ std::int16_t head; + /* 000C */ std::int16_t headPalette; + /* 000E */ std::int16_t sex; /* 0010 */ std::int16_t job; /* 0012 */ std::int16_t level; /* 0014 */ int exp; /* 0018 */ int online; /* 001C */ int positionId; - /* 0020 */ int unknown_0020; + /* 0020 */ int lastTimeOffline; }; #pragma pack(pop) @@ -11825,7 +11825,7 @@ static_assert(sizeof(GuildMemberAddV4Packet) == 0x24); void CGameMode::ReceiveGuildMemberAdd4(const unsigned char* data) { const GuildMemberAddV4Packet* packet = reinterpret_cast(data); GuildInfo* guildInfo = &g_guildInfo; - if (guildInfo->unknown_00C0 == 0) { + if (guildInfo->membersRequested == 0) { return; } @@ -11833,15 +11833,15 @@ void CGameMode::ReceiveGuildMemberAdd4(const unsigned char* data) { member.accountId = packet->accountId; member.characterId = packet->characterId; member.name = LookupPlayerName(packet->characterId); - member.unknown_0020 = packet->unknown_000A; - member.unknown_0024 = packet->unknown_000C; + member.head = packet->head; + member.headPalette = packet->headPalette; member.job = packet->job; - member.unknown_002C = packet->unknown_000E; + member.sex = packet->sex; member.positionId = packet->positionId; member.level = packet->level; member.exp = packet->exp; member.online = packet->online; - *reinterpret_cast(member.unknown_0074) = packet->unknown_0020; + *reinterpret_cast(member.lastOfflineTime) = packet->lastTimeOffline; if (member.name.size() == 0) { member.name = LookupMessage(MSI_NAMELESS_USER) + g_gameModeNamelessTag; } @@ -11853,43 +11853,43 @@ void CGameMode::ReceiveGuildMemberAdd4(const unsigned char* data) { struct ActorStandEntry { ActorStandEntry() - : job(0), unknown_0008(0), cellX(0), cellY(0), direction(0), speed(0), unknown_001C(0), unknown_0020(0), unknown_0028(0), unknown_002C(0), - unknown_0030(0), state(0), bodyState(0), effectState(0), stateFlags(0), unknown_0044(0), unknown_0048(0), unknown_004C(0), unknown_0050(0), - unknown_0054(0), unknown_0058(0), unknown_005C(0), guildId(0), guildVersion(0), unknown_0068(0), unknown_006C(0), robe(0), unknown_0074(0), - unknown_0078(0) { + : job(0), appearanceVariant(0), cellX(0), cellY(0), direction(0), speed(0), xSize(0), ySize(0), weapon(0), shield(0), + accessory(0), state(0), bodyState(0), effectState(0), stateFlags(0), pkMode(0), shieldAppearance(0), accessory2(0), accessory3(0), + headPalette(0), bodyPalette(0), headDirection(0), guildId(0), guildVersion(0), honor(0), virtue(0), robe(0), gid(0), + bodyCostume(0) { } /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int appearanceVariant; /* 000C */ int cellX; /* 0010 */ int cellY; /* 0014 */ int direction; /* 0018 */ int speed; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; + /* 001C */ int xSize; + /* 0020 */ int ySize; + /* 0024 */ int head; + /* 0028 */ int weapon; + /* 002C */ int shield; + /* 0030 */ int accessory; /* 0034 */ int state; /* 0038 */ int bodyState; /* 003C */ int effectState; /* 0040 */ std::uint32_t stateFlags; - /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; + /* 0044 */ int pkMode; + /* 0048 */ int shieldAppearance; + /* 004C */ int accessory2; + /* 0050 */ int accessory3; + /* 0054 */ int headPalette; + /* 0058 */ int bodyPalette; + /* 005C */ int headDirection; /* 0060 */ int guildId; /* 0064 */ int guildVersion; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; + /* 0068 */ int honor; + /* 006C */ int virtue; /* 0070 */ int robe; - /* 0074 */ int unknown_0074; - /* 0078 */ int unknown_0078; + /* 0074 */ int gid; + /* 0078 */ int bodyCostume; }; static_assert(sizeof(ActorStandEntry) == 0x7C); @@ -11903,18 +11903,18 @@ void CGameMode::SpawnStandingPc( ActorStandEntry entry; entry.aid = aid; entry.job = job; - entry.unknown_0008 = this->SubD07740(job, sex); + entry.appearanceVariant = this->SubD07740(job, sex); entry.cellX = cellX; entry.cellY = cellY; entry.direction = 4; - entry.unknown_0024 = unknown_0024; - entry.unknown_0028 = unknown_0028; - entry.unknown_002C = unknown_002C; - entry.unknown_0030 = unknown_0030; - entry.unknown_004C = unknown_004C; - entry.unknown_0050 = unknown_0050; - entry.unknown_0054 = unknown_0054; - entry.unknown_0058 = unknown_0058; + entry.head = unknown_0024; + entry.weapon = unknown_0028; + entry.shield = unknown_002C; + entry.accessory = unknown_0030; + entry.accessory2 = unknown_004C; + entry.accessory3 = unknown_0050; + entry.headPalette = unknown_0054; + entry.bodyPalette = unknown_0058; entry.robe = robe; if (name.size() != 0) { this->nameCard.SetName(aid, name); @@ -11932,7 +11932,7 @@ void CGameMode::SpawnStandingPc( const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - actor->unknown_03E0Low = 1; + actor->storedActorEntry = 1; } // OFFSET: 0x00D7B170 @@ -11944,20 +11944,20 @@ void CGameMode::SpawnStandingPc2( ActorStandEntry entry; entry.aid = aid; entry.job = job; - entry.unknown_0008 = this->SubD07740(job, sex); + entry.appearanceVariant = this->SubD07740(job, sex); entry.cellX = cellX; entry.cellY = cellY; entry.direction = 4; - entry.unknown_0024 = unknown_0024; - entry.unknown_0028 = unknown_0028; - entry.unknown_002C = unknown_002C; - entry.unknown_0030 = unknown_0030; - entry.unknown_004C = unknown_004C; - entry.unknown_0050 = unknown_0050; - entry.unknown_0054 = unknown_0054; - entry.unknown_0058 = unknown_0058; + entry.head = unknown_0024; + entry.weapon = unknown_0028; + entry.shield = unknown_002C; + entry.accessory = unknown_0030; + entry.accessory2 = unknown_004C; + entry.accessory3 = unknown_0050; + entry.headPalette = unknown_0054; + entry.bodyPalette = unknown_0058; entry.robe = robe; - entry.unknown_0078 = unknown_0078; + entry.bodyCostume = unknown_0078; if (name.size() != 0) { this->nameCard.SetName(aid, name); } @@ -11974,7 +11974,7 @@ void CGameMode::SpawnStandingPc2( const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - actor->unknown_03E0Low = 1; + actor->storedActorEntry = 1; } struct MirrorSkillSpawnData { @@ -12006,24 +12006,24 @@ void CGameMode::SpawnMirrorActor(std::uint32_t aid, std::uint32_t owner, short x entry.aid = aid; entry.cellY = y; entry.job = g_session.GetDisplayJob(); - entry.unknown_0008 = g_session.SyncUnknown0E98(); - entry.unknown_0024 = g_session.m_head; - entry.unknown_0028 = *reinterpret_cast(&g_session.unknown_0EDC[0x4]); - entry.unknown_002C = *reinterpret_cast(&g_session.unknown_0EDC[0x8]); - entry.unknown_0030 = *reinterpret_cast(&g_session.unknown_0EF4[0x0]); + entry.appearanceVariant = g_session.SyncUnknown0E98(); + entry.head = g_session.m_head; + entry.weapon = *reinterpret_cast(&g_session.weaponAppearance[0x4]); + entry.shield = *reinterpret_cast(&g_session.weaponAppearance[0x8]); + entry.accessory = *reinterpret_cast(&g_session.accessoryAppearance[0x0]); entry.direction = 180; - entry.unknown_0048 = *reinterpret_cast(&g_session.unknown_0EDC[0xC]); - entry.unknown_004C = *reinterpret_cast(&g_session.unknown_0EF4[0x4]); - entry.unknown_0050 = *reinterpret_cast(&g_session.unknown_0EF4[0x8]); - entry.unknown_0054 = g_session.m_headPalette; - entry.unknown_0058 = g_session.m_bodyStyle; + entry.shieldAppearance = *reinterpret_cast(&g_session.weaponAppearance[0xC]); + entry.accessory2 = *reinterpret_cast(&g_session.accessoryAppearance[0x4]); + entry.accessory3 = *reinterpret_cast(&g_session.accessoryAppearance[0x8]); + entry.headPalette = g_session.m_headPalette; + entry.bodyPalette = g_session.m_bodyStyle; entry.robe = g_session.m_robe; - entry.unknown_0078 = g_session.m_bodyCostume; + entry.bodyCostume = g_session.m_bodyCostume; CPc* pc = new CPc; const std::int64_t value = reinterpret_cast(&entry); pc->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - pc->unknown_0314 = 7; + pc->objectType = 7; pc->LaunchEffect(0x3C3, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); this->scene->objects.push_back(pc); this->scene->actors.push_back(pc); @@ -12046,7 +12046,7 @@ void CGameMode::SpawnMirrorActor(std::uint32_t aid, std::uint32_t owner, short x const std::int64_t value = reinterpret_cast(&data); skill->SendMsg(nullptr, AM_SKILLSTANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); } #pragma pack(push, 1) @@ -12060,7 +12060,7 @@ struct Item1748Record2 { /* 000E */ unsigned char damaged; /* 000F */ std::uint32_t cards[4]; /* 001F */ StoreItemOption options[5]; - /* 0038 */ std::int32_t unknown_0038; + /* 0038 */ std::int32_t location; /* 003C */ std::uint16_t sprite; /* 003E */ unsigned char refine; /* 003F */ unsigned char grade; @@ -12095,23 +12095,23 @@ void CGameMode::ReceiveItem1748List2(const unsigned char* packet) { memcpy_s(&record, sizeof(record), packet + 0x0C + i * sizeof(Item1748Record2), sizeof(record)); ITEM_INFO item; - item.unknown_0000[1] = record.index; - item.unknown_0014[0] = record.price; - item.unknown_0014[1] = record.price; - item.unknown_0000[0] = record.type; + item.identity[1] = record.index; + item.prices[0] = record.price; + item.prices[1] = record.price; + item.identity[0] = record.type; item.quantity = record.amount; item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; + item.damaged = record.damaged; + item.refiningLevel = record.refine; item.SetItemId(record.itemId); - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); - item.unknown_0098 = CountStoreItemOptions(record.options); - for (std::int64_t index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); + item.optionCount = CountStoreItemOptions(record.options); + for (std::int64_t index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } - item.unknown_0000[2] = record.unknown_0038; - item.unknown_0070 = record.sprite; - item.unknown_0088 = record.grade; + item.identity[2] = record.location; + item.sprite = record.sprite; + item.grade = record.grade; items.push_back(item); } @@ -12131,7 +12131,7 @@ void CGameMode::ReceiveItem1748List2(const unsigned char* packet) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); window->SendMsg(nullptr, UM_SETNAID, value4, value8, 0, 0); } - this->unknown_024C = 1; + this->isOnQuest = 1; } #pragma pack(push, 1) @@ -12169,14 +12169,14 @@ void CGameMode::ReceivePartyMemberLeft(const unsigned char* data) { } if (std::strcmp(g_session.DecodePlayerName(), name) == 0) { - g_session.unknown_5464 = 0; + g_session.partyLeader = 0; g_session.ClearPartyMembers(); - g_session.unknown_54C4.assign("", 0); + g_session.partyName.assign("", 0); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_YOU_LEAVE_FROM_PARTY)), 0xFFFF00, 0, 0, 0); g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); this->SendMsg(MM_DELETEPARTYPOSALL, 0, 0, 0, 0); - if (g_windowMgr.unknown_03F8) { + if (g_windowMgr.memorialDunWnd) { g_windowMgr.CloseWindow(WID_MEMORIALDUNWND); } g_session.ClearRecords0734(); @@ -12229,21 +12229,21 @@ void CGameMode::ReceiveItem1758StoreList(const unsigned char* packet) { memcpy_s(&record, sizeof(record), packet + 8 + i * sizeof(Item1758StoreRecord2), sizeof(record)); ITEM_INFO item; - item.unknown_0000[1] = record.index; - item.unknown_0014[0] = record.price; - item.unknown_0014[1] = record.price; + item.identity[1] = record.index; + item.prices[0] = record.price; + item.prices[1] = record.price; item.quantity = record.amount; - item.unknown_0000[0] = record.type; + item.identity[0] = record.type; item.SetItemId(record.itemId); item.identified = record.identified; - item.unknown_005D = record.damaged; - item.unknown_0060 = record.refine; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); - item.unknown_0098 = CountStoreItemOptions(record.options); - for (std::int64_t index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = record.options[index]; + item.damaged = record.damaged; + item.refiningLevel = record.refine; + std::memcpy(item.cards, record.cards, sizeof(record.cards)); + item.optionCount = CountStoreItemOptions(record.options); + for (std::int64_t index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = record.options[index]; } - item.unknown_0088 = record.grade; + item.grade = record.grade; items.push_back(item); } @@ -12351,7 +12351,7 @@ struct NpcStandEntryPacket { /* 0025 */ unsigned char posDir[3]; /* 0028 */ unsigned char xSize; /* 0029 */ unsigned char ySize; - /* 002A */ std::uint16_t unknown_002A; + /* 002A */ std::uint16_t actorFlags; }; #pragma pack(pop) @@ -12365,46 +12365,46 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { const ActorStandEntryPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.state = packet->state; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_002C = packet->shield; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.shield = packet->shield; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.aid = packet->aid; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; entry.cellY = ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4); CGameActor* actor = static_cast(this->scene->GetGameActorByAID(entry.aid)); if (actor) { - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12414,24 +12414,24 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || g_session.IsSkillIdInRange6001(job)) { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } created = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } else { created = new CPc; } actor = created; - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); @@ -12439,11 +12439,11 @@ void CGameMode::ReceiveActorStandEntry(const unsigned char* data) { if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -12458,47 +12458,47 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { const ActorStandEntryPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.state = packet->state; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_002C = packet->shield; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.shield = packet->shield; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.aid = packet->aid; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; entry.cellY = ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4); CGameActor* actor = static_cast(this->scene->GetGameActorByAID(entry.aid)); if (actor) { - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12508,24 +12508,24 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || g_session.IsSkillIdInRange6001(job)) { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } created = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } else { created = new CPc; } actor = created; - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); @@ -12533,12 +12533,12 @@ void CGameMode::ReceiveActorStandEntryFont(const unsigned char* data) { if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -12553,30 +12553,30 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { const ActorTypedEntryPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_002C = packet->weapon >> 31; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.shield = packet->weapon >> 31; + entry.accessory = packet->accessory; entry.state = packet->state; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_0048 = packet->shield; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.shieldAppearance = packet->shield; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.aid = packet->aid; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; entry.cellY = ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4); @@ -12592,16 +12592,16 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { } } if (packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12611,33 +12611,33 @@ void CGameMode::ReceiveActorTypedEntry(const unsigned char* data) { if ((job >= JT_WARPNPC && job < 1000) || (job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978 || g_session.IsSkillIdInRange6001(job) || packet->objectType == 9) { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } created = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } else { created = new CPc; } actor = created; if (actor && packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - actor->unknown_0314 = packet->objectType; + actor->objectType = packet->objectType; this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); if (actor) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -12660,25 +12660,25 @@ void CGameMode::ReceiveNpcStandEntry(const unsigned char* data) { const NpcStandEntryPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = packet->sex; + entry.appearanceVariant = packet->sex; entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_002C = packet->weapon >> 31; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.shield = packet->weapon >> 31; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_0048 = packet->shield; + entry.pkMode = packet->pkMode; + entry.shieldAppearance = packet->shield; entry.aid = packet->aid; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; entry.cellY = ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4); @@ -12686,8 +12686,8 @@ void CGameMode::ReceiveNpcStandEntry(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(entry.aid)); if (!actor) { actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; - actor->unknown_0314 = packet->objectType; + entry.appearanceVariant = 0; + actor->objectType = packet->objectType; this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); const std::int64_t value = reinterpret_cast(&entry); @@ -12699,7 +12699,7 @@ void CGameMode::ReceiveNpcStandEntry(const unsigned char* data) { actor->SetGuildInfo(guildId, packet->shield); } } - actor->unknown_0210 = packet->unknown_002A; + actor->characterLevel = packet->actorFlags; return; } @@ -12713,13 +12713,13 @@ void CGameMode::ReceiveNpcStandEntry(const unsigned char* data) { actor->SetGuildInfo(guildId, guildVersion); } } - actor->unknown_0210 = packet->unknown_002A; + actor->characterLevel = packet->actorFlags; } struct ActorMoveEntry { /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int appearanceVariant; /* 000C */ std::uint32_t moveStartTime; /* 0010 */ int srcX; /* 0014 */ int srcY; @@ -12736,7 +12736,7 @@ struct ActorMoveEntry { /* 0040 */ int healthState; /* 0044 */ int effectState; /* 0048 */ int pkMode; - /* 004C */ int unknown_004C; + /* 004C */ int shieldAppearance; /* 0050 */ int accessory2; /* 0054 */ int accessory3; /* 0058 */ int headPalette; @@ -12881,7 +12881,7 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { entry.job = packet->job; entry.aid = packet->aid; entry.moveStartTime = packet->moveStartTime; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; entry.head = packet->head; entry.weapon = packet->weapon; @@ -12905,14 +12905,14 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - if (actor->unknown_02E4) { - auto member = this->unknown_01B4.find(actor->render.accountId); - if (member != this->unknown_01B4.end()) { + if (actor->isGroupMemberVisible) { + auto member = this->partyPosList.find(actor->render.accountId); + if (member != this->partyPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } - member = this->unknown_01BC.find(actor->render.accountId); - if (member != this->unknown_01BC.end()) { + member = this->guildPosList.find(actor->render.accountId); + if (member != this->guildPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } @@ -12929,45 +12929,45 @@ void CGameMode::ReceiveActorMoveEntryLegacy(const unsigned char* data) { return; } - created->unknown_0314 = packet->objectType; + created->objectType = packet->objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; - if (actor->unknown_0314 == 0) { - if (this->unknown_01B4.find(entry.aid) != this->unknown_01B4.end() || this->unknown_01BC.find(entry.aid) != this->unknown_01BC.end()) { + if (actor->objectType == 0) { + if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } else { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } g_championMonsterMgr->ApplyEffects(entry.job, actor, entry.aid); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } std::int64_t bossFlag = 0; - if (packet->isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = packet->isBoss; + if (packet->isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = packet->isBoss; bossFlag = 1; } - actor->unknown_0210 = packet->level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + actor->characterLevel = packet->level; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (packet->objectType == 7) { if (g_session.IsPetAid(packet->aid)) { - g_session.unknown_1038 = entry.accessory; + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (packet->objectType == 8 && g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -13013,7 +13013,7 @@ void CGameMode::SpawnMovingActor( entry.moveStartTime = moveStartTime; entry.job = job; entry.aid = aid; - entry.unknown_0008 = this->SubD07740(entry.job, sex); + entry.appearanceVariant = this->SubD07740(entry.job, sex); entry.speed = speed; entry.head = head; entry.weapon = weapon; @@ -13039,14 +13039,14 @@ void CGameMode::SpawnMovingActor( CGameActor* actor = static_cast(this->scene->GetGameActorByAID(aid)); if (actor) { - if (actor->unknown_02E4) { - auto member = this->unknown_01B4.find(actor->render.accountId); - if (member != this->unknown_01B4.end()) { + if (actor->isGroupMemberVisible) { + auto member = this->partyPosList.find(actor->render.accountId); + if (member != this->partyPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } - member = this->unknown_01BC.find(actor->render.accountId); - if (member != this->unknown_01BC.end()) { + member = this->guildPosList.find(actor->render.accountId); + if (member != this->guildPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } @@ -13063,45 +13063,45 @@ void CGameMode::SpawnMovingActor( return; } - created->unknown_0314 = objectType; + created->objectType = objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; - if (actor->unknown_0314 == 0) { - if (this->unknown_01B4.find(entry.aid) != this->unknown_01B4.end() || this->unknown_01BC.find(entry.aid) != this->unknown_01BC.end()) { + if (actor->objectType == 0) { + if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } else if (!((objectType == 1 || objectType == 6 || objectType == 12) && IsPlayerJob(job))) { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } g_championMonsterMgr->ApplyEffects(entry.job, actor, entry.aid); std::int64_t bossFlag = 0; - if (isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = isBoss; + if (isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = isBoss; bossFlag = 1; } - actor->unknown_0210 = level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = font; + actor->characterLevel = level; + *reinterpret_cast(actor->render.fontSequenceBytes) = font; if (objectType == 7) { if (g_session.IsPetAid(aid)) { - g_session.unknown_1038 = entry.accessory; + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (objectType == 8 && g_session.IsHomunAid(aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -13172,7 +13172,7 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { entry.aid = packet->aid; entry.job = packet->job; entry.moveStartTime = packet->moveStartTime; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; entry.head = packet->head; entry.weapon = packet->weapon; @@ -13199,25 +13199,25 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_MOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (entry.head == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (actor->unknown_02E4) { - auto member = this->unknown_01B4.find(actor->render.accountId); - if (member != this->unknown_01B4.end()) { + if (actor->isGroupMemberVisible) { + auto member = this->partyPosList.find(actor->render.accountId); + if (member != this->partyPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } - member = this->unknown_01BC.find(actor->render.accountId); - if (member != this->unknown_01BC.end()) { + member = this->guildPosList.find(actor->render.accountId); + if (member != this->guildPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } @@ -13228,18 +13228,18 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } if (actor && entry.head == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); @@ -13249,11 +13249,11 @@ void CGameMode::ReceiveActorMoveEntryOld(const unsigned char* data) { this->scene->actors.push_back(actor); const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(entry.aid) != this->unknown_01B4.end() || this->unknown_01BC.find(entry.aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -13305,7 +13305,7 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { entry.aid = packet->aid; entry.job = packet->job; entry.moveStartTime = packet->moveStartTime; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; entry.head = packet->head; entry.weapon = packet->weapon; @@ -13329,29 +13329,29 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - actor->unknown_0210 = packet->level; + actor->characterLevel = packet->level; const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_MOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && packet->objectType != 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (actor->unknown_02E4) { - auto member = this->unknown_01B4.find(actor->render.accountId); - if (member != this->unknown_01B4.end()) { + if (actor->isGroupMemberVisible) { + auto member = this->partyPosList.find(actor->render.accountId); + if (member != this->partyPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } - member = this->unknown_01BC.find(actor->render.accountId); - if (member != this->unknown_01BC.end()) { + member = this->guildPosList.find(actor->render.accountId); + if (member != this->guildPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } @@ -13363,34 +13363,34 @@ void CGameMode::ReceiveActorMoveEntryOld2(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } if (actor && packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - actor->unknown_0210 = packet->level; - actor->unknown_0314 = packet->objectType; + actor->characterLevel = packet->level; + actor->objectType = packet->objectType; this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(entry.aid) != this->unknown_01B4.end() || this->unknown_01BC.find(entry.aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -13452,7 +13452,7 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { entry.aid = packet->aid; entry.job = packet->job; entry.moveStartTime = packet->moveStartTime; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; entry.head = packet->head; entry.weapon = packet->weapon; @@ -13476,29 +13476,29 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - actor->unknown_0210 = packet->level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + actor->characterLevel = packet->level; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; actor->SendMsg(nullptr, AM_MOVEENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (actor->unknown_02E4) { - auto member = this->unknown_01B4.find(actor->render.accountId); - if (member != this->unknown_01B4.end()) { + if (actor->isGroupMemberVisible) { + auto member = this->partyPosList.find(actor->render.accountId); + if (member != this->partyPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } - member = this->unknown_01BC.find(actor->render.accountId); - if (member != this->unknown_01BC.end()) { + member = this->guildPosList.find(actor->render.accountId); + if (member != this->guildPosList.end()) { member->second.x = entry.dstX; member->second.y = entry.dstY; } @@ -13510,34 +13510,34 @@ void CGameMode::ReceiveActorMoveEntryNamed(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } if (actor && packet->objectType != 0) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } - actor->unknown_0314 = packet->objectType; + actor->objectType = packet->objectType; this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); actor->SendMsg(nullptr, AM_INITMOVEENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; - actor->unknown_0210 = packet->level; - if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->unknown_0188 == 0 && + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; + actor->characterLevel = packet->level; + if (g_session.GetSceneUnknown004C() && packet->objectType == 7 && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(entry.aid) != this->unknown_01B4.end() || this->unknown_01BC.find(entry.aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(entry.aid) != this->partyPosList.end() || this->guildPosList.find(entry.aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -13588,7 +13588,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { entry.aid = packet->aid; entry.job = packet->job; entry.moveStartTime = packet->moveStartTime; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; entry.head = packet->head; entry.weapon = packet->weapon; @@ -13598,7 +13598,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { entry.bodyState = packet->bodyState; entry.effectState = packet->effectState; entry.pkMode = packet->pkMode; - entry.unknown_004C = packet->shield; + entry.shieldAppearance = packet->shield; entry.accessory2 = packet->accessory2; entry.accessory3 = packet->accessory3; entry.headPalette = packet->headPalette; @@ -13622,8 +13622,8 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { } } if (entry.head == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory && !actor->GetGdid()) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); @@ -13635,18 +13635,18 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } if (actor && entry.head == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.accessory; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } if (entry.accessory) { actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); @@ -13664,7 +13664,7 @@ void CGameMode::ReceiveActorMoveEntryOld0(const unsigned char* data) { } } - if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -13877,33 +13877,33 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { } entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_002C = packet->shield; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.shield = packet->shield; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.guildVersion = packet->guildVersion; entry.robe = packet->robe; entry.aid = packet->aid; if (packet->objectType == 0) { entry.state = 0; } else { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -13929,18 +13929,18 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { return; } - created->unknown_0314 = packet->objectType; + created->objectType = packet->objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; if (packet->objectType == 0) { - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, static_cast(value), static_cast(value >> 32), 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -13948,29 +13948,29 @@ void CGameMode::ReceiveActorStandEntryLegacy(const unsigned char* data) { } std::int64_t bossFlag = 0; - if (packet->isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = packet->isBoss; + if (packet->isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = packet->isBoss; bossFlag = 1; } - actor->unknown_0210 = packet->level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + actor->characterLevel = packet->level; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (packet->objectType == 7) { if (g_session.IsPetAid(packet->aid)) { - g_session.unknown_1038 = entry.unknown_0030; + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030 && !actor->GetGdid()) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory && !actor->GetGdid()) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (packet->objectType == 8 && g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -14048,33 +14048,33 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { } entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_002C = packet->shield; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.shield = packet->shield; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.guildVersion = packet->guildVersion; entry.robe = packet->robe; entry.aid = packet->aid; if (packet->objectType == 0) { entry.state = 0; } else { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14088,18 +14088,18 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { actor = new CPc; } else { actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - actor->unknown_0314 = packet->objectType; + actor->objectType = packet->objectType; } - actor->unknown_0210 = packet->level; + actor->characterLevel = packet->level; if (packet->objectType == 0) { - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (created) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } this->scene->objects.push_back(actor); @@ -14108,21 +14108,21 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0) { + if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { if (packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (packet->objectType == 8 && g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } if (created) { @@ -14134,7 +14134,7 @@ void CGameMode::ReceiveActorStandEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0) { + if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14190,27 +14190,27 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { const ActorStandEntryOldPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; - entry.unknown_002C = packet->shield; + entry.honor = packet->honor; + entry.virtue = packet->virtue; + entry.shield = packet->shield; entry.aid = packet->aid; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14219,16 +14219,16 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14240,21 +14240,21 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); @@ -14263,11 +14263,11 @@ void CGameMode::ReceiveActorStandEntryOld(const unsigned char* data) { if (isPc && !IsAdminAccount(packet->aid) && !StateFlag06(packet->effectState)) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -14314,27 +14314,27 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { const ActorStandEntryOld2Packet* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; - entry.unknown_002C = packet->shield; + entry.honor = packet->honor; + entry.virtue = packet->virtue; + entry.shield = packet->shield; entry.aid = packet->aid; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14343,17 +14343,17 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - actor->unknown_0210 = packet->level; - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + actor->characterLevel = packet->level; + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14365,35 +14365,35 @@ void CGameMode::ReceiveActorStandEntryOld2(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); - actor->unknown_0210 = packet->level; + actor->characterLevel = packet->level; if (isPc && !IsAdminAccount(packet->aid) && !StateFlag06(packet->effectState)) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -14441,27 +14441,27 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { const ActorStandEntryOld3Packet* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; - entry.unknown_002C = packet->shield; + entry.honor = packet->honor; + entry.virtue = packet->virtue; + entry.shield = packet->shield; entry.aid = packet->aid; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14470,18 +14470,18 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; - actor->unknown_0210 = packet->level; - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; + actor->characterLevel = packet->level; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14493,38 +14493,38 @@ void CGameMode::ReceiveActorStandEntryOld3(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); - actor->unknown_0210 = packet->level; + actor->characterLevel = packet->level; if (isPc) { - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (!IsAdminAccount(packet->aid) && !StateFlag06(packet->effectState)) { actor->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } } - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -14570,28 +14570,28 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { const ActorStandEntryOld0Packet* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_002C = packet->weapon >> 31; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.shield = packet->weapon >> 31; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_0048 = packet->shield; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.shieldAppearance = packet->shield; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.aid = packet->aid; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14607,12 +14607,12 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { actor->SetGuildInfo(emblem, packet->shield); } } - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } actor->SendMsg(nullptr, AM_STANDENTRY, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -14624,21 +14624,21 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); @@ -14656,7 +14656,7 @@ void CGameMode::ReceiveActorStandEntryOld0(const unsigned char* data) { } } - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14714,32 +14714,32 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { } entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.state = packet->state; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_002C = packet->shield; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.shield = packet->shield; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.guildVersion = packet->guildVersion; entry.robe = packet->robe; entry.aid = packet->aid; if (packet->objectType != 0) { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14753,39 +14753,39 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { actor = new CPc; } else { actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - actor->unknown_0314 = packet->objectType; + actor->objectType = packet->objectType; } if (packet->objectType == 0) { - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; - actor->unknown_0210 = packet->level; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; + actor->characterLevel = packet->level; if (created) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } else { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY2, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0) { + if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } } else { if (packet->objectType == 7) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (packet->objectType == 8 && g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } if (created) { @@ -14795,7 +14795,7 @@ void CGameMode::ReceiveActorStateEntryNamedOld(const unsigned char* data) { const std::int64_t value = reinterpret_cast(&entry); actor->SendMsg(nullptr, AM_STANDENTRY, 0, static_cast(value), static_cast(value >> 32), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0) { + if (g_session.IsGuardianJob(packet->job) && g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14856,28 +14856,28 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { const ActorStateEntryOldPacket* packet = reinterpret_cast(data); ActorStandEntry entry; entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.state = packet->state; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; entry.guildVersion = packet->guildVersion; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; - entry.unknown_002C = packet->shield; + entry.honor = packet->honor; + entry.virtue = packet->virtue; + entry.shield = packet->shield; entry.aid = packet->aid; entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -14885,16 +14885,16 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(packet->aid)); if (actor) { - if (entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } actor->SendMsg(nullptr, AM_STANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } @@ -14904,32 +14904,32 @@ void CGameMode::ReceiveActorStateEntryOld(const unsigned char* data) { actor = new CPc; } else { if (g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } if (g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; + g_session.mercenaryAlive = 1; } actor = this->NewActor(packet->job); - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } - if (actor && entry.unknown_0024 == 0x2E) { - if (g_session.unknown_1010 == packet->aid) { - g_session.unknown_1038 = entry.unknown_0030; + if (actor && entry.head == 0x2E) { + if (g_session.petGid == packet->aid) { + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } this->scene->objects.push_back(actor); this->scene->actors.push_back(actor); if (actor) { actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (g_session.GetSceneUnknown004C() && entry.unknown_0024 != 0x2E && actor->unknown_0188 == 0 && + if (g_session.GetSceneUnknown004C() && entry.head != 0x2E && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } } @@ -14956,35 +14956,35 @@ void CGameMode::SpawnStandingActor( entry.aid = aid; entry.job = job; - entry.unknown_0008 = this->SubD07740(entry.job, sex); + entry.appearanceVariant = this->SubD07740(entry.job, sex); entry.speed = speed; - entry.unknown_001C = xSize; - entry.unknown_0020 = ySize; - entry.unknown_0024 = head; - entry.unknown_0028 = weapon; - entry.unknown_0030 = accessory; + entry.xSize = xSize; + entry.ySize = ySize; + entry.head = head; + entry.weapon = weapon; + entry.accessory = accessory; entry.effectState = healthState; entry.bodyState = bodyState; entry.stateFlags = effectState; - entry.unknown_0044 = pkMode; - entry.unknown_004C = accessory2; - entry.unknown_0050 = accessory3; - entry.unknown_0054 = headPalette; - entry.unknown_0058 = bodyPalette; - entry.unknown_005C = headDir; + entry.pkMode = pkMode; + entry.accessory2 = accessory2; + entry.accessory3 = accessory3; + entry.headPalette = headPalette; + entry.bodyPalette = bodyPalette; + entry.headDirection = headDir; entry.guildId = guildId; - entry.unknown_0068 = honor; - entry.unknown_006C = virtue; + entry.honor = honor; + entry.virtue = virtue; entry.robe = robe; - entry.unknown_002C = shield; + entry.shield = shield; entry.guildVersion = guildVersion; if (objectType == 0) { entry.state = 0; } else { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } - entry.unknown_0074 = gid; - entry.unknown_0078 = body; + entry.gid = gid; + entry.bodyCostume = body; entry.cellX = (posDir[0] << 2) | (posDir[1] >> 6); entry.direction = posDir[2] & 0x0F; entry.cellY = ((posDir[1] & 0x3F) << 4) | (posDir[2] >> 4); @@ -15007,18 +15007,18 @@ void CGameMode::SpawnStandingActor( return; } - created->unknown_0314 = objectType; + created->objectType = objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; if (objectType == 0) { - if (this->unknown_01B4.find(aid) != this->unknown_01B4.end() || this->unknown_01BC.find(aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(aid) != this->partyPosList.end() || this->guildPosList.find(aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { if (!((objectType == 1 || objectType == 6 || objectType == 5) && IsPlayerJob(job))) { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -15026,29 +15026,29 @@ void CGameMode::SpawnStandingActor( } std::int64_t bossFlag = 0; - if (isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = isBoss; + if (isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = isBoss; bossFlag = 1; } - actor->unknown_0210 = level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = font; + actor->characterLevel = level; + *reinterpret_cast(actor->render.fontSequenceBytes) = font; if (objectType == 7) { if (g_session.IsPetAid(aid)) { - g_session.unknown_1038 = entry.unknown_0030; + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030 && !actor->GetGdid()) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory && !actor->GetGdid()) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (objectType == 8 && g_session.IsHomunAid(aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -15149,9 +15149,9 @@ void CGameMode::ReceiveRefineBroadcast(const unsigned char* data) { std::string name(packet->name, 24); ITEM_INFO item; item.SetItemId(packet->itemId); - item.unknown_0060 = packet->refine; + item.refiningLevel = packet->refine; item.identified = 1; - item.unknown_0088 = packet->grade; + item.grade = packet->grade; ITEM_INFO material; material.SetItemId(packet->materialId); material.identified = 1; @@ -15236,34 +15236,34 @@ void CGameMode::SpawnStateActor( entry.aid = aid; entry.job = job; - entry.unknown_0008 = this->SubD07740(entry.job, sex); + entry.appearanceVariant = this->SubD07740(entry.job, sex); entry.speed = speed; - entry.unknown_001C = xSize; - entry.unknown_0020 = ySize; - entry.unknown_0024 = head; - entry.unknown_0028 = weapon; - entry.unknown_0030 = accessory; + entry.xSize = xSize; + entry.ySize = ySize; + entry.head = head; + entry.weapon = weapon; + entry.accessory = accessory; entry.effectState = healthState; entry.bodyState = bodyState; entry.stateFlags = effectState; - entry.unknown_0044 = pkMode; - entry.unknown_004C = accessory2; - entry.unknown_0050 = accessory3; - entry.unknown_0054 = headPalette; - entry.unknown_0058 = bodyPalette; - entry.unknown_005C = headDir; + entry.pkMode = pkMode; + entry.accessory2 = accessory2; + entry.accessory3 = accessory3; + entry.headPalette = headPalette; + entry.bodyPalette = bodyPalette; + entry.headDirection = headDir; entry.guildId = guildId; - entry.unknown_0068 = honor; - entry.unknown_006C = virtue; + entry.honor = honor; + entry.virtue = virtue; entry.robe = robe; - entry.unknown_002C = shield; + entry.shield = shield; entry.guildVersion = guildVersion; entry.state = state; if (objectType != 0) { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } - entry.unknown_0074 = gid; - entry.unknown_0078 = body; + entry.gid = gid; + entry.bodyCostume = body; entry.cellX = (posDir[0] << 2) | (posDir[1] >> 6); entry.direction = posDir[2] & 0x0F; entry.cellY = ((posDir[1] & 0x3F) << 4) | (posDir[2] >> 4); @@ -15286,20 +15286,20 @@ void CGameMode::SpawnStateActor( return; } - created->unknown_0314 = objectType; + created->objectType = objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; if (objectType == 0) { - if (this->unknown_01B4.find(aid) != this->unknown_01B4.end() || this->unknown_01BC.find(aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(aid) != this->partyPosList.end() || this->guildPosList.find(aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { if ((objectType == 1 || objectType == 6 || objectType == 12) && IsPlayerJob(job)) { - entry.unknown_0078 = job; + entry.bodyCostume = job; } else { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; } actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -15307,29 +15307,29 @@ void CGameMode::SpawnStateActor( } std::int64_t bossFlag = 0; - if (isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = isBoss; + if (isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = isBoss; bossFlag = 1; } - actor->unknown_0210 = level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = font; + actor->characterLevel = level; + *reinterpret_cast(actor->render.fontSequenceBytes) = font; if (objectType == 7) { if (g_session.IsPetAid(aid)) { - g_session.unknown_1038 = entry.unknown_0030; + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030 && !actor->GetGdid()) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory && !actor->GetGdid()) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (objectType == 8 && g_session.IsHomunAid(aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (objectType == 9 && g_session.IsMercenaryAid(aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, guildId, guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -15620,8 +15620,8 @@ namespace { void CGameMode::ReceiveRefineStatusGraded(const char* playerName, int itemId, unsigned char refine, unsigned char grade, bool success) { ITEM_INFO item; item.SetItemId(itemId); - item.unknown_0060 = refine; - item.unknown_0088 = grade; + item.refiningLevel = refine; + item.grade = grade; item.identified = 1; int job = 0; @@ -15632,7 +15632,7 @@ void CGameMode::ReceiveRefineStatusGraded(const char* playerName, int itemId, un thread_local EncryptedText function(functionSource); g_session.m_hotkeyScript->Call(function.Text(), signatureText, itemId, &job); if (job != 0) { - item.unknown_0000[0] = 0x15; + item.identity[0] = 0x15; } std::string itemName = item.DisplayName(1); @@ -15703,32 +15703,32 @@ void CGameMode::ReceiveActorStateEntryLegacy(const unsigned char* data) { } entry.job = packet->job; - entry.unknown_0008 = this->SubD07740(entry.job, packet->sex); + entry.appearanceVariant = this->SubD07740(entry.job, packet->sex); entry.speed = packet->speed; - entry.unknown_001C = packet->xSize; - entry.unknown_0020 = packet->ySize; - entry.unknown_0024 = packet->head; - entry.unknown_0028 = packet->weapon; - entry.unknown_0030 = packet->accessory; + entry.xSize = packet->xSize; + entry.ySize = packet->ySize; + entry.head = packet->head; + entry.weapon = packet->weapon; + entry.accessory = packet->accessory; entry.effectState = packet->healthState; entry.bodyState = packet->bodyState; entry.stateFlags = packet->effectState; - entry.unknown_002C = packet->shield; - entry.unknown_0044 = packet->pkMode; - entry.unknown_004C = packet->accessory2; - entry.unknown_0050 = packet->accessory3; - entry.unknown_0054 = packet->headPalette; - entry.unknown_0058 = packet->bodyPalette; - entry.unknown_005C = packet->headDir; + entry.shield = packet->shield; + entry.pkMode = packet->pkMode; + entry.accessory2 = packet->accessory2; + entry.accessory3 = packet->accessory3; + entry.headPalette = packet->headPalette; + entry.bodyPalette = packet->bodyPalette; + entry.headDirection = packet->headDir; entry.guildId = packet->guildId; - entry.unknown_0068 = packet->honor; - entry.unknown_006C = packet->virtue; + entry.honor = packet->honor; + entry.virtue = packet->virtue; entry.guildVersion = packet->guildVersion; entry.robe = packet->robe; entry.aid = packet->aid; entry.state = packet->state; if (packet->objectType != 0) { - entry.unknown_0048 = entry.guildVersion; + entry.shieldAppearance = entry.guildVersion; } entry.cellX = (packet->posDir[0] << 2) | (packet->posDir[1] >> 6); entry.direction = packet->posDir[2] & 0x0F; @@ -15752,46 +15752,46 @@ void CGameMode::ReceiveActorStateEntryLegacy(const unsigned char* data) { return; } - created->unknown_0314 = packet->objectType; + created->objectType = packet->objectType; this->scene->objects.push_back(created); this->scene->actors.push_back(created); actor = created; if (packet->objectType == 0) { - if (this->unknown_01B4.find(packet->aid) != this->unknown_01B4.end() || this->unknown_01BC.find(packet->aid) != this->unknown_01BC.end()) { + if (this->partyPosList.find(packet->aid) != this->partyPosList.end() || this->guildPosList.find(packet->aid) != this->guildPosList.end()) { actor->SetUnknown02E4(1); } actor->SendMsg(nullptr, AM_INITSTANDENTRY2, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { - entry.unknown_0008 = 0; + entry.appearanceVariant = 0; actor->SendMsg(nullptr, AM_INITSTANDENTRY, 0, reinterpret_cast(&entry), reinterpret_cast(&entry) >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } g_championMonsterMgr->ApplyEffects(entry.job, actor, entry.aid); } std::int64_t bossFlag = 0; - if (packet->isBoss && actor->unknown_0304 == 0) { - actor->unknown_0304 = packet->isBoss; + if (packet->isBoss && actor->hpGaugeFlags == 0) { + actor->hpGaugeFlags = packet->isBoss; bossFlag = 1; } - actor->unknown_0210 = packet->level; - *reinterpret_cast(actor->render.unknown_00FCBytes) = packet->font; + actor->characterLevel = packet->level; + *reinterpret_cast(actor->render.fontSequenceBytes) = packet->font; if (packet->objectType == 7) { if (g_session.IsPetAid(packet->aid)) { - g_session.unknown_1038 = entry.unknown_0030; + g_session.petAccessory = entry.accessory; } - if (entry.unknown_0030 && !actor->GetGdid()) { - actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.unknown_0030)); + if (entry.accessory && !actor->GetGdid()) { + actor->SetActionName(ResourceMgr::Instance(), g_session.GetPetAccActName(entry.accessory)); } } else if (packet->objectType == 8 && g_session.IsHomunAid(packet->aid)) { - g_session.unknown_5614 = 1; + g_session.homunAlive = 1; } else if (packet->objectType == 9 && g_session.IsMercenaryAid(packet->aid)) { - g_session.unknown_56B0 = 1; - } else if (g_session.GetSceneUnknown004C() && actor->unknown_0188 == 0 && + g_session.mercenaryAlive = 1; + } else if (g_session.GetSceneUnknown004C() && actor->sceneNameWindow == 0 && (g_session.IsPlayerJobId(actor->GetEffectiveJob(-1)) || g_session.IsGuardianJob(actor->GetEffectiveJob(-1)))) { this->ShowGuildEmblem(actor, packet->guildId, packet->guildVersion); } - switch (actor->unknown_0314) { + switch (actor->objectType) { case PC_TYPE: case NPC_MOB_TYPE: case NPC_HO_TYPE: @@ -15867,7 +15867,7 @@ void CGameMode::ReceivePartyMemberInfo(const unsigned char* data) { std::string masked; g_forbiddenWords.Mask(partyName, &masked); } - g_session.unknown_54C4 = partyName; + g_session.partyName = partyName; char map[17]; map[16] = '\0'; @@ -15881,7 +15881,7 @@ void CGameMode::ReceivePartyMemberInfo(const unsigned char* data) { if (member.accountId == g_session.m_aid) { if (member.leader == 0) { - g_session.unknown_5464 = 1; + g_session.partyLeader = 1; } } else if (member.offline == 1) { this->SendMsg(MM_DELETEPARTYPOS, member.accountId, 0, 0, 0); @@ -15915,7 +15915,7 @@ void CGameMode::ReceivePartyMemberList(const unsigned char* data) { std::string masked; g_forbiddenWords.Mask(partyName, &masked); } - g_session.unknown_54C4 = partyName; + g_session.partyName = partyName; if (packet->length != 0x1C) { const int count = (packet->length - 0x1C) / 0x2E; @@ -15936,7 +15936,7 @@ void CGameMode::ReceivePartyMemberList(const unsigned char* data) { member.offline = entry.offline; g_session.AddPartyMember(member); if (member.accountId == g_session.m_aid && member.leader == 0) { - g_session.unknown_5464 = 1; + g_session.partyLeader = 1; } } RefreshPartyWindows(&g_session); @@ -15954,7 +15954,7 @@ void CGameMode::SetPartyMemberList(const char* value, std::vectorSendMsg(MM_DELETEPARTYPOS, accountId, 0, 0, 0); @@ -16032,8 +16032,8 @@ void CGameMode::UpdatePartyMemberInfo( this->SetActorUnknown02E4(accountId, sameMap); } - g_session.unknown_54A8 = itemDistribute != 0; - g_session.unknown_54A4 = itemShare != 0; + g_session.partyItemDistribute = itemDistribute != 0; + g_session.partyItemCollect = itemShare != 0; g_session.PartyCount(); g_session.AddPartyMember(member); g_windowMgr.NotifyMemberWindows(&member); @@ -16805,7 +16805,7 @@ void LaunchSkillActorEffect(CGameActor* actor, short x, short y, std::uint16_t s } effect = g_effectMgr->Spawn(actor->render.accountId, 0x81D, origin.x, origin.y, origin.z, 0, -1, 0, 0); if (effect) { - effect->unknown_002C = delay; + effect->effectLifetime = delay; } return; case TR_MUSICAL_INTERLUDE: @@ -16871,7 +16871,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t int effectId; int motion; g_session.GetSkillActionInfo2(skillId, effectId, motion); - if (source->render.unknown_0070 != 1 && motion == 1) { + if (source->render.state != 1 && motion == 1) { source->SetState(7, motion); } else { if (motion == 2 || motion == 9) { @@ -16913,7 +16913,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_0); } g_session.ClearHomunStatus(); - g_session.unknown_5614 = 0; + g_session.homunAlive = 0; } break; case NPC_RANDOMBREAK: @@ -17065,9 +17065,9 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (source != nullptr) { if (CRenderObject* skill = this->scene->GetSkillByAID(targetAid)) { static_cast(skill)->LaunchEffect(0x6F, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); - if (source->unknown_037C[0] != 0) { + if (source->statusEffects[0] != 0) { const int address = reinterpret_cast(&skill->render.position); - reinterpret_cast(source->unknown_037C[0])->SendMsg(nullptr, AM_REQ_ATTACK, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + reinterpret_cast(source->statusEffects[0])->SendMsg(nullptr, AM_REQ_ATTACK, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } } @@ -20005,7 +20005,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (target != nullptr) { g_effectMgr->Spawn(target->render.accountId, 0x7DD, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } - CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->unknown_02EC); + CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->emblemVersion); if (summoner != nullptr) { g_effectMgr->Spawn(summoner->render.accountId, 0x7DD, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -20023,7 +20023,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (target != nullptr) { g_effectMgr->Spawn(target->render.accountId, 0x7E8, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } - CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->unknown_02EC); + CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->emblemVersion); if (summoner != nullptr) { g_effectMgr->Spawn(summoner->render.accountId, 0x7E8, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -20041,7 +20041,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (target != nullptr) { g_effectMgr->Spawn(target->render.accountId, 0x7F8, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } - CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->unknown_02EC); + CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->emblemVersion); if (summoner != nullptr) { g_effectMgr->Spawn(summoner->render.accountId, 0x7F8, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -20053,7 +20053,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (target != nullptr) { g_effectMgr->Spawn(target->render.accountId, 0x837, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } - CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->unknown_02EC); + CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->emblemVersion); if (summoner != nullptr) { g_effectMgr->Spawn(summoner->render.accountId, 0x837, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -20071,7 +20071,7 @@ void CGameMode::ReceiveSkillUse(std::uint16_t skillId, int level, std::uint32_t if (target != nullptr) { g_effectMgr->Spawn(target->render.accountId, 0x83C, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); } - CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->unknown_02EC); + CRenderObject* summoner = this->scene->GetGameActorByAidIncludeMe(target->emblemVersion); if (summoner != nullptr) { g_effectMgr->Spawn(summoner->render.accountId, 0x83C, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -20128,10 +20128,10 @@ void CGameMode::HandleCameraInfo(const unsigned char* data) { if (window == nullptr) { window = g_windowMgr.EnsureWindow(WID_VIEWCAMERAINFOWND); } - g_session.unknown_61B1 = g_session.unknown_61B1 == 0; + g_session.showCameraInfo = g_session.showCameraInfo == 0; g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_session.unknown_61B1 == 1 ? "Camera Info On" : "Camera Info Off"), 0x64FFFF, 0, 0, 0); - window->Show(g_session.unknown_61B1); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_session.showCameraInfo == 1 ? "Camera Info On" : "Camera Info Off"), 0x64FFFF, 0, 0, 0); + window->Show(g_session.showCameraInfo); } else if (this->camera != nullptr) { this->camera->camera.desiredDistance = packet->distance; this->camera->camera.desiredYaw = packet->yaw; @@ -21573,14 +21573,14 @@ void CGameMode::ProcessIncomingPackets() { } const std::uint32_t serverTime = *reinterpret_cast(g_gameModePacketBuffer + 2); - if (this->unknown_0454 == 0) { + if (this->serverTimeSyncCount == 0) { g_session.SetServerTime(serverTime); } else { g_session.SyncServerTime(serverTime); } - ++this->unknown_0454; - *reinterpret_cast(&this->unknown_026E[0x02]) = 1; - g_session.AddPingSample(timeGetTime() - *reinterpret_cast(&this->unknown_026E[0x06])); + ++this->serverTimeSyncCount; + *reinterpret_cast(&this->requestTimers[0x02]) = 1; + g_session.AddPingSample(timeGetTime() - *reinterpret_cast(&this->requestTimers[0x06])); break; } case ID_ZC_NOTIFY_MOVE: { @@ -21628,8 +21628,8 @@ void CGameMode::ProcessIncomingPackets() { act.targetId = packet->targetAid; act.tick = packet->tick; act.count = packet->count; - act.unknown_001C = packet->attackMT; - act.unknown_0020 = packet->attackedMT; + act.attackMotion = packet->attackMT; + act.damageMotion = packet->attackedMT; act.damage2 = 0; act.attackMT = 432; act.attackedMT = 288; @@ -21647,13 +21647,13 @@ void CGameMode::ProcessIncomingPackets() { break; } case 0x93: - this->unknown_0244 = 0; + this->noMove = 0; break; case reqName: { const ActorNamePacket *packet = reinterpret_cast(g_gameModePacketBuffer); this->nameCard.SetName(packet->aid, std::string(packet->name, sizeof(packet->name)).c_str()); - if (packet->aid == g_session.unknown_1010) { - sprintf(g_session.unknown_1018, packet->name); + if (packet->aid == g_session.petGid) { + sprintf(g_session.petName, packet->name); if (UIPetInfoWnd *window = static_cast(g_windowMgr.window_038C)) { window->nameEdit->SetText(packet->name); } @@ -21698,7 +21698,7 @@ void CGameMode::ProcessIncomingPackets() { if (!item) { item = new CItem; this->scene->objects.push_back(item); - this->scene->unknown_0018.push_back(item); + this->scene->items.push_back(item); } const int entryAddress = reinterpret_cast(&entry); @@ -21717,16 +21717,16 @@ void CGameMode::ProcessIncomingPackets() { const NormalItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; - std::memset(item.unknown_001C, 0, sizeof(item.unknown_001C)); + std::memset(item.cards, 0, sizeof(item.cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.UpdateInventoryItem(item, 0); } RefreshItemWindows(&g_windowMgr); @@ -21739,21 +21739,21 @@ void CGameMode::ProcessIncomingPackets() { const EquipItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->damaged; - item.unknown_0060 = record->refine; - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + item.damaged = record->damaged; + item.refiningLevel = record->refine; + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { @@ -21770,16 +21770,16 @@ void CGameMode::ProcessIncomingPackets() { const NormalItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; - std::memset(item.unknown_001C, 0, sizeof(item.unknown_001C)); + std::memset(item.cards, 0, sizeof(item.cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); @@ -21791,16 +21791,16 @@ void CGameMode::ProcessIncomingPackets() { const EquipItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->damaged; - item.unknown_0060 = record->refine; + item.damaged = record->damaged; + item.refiningLevel = record->refine; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); @@ -21810,19 +21810,19 @@ void CGameMode::ProcessIncomingPackets() { const ItemUseAckPacket *packet = reinterpret_cast(g_gameModePacketBuffer); if (packet->result) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, packet->index); - if (item.unknown_0000[1]) { + if (item.identity[1]) { g_session.RemoveItem1710(packet->index, item.quantity - packet->amount); if (item.IsAboveItemId600()) { this->scene->player->SendMsg(nullptr, AM_USEITEM_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } } - this->unknown_02CC = 0; + this->waitingUseItemAck = 0; break; } case ID_ZC_REQ_WEAR_EQUIP_ACK_00aa: { const unsigned char *packet = g_gameModePacketBuffer; - *reinterpret_cast(&this->unknown_0100[0x04]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; switch (packet[8]) { case ACK_REQ_EQUIP_FAILURE: case ACK_REQ_EQUIP_FAILURE_LEVEL: @@ -21830,9 +21830,9 @@ void CGameMode::ProcessIncomingPackets() { break; case ACK_REQ_EQUIP_SUCCESS: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(packet + 2)); - if (item.unknown_0000[1]) { - item.unknown_0070 = *reinterpret_cast(packet + 6); - item.unknown_0000[3] = *reinterpret_cast(packet + 4); + if (item.identity[1]) { + item.sprite = *reinterpret_cast(packet + 6); + item.identity[3] = *reinterpret_cast(packet + 4); g_session.OnItemEquipped(item); } break; @@ -21842,7 +21842,7 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_REQ_TAKEOFF_EQUIP_ACK_00ac: { const unsigned char *packet = g_gameModePacketBuffer; - *reinterpret_cast(&this->unknown_0100[0x08]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x08]) = timeGetTime() - 2000; const std::uint16_t location = *reinterpret_cast(packet + 4); if (packet[6] && location) { if (g_session.IsCostumeLocation(location)) { @@ -21855,26 +21855,26 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_ITEM_THROW_ACK: { const unsigned char *packet = g_gameModePacketBuffer; - if (*reinterpret_cast(&this->unknown_0100[0x14])) { - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + if (*reinterpret_cast(&this->equipmentRequestState[0x14])) { + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); } const std::uint16_t index = *reinterpret_cast(packet + 2); const std::int16_t amount = *reinterpret_cast(packet + 4); ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - if (item.unknown_0000[1] && amount > 0) { + if (item.identity[1] && amount > 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_DROP_ITEM), item.DisplayName(0).c_str(), amount).c_str()), 0xFFFF00, 6, 0, 0); } g_session.RemoveItem1710(index, amount); - *reinterpret_cast(this->unknown_02D0) = 0; + *reinterpret_cast(this->waitingItemThrowAck) = 0; break; } case ID_ZC_RESTART_ACK: g_navigationManager.Reset(true); g_navigationManager.ClearData(); - g_navigationManager.unknown_125C = 0; + g_navigationManager.displayMode = 0; g_clanInfo->Clear(); if (g_gameModePacketBuffer[2] == 1) { g_timeScheduler->RemoveSchedulesByKey(6); @@ -21887,8 +21887,8 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_SAY_DIALOG: { const unsigned char *packet = g_gameModePacketBuffer; - this->unknown_024C = 1; - this->unknown_02DC = *reinterpret_cast(packet + 4); + this->isOnQuest = 1; + this->lastNaid = *reinterpret_cast(packet + 4); unsigned int length = *reinterpret_cast(packet + 2) - 8; UIWindow *window = g_windowMgr.EnsureWindow(WID_SAYDIALOGWND); char text[0x803]; @@ -21904,8 +21904,8 @@ void CGameMode::ProcessIncomingPackets() { break; } case ID_ZC_WAIT_DIALOG: - this->unknown_024C = 1; - this->unknown_02DC = *reinterpret_cast(g_gameModePacketBuffer + 2); + this->isOnQuest = 1; + this->lastNaid = *reinterpret_cast(g_gameModePacketBuffer + 2); g_windowMgr.EnsureWindow(WID_SAYDIALOGWND)->SendMsg(nullptr, UM_ENABLENEXTBUTTON, 0, 0, 0, 0); break; case ID_ZC_EMOTION: { @@ -21935,7 +21935,7 @@ void CGameMode::ProcessIncomingPackets() { break; } case ID_ZC_SELECT_DEALTYPE: - this->unknown_024C = 1; + this->isOnQuest = 1; g_windowMgr.EnsureWindow(WID_CHOOSESELLBUYWND)->SendMsg(nullptr, UM_SETNAID, *reinterpret_cast(g_gameModePacketBuffer + 2), 0, 0, 0); g_windowMgr.CloseWindow(WID_ITEMSHOPWND); g_windowMgr.CloseWindow(WID_ITEMPURCHASEWND); @@ -21949,9 +21949,9 @@ void CGameMode::ProcessIncomingPackets() { const ShopItemRecord record = records[i]; RawItemBasic item = {}; _itoa(record.itemId, item.itemId, 10); - item.unknown_0004 = record.price; - item.unknown_0008 = record.discountPrice; - item.unknown_000C = record.type; + item.price = record.price; + item.realPrice = record.discountPrice; + item.type = record.type; item.id = -1; item.identified = 1; g_session.AddItem1718(item, 0); @@ -22029,14 +22029,14 @@ void CGameMode::ProcessIncomingPackets() { break; } case ID_ZC_ACK_CREATE_CHATROOM: - this->unknown_00FC = 0; + this->isWaitingEnterRoom = 0; switch (g_gameModePacketBuffer[2]) { case ENTERROOM_FULL: { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ROOM_IS_MADE)), 0xFFFF00, 0, 0, 0); UIWindow *window = g_windowMgr.EnsureWindow(WID_CHATROOMWND); - this->unknown_03FC = 1; - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&this->unknown_03C8), 0, 0, 0); + this->chatRoomMemberCount = 1; + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&this->chatRoomTitle), 0, 0, 0); window->SendMsg(nullptr, UM_CLEARMEMBER, 0, 0, 0, 0); window->SendMsg(nullptr, UM_ADDMEMBER, reinterpret_cast(g_session.DecodePlayerName()), 0, 0, 0); break; @@ -22053,7 +22053,7 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_DESTROY_ROOM: { const std::uint32_t roomId = *reinterpret_cast(g_gameModePacketBuffer + 2); - if (CRenderObject *actor = this->scene->GetGameActorByAID(this->unknown_01AC[roomId])) { + if (CRenderObject *actor = this->scene->GetGameActorByAID(this->chatRoomActorIds[roomId])) { actor->SendMsg(nullptr, AM_DELETE_CHAT_TITLE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (g_windowMgr.window_027C && static_cast(g_windowMgr.window_027C)->roomStatus.roomId == static_cast(roomId)) { @@ -22068,7 +22068,7 @@ void CGameMode::ProcessIncomingPackets() { name[24] = '\0'; g_session.DecodePlayerName(); UIChatRoomWnd *window = static_cast(g_windowMgr.EnsureWindow(WID_CHATROOMWND)); - ChatRoomMemberUpdateInfo info{window->title, window->unknown_00CC, window->roomStatus.roomType, window->roomStatus.memberCount, + ChatRoomMemberUpdateInfo info{window->title, window->roomSettingsText, window->roomStatus.roomType, window->roomStatus.memberCount, window->roomStatus.memberLimit, window->roomStatus.roomId}; info.memberCount = *reinterpret_cast(g_gameModePacketBuffer + 2); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&info), 0, 0, 0); @@ -22089,7 +22089,7 @@ void CGameMode::ProcessIncomingPackets() { } UIChatRoomWnd *window = static_cast(g_windowMgr.EnsureWindow(WID_CHATROOMWND)); - ChatRoomMemberUpdateInfo info{window->title, window->unknown_00CC, window->roomStatus.roomType, window->roomStatus.memberCount, + ChatRoomMemberUpdateInfo info{window->title, window->roomSettingsText, window->roomStatus.roomType, window->roomStatus.memberCount, window->roomStatus.memberLimit, window->roomStatus.roomId}; info.memberCount = *reinterpret_cast(g_gameModePacketBuffer + 2); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&info), 0, 0, 0); @@ -22141,11 +22141,11 @@ void CGameMode::ProcessIncomingPackets() { } break; case ID_ZC_CANCEL_EXCHANGE_ITEM: - *reinterpret_cast(&this->unknown_0100[0x00]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x00]) = 0; this->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_EXCHANGEUI); g_windowMgr.CloseWindow(WID_EXCHANGEACCEPTWND); - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_DEAL_IS_CANCELED)), 0xFF, 0, 0, 0); @@ -22159,14 +22159,14 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_DEAL_SUCCESS)), 0xFFFF00, 0, 0, 0); break; case EXITEM_EXCHANGE_FAILED: - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_DEAL_FAILED)), 0xFF, 0, 0, 0); break; } break; case ID_ZC_EXCHANGEITEM_UNDO: - *reinterpret_cast(&this->unknown_0100[0x14]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x14]) = 0; g_session.ResetSlots(); break; case ID_ZC_NOTIFY_STOREITEM_COUNTINFO: @@ -22175,10 +22175,10 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_DELETE_ITEM_FROM_STORE: { ITEM_INFO item; - item.unknown_0000[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); + item.identity[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); item.quantity = *reinterpret_cast(g_gameModePacketBuffer + 4); g_session.RemoveItem1738(item); - this->unknown_05CE = 1; + this->inventoryChanged = 1; break; } case ID_ZC_CLOSE_STORE: @@ -22212,20 +22212,20 @@ void CGameMode::ProcessIncomingPackets() { std::string masked(""); g_forbiddenWords.Mask(name, &masked); } - g_session.unknown_54C4.assign(name, strlen(name)); + g_session.partyName.assign(name, strlen(name)); g_windowMgr.EnsureWindow(WID_JOINPARTYACCEPTWND)->SendMsg(nullptr, UM_SET_JOIN_PARTY_MSG, *reinterpret_cast(g_gameModePacketBuffer + 2), reinterpret_cast(name), 0, 0); break; } case ID_ZC_GROUPINFO_CHANGE: { char text[128]; - g_session.unknown_54A0 = *reinterpret_cast(g_gameModePacketBuffer + 2); - if (g_windowMgr.unknown_030C) { - g_windowMgr.unknown_030C->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + g_session.partyExpShare = *reinterpret_cast(g_gameModePacketBuffer + 2); + if (g_windowMgr.partySettingWnd) { + g_windowMgr.partySettingWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - if (g_session.unknown_54A0 == 0 || g_session.unknown_54A0 == 1) { - sprintf(text, "%s - %s : %s", LookupMessage(MSI_PARTYSETTING), LookupMessage(MSI_HOWEXPDIV), LookupMessage(g_session.unknown_54A0 == 0 ? 287 : 288)); - } else if (g_session.unknown_54A0 == 2) { + if (g_session.partyExpShare == 0 || g_session.partyExpShare == 1) { + sprintf(text, "%s - %s : %s", LookupMessage(MSI_PARTYSETTING), LookupMessage(MSI_HOWEXPDIV), LookupMessage(g_session.partyExpShare == 0 ? 287 : 288)); + } else if (g_session.partyExpShare == 2) { StringFormat(text, 128, static_cast(-1), LookupMessage(MSI_PARTYSETTING_CHANGE_IMPOSSIBLE), LookupMessage(MSI_HOWEXPDIV), LookupMessage(MSI_EXPDIV2)); } else { break; @@ -22261,7 +22261,7 @@ void CGameMode::ProcessIncomingPackets() { itemId[24] = 0; ITEM_INFO item; item.itemId.assign(itemId, strlen(itemId)); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 0; g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); const char *suffix = LookupMessage(MSI_YOU_RECEIVE_MVP_ITEM2); @@ -22331,13 +22331,13 @@ void CGameMode::ProcessIncomingPackets() { CRenderObject *actor; if (aid == g_session.m_aid) { actor = this->scene->player; - *reinterpret_cast(&g_session.unknown_0F0C[0x00]) = state[0]; - *reinterpret_cast(&g_session.unknown_0F0C[0x04]) = state[2]; + *reinterpret_cast(&g_session.statusLevelEffects[0x00]) = state[0]; + *reinterpret_cast(&g_session.statusLevelEffects[0x04]) = state[2]; g_session.m_jobFlags = state[1]; - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (g_session.unknown_5C1C <= 0) { + if (g_session.replayPacketMode <= 0) { g_session.ClearItems1740(); g_windowMgr.CloseWindow(WID_MERCHANTITEMWND); } @@ -22409,8 +22409,8 @@ void CGameMode::ProcessIncomingPackets() { g_session.cartMaxCount = *reinterpret_cast(packet + 4); g_session.cartWeight = *reinterpret_cast(packet + 6) / 10; g_session.cartMaxWeight = *reinterpret_cast(packet + 0x0A) / 10; - if (g_windowMgr.unknown_02F4) { - g_windowMgr.unknown_02F4->SendMsg(nullptr, UM_SETCOUNTINFO, 0, 0, 0, 0); + if (g_windowMgr.merchantItemWnd) { + g_windowMgr.merchantItemWnd->SendMsg(nullptr, UM_SETCOUNTINFO, 0, 0, 0, 0); } break; } @@ -22419,16 +22419,16 @@ void CGameMode::ProcessIncomingPackets() { const EquipItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = record->damaged; - item.unknown_0060 = record->refine; + item.damaged = record->damaged; + item.refiningLevel = record->refine; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -22439,16 +22439,16 @@ void CGameMode::ProcessIncomingPackets() { const NormalItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; - std::memset(item.unknown_001C, 0, sizeof(item.unknown_001C)); + std::memset(item.cards, 0, sizeof(item.cards)); item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -22457,22 +22457,22 @@ void CGameMode::ProcessIncomingPackets() { case ID_ZC_ADD_ITEM_TO_CART_0124: { const unsigned char *packet = g_gameModePacketBuffer; ITEM_INFO item; - item.unknown_0000[1] = *reinterpret_cast(packet + 2); + item.identity[1] = *reinterpret_cast(packet + 2); item.quantity = *reinterpret_cast(packet + 4); item.SetItemId(*reinterpret_cast(packet + 8)); item.identified = packet[0x0C]; - item.unknown_005D = packet[0x0D]; - item.unknown_0060 = packet[0x0E]; - std::memcpy(item.unknown_001C, packet + 0x0F, sizeof(item.unknown_001C)); + item.damaged = packet[0x0D]; + item.refiningLevel = packet[0x0E]; + std::memcpy(item.cards, packet + 0x0F, sizeof(item.cards)); g_session.AddItem1740(item); break; } case ID_ZC_DELETE_ITEM_FROM_CART: { ITEM_INFO item; - item.unknown_0000[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); + item.identity[1] = *reinterpret_cast(g_gameModePacketBuffer + 2); item.quantity = *reinterpret_cast(g_gameModePacketBuffer + 4); g_session.RemoveItem1740(item); - this->unknown_05CE = 1; + this->inventoryChanged = 1; break; } case ID_ZC_CARTOFF: @@ -22535,7 +22535,7 @@ void CGameMode::ProcessIncomingPackets() { case ID_ZC_ATTACK_FAILURE_FOR_DISTANCE: { const unsigned char *packet = g_gameModePacketBuffer; const std::uint32_t aid = *reinterpret_cast(packet + 2); - g_session.unknown_0F4C = *reinterpret_cast(packet + 0x0E); + g_session.storeItemLimit = *reinterpret_cast(packet + 0x0E); if (CRenderObject *actor = this->scene->GetGameActorByAID(aid)) { const int x = *reinterpret_cast(packet + 6); const int y = *reinterpret_cast(packet + 8); @@ -22548,10 +22548,10 @@ void CGameMode::ProcessIncomingPackets() { break; } case ID_ZC_ATTACK_RANGE: - g_session.unknown_0F4C = *reinterpret_cast(g_gameModePacketBuffer + 2); + g_session.storeItemLimit = *reinterpret_cast(g_gameModePacketBuffer + 2); break; case ID_ZC_EQUIP_ARROW: - if (*reinterpret_cast(g_gameModePacketBuffer + 2) == 0 && g_session.unknown_16EC) { + if (*reinterpret_cast(g_gameModePacketBuffer + 2) == 0 && g_session.equippedArrowIndex) { const int location = 0x8000; EquipmentProperties::CEquipmentPropertiesMgr *properties = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); const int index = GetEquipLocationIndex(location); @@ -22561,7 +22561,7 @@ void CGameMode::ProcessIncomingPackets() { } } g_session.SetUnknown16EC(*reinterpret_cast(g_gameModePacketBuffer + 2)); - *reinterpret_cast(&this->unknown_0100[0x04]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; break; case ID_ZC_RECOVERY_013d: this->ReceiveHpSpRecovery(g_gameModePacketBuffer, 0); @@ -22584,11 +22584,11 @@ void CGameMode::ProcessIncomingPackets() { this->RemoveMiniMapPing(id); break; } - this->unknown_01C4[id].x = *reinterpret_cast(packet + 0x0A); - this->unknown_01C4[id].y = *reinterpret_cast(packet + 0x0E); - this->unknown_01C4[id].color = *reinterpret_cast(packet + 0x13) | 0xFF000000; - this->unknown_01C4[id].persistent = type; - this->unknown_01C4[id].tick = timeGetTime(); + this->compassPosList[id].x = *reinterpret_cast(packet + 0x0A); + this->compassPosList[id].y = *reinterpret_cast(packet + 0x0E); + this->compassPosList[id].color = *reinterpret_cast(packet + 0x13) | 0xFF000000; + this->compassPosList[id].persistent = type; + this->compassPosList[id].tick = timeGetTime(); break; } case ID_ZC_SHOW_IMAGE_0145: { @@ -22606,13 +22606,13 @@ void CGameMode::ProcessIncomingPackets() { const unsigned char *packet = g_gameModePacketBuffer; CSkillInfo skill; skill.level = *reinterpret_cast(packet + 8); - skill.unknown_000C = *reinterpret_cast(packet + 4); + skill.type = *reinterpret_cast(packet + 4); skill.id = *reinterpret_cast(packet + 2); - skill.unknown_0018 = packet[0x26]; + skill.upgradable = packet[0x26]; skill.name = skill.IdName(*g_session.m_hotkeyScript); - skill.unknown_0014 = *reinterpret_cast(packet + 0x0A); - skill.unknown_001C = *reinterpret_cast(packet + 0x0C); - skill.unknown_0034 = skill.UseApAmount(*g_session.m_hotkeyScript, *reinterpret_cast(packet + 8)); + skill.spCost = *reinterpret_cast(packet + 0x0A); + skill.range = *reinterpret_cast(packet + 0x0C); + skill.apCost = skill.UseApAmount(*g_session.m_hotkeyScript, *reinterpret_cast(packet + 8)); g_session.m_skillBundle.UpdatePending(skill); this->SendMsg(MM_USING_SKILL, reinterpret_cast(&skill), skill.level, 1, -1); break; @@ -22624,8 +22624,8 @@ void CGameMode::ProcessIncomingPackets() { } if (aid == g_session.m_aid) { this->scene->player->SendMsg(nullptr, AM_RESURRECTION, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_024C = 0; - this->unknown_0250 = 0; + this->isOnQuest = 0; + this->isPlayerDead = 0; } MessengerMember member = g_session.PartyByAccount(aid); if (member.valid != 0) { @@ -22659,7 +22659,7 @@ void CGameMode::ProcessIncomingPackets() { break; } case ID_ZC_ACK_GUILD_MENUINTERFACE: - g_guildInfo.unknown_00A4 = *reinterpret_cast(g_gameModePacketBuffer + 2); + g_guildInfo.guildTabBitmask = *reinterpret_cast(g_gameModePacketBuffer + 2); break; case ID_ZC_GUILD_EMBLEM_IMG_0152: { const unsigned char *packet = g_gameModePacketBuffer; @@ -22774,17 +22774,17 @@ void CGameMode::ProcessIncomingPackets() { const unsigned char *packet = g_gameModePacketBuffer; const int flags = *reinterpret_cast(packet + 0x0A); const std::uint32_t guildId = *reinterpret_cast(packet + 2); - g_guildInfo.unknown_00AC = flags & 1; + g_guildInfo.canInvite = flags & 1; g_guildInfo.m_guildId = guildId; - g_guildInfo.unknown_00B0 = (flags >> 4) & 1; - g_guildInfo.unknown_00B4 = packet[0x0E]; + g_guildInfo.canExpel = (flags >> 4) & 1; + g_guildInfo.isMaster = packet[0x0E]; this->scene->player->SetGuildInfo(guildId, *reinterpret_cast(packet + 6)); - if (g_guildInfo.unknown_00C8 == 0) { - g_guildInfo.unknown_00C8 = 1; + if (g_guildInfo.skillsRequested == 0) { + g_guildInfo.skillsRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 3, 0, 0, 0); } - if (g_guildInfo.unknown_00C0 == 0) { - g_guildInfo.unknown_00C0 = 1; + if (g_guildInfo.membersRequested == 0) { + g_guildInfo.membersRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 1, 0, 0, 0); } break; @@ -22842,8 +22842,8 @@ void CGameMode::ProcessIncomingPackets() { const std::int16_t *index = reinterpret_cast(g_gameModePacketBuffer + 4); for (; count != 0; --count, ++index) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *index); - if (item.unknown_0000[1]) { - window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.unknown_0000[1], 0, 0); + if (item.identity[1]) { + window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.identity[1], 0, 0); } } window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -22867,12 +22867,12 @@ void CGameMode::ProcessIncomingPackets() { unsigned int count = (*reinterpret_cast(g_gameModePacketBuffer + 2) - 4u) >> 1; UIWindow *window = g_windowMgr.EnsureWindow(WID_ITEMCOMPOSITIONWND); window->SendMsg(nullptr, UM_CLEAR_ITEM, 0, 0, 0, 0); - window->SendMsg(nullptr, UM_SET_CARD_ITEM_INDEX, *reinterpret_cast(this->unknown_045C), 0, 0, 0); + window->SendMsg(nullptr, UM_SET_CARD_ITEM_INDEX, *reinterpret_cast(this->cardAndSkillBalloonIds), 0, 0, 0); const std::int16_t *index = reinterpret_cast(g_gameModePacketBuffer + 4); for (; count != 0; --count, ++index) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *index); - if (item.unknown_0000[1]) { - window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.unknown_0000[1], 0, 0); + if (item.identity[1]) { + window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.identity[1], 0, 0); } } window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -22895,7 +22895,7 @@ void CGameMode::ProcessIncomingPackets() { } break; case ID_ZC_DELETE_RELATED_GUILD: - if (g_guildInfo.unknown_00BC) { + if (g_guildInfo.infoRequested) { g_guildInfo.RemoveRelatedGuild(*reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 6)); } break; @@ -22914,7 +22914,7 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY2, reinterpret_cast(LookupMessage(MSI_IMPOSSIBLE_SKILL_AREA)), 0xFFFF00, 0, 0, 0); break; case IMPOSSIBLE_AREA_USEITEM: - this->unknown_02CC = 0; + this->waitingUseItemAck = 0; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_IMPOSSIBLE_USEITEM_AREA)), 0xFFFF00, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY2, reinterpret_cast(LookupMessage(MSI_IMPOSSIBLE_USEITEM_AREA)), 0xFFFF00, 0, 0, 0); break; @@ -22971,17 +22971,17 @@ void CGameMode::ProcessIncomingPackets() { std::string(reinterpret_cast(g_gameModePacketBuffer + 6), reinterpret_cast(g_gameModePacketBuffer + 0x1E)).c_str()); break; case ID_ZC_NOTIFY_MAPPROPERTY: - g_serviceOptions.Set(229, *reinterpret_cast(g_session.unknown_5454) != 0); + g_serviceOptions.Set(229, *reinterpret_cast(g_session.interactionFlags) != 0); switch (*reinterpret_cast(g_gameModePacketBuffer + 2)) { case MAPPROPERTY_FREEPVPZONE: case MAPPROPERTY_PVPSERVERZONE: - this->scene->unknown_0048 = 1; + this->scene->isPKZone = 1; break; case MAPPROPERTY_EVENTPVPZONE: - this->scene->unknown_0054 = 1; + this->scene->isEventPVPMode = 1; break; case MAPPROPERTY_AGITZONE: - this->scene->unknown_004C = 1; + this->scene->isSiegeMode = 1; g_serviceOptions.Set(229, 1); break; case MAPPROPERTY_PKSERVERZONE: @@ -22997,34 +22997,34 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_PROPERTY_PET: { unsigned char *packet = g_gameModePacketBuffer; - g_session.unknown_103C = *reinterpret_cast(packet + 0x23); + g_session.petJob = *reinterpret_cast(packet + 0x23); std::int16_t &value = *reinterpret_cast(packet + 0x1B); if (value >= 10000) { value -= 10000; if (UIItemCollectionWnd *window = static_cast(g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND))) { - window->unknown_0218 = value; - window->unknown_021A = *reinterpret_cast(packet + 0x1D); - window->unknown_021C = *reinterpret_cast(packet + 0x1F); - window->unknown_0236 = *reinterpret_cast(packet + 0x21); - window->unknown_0238 = packet[0x1A]; - sprintf(reinterpret_cast(window->unknown_021E), reinterpret_cast(packet + 2)); + window->m_petLevel = value; + window->m_petHunger = *reinterpret_cast(packet + 0x1D); + window->m_petFriendly = *reinterpret_cast(packet + 0x1F); + window->m_petAccessory = *reinterpret_cast(packet + 0x21); + window->m_petRenamed = packet[0x1A]; + sprintf(reinterpret_cast(window->m_petName), reinterpret_cast(packet + 2)); window->SendMsg(nullptr, UM_SETTEXT, 0, 0, 0, 0); } break; } - sprintf(g_session.unknown_1018, reinterpret_cast(packet + 2)); - g_session.unknown_1054 = g_session.unknown_1044; - g_session.unknown_1044 = *reinterpret_cast(packet + 0x1D); + sprintf(g_session.petName, reinterpret_cast(packet + 2)); + g_session.petPreviousHunger = g_session.petHunger; + g_session.petHunger = *reinterpret_cast(packet + 0x1D); g_session.m_petFriendly = *reinterpret_cast(packet + 0x1F); - g_session.unknown_1038 = *reinterpret_cast(packet + 0x21); + g_session.petAccessory = *reinterpret_cast(packet + 0x21); if (UIPetInfoWnd *window = static_cast(g_windowMgr.window_038C)) { window->UpdateFriendlyGauge(); - window->nameEdit->SetText(g_session.unknown_1018); + window->nameEdit->SetText(g_session.petName); window->Invalidate(); } - *reinterpret_cast(g_session.unknown_1014) = packet[0x1A]; - g_session.unknown_1040 = value; + *reinterpret_cast(g_session.petNameModified) = packet[0x1A]; + g_session.petLevel = value; break; } case ID_ZC_PETEGG_LIST: { @@ -23034,8 +23034,8 @@ void CGameMode::ProcessIncomingPackets() { const std::int16_t *index = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++index) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *index); - if (item.unknown_0000[1]) { - window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.unknown_0000[1], 0, 0); + if (item.identity[1]) { + window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(item.itemId.c_str()), item.identity[1], 0, 0); } } window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -23083,22 +23083,22 @@ void CGameMode::ProcessIncomingPackets() { const int seconds = *reinterpret_cast(g_gameModePacketBuffer + 3); switch (g_gameModePacketBuffer[2]) { case 0: - *reinterpret_cast(g_session.unknown_079C) = 0; + *reinterpret_cast(g_session.timeAttackMode) = 0; g_session.m_timeAttackVisible = 1; g_session.m_timeAttackCountdown = seconds * 1000; break; case 1: g_session.m_timeAttackCountdown = timeGetTime() + seconds * 1000; - *reinterpret_cast(g_session.unknown_079C) = 1; + *reinterpret_cast(g_session.timeAttackMode) = 1; g_session.m_timeAttackVisible = 1; break; case 2: g_session.m_timeAttackCountdown = timeGetTime() - seconds * 1000; - *reinterpret_cast(g_session.unknown_079C) = 2; + *reinterpret_cast(g_session.timeAttackMode) = 2; g_session.m_timeAttackVisible = 1; break; case 3: - *reinterpret_cast(g_session.unknown_079C) = 3; + *reinterpret_cast(g_session.timeAttackMode) = 3; g_session.m_timeAttackCountdown = seconds * 30 + 29; g_session.m_timeAttackVisible = 1; break; @@ -23157,14 +23157,14 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_USE_ITEM_ACK2: { if (*reinterpret_cast(g_gameModePacketBuffer + 8) == g_session.m_aid) { - this->unknown_02CC = 0; + this->waitingUseItemAck = 0; if (g_gameModePacketBuffer[0xE]) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(g_gameModePacketBuffer + 2)); - if (item.unknown_0000[1]) { + if (item.identity[1]) { g_session.RemoveItem1710(*reinterpret_cast(g_gameModePacketBuffer + 2), item.quantity - *reinterpret_cast(g_gameModePacketBuffer + 0xC)); if (item.GetItemId() == 607) { - this->unknown_05B4 = 0; + this->yggdrasilUsePending = 0; } } } else { @@ -23212,20 +23212,20 @@ void CGameMode::ProcessIncomingPackets() { } break; case ID_ZC_NOTIFY_MAPPROPERTY2: { - g_serviceOptions.Set(229, *reinterpret_cast(g_session.unknown_5454) != 0); + g_serviceOptions.Set(229, *reinterpret_cast(g_session.interactionFlags) != 0); const std::int16_t type = *reinterpret_cast(g_gameModePacketBuffer + 2); - g_session.unknown_0000 = type; + g_session.mapPropertyId = type; if (type == 5 || type == 6) { - this->scene->unknown_0048 = 1; + this->scene->isPKZone = 1; this->forcedAttack = 1; } else if (type != 11 && type != 12) { if (g_session.GetMapProperty09() || *reinterpret_cast(g_gameModePacketBuffer + 2) == 18 || *reinterpret_cast(g_gameModePacketBuffer + 2) == 8) { - this->scene->unknown_004C = 1; + this->scene->isSiegeMode = 1; g_serviceOptions.Set(229, 1); } else if (*reinterpret_cast(g_gameModePacketBuffer + 2) == 19) { - this->scene->unknown_0050 = 1; - this->scene->unknown_0048 = 1; + this->scene->isBattleFieldMode = 1; + this->scene->isPKZone = 1; } } if (g_session.GetMapProperty0F()) { @@ -23248,7 +23248,7 @@ void CGameMode::ProcessIncomingPackets() { case MAPTYPE_SIEGE_LOWLEVEL: case 31: case 32: - this->scene->unknown_00FD = true; + this->scene->partyRestricted = true; break; } break; @@ -23257,8 +23257,8 @@ void CGameMode::ProcessIncomingPackets() { char name[25]; strncpy(name, reinterpret_cast(g_gameModePacketBuffer + 0xA), 24); name[24] = 0; - *reinterpret_cast(this->unknown_028C) = *reinterpret_cast(g_gameModePacketBuffer + 2); - *reinterpret_cast(this->unknown_028C + 4) = *reinterpret_cast(g_gameModePacketBuffer + 6); + *reinterpret_cast(this->lastCoupleIds) = *reinterpret_cast(g_gameModePacketBuffer + 2); + *reinterpret_cast(this->lastCoupleIds + 4) = *reinterpret_cast(g_gameModePacketBuffer + 6); g_windowMgr.EnsureWindow(WID_COUPLEACCEPTWND)->SendMsg(nullptr, UM_SET_COUPLE_MSG, *reinterpret_cast(g_gameModePacketBuffer + 6), reinterpret_cast(name), 0, 0); break; @@ -23287,18 +23287,18 @@ void CGameMode::ProcessIncomingPackets() { const CardItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.UpdateInventoryItem(item, 0); } RefreshItemWindows(&g_windowMgr); @@ -23309,18 +23309,18 @@ void CGameMode::ProcessIncomingPackets() { const CardItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -23332,18 +23332,18 @@ void CGameMode::ProcessIncomingPackets() { const CardItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; + item.damaged = 0; + item.refiningLevel = 0; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); @@ -23381,8 +23381,8 @@ void CGameMode::ProcessIncomingPackets() { char name[25]; strncpy(name, reinterpret_cast(g_gameModePacketBuffer + 0xA), 24); name[24] = 0; - *reinterpret_cast(this->unknown_028C) = *reinterpret_cast(g_gameModePacketBuffer + 2); - *reinterpret_cast(this->unknown_028C + 4) = *reinterpret_cast(g_gameModePacketBuffer + 6); + *reinterpret_cast(this->lastCoupleIds) = *reinterpret_cast(g_gameModePacketBuffer + 2); + *reinterpret_cast(this->lastCoupleIds + 4) = *reinterpret_cast(g_gameModePacketBuffer + 6); g_windowMgr.EnsureWindow(WID_BABYACCEPTWND)->SendMsg(nullptr, UM_SET_BABY_MSG, *reinterpret_cast(g_gameModePacketBuffer + 6), reinterpret_cast(name), 0, 0); break; @@ -23418,13 +23418,13 @@ void CGameMode::ProcessIncomingPackets() { position.x, position.z); position.y = this->scene->terrain->Height(position.x, position.z); if (*reinterpret_cast(g_gameModePacketBuffer + 2) == g_session.m_aid) { - this->scene->player->unknown_02D0 = position.x; - this->scene->player->unknown_02D4 = position.z; + this->scene->player->damageDestX = position.x; + this->scene->player->damageDestZ = position.z; this->scene->player->render.position = position; } else if (CGameActor *actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 2)))) { - actor->unknown_02D0 = position.x; - actor->unknown_02D4 = position.z; + actor->damageDestX = position.x; + actor->damageDestZ = position.z; actor->render.position = position; } break; @@ -23505,13 +23505,13 @@ void CGameMode::ProcessIncomingPackets() { if (*reinterpret_cast(g_gameModePacketBuffer + 2) == g_session.m_aid) { actor = this->scene->player; this->ApplyStatusIcons(state[0], state[2]); - reinterpret_cast(g_session.unknown_0F0C)[0] = state[0]; - reinterpret_cast(g_session.unknown_0F0C)[1] = state[2]; + reinterpret_cast(g_session.statusLevelEffects)[0] = state[0]; + reinterpret_cast(g_session.statusLevelEffects)[1] = state[2]; g_session.m_jobFlags = state[1]; - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (g_session.unknown_5C1C <= 0) { + if (g_session.replayPacketMode <= 0) { g_session.ClearItems1740(); g_windowMgr.CloseWindow(WID_MERCHANTITEMWND); } @@ -23557,7 +23557,7 @@ void CGameMode::ProcessIncomingPackets() { break; case ID_ZC_NOTIFY_BIND_ON_EQUIP: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(g_gameModePacketBuffer + 2)); - if (item.unknown_0000[1]) { + if (item.identity[1]) { std::string name = item.DisplayName(0); std::string message = FormatOwnedString(LookupMessage(MSI_YOURITEM_EQUIPED), name.c_str()); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message.c_str()), 0x6EFFFF, 0, 0, 0); @@ -23566,17 +23566,17 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_BATTLEFIELD_NOTIFY_CAMPINFO: if (*reinterpret_cast(g_gameModePacketBuffer + 2) == g_session.m_aid) { - g_session.unknown_0F24[0] = g_gameModePacketBuffer[0x1E]; + g_session.playerTeam[0] = g_gameModePacketBuffer[0x1E]; break; } if (CGameActor *actor = static_cast(this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 2)))) { const unsigned char team = g_gameModePacketBuffer[0x1E]; reinterpret_cast(&actor->render.flags)[3] = team; - if (team != g_session.unknown_0F24[0]) { + if (team != g_session.playerTeam[0]) { OpenWordDisplay(actor); - } else if (actor->unknown_018C) { - g_windowMgr.Schedule(reinterpret_cast(actor->unknown_018C)); - actor->unknown_018C = 0; + } else if (actor->actorTitleWindow) { + g_windowMgr.Schedule(reinterpret_cast(actor->actorTitleWindow)); + actor->actorTitleWindow = 0; } } break; @@ -23615,19 +23615,19 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i, ++entry) { const CardItemRecord *record = &entry->base; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0068 = entry->expireTime; + item.damaged = 0; + item.refiningLevel = 0; + item.expireTime = entry->expireTime; g_session.UpdateInventoryItem(item, 0); } RefreshItemWindows(&g_windowMgr); @@ -23639,19 +23639,19 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i, ++entry) { const CardItemRecord *record = &entry->base; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0068 = entry->expireTime; + item.damaged = 0; + item.refiningLevel = 0; + item.expireTime = entry->expireTime; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -23664,19 +23664,19 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i, ++entry) { const CardItemRecord *record = &entry->base; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->identified; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0068 = entry->expireTime; + item.damaged = 0; + item.refiningLevel = 0; + item.expireTime = entry->expireTime; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); @@ -23684,39 +23684,39 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_NOTIFY_FONT: if (*reinterpret_cast(g_gameModePacketBuffer + 2) == g_session.m_aid) { - g_session.unknown_0F30[0] = g_gameModePacketBuffer[6]; + g_session.chatFont[0] = g_gameModePacketBuffer[6]; } else if (CRenderObject *actor = this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 2))) { - *reinterpret_cast(actor->render.unknown_00ECBytes) = *reinterpret_cast(g_gameModePacketBuffer + 6); + *reinterpret_cast(actor->render.effectPhaseBytes) = *reinterpret_cast(g_gameModePacketBuffer + 6); } break; case ID_ZC_PROGRESS: if (CPlayer *player = this->scene->player) { player->SendMsg(nullptr, AM_MAKE_SKILL_RECHARGEGAGE, 0, *reinterpret_cast(g_gameModePacketBuffer + 6) * 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - g_session.unknown_555C[0x0A] = true; + g_session.playerStatusFlags[0x0A] = true; } break; case 0x2F2: if (CPlayer *player = this->scene->player) { player->SendMsg(nullptr, AM_DELETE_SKILL_RECHARGEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (*reinterpret_cast(&player->render.unknown_0060) == 8) { + if (*reinterpret_cast(&player->render.motionFinishThreshold) == 8) { player->SetState(0, 1); } } break; case ID_ZC_UPDATE_GDID: { const std::uint32_t flags = *reinterpret_cast(g_gameModePacketBuffer + 0xA); - g_guildInfo.unknown_00AC = flags & 1; - g_guildInfo.unknown_00B4 = g_gameModePacketBuffer[0xE]; + g_guildInfo.canInvite = flags & 1; + g_guildInfo.isMaster = g_gameModePacketBuffer[0xE]; g_guildInfo.m_guildId = *reinterpret_cast(g_gameModePacketBuffer + 2); - g_guildInfo.unknown_00B0 = (flags >> 4) & 1; - g_guildInfo.unknown_00D0 = *reinterpret_cast(g_gameModePacketBuffer + 0x2B); + g_guildInfo.canExpel = (flags >> 4) & 1; + g_guildInfo.masterCharacterId = *reinterpret_cast(g_gameModePacketBuffer + 0x2B); this->scene->player->SetGuildInfo(*reinterpret_cast(g_gameModePacketBuffer + 2), *reinterpret_cast(g_gameModePacketBuffer + 6)); - if (!g_guildInfo.unknown_00C8) { - g_guildInfo.unknown_00C8 = 1; + if (!g_guildInfo.skillsRequested) { + g_guildInfo.skillsRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 3, 0, 0, 0); } - if (!g_guildInfo.unknown_00C0) { - g_guildInfo.unknown_00C0 = 1; + if (!g_guildInfo.membersRequested) { + g_guildInfo.membersRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 1, 0, 0, 0); } break; @@ -24179,8 +24179,8 @@ void CGameMode::ProcessIncomingPackets() { ReceiveItemSlot(g_gameModePacketBuffer); break; case ID_ZC_SSILIST_ITEM_CLICK_ACK: - g_session.unknown_5BE8 = *reinterpret_cast(g_gameModePacketBuffer + 2); - g_session.unknown_5BEC = *reinterpret_cast(g_gameModePacketBuffer + 4); + g_session.storeSearchX = *reinterpret_cast(g_gameModePacketBuffer + 2); + g_session.storeSearchY = *reinterpret_cast(g_gameModePacketBuffer + 4); break; case ID_ZC_SE_CASHSHOP_OPEN_0845: case ID_ZC_SE_CASHSHOP_OPEN_0a2b: @@ -24207,13 +24207,13 @@ void CGameMode::ProcessIncomingPackets() { _itoa(*reinterpret_cast(packet + 6), entry.itemId, 10); entry.identified = packet[0x0C]; entry.falling = 1; - entry.unknown_003E = *reinterpret_cast(packet + 0x0A); + entry.type = *reinterpret_cast(packet + 0x0A); CItem *item = this->scene->GetItemByAID(entry.aid); if (!item) { item = new CItem; this->scene->objects.push_back(item); - this->scene->unknown_0018.push_back(item); + this->scene->items.push_back(item); } const int entryAddress = reinterpret_cast(&entry); @@ -24235,13 +24235,13 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_REQ_WEAR_EQUIP_ACK2: { const unsigned char *packet = g_gameModePacketBuffer; - *reinterpret_cast(&this->unknown_0100[0x04]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x04]) = timeGetTime() - 2000; switch (packet[8]) { case ITEM_EQUIP_ACK_OK: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *reinterpret_cast(packet + 2)); - if (item.unknown_0000[1]) { - item.unknown_0070 = *reinterpret_cast(packet + 6); - item.unknown_0000[3] = *reinterpret_cast(packet + 4); + if (item.identity[1]) { + item.sprite = *reinterpret_cast(packet + 6); + item.identity[3] = *reinterpret_cast(packet + 4); g_session.OnItemEquipped(item); } break; @@ -24254,7 +24254,7 @@ void CGameMode::ProcessIncomingPackets() { } case ID_ZC_REQ_TAKEOFF_EQUIP_ACK2: { const unsigned char *packet = g_gameModePacketBuffer; - *reinterpret_cast(&this->unknown_0100[0x08]) = timeGetTime() - 2000; + *reinterpret_cast(&this->equipmentRequestState[0x08]) = timeGetTime() - 2000; switch (packet[6]) { case 0: { const std::uint16_t location = *reinterpret_cast(packet + 4); @@ -24722,8 +24722,8 @@ void CGameMode::ProcessIncomingPackets() { *reinterpret_cast(g_gameModePacketBuffer + 0xB)); break; case ID_ZC_WAIT_DIALOG2: - this->unknown_024C = 1; - this->unknown_02DC = *reinterpret_cast(g_gameModePacketBuffer + 2); + this->isOnQuest = 1; + this->lastNaid = *reinterpret_cast(g_gameModePacketBuffer + 2); g_windowMgr.EnsureWindow(WID_SAYDIALOGWND_OVERLAY)->SendMsg(nullptr, UM_ENABLENEXTBUTTON, 0, 0, 0, 0); break; case 0xBEE: @@ -24865,7 +24865,7 @@ void CGameMode::ProcessIncomingPackets() { } else { actor = this->scene->GetGameActorByAID(*reinterpret_cast(g_gameModePacketBuffer + 2)); if (!actor) { - this->unknown_026E[0x16] = 0; + this->requestTimers[0x16] = 0; break; } } @@ -24891,12 +24891,12 @@ void CGameMode::ProcessIncomingPackets() { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_simpleStringMgr->GetString("EMSG_EMOTION_EXPANTION_USE_FAIL_UNKNOWN")), 0xFF, 0, 0, 0); break; } - this->unknown_026E[0x16] = 0; + this->requestTimers[0x16] = 0; break; case ID_ZC_SAY_DIALOG2: { const unsigned char *packet = g_gameModePacketBuffer; - this->unknown_024C = 1; - this->unknown_02DC = *reinterpret_cast(packet + 4); + this->isOnQuest = 1; + this->lastNaid = *reinterpret_cast(packet + 4); unsigned int length = *reinterpret_cast(packet + 2) - 9; char text[0x803]; if (g_serviceType == 10) { @@ -24964,10 +24964,10 @@ void CGameMode::ProcessIncomingPackets() { if (!window) { window = g_windowMgr.EnsureWindow(WID_VIEWCAMERAINFOWND); } - g_session.unknown_61B1 = !g_session.unknown_61B1; + g_session.showCameraInfo = !g_session.showCameraInfo; g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_session.unknown_61B1 == true ? "Camera Info On" : "Camera Info Off"), 0x64FFFF, 0, 0, 0); - window->Show(g_session.unknown_61B1); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_session.showCameraInfo == true ? "Camera Info On" : "Camera Info Off"), 0x64FFFF, 0, 0, 0); + window->Show(g_session.showCameraInfo); } else if (CView *camera = this->camera) { camera->camera.desiredDistance = *reinterpret_cast(g_gameModePacketBuffer + 3); this->camera->camera.desiredYaw = *reinterpret_cast(g_gameModePacketBuffer + 7); @@ -24991,7 +24991,7 @@ void CGameMode::ProcessIncomingPackets() { const int y = *reinterpret_cast(g_gameModePacketBuffer + 0x12); skill->SendMsg(nullptr, AM_SET_SKILL, 0, address, address >> 31, x, x >> 31, y, y >> 31, 0, 0, 0, 0, 0, 0); this->scene->objects.push_back(skill); - this->scene->unknown_0020.push_back(skill); + this->scene->skills.push_back(skill); } break; case ID_ZC_DEBUGMSG: { @@ -25010,7 +25010,7 @@ void CGameMode::ProcessIncomingPackets() { window->PrintSellList(); } g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); - this->unknown_024C = 1; + this->isOnQuest = 1; break; case OPENSTORE2_FAILED: this->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); @@ -25070,20 +25070,20 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i) { const FlaggedItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4) + i; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.UpdateInventoryItem(item, 0); } RefreshItemWindows(&g_windowMgr); @@ -25094,20 +25094,20 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i) { const FlaggedItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4) + i; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -25119,20 +25119,20 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i) { const FlaggedItemRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4) + i; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = 0; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; + item.identity[0] = record->type; + item.identity[2] = 0; + item.identity[1] = record->index; + item.identity[3] = record->location; item.quantity = record->amount; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0060 = 0; - item.unknown_0068 = record->expireTime; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.refiningLevel = 0; + item.expireTime = record->expireTime; + item.flags[0] = (record->flags >> 1) & 1; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); @@ -25143,22 +25143,22 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i) { const FlaggedEquipRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4) + i; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = (record->flags >> 1) & 1; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->look; - item.unknown_0074[0] = (record->flags >> 2) & 1; + item.damaged = (record->flags >> 1) & 1; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->look; + item.flags[0] = (record->flags >> 2) & 1; g_session.AddItem1740(item); } g_session.RefreshItem1740Window(); @@ -25170,71 +25170,71 @@ void CGameMode::ProcessIncomingPackets() { for (int i = 0; i < count; ++i) { const FlaggedEquipRecord *record = reinterpret_cast(g_gameModePacketBuffer + 4) + i; ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[2] = record->location; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->wearState; + item.identity[0] = record->type; + item.identity[2] = record->location; + item.identity[1] = record->index; + item.identity[3] = record->wearState; item.quantity = 1; for (int card = 0; card < 4; ++card) { - reinterpret_cast(item.unknown_001C)[card] = record->cards[card]; + reinterpret_cast(item.cards)[card] = record->cards[card]; } item.SetItemId(record->itemId); item.identified = record->flags & 1; - item.unknown_005D = (record->flags >> 1) & 1; - item.unknown_0060 = record->refine; - item.unknown_0068 = record->expireTime; - item.unknown_0064 = record->bindOnEquip; - item.unknown_0070 = record->look; - item.unknown_0074[0] = (record->flags >> 2) & 1; + item.damaged = (record->flags >> 1) & 1; + item.refiningLevel = record->refine; + item.expireTime = record->expireTime; + item.bindOnEquip = record->bindOnEquip; + item.sprite = record->look; + item.flags[0] = (record->flags >> 2) & 1; g_session.AddItem1738(item, 0); } g_session.RefreshItem1738Window(); break; } case ID_ZC_PROPERTY_HOMUN_0b76: - StringFormat(reinterpret_cast(g_session.unknown_5570 + 0xC), 32, static_cast(-1), "%s", + StringFormat(reinterpret_cast(g_session.spAndHomunculusStats + 0xC), 32, static_cast(-1), "%s", reinterpret_cast(g_gameModePacketBuffer + 2)); - g_session.unknown_55F8 = g_gameModePacketBuffer[0x1A]; - *reinterpret_cast(g_session.unknown_55C0) = *reinterpret_cast(g_gameModePacketBuffer + 0x1B); - g_session.unknown_55F0 = *reinterpret_cast(g_gameModePacketBuffer + 0x1D); + g_session.homunNameModified = g_gameModePacketBuffer[0x1A]; + *reinterpret_cast(g_session.homunLevel) = *reinterpret_cast(g_gameModePacketBuffer + 0x1B); + g_session.homunHunger = *reinterpret_cast(g_gameModePacketBuffer + 0x1D); g_session.RefreshHomunculusInfo(); switch (*reinterpret_cast(g_gameModePacketBuffer + 0x1D)) { case 1: case 5: case 10: - if (*reinterpret_cast(g_session.unknown_5620) != *reinterpret_cast(g_gameModePacketBuffer + 0x1D)) { + if (*reinterpret_cast(g_session.companionTargetState) != *reinterpret_cast(g_gameModePacketBuffer + 0x1D)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_HOMUN_HUNGRY)), 0xFF, 0, 0, 0); - *reinterpret_cast(g_session.unknown_5620) = *reinterpret_cast(g_gameModePacketBuffer + 0x1D); + *reinterpret_cast(g_session.companionTargetState) = *reinterpret_cast(g_gameModePacketBuffer + 0x1D); } break; } - g_session.unknown_55D4 = *reinterpret_cast(g_gameModePacketBuffer + 0x1F); - reinterpret_cast(g_session.unknown_5570 + 0x2C)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x21); - reinterpret_cast(g_session.unknown_5570 + 0x30)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x23); - reinterpret_cast(g_session.unknown_5570 + 0x34)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x25); - reinterpret_cast(g_session.unknown_5570 + 0x38)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x27); - reinterpret_cast(g_session.unknown_5570 + 0x3C)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x29); - reinterpret_cast(g_session.unknown_5570 + 0x40)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2B); - reinterpret_cast(g_session.unknown_5570 + 0x44)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2D); - reinterpret_cast(g_session.unknown_5570 + 0x48)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2F); + g_session.homunFriendly = *reinterpret_cast(g_gameModePacketBuffer + 0x1F); + reinterpret_cast(g_session.spAndHomunculusStats + 0x2C)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x21); + reinterpret_cast(g_session.spAndHomunculusStats + 0x30)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x23); + reinterpret_cast(g_session.spAndHomunculusStats + 0x34)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x25); + reinterpret_cast(g_session.spAndHomunculusStats + 0x38)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x27); + reinterpret_cast(g_session.spAndHomunculusStats + 0x3C)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x29); + reinterpret_cast(g_session.spAndHomunculusStats + 0x40)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2B); + reinterpret_cast(g_session.spAndHomunculusStats + 0x44)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2D); + reinterpret_cast(g_session.spAndHomunculusStats + 0x48)[0] = *reinterpret_cast(g_gameModePacketBuffer + 0x2F); g_session.m_homunHp = *reinterpret_cast(g_gameModePacketBuffer + 0x31); g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_55C8) = *reinterpret_cast(g_gameModePacketBuffer + 0x35); + *reinterpret_cast(g_session.homunMaxHp) = *reinterpret_cast(g_gameModePacketBuffer + 0x35); g_session.RefreshHomunculusInfo(); g_session.m_homunSp = *reinterpret_cast(g_gameModePacketBuffer + 0x39); g_session.RefreshHomunculusInfo(); - g_session.unknown_55D0 = *reinterpret_cast(g_gameModePacketBuffer + 0x3D); + g_session.homunMaxSp = *reinterpret_cast(g_gameModePacketBuffer + 0x3D); g_session.RefreshHomunculusInfo(); g_session.m_homunExp = *reinterpret_cast(g_gameModePacketBuffer + 0x41); g_session.RefreshHomunculusInfo(); g_session.m_homunMaxExp = *reinterpret_cast(g_gameModePacketBuffer + 0x45); g_session.RefreshHomunculusInfo(); - *reinterpret_cast(g_session.unknown_1664) = *reinterpret_cast(g_gameModePacketBuffer + 0x49); + *reinterpret_cast(g_session.companionSkillPoints) = *reinterpret_cast(g_gameModePacketBuffer + 0x49); g_session.InvalidateWindowFrames(); if (g_windowMgr.window_03C4) { g_windowMgr.window_03C4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - reinterpret_cast(g_session.unknown_5620)[1] = *reinterpret_cast(g_gameModePacketBuffer + 0x4B); + reinterpret_cast(g_session.companionTargetState)[1] = *reinterpret_cast(g_gameModePacketBuffer + 0x4B); break; case ID_ZC_NPC_BARTER_MARKET_ITEMINFO_0b0e: { g_barterMarketItemMgr->Clear(); @@ -25268,9 +25268,9 @@ void CGameMode::ProcessIncomingPackets() { memcpy(entry, record, sizeof(entry)); RawItemBasic item = {}; _itoa(*reinterpret_cast(entry), item.itemId, 10); - item.unknown_0004 = *reinterpret_cast(entry + 5); - item.unknown_0008 = *reinterpret_cast(entry + 5); - item.unknown_000C = entry[4]; + item.price = *reinterpret_cast(entry + 5); + item.realPrice = *reinterpret_cast(entry + 5); + item.type = entry[4]; item.id = -1; item.identified = 1; g_session.AddItem1718(item, *reinterpret_cast(entry + 9), diff --git a/Source/Client/Mode/LoginMode.cpp b/Source/Client/Mode/LoginMode.cpp index 921e1ddc9..807fc6cd0 100644 --- a/Source/Client/Mode/LoginMode.cpp +++ b/Source/Client/Mode/LoginMode.cpp @@ -663,23 +663,23 @@ void CLoginMode::ReceiveCharacterSlots(const CharacterSlotsPacket* packet) { g_session.m_validSlotCount = packet->producibleSlots; SecureZeroMemory(this->characters, sizeof(this->characters)); - g_session.unknown_59BC = 0; - this->unknown_01D8 = 0; + g_session.characterSlotState = 0; + this->receivedCharacterCount = 0; this->unknown_01DC = 0; this->slotExtension = packet->extension; - this->slotExtension.unknown_0001 = htonl(this->slotExtension.unknown_0001); - this->slotExtension.unknown_0005 = htonl(this->slotExtension.unknown_0005); - this->slotExtension.unknown_0009 = htonl(this->slotExtension.unknown_0009); + this->slotExtension.code = htonl(this->slotExtension.code); + this->slotExtension.time1 = htonl(this->slotExtension.time1); + this->slotExtension.time2 = htonl(this->slotExtension.time2); } // OFFSET: 0x00D8EAC0 // FUNCTION: fn_22275 void CLoginMode::ReceiveAcceptEnter(const AcceptEnterPacket* packet) { this->slotExtension = packet->extension; - this->slotExtension.unknown_0001 = htonl(this->slotExtension.unknown_0001); - this->slotExtension.unknown_0005 = htonl(this->slotExtension.unknown_0005); - this->slotExtension.unknown_0009 = htonl(this->slotExtension.unknown_0009); + this->slotExtension.code = htonl(this->slotExtension.code); + this->slotExtension.time1 = htonl(this->slotExtension.time1); + this->slotExtension.time2 = htonl(this->slotExtension.time2); this->characterCount = (packet->length - 27) / sizeof(CharacterInfo); const int remainder = (packet->length - 27) % sizeof(CharacterInfo); @@ -692,7 +692,7 @@ void CLoginMode::ReceiveAcceptEnter(const AcceptEnterPacket* packet) { g_windowMgr.Confirm(text, 0, true, true, 0, "Message", 280, 120, 0); } - g_session.unknown_59BC = this->characterCount; + g_session.characterSlotState = this->characterCount; for (int i = 0; i < this->characterCount; ++i) { char* mapName = this->characters[i].mapName; strncpy(mapName, g_session.GatName2RswName(mapName), strlen(mapName)); @@ -766,7 +766,7 @@ void CLoginMode::ReceiveCharacterPage(const CharacterPagePacket* packet) { return; } - const unsigned int total = this->unknown_01D8 + count; + const unsigned int total = this->receivedCharacterCount + count; if (total > 68) { char text[256]; memset(text, 0, sizeof(text)); @@ -778,27 +778,27 @@ void CLoginMode::ReceiveCharacterPage(const CharacterPagePacket* packet) { return; } - memcpy_s(&this->characters[this->unknown_01D8], sizeof(this->characters) - this->unknown_01D8 * sizeof(CharacterInfo), + memcpy_s(&this->characters[this->receivedCharacterCount], sizeof(this->characters) - this->receivedCharacterCount * sizeof(CharacterInfo), packet->characters, count * sizeof(CharacterInfo)); __time32_t now; _time32(&now); for (int i = 0; i < static_cast(count); ++i) { - if (this->characters[this->unknown_01D8 + i].sex == 99) { - this->characters[this->unknown_01D8 + i].sex = static_cast(g_session.m_sex); + if (this->characters[this->receivedCharacterCount + i].sex == 99) { + this->characters[this->receivedCharacterCount + i].sex = static_cast(g_session.m_sex); } - if (this->characters[this->unknown_01D8 + i].deleteDate != 0) { - this->characters[this->unknown_01D8 + i].deleteDate += now; + if (this->characters[this->receivedCharacterCount + i].deleteDate != 0) { + this->characters[this->receivedCharacterCount + i].deleteDate += now; } - CharacterInfo& character = this->characters[this->unknown_01D8 + i]; - this->characters[this->unknown_01D8 + i].bodyStyle = - static_cast(g_session.GetBodyStyle(character.job, character.bodyStyle, character.unknown_0058)); + CharacterInfo& character = this->characters[this->receivedCharacterCount + i]; + this->characters[this->receivedCharacterCount + i].bodyStyle = + static_cast(g_session.GetBodyStyle(character.job, character.bodyStyle, character.bodyCostume)); } - this->unknown_01D8 += count; + this->receivedCharacterCount += count; if (count != 3) { - this->characterCount = this->unknown_01D8; - g_session.unknown_59BC = this->unknown_01D8; - this->unknown_01D8 = 0; + this->characterCount = this->receivedCharacterCount; + g_session.characterSlotState = this->receivedCharacterCount; + this->receivedCharacterCount = 0; this->characterDeleted = false; for (long long i = 0; i < this->characterCount; ++i) { char* mapName = this->characters[i].mapName; @@ -817,7 +817,7 @@ void CLoginMode::SubD8F560(int) { // FUNCTION: fn_22280 __declspec(noinline) void CLoginMode::ReceiveCharacterList(const CharacterListPacket* packet) { this->characterCount = (packet->length - 4) / sizeof(CharacterInfo); - g_session.unknown_59BC = this->characterCount; + g_session.characterSlotState = this->characterCount; memcpy_s(this->characters, sizeof(this->characters), packet->characters, this->characterCount * sizeof(CharacterInfo)); this->pendingCursorType = 7; } @@ -1097,16 +1097,16 @@ void CLoginMode::SubD97780(int value) { } break; case 38: - if (this->unknown_6F75 == true) { + if (this->otpPending == true) { if (static_cast(timeGetTime()) >= this->otpStarted + 0xEA60) { GetRagConnection().Close(); - if (this->unknown_6F74 == true && this->unknown_6F75 == true) { - this->unknown_6F76 = true; + if (this->loginResponseReceived == true && this->otpPending == true) { + this->otpTimedOut = true; if (!g_windowMgr.HasModalWindow()) { if (g_windowMgr.Confirm(LookupMessage(MSI_PRIVATE_AIRPLANE_FAILED_SAME_MAP), 0, true, false, 0, "Message", 280, 120, 0) == 0xB8) { - this->unknown_6F75 = false; - this->unknown_6F76 = false; - this->unknown_6F74 = false; + this->otpPending = false; + this->otpTimedOut = false; + this->loginResponseReceived = false; this->otpStarted = timeGetTime(); this->pendingCursorType = 3; } @@ -1116,9 +1116,9 @@ void CLoginMode::SubD97780(int value) { } else { if (static_cast(timeGetTime()) > this->otpStarted + 0x13880) { GetRagConnection().Close(); - if (this->unknown_6F74 == false) { + if (this->loginResponseReceived == false) { if (g_windowMgr.Confirm(LookupMessage(MSI_NO_PARTY_FOUND), 0, true, false, 0, "Message", 280, 120, 0) == 0xB8) { - this->unknown_6F74 = false; + this->loginResponseReceived = false; this->otpStarted = timeGetTime(); this->pendingCursorType = 3; } @@ -1206,7 +1206,7 @@ void CLoginMode::SubD97F00(int) { void CLoginMode::OpenAccountRegistration() { switch (g_serviceType) { case ServiceKorea: - if (*reinterpret_cast(&g_session.unknown_59DC[0x198]) == 1) { + if (*reinterpret_cast(&g_session.mouseAndChannelOptions[0x198]) == 1) { const char* url = LookupMessage(MSI_SETTLE_WEB_URL_HANGAME); const char source[] = {'\x30', '\x45', '\xCA', '\xFB', '\x9D'}; ShellExecuteA(hWnd, DecryptName<0xCFF3899D95AF355FULL>(source), url, nullptr, nullptr, SW_SHOWNORMAL); @@ -1364,7 +1364,7 @@ void PreloadLoginSprites() { // OFFSET: 0x00D9CFD0 // FUNCTION: fn_22315 void CLoginMode::ReceiveLoginErrorDetail(const LoginErrorDetailPacket* packet) { - this->unknown_6F74 = true; + this->loginResponseReceived = true; std::string message; switch (packet->error) { case 0: @@ -1379,7 +1379,7 @@ void CLoginMode::ReceiveLoginErrorDetail(const LoginErrorDetailPacket* packet) { g_windowMgr.CloseWindow(WID_LOGINOTPWND); } g_windowMgr.EnsureWindow(WID_LOGINOTPWND); - this->unknown_6F75 = true; + this->otpPending = true; this->otpStarted = timeGetTime(); break; case 500: @@ -1419,7 +1419,7 @@ void CLoginMode::ReceiveLoginErrorDetail(const LoginErrorDetailPacket* packet) { const char detailSource[] = {'\xAF', '\x02', '\x44', '\x98', '\xE8', '\x19'}; message += FormatOwnedString(DecryptName<0xC70319B5EB61598FULL>(detailSource), packet->detail); g_windowMgr.Confirm(message.c_str(), 5, true, true, 0, "Message", 280, 120, 0); - if (this->unknown_6F76 != true) { + if (this->otpTimedOut != true) { if (error == 500) { this->otpStarted = timeGetTime(); if (g_windowMgr.LookupWindow(WID_LOGINOTPWND)) { @@ -1430,8 +1430,8 @@ void CLoginMode::ReceiveLoginErrorDetail(const LoginErrorDetailPacket* packet) { if (g_windowMgr.LookupWindow(WID_LOGINOTPWND)) { g_windowMgr.CloseWindow(WID_LOGINOTPWND); } - this->unknown_6F74 = false; - this->unknown_6F75 = false; + this->loginResponseReceived = false; + this->otpPending = false; GetRagConnection().Close(); this->otpStarted = timeGetTime(); this->pendingCursorType = 3; @@ -1443,7 +1443,7 @@ void CLoginMode::ReceiveLoginErrorDetail(const LoginErrorDetailPacket* packet) { // OFFSET: 0x00D9D730 // FUNCTION: fn_22316 void CLoginMode::ReceiveLoginError(const LoginErrorPacket* packet) { - this->unknown_6F74 = true; + this->loginResponseReceived = true; std::string message; switch (packet->error) { case 0: @@ -1458,7 +1458,7 @@ void CLoginMode::ReceiveLoginError(const LoginErrorPacket* packet) { g_windowMgr.CloseWindow(WID_LOGINOTPWND); } g_windowMgr.EnsureWindow(WID_LOGINOTPWND); - this->unknown_6F75 = true; + this->otpPending = true; this->otpStarted = timeGetTime(); break; case 500: @@ -1493,7 +1493,7 @@ void CLoginMode::ReceiveLoginError(const LoginErrorPacket* packet) { protect = false; } g_windowMgr.Confirm(message.c_str(), 5, true, true, 0, caption, 280, 120, protect); - if (this->unknown_6F76 != true) { + if (this->otpTimedOut != true) { if (error == 500) { this->otpStarted = timeGetTime(); if (g_windowMgr.LookupWindow(WID_LOGINOTPWND)) { @@ -1504,8 +1504,8 @@ void CLoginMode::ReceiveLoginError(const LoginErrorPacket* packet) { if (g_windowMgr.LookupWindow(WID_LOGINOTPWND)) { g_windowMgr.CloseWindow(WID_LOGINOTPWND); } - this->unknown_6F74 = false; - this->unknown_6F75 = false; + this->loginResponseReceived = false; + this->otpPending = false; GetRagConnection().Close(); this->otpStarted = timeGetTime(); this->pendingCursorType = 3; @@ -1802,9 +1802,9 @@ void CLoginMode::Initialize(const char* name) { this->charParams[3] = 5; this->charParams[4] = 5; this->charParams[5] = 5; - this->unknown_0070 = 0; - this->unknown_0074 = 1; - this->unknown_0078 = false; + this->characterParameter7 = 0; + this->characterParameter8 = 1; + this->makingCharNameFirstByte = false; this->wallpaperName = g_loginWallpaperName; this->running = 1; this->pendingCursorType = -1; @@ -1827,16 +1827,16 @@ void CLoginMode::Initialize(const char* name) { g_entryQueueMgr->current = nullptr; g_session.ClearShortcutSlots(); g_session.ClearSecondaryShortcutSlots(); - g_session.unknown_6184 = 0; - this->unknown_01C4 = 0; + g_session.playerAppearanceState = 0; + this->serverCount = 0; this->characterCount = 0; - this->unknown_6F74 = false; - this->unknown_6F75 = false; - this->unknown_6F76 = false; - this->unknown_6F78 = 0; - g_session.unknown_8074 = 0; - g_session.unknown_0784.clear(); - g_session.unknown_078C.clear(); + this->loginResponseReceived = false; + this->otpPending = false; + this->otpTimedOut = false; + this->remainingLoginSeconds = 0; + g_session.madogearType = 0; + g_session.summonHp.clear(); + g_session.summonMaxHp.clear(); } #pragma pack(push, 1) @@ -1868,7 +1868,7 @@ void CLoginMode::Zc_Accept_Enter3(const AcceptEnterPositionPacket* packet) { g_session.SetOption(11, 1, 0); g_session.SetPlayerPosition((packet->posDir[0] << 2) | (packet->posDir[1] >> 6), ((packet->posDir[1] & 0x3F) << 4) | (packet->posDir[2] >> 4), packet->posDir[2] & 0xF); - g_session.unknown_0F30[0] = packet->font; + g_session.chatFont[0] = packet->font; char mapName[36]; sprintf(mapName, "%s.rsw", g_session.m_navigationPlayerMap); @@ -1894,10 +1894,10 @@ void CLoginMode::Zc_Accept_Enter3(const AcceptEnterPositionPacket* packet) { } g_session.SetUnknown5C1C(0); - g_session.unknown_809C.clear(); + g_session.characterNames.clear(); for (unsigned int i = 0; i < 68; ++i) { std::string name = this->characters[i].name; - g_session.unknown_809C.push_back(name); + g_session.characterNames.push_back(name); } SecureZeroMemory(this->characters, sizeof(this->characters)); @@ -2192,7 +2192,7 @@ void CLoginMode::ShowLoginError(int code, int argument) { message = LookupMessage(MSI_THE_PARTY_MASTER_CANNOT_BE_REQUESTED); break; case 36: { - const int remaining = this->unknown_6F78; + const int remaining = this->remainingLoginSeconds; const std::string text = FormatOwnedString(LookupMessage(MSI_CHECK_ATTENDANCE_RODEX_CONTENTS), remaining / 3600, static_cast(std::ceil(static_cast(remaining % 3600) / 60.0f))); message = text; break; @@ -2228,16 +2228,16 @@ void CLoginMode::ShowLoginError(int code, int argument) { // OFFSET: 0x00D8C6A0 // FUNCTION: fn_22258 -CLoginMode::CLoginMode() : wallpaperName(), unknown_6F1C(), unknown_6F2C(), unknown_6F38(), unknown_6F50(), mapStates() { +CLoginMode::CLoginMode() : wallpaperName(), noticeCommands(), unknown_6F2C(), accountInfo(), unknown_6F50(), mapStates() { this->fadeInRequested = 1; - this->unknown_6F10 = timeGetTime() + 12000; + this->nextKeepaliveTime = timeGetTime() + 12000; this->savedInlineCharset = g_inlineCharset; g_inlineCharset = 0; - this->unknown_6F48 = -1; + this->selectedAccount = -1; this->window_6F14 = nullptr; this->passwordRetryCount = 0; SecureZeroMemory(this->characters, sizeof(this->characters)); - this->unknown_01D8 = 0; + this->receivedCharacterCount = 0; this->unknown_01DC = 0; this->characterDeleted = false; } @@ -2253,10 +2253,10 @@ CLoginMode::~CLoginMode() { bool CLoginMode::ShowNotice(int notice, bool append) { UIWindow* window; if (append) { - window = g_windowMgr.unknown_0210; + window = g_windowMgr.menuWnd; } else { - this->unknown_6F1C.clear(); - if (g_windowMgr.unknown_0210) { + this->noticeCommands.clear(); + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } window = g_windowMgr.EnsureWindow(WID_MENUWND); @@ -2270,25 +2270,25 @@ bool CLoginMode::ShowNotice(int notice, bool append) { case 45: window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_MSG_MAKECHARCTER)), 0, 0, 0); window->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); - this->unknown_6F1C.push_back(45); + this->noticeCommands.push_back(45); break; case 46: window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_UAE_URL)), 0, 0, 0); window->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); - this->unknown_6F1C.push_back(46); + this->noticeCommands.push_back(46); break; case 47: window->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_UAE_SERVERSTR)), 0, 0, 0); window->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); - this->unknown_6F1C.push_back(47); + this->noticeCommands.push_back(47); break; } - if (this->unknown_6F1C.empty()) { + if (this->noticeCommands.empty()) { return false; } - if (UIWindow* notices = g_windowMgr.unknown_0210) { + if (UIWindow* notices = g_windowMgr.menuWnd) { int x = g_mouse.x + 1; int y = g_mouse.y + 1; if (x < 1) { @@ -2318,7 +2318,7 @@ static void ComputeLoginDigest(unsigned char* digest, const void* data, int size // FUNCTION: fn_22264 void CLoginMode::ReceiveAcceptLogin(const AcceptLoginPacket* packet, int version) { g_loginAcceptTime = timeGetTime(); - *reinterpret_cast(&g_session.unknown_56B8[4]) = LookupMessage(MSI_AUTO_MSG); + *reinterpret_cast(&g_session.autoReplyState[4]) = LookupMessage(MSI_AUTO_MSG); SessionAccount& account = *reinterpret_cast(&g_session.m_sex); account.authCode = packet->authCode; @@ -2355,25 +2355,25 @@ void CLoginMode::ReceiveAcceptLogin(const AcceptLoginPacket* packet, int version switch (version) { case 2: count = (packet->length - (offsetof(AcceptLoginPacket, body) + 4)) / sizeof(ServerAddress); - this->unknown_01C4 = count; + this->serverCount = count; memcpy(this->serverList, packet->body + 4, count * sizeof(ServerAddress)); break; case 3: count = (packet->length - (offsetof(AcceptLoginPacket, body) + 17)) / sizeof(ServerAddress); - this->unknown_01C4 = count; + this->serverCount = count; memcpy(this->serverList, packet->body + 17, count * sizeof(ServerAddress)); - memcpy(&g_session.unknown_807C[8], packet->body, 16); + memcpy(&g_session.webServiceLoginData[8], packet->body, 16); break; case 4: count = (packet->length - offsetof(AcceptLoginPacket, body)) / sizeof(ServerAddress2); - this->unknown_01C4 = count; + this->serverCount = count; memcpy(this->serverList, packet->body, count * sizeof(ServerAddress2)); break; case 5: count = (packet->length - (offsetof(AcceptLoginPacket, body) + 17)) / sizeof(ServerAddress2); - this->unknown_01C4 = count; + this->serverCount = count; memcpy(this->serverList, packet->body + 17, count * sizeof(ServerAddress2)); - memcpy(&g_session.unknown_807C[8], packet->body, 16); + memcpy(&g_session.webServiceLoginData[8], packet->body, 16); break; case 6: case 7: @@ -2382,7 +2382,7 @@ void CLoginMode::ReceiveAcceptLogin(const AcceptLoginPacket* packet, int version break; default: count = (packet->length - offsetof(AcceptLoginPacket, body)) / sizeof(ServerAddress); - this->unknown_01C4 = count; + this->serverCount = count; memcpy(this->serverList, packet->body, count * sizeof(ServerAddress)); break; } @@ -2513,7 +2513,7 @@ void CLoginMode::PollNetworkStatus() { } } --this->characterCount; - --g_session.unknown_59BC; + --g_session.characterSlotState; memcpy_s(this->characters, sizeof(this->characters), remaining, this->characterCount * sizeof(CharacterInfo)); delete[] remaining; this->pendingCursorType = 7; @@ -2586,10 +2586,10 @@ void CLoginMode::PollNetworkStatus() { } case ID_HC_BLOCK_CHARACTER: { const BlockedCharacterPacket* packet = reinterpret_cast(g_gameModePacketBuffer); - BlockedCharacter* blocked = reinterpret_cast(&g_session.unknown_07F4[0x40]); - g_session.unknown_59D0 = (packet->length - offsetof(BlockedCharacterPacket, characters)) / sizeof(BlockedCharacter); - memset(blocked, 0, g_session.unknown_59D0 * sizeof(BlockedCharacter)); - memcpy(blocked, packet->characters, g_session.unknown_59D0 * sizeof(BlockedCharacter)); + BlockedCharacter* blocked = reinterpret_cast(&g_session.characterSelectionData[0x40]); + g_session.blockedCharacterCount = (packet->length - offsetof(BlockedCharacterPacket, characters)) / sizeof(BlockedCharacter); + memset(blocked, 0, g_session.blockedCharacterCount * sizeof(BlockedCharacter)); + memcpy(blocked, packet->characters, g_session.blockedCharacterCount * sizeof(BlockedCharacter)); break; } case 0x23D: @@ -2598,13 +2598,13 @@ void CLoginMode::PollNetworkStatus() { case 0x28B: { const AcceptEnterNeoUnionPacket* packet = reinterpret_cast(g_gameModePacketBuffer); this->slotExtension = packet->extension; - this->slotExtension.unknown_0001 = htonl(this->slotExtension.unknown_0001); - this->slotExtension.unknown_0005 = htonl(this->slotExtension.unknown_0005); - this->slotExtension.unknown_0009 = htonl(this->slotExtension.unknown_0009); + this->slotExtension.code = htonl(this->slotExtension.code); + this->slotExtension.time1 = htonl(this->slotExtension.time1); + this->slotExtension.time2 = htonl(this->slotExtension.time2); const unsigned int dataLength = packet->length - offsetof(AcceptEnterNeoUnionPacket, characters); this->characterCount = dataLength / sizeof(CharacterInfo); - g_session.unknown_0E94 = this->characterCount; + g_session.characterCount = this->characterCount; const unsigned char* characters = reinterpret_cast(packet->characters) + dataLength % sizeof(CharacterInfo); memcpy_s(this->characters, sizeof(this->characters), characters, this->characterCount * sizeof(CharacterInfo)); this->pendingCursorType = 19; @@ -2614,11 +2614,11 @@ void CLoginMode::PollNetworkStatus() { const ShortResultPacket* packet = reinterpret_cast(g_gameModePacketBuffer); if (packet->result != 0) { char text[300]; - sprintf(text, LookupMessage(MSI_CONFIRM_TO_CHANGE_NAME), reinterpret_cast(&g_session.unknown_5913[5])); + sprintf(text, LookupMessage(MSI_CONFIRM_TO_CHANGE_NAME), reinterpret_cast(&g_session.characterRenameData[5])); if (g_windowMgr.Confirm(text, 2, false, false, 0, "Message", 280, 120, 0) == 0xBB) { ChangeCharacterNamePacket request; request.id = 0x28F; - request.gid = *reinterpret_cast(&g_session.unknown_5913[1]); + request.gid = *reinterpret_cast(&g_session.characterRenameData[1]); GetRagConnection().Send(g_packetLengths.FixedLength(request.id), &request); break; } @@ -2827,7 +2827,7 @@ void CLoginMode::PollNetworkStatus() { } break; case 0x9A2: - this->unknown_6F28 = reinterpret_cast(g_gameModePacketBuffer)->value; + this->authChallengeId = reinterpret_cast(g_gameModePacketBuffer)->value; this->pendingCursorType = 24; break; case 0x9A5: { @@ -2835,7 +2835,7 @@ void CLoginMode::PollNetworkStatus() { if (packet->code != 0x12) { GetRagConnection().Close(); } - this->unknown_6F78 = packet->remaining; + this->remainingLoginSeconds = packet->remaining; this->ShowLoginError(packet->code, reinterpret_cast("")); break; } @@ -2918,7 +2918,7 @@ void CLoginMode::PollNetworkStatus() { case ID_ZC_EXTEND_BODYITEM_SIZE: { const std::int16_t slots = reinterpret_cast(g_gameModePacketBuffer)->result; if (slots <= 100) { - g_session.unknown_7FBC = slots; + g_session.extraInventorySlots = slots; } break; } @@ -2930,14 +2930,14 @@ void CLoginMode::PollNetworkStatus() { char* mapName = this->characters[this->characterCount].mapName; StringFormat(mapName, sizeof(this->characters[this->characterCount].mapName), static_cast(-1), "%s", g_session.GatName2RswName(mapName)); ++this->characterCount; - ++g_session.unknown_59BC; + ++g_session.characterSlotState; this->pendingCursorType = 7; break; } case 0xB71: { const CharacterInfoPacket* packet = reinterpret_cast(g_gameModePacketBuffer); CharacterInfo* character = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, packet->info.slot, 0, 0, 0)); - if (character && character->gid == *reinterpret_cast(&g_session.unknown_5913[1])) { + if (character && character->gid == *reinterpret_cast(&g_session.characterRenameData[1])) { *character = packet->info; StringFormat(character->mapName, sizeof(character->mapName), static_cast(-1), "%s", g_session.GatName2RswName(character->mapName)); this->pendingCursorType = 7; @@ -2949,7 +2949,7 @@ void CLoginMode::PollNetworkStatus() { break; case 0xC05: { const CharacterSlotCountsPacket* packet = reinterpret_cast(g_gameModePacketBuffer); - g_session.unknown_8130 = packet->counts[1]; + g_session.restrictedCharacterSlots = packet->counts[1]; CharacterSlotsPacket slots; slots.id = 0x82D; slots.length = sizeof(CharacterSlotsPacket); @@ -3023,8 +3023,8 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, ); if (buffer) { *reinterpret_cast(buffer) = 0x9A3; - *reinterpret_cast(buffer + 4) = this->unknown_6F28; - StringFormat(reinterpret_cast(buffer + 8), 10, static_cast(-1), reinterpret_cast(&this->unknown_0138[0x80])); + *reinterpret_cast(buffer + 4) = this->authChallengeId; + StringFormat(reinterpret_cast(buffer + 8), 10, static_cast(-1), reinterpret_cast(&this->loginCredentials[0x80])); *reinterpret_cast(buffer + 2) = 14; GetRagConnection().Send(*reinterpret_cast(buffer + 2), buffer); this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); @@ -3034,7 +3034,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, return 0; } case LMM_DISPATCH_CHARACTER_SLOT_ACTION: - switch (this->unknown_6F1C[argument1]) { + switch (this->noticeCommands[argument1]) { case 45: if (UIWindow* window = g_windowMgr.LookupWindow(WID_NEWSELECTCHARWND)) { window->SendMsg(nullptr, UM_COMMAND, 0x1B0, 0, 0, 0); @@ -3064,7 +3064,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, }; PacketAD0 packet; packet.id = 0xAD0; - memcpy_s(packet.code, sizeof(packet.code), &this->unknown_0138[0x80], sizeof(packet.code)); + memcpy_s(packet.code, sizeof(packet.code), &this->loginCredentials[0x80], sizeof(packet.code)); GetRagConnection().Send(reinterpret_cast(&GetRagConnection())->FixedLength(packet.id), &packet); this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); static_cast(this->window_6F14)->SetMessage(LookupMessage(MSI_WAITING_RESPONSE_FROM_SERVER), 16, 1); @@ -3079,7 +3079,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, this->pendingCursorType = 4; return 0; case LMM_SELECTSVR: { - *reinterpret_cast(this->unknown_01C8) = argument1; + *reinterpret_cast(this->selectedServerStorage) = argument1; if (argument1 == -1) { return 0; } @@ -3092,20 +3092,20 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, } g_session.m_accountName = servers[argument1].address.name; - const int selected = *reinterpret_cast(this->unknown_01C8); + const int selected = *reinterpret_cast(this->selectedServerStorage); const std::uint32_t ip = servers[selected].address.ip; const std::uint8_t ipFormatSource[] = {0xB0, 0xEB, 0xCF, 0x28, 0x39, 0x27, 0x44, 0x95, 0xBB, 0xAA, 0x85, 0x0D}; thread_local EncryptedName ipFormat(ipFormatSource); CharServerEndpoint endpoint; wsprintfA(endpoint.ip, ipFormat.Text(), ip & 0xFF, (ip >> 8) & 0xFF, (ip >> 16) & 0xFF, ip >> 24); - const int selected2 = *reinterpret_cast(this->unknown_01C8); + const int selected2 = *reinterpret_cast(this->selectedServerStorage); endpoint.port = servers[selected2].address.port; const std::uint8_t hostFormatSource[] = {0xFC, 0x8A, 0xE1}; thread_local EncryptedName hostFormat(hostFormatSource); StringFormat(endpoint.host, sizeof(endpoint.host), static_cast(-1), hostFormat.Text(), servers[selected2].domain); g_charServerEndpoint = endpoint; - g_charServerIp = servers[*reinterpret_cast(this->unknown_01C8)].address.ip; - g_session.m_serverName = servers[*reinterpret_cast(this->unknown_01C8)].address.name; + g_charServerIp = servers[*reinterpret_cast(this->selectedServerStorage)].address.ip; + g_session.m_serverName = servers[*reinterpret_cast(this->selectedServerStorage)].address.name; g_checkAttendanceMgr->LoadLocal(g_session.m_serverName); this->pendingCursorType = 5; return 0; @@ -3125,27 +3125,27 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, } return 0; case LMM_PASSWORD: - strcpy(reinterpret_cast(this->unknown_0138), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(this->loginCredentials), reinterpret_cast(argument1)); return 0; case LMM_ID: - strcpy(reinterpret_cast(&this->unknown_0138[0x40]), reinterpret_cast(argument1)); - strcpy(reinterpret_cast(g_session.unknown_07F4), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(&this->loginCredentials[0x40]), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(g_session.characterSelectionData), reinterpret_cast(argument1)); return 0; case LMM_SELECT_CHARACTER: { - g_session.unknown_0F50 = static_cast(g_selectedSlotIndex); + g_session.selectedCharacterSlot = static_cast(g_selectedSlotIndex); g_windowMgr.LoadShortcutItems(); for (int i = 0; i < this->characterCount; ++i) { if (this->characters[i].slot == static_cast(g_selectedSlotIndex)) { - *reinterpret_cast(&g_session.unknown_0EA0[0x00]) = this->characters[i].slot; + *reinterpret_cast(&g_session.characterLoginData[0x00]) = this->characters[i].slot; g_session.SetJob(this->characters[i].job); g_session.m_gid = this->characters[i].gid; - *reinterpret_cast(g_session.unknown_16F4) = this->characters[i].speed; + *reinterpret_cast(g_session.healthPoints) = this->characters[i].speed; g_session.InvalidateWindowFrames(); g_session.m_level = this->characters[i].level; g_session.InvalidateWindowFrames(); g_session.m_skillPoint = this->characters[i].skillPoint; g_session.InvalidateWindowFrames(); - *reinterpret_cast(g_session.unknown_1654) = this->characters[i].jobPoint; + *reinterpret_cast(g_session.statusPoints) = this->characters[i].jobPoint; g_session.InvalidateWindowFrames(); g_session.m_standardStats[0] = this->characters[i].stats[0]; g_session.InvalidateWindowFrames(); @@ -3159,54 +3159,54 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, g_session.InvalidateWindowFrames(); g_session.m_standardStats[5] = this->characters[i].stats[5]; g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_162C[0x04]) = this->characters[i].exp; + *reinterpret_cast(&g_session.playerExperienceState[0x04]) = this->characters[i].exp; g_session.InvalidateWindowFrames(); const int hp = static_cast(this->characters[i].hp); - if (g_session.unknown_5568 != hp) { - g_session.unknown_5568 = hp; + if (g_session.hp != hp) { + g_session.hp = hp; g_session.RefreshHpSpWindows(); } const int maxHp = static_cast(this->characters[i].maxHp); - if (g_session.unknown_556C != maxHp) { - g_session.unknown_556C = maxHp; + if (g_session.maxHp != maxHp) { + g_session.maxHp = maxHp; g_session.RefreshHpSpWindows(); } const int sp = static_cast(this->characters[i].sp); - if (*reinterpret_cast(&g_session.unknown_5570[0x00]) != sp) { - *reinterpret_cast(&g_session.unknown_5570[0x00]) = sp; + if (*reinterpret_cast(&g_session.spAndHomunculusStats[0x00]) != sp) { + *reinterpret_cast(&g_session.spAndHomunculusStats[0x00]) = sp; g_session.RefreshHpSpWindows(); } const int maxSp = static_cast(this->characters[i].maxSp); - if (*reinterpret_cast(&g_session.unknown_5570[0x04]) != maxSp) { - *reinterpret_cast(&g_session.unknown_5570[0x04]) = maxSp; + if (*reinterpret_cast(&g_session.spAndHomunculusStats[0x04]) != maxSp) { + *reinterpret_cast(&g_session.spAndHomunculusStats[0x04]) = maxSp; g_session.RefreshHpSpWindows(); } - g_session.m_zeny = *reinterpret_cast(&this->characters[i].unknown_000C[0x00]); + g_session.m_zeny = *reinterpret_cast(&this->characters[i].progressionData[0x00]); g_session.RefreshHpSpWindows(); g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_162C[0x1C]) = *reinterpret_cast(&this->characters[i].unknown_000C[0x04]); + *reinterpret_cast(&g_session.playerExperienceState[0x1C]) = *reinterpret_cast(&this->characters[i].progressionData[0x04]); g_session.InvalidateWindowFrames(); - *reinterpret_cast(g_session.unknown_1704) = *reinterpret_cast(&this->characters[i].unknown_000C[0x1C]); + *reinterpret_cast(g_session.optionFlags) = *reinterpret_cast(&this->characters[i].progressionData[0x1C]); g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_16F4[0x04]) = *reinterpret_cast(&this->characters[i].unknown_000C[0x20]); + *reinterpret_cast(&g_session.healthPoints[0x04]) = *reinterpret_cast(&this->characters[i].progressionData[0x20]); g_session.InvalidateWindowFrames(); - g_session.m_jobLevel = *reinterpret_cast(&this->characters[i].unknown_000C[0x0C]); + g_session.m_jobLevel = *reinterpret_cast(&this->characters[i].progressionData[0x0C]); g_session.InvalidateWindowFrames(); - *reinterpret_cast(&g_session.unknown_0EA0[0x30]) = this->characters[i].unknown_008B[0]; + *reinterpret_cast(&g_session.characterLoginData[0x30]) = this->characters[i].characterFlags[0]; g_session.m_head = this->characters[i].head; - *reinterpret_cast(&g_session.unknown_0EDC[0x04]) = 0; - *reinterpret_cast(&g_session.unknown_0EDC[0x08]) = 0; - *reinterpret_cast(&g_session.unknown_0EF4[0x00]) = this->characters[i].accessory; - *reinterpret_cast(&g_session.unknown_0EDC[0x0C]) = this->characters[i].shield; - g_session.UpdateBodyStyle(this->characters[i].job, this->characters[i].bodyStyle, this->characters[i].unknown_0058); + *reinterpret_cast(&g_session.weaponAppearance[0x04]) = 0; + *reinterpret_cast(&g_session.weaponAppearance[0x08]) = 0; + *reinterpret_cast(&g_session.accessoryAppearance[0x00]) = this->characters[i].accessory; + *reinterpret_cast(&g_session.weaponAppearance[0x0C]) = this->characters[i].shield; + g_session.UpdateBodyStyle(this->characters[i].job, this->characters[i].bodyStyle, this->characters[i].bodyCostume); g_session.m_headPalette = this->characters[i].headPalette; - *reinterpret_cast(&g_session.unknown_0EF4[0x04]) = this->characters[i].accessory2; - *reinterpret_cast(&g_session.unknown_0EF4[0x08]) = this->characters[i].accessory3; + *reinterpret_cast(&g_session.accessoryAppearance[0x04]) = this->characters[i].accessory2; + *reinterpret_cast(&g_session.accessoryAppearance[0x08]) = this->characters[i].accessory3; g_session.m_robe = this->characters[i].robe; - g_session.m_bodyCostume = this->characters[i].unknown_0058; - *reinterpret_cast(&g_session.unknown_0F0C[0x00]) = *reinterpret_cast(&this->characters[i].unknown_000C[0x10]); - *reinterpret_cast(&g_session.unknown_0F0C[0x04]) = *reinterpret_cast(&this->characters[i].unknown_000C[0x14]); - g_session.m_jobFlags = *reinterpret_cast(&this->characters[i].unknown_000C[0x18]); + g_session.m_bodyCostume = this->characters[i].bodyCostume; + *reinterpret_cast(&g_session.statusLevelEffects[0x00]) = *reinterpret_cast(&this->characters[i].progressionData[0x10]); + *reinterpret_cast(&g_session.statusLevelEffects[0x04]) = *reinterpret_cast(&this->characters[i].progressionData[0x14]); + g_session.m_jobFlags = *reinterpret_cast(&this->characters[i].progressionData[0x18]); return 0; } } @@ -3224,9 +3224,9 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, case LMM_GET_EMAIL_ADDRESS: return reinterpret_cast(this->billingInfo); case LMM_GET_MAKING_CHAR_NAME: - return reinterpret_cast(&this->unknown_0078); + return reinterpret_cast(&this->makingCharNameFirstByte); case LMM_SET_MAKING_CHAR_NAME: - strcpy(reinterpret_cast(&this->unknown_0078), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(&this->makingCharNameFirstByte), reinterpret_cast(argument1)); return 0; case LMM_GET_CHAR_PARAM: return reinterpret_cast(this->charParams); @@ -3238,8 +3238,8 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, this->charParams[3] = values[3]; this->charParams[4] = values[4]; this->charParams[5] = values[5]; - this->unknown_0070 = values[6]; - this->unknown_0074 = values[7]; + this->characterParameter7 = values[6]; + this->characterParameter8 = values[7]; return 0; } case LMM_GOTOSELECTACCOUNT: @@ -3250,8 +3250,8 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, this->pendingCursorType = 2; return 0; case LMM_SELECTACCOUNT: - this->unknown_6F48 = argument1; - *reinterpret_cast(&g_session.unknown_5478[4]) = argument1; + this->selectedAccount = argument1; + *reinterpret_cast(&g_session.loginOptions[4]) = argument1; TraceSelection(argument1); if (g_serviceType == 19) { std::string suffix; @@ -3281,12 +3281,12 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, return 0; case LMM_GET_BILLING_INFO: { char* output = reinterpret_cast(argument1); - switch (this->slotExtension.unknown_0001) { + switch (this->slotExtension.code) { case 100: - std::sprintf(output, LookupMessage(MSI_BILLING_100), this->slotExtension.unknown_0005 / 60); + std::sprintf(output, LookupMessage(MSI_BILLING_100), this->slotExtension.time1 / 60); return 0; case 200: { - const std::uint32_t value = this->slotExtension.unknown_0005; + const std::uint32_t value = this->slotExtension.time1; std::sprintf(output, LookupMessage(MSI_BILLING_200), value / 3600, (value / 60) % 60, value % 60); return 0; } @@ -3294,13 +3294,13 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, std::sprintf(output, LookupMessage(MSI_BILLING_300)); return 0; case 400: { - const std::uint32_t value = this->slotExtension.unknown_0009 - this->slotExtension.unknown_0005; + const std::uint32_t value = this->slotExtension.time2 - this->slotExtension.time1; std::sprintf(output, LookupMessage(MSI_BILLING_400), value / 3600, (value / 60) % 60, value % 60); return 0; } case 500: { - const std::uint32_t value = this->slotExtension.unknown_0005 != 0 ? this->slotExtension.unknown_0005 : this->slotExtension.unknown_0009; - const int messageId = this->slotExtension.unknown_0005 != 0 ? 0x219 : 0x21A; + const std::uint32_t value = this->slotExtension.time1 != 0 ? this->slotExtension.time1 : this->slotExtension.time2; + const int messageId = this->slotExtension.time1 != 0 ? 0x219 : 0x21A; std::sprintf(output, LookupMessage(messageId), value / 3600, (value / 60) % 60, value % 60); return 0; } @@ -3327,18 +3327,18 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, } return 0; case LMM_SELECTACCOUNT2: - this->unknown_6F4C = argument1; - this->unknown_6F38.clear(); - TraceSelectionRange(this->unknown_6F48, this->unknown_6F4C); + this->selectedSecondaryAccount = argument1; + this->accountInfo.clear(); + TraceSelectionRange(this->selectedAccount, this->selectedSecondaryAccount); this->pendingCursorType = 3; return 0; case LMM_SET_AUTH_CODE: - strcpy(reinterpret_cast(&this->unknown_0138[0x80]), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(&this->loginCredentials[0x80]), reinterpret_cast(argument1)); return 0; case LMM_REPLAY_SELECT_SERVER: reinterpret_cast(&GetRagConnection())[0x6C] = 0; - g_session.m_aid = ReplayFileList::Instance().unknown_011C; - g_session.SetFlag(static_cast(ReplayFileList::Instance().unknown_0120)); + g_session.m_aid = ReplayFileList::Instance().selectionState; + g_session.SetFlag(static_cast(ReplayFileList::Instance().dialogState)); this->pendingCursorType = 6; return 0; case LMM_SELECT_REPLAY_DATA: @@ -3346,7 +3346,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, this->pendingCursorType = 27; return 0; case LMM_START_REPLAY: - g_session.SetFlag(static_cast(Replay::Instance().header.unknown_0014)); + g_session.SetFlag(static_cast(Replay::Instance().header.sessionSyncValue)); this->pendingCursorType = 28; return 0; case LMM_SELECT_MAP: @@ -3362,7 +3362,7 @@ int CLoginMode::SendMsg(int event, int argument1, int argument2, int argument3, this->pendingCursorType = argument1; return reinterpret_cast(this->billingInfo); case LMM_SET_LOGIN_EXTRA: - strcpy(reinterpret_cast(this->unknown_01D0), reinterpret_cast(argument1)); + strcpy(reinterpret_cast(this->loginExtra), reinterpret_cast(argument1)); return 0; default: return CMode::SendMsg(event, argument1, argument2, argument3, 0); @@ -3587,8 +3587,8 @@ __declspec(noinline) static std::uint32_t ParseXmlAddress(const std::string* tex // FUNCTION: fn_45408 void __stdcall LoadCustomServerList(CLoginMode* mode) { ServerAddress2* servers = reinterpret_cast(mode->serverList); - mode->unknown_01C4 = 0; - *reinterpret_cast(mode->unknown_01C8) = -1; + mode->serverCount = 0; + *reinterpret_cast(mode->selectedServerStorage) = -1; XmlNode* connection = g_clientInfoRoot->FindChild("connection"); int count = 0; @@ -3635,9 +3635,9 @@ void __stdcall LoadCustomServerList(CLoginMode* mode) { connection = connection->FindSibling("connection"); } - mode->unknown_01C4 = count; + mode->serverCount = count; if (count != 0) { - *reinterpret_cast(mode->unknown_01C8) = 0; + *reinterpret_cast(mode->selectedServerStorage) = 0; } } @@ -3647,8 +3647,8 @@ void CLoginMode::OnChangeState(int value) { this->otpStarted = timeGetTime(); g_windowMgr.Shutdown(); this->tooltip = nullptr; - g_session.unknown_5480 = 0; - this->unknown_0018 = 1; + g_session.quitBlocked = 0; + this->connectionReady = 1; ServerAddress2* servers = reinterpret_cast(this->serverList); SessionAccount& account = *reinterpret_cast(&g_session.m_sex); @@ -3662,7 +3662,7 @@ void CLoginMode::OnChangeState(int value) { case 38: { CharServerEndpoint endpoint; std::memset(&endpoint, 0, sizeof(endpoint)); - if (!std::strstr(g_session.unknown_58FA, "Dev")) { + if (!std::strstr(g_session.clientVersion, "Dev")) { const int port = rand() % 3 + 6951; const std::uint8_t hostSource[] = {0x24, 0xD3, 0xA0, 0x18, 0x02, 0xB0, 0x24, 0x17, 0x2C, 0xD8, 0xE1, 0x47, 0x02, 0xB0, 0x2F, 0x18, 0x3D, 0xCE, 0xA4, 0x1B, 0x00, 0xB8, 0x6F, 0x12, 0x3D, 0xA1}; @@ -3681,8 +3681,8 @@ void CLoginMode::OnChangeState(int value) { StringFormat(endpoint.host, sizeof(endpoint.host), static_cast(-1), format.Text(), hostText); } - this->unknown_0018 = GetRagConnection().Connect(*reinterpret_cast(&endpoint)); - if (!this->unknown_0018) { + this->connectionReady = GetRagConnection().Connect(*reinterpret_cast(&endpoint)); + if (!this->connectionReady) { GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_SERVER_CONNECTION_FAILED), 1, true, true, 0, "Message", 280, 120, 0) != 0x10D) { this->pendingCursorType = 3; @@ -3698,15 +3698,15 @@ void CLoginMode::OnChangeState(int value) { std::memcpy(packet.code, code.Text(), sizeof(packet.code)); const std::uint8_t nameFormatSource[] = {0x38, 0xB4, 0x4B}; thread_local EncryptedName nameFormat(nameFormatSource); - StringFormat(packet.name, sizeof(packet.name), static_cast(-1), nameFormat.Text(), reinterpret_cast(&this->unknown_0138[0x40])); + StringFormat(packet.name, sizeof(packet.name), static_cast(-1), nameFormat.Text(), reinterpret_cast(&this->loginCredentials[0x40])); char password[33] = {}; const std::uint8_t passwordFormatSource[] = {0xE0, 0x5E, 0x2B}; thread_local EncryptedName passwordFormat(passwordFormatSource); - StringFormat(password, sizeof(password), static_cast(-1), passwordFormat.Text(), reinterpret_cast(this->unknown_0138)); + StringFormat(password, sizeof(password), static_cast(-1), passwordFormat.Text(), reinterpret_cast(this->loginCredentials)); DecryptRijndael256(password, packet.password); const std::uint8_t extraFormatSource[] = {0x7E, 0x20, 0x5F}; thread_local EncryptedName extraFormat(extraFormatSource); - StringFormat(packet.extra, sizeof(packet.extra), static_cast(-1), extraFormat.Text(), reinterpret_cast(this->unknown_01D0)); + StringFormat(packet.extra, sizeof(packet.extra), static_cast(-1), extraFormat.Text(), reinterpret_cast(this->loginExtra)); GetRagConnection().Send(sizeof(packet), &packet); this->otpStarted = timeGetTime(); this->window_6F14 = g_windowMgr.EnsureWindow(WID_WAITWND); @@ -3722,12 +3722,12 @@ void CLoginMode::OnChangeState(int value) { g_emblemDataMgr->RefreshUrls(*g_session.m_hotkeyScript, *g_session.m_hotkeyScript, g_serviceHost, g_servicePort, g_serviceOverrideKey); this->wallpaperName = g_loginWallpaperName; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); - if (!g_session.unknown_5912) { + if (!g_session.characterRenameEnabled) { if (g_session.m_loginModeFlag == true) { this->otpStarted = timeGetTime(); g_charServerAccountIdPending = 0; - this->unknown_6F74 = false; - this->unknown_6F75 = false; + this->loginResponseReceived = false; + this->otpPending = false; SecureZeroMemory(g_session.m_loginErrorText, sizeof(g_session.m_loginErrorText)); } @@ -3759,15 +3759,15 @@ void CLoginMode::OnChangeState(int value) { if (g_loginCancelRequested == 1) { g_loginCancelRequested = 0; LoadCustomServerList(this); - } else if (this->unknown_01C4 < 1 || this->unknown_01C4 > 8) { + } else if (this->serverCount < 1 || this->serverCount > 8) { LoadCustomServerList(this); } - if (this->unknown_01C4 != 0) { + if (this->serverCount != 0) { g_customServerListLoaded = 1; } char(*displayNames)[128] = CustomServerBalloons(); - for (int i = 0; i < this->unknown_01C4; ++i) { + for (int i = 0; i < this->serverCount; ++i) { const ServerAddress2& server = servers[i]; char text[64]; std::memset(text, 0, sizeof(text)); @@ -3836,9 +3836,9 @@ void CLoginMode::OnChangeState(int value) { g_skillTooltipActive = 0; g_session.cartCount = 0; g_session.cartWeight = 0; - g_session.unknown_103C = -1; + g_session.petJob = -1; g_session.SetUnknown16EC(0); - g_session.unknown_5450 = 0; + g_session.guildLeader = 0; g_renewQuestMgr->m_ongoingQuests.clear(); g_session.ClearAchievements(); g_nProtectGameGuardMgr->IncrementCounter(); @@ -3870,14 +3870,14 @@ void CLoginMode::OnChangeState(int value) { g_session.m_passwordInputAlternate = false; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDINPUTWND); - g_windowMgr.unknown_03B8->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); + g_windowMgr.secondPasswordInputWnd->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); break; case 4: g_session.m_passwordInputAlternate = true; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_windowMgr.EnsureWindow(WID_SECONDPASSWORDEDITWND); - g_windowMgr.unknown_03BC->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); - g_windowMgr.unknown_03BC->SendMsg(nullptr, UM_COMMAND, ID_OK, 1, 0, 0); + g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); + g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_OK, 1, 0, 0); break; case 5: g_session.m_passwordInputAlternate = true; @@ -3895,7 +3895,7 @@ void CLoginMode::OnChangeState(int value) { g_playerNameDictionary->Clear(); this->wallpaperName = g_loginWallpaperName; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); - if (!std::strstr(g_session.unknown_58FA, "Dev")) { + if (!std::strstr(g_session.clientVersion, "Dev")) { const std::uint8_t hostSource[] = {0xBA, 0x29, 0xF8, 0xC8, 0x58, 0xE4, 0x88, 0x1E, 0xFF, 0x29, 0xF6, 0x82, 0x57, 0xE6, 0x99, 0x40, 0xBA, 0x75, 0xF4, 0x8A, 0x17, 0xEC, 0x99, 0x15, 0xE7, 0x62, 0xA7, 0xD5, 0x39}; thread_local EncryptedName host(hostSource); @@ -3930,8 +3930,8 @@ void CLoginMode::OnChangeState(int value) { endpoint.port = atoi(port); } - this->unknown_0018 = GetRagConnection().Connect(*reinterpret_cast(&endpoint)); - if (!this->unknown_0018) { + this->connectionReady = GetRagConnection().Connect(*reinterpret_cast(&endpoint)); + if (!this->connectionReady) { GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_SERVER_CONNECTION_FAILED), 1, true, true, 0, "Message", 280, 120, 0) != 0x10D) { g_charServerAccountIdPending = 0; @@ -3945,15 +3945,15 @@ void CLoginMode::OnChangeState(int value) { AccountLoginPacket packet; packet.id = 0x64; packet.version = g_patchedClientVersion; - std::memcpy(packet.name, &this->unknown_0138[0x40], sizeof(packet.name)); + std::memcpy(packet.name, &this->loginCredentials[0x40], sizeof(packet.name)); if (g_serviceType == 7) { char password[24]; - DecryptAES(reinterpret_cast(this->unknown_0138), password, sizeof(password)); + DecryptAES(reinterpret_cast(this->loginCredentials), password, sizeof(password)); std::memcpy(packet.password, password, sizeof(packet.password)); } else if (g_serviceType == 4) { - DecryptRijndael192(reinterpret_cast(this->unknown_0138), packet.password); + DecryptRijndael192(reinterpret_cast(this->loginCredentials), packet.password); } else { - std::memcpy(packet.password, this->unknown_0138, sizeof(packet.password)); + std::memcpy(packet.password, this->loginCredentials, sizeof(packet.password)); } packet.clientType = static_cast(GetClientType()); GetRagConnection().Send(reinterpret_cast(&GetRagConnection())->FixedLength(packet.id), &packet); @@ -3968,8 +3968,8 @@ void CLoginMode::OnChangeState(int value) { g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); g_session.m_partyBooking.Reset(); GetRagConnection().Close(); - this->unknown_0018 = GetRagConnection().Connect(*reinterpret_cast(&g_charServerEndpoint)); - if (!this->unknown_0018) { + this->connectionReady = GetRagConnection().Connect(*reinterpret_cast(&g_charServerEndpoint)); + if (!this->connectionReady) { GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_SERVER_CONNECTION_FAILED), 1, true, true, 0, "Message", 280, 120, 0) != 0x10D) { g_charServerAccountIdPending = 0; @@ -4049,11 +4049,11 @@ void CLoginMode::OnChangeState(int value) { case 12: { g_characterLinkedUserDataMgr->Load(g_session.m_aid, g_session.m_gid, g_session.m_accountName); g_runeSystemMgr->Reset(); - g_session.unknown_593C = 0; + g_session.memorialWindowOpen = 0; this->wallpaperName = g_loginWallpaperName; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); - this->unknown_0018 = GetRagConnection().Connect(g_zoneServerEndpoint); - if (!this->unknown_0018) { + this->connectionReady = GetRagConnection().Connect(g_zoneServerEndpoint); + if (!this->connectionReady) { GetRagConnection().Close(); if (g_windowMgr.Confirm(LookupMessage(MSI_SERVER_CONNECTION_FAILED), 1, true, true, 0, "Message", 280, 120, 0) != 0x10D) { g_charServerAccountIdPending = 0; @@ -4096,7 +4096,7 @@ void CLoginMode::OnChangeState(int value) { g_screenShakeDuration = 0; g_statusRefreshSuppressed = 0; g_skillTooltipActive = 0; - g_session.unknown_103C = -1; + g_session.petJob = -1; g_session.SetUnknown16EC(0); this->wallpaperName = g_loginWallpaperName; g_windowMgr.SetSurface0478(reinterpret_cast(ResourceMgr::Instance().Load(Resolve(this->wallpaperName.c_str())))); @@ -4127,12 +4127,12 @@ void CLoginMode::OnChangeState(int value) { } break; case 26: - this->unknown_01C4 = ReplayFileList::Instance().unknown_0124; - if (this->unknown_01C4 > 100) { - this->unknown_01C4 = 0; - ReplayFileList::Instance().unknown_0124 = 0; + this->serverCount = ReplayFileList::Instance().fileState; + if (this->serverCount > 100) { + this->serverCount = 0; + ReplayFileList::Instance().fileState = 0; } - for (int i = 0; i < this->unknown_01C4; ++i) { + for (int i = 0; i < this->serverCount; ++i) { std::memcpy(&servers[i], &reinterpret_cast(ReplayFileList::Instance().buffer)[i], sizeof(ServerAddress2)); } this->SendMsg(LMM_SELECT_REPLAY_DATA, 0, 0, 0, 0); @@ -4146,12 +4146,12 @@ void CLoginMode::OnChangeState(int value) { window->m_list->AddLine(ReplayFileList::Instance().FileName(i)); } window->SendMsg(nullptr, UM_SETCURITEM, 0, 0, 0, 0); - ReplayFileList::Instance().unknown_0124 = this->unknown_01C4; - if (this->unknown_01C4 > 100) { - this->unknown_01C4 = 0; - ReplayFileList::Instance().unknown_0124 = 0; + ReplayFileList::Instance().fileState = this->serverCount; + if (this->serverCount > 100) { + this->serverCount = 0; + ReplayFileList::Instance().fileState = 0; } - for (int i = 0; i < this->unknown_01C4; ++i) { + for (int i = 0; i < this->serverCount; ++i) { const ServerAddress2 server = servers[i]; reinterpret_cast(ReplayFileList::Instance().buffer)[i] = server; } @@ -4176,10 +4176,10 @@ void CLoginMode::OnChangeState(int value) { ReplayHeader header = Replay::Instance().header; g_session.SetPlayerNameKey(reinterpret_cast(header.characterName)); g_session.SetNavigationPlayerMap(header.mapName); - g_session.unknown_0000 = header.accountId; + g_session.mapPropertyId = header.accountId; g_session.m_playerX = header.cellX; g_session.m_playerY = header.cellY; - g_session.m_playerDir = header.unknown_0078; + g_session.m_playerDir = header.playerDirection; g_windowMgr.ApplyReplayOptions(header.options); g_session.ResetUnknownState(); g_session.ReadReplayCharacter(Replay::Instance().ReadSection(3)); diff --git a/Source/Client/Mode/ModeCursor.cpp b/Source/Client/Mode/ModeCursor.cpp index 1d6dd8742..2d79602e3 100644 --- a/Source/Client/Mode/ModeCursor.cpp +++ b/Source/Client/Mode/ModeCursor.cpp @@ -9,13 +9,13 @@ CMode::CMode() : screenshotName("") { this->running = 1; this->pendingCursorType = -1; - this->unknown_0018 = 1; + this->connectionReady = 1; this->tooltip = nullptr; this->tooltipTick = timeGetTime(); this->cursorAction = 0; this->cursorActionFrame = 0; this->cursorTick = timeGetTime(); - this->unknown_0028 = 0; + this->lockOnMouse = 0; this->screenshotRequested = 0; this->cursorOffsetX = 0.0f; this->cursorOffsetY = 0.0f; diff --git a/Source/Client/Mode/ModeDragState.cpp b/Source/Client/Mode/ModeDragState.cpp index b7127e597..0b0c062e5 100644 --- a/Source/Client/Mode/ModeDragState.cpp +++ b/Source/Client/Mode/ModeDragState.cpp @@ -17,7 +17,7 @@ void ModeDragState::Clear() { this->identified = 0; this->id = 0; this->name = ""; - this->unknown_0310 = 0; + this->itemValue = 0; this->resource = ""; this->source = 0; this->quantity = 0; @@ -25,7 +25,7 @@ void ModeDragState::Clear() { this->skillLevel = 0; this->refine = 0; std::memset(this->cards, 0, sizeof(this->cards)); - this->unknown_03B0 = -1; + this->barterId = -1; this->grade = 0; } @@ -37,33 +37,33 @@ void ModeDragState::BeginItem( windows.ShowWindowById(WID_ITEMDROPCNTWND, 0); this->Clear(); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } this->source = sourceValue; this->skill = 0; - this->id = item.unknown_0000[1]; + this->id = item.identity[1]; this->quantity = quantityValue; this->resource = g_session.ItemDragResource(item.itemId.c_str(), item.identified); this->name = item.itemId; - this->unknown_0310 = item.unknown_0014[0]; - this->unknown_0314 = item.unknown_0014[1]; - this->type = item.unknown_0000[0]; + this->itemValue = item.prices[0]; + this->price = item.prices[1]; + this->type = item.identity[0]; this->identified = item.identified; this->slot = slotValue; - this->refine = item.unknown_0060; - std::memcpy(this->cards, item.unknown_001C, sizeof(this->cards)); - this->optionCount = item.unknown_0098; + this->refine = item.refiningLevel; + std::memcpy(this->cards, item.cards, sizeof(this->cards)); + this->optionCount = item.optionCount; for (int index = 0; index < this->optionCount; ++index) { - std::memcpy(this->options + 5 * index, item.unknown_009C + 5 * index, 5); + std::memcpy(this->options + 5 * index, item.options + 5 * index, 5); } - this->grade = static_cast(item.unknown_0088); - this->unknown_03B6 = item.unknown_0074[3]; - this->unknown_03B8 = item.unknown_0000[2]; - this->unknown_03C0 = item.unknown_0070; + this->grade = static_cast(item.grade); + this->uniqueItem = item.flags[3]; + this->equipmentLocation = item.identity[2]; + this->viewId = item.sprite; } // OFFSET: 0x00CFE2A0 @@ -98,11 +98,11 @@ void ModeDragState::BeginBarterItem(int sourceValue, const BarterMarketItem& ite this->skill = 0; this->resource = g_session.ItemDragResource(item.name.c_str(), item.flag_24); this->name = item.name.c_str(); - this->unknown_0310 = item.field_20; + this->itemValue = item.field_20; this->type = item.field_1c; this->identified = item.flag_24; this->slot = slotValue; - this->unknown_03B0 = item.id; + this->barterId = item.id; } // OFFSET: 0x00CFE060 @@ -115,10 +115,10 @@ void ModeDragState::BeginBarterEntry(int sourceValue, const BarterMarketEntry& e this->skill = 0; this->resource = g_session.ItemDragResource(entry.name.c_str(), entry.flag_24); this->name = entry.name.c_str(); - this->unknown_0310 = entry.field_8; + this->itemValue = entry.field_8; this->type = entry.field_0; this->identified = entry.flag_24; this->slot = slotValue; this->refine = entry.field_28; - this->unknown_03B0 = entry.id; + this->barterId = entry.id; } diff --git a/Source/Client/Mode/ModeDragState.h b/Source/Client/Mode/ModeDragState.h index 73edd2279..a7a0fc8c6 100644 --- a/Source/Client/Mode/ModeDragState.h +++ b/Source/Client/Mode/ModeDragState.h @@ -13,8 +13,8 @@ struct BarterMarketEntry; struct ModeDragState { /* 0308 */ int source; /* 030C */ std::uint32_t id; - /* 0310 */ std::uint32_t unknown_0310; - /* 0314 */ std::uint32_t unknown_0314; + /* 0310 */ std::uint32_t itemValue; + /* 0314 */ std::uint32_t price; /* 0318 */ int quantity; /* 031C */ int slot; /* 0320 */ std::uint32_t type; @@ -26,14 +26,14 @@ struct ModeDragState { /* 0374 */ int skillLevel; /* 0378 */ unsigned char cards[16]; /* 0388 */ unsigned char skill; - /* 038C */ std::uint32_t unknown_038C; + /* 038C */ std::uint32_t sourceWindow; /* 0390 */ int optionCount; /* 0394 */ unsigned char options[25]; - /* 03B0 */ int unknown_03B0; + /* 03B0 */ int barterId; /* 03B4 */ std::uint16_t grade; - /* 03B6 */ unsigned char unknown_03B6; - /* 03B8 */ std::uint32_t unknown_03B8; - /* 03C0 */ std::int64_t unknown_03C0; + /* 03B6 */ unsigned char uniqueItem; + /* 03B8 */ std::uint32_t equipmentLocation; + /* 03C0 */ std::int64_t viewId; void Clear(); void BeginItem(WindowManagerWindows& windows, int source, const ITEM_INFO& item, int quantity, int slot); diff --git a/Source/Client/ModeCursorDrawing.cpp b/Source/Client/ModeCursorDrawing.cpp index ecdb23075..f53613f49 100644 --- a/Source/Client/ModeCursorDrawing.cpp +++ b/Source/Client/ModeCursorDrawing.cpp @@ -103,9 +103,9 @@ void CMode::DrawCursor() { const float scaleX = cell.scaleX; const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; float left = static_cast(cell.x); - float right = static_cast(image->width * (image->unknown_0004 + 1) - 1 + cell.x); + float right = static_cast(image->width * (image->doubleWidth + 1) - 1 + cell.x); const float top = static_cast(cell.y) * cell.scaleY; - const float bottom = static_cast(image->height * (image->unknown_0006 + 1) - 1 + cell.y) * cell.scaleY; + const float bottom = static_cast(image->height * (image->doubleHeight + 1) - 1 + cell.y) * cell.scaleY; CTexture* texture; if (cell.imageType == 0) { @@ -114,7 +114,7 @@ void CMode::DrawCursor() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, sprite->palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } primitive->texture = texture; diff --git a/Source/Client/Replay.cpp b/Source/Client/Replay.cpp index 7cc687391..ef4976bfe 100644 --- a/Source/Client/Replay.cpp +++ b/Source/Client/Replay.cpp @@ -161,7 +161,7 @@ ReplaySection::~ReplaySection() { // OFFSET: 0x00B83540 // FUNCTION: fn_19300 -Replay::Replay() : cipherIndex(0), cipherBase(0), cipherKey(0), unknown_01F4(0), unknown_01F8(0) { +Replay::Replay() : cipherIndex(0), cipherBase(0), cipherKey(0), recordingState(0), playbackState(0) { this->state = 1; this->baseFrame = 0; this->started = 0; @@ -172,8 +172,8 @@ Replay::Replay() : cipherIndex(0), cipherBase(0), cipherKey(0), unknown_01F4(0), std::memset(&this->header.options, 1, sizeof(this->header.options)); this->ResetFile(); this->previousTick = timeGetTime(); - this->unknown_01F8 = 0; - this->unknown_01F4 = 0; + this->playbackState = 0; + this->recordingState = 0; this->cachedPackets.resize(3143, ReplayCachedPacket{}); this->cachedPackets[2459].enabled = true; this->cachedPackets[470].enabled = true; @@ -287,13 +287,13 @@ std::vector Replay::BuildMetadata() { AppendRecord(metadata, MakeReplayRecord(950, nullptr, 0)); AppendRecord(metadata, MakeReplayRecord(961, &this->header.service, sizeof(this->header.service))); AppendRecord(metadata, MakeReplayRecord(962, &this->header.serviceType, sizeof(this->header.serviceType))); - AppendRecord(metadata, MakeReplayRecord(963, &this->header.unknown_0014, sizeof(this->header.unknown_0014))); + AppendRecord(metadata, MakeReplayRecord(963, &this->header.sessionSyncValue, sizeof(this->header.sessionSyncValue))); AppendRecord(metadata, MakeReplayRecord(964, this->header.characterName, sizeof(this->header.characterName))); AppendRecord(metadata, MakeReplayRecord(965, this->header.mapName, sizeof(this->header.mapName))); AppendRecord(metadata, MakeReplayRecord(966, &this->header.accountId, sizeof(this->header.accountId))); AppendRecord(metadata, MakeReplayRecord(967, &this->header.cellX, sizeof(this->header.cellX))); AppendRecord(metadata, MakeReplayRecord(968, &this->header.cellY, sizeof(this->header.cellY))); - AppendRecord(metadata, MakeReplayRecord(969, &this->header.unknown_0078, sizeof(this->header.unknown_0078))); + AppendRecord(metadata, MakeReplayRecord(969, &this->header.playerDirection, sizeof(this->header.playerDirection))); AppendRecord(metadata, MakeReplayRecord(970, &this->header.duration, sizeof(this->header.duration))); AppendRecord(metadata, MakeReplayRecord(971, &this->header.records, sizeof(this->header.records))); AppendRecord(metadata, MakeReplayRecord(972, &this->header.fileOffset, sizeof(this->header.fileOffset))); @@ -517,7 +517,7 @@ std::uint32_t Replay::ParseMetadata(const std::vector& data) { offset += tag.bytes; break; case 0x3C3: - std::memcpy(&this->header.unknown_0014, &data[offset], tag.bytes); + std::memcpy(&this->header.sessionSyncValue, &data[offset], tag.bytes); offset += tag.bytes; break; case 0x3C6: @@ -541,7 +541,7 @@ std::uint32_t Replay::ParseMetadata(const std::vector& data) { offset += tag.bytes; break; case 0x3C9: - std::memcpy(&this->header.unknown_0078, &data[offset], tag.bytes); + std::memcpy(&this->header.playerDirection, &data[offset], tag.bytes); offset += tag.bytes; break; case 0x3CA: @@ -685,12 +685,12 @@ void ReplayFileList::Refresh() { ReplayFileEntry entry = {}; std::memcpy(entry.name, found.cFileName, length); entry.name[length] = '\0'; - entry.unknown_0000 = 0; + entry.index = 0; if (length == 23) { char number[6] = {}; std::memcpy(number, entry.name + 15, 4); - entry.unknown_0000 = std::atoi(number); + entry.index = std::atoi(number); } this->files.push_back(entry); @@ -823,7 +823,7 @@ int ReplayFileList::Open(int mode, int argument1, int argument2) { int index = 1; for (std::size_t i = 0; i < this->files.size(); ++i) { - if (this->files[i].unknown_0000 == index) { + if (this->files[i].index == index) { ++index; } } @@ -831,7 +831,7 @@ int ReplayFileList::Open(int mode, int argument1, int argument2) { std::memset(this->path, 0, sizeof(this->path)); std::sprintf(this->path, g_replayNewFileFormat, index); } else { - if (this->unknown_0119) { + if (this->rejectExistingName) { char name[0x104]; std::memset(name, 0, sizeof(name)); std::sprintf(name, g_replayExtensionFormat, this->path); @@ -882,13 +882,13 @@ bool Replay::SetHeaderInfo( std::memcpy(this->header.characterName, characterName, sizeof(this->header.characterName)); this->header.service = service; this->header.serviceType = serviceType; - this->header.unknown_0014 = unknown0014; + this->header.sessionSyncValue = unknown0014; this->header.key0 = key0; this->header.key1 = key1; this->header.accountId = accountId; this->header.cellX = cellX; this->header.cellY = cellY; - this->header.unknown_0078 = unknown0078; + this->header.playerDirection = unknown0078; this->header.signature = 0x52414705; this->header.closingSignature = 0x52414705; return true; @@ -942,7 +942,7 @@ std::vector CSession::BuildStatusReplayPacket() { *reinterpret_cast(data + 4) = this->m_aid; data[8] = 1; *reinterpret_cast(data + 13) = 9999; - *reinterpret_cast(data + 17) = this->unknown_5C1C; + *reinterpret_cast(data + 17) = this->replayPacketMode; return packet; } @@ -957,11 +957,11 @@ std::vector BuildSkillInfoListPacket(std::uint16_t id, const std: unsigned char* record = data + 4; for (const CSkillInfo& skill : skills) { *reinterpret_cast(record) = static_cast(skill.id); - *reinterpret_cast(record + 2) = skill.unknown_000C; + *reinterpret_cast(record + 2) = skill.type; *reinterpret_cast(record + 6) = static_cast(skill.level); - *reinterpret_cast(record + 8) = static_cast(skill.unknown_0014); - record[36] = skill.unknown_0018 != 0; - *reinterpret_cast(record + 10) = static_cast(skill.unknown_001C); + *reinterpret_cast(record + 8) = static_cast(skill.spCost); + record[36] = skill.upgradable != 0; + *reinterpret_cast(record + 10) = static_cast(skill.range); const char* name = skill.name; std::memcpy(record + 12, name, (std::min)(std::strlen(name), std::size_t{24})); record[35] = 0; @@ -996,7 +996,7 @@ std::vector CSession::BuildShortcutReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(7000, nullptr, 0)); AppendRecord(records, MakeReplayRecord(7100, this->m_shortcutSlots, sizeof(this->m_shortcutSlots))); - AppendRecord(records, MakeReplayRecord(7101, &this->unknown_06EB, sizeof(this->unknown_06EB) + sizeof(this->unknown_06F2))); + AppendRecord(records, MakeReplayRecord(7101, &this->quickSlot, sizeof(this->quickSlot) + sizeof(this->alternateQuickSlot))); AppendRecord(records, MakeReplayRecord(7001, nullptr, 0)); return records; } @@ -1041,25 +1041,25 @@ std::vector CSession::BuildReservedReplayRecords() { std::vector CSession::BuildItemReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(4500, nullptr, 0)); - AppendRecord(records, MakeReplayRecord(4701, &this->unknown_5210, sizeof(this->unknown_5210))); - AppendRecord(records, MakeReplayRecord(4702, &this->unknown_5214, sizeof(this->unknown_5214))); + AppendRecord(records, MakeReplayRecord(4701, &this->exchangeMoney, sizeof(this->exchangeMoney))); + AppendRecord(records, MakeReplayRecord(4702, &this->otherExchangeMoney, sizeof(this->otherExchangeMoney))); AppendRecord(records, MakeFramedMessage(4510, SerializeItems(this->m_inventoryItems))); - AppendRecord(records, MakeFramedMessage(4511, SerializeItems(this->unknown_1718))); - AppendRecord(records, MakeFramedMessage(4512, SerializeItems(this->unknown_1720))); - AppendRecord(records, MakeFramedMessage(4513, SerializeItems(this->unknown_1728))); - AppendRecord(records, MakeFramedMessage(4514, SerializeItems(this->unknown_1730))); - AppendRecord(records, MakeFramedMessage(4515, SerializeItems(this->unknown_1738))); - AppendRecord(records, MakeFramedMessage(4516, SerializeItems(this->unknown_1740))); - AppendRecord(records, MakeFramedMessage(4517, SerializeItems(this->unknown_1748))); - AppendRecord(records, MakeFramedMessage(4518, SerializeItems(this->unknown_1750))); - AppendRecord(records, MakeFramedMessage(4519, SerializeItems(this->unknown_1758))); - AppendRecord(records, MakeFramedMessage(4520, SerializeItems(this->unknown_1760))); - AppendRecord(records, MakeFramedMessage(4521, SerializeItems(this->unknown_1768))); - AppendRecord(records, MakeFramedMessage(4522, SerializeItems(this->unknown_1770))); - AppendRecord(records, MakeFramedMessage(4601, SerializeItems(std::list(std::begin(this->unknown_17F0), std::end(this->unknown_17F0))))); - AppendRecord(records, MakeFramedMessage(4602, SerializeItems(std::list(std::begin(this->unknown_21A0), std::end(this->unknown_21A0))))); - AppendRecord(records, MakeFramedMessage(4603, SerializeItems(std::list(std::begin(this->unknown_2B50), std::end(this->unknown_2B50))))); - AppendRecord(records, MakeFramedMessage(4604, SerializeItems(std::list(std::begin(this->unknown_3500), std::end(this->unknown_3500))))); + AppendRecord(records, MakeFramedMessage(4511, SerializeItems(this->shopItems))); + AppendRecord(records, MakeFramedMessage(4512, SerializeItems(this->purchaseItems))); + AppendRecord(records, MakeFramedMessage(4513, SerializeItems(this->sellItems))); + AppendRecord(records, MakeFramedMessage(4514, SerializeItems(this->storageItems))); + AppendRecord(records, MakeFramedMessage(4515, SerializeItems(this->cartItems))); + AppendRecord(records, MakeFramedMessage(4516, SerializeItems(this->merchantShopItems))); + AppendRecord(records, MakeFramedMessage(4517, SerializeItems(this->merchantMirrorItems))); + AppendRecord(records, MakeFramedMessage(4518, SerializeItems(this->merchantMyShopItems))); + AppendRecord(records, MakeFramedMessage(4519, SerializeItems(this->merchantPurchaseItems))); + AppendRecord(records, MakeFramedMessage(4520, SerializeItems(this->merchantHopeToSellItems))); + AppendRecord(records, MakeFramedMessage(4521, SerializeItems(this->merchantPurchaseSavedItems))); + AppendRecord(records, MakeFramedMessage(4522, SerializeItems(this->filteredInventoryItems))); + AppendRecord(records, MakeFramedMessage(4601, SerializeItems(std::list(std::begin(this->equippedItems), std::end(this->equippedItems))))); + AppendRecord(records, MakeFramedMessage(4602, SerializeItems(std::list(std::begin(this->alternateEquippedItems), std::end(this->alternateEquippedItems))))); + AppendRecord(records, MakeFramedMessage(4603, SerializeItems(std::list(std::begin(this->costumeItems), std::end(this->costumeItems))))); + AppendRecord(records, MakeFramedMessage(4604, SerializeItems(std::list(std::begin(this->alternateCostumeItems), std::end(this->alternateCostumeItems))))); AppendRecord(records, MakeFramedMessage(4605, SerializeItems(std::list(std::begin(this->m_exchangeItems), std::end(this->m_exchangeItems))))); AppendRecord(records, MakeFramedMessage(4606, SerializeItems(std::list(std::begin(this->m_itemSlots), std::end(this->m_itemSlots))))); AppendRecord(records, MakeReplayRecord(4501, nullptr, 0)); @@ -1071,41 +1071,41 @@ std::vector CSession::BuildItemReplayRecords() { std::vector CSession::BuildCompanionReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(5000, nullptr, 0)); - AppendRecord(records, MakeReplayRecord(5101, &this->unknown_5570[0x08], 4)); - AppendRecord(records, MakeReplayRecord(5102, &this->unknown_5570[0x0C], 32)); - AppendRecord(records, MakeReplayRecord(5103, &this->unknown_5570[0x2C], 4)); - AppendRecord(records, MakeReplayRecord(5104, &this->unknown_5570[0x30], 4)); - AppendRecord(records, MakeReplayRecord(5105, &this->unknown_5570[0x34], 4)); - AppendRecord(records, MakeReplayRecord(5106, &this->unknown_5570[0x38], 4)); - AppendRecord(records, MakeReplayRecord(5107, &this->unknown_5570[0x3C], 4)); - AppendRecord(records, MakeReplayRecord(5108, &this->unknown_5570[0x40], 4)); - AppendRecord(records, MakeReplayRecord(5109, &this->unknown_5570[0x44], 4)); - AppendRecord(records, MakeReplayRecord(5110, &this->unknown_5570[0x48], 4)); + AppendRecord(records, MakeReplayRecord(5101, &this->spAndHomunculusStats[0x08], 4)); + AppendRecord(records, MakeReplayRecord(5102, &this->spAndHomunculusStats[0x0C], 32)); + AppendRecord(records, MakeReplayRecord(5103, &this->spAndHomunculusStats[0x2C], 4)); + AppendRecord(records, MakeReplayRecord(5104, &this->spAndHomunculusStats[0x30], 4)); + AppendRecord(records, MakeReplayRecord(5105, &this->spAndHomunculusStats[0x34], 4)); + AppendRecord(records, MakeReplayRecord(5106, &this->spAndHomunculusStats[0x38], 4)); + AppendRecord(records, MakeReplayRecord(5107, &this->spAndHomunculusStats[0x3C], 4)); + AppendRecord(records, MakeReplayRecord(5108, &this->spAndHomunculusStats[0x40], 4)); + AppendRecord(records, MakeReplayRecord(5109, &this->spAndHomunculusStats[0x44], 4)); + AppendRecord(records, MakeReplayRecord(5110, &this->spAndHomunculusStats[0x48], 4)); AppendRecord(records, MakeReplayRecord(5111, &this->m_homunJob, sizeof(this->m_homunJob))); - AppendRecord(records, MakeReplayRecord(5112, this->unknown_55C0, 4)); + AppendRecord(records, MakeReplayRecord(5112, this->homunLevel, 4)); AppendRecord(records, MakeReplayRecord(5113, &this->m_homunHp, sizeof(this->m_homunHp))); - AppendRecord(records, MakeReplayRecord(5114, this->unknown_55C8, 4)); + AppendRecord(records, MakeReplayRecord(5114, this->homunMaxHp, 4)); AppendRecord(records, MakeReplayRecord(5115, &this->m_homunSp, sizeof(this->m_homunSp))); - AppendRecord(records, MakeReplayRecord(5116, &this->unknown_55D0, sizeof(this->unknown_55D0))); - AppendRecord(records, MakeReplayRecord(5117, &this->unknown_55D4, sizeof(this->unknown_55D4))); - AppendRecord(records, MakeReplayRecord(5118, &this->unknown_55D8, sizeof(this->unknown_55D8))); + AppendRecord(records, MakeReplayRecord(5116, &this->homunMaxSp, sizeof(this->homunMaxSp))); + AppendRecord(records, MakeReplayRecord(5117, &this->homunFriendly, sizeof(this->homunFriendly))); + AppendRecord(records, MakeReplayRecord(5118, &this->homunAccessory, sizeof(this->homunAccessory))); AppendRecord(records, MakeReplayRecord(5119, &this->m_homunExp, sizeof(this->m_homunExp))); AppendRecord(records, MakeReplayRecord(5120, &this->m_homunMaxExp, sizeof(this->m_homunMaxExp))); - AppendRecord(records, MakeReplayRecord(5121, &this->unknown_55F0, sizeof(this->unknown_55F0))); - AppendRecord(records, MakeReplayRecord(5122, &this->unknown_55F4, sizeof(this->unknown_55F4))); - AppendRecord(records, MakeReplayRecord(5123, &this->unknown_55F8, sizeof(this->unknown_55F8))); - AppendRecord(records, MakeReplayRecord(5124, &this->unknown_55FC, sizeof(this->unknown_55FC))); - AppendRecord(records, MakeReplayRecord(5125, &this->unknown_5600, sizeof(this->unknown_5600))); - AppendRecord(records, MakeReplayRecord(5126, &this->unknown_5604, sizeof(this->unknown_5604))); - AppendRecord(records, MakeReplayRecord(5127, &this->unknown_5608, sizeof(this->unknown_5608))); - AppendRecord(records, MakeReplayRecord(5128, &this->unknown_560C, sizeof(this->unknown_560C))); - AppendRecord(records, MakeReplayRecord(5129, &this->unknown_5610, sizeof(this->unknown_5610))); - AppendRecord(records, MakeReplayRecord(5130, &this->unknown_5614, sizeof(this->unknown_5614))); + AppendRecord(records, MakeReplayRecord(5121, &this->homunHunger, sizeof(this->homunHunger))); + AppendRecord(records, MakeReplayRecord(5122, &this->homunMaxHunger, sizeof(this->homunMaxHunger))); + AppendRecord(records, MakeReplayRecord(5123, &this->homunNameModified, sizeof(this->homunNameModified))); + AppendRecord(records, MakeReplayRecord(5124, &this->homunEnemyGid, sizeof(this->homunEnemyGid))); + AppendRecord(records, MakeReplayRecord(5125, &this->homunEnemyX, sizeof(this->homunEnemyX))); + AppendRecord(records, MakeReplayRecord(5126, &this->homunEnemyY, sizeof(this->homunEnemyY))); + AppendRecord(records, MakeReplayRecord(5127, &this->moveHomunEnemy, sizeof(this->moveHomunEnemy))); + AppendRecord(records, MakeReplayRecord(5128, &this->selectHomunEnemy, sizeof(this->selectHomunEnemy))); + AppendRecord(records, MakeReplayRecord(5129, &this->attackHomunEnemy, sizeof(this->attackHomunEnemy))); + AppendRecord(records, MakeReplayRecord(5130, &this->homunAlive, sizeof(this->homunAlive))); AppendRecord(records, MakeReplayRecord(5131, &this->m_traceAi, sizeof(this->m_traceAi))); AppendRecord(records, MakeReplayRecord(5132, &this->m_homunActionState, sizeof(this->m_homunActionState))); - AppendRecord(records, MakeReplayRecord(5133, &this->unknown_5620[0x0], 4)); - AppendRecord(records, MakeReplayRecord(5134, &this->unknown_5620[0x4], 4)); - AppendRecord(records, MakeReplayRecord(5201, &this->unknown_5620[0x8], 4)); + AppendRecord(records, MakeReplayRecord(5133, &this->companionTargetState[0x0], 4)); + AppendRecord(records, MakeReplayRecord(5134, &this->companionTargetState[0x4], 4)); + AppendRecord(records, MakeReplayRecord(5201, &this->companionTargetState[0x8], 4)); AppendRecord(records, MakeReplayRecord(5202, this->m_mercenaryName, sizeof(this->m_mercenaryName))); AppendRecord(records, MakeReplayRecord(5203, &this->m_mercenaryStats[0], sizeof(this->m_mercenaryStats[0]))); AppendRecord(records, MakeReplayRecord(5204, &this->m_mercenaryStats[1], sizeof(this->m_mercenaryStats[1]))); @@ -1124,31 +1124,31 @@ std::vector CSession::BuildCompanionReplayRecords() { AppendRecord(records, MakeReplayRecord(5217, &this->m_mercenaryLoyalty, sizeof(this->m_mercenaryLoyalty))); AppendRecord(records, MakeReplayRecord(5218, &this->m_mercenarySummons, sizeof(this->m_mercenarySummons))); AppendRecord(records, MakeReplayRecord(5219, &this->m_mercenaryKills, sizeof(this->m_mercenaryKills))); - AppendRecord(records, MakeReplayRecord(5220, this->unknown_5690, 4)); + AppendRecord(records, MakeReplayRecord(5220, this->mercenaryAttackRange, 4)); AppendRecord(records, MakeReplayRecord(5221, &this->m_mercenaryExpiration, sizeof(this->m_mercenaryExpiration))); - AppendRecord(records, MakeReplayRecord(5222, &this->unknown_5698, sizeof(this->unknown_5698))); - AppendRecord(records, MakeReplayRecord(5223, &this->unknown_569C, sizeof(this->unknown_569C))); - AppendRecord(records, MakeReplayRecord(5224, &this->unknown_56A0, sizeof(this->unknown_56A0))); - AppendRecord(records, MakeReplayRecord(5225, &this->unknown_56A4, sizeof(this->unknown_56A4))); - AppendRecord(records, MakeReplayRecord(5226, &this->unknown_56A8, sizeof(this->unknown_56A8))); - AppendRecord(records, MakeReplayRecord(5227, &this->unknown_56AC, sizeof(this->unknown_56AC))); - AppendRecord(records, MakeReplayRecord(5228, &this->unknown_56B0, sizeof(this->unknown_56B0))); + AppendRecord(records, MakeReplayRecord(5222, &this->mercenaryEnemyGid, sizeof(this->mercenaryEnemyGid))); + AppendRecord(records, MakeReplayRecord(5223, &this->mercenaryEnemyX, sizeof(this->mercenaryEnemyX))); + AppendRecord(records, MakeReplayRecord(5224, &this->mercenaryEnemyY, sizeof(this->mercenaryEnemyY))); + AppendRecord(records, MakeReplayRecord(5225, &this->moveMercenaryEnemy, sizeof(this->moveMercenaryEnemy))); + AppendRecord(records, MakeReplayRecord(5226, &this->selectMercenaryEnemy, sizeof(this->selectMercenaryEnemy))); + AppendRecord(records, MakeReplayRecord(5227, &this->attackMercenaryEnemy, sizeof(this->attackMercenaryEnemy))); + AppendRecord(records, MakeReplayRecord(5228, &this->mercenaryAlive, sizeof(this->mercenaryAlive))); AppendRecord(records, MakeReplayRecord(5229, &this->m_mercenaryActionState, sizeof(this->m_mercenaryActionState))); - AppendRecord(records, MakeReplayRecord(5301, &this->unknown_1010, sizeof(this->unknown_1010))); - AppendRecord(records, MakeReplayRecord(5302, this->unknown_1014, 4)); - AppendRecord(records, MakeReplayRecord(5303, this->unknown_1018, 32)); - AppendRecord(records, MakeReplayRecord(5304, &this->unknown_1038, sizeof(this->unknown_1038))); - AppendRecord(records, MakeReplayRecord(5305, &this->unknown_103C, sizeof(this->unknown_103C))); - AppendRecord(records, MakeReplayRecord(5306, &this->unknown_1040, sizeof(this->unknown_1040))); - AppendRecord(records, MakeReplayRecord(5307, &this->unknown_1044, sizeof(this->unknown_1044))); + AppendRecord(records, MakeReplayRecord(5301, &this->petGid, sizeof(this->petGid))); + AppendRecord(records, MakeReplayRecord(5302, this->petNameModified, 4)); + AppendRecord(records, MakeReplayRecord(5303, this->petName, 32)); + AppendRecord(records, MakeReplayRecord(5304, &this->petAccessory, sizeof(this->petAccessory))); + AppendRecord(records, MakeReplayRecord(5305, &this->petJob, sizeof(this->petJob))); + AppendRecord(records, MakeReplayRecord(5306, &this->petLevel, sizeof(this->petLevel))); + AppendRecord(records, MakeReplayRecord(5307, &this->petHunger, sizeof(this->petHunger))); AppendRecord(records, MakeReplayRecord(5308, &this->m_petFriendly, sizeof(this->m_petFriendly))); - AppendRecord(records, MakeReplayRecord(5309, &this->unknown_1050, sizeof(this->unknown_1050))); - AppendRecord(records, MakeReplayRecord(5310, &this->unknown_1054, sizeof(this->unknown_1054))); - AppendRecord(records, MakeReplayRecord(5401, &this->unknown_5BC0, sizeof(this->unknown_5BC0))); - AppendRecord(records, MakeReplayRecord(5402, &this->unknown_5BC4, sizeof(this->unknown_5BC4))); - AppendRecord(records, MakeReplayRecord(5403, &this->unknown_5BC8, sizeof(this->unknown_5BC8))); - AppendRecord(records, MakeReplayRecord(5404, &this->unknown_5BCC, sizeof(this->unknown_5BCC))); - AppendRecord(records, MakeReplayRecord(5405, &this->unknown_5BD0, sizeof(this->unknown_5BD0))); + AppendRecord(records, MakeReplayRecord(5309, &this->petEggIndex, sizeof(this->petEggIndex))); + AppendRecord(records, MakeReplayRecord(5310, &this->petPreviousHunger, sizeof(this->petPreviousHunger))); + AppendRecord(records, MakeReplayRecord(5401, &this->elementalGid, sizeof(this->elementalGid))); + AppendRecord(records, MakeReplayRecord(5402, &this->elementalHp, sizeof(this->elementalHp))); + AppendRecord(records, MakeReplayRecord(5403, &this->elementalSp, sizeof(this->elementalSp))); + AppendRecord(records, MakeReplayRecord(5404, &this->elementalMaxHp, sizeof(this->elementalMaxHp))); + AppendRecord(records, MakeReplayRecord(5405, &this->elementalMaxSp, sizeof(this->elementalMaxSp))); AppendRecord(records, MakeReplayRecord(5001, nullptr, 0)); return records; } @@ -1203,94 +1203,94 @@ std::vector CSession::BuildCharacterReplayRecords() { AppendRecord(records, MakeReplayRecord(1012, &this->m_navigationPlayerMap[0x14], 4)); AppendRecord(records, MakeReplayRecord(1013, &this->m_navigationPlayerMap[0x18], 4)); AppendRecord(records, MakeReplayRecord(1014, &this->m_job, sizeof(this->m_job))); - AppendRecord(records, MakeReplayRecord(1015, &this->unknown_162C[0x4], 8)); + AppendRecord(records, MakeReplayRecord(1015, &this->playerExperienceState[0x4], 8)); AppendRecord(records, MakeReplayRecord(1016, &this->m_level, sizeof(this->m_level))); - AppendRecord(records, MakeReplayRecord(1017, this->unknown_1654, 4)); - AppendRecord(records, MakeReplayRecord(1018, &this->unknown_162C[0xC], 8)); + AppendRecord(records, MakeReplayRecord(1017, this->statusPoints, 4)); + AppendRecord(records, MakeReplayRecord(1018, &this->playerExperienceState[0xC], 8)); AppendRecord(records, MakeReplayRecord(1019, &this->m_jobLevel, sizeof(this->m_jobLevel))); AppendRecord(records, MakeReplayRecord(1020, &this->m_skillPoint, 4)); AppendRecord(records, MakeReplayRecord(1021, &this->m_guildSkillPoint, sizeof(this->m_guildSkillPoint))); - AppendRecord(records, MakeReplayRecord(1022, this->unknown_1664, 4)); - AppendRecord(records, MakeReplayRecord(1023, &this->unknown_1664[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1022, this->companionSkillPoints, 4)); + AppendRecord(records, MakeReplayRecord(1023, &this->companionSkillPoints[0x4], 4)); AppendRecord(records, MakeReplayRecord(1024, &this->m_standardStats[0], sizeof(this->m_standardStats[0]))); AppendRecord(records, MakeReplayRecord(1025, &this->m_standardStats[1], sizeof(this->m_standardStats[1]))); AppendRecord(records, MakeReplayRecord(1026, &this->m_standardStats[2], sizeof(this->m_standardStats[2]))); AppendRecord(records, MakeReplayRecord(1027, &this->m_standardStats[3], sizeof(this->m_standardStats[3]))); AppendRecord(records, MakeReplayRecord(1028, &this->m_standardStats[4], sizeof(this->m_standardStats[4]))); AppendRecord(records, MakeReplayRecord(1029, &this->m_standardStats[5], sizeof(this->m_standardStats[5]))); - AppendRecord(records, MakeReplayRecord(1030, this->unknown_169C, 4)); - AppendRecord(records, MakeReplayRecord(1031, &this->unknown_169C[0x4], 4)); - AppendRecord(records, MakeReplayRecord(1032, &this->unknown_169C[0x8], 4)); - AppendRecord(records, MakeReplayRecord(1033, &this->unknown_169C[0xC], 4)); - AppendRecord(records, MakeReplayRecord(1034, &this->unknown_169C[0x10], 4)); - AppendRecord(records, MakeReplayRecord(1035, &this->unknown_169C[0x14], 4)); - AppendRecord(records, MakeReplayRecord(1036, &this->unknown_169C[0x18], 4)); - AppendRecord(records, MakeReplayRecord(1037, &this->unknown_169C[0x1C], 4)); - AppendRecord(records, MakeReplayRecord(1038, &this->unknown_169C[0x20], 4)); - AppendRecord(records, MakeReplayRecord(1039, &this->unknown_169C[0x24], 4)); - AppendRecord(records, MakeReplayRecord(1040, &this->unknown_169C[0x28], 4)); - AppendRecord(records, MakeReplayRecord(1041, &this->unknown_169C[0x2C], 4)); - AppendRecord(records, MakeReplayRecord(1042, &this->unknown_169C[0x30], 4)); - AppendRecord(records, MakeReplayRecord(1043, &this->unknown_169C[0x34], 4)); - AppendRecord(records, MakeReplayRecord(1044, &this->unknown_169C[0x38], 4)); - AppendRecord(records, MakeReplayRecord(1045, &this->unknown_169C[0x3C], 4)); - AppendRecord(records, MakeReplayRecord(1046, &this->unknown_169C[0x40], 4)); - AppendRecord(records, MakeReplayRecord(1047, &this->unknown_169C[0x44], 4)); - AppendRecord(records, MakeReplayRecord(1048, &this->unknown_169C[0x48], 4)); - AppendRecord(records, MakeReplayRecord(1049, &this->unknown_169C[0x4C], 4)); - AppendRecord(records, MakeReplayRecord(1050, &this->unknown_16EC, sizeof(this->unknown_16EC))); + AppendRecord(records, MakeReplayRecord(1030, this->combatStats, 4)); + AppendRecord(records, MakeReplayRecord(1031, &this->combatStats[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1032, &this->combatStats[0x8], 4)); + AppendRecord(records, MakeReplayRecord(1033, &this->combatStats[0xC], 4)); + AppendRecord(records, MakeReplayRecord(1034, &this->combatStats[0x10], 4)); + AppendRecord(records, MakeReplayRecord(1035, &this->combatStats[0x14], 4)); + AppendRecord(records, MakeReplayRecord(1036, &this->combatStats[0x18], 4)); + AppendRecord(records, MakeReplayRecord(1037, &this->combatStats[0x1C], 4)); + AppendRecord(records, MakeReplayRecord(1038, &this->combatStats[0x20], 4)); + AppendRecord(records, MakeReplayRecord(1039, &this->combatStats[0x24], 4)); + AppendRecord(records, MakeReplayRecord(1040, &this->combatStats[0x28], 4)); + AppendRecord(records, MakeReplayRecord(1041, &this->combatStats[0x2C], 4)); + AppendRecord(records, MakeReplayRecord(1042, &this->combatStats[0x30], 4)); + AppendRecord(records, MakeReplayRecord(1043, &this->combatStats[0x34], 4)); + AppendRecord(records, MakeReplayRecord(1044, &this->combatStats[0x38], 4)); + AppendRecord(records, MakeReplayRecord(1045, &this->combatStats[0x3C], 4)); + AppendRecord(records, MakeReplayRecord(1046, &this->combatStats[0x40], 4)); + AppendRecord(records, MakeReplayRecord(1047, &this->combatStats[0x44], 4)); + AppendRecord(records, MakeReplayRecord(1048, &this->combatStats[0x48], 4)); + AppendRecord(records, MakeReplayRecord(1049, &this->combatStats[0x4C], 4)); + AppendRecord(records, MakeReplayRecord(1050, &this->equippedArrowIndex, sizeof(this->equippedArrowIndex))); AppendRecord(records, MakeReplayRecord(1051, &this->m_zeny, sizeof(this->m_zeny))); - AppendRecord(records, MakeReplayRecord(1052, this->unknown_16F4, 4)); - AppendRecord(records, MakeReplayRecord(1053, &this->unknown_16F4[0x4], 4)); - AppendRecord(records, MakeReplayRecord(1054, &this->unknown_162C[0x14], 4)); - AppendRecord(records, MakeReplayRecord(1055, &this->unknown_162C[0x1C], 4)); - AppendRecord(records, MakeReplayRecord(1056, this->unknown_1704, 4)); - AppendRecord(records, MakeReplayRecord(1057, &this->unknown_1708, sizeof(this->unknown_1708))); - AppendRecord(records, MakeReplayRecord(1058, this->unknown_170C, 4)); - AppendRecord(records, MakeReplayRecord(1059, &this->unknown_0EA0[0x30], 4)); + AppendRecord(records, MakeReplayRecord(1052, this->healthPoints, 4)); + AppendRecord(records, MakeReplayRecord(1053, &this->healthPoints[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1054, &this->playerExperienceState[0x14], 4)); + AppendRecord(records, MakeReplayRecord(1055, &this->playerExperienceState[0x1C], 4)); + AppendRecord(records, MakeReplayRecord(1056, this->optionFlags, 4)); + AppendRecord(records, MakeReplayRecord(1057, &this->monsterInfoEnabled, sizeof(this->monsterInfoEnabled))); + AppendRecord(records, MakeReplayRecord(1058, this->clientTimeOffset, 4)); + AppendRecord(records, MakeReplayRecord(1059, &this->characterLoginData[0x30], 4)); AppendRecord(records, MakeReplayRecord(1060, &this->m_head, sizeof(this->m_head))); - AppendRecord(records, MakeReplayRecord(1061, &this->unknown_0EDC[0x4], 8)); - AppendRecord(records, MakeReplayRecord(1062, &this->unknown_0EDC[0xC], 4)); + AppendRecord(records, MakeReplayRecord(1061, &this->weaponAppearance[0x4], 8)); + AppendRecord(records, MakeReplayRecord(1062, &this->weaponAppearance[0xC], 4)); AppendRecord(records, MakeReplayRecord(1063, &this->m_bodyStyle, sizeof(this->m_bodyStyle))); AppendRecord(records, MakeReplayRecord(1064, &this->m_headPalette, sizeof(this->m_headPalette))); - AppendRecord(records, MakeReplayRecord(1065, this->unknown_0EF4, 4)); - AppendRecord(records, MakeReplayRecord(1066, &this->unknown_0EF4[0x4], 4)); - AppendRecord(records, MakeReplayRecord(1067, &this->unknown_0EF4[0x8], 4)); - AppendRecord(records, MakeReplayRecord(1068, this->unknown_0F0C, 4)); - AppendRecord(records, MakeReplayRecord(1069, &this->unknown_0F0C[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1065, this->accessoryAppearance, 4)); + AppendRecord(records, MakeReplayRecord(1066, &this->accessoryAppearance[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1067, &this->accessoryAppearance[0x8], 4)); + AppendRecord(records, MakeReplayRecord(1068, this->statusLevelEffects, 4)); + AppendRecord(records, MakeReplayRecord(1069, &this->statusLevelEffects[0x4], 4)); AppendRecord(records, MakeReplayRecord(1070, &this->m_jobFlags, sizeof(this->m_jobFlags))); AppendRecord(records, MakeReplayRecord(1071, &this->m_robe, sizeof(this->m_robe))); - AppendRecord(records, MakeReplayRecord(1072, &this->unknown_5974[0x4], 4)); - AppendRecord(records, MakeReplayRecord(1073, &this->unknown_5974[0x8], 4)); - AppendRecord(records, MakeReplayRecord(1074, &this->unknown_5974[0xC], 4)); - AppendRecord(records, MakeReplayRecord(1075, &this->unknown_5974[0x10], 4)); - AppendRecord(records, MakeReplayRecord(1076, &this->unknown_5974[0x14], 4)); - AppendRecord(records, MakeReplayRecord(1077, &this->unknown_5974[0x18], 4)); - AppendRecord(records, MakeReplayRecord(1078, &this->unknown_5974[0x1C], 4)); - AppendRecord(records, MakeReplayRecord(1079, &this->unknown_5974[0x20], 4)); - AppendRecord(records, MakeReplayRecord(1080, &this->unknown_5974[0x24], 4)); - AppendRecord(records, MakeReplayRecord(1081, &this->unknown_5974[0x2C], 0x18)); - AppendRecord(records, MakeReplayRecord(1082, this->unknown_0F24, 1)); + AppendRecord(records, MakeReplayRecord(1072, &this->equipmentViewState[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1073, &this->equipmentViewState[0x8], 4)); + AppendRecord(records, MakeReplayRecord(1074, &this->equipmentViewState[0xC], 4)); + AppendRecord(records, MakeReplayRecord(1075, &this->equipmentViewState[0x10], 4)); + AppendRecord(records, MakeReplayRecord(1076, &this->equipmentViewState[0x14], 4)); + AppendRecord(records, MakeReplayRecord(1077, &this->equipmentViewState[0x18], 4)); + AppendRecord(records, MakeReplayRecord(1078, &this->equipmentViewState[0x1C], 4)); + AppendRecord(records, MakeReplayRecord(1079, &this->equipmentViewState[0x20], 4)); + AppendRecord(records, MakeReplayRecord(1080, &this->equipmentViewState[0x24], 4)); + AppendRecord(records, MakeReplayRecord(1081, &this->equipmentViewState[0x2C], 0x18)); + AppendRecord(records, MakeReplayRecord(1082, this->playerTeam, 1)); AppendRecord(records, MakeReplayRecord(1083, &this->m_score1, sizeof(this->m_score1))); AppendRecord(records, MakeReplayRecord(1084, &this->m_score2, sizeof(this->m_score2))); - AppendRecord(records, MakeReplayRecord(1085, this->unknown_0F30, 1)); + AppendRecord(records, MakeReplayRecord(1085, this->chatFont, 1)); AppendRecord(records, MakeReplayRecord(1086, &this->cartCount, sizeof(this->cartCount))); AppendRecord(records, MakeReplayRecord(1087, &this->cartMaxCount, sizeof(this->cartMaxCount))); AppendRecord(records, MakeReplayRecord(1088, &this->cartWeight, sizeof(this->cartWeight))); AppendRecord(records, MakeReplayRecord(1089, &this->cartMaxWeight, sizeof(this->cartMaxWeight))); - AppendRecord(records, MakeReplayRecord(1090, this->unknown_0F44, 4)); - AppendRecord(records, MakeReplayRecord(1091, &this->unknown_0F44[0x4], 4)); - AppendRecord(records, MakeReplayRecord(1092, &this->unknown_5490[0x8], 4)); - AppendRecord(records, MakeReplayRecord(1093, &this->unknown_5490[0xC], 4)); - AppendRecord(records, MakeReplayRecord(1094, &this->unknown_54A0, sizeof(this->unknown_54A0))); - AppendRecord(records, MakeReplayRecord(1095, &this->unknown_54A4, sizeof(this->unknown_54A4))); - AppendRecord(records, MakeReplayRecord(1096, &this->unknown_54A8, sizeof(this->unknown_54A8))); - AppendRecord(records, BuildReplayTaggedRecord(1097, this->unknown_550C.c_str(), this->unknown_550C.size())); + AppendRecord(records, MakeReplayRecord(1090, this->storeSlotCounts, 4)); + AppendRecord(records, MakeReplayRecord(1091, &this->storeSlotCounts[0x4], 4)); + AppendRecord(records, MakeReplayRecord(1092, &this->itemSendState[0x8], 4)); + AppendRecord(records, MakeReplayRecord(1093, &this->itemSendState[0xC], 4)); + AppendRecord(records, MakeReplayRecord(1094, &this->partyExpShare, sizeof(this->partyExpShare))); + AppendRecord(records, MakeReplayRecord(1095, &this->partyItemCollect, sizeof(this->partyItemCollect))); + AppendRecord(records, MakeReplayRecord(1096, &this->partyItemDistribute, sizeof(this->partyItemDistribute))); + AppendRecord(records, BuildReplayTaggedRecord(1097, this->storeTitle.c_str(), this->storeTitle.size())); const unsigned char option = g_serviceOptions.Get(0x40); AppendRecord(records, MakeReplayRecord(1098, &option, sizeof(option))); - AppendRecord(records, MakeReplayRecord(1099, &this->unknown_5468, sizeof(this->unknown_5468))); + AppendRecord(records, MakeReplayRecord(1099, &this->adoptionSkillAvailable, sizeof(this->adoptionSkillAvailable))); AppendRecord(records, MakeReplayRecord(1100, &this->m_bodyCostume, sizeof(this->m_bodyCostume))); - AppendRecord(records, MakeReplayRecord(1101, &this->unknown_7FBC, sizeof(this->unknown_7FBC))); + AppendRecord(records, MakeReplayRecord(1101, &this->extraInventorySlots, sizeof(this->extraInventorySlots))); AppendRecord(records, MakeReplayRecord(1001, nullptr, 0)); return records; } @@ -1309,8 +1309,8 @@ std::vector CSession::BuildShopReplayRecords() { AppendRecord(records, MakeReplayRecord(7502, &value, sizeof(value))); } for (auto shop = this->m_shops.begin(); shop != this->m_shops.end(); ++shop) { - for (unsigned int index = 0; index < shop->second.unknown_0004.size(); ++index) { - const std::map>& items = shop->second.unknown_0004[index]; + for (unsigned int index = 0; index < shop->second.items.size(); ++index) { + const std::map>& items = shop->second.items[index]; for (auto item = items.begin(); item != items.end(); ++item) { ReplayShopItemRecord value; value.shopId = shop->first; @@ -1323,7 +1323,7 @@ std::vector CSession::BuildShopReplayRecords() { } ReplayShopFlagRecord value; value.shopId = shop->first; - value.flag = shop->second.unknown_0000; + value.flag = shop->second.flag; AppendRecord(records, MakeReplayRecord(7505, &value, sizeof(value))); } AppendRecord(records, MakeReplayRecord(7501, nullptr, 0)); @@ -1335,15 +1335,15 @@ std::vector CSession::BuildShopReplayRecords() { std::vector CSession::BuildExtraReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(5500, nullptr, 0)); - AppendRecord(records, MakeReplayRecord(5510, &this->unknown_593C, sizeof(this->unknown_593C))); - AppendRecord(records, MakeReplayRecord(5511, &this->unknown_5940, sizeof(this->unknown_5940))); - AppendRecord(records, MakeReplayRecord(5512, &this->unknown_5944, sizeof(this->unknown_5944))); - AppendRecord(records, MakeReplayRecord(5513, &this->unknown_5948, sizeof(this->unknown_5948))); - AppendRecord(records, MakeReplayRecord(5514, &this->unknown_594C, sizeof(this->unknown_594C))); - AppendRecord(records, BuildReplayTaggedRecord(5515, this->unknown_5950.c_str(), this->unknown_5950.size())); - AppendRecord(records, MakeReplayRecord(5516, &this->unknown_5968, sizeof(this->unknown_5968))); - AppendRecord(records, MakeReplayRecord(5517, &this->unknown_596C, sizeof(this->unknown_596C))); - AppendRecord(records, MakeReplayRecord(5518, &this->unknown_5970, sizeof(this->unknown_5970))); + AppendRecord(records, MakeReplayRecord(5510, &this->memorialWindowOpen, sizeof(this->memorialWindowOpen))); + AppendRecord(records, MakeReplayRecord(5511, &this->memorialWindowX, sizeof(this->memorialWindowX))); + AppendRecord(records, MakeReplayRecord(5512, &this->memorialWindowY, sizeof(this->memorialWindowY))); + AppendRecord(records, MakeReplayRecord(5513, &this->memorialDungeonState, sizeof(this->memorialDungeonState))); + AppendRecord(records, MakeReplayRecord(5514, &this->memorialReplayValue, sizeof(this->memorialReplayValue))); + AppendRecord(records, BuildReplayTaggedRecord(5515, this->memorialDungeonName.c_str(), this->memorialDungeonName.size())); + AppendRecord(records, MakeReplayRecord(5516, &this->memorialQueuePosition, sizeof(this->memorialQueuePosition))); + AppendRecord(records, MakeReplayRecord(5517, &this->memorialCreationTime, sizeof(this->memorialCreationTime))); + AppendRecord(records, MakeReplayRecord(5518, &this->memorialExpirationTime, sizeof(this->memorialExpirationTime))); AppendRecord(records, MakeReplayRecord(5501, nullptr, 0)); return records; } @@ -1353,36 +1353,36 @@ std::vector CSession::BuildExtraReplayRecords() { std::vector CSession::BuildStatsReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(2000, nullptr, 0)); - AppendRecord(records, MakeReplayRecord(2010, &this->unknown_166C, sizeof(this->unknown_166C))); - AppendRecord(records, MakeReplayRecord(2011, &this->unknown_1670, sizeof(this->unknown_1670))); - AppendRecord(records, MakeReplayRecord(2012, &this->unknown_1674, sizeof(this->unknown_1674))); - AppendRecord(records, MakeReplayRecord(2013, &this->unknown_1678, sizeof(this->unknown_1678))); - AppendRecord(records, MakeReplayRecord(2014, &this->unknown_167C, sizeof(this->unknown_167C))); - AppendRecord(records, MakeReplayRecord(2015, &this->unknown_1680, sizeof(this->unknown_1680))); - AppendRecord(records, BuildReplayTaggedRecord(2016, &this->unknown_0F4C, sizeof(this->unknown_0F4C))); + AppendRecord(records, MakeReplayRecord(2010, &this->strengthBonus, sizeof(this->strengthBonus))); + AppendRecord(records, MakeReplayRecord(2011, &this->agilityBonus, sizeof(this->agilityBonus))); + AppendRecord(records, MakeReplayRecord(2012, &this->vitalityBonus, sizeof(this->vitalityBonus))); + AppendRecord(records, MakeReplayRecord(2013, &this->intelligenceBonus, sizeof(this->intelligenceBonus))); + AppendRecord(records, MakeReplayRecord(2014, &this->dexterityBonus, sizeof(this->dexterityBonus))); + AppendRecord(records, MakeReplayRecord(2015, &this->luckBonus, sizeof(this->luckBonus))); + AppendRecord(records, BuildReplayTaggedRecord(2016, &this->storeItemLimit, sizeof(this->storeItemLimit))); AppendRecord(records, BuildReplayTaggedRecord(2017, &this->m_weight, sizeof(this->m_weight))); AppendRecord(records, BuildReplayTaggedRecord(2018, &this->m_maxWeight, sizeof(this->m_maxWeight))); - AppendRecord(records, BuildReplayTaggedRecord(2019, &this->unknown_532C, sizeof(this->unknown_532C))); - AppendRecord(records, BuildReplayTaggedRecord(2020, &this->unknown_5330, sizeof(this->unknown_5330))); - AppendRecord(records, BuildReplayTaggedRecord(2021, &this->unknown_5334, sizeof(this->unknown_5334))); - AppendRecord(records, BuildReplayTaggedRecord(2022, &this->unknown_5338, sizeof(this->unknown_5338))); - AppendRecord(records, BuildReplayTaggedRecord(2023, &this->unknown_533C, sizeof(this->unknown_533C))); - AppendRecord(records, BuildReplayTaggedRecord(2024, this->unknown_5340, sizeof(this->unknown_5340))); - AppendRecord(records, BuildReplayTaggedRecord(2025, this->unknown_5370, sizeof(this->unknown_5370))); - AppendRecord(records, BuildReplayTaggedRecord(2026, this->unknown_53A0, sizeof(this->unknown_53A0))); - AppendRecord(records, BuildReplayTaggedRecord(2027, this->unknown_53D0, sizeof(this->unknown_53D0))); - AppendRecord(records, BuildReplayTaggedRecord(2028, this->unknown_5400, 0x30)); - AppendRecord(records, BuildReplayTaggedRecord(2029, &this->unknown_5568, sizeof(this->unknown_5568))); - AppendRecord(records, BuildReplayTaggedRecord(2030, &this->unknown_556C, sizeof(this->unknown_556C))); - AppendRecord(records, BuildReplayTaggedRecord(2031, &this->unknown_5570[0], 4)); - AppendRecord(records, BuildReplayTaggedRecord(2032, &this->unknown_5570[4], 4)); + AppendRecord(records, BuildReplayTaggedRecord(2019, &this->randomStatIndexA, sizeof(this->randomStatIndexA))); + AppendRecord(records, BuildReplayTaggedRecord(2020, &this->randomStatIndexB, sizeof(this->randomStatIndexB))); + AppendRecord(records, BuildReplayTaggedRecord(2021, &this->randomStatIndexC, sizeof(this->randomStatIndexC))); + AppendRecord(records, BuildReplayTaggedRecord(2022, &this->randomStatIndexD, sizeof(this->randomStatIndexD))); + AppendRecord(records, BuildReplayTaggedRecord(2023, &this->randomStatIndexE, sizeof(this->randomStatIndexE))); + AppendRecord(records, BuildReplayTaggedRecord(2024, this->randomStatValues, sizeof(this->randomStatValues))); + AppendRecord(records, BuildReplayTaggedRecord(2025, this->replayStatValuesA, sizeof(this->replayStatValuesA))); + AppendRecord(records, BuildReplayTaggedRecord(2026, this->replayStatValuesB, sizeof(this->replayStatValuesB))); + AppendRecord(records, BuildReplayTaggedRecord(2027, this->replayStatValuesC, sizeof(this->replayStatValuesC))); + AppendRecord(records, BuildReplayTaggedRecord(2028, this->minimapTokenStorage, 0x30)); + AppendRecord(records, BuildReplayTaggedRecord(2029, &this->hp, sizeof(this->hp))); + AppendRecord(records, BuildReplayTaggedRecord(2030, &this->maxHp, sizeof(this->maxHp))); + AppendRecord(records, BuildReplayTaggedRecord(2031, &this->spAndHomunculusStats[0], 4)); + AppendRecord(records, BuildReplayTaggedRecord(2032, &this->spAndHomunculusStats[4], 4)); AppendRecord(records, BuildReplayTaggedRecord(2033, &this->m_prohibitionTarget, sizeof(this->m_prohibitionTarget))); - AppendRecord(records, BuildReplayTaggedRecord(2034, &this->unknown_5480, sizeof(this->unknown_5480))); - AppendRecord(records, BuildReplayTaggedRecord(2035, &this->unknown_5484, sizeof(this->unknown_5484))); - AppendRecord(records, BuildReplayTaggedRecord(2036, &this->unknown_5488, sizeof(this->unknown_5488))); - AppendRecord(records, BuildReplayTaggedRecord(2037, &this->unknown_548C, sizeof(this->unknown_548C))); + AppendRecord(records, BuildReplayTaggedRecord(2034, &this->quitBlocked, sizeof(this->quitBlocked))); + AppendRecord(records, BuildReplayTaggedRecord(2035, &this->battleChat, sizeof(this->battleChat))); + AppendRecord(records, BuildReplayTaggedRecord(2036, &this->quitAllowed, sizeof(this->quitAllowed))); + AppendRecord(records, BuildReplayTaggedRecord(2037, &this->sessionFlag, sizeof(this->sessionFlag))); AppendRecord(records, BuildReplayTaggedRecord(2038, this->m_accountName.c_str(), this->m_accountName.size())); - AppendRecord(records, BuildReplayTaggedRecord(2052, &this->unknown_8074, sizeof(this->unknown_8074))); + AppendRecord(records, BuildReplayTaggedRecord(2052, &this->madogearType, sizeof(this->madogearType))); AppendRecord(records, MakeReplayRecord(2001, nullptr, 0)); return records; } @@ -1392,11 +1392,11 @@ std::vector CSession::BuildStatsReplayRecords() { std::vector CSession::BuildMessengerReplayRecords() { std::vector records; AppendRecord(records, MakeReplayRecord(4000, nullptr, 0)); - AppendRecord(records, MakeReplayRecord(4010, &this->unknown_5938, 1)); - AppendRecord(records, MakeReplayRecord(4011, &this->unknown_5460, sizeof(this->unknown_5460))); - AppendRecord(records, MakeReplayRecord(4012, &this->unknown_5464, sizeof(this->unknown_5464))); - AppendRecord(records, BuildReplayTaggedRecord(4013, this->unknown_54AC.c_str(), this->unknown_54AC.size())); - AppendRecord(records, BuildReplayTaggedRecord(4014, this->unknown_54C4.c_str(), this->unknown_54C4.size())); + AppendRecord(records, MakeReplayRecord(4010, &this->replaySessionFlag, 1)); + AppendRecord(records, MakeReplayRecord(4011, &this->partyBlocked, sizeof(this->partyBlocked))); + AppendRecord(records, MakeReplayRecord(4012, &this->partyLeader, sizeof(this->partyLeader))); + AppendRecord(records, BuildReplayTaggedRecord(4013, this->partyRequestName.c_str(), this->partyRequestName.size())); + AppendRecord(records, BuildReplayTaggedRecord(4014, this->partyName.c_str(), this->partyName.size())); AppendRecord(records, MakeFramedMessage(4015, SerializeMessengerMembers(this->m_partyMembers))); AppendRecord(records, MakeFramedMessage(4016, SerializeMessengerMembers(this->m_friends))); AppendRecord(records, MakeReplayRecord(4001, nullptr, 0)); diff --git a/Source/Client/Replay.h b/Source/Client/Replay.h index 13b3b90a2..960284737 100644 --- a/Source/Client/Replay.h +++ b/Source/Client/Replay.h @@ -26,7 +26,7 @@ struct ReplayCachedPacket { struct ReplayOptions { /* 0000 */ unsigned char unknown_0000[6]; /* 0006 */ unsigned char recordRestricted; - /* 0007 */ unsigned char unknown_0007; + /* 0007 */ unsigned char showItemSlots; /* 0008 */ unsigned char unknown_0008[22]; unsigned char Get(ReplayRecordOption option) const { @@ -44,13 +44,13 @@ struct ReplayHeader { /* 0008 */ std::uint32_t key1; /* 000C */ int service; /* 0010 */ int serviceType; - /* 0014 */ int unknown_0014; + /* 0014 */ int sessionSyncValue; /* 0018 */ char characterName[64]; /* 0058 */ char mapName[20]; /* 006C */ int accountId; /* 0070 */ int cellX; /* 0074 */ int cellY; - /* 0078 */ int unknown_0078; + /* 0078 */ int playerDirection; /* 007C */ std::uint32_t duration; /* 0080 */ std::uint32_t records; /* 0084 */ std::uint32_t fileOffset; @@ -104,8 +104,8 @@ public: /* 01E8 */ std::uint32_t cipherIndex; /* 01EC */ std::uint32_t cipherBase; /* 01F0 */ std::uint32_t cipherKey; - /* 01F4 */ int unknown_01F4; - /* 01F8 */ int unknown_01F8; + /* 01F4 */ int recordingState; + /* 01F8 */ int playbackState; Replay(); @@ -158,18 +158,18 @@ public: }; struct ReplayFileEntry { - /* 0000 */ int unknown_0000; + /* 0000 */ int index; /* 0004 */ char name[0x104]; // INLINED ReplayFileEntry() { - this->unknown_0000 = 0; + this->index = 0; std::memset(this->name, 0, sizeof(this->name)); } // INLINED ~ReplayFileEntry() { - this->unknown_0000 = 0; + this->index = 0; std::memset(this->name, 0, sizeof(this->name)); } }; @@ -183,10 +183,10 @@ public: /* 0010 */ Replay* replay; /* 0014 */ char path[0x104]; /* 0118 */ bool pathEnabled; - /* 0119 */ bool unknown_0119; - /* 011C */ int unknown_011C; - /* 0120 */ int unknown_0120; - /* 0124 */ int unknown_0124; + /* 0119 */ bool rejectExistingName; + /* 011C */ int selectionState; + /* 0120 */ int dialogState; + /* 0124 */ int fileState; /* 0128 */ unsigned char buffer[0x3E80]; // INLINED @@ -194,15 +194,15 @@ public: : replay(nullptr), path(), pathEnabled(true), - unknown_0119(true) { + rejectExistingName(true) { this->selected = -1; this->files.clear(); - this->unknown_0124 = 0; + this->fileState = 0; for (std::size_t index = 0; index < sizeof(this->buffer); ++index) { this->buffer[index] = 0; } - this->unknown_011C = 0; - this->unknown_0120 = 0; + this->selectionState = 0; + this->dialogState = 0; } void Clear(); @@ -236,11 +236,11 @@ static_assert(sizeof(Replay) == 0x1FC); static_assert(offsetof(Replay, state) == 0xC); static_assert(offsetof(Replay, header) == 0x28); static_assert(offsetof(Replay, header) + offsetof(ReplayHeader, options) + offsetof(ReplayOptions, recordRestricted) == 0xB6); -static_assert(offsetof(Replay, header) + offsetof(ReplayHeader, options) + offsetof(ReplayOptions, unknown_0007) == 0xB7); +static_assert(offsetof(Replay, header) + offsetof(ReplayHeader, options) + offsetof(ReplayOptions, showItemSlots) == 0xB7); static_assert(offsetof(Replay, sections) == 0xD2); static_assert(offsetof(Replay, fileMode) == 0x1D8); static_assert(offsetof(Replay, file) == 0x1DC); static_assert(offsetof(Replay, cipherIndex) == 0x1E8); -static_assert(offsetof(Replay, unknown_01F8) == 0x1F8); +static_assert(offsetof(Replay, playbackState) == 0x1F8); #endif diff --git a/Source/Client/ReplayPacketRecorder.cpp b/Source/Client/ReplayPacketRecorder.cpp index f872567ed..6ea616474 100644 --- a/Source/Client/ReplayPacketRecorder.cpp +++ b/Source/Client/ReplayPacketRecorder.cpp @@ -203,7 +203,7 @@ void Replay::RecordCachedPackets() { Replay::Instance().RecordPacket(g_session.BuildSkillListReplayPacket(0x10F), 41, 0); Replay::Instance().RecordPacket(g_session.BuildSkillListReplayPacket(0x235), 41, 0); Replay::Instance().RecordPacket(g_session.BuildSkillListReplayPacket(0x29D), 41, 0); - if (g_session.unknown_5C1C != 0) { + if (g_session.replayPacketMode != 0) { Replay::Instance().RecordPacket(g_session.BuildStatusReplayPacket(), 41, 0); } } @@ -218,8 +218,8 @@ namespace { /* 000E */ std::int32_t y; /* 0012 */ std::int32_t source; /* 0016 */ std::uint32_t id; - /* 001A */ std::uint32_t unknown_001A; - /* 001E */ std::uint32_t unknown_001E; + /* 001A */ std::uint32_t dragValue; + /* 001E */ std::uint32_t dragSubValue; /* 0022 */ std::int32_t quantity; /* 0026 */ std::int32_t slot; /* 002A */ std::uint32_t type; @@ -277,8 +277,8 @@ void UIWindow::RecordDrop(int x, int y, const ModeDragState& drag, int target) { packet.y = y; packet.source = drag.source; packet.id = drag.id; - packet.unknown_001A = drag.unknown_0310; - packet.unknown_001E = drag.unknown_0314; + packet.dragValue = drag.itemValue; + packet.dragSubValue = drag.price; packet.quantity = drag.quantity; packet.slot = drag.slot; packet.type = drag.type; diff --git a/Source/Client/Session.cpp b/Source/Client/Session.cpp index 54768f47b..f5d36327a 100644 --- a/Source/Client/Session.cpp +++ b/Source/Client/Session.cpp @@ -121,11 +121,11 @@ int CSession::MercSkillLevel(int skillId) const { // OFFSET: 0x00E13B00 // FUNCTION: fn_23826 int CSession::SyncUnknown0E98() { - if (this->unknown_0E98 != this->unknown_5558) { - this->unknown_0E98 = this->unknown_5558; + if (this->cachedSex != this->currentSex) { + this->cachedSex = this->currentSex; } - return this->unknown_0E98; + return this->cachedSex; } // OFFSET: 0x00DF9B90 @@ -138,8 +138,8 @@ int CSession::IsExchangeItemListFull() { // FUNCTION: fn_23633 void CSession::ClearItemSelection() { for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { - if (it->unknown_0074[1] == 1) { - it->unknown_0074[1] = 0; + if (it->flags[1] == 1) { + it->flags[1] = 0; } } } @@ -231,7 +231,7 @@ bool CSession::IsWithinUnknown59C0(int value) const { return false; } - return this->m_normalSlotCount - this->unknown_8130 <= value; + return this->m_normalSlotCount - this->restrictedCharacterSlots <= value; } // OFFSET: 0x00E3D390 @@ -242,7 +242,7 @@ __declspec(noinline) int CSession::HasItem61B8(std::uint32_t id) const { } for (int i = 0; i < 10; ++i) { - if (id == this->unknown_61B8[i].unknown_0000[1] || id == this->unknown_6B68[i].unknown_0000[1]) { + if (id == this->swapCostumeItems[i].identity[1] || id == this->swapEquippedItems[i].identity[1]) { return 1; } } @@ -258,10 +258,10 @@ bool CSession::ResetUnknownState() { this->m_billingSlotCount = 1; this->m_producibleSlotCount = 1; this->m_validSlotCount = 1; - this->unknown_59BC = 1; - this->unknown_0E94 = 1; - this->unknown_103C = -1; - this->unknown_5450 = 0; + this->characterSlotState = 1; + this->characterCount = 1; + this->petJob = -1; + this->guildLeader = 0; this->m_serverTimeOffset = 0; this->m_serverTimeAdjustCount = 0; return true; @@ -286,8 +286,8 @@ char* CSession::ConvertTooltipText(const char* source, char* output) const { // OFFSET: 0x00DDE890 // FUNCTION: fn_23402 ITEM_INFO CSession::FindItem1768(std::uint32_t id) const { - for (auto item = this->unknown_1768.begin(); item != this->unknown_1768.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->merchantPurchaseSavedItems.begin(); item != this->merchantPurchaseSavedItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -298,13 +298,13 @@ ITEM_INFO CSession::FindItem1768(std::uint32_t id) const { // OFFSET: 0x00DDE920 // FUNCTION: fn_23403 ITEM_INFO CSession::GetItem1768At(int index) const { - if (this->unknown_1768.empty()) { + if (this->merchantPurchaseSavedItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1768.begin(); + std::list::const_iterator it = this->merchantPurchaseSavedItems.begin(); int position = 0; - while (it != this->unknown_1768.end()) { + while (it != this->merchantPurchaseSavedItems.end()) { if (position == index) { return *it; } @@ -318,8 +318,8 @@ ITEM_INFO CSession::GetItem1768At(int index) const { // OFFSET: 0x00DDE9C0 // FUNCTION: fn_23404 int CSession::GetItem1768Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1768) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->merchantPurchaseSavedItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -330,8 +330,8 @@ int CSession::GetItem1768Quantity(std::uint32_t id) const { // OFFSET: 0x00DDE9F0 // FUNCTION: fn_23405 ITEM_INFO CSession::FindItem1740(std::uint32_t id) const { - for (auto item = this->unknown_1740.begin(); item != this->unknown_1740.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->merchantShopItems.begin(); item != this->merchantShopItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -342,13 +342,13 @@ ITEM_INFO CSession::FindItem1740(std::uint32_t id) const { // OFFSET: 0x00DDEA80 // FUNCTION: fn_23406 ITEM_INFO CSession::GetItem1740At(int index) const { - if (this->unknown_1740.empty()) { + if (this->merchantShopItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1740.begin(); + std::list::const_iterator it = this->merchantShopItems.begin(); int position = 0; - while (it != this->unknown_1740.end()) { + while (it != this->merchantShopItems.end()) { if (position == index) { return *it; } @@ -362,8 +362,8 @@ ITEM_INFO CSession::GetItem1740At(int index) const { // OFFSET: 0x00DDEB20 // FUNCTION: fn_23407 int CSession::GetItem1740Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1740) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->merchantShopItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -374,8 +374,8 @@ int CSession::GetItem1740Quantity(std::uint32_t id) const { // OFFSET: 0x00DDEB50 // FUNCTION: fn_23408 ITEM_INFO CSession::FindItem1750(std::uint32_t id) const { - for (auto item = this->unknown_1750.begin(); item != this->unknown_1750.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->merchantMyShopItems.begin(); item != this->merchantMyShopItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -386,13 +386,13 @@ ITEM_INFO CSession::FindItem1750(std::uint32_t id) const { // OFFSET: 0x00DDEBE0 // FUNCTION: fn_23409 ITEM_INFO CSession::GetItem1750At(int index) const { - if (this->unknown_1750.empty()) { + if (this->merchantMyShopItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1750.begin(); + std::list::const_iterator it = this->merchantMyShopItems.begin(); int position = 0; - while (it != this->unknown_1750.end()) { + while (it != this->merchantMyShopItems.end()) { if (position == index) { return *it; } @@ -406,8 +406,8 @@ ITEM_INFO CSession::GetItem1750At(int index) const { // OFFSET: 0x00DDEC80 // FUNCTION: fn_23410 int CSession::GetItem1750Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1750) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->merchantMyShopItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -418,8 +418,8 @@ int CSession::GetItem1750Quantity(std::uint32_t id) const { // OFFSET: 0x00DDECB0 // FUNCTION: fn_23411 ITEM_INFO CSession::FindItem1758(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1758) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->merchantPurchaseItems) { + if (item.identity[1] == id) { return item; } } @@ -430,7 +430,7 @@ ITEM_INFO CSession::FindItem1758(std::uint32_t id) const { // OFFSET: 0x00DDED40 // FUNCTION: fn_23412 ITEM_INFO CSession::FindItem1758ByItemId(int itemId) const { - for (const ITEM_INFO& item : this->unknown_1758) { + for (const ITEM_INFO& item : this->merchantPurchaseItems) { if (std::atoi(item.itemId.c_str()) == itemId) { return item; } @@ -442,13 +442,13 @@ ITEM_INFO CSession::FindItem1758ByItemId(int itemId) const { // OFFSET: 0x00DDEDE0 // FUNCTION: fn_23413 ITEM_INFO CSession::GetItem1758At(int index) const { - if (this->unknown_1758.empty()) { + if (this->merchantPurchaseItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1758.begin(); + std::list::const_iterator it = this->merchantPurchaseItems.begin(); int position = 0; - while (it != this->unknown_1758.end()) { + while (it != this->merchantPurchaseItems.end()) { if (position == index) { return *it; } @@ -462,8 +462,8 @@ ITEM_INFO CSession::GetItem1758At(int index) const { // OFFSET: 0x00DDEEB0 // FUNCTION: fn_23414 ITEM_INFO CSession::FindItem1760(std::uint32_t id) const { - for (auto item = this->unknown_1760.begin(); item != this->unknown_1760.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->merchantHopeToSellItems.begin(); item != this->merchantHopeToSellItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -474,9 +474,9 @@ ITEM_INFO CSession::FindItem1760(std::uint32_t id) const { // OFFSET: 0x00DDF000 // FUNCTION: fn_23416 ITEM_INFO CSession::GetItem1760At(int index) const { - std::list::const_iterator it = this->unknown_1760.begin(); + std::list::const_iterator it = this->merchantHopeToSellItems.begin(); int position = 0; - while (it != this->unknown_1760.end()) { + while (it != this->merchantHopeToSellItems.end()) { if (position == index) { return *it; } @@ -490,8 +490,8 @@ ITEM_INFO CSession::GetItem1760At(int index) const { // OFFSET: 0x00DDF0F0 // FUNCTION: fn_23418 int CSession::GetItem1760Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1760) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->merchantHopeToSellItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -502,8 +502,8 @@ int CSession::GetItem1760Quantity(std::uint32_t id) const { // OFFSET: 0x00DDF120 // FUNCTION: fn_23419 ITEM_INFO CSession::FindItem1770(std::uint32_t id) const { - for (auto item = this->unknown_1770.begin(); item != this->unknown_1770.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->filteredInventoryItems.begin(); item != this->filteredInventoryItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -515,8 +515,8 @@ ITEM_INFO CSession::FindItem1770(std::uint32_t id) const { // FUNCTION: fn_23420 long long CSession::GetItem1760Total() const { long long total = 0; - for (auto it = this->unknown_1760.begin(); it != this->unknown_1760.end(); ++it) { - total += static_cast(static_cast(it->unknown_0014[1])) * it->quantity; + for (auto it = this->merchantHopeToSellItems.begin(); it != this->merchantHopeToSellItems.end(); ++it) { + total += static_cast(static_cast(it->prices[1])) * it->quantity; } return total; @@ -525,13 +525,13 @@ long long CSession::GetItem1760Total() const { // OFFSET: 0x00DDF200 // FUNCTION: fn_23421 ITEM_INFO CSession::GetItem1748At(int index) const { - if (this->unknown_1748.empty()) { + if (this->merchantMirrorItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1748.begin(); + std::list::const_iterator it = this->merchantMirrorItems.begin(); int position = 0; - while (it != this->unknown_1748.end()) { + while (it != this->merchantMirrorItems.end()) { if (position == index) { return *it; } @@ -545,8 +545,8 @@ ITEM_INFO CSession::GetItem1748At(int index) const { // OFFSET: 0x00DF9C50 // FUNCTION: fn_23563 bool CSession::HasItem1718(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1718) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->shopItems) { + if (item.identity[1] == id) { return true; } } @@ -558,7 +558,7 @@ bool CSession::HasItem1718(std::uint32_t id) const { // FUNCTION: fn_23564 bool CSession::HasExchangeItem(std::uint32_t id) const { for (int index = 0; index < 10; ++index) { - if (this->m_exchangeItems[index].quantity != 0 && this->m_exchangeItems[index].unknown_0000[1] == id) { + if (this->m_exchangeItems[index].quantity != 0 && this->m_exchangeItems[index].identity[1] == id) { return true; } } @@ -583,7 +583,7 @@ const char* CSession::GatName2RswName(const char* gatName) { // OFFSET: 0x00DDEF40 // FUNCTION: fn_23415 ITEM_INFO CSession::FindItem1760ByItemId(const char* itemId) const { - for (std::list::const_iterator it = this->unknown_1760.begin(); it != this->unknown_1760.end(); ++it) { + for (std::list::const_iterator it = this->merchantHopeToSellItems.begin(); it != this->merchantHopeToSellItems.end(); ++it) { if (it->itemId == itemId) { return *it; } @@ -595,7 +595,7 @@ ITEM_INFO CSession::FindItem1760ByItemId(const char* itemId) const { // OFFSET: 0x00DDF090 // FUNCTION: fn_23417 int CSession::GetItem1760QuantityByItemId(const char* itemId) const { - for (const ITEM_INFO& item : this->unknown_1760) { + for (const ITEM_INFO& item : this->merchantHopeToSellItems) { if (item.itemId == itemId) { return item.quantity; } @@ -607,7 +607,7 @@ int CSession::GetItem1760QuantityByItemId(const char* itemId) const { // OFFSET: 0x00DDF2D0 // FUNCTION: fn_23422 SessionRecord0734 CSession::FindRecord0734(int id) const { - for (const SessionRecord0734& record : this->unknown_0734) { + for (const SessionRecord0734& record : this->miniPartyRecords) { if (record.id == id) { return record; } @@ -639,9 +639,9 @@ const char* CSession::GetBgmFileName(const char* rswName) { // OFFSET: 0x00DF9CD0 // FUNCTION: fn_23565 bool CSession::HasItem17D4(int itemId) const { - if (!this->unknown_1784[10].empty()) { - for (std::list::const_iterator item = this->unknown_1784[10].begin(); - item != this->unknown_1784[10].end(); ++item) { + if (!this->inventoryCategories[10].empty()) { + for (std::list::const_iterator item = this->inventoryCategories[10].begin(); + item != this->inventoryCategories[10].end(); ++item) { if (std::atoi(item->itemId.c_str()) == itemId) { return true; } @@ -666,7 +666,7 @@ int CSession::IsFriendName(const char* name) const { // OFFSET: 0x00E1DFB0 // FUNCTION: fn_23889 int CSession::GetSceneUnknown004C() const { - return static_cast(g_modeMgr.GetGameMode())->scene->unknown_004C; + return static_cast(g_modeMgr.GetGameMode())->scene->isSiegeMode; } // OFFSET: 0x00DDB4D0 @@ -691,8 +691,8 @@ bool CSession::IsNumberWithCommas(char* text) { // OFFSET: 0x00DDC050 // FUNCTION: fn_23361 int CSession::FindUnknown0708(int key) const { - auto found = this->unknown_0708.find(key); - if (found != this->unknown_0708.end()) { + auto found = this->skillEffectIds.find(key); + if (found != this->skillEffectIds.end()) { return found->second; } @@ -702,8 +702,8 @@ int CSession::FindUnknown0708(int key) const { // OFFSET: 0x00DDC0A0 // FUNCTION: fn_23362 int CSession::FindUnknown0700(int key) const { - auto found = this->unknown_0700.find(key); - if (found != this->unknown_0700.end()) { + auto found = this->skillFollowEffects.find(key); + if (found != this->skillFollowEffects.end()) { return found->second; } @@ -763,13 +763,13 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) { return nullptr; } - if (item->unknown_0000[3] != 0) { - if (item->unknown_0000[3] != 0x8000 || this->unknown_16EC == item->unknown_0000[1]) { + if (item->identity[3] != 0) { + if (item->identity[3] != 0x8000 || this->equippedArrowIndex == item->identity[1]) { return nullptr; } for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { - if (it->unknown_0000[1] == this->unknown_16EC) { + if (it->identity[1] == this->equippedArrowIndex) { return &*it; } } @@ -778,72 +778,72 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) { } ITEM_INFO* equipped = nullptr; - switch (item->unknown_0000[2]) { + switch (item->identity[2]) { case EQP_HEAD_LOW: - equipped = &this->unknown_17F0[0]; + equipped = &this->equippedItems[0]; break; case EQP_HAND_R: case EQP_HAND_R | EQP_HAND_L: - equipped = &this->unknown_17F0[1]; + equipped = &this->equippedItems[1]; break; case EQP_GARMENT: - equipped = &this->unknown_17F0[2]; + equipped = &this->equippedItems[2]; break; case EQP_ACC_RL: - equipped = &this->unknown_17F0[3]; + equipped = &this->equippedItems[3]; break; case EQP_ARMOR: - equipped = &this->unknown_17F0[4]; + equipped = &this->equippedItems[4]; break; case EQP_HAND_L: - equipped = &this->unknown_17F0[5]; + equipped = &this->equippedItems[5]; break; case EQP_SHOES: - equipped = &this->unknown_17F0[6]; + equipped = &this->equippedItems[6]; break; case EQP_HEAD_TOP: case EQP_HEAD_TOP | EQP_HEAD_LOW: case EQP_HEAD_TOP | EQP_HEAD_MID: case EQP_HEAD_TOP | EQP_HEAD_MID | EQP_HEAD_LOW: - equipped = &this->unknown_17F0[8]; + equipped = &this->equippedItems[8]; break; case EQP_HEAD_MID: case EQP_HEAD_MID | EQP_HEAD_LOW: - equipped = &this->unknown_17F0[9]; + equipped = &this->equippedItems[9]; break; case EQP_COSTUME_HEAD_LOW: - equipped = &this->unknown_2B50[0]; + equipped = &this->costumeItems[0]; break; case EQP_SHADOW_WEAPON: - equipped = &this->unknown_2B50[1]; + equipped = &this->costumeItems[1]; break; case EQP_COSTUME_GARMENT: - equipped = &this->unknown_2B50[2]; + equipped = &this->costumeItems[2]; break; case EQP_SHADOW_ACC_R: - equipped = &this->unknown_2B50[3]; + equipped = &this->costumeItems[3]; break; case EQP_SHADOW_ARMOR: - equipped = &this->unknown_2B50[4]; + equipped = &this->costumeItems[4]; break; case EQP_SHADOW_SHIELD: - equipped = &this->unknown_2B50[5]; + equipped = &this->costumeItems[5]; break; case EQP_SHADOW_SHOES: - equipped = &this->unknown_2B50[6]; + equipped = &this->costumeItems[6]; break; case EQP_SHADOW_ACC_L: - equipped = &this->unknown_2B50[7]; + equipped = &this->costumeItems[7]; break; case EQP_COSTUME_HEAD_TOP: case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID: case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_LOW: case EQP_COSTUME_HEAD_TOP | EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW: - equipped = &this->unknown_2B50[8]; + equipped = &this->costumeItems[8]; break; case EQP_COSTUME_HEAD_MID: case EQP_COSTUME_HEAD_MID | EQP_COSTUME_HEAD_LOW: - equipped = &this->unknown_2B50[9]; + equipped = &this->costumeItems[9]; break; } @@ -858,9 +858,9 @@ ITEM_INFO* CSession::GetEquippedItem(const ITEM_INFO* item) { // FUNCTION: fn_23367 ITEM_INFO CSession::FindItem2B50(std::uint32_t id, int* index) const { for (int i = 0; i < 10; ++i) { - if (this->unknown_2B50[i].unknown_0000[1] == id) { + if (this->costumeItems[i].identity[1] == id) { *index = i; - return this->unknown_2B50[i]; + return this->costumeItems[i]; } } @@ -871,9 +871,9 @@ ITEM_INFO CSession::FindItem2B50(std::uint32_t id, int* index) const { // FUNCTION: fn_23369 ITEM_INFO CSession::FindItem17F0(std::uint32_t id, int* index) const { for (int i = 0; i < 10; ++i) { - if (this->unknown_17F0[i].unknown_0000[1] == id) { + if (this->equippedItems[i].identity[1] == id) { *index = i; - return this->unknown_17F0[i]; + return this->equippedItems[i]; } } @@ -893,7 +893,7 @@ std::uint16_t CSession::FindInventoryIndexByItemId(int itemId) { for (int i = 0; i < count; ++i) { ITEM_INFO item = this->GetInventoryItemAt(i); if (std::atoi(item.itemId.c_str()) == itemId) { - return static_cast(item.unknown_0000[1]); + return static_cast(item.identity[1]); } } @@ -906,7 +906,7 @@ std::vector CSession::FindInventoryIndicesByItemId(int itemId, unsigned cha std::vector indices; for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { if (itemId == std::atoi(it->itemId.c_str()) && (identifiedOnly != 1 || it->identified == 1)) { - indices.push_back(static_cast(it->unknown_0000[1])); + indices.push_back(static_cast(it->identity[1])); } } @@ -969,9 +969,9 @@ ITEM_INFO CSession::GetItem1784At(int list, int index) const { return ITEM_INFO(0); } - if (static_cast(list) < 11 && !this->unknown_1784[list].empty()) { + if (static_cast(list) < 11 && !this->inventoryCategories[list].empty()) { int position = 0; - for (const ITEM_INFO& item : this->unknown_1784[list]) { + for (const ITEM_INFO& item : this->inventoryCategories[list]) { if (position == index) { return item; } @@ -1496,7 +1496,7 @@ int CSession::GetTalkType(const char* text, int* talkType, std::string* parts) { // OFFSET: 0x00DDF890 // FUNCTION: fn_23426 int CSession::GetItem1728Count() const { - return static_cast(this->unknown_1728.size()); + return static_cast(this->sellItems.size()); } // OFFSET: 0x00DDFA50 @@ -1513,7 +1513,7 @@ ITEM_INFO CSession::GetItem21A0(int index) const { } if (index >= 0 && index < 10) { - return this->unknown_21A0[index]; + return this->alternateEquippedItems[index]; } return ITEM_INFO(0); @@ -1522,7 +1522,7 @@ ITEM_INFO CSession::GetItem21A0(int index) const { // OFFSET: 0x00DDFD30 // FUNCTION: fn_23445 int CSession::GetItem1718QuantityByItemId(const ITEM_INFO& item) const { - for (std::list::const_iterator it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { + for (std::list::const_iterator it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { if (std::atoi(it->itemId.c_str()) == std::atoi(item.itemId.c_str())) { return it->quantity; } @@ -1534,8 +1534,8 @@ int CSession::GetItem1718QuantityByItemId(const ITEM_INFO& item) const { // OFFSET: 0x00DDFDB0 // FUNCTION: fn_23446 int CSession::GetItem1718QuantityOf(const ITEM_INFO& item) const { - for (auto it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { return it->quantity; } } @@ -1546,9 +1546,9 @@ int CSession::GetItem1718QuantityOf(const ITEM_INFO& item) const { // OFFSET: 0x00DDFDE0 // FUNCTION: fn_23447 std::uint16_t CSession::GetItem1718Unknown006CByItemId(const ITEM_INFO& item) const { - for (std::list::const_iterator it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { + for (std::list::const_iterator it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { if (std::atoi(it->itemId.c_str()) == std::atoi(item.itemId.c_str())) { - return it->unknown_006C; + return it->priceFactor; } } @@ -1558,9 +1558,9 @@ std::uint16_t CSession::GetItem1718Unknown006CByItemId(const ITEM_INFO& item) co // OFFSET: 0x00DDFE60 // FUNCTION: fn_23448 std::uint16_t CSession::GetItem1718Unknown006COf(const ITEM_INFO& item) const { - for (auto it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { - return it->unknown_006C; + for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { + return it->priceFactor; } } @@ -1571,7 +1571,7 @@ std::uint16_t CSession::GetItem1718Unknown006COf(const ITEM_INFO& item) const { // FUNCTION: fn_23449 std::uint16_t CSession::SumItem1720Unknown006CByItemId() const { std::uint16_t total = 0; - for (std::list::const_iterator it = this->unknown_1720.begin(); it != this->unknown_1720.end(); ++it) { + for (std::list::const_iterator it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { total += it->quantity * this->GetItem1718Unknown006CByItemId(*it); } @@ -1582,7 +1582,7 @@ std::uint16_t CSession::SumItem1720Unknown006CByItemId() const { // FUNCTION: fn_23450 std::uint16_t CSession::SumItem1720Unknown006C() const { std::uint16_t total = 0; - for (auto it = this->unknown_1720.begin(); it != this->unknown_1720.end(); ++it) { + for (auto it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { total += it->quantity * this->GetItem1718Unknown006COf(*it); } @@ -1592,7 +1592,7 @@ std::uint16_t CSession::SumItem1720Unknown006C() const { // OFFSET: 0x00DE0620 // FUNCTION: fn_23456 ITEM_INFO CSession::FindItem1720ByItemId(const char* itemId) const { - for (std::list::const_iterator it = this->unknown_1720.begin(); it != this->unknown_1720.end(); ++it) { + for (std::list::const_iterator it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { if (it->itemId == itemId) { return *it; } @@ -1604,9 +1604,9 @@ ITEM_INFO CSession::FindItem1720ByItemId(const char* itemId) const { // OFFSET: 0x00DE06E0 // FUNCTION: fn_23457 ITEM_INFO CSession::GetItem1720At(int index) const { - std::list::const_iterator it = this->unknown_1720.begin(); + std::list::const_iterator it = this->purchaseItems.begin(); int position = 0; - while (it != this->unknown_1720.end()) { + while (it != this->purchaseItems.end()) { if (position == index) { return *it; } @@ -1620,7 +1620,7 @@ ITEM_INFO CSession::GetItem1720At(int index) const { // OFFSET: 0x00DE0770 // FUNCTION: fn_23458 int CSession::GetItem1720QuantityByItemId(const char* itemId) const { - for (const ITEM_INFO& item : this->unknown_1720) { + for (const ITEM_INFO& item : this->purchaseItems) { if (item.itemId == itemId) { return item.quantity; } @@ -1632,8 +1632,8 @@ int CSession::GetItem1720QuantityByItemId(const char* itemId) const { // OFFSET: 0x00DE07D0 // FUNCTION: fn_23459 int CSession::GetItem1720Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1720) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->purchaseItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -1645,8 +1645,8 @@ int CSession::GetItem1720Quantity(std::uint32_t id) const { // FUNCTION: fn_23460 int CSession::GetItem1720Total() const { int total = 0; - for (auto item = this->unknown_1720.begin(); item != this->unknown_1720.end(); ++item) { - total += item->unknown_0014[1] * item->quantity; + for (auto item = this->purchaseItems.begin(); item != this->purchaseItems.end(); ++item) { + total += item->prices[1] * item->quantity; } return total; @@ -1661,8 +1661,8 @@ const char* CSession::GetMonsterRmaName(int job) const { // OFFSET: 0x00DE08F0 // FUNCTION: fn_23463 ITEM_INFO CSession::FindItem1730(std::uint32_t id) const { - for (auto item = this->unknown_1730.begin(); item != this->unknown_1730.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->storageItems.begin(); item != this->storageItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -1673,13 +1673,13 @@ ITEM_INFO CSession::FindItem1730(std::uint32_t id) const { // OFFSET: 0x00DE0980 // FUNCTION: fn_23464 ITEM_INFO CSession::GetItem1730At(int index) const { - if (this->unknown_1730.empty()) { + if (this->storageItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1730.begin(); + std::list::const_iterator it = this->storageItems.begin(); int position = 0; - while (it != this->unknown_1730.end()) { + while (it != this->storageItems.end()) { if (position == index) { return *it; } @@ -1693,8 +1693,8 @@ ITEM_INFO CSession::GetItem1730At(int index) const { // OFFSET: 0x00DE0A20 // FUNCTION: fn_23465 int CSession::GetItem1730Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1730) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->storageItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -1705,13 +1705,13 @@ int CSession::GetItem1730Quantity(std::uint32_t id) const { // OFFSET: 0x00DE0D30 // FUNCTION: fn_23470 ITEM_INFO CSession::GetItem1718At(int index) const { - if (this->unknown_1718.empty()) { + if (this->shopItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1718.begin(); + std::list::const_iterator it = this->shopItems.begin(); int position = 0; - while (it != this->unknown_1718.end()) { + while (it != this->shopItems.end()) { if (position == index) { return *it; } @@ -1725,8 +1725,8 @@ ITEM_INFO CSession::GetItem1718At(int index) const { // OFFSET: 0x00DE0DD0 // FUNCTION: fn_23471 int CSession::GetItem1718Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1718) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->shopItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -1743,8 +1743,8 @@ const char* CSession::GetHotkeyDescription(int index) const { // OFFSET: 0x00DE0EB0 // FUNCTION: fn_23475 ITEM_INFO CSession::FindItem1738(std::uint32_t id) const { - for (auto item = this->unknown_1738.begin(); item != this->unknown_1738.end(); ++item) { - if (item->unknown_0000[1] == id) { + for (auto item = this->cartItems.begin(); item != this->cartItems.end(); ++item) { + if (item->identity[1] == id) { return *item; } } @@ -1755,13 +1755,13 @@ ITEM_INFO CSession::FindItem1738(std::uint32_t id) const { // OFFSET: 0x00DE0F40 // FUNCTION: fn_23476 ITEM_INFO CSession::GetItem1738At(int index) const { - if (this->unknown_1738.empty()) { + if (this->cartItems.empty()) { return ITEM_INFO(0); } - std::list::const_iterator it = this->unknown_1738.begin(); + std::list::const_iterator it = this->cartItems.begin(); int position = 0; - while (it != this->unknown_1738.end()) { + while (it != this->cartItems.end()) { if (position == index) { return *it; } @@ -1775,8 +1775,8 @@ ITEM_INFO CSession::GetItem1738At(int index) const { // OFFSET: 0x00DE0FE0 // FUNCTION: fn_23477 int CSession::GetItem1738Quantity(std::uint32_t id) const { - for (const ITEM_INFO& item : this->unknown_1738) { - if (item.unknown_0000[1] == id) { + for (const ITEM_INFO& item : this->cartItems) { + if (item.identity[1] == id) { return item.quantity; } } @@ -1842,7 +1842,7 @@ bool CSession::IsGuildMemberName(const char* name) const { } } - return std::strcmp(g_guildInfo.unknown_0018.c_str(), name) == 0; + return std::strcmp(g_guildInfo.masterName.c_str(), name) == 0; } // OFFSET: 0x00DFA160 @@ -1897,7 +1897,7 @@ static_assert(sizeof(PACKET_CZ_USE_SKILL_END) == 4); // OFFSET: 0x00E2ED90 // FUNCTION: fn_24151 void CSession::AddUnknown7F94(std::uint32_t id) { - this->unknown_7F94.insert(id); + this->pendingActorNames.insert(id); } // OFFSET: 0x00E2F3B0 @@ -1905,7 +1905,7 @@ void CSession::AddUnknown7F94(std::uint32_t id) { void CSession::EndSkillOption() { auto option = this->m_options.m_values.find(2); if (option != this->m_options.m_values.end() && static_cast(option->second) != 0) { - this->unknown_61A4 = 0; + this->automaticSkillHotkey = 0; PACKET_CZ_USE_SKILL_END packet; packet.packetType = ID_CZ_USE_SKILL_END; packet.skillId = GC_ROLLINGCUTTER; @@ -1924,7 +1924,7 @@ void CSession::ClearNormalItemSlots() { // FUNCTION: fn_24155 void CSession::ResetItems6B68() { for (int index = 0; index < 10; ++index) { - this->unknown_6B68[index].Reset(); + this->swapEquippedItems[index].Reset(); } RefreshItemWindows(&g_windowMgr); @@ -1934,7 +1934,7 @@ void CSession::ResetItems6B68() { // FUNCTION: fn_24156 void CSession::ResetItems61B8() { for (int index = 0; index < 10; ++index) { - this->unknown_61B8[index].Reset(); + this->swapCostumeItems[index].Reset(); } RefreshItemWindows(&g_windowMgr); @@ -1943,7 +1943,7 @@ void CSession::ResetItems61B8() { // OFFSET: 0x00E2F5A0 // FUNCTION: fn_24157 bool CSession::IsPartyRecommendTarget(std::uint32_t aid) { - if (g_session.m_level < 70 || g_session.IsBabyJob(g_session.GetDisplayJob()) == true || g_session.unknown_5468 == 0) { + if (g_session.m_level < 70 || g_session.IsBabyJob(g_session.GetDisplayJob()) == true || g_session.adoptionSkillAvailable == 0) { return false; } @@ -1958,7 +1958,7 @@ bool CSession::IsPartyRecommendTarget(std::uint32_t aid) { return false; } - return static_cast(actor->unknown_0210) <= 50 && g_session.IsBabyJob(aid) != true && + return static_cast(actor->characterLevel) <= 50 && g_session.IsBabyJob(aid) != true && static_cast(aid - JT_NOVICE_H) > 20; } @@ -1992,7 +1992,7 @@ std::vector SerializeItems(const std::list& items) { // OFFSET: 0x00E2F9E0 // FUNCTION: fn_24161 int CSession::GetUnknown8148() const { - return this->unknown_8148; + return this->sessionIndex; } // OFFSET: 0x00DFF060 @@ -2006,7 +2006,7 @@ void CSession::RefreshWindow02C8() { // OFFSET: 0x00DFF080 // FUNCTION: fn_23607 void CSession::RefreshItem1740Window() { - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02F4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantItemWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -2016,9 +2016,9 @@ void CSession::RefreshItem1740Window() { void CSession::RefreshItem1750Window(int type) { std::uint32_t window; if (type == 1) { - window = g_windowMgr.unknown_0410; + window = g_windowMgr.buyingShopMirrorItemWnd; } else { - window = type == 2 ? g_windowMgr.unknown_0420 : g_windowMgr.unknown_02F8; + window = type == 2 ? g_windowMgr.purchaseMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd; } if (window) { @@ -2029,7 +2029,7 @@ void CSession::RefreshItem1750Window(int type) { // OFFSET: 0x00DFF120 // FUNCTION: fn_23610 void CSession::UpdateUnknown1708(int enabled) { - this->unknown_1708 = g_serviceOptions.Get(enabled ? 45 : 46); + this->monsterInfoEnabled = g_serviceOptions.Get(enabled ? 45 : 46); } // OFFSET: 0x00DFF150 @@ -2052,9 +2052,9 @@ void CSession::RefreshItem1738Window() { // OFFSET: 0x00DFF1A0 // FUNCTION: fn_23613 void CSession::EraseRecord0734(int id) { - for (auto it = this->unknown_0734.begin(); it != this->unknown_0734.end(); ++it) { + for (auto it = this->miniPartyRecords.begin(); it != this->miniPartyRecords.end(); ++it) { if (id == it->id) { - this->unknown_0734.erase(it); + this->miniPartyRecords.erase(it); return; } } @@ -2071,10 +2071,10 @@ void CSession::IgnoreText(std::string text) { void CSession::SaveMiniPartyInfo() { std::string text; - for (auto it = this->unknown_0734.begin(); it != this->unknown_0734.end(); ++it) { + for (auto it = this->miniPartyRecords.begin(); it != this->miniPartyRecords.end(); ++it) { char line[512]; std::memset(line, 0, sizeof(line)); - sprintf_s(line, "{%s,%d,%d,%d}\n", g_session.DecodePlayerName(), it->unknown_0000, it->id, it->unknown_0008); + sprintf_s(line, "{%s,%d,%d,%d}\n", g_session.DecodePlayerName(), it->active, it->id, it->cell); text += line; } @@ -2089,7 +2089,7 @@ void CSession::SaveMiniPartyInfo() { // FUNCTION: fn_23617 void CSession::SetItem1768Quantity(int index, int quantity) { int position = 0; - for (ITEM_INFO& item : this->unknown_1768) { + for (ITEM_INFO& item : this->merchantPurchaseSavedItems) { if (position == index) { item.quantity = quantity; return; @@ -2101,8 +2101,8 @@ void CSession::SetItem1768Quantity(int index, int quantity) { // OFFSET: 0x00DFF4B0 // FUNCTION: fn_23618 void CSession::SetUnknown5C1C(int value) { - this->unknown_5C1C = value; - if (UIWindow* window = g_windowMgr.unknown_01E0) { + this->replayPacketMode = value; + if (UIWindow* window = g_windowMgr.equipWnd) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -2131,8 +2131,8 @@ void CSession::UpdateFriendName(std::uint32_t characterId, const char* name) { // FUNCTION: fn_23621 void CSession::SetEquipItem2B50(unsigned int index, const ITEM_INFO& item) { if (index <= 9) { - this->unknown_2B50[index] = item; - EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.unknown_0000[3])); + this->costumeItems[index] = item; + EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.identity[3])); } } @@ -2155,7 +2155,7 @@ void SetMemberFlags(std::uint32_t* flags) { // OFFSET: 0x00DFF8B0 // FUNCTION: fn_23624 void CSession::SetUnknown16EC(std::uint32_t value) { - this->unknown_16EC = value; + this->equippedArrowIndex = value; this->InvalidateWindowFrames(); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -2177,8 +2177,8 @@ void CSession::SetUnknown16EC(std::uint32_t value) { g_activeSkillEffects.erase(it); } - if (mode->scene && mode->scene->player && mode->scene->player->unknown_0544) { - mode->scene->player->unknown_0544->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); + if (mode->scene && mode->scene->player && mode->scene->player->skillEffect) { + mode->scene->player->skillEffect->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); } } @@ -2186,8 +2186,8 @@ void CSession::SetUnknown16EC(std::uint32_t value) { // FUNCTION: fn_23625 void CSession::SetEquipItem17F0(unsigned int index, const ITEM_INFO& item) { if (index <= 9) { - this->unknown_17F0[index] = item; - EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.unknown_0000[3])); + this->equippedItems[index] = item; + EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->RefreshWearable(reinterpret_cast(item.identity[3])); } } @@ -2230,7 +2230,7 @@ void CSession::SetHomunSkillLevel(int skillId, int level) { // FUNCTION: fn_23628 void CSession::UpdateInventoryItem(const ITEM_INFO& item, unsigned char refresh) { auto it = this->m_inventoryItems.begin(); - while (it != this->m_inventoryItems.end() && it->unknown_0000[1] != item.unknown_0000[1]) { + while (it != this->m_inventoryItems.end() && it->identity[1] != item.identity[1]) { ++it; } @@ -2260,10 +2260,10 @@ void CSession::SetMercSkillLevel(int skillId, int level) { // FUNCTION: fn_23630 void CSession::SetItem1768Unknown0014(int index, std::uint32_t value) { int position = 0; - for (ITEM_INFO& item : this->unknown_1768) { + for (ITEM_INFO& item : this->merchantPurchaseSavedItems) { if (position == index) { - item.unknown_0014[0] = value; - item.unknown_0014[1] = value; + item.prices[0] = value; + item.prices[1] = value; return; } ++position; @@ -2274,16 +2274,16 @@ void CSession::SetItem1768Unknown0014(int index, std::uint32_t value) { // FUNCTION: fn_23631 void CSession::AddRecord0734(int id, std::uint32_t value) { SessionRecord0734 record; - record.unknown_0000 = 1; + record.active = 1; record.id = id; - record.unknown_0008 = value; - this->unknown_0734.push_back(record); + record.cell = value; + this->miniPartyRecords.push_back(record); } // OFFSET: 0x00DFFCB0 // FUNCTION: fn_23632 void CSession::SetUnknown5210(int value) { - this->unknown_5210 = value; + this->exchangeMoney = value; if (UIWindow* window = g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -2292,7 +2292,7 @@ void CSession::SetUnknown5210(int value) { // OFFSET: 0x00DFFD20 // FUNCTION: fn_23634 void CSession::SetUnknown5214(int value) { - this->unknown_5214 = value; + this->otherExchangeMoney = value; if (UIWindow* window = g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -2309,9 +2309,9 @@ void CSession::SetPlayerPosition(int x, int y, int direction) { // OFFSET: 0x00E00100 // FUNCTION: fn_23636 void CSession::SetRecord0734Value(int id, std::uint32_t value) { - for (SessionRecord0734& record : this->unknown_0734) { + for (SessionRecord0734& record : this->miniPartyRecords) { if (id == record.id) { - record.unknown_0008 = value; + record.cell = value; return; } } @@ -2325,7 +2325,7 @@ ITEM_INFO CSession::GetItem6B68(int index) const { } if (static_cast(index) <= 9) { - return this->unknown_6B68[index]; + return this->swapEquippedItems[index]; } return ITEM_INFO(0); @@ -2335,11 +2335,11 @@ ITEM_INFO CSession::GetItem6B68(int index) const { // FUNCTION: fn_24175 ITEM_INFO CSession::GetItem61B8(int index) const { if (index == 15) { - return LookupClientItemByIdentity(this->m_inventoryItems, this->unknown_7EC8); + return LookupClientItemByIdentity(this->m_inventoryItems, this->swapArrowIndex); } if (static_cast(index) <= 9) { - return this->unknown_61B8[index]; + return this->swapCostumeItems[index]; } return ITEM_INFO(0); @@ -2367,14 +2367,14 @@ void CSession::RefreshHpSpWindows() { return; } - if (g_windowMgr.unknown_01DC) { - if (this->unknown_556C < this->unknown_5568 || - *reinterpret_cast(&this->unknown_5570[4]) < *reinterpret_cast(&this->unknown_5570[0])) { + if (g_windowMgr.basicInfoWnd) { + if (this->maxHp < this->hp || + *reinterpret_cast(&this->spAndHomunculusStats[4]) < *reinterpret_cast(&this->spAndHomunculusStats[0])) { return; } - reinterpret_cast(g_windowMgr.unknown_01DC)->Invalidate(); - reinterpret_cast(g_windowMgr.unknown_01DC)->InvalidateChildren(); + reinterpret_cast(g_windowMgr.basicInfoWnd)->Invalidate(); + reinterpret_cast(g_windowMgr.basicInfoWnd)->InvalidateChildren(); } static_cast(g_modeMgr.GetGameMode())->NotifyItemBounds(); @@ -2417,7 +2417,7 @@ bool CSession::IsBlankString(const char* text) const { // FUNCTION: fn_23561 bool CSession::HasNoUnknown1784Items() const { for (int i = 0; i < 11; ++i) { - if (!this->unknown_1784[i].empty()) { + if (!this->inventoryCategories[i].empty()) { return false; } } @@ -2428,20 +2428,20 @@ bool CSession::HasNoUnknown1784Items() const { // OFFSET: 0x00DFA3C0 // FUNCTION: fn_23573 bool CSession::HasItem1740Number(int value) const { - std::list::const_iterator it = this->unknown_1740.begin(); - for (; it != this->unknown_1740.end(); ++it) { + std::list::const_iterator it = this->merchantShopItems.begin(); + for (; it != this->merchantShopItems.end(); ++it) { if (value == std::atoi(it->itemId.c_str())) { break; } } - return it != this->unknown_1740.end(); + return it != this->merchantShopItems.end(); } // OFFSET: 0x00DFA420 // FUNCTION: fn_23574 bool CSession::HasUnknown809C(std::string name) { - for (std::vector::iterator it = this->unknown_809C.begin(); it != this->unknown_809C.end(); ++it) { + for (std::vector::iterator it = this->characterNames.begin(); it != this->characterNames.end(); ++it) { if (*it == name) { return true; } @@ -2475,8 +2475,8 @@ bool CSession::IsKnownName(std::string name) const { // FUNCTION: fn_23593 void CSession::FlagInventoryItem(std::uint32_t id) { for (ITEM_INFO& item : this->m_inventoryItems) { - if (item.unknown_0000[1] == id) { - item.unknown_0074[2] = 1; + if (item.identity[1] == id) { + item.flags[2] = 1; RefreshItemWindows(&g_windowMgr); return; } @@ -2486,9 +2486,9 @@ void CSession::FlagInventoryItem(std::uint32_t id) { // OFFSET: 0x00DFC0F0 // FUNCTION: fn_23594 void CSession::FlagItem1740(std::uint32_t id) { - for (ITEM_INFO& item : this->unknown_1740) { - if (item.unknown_0000[1] == id) { - item.unknown_0074[2] = 1; + for (ITEM_INFO& item : this->merchantShopItems) { + if (item.identity[1] == id) { + item.flags[2] = 1; RefreshItemWindows(&g_windowMgr); return; } @@ -2498,9 +2498,9 @@ void CSession::FlagItem1740(std::uint32_t id) { // OFFSET: 0x00DFC130 // FUNCTION: fn_23595 void CSession::FlagItem1738(std::uint32_t id) { - for (ITEM_INFO& item : this->unknown_1738) { - if (item.unknown_0000[1] == id) { - item.unknown_0074[2] = 1; + for (ITEM_INFO& item : this->cartItems) { + if (item.identity[1] == id) { + item.flags[2] = 1; RefreshItemWindows(&g_windowMgr); return; } @@ -2510,15 +2510,15 @@ void CSession::FlagItem1738(std::uint32_t id) { // OFFSET: 0x00DFC170 // FUNCTION: fn_23596 void CSession::CollectItems1750() { - this->unknown_1750.erase(this->unknown_1750.begin(), this->unknown_1750.end()); + this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); const int count = static_cast(this->m_inventoryItems.size()); for (int i = 0; i < count; ++i) { ITEM_INFO item = this->GetInventoryItemAt(i); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { const int itemId = std::atoi(item.itemId.c_str()); - if (std::find(this->unknown_1778.begin(), this->unknown_1778.end(), itemId) != this->unknown_1778.end()) { - this->unknown_1750.push_back(item); + if (std::find(this->inventoryFilterIds.begin(), this->inventoryFilterIds.end(), itemId) != this->inventoryFilterIds.end()) { + this->merchantMyShopItems.push_back(item); } } } @@ -2527,41 +2527,41 @@ void CSession::CollectItems1750() { // OFFSET: 0x00DFC330 // FUNCTION: fn_23597 void CSession::RefreshItems1750() { - this->unknown_1750.erase(this->unknown_1750.begin(), this->unknown_1750.end()); + this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); const int count = static_cast(this->m_inventoryItems.size()); for (int i = 0; i < count; ++i) { ITEM_INFO item = this->GetInventoryItemAt(i); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { const int itemId = std::atoi(item.itemId.c_str()); - if (std::find(this->unknown_1778.begin(), this->unknown_1778.end(), itemId) != this->unknown_1778.end()) { - this->unknown_1750.push_back(item); + if (std::find(this->inventoryFilterIds.begin(), this->inventoryFilterIds.end(), itemId) != this->inventoryFilterIds.end()) { + this->merchantMyShopItems.push_back(item); } } } - for (auto it = this->unknown_1750.begin(); it != this->unknown_1750.end();) { + for (auto it = this->merchantMyShopItems.begin(); it != this->merchantMyShopItems.end();) { const int itemId = std::atoi(it->itemId.c_str()); - auto match = this->unknown_1748.begin(); - for (; match != this->unknown_1748.end(); ++match) { + auto match = this->merchantMirrorItems.begin(); + for (; match != this->merchantMirrorItems.end(); ++match) { if (std::atoi(match->itemId.c_str()) == itemId) { break; } } - if (match == this->unknown_1748.end()) { - it = this->unknown_1750.erase(it); + if (match == this->merchantMirrorItems.end()) { + it = this->merchantMyShopItems.erase(it); continue; } - const std::uint32_t value = match->unknown_0014[0]; - if (value == 0xFFFFFFFF || g_session.HasItem61B8(it->unknown_0000[1]) == 1) { - it = this->unknown_1750.erase(it); + const std::uint32_t value = match->prices[0]; + if (value == 0xFFFFFFFF || g_session.HasItem61B8(it->identity[1]) == 1) { + it = this->merchantMyShopItems.erase(it); continue; } - it->unknown_0014[0] = value; - it->unknown_0014[1] = value; + it->prices[0] = value; + it->prices[1] = value; ++it; } } @@ -2576,7 +2576,7 @@ std::uint32_t CSession::GetItemNameColor(const ITEM_INFO& item) const { if (color != 0) { return color; } - if (item.unknown_0064 == 2) { + if (item.bindOnEquip == 2) { return 0xFFFFFF00; } return 0xFFFFFFFF; @@ -2590,7 +2590,7 @@ int CSession::CountItems2B50() const { std::vector itemIds; int count = 0; for (int i = 0; i < 10; ++i) { - const std::uint32_t itemId = this->unknown_2B50[i].unknown_0000[1]; + const std::uint32_t itemId = this->costumeItems[i].identity[1]; if (itemId != 0 && std::find(itemIds.begin(), itemIds.end(), itemId) == itemIds.end()) { itemIds.push_back(itemId); ++count; @@ -2606,7 +2606,7 @@ int CSession::CountItems17F0() const { std::vector itemIds; int count = 0; for (int i = 0; i < 10; ++i) { - const std::uint32_t itemId = this->unknown_17F0[i].unknown_0000[1]; + const std::uint32_t itemId = this->equippedItems[i].identity[1]; if (itemId != 0 && std::find(itemIds.begin(), itemIds.end(), itemId) == itemIds.end()) { itemIds.push_back(itemId); ++count; @@ -2624,8 +2624,8 @@ void CSession::RefreshSkillTree() { g_windowMgr.window_02C4->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (g_windowMgr.unknown_01DC) { - UIBasicInfoWnd* info = reinterpret_cast(g_windowMgr.unknown_01DC); + if (g_windowMgr.basicInfoWnd) { + UIBasicInfoWnd* info = reinterpret_cast(g_windowMgr.basicInfoWnd); info->SetHeight(info->geometry.height); } } @@ -2650,7 +2650,7 @@ unsigned char CSession::GetShopType(int id) { return 0; } - return it->second.unknown_0000; + return it->second.flag; } // OFFSET: 0x00DE3930 @@ -2659,8 +2659,8 @@ std::pair CSession::GetShopEntry(unsigned int index, int key) { auto name = this->m_nameToId.find(std::string(this->m_navigationPlayerMap)); if (name != this->m_nameToId.end()) { auto shop = this->m_shops.find(name->second); - if (shop != this->m_shops.end() && index < shop->second.unknown_0004.size()) { - std::map>& entries = shop->second.unknown_0004[index]; + if (shop != this->m_shops.end() && index < shop->second.items.size()) { + std::map>& entries = shop->second.items[index]; auto entry = entries.find(key); if (entry != entries.end()) { return entry->second; @@ -2695,7 +2695,7 @@ void CSession::HiFriends(char* text) { greeting += text ? text : "*^_^*"; for (const MessengerMember& member : this->m_friends) { - g_windowMgr.unknown_04DC = greeting.c_str(); + g_windowMgr.chatInputText = greeting.c_str(); g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(member.name.c_str()), 0, 0, 0); if (++g_pendingWhisperCount > 40) { g_pendingWhisperCount = 40; @@ -2722,7 +2722,7 @@ void CSession::LoadMiniPartyInfo() { char token[24]; SessionRecord0734 record; for (int i = 0; i < size; ++i) { - record.unknown_0000 = 1; + record.active = 1; switch (data[i]) { case ',': { if (_mbsstr(reinterpret_cast(name), @@ -2733,14 +2733,14 @@ void CSession::LoadMiniPartyInfo() { state = 3; } else if (state == 3) { ++i; - record.unknown_0008 = std::atoi(&data[i]); + record.cell = std::atoi(&data[i]); state = 1; } } break; } case '}': - this->unknown_0734.push_back(record); + this->miniPartyRecords.push_back(record); break; case '{': { ++i; @@ -2755,7 +2755,7 @@ void CSession::LoadMiniPartyInfo() { strcpy_s(name, sizeof(name), token); if (state == 1) { ++i; - record.unknown_0000 = std::atoi(&data[i]); + record.active = std::atoi(&data[i]); state = 2; } break; @@ -2782,31 +2782,31 @@ void CSession::LoadExternalSettings() { this->m_hotkeyScript->Load("Lua Files\\service_korea\\ExternalSettings_kr", true, false); } - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevel", &*reinterpret_cast(this->unknown_7EE8)); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevel", &*reinterpret_cast(this->maxBaseLevel)); this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevel3rd", &this->m_maxLevel); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelExtend2", &*reinterpret_cast(&this->unknown_7EF0[0x00])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelUpperJob", &*reinterpret_cast(&this->unknown_7EF0[0x04])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelHomun", &*reinterpret_cast(&this->unknown_7EF0[0x08])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelNovice", &*reinterpret_cast(&this->unknown_7EF0[0x0C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelSuperNovice", &*reinterpret_cast(&this->unknown_7EF0[0x10])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelBase", &*reinterpret_cast(&this->unknown_7EF0[0x14])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel2nd", &*reinterpret_cast(&this->unknown_7EF0[0x18])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel3rd", &*reinterpret_cast(&this->unknown_7EF0[0x1C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelExtend2", &*reinterpret_cast(&this->unknown_7EF0[0x20])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelUpperJob", &*reinterpret_cast(&this->unknown_7EF0[0x24])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelExtend2", &*reinterpret_cast(&this->jobLevelLimits[0x00])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelUpperJob", &*reinterpret_cast(&this->jobLevelLimits[0x04])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelHomun", &*reinterpret_cast(&this->jobLevelLimits[0x08])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelNovice", &*reinterpret_cast(&this->jobLevelLimits[0x0C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelSuperNovice", &*reinterpret_cast(&this->jobLevelLimits[0x10])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelBase", &*reinterpret_cast(&this->jobLevelLimits[0x14])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel2nd", &*reinterpret_cast(&this->jobLevelLimits[0x18])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel3rd", &*reinterpret_cast(&this->jobLevelLimits[0x1C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelExtend2", &*reinterpret_cast(&this->jobLevelLimits[0x20])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelUpperJob", &*reinterpret_cast(&this->jobLevelLimits[0x24])); - if (*reinterpret_cast(this->unknown_7EE8) == -1 || + if (*reinterpret_cast(this->maxBaseLevel) == -1 || this->m_maxLevel == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x00]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x04]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x08]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x0C]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x10]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x14]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x18]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x1C]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x20]) == -1 || - *reinterpret_cast(&this->unknown_7EF0[0x24]) == -1) { + *reinterpret_cast(&this->jobLevelLimits[0x00]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x04]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x08]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x0C]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x10]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x14]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x18]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x1C]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x20]) == -1 || + *reinterpret_cast(&this->jobLevelLimits[0x24]) == -1) { const std::uint8_t source[] = { 0x1E, 0x9B, 0xE7, 0x02, 0xF7, 0x9D, 0x18, 0x1D, 0x2F, 0x8C, 0xE7, 0x03, 0xD6, 0xD8, @@ -2817,10 +2817,10 @@ void CSession::LoadExternalSettings() { ShowErrorDialog(nullptr, name.Text(), 0); } - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevel4th", &*reinterpret_cast(&this->unknown_7EF0[0x74])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel4th", &*reinterpret_cast(&this->unknown_7EF0[0x78])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevel4th", &*reinterpret_cast(&this->jobLevelLimits[0x74])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevel4th", &*reinterpret_cast(&this->jobLevelLimits[0x78])); - if (*reinterpret_cast(&this->unknown_7EF0[0x74]) == -1 || *reinterpret_cast(&this->unknown_7EF0[0x78]) == -1) { + if (*reinterpret_cast(&this->jobLevelLimits[0x74]) == -1 || *reinterpret_cast(&this->jobLevelLimits[0x78]) == -1) { const std::uint8_t source[] = { 0xC2, 0x6B, 0x53, 0x54, 0x97, 0x4F, 0xEC, 0xE5, 0xF3, 0x7C, 0x53, 0x55, 0xB6, 0x0A, @@ -2831,10 +2831,10 @@ void CSession::LoadExternalSettings() { ShowErrorDialog(nullptr, name.Text(), 0); } - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelDoram", &*reinterpret_cast(&this->unknown_7EF0[0x28])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelDoram", &*reinterpret_cast(&this->unknown_7EF0[0x2C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "BaseLevelDoram", &*reinterpret_cast(&this->jobLevelLimits[0x28])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelTable", "JobLevelDoram", &*reinterpret_cast(&this->jobLevelLimits[0x2C])); - if (*reinterpret_cast(&this->unknown_7EF0[0x2C]) == -1) { + if (*reinterpret_cast(&this->jobLevelLimits[0x2C]) == -1) { const std::uint8_t source[] = { 0x84, 0x29, 0xA1, 0x34, 0x8D, 0xA7, 0xC6, 0xDF, 0xB5, 0x3E, 0xA1, 0x35, 0xAC, 0xE2, @@ -2845,24 +2845,24 @@ void CSession::LoadExternalSettings() { ShowErrorDialog(nullptr, name.Text(), 0); } - this->m_hotkeyScript->Call(std::string("GetTableBoolValueForC", 21), "ss>b", "MakeableRace", "Doram", &*reinterpret_cast(this->unknown_7F74)); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Default99LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x30])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Default99LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x34])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Baby99LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x38])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Baby99LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x3C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "SecondHigh99LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x40])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "SecondHigh99LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x44])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Homun99LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x48])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Homun99LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x4C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Boss99LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x50])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default150LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x54])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default150LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x58])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default160LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x5C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default160LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x60])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "HomunMaxLvAura", &*reinterpret_cast(&this->unknown_7EF0[0x64])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "HomunMaxLvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x68])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default185LvAura", &*reinterpret_cast(&this->unknown_7EF0[0x6C])); - this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default185LvAura_sub", &*reinterpret_cast(&this->unknown_7EF0[0x70])); + this->m_hotkeyScript->Call(std::string("GetTableBoolValueForC", 21), "ss>b", "MakeableRace", "Doram", &*reinterpret_cast(this->raceCreationOptions)); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Default99LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x30])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Default99LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x34])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Baby99LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x38])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Baby99LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x3C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "SecondHigh99LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x40])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "SecondHigh99LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x44])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Homun99LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x48])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Homun99LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x4C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "Level99AuraTable", "Boss99LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x50])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default150LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x54])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default150LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x58])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default160LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x5C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default160LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x60])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "HomunMaxLvAura", &*reinterpret_cast(&this->jobLevelLimits[0x64])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "HomunMaxLvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x68])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default185LvAura", &*reinterpret_cast(&this->jobLevelLimits[0x6C])); + this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "Default185LvAura_sub", &*reinterpret_cast(&this->jobLevelLimits[0x70])); this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "MaxLevelEffect4th", &this->m_maxLevelEffect4th); this->m_hotkeyScript->Call(std::string("GetTableIntValueForC", 20), "ss>d", "MaxLevelAuraTable", "MaxLevelEffect4th_sub", &this->m_maxLevelEffect4thSub); @@ -2909,8 +2909,8 @@ void CSession::Init() { } this->m_averagePing = 0; - *reinterpret_cast(&this->unknown_5490[0x08]) = 0; - *reinterpret_cast(this->unknown_546C) = 1; + *reinterpret_cast(&this->itemSendState[0x08]) = 0; + *reinterpret_cast(this->showEffects) = 1; this->m_aid = 0; SYSTEMTIME systemTime; @@ -2918,65 +2918,65 @@ void CSession::Init() { const int now = (((((static_cast(systemTime.wYear) * 12 +systemTime.wMonth) * 31 + systemTime.wDay) * 24 + systemTime.wHour + 9) * 60 + systemTime.wMinute) * 60 + systemTime.wSecond) * 1000 + systemTime.wMilliseconds; - *reinterpret_cast(this->unknown_170C) = now - timeGetTime(); - *reinterpret_cast(this->unknown_0F54) = 0; - *reinterpret_cast(&this->unknown_0F64[0x00]) = 0; - *reinterpret_cast(&this->unknown_07A4[0x04]) = 0; - *reinterpret_cast(&this->unknown_07A4[0x00]) = 0; - *reinterpret_cast(&this->unknown_07A4[0x0C]) = 0; - *reinterpret_cast(&this->unknown_07A4[0x08]) = 0; - *reinterpret_cast(&this->unknown_5454[0x00]) = 0; - *reinterpret_cast(&this->unknown_5454[0x04]) = 0; - *reinterpret_cast(&this->unknown_5454[0x08]) = 0; - this->unknown_5460 = 0; - *reinterpret_cast(this->unknown_079C) = 0; + *reinterpret_cast(this->clientTimeOffset) = now - timeGetTime(); + *reinterpret_cast(this->guildTargetCharacter) = 0; + *reinterpret_cast(&this->whisperOptions[0x00]) = 0; + *reinterpret_cast(&this->timeAttackState[0x04]) = 0; + *reinterpret_cast(&this->timeAttackState[0x00]) = 0; + *reinterpret_cast(&this->timeAttackState[0x0C]) = 0; + *reinterpret_cast(&this->timeAttackState[0x08]) = 0; + *reinterpret_cast(&this->interactionFlags[0x00]) = 0; + *reinterpret_cast(&this->interactionFlags[0x04]) = 0; + *reinterpret_cast(&this->interactionFlags[0x08]) = 0; + this->partyBlocked = 0; + *reinterpret_cast(this->timeAttackMode) = 0; this->m_hotkeyPage = 0; - *reinterpret_cast(this->unknown_5554) = 0; - this->unknown_0000 = 0; + *reinterpret_cast(this->whisperRecordStorage) = 0; + this->mapPropertyId = 0; g_mapPropertyMgr->Clear(); g_activeSkillEffects.clear(); - *reinterpret_cast(&this->unknown_0F64[0x04]) = 0; - *reinterpret_cast(this->unknown_1014) = 0; - this->unknown_103C = -1; - this->unknown_1040 = 1; - this->unknown_1044 = 100; - *reinterpret_cast(this->unknown_1048) = 100; + *reinterpret_cast(&this->whisperOptions[0x04]) = 0; + *reinterpret_cast(this->petNameModified) = 0; + this->petJob = -1; + this->petLevel = 1; + this->petHunger = 100; + *reinterpret_cast(this->petMaxHunger) = 100; this->m_petFriendly = 100; - this->unknown_1050 = -1; - this->unknown_1054 = 100; - this->unknown_15FC[0] = 0; - *reinterpret_cast(&this->unknown_15FC[0x04]) = -1; - std::sprintf(this->unknown_1018, ""); + this->petEggIndex = -1; + this->petPreviousHunger = 100; + this->monsterTalkState[0] = 0; + *reinterpret_cast(&this->monsterTalkState[0x04]) = -1; + std::sprintf(this->petName, ""); - std::sprintf(reinterpret_cast(&this->unknown_5570[0x0C]), ""); - int* homunStats = reinterpret_cast(&this->unknown_5570[0x2C]); + std::sprintf(reinterpret_cast(&this->spAndHomunculusStats[0x0C]), ""); + int* homunStats = reinterpret_cast(&this->spAndHomunculusStats[0x2C]); for (int index = 0; index < 8; ++index) { homunStats[index] = 0; } this->m_homunJob = -1; - *reinterpret_cast(this->unknown_55C0) = 1; + *reinterpret_cast(this->homunLevel) = 1; this->m_homunHp = 0; - *reinterpret_cast(this->unknown_55C8) = 999999; + *reinterpret_cast(this->homunMaxHp) = 999999; this->m_homunSp = 0; - this->unknown_55D0 = 999999; + this->homunMaxSp = 999999; this->m_homunExp = 0; this->m_homunMaxExp = 999999; - this->unknown_55F0 = 100; - this->unknown_55F4 = 100; - this->unknown_55D4 = 100; - this->unknown_55F8 = 0; - this->unknown_5614 = 0; + this->homunHunger = 100; + this->homunMaxHunger = 100; + this->homunFriendly = 100; + this->homunNameModified = 0; + this->homunAlive = 0; this->m_traceAi = 0; this->m_homunActionState = 0; - *reinterpret_cast(&this->unknown_5620[0x00]) = 0; - *reinterpret_cast(&this->unknown_5620[0x04]) = 0; - this->unknown_5608 = 0; - this->unknown_560C = 0; - this->unknown_5610 = 0; - this->unknown_55FC = 0; - this->unknown_5600 = 0; - this->unknown_5604 = 0; + *reinterpret_cast(&this->companionTargetState[0x00]) = 0; + *reinterpret_cast(&this->companionTargetState[0x04]) = 0; + this->moveHomunEnemy = 0; + this->selectHomunEnemy = 0; + this->attackHomunEnemy = 0; + this->homunEnemyGid = 0; + this->homunEnemyX = 0; + this->homunEnemyY = 0; this->m_mercenaryClass = -1; std::sprintf(this->m_mercenaryName, "용병"); @@ -2991,93 +2991,93 @@ void CSession::Init() { this->m_mercenaryLoyalty = 0; this->m_mercenarySummons = 0; this->m_mercenaryKills = 0; - *reinterpret_cast(this->unknown_5690) = 0; + *reinterpret_cast(this->mercenaryAttackRange) = 0; this->m_mercenaryExpiration = 0; this->m_mercenaryActionState = 0; - this->unknown_56B8[0] = 0; + this->autoReplyState[0] = 0; - *reinterpret_cast(&this->unknown_5490[0x04]) = GetTickCount(); - *reinterpret_cast(&this->unknown_5913[0x01]) = 0; - std::sprintf(reinterpret_cast(&this->unknown_5913[0x05]), ""); - reinterpret_cast(this->unknown_5938) = false; - this->unknown_593C = 0; - this->unknown_5940 = -1; - this->unknown_5944 = -1; - this->unknown_5950 = ""; - this->unknown_5968 = 0; - this->unknown_596C = 0; - this->unknown_5970 = 0; - this->unknown_5948 = 0; - *reinterpret_cast(this->unknown_5974) = 0; + *reinterpret_cast(&this->itemSendState[0x04]) = GetTickCount(); + *reinterpret_cast(&this->characterRenameData[0x01]) = 0; + std::sprintf(reinterpret_cast(&this->characterRenameData[0x05]), ""); + reinterpret_cast(this->replaySessionFlag) = false; + this->memorialWindowOpen = 0; + this->memorialWindowX = -1; + this->memorialWindowY = -1; + this->memorialDungeonName = ""; + this->memorialQueuePosition = 0; + this->memorialCreationTime = 0; + this->memorialExpirationTime = 0; + this->memorialDungeonState = 0; + *reinterpret_cast(this->equipmentViewState) = 0; this->m_simplifiedSkillList = 0; this->m_showSkillDescription = 1; - this->unknown_59BC = 0; + this->characterSlotState = 0; this->m_normalSlotCount = 0; this->m_premiumSlotCount = 0; this->m_billingSlotCount = 0; this->m_producibleSlotCount = 0; - this->unknown_59D0 = 0; + this->blockedCharacterCount = 0; this->m_validSlotCount = 0; this->m_noSubChatWnds.clear(); this->m_subChatWnds.clear(); this->m_hotkeyScript = nullptr; - this->unknown_5BC0 = -1; + this->elementalGid = -1; this->LoadProhibitionLog(); - this->unknown_5BD4.clear(); - this->unknown_5BE0 = 0; - this->unknown_5BE4 = 0; - this->unknown_5BE8 = -1; - this->unknown_5BEC = -1; - this->unknown_5BF0 = 0xFFFFFFFF; + this->storeSearchResults.clear(); + this->storeSearchCount = 0; + this->storeSearchPageFlags = 0; + this->storeSearchX = -1; + this->storeSearchY = -1; + this->storeSearchOwnerAid = 0xFFFFFFFF; this->ClearPairValues(1, 1, 1); this->m_lockItemDrop = false; - for (std::list& items : this->unknown_1784) { + for (std::list& items : this->inventoryCategories) { items.clear(); } - this->unknown_5C1C = 0; - *reinterpret_cast(&this->unknown_5C15[0x03]) = 0; + this->replayPacketMode = 0; + *reinterpret_cast(&this->sellSoundState[0x03]) = 0; this->m_skipPriceWarning = true; - *reinterpret_cast(&this->unknown_5C30[0x00]) = 0; - *reinterpret_cast(&this->unknown_5C30[0x04]) = 0; - *reinterpret_cast(&this->unknown_5C30[0x08]) = 0; - this->unknown_06FC = 0; - this->unknown_06A8 = 0; - for (ITEM_INFO& item : this->unknown_5C68) { + *reinterpret_cast(&this->itemSelectionState[0x00]) = 0; + *reinterpret_cast(&this->itemSelectionState[0x04]) = 0; + *reinterpret_cast(&this->itemSelectionState[0x08]) = 0; + this->mainShortcutRow = 0; + this->alternateShortcutRow = 0; + for (ITEM_INFO& item : this->selectionItems) { item.Reset(); } - this->unknown_6140 = 0; - *reinterpret_cast(&this->unknown_5C02[0x02]) = 0; - *reinterpret_cast(&this->unknown_5C02[0x06]) = 0; - *reinterpret_cast(&this->unknown_5C02[0x0A]) = 0; - *reinterpret_cast(&this->unknown_5C02[0x0E]) = 1; + this->achievementResult = 0; + *reinterpret_cast(&this->itemDropState[0x02]) = 0; + *reinterpret_cast(&this->itemDropState[0x06]) = 0; + *reinterpret_cast(&this->itemDropState[0x0A]) = 0; + *reinterpret_cast(&this->itemDropState[0x0E]) = 1; this->m_muteSellSound = true; this->ClearAchievements(); - this->unknown_6184 = 0; + this->playerAppearanceState = 0; this->m_bodyCostume = 0; this->m_lastIntervalTime = timeGetTime(); - this->unknown_61A4 = 0; + this->automaticSkillHotkey = 0; this->m_currentHotkey = 0; - this->unknown_1010 = 0xFFFFFFFF; - *reinterpret_cast(&this->unknown_5570[0x08]) = -1; - *reinterpret_cast(&this->unknown_5620[0x08]) = -1; + this->petGid = 0xFFFFFFFF; + *reinterpret_cast(&this->spAndHomunculusStats[0x08]) = -1; + *reinterpret_cast(&this->companionTargetState[0x08]) = -1; this->m_guildMemberListSort = true; this->m_blockPrivateTab = false; - this->unknown_7ECC[0] = 0; + this->swapEquipmentFlag[0] = 0; this->m_itemDefaultSort = false; this->m_itemAscendingOrder = false; this->m_itemDescendingOrder = false; this->m_showMenuIcon = true; this->m_homunculusAutoFeed = false; - *reinterpret_cast(&this->unknown_7F7D[0x03]) = -1; - *reinterpret_cast(&this->unknown_7F7D[0x07]) = 50; - this->unknown_7F7D[0x0B] = 0; + *reinterpret_cast(&this->homunculusFeedOptions[0x03]) = -1; + *reinterpret_cast(&this->homunculusFeedOptions[0x07]) = 50; + this->homunculusFeedOptions[0x0B] = 0; this->m_showRankingSchedule = -1; - *reinterpret_cast(this->unknown_8128) = 0; + *reinterpret_cast(this->feedOptions) = 0; } // OFFSET: 0x00DF7C40 @@ -3088,20 +3088,20 @@ void CSession::ResetCharacterState() { const int randomValue = std::rand() % 1024 + 1; this->m_zeny = 0; - *reinterpret_cast(&this->unknown_162C[0x04]) = 0; - *reinterpret_cast(&this->unknown_162C[0x08]) = 0; - *reinterpret_cast(&this->unknown_162C[0x1C]) = 0; - *reinterpret_cast(&this->unknown_162C[0x20]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x04]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x08]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x1C]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x20]) = 0; this->m_maxWeight = 0; this->m_weight = 0; - if (this->unknown_556C != randomValue) { - this->unknown_556C = randomValue; + if (this->maxHp != randomValue) { + this->maxHp = randomValue; this->RefreshHpSpWindows(); } - if (this->unknown_5568 != randomValue) { - this->unknown_5568 = randomValue; + if (this->hp != randomValue) { + this->hp = randomValue; this->RefreshHpSpWindows(); } @@ -3111,82 +3111,82 @@ void CSession::ResetCharacterState() { std::memcpy(this->m_playerNameKey, "잠이들었던거야", sizeof("잠이들었던거야")); - this->unknown_1678 = 0; - this->unknown_167C = 0; - this->unknown_1680 = 0; - this->unknown_166C = 0; - this->unknown_1670 = 0; - this->unknown_1674 = 0; + this->intelligenceBonus = 0; + this->dexterityBonus = 0; + this->luckBonus = 0; + this->strengthBonus = 0; + this->agilityBonus = 0; + this->vitalityBonus = 0; - *reinterpret_cast(&this->unknown_169C[0x00]) = 2; - *reinterpret_cast(&this->unknown_169C[0x04]) = 2; - *reinterpret_cast(&this->unknown_169C[0x14]) = 2; - *reinterpret_cast(&this->unknown_169C[0x08]) = 2; - *reinterpret_cast(&this->unknown_169C[0x0C]) = 2; - *reinterpret_cast(&this->unknown_169C[0x10]) = 2; + *reinterpret_cast(&this->combatStats[0x00]) = 2; + *reinterpret_cast(&this->combatStats[0x04]) = 2; + *reinterpret_cast(&this->combatStats[0x14]) = 2; + *reinterpret_cast(&this->combatStats[0x08]) = 2; + *reinterpret_cast(&this->combatStats[0x0C]) = 2; + *reinterpret_cast(&this->combatStats[0x10]) = 2; - *reinterpret_cast(&this->unknown_162C[0x28]) = 0; - *reinterpret_cast(&this->unknown_169C[0x1C]) = 0; - *reinterpret_cast(&this->unknown_169C[0x30]) = 0; - *reinterpret_cast(&this->unknown_169C[0x34]) = 0; - *reinterpret_cast(&this->unknown_169C[0x38]) = 0; - *reinterpret_cast(&this->unknown_169C[0x28]) = 0; - *reinterpret_cast(&this->unknown_169C[0x2C]) = 0; - *reinterpret_cast(&this->unknown_169C[0x20]) = 0; - *reinterpret_cast(&this->unknown_169C[0x3C]) = 0; - *reinterpret_cast(&this->unknown_169C[0x40]) = 0; - *reinterpret_cast(&this->unknown_169C[0x44]) = 0; - *reinterpret_cast(&this->unknown_169C[0x4C]) = 0; - *reinterpret_cast(&this->unknown_169C[0x48]) = 0; - *reinterpret_cast(&this->unknown_169C[0x18]) = 0; - *reinterpret_cast(&this->unknown_169C[0x24]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x28]) = 0; + *reinterpret_cast(&this->combatStats[0x1C]) = 0; + *reinterpret_cast(&this->combatStats[0x30]) = 0; + *reinterpret_cast(&this->combatStats[0x34]) = 0; + *reinterpret_cast(&this->combatStats[0x38]) = 0; + *reinterpret_cast(&this->combatStats[0x28]) = 0; + *reinterpret_cast(&this->combatStats[0x2C]) = 0; + *reinterpret_cast(&this->combatStats[0x20]) = 0; + *reinterpret_cast(&this->combatStats[0x3C]) = 0; + *reinterpret_cast(&this->combatStats[0x40]) = 0; + *reinterpret_cast(&this->combatStats[0x44]) = 0; + *reinterpret_cast(&this->combatStats[0x4C]) = 0; + *reinterpret_cast(&this->combatStats[0x48]) = 0; + *reinterpret_cast(&this->combatStats[0x18]) = 0; + *reinterpret_cast(&this->combatStats[0x24]) = 0; - *reinterpret_cast(&this->unknown_162C[0x04]) = 0; - *reinterpret_cast(&this->unknown_162C[0x08]) = 0; - *reinterpret_cast(&this->unknown_162C[0x1C]) = 0; - *reinterpret_cast(&this->unknown_162C[0x20]) = 0; - *reinterpret_cast(&this->unknown_162C[0x0C]) = 999999; - *reinterpret_cast(&this->unknown_162C[0x10]) = 0; - *reinterpret_cast(&this->unknown_162C[0x14]) = 999999; - *reinterpret_cast(&this->unknown_162C[0x18]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x04]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x08]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x1C]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x20]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x0C]) = 999999; + *reinterpret_cast(&this->playerExperienceState[0x10]) = 0; + *reinterpret_cast(&this->playerExperienceState[0x14]) = 999999; + *reinterpret_cast(&this->playerExperienceState[0x18]) = 0; this->cartCount = 0; this->cartMaxCount = 0; this->cartWeight = 0; this->cartMaxWeight = 0; - *reinterpret_cast(&this->unknown_0F44[0x00]) = 13; - *reinterpret_cast(&this->unknown_0F44[0x04]) = 5; - this->unknown_0F24[0] = 0; + *reinterpret_cast(&this->storeSlotCounts[0x00]) = 13; + *reinterpret_cast(&this->storeSlotCounts[0x04]) = 5; + this->playerTeam[0] = 0; this->m_score1 = -1; this->m_score2 = -1; - this->unknown_0F30[0] = 0; - this->unknown_0F4C = 20; - this->unknown_0F50 = 0; + this->chatFont[0] = 0; + this->storeItemLimit = 20; + this->selectedCharacterSlot = 0; - this->unknown_16EC = 0; - this->unknown_54A0 = 0; - this->unknown_54A4 = 0; - this->unknown_54A8 = 0; - this->unknown_1708 = 1; - this->unknown_5480 = 0; - this->unknown_5484 = 0; - this->unknown_5488 = 0; - this->unknown_548C = 0; - *reinterpret_cast(&g_session.unknown_544C[0x00]) = 0; - *reinterpret_cast(&this->unknown_555C[0x08]) = 0; - this->unknown_5468 = 0; - this->unknown_5478[0] = 1; - this->unknown_5450 = 0; - this->unknown_5448 = 0; - this->unknown_59DC[0] = 1; + this->equippedArrowIndex = 0; + this->partyExpShare = 0; + this->partyItemCollect = 0; + this->partyItemDistribute = 0; + this->monsterInfoEnabled = 1; + this->quitBlocked = 0; + this->battleChat = 0; + this->quitAllowed = 0; + this->sessionFlag = 0; + *reinterpret_cast(&g_session.mapTransitionFlag[0x00]) = 0; + *reinterpret_cast(&this->playerStatusFlags[0x08]) = 0; + this->adoptionSkillAvailable = 0; + this->loginOptions[0] = 1; + this->guildLeader = 0; + this->showTimer = 0; + this->mouseAndChannelOptions[0] = 1; MEMORYSTATUS memoryStatus = {}; memoryStatus.dwLength = sizeof(memoryStatus); GlobalMemoryStatus(&memoryStatus); - this->unknown_5470 = memoryStatus.dwTotalPhys < 0x9B72EC0 ? 1 : 0; + this->lowMemory = memoryStatus.dwTotalPhys < 0x9B72EC0 ? 1 : 0; - std::memset(&this->unknown_07F4[0x40], 0, 0x660); - this->unknown_5C1C = 0; + std::memset(&this->characterSelectionData[0x40], 0, 0x660); + this->replayPacketMode = 0; std::map& traitStats = this->m_traits.stats; traitStats[0xE7] = 0; @@ -3211,30 +3211,30 @@ void CSession::ResetInventoryItems() { this->m_pingSamples.erase(this->m_pingSamples.begin(), this->m_pingSamples.end()); for (int index = 0; index < 10; ++index) { - this->unknown_17F0[index].Reset(); + this->equippedItems[index].Reset(); } } // OFFSET: 0x00DF8940 // FUNCTION: fn_23512 void CSession::ClearItemContainers() { - this->unknown_1720.erase(this->unknown_1720.begin(), this->unknown_1720.end()); - this->unknown_1730.erase(this->unknown_1730.begin(), this->unknown_1730.end()); - this->unknown_1718.erase(this->unknown_1718.begin(), this->unknown_1718.end()); + this->purchaseItems.erase(this->purchaseItems.begin(), this->purchaseItems.end()); + this->storageItems.erase(this->storageItems.begin(), this->storageItems.end()); + this->shopItems.erase(this->shopItems.begin(), this->shopItems.end()); - this->unknown_5210 = 0; + this->exchangeMoney = 0; for (int index = 0; index < 10; ++index) { this->m_exchangeItems[index].quantity = 0; } - this->unknown_5214 = 0; + this->otherExchangeMoney = 0; for (int index = 0; index < 10; ++index) { this->m_itemSlots[index].quantity = 0; } - this->unknown_1738.erase(this->unknown_1738.begin(), this->unknown_1738.end()); + this->cartItems.erase(this->cartItems.begin(), this->cartItems.end()); g_session.m_skillBundle.skills.clear(); this->m_friends.erase(this->m_friends.begin(), this->m_friends.end()); @@ -3250,34 +3250,34 @@ void CSession::ClearItemContainers() { } this->m_partyMembers.clear(); - this->unknown_54C4 = ""; - this->unknown_5464 = 0; + this->partyName = ""; + this->partyLeader = 0; this->ClearItemQuantities(); } // OFFSET: 0x00DF3160 // FUNCTION: fn_23503 void CSession::ClearEntryList5BD4() { - this->unknown_5BD4.clear(); - this->unknown_5BE0 = 0; - this->unknown_5BE4 = 0; - this->unknown_5BE8 = -1; - this->unknown_5BEC = -1; - this->unknown_5BF0 = 0xFFFFFFFF; + this->storeSearchResults.clear(); + this->storeSearchCount = 0; + this->storeSearchPageFlags = 0; + this->storeSearchX = -1; + this->storeSearchY = -1; + this->storeSearchOwnerAid = 0xFFFFFFFF; } // OFFSET: 0x00D8D9E0 // FUNCTION: fn_22269 void CSession::ClearAchievements() { - this->unknown_6144.clear(); - this->unknown_6150 = 0; - this->unknown_6154 = 0; - this->unknown_6158 = 0; - this->unknown_6160.clear(); - this->unknown_614C = 0; - this->unknown_616C.clear(); - this->unknown_615C = 0; - this->unknown_6178.clear(); + this->achievements.clear(); + this->achievementLevel = 0; + this->achievementCompleted = 0; + this->achievementTotal = 0; + this->jobTitles.clear(); + this->achievementScore = 0; + this->achievementIds.clear(); + this->jobTitle = 0; + this->trackedAchievements.clear(); } // OFFSET: 0x00DDC9D0 @@ -3382,7 +3382,7 @@ bool CSession::LoadMapViewParameters() { // OFFSET: 0x00DF8670 // FUNCTION: fn_23510 void CSession::InitWeaponHitWaveNames() { - std::vector& weaponWaves = reinterpret_cast&>(this->unknown_525C[0x18]); + std::vector& weaponWaves = reinterpret_cast&>(this->weaponSoundTables[0x18]); weaponWaves.clear(); weaponWaves.resize(105, "_hit_mace.wav"); for (int weapon = 0; weapon < 105; ++weapon) { @@ -3883,7 +3883,7 @@ void CSession::InitCommandTables() { return std::strcmp(left.first, right.first) < 0; }); std::vector>& chatCommands = - reinterpret_cast>&>(this->unknown_52E8[0x00]); + reinterpret_cast>&>(this->commandTables[0x00]); chatCommands.push_back(std::make_pair("/taekwon", 152)); chatCommands.push_back(std::make_pair("/hi", 151)); chatCommands.push_back(std::make_pair("/blacksmith", 146)); @@ -3904,7 +3904,7 @@ void CSession::InitCommandTables() { chatCommands.push_back(std::make_pair("/inall", 17)); chatCommands.push_back(std::make_pair("/exall", 16)); std::vector>& windowCommands = - reinterpret_cast>&>(this->unknown_52E8[0x0C]); + reinterpret_cast>&>(this->commandTables[0x0C]); if (g_serviceType == 12) { windowCommands.push_back(std::make_pair("Sala de Chat", 67)); windowCommands.push_back(std::make_pair("Atributos", 65)); @@ -3942,7 +3942,7 @@ void CSession::InitCommandTables() { windowCommands.push_back(std::make_pair("EmotionList", 76)); windowCommands.push_back(std::make_pair("PetInfo", 74)); } - std::vector& shortcutCommands = reinterpret_cast&>(this->unknown_52E8[0x18]); + std::vector& shortcutCommands = reinterpret_cast&>(this->commandTables[0x18]); shortcutCommands.push_back("Alt + C"); shortcutCommands.push_back("Alt + A"); shortcutCommands.push_back("Alt + D"); @@ -4699,9 +4699,9 @@ SessionTraits::SessionTraits() { // FUNCTION: fn_22763 CSession::CSession() { this->m_priorityClass = 32; - *reinterpret_cast(&this->unknown_8128[4]) = 0x100; - this->unknown_8148 = -1; - this->unknown_80A8.clear(); + *reinterpret_cast(&this->feedOptions[4]) = 0x100; + this->sessionIndex = -1; + this->skyMapNames.clear(); CItemInfoMgr::Create(); CSpecialPopupMgr::Create(); @@ -4757,19 +4757,19 @@ CSession::CSession() { this->m_newRobeDrawOnTop = false; this->m_localMapMove = 0; this->m_swapEquipmentMode = 0; - this->unknown_7F74[0] = 1; - *reinterpret_cast(&this->unknown_7F74[4]) = 0; + this->raceCreationOptions[0] = 1; + *reinterpret_cast(&this->raceCreationOptions[4]) = 0; CPrivateAirplaneMgr::Create(); CCheckAttendanceMgr::Create(); - *reinterpret_cast(&this->unknown_5974[0x28]) = 0; - this->unknown_7FBC = 0; + *reinterpret_cast(&this->equipmentViewState[0x28]) = 0; + this->extraInventorySlots = 0; CMapInfoMgr::Create(); - this->unknown_8074 = 0; - *reinterpret_cast(&this->unknown_7EF0[0x74]) = 0; - *reinterpret_cast(&this->unknown_7EF0[0x78]) = 0; + this->madogearType = 0; + *reinterpret_cast(&this->jobLevelLimits[0x74]) = 0; + *reinterpret_cast(&this->jobLevelLimits[0x78]) = 0; CChangeMaterialMgr::CreateInstance(); this->m_options.Clear(); - *reinterpret_cast(&this->unknown_807C[0x18]) = 0; + *reinterpret_cast(&this->webServiceLoginData[0x18]) = 0; this->m_damageSkinIndex = 0; this->m_damageSkinMode = 0; this->m_damageMillionUnit = 0; @@ -6524,7 +6524,7 @@ void CSession::InitResourceNameTables() { shieldJobNames[403] = KarnosBodyPath1().Text(); shieldJobNames[404] = KarnosBodyPath2().Text(); shieldJobNames[405] = AliteaBodyPath1().Text(); - std::vector& unknownNames = reinterpret_cast&>(this->unknown_0F88[0x08]); + std::vector& unknownNames = reinterpret_cast&>(this->additionalSpriteNames[0x08]); unknownNames.resize(2, "f"); unknownNames[0] = "f"; unknownNames[1] = ""; @@ -7039,7 +7039,7 @@ void CSession::LoadSessionTables() { ++g_sessionTableLoadCount; session->InitJobHitWaveNames(); - CCommonObject& storage = reinterpret_cast(session->unknown_5400[0x30]); + CCommonObject& storage = reinterpret_cast(session->minimapTokenStorage[0x30]); std::vector tokens; session->m_bgmFileNames.clear(); session->m_bgmFileNames.reserve(512); @@ -7087,19 +7087,19 @@ void CSession::LoadSessionTables() { session->m_inventoryItems.clear(); session->m_pingSamples.clear(); for (int index = 0; index < 10; ++index) { - session->unknown_17F0[index].Reset(); + session->equippedItems[index].Reset(); } std::vector buyingStoreItems; - session->unknown_1778.clear(); - session->unknown_1778.reserve(512); + session->inventoryFilterIds.clear(); + session->inventoryFilterIds.reserve(512); storage.LoadTokens(buyingStoreItems, "BuyingStoreItemList.txt", 0); for (char* token : buyingStoreItems) { - session->unknown_1778.push_back(std::atoi(token)); + session->inventoryFilterIds.push_back(std::atoi(token)); } buyingStoreItems = std::vector(); - session->unknown_5324 = 0; + session->mapPositionsScaled = 0; session->m_mapPosListCount = -1; session->LoadMapPosTable(); session->LoadExceptionMinimapNameTable(); diff --git a/Source/Client/Session.h b/Source/Client/Session.h index 550268aee..a074fabf6 100644 --- a/Source/Client/Session.h +++ b/Source/Client/Session.h @@ -43,10 +43,10 @@ struct EquipSlots { }; struct SessionRecord6144 { - /* 0000 */ std::uint16_t unknown_0000 = 0; - /* 0004 */ std::uint32_t unknown_0004[10] = {}; - /* 002C */ int unknown_002C = 0; - /* 0030 */ std::uint8_t unknown_0030 = 0; + /* 0000 */ std::uint16_t completionFlags = 0; + /* 0004 */ std::uint32_t objectives[10] = {}; + /* 002C */ int completedAt = 0; + /* 0030 */ std::uint8_t rewarded = 0; /* 0031 */ std::uint8_t unknown_0031; /* 0032 */ std::int16_t year; /* 0034 */ std::int16_t month; @@ -86,10 +86,10 @@ struct SessionRecord6178Entry { struct SessionRecord6178 { /* 0000 */ unsigned char unknown_0000 = 0; - /* 0001 */ unsigned char unknown_0001 = 0; + /* 0001 */ unsigned char completed = 0; /* 0004 */ int id = -1; - /* 0008 */ std::string unknown_0008; - /* 0020 */ std::vector unknown_0020; + /* 0008 */ std::string title; + /* 0020 */ std::vector objectives; }; struct RobeAlpha { @@ -109,14 +109,14 @@ struct ProhibitionLogEntry { }; struct SessionRecord0734 { - /* 0000 */ std::uint32_t unknown_0000 = 0; + /* 0000 */ std::uint32_t active = 0; /* 0004 */ int id; - /* 0008 */ std::uint32_t unknown_0008; + /* 0008 */ std::uint32_t cell; }; struct SessionShop { - /* 0000 */ unsigned char unknown_0000; - /* 0004 */ std::vector>> unknown_0004; + /* 0000 */ unsigned char flag; + /* 0004 */ std::vector>> items; }; struct SessionParameterNameLess { @@ -128,18 +128,18 @@ struct SessionParameterNameLess { struct SessionEntry5BD4 { SessionEntry5BD4() : item() {} SessionEntry5BD4(const SessionEntry5BD4& other) { - std::memcpy(this->unknown_0000, other.unknown_0000, sizeof(this->unknown_0000)); + std::memcpy(this->storeIdentity, other.storeIdentity, sizeof(this->storeIdentity)); std::memcpy(this->storeName, other.storeName, sizeof(this->storeName)); this->price = other.price; this->quantity = other.quantity; new (&this->item) ITEM_INFO(other.item); } ~SessionEntry5BD4() { - this->item.unknown_0044.~basic_string(); + this->item.displayName.~basic_string(); this->item.itemId.~basic_string(); } - /* 0000 */ unsigned char unknown_0000[8]; + /* 0000 */ unsigned char storeIdentity[8]; /* 0008 */ char storeName[80]; /* 0058 */ int price; /* 005C */ std::uint16_t quantity; @@ -178,7 +178,7 @@ class CSession { public: void IconPath(char* output, const char* id, int identified); const char* ItemDragResource(const char* id, int identified); - /* 0000 */ std::uint32_t unknown_0000; + /* 0000 */ std::uint32_t mapPropertyId; /* 0004 */ std::list m_additionalSkills; /* 000C */ CPlayerSkillBundle m_skillBundle; /* 0084 */ std::list m_homunSkills; @@ -192,21 +192,21 @@ public: /* 00BC */ unsigned char m_hotkeyPage; /* 00BD */ unsigned char unknown_00BD[3]; /* 00C0 */ std::string m_hotkeyDescriptions[36]; - /* 0420 */ std::uint32_t unknown_0420[36]; + /* 0420 */ std::uint32_t hotkeySkillLevels[36]; /* 04B0 */ NormalItemSlot m_shortcutSlots[36]; /* 05AC */ NormalItemSlot m_secondaryShortcutSlots[36]; - /* 06A8 */ int unknown_06A8; + /* 06A8 */ int alternateShortcutRow; /* 06AC */ NormalItemSlot m_normalItemSlots[9]; - /* 06EB */ NormalItemSlot unknown_06EB; - /* 06F2 */ NormalItemSlot unknown_06F2; + /* 06EB */ NormalItemSlot quickSlot; + /* 06F2 */ NormalItemSlot alternateQuickSlot; /* 06F9 */ unsigned char unknown_06F9[0x03]; - /* 06FC */ int unknown_06FC; - /* 0700 */ std::map unknown_0700; - /* 0708 */ std::map unknown_0708; - /* 0710 */ std::vector unknown_0710; + /* 06FC */ int mainShortcutRow; + /* 0700 */ std::map skillFollowEffects; + /* 0708 */ std::map skillEffectIds; + /* 0710 */ std::vector extendedSkillLevels; /* 071C */ std::vector m_homunSkillLevels; /* 0728 */ std::vector m_mercSkillLevels; - /* 0734 */ std::list unknown_0734; + /* 0734 */ std::list miniPartyRecords; /* 073C */ std::map m_noSubChatWnds; /* 0744 */ std::map m_subChatWnds; /* 074C */ bool m_canDragWnd; @@ -214,15 +214,15 @@ public: /* 0750 */ std::uint32_t m_prohibitionTarget; /* 0754 */ std::vector m_prohibitionLog; /* 0760 */ std::string m_accountName; - /* 0778 */ std::vector> unknown_0778; - /* 0784 */ std::map unknown_0784; - /* 078C */ std::map unknown_078C; + /* 0778 */ std::vector> keyValues; + /* 0784 */ std::map summonHp; + /* 078C */ std::map summonMaxHp; /* 0794 */ std::uint32_t m_serverTimeOffset; /* 0798 */ int m_serverTimeAdjustCount; - /* 079C */ unsigned char unknown_079C[0x04]; + /* 079C */ unsigned char timeAttackMode[0x04]; /* 07A0 */ std::uint32_t m_averagePing; union { - /* 07A4 */ unsigned char unknown_07A4[0x10]; + /* 07A4 */ unsigned char timeAttackState[0x10]; struct { /* 07A4 */ std::uint32_t m_timeAttackCountdown; /* 07A8 */ std::uint32_t m_timeAttackStart; @@ -231,53 +231,53 @@ public: }; }; /* 07B4 */ unsigned char m_playerNameKey[0x40]; - /* 07F4 */ unsigned char unknown_07F4[0x6A0]; - /* 0E94 */ int unknown_0E94; - /* 0E98 */ int unknown_0E98; + /* 07F4 */ unsigned char characterSelectionData[0x6A0]; + /* 0E94 */ int characterCount; + /* 0E98 */ int cachedSex; /* 0E9C */ int m_sex; - /* 0EA0 */ unsigned char unknown_0EA0[0x38]; + /* 0EA0 */ unsigned char characterLoginData[0x38]; /* 0ED8 */ int m_head; - /* 0EDC */ unsigned char unknown_0EDC[0x10]; + /* 0EDC */ unsigned char weaponAppearance[0x10]; /* 0EEC */ int m_bodyStyle; /* 0EF0 */ int m_headPalette; - /* 0EF4 */ unsigned char unknown_0EF4[0x0C]; + /* 0EF4 */ unsigned char accessoryAppearance[0x0C]; /* 0F00 */ int m_robe; /* 0F04 */ bool m_newRobeDrawOnTop; /* 0F05 */ unsigned char unknown_0F05[0x03]; /* 0F08 */ int m_bodyCostume; - /* 0F0C */ unsigned char unknown_0F0C[0x08]; + /* 0F0C */ unsigned char statusLevelEffects[0x08]; /* 0F14 */ std::uint32_t m_jobFlags; /* 0F18 */ int m_playerX; /* 0F1C */ int m_playerY; /* 0F20 */ int m_playerDir; - /* 0F24 */ unsigned char unknown_0F24[0x04]; + /* 0F24 */ unsigned char playerTeam[0x04]; /* 0F28 */ int m_score1; /* 0F2C */ int m_score2; - /* 0F30 */ unsigned char unknown_0F30[0x04]; + /* 0F30 */ unsigned char chatFont[0x04]; /* 0F34 */ int cartCount; /* 0F38 */ int cartMaxCount; /* 0F3C */ int cartWeight; /* 0F40 */ int cartMaxWeight; union { - /* 0F44 */ unsigned char unknown_0F44[8]; + /* 0F44 */ unsigned char storeSlotCounts[8]; struct { /* 0F44 */ int m_vendingSlotCount; /* 0F48 */ int m_buyingStoreSlotCount; }; }; - /* 0F4C */ int unknown_0F4C; - /* 0F50 */ int unknown_0F50; - /* 0F54 */ unsigned char unknown_0F54[0x04]; + /* 0F4C */ int storeItemLimit; + /* 0F50 */ int selectedCharacterSlot; + /* 0F54 */ unsigned char guildTargetCharacter[0x04]; /* 0F58 */ int m_autoOpenWhisperWindow; /* 0F5C */ int m_whisperOpenSound; /* 0F60 */ int m_autoOpenFriendWhisperWindow; - /* 0F64 */ unsigned char unknown_0F64[0x08]; + /* 0F64 */ unsigned char whisperOptions[0x08]; /* 0F6C */ const char* const* m_humanMaleHeadNames; /* 0F70 */ unsigned char unknown_0F70[0x08]; /* 0F78 */ const char* const* m_humanFemaleHeadNames; /* 0F7C */ unsigned char unknown_0F7C[0x08]; /* 0F84 */ const char* const* m_imfNames; - /* 0F88 */ unsigned char unknown_0F88[0x14]; + /* 0F88 */ unsigned char additionalSpriteNames[0x14]; /* 0F9C */ const char* const* m_shieldJobNames; /* 0FA0 */ unsigned char unknown_0FA0[0x08]; /* 0FA8 */ std::vector m_jobNameTable; @@ -289,83 +289,83 @@ public: /* 0FE4 */ std::list m_pingSamples; /* 0FEC */ std::vector m_palJobNames; /* 0FF8 */ EmotionHotkeys m_emotionHotkeys; - /* 1010 */ std::uint32_t unknown_1010; - /* 1014 */ unsigned char unknown_1014[4]; - /* 1018 */ char unknown_1018[0x20]; - /* 1038 */ int unknown_1038; - /* 103C */ int unknown_103C; - /* 1040 */ int unknown_1040; - /* 1044 */ int unknown_1044; - /* 1048 */ unsigned char unknown_1048[4]; + /* 1010 */ std::uint32_t petGid; + /* 1014 */ unsigned char petNameModified[4]; + /* 1018 */ char petName[0x20]; + /* 1038 */ int petAccessory; + /* 103C */ int petJob; + /* 1040 */ int petLevel; + /* 1044 */ int petHunger; + /* 1048 */ unsigned char petMaxHunger[4]; /* 104C */ int m_petFriendly; - /* 1050 */ int unknown_1050; - /* 1054 */ int unknown_1054; + /* 1050 */ int petEggIndex; + /* 1054 */ int petPreviousHunger; /* 1058 */ int m_petActionTable[5][5][7]; /* 1314 */ std::string unknown_1314[25]; /* 156C */ XmlDocument m_petTalkTable; /* 159C */ XmlDocument m_monsterSkillInfo; /* 15CC */ XmlDocument m_monsterTalkTable; - /* 15FC */ unsigned char unknown_15FC[8]; + /* 15FC */ unsigned char monsterTalkState[8]; /* 1604 */ std::uint32_t m_aid; /* 1608 */ std::uint32_t m_gid; /* 160C */ char m_navigationPlayerMap[0x1C]; /* 1628 */ int m_job; - /* 162C */ unsigned char unknown_162C[0x24]; + /* 162C */ unsigned char playerExperienceState[0x24]; /* 1650 */ int m_level; - /* 1654 */ unsigned char unknown_1654[0x04]; + /* 1654 */ unsigned char statusPoints[0x04]; /* 1658 */ int m_jobLevel; /* 165C */ int m_skillPoint; /* 1660 */ int m_guildSkillPoint; - /* 1664 */ unsigned char unknown_1664[8]; - /* 166C */ int unknown_166C; - /* 1670 */ int unknown_1670; - /* 1674 */ int unknown_1674; - /* 1678 */ int unknown_1678; - /* 167C */ int unknown_167C; - /* 1680 */ int unknown_1680; + /* 1664 */ unsigned char companionSkillPoints[8]; + /* 166C */ int strengthBonus; + /* 1670 */ int agilityBonus; + /* 1674 */ int vitalityBonus; + /* 1678 */ int intelligenceBonus; + /* 167C */ int dexterityBonus; + /* 1680 */ int luckBonus; /* 1684 */ int m_standardStats[6]; - /* 169C */ unsigned char unknown_169C[0x50]; - /* 16EC */ std::uint32_t unknown_16EC; + /* 169C */ unsigned char combatStats[0x50]; + /* 16EC */ std::uint32_t equippedArrowIndex; /* 16F0 */ int m_zeny; - /* 16F4 */ unsigned char unknown_16F4[0x8]; + /* 16F4 */ unsigned char healthPoints[0x8]; /* 16FC */ int m_maxWeight; /* 1700 */ int m_weight; - /* 1704 */ unsigned char unknown_1704[0x4]; - /* 1708 */ int unknown_1708; - /* 170C */ unsigned char unknown_170C[0x4]; + /* 1704 */ unsigned char optionFlags[0x4]; + /* 1708 */ int monsterInfoEnabled; + /* 170C */ unsigned char clientTimeOffset[0x4]; /* 1710 */ std::list m_inventoryItems; - /* 1718 */ std::list unknown_1718; - /* 1720 */ std::list unknown_1720; - /* 1728 */ std::list unknown_1728; - /* 1730 */ std::list unknown_1730; - /* 1738 */ std::list unknown_1738; - /* 1740 */ std::list unknown_1740; - /* 1748 */ std::list unknown_1748; - /* 1750 */ std::list unknown_1750; - /* 1758 */ std::list unknown_1758; - /* 1760 */ std::list unknown_1760; - /* 1768 */ std::list unknown_1768; - /* 1770 */ std::list unknown_1770; - /* 1778 */ std::vector unknown_1778; - /* 1784 */ std::list unknown_1784[11]; + /* 1718 */ std::list shopItems; + /* 1720 */ std::list purchaseItems; + /* 1728 */ std::list sellItems; + /* 1730 */ std::list storageItems; + /* 1738 */ std::list cartItems; + /* 1740 */ std::list merchantShopItems; + /* 1748 */ std::list merchantMirrorItems; + /* 1750 */ std::list merchantMyShopItems; + /* 1758 */ std::list merchantPurchaseItems; + /* 1760 */ std::list merchantHopeToSellItems; + /* 1768 */ std::list merchantPurchaseSavedItems; + /* 1770 */ std::list filteredInventoryItems; + /* 1778 */ std::vector inventoryFilterIds; + /* 1784 */ std::list inventoryCategories[11]; /* 17DC */ std::list m_partyMembers; /* 17E4 */ std::list m_friends; /* 17EC */ unsigned char unknown_17EC[0x04]; - /* 17F0 */ ITEM_INFO unknown_17F0[10]; - /* 21A0 */ ITEM_INFO unknown_21A0[10]; - /* 2B50 */ ITEM_INFO unknown_2B50[10]; - /* 3500 */ ITEM_INFO unknown_3500[10]; + /* 17F0 */ ITEM_INFO equippedItems[10]; + /* 21A0 */ ITEM_INFO alternateEquippedItems[10]; + /* 2B50 */ ITEM_INFO costumeItems[10]; + /* 3500 */ ITEM_INFO alternateCostumeItems[10]; /* 3EB0 */ ITEM_INFO m_exchangeItems[10]; /* 4860 */ ITEM_INFO m_itemSlots[10]; - /* 5210 */ int unknown_5210; - /* 5214 */ int unknown_5214; + /* 5210 */ int exchangeMoney; + /* 5214 */ int otherExchangeMoney; /* 5218 */ std::vector> m_commandIds; /* 5224 */ std::vector> m_bgmFileNames; /* 5230 */ std::vector>> m_fogParameters; /* 523C */ std::vector>> m_mapViewParameters; /* 5248 */ std::vector m_indoorRswNames; /* 5254 */ std::map m_npcLocationRadius; - /* 525C */ unsigned char unknown_525C[0x24]; + /* 525C */ unsigned char weaponSoundTables[0x24]; /* 5280 */ std::list unknown_5280; /* 5288 */ unsigned char unknown_5288[0x0C]; /* 5294 */ const char* const* m_bodyJobNames; @@ -379,82 +379,82 @@ public: /* 52C4 */ std::vector m_robeNames; /* 52D0 */ std::vector m_navigationForbiddenMaps; /* 52DC */ std::vector> m_commandOptions; - /* 52E8 */ unsigned char unknown_52E8[0x28]; + /* 52E8 */ unsigned char commandTables[0x28]; /* 5310 */ std::map m_mapPositions; /* 5318 */ std::map* m_mapPosLists; /* 531C */ std::map m_mapPosBounds; - /* 5324 */ int unknown_5324; + /* 5324 */ int mapPositionsScaled; /* 5328 */ int m_mapPosListCount; - /* 532C */ int unknown_532C; - /* 5330 */ int unknown_5330; - /* 5334 */ int unknown_5334; - /* 5338 */ int unknown_5338; - /* 533C */ int unknown_533C; - /* 5340 */ int unknown_5340[12]; - /* 5370 */ unsigned char unknown_5370[0x30]; - /* 53A0 */ unsigned char unknown_53A0[0x30]; - /* 53D0 */ unsigned char unknown_53D0[0x30]; - /* 5400 */ unsigned char unknown_5400[0x40]; + /* 532C */ int randomStatIndexA; + /* 5330 */ int randomStatIndexB; + /* 5334 */ int randomStatIndexC; + /* 5338 */ int randomStatIndexD; + /* 533C */ int randomStatIndexE; + /* 5340 */ int randomStatValues[12]; + /* 5370 */ unsigned char replayStatValuesA[0x30]; + /* 53A0 */ unsigned char replayStatValuesB[0x30]; + /* 53D0 */ unsigned char replayStatValuesC[0x30]; + /* 5400 */ unsigned char minimapTokenStorage[0x40]; /* 5440 */ std::list m_requestTimers; - /* 5448 */ int unknown_5448; - /* 544C */ unsigned char unknown_544C[0x04]; - /* 5450 */ int unknown_5450; - /* 5454 */ unsigned char unknown_5454[0x0C]; - /* 5460 */ int unknown_5460; - /* 5464 */ int unknown_5464; - /* 5468 */ int unknown_5468; - /* 546C */ unsigned char unknown_546C[0x04]; - /* 5470 */ int unknown_5470; - /* 5474 */ int unknown_5474; - /* 5478 */ unsigned char unknown_5478[8]; - /* 5480 */ int unknown_5480; - /* 5484 */ int unknown_5484; - /* 5488 */ int unknown_5488; - /* 548C */ int unknown_548C; - /* 5490 */ unsigned char unknown_5490[0x10]; - /* 54A0 */ int unknown_54A0; - /* 54A4 */ int unknown_54A4; - /* 54A8 */ int unknown_54A8; - /* 54AC */ std::string unknown_54AC; - /* 54C4 */ std::string unknown_54C4; + /* 5448 */ int showTimer; + /* 544C */ unsigned char mapTransitionFlag[0x04]; + /* 5450 */ int guildLeader; + /* 5454 */ unsigned char interactionFlags[0x0C]; + /* 5460 */ int partyBlocked; + /* 5464 */ int partyLeader; + /* 5468 */ int adoptionSkillAvailable; + /* 546C */ unsigned char showEffects[0x04]; + /* 5470 */ int lowMemory; + /* 5474 */ int performanceWarningEnabled; + /* 5478 */ unsigned char loginOptions[8]; + /* 5480 */ int quitBlocked; + /* 5484 */ int battleChat; + /* 5488 */ int quitAllowed; + /* 548C */ int sessionFlag; + /* 5490 */ unsigned char itemSendState[0x10]; + /* 54A0 */ int partyExpShare; + /* 54A4 */ int partyItemCollect; + /* 54A8 */ int partyItemDistribute; + /* 54AC */ std::string partyRequestName; + /* 54C4 */ std::string partyName; /* 54DC */ std::string unknown_54DC; /* 54F4 */ std::string unknown_54F4; - /* 550C */ std::string unknown_550C; + /* 550C */ std::string storeTitle; /* 5524 */ std::string unknown_5524; /* 553C */ std::string m_serverName; union { - /* 5554 */ unsigned char unknown_5554[4]; + /* 5554 */ unsigned char whisperRecordStorage[4]; /* 5554 */ int m_whisperRecord; }; - /* 5558 */ int unknown_5558; - /* 555C */ unsigned char unknown_555C[0xC]; - /* 5568 */ int unknown_5568; - /* 556C */ int unknown_556C; - /* 5570 */ unsigned char unknown_5570[0x4C]; + /* 5558 */ int currentSex; + /* 555C */ unsigned char playerStatusFlags[0xC]; + /* 5568 */ int hp; + /* 556C */ int maxHp; + /* 5570 */ unsigned char spAndHomunculusStats[0x4C]; /* 55BC */ int m_homunJob; - /* 55C0 */ unsigned char unknown_55C0[0x04]; + /* 55C0 */ unsigned char homunLevel[0x04]; /* 55C4 */ int m_homunHp; - /* 55C8 */ unsigned char unknown_55C8[0x04]; + /* 55C8 */ unsigned char homunMaxHp[0x04]; /* 55CC */ int m_homunSp; - /* 55D0 */ int unknown_55D0; - /* 55D4 */ int unknown_55D4; - /* 55D8 */ int unknown_55D8; + /* 55D0 */ int homunMaxSp; + /* 55D4 */ int homunFriendly; + /* 55D8 */ int homunAccessory; /* 55DC */ unsigned char unknown_55DC[4]; /* 55E0 */ std::int64_t m_homunExp; /* 55E8 */ std::int64_t m_homunMaxExp; - /* 55F0 */ int unknown_55F0; - /* 55F4 */ int unknown_55F4; - /* 55F8 */ int unknown_55F8; - /* 55FC */ int unknown_55FC; - /* 5600 */ int unknown_5600; - /* 5604 */ int unknown_5604; - /* 5608 */ int unknown_5608; - /* 560C */ int unknown_560C; - /* 5610 */ int unknown_5610; - /* 5614 */ int unknown_5614; + /* 55F0 */ int homunHunger; + /* 55F4 */ int homunMaxHunger; + /* 55F8 */ int homunNameModified; + /* 55FC */ int homunEnemyGid; + /* 5600 */ int homunEnemyX; + /* 5604 */ int homunEnemyY; + /* 5608 */ int moveHomunEnemy; + /* 560C */ int selectHomunEnemy; + /* 5610 */ int attackHomunEnemy; + /* 5614 */ int homunAlive; /* 5618 */ int m_traceAi; /* 561C */ int m_homunActionState; - /* 5620 */ unsigned char unknown_5620[0xC]; + /* 5620 */ unsigned char companionTargetState[0xC]; /* 562C */ char m_mercenaryName[32]; /* 564C */ int m_mercenaryStats[8]; /* 566C */ int m_mercenaryHp; @@ -466,17 +466,17 @@ public: /* 5684 */ int m_mercenaryLoyalty; /* 5688 */ int m_mercenarySummons; /* 568C */ int m_mercenaryKills; - /* 5690 */ unsigned char unknown_5690[4]; + /* 5690 */ unsigned char mercenaryAttackRange[4]; /* 5694 */ __time32_t m_mercenaryExpiration; - /* 5698 */ int unknown_5698; - /* 569C */ int unknown_569C; - /* 56A0 */ int unknown_56A0; - /* 56A4 */ int unknown_56A4; - /* 56A8 */ int unknown_56A8; - /* 56AC */ int unknown_56AC; - /* 56B0 */ int unknown_56B0; + /* 5698 */ int mercenaryEnemyGid; + /* 569C */ int mercenaryEnemyX; + /* 56A0 */ int mercenaryEnemyY; + /* 56A4 */ int moveMercenaryEnemy; + /* 56A8 */ int selectMercenaryEnemy; + /* 56AC */ int attackMercenaryEnemy; + /* 56B0 */ int mercenaryAlive; /* 56B4 */ int m_mercenaryActionState; - /* 56B8 */ unsigned char unknown_56B8[0x1C]; + /* 56B8 */ unsigned char autoReplyState[0x1C]; /* 56D4 */ int m_storePasswordMode; /* 56D8 */ bool m_passwordInputAlternate; /* 56D9 */ unsigned char unknown_56D9[0x7]; @@ -486,30 +486,30 @@ public: /* 56EC */ bool m_launchAccountEnabled; /* 56ED */ char m_loginErrorText[500]; /* 58E1 */ unsigned char unknown_58E1[0x19]; - /* 58FA */ char unknown_58FA[0x18]; - /* 5912 */ unsigned char unknown_5912; - /* 5913 */ unsigned char unknown_5913[0x25]; - /* 5938 */ int unknown_5938; - /* 593C */ int unknown_593C; - /* 5940 */ int unknown_5940; - /* 5944 */ int unknown_5944; - /* 5948 */ int unknown_5948; - /* 594C */ int unknown_594C; - /* 5950 */ std::string unknown_5950; - /* 5968 */ int unknown_5968; - /* 596C */ int unknown_596C; - /* 5970 */ int unknown_5970; - /* 5974 */ unsigned char unknown_5974[0x48]; - /* 59BC */ int unknown_59BC; + /* 58FA */ char clientVersion[0x18]; + /* 5912 */ unsigned char characterRenameEnabled; + /* 5913 */ unsigned char characterRenameData[0x25]; + /* 5938 */ int replaySessionFlag; + /* 593C */ int memorialWindowOpen; + /* 5940 */ int memorialWindowX; + /* 5944 */ int memorialWindowY; + /* 5948 */ int memorialDungeonState; + /* 594C */ int memorialReplayValue; + /* 5950 */ std::string memorialDungeonName; + /* 5968 */ int memorialQueuePosition; + /* 596C */ int memorialCreationTime; + /* 5970 */ int memorialExpirationTime; + /* 5974 */ unsigned char equipmentViewState[0x48]; + /* 59BC */ int characterSlotState; /* 59C0 */ int m_normalSlotCount; /* 59C4 */ int m_premiumSlotCount; /* 59C8 */ int m_billingSlotCount; /* 59CC */ int m_producibleSlotCount; - /* 59D0 */ int unknown_59D0; + /* 59D0 */ int blockedCharacterCount; /* 59D4 */ int m_validSlotCount; /* 59D8 */ LuaScript* m_hotkeyScript; union { - /* 59DC */ unsigned char unknown_59DC[0x19C]; + /* 59DC */ unsigned char mouseAndChannelOptions[0x19C]; struct { /* 59DC */ unsigned char unknown_59DC_0000[0x194]; /* 5B70 */ bool m_lockMouse; @@ -519,57 +519,57 @@ public: }; /* 5B78 */ PartyBookingMgr m_partyBooking; /* 5BBC */ int m_partyBookingLevelLimit; - /* 5BC0 */ int unknown_5BC0; - /* 5BC4 */ int unknown_5BC4; - /* 5BC8 */ int unknown_5BC8; - /* 5BCC */ int unknown_5BCC; - /* 5BD0 */ int unknown_5BD0; - /* 5BD4 */ std::vector unknown_5BD4; - /* 5BE0 */ int unknown_5BE0; - /* 5BE4 */ int unknown_5BE4; - /* 5BE8 */ int unknown_5BE8; - /* 5BEC */ int unknown_5BEC; - /* 5BF0 */ std::uint32_t unknown_5BF0; + /* 5BC0 */ int elementalGid; + /* 5BC4 */ int elementalHp; + /* 5BC8 */ int elementalSp; + /* 5BCC */ int elementalMaxHp; + /* 5BD0 */ int elementalMaxSp; + /* 5BD4 */ std::vector storeSearchResults; + /* 5BE0 */ int storeSearchCount; + /* 5BE4 */ int storeSearchPageFlags; + /* 5BE8 */ int storeSearchX; + /* 5BEC */ int storeSearchY; + /* 5BF0 */ std::uint32_t storeSearchOwnerAid; /* 5BF4 */ int m_pairValues[3]; union { - /* 5C00 */ unsigned char unknown_5C00[0x1C]; + /* 5C00 */ unsigned char itemDropOptions[0x1C]; struct { /* 5C00 */ bool m_lockItemDrop; /* 5C01 */ bool m_skipPriceWarning; - /* 5C02 */ unsigned char unknown_5C02[0x12]; + /* 5C02 */ unsigned char itemDropState[0x12]; /* 5C14 */ bool m_muteSellSound; - /* 5C15 */ unsigned char unknown_5C15[7]; + /* 5C15 */ unsigned char sellSoundState[7]; }; }; - /* 5C1C */ int unknown_5C1C; + /* 5C1C */ int replayPacketMode; /* 5C20 */ long long m_bankBalance; - /* 5C28 */ std::map unknown_5C28; - /* 5C30 */ unsigned char unknown_5C30[0x38]; - /* 5C68 */ ITEM_INFO unknown_5C68[5]; - /* 6140 */ std::uint16_t unknown_6140; - /* 6144 */ std::map unknown_6144; - /* 614C */ int unknown_614C; - /* 6150 */ std::int16_t unknown_6150; - /* 6154 */ int unknown_6154; - /* 6158 */ int unknown_6158; - /* 615C */ int unknown_615C; - /* 6160 */ std::vector unknown_6160; - /* 616C */ std::vector unknown_616C; - /* 6178 */ std::vector unknown_6178; - /* 6184 */ int unknown_6184; + /* 5C28 */ std::map actorEffectStates; + /* 5C30 */ unsigned char itemSelectionState[0x38]; + /* 5C68 */ ITEM_INFO selectionItems[5]; + /* 6140 */ std::uint16_t achievementResult; + /* 6144 */ std::map achievements; + /* 614C */ int achievementScore; + /* 6150 */ std::int16_t achievementLevel; + /* 6154 */ int achievementCompleted; + /* 6158 */ int achievementTotal; + /* 615C */ int jobTitle; + /* 6160 */ std::vector jobTitles; + /* 616C */ std::vector achievementIds; + /* 6178 */ std::vector trackedAchievements; + /* 6184 */ int playerAppearanceState; /* 6188 */ int m_lastIntervalTime; /* 618C */ const char* const* m_doramMaleHeadNames; /* 6190 */ unsigned char unknown_6190[0x08]; /* 6198 */ const char* const* m_doramFemaleHeadNames; /* 619C */ unsigned char unknown_619C[0x08]; - /* 61A4 */ int unknown_61A4; + /* 61A4 */ int automaticSkillHotkey; union { - /* 61A8 */ unsigned char unknown_61A8[0x10]; + /* 61A8 */ unsigned char hotkeyAndSortOptions[0x10]; struct { /* 61A8 */ int m_currentHotkey; /* 61AC */ int m_localMapMove; /* 61B0 */ bool m_guildMemberListSort; - /* 61B1 */ unsigned char unknown_61B1; + /* 61B1 */ unsigned char showCameraInfo; /* 61B2 */ bool m_blockPrivateTab; /* 61B3 */ bool m_itemDefaultSort; /* 61B4 */ bool m_itemAscendingOrder; @@ -577,26 +577,26 @@ public: /* 61B6 */ unsigned char unknown_61B6[2]; }; }; - /* 61B8 */ ITEM_INFO unknown_61B8[10]; - /* 6B68 */ ITEM_INFO unknown_6B68[10]; + /* 61B8 */ ITEM_INFO swapCostumeItems[10]; + /* 6B68 */ ITEM_INFO swapEquippedItems[10]; /* 7518 */ ITEM_INFO unknown_7518[10]; - /* 7EC8 */ std::uint32_t unknown_7EC8; - /* 7ECC */ unsigned char unknown_7ECC[0x04]; - /* 7ED0 */ int unknown_7ED0; - /* 7ED4 */ std::uint32_t unknown_7ED4; + /* 7EC8 */ std::uint32_t swapArrowIndex; + /* 7ECC */ unsigned char swapEquipmentFlag[0x04]; + /* 7ED0 */ int minimumNameLength; + /* 7ED4 */ std::uint32_t nameValidationTick; /* 7ED8 */ int m_swapEquipmentMode = 0; /* 7EDC */ bool m_showMenuIcon; /* 7EDD */ unsigned char unknown_7EDD[3]; /* 7EE0 */ std::map m_robeAlpha; - /* 7EE8 */ unsigned char unknown_7EE8[4]; + /* 7EE8 */ unsigned char maxBaseLevel[4]; /* 7EEC */ int m_maxLevel; - /* 7EF0 */ unsigned char unknown_7EF0[0x7C]; + /* 7EF0 */ unsigned char jobLevelLimits[0x7C]; /* 7F6C */ int m_maxLevelEffect4th; /* 7F70 */ int m_maxLevelEffect4thSub; - /* 7F74 */ unsigned char unknown_7F74[8]; + /* 7F74 */ unsigned char raceCreationOptions[8]; /* 7F7C */ bool m_homunculusAutoFeed; union { - /* 7F7D */ unsigned char unknown_7F7D[0x0F]; + /* 7F7D */ unsigned char homunculusFeedOptions[0x0F]; struct { /* 7F7D */ unsigned char unknown_7F7D_0000[0x0B]; /* 7F88 */ bool m_loginModeFlag; @@ -604,36 +604,36 @@ public: }; /* 7F8C */ int m_priorityClass; /* 7F90 */ int m_showRankingSchedule; - /* 7F94 */ std::set unknown_7F94; + /* 7F94 */ std::set pendingActorNames; /* 7F9C */ int m_pingLiveSchedule; /* 7FA0 */ std::uint32_t m_lastReceiveTick; /* 7FA4 */ std::uint32_t m_lastSendTick; /* 7FA8 */ CInstantVar m_options; /* 7FB4 */ AutomaticSkills m_automaticSkills; - /* 7FBC */ int unknown_7FBC; + /* 7FBC */ int extraInventorySlots; /* 7FC0 */ SessionTraits m_traits; /* 8010 */ CMCStoreInfoBackup m_storeInfoBackup; - /* 8074 */ int unknown_8074; + /* 8074 */ int madogearType; /* 8078 */ const char* const* m_jobSpriteNames; - /* 807C */ unsigned char unknown_807C[0x20]; - /* 809C */ std::vector unknown_809C; - /* 80A8 */ std::vector unknown_80A8; + /* 807C */ unsigned char webServiceLoginData[0x20]; + /* 809C */ std::vector characterNames; + /* 80A8 */ std::vector skyMapNames; /* 80B4 */ std::map m_nameToId; /* 80BC */ std::map m_shops; /* 80C4 */ int m_damageSkinIndex; - /* 80C8 */ int unknown_80C8; + /* 80C8 */ int damageSkinCount; /* 80CC */ int m_damageSkinMode; /* 80D0 */ int m_damageMillionUnit; /* 80D4 */ std::string m_damageResourceName; - /* 80EC */ std::string unknown_80EC; - /* 8104 */ std::string unknown_8104; + /* 80EC */ std::string damageSpriteName; + /* 8104 */ std::string damageSkinAuxiliaryName; /* 811C */ std::vector m_cardItems; - /* 8128 */ unsigned char unknown_8128[0x08]; - /* 8130 */ int unknown_8130; - /* 8134 */ int unknown_8134; + /* 8128 */ unsigned char feedOptions[0x08]; + /* 8130 */ int restrictedCharacterSlots; + /* 8134 */ int playerSkillMode; /* 8138 */ std::int64_t m_startTimeTicks; /* 8140 */ std::int64_t m_loginTimeTicks; - /* 8148 */ int unknown_8148; + /* 8148 */ int sessionIndex; void ItemBitmapPath(const char* name, char* output); int GetOption(int id) const; @@ -751,7 +751,7 @@ public: void SetPlayerNameKey(const unsigned char* key); // INLINED NormalItemSlot& SkillHotkey(int index) { - return reinterpret_cast(reinterpret_cast(this) + offsetof(CSession, unknown_06EB))[index]; + return reinterpret_cast(reinterpret_cast(this) + offsetof(CSession, quickSlot))[index]; } void ResetItems2B50(); void ResetMercenaryStats(); @@ -997,7 +997,7 @@ public: float GetOptionFloat(const char* key, float fallback); // INLINED bool& ItemSlotActive() { - return reinterpret_cast(this->unknown_8128[5]); + return reinterpret_cast(this->feedOptions[5]); } int GetOptionInteger(const char* key, int fallback); std::string GetOptionString(const char* key, const char* fallback); @@ -1250,8 +1250,8 @@ static_assert(offsetof(CSession, m_subChatWnds) == 0x744); static_assert(offsetof(CSession, m_prohibitionLog) == 0x754); static_assert(offsetof(CSession, m_mapPositions) == 0x5310); static_assert(offsetof(CSession, m_mapPosListCount) == 0x5328); -static_assert(offsetof(SessionRecord6144, unknown_002C) == 0x2C); -static_assert(offsetof(SessionRecord6144, unknown_0030) == 0x30); +static_assert(offsetof(SessionRecord6144, completedAt) == 0x2C); +static_assert(offsetof(SessionRecord6144, rewarded) == 0x30); static_assert(offsetof(CSession, m_additionalSkills) == 0x4); static_assert(offsetof(CSession, m_maxLevelEffect4th) == 0x7F6C); static_assert(offsetof(CSession, m_homunculusAutoFeed) == 0x7F7C); @@ -1260,7 +1260,7 @@ static_assert(offsetof(CSession, m_nameToId) == 0x80B4); static_assert(offsetof(CSession, m_level) == 0x1650); static_assert(offsetof(CSession, m_vendingSlotCount) == 0xF44); static_assert(offsetof(CSession, m_buyingStoreSlotCount) == 0xF48); -static_assert(offsetof(CSession, unknown_0F4C) == 0xF4C); +static_assert(offsetof(CSession, storeItemLimit) == 0xF4C); static_assert(offsetof(CSession, m_hotkeyPage) == 0xBC); static_assert(offsetof(CSession, m_pairValues) == 0x5BF4); static_assert(offsetof(CSession, m_zeny) == 0x16F0); @@ -1289,41 +1289,41 @@ static_assert(offsetof(CSession, m_pingSamples) == 0xFE4); static_assert(offsetof(CSession, m_petTalkTable) == 0x156C); static_assert(offsetof(CSession, m_monsterTalkTable) == 0x15CC); static_assert(offsetof(CSession, m_navigationPlayerMap) == 0x160C); -static_assert(offsetof(CSession, unknown_1738) == 0x1738); -static_assert(offsetof(CSession, unknown_1740) == 0x1740); -static_assert(offsetof(CSession, unknown_1770) == 0x1770); +static_assert(offsetof(CSession, cartItems) == 0x1738); +static_assert(offsetof(CSession, merchantShopItems) == 0x1740); +static_assert(offsetof(CSession, filteredInventoryItems) == 0x1770); static_assert(offsetof(CSession, m_itemSlots) == 0x4860); static_assert(offsetof(CSession, m_shops) == 0x80BC); -static_assert(offsetof(CSession, unknown_8134) == 0x8134); +static_assert(offsetof(CSession, playerSkillMode) == 0x8134); static_assert(offsetof(CSession, m_playerDir) == 0xF20); -static_assert(offsetof(CSession, unknown_1708) == 0x1708); -static_assert(offsetof(CSession, unknown_5210) == 0x5210); -static_assert(offsetof(CSession, unknown_5214) == 0x5214); -static_assert(offsetof(CSession, unknown_0E94) == 0xE94); -static_assert(offsetof(CSession, unknown_103C) == 0x103C); -static_assert(offsetof(CSession, unknown_5450) == 0x5450); -static_assert(offsetof(CSession, unknown_54C4) == 0x54C4); -static_assert(offsetof(CSession, unknown_5950) == 0x5950); -static_assert(offsetof(CSession, unknown_5970) == 0x5970); -static_assert(offsetof(CSession, unknown_59BC) == 0x59BC); +static_assert(offsetof(CSession, monsterInfoEnabled) == 0x1708); +static_assert(offsetof(CSession, exchangeMoney) == 0x5210); +static_assert(offsetof(CSession, otherExchangeMoney) == 0x5214); +static_assert(offsetof(CSession, characterCount) == 0xE94); +static_assert(offsetof(CSession, petJob) == 0x103C); +static_assert(offsetof(CSession, guildLeader) == 0x5450); +static_assert(offsetof(CSession, partyName) == 0x54C4); +static_assert(offsetof(CSession, memorialDungeonName) == 0x5950); +static_assert(offsetof(CSession, memorialExpirationTime) == 0x5970); +static_assert(offsetof(CSession, characterSlotState) == 0x59BC); static_assert(offsetof(CSession, m_hotkeyScript) == 0x59D8); static_assert(offsetof(CSession, m_lastIntervalTime) == 0x6188); -static_assert(offsetof(CSession, unknown_8130) == 0x8130); +static_assert(offsetof(CSession, restrictedCharacterSlots) == 0x8130); static_assert(offsetof(CSession, m_skillBundle) == 0xC); static_assert(offsetof(CSession, m_homunSkills) == 0x84); static_assert(offsetof(CSession, m_mercSkills) == 0x8C); -static_assert(offsetof(CSession, unknown_0420) == 0x420); +static_assert(offsetof(CSession, hotkeySkillLevels) == 0x420); static_assert(offsetof(CSession, m_shortcutSlots) == 0x4B0); static_assert(offsetof(CSession, m_mainCooldownIcons) == 0x94); static_assert(offsetof(CSession, m_alternateCooldownIcons) == 0x9C); static_assert(offsetof(CSession, m_secondaryShortcutSlots) == 0x5AC); -static_assert(offsetof(CSession, unknown_06EB) == 0x6EB); -static_assert(offsetof(CSession, unknown_06F2) == 0x6F2); +static_assert(offsetof(CSession, quickSlot) == 0x6EB); +static_assert(offsetof(CSession, alternateQuickSlot) == 0x6F2); static_assert(offsetof(CSession, m_homunSkillLevels) == 0x71C); static_assert(offsetof(CSession, m_mercSkillLevels) == 0x728); -static_assert(offsetof(CSession, unknown_0778) == 0x778); -static_assert(offsetof(CSession, unknown_0784) == 0x784); -static_assert(offsetof(CSession, unknown_078C) == 0x78C); +static_assert(offsetof(CSession, keyValues) == 0x778); +static_assert(offsetof(CSession, summonHp) == 0x784); +static_assert(offsetof(CSession, summonMaxHp) == 0x78C); static_assert(offsetof(CSession, m_robe) == 0xF00); static_assert(offsetof(CSession, m_playerX) == 0xF18); static_assert(offsetof(CSession, m_playerY) == 0xF1C); @@ -1339,55 +1339,55 @@ static_assert(offsetof(CSession, m_humanMaleHeadNames) == 0xF6C); static_assert(offsetof(CSession, m_humanFemaleHeadNames) == 0xF78); static_assert(offsetof(CSession, m_doramMaleHeadNames) == 0x618C); static_assert(offsetof(CSession, m_doramFemaleHeadNames) == 0x6198); -static_assert(offsetof(CSession, unknown_0E98) == 0xE98); +static_assert(offsetof(CSession, cachedSex) == 0xE98); static_assert(offsetof(CSession, m_sex) == 0xE9C); static_assert(offsetof(CSession, m_petActionTable) == 0x1058); static_assert(offsetof(CSession, m_job) == 0x1628); static_assert(offsetof(CSession, m_inventoryItems) == 0x1710); -static_assert(offsetof(CSession, unknown_16EC) == 0x16EC); -static_assert(offsetof(CSession, unknown_1730) == 0x1730); -static_assert(offsetof(CSession, unknown_0734) == 0x734); -static_assert(offsetof(CSession, unknown_1784) == 0x1784); +static_assert(offsetof(CSession, equippedArrowIndex) == 0x16EC); +static_assert(offsetof(CSession, storageItems) == 0x1730); +static_assert(offsetof(CSession, miniPartyRecords) == 0x734); +static_assert(offsetof(CSession, inventoryCategories) == 0x1784); static_assert(offsetof(CSession, m_partyMembers) == 0x17DC); static_assert(offsetof(CSession, m_friends) == 0x17E4); static_assert(offsetof(CSession, m_bgmFileNames) == 0x5224); -static_assert(offsetof(CSession, unknown_1720) == 0x1720); -static_assert(offsetof(CSession, unknown_1728) == 0x1728); -static_assert(offsetof(CSession, unknown_21A0) == 0x21A0); +static_assert(offsetof(CSession, purchaseItems) == 0x1720); +static_assert(offsetof(CSession, sellItems) == 0x1728); +static_assert(offsetof(CSession, alternateEquippedItems) == 0x21A0); static_assert(offsetof(CSession, m_commandIds) == 0x5218); -static_assert(offsetof(CSession, unknown_17F0) == 0x17F0); -static_assert(offsetof(CSession, unknown_2B50) == 0x2B50); -static_assert(offsetof(CSession, unknown_3500) == 0x3500); +static_assert(offsetof(CSession, equippedItems) == 0x17F0); +static_assert(offsetof(CSession, costumeItems) == 0x2B50); +static_assert(offsetof(CSession, alternateCostumeItems) == 0x3500); static_assert(offsetof(CSession, m_accessoryNames) == 0x52B8); static_assert(offsetof(CSession, m_robeNames) == 0x52C4); static_assert(offsetof(CSession, m_navigationForbiddenMaps) == 0x52D0); static_assert(offsetof(CSession, m_commandOptions) == 0x52DC); -static_assert(offsetof(CSession, unknown_5558) == 0x5558); +static_assert(offsetof(CSession, currentSex) == 0x5558); static_assert(offsetof(CSession, m_hotkeyScript) == 0x59D8); -static_assert(offsetof(CSession, unknown_5C68) == 0x5C68); -static_assert(offsetof(CSession, unknown_6140) == 0x6140); -static_assert(offsetof(CSession, unknown_6144) == 0x6144); -static_assert(offsetof(CSession, unknown_6160) == 0x6160); -static_assert(offsetof(CSession, unknown_616C) == 0x616C); +static_assert(offsetof(CSession, selectionItems) == 0x5C68); +static_assert(offsetof(CSession, achievementResult) == 0x6140); +static_assert(offsetof(CSession, achievements) == 0x6144); +static_assert(offsetof(CSession, jobTitles) == 0x6160); +static_assert(offsetof(CSession, achievementIds) == 0x616C); static_assert(offsetof(CSession, m_swapEquipmentMode) == 0x7ED8); static_assert(offsetof(CSession, m_robeAlpha) == 0x7EE0); static_assert(offsetof(CSession, m_maxLevel) == 0x7EEC); static_assert(offsetof(CSession, m_cardItems) == 0x811C); static_assert(offsetof(CSession, m_startTimeTicks) == 0x8138); static_assert(offsetof(CSession, m_loginTimeTicks) == 0x8140); -static_assert(offsetof(CSession, unknown_0700) == 0x700); -static_assert(offsetof(CSession, unknown_0708) == 0x708); +static_assert(offsetof(CSession, skillFollowEffects) == 0x700); +static_assert(offsetof(CSession, skillEffectIds) == 0x708); static_assert(offsetof(CSession, m_newRobeDrawOnTop) == 0xF04); static_assert(offsetof(CSession, m_imfNames) == 0xF84); static_assert(offsetof(CSession, m_fogParameters) == 0x5230); static_assert(offsetof(CSession, m_normalItemSlots) == 0x6AC); -static_assert(offsetof(CSession, unknown_5468) == 0x5468); +static_assert(offsetof(CSession, adoptionSkillAvailable) == 0x5468); static_assert(offsetof(CSession, m_partyBooking) == 0x5B78); -static_assert(offsetof(CSession, unknown_61A4) == 0x61A4); -static_assert(offsetof(CSession, unknown_6B68) == 0x6B68); +static_assert(offsetof(CSession, automaticSkillHotkey) == 0x61A4); +static_assert(offsetof(CSession, swapEquippedItems) == 0x6B68); static_assert(offsetof(CSession, m_showRankingSchedule) == 0x7F90); -static_assert(offsetof(CSession, unknown_7F94) == 0x7F94); -static_assert(offsetof(CSession, unknown_8148) == 0x8148); +static_assert(offsetof(CSession, pendingActorNames) == 0x7F94); +static_assert(offsetof(CSession, sessionIndex) == 0x8148); static_assert(offsetof(CSession, m_passwordWndMode) == 0x56E0); static_assert(offsetof(CSession, m_loginAccountId) == 0x56E4); static_assert(offsetof(CSession, m_passwordWndAccountId) == 0x56E8); diff --git a/Source/Client/SessionAchievements.cpp b/Source/Client/SessionAchievements.cpp index 3d908a8d1..bc2a083c8 100644 --- a/Source/Client/SessionAchievements.cpp +++ b/Source/Client/SessionAchievements.cpp @@ -33,14 +33,14 @@ int CSession::AddUnknown6160(int id) { return -1; } - for (std::vector::iterator it = this->unknown_6160.begin(); it != this->unknown_6160.end(); ++it) { + for (std::vector::iterator it = this->jobTitles.begin(); it != this->jobTitles.end(); ++it) { if (*it == value) { return -1; } } - this->unknown_6160.push_back(value); - std::sort(this->unknown_6160.begin(), this->unknown_6160.end(), JobTitleLess()); + this->jobTitles.push_back(value); + std::sort(this->jobTitles.begin(), this->jobTitles.end(), JobTitleLess()); if (UIWindow* window = g_windowMgr.LookupWindow(WID_EQUIPWND)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -52,20 +52,20 @@ int CSession::AddUnknown6160(int id) { // OFFSET: 0x00E06580 // FUNCTION: fn_23737 bool CSession::ToggleTrackedAchievement(int id) { - std::vector& tracked = this->unknown_6178; + std::vector& tracked = this->trackedAchievements; auto found = tracked.begin(); while (found != tracked.end() && found->id != id) { ++found; } SessionRecord6144* progress; - auto record = this->unknown_6144.find(id); - if (record != this->unknown_6144.end()) { + auto record = this->achievements.find(id); + if (record != this->achievements.end()) { progress = &record->second; } else { - this->unknown_6144.insert(std::make_pair(id, SessionRecord6144())); - reinterpret_cast(&this->unknown_6144[id].unknown_0000)[0] = 1; - progress = &this->unknown_6144[id]; + this->achievements.insert(std::make_pair(id, SessionRecord6144())); + reinterpret_cast(&this->achievements[id].completionFlags)[0] = 1; + progress = &this->achievements[id]; } if (!progress) { @@ -85,34 +85,34 @@ bool CSession::ToggleTrackedAchievement(int id) { SessionRecord6178 entry; entry.id = id; - entry.unknown_0001 = reinterpret_cast(&progress->unknown_0000)[1]; - entry.unknown_0008 = info.title; + entry.completed = reinterpret_cast(&progress->completionFlags)[1]; + entry.title = info.title; for (unsigned int i = 0; i < info.rewards.size(); ++i) { const AchievementReward& reward = info.rewards[i]; std::string text; bool completed = false; - if (info.unknown_0064 == 0) { + if (info.progressMode == 0) { if (reward.text.size() > 40) { text = static_cast(FormatOwnedString("- %s...", reward.text.substr(0, 40).c_str())); } else { text = static_cast(FormatOwnedString("- %s", reward.text.c_str())); } - completed = static_cast(progress->unknown_0004[i]) > 0; - } else if (info.unknown_0064 == 1) { - std::string count = FormatOwnedString("(%d/%d)", progress->unknown_0004[i], reward.unknown_0018); + completed = static_cast(progress->objectives[i]) > 0; + } else if (info.progressMode == 1) { + std::string count = FormatOwnedString("(%d/%d)", progress->objectives[i], reward.targetCount); if (reward.text.size() + count.size() > 40) { text = static_cast(FormatOwnedString("- %s...%s", reward.text.substr(0, 40 - count.size()).c_str(), count.c_str())); } else { text = static_cast(FormatOwnedString("- %s %s", reward.text.c_str(), count.c_str())); } - completed = static_cast(progress->unknown_0004[i]) == reward.unknown_0018; + completed = static_cast(progress->objectives[i]) == reward.targetCount; } - entry.unknown_0020.emplace_back(text, completed); + entry.objectives.emplace_back(text, completed); } tracked.push_back(entry); diff --git a/Source/Client/SessionParty.cpp b/Source/Client/SessionParty.cpp index 577ceb6e8..9b56ae6a1 100644 --- a/Source/Client/SessionParty.cpp +++ b/Source/Client/SessionParty.cpp @@ -25,7 +25,7 @@ bool CSession::IsPvpMap() { if (g_modeMgr.GetGameMode()) { CWorld* scene = static_cast(g_modeMgr.GetGameMode())->scene; if (scene) { - return scene->unknown_00FD; + return scene->partyRestricted; } } diff --git a/Source/Client/SessionPredicates.cpp b/Source/Client/SessionPredicates.cpp index 4f48334f3..0c2333aca 100644 --- a/Source/Client/SessionPredicates.cpp +++ b/Source/Client/SessionPredicates.cpp @@ -33,14 +33,14 @@ int CSession::IsState291To303(int state) const { // OFFSET: 0x00E1D700 // FUNCTION: fn_23851 bool CSession::HasUnknown6178Record(int id) const { - auto it = this->unknown_6178.begin(); - for (; it != this->unknown_6178.end(); ++it) { + auto it = this->trackedAchievements.begin(); + for (; it != this->trackedAchievements.end(); ++it) { const SessionRecord6178 record = *it; if (id == record.id) { break; } } - return it != this->unknown_6178.end(); + return it != this->trackedAchievements.end(); } // OFFSET: 0x00E1D850 @@ -87,13 +87,13 @@ int CSession::IsLocalPlayerAid(std::uint32_t aid) const { // OFFSET: 0x00E1DDF0 // FUNCTION: fn_23881 bool CSession::IsHomunAid(std::uint32_t aid) const { - return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&this->unknown_5570[8]); + return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&this->spAndHomunculusStats[8]); } // OFFSET: 0x00E1DE10 // FUNCTION: fn_23882 bool CSession::IsMercenaryAid(std::uint32_t aid) const { - return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&this->unknown_5620[8]); + return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&this->companionTargetState[8]); } // OFFSET: 0x00E1DE30 @@ -102,13 +102,13 @@ int CSession::IsCompanionAid(std::uint32_t aid) const { if (aid == 0xFFFFFFFF) { return 0; } - if (aid == *reinterpret_cast(&this->unknown_5570[8]) || - aid == *reinterpret_cast(&this->unknown_5620[8]) || aid == this->unknown_1010 || - aid == static_cast(this->unknown_5BC0)) { + if (aid == *reinterpret_cast(&this->spAndHomunculusStats[8]) || + aid == *reinterpret_cast(&this->companionTargetState[8]) || aid == this->petGid || + aid == static_cast(this->elementalGid)) { return 1; } - auto it = this->unknown_0784.find(aid); - if (it == this->unknown_0784.end() || it->second == -1) { + auto it = this->summonHp.find(aid); + if (it == this->summonHp.end() || it->second == -1) { return 0; } return 1; @@ -117,5 +117,5 @@ int CSession::IsCompanionAid(std::uint32_t aid) const { // OFFSET: 0x00E1DF00 // FUNCTION: fn_23885 bool CSession::IsPetAid(std::uint32_t aid) const { - return aid != 0xFFFFFFFF && aid == this->unknown_1010; + return aid != 0xFFFFFFFF && aid == this->petGid; } diff --git a/Source/Client/SessionState.cpp b/Source/Client/SessionState.cpp index 3e837fe64..6fc907929 100644 --- a/Source/Client/SessionState.cpp +++ b/Source/Client/SessionState.cpp @@ -120,7 +120,7 @@ void CSession::LoadSkillDelayList(int skillId, std::vector>& } CGameActor* actor = static_cast( - static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->unknown_5BC0) + static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->elementalGid) ); int delay = 0; if (actor) { @@ -201,13 +201,13 @@ bool CSession::IsThirdJobOrHigher(int job) { // OFFSET: 0x00E2ECD0 // FUNCTION: fn_24150 bool CSession::EquipItem61B8(const ITEM_INFO& item) { - const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.unknown_0000[3])); + const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.identity[3])); int order[3]; order[0] = slots.values[2]; order[1] = slots.values[1]; order[2] = slots.values[0]; - if (item.unknown_0000[3] == 0x8000) { - g_session.SetUnknown7EC8(item.unknown_0000[1]); + if (item.identity[3] == 0x8000) { + g_session.SetUnknown7EC8(item.identity[1]); } for (int i = 0; i < 3; ++i) { @@ -215,12 +215,12 @@ bool CSession::EquipItem61B8(const ITEM_INFO& item) { if (slot == -1 || slot >= 10) { break; } - this->unknown_61B8[slot] = item; - this->unknown_61B8[slot].quantity = 1; + this->swapCostumeItems[slot] = item; + this->swapCostumeItems[slot].quantity = 1; } - if (g_windowMgr.unknown_01E0) { - static_cast(g_windowMgr.unknown_01E0)->NotifyEquipmentChanged(); + if (g_windowMgr.equipWnd) { + static_cast(g_windowMgr.equipWnd)->NotifyEquipmentChanged(); } RefreshItemWindows(&g_windowMgr); return true; @@ -229,27 +229,27 @@ bool CSession::EquipItem61B8(const ITEM_INFO& item) { // OFFSET: 0x00E3D8A0 // FUNCTION: fn_24192 void CSession::UnequipItem6B68(const ITEM_INFO& item) { - const int location = static_cast(item.unknown_0000[3]); + const int location = static_cast(item.identity[3]); if (location == 0x8000) { this->SetUnknown7EC8(0); } else { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { if (slots.values[2] != -1) { - this->unknown_6B68[slots.values[2]].unknown_0000[3] = 0; - this->unknown_6B68[slots.values[2]].Reset(); + this->swapEquippedItems[slots.values[2]].identity[3] = 0; + this->swapEquippedItems[slots.values[2]].Reset(); } if (slots.values[1] != -1 && slots.values[1] < 10) { - this->unknown_6B68[slots.values[1]].Reset(); + this->swapEquippedItems[slots.values[1]].Reset(); } if (slots.values[0] != -1 && slots.values[0] < 10) { - this->unknown_6B68[slots.values[0]].Reset(); + this->swapEquippedItems[slots.values[0]].Reset(); } } } - if (g_windowMgr.unknown_01E0) { - static_cast(g_windowMgr.unknown_01E0)->NotifyEquipmentChanged(); + if (g_windowMgr.equipWnd) { + static_cast(g_windowMgr.equipWnd)->NotifyEquipmentChanged(); } RefreshItemWindows(&g_windowMgr); } @@ -257,10 +257,10 @@ void CSession::UnequipItem6B68(const ITEM_INFO& item) { // OFFSET: 0x00E3D960 // FUNCTION: fn_24193 void CSession::UnequipItem61B8(const ITEM_INFO& item) { - const int location = static_cast(item.unknown_0000[3]); + const int location = static_cast(item.identity[3]); if (location == 0x8000) { - ITEM_INFO equipped = g_session.FindItemByIdentity(item.unknown_0000[1], location); - if (equipped.unknown_0000[1] != 0) { + ITEM_INFO equipped = g_session.FindItemByIdentity(item.identity[1], location); + if (equipped.identity[1] != 0) { const char* message = LookupMessage(MSI_ITEM_IS_REMOVED); const std::string name = equipped.DisplayName(0); const std::string text = FormatOwnedString("%s%s", name.c_str(), message); @@ -271,20 +271,20 @@ void CSession::UnequipItem61B8(const ITEM_INFO& item) { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { if (slots.values[2] != -1) { - this->unknown_61B8[slots.values[2]].unknown_0000[3] = 0; - this->unknown_61B8[slots.values[2]].Reset(); + this->swapCostumeItems[slots.values[2]].identity[3] = 0; + this->swapCostumeItems[slots.values[2]].Reset(); } if (slots.values[1] != -1 && slots.values[1] < 10) { - this->unknown_61B8[slots.values[1]].Reset(); + this->swapCostumeItems[slots.values[1]].Reset(); } if (slots.values[0] != -1 && slots.values[0] < 10) { - this->unknown_61B8[slots.values[0]].Reset(); + this->swapCostumeItems[slots.values[0]].Reset(); } } } - if (g_windowMgr.unknown_01E0) { - static_cast(g_windowMgr.unknown_01E0)->NotifyEquipmentChanged(); + if (g_windowMgr.equipWnd) { + static_cast(g_windowMgr.equipWnd)->NotifyEquipmentChanged(); } RefreshItemWindows(&g_windowMgr); } @@ -295,8 +295,8 @@ void CSession::SetJob(int job) { const int previous = this->m_job; this->m_job = job; if (this->IsTreeGroupThree(previous) != this->IsTreeGroupThree(job)) { - if (g_windowMgr.unknown_01DC) { - reinterpret_cast(g_windowMgr.unknown_01DC)->RefreshLayout(); + if (g_windowMgr.basicInfoWnd) { + reinterpret_cast(g_windowMgr.basicInfoWnd)->RefreshLayout(); } if (g_modeMgr.GetGameMode()) { @@ -311,7 +311,7 @@ void CSession::SetJob(int job) { // OFFSET: 0x00E497F0 // FUNCTION: fn_24237 void CSession::SetUnknown7EC8(std::uint32_t value) { - this->unknown_7EC8 = value; + this->swapArrowIndex = value; this->InvalidateWindowFrames(); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -330,7 +330,7 @@ void CSession::SetUnknown7EC8(std::uint32_t value) { g_activeSkillEffects.erase(it); } - mode->scene->player->unknown_0544->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); + mode->scene->player->skillEffect->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); } // OFFSET: 0x00E49930 @@ -345,13 +345,13 @@ void CSession::NotifyUnknown7F94Name(std::uint32_t id, const char* name) { return; } - if (this->unknown_7F94.find(id) == this->unknown_7F94.end()) { + if (this->pendingActorNames.find(id) == this->pendingActorNames.end()) { return; } chat->SendMsg(nullptr, UM_RESOLVE_PLAYER_TAGS, reinterpret_cast(name), 0, 0, 0); g_windowMgr.SendNotice(UIM_RESOLVE_PLAYER_TAGS, reinterpret_cast(name), 0, 0, 0, 0); - this->unknown_7F94.erase(id); + this->pendingActorNames.erase(id); } // OFFSET: 0x00E1A5E0 @@ -359,1044 +359,1044 @@ void CSession::NotifyUnknown7F94Name(std::uint32_t id, const char* name) { void CSession::InitUnknownMapTables() { int key; - this->unknown_0708.clear(); + this->skillEffectIds.clear(); key = 0; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 1; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 2; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 3; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 4; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 5; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 6; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 7; - this->unknown_0708[key] = 16; + this->skillEffectIds[key] = 16; key = 8202; - this->unknown_0700[key] = 16; + this->skillFollowEffects[key] = 16; key = 8; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 9; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 10; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 12; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 13; - this->unknown_0708[key] = 15; + this->skillEffectIds[key] = 15; key = 340; - this->unknown_0708[key] = 451; + this->skillEffectIds[key] = 451; key = 14; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 15; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 16; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 17; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 18; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 19; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 20; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 21; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 22; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 23; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 24; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 25; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 26; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 27; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 28; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 29; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 690; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 30; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 31; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 32; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 33; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 34; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 689; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 35; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 36; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 37; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 38; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 39; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 40; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 41; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 42; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 43; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 44; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 45; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 46; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 499; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 1009; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 47; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 48; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 49; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 50; - this->unknown_0708[key] = 16; + this->skillEffectIds[key] = 16; key = 51; - this->unknown_0708[key] = 16; + this->skillEffectIds[key] = 16; key = 52; - this->unknown_0708[key] = 16; + this->skillEffectIds[key] = 16; key = 53; - this->unknown_0708[key] = 16; + this->skillEffectIds[key] = 16; key = 54; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 55; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 56; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 57; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 58; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 59; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 60; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 61; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 62; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 63; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 64; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 65; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 66; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 67; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 68; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 69; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 694; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 70; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 72; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 73; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 74; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 75; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 76; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 77; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 78; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 79; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 80; - this->unknown_0708[key] = 96; + this->skillEffectIds[key] = 96; key = 81; - this->unknown_0708[key] = 62; + this->skillEffectIds[key] = 62; key = 83; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 84; - this->unknown_0708[key] = 93; + this->skillEffectIds[key] = 93; key = 341; - this->unknown_0708[key] = 93; + this->skillEffectIds[key] = 93; key = 85; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 88; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 89; - this->unknown_0708[key] = 89; + this->skillEffectIds[key] = 89; key = 664; - this->unknown_0708[key] = 89; + this->skillEffectIds[key] = 89; key = 90; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 91; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 92; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 93; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 115; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 116; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 117; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 118; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 119; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 688; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 692; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 698; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 693; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 695; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 120; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 121; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 122; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 123; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 124; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 125; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 126; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 127; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 128; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 129; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 130; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 131; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 132; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 133; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 134; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 135; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 136; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 137; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 138; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 139; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 140; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 141; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 94; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 95; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 96; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 97; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 98; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 99; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 100; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 101; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 102; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 103; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 104; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 105; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 106; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 107; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 108; - this->unknown_0708[key] = 101; + this->skillEffectIds[key] = 101; key = 109; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 110; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 111; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 112; - this->unknown_0708[key] = 103; + this->skillEffectIds[key] = 103; key = 113; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 114; - this->unknown_0708[key] = 104; + this->skillEffectIds[key] = 104; key = 141; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 159; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 192; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 158; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 160; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 161; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 162; - this->unknown_0708[key] = 174; + this->skillEffectIds[key] = 174; key = 163; - this->unknown_0708[key] = 177; + this->skillEffectIds[key] = 177; key = 164; - this->unknown_0708[key] = 173; + this->skillEffectIds[key] = 173; key = 165; - this->unknown_0708[key] = 175; + this->skillEffectIds[key] = 175; key = 166; - this->unknown_0708[key] = 179; + this->skillEffectIds[key] = 179; key = 167; - this->unknown_0708[key] = 178; + this->skillEffectIds[key] = 178; key = 168; - this->unknown_0708[key] = 172; + this->skillEffectIds[key] = 172; key = 169; - this->unknown_0708[key] = 176; + this->skillEffectIds[key] = 176; key = 171; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 172; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 173; - this->unknown_0708[key] = 183; + this->skillEffectIds[key] = 183; key = 174; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 175; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 175; - this->unknown_0708[key] = 185; + this->skillEffectIds[key] = 185; key = 176; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 177; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 178; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 663; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 678; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 666; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 668; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 667; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 179; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 180; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 181; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 182; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 183; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 184; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 185; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 186; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 654; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 676; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 662; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 347; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 187; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 188; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 189; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 190; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 191; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 199; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 200; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 202; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 2246; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 2237; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 2309; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 723; - this->unknown_0708[key] = 89; + this->skillEffectIds[key] = 89; key = 724; - this->unknown_0708[key] = 183; + this->skillEffectIds[key] = 183; key = 722; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 724; - this->unknown_0708[key] = 1053; + this->skillEffectIds[key] = 1053; key = 723; - this->unknown_0708[key] = 89; + this->skillEffectIds[key] = 89; key = 757; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 758; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 759; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 760; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 762; - this->unknown_0708[key] = 454; + this->skillEffectIds[key] = 454; key = 763; - this->unknown_0708[key] = 89; + this->skillEffectIds[key] = 89; key = 768; - this->unknown_0708[key] = -1; + this->skillEffectIds[key] = -1; key = 5220; - this->unknown_0708[key] = 15; - this->unknown_0700.clear(); + this->skillEffectIds[key] = 15; + this->skillFollowEffects.clear(); key = 0; - this->unknown_0700[key] = 0; + this->skillFollowEffects[key] = 0; key = 1; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 2; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 3; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 4; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 5; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 6; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 7; - this->unknown_0700[key] = 17; + this->skillFollowEffects[key] = 17; key = 8202; - this->unknown_0700[key] = 17; + this->skillFollowEffects[key] = 17; key = 8; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 9; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 10; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 11; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 12; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 13; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 14; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 15; - this->unknown_0700[key] = 28; + this->skillFollowEffects[key] = 28; key = 16; - this->unknown_0700[key] = 23; + this->skillFollowEffects[key] = 23; key = 17; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 18; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 19; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 20; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 21; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 22; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 23; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 24; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 25; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 26; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 27; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 28; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 29; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 690; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 30; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 31; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 32; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 33; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 34; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 689; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 35; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 36; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 37; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 38; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 39; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 40; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 41; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 42; - this->unknown_0700[key] = 10; + this->skillFollowEffects[key] = 10; key = 43; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 44; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 45; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 46; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 499; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 1009; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 47; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 48; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 49; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 50; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 51; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 52; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 53; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 54; - this->unknown_0700[key] = 140; + this->skillFollowEffects[key] = 140; key = 55; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 56; - this->unknown_0700[key] = 81; + this->skillFollowEffects[key] = 81; key = 57; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 58; - this->unknown_0700[key] = 81; + this->skillFollowEffects[key] = 81; key = 59; - this->unknown_0700[key] = 3; + this->skillFollowEffects[key] = 3; key = 60; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 61; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 62; - this->unknown_0700[key] = 73; + this->skillFollowEffects[key] = 73; key = 63; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 64; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 65; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 66; - this->unknown_0700[key] = 84; + this->skillFollowEffects[key] = 84; key = 67; - this->unknown_0700[key] = 88; + this->skillFollowEffects[key] = 88; key = 68; - this->unknown_0700[key] = 152; + this->skillFollowEffects[key] = 152; key = 69; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 694; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 70; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 72; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 73; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 74; - this->unknown_0700[key] = 76; + this->skillFollowEffects[key] = 76; key = 75; - this->unknown_0700[key] = 75; + this->skillFollowEffects[key] = 75; key = 76; - this->unknown_0700[key] = 87; + this->skillFollowEffects[key] = 87; key = 77; - this->unknown_0700[key] = 152; + this->skillFollowEffects[key] = 152; key = 78; - this->unknown_0700[key] = 85; + this->skillFollowEffects[key] = 85; key = 79; - this->unknown_0700[key] = 152; + this->skillFollowEffects[key] = 152; key = 80; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 81; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 83; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 84; - this->unknown_0700[key] = 94; + this->skillFollowEffects[key] = 94; key = 341; - this->unknown_0700[key] = 452; + this->skillFollowEffects[key] = 452; key = 85; - this->unknown_0700[key] = 52; + this->skillFollowEffects[key] = 52; key = 88; - this->unknown_0700[key] = 28; + this->skillFollowEffects[key] = 28; key = 89; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 90; - this->unknown_0700[key] = 147; + this->skillFollowEffects[key] = 147; key = 91; - this->unknown_0700[key] = 147; + this->skillFollowEffects[key] = 147; key = 92; - this->unknown_0700[key] = 147; + this->skillFollowEffects[key] = 147; key = 93; - this->unknown_0700[key] = 60; + this->skillFollowEffects[key] = 60; key = 115; - this->unknown_0700[key] = 73; + this->skillFollowEffects[key] = 73; key = 116; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 117; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 118; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 119; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 688; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 692; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 698; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 693; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 695; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 120; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 121; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 122; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 123; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 124; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 125; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 126; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 127; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 128; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 129; - this->unknown_0700[key] = 115; + this->skillFollowEffects[key] = 115; key = 130; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 131; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 132; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 133; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 134; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 135; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 136; - this->unknown_0700[key] = 122; + this->skillFollowEffects[key] = 122; key = 2005; - this->unknown_0700[key] = 122; + this->skillFollowEffects[key] = 122; key = 137; - this->unknown_0700[key] = 132; + this->skillFollowEffects[key] = 132; key = 138; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 139; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 140; - this->unknown_0700[key] = 124; + this->skillFollowEffects[key] = 124; key = 141; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 94; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 95; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 96; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 97; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 98; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 99; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 100; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 101; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 102; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 103; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 104; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 105; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 106; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 107; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 108; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 109; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 110; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 111; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 112; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 113; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 114; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 141; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 143; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 153; - this->unknown_0700[key] = 170; + this->skillFollowEffects[key] = 170; key = 159; - this->unknown_0700[key] = 181; + this->skillFollowEffects[key] = 181; key = 192; - this->unknown_0700[key] = 182; + this->skillFollowEffects[key] = 182; key = 158; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 160; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 161; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 162; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 163; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 164; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 165; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 166; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 167; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 168; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 169; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 171; - this->unknown_0700[key] = 186; + this->skillFollowEffects[key] = 186; key = 172; - this->unknown_0700[key] = 191; + this->skillFollowEffects[key] = 191; key = 173; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 174; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 175; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 176; - this->unknown_0700[key] = 125; + this->skillFollowEffects[key] = 125; key = 177; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 178; - this->unknown_0700[key] = 193; + this->skillFollowEffects[key] = 193; key = 663; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 179; - this->unknown_0700[key] = 194; + this->skillFollowEffects[key] = 194; key = 180; - this->unknown_0700[key] = 195; + this->skillFollowEffects[key] = 195; key = 181; - this->unknown_0700[key] = 196; + this->skillFollowEffects[key] = 196; key = 182; - this->unknown_0700[key] = 197; + this->skillFollowEffects[key] = 197; key = 183; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 184; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 185; - this->unknown_0700[key] = 147; + this->skillFollowEffects[key] = 147; key = 186; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 654; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 662; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 187; - this->unknown_0700[key] = 52; + this->skillFollowEffects[key] = 52; key = 188; - this->unknown_0700[key] = 192; + this->skillFollowEffects[key] = 192; key = 189; - this->unknown_0700[key] = 152; + this->skillFollowEffects[key] = 152; key = 190; - this->unknown_0700[key] = 184; + this->skillFollowEffects[key] = 184; key = 347; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 191; - this->unknown_0700[key] = 198; + this->skillFollowEffects[key] = 198; key = 199; - this->unknown_0700[key] = 216; + this->skillFollowEffects[key] = 216; key = 200; - this->unknown_0700[key] = 217; + this->skillFollowEffects[key] = 217; key = 202; - this->unknown_0700[key] = 212; + this->skillFollowEffects[key] = 212; key = 2210; - this->unknown_0700[key] = 216; + this->skillFollowEffects[key] = 216; key = 267; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 273; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 156; - this->unknown_0700[key] = 152; + this->skillFollowEffects[key] = 152; key = 272; - this->unknown_0700[key] = 122; + this->skillFollowEffects[key] = 122; key = 2327; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2329; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 2518; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 371; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 372; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 381; - this->unknown_0700[key] = 115; + this->skillFollowEffects[key] = 115; key = 382; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 394; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 397; - this->unknown_0700[key] = 81; + this->skillFollowEffects[key] = 81; key = 400; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 485; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 1001; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 1016; - this->unknown_0700[key] = 2; + this->skillFollowEffects[key] = 2; key = 534; - this->unknown_0700[key] = 49; + this->skillFollowEffects[key] = 49; key = 537; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 2038; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2246; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2237; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2033; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 2022; - this->unknown_0700[key] = 122; + this->skillFollowEffects[key] = 122; key = 2031; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 2270; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2204; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 2203; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 2304; - this->unknown_0700[key] = 183; + this->skillFollowEffects[key] = 183; key = 2309; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 2448; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 2449; - this->unknown_0700[key] = 182; + this->skillFollowEffects[key] = 182; key = 736; - this->unknown_0700[key] = 182; + this->skillFollowEffects[key] = 182; key = 2447; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 720; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 723; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 724; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 722; - this->unknown_0700[key] = 1052; + this->skillFollowEffects[key] = 1052; key = 721; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 723; - this->unknown_0700[key] = 51; + this->skillFollowEffects[key] = 51; key = 742; - this->unknown_0700[key] = 1; + this->skillFollowEffects[key] = 1; key = 757; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 768; - this->unknown_0700[key] = -1; + this->skillFollowEffects[key] = -1; key = 5215; - this->unknown_0700[key] = 1737; + this->skillFollowEffects[key] = 1737; key = 5214; - this->unknown_0700[key] = 1740; + this->skillFollowEffects[key] = 1740; key = 5220; - this->unknown_0700[key] = 1744; + this->skillFollowEffects[key] = 1744; key = 5233; - this->unknown_0700[key] = 1749; + this->skillFollowEffects[key] = 1749; key = 5234; - this->unknown_0700[key] = 1737; + this->skillFollowEffects[key] = 1737; key = 5235; - this->unknown_0700[key] = 1759; + this->skillFollowEffects[key] = 1759; key = 5236; - this->unknown_0700[key] = 1759; + this->skillFollowEffects[key] = 1759; key = 5237; - this->unknown_0700[key] = 1784; + this->skillFollowEffects[key] = 1784; key = 5287; - this->unknown_0700[key] = 1838; + this->skillFollowEffects[key] = 1838; key = 5277; - this->unknown_0700[key] = 1848; + this->skillFollowEffects[key] = 1848; key = 5298; - this->unknown_0700[key] = 1842; + this->skillFollowEffects[key] = 1842; key = 5295; - this->unknown_0700[key] = 1939; + this->skillFollowEffects[key] = 1939; key = 5296; - this->unknown_0700[key] = 1886; + this->skillFollowEffects[key] = 1886; key = 5241; - this->unknown_0700[key] = 1990; + this->skillFollowEffects[key] = 1990; key = 5244; - this->unknown_0700[key] = 1997; + this->skillFollowEffects[key] = 1997; key = 5225; - this->unknown_0700[key] = 1858; + this->skillFollowEffects[key] = 1858; key = 5226; - this->unknown_0700[key] = 1858; + this->skillFollowEffects[key] = 1858; key = 5245; - this->unknown_0700[key] = 2053; + this->skillFollowEffects[key] = 2053; key = 5249; - this->unknown_0700[key] = 2080; + this->skillFollowEffects[key] = 2080; key = 5250; - this->unknown_0700[key] = 2082; + this->skillFollowEffects[key] = 2082; key = 5294; - this->unknown_0700[key] = 1866; + this->skillFollowEffects[key] = 1866; key = 5289; - this->unknown_0700[key] = 1914; + this->skillFollowEffects[key] = 1914; key = 5314; - this->unknown_0700[key] = 1967; + this->skillFollowEffects[key] = 1967; key = 5329; - this->unknown_0700[key] = 1970; + this->skillFollowEffects[key] = 1970; key = 5316; - this->unknown_0700[key] = 2017; + this->skillFollowEffects[key] = 2017; key = 5382; - this->unknown_0700[key] = 2016; + this->skillFollowEffects[key] = 2016; key = 8457; - this->unknown_0700[key] = 2012; + this->skillFollowEffects[key] = 2012; key = 8448; - this->unknown_0700[key] = 2023; + this->skillFollowEffects[key] = 2023; key = 5369; - this->unknown_0700[key] = 2030; + this->skillFollowEffects[key] = 2030; key = 5371; - this->unknown_0700[key] = 2034; + this->skillFollowEffects[key] = 2034; key = 8445; - this->unknown_0700[key] = 2039; + this->skillFollowEffects[key] = 2039; key = 5370; - this->unknown_0700[key] = 2045; + this->skillFollowEffects[key] = 2045; key = 5372; - this->unknown_0700[key] = 2059; + this->skillFollowEffects[key] = 2059; key = 5357; - this->unknown_0700[key] = 2063; + this->skillFollowEffects[key] = 2063; key = 5319; - this->unknown_0700[key] = 2093; + this->skillFollowEffects[key] = 2093; key = 8451; - this->unknown_0700[key] = 2102; + this->skillFollowEffects[key] = 2102; key = 8454; - this->unknown_0700[key] = 2107; + this->skillFollowEffects[key] = 2107; key = 5383; - this->unknown_0700[key] = 2111; + this->skillFollowEffects[key] = 2111; key = 5320; - this->unknown_0700[key] = 1967; + this->skillFollowEffects[key] = 1967; key = 5321; - this->unknown_0700[key] = 2131; + this->skillFollowEffects[key] = 2131; key = 5373; - this->unknown_0700[key] = 2137; + this->skillFollowEffects[key] = 2137; key = 5389; - this->unknown_0700[key] = 2141; + this->skillFollowEffects[key] = 2141; key = 5392; - this->unknown_0700[key] = 2144; + this->skillFollowEffects[key] = 2144; key = 5393; - this->unknown_0700[key] = 2147; + this->skillFollowEffects[key] = 2147; key = 5390; - this->unknown_0700[key] = 2150; + this->skillFollowEffects[key] = 2150; key = 5391; - this->unknown_0700[key] = 2153; + this->skillFollowEffects[key] = 2153; key = 5315; - this->unknown_0700[key] = 2156; + this->skillFollowEffects[key] = 2156; key = 5343; - this->unknown_0700[key] = 2207; + this->skillFollowEffects[key] = 2207; key = 5310; - this->unknown_0700[key] = 2207; + this->skillFollowEffects[key] = 2207; key = 5340; - this->unknown_0700[key] = 2215; + this->skillFollowEffects[key] = 2215; key = 5307; - this->unknown_0700[key] = 2215; + this->skillFollowEffects[key] = 2215; key = 5342; - this->unknown_0700[key] = 2223; + this->skillFollowEffects[key] = 2223; key = 5309; - this->unknown_0700[key] = 2223; + this->skillFollowEffects[key] = 2223; key = 5341; - this->unknown_0700[key] = 2231; + this->skillFollowEffects[key] = 2231; key = 5308; - this->unknown_0700[key] = 2231; + this->skillFollowEffects[key] = 2231; key = 5384; - this->unknown_0700[key] = 2253; + this->skillFollowEffects[key] = 2253; key = 5385; - this->unknown_0700[key] = 2251; + this->skillFollowEffects[key] = 2251; key = 783; - this->unknown_0700[key] = 2304; + this->skillFollowEffects[key] = 2304; key = 780; - this->unknown_0700[key] = 2308; + this->skillFollowEffects[key] = 2308; key = 8054; - this->unknown_0700[key] = 2325; + this->skillFollowEffects[key] = 2325; key = 8048; - this->unknown_0700[key] = 2328; + this->skillFollowEffects[key] = 2328; key = 8047; - this->unknown_0700[key] = 2330; + this->skillFollowEffects[key] = 2330; key = 8056; - this->unknown_0700[key] = 2336; + this->skillFollowEffects[key] = 2336; key = 8050; - this->unknown_0700[key] = 2325; + this->skillFollowEffects[key] = 2325; key = 8044; - this->unknown_0700[key] = 2342; + this->skillFollowEffects[key] = 2342; } diff --git a/Source/Client/Stove/StoveMgr.cpp b/Source/Client/Stove/StoveMgr.cpp index 2a89100de..5031c83bf 100644 --- a/Source/Client/Stove/StoveMgr.cpp +++ b/Source/Client/Stove/StoveMgr.cpp @@ -198,8 +198,8 @@ void OnStoveShutdown(Stove::PCSDK::CallbackResult callbackResult, Stove::PCSDK:: // OFFSET: 0x0063AAE0 // FUNCTION: fn_04778 CStoveMgr::CStoveMgr() - : m_initialized(false), unknown_0008(0), m_environment(1), unknown_0010(0), unknown_0014(0), unknown_0018(), m_accessToken{}, - m_memberNumber{}, m_gameUserId{}, unknown_02B8() { + : m_initialized(false), m_pendingOperation(0), m_environment(1), m_purchaseIdLow(0), m_purchaseIdHigh(0), m_purchaseUrl(), m_accessToken{}, + m_memberNumber{}, m_gameUserId{}, m_applicationId() { this->Initialize(); } @@ -258,14 +258,14 @@ void FetchProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackResu for (unsigned int index = 0; index < count; ++index) { const Stove::PCSDK::IAP::StovePCProduct& product = products[index]; ITEM_INFO item; - item.unknown_0000[1] = 0xFFFFFFFF; - item.unknown_0014[0] = static_cast(product.GetSalePrice()); - item.unknown_0014[1] = static_cast(product.GetSalePrice()); - item.unknown_0000[0] = 4; + item.identity[1] = 0xFFFFFFFF; + item.prices[0] = static_cast(product.GetSalePrice()); + item.prices[1] = static_cast(product.GetSalePrice()); + item.identity[0] = 4; item.identified = 1; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0090 = reinterpret_cast(product).GetProductId(); + item.damaged = 0; + item.refiningLevel = 0; + item.productId = reinterpret_cast(product).GetProductId(); std::string itemId = EncodeText( CP_ACP, std::wstring(reinterpret_cast(reinterpret_cast(product).GetDisplayNumber()))); item.SetItemId(std::atoi(itemId.c_str())); @@ -275,12 +275,12 @@ void FetchProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackResu item.SetName(name); item.identified = 1; if (product.GetPurchaseLimitCount() != 0 && product.GetSaleBeginDate() != 0 && product.GetSaleEndDate() != 0) { - item.unknown_0064 = 8; + item.bindOnEquip = 8; const int guidQuantity = product.GetGuidQuantity(); - item.unknown_0078[3] = product.GetPurchaseLimitCount() - guidQuantity; + item.saleData[3] = product.GetPurchaseLimitCount() - guidQuantity; item.quantity = product.GetPurchaseLimitCount(); - item.unknown_0078[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); - item.unknown_0078[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); + item.saleData[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); + item.saleData[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); g_session.AddItem1784(item, 9); } } @@ -300,9 +300,9 @@ void PurchaseResultCallback::operator()(Stove::PCSDK::CallbackResult callbackRes if (callbackResult.GetResult().IsSuccessful()) { if (reinterpret_cast(reinterpret_cast(purchaseResult).GetChargeTypeName()) != 2) { const std::int64_t productId = reinterpret_cast(purchaseResult).GetProductId(); - g_stoveMgr->unknown_0010 = static_cast(productId); - g_stoveMgr->unknown_0014 = static_cast(productId >> 32); - g_stoveMgr->unknown_0018 = static_cast( + g_stoveMgr->m_purchaseIdLow = static_cast(productId); + g_stoveMgr->m_purchaseIdHigh = static_cast(productId >> 32); + g_stoveMgr->m_purchaseUrl = static_cast( EncodeText(CP_ACP, std::wstring(reinterpret_cast(purchaseResult).GetCategoryId()))); } } else { @@ -382,14 +382,14 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR } ITEM_INFO item; - item.unknown_0000[1] = 0xFFFFFFFF; - item.unknown_0014[0] = static_cast(product.GetSalePrice()); - item.unknown_0014[1] = static_cast(product.GetSalePrice()); - item.unknown_0000[0] = 4; + item.identity[1] = 0xFFFFFFFF; + item.prices[0] = static_cast(product.GetSalePrice()); + item.prices[1] = static_cast(product.GetSalePrice()); + item.identity[0] = 4; item.identified = 1; - item.unknown_005D = 0; - item.unknown_0060 = 0; - item.unknown_0090 = reinterpret_cast(product).GetProductId(); + item.damaged = 0; + item.refiningLevel = 0; + item.productId = reinterpret_cast(product).GetProductId(); std::string itemId = EncodeText( CP_ACP, std::wstring(reinterpret_cast(reinterpret_cast(product).GetDisplayNumber()))); item.SetItemId(std::atoi(itemId.c_str())); @@ -400,16 +400,16 @@ void CategoryProductsCallback::operator()(Stove::PCSDK::CallbackResult callbackR item.identified = 1; if (list == 8) { if (product.GetPurchaseLimitCount() != 0 && product.GetSaleBeginDate() != 0 && product.GetSaleEndDate() != 0) { - item.unknown_0064 = 8; + item.bindOnEquip = 8; const int guidQuantity = product.GetGuidQuantity(); - item.unknown_0078[3] = product.GetPurchaseLimitCount() - guidQuantity; + item.saleData[3] = product.GetPurchaseLimitCount() - guidQuantity; item.quantity = product.GetPurchaseLimitCount(); - item.unknown_0078[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); - item.unknown_0078[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); + item.saleData[1] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleBeginDate())))); + item.saleData[2] = static_cast(std::chrono::system_clock::to_time_t(std::chrono::system_clock::time_point(std::chrono::milliseconds(product.GetSaleEndDate())))); g_session.AddItem1784(item, 9); } } else if (product.GetPurchaseLimitCount() == 0 && product.GetSaleBeginDate() == 0 && product.GetSaleEndDate() == 0) { - item.unknown_0064 = static_cast(list); + item.bindOnEquip = static_cast(list); g_session.AddItem1784(item, list); } } @@ -501,7 +501,7 @@ void ConfirmPurchaseCallback::operator()(Stove::PCSDK::CallbackResult callbackRe // FUNCTION: fn_04794 void CSession::AddItem1784(const ITEM_INFO& item, int list) { if (static_cast(list) <= 10) { - this->unknown_1784[list].push_back(item); + this->inventoryCategories[list].push_back(item); } } @@ -520,7 +520,7 @@ bool CStoveMgr::Initialize() { param.SetEnvironment(L"SANDBOX"); reinterpret_cast(param).SetCategory1(L"SB_RAGNAROK_IND"); param.SetApplicationKey(L"6b57af29764992a85cf793b01d4af15be6047715fd5f4687b23d0a1ba02337f5"); - this->unknown_02B8 = L"SB__SH_IPJVFX"; + this->m_applicationId = L"SB__SH_IPJVFX"; } else { const char liveSource[] = {'\x5E', '\x8A', '\x2D', '\x9A', '\xF7', '\x78', '\x3A', '\xFD', '\x18', '\x8F', '\x3C', '\xF5'}; const char* live = DecryptName<0x91651D81F559F971ULL>(liveSource); @@ -529,7 +529,7 @@ bool CStoveMgr::Initialize() { param.SetEnvironment(L"LIVE"); reinterpret_cast(param).SetCategory1(L"RAGNAROK_IND"); param.SetApplicationKey(L"9af21dbb708609cd29703f56d002c64ab6f8f5bf0a310388f65cf781a5e8dd8f"); - this->unknown_02B8 = L"RAG_SH_BTLTNL"; + this->m_applicationId = L"RAG_SH_BTLTNL"; } } @@ -546,7 +546,7 @@ bool CStoveMgr::Initialize() { Base_Initialize(¶m, OnStoveInitialized); this->WaitForCallback(); - Stove::PCSDK::Result result = IAP_Initialize(this->unknown_02B8.c_str()); + Stove::PCSDK::Result result = IAP_Initialize(this->m_applicationId.c_str()); if (result.IsSuccessful()) { this->FetchUser(); Base_GetShutdown(OnStoveShutdown); @@ -605,8 +605,8 @@ void CStoveMgr::StartPurchase(const std::vector& items) { int index = 0; for (const ITEM_INFO& item : items) { Stove::PCSDK::IAP::StovePCOrderProduct orderProduct; - orderProduct.SetProductId(item.unknown_0090); - reinterpret_cast(orderProduct).SetChargeDisplayDeductVal(static_cast(item.unknown_0014[0])); + orderProduct.SetProductId(item.productId); + reinterpret_cast(orderProduct).SetChargeDisplayDeductVal(static_cast(item.prices[0])); reinterpret_cast(orderProduct).SetChargeType(item.quantity); param.SetOrderProduct(index, &orderProduct); ++index; @@ -622,7 +622,7 @@ void CStoveMgr::StartPurchase(const std::vector& items) { Sleep(200); } while (g_stoveWaitingCallback); - if (this->unknown_0018.size() == 0) { + if (this->m_purchaseUrl.size() == 0) { const char parametersSource[] = {'\x05', '\x47', '\x7B', '\xE5', '\xA8', '\x7F', '\xFC', '\x46', '\x0E', '\x40', '\x21', '\xFA', '\xB5', '\x36', '\xA7', '\x06', '\x1B', '\x56', '\x21', '\xF6', '\xB4', '\x28', '\xFC', '\x1A', '\x08', '\x41', '\x79', '\xFC', '\xB8', '\x20', '\xFC', '\x3B', '\x2C', '\x74', '\x41', '\xD4', '\x89', '\x0A', '\x98', '\x36', '\x24', '\x7D', '\x4B', '\x95'}; const char* parameters = DecryptName<0x69D345DB950F336DULL>(parametersSource); const char fileSource[] = {'\x19', '\x6F', '\x87', '\x8F', '\xF4', '\x1F', '\xBE', '\xE8', '\x12', '\x68', '\xDD', '\x90', '\xE9', '\x56', '\xE5', '\xA8', '\x07', '\x7E', '\xDD', '\x9C', '\xE8', '\x48', '\xBE', '\xB4', '\x14', '\x69', '\x85', '\x96', '\xE4', '\x40', '\xBE', '\x95', '\x30', '\x5C', '\xBD', '\xBE', '\xD5', '\x6A', '\xDA', '\x98', '\x38', '\x55', '\xB7', '\xFF'}; @@ -631,12 +631,12 @@ void CStoveMgr::StartPurchase(const std::vector& items) { const char* verb = DecryptName<0x8F1B5BFD5F6175B5ULL>(verbSource); ShellExecuteA(nullptr, verb, file, parameters, nullptr, SW_SHOWNORMAL); } else { - const char* url = this->unknown_0018.c_str(); + const char* url = this->m_purchaseUrl.c_str(); const char verbSource[] = {'\x60', '\xCF', '\xF6', '\x95', '\xEF'}; const char* verb = DecryptName<0x9B17C9EFDBB39F2FULL>(verbSource); ShellExecuteA(nullptr, verb, url, url, nullptr, SW_SHOWNORMAL); if (g_windowMgr.Confirm(PurchaseCheckingMessage()().Text(), 2, true, false, 0, "Message", 250, 170, 0) == 187) { - IAP_ConfirmPurchase((static_cast(this->unknown_0014) << 32) | static_cast(this->unknown_0010), OnStovePurchaseConfirmed); + IAP_ConfirmPurchase((static_cast(this->m_purchaseIdHigh) << 32) | static_cast(this->m_purchaseIdLow), OnStovePurchaseConfirmed); g_stoveWaitingCallback = true; do { Base_RunCallback(); diff --git a/Source/Client/Stove/StoveMgr.h b/Source/Client/Stove/StoveMgr.h index cf8a0bcff..216962f13 100644 --- a/Source/Client/Stove/StoveMgr.h +++ b/Source/Client/Stove/StoveMgr.h @@ -22,15 +22,15 @@ public: ~CStoveMgr() override; /* 0004 */ bool m_initialized; - /* 0008 */ int unknown_0008; + /* 0008 */ int m_pendingOperation; /* 000C */ int m_environment; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ std::string unknown_0018; + /* 0010 */ int m_purchaseIdLow; + /* 0014 */ int m_purchaseIdHigh; + /* 0018 */ std::string m_purchaseUrl; /* 0030 */ char m_accessToken[600]; /* 0288 */ char m_memberNumber[24]; /* 02A0 */ char m_gameUserId[24]; - /* 02B8 */ std::wstring unknown_02B8; + /* 02B8 */ std::wstring m_applicationId; const char* GetAccessToken(); void FetchUser(); @@ -43,11 +43,11 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(CStoveMgr, m_environment) == 0x000C); -static_assert(offsetof(CStoveMgr, unknown_0018) == 0x0018); +static_assert(offsetof(CStoveMgr, m_purchaseUrl) == 0x0018); static_assert(offsetof(CStoveMgr, m_accessToken) == 0x0030); static_assert(offsetof(CStoveMgr, m_memberNumber) == 0x0288); static_assert(offsetof(CStoveMgr, m_gameUserId) == 0x02A0); -static_assert(offsetof(CStoveMgr, unknown_02B8) == 0x02B8); +static_assert(offsetof(CStoveMgr, m_applicationId) == 0x02B8); #endif extern CStoveMgr* g_stoveMgr; diff --git a/Source/Contents/AchievementMgr.cpp b/Source/Contents/AchievementMgr.cpp index d5ab65f1a..9da1ca777 100644 --- a/Source/Contents/AchievementMgr.cpp +++ b/Source/Contents/AchievementMgr.cpp @@ -32,7 +32,7 @@ bool CAchievementMgr::CreateInstance() { return false; } - if (!g_achievementMgr->unknown_0004) { + if (!g_achievementMgr->enabled) { delete g_achievementMgr; g_achievementMgr = nullptr; return false; @@ -73,7 +73,7 @@ bool CAchievementMgr::GetAchievement(AchievementInfo& out, int id) { // FUNCTION: fn_05314 std::string CAchievementMgr::GetUnknown0068(int id) { if (this->achievements.find(id) != this->achievements.end()) { - return this->achievements[id].unknown_0068; + return this->achievements[id].iconName; } return ""; } @@ -108,7 +108,7 @@ bool CAchievementMgr::GetGroupAchievements(std::map& out, // FUNCTION: fn_05316 int CAchievementMgr::GetUnknown0048(int id) { if (this->achievements.find(id) != this->achievements.end()) { - return this->achievements[id].unknown_0048; + return this->achievements[id].points; } return -1; } @@ -117,7 +117,7 @@ int CAchievementMgr::GetUnknown0048(int id) { // FUNCTION: fn_05317 std::string CAchievementMgr::GetUnknown0018(int id) { if (this->achievements.find(id) != this->achievements.end()) { - return this->achievements[id].unknown_0018; + return this->achievements[id].summaryText; } return ""; } @@ -126,7 +126,7 @@ std::string CAchievementMgr::GetUnknown0018(int id) { // FUNCTION: fn_05318 int CAchievementMgr::GetUnknown0050(int id) { if (this->achievements.find(id) != this->achievements.end()) { - return this->achievements[id].unknown_0050; + return this->achievements[id].rewardTitleId; } return -1; } @@ -152,7 +152,7 @@ namespace { // INLINED bool IsAchievementCompleted(int id) { const SessionRecord6144 record = g_session.FindRecord6144(id); - return static_cast(record.unknown_0000 >> 8) == 1; + return static_cast(record.completionFlags >> 8) == 1; } } @@ -320,7 +320,7 @@ std::pair CAchievementMgr::InsertAchieveRewardBuff(int id, in return std::make_pair(false, message); } - found->second.unknown_0054 = value; + found->second.rewardBuffId = value; return std::make_pair(true, "good"); } @@ -333,7 +333,7 @@ std::pair CAchievementMgr::InsertAchieveRewardItem(int id, in return std::make_pair(false, message); } - found->second.unknown_004C = value; + found->second.rewardItemId = value; return std::make_pair(true, "good"); } @@ -346,7 +346,7 @@ std::pair CAchievementMgr::InsertAchieveRewardTitle(int id, i return std::make_pair(false, message); } - found->second.unknown_0050 = value; + found->second.rewardTitleId = value; return std::make_pair(true, "good"); } @@ -359,8 +359,8 @@ std::pair CAchievementMgr::InsertAchieveUIType(int id, int ty return std::make_pair(false, message); } - found->second.unknown_0064 = type; - found->second.unknown_0068 = text; + found->second.progressMode = type; + found->second.iconName = text; return std::make_pair(true, "good"); } @@ -372,9 +372,9 @@ bool CAchievementMgr::HasReward(int id) { } const AchievementInfo& info = this->achievements[id]; - bool result = info.unknown_0054 > 0; - result |= info.unknown_0050 > 0; - if (info.unknown_004C > 0) { + bool result = info.rewardBuffId > 0; + result |= info.rewardTitleId > 0; + if (info.rewardItemId > 0) { result = true; } return result; diff --git a/Source/Contents/AchievementMgr.h b/Source/Contents/AchievementMgr.h index 88c4d1318..8027b0861 100644 --- a/Source/Contents/AchievementMgr.h +++ b/Source/Contents/AchievementMgr.h @@ -12,13 +12,13 @@ struct AchievementReward { // INLINED AchievementReward(std::string text, int unknown0018, int unknown001C) { this->text = text; - this->unknown_0018 = unknown0018; - this->unknown_001C = unknown001C; + this->targetCount = unknown0018; + this->conditionId = unknown001C; } /* 0000 */ std::string text; - /* 0018 */ int unknown_0018; - /* 001C */ int unknown_001C; + /* 0018 */ int targetCount; + /* 001C */ int conditionId; }; struct AchievementInfo { @@ -27,19 +27,19 @@ struct AchievementInfo { } // INLINED AchievementInfo(std::string title, std::string unknown0018, std::string unknown0030, int unknown0048) - : title(title), unknown_0018(unknown0018), unknown_0030(unknown0030), unknown_0048(unknown0048) { + : title(title), summaryText(unknown0018), description(unknown0030), points(unknown0048) { } /* 0000 */ std::string title; - /* 0018 */ std::string unknown_0018; - /* 0030 */ std::string unknown_0030; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C = -1; - /* 0050 */ int unknown_0050 = -1; - /* 0054 */ int unknown_0054 = -1; + /* 0018 */ std::string summaryText; + /* 0030 */ std::string description; + /* 0048 */ int points; + /* 004C */ int rewardItemId = -1; + /* 0050 */ int rewardTitleId = -1; + /* 0054 */ int rewardBuffId = -1; /* 0058 */ std::vector rewards; - /* 0064 */ int unknown_0064; - /* 0068 */ std::string unknown_0068; + /* 0064 */ int progressMode; + /* 0068 */ std::string iconName; }; static_assert(sizeof(AchievementInfo) == 0x80); @@ -47,7 +47,7 @@ static_assert(sizeof(AchievementInfo) == 0x80); class CAchievementMgr { public: // INLINED - CAchievementMgr() : unknown_0004(true), groupWidth(10) { + CAchievementMgr() : enabled(true), groupWidth(10) { } // INLINED virtual ~CAchievementMgr() { @@ -59,7 +59,7 @@ public: static void DestroyInstance(); bool LoadAchievementInfo(); - /* 0004 */ bool unknown_0004; + /* 0004 */ bool enabled; /* 0008 */ int groupWidth; /* 000C */ std::map achievements; /* 0014 */ std::map> groups; diff --git a/Source/Contents/ActorGeometry.cpp b/Source/Contents/ActorGeometry.cpp index 0a775cb8f..cf612058c 100644 --- a/Source/Contents/ActorGeometry.cpp +++ b/Source/Contents/ActorGeometry.cpp @@ -75,18 +75,18 @@ bool CRenderObject::PrepareSprite( int unused, int layer, float scale, const SpriteFrameCell& cell, float x, float y, const float* position, float shift, float* bottomDepth, float* topDepth, const SpriteRleImage* image, SpriteQuad* quad, int* bounds, std::uint32_t* color, int offsetX, int offsetY, int flags ) { - const float depthBias = this->render.unknown_005C * g_cameraScaleX; + const float depthBias = this->render.distanceScale * g_cameraScaleX; const double scaleY = static_cast(scale * cell.scaleY * this->render.scale); const double scaleX = static_cast(scale * cell.scaleX * this->render.scale); float top = static_cast(static_cast(cell.y + offsetY) * scaleY + static_cast(y)); float bottom = static_cast( - static_cast((image->unknown_0006 + 1) * image->height + cell.y + offsetY) * scaleY + static_cast(y) + 1.0 + static_cast((image->doubleHeight + 1) * image->height + cell.y + offsetY) * scaleY + static_cast(y) + 1.0 ); float left; float right; if (cell.mirrored & 1) { - left = static_cast(static_cast((image->unknown_0004 + 1) * image->width + cell.x + offsetX) * scaleX + static_cast(x)); + left = static_cast(static_cast((image->doubleWidth + 1) * image->width + cell.x + offsetX) * scaleX + static_cast(x)); right = static_cast(static_cast(offsetX + cell.x) * scaleX + static_cast(x) + 1.0); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f || right >= static_cast(g_renderer->viewport.width) || left <= 0.0f) { @@ -94,7 +94,7 @@ bool CRenderObject::PrepareSprite( } } else { left = static_cast(static_cast(cell.x + offsetX) * scaleX + static_cast(x)); - right = static_cast(static_cast((image->unknown_0004 + 1) * image->width + cell.x + offsetX) * scaleX + static_cast(x) + 1.0); + right = static_cast(static_cast((image->doubleWidth + 1) * image->width + cell.x + offsetX) * scaleX + static_cast(x) + 1.0); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f || left >= static_cast(g_renderer->viewport.width) || right <= 0.0f) { return false; @@ -102,7 +102,7 @@ bool CRenderObject::PrepareSprite( } if ((this->render.flags & 0x80) != 0) { - const short phase = this->render.unknown_00F4; + const short phase = this->render.effectPhase; float factor = 0.0f; if (phase < 19) { factor = g_sinTable[phase * 5] * 0.3f; @@ -117,7 +117,7 @@ bool CRenderObject::PrepareSprite( } if ((this->render.flags & 0x20) != 0) { - const short phase = this->render.unknown_00F4; + const short phase = this->render.effectPhase; float factor = 1.0f; if (phase < 4) { factor = (100.0f - static_cast(phase) * 20.0f) * 0.01f; @@ -131,13 +131,13 @@ bool CRenderObject::PrepareSprite( top += (bottom - top) * (1.0f - factor); } - if (this->render.unknown_00A2 != 0) { + if (this->render.flatDepth != 0) { *bottomDepth = (static_cast(unused) * g_cameraScaleY + 0.1f - g_cameraScaleY * 20.0f) + - static_cast(static_cast(this->render.unknown_0080)) * g_cameraScaleY; + static_cast(static_cast(this->render.depthLayer)) * g_cameraScaleY; *topDepth = (static_cast(unused) * g_cameraScaleY + 0.1f - g_cameraScaleY * 20.0f) + - static_cast(static_cast(this->render.unknown_0080)) * g_cameraScaleY; + static_cast(static_cast(this->render.depthLayer)) * g_cameraScaleY; } else { - const int depthLayer = static_cast(this->render.unknown_0080) + 3 + layer; + const int depthLayer = static_cast(this->render.depthLayer) + 3 + layer; const float height = bottom - y; const float rise = top - y; if (this->render.isLieOnGround) { @@ -158,7 +158,7 @@ bool CRenderObject::PrepareSprite( quad->right = right + shift; quad->bottomRhw = *bottomDepth; quad->topRhw = *topDepth; - quad->angle = static_cast(cell.unknown_001C + static_cast(this->render.unknown_007C)); + quad->angle = static_cast(cell.rotation + static_cast(this->render.spriteAngle)); bounds[0] = static_cast(left); bounds[1] = static_cast(top); bounds[2] = static_cast(right); @@ -167,7 +167,7 @@ bool CRenderObject::PrepareSprite( float lightRed = 1.0f; float lightGreen = 1.0f; float lightBlue = 1.0f; - if (this->render.unknown_00B4 == 1 && g_serviceOptions.Get(0x77)) { + if (this->render.useGroundLighting == 1 && g_serviceOptions.Get(0x77)) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); GroundGeometry* ground = mode->scene->ground; if (ground->IsNewVer()) { @@ -198,7 +198,7 @@ bool CRenderObject::PrepareSprite( quad->color = *color; if ((this->render.flags & 0x40) != 0) { - const short phase = this->render.unknown_00F4; + const short phase = this->render.effectPhase; if (phase <= 36) { float angle = 180.0f - g_sinTable[90 + phase * 5] * 180.0f; quad->angle = angle; diff --git a/Source/Contents/ActorMovementRoute.cpp b/Source/Contents/ActorMovementRoute.cpp index e606a4e93..5162e4203 100644 --- a/Source/Contents/ActorMovementRoute.cpp +++ b/Source/Contents/ActorMovementRoute.cpp @@ -46,7 +46,7 @@ bool CGameActor::FindRoute(int startX, int startY, int fractionX, int fractionY, } const bool found = - g_pathFinder.FindPath(this->routeStartTick, startX, startY, fractionX, fractionY, destX, destY, stepSpeed, this->route, this->unknown_0314); + g_pathFinder.FindPath(this->routeStartTick, startX, startY, fractionX, fractionY, destX, destY, stepSpeed, this->route, this->objectType); if (!found) { return found; } @@ -60,5 +60,5 @@ bool CGameActor::FindRoute(int startX, int startY, int fractionX, int fractionY, const int baseSpeed = g_replayAnimationScaling != 0 ? static_cast(scaledSpeed) : speed; this->routeStartTick = now; - return g_pathFinder.FindPath(now, startX, startY, fractionX, fractionY, destX, destY, baseSpeed * 10 / 13, this->route, this->unknown_0314); + return g_pathFinder.FindPath(now, startX, startY, fractionX, fractionY, destX, destY, baseSpeed * 10 / 13, this->route, this->objectType); } diff --git a/Source/Contents/ActorNameCache.cpp b/Source/Contents/ActorNameCache.cpp index 95d6dbb93..997f2e0f1 100644 --- a/Source/Contents/ActorNameCache.cpp +++ b/Source/Contents/ActorNameCache.cpp @@ -15,7 +15,7 @@ std::size_t CActorNameCardHolder::Save(std::vector& output) { for (auto it = this->cards.begin(); it != this->cards.end(); ++it) { const CActorNameCard& card = it->second; - const std::size_t needed = card.name.size() + card.unknown_001C.size() + card.unknown_0034.size() + card.unknown_004C.size() + 0x14 + offset; + const std::size_t needed = card.name.size() + card.partyName.size() + card.guildName.size() + card.clanName.size() + 0x14 + offset; if (buffer.size() < needed) { buffer.resize(needed + 1, 0); } @@ -30,27 +30,27 @@ std::size_t CActorNameCardHolder::Save(std::vector& output) { offset += length; } - length = static_cast(card.unknown_001C.size()); + length = static_cast(card.partyName.size()); *reinterpret_cast(&buffer[offset]) = length; offset += 4; if (length > 0) { - std::memcpy(&buffer[offset], card.unknown_001C.c_str(), length); + std::memcpy(&buffer[offset], card.partyName.c_str(), length); offset += length; } - length = static_cast(card.unknown_0034.size()); + length = static_cast(card.guildName.size()); *reinterpret_cast(&buffer[offset]) = length; offset += 4; if (length > 0) { - std::memcpy(&buffer[offset], card.unknown_0034.c_str(), length); + std::memcpy(&buffer[offset], card.guildName.c_str(), length); offset += length; } - length = static_cast(card.unknown_004C.size()); + length = static_cast(card.clanName.size()); *reinterpret_cast(&buffer[offset]) = length; offset += 4; if (length > 0) { - std::memcpy(&buffer[offset], card.unknown_004C.c_str(), length); + std::memcpy(&buffer[offset], card.clanName.c_str(), length); offset += length; } } @@ -87,21 +87,21 @@ std::size_t CActorNameCardHolder::Load(const std::vector& input) { std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { - this->cards[id].unknown_001C.assign(&input[offset], length); + this->cards[id].partyName.assign(&input[offset], length); offset += length; } std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { - this->cards[id].unknown_0034.assign(&input[offset], length); + this->cards[id].guildName.assign(&input[offset], length); offset += length; } std::memcpy(&length, input.data() + offset, sizeof(length)); offset += 4; if (length > 0) { - this->cards[id].unknown_004C.assign(&input[offset], length); + this->cards[id].clanName.assign(&input[offset], length); offset += length; } } diff --git a/Source/Contents/ActorNameCard.cpp b/Source/Contents/ActorNameCard.cpp index e69b99d3b..12b6f8cdb 100644 --- a/Source/Contents/ActorNameCard.cpp +++ b/Source/Contents/ActorNameCard.cpp @@ -2,7 +2,7 @@ // OFFSET: 0x005BEA30 // FUNCTION: fn_03484 -CActorNameCard::CActorNameCard() : unknown_0094(0), received(0) { +CActorNameCard::CActorNameCard() : groupIconId(0), received(0) { } // OFFSET: 0x005BEB40 @@ -13,12 +13,12 @@ CActorNameCard::~CActorNameCard() = default; // FUNCTION: fn_03487 void CActorNameCard::Reset() { this->name.clear(); - this->unknown_001C.clear(); - this->unknown_0034.clear(); - this->unknown_004C.clear(); - this->unknown_0064.clear(); - this->unknown_007C.clear(); - this->unknown_0094 = 0; + this->partyName.clear(); + this->guildName.clear(); + this->clanName.clear(); + this->title.clear(); + this->displayName.clear(); + this->groupIconId = 0; } // OFFSET: 0x005BF080 diff --git a/Source/Contents/ActorNameCard.h b/Source/Contents/ActorNameCard.h index 64d9a9966..02e63cc7a 100644 --- a/Source/Contents/ActorNameCard.h +++ b/Source/Contents/ActorNameCard.h @@ -18,33 +18,33 @@ public: } // INLINED void SetValue1(std::string value) { - this->unknown_001C = value; + this->partyName = value; } // INLINED void SetValue2(std::string value) { - this->unknown_0034 = value; + this->guildName = value; } // INLINED __forceinline void SetValue3(std::string value) { - this->unknown_004C = value; + this->clanName = value; } // INLINED __forceinline void SetValue4(std::string value) { - this->unknown_0064 = value; + this->title = value; } // INLINED void SetValue5(std::string value, std::uint32_t number) { - this->unknown_007C = value; - this->unknown_0094 = number; + this->displayName = value; + this->groupIconId = number; } /* 0004 */ std::string name; - /* 001C */ std::string unknown_001C; - /* 0034 */ std::string unknown_0034; - /* 004C */ std::string unknown_004C; - /* 0064 */ std::string unknown_0064; - /* 007C */ std::string unknown_007C; - /* 0094 */ std::uint32_t unknown_0094; + /* 001C */ std::string partyName; + /* 0034 */ std::string guildName; + /* 004C */ std::string clanName; + /* 0064 */ std::string title; + /* 007C */ std::string displayName; + /* 0094 */ std::uint32_t groupIconId; /* 0098 */ unsigned char received; }; diff --git a/Source/Contents/Actors/CharacterRender.cpp b/Source/Contents/Actors/CharacterRender.cpp index 90d3137ba..cea961959 100644 --- a/Source/Contents/Actors/CharacterRender.cpp +++ b/Source/Contents/Actors/CharacterRender.cpp @@ -46,17 +46,17 @@ struct CharacterRenderDrawItem { // OFFSET: 0x0080D2A0 // FUNCTION: fn_10099 CCharacterRender::CCharacterRender(int unknown0068, int unknown006C) - : unknown_0014(0), unknown_0028(0), unknown_002C(0), unknown_0030(0), unknown_0034(0), - unknown_0038(0), unknown_003C(0), unknown_0048(0), unknown_004C(0), unknown_0050(0), unknown_0054(0), unknown_0058(80.0f), unknown_005C(-1), - unknown_0060(-1), unknown_0064(-1), unknown_0068(unknown0068), unknown_006C(unknown006C), unknown_0070(400.0f), unknown_0074(-45.0f), - unknown_0078(0.0f), unknown_007C(0.0f), unknown_0080(0.0f), unknown_0084(0.0f), unknown_0088(0.0f), unknown_008C(1.0f), unknown_0090(0), - unknown_00A8(0), unknown_00AC(0), unknown_00BC(0), unknown_00C0(0) { - this->unknown_0004 = 0; - this->unknown_0008 = 0; - this->unknown_000C = 0; - this->unknown_0040 = 0; - this->unknown_0044 = 0; - this->unknown_00B0 = 1; + : headJob(0), lowerHeadgear(0), upperHeadgear(0), middleHeadgear(0), lowerHeadgearLocation(0), + upperHeadgearLocation(0), middleHeadgearLocation(0), madogearType(0), riding(0), bodyCostume(0), viewportOffsetX(0), viewportOffsetY(80.0f), bodyBlend(-1), + bodyCellX(-1), bodyCellY(-1), viewportWidth(unknown0068), viewportHeight(unknown006C), cameraDistance(400.0f), cameraPitch(-45.0f), + cameraYaw(0.0f), unknown_007C(0.0f), unknown_0080(0.0f), unknown_0084(0.0f), cameraUpX(0.0f), cameraUpY(1.0f), cameraUpZ(0), + screenX(0), screenY(0), robe(0), isHelmRobe(0) { + this->positionX = 0; + this->positionY = 0; + this->positionZ = 0; + this->actionIndex = 0; + this->frameIndex = 0; + this->drawShadow = 1; } // OFFSET: 0x0080D730 @@ -67,7 +67,7 @@ CCharacterRender::~CCharacterRender() = default; // FUNCTION: fn_10108 std::list CCharacterRender::BuildDrawList(unsigned char trackBounds, char* boundsUpdated) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const float* origin = reinterpret_cast(&this->unknown_0004); + const float* origin = reinterpret_cast(&this->positionX); const float* view = mode->camera->frame.view.values; float position[3]; position[0] = origin[0] * view[0] + origin[1] * view[3] + origin[2] * view[6] + view[9]; @@ -75,23 +75,23 @@ std::list CCharacterRender::BuildDrawList(unsigned char position[2] = origin[0] * view[2] + origin[1] * view[5] + origin[2] * view[8] + view[11]; float depthBias = 0.0f; - float& screenX = *reinterpret_cast(&this->unknown_00A8); - float& screenY = *reinterpret_cast(&this->unknown_00AC); + float& screenX = *reinterpret_cast(&this->screenX); + float& screenY = *reinterpret_cast(&this->screenY); screenX = 0.0f; screenY = 0.0f; float rhw = 0.0f; g_renderer->ProjectViewport(origin, view, &screenX, &screenY, &rhw); float distanceScale = g_renderer->ScaleDistance(rhw); - distanceScale *= GetSkillFactor(this->unknown_0010); + distanceScale *= GetSkillFactor(this->job); int swapCount = 0; bool bodyDrawn = false; *boundsUpdated = 0; - RenderBounds& bounds = *reinterpret_cast(this->unknown_0094); + RenderBounds& bounds = *reinterpret_cast(this->renderBounds); bounds.Set(static_cast(g_renderer->viewport.width), static_cast(g_renderer->viewport.height), 0.0f, 0.0f, rhw); std::list commands; - if (this->unknown_00B0 == 1) { + if (this->drawShadow == 1) { if (RenderPrimitive* shadow = this->DrawShadow(view, 1.0f)) { CharacterRenderDrawItem item; item.flags = 0x101; @@ -102,57 +102,57 @@ std::list CCharacterRender::BuildDrawList(unsigned char int layer = 0; CImfRes* imf = static_cast( - ResourceMgr::Instance().Load(GetBodyImfName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], this->unknown_0050).c_str()) + ResourceMgr::Instance().Load(GetBodyImfName(this->job, this->appearance[0], this->appearance[1], this->bodyCostume).c_str()) ); this->RenderRobeCommands(commands, false, view, layer, position, screenX, screenY, distanceScale, 0.0f, rhw); std::map quads; - std::map& views = this->unknown_00B4; - views[2] = this->unknown_0028; - views[3] = this->unknown_002C; - views[4] = this->unknown_0030; - views[8] = this->unknown_00BC; + std::map& views = this->layerViews; + views[2] = this->lowerHeadgear; + views[3] = this->upperHeadgear; + views[4] = this->middleHeadgear; + views[8] = this->robe; std::vector actions(9, nullptr); std::vector sprites(9, nullptr); - const int job = this->unknown_004C == 1 ? g_session.GetRidingJob(this->unknown_0010) : this->unknown_0010; + const int job = this->riding == 1 ? g_session.GetRidingJob(this->job) : this->job; actions[0] = static_cast( - ResourceMgr::Instance().Load(GetBodyActionResourceName(job, this->unknown_0018[0], this->unknown_0050, 0)) + ResourceMgr::Instance().Load(GetBodyActionResourceName(job, this->appearance[0], this->bodyCostume, 0)) ); - const int spriteJob = this->unknown_004C == 1 ? g_session.GetRidingJob(this->unknown_0010) : this->unknown_0010; + const int spriteJob = this->riding == 1 ? g_session.GetRidingJob(this->job) : this->job; sprites[0] = static_cast( - ResourceMgr::Instance().Load(g_session.GetBodySprName(spriteJob, this->unknown_0018[0], this->unknown_0050, 0)) + ResourceMgr::Instance().Load(g_session.GetBodySprName(spriteJob, this->appearance[0], this->bodyCostume, 0)) ); actions[1] = static_cast( - ResourceMgr::Instance().Load(g_session.GetHeadActName(this->unknown_0010, this->unknown_0018[0], &this->unknown_0018[1])) + ResourceMgr::Instance().Load(g_session.GetHeadActName(this->job, this->appearance[0], &this->appearance[1])) ); sprites[1] = static_cast( - ResourceMgr::Instance().Load(g_session.GetHeadSprName(this->unknown_0010, this->unknown_0018[0], &this->unknown_0018[1])) + ResourceMgr::Instance().Load(g_session.GetHeadSprName(this->job, this->appearance[0], &this->appearance[1])) ); actions[2] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessoryActName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[2]) + g_session.GetAccessoryActName(this->job, this->appearance[0], this->appearance[1], views[2]) )); sprites[2] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessorySprName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[2]) + g_session.GetAccessorySprName(this->job, this->appearance[0], this->appearance[1], views[2]) )); actions[3] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessoryActName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[3]) + g_session.GetAccessoryActName(this->job, this->appearance[0], this->appearance[1], views[3]) )); sprites[3] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessorySprName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[3]) + g_session.GetAccessorySprName(this->job, this->appearance[0], this->appearance[1], views[3]) )); actions[4] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessoryActName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[4]) + g_session.GetAccessoryActName(this->job, this->appearance[0], this->appearance[1], views[4]) )); sprites[4] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessorySprName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[4]) + g_session.GetAccessorySprName(this->job, this->appearance[0], this->appearance[1], views[4]) )); - if (this->unknown_00C0 == 1) { + if (this->isHelmRobe == 1) { actions[8] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessoryActName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[8]) + g_session.GetAccessoryActName(this->job, this->appearance[0], this->appearance[1], views[8]) )); sprites[8] = static_cast(ResourceMgr::Instance().Load( - g_session.GetAccessorySprName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[1], views[8]) + g_session.GetAccessorySprName(this->job, this->appearance[0], this->appearance[1], views[8]) )); } @@ -165,8 +165,8 @@ std::list CCharacterRender::BuildDrawList(unsigned char } for (int index = 8; index >= 0; --index) { - const int action = this->unknown_0040; - const int order = GetSpriteLayerOrder(imf, index, action - action % 8, action, this->unknown_0044); + const int action = this->actionIndex; + const int order = GetSpriteLayerOrder(imf, index, action - action % 8, action, this->frameIndex); int type = order; if (!bodyDrawn) { bodyDrawn = order == 1; @@ -189,20 +189,20 @@ std::list CCharacterRender::BuildDrawList(unsigned char } const int cellIndex = GetSlotLayer(g_session.IsSpecialMonsterJob(views[type]) ? 1 : type); - if (this->unknown_0044 >= static_cast(actions[type]->FrameCount(this->unknown_0040))) { + if (this->frameIndex >= static_cast(actions[type]->FrameCount(this->actionIndex))) { continue; } - const ActionFrame* frame = &actions[type]->Frame(this->unknown_0040, this->unknown_0044); + const ActionFrame* frame = &actions[type]->Frame(this->actionIndex, this->frameIndex); switch (type) { case 2: case 3: case 4: case 8: { - const int bodyCount = actions[1]->FrameCount(this->unknown_0040); - const int layerCount = actions[type]->FrameCount(this->unknown_0040); + const int bodyCount = actions[1]->FrameCount(this->actionIndex); + const int layerCount = actions[type]->FrameCount(this->actionIndex); if (bodyCount > 0 && layerCount > 0 && bodyCount < layerCount && layerCount % bodyCount == 0) { - frame = &actions[type]->Frame(this->unknown_0040, this->unknown_0044 * (layerCount / bodyCount)); + frame = &actions[type]->Frame(this->actionIndex, this->frameIndex * (layerCount / bodyCount)); } break; } @@ -216,32 +216,32 @@ std::list CCharacterRender::BuildDrawList(unsigned char int offsetX = 0; int offsetY = 0; const SpriteRleImage* image = sprites[type]->images[cell->imageType][cell->image]; - if (g_session.IsDoramJob(this->unknown_0010) == true) { + if (g_session.IsDoramJob(this->job) == true) { int doramX = 0; int doramY = 0; - int direction = this->unknown_0040 % 8; + int direction = this->actionIndex % 8; if (direction < 0) { direction = 7; } if (direction > 7) { direction = 0; } - g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", views[type], direction, this->unknown_0018[0], &doramX, &doramY); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", views[type], direction, this->appearance[0], &doramX, &doramY); offsetX = doramX; offsetY = doramY; } switch (type) { case 1: { - const int bodyJob = this->unknown_004C == 1 ? g_session.GetRidingJob(this->unknown_0010) : this->unknown_0010; + const int bodyJob = this->riding == 1 ? g_session.GetRidingJob(this->job) : this->job; CActRes* bodyAction = static_cast( - ResourceMgr::Instance().Load(GetBodyActionResourceName(bodyJob, this->unknown_0018[0], this->unknown_0050, 0)) + ResourceMgr::Instance().Load(GetBodyActionResourceName(bodyJob, this->appearance[0], this->bodyCostume, 0)) ); - const ActionFrame& bodyFrame = bodyAction->Frame(this->unknown_0040, this->unknown_0044); + const ActionFrame& bodyFrame = bodyAction->Frame(this->actionIndex, this->frameIndex); if (frame->anchorCount > 0 && bodyFrame.anchorCount > 0) { const ActionAnchor& anchor = frame->anchors[0]; const ActionAnchor& bodyAnchor = bodyFrame.anchors[0]; - if (anchor.unknown_0008 == bodyAnchor.unknown_0008) { + if (anchor.attachmentId == bodyAnchor.attachmentId) { offsetX += bodyAnchor.x - anchor.x; offsetY += bodyAnchor.y - anchor.y; g_headAnchorOffsetX = offsetX; @@ -258,8 +258,8 @@ std::list CCharacterRender::BuildDrawList(unsigned char case 4: case 8: { int syncedIndex = 0; - const ActionFrame* layerFrame = g_session.GetSyncedFrame(actions[1], actions[type], this->unknown_0040, this->unknown_0044, 0, &syncedIndex); - if (layerFrame != nullptr && syncedIndex != this->unknown_0044) { + const ActionFrame* layerFrame = g_session.GetSyncedFrame(actions[1], actions[type], this->actionIndex, this->frameIndex, 0, &syncedIndex); + if (layerFrame != nullptr && syncedIndex != this->frameIndex) { cell = &layerFrame->Cell(cellIndex); if (cell->image != -1) { image = sprites[type]->images[cell->imageType][cell->image]; @@ -268,20 +268,20 @@ std::list CCharacterRender::BuildDrawList(unsigned char layerFrame = frame; } - const ActionFrame& bodyFrame = actions[1]->Frame(this->unknown_0040, this->unknown_0044); + const ActionFrame& bodyFrame = actions[1]->Frame(this->actionIndex, this->frameIndex); if (layerFrame->anchorCount > 0 && bodyFrame.anchorCount > 0) { const ActionAnchor& anchor = layerFrame->anchors[0]; const ActionAnchor& bodyAnchor = bodyFrame.anchors[0]; - if (anchor.unknown_0008 == bodyAnchor.unknown_0008) { + if (anchor.attachmentId == bodyAnchor.attachmentId) { offsetX += bodyAnchor.x - anchor.x; offsetY += bodyAnchor.y - anchor.y; } } offsetX += g_headAnchorOffsetX; - const int baseAction = this->unknown_0040 - this->unknown_0040 % 8; - if (IsIgnoredRidingState(views[type], this->unknown_0010, baseAction, this->unknown_004C) == true) { - offsetY += SpriteRidingOffset(&bodyFrame, this->unknown_0040, this->unknown_0044, this->unknown_0010, this->unknown_0018[0], this->unknown_0050); + const int baseAction = this->actionIndex - this->actionIndex % 8; + if (IsIgnoredRidingState(views[type], this->job, baseAction, this->riding) == true) { + offsetY += SpriteRidingOffset(&bodyFrame, this->actionIndex, this->frameIndex, this->job, this->appearance[0], this->bodyCostume); } else { offsetY += g_headAnchorOffsetY; } @@ -329,17 +329,17 @@ std::list CCharacterRender::BuildDrawList(unsigned char const std::uint32_t* palette = sprites[type]->palette; if (type == 0) { - if (this->unknown_0018[2] > 0) { + if (this->appearance[2] > 0) { palette = static_cast(ResourceMgr::Instance().Load( - g_session.GetBodyPalName(this->unknown_0010, this->unknown_0018[0], this->unknown_0018[2], this->unknown_0050, 0, 0).c_str() + g_session.GetBodyPalName(this->job, this->appearance[0], this->appearance[2], this->bodyCostume, 0, 0).c_str() ))->palette; } else { palette = sprites[0]->palette; } } else if (type == 1) { - if (this->unknown_0018[3] > 0) { + if (this->appearance[3] > 0) { palette = static_cast(ResourceMgr::Instance().Load( - g_session.GetHeadPalName(this->unknown_0018[1], this->unknown_0010, this->unknown_0018[0], this->unknown_0018[3]).c_str() + g_session.GetHeadPalName(this->appearance[1], this->job, this->appearance[0], this->appearance[3]).c_str() ))->palette; } else { palette = sprites[1]->palette; @@ -354,7 +354,7 @@ std::list CCharacterRender::BuildDrawList(unsigned char blend = 1; break; case 4: - blend = this->unknown_0030 != 0xB9; + blend = this->middleHeadgear != 0xB9; break; default: blend = 0x101; @@ -366,7 +366,7 @@ std::list CCharacterRender::BuildDrawList(unsigned char case 3: case 4: case 8: { - const int direction = this->unknown_0040 % 8; + const int direction = this->actionIndex % 8; if (views[type] > 0) { int priority = -1; g_session.m_hotkeyScript->Call("GetLayerPriority", "ddd>d", direction, type, views[type], &priority); @@ -390,9 +390,9 @@ std::list CCharacterRender::BuildDrawList(unsigned char } if (type == 0) { - this->unknown_005C = blend; - this->unknown_0060 = cell->x; - this->unknown_0064 = cell->y; + this->bodyBlend = blend; + this->bodyCellX = cell->x; + this->bodyCellY = cell->y; this->RenderRobeCommands(commands, true, view, layer, position, screenX, screenY, distanceScale, 0.0f, rhw); } } diff --git a/Source/Contents/Actors/CharacterRender.h b/Source/Contents/Actors/CharacterRender.h index 0d4c53e47..735758dc6 100644 --- a/Source/Contents/Actors/CharacterRender.h +++ b/Source/Contents/Actors/CharacterRender.h @@ -39,52 +39,52 @@ public: void OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad, float bottomDepth, float topDepth) const; RenderPrimitive* DrawShadow(const float* matrix, float scale) const; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018[4]; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; - /* 003C */ int unknown_003C; - /* 0040 */ int unknown_0040; - /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; - /* 004C */ unsigned char unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ float unknown_0054; - /* 0058 */ float unknown_0058; - /* 005C */ int unknown_005C; - /* 0060 */ int unknown_0060; - /* 0064 */ int unknown_0064; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; - /* 0070 */ float unknown_0070; - /* 0074 */ float unknown_0074; - /* 0078 */ float unknown_0078; + /* 0004 */ int positionX; + /* 0008 */ int positionY; + /* 000C */ int positionZ; + /* 0010 */ int job; + /* 0014 */ int headJob; + /* 0018 */ int appearance[4]; + /* 0028 */ int lowerHeadgear; + /* 002C */ int upperHeadgear; + /* 0030 */ int middleHeadgear; + /* 0034 */ int lowerHeadgearLocation; + /* 0038 */ int upperHeadgearLocation; + /* 003C */ int middleHeadgearLocation; + /* 0040 */ int actionIndex; + /* 0044 */ int frameIndex; + /* 0048 */ int madogearType; + /* 004C */ unsigned char riding; + /* 0050 */ int bodyCostume; + /* 0054 */ float viewportOffsetX; + /* 0058 */ float viewportOffsetY; + /* 005C */ int bodyBlend; + /* 0060 */ int bodyCellX; + /* 0064 */ int bodyCellY; + /* 0068 */ int viewportWidth; + /* 006C */ int viewportHeight; + /* 0070 */ float cameraDistance; + /* 0074 */ float cameraPitch; + /* 0078 */ float cameraYaw; /* 007C */ float unknown_007C; /* 0080 */ float unknown_0080; /* 0084 */ float unknown_0084; - /* 0088 */ float unknown_0088; - /* 008C */ float unknown_008C; - /* 0090 */ int unknown_0090; - /* 0094 */ int unknown_0094[5]; - /* 00A8 */ int unknown_00A8; - /* 00AC */ int unknown_00AC; - /* 00B0 */ unsigned char unknown_00B0; - /* 00B4 */ std::map unknown_00B4; - /* 00BC */ int unknown_00BC; - /* 00C0 */ bool unknown_00C0; + /* 0088 */ float cameraUpX; + /* 008C */ float cameraUpY; + /* 0090 */ int cameraUpZ; + /* 0094 */ int renderBounds[5]; + /* 00A8 */ int screenX; + /* 00AC */ int screenY; + /* 00B0 */ unsigned char drawShadow; + /* 00B4 */ std::map layerViews; + /* 00BC */ int robe; + /* 00C0 */ bool isHelmRobe; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(CCharacterRender, unknown_0068) == 0x68); -static_assert(offsetof(CCharacterRender, unknown_008C) == 0x8C); -static_assert(offsetof(CCharacterRender, unknown_00B4) == 0xB4); +static_assert(offsetof(CCharacterRender, viewportWidth) == 0x68); +static_assert(offsetof(CCharacterRender, cameraUpY) == 0x8C); +static_assert(offsetof(CCharacterRender, layerViews) == 0xB4); static_assert(sizeof(CCharacterRender) == 0xC4); #endif diff --git a/Source/Contents/Actors/EffectActors.h b/Source/Contents/Actors/EffectActors.h index 890889b07..fb1c57e82 100644 --- a/Source/Contents/Actors/EffectActors.h +++ b/Source/Contents/Actors/EffectActors.h @@ -37,7 +37,7 @@ public: void ClearUnknown0138(); - /* 0138 */ std::uint32_t unknown_0138; + /* 0138 */ std::uint32_t chaseState; /* 013C */ std::uint32_t unknown_013C; }; diff --git a/Source/Contents/Actors/GameActor.cpp b/Source/Contents/Actors/GameActor.cpp index 24ee9e749..e45b7c516 100644 --- a/Source/Contents/Actors/GameActor.cpp +++ b/Source/Contents/Actors/GameActor.cpp @@ -47,7 +47,7 @@ static vector3d& operator+=(vector3d& target, const vector3d& offset) { // OFFSET: 0x00CB1930 // FUNCTION: fn_21099 void CGameActor::ProcessDamageMessages() { - for (auto it = this->unknown_02A8.begin(); it != this->unknown_02A8.end();) { + for (auto it = this->willBeAttackedList.begin(); it != this->willBeAttackedList.end();) { if (timeGetTime() < it->time) { ++it; continue; @@ -76,12 +76,12 @@ void CGameActor::ProcessDamageMessages() { if (targetName.empty()) { const CActorNameCard& card = static_cast(g_modeMgr.GetGameMode())->LookupNameCard(targetAid); - targetName.assign(card.unknown_007C.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.unknown_007C); + targetName.assign(card.displayName.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.displayName); } if (attackerName.empty()) { const CActorNameCard& card = static_cast(g_modeMgr.GetGameMode())->LookupNameCard(attackerAid); - attackerName.assign(card.unknown_007C.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.unknown_007C); + attackerName.assign(card.displayName.empty() ? std::string(LookupMessage(MSI_WHO_IS)) : card.displayName); } if (IsPlayerJob(this->GetEffectiveJob(-1))) { @@ -111,7 +111,7 @@ void CGameActor::ProcessDamageMessages() { this->SendMsg( nullptr, message.action, message.action >> 31, reinterpret_cast(&message.targetAid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - it = this->unknown_02A8.erase(it); + it = this->willBeAttackedList.erase(it); } } @@ -129,16 +129,16 @@ void CGameActor::RegisterPos() { // FUNCTION: fn_21097 #pragma auto_inline(off) bool CGameActor::ProcessState() { - if (static_cast(this->unknown_0278) > 0 && timeGetTime() > static_cast(this->unknown_0278)) { + if (static_cast(this->freezeEndTick) > 0 && timeGetTime() > static_cast(this->freezeEndTick)) { this->render.isMotionFreezed = false; - this->unknown_0278 = 0; + this->freezeEndTick = 0; } - if (static_cast(this->unknown_02DC) > 0) { - if (timeGetTime() > static_cast(this->unknown_02DC)) { + if (static_cast(this->vanishTime) > 0) { + if (timeGetTime() > static_cast(this->vanishTime)) { return false; } - const unsigned int alpha = (static_cast(this->unknown_02DC) - timeGetTime()) >> 1; + const unsigned int alpha = (static_cast(this->vanishTime) - timeGetTime()) >> 1; reinterpret_cast(&this->render.color)[3] = alpha > 255 ? 255 : static_cast(alpha); } @@ -147,12 +147,12 @@ bool CGameActor::ProcessState() { const std::uint32_t serverTime = g_session.GetServerTime(); int moved = 0; - switch (this->render.unknown_0070) { + switch (this->render.state) { case ST_AUTOCOUNTER: - if (this->unknown_0178 == 0) { - this->unknown_0178 = 1; + if (this->isCounter == 0) { + this->isCounter = 1; if (g_session.IsPlayerJobId(this->GetEffectiveJob(-1)) != 0) { - if (IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->unknown_0260, this->GetWeapon())) { + if (IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->sex, this->GetWeapon())) { this->SetAction(0x58, 4, 1); } else { this->SetAction(0x50, 4, 1); @@ -162,35 +162,35 @@ bool CGameActor::ProcessState() { } this->render.isMotionFreezed = true; } - if (timeGetTime() >= this->unknown_0280) { - this->unknown_0178 = 0; + if (timeGetTime() >= this->skillRechargeEndTick) { + this->isCounter = 0; this->render.isMotionFreezed = false; this->SetState(0, 1); this->SendMsg(nullptr, AM_DELETE_SKILL_RECHARGEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } this->ProcessMotion(); - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_STAND: - if (this->render.unknown_006C == 1 && this->render.isMotionFinished) { + if (this->render.motionType == 1 && this->render.isMotionFinished) { this->SetState(0, 1); - } else if (this->unknown_0314 == 7 && this->render.accountId == g_session.unknown_1010 && static_cast(this->unknown_027C) > 0 && - timeGetTime() > static_cast(this->unknown_027C) + 3000) { + } else if (this->objectType == 7 && this->render.accountId == g_session.petGid && static_cast(this->petEmotionStartTick) > 0 && + timeGetTime() > static_cast(this->petEmotionStartTick) + 3000) { if (rand() % 100 < 25) { - const int hungry = g_session.GetPetHungryState(g_session.unknown_1044); + const int hungry = g_session.GetPetHungryState(g_session.petHunger); const int friendly = g_session.GetPetFriendlyState(g_session.m_petFriendly); const int action = g_session.GetPetActionNumber(hungry, friendly, 4); - const int emotion = g_session.GetPetEmotionNumber(g_session.unknown_103C, 4, hungry); + const int emotion = g_session.GetPetEmotionNumber(g_session.petJob, 4, hungry); mode->SendMsg(MM_PET_ACT, emotion, 0, 0, 0); mode->SendMsg(MM_PET_ACT, action, 0, 0, 0); } - this->unknown_027C = 0; + this->petEmotionStartTick = 0; } this->ProcessMotion(); - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_MOVE: @@ -198,16 +198,16 @@ bool CGameActor::ProcessState() { break; } else { const vector3d old = this->render.position; - const int previousIndex = this->unknown_023C; + const int previousIndex = this->pathStartCell; std::uint32_t nextTick; float cellX; float cellY; - this->unknown_023C = this->route.NextPoint(serverTime, &nextTick, &cellX, &cellY); + this->pathStartCell = this->route.NextPoint(serverTime, &nextTick, &cellX, &cellY); float destX; float destZ; mode->CellCenter(static_cast(cellX), static_cast(cellY), destX, destZ); - int dtNext = static_cast(nextTick) - static_cast(this->unknown_0258); - int dtNow = static_cast(serverTime) - static_cast(this->unknown_0258); + int dtNext = static_cast(nextTick) - static_cast(this->lastServerTime); + int dtNow = static_cast(serverTime) - static_cast(this->lastServerTime); if (dtNext < 0) { dtNext = 0; } @@ -220,7 +220,7 @@ bool CGameActor::ProcessState() { this->render.position.x = (destX - old.x) * ratio + old.x; this->render.position.z = (destZ - old.z) * ratio + old.z; } - if (this->unknown_0238 == 0) { + if (this->isNeverAnimation == 0) { float angle; if (old.x == this->render.position.x && old.z == this->render.position.z) { angle = this->render.angle; @@ -240,12 +240,12 @@ bool CGameActor::ProcessState() { this->render.previousAnimation = this->Get8Dir(angle) + this->render.animation; } const float movedX = this->render.position.x - old.x; - this->unknown_0240 += SquareRoot(movedX * movedX + (this->render.position.z - old.z) * (this->render.position.z - old.z)); - if (this->unknown_0238 == 0) { + this->dist += SquareRoot(movedX * movedX + (this->render.position.z - old.z) * (this->render.position.z - old.z)); + if (this->isNeverAnimation == 0) { this->ProcessMotionWithDist(); } - if (this->unknown_023C != -1 || serverTime < nextTick) { - if (previousIndex != this->unknown_023C) { + if (this->pathStartCell != -1 || serverTime < nextTick) { + if (previousIndex != this->pathStartCell) { std::int32_t pointX = 0; std::int32_t pointY = 0; if (this->route.Point(previousIndex, &pointX, &pointY)) { @@ -261,15 +261,15 @@ bool CGameActor::ProcessState() { this->render.position.z = destZ; this->NotifyCellMove(&this->render.position.x, &this->render.position.z); this->SetState(0, 1); - this->unknown_0238 = 0; + this->isNeverAnimation = 0; this->render.isMotionFreezed = false; - if (this->unknown_0184 != 0) { - this->unknown_0184 = 0; + if (this->isAsuraAttack != 0) { + this->isAsuraAttack = 0; this->SetFrameSequence(0x60, 2, 2, 0x60, 2, 1, 3000, 0); } mode->SetFollowTicks(0, 0); - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; goto applyHeight; } @@ -287,12 +287,12 @@ bool CGameActor::ProcessState() { if (this->render.isMotionFinished) { this->SetState(0, 1); } - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_BEGIN_SKILL: - this->unknown_0178 = 0; + this->isCounter = 0; this->ProcessMotion(); { const int frames = static_cast(this->GetElapsedFrames()); @@ -305,31 +305,31 @@ bool CGameActor::ProcessState() { } } } - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_PICKUP: case ST_SKILL: case ST_AB_SPECIAL: - this->unknown_0178 = 0; + this->isCounter = 0; this->ProcessMotion(); if (this->render.isMotionFinished) { this->SetState(0, 1); } - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_DAMAGE: - this->unknown_0178 = 0; + this->isCounter = 0; this->ProcessMotion(); { const vector3d old = this->render.position; - const float deltaX = this->unknown_02D0 - this->render.position.x; - const float deltaZ = this->unknown_02D4 - this->render.position.z; - const unsigned int remaining = this->render.unknown_008C - timeGetTime() + 200; - const unsigned int elapsed = timeGetTime() - this->unknown_0244; + const float deltaX = this->damageDestX - this->render.position.x; + const float deltaZ = this->damageDestZ - this->render.position.z; + const unsigned int remaining = this->render.motionStartTime - timeGetTime() + 200; + const unsigned int elapsed = timeGetTime() - this->lastProcessStateTime; if (remaining != 0) { moved = 1; const float elapsedTime = static_cast(elapsed); @@ -338,8 +338,8 @@ bool CGameActor::ProcessState() { this->render.position.z = deltaZ * elapsedTime / totalTime + old.z; } if (this->render.isMotionFinished) { - this->render.position.x = this->unknown_02D0; - this->render.position.z = this->unknown_02D4; + this->render.position.x = this->damageDestX; + this->render.position.z = this->damageDestZ; moved = 1; this->SetState(0, 1); } @@ -347,23 +347,23 @@ bool CGameActor::ProcessState() { break; case ST_DEAD: - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.isMotionFreezed = false; - this->unknown_0178 = 0; + this->isCounter = 0; this->ProcessMotion(); - if (this->render.isMotionFinished && this->unknown_02A8.size() == 0) { + if (this->render.isMotionFinished && this->willBeAttackedList.size() == 0) { mode->SendMsg(MM_DELETEREGISTERPOS, static_cast(this->render.accountId), 0, 0, 0); const int job = this->GetEffectiveJob(-1); - if ((job > 31 && job < 1000) || g_session.IsMonsterClass(job) || this->unknown_0314 == 9 || + if ((job > 31 && job < 1000) || g_session.IsMonsterClass(job) || this->objectType == 9 || g_session.IsSkillIdInRange6001(job)) { this->MakeCorpse(); return false; } } - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; case ST_SLEEP: @@ -401,22 +401,22 @@ bool CGameActor::ProcessState() { case 0x32: case 0x33: case 0x37: - this->unknown_0178 = 0; + this->isCounter = 0; this->ProcessMotion(); - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; return true; default: break; } - this->unknown_0244 = timeGetTime(); - this->unknown_0258 = serverTime; + this->lastProcessStateTime = timeGetTime(); + this->lastServerTime = serverTime; if (moved != 0) { applyHeight: this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z); - this->render.position += this->unknown_03F0; + this->render.position += this->positionDelta; } return true; } @@ -425,27 +425,27 @@ bool CGameActor::ProcessState() { // OFFSET: 0x00CA83A0 // FUNCTION: fn_20988 CGameActor::CGameActor() - : unknown_0214(), unknown_02F0(0), unknown_02F4(0), unknown_0318(), unknown_0330(), unknown_0348(), unknown_0360(), - unknown_03F0(), unknown_0404(0), unknown_0408(0) { + : accel(), damageNumberCount(0), lastDamage(0), homunMsg(), homunResMsg(), merMsg(), merResMsg(), + positionDelta(), shapeShift(0), savedShapeShift(0) { this->ResetState(); } // OFFSET: 0x00CAF4F0 // FUNCTION: fn_21084 void CGameActor::ResetState() { - this->unknown_037C[11] = 0; - this->unknown_037C[2] = 0; - this->unknown_037C[3] = 0; - this->unknown_037C[1] = 0; - this->unknown_037C[0] = 0; - this->unknown_037C[6] = 0; - this->unknown_037C[4] = 0; - this->unknown_037C[5] = 0; - this->unknown_037C[9] = 0; - this->unknown_037C[7] = 0; - this->unknown_037C[8] = 0; - this->unknown_037C[10] = 0; - this->unknown_037C[12] = 0; + this->statusEffects[11] = 0; + this->statusEffects[2] = 0; + this->statusEffects[3] = 0; + this->statusEffects[1] = 0; + this->statusEffects[0] = 0; + this->statusEffects[6] = 0; + this->statusEffects[4] = 0; + this->statusEffects[5] = 0; + this->statusEffects[9] = 0; + this->statusEffects[7] = 0; + this->statusEffects[8] = 0; + this->statusEffects[10] = 0; + this->statusEffects[12] = 0; this->render.position.x = 0.0f; this->render.position.y = 0.0f; this->render.position.z = 0.0f; @@ -453,90 +453,90 @@ void CGameActor::ResetState() { this->render.animation = 0; this->render.previousAnimation = 0; this->render.curMotion = 0; - this->render.unknown_0070 = 0; - this->render.unknown_006C = 0; + this->render.state = 0; + this->render.motionType = 0; this->render.speed = 1.0f; - this->render.unknown_00A4Bytes[0] = 1; - this->unknown_0214.x = 0.0f; - this->unknown_0214.y = 0.0f; - this->unknown_0214.z = 0.0f; - this->unknown_0240 = 0; + this->render.visibilityOptions[0] = 1; + this->accel.x = 0.0f; + this->accel.y = 0.0f; + this->accel.z = 0.0f; + this->dist = 0; this->render.accountId = 0xFFFFFFFF; - this->unknown_0258 = g_session.GetServerTime(); - this->unknown_0244 = timeGetTime(); + this->lastServerTime = g_session.GetServerTime(); + this->lastProcessStateTime = timeGetTime(); this->render.screenX = 0; this->render.screenY = 0; - this->unknown_0264[0] = 0; - this->unknown_0264[1] = 0; - this->unknown_0264[2] = 0; - this->unknown_0264[3] = 0; - this->unknown_0288 = 0; - this->unknown_0290 = 0; + this->actorWindows[0] = 0; + this->actorWindows[1] = 0; + this->actorWindows[2] = 0; + this->actorWindows[3] = 0; + this->chatWidth = 0; + this->nameWidth = 0; this->render.isMotionFinished = false; this->hitTargetAid = 0; - this->unknown_0378 = -1.0f; - this->unknown_023C = -1; - this->render.unknown_00A4Bytes[1] = 1; - this->render.unknown_008C = timeGetTime(); - this->unknown_027C = 0; - this->unknown_0280 = timeGetTime() - 5000; - this->unknown_0284 = timeGetTime() - 10000; - this->unknown_02D8 = 3600; + this->attackMotion = -1.0f; + this->pathStartCell = -1; + this->render.visibilityOptions[1] = 1; + this->render.motionStartTime = timeGetTime(); + this->petEmotionStartTick = 0; + this->skillRechargeEndTick = timeGetTime() - 5000; + this->skillRechargeStartTick = timeGetTime() - 10000; + this->effectLaunchCnt = 3600; this->render.color = 0xFFFFFFFF; this->render.visible = 1; - this->render.unknown_00A2 = 0; - this->unknown_02B0 = 0; + this->render.flatDepth = 0; + this->willBeDead = 0; this->bodyState = 0; this->stateFlags = 0; this->SetRiding(0); - this->unknown_02C4 = 0; - this->unknown_02C8 = 0; - this->unknown_02DC = 0; - this->unknown_02B8 = 0; - this->unknown_02B4 = 0; - this->unknown_0210 = 0; - this->unknown_0178 = 0; - this->unknown_017C = 0; - this->unknown_0180 = 0; - std::memset(this->unknown_0190, 0, sizeof(this->unknown_0190)); + this->effectState = 0; + this->healthState = 0; + this->vanishTime = 0; + this->levelAuraType = 0; + this->hasLevelAura = 0; + this->characterLevel = 0; + this->isCounter = 0; + this->isTrickDead = 0; + this->isPlayHitWave = 0; + std::memset(this->hitWaveName, 0, sizeof(this->hitWaveName)); this->guildId = 0; - this->unknown_0278 = 0; - this->unknown_02E0 = 0; - this->unknown_0188 = 0; - this->unknown_018C = 0; - this->unknown_0238 = 0; - this->unknown_0184 = 0; - this->unknown_0250 = 0; - this->unknown_030C = 0; - this->unknown_0310 = 0; - this->unknown_0314 = 4; - this->unknown_0264[4] = 0; - this->unknown_03B8[0] = -1; - this->unknown_03B8[1] = -1; - this->unknown_03B8[2] = -1; - this->unknown_03C4 = -1; - this->unknown_03C8 = 0; + this->freezeEndTick = 0; + this->actorType = 0; + this->sceneNameWindow = 0; + this->actorTitleWindow = 0; + this->isNeverAnimation = 0; + this->isAsuraAttack = 0; + this->isBladeStop = 0; + this->homunAI = 0; + this->merAI = 0; + this->objectType = 4; + this->actorWindows[4] = 0; + this->transformJobs[0] = -1; + this->transformJobs[1] = -1; + this->transformJobs[2] = -1; + this->monsterTransformJob = -1; + this->transformPriority = 0; this->charmType = 0; - this->unknown_03D0 = 0; - this->unknown_0158[0] = 0; - this->unknown_0158[1] = 0; - this->unknown_0158[2] = 0; - this->unknown_0158[3] = 0; - this->unknown_0158[4] = 0; - this->unknown_0158[5] = 0; - this->unknown_02F8 = 0; - this->unknown_02FC = 0; - this->unknown_0300 = 0; - this->unknown_0304 = 0; - this->unknown_0305 = 0; - this->unknown_0308 = 0; - this->unknown_03DC = 0; - this->unknown_03E0 = 0; - this->unknown_02EC = 0; - this->unknown_03D4 = 0; - this->unknown_03D8 = 0; + this->charmCount = 0; + this->movementState[0] = 0; + this->movementState[1] = 0; + this->movementState[2] = 0; + this->movementState[3] = 0; + this->movementState[4] = 0; + this->movementState[5] = 0; + this->hasHp = 0; + this->maxHp = 0; + this->hpGaugeWindow = 0; + this->hpGaugeFlags = 0; + this->hasSp = 0; + this->spGaugeValue = 0; + this->mountedState = 0; + this->actorFlags = 0; + this->emblemVersion = 0; + this->firstFollowerEffect = 0; + this->secondFollowerEffect = 0; - this->unknown_03E8 = 0; + this->maximumValue = 0; } // OFFSET: 0x00CAFF00 @@ -545,10 +545,10 @@ void CGameActor::UpdateGaugePositions() { // GLOBAL: gl_24991 static float s_gaugeOffsetY = static_cast(g_renderer->viewport.height * 81 / 480); - if (this->unknown_0264[0] != 0) { - if (timeGetTime() < this->unknown_0248 + 5000) { - UIWindow* window = reinterpret_cast(this->unknown_0264[0]); - int x = this->render.screenX - this->unknown_0288 / 2; + if (this->actorWindows[0] != 0) { + if (timeGetTime() < this->chatTick + 5000) { + UIWindow* window = reinterpret_cast(this->actorWindows[0]); + int x = this->render.screenX - this->chatWidth / 2; if (x < -3) { x = -3; } @@ -557,7 +557,7 @@ void CGameActor::UpdateGaugePositions() { x = maximumX; } int y = static_cast( - static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C - static_cast(this->unknown_028C) + static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale - static_cast(this->chatHeight) ); if (y < -3) { y = -3; @@ -568,49 +568,49 @@ void CGameActor::UpdateGaugePositions() { } window->Move(x, y); } else { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[0])); - this->unknown_0264[0] = 0; + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[0])); + this->actorWindows[0] = 0; } } - if (this->unknown_0264[1] != 0) { - reinterpret_cast(this->unknown_0264[1])->Move( + if (this->actorWindows[1] != 0) { + reinterpret_cast(this->actorWindows[1])->Move( this->render.screenX - 70, - static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C - 17.0f) + static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale - 17.0f) ); } - if (this->unknown_0264[2] != 0) { - reinterpret_cast(this->unknown_0264[2])->Move( + if (this->actorWindows[2] != 0) { + reinterpret_cast(this->actorWindows[2])->Move( this->render.screenX - 70, - static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C - 17.0f - 17.0f) + static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale - 17.0f - 17.0f) ); } - if (this->unknown_0264[3] != 0) { - if (timeGetTime() > this->unknown_0280) { + if (this->actorWindows[3] != 0) { + if (timeGetTime() > this->skillRechargeEndTick) { this->SendMsg(nullptr, AM_DELETE_SKILL_RECHARGEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (this->render.unknown_0070 == 8) { + if (this->render.state == 8) { this->SetState(0, 1); } } else { - reinterpret_cast(this->unknown_0264[3])->Move( + reinterpret_cast(this->actorWindows[3])->Move( this->render.screenX - 30, - static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C) + static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale) ); - const std::uint32_t total = this->unknown_0280 - this->unknown_0284; - std::uint32_t elapsed = timeGetTime() - this->unknown_0284; + const std::uint32_t total = this->skillRechargeEndTick - this->skillRechargeStartTick; + std::uint32_t elapsed = timeGetTime() - this->skillRechargeStartTick; if (elapsed > total) { elapsed = total; } - reinterpret_cast(this->unknown_0264[3])->SetValues(elapsed, total); + reinterpret_cast(this->actorWindows[3])->SetValues(elapsed, total); } } - if (this->unknown_0264[4] != 0) { - reinterpret_cast(this->unknown_0264[4])->Move( + if (this->actorWindows[4] != 0) { + reinterpret_cast(this->actorWindows[4])->Move( this->render.screenX - 70, - static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C - 17.0f - 17.0f) + static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale - 17.0f - 17.0f) ); } } @@ -624,121 +624,121 @@ CGameActor::~CGameActor() { // OFFSET: 0x00CAF260 // FUNCTION: fn_21079 void CGameActor::ReleaseAttachments() { - if (this->unknown_030C && reinterpret_cast(this->unknown_030C)->state) { - reinterpret_cast(this->unknown_030C)->Shutdown(); - delete reinterpret_cast(this->unknown_030C); - this->unknown_030C = 0; + if (this->homunAI && reinterpret_cast(this->homunAI)->state) { + reinterpret_cast(this->homunAI)->Shutdown(); + delete reinterpret_cast(this->homunAI); + this->homunAI = 0; } - if (this->unknown_0310 && reinterpret_cast(this->unknown_0310)->state) { - reinterpret_cast(this->unknown_0310)->Shutdown(); - delete reinterpret_cast(this->unknown_0310); - this->unknown_0310 = 0; + if (this->merAI && reinterpret_cast(this->merAI)->state) { + reinterpret_cast(this->merAI)->Shutdown(); + delete reinterpret_cast(this->merAI); + this->merAI = 0; } for (int index = 0; index < 5; ++index) { - if (this->unknown_0264[index]) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[index])); - this->unknown_0264[index] = 0; + if (this->actorWindows[index]) { + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[index])); + this->actorWindows[index] = 0; } } - if (this->unknown_0300) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0300)); - this->unknown_0300 = 0; + if (this->hpGaugeWindow) { + g_windowMgr.Schedule(reinterpret_cast(this->hpGaugeWindow)); + this->hpGaugeWindow = 0; } - for (CGameObject* object : this->unknown_03B0) { + for (CGameObject* object : this->msgEffectList) { object->SendMsg(nullptr, AM_MSGMASTER_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - this->unknown_03B0.clear(); + this->msgEffectList.clear(); - if (g_session.GetSceneUnknown004C() && this->unknown_0188) { - static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->unknown_0188); - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0188)); - this->unknown_0188 = 0; + if (g_session.GetSceneUnknown004C() && this->sceneNameWindow) { + static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->sceneNameWindow); + g_windowMgr.Schedule(reinterpret_cast(this->sceneNameWindow)); + this->sceneNameWindow = 0; } - if (this->unknown_018C) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_018C)); - this->unknown_018C = 0; + if (this->actorTitleWindow) { + g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); + this->actorTitleWindow = 0; } } // OFFSET: 0x00CB0220 // FUNCTION: fn_21092 void CGameActor::UpdateStateEffects() { - if (g_updateTick > 0 && this->render.unknown_00ECBytes[0] == 1) { + if (g_updateTick > 0 && this->render.effectPhaseBytes[0] == 1) { this->render.flags = 0; - this->render.unknown_00ECBytes[0] = 0; + this->render.effectPhaseBytes[0] = 0; } if (StateFlagsClear(this->stateFlags)) { - this->unknown_02D8 = 36000; + this->effectLaunchCnt = 36000; return; } const DWORD now = timeGetTime(); - if (StateFlag00(this->stateFlags) && static_cast(this->unknown_02D8) >= static_cast(EffectLifetime(22))) { - this->unknown_02D8 = 0; + if (StateFlag00(this->stateFlags) && static_cast(this->effectLaunchCnt) >= static_cast(EffectLifetime(22))) { + this->effectLaunchCnt = 0; CRagEffect* effect = this->LaunchEffect(22, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (effect) { effect->SendMsg(nullptr, AM_SETCOUNT, 0, static_cast((static_cast(now) >> 4) % 10 + 1), 0, 0, 0, 0); } } - if (StateFlag13(this->stateFlags) && static_cast(this->unknown_02D8) >= static_cast(EffectLifetime(33))) { - this->unknown_02D8 = 0; + if (StateFlag13(this->stateFlags) && static_cast(this->effectLaunchCnt) >= static_cast(EffectLifetime(33))) { + this->effectLaunchCnt = 0; CRagEffect* effect = this->LaunchEffect(33, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (effect) { effect->SendMsg(nullptr, AM_SETCOUNT, 0, static_cast((static_cast(now) >> 4) % 10 + 1), 0, 0, 0, 0); } } - ++this->unknown_02D8; + ++this->effectLaunchCnt; } // OFFSET: 0x00CB03E0 // FUNCTION: fn_21093 void CGameActor::UpdateHpGauge() { - if (this->unknown_0300 == 0) { + if (this->hpGaugeWindow == 0) { return; } - if (g_serviceOptions.Get(0xD5) && reinterpret_cast(this->unknown_0300)->unknown_009C != 0 && + if (g_serviceOptions.Get(0xD5) && reinterpret_cast(this->hpGaugeWindow)->displayMode != 0 && !StateFlag01(this->stateFlags) && !StateFlag02(this->stateFlags) && !StateFlag06(this->stateFlags) && - g_windowMgr.unknown_0508 != 2) { - reinterpret_cast(this->unknown_0300)->Show(1); - if (this->render.unknown_0070 == 3 && reinterpret_cast(this->unknown_0300)->current != 0) { - reinterpret_cast(this->unknown_0300)->SetValues(0, reinterpret_cast(this->unknown_0300)->maximum); + g_windowMgr.windowVisibilityState != 2) { + reinterpret_cast(this->hpGaugeWindow)->Show(1); + if (this->render.state == 3 && reinterpret_cast(this->hpGaugeWindow)->current != 0) { + reinterpret_cast(this->hpGaugeWindow)->SetValues(0, reinterpret_cast(this->hpGaugeWindow)->maximum); } - reinterpret_cast(this->unknown_0300)->Move( - this->render.screenX - reinterpret_cast(this->unknown_0300)->geometry.width / 2, - static_cast(static_cast(ScaleByScreenHeight(12)) * this->render.unknown_005C + static_cast(this->render.screenY)) + reinterpret_cast(this->hpGaugeWindow)->Move( + this->render.screenX - reinterpret_cast(this->hpGaugeWindow)->geometry.width / 2, + static_cast(static_cast(ScaleByScreenHeight(12)) * this->render.distanceScale + static_cast(this->render.screenY)) ); - reinterpret_cast(this->unknown_0300)->Invalidate(); + reinterpret_cast(this->hpGaugeWindow)->Invalidate(); return; } - reinterpret_cast(this->unknown_0300)->Show(0); + reinterpret_cast(this->hpGaugeWindow)->Show(0); } // OFFSET: 0x00CB0A90 // FUNCTION: fn_21095 void CGameActor::ProcessMotionWithDist() { const int frames = static_cast(this->render.action->FrameCount(this->render.previousAnimation)); - this->render.curMotion = static_cast(this->unknown_0240 * 0.37f * 4.0f / this->render.speed) % frames; + this->render.curMotion = static_cast(this->dist * 0.37f * 4.0f / this->render.speed) % frames; } // OFFSET: 0x00CB18E0 // FUNCTION: fn_21098 bool CGameActor::UpdateFadeOut() { - if (static_cast(this->unknown_02DC) > 0) { - if (timeGetTime() > static_cast(this->unknown_02DC)) { + if (static_cast(this->vanishTime) > 0) { + if (timeGetTime() > static_cast(this->vanishTime)) { return false; } - const std::uint32_t remaining = (static_cast(this->unknown_02DC) - timeGetTime()) / 2; + const std::uint32_t remaining = (static_cast(this->vanishTime) - timeGetTime()) / 2; reinterpret_cast(&this->render.color)[3] = static_cast(remaining > 0xFF ? 0xFF : remaining); } @@ -885,12 +885,12 @@ int CGameActor::GetEffectCounter(int effectId) { case WH_HAWKRUSH: case WH_HAWKBOOMERANG: case WH_WILD_WALK: - return this->unknown_037C[0]; + return this->statusEffects[0]; } switch (effectId) { case RA_WUGSTRIKE: case RA_WUGBITE: - return this->unknown_037C[1]; + return this->statusEffects[1]; } return 0; } @@ -951,14 +951,14 @@ float CGameActor::GetNameOffset() { } if (g_session.IsBabyJob(this->GetEffectiveJob(-1))) { - return this->unknown_02CC ? 4.0f : -1.0f; + return this->isRiding ? 4.0f : -1.0f; } if (g_session.IsDoramJob(this->GetEffectiveJob(-1))) { - return this->unknown_02CC ? scale * -3.0f : scale * -2.0f; + return this->isRiding ? scale * -3.0f : scale * -2.0f; } - if (!this->unknown_02CC) { + if (!this->isRiding) { return 0.0f; } @@ -967,7 +967,7 @@ float CGameActor::GetNameOffset() { return scale * 6.0f; } - switch (static_cast(pc->unknown_04D4)) { + switch (static_cast(pc->appearanceJob)) { case JT_GUNSLINGER: case JT_REBELLION: case JT_NIGHT_WATCH: @@ -1031,7 +1031,7 @@ float CGameActor::GetNameHeight() { return 18.0f; } - if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) || !this->unknown_02CC) { + if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) || !this->isRiding) { return 18.0f; } @@ -1040,7 +1040,7 @@ float CGameActor::GetNameHeight() { return 23.0f; } - switch (static_cast(pc->unknown_04D4)) { + switch (static_cast(pc->appearanceJob)) { case JT_GUNSLINGER: case JT_REBELLION: case JT_NIGHT_WATCH: @@ -1068,35 +1068,35 @@ CSprRes* CGameActor::GetSprite() { // OFFSET: 0x00CAD9A0 // FUNCTION: fn_21056 __declspec(noinline) float CGameActor::GetElapsedFrames() { - return static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + return static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); } // OFFSET: 0x00CADAF0 // FUNCTION: fn_21058 int CGameActor::GetGaugeCurrent() { - if (this->unknown_0300 == 0) { + if (this->hpGaugeWindow == 0) { return -1; } - return reinterpret_cast(this->unknown_0300)->current; + return reinterpret_cast(this->hpGaugeWindow)->current; } // OFFSET: 0x00CADB10 // FUNCTION: fn_21059 int CGameActor::GetGaugeMaximum() { - if (this->unknown_0300 == 0) { + if (this->hpGaugeWindow == 0) { return -1; } - return reinterpret_cast(this->unknown_0300)->maximum; + return reinterpret_cast(this->hpGaugeWindow)->maximum; } // OFFSET: 0x00CADB30 // FUNCTION: fn_21060 void CGameActor::ResetUnknown03B8() { - this->unknown_03B8[0] = -1; - this->unknown_03B8[1] = -1; - this->unknown_03B8[2] = -1; - this->unknown_03C4 = -1; - this->unknown_03C8 = 0; + this->transformJobs[0] = -1; + this->transformJobs[1] = -1; + this->transformJobs[2] = -1; + this->monsterTransformJob = -1; + this->transformPriority = 0; } // OFFSET: 0x00CADC90 @@ -1111,17 +1111,17 @@ __declspec(noinline) bool CSession::IsMonsterClass(int job) { // OFFSET: 0x00CADCC0 // FUNCTION: fn_21066 bool CGameActor::HasPendingDamage() { - return this->unknown_02A8.size() > 0; + return this->willBeAttackedList.size() > 0; } // OFFSET: 0x00CADCF0 // FUNCTION: fn_21067 bool CGameActor::UpdateUnknown03E8(std::int64_t value) { bool result = false; - if (this->unknown_03E8 < value) { + if (this->maximumValue < value) { result = true; } - this->unknown_03E8 = value; + this->maximumValue = value; return result; } @@ -1135,16 +1135,16 @@ int CGameActor::IsPlayerClass(int job) { // FUNCTION: fn_21072 void CGameActor::SetStackedEffect(int effectId, bool on) { if (!on) { - this->unknown_03FC.erase(effectId); + this->exclusiveEffects.erase(effectId); this->ApplyEffectState(effectId, false); return; } - for (const int id : this->unknown_03FC) { + for (const int id : this->exclusiveEffects) { this->ApplyEffectState(id, false); } - this->unknown_03FC.insert(effectId); - for (const int id : this->unknown_03FC) { + this->exclusiveEffects.insert(effectId); + for (const int id : this->exclusiveEffects) { this->ApplyEffectState(id, true); } } @@ -1159,7 +1159,7 @@ void __stdcall CreateHallucinationPc( return; } - pc->unknown_0260 = sex & 1; + pc->sex = sex & 1; pc->SetActorJob(job); pc->SetSprHead(head); pc->SetImfFileName(); @@ -1184,6 +1184,6 @@ void __stdcall CreateHallucinationPc( // OFFSET: 0x00AA20D0 // FUNCTION: fn_17210 bool CGameActor::HasUnknown0310Entry() { - const int* entry = reinterpret_cast(this->unknown_0310); + const int* entry = reinterpret_cast(this->merAI); return entry && entry[1] != 0; } diff --git a/Source/Contents/Actors/GameActor.h b/Source/Contents/Actors/GameActor.h index 187dd3c22..871f87de1 100644 --- a/Source/Contents/Actors/GameActor.h +++ b/Source/Contents/Actors/GameActor.h @@ -28,11 +28,11 @@ struct ActorHitInfo { /* 0010 */ std::uint32_t targetAid; /* 0014 */ int unknown_0014; /* 0018 */ int hitCount; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; + /* 001C */ int cellX; + /* 0020 */ int cellY; /* 0024 */ int attackSpeed; /* 0028 */ int motionSpeed; - /* 002C */ unsigned char unknown_002C; + /* 002C */ unsigned char blueDamage; }; struct ActorSkillInfo { @@ -43,8 +43,8 @@ struct ActorSkillInfo { /* 0010 */ int unknown_0010; /* 0014 */ int level; /* 0018 */ int hitCount; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; + /* 001C */ int cellX; + /* 0020 */ int cellY; /* 0024 */ int attackSpeed; /* 0028 */ int motionSpeed; }; @@ -55,15 +55,15 @@ struct ActorDamageMessage { /* 0008 */ int damage; /* 000C */ std::uint32_t time; /* 0010 */ std::uint32_t attackerAid; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ int unknown_001C; + /* 0014 */ int cellX; + /* 0018 */ int cellY; + /* 001C */ int hitEffect; /* 0020 */ int effectId; - /* 0024 */ int unknown_0024; + /* 0024 */ int monsterValue; /* 0028 */ float motionSpeed; - /* 002C */ unsigned char unknown_002C; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; + /* 002C */ unsigned char blueDamage; + /* 0030 */ int skillId; + /* 0034 */ int skillTarget; }; class CGameActor : public EffectActor { @@ -73,97 +73,97 @@ public: bool OnProcess() override = 0; void SendMsg(CGameObject* sender, int message, int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l, int m) override; - /* 0158 */ int unknown_0158[6]; - /* 0170 */ unsigned char unknown_0170[0x08]; - /* 0178 */ int unknown_0178; - /* 017C */ int unknown_017C; - /* 0180 */ int unknown_0180; - /* 0184 */ int unknown_0184; - /* 0188 */ int unknown_0188; - /* 018C */ int unknown_018C; - /* 0190 */ unsigned char unknown_0190[0x80]; - /* 0210 */ std::uint16_t unknown_0210; + /* 0158 */ int movementState[6]; + /* 0170 */ unsigned char destinationAndSpeed[0x08]; + /* 0178 */ int isCounter; + /* 017C */ int isTrickDead; + /* 0180 */ int isPlayHitWave; + /* 0184 */ int isAsuraAttack; + /* 0188 */ int sceneNameWindow; + /* 018C */ int actorTitleWindow; + /* 0190 */ unsigned char hitWaveName[0x80]; + /* 0210 */ std::uint16_t characterLevel; /* 0212 */ unsigned char unknown_0212[0x02]; - /* 0214 */ vector3d unknown_0214; + /* 0214 */ vector3d accel; /* 0220 */ MovementRouteInterpolation route; - /* 0238 */ unsigned char unknown_0238; + /* 0238 */ unsigned char isNeverAnimation; /* 0239 */ unsigned char unknown_0239[0x03]; - /* 023C */ int unknown_023C; - /* 0240 */ float unknown_0240; - /* 0244 */ std::uint32_t unknown_0244; - /* 0248 */ std::uint32_t unknown_0248; + /* 023C */ int pathStartCell; + /* 0240 */ float dist; + /* 0244 */ std::uint32_t lastProcessStateTime; + /* 0248 */ std::uint32_t chatTick; /* 024C */ std::uint32_t hitTargetAid; - /* 0250 */ int unknown_0250; + /* 0250 */ int isBladeStop; /* 0254 */ std::uint32_t routeStartTick; - /* 0258 */ std::uint32_t unknown_0258; - /* 025C */ int unknown_025C; - /* 0260 */ int unknown_0260; - /* 0264 */ int unknown_0264[5]; - /* 0278 */ int unknown_0278; - /* 027C */ int unknown_027C; - /* 0280 */ std::uint32_t unknown_0280; - /* 0284 */ std::uint32_t unknown_0284; - /* 0288 */ int unknown_0288; - /* 028C */ int unknown_028C; - /* 0290 */ int unknown_0290; - /* 0294 */ int unknown_0294; - /* 0298 */ int unknown_0298; - /* 029C */ unsigned char unknown_029C[0x04]; + /* 0258 */ std::uint32_t lastServerTime; + /* 025C */ int job; + /* 0260 */ int sex; + /* 0264 */ int actorWindows[5]; + /* 0278 */ int freezeEndTick; + /* 027C */ int petEmotionStartTick; + /* 0280 */ std::uint32_t skillRechargeEndTick; + /* 0284 */ std::uint32_t skillRechargeStartTick; + /* 0288 */ int chatWidth; + /* 028C */ int chatHeight; + /* 0290 */ int nameWidth; + /* 0294 */ int xSize; + /* 0298 */ int ySize; + /* 029C */ unsigned char headType[0x04]; /* 02A0 */ std::list unknown_02A0; - /* 02A8 */ std::list unknown_02A8; - /* 02B0 */ int unknown_02B0; - /* 02B4 */ int unknown_02B4; - /* 02B8 */ unsigned char unknown_02B8; + /* 02A8 */ std::list willBeAttackedList; + /* 02B0 */ int willBeDead; + /* 02B4 */ int hasLevelAura; + /* 02B8 */ unsigned char levelAuraType; /* 02B9 */ unsigned char unknown_02B9[0x03]; /* 02BC */ int bodyState; /* 02C0 */ std::uint32_t stateFlags; - /* 02C4 */ int unknown_02C4; - /* 02C8 */ int unknown_02C8; - /* 02CC */ unsigned char unknown_02CC; + /* 02C4 */ int effectState; + /* 02C8 */ int healthState; + /* 02CC */ unsigned char isRiding; /* 02CD */ unsigned char unknown_02CD[0x03]; - /* 02D0 */ float unknown_02D0; - /* 02D4 */ float unknown_02D4; - /* 02D8 */ int unknown_02D8; - /* 02DC */ int unknown_02DC; - /* 02E0 */ int unknown_02E0; - /* 02E4 */ int unknown_02E4; + /* 02D0 */ float damageDestX; + /* 02D4 */ float damageDestZ; + /* 02D8 */ int effectLaunchCnt; + /* 02DC */ int vanishTime; + /* 02E0 */ int actorType; + /* 02E4 */ int isGroupMemberVisible; /* 02E8 */ int guildId; - /* 02EC */ int unknown_02EC; - /* 02F0 */ int unknown_02F0; - /* 02F4 */ int unknown_02F4; - /* 02F8 */ int unknown_02F8; - /* 02FC */ int unknown_02FC; - /* 0300 */ int unknown_0300; - /* 0304 */ unsigned char unknown_0304; - /* 0305 */ unsigned char unknown_0305; + /* 02EC */ int emblemVersion; + /* 02F0 */ int damageNumberCount; + /* 02F4 */ int lastDamage; + /* 02F8 */ int hasHp; + /* 02FC */ int maxHp; + /* 0300 */ int hpGaugeWindow; + /* 0304 */ unsigned char hpGaugeFlags; + /* 0305 */ unsigned char hasSp; /* 0306 */ unsigned char unknown_0306[2]; - /* 0308 */ int unknown_0308; - /* 030C */ int unknown_030C; - /* 0310 */ int unknown_0310; - /* 0314 */ unsigned char unknown_0314; + /* 0308 */ int spGaugeValue; + /* 030C */ int homunAI; + /* 0310 */ int merAI; + /* 0314 */ unsigned char objectType; /* 0315 */ unsigned char unknown_0315[3]; - /* 0318 */ float unknown_0318[6]; - /* 0330 */ float unknown_0330[6]; - /* 0348 */ float unknown_0348[6]; - /* 0360 */ float unknown_0360[6]; - /* 0378 */ float unknown_0378; - /* 037C */ int unknown_037C[13]; - /* 03B0 */ std::list unknown_03B0; - /* 03B8 */ int unknown_03B8[3]; - /* 03C4 */ int unknown_03C4; - /* 03C8 */ int unknown_03C8; + /* 0318 */ float homunMsg[6]; + /* 0330 */ float homunResMsg[6]; + /* 0348 */ float merMsg[6]; + /* 0360 */ float merResMsg[6]; + /* 0378 */ float attackMotion; + /* 037C */ int statusEffects[13]; + /* 03B0 */ std::list msgEffectList; + /* 03B8 */ int transformJobs[3]; + /* 03C4 */ int monsterTransformJob; + /* 03C8 */ int transformPriority; /* 03CC */ int charmType; - /* 03D0 */ int unknown_03D0; - /* 03D4 */ int unknown_03D4; - /* 03D8 */ int unknown_03D8; - /* 03DC */ int unknown_03DC; - union { /* 03E0 */ std::uint16_t unknown_03E0; struct { unsigned char unknown_03E0Low; /* 03E1 */ bool unknown_03E1; }; }; + /* 03D0 */ int charmCount; + /* 03D4 */ int firstFollowerEffect; + /* 03D8 */ int secondFollowerEffect; + /* 03DC */ int mountedState; + union { /* 03E0 */ std::uint16_t actorFlags; struct { unsigned char storedActorEntry; /* 03E1 */ bool modelReady; }; }; /* 03E2 */ unsigned char unknown_03E2[0x06]; - /* 03E8 */ std::int64_t unknown_03E8; - /* 03F0 */ vector3d unknown_03F0; - /* 03FC */ std::set unknown_03FC; - /* 0404 */ int unknown_0404; - /* 0408 */ int unknown_0408; + /* 03E8 */ std::int64_t maximumValue; + /* 03F0 */ vector3d positionDelta; + /* 03FC */ std::set exclusiveEffects; + /* 0404 */ int shapeShift; + /* 0408 */ int savedShapeShift; /* 040C */ unsigned char unknown_040C[0x04]; int Get8Dir(float angle) override; @@ -303,54 +303,54 @@ extern int g_multiHitInterval; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CGameActor) == 0x410); static_assert(offsetof(CGameActor, route) == 0x220); -static_assert(offsetof(CGameActor, unknown_0178) == 0x178); +static_assert(offsetof(CGameActor, isCounter) == 0x178); static_assert(offsetof(CGameActor, hitTargetAid) == 0x24C); static_assert(sizeof(ActorDamageMessage) == 0x38); -static_assert(offsetof(CGameActor, unknown_0238) == 0x238); +static_assert(offsetof(CGameActor, isNeverAnimation) == 0x238); static_assert(offsetof(CGameActor, routeStartTick) == 0x254); -static_assert(offsetof(CGameActor, unknown_0260) == 0x260); +static_assert(offsetof(CGameActor, sex) == 0x260); static_assert(offsetof(CGameActor, bodyState) == 0x2BC); -static_assert(offsetof(CGameActor, unknown_02C8) == 0x2C8); -static_assert(offsetof(CGameActor, unknown_02E4) == 0x2E4); -static_assert(offsetof(CGameActor, unknown_0305) == 0x305); -static_assert(offsetof(CGameActor, unknown_0308) == 0x308); -static_assert(offsetof(CGameActor, unknown_0314) == 0x314); -static_assert(offsetof(CGameActor, unknown_0318) == 0x318); -static_assert(offsetof(CGameActor, unknown_0330) == 0x330); -static_assert(offsetof(CGameActor, unknown_0348) == 0x348); -static_assert(offsetof(CGameActor, unknown_0360) == 0x360); -static_assert(offsetof(CGameActor, unknown_0378) == 0x378); -static_assert(offsetof(CGameActor, unknown_03C8) == 0x3C8); +static_assert(offsetof(CGameActor, healthState) == 0x2C8); +static_assert(offsetof(CGameActor, isGroupMemberVisible) == 0x2E4); +static_assert(offsetof(CGameActor, hasSp) == 0x305); +static_assert(offsetof(CGameActor, spGaugeValue) == 0x308); +static_assert(offsetof(CGameActor, objectType) == 0x314); +static_assert(offsetof(CGameActor, homunMsg) == 0x318); +static_assert(offsetof(CGameActor, homunResMsg) == 0x330); +static_assert(offsetof(CGameActor, merMsg) == 0x348); +static_assert(offsetof(CGameActor, merResMsg) == 0x360); +static_assert(offsetof(CGameActor, attackMotion) == 0x378); +static_assert(offsetof(CGameActor, transformPriority) == 0x3C8); static_assert(offsetof(CGameActor, charmType) == 0x3CC); -static_assert(offsetof(CGameActor, unknown_025C) == 0x25C); -static_assert(offsetof(CGameActor, unknown_0408) == 0x408); -static_assert(offsetof(CGameActor, unknown_0158) == 0x158); -static_assert(offsetof(CGameActor, unknown_0190) == 0x190); -static_assert(offsetof(CGameActor, unknown_0210) == 0x210); -static_assert(offsetof(CGameActor, unknown_0214) == 0x214); -static_assert(offsetof(CGameActor, unknown_023C) == 0x23C); -static_assert(offsetof(CGameActor, unknown_0258) == 0x258); -static_assert(offsetof(CGameActor, unknown_0264) == 0x264); -static_assert(offsetof(CGameActor, unknown_0290) == 0x290); -static_assert(offsetof(CGameActor, unknown_0298) == 0x298); +static_assert(offsetof(CGameActor, job) == 0x25C); +static_assert(offsetof(CGameActor, savedShapeShift) == 0x408); +static_assert(offsetof(CGameActor, movementState) == 0x158); +static_assert(offsetof(CGameActor, hitWaveName) == 0x190); +static_assert(offsetof(CGameActor, characterLevel) == 0x210); +static_assert(offsetof(CGameActor, accel) == 0x214); +static_assert(offsetof(CGameActor, pathStartCell) == 0x23C); +static_assert(offsetof(CGameActor, lastServerTime) == 0x258); +static_assert(offsetof(CGameActor, actorWindows) == 0x264); +static_assert(offsetof(CGameActor, nameWidth) == 0x290); +static_assert(offsetof(CGameActor, ySize) == 0x298); static_assert(offsetof(CGameActor, unknown_02A0) == 0x2A0); -static_assert(offsetof(CGameActor, unknown_02A8) == 0x2A8); -static_assert(offsetof(CGameActor, unknown_02B8) == 0x2B8); -static_assert(offsetof(CGameActor, unknown_02D0) == 0x2D0); -static_assert(offsetof(CGameActor, unknown_02D4) == 0x2D4); -static_assert(offsetof(CGameActor, unknown_02D8) == 0x2D8); -static_assert(offsetof(CGameActor, unknown_02EC) == 0x2EC); -static_assert(offsetof(CGameActor, unknown_0304) == 0x304); -static_assert(offsetof(CGameActor, unknown_030C) == 0x30C); -static_assert(offsetof(CGameActor, unknown_037C) == 0x37C); -static_assert(offsetof(CGameActor, unknown_03B0) == 0x3B0); -static_assert(offsetof(CGameActor, unknown_03B8) == 0x3B8); -static_assert(offsetof(CGameActor, unknown_03D0) == 0x3D0); -static_assert(offsetof(CGameActor, unknown_03E0) == 0x3E0); -static_assert(offsetof(CGameActor, unknown_03E8) == 0x3E8); -static_assert(offsetof(CGameActor, unknown_03F0) == 0x3F0); -static_assert(offsetof(CGameActor, unknown_03FC) == 0x3FC); -static_assert(offsetof(CGameActor, unknown_0404) == 0x404); +static_assert(offsetof(CGameActor, willBeAttackedList) == 0x2A8); +static_assert(offsetof(CGameActor, levelAuraType) == 0x2B8); +static_assert(offsetof(CGameActor, damageDestX) == 0x2D0); +static_assert(offsetof(CGameActor, damageDestZ) == 0x2D4); +static_assert(offsetof(CGameActor, effectLaunchCnt) == 0x2D8); +static_assert(offsetof(CGameActor, emblemVersion) == 0x2EC); +static_assert(offsetof(CGameActor, hpGaugeFlags) == 0x304); +static_assert(offsetof(CGameActor, homunAI) == 0x30C); +static_assert(offsetof(CGameActor, statusEffects) == 0x37C); +static_assert(offsetof(CGameActor, msgEffectList) == 0x3B0); +static_assert(offsetof(CGameActor, transformJobs) == 0x3B8); +static_assert(offsetof(CGameActor, charmCount) == 0x3D0); +static_assert(offsetof(CGameActor, actorFlags) == 0x3E0); +static_assert(offsetof(CGameActor, maximumValue) == 0x3E8); +static_assert(offsetof(CGameActor, positionDelta) == 0x3F0); +static_assert(offsetof(CGameActor, exclusiveEffects) == 0x3FC); +static_assert(offsetof(CGameActor, shapeShift) == 0x404); #endif #endif diff --git a/Source/Contents/Actors/GameObject.cpp b/Source/Contents/Actors/GameObject.cpp index ccf6e1f0b..d93c0eb38 100644 --- a/Source/Contents/Actors/GameObject.cpp +++ b/Source/Contents/Actors/GameObject.cpp @@ -245,7 +245,7 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { CSprRes* sprite = this->render.sprite; CActRes* action = this->render.action; - if (g_session.unknown_5450 == 1 && seasonal == true) { + if (g_session.guildLeader == 1 && seasonal == true) { SYSTEMTIME time; GetLocalTime(&time); int job; @@ -280,18 +280,18 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { float extra = offset; if (CEffect* effect = g_effectMgr->Find(static_cast(this->render.accountId), 2374)) { - extra += *reinterpret_cast(&effect->unknown_0048); + extra += *reinterpret_cast(&effect->scaleParameter); } - if (g_championMonsterMgr->IsChampion(static_cast(this->render.unknown_010C))) { - extra += g_championMonsterMgr->GetValue(static_cast(this->render.unknown_010C)); + if (g_championMonsterMgr->IsChampion(static_cast(this->render.spriteJob))) { + extra += g_championMonsterMgr->GetValue(static_cast(this->render.spriteJob)); } if (extra != 0.0f) { distanceScale *= extra; } - this->render.unknown_005C = distanceScale / g_heightScale; + this->render.distanceScale = distanceScale / g_heightScale; const float scale = - g_renderer->UiScaleX() * (static_cast(static_cast(this->render.unknown_0078)) * this->render.scale) * this->render.unknown_005C; + g_renderer->UiScaleX() * (static_cast(static_cast(this->render.spriteOffsetX)) * this->render.scale) * this->render.distanceScale; bool drawn = false; RenderBounds bounds; @@ -322,7 +322,7 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { drawn = true; quad.image = image; - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { const float minX = quad.left < quad.right ? quad.left : quad.right; const float maxX = quad.left > quad.right ? quad.left : quad.right; if (bounds.left > minX) { @@ -340,14 +340,14 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { } const std::uint32_t* palette = sprite->palette; - if (this->render.unknown_0048 != 0) { + if (this->render.bodyPalette != 0) { palette = static_cast(ResourceMgr::Instance().Load(this->render.name.c_str()))->palette; } int blend = 257; this->DrawSpriteEffects(&quad, &cell, box, scale, bottomRhw, topRhw, palette, image, &blend, color); - if (this->render.unknown_010C == 0x235) { + if (this->render.spriteJob == 0x235) { quad.bottomRhw = bottomRhw - 0.0000003f; quad.topRhw = topRhw - 0.0000003f; } @@ -361,7 +361,7 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { SpriteQuad overlay = quad; if ((this->render.flags & 0x100) != 0) { - const short level = this->render.unknown_00F4; + const short level = this->render.effectPhase; bool draw = true; if (level <= 5) { overlay.color = (static_cast(level * 50) << 24) + 0xFFFFFF; @@ -393,7 +393,7 @@ void CRenderObject::DrawSprite(int argument, bool seasonal, float offset) { this->SetTlvert(x, y); } - this->render.unknown_00ECBytes[0] = 1; + this->render.effectPhaseBytes[0] = 1; } // OFFSET: 0x00CB2830 @@ -410,9 +410,9 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { float reciprocalDepth; g_renderer->ProjectViewport(origin, matrix, &x, &y, &reciprocalDepth); const float distanceScale = g_renderer->ScaleDistance(reciprocalDepth); - this->render.unknown_005C = distanceScale / g_heightScale; + this->render.distanceScale = distanceScale / g_heightScale; const float scale = - g_renderer->UiScaleX() * (static_cast(static_cast(this->render.unknown_0078)) * this->render.scale) * this->render.unknown_005C; + g_renderer->UiScaleX() * (static_cast(static_cast(this->render.spriteOffsetX)) * this->render.scale) * this->render.distanceScale; char path[256]; char accessory[256]; @@ -462,7 +462,7 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { } headFrame = frame; - if (headFrame->anchorCount != 0 && bodyFrame->anchorCount != 0 && headFrame->anchors[0].unknown_0008 == bodyFrame->anchors[0].unknown_0008) { + if (headFrame->anchorCount != 0 && bodyFrame->anchorCount != 0 && headFrame->anchors[0].attachmentId == bodyFrame->anchors[0].attachmentId) { headOffsetX = bodyFrame->anchors[0].x - headFrame->anchors[0].x; headOffsetY = bodyFrame->anchors[0].y - headFrame->anchors[0].y; } @@ -640,7 +640,7 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { frame = &action->Frame(this->render.previousAnimation, 0); } - if (frame->anchorCount != 0 && headFrame->anchorCount != 0 && frame->anchors[0].unknown_0008 == headFrame->anchors[0].unknown_0008) { + if (frame->anchorCount != 0 && headFrame->anchorCount != 0 && frame->anchors[0].attachmentId == headFrame->anchors[0].attachmentId) { accessoryOffsetX = headFrame->anchors[0].x - frame->anchors[0].x; accessoryOffsetY = headFrame->anchors[0].y - frame->anchors[0].y; } @@ -687,7 +687,7 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { quad.topRhw += bias; } - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { const float minX = quad.left < quad.right ? quad.left : quad.right; const float maxX = quad.left > quad.right ? quad.left : quad.right; if (bounds[0] > minX) { @@ -705,7 +705,7 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { } const std::uint32_t* palette = sprite->palette; - if (this->render.unknown_0048 != 0) { + if (this->render.bodyPalette != 0) { palette = static_cast(ResourceMgr::Instance().Load(this->render.name.c_str()))->palette; } @@ -727,13 +727,13 @@ void CGameActor::RenderMercenary(const float* matrix, int job) { } } - this->render.unknown_00ECBytes[0] = 1; + this->render.effectPhaseBytes[0] = 1; } // OFFSET: 0x00CB35F0 // FUNCTION: fn_21105 void CRenderObject::DrawShadow(int argument, float scale) { - if (this->render.unknown_010C == 565 || this->render.unknown_00A4Bytes[0] == 0 || this->render.unknown_0054 == 0.0f || scale == 0.0f) { + if (this->render.spriteJob == 565 || this->render.visibilityOptions[0] == 0 || this->render.shadowScale == 0.0f || scale == 0.0f) { return; } @@ -762,26 +762,26 @@ void CRenderObject::DrawShadow(int argument, float scale) { float pulse = 1.0f; const SpriteRleImage* image = sprite->images[cell.imageType][0]; this->ScaleByPulse(pulse); - const double size = pulse * scale * this->render.unknown_0054; + const double size = pulse * scale * this->render.shadowScale; const double factor = distanceScale; SpriteQuad quad; quad.top = static_cast(cell.y * factor * cell.scaleY * size + screenY); - quad.bottom = static_cast(((image->unknown_0006 + 1) * image->height + cell.y) * factor * cell.scaleY * size + screenY + 1.0); + quad.bottom = static_cast(((image->doubleHeight + 1) * image->height + cell.y) * factor * cell.scaleY * size + screenY + 1.0); float left = static_cast(cell.x * factor * cell.scaleX * size + screenX); - quad.right = static_cast(((image->unknown_0004 + 1) * image->width + cell.x) * factor * cell.scaleX * size + screenX + 1.0); + quad.right = static_cast(((image->doubleWidth + 1) * image->width + cell.x) * factor * cell.scaleX * size + screenX + 1.0); if (quad.top >= static_cast(g_renderer->viewport.height) || quad.bottom <= 0.0f || left >= static_cast(g_renderer->viewport.width) || quad.right <= 0.0f) { return; } - quad.left = static_cast(static_cast(this->render.unknown_0078)) + left; - quad.right = static_cast(static_cast(this->render.unknown_0078)) + quad.right; + quad.left = static_cast(static_cast(this->render.spriteOffsetX)) + left; + quad.right = static_cast(static_cast(this->render.spriteOffsetX)) + quad.right; quad.color = static_cast(((static_cast(cell.color >> 24) << 8 | (cell.color & 0xFF)) << 8 | (cell.color >> 8 & 0xFF)) << 8) | (cell.color >> 16 & 0xFF); quad.bottomRhw = 1.0f / (depth - (quad.bottom - screenY) * g_cotangent) + 0.00001f; quad.topRhw = 1.0f / (depth - (quad.top - screenY) * g_cotangent) + 0.00001f; - quad.angle = static_cast(cell.unknown_001C); + quad.angle = static_cast(cell.rotation); quad.image = image; if (IsScreenShakeActive()) { @@ -797,7 +797,7 @@ void CRenderObject::DrawShadow(int argument, float scale) { void CRenderObject::DrawQuad(const SpriteQuad& quad, const std::uint32_t* palette, int blend, float offsetX, float offsetY, int depthOffset) { SpriteAtlasRecord record{}; const SpriteRleImage* image = quad.image; - CTexture* texture = static_cast(const_cast(image->unknown_0008)); + CTexture* texture = static_cast(const_cast(image->surface)); if (!texture) { texture = g_renderer->atlas.Find(image, palette, record); if (!texture) { @@ -875,10 +875,10 @@ void CRenderObject::DrawQuad(const SpriteQuad& quad, const std::uint32_t* palett vertices[3].v = record.v1; vertices[3].diffuse = quad.color; - primitive->unknown_0018 = 5; - primitive->unknown_001C = blend != 5 ? 6 : 2; - primitive->unknown_0014 = g_renderer->twoPass != 1; - g_renderer->queues.Submit(primitive, static_cast(blend | this->render.unknown_0124), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); + primitive->sourceBlend = 5; + primitive->destinationBlend = blend != 5 ? 6 : 2; + primitive->depthFlags = g_renderer->twoPass != 1; + g_renderer->queues.Submit(primitive, static_cast(blend | this->render.blendFlags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } // OFFSET: 0x00CB3F40 @@ -917,13 +917,13 @@ void CRenderObject::SendValueMessage(int value, CGameObject* target) { // OFFSET: 0x00CB4070 // FUNCTION: fn_21110 void CGameActor::ApplyPendingUnknown0408() { - const int pending = this->unknown_0408; - this->unknown_0404 = pending; - this->unknown_0408 = 0; + const int pending = this->savedShapeShift; + this->shapeShift = pending; + this->savedShapeShift = 0; this->render.isLieOnGround = false; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->render.isMotionFreezed = false; - this->render.unknown_0114 = 0; + this->render.specialMotionLocked = 0; int value; if (pending == 1) { @@ -931,13 +931,13 @@ void CGameActor::ApplyPendingUnknown0408() { } else if (pending == 2) { value = 0x1105; } else { - value = this->unknown_025C; + value = this->job; } this->SetSprJob(value); this->SetBodyPaletteName(); - if (this->render.unknown_0070 != 3) { - this->render.unknown_0070 = 0; + if (this->render.state != 3) { + this->render.state = 0; this->SetState(0, 1); } } @@ -1104,41 +1104,41 @@ namespace { struct PcStandEntry { /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int sex; /* 000C */ int cellX; /* 0010 */ int cellY; /* 0014 */ int direction; /* 0018 */ int speed; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; + /* 001C */ int xSize; + /* 0020 */ int ySize; + /* 0024 */ int head; + /* 0028 */ int weapon; + /* 002C */ int secondaryWeapon; + /* 0030 */ int accessory; /* 0034 */ int state; /* 0038 */ int bodyState; /* 003C */ int effectState; /* 0040 */ std::uint32_t stateFlags; - /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; + /* 0044 */ int healthState; + /* 0048 */ int shield; + /* 004C */ int accessory2; + /* 0050 */ int accessory3; + /* 0054 */ int headPalette; + /* 0058 */ int bodyPalette; + /* 005C */ int headDir; /* 0060 */ int guildId; /* 0064 */ int guildVersion; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; + /* 0068 */ int honor; + /* 006C */ int virtue; /* 0070 */ int robe; - /* 0074 */ int unknown_0074; - /* 0078 */ int unknown_0078; + /* 0074 */ int pkState; + /* 0078 */ int bodyStyle; }; struct PcMoveEntry { /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int sex; /* 000C */ std::uint32_t moveStartTick; /* 0010 */ int startX; /* 0014 */ int startY; @@ -1147,27 +1147,27 @@ struct PcMoveEntry { /* 0020 */ int destX; /* 0024 */ int destY; /* 0028 */ int speed; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; + /* 002C */ int head; + /* 0030 */ int weapon; + /* 0034 */ int secondaryWeapon; + /* 0038 */ int accessory; /* 003C */ int bodyState; /* 0040 */ int effectState; /* 0044 */ std::uint32_t stateFlags; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; + /* 0048 */ int healthState; + /* 004C */ int shield; + /* 0050 */ int accessory2; + /* 0054 */ int accessory3; + /* 0058 */ int headPalette; + /* 005C */ int bodyPalette; /* 0060 */ int unknown_0060; /* 0064 */ int guildId; /* 0068 */ int guildVersion; - /* 006C */ int unknown_006C; - /* 0070 */ int unknown_0070; + /* 006C */ int honor; + /* 0070 */ int virtue; /* 0074 */ int robe; - /* 0078 */ int unknown_0078; - /* 007C */ int unknown_007C; + /* 0078 */ int pkState; + /* 007C */ int bodyStyle; }; } @@ -1186,42 +1186,42 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case 21: break; case AM_DELETE_PROHIBITEFFECT: - if (this->unknown_037C[10] != 0) { - static_cast(g_modeMgr.GetGameMode())->scene->RemoveObject(reinterpret_cast(this->unknown_037C[10])); + if (this->statusEffects[10] != 0) { + static_cast(g_modeMgr.GetGameMode())->scene->RemoveObject(reinterpret_cast(this->statusEffects[10])); } break; case AM_MSGEFFECT_DEAD: - for (auto it = this->unknown_03B0.begin(); it != this->unknown_03B0.end(); ++it) { + for (auto it = this->msgEffectList.begin(); it != this->msgEffectList.end(); ++it) { if (*it == sender) { const int effect = reinterpret_cast(*it); - if (this->unknown_037C[1] == effect) { - this->unknown_037C[1] = 0; - } else if (this->unknown_037C[0] == effect) { - this->unknown_037C[0] = 0; - } else if (this->unknown_037C[2] == effect) { - this->unknown_037C[2] = 0; - } else if (this->unknown_037C[3] == effect) { - this->unknown_037C[3] = 0; - } else if (this->unknown_037C[4] == effect) { - this->unknown_037C[4] = 0; - } else if (this->unknown_037C[5] == effect) { - this->unknown_037C[5] = 0; - } else if (this->unknown_037C[6] == effect) { - this->unknown_037C[6] = 0; - } else if (this->unknown_037C[8] == effect) { - this->unknown_037C[8] = 0; - } else if (this->unknown_037C[9] == effect) { - this->unknown_037C[9] = 0; - } else if (this->unknown_037C[7] == effect) { - this->unknown_037C[7] = 0; - } else if (this->unknown_037C[10] == effect) { - this->unknown_037C[10] = 0; - } else if (this->unknown_037C[11] == effect) { - this->unknown_037C[11] = 0; - } else if (this->unknown_037C[12] == effect) { - this->unknown_037C[12] = 0; + if (this->statusEffects[1] == effect) { + this->statusEffects[1] = 0; + } else if (this->statusEffects[0] == effect) { + this->statusEffects[0] = 0; + } else if (this->statusEffects[2] == effect) { + this->statusEffects[2] = 0; + } else if (this->statusEffects[3] == effect) { + this->statusEffects[3] = 0; + } else if (this->statusEffects[4] == effect) { + this->statusEffects[4] = 0; + } else if (this->statusEffects[5] == effect) { + this->statusEffects[5] = 0; + } else if (this->statusEffects[6] == effect) { + this->statusEffects[6] = 0; + } else if (this->statusEffects[8] == effect) { + this->statusEffects[8] = 0; + } else if (this->statusEffects[9] == effect) { + this->statusEffects[9] = 0; + } else if (this->statusEffects[7] == effect) { + this->statusEffects[7] = 0; + } else if (this->statusEffects[10] == effect) { + this->statusEffects[10] = 0; + } else if (this->statusEffects[11] == effect) { + this->statusEffects[11] = 0; + } else if (this->statusEffects[12] == effect) { + this->statusEffects[12] = 0; } - this->unknown_03B0.erase(it); + this->msgEffectList.erase(it); break; } } @@ -1255,9 +1255,9 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } CMsgEffect* effect = mode->SpawnDamageMsgEffect(&this->render.position, b, this->render.accountId); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - ++this->unknown_02F0; + ++this->damageNumberCount; break; } case AM_MAKE_GUARD: @@ -1265,7 +1265,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; case AM_MAKE_LUCKY: { CMsgEffect* effect = mode->SpawnMsgEffect(0xD, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } @@ -1276,18 +1276,18 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (!g_cashEmotionMgr->IsChatProhibitEmotion(d)) { CMsgEffect* effect = mode->SpawnCashEmotion(reinterpret_cast(&this->render.position), b, d, this->render.accountId); if (effect != nullptr) { - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } } else { - if (this->unknown_037C[10] != 0) { + if (this->statusEffects[10] != 0) { break; } - CGameObject** slot = reinterpret_cast(&this->unknown_037C[10]); + CGameObject** slot = reinterpret_cast(&this->statusEffects[10]); *slot = mode->SpawnCashEmotion(reinterpret_cast(&this->render.position), b, d, this->render.accountId); if (*slot != nullptr) { - this->unknown_03B0.push_back(*slot); + this->msgEffectList.push_back(*slot); (*slot)->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } @@ -1296,14 +1296,14 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } case AM_MAKE_CART: { - if (StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags) || this->unknown_037C[1] != 0) { + if (StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags) || this->statusEffects[1] != 0) { break; } int effectIds[14][2] = { {0x15, 0x1E}, {0x01, 0x19}, {0x10, 0x1A}, {0x11, 0x1B}, {0x12, 0x1C}, {0x13, 0x1D}, {0x2D, 0x2E}, {0x2F, 0x30}, {0x31, 0x32}, {0x33, 0x34}, {0x36, 0x37}, {0x38, 0x39}, {0x3A, 0x3B}, {0x41, 0x42}, }; - int row = this->unknown_02FC; + int row = this->maxHp; int baby = 0; if (g_session.IsSuperNoviceClass(this->GetEffectiveJob(-1))) { row = 0; @@ -1312,20 +1312,20 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, baby = 1; } CMsgEffect* effect = mode->SpawnMsgEffect(effectIds[row][baby], &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[1] = reinterpret_cast(effect); + this->statusEffects[1] = reinterpret_cast(effect); break; } case AM_DELETE_CART: case AM_DELETE_WOLF: - if (this->unknown_037C[1] != 0) { - reinterpret_cast(this->unknown_037C[1])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[1] = 0; + if (this->statusEffects[1] != 0) { + reinterpret_cast(this->statusEffects[1])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[1] = 0; } break; case AM_MAKE_BIRD: { - if (this->unknown_037C[0] != 0) { + if (this->statusEffects[0] != 0) { break; } int effectId; @@ -1359,21 +1359,21 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } CMsgEffect* effect = mode->SpawnMsgEffect(effectId, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); effect->SetAnimationSpeed(6.0f); - this->unknown_037C[0] = reinterpret_cast(effect); + this->statusEffects[0] = reinterpret_cast(effect); break; } case AM_DELETE_BIRD: - if (this->unknown_037C[0] != 0) { - reinterpret_cast(this->unknown_037C[0])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - reinterpret_cast(this->unknown_037C[0])->m_visible = false; - this->unknown_037C[0] = 0; + if (this->statusEffects[0] != 0) { + reinterpret_cast(this->statusEffects[0])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + reinterpret_cast(this->statusEffects[0])->m_visible = false; + this->statusEffects[0] = 0; } break; case AM_MAKE_WOLF: { - if (this->unknown_037C[1] != 0) { + if (this->statusEffects[1] != 0) { break; } int effectId; @@ -1396,92 +1396,92 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, return; } CMsgEffect* effect = mode->SpawnMsgEffect(effectId, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[1] = reinterpret_cast(effect); + this->statusEffects[1] = reinterpret_cast(effect); break; } case AM_MAKE_PKEFFECT: { - if (this->unknown_037C[2] != 0) { + if (this->statusEffects[2] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(2, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[2] = reinterpret_cast(effect); + this->statusEffects[2] = reinterpret_cast(effect); break; } case AM_DELETE_PKEFFECT: - if (this->unknown_037C[2] != 0) { - reinterpret_cast(this->unknown_037C[2])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[2] = 0; + if (this->statusEffects[2] != 0) { + reinterpret_cast(this->statusEffects[2])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[2] = 0; } break; case AM_MAKE_ICEEFFECT: { - if (this->unknown_037C[3] != 0) { + if (this->statusEffects[3] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(3, &this->render.position, this->render.accountId, visible); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[3] = reinterpret_cast(effect); + this->statusEffects[3] = reinterpret_cast(effect); break; } case AM_DELETE_ICEEFFECT: case 107: - if (this->unknown_037C[3] != 0) { - reinterpret_cast(this->unknown_037C[3])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[3] = 0; + if (this->statusEffects[3] != 0) { + reinterpret_cast(this->statusEffects[3])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[3] = 0; } break; case AM_MAKE_CURSE_EFFECT: { - if (this->unknown_037C[4] != 0) { + if (this->statusEffects[4] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(6, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[4] = reinterpret_cast(effect); + this->statusEffects[4] = reinterpret_cast(effect); break; } case AM_DELETE_CURSE_EFFECT: - if (this->unknown_037C[4] != 0) { - reinterpret_cast(this->unknown_037C[4])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[4] = 0; + if (this->statusEffects[4] != 0) { + reinterpret_cast(this->statusEffects[4])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[4] = 0; } break; case AM_MAKE_SLEEP_EFFECT: { - if (this->unknown_037C[5] != 0) { + if (this->statusEffects[5] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(7, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[5] = reinterpret_cast(effect); + this->statusEffects[5] = reinterpret_cast(effect); this->SetState(10, 1); break; } case AM_DELETE_SLEEP_EFFECT: - if (this->unknown_037C[5] != 0) { - reinterpret_cast(this->unknown_037C[5])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[5] = 0; - this->SetState(this->render.unknown_0074, 1); + if (this->statusEffects[5] != 0) { + reinterpret_cast(this->statusEffects[5])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[5] = 0; + this->SetState(this->render.previousState, 1); } break; case AM_MAKE_STUN_EFFECT: { - if (this->unknown_037C[6] != 0) { + if (this->statusEffects[6] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(8, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[6] = reinterpret_cast(effect); + this->statusEffects[6] = reinterpret_cast(effect); break; } case AM_DELETE_STUN_EFFECT: - if (this->unknown_037C[6] != 0) { - reinterpret_cast(this->unknown_037C[6])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[6] = 0; + if (this->statusEffects[6] != 0) { + reinterpret_cast(this->statusEffects[6])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[6] = 0; } break; case AM_MAKE_BURNING_EFFECT: @@ -1491,74 +1491,74 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0x316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; case AM_MAKE_SILENCE_EFFECT: { - if (this->unknown_037C[7] != 0) { + if (this->statusEffects[7] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(9, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[7] = reinterpret_cast(effect); + this->statusEffects[7] = reinterpret_cast(effect); break; } case AM_DELETE_SILENCE_EFFECT: - if (this->unknown_037C[7] != 0) { - reinterpret_cast(this->unknown_037C[7])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[7] = 0; + if (this->statusEffects[7] != 0) { + reinterpret_cast(this->statusEffects[7])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[7] = 0; } break; case AM_MAKE_ANGELUS_EFFECT: { - if (this->unknown_037C[8] != 0) { + if (this->statusEffects[8] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(0xA, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[8] = reinterpret_cast(effect); + this->statusEffects[8] = reinterpret_cast(effect); break; } case AM_DELETE_ANGELUS_EFFECT: - if (this->unknown_037C[8] != 0) { - reinterpret_cast(this->unknown_037C[8])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[8] = 0; + if (this->statusEffects[8] != 0) { + reinterpret_cast(this->statusEffects[8])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[8] = 0; } break; case AM_MAKE_CRUCIS_EFFECT: { - if (this->unknown_037C[9] != 0) { + if (this->statusEffects[9] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(0xB, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[9] = reinterpret_cast(effect); + this->statusEffects[9] = reinterpret_cast(effect); break; } case AM_DELETE_CRUCIS_EFFECT: - if (this->unknown_037C[9] != 0) { - reinterpret_cast(this->unknown_037C[9])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[9] = 0; + if (this->statusEffects[9] != 0) { + reinterpret_cast(this->statusEffects[9])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[9] = 0; } break; case AM_MAKE_SMOKE_FFECT: { CMsgEffect* effect = mode->SpawnMsgEffect(5, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } case AM_MAKE_ICEBREAKE_FFECT: { CMsgEffect* effect = mode->SpawnMsgEffect(4, &this->render.position, this->render.accountId, visible); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } case AM_MAKE_CRITICAL_EFFECT: { CMsgEffect* effect = mode->SpawnMsgEffect(0xC, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } case 131: { CMsgEffect* effect = mode->SpawnMsgEffect(0x16, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } @@ -1574,7 +1574,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_0); } g_session.ClearHomunStatus(); - g_session.unknown_5614 = 0; + g_session.homunAlive = 0; } if (g_session.IsMercenaryAid(this->render.accountId)) { if (g_windowMgr.window_03C8 != nullptr) { @@ -1584,49 +1584,49 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_1); } g_session.ResetMercenaryStats(); - g_session.unknown_56B0 = 0; + g_session.mercenaryAlive = 0; break; } - if (this->unknown_02A8.size() != 0 && !IsPlayerJob(this->GetEffectiveJob(-1))) { - this->unknown_02B0 = 1; + if (this->willBeAttackedList.size() != 0 && !IsPlayerJob(this->GetEffectiveJob(-1))) { + this->willBeDead = 1; break; } this->SetState(3, 1); break; case 134: { - if (this->unknown_037C[11] != 0) { + if (this->statusEffects[11] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(0x1F, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[11] = reinterpret_cast(effect); + this->statusEffects[11] = reinterpret_cast(effect); break; } case 135: - if (this->unknown_037C[11] != 0) { - reinterpret_cast(this->unknown_037C[11])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[11] = 0; + if (this->statusEffects[11] != 0) { + reinterpret_cast(this->statusEffects[11])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[11] = 0; } break; case AM_MAKE_LASSITUDE_EFFECT: { - if (this->unknown_037C[12] != 0) { + if (this->statusEffects[12] != 0) { break; } CMsgEffect* effect = mode->SpawnMsgEffect(0x43, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[12] = reinterpret_cast(effect); + this->statusEffects[12] = reinterpret_cast(effect); break; } case AM_DELETE_LASSITUDE_EFFECT: - if (this->unknown_037C[12] != 0) { - reinterpret_cast(this->unknown_037C[12])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_037C[12] = 0; + if (this->statusEffects[12] != 0) { + reinterpret_cast(this->statusEffects[12])->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->statusEffects[12] = 0; } break; case AM_DEAD: - if (this->render.unknown_0070 == 3) { + if (this->render.state == 3) { break; } this->SetState(3, 1); @@ -1651,17 +1651,17 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case 148: { const std::int64_t id = static_cast(a) << 32 | static_cast(message); const ActorDamageMessage* damageMessage = reinterpret_cast(b); - const int hitEffect = damageMessage->unknown_001C; + const int hitEffect = damageMessage->hitEffect; const int skillEffect = damageMessage->effectId; - const int monsterValue = damageMessage->unknown_0024; + const int monsterValue = damageMessage->monsterValue; int damage = damageMessage->damage; const std::uint32_t attackerAid = damageMessage->attackerAid; const float motionSpeed = damageMessage->motionSpeed; - if (damageMessage->unknown_0014 != -1 && damageMessage->unknown_0018 != -1) { - mode->CellCenter(damageMessage->unknown_0014, damageMessage->unknown_0018, this->unknown_02D0, this->unknown_02D4); + if (damageMessage->cellX != -1 && damageMessage->cellY != -1) { + mode->CellCenter(damageMessage->cellX, damageMessage->cellY, this->damageDestX, this->damageDestZ); } else { - this->unknown_02D0 = this->render.position.x; - this->unknown_02D4 = this->render.position.z; + this->damageDestX = this->render.position.x; + this->damageDestZ = this->render.position.z; } int job = this->GetEffectiveJob(-1); @@ -1701,9 +1701,9 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } } else { if (g_session.m_aid == attackerAid) { - this->unknown_02F4 = damage; + this->lastDamage = damage; } else { - this->unknown_02F0 = 0; + this->damageNumberCount = 0; } this->render.started = timeGetTime(); @@ -1742,7 +1742,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case JT_KARNOS: case JT_KARNOS_B: case JT_ALITEA: - if (attacker->unknown_0404 != 0) { + if (attacker->shapeShift != 0) { view = -1; genericWeapon = false; } @@ -1796,7 +1796,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (this->render.angle > 360.0f) { this->render.angle -= 360.0f; } - } else if (!CSkillActionMgr::GetInstance()->OnSkillDamage(damageMessage->unknown_0030, reinterpret_cast(attacker), this, reinterpret_cast(damageMessage->unknown_0034))) { + } else if (!CSkillActionMgr::GetInstance()->OnSkillDamage(damageMessage->skillId, reinterpret_cast(attacker), this, reinterpret_cast(damageMessage->skillTarget))) { if (g_effectMgr->Spawn(this->render.accountId, skillEffect, offset.x, offset.y, offset.z, 0, -1, 0, 0) == nullptr) { CRagEffect* effect = this->LaunchEffect(skillEffect, offset, 0.0f); if (effect != nullptr) { @@ -1832,7 +1832,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, preMessage = 0; if (id == 132) { } else if (id == 111) { - this->SendMsg(nullptr, AM_MAKE_NUMBER, 0, damage, damage >> 31, damageMessage->unknown_002C != 0 ? static_cast(0xFF1E90FF) : -1, 0, 21, 0, 0, 0, 0, 0, 0, 0); + this->SendMsg(nullptr, AM_MAKE_NUMBER, 0, damage, damage >> 31, damageMessage->blueDamage != 0 ? static_cast(0xFF1E90FF) : -1, 0, 21, 0, 0, 0, 0, 0, 0, 0); kind = 22; color = 0xFFFFFF00; } else if (id == 148) { @@ -1852,7 +1852,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, color = 0xFFFF0000; } - if (damageMessage->unknown_002C != 0) { + if (damageMessage->blueDamage != 0) { color = 0xFF1E90FF; } if (preMessage != 0) { @@ -1862,12 +1862,12 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (!negative) { const auto isPlayer = IsPlayerJob(this->GetEffectiveJob(-1)); - if (this->render.unknown_0070 != 3) { + if (this->render.state != 3) { if (isPlayer) { - if (this->render.unknown_0070 != 2 && id != 39 && id != 97) { + if (this->render.state != 2 && id != 39 && id != 97) { this->SetState(4, 1); if (motionSpeed > 1.0f) { - this->render.unknown_0060 = motionSpeed; + this->render.motionFinishThreshold = motionSpeed; } else { this->SetAnimationSpeed(motionSpeed * this->render.speed); } @@ -1876,7 +1876,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (!g_session.IsMonsterActor(this) || !(motionSpeed < -0.00001f)) { this->SetState(4, 1); if (motionSpeed > 1.0f) { - this->render.unknown_0060 = motionSpeed; + this->render.motionFinishThreshold = motionSpeed; } else { this->SetAnimationSpeed(motionSpeed); } @@ -1887,20 +1887,20 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } } - if (this->unknown_02B0 != 0 && this->unknown_02A8.size() <= 1) { + if (this->willBeDead != 0 && this->willBeAttackedList.size() <= 1) { this->SendMsg(nullptr, AM_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; } case 108: this->SetState(2, 1); - this->unknown_0378 = static_cast(this->GetAttackMotion()); + this->attackMotion = static_cast(this->GetAttackMotion()); this->RegisterPos(); - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); this->render.curMotion = 4; this->SetAnimationSpeed(1.0f); this->render.previousAnimation += this->Get8Dir(this->render.angle); - if (this->unknown_02B0 != 0 && this->unknown_02A8.size() <= 1) { + if (this->willBeDead != 0 && this->willBeAttackedList.size() <= 1) { this->SendMsg(nullptr, AM_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; @@ -1910,27 +1910,27 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (damage->action != 0x94) { damage->action = 0x6F; } - damage->unknown_0024 = d; + damage->monsterValue = d; } - this->unknown_02A8.push_back(*damage); + this->willBeAttackedList.push_back(*damage); break; } case AM_WILL_BE_ATTACKED2: { ActorDamageMessage* damage = reinterpret_cast(b); if ((static_cast(e) << 32 | static_cast(d)) != 0) { - damage->unknown_0024 = d; + damage->monsterValue = d; damage->action = 0x81; } - this->unknown_02A8.push_back(*damage); + this->willBeAttackedList.push_back(*damage); break; } case AM_WILL_BE_ATTACKED2DASH: { ActorDamageMessage* damage = reinterpret_cast(b); if ((static_cast(e) << 32 | static_cast(d)) != 0) { - damage->unknown_0024 = d; + damage->monsterValue = d; damage->action = 0x84; } - this->unknown_02A8.push_back(*damage); + this->willBeAttackedList.push_back(*damage); break; } case AM_SKILL: @@ -1945,29 +1945,29 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case AM_ATTR_STATE_CHANGE: { const int* states = reinterpret_cast(b); this->SetStatusStates(states[0], states[1], states[2], true); - this->unknown_02C8 = states[3]; + this->healthState = states[3]; break; } case AM_STANDENTRY: { PcStandEntry* entry = reinterpret_cast(b); - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 9: case 10: case 13: case 14: - this->unknown_02EC = entry->unknown_0074; + this->emblemVersion = entry->pkState; break; } mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + *reinterpret_cast(this->headType) = entry->head; this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); this->SetState(0, 1); this->SetGuildInfo(entry->guildId, entry->guildVersion); @@ -1975,34 +1975,34 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } case AM_INITSTANDENTRY: { PcStandEntry* entry = reinterpret_cast(b); - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 9: case 10: case 13: case 14: - this->unknown_02EC = entry->unknown_0074; + this->emblemVersion = entry->pkState; break; } this->render.accountId = entry->aid; entry->job = MountedJob(entry->job, entry->stateFlags); - this->SetSprAct(entry->job, entry->unknown_0008, 0); + this->SetSprAct(entry->job, entry->sex, 0); mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); - if (this->unknown_0314 == 5) { - const int job = this->unknown_025C; + if (this->objectType == 5) { + const int job = this->job; if ((job >= 0x5248 && job <= 0x5260) || (job >= 0x5817 && job <= 0x588C)) { entry->direction += 4; } } this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; + *reinterpret_cast(this->headType) = entry->head; this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); if (Replay::Instance().state == 6) { switch (entry->state) { @@ -2019,11 +2019,11 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } else { this->SetState(0, 1); } - this->unknown_02C8 = entry->unknown_0044; + this->healthState = entry->healthState; if (entry->job == 0x2D2 || entry->job == 0x508) { this->SetGuildInfo(entry->guildId, entry->guildVersion); } - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); if ((static_cast(e) << 32 | static_cast(d)) == 1) { this->render.color = 0x44FFFFFF; } else if ((static_cast(e) << 32 | static_cast(d)) == 2 && !StateFlag06(entry->stateFlags)) { @@ -2034,24 +2034,24 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case AM_INITMOVEENTRY: case AM_INITMOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 9: case 10: case 13: case 14: - this->unknown_02EC = entry->unknown_0078; + this->emblemVersion = entry->pkState; break; } this->render.accountId = entry->aid; entry->job = MountedJob(entry->job, entry->stateFlags); - *reinterpret_cast(this->unknown_029C) = entry->unknown_002C; - this->SetSprAct(entry->job, entry->unknown_0008, 0); + *reinterpret_cast(this->headType) = entry->head; + this->SetSprAct(entry->job, entry->sex, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->unknown_02C8 = entry->unknown_0048; + this->healthState = entry->healthState; this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + this->SetPropensityInfo(entry->honor, entry->virtue); + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); gameMode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); @@ -2060,10 +2060,10 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.position.y = gameMode->scene->terrain->Height(this->render.position.x, this->render.position.z); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } @@ -2072,107 +2072,107 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case AM_MOVEENTRY: case AM_MOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 9: case 10: case 13: case 14: - this->unknown_02EC = entry->unknown_0078; + this->emblemVersion = entry->pkState; break; } - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; entry->job = MountedJob(entry->job, entry->stateFlags); - *reinterpret_cast(this->unknown_029C) = entry->unknown_002C; - this->SetSprAct(entry->job, entry->unknown_0008, 1); + *reinterpret_cast(this->headType) = entry->head; + this->SetSprAct(entry->job, entry->sex, 1); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->unknown_02C8 = entry->unknown_0048; + this->healthState = entry->healthState; this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } break; } case AM_MOVE: { const int* route = reinterpret_cast(b); this->routeStartTick = route[0]; - if (this->FindRoute(route[1], route[2], route[3], route[4], route[5], route[6], *reinterpret_cast(&this->unknown_0170[4]))) { - this->unknown_0158[5] = route[5]; - *reinterpret_cast(this->unknown_0170) = route[6]; + if (this->FindRoute(route[1], route[2], route[3], route[4], route[5], route[6], *reinterpret_cast(&this->destinationAndSpeed[4]))) { + this->movementState[5] = route[5]; + *reinterpret_cast(this->destinationAndSpeed) = route[6]; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } break; } case AM_DELETE_SHOP_TITLE: - if (this->unknown_0264[2] != 0) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[2])); - this->unknown_0264[2] = 0; + if (this->actorWindows[2] != 0) { + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[2])); + this->actorWindows[2] = 0; } break; case AM_DELETE_CHAT_TITLE: - if (this->unknown_0264[1] != 0) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[1])); - this->unknown_0264[1] = 0; + if (this->actorWindows[1] != 0) { + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[1])); + this->actorWindows[1] = 0; } break; case AM_MAKE_SHOP_TITLE: - if (this->unknown_0264[2] == 0) { + if (this->actorWindows[2] == 0) { UIMerchantShopTitle* title = new UIMerchantShopTitle(0); - this->unknown_0264[2] = reinterpret_cast(title); + this->actorWindows[2] = reinterpret_cast(title); title->SetSize(140, 34); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[2])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[2])); } - reinterpret_cast(this->unknown_0264[2])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.unknown_00FC), 0, 0); - reinterpret_cast(this->unknown_0264[2])->SendMsg(nullptr, UM_SETNAID, this->render.accountId, 0, 0, 0); - reinterpret_cast(this->unknown_0264[2])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); + reinterpret_cast(this->actorWindows[2])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.fontSequenceState), 0, 0); + reinterpret_cast(this->actorWindows[2])->SendMsg(nullptr, UM_SETNAID, this->render.accountId, 0, 0, 0); + reinterpret_cast(this->actorWindows[2])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); if (!g_serviceOptions.Get(0xFA)) { - reinterpret_cast(this->unknown_0264[2])->Show(0); + reinterpret_cast(this->actorWindows[2])->Show(0); } break; case AM_MAKE_CHAT_TITLE: - if (this->unknown_0264[1] == 0) { + if (this->actorWindows[1] == 0) { UIChatRoomTitle* title = new UIChatRoomTitle(); - this->unknown_0264[1] = reinterpret_cast(title); + this->actorWindows[1] = reinterpret_cast(title); title->SetSize(140, 34); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[1])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[1])); } - reinterpret_cast(this->unknown_0264[1])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.unknown_00FC), 0, 0); - reinterpret_cast(this->unknown_0264[1])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); + reinterpret_cast(this->actorWindows[1])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.fontSequenceState), 0, 0); + reinterpret_cast(this->actorWindows[1])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); break; case AM_MAKE_SKILL_RECHARGEGAGE: - if (this->unknown_0264[3] == 0) { + if (this->actorWindows[3] == 0) { // GLOBAL: gl_25466 static float s_gaugeOffsetY = static_cast(g_renderer->viewport.height * 81 / 480); UIRechargeGage* gauge = new UIRechargeGage(); - this->unknown_0264[3] = reinterpret_cast(gauge); + this->actorWindows[3] = reinterpret_cast(gauge); gauge->SetSize(60, 6); - reinterpret_cast(this->unknown_0264[3])->Move( + reinterpret_cast(this->actorWindows[3])->Move( this->render.screenX - 30, - static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.unknown_005C) + static_cast(static_cast(this->render.screenY) - s_gaugeOffsetY * this->render.distanceScale) ); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[3])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[3])); } - this->unknown_0280 = timeGetTime() + b; - this->unknown_0284 = timeGetTime(); + this->skillRechargeEndTick = timeGetTime() + b; + this->skillRechargeStartTick = timeGetTime(); break; case AM_DELETE_SKILL_RECHARGEGAGE: - if (this->unknown_0264[3] != 0) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[3])); - this->unknown_0264[3] = 0; + if (this->actorWindows[3] != 0) { + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[3])); + this->actorWindows[3] = 0; if (this->render.accountId == g_session.m_aid) { - if (g_session.unknown_555C[0x0A] == true) { + if (g_session.playerStatusFlags[0x0A] == true) { std::int16_t packetType = 0x2F1; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packetType), &packetType); } - g_session.unknown_555C[0x0A] = false; + g_session.playerStatusFlags[0x0A] = false; } } break; @@ -2189,28 +2189,28 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, message = text.c_str(); } if (std::strlen(message) != 0) { - this->unknown_0248 = timeGetTime(); - if (this->unknown_0264[0] == 0) { + this->chatTick = timeGetTime(); + if (this->actorWindows[0] == 0) { UITransBalloonText* created = new UITransBalloonText(); - this->unknown_0264[0] = reinterpret_cast(created); + this->actorWindows[0] = reinterpret_cast(created); created->SetSize(8, 8); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[0])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[0])); } - if (this->unknown_0264[0] != 0) { + if (this->actorWindows[0] != 0) { if (this->render.accountId == g_session.m_aid) { - reinterpret_cast(this->unknown_0264[0])->m_fontMode = static_cast(g_session.unknown_0F30[0]); + reinterpret_cast(this->actorWindows[0])->m_fontMode = static_cast(g_session.chatFont[0]); } else { - reinterpret_cast(this->unknown_0264[0])->m_fontMode = static_cast(this->render.unknown_00FC); + reinterpret_cast(this->actorWindows[0])->m_fontMode = static_cast(this->render.fontSequenceState); } - reinterpret_cast(this->unknown_0264[0])->SetText(message, 35); + reinterpret_cast(this->actorWindows[0])->SetText(message, 35); if ((static_cast(e) << 32 | static_cast(d)) != 0) { - reinterpret_cast(this->unknown_0264[0])->m_textColor = d; - reinterpret_cast(this->unknown_0264[0])->m_outlineColor = 0; + reinterpret_cast(this->actorWindows[0])->m_textColor = d; + reinterpret_cast(this->actorWindows[0])->m_outlineColor = 0; } - UIWindow* balloon = reinterpret_cast(this->unknown_0264[0]); + UIWindow* balloon = reinterpret_cast(this->actorWindows[0]); const int width = balloon->geometry.width; - this->unknown_0288 = width; - this->unknown_028C = balloon->geometry.height; + this->chatWidth = width; + this->chatHeight = balloon->geometry.height; balloon->Move(this->render.screenX - width / 2, this->render.screenY - ScaleByScreenHeight(110)); } } @@ -2225,7 +2225,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, mode->WorldSubcell(this->render.position.x, this->render.position.z, column, row, subColumn, subRow); bool found; if (f == 0) { - found = this->FindRoute(column, row, subColumn, subRow, b, d, this->unknown_0184 != 0 ? 55 : 2); + found = this->FindRoute(column, row, subColumn, subRow, b, d, this->isAsuraAttack != 0 ? 55 : 2); } else { found = this->FindRoute(column, row, subColumn, subRow, b, d, f); } @@ -2233,8 +2233,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if ((static_cast(i) << 32 | static_cast(h)) == 0) { lying = true; } - this->unknown_0158[5] = b; - *reinterpret_cast(this->unknown_0170) = d; + this->movementState[5] = b; + *reinterpret_cast(this->destinationAndSpeed) = d; if (found) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); gameMode->CellCenter(b, d, this->render.position.x, this->render.position.z); @@ -2242,57 +2242,57 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, gameMode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->UnRegisterPos(); if (lying == true) { - this->unknown_02D0 = this->render.position.x; - this->unknown_02D4 = this->render.position.z; + this->damageDestX = this->render.position.x; + this->damageDestZ = this->render.position.z; } this->SetState(1, lying); - this->unknown_023C = 0; + this->pathStartCell = 0; if (f == 0) { - this->unknown_0238 = 1; + this->isNeverAnimation = 1; } else { - this->unknown_0238 = 0; + this->isNeverAnimation = 0; this->render.isMotionFreezed = true; } } else { - if (g_session.unknown_5608 != 0) { - g_session.unknown_5600 = 0; - g_session.unknown_5604 = 0; - g_session.unknown_5608 = 0; + if (g_session.moveHomunEnemy != 0) { + g_session.homunEnemyX = 0; + g_session.homunEnemyY = 0; + g_session.moveHomunEnemy = 0; } - if (g_session.unknown_56A4 != 0) { - g_session.unknown_569C = 0; - g_session.unknown_56A0 = 0; - g_session.unknown_56A4 = 0; + if (g_session.moveMercenaryEnemy != 0) { + g_session.mercenaryEnemyX = 0; + g_session.mercenaryEnemyY = 0; + g_session.moveMercenaryEnemy = 0; } this->SetState(0, lying); } break; } case AM_CORRECT_POS: - this->unknown_0158[5] = b; - *reinterpret_cast(this->unknown_0170) = d; + this->movementState[5] = b; + *reinterpret_cast(this->destinationAndSpeed) = d; mode->CellCenter(b, d, this->render.position.x, this->render.position.z); break; case AM_RESURRECTION: - this->render.unknown_0070 = 0; + this->render.state = 0; this->render.isLieOnGround = false; - this->render.unknown_00A4Bytes[1] = 1; - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + this->render.visibilityOptions[1] = 1; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; this->SetState(0, 1); break; case AM_OUTOFSIGHT: this->render.accountId = 0xFFFFFFFF; - this->unknown_02B8 = 0; - this->render.unknown_00A4Bytes[0] = 0; - this->unknown_02DC = static_cast(timeGetTime() + 510); - if (this->unknown_02DC == 0) { - this->unknown_02DC = 1; + this->levelAuraType = 0; + this->render.visibilityOptions[0] = 0; + this->vanishTime = static_cast(timeGetTime() + 510); + if (this->vanishTime == 0) { + this->vanishTime = 1; } break; case AM_MAKE_LEVEL99_EFFECT: { - this->unknown_02B4 = 1; + this->hasLevelAura = 1; const unsigned char showFirst = g_serviceOptions.Get(0x6A); - if (*reinterpret_cast(g_session.unknown_7EE8) == static_cast(this->unknown_02B8)) { + if (*reinterpret_cast(g_session.maxBaseLevel) == static_cast(this->levelAuraType)) { break; } if (StateFlag06(this->stateFlags) || StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags)) { @@ -2310,35 +2310,35 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (this->GetEffectiveJob(-1) == JT_G_TREASURE_BOX) { break; } - this->unknown_02B8 = static_cast(*reinterpret_cast(g_session.unknown_7EE8)); + this->levelAuraType = static_cast(*reinterpret_cast(g_session.maxBaseLevel)); int first = 200; int second = 0x3D0; - if (*reinterpret_cast(&g_session.unknown_7EF0[0x30]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x30]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x30]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x30]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x34]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x34]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x34]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x34]); } if (g_session.IsBabyJob(this->GetEffectiveJob(-1))) { - if (*reinterpret_cast(&g_session.unknown_7EF0[0x38]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x38]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x38]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x38]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x3C]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x3C]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x3C]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x3C]); } } else if (this->GetEffectiveJob(-1) > 0xFA0 || g_session.IsSuperNoviceJob(this->GetEffectiveJob(-1))) { - if (*reinterpret_cast(&g_session.unknown_7EF0[0x40]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x40]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x40]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x40]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x44]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x44]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x44]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x44]); } } else if (g_session.IsMercenaryJob(this->GetEffectiveJob(-1))) { - if (*reinterpret_cast(&g_session.unknown_7EF0[0x48]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x48]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x48]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x48]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x4C]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x4C]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x4C]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x4C]); } } else if (this->GetEffectiveJob(-1) >= 0x666) { break; @@ -2356,43 +2356,43 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } case AM_MAKE_LEVEL160_EFFECT: case 147: { - this->unknown_02B4 = 1; + this->hasLevelAura = 1; const unsigned char showFirst = g_serviceOptions.Get(0x6A); - if (*reinterpret_cast(g_session.unknown_7EE8) == static_cast(this->unknown_02B8)) { + if (*reinterpret_cast(g_session.maxBaseLevel) == static_cast(this->levelAuraType)) { break; } if (StateFlag06(this->stateFlags) || StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags)) { break; } - this->unknown_02B8 = static_cast(*reinterpret_cast(g_session.unknown_7EE8)); + this->levelAuraType = static_cast(*reinterpret_cast(g_session.maxBaseLevel)); int first = 0x3FE; int second; if (g_session.IsMercenaryJob(this->GetEffectiveJob(-1))) { first = 0x3D2; second = 0x3D3; - if (*reinterpret_cast(&g_session.unknown_7EF0[0x64]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x64]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x64]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x64]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x68]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x68]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x68]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x68]); } } else if ((static_cast(a) << 32 | static_cast(message)) == 0x93) { first = 0x3D2; second = 0x3D3; - if (*reinterpret_cast(&g_session.unknown_7EF0[0x54]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x54]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x54]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x54]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x58]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x58]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x58]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x58]); } } else { second = 0x3FF; if ((static_cast(a) << 32 | static_cast(message)) == 0x92) { - if (*reinterpret_cast(&g_session.unknown_7EF0[0x5C]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x5C]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x5C]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x5C]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x60]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x60]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x60]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x60]); } } } @@ -2408,22 +2408,22 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } case 150: { - this->unknown_02B4 = 1; + this->hasLevelAura = 1; const unsigned char showFirst = g_serviceOptions.Get(0x6A); - if (*reinterpret_cast(g_session.unknown_7EE8) == static_cast(this->unknown_02B8)) { + if (*reinterpret_cast(g_session.maxBaseLevel) == static_cast(this->levelAuraType)) { break; } if (StateFlag06(this->stateFlags) || StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags)) { break; } - this->unknown_02B8 = static_cast(*reinterpret_cast(g_session.unknown_7EE8)); + this->levelAuraType = static_cast(*reinterpret_cast(g_session.maxBaseLevel)); int first = 0x4CA; int second = 0x4CB; - if (*reinterpret_cast(&g_session.unknown_7EF0[0x6C]) > 0) { - first = *reinterpret_cast(&g_session.unknown_7EF0[0x6C]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x6C]) > 0) { + first = *reinterpret_cast(&g_session.jobLevelLimits[0x6C]); } - if (*reinterpret_cast(&g_session.unknown_7EF0[0x70]) > 0) { - second = *reinterpret_cast(&g_session.unknown_7EF0[0x70]); + if (*reinterpret_cast(&g_session.jobLevelLimits[0x70]) > 0) { + second = *reinterpret_cast(&g_session.jobLevelLimits[0x70]); } const vector3d offset{0.0f, 0.0f, 0.0f}; if (showFirst != 0) { @@ -2437,15 +2437,15 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } case AM_MAKE_LEVEL4TH_EFFECT: { - this->unknown_02B4 = 1; + this->hasLevelAura = 1; const unsigned char showFirst = g_serviceOptions.Get(0x6A); - if (*reinterpret_cast(g_session.unknown_7EE8) == static_cast(this->unknown_02B8)) { + if (*reinterpret_cast(g_session.maxBaseLevel) == static_cast(this->levelAuraType)) { break; } if (StateFlag06(this->stateFlags) == true || StateFlag01(this->stateFlags) == true || StateFlag02(this->stateFlags) == true) { break; } - this->unknown_02B8 = static_cast(*reinterpret_cast(g_session.unknown_7EE8)); + this->levelAuraType = static_cast(*reinterpret_cast(g_session.maxBaseLevel)); const int first = g_session.m_maxLevelEffect4th; const int second = g_session.m_maxLevelEffect4thSub; const vector3d offset{0.0f, 0.0f, 0.0f}; @@ -2559,7 +2559,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0xA4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; if (player) { - player->unknown_0544 = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + player->skillEffect = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } break; } @@ -2616,8 +2616,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } if (this->render.accountId == g_session.m_gid || IsPlayerJob(this->GetEffectiveJob(-1))) { CPc* pc = static_cast(this); - pc->unknown_0434 = on ? pc->unknown_0434 | 0x10 : pc->unknown_0434 ^ 0x10; - if ((pc->unknown_0434 & 0x10) == 0 && (pc->unknown_0438 & 0x10) == 0) { + pc->virtue = on ? pc->virtue | 0x10 : pc->virtue ^ 0x10; + if ((pc->virtue & 0x10) == 0 && (pc->appearanceFlags & 0x10) == 0) { break; } } else if (!on) { @@ -2802,7 +2802,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } case EFST_TRICKDEAD: if (on) { - this->unknown_017C = 1; + this->isTrickDead = 1; if (this->GetMonsterTransformJob() > 0) { this->SetAction(0x20, 4, 1); } else { @@ -2810,10 +2810,10 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } this->render.isMotionFreezed = true; } else { - this->unknown_017C = 0; - this->render.unknown_0070 = 0; + this->isTrickDead = 0; + this->render.state = 0; this->render.isLieOnGround = false; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->SetState(0, 1); this->render.isMotionFreezed = false; } @@ -2985,7 +2985,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } unsigned char* const argb = reinterpret_cast(&this->render.color); this->render.isMotionFreezed = frozen; - this->render.unknown_00A3 = frozen; + this->render.colorLocked = frozen; argb[2] = shade; argb[1] = shade; argb[0] = shade; @@ -3112,11 +3112,11 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (on) { this->LaunchEffect(0x2E8, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (this->unknown_0300) { + if (this->hpGaugeWindow) { if (on) { - reinterpret_cast(this->unknown_0300)->SetMode(0); + reinterpret_cast(this->hpGaugeWindow)->SetMode(0); } else { - reinterpret_cast(this->unknown_0300)->SetMode(1); + reinterpret_cast(this->hpGaugeWindow)->SetMode(1); } } break; @@ -3247,7 +3247,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } break; case EFST_ALL_RIDING: { - if (this->render.unknown_0070 == 25) { + if (this->render.state == 25) { this->SetState(0, 1); } int job; @@ -3259,7 +3259,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, job = JobNames::BaseJob(this->GetEffectiveJob(-1)); } this->SetActorJob(job); - this->SetBodyPalette(this->render.unknown_0048); + this->SetBodyPalette(this->render.bodyPalette); this->SetSprRobe(0, 1); break; } @@ -3285,7 +3285,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->SetUnknown03B8(f, slot); } else { this->SetUnknown03B8(-1, slot); - if (this->render.unknown_0070 == 3) { + if (this->render.state == 3) { this->SetAction(this->WeaponActionBase(3), 4, 1); } } @@ -3320,9 +3320,9 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if ((static_cast(e) << 32 | static_cast(d)) != 0) { CRagEffect* effect = this->LaunchEffect(0x18A, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (effect) { - effect->state.unknown_11C88[0] = 180; - effect->state.unknown_11C88[1] = 180; - effect->state.unknown_11C88[2] = -1; + effect->state.colorChannels[0] = 180; + effect->state.colorChannels[1] = 180; + effect->state.colorChannels[2] = -1; } } break; @@ -3358,7 +3358,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } break; case EFST_UNKNOWN_NAME: - this->unknown_02F8 = (static_cast(e) << 32 | static_cast(d)) != 0; + this->hasHp = (static_cast(e) << 32 | static_cast(d)) != 0; break; case EFST_HAT_EFFECT: this->SetStackedEffect(0x3F4, (static_cast(e) << 32 | static_cast(d)) > 0); @@ -3377,17 +3377,17 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; case EFST_ON_PUSH_CART: if ((static_cast(e) << 32 | static_cast(d)) != 0) { - if (static_cast(this->unknown_02FC) == (static_cast(g) << 32 | static_cast(f))) { + if (static_cast(this->maxHp) == (static_cast(g) << 32 | static_cast(f))) { break; } - this->unknown_02FC = f; + this->maxHp = f; if (StateFlag01(this->stateFlags) || StateFlag02(this->stateFlags) || StateFlag06(this->stateFlags)) { break; } this->SendMsg(nullptr, AM_DELETE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->SendMsg(nullptr, AM_MAKE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { - this->unknown_02FC = 0; + this->maxHp = 0; this->SendMsg(nullptr, AM_DELETE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; @@ -3407,8 +3407,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } break; case EFST_CLAN_INFO: - this->unknown_0305 = (static_cast(i) << 32 | static_cast(h)) != 0; - this->unknown_0308 = h; + this->hasSp = (static_cast(i) << 32 | static_cast(h)) != 0; + this->spGaugeValue = h; break; case EFST_HANDICAPSTATE_ICEEXPLO: if ((static_cast(e) << 32 | static_cast(d)) != 0) { @@ -3484,7 +3484,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case EFST_C_MARKER: this->SendMsg(this, AM_DELETE_EFFECT, 0, 0x433, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); if (on) { - if (g_session.unknown_5C28.find(static_cast(this->render.accountId)) == g_session.unknown_5C28.end() && g_effectMgr->HasAllocator(0x425)) { + if (g_session.actorEffectStates.find(static_cast(this->render.accountId)) == g_session.actorEffectStates.end() && g_effectMgr->HasAllocator(0x425)) { g_effectMgr->Spawn(this->render.accountId, 0x425, this->render.position.x, this->render.position.y, this->render.position.z, 0, -1, 0, 0); } if (g_effectMgr->HasAllocator(0x433)) { @@ -3587,8 +3587,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, } break; case EFST_DRESS_UP: - g_session.unknown_6184 = g_session.m_aid == this->render.accountId ? f : g_session.unknown_6184; - this->unknown_03DC = f; + g_session.playerAppearanceState = g_session.m_aid == this->render.accountId ? f : g_session.playerAppearanceState; + this->mountedState = f; this->SetSprJob(this->GetEffectiveJob(-1)); this->SetImfFileName(); this->SetHeadPaletteName(); @@ -3635,20 +3635,20 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (on == true) { this->SetState(0x30, 1); this->render.isMotionFreezed = true; - this->render.unknown_0114 = 1; + this->render.specialMotionLocked = 1; } else { - this->render.unknown_0070 = 0; + this->render.state = 0; this->render.isLieOnGround = false; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->SetState(0, 1); this->render.isMotionFreezed = false; - this->render.unknown_0114 = 0; + this->render.specialMotionLocked = 0; } break; case EFST_SU_STOOP: if (on == true) { this->SetState(0x2F, 1); - } else if (this->render.unknown_0114 == 0) { + } else if (this->render.specialMotionLocked == 0) { this->SetState(0, 1); } break; @@ -3677,7 +3677,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; case EFST_SOULATTACK: if (g_session.IsDoramJob(this->GetEffectiveJob(-1))) { - static_cast(this)->unknown_04D8[0] = on; + static_cast(this)->alternateDoramAppearance[0] = on; } break; case EFST_IMMUNE_PROPERTY_NOTHING: @@ -3870,19 +3870,19 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, if ((static_cast(g) << 32 | static_cast(f)) == 2) { target->SetMadogearType(2); if (this->render.accountId == g_session.m_aid) { - g_session.unknown_8074 = 2; + g_session.madogearType = 2; } } else { target->SetMadogearType(1); if (this->render.accountId == g_session.m_aid) { - g_session.unknown_8074 = 1; + g_session.madogearType = 1; } } target->SendMsg(nullptr, AM_MAKE_CHICKEN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { target->SetMadogearType(0); if (this->render.accountId == g_session.m_aid) { - g_session.unknown_8074 = 0; + g_session.madogearType = 0; } target->SendMsg(nullptr, AM_DELETE_CHICKEN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -3946,7 +3946,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0xA4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); CPlayer* const player = static_cast(g_modeMgr.GetGameMode())->scene->player; if (player) { - player->unknown_0544 = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + player->skillEffect = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } } else { if (this->HasId(0x14E) == true) { @@ -4318,8 +4318,8 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } case AM_CHANGE_COLOR: { - this->render.unknown_00A3 = 1; - unsigned char* const saved = reinterpret_cast(&this->render.unknown_0090); + this->render.colorLocked = 1; + unsigned char* const saved = reinterpret_cast(&this->render.savedTintColor); if (saved[0] == 0 && saved[1] == 0 && saved[2] == 0 && saved[3] == 0) { const unsigned char* const argb = reinterpret_cast(&this->render.color); saved[0] = argb[3]; @@ -4327,7 +4327,7 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, saved[2] = argb[1]; saved[3] = argb[0]; } - unsigned char* const target = reinterpret_cast(&this->render.unknown_0094); + unsigned char* const target = reinterpret_cast(&this->render.targetTintColor); target[0] = 0xFF; target[1] = static_cast(b); target[2] = static_cast(d); @@ -4338,30 +4338,30 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, break; } case AM_RETURN_COLOR: - this->render.unknown_0090 = 0; - this->render.unknown_00A3 = 0; + this->render.savedTintColor = 0; + this->render.colorLocked = 0; break; case AM_DELETE_BUYING_SHOP_TITLE: - if (this->unknown_0264[4] == 0) { + if (this->actorWindows[4] == 0) { break; } - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[4])); - this->unknown_0264[4] = 0; + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[4])); + this->actorWindows[4] = 0; break; case AM_MAKE_BUYING_SHOP_TITLE: { - if (this->unknown_0264[4] == 0) { + if (this->actorWindows[4] == 0) { UIMerchantShopTitle* const title = new UIMerchantShopTitle(1); - this->unknown_0264[4] = reinterpret_cast(title); + this->actorWindows[4] = reinterpret_cast(title); title->SetSize(140, 34); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[4])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[4])); } - reinterpret_cast(this->unknown_0264[4])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.unknown_00FC), 0, 0); - reinterpret_cast(this->unknown_0264[4])->SendMsg(nullptr, UM_SETNAID, this->render.accountId, 0, 0, 0); - reinterpret_cast(this->unknown_0264[4])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); + reinterpret_cast(this->actorWindows[4])->SendMsg(nullptr, UM_SETINFO, b, static_cast(this->render.fontSequenceState), 0, 0); + reinterpret_cast(this->actorWindows[4])->SendMsg(nullptr, UM_SETNAID, this->render.accountId, 0, 0, 0); + reinterpret_cast(this->actorWindows[4])->Move(this->render.screenX - 70, this->render.screenY - ScaleByScreenHeight(110)); if (g_serviceOptions.Get(0xFA)) { break; } - reinterpret_cast(this->unknown_0264[4])->Show(0); + reinterpret_cast(this->actorWindows[4])->Show(0); break; } case AM_FALLEN_ANGEL: @@ -4384,55 +4384,55 @@ void CGameActor::SendMsg(CGameObject* sender, int message, int a, int b, int c, case AM_UPDATE_MONSTER_GAGE: if ((static_cast(c) << 32 | static_cast(b)) == -1 || (static_cast(e) << 32 | static_cast(d)) == -1) { - if (this->unknown_0300 == 0) { + if (this->hpGaugeWindow == 0) { break; } - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0300)); - this->unknown_0300 = 0; + g_windowMgr.Schedule(reinterpret_cast(this->hpGaugeWindow)); + this->hpGaugeWindow = 0; break; } - if ((static_cast(g) << 32 | static_cast(f)) == 1 && this->unknown_0300 != 0) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0300)); - this->unknown_0300 = 0; + if ((static_cast(g) << 32 | static_cast(f)) == 1 && this->hpGaugeWindow != 0) { + g_windowMgr.Schedule(reinterpret_cast(this->hpGaugeWindow)); + this->hpGaugeWindow = 0; } - if (this->unknown_0300 == 0) { + if (this->hpGaugeWindow == 0) { UIMonsterGage* const gage = new UIMonsterGage(); - this->unknown_0300 = reinterpret_cast(gage); + this->hpGaugeWindow = reinterpret_cast(gage); gage->SetSize(60, 5); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0300)); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->hpGaugeWindow)); } - reinterpret_cast(this->unknown_0300)->SetValues(b, d); - reinterpret_cast(this->unknown_0300)->Move( - this->render.screenX - reinterpret_cast(this->unknown_0300)->geometry.width / 2, - static_cast(static_cast(ScaleByScreenHeight(12)) * this->render.unknown_005C + static_cast(this->render.screenY)) + reinterpret_cast(this->hpGaugeWindow)->SetValues(b, d); + reinterpret_cast(this->hpGaugeWindow)->Move( + this->render.screenX - reinterpret_cast(this->hpGaugeWindow)->geometry.width / 2, + static_cast(static_cast(ScaleByScreenHeight(12)) * this->render.distanceScale + static_cast(this->render.screenY)) ); break; case AM_MAKE_MISFORTUNE_EFFECT: - if (this->unknown_03D4 == 0) { + if (this->firstFollowerEffect == 0) { CGameObject* effect = mode->SpawnMsgEffect(68, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_03D4 = reinterpret_cast(effect); + this->firstFollowerEffect = reinterpret_cast(effect); } break; case AM_DELETE_MISFORTUNE_EFFECT: - if (this->unknown_03D4 != 0) { - reinterpret_cast(this->unknown_03D4)->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_03D4 = 0; + if (this->firstFollowerEffect != 0) { + reinterpret_cast(this->firstFollowerEffect)->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->firstFollowerEffect = 0; } break; case AM_MAKE_DEEPSILENCE_EFFECT: - if (this->unknown_03D8 == 0) { + if (this->secondFollowerEffect == 0) { CGameObject* effect = mode->SpawnMsgEffect(9, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_03D8 = reinterpret_cast(effect); + this->secondFollowerEffect = reinterpret_cast(effect); } break; case AM_DELETE_DEEPSILENCE_EFFECT: - if (this->unknown_03D8 != 0) { - reinterpret_cast(this->unknown_03D8)->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_03D8 = 0; + if (this->secondFollowerEffect != 0) { + reinterpret_cast(this->secondFollowerEffect)->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->secondFollowerEffect = 0; } break; default: diff --git a/Source/Contents/Actors/GrannyGameActor.h b/Source/Contents/Actors/GrannyGameActor.h index 9400637ca..ebd4446b1 100644 --- a/Source/Contents/Actors/GrannyGameActor.h +++ b/Source/Contents/Actors/GrannyGameActor.h @@ -44,7 +44,7 @@ public: /* 0494 */ RenderVertex* vertices[30]; /* 050C */ granny_system_clock clock; /* 051C */ granny_system_clock lastClock; - /* 052C */ float unknown_052C; + /* 052C */ float motionProgress; /* 0530 */ unsigned char unknown_0530[0x08]; /* 0538 */ float angle; /* 053C */ unsigned char alpha; @@ -53,10 +53,10 @@ public: /* 0544 */ int motion; /* 0548 */ unsigned char unknown_0548[0x04]; /* 054C */ char name[0x104]; - /* 0650 */ int unknown_0650; + /* 0650 */ int renderState; /* 0654 */ int unknown_0654; /* 0658 */ granny_control* controls[20]; - /* 06A8 */ unsigned char unknown_06A8; + /* 06A8 */ unsigned char initializeFacing; /* 06A9 */ unsigned char unknown_06A9[0x03]; /* 06AC */ CTexture* meshTextures[30]; /* 0724 */ std::uint16_t* meshIndices[30]; @@ -64,7 +64,7 @@ public: /* 0814 */ matrix meshTransforms[30]; /* 0DB4 */ unsigned char unknown_0DB4[0x04]; /* 0DB8 */ CTexture* texture; - /* 0DBC */ std::vector unknown_0DBC; + /* 0DBC */ std::vector litPositions; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Actors/GroundScope.cpp b/Source/Contents/Actors/GroundScope.cpp index d13fac4fe..3341f48af 100644 --- a/Source/Contents/Actors/GroundScope.cpp +++ b/Source/Contents/Actors/GroundScope.cpp @@ -192,7 +192,7 @@ void CGroundScope::SendMsg(CGameObject* sender, int message, int a, int b, int c return; case AM_SETMASTERGID: - this->unknown_0158 = b; + this->m_masterGid = b; return; case AM_SETTIME: diff --git a/Source/Contents/Actors/GroundScope.h b/Source/Contents/Actors/GroundScope.h index bab667d7d..b29d5fe0b 100644 --- a/Source/Contents/Actors/GroundScope.h +++ b/Source/Contents/Actors/GroundScope.h @@ -16,7 +16,7 @@ public: int SkillScopeType(int skillId); - /* 0158 */ int unknown_0158; + /* 0158 */ int m_masterGid; /* 015C */ int m_cellX; /* 0160 */ int m_cellY; /* 0164 */ unsigned long m_lastingTime; diff --git a/Source/Contents/Actors/Item.cpp b/Source/Contents/Actors/Item.cpp index 96f7a49d1..0cd645f04 100644 --- a/Source/Contents/Actors/Item.cpp +++ b/Source/Contents/Actors/Item.cpp @@ -37,7 +37,7 @@ struct ItemFallEntry { /* 0034 */ int falling; /* 0038 */ int count; /* 003C */ unsigned char identified; - /* 003E */ std::uint16_t unknown_003E; + /* 003E */ std::uint16_t type; /* 0040 */ unsigned char showEffect; /* 0042 */ std::uint16_t grade; }; @@ -47,7 +47,7 @@ struct ItemFallEntry { void CItem::SetRenderInfo(const float* bounds, float x, float y) { enum { ItemPickJob = 32003 }; - if (this->render.unknown_00A4Bytes[1]) { + if (this->render.visibilityOptions[1]) { // GLOBAL: gl_25149 static const int minimumSize = static_cast(g_renderer->UiScaleX() * 34.0f); ActorPickInfo* info = new ActorPickInfo; @@ -59,7 +59,7 @@ void CItem::SetRenderInfo(const float* bounds, float x, float y) { info->depthOffset = bounds[4] + 300.0f; info->accountId = this->itemAid; info->job = ItemPickJob; - info->unknown_0024 = 0; + info->healthState = 0; info->kind = 1; const int width = static_cast(info->right - info->left); @@ -96,8 +96,8 @@ void CItem::SubD8B5A0() { // OFFSET: 0x00D8B5B0 // FUNCTION: fn_22249 void CItem::SubD8B5B0() { - this->render.unknown_00A4Bytes[0] = 1; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[0] = 1; + this->render.visibilityOptions[1] = 1; this->render.scale = 1.0f; this->render.overrideColor = 0xFFFFFF00; } @@ -105,7 +105,7 @@ void CItem::SubD8B5B0() { // OFFSET: 0x00D8B5D0 // FUNCTION: fn_22250 bool CItem::OnProcess() { - const float elapsed = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + const float elapsed = static_cast((timeGetTime() - this->render.motionStartTime) / 24.0); this->render.isSingleColor = static_cast(elapsed) % 92 >= 90; if (this->isFalling) { @@ -162,15 +162,15 @@ void CItem::SendMsg(CGameObject* sender, int message, int a, int b, int c, int d ITEM_INFO item; this->itemIndex = std::atoi(entry->itemId); - this->unknown_018C = entry->unknown_003E; + this->itemEntryFlags = entry->type; this->itemId = static_cast(std::atoi(entry->itemId)); this->identified = entry->identified; item.itemId = itemName; item.identified = entry->identified; - item.unknown_0060 = 0; + item.refiningLevel = 0; this->name = static_cast(FormatOwnedString(LookupMessage(MSI_EA2), item.DisplayName(0).c_str(), entry->count)); this->GetActRes(); - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); if (entry->showEffect == 1) { const float x = this->render.position.x; diff --git a/Source/Contents/Actors/Item.h b/Source/Contents/Actors/Item.h index f5ced6027..0004434ad 100644 --- a/Source/Contents/Actors/Item.h +++ b/Source/Contents/Actors/Item.h @@ -25,7 +25,7 @@ public: /* 0180 */ std::uint32_t isFalling; /* 0184 */ float fallVelocity; /* 0188 */ float fallOrigin; - /* 018C */ std::uint16_t unknown_018C; + /* 018C */ std::uint16_t itemEntryFlags; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Actors/MercenaryAI.cpp b/Source/Contents/Actors/MercenaryAI.cpp index ad963c0f8..599da32c1 100644 --- a/Source/Contents/Actors/MercenaryAI.cpp +++ b/Source/Contents/Actors/MercenaryAI.cpp @@ -53,12 +53,12 @@ static_assert(sizeof(ActionRequestPacket) == 11); // INLINED bool IsHomunAid(std::uint32_t aid) { - return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&g_session.unknown_5570[8]); + return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&g_session.spAndHomunculusStats[8]); } // INLINED bool IsMercenaryAid(std::uint32_t aid) { - return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&g_session.unknown_5620[8]); + return aid != 0xFFFFFFFF && aid == *reinterpret_cast(&g_session.companionTargetState[8]); } // INLINED @@ -102,7 +102,7 @@ int ClampTargetAttackRange(std::uint32_t aid, int distance) { CGameActor* actor = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(aid)); if (actor) { CGameActor* target = static_cast( - static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(*reinterpret_cast(&actor->unknown_0318[5])) + static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(*reinterpret_cast(&actor->homunMsg[5])) ); if (target) { return distance < target->GetPkState() ? target->GetPkState() : distance; @@ -158,7 +158,7 @@ int CMercenaryAI::Process(std::uint32_t aid) { char message[1024]; CGameActor* actor = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(aid)); - if (actor->render.unknown_0070 == 2 || actor->render.unknown_0070 == 7) { + if (actor->render.state == 2 || actor->render.state == 7) { if (!actor->render.isMotionFinished) { return 0; } @@ -273,7 +273,7 @@ int AiHomunAttack(lua_State* state) { if (!g_session.IsHomunAid(aid)) { return 0; } - if (*reinterpret_cast(&g_session.unknown_5620[8]) != 0 && g_session.IsMercenaryAid(target)) { + if (*reinterpret_cast(&g_session.companionTargetState[8]) != 0 && g_session.IsMercenaryAid(target)) { return 0; } @@ -289,7 +289,7 @@ int AiHomunAttack(lua_State* state) { // GLOBAL: gl_24908 static std::uint32_t lastAttackTime; - if (*reinterpret_cast(&g_session.unknown_5570[0x48]) + lastAttackTime < timeGetTime()) { + if (*reinterpret_cast(&g_session.spAndHomunculusStats[0x48]) + lastAttackTime < timeGetTime()) { ActionRequestPacket packet; packet.opcode = ID_CZ_REQUEST_ACTNPC; packet.aid = aid; @@ -310,7 +310,7 @@ int AiMercenaryAttack(lua_State* state) { if (!g_session.IsMercenaryAid(aid)) { return 0; } - if (*reinterpret_cast(&g_session.unknown_5570[8]) != 0 && g_session.IsHomunAid(target)) { + if (*reinterpret_cast(&g_session.spAndHomunculusStats[8]) != 0 && g_session.IsHomunAid(target)) { return 0; } @@ -408,7 +408,7 @@ int AiHomunGetV(lua_State* state) { skillLevel = static_cast(lua_tonumber(state, 4)); } - std::uint32_t homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); + std::uint32_t homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); if (actor->render.accountId != g_session.m_aid && !g_session.IsCompanionAid(actor->render.accountId)) { CGameActor* targetActor = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(homunAid)); if (targetActor) { @@ -454,12 +454,12 @@ int AiHomunGetV(lua_State* state) { if (!actor) { result = -1.0; } else { - result = static_cast(actor->render.unknown_0070); + result = static_cast(actor->render.state); } break; case V_ATTACKRANGE: { - int range = *reinterpret_cast(&g_session.unknown_5620[4]); + int range = *reinterpret_cast(&g_session.companionTargetState[4]); if (!actor || range == 0) { result = -1.0; } else { @@ -483,12 +483,12 @@ int AiHomunGetV(lua_State* state) { if (!skill.available) { result = 1.0; } else { - int range = skill.unknown_001C; + int range = skill.range; if (property == 14) { int level = static_cast(lua_tonumber(state, 4)); range = static_cast(g_modeMgr.GetGameMode())->GetSkillAttackRange(skillId, level); } - std::uint32_t homunAid = *reinterpret_cast(&g_session.unknown_5570[8]); + std::uint32_t homunAid = *reinterpret_cast(&g_session.spAndHomunculusStats[8]); result = static_cast(ClampTargetAttackRange(homunAid, range)); } lua_pushnumber(state, result); @@ -505,7 +505,7 @@ int AiHomunGetV(lua_State* state) { case V_HP: if (aid == g_session.m_aid) { - result = static_cast(g_session.unknown_5568); + result = static_cast(g_session.hp); } else if (!g_session.IsHomunAid(aid)) { result = -1.0; } else { @@ -515,7 +515,7 @@ int AiHomunGetV(lua_State* state) { case V_SP: if (aid == g_session.m_aid) { - result = static_cast(*reinterpret_cast(&g_session.unknown_5570[0])); + result = static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[0])); } else if (!g_session.IsHomunAid(aid)) { result = -1.0; } else { @@ -525,21 +525,21 @@ int AiHomunGetV(lua_State* state) { case V_MAXHP: if (aid == g_session.m_aid) { - result = static_cast(g_session.unknown_556C); + result = static_cast(g_session.maxHp); } else if (!g_session.IsHomunAid(aid)) { result = -1.0; } else { - result = static_cast(*reinterpret_cast(&g_session.unknown_55C8[0])); + result = static_cast(*reinterpret_cast(&g_session.homunMaxHp[0])); } break; case V_MAXSP: if (aid == g_session.m_aid) { - result = static_cast(*reinterpret_cast(&g_session.unknown_5570[4])); + result = static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[4])); } else if (!g_session.IsHomunAid(aid)) { result = -1.0; } else { - result = static_cast(g_session.unknown_55D0); + result = static_cast(g_session.homunMaxSp); } break; @@ -592,7 +592,7 @@ int AiMercenaryGetV(lua_State* state) { skillLevel = static_cast(lua_tonumber(state, 4)); } - std::uint32_t mercAid = *reinterpret_cast(&g_session.unknown_5620[8]); + std::uint32_t mercAid = *reinterpret_cast(&g_session.companionTargetState[8]); if (actor->render.accountId != g_session.m_aid && !g_session.IsCompanionAid(actor->render.accountId)) { CGameActor* targetActor = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(mercAid)); if (targetActor) { @@ -604,7 +604,7 @@ int AiMercenaryGetV(lua_State* state) { range = static_cast(g_modeMgr.GetGameMode())->GetSkillAttackRange(skillId, skillLevel); } - int clamped = ClampTargetAttackRange(*reinterpret_cast(&g_session.unknown_5570[8]), range); + int clamped = ClampTargetAttackRange(*reinterpret_cast(&g_session.spAndHomunculusStats[8]), range); if (clamped > 0) { const float dx = static_cast(targetX - cellX); const float dy = static_cast(cellY - targetY); @@ -639,12 +639,12 @@ int AiMercenaryGetV(lua_State* state) { if (!actor) { result = -1.0; } else { - result = static_cast(actor->render.unknown_0070); + result = static_cast(actor->render.state); } break; case V_ATTACKRANGE: { - int range = *reinterpret_cast(&g_session.unknown_5690[0]); + int range = *reinterpret_cast(&g_session.mercenaryAttackRange[0]); if (!actor || range == 0) { result = -1.0; } else { @@ -654,7 +654,7 @@ int AiMercenaryGetV(lua_State* state) { } case V_TARGET: - if (!actor || actor->render.unknown_0070 == 3) { + if (!actor || actor->render.state == 3) { result = -1.0; } else { result = static_cast(actor->hitTargetAid); @@ -668,12 +668,12 @@ int AiMercenaryGetV(lua_State* state) { if (!skill.available) { result = 1.0; } else { - int range = skill.unknown_001C; + int range = skill.range; if (property == 14) { int level = static_cast(lua_tonumber(state, 4)); range = static_cast(g_modeMgr.GetGameMode())->GetSkillAttackRange(skillId, level); } - std::uint32_t mercAid = *reinterpret_cast(&g_session.unknown_5620[8]); + std::uint32_t mercAid = *reinterpret_cast(&g_session.companionTargetState[8]); result = static_cast(ClampTargetAttackRange(mercAid, range)); } lua_pushnumber(state, result); @@ -682,7 +682,7 @@ int AiMercenaryGetV(lua_State* state) { case V_HP: if (aid == g_session.m_aid) { - result = static_cast(g_session.unknown_5568); + result = static_cast(g_session.hp); } else if (!g_session.IsMercenaryAid(aid)) { result = -1.0; } else { @@ -692,7 +692,7 @@ int AiMercenaryGetV(lua_State* state) { case V_SP: if (aid == g_session.m_aid) { - result = static_cast(*reinterpret_cast(&g_session.unknown_5570[0])); + result = static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[0])); } else if (!g_session.IsMercenaryAid(aid)) { result = -1.0; } else { @@ -702,7 +702,7 @@ int AiMercenaryGetV(lua_State* state) { case V_MAXHP: if (aid == g_session.m_aid) { - result = static_cast(g_session.unknown_556C); + result = static_cast(g_session.maxHp); } else if (!g_session.IsMercenaryAid(aid)) { result = -1.0; } else { @@ -712,7 +712,7 @@ int AiMercenaryGetV(lua_State* state) { case V_MAXSP: if (aid == g_session.m_aid) { - result = static_cast(*reinterpret_cast(&g_session.unknown_5570[4])); + result = static_cast(*reinterpret_cast(&g_session.spAndHomunculusStats[4])); } else if (!g_session.IsMercenaryAid(aid)) { result = -1.0; } else { @@ -964,8 +964,8 @@ int AiIsMonster(lua_State* state) { double result = 0.0; if (actor) { int job = actor->GetEffectiveJob(-1); - if (((job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978) && actor->unknown_0314 != 7) { - switch (actor->unknown_0314) { + if (((job > 1000 && job < 3999) || static_cast(job - 20021) <= 11978) && actor->objectType != 7) { + switch (actor->objectType) { case 9: case 10: case 13: @@ -983,9 +983,9 @@ int AiIsMonster(lua_State* state) { } else if (g_session.IsPlayerJobId(job)) { CWorld* world = mode->scene; bool ally; - if (world->unknown_0048 || world->unknown_0054) { + if (world->isPKZone || world->isEventPVPMode) { ally = g_session.IsPartyMember(actor->render.accountId, true); - } else if (world->unknown_004C) { + } else if (world->isSiegeMode) { ally = g_session.IsLocalPlayerAid(actor->GetGdid()) != 0; } else { ally = true; @@ -1090,7 +1090,7 @@ int AiSkillGround(lua_State* state) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); CGameActor* actor = static_cast(mode->scene->GetGameActorByAID(aid)); - if (actor->render.unknown_0070 == 1 || actor->render.unknown_0070 == 0 || actor->render.unknown_0070 == 4) { + if (actor->render.state == 1 || actor->render.state == 0 || actor->render.state == 4) { mode->SendMsg(MM_USE_SKILL_TOGROUND, reinterpret_cast(skillArgs), 0, 0, 0); } mode->SendMsg(MM_SETLOCKONMOUSE, 0, 0, 0, 0); @@ -1132,7 +1132,7 @@ int AiSkillObject(lua_State* state) { } CGameActor* actor = static_cast(mode->scene->GetGameActorByAID(aid)); - if (targetActor && (actor->render.unknown_0070 == 1 || actor->render.unknown_0070 == 0 || actor->render.unknown_0070 == 4)) { + if (targetActor && (actor->render.state == 1 || actor->render.state == 0 || actor->render.state == 4)) { mode->SendMsg(MM_USE_SKILL, skillId, target, level, 0); } mode->SendMsg(MM_SETLOCKONMOUSE, 0, 0, 0, 0); diff --git a/Source/Contents/Actors/MousePointer.cpp b/Source/Contents/Actors/MousePointer.cpp index 4ab46818a..a9865296a 100644 --- a/Source/Contents/Actors/MousePointer.cpp +++ b/Source/Contents/Actors/MousePointer.cpp @@ -11,7 +11,7 @@ // OFFSET: 0x00CAFD30 // FUNCTION: fn_21088 bool CMousePointer::OnProcess() { - const float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); this->render.previousAnimation = this->render.animation; this->render.curMotion = static_cast(frame / this->render.speed) % static_cast(this->render.action->FrameCount(this->render.animation)); if (this->m_remainingFrames != 0) { @@ -51,9 +51,9 @@ void CMousePointer::SendMsg(CGameObject*, int message, int a, int b, int c, int // FUNCTION: fn_20990 CMousePointer::CMousePointer() { this->m_remainingFrames = 0; - this->render.unknown_00A2 = 1; + this->render.flatDepth = 1; this->render.visible = 0; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); if (this->render.sprite) { this->render.sprite->Unlock(); diff --git a/Source/Contents/Actors/Npc.h b/Source/Contents/Actors/Npc.h index c9d5ad275..f589b6e2c 100644 --- a/Source/Contents/Actors/Npc.h +++ b/Source/Contents/Actors/Npc.h @@ -34,14 +34,14 @@ public: /* 0414 */ float boundsTop; /* 0418 */ float boundsRight; /* 041C */ float boundsBottom; - /* 0420 */ int unknown_0420; - /* 0424 */ std::uint32_t unknown_0424; - /* 0428 */ int unknown_0428; - /* 042C */ UIWindow* unknown_042C; - /* 0430 */ UIWindow* unknown_0430; - /* 0434 */ CGameObject* unknown_0434; + /* 0420 */ int npcState; + /* 0424 */ std::uint32_t effectTick; + /* 0428 */ int appearanceInitialized; + /* 042C */ UIWindow* playerGaugeWindow; + /* 0430 */ UIWindow* pcGaugeWindow; + /* 0434 */ CGameObject* attachedEffect; union { - /* 0438 */ int unknown_0438; + /* 0438 */ int attachedEffectId; /* 0438 */ std::int16_t minimapMarkerCell[2]; }; /* 043C */ int unknown_043C; @@ -57,7 +57,7 @@ public: void Render(int argument) override; void SetSprJob(int value) override; - /* 0440 */ CGameObject* unknown_0440; + /* 0440 */ CGameObject* characterRender; }; class CHalluNPC : public CNpc { @@ -70,12 +70,12 @@ public: ) override; void Render(int argument) override; - /* 0440 */ float unknown_0440; - /* 0444 */ int unknown_0444; + /* 0440 */ float hallucinationOffset; + /* 0444 */ int fadeStep; /* 0448 */ int unknown_0448; /* 044C */ int unknown_044C; /* 0450 */ int unknown_0450; - /* 0454 */ int unknown_0454; + /* 0454 */ int processCount; }; class CHalluPlant : public CNpc { @@ -88,7 +88,7 @@ public: ) override; void Render(int argument) override; - /* 0440 */ std::uint32_t unknown_0440; + /* 0440 */ std::uint32_t processCount; /* 0444 */ int unknown_0444; }; @@ -97,14 +97,14 @@ static_assert(sizeof(CNpc) == 0x440); static_assert(sizeof(CCharacterNpc) == 0x448); static_assert(sizeof(CHalluNPC) == 0x458); static_assert(sizeof(CHalluPlant) == 0x448); -static_assert(offsetof(CNpc, unknown_042C) == 0x42C); -static_assert(offsetof(CNpc, unknown_0424) == 0x424); -static_assert(offsetof(CNpc, unknown_0434) == 0x434); -static_assert(offsetof(CNpc, unknown_0438) == 0x438); -static_assert(offsetof(CCharacterNpc, unknown_0440) == 0x440); -static_assert(offsetof(CHalluNPC, unknown_0444) == 0x444); -static_assert(offsetof(CHalluNPC, unknown_0454) == 0x454); -static_assert(offsetof(CHalluPlant, unknown_0440) == 0x440); +static_assert(offsetof(CNpc, playerGaugeWindow) == 0x42C); +static_assert(offsetof(CNpc, effectTick) == 0x424); +static_assert(offsetof(CNpc, attachedEffect) == 0x434); +static_assert(offsetof(CNpc, attachedEffectId) == 0x438); +static_assert(offsetof(CCharacterNpc, characterRender) == 0x440); +static_assert(offsetof(CHalluNPC, fadeStep) == 0x444); +static_assert(offsetof(CHalluNPC, processCount) == 0x454); +static_assert(offsetof(CHalluPlant, processCount) == 0x440); #endif #endif diff --git a/Source/Contents/Actors/Pc.h b/Source/Contents/Actors/Pc.h index 4eff66882..7c9671739 100644 --- a/Source/Contents/Actors/Pc.h +++ b/Source/Contents/Actors/Pc.h @@ -109,54 +109,54 @@ public: /* 0410 */ unsigned char unknown_0410[4]; /* 0414 */ CMsgEffect* msgEffect; - /* 0418 */ std::string unknown_0418; - /* 0430 */ int unknown_0430; - /* 0434 */ int unknown_0434; - /* 0438 */ int unknown_0438; - /* 043C */ int unknown_043C; - /* 0440 */ int unknown_0440; - /* 0444 */ int unknown_0444; + /* 0418 */ std::string imfName; + /* 0430 */ int honor; + /* 0434 */ int virtue; + /* 0438 */ int appearanceFlags; + /* 043C */ int headDir; + /* 0440 */ int head; + /* 0444 */ int headPalette; /* 0448 */ int weapon; - /* 044C */ int unknown_044C; - /* 0450 */ int unknown_0450; - /* 0454 */ int unknown_0454; - /* 0458 */ int unknown_0458; - /* 045C */ int unknown_045C; - /* 0460 */ int unknown_0460[1]; + /* 044C */ int secondaryWeapon; + /* 0450 */ int accessory; + /* 0454 */ int accessory2; + /* 0458 */ int accessory3; + /* 045C */ int shield; + /* 0460 */ int shoe[1]; /* 0464 */ int footprintCounter; /* 0468 */ vector3d footprintPosition; - /* 0474 */ int unknown_0474; - /* 0478 */ std::string unknown_0478; - /* 0490 */ UIWindow* unknown_0490; - /* 0494 */ int unknown_0494; - /* 0498 */ int unknown_0498; - /* 049C */ int unknown_049C; + /* 0474 */ int renderWithoutLayer; + /* 0478 */ std::string headPaletteName; + /* 0490 */ UIWindow* gaugeWindow; + /* 0494 */ int pkRank; + /* 0498 */ int pkTotal; + /* 049C */ int robe; /* 04A0 */ int blend; - /* 04A4 */ int unknown_04A4; - /* 04A8 */ int unknown_04A8; + /* 04A4 */ int layerCellX; + /* 04A8 */ int layerCellY; /* 04AC */ std::map> unknown_04AC; /* 04B4 */ std::vector equipSprites; /* 04C0 */ std::vector equipActions; - /* 04CC */ int unknown_04CC; - /* 04D0 */ int unknown_04D0; - /* 04D4 */ int unknown_04D4; - /* 04D8 */ unsigned char unknown_04D8[1]; - /* 04D9 */ bool unknown_04D9; + /* 04CC */ int pkState; + /* 04D0 */ int bodyStyle; + /* 04D4 */ int appearanceJob; + /* 04D8 */ unsigned char alternateDoramAppearance[1]; + /* 04D9 */ bool isHelmRobe; /* 04DA */ unsigned char unknown_04DA[2]; - /* 04DC */ int unknown_04DC; - /* 04E0 */ bool unknown_04E0; + /* 04DC */ int madogearType; + /* 04E0 */ bool arrowEffectSuppressed; /* 04E1 */ unsigned char unknown_04E1[0x03]; - /* 04E4 */ float unknown_04E4; - /* 04E8 */ float unknown_04E8; - /* 04EC */ float unknown_04EC; - /* 04F0 */ float unknown_04F0; - /* 04F4 */ int unknown_04F4; - /* 04F8 */ float unknown_04F8; - /* 04FC */ int unknown_04FC; - /* 0500 */ int unknown_0500; - /* 0504 */ std::uint32_t unknown_0504; - /* 0508 */ int unknown_0508; - union { /* 050C */ int unknown_050C; CPc* blurSource; }; + /* 04E4 */ float extentLeft; + /* 04E8 */ float extentTop; + /* 04EC */ float extentRight; + /* 04F0 */ float extentBottom; + /* 04F4 */ int outlineColor; + /* 04F8 */ float destCellX; + /* 04FC */ int destCellZ; + /* 0500 */ int attackReqTime; + /* 0504 */ std::uint32_t preMoveStartTick; + /* 0508 */ int proceedType; + union { /* 050C */ int preMoveOn; CPc* blurSource; }; }; class CBlurPC : public CPc { @@ -180,7 +180,7 @@ public: ) override; void Render(int argument) override; - /* 0510 */ CPc* unknown_0510; + /* 0510 */ CPc* sourcePc; /* 0514 */ int unknown_0514; }; @@ -194,7 +194,7 @@ public: ) override; void Render(int argument) override; - /* 0510 */ CPc* unknown_0510; + /* 0510 */ CPc* sourcePc; /* 0514 */ int unknown_0514; }; @@ -220,26 +220,26 @@ public: void Initialize(); void SetState(int state, int resetPosition) override; - /* 0510 */ int unknown_0510; - /* 0514 */ int unknown_0514; - /* 0518 */ int unknown_0518; - /* 051C */ int unknown_051C; - /* 0520 */ int unknown_0520; - /* 0524 */ std::uint32_t unknown_0524; - /* 0528 */ std::uint32_t unknown_0528; - /* 052C */ int unknown_052C; - /* 0530 */ int unknown_0530; - /* 0534 */ int unknown_0534; - /* 0538 */ int unknown_0538; - /* 053C */ int unknown_053C; - /* 0540 */ int unknown_0540; - /* 0544 */ CRagEffect* unknown_0544; + /* 0510 */ int attackMode; + /* 0514 */ int isAttackRequest; + /* 0518 */ int isPreengageStateOfMove; + /* 051C */ int proceedTargetGid; + /* 0520 */ int totalAttackReqCnt; + /* 0524 */ std::uint32_t tickOfMoveForAttack; + /* 0528 */ std::uint32_t standTick; + /* 052C */ int skillId; + /* 0530 */ int skillUseLevel; + /* 0534 */ int gSkillDx; + /* 0538 */ int gSkillDy; + /* 053C */ int preengageXOfMove; + /* 0540 */ int preengageYOfMove; + /* 0544 */ CRagEffect* skillEffect; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CPlayer) == 0x548); -static_assert(offsetof(CPlayer, unknown_051C) == 0x51C); -static_assert(offsetof(CPlayer, unknown_0544) == 0x544); +static_assert(offsetof(CPlayer, proceedTargetGid) == 0x51C); +static_assert(offsetof(CPlayer, skillEffect) == 0x544); #endif extern bool g_refreshWindow289; @@ -288,24 +288,24 @@ public: void RenderCached(const matrix& view, int layer, C3dGrannyModelRes* model); void RenderShadow(int argument, vector3d lightDirection, bool cached); - /* 0410 */ std::string unknown_0410; - /* 0428 */ int unknown_0428; - /* 042C */ int unknown_042C; - /* 0430 */ int unknown_0430; - /* 0434 */ int unknown_0434; - /* 0438 */ int unknown_0438; + /* 0410 */ std::string imfName; + /* 0428 */ int honor; + /* 042C */ int virtue; + /* 0430 */ int headDir; + /* 0434 */ int head; + /* 0438 */ int headPalette; /* 043C */ unsigned char unknown_043C[4]; - /* 0440 */ int unknown_0440; - /* 0444 */ int unknown_0444; - /* 0448 */ int unknown_0448; - /* 044C */ int unknown_044C; - /* 0450 */ int unknown_0450; - /* 0454 */ int unknown_0454; + /* 0440 */ int weapon; + /* 0444 */ int secondaryWeapon; + /* 0448 */ int accessory; + /* 044C */ int accessory2; + /* 0450 */ int accessory3; + /* 0454 */ int shield; /* 0458 */ unsigned char unknown_0458[8]; - /* 0460 */ std::string unknown_0460; - /* 0478 */ UIWindow* unknown_0478; - /* 047C */ int unknown_047C; - /* 0480 */ int unknown_0480; + /* 0460 */ std::string headPaletteName; + /* 0478 */ UIWindow* gaugeWindow; + /* 047C */ int pkRank; + /* 0480 */ int pkTotal; /* 0484 */ C3dGrannyModelRes* model; /* 0488 */ C3dGrannyModelRes* layerModels[10]; /* 04B0 */ granny_model_instance* instance; @@ -315,9 +315,9 @@ public: /* 0A54 */ RenderVertex* layerVertices[10][30]; /* 0F04 */ granny_system_clock clock; /* 0F14 */ granny_system_clock lastClock; - /* 0F24 */ float unknown_0F24; - /* 0F28 */ int unknown_0F28; - /* 0F2C */ int unknown_0F2C; + /* 0F24 */ float animationTime; + /* 0F28 */ int directionalAnimation; + /* 0F2C */ int baseAnimation; /* 0F30 */ float angle; /* 0F34 */ unsigned char alpha; /* 0F35 */ unsigned char unknown_0F35[0x03]; @@ -327,7 +327,7 @@ public: /* 0F44 */ char modelName[0x104]; /* 1048 */ unsigned char unknown_1048[8]; /* 1050 */ granny_control* controls[20]; - /* 10A0 */ unsigned char unknown_10A0; + /* 10A0 */ unsigned char snapFacing; /* 10A1 */ unsigned char unknown_10A1[3]; /* 10A4 */ int renderFrame; /* 10A8 */ CTexture* meshTextures[10][30]; @@ -335,26 +335,26 @@ public: /* 1A08 */ int meshTriangleCounts[10][30]; /* 1EB8 */ matrix meshTransforms[30]; /* 2458 */ unsigned char unknown_2458[0xF8]; - /* 2550 */ granny_world_pose* unknown_2550; - /* 2554 */ CTexture* unknown_2554; - /* 2558 */ std::vector unknown_2558; + /* 2550 */ granny_world_pose* worldPose; + /* 2554 */ CTexture* shadowTexture; + /* 2558 */ std::vector attachmentPositions; /* 2564 */ int attachLayer; /* 2568 */ int unknown_2568; /* 256C */ matrix attachTransform; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(CPc, unknown_0430) == 0x430); -static_assert(offsetof(CPc, unknown_0444) == 0x444); -static_assert(offsetof(CPc, unknown_0458) == 0x458); -static_assert(offsetof(CGrannyPc, unknown_0428) == 0x428); -static_assert(offsetof(CGrannyPc, unknown_0440) == 0x440); -static_assert(offsetof(CGrannyPc, unknown_0460) == 0x460); +static_assert(offsetof(CPc, honor) == 0x430); +static_assert(offsetof(CPc, headPalette) == 0x444); +static_assert(offsetof(CPc, accessory3) == 0x458); +static_assert(offsetof(CGrannyPc, honor) == 0x428); +static_assert(offsetof(CGrannyPc, weapon) == 0x440); +static_assert(offsetof(CGrannyPc, headPaletteName) == 0x460); static_assert(offsetof(CGrannyPc, model) == 0x484); static_assert(offsetof(CGrannyPc, instance) == 0x4B0); static_assert(offsetof(CGrannyPc, clock) == 0xF04); static_assert(offsetof(CGrannyPc, lastClock) == 0xF14); -static_assert(offsetof(CGrannyPc, unknown_0F24) == 0xF24); +static_assert(offsetof(CGrannyPc, animationTime) == 0xF24); static_assert(offsetof(CGrannyPc, motion) == 0xF3C); static_assert(offsetof(CGrannyPc, controls) == 0x1050); static_assert(offsetof(CGrannyPc, modelName) == 0xF44); @@ -363,7 +363,7 @@ static_assert(offsetof(CGrannyPc, commands) == 0x4B4); static_assert(offsetof(CGrannyPc, layerCommands) == 0x52C); static_assert(offsetof(CGrannyPc, vertices) == 0x9DC); static_assert(offsetof(CGrannyPc, layerVertices) == 0xA54); -static_assert(offsetof(CGrannyPc, unknown_2550) == 0x2550); +static_assert(offsetof(CGrannyPc, worldPose) == 0x2550); static_assert(offsetof(CGrannyPc, angle) == 0xF30); static_assert(offsetof(CGrannyPc, brightness) == 0xF38); static_assert(offsetof(CGrannyPc, meshTextures) == 0x10A8); @@ -376,19 +376,19 @@ static_assert(sizeof(CBlurPC) == 0x510); static_assert(sizeof(CHalluPC) == 0x518); static_assert(sizeof(CHalluPC2) == 0x518); static_assert(offsetof(CPc, msgEffect) == 0x414); -static_assert(offsetof(CPc, unknown_0418) == 0x418); -static_assert(offsetof(CPc, unknown_04E4) == 0x4E4); -static_assert(offsetof(CPc, unknown_04F0) == 0x4F0); -static_assert(offsetof(CPc, unknown_04F8) == 0x4F8); -static_assert(offsetof(CPc, unknown_04FC) == 0x4FC); -static_assert(offsetof(CPc, unknown_050C) == 0x50C); -static_assert(offsetof(CHalluPC, unknown_0510) == 0x510); -static_assert(offsetof(CHalluPC2, unknown_0510) == 0x510); +static_assert(offsetof(CPc, imfName) == 0x418); +static_assert(offsetof(CPc, extentLeft) == 0x4E4); +static_assert(offsetof(CPc, extentBottom) == 0x4F0); +static_assert(offsetof(CPc, destCellX) == 0x4F8); +static_assert(offsetof(CPc, destCellZ) == 0x4FC); +static_assert(offsetof(CPc, preMoveOn) == 0x50C); +static_assert(offsetof(CHalluPC, sourcePc) == 0x510); +static_assert(offsetof(CHalluPC2, sourcePc) == 0x510); static_assert(offsetof(CPc, weapon) == 0x448); -static_assert(offsetof(CPc, unknown_044C) == 0x44C); -static_assert(offsetof(CPc, unknown_04CC) == 0x4CC); -static_assert(offsetof(CPc, unknown_04DC) == 0x4DC); -static_assert(offsetof(CPc, unknown_04E0) == 0x4E0); +static_assert(offsetof(CPc, secondaryWeapon) == 0x44C); +static_assert(offsetof(CPc, pkState) == 0x4CC); +static_assert(offsetof(CPc, madogearType) == 0x4DC); +static_assert(offsetof(CPc, arrowEffectSuppressed) == 0x4E0); #endif extern unsigned char g_statusRefreshSuppressed; diff --git a/Source/Contents/Actors/Player.cpp b/Source/Contents/Actors/Player.cpp index e7e306346..c5a422586 100644 --- a/Source/Contents/Actors/Player.cpp +++ b/Source/Contents/Actors/Player.cpp @@ -85,40 +85,40 @@ static std::uint32_t g_groundShadowPixels[35 * 35]; // OFFSET: 0x00DA7700 // FUNCTION: fn_22558 CPc::CPc() : footprintPosition() { - this->unknown_04F4 = 0; + this->outlineColor = 0; this->equipSprites.resize(9, nullptr); this->equipActions.resize(9, nullptr); - this->unknown_0490 = nullptr; - this->unknown_0444 = 0; - this->unknown_045C = 0; - this->unknown_0430 = 0; - this->unknown_0434 = 0; + this->gaugeWindow = nullptr; + this->headPalette = 0; + this->shield = 0; + this->honor = 0; + this->virtue = 0; this->guildId = 0; - this->unknown_043C = 0; - this->unknown_0460[0] = 0; - this->unknown_0474 = 0; - this->unknown_0494 = 0; - this->unknown_0498 = 0; - this->render.unknown_00A8 = 1; - this->unknown_049C = -1; + this->headDir = 0; + this->shoe[0] = 0; + this->renderWithoutLayer = 0; + this->pkRank = 0; + this->pkTotal = 0; + this->render.isCharacter = 1; + this->robe = -1; this->blend = -1; - this->unknown_04A4 = -1; - this->unknown_04A8 = -1; + this->layerCellX = -1; + this->layerCellY = -1; this->msgEffect = nullptr; - this->unknown_04CC = 0; - this->unknown_04D0 = 0; - this->unknown_04D4 = 0; - this->unknown_04D8[0] = 0; - this->unknown_04D9 = false; - this->unknown_0438 = 0; - this->unknown_04DC = 0; - this->unknown_04E0 = false; - this->unknown_04E4 = 0.0f; - this->unknown_04E8 = 0.0f; - this->unknown_04EC = 0.0f; - this->unknown_04F0 = 0.0f; + this->pkState = 0; + this->bodyStyle = 0; + this->appearanceJob = 0; + this->alternateDoramAppearance[0] = 0; + this->isHelmRobe = false; + this->appearanceFlags = 0; + this->madogearType = 0; + this->arrowEffectSuppressed = false; + this->extentLeft = 0.0f; + this->extentTop = 0.0f; + this->extentRight = 0.0f; + this->extentBottom = 0.0f; this->weapon = 0; - this->unknown_044C = 0; + this->secondaryWeapon = 0; } // OFFSET: 0x00DA7BA0 @@ -132,9 +132,9 @@ CPc::~CPc() { this->equipActions[i]->Unlock(); } } - if (this->unknown_0490 != nullptr) { - g_windowMgr.Schedule(this->unknown_0490); - this->unknown_0490 = nullptr; + if (this->gaugeWindow != nullptr) { + g_windowMgr.Schedule(this->gaugeWindow); + this->gaugeWindow = nullptr; } } @@ -145,35 +145,35 @@ void CGrannyPc::SetAction(unsigned animation, int, int repeat) { return; } - this->render.unknown_0070 = 0; + this->render.state = 0; switch (animation) { case 0: - this->render.unknown_0070 = 0; + this->render.state = 0; break; case 48: - this->render.unknown_0070 = 4; + this->render.state = 4; break; case 80: case 88: - this->render.unknown_0070 = 2; + this->render.state = 2; break; case 64: - this->render.unknown_0070 = 3; + this->render.state = 3; break; case 8: - this->render.unknown_0070 = 1; + this->render.state = 1; break; case 24: - this->render.unknown_0070 = 5; + this->render.state = 5; break; case 32: - this->render.unknown_0070 = 11; + this->render.state = 11; break; case 40: - this->render.unknown_0070 = 12; + this->render.state = 12; break; case 16: - this->render.unknown_0070 = 6; + this->render.state = 6; break; } this->PlayMotion(repeat); @@ -182,14 +182,14 @@ void CGrannyPc::SetAction(unsigned animation, int, int repeat) { // OFFSET: 0x00DB01F0 // FUNCTION: fn_22611 void CGrannyPc::PlayMotion(int repeat) { - this->motion = this->render.unknown_0070; + this->motion = this->render.state; for (int i = 0; i < 20; ++i) { this->model->FreeControl(this->controls[i]); this->controls[i] = nullptr; } - this->unknown_0F24 = 0; + this->animationTime = 0; - const int loopCount = (repeat == 1 && this->render.unknown_0070 != 6) ? 1 : 0; + const int loopCount = (repeat == 1 && this->render.state != 6) ? 1 : 0; this->controls[this->motion] = this->model->PlayAnimation(this->motion, this->instance, this->controls[this->motion], loopCount); } @@ -221,7 +221,7 @@ void __stdcall fn_22664() { // OFFSET: 0x00DAFFA0 // FUNCTION: fn_22607 void CPc::SetBodyCostume(int first, int second) { - this->unknown_04D0 = first; + this->bodyStyle = first; if (static_cast(second) != 0) { int job; if (this->IsShapeShifted()) { @@ -230,7 +230,7 @@ void CPc::SetBodyCostume(int first, int second) { job = this->GetEffectiveJob(-1); } this->SetSprJob(job); - this->SetSprWeapon2(this->weapon, this->unknown_044C); + this->SetSprWeapon2(this->weapon, this->secondaryWeapon); this->SetBodyPaletteName(); } } @@ -238,33 +238,33 @@ void CPc::SetBodyCostume(int first, int second) { // OFFSET: 0x00DB0000 // FUNCTION: fn_22608 void CPc::SetBodyPalette(int value) { - this->render.unknown_0048 = value; - this->render.unknown_0048 = g_session.GetBodyStyle(this->unknown_025C, this->render.unknown_0048, this->unknown_04D0); + this->render.bodyPalette = value; + this->render.bodyPalette = g_session.GetBodyStyle(this->job, this->render.bodyPalette, this->bodyStyle); this->SetBodyPaletteName(); } // OFFSET: 0x00DB02A0 // FUNCTION: fn_22613 void CGrannyPc::SetHeadPaletteName() { - if (this->unknown_0438 != 0) { - const std::string palName = g_session.GetHeadPalName(this->unknown_0434, this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0438); - this->unknown_0460 = palName; + if (this->headPalette != 0) { + const std::string palName = g_session.GetHeadPalName(this->head, this->GetEffectiveJob(-1), this->sex, this->headPalette); + this->headPaletteName = palName; } } // OFFSET: 0x00DB0350 // FUNCTION: fn_22614 void CPc::SetHeadPaletteName() { - if (this->unknown_0444 != 0) { - const std::string palName = g_session.GetHeadPalName(this->unknown_0440, this->unknown_04D4, this->unknown_0260, this->unknown_0444); - this->unknown_0478 = palName; + if (this->headPalette != 0) { + const std::string palName = g_session.GetHeadPalName(this->head, this->appearanceJob, this->sex, this->headPalette); + this->headPaletteName = palName; } } // OFFSET: 0x00DB0280 // FUNCTION: fn_22612 void CPc::SetHeadPalette(int value) { - this->unknown_0444 = value; + this->headPalette = value; this->SetHeadPaletteName(); } @@ -277,7 +277,7 @@ void CGrannyPc::SetHonor(int value) { } else { this->SendMsg(nullptr, AM_DELETE_PROHIBITEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - this->unknown_0428 = value; + this->honor = value; } // OFFSET: 0x00DB0480 @@ -289,40 +289,40 @@ void CPc::SetHonor(int value) { } else { this->SendMsg(nullptr, AM_DELETE_PROHIBITEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - this->unknown_0430 = value; + this->honor = value; } // OFFSET: 0x00DB0760 // FUNCTION: fn_22621 void CGrannyPc::SetPropensityInfo(int first, int second) { this->SetHonor(first); - this->unknown_042C = second; + this->virtue = second; } // OFFSET: 0x00DB0780 // FUNCTION: fn_22622 void CPc::SetPropensityInfo(int first, int second) { this->SetHonor(first); - this->unknown_0434 = second; + this->virtue = second; } // OFFSET: 0x00DB07C0 // FUNCTION: fn_22625 void CPc::SetRiding(unsigned char value) { - this->unknown_02CC = value; - this->SetSprShield(this->unknown_045C); + this->isRiding = value; + this->SetSprShield(this->shield); } // OFFSET: 0x00DB07E0 // FUNCTION: fn_22626 void CGrannyPc::SetSprAccessory2(int value) { - this->unknown_044C = value; + this->accessory2 = value; } // OFFSET: 0x00DB09D0 // FUNCTION: fn_22628 void CGrannyPc::SetSprAccessory3(int value) { - this->unknown_0450 = value; + this->accessory3 = value; } // OFFSET: 0x00DB2660 @@ -334,19 +334,19 @@ void CGrannyPc::SetSprShield(int) { // OFFSET: 0x00DB0B40 // FUNCTION: fn_22630 void CGrannyPc::SetSprAccessory(int value) { - this->unknown_0448 = value; + this->accessory = value; } // OFFSET: 0x00DB0CB0 // FUNCTION: fn_22632 void CGrannyPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int) { - this->SetSprActFull(first, second, third, fourth, fifth, sixth, seventh, eighth, this->unknown_0454, ninth, tenth); + this->SetSprActFull(first, second, third, fourth, fifth, sixth, seventh, eighth, this->shield, ninth, tenth); } // OFFSET: 0x00DB1960 // FUNCTION: fn_22636 void CPc::RefreshAccessory3() { - if (this->unknown_0458 == 185) { + if (this->accessory3 == 185) { this->SetSprAccessory3(185); } } @@ -354,13 +354,13 @@ void CPc::RefreshAccessory3() { // OFFSET: 0x00DB1980 // FUNCTION: fn_22637 void CGrannyPc::SetSprHead(int value) { - this->unknown_0434 = value; + this->head = value; } // OFFSET: 0x00DB1AC0 // FUNCTION: fn_22639 void CGrannyPc::SetSprJob(int value) { - this->render.unknown_0054 = g_session.GetNpcLocationRadius(value, false); + this->render.shadowScale = g_session.GetNpcLocationRadius(value, false); } // OFFSET: 0x00DB2830 @@ -376,20 +376,20 @@ void CGrannyPc::SetSprWeapon(int weaponLow32, int weaponHigh32) { int high32; }; const WeaponValueParts values = {weaponLow32, weaponHigh32}; - *reinterpret_cast(&this->unknown_0440) = values; + *reinterpret_cast(&this->weapon) = values; } // OFFSET: 0x00DB3C30 // FUNCTION: fn_22650 void CGrannyPc::SetState(int state, int resetPosition) { - const int current = this->render.unknown_0070; - if (current == 3 || this->unknown_017C != 0) { + const int current = this->render.state; + if (current == 3 || this->isTrickDead != 0) { return; } if (current == 4 && static_cast(resetPosition) == 1) { - this->render.position.x = this->unknown_02D0; - this->render.position.z = this->unknown_02D4; + this->render.position.x = this->damageDestX; + this->render.position.z = this->damageDestZ; } using SpawnArrow = void (CGameMode::*)(const vector3d*, std::uint32_t, float, int); @@ -405,23 +405,23 @@ void CGrannyPc::SetState(int state, int resetPosition) { this->RegisterPos(); this->SetAction(0x10, 4, 1); this->render.isMotionFinished = true; - this->render.curMotion = this->unknown_0430; + this->render.curMotion = this->headDir; break; case ST_MOVE: - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } - this->unknown_0430 = 0; + this->headDir = 0; CGameActor::SetState(1, resetPosition); break; case ST_STAND: CGameActor::SetState(0, resetPosition); - this->render.curMotion = this->unknown_0430; - if (current == 4 || current == 2 || this->unknown_02C8 != 0 || current == 8) { + this->render.curMotion = this->headDir; + if (current == 4 || current == 2 || this->healthState != 0 || current == 8) { this->SetAction(0x20, 4, 0); } - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; case ST_SKILL: if (current == 6) { @@ -444,57 +444,57 @@ void CGrannyPc::SetState(int state, int resetPosition) { } else { this->SetAction(0x60, 6, 1); } - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case ST_ATTACK: { - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } const bool weaponAllowed = IsJobWeaponAllowed( - this->GetEffectiveJob(-1), this->unknown_0260, - (static_cast(this->unknown_0444) << 32) | static_cast(this->unknown_0440) + this->GetEffectiveJob(-1), this->sex, + (static_cast(this->secondaryWeapon) << 32) | static_cast(this->weapon) ); CGameActor::SetState(weaponAllowed ? 9 : 2, resetPosition); - this->unknown_0378 = AttackMotionLength(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, weaponAllowed); + this->attackMotion = AttackMotionLength(this->GetEffectiveJob(-1), this->sex, this->weapon, weaponAllowed); bool usesArrow = false; - g_session.m_hotkeyScript->Call("IsItemUsingArrow", "d>b", this->unknown_0440, &usesArrow); + g_session.m_hotkeyScript->Call("IsItemUsingArrow", "d>b", this->weapon, &usesArrow); if (usesArrow == true) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->unknown_0378 * this->render.speed, 0); - this->unknown_0378 = 8.0f / this->render.speed + this->unknown_0378; + (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->attackMotion * this->render.speed, 0); + this->attackMotion = 8.0f / this->render.speed + this->attackMotion; } break; } case ST_ATTACK2: { - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } const bool weaponAllowed = IsJobWeaponAllowed( - this->GetEffectiveJob(-1), this->unknown_0260, - (static_cast(this->unknown_0444) << 32) | static_cast(this->unknown_0440) + this->GetEffectiveJob(-1), this->sex, + (static_cast(this->secondaryWeapon) << 32) | static_cast(this->weapon) ); CGameActor::SetState(weaponAllowed ? 9 : 2, resetPosition); - this->unknown_0378 = AttackMotionLength(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, weaponAllowed); - if ((this->unknown_0440 == 14 && this->unknown_0444 == 0) || (this->unknown_0440 == 13 && this->unknown_0444 == 0)) { + this->attackMotion = AttackMotionLength(this->GetEffectiveJob(-1), this->sex, this->weapon, weaponAllowed); + if ((this->weapon == 14 && this->secondaryWeapon == 0) || (this->weapon == 13 && this->secondaryWeapon == 0)) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->unknown_0378 * this->render.speed, 0); - this->unknown_0378 = 8.0f / this->render.speed + this->unknown_0378; + (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->attackMotion * this->render.speed, 0); + this->attackMotion = 8.0f / this->render.speed + this->attackMotion; } break; } default: CGameActor::SetState(state, resetPosition); - if (this->render.unknown_0070 == 3) { + if (this->render.state == 3) { this->PlayMotion(1); } return; } - this->unknown_0F28 = this->Get8Dir(this->render.angle) + this->unknown_0F2C; - this->render.unknown_0070 = state; - this->render.unknown_008C = timeGetTime(); + this->directionalAnimation = this->Get8Dir(this->render.angle) + this->baseAnimation; + this->render.state = state; + this->render.motionStartTime = timeGetTime(); } // OFFSET: 0x00DBA6C0 @@ -542,11 +542,11 @@ bool CPlayer::IsSpecialState(int state) const { // OFFSET: 0x00DB06C0 // FUNCTION: fn_22619 void CGrannyPc::SetModifyFactorOfmotionSpeed(int value) { - if (this->unknown_0440 != 11 || this->unknown_0444 != 0) { + if (this->weapon != 11 || this->secondaryWeapon != 0) { value = value > g_maxMoveSpeed ? g_maxMoveSpeed : value; } - this->render.unknown_0064 = static_cast(value) / 432.0f; + this->render.motionSpeedScale = static_cast(value) / 432.0f; } @@ -564,7 +564,7 @@ void CPc::SetModifyFactorOfmotionSpeed(int value) { speed = speed > g_maxMoveSpeed ? g_maxMoveSpeed : speed; } - this->render.unknown_0064 = static_cast(speed) / 432.0f; + this->render.motionSpeedScale = static_cast(speed) / 432.0f; } // OFFSET: 0x00DDD190 @@ -576,8 +576,8 @@ __declspec(noinline) std::string GetBodyImfName(int job, int sex, int head, int // OFFSET: 0x00DB0500 // FUNCTION: fn_22617 void CGrannyPc::SetImfFileName() { - this->unknown_0410 = GetBodyImfName( - this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0434, this->GetEffectiveJob(-1) + this->imfName = GetBodyImfName( + this->GetEffectiveJob(-1), this->sex, this->head, this->GetEffectiveJob(-1) ); } @@ -586,11 +586,11 @@ void CGrannyPc::SetImfFileName() { void CPc::SetImfFileName() { int job = this->GetEffectiveJob(-1); - if (job >= 0x10CE && job <= 0x10E9 && this->unknown_02CC != 0) { + if (job >= 0x10CE && job <= 0x10E9 && this->isRiding != 0) { job = g_session.GetRidingJob(job); } - this->unknown_0418 = GetBodyImfName(job, this->unknown_0260, this->unknown_0440, this->unknown_04D0); + this->imfName = GetBodyImfName(job, this->sex, this->head, this->bodyStyle); } // OFFSET: 0x00DAFB60 @@ -604,14 +604,14 @@ void CPc::LoadEquipAction(int slot, const char* name) { if (IsObfuscatedMessage(this->render.accountId)) { switch (slot) { case 0: - if (this->unknown_0260 != 0) { + if (this->sex != 0) { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\남\\운영자2_남.Act"); } else { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\여\\운영자2_여.Act"); } break; case 5: - if (this->unknown_0260 != 0) { + if (this->sex != 0) { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자2_남_검.Act"); } else { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자2_여_검.Act"); @@ -627,14 +627,14 @@ void CPc::LoadEquipAction(int slot, const char* name) { } else { switch (slot) { case 0: - if (this->unknown_0260 != 0) { + if (this->sex != 0) { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\남\\운영자_남.Act"); } else { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\여\\운영자_여.Act"); } break; case 5: - if (this->unknown_0260 != 0) { + if (this->sex != 0) { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자_남_검.Act"); } else { this->equipActions[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자_여_검.Act"); @@ -677,7 +677,7 @@ void CPc::LoadEquipAction(int slot, const char* name) { const int baseJob = JobNames::BaseJob(this->GetEffectiveJob(-1)); const int costumeJob = this->GetBodyCostume(); - const std::string actionName = g_equipmentResourceMgr->GetBodyResourceName(0, baseJob, this->unknown_0260, costumeJob, 0); + const std::string actionName = g_equipmentResourceMgr->GetBodyResourceName(0, baseJob, this->sex, costumeJob, 0); CActRes* action = static_cast(ResourceMgr::Instance().Load(actionName)); if (!action) { return; @@ -685,8 +685,8 @@ void CPc::LoadEquipAction(int slot, const char* name) { const ActionFrame* actionFrame = &action->Frame(0, 0); if (actionFrame && !actionFrame->anchors.empty() && !baseFrame->anchors.empty()) { - this->unknown_04E4 = static_cast(actionFrame->anchors[0].x - baseFrame->anchors[0].x + cell->x); - this->unknown_04E8 = static_cast(actionFrame->anchors[0].y - baseFrame->anchors[0].y + cell->y); + this->extentLeft = static_cast(actionFrame->anchors[0].x - baseFrame->anchors[0].x + cell->x); + this->extentTop = static_cast(actionFrame->anchors[0].y - baseFrame->anchors[0].y + cell->y); } } @@ -709,14 +709,14 @@ void CPc::LoadEquipSprite(int slot, const char* name) { if (IsObfuscatedMessage(this->render.accountId)) { switch (slot) { case 0: - if (this->unknown_0260) { + if (this->sex) { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\남\\운영자2_남.Spr"); } else { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\여\\운영자2_여.Spr"); } break; case 5: - if (this->unknown_0260) { + if (this->sex) { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자2_남_검.Spr"); } else { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자2_여_검.Spr"); @@ -732,14 +732,14 @@ void CPc::LoadEquipSprite(int slot, const char* name) { } else { switch (slot) { case 0: - if (this->unknown_0260) { + if (this->sex) { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\남\\운영자_남.Spr"); } else { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\몸통\\여\\운영자_여.Spr"); } break; case 5: - if (this->unknown_0260) { + if (this->sex) { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자_남_검.Spr"); } else { this->equipSprites[slot] = ResourceMgr::Instance().Load("인간족\\운영자\\운영자_여_검.Spr"); @@ -773,7 +773,7 @@ void CPc::LoadEquipSprites(const std::vector& names) { // OFFSET: 0x00DB23A0 // FUNCTION: fn_22643 void CPc::SetSprRobe(int first, int second) { - if (this->unknown_049C == first) { + if (this->robe == first) { return; } @@ -781,26 +781,26 @@ void CPc::SetSprRobe(int first, int second) { return; } - this->unknown_049C = first; + this->robe = first; - g_session.m_hotkeyScript->CallTable("TB_Layer_Priority", "IsHelmRobe", "d>b", first, &this->unknown_04D9); + g_session.m_hotkeyScript->CallTable("TB_Layer_Priority", "IsHelmRobe", "d>b", first, &this->isHelmRobe); - if (this->unknown_04D9) { - const int accessory = this->unknown_049C; + if (this->isHelmRobe) { + const int accessory = this->robe; this->LoadEquipAction( 8, - g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, accessory).c_str() + g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->sex, this->head, accessory).c_str() ); this->LoadEquipSprite( 8, - g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, accessory).c_str() + g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->sex, this->head, accessory).c_str() ); } else { this->LoadEquipAction( - 8, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, 0).c_str() + 8, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->sex, this->head, 0).c_str() ); this->LoadEquipSprite( - 8, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, 0).c_str() + 8, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->sex, this->head, 0).c_str() ); } } @@ -808,7 +808,7 @@ void CPc::SetSprRobe(int first, int second) { // OFFSET: 0x00DA7F10 // FUNCTION: fn_22563 void CPc::AddMsgEffect(CGameObject* effect) { - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); } // OFFSET: 0x00DA8180 @@ -816,8 +816,8 @@ void CPc::AddMsgEffect(CGameObject* effect) { void CPc::SetSex(int value) { this->SetUnknown0260(value); this->SetSprActFull( - this->unknown_04D4, this->unknown_0260, this->unknown_0440, this->weapon, this->unknown_044C, this->unknown_0450, this->unknown_0454, - this->unknown_0458, this->unknown_045C, this->unknown_0444, this->render.unknown_0048 + this->appearanceJob, this->sex, this->head, this->weapon, this->secondaryWeapon, this->accessory, this->accessory2, + this->accessory3, this->shield, this->headPalette, this->render.bodyPalette ); } @@ -842,8 +842,8 @@ void CPc::RenderBodyOutline(int layer, const float* position, float x, float y, } int motion; - if (this->render.unknown_0070 == 3 || this->unknown_017C != 0) { - this->render.previousAnimation = this->ActionBase(this->render.unknown_0070); + if (this->render.state == 3 || this->isTrickDead != 0) { + this->render.previousAnimation = this->ActionBase(this->render.state); motion = action->FrameCount(this->render.previousAnimation) - 1; this->render.curMotion = motion; } else { @@ -876,7 +876,7 @@ void CPc::RenderBodyOutline(int layer, const float* position, float x, float y, std::uint32_t quadColor; if (this->GetMonsterTransformJob() == JT_THANATOS) { this->PrepareSprite(index, index, distanceScale, *cell, x, y, position, scale, &bottomRhw, &topRhw, image, &quad, box, &quadColor, 0, 0, 0); - if (this->render.unknown_0070 == 0 && index == 1) { + if (this->render.state == 0 && index == 1) { quad.bottomRhw = bottomRhw + 0.000008f; quad.topRhw = topRhw + 0.00008f; } @@ -895,7 +895,7 @@ void CPc::RenderBodyOutline(int layer, const float* position, float x, float y, quad.color = color & 0xFFFFFF | 0x46000000; } - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { bounds.Include(&quad.top); } @@ -913,18 +913,18 @@ bool CPc::IsDrawOnTop() { bool drawOnTop = true; if (g_session.m_newRobeDrawOnTop) { int job = this->GetEffectiveJob(-1); - if (this->unknown_02CC) { + if (this->isRiding) { job = g_session.GetRidingJob(job); } int layer = 1; g_session.m_hotkeyScript->Call( - "_New_DrawOnTop", "ddddd>bd", this->unknown_049C, this->unknown_0260, job, this->render.previousAnimation, this->render.curMotion, + "_New_DrawOnTop", "ddddd>bd", this->robe, this->sex, job, this->render.previousAnimation, this->render.curMotion, &drawOnTop, &layer ); } else { g_session.m_hotkeyScript->Call( - "DrawOnTop", "ddddd>b", this->unknown_049C, this->unknown_0260, this->unknown_025C, this->render.previousAnimation, + "DrawOnTop", "ddddd>b", this->robe, this->sex, this->job, this->render.previousAnimation, this->render.curMotion, &drawOnTop ); } @@ -936,7 +936,7 @@ bool CPc::IsDrawOnTop() { // FUNCTION: fn_22568 const ActionFrame& CPc::SelectStanceFrame(int layer, CActRes* actRes, int* animation, int* frame, bool* replaced) { const ActionFrame& current = actRes->Frame(this->render.previousAnimation, this->render.curMotion); - if (this->unknown_02CC || layer < 1 || layer > 4 || this->render.previousAnimation < 88) { + if (this->isRiding || layer < 1 || layer > 4 || this->render.previousAnimation < 88) { return current; } @@ -959,7 +959,7 @@ const ActionFrame& CPc::SelectStanceFrame(int layer, CActRes* actRes, int* anima } if (this->render.previousAnimation >= 88 && this->render.previousAnimation <= 95 && this->render.curMotion >= 3 && this->render.curMotion <= 5) { - if (this->unknown_0260 == 0) { + if (this->sex == 0) { if (this->render.curMotion != 3) { *replaced = true; if (this->render.previousAnimation <= 89) { @@ -988,7 +988,7 @@ const ActionFrame& CPc::SelectStanceFrame(int layer, CActRes* actRes, int* anima } } } - } else if (this->unknown_0260 == 1) { + } else if (this->sex == 1) { if (this->render.curMotion != 5) { *replaced = true; if (this->render.previousAnimation <= 89) { @@ -1062,11 +1062,11 @@ void CPc::ApplyLayerEffects( } if ((this->render.flags & 4) != 0 && layer == 5) { - if (!this->render.unknown_00ECBytes[1]) { + if (!this->render.effectPhaseBytes[1]) { this->DrawQuad(*quad, palette, layer, 0.0f, 0.0f, 0); - this->render.unknown_00ECBytes[1] = 1; + this->render.effectPhaseBytes[1] = 1; } else { - this->render.unknown_00ECBytes[1] = 0; + this->render.effectPhaseBytes[1] = 0; } } @@ -1076,16 +1076,16 @@ void CPc::ApplyLayerEffects( } const int hoverOffset = hover; - this->render.unknown_0128 = static_cast(hoverOffset); - this->render.unknown_012C = static_cast(hoverOffset >> 31); + this->render.hoverOffsetLow = static_cast(hoverOffset); + this->render.hoverOffsetHigh = static_cast(hoverOffset >> 31); SpriteQuad jitter; if ((this->render.flags & 8) != 0 && layer < 5 && (this->render.flags & 0x30000) == 0) { - if (++this->render.unknown_00ECBytes[2] > 180) { - this->render.unknown_00ECBytes[2] = 0; + if (++this->render.effectPhaseBytes[2] > 180) { + this->render.effectPhaseBytes[2] = 0; } - float wave = g_sinTable[this->render.unknown_00ECBytes[2]] + 3.0f; + float wave = g_sinTable[this->render.effectPhaseBytes[2]] + 3.0f; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); float spread = 400.0f / mode->camera->camera.desiredDistance * wave; jitter.top = static_cast(box[1]) - spread - static_cast(hover); @@ -1106,11 +1106,11 @@ void CPc::ApplyLayerEffects( jitter.bottomRhw = jitterBottomRhw; jitter.topRhw = jitterTopRhw; jitter.color = 0x64FFFFFF; - jitter.angle = static_cast(cell->unknown_001C + static_cast(this->render.unknown_007C)); + jitter.angle = static_cast(cell->rotation + static_cast(this->render.spriteAngle)); jitter.image = image; this->DrawQuad(jitter, palette, 5, 0.0f, 0.0f, 0); - wave = g_sinTable[this->render.unknown_00ECBytes[2]]; + wave = g_sinTable[this->render.effectPhaseBytes[2]]; mode = static_cast(g_modeMgr.GetGameMode()); spread = 400.0f / mode->camera->camera.desiredDistance * (wave + wave + 5.0f); jitter.top = static_cast(box[1]) - spread - static_cast(hover); @@ -1129,7 +1129,7 @@ void CPc::ApplyLayerEffects( jitter.bottomRhw = jitterBottomRhw; jitter.topRhw = jitterTopRhw; jitter.color = 0x78FFFFFF; - jitter.angle = static_cast(cell->unknown_001C + static_cast(this->render.unknown_007C)); + jitter.angle = static_cast(cell->rotation + static_cast(this->render.spriteAngle)); jitter.image = image; this->DrawQuad(jitter, palette, 5, 0.0f, 0.0f, 0); } @@ -1137,15 +1137,15 @@ void CPc::ApplyLayerEffects( if ((this->render.flags & 0x80800) != 0 && (this->render.flags & 0x20000) == 0) { const float scale = this->render.scale; for (int step = 1, depth = 3; depth < 7; ++step, depth += 3) { - const unsigned char alpha = this->render.unknown_00F2; + const unsigned char alpha = this->render.outlineAlpha; const float distanceScale = g_renderer->ScaleDistance(distance); const float factor = GetSkillFactor(this->GetEffectiveJob(-1)) * distanceScale * (static_cast(step) * 0.01f + 1.0f); const float shift = - g_renderer->UiScaleX() * (static_cast(static_cast(this->render.unknown_0078)) * this->render.scale) * factor; + g_renderer->UiScaleX() * (static_cast(static_cast(this->render.spriteOffsetX)) * this->render.scale) * factor; const int boxTop = box[1]; const float top = static_cast(static_cast(cell->y + offsetY) * factor * cell->scaleY * scale + screenY); const float bottom = static_cast( - static_cast((static_cast(image->unknown_0006) + 1) * image->height + cell->y + offsetY) * factor * cell->scaleY * + static_cast((static_cast(image->doubleHeight) + 1) * image->height + cell->y + offsetY) * factor * cell->scaleY * scale + screenY + 1.0 ); @@ -1153,7 +1153,7 @@ void CPc::ApplyLayerEffects( double left; double right; if ((cell->mirrored & 1) != 0) { - left = static_cast((static_cast(image->unknown_0004) + 1) * image->width + cell->x + offsetX) * factor * cell->scaleX; + left = static_cast((static_cast(image->doubleWidth) + 1) * image->width + cell->x + offsetX) * factor * cell->scaleX; right = static_cast(offsetX + cell->x) * factor * cell->scaleX; if (boxTop >= g_renderer->viewport.height || boxTop <= 0 || box[2] >= g_renderer->viewport.width || box[0] <= 0) { continue; @@ -1163,7 +1163,7 @@ void CPc::ApplyLayerEffects( continue; } left = static_cast(cell->x + offsetX) * factor * cell->scaleX; - right = static_cast((static_cast(image->unknown_0004) + 1) * image->width + cell->x + offsetX) * factor * cell->scaleX; + right = static_cast((static_cast(image->doubleWidth) + 1) * image->width + cell->x + offsetX) * factor * cell->scaleX; } jitter.image = image; @@ -1178,7 +1178,7 @@ void CPc::ApplyLayerEffects( } else if ((this->render.flags & 0x80000) != 0) { jitter.color = (alpha << 24) + 0x56405; } - jitter.angle = static_cast(cell->unknown_001C + static_cast(this->render.unknown_007C)); + jitter.angle = static_cast(cell->rotation + static_cast(this->render.spriteAngle)); this->DrawQuad(jitter, palette, 5, 0.0f, 0.0f, 0); } } @@ -1191,7 +1191,7 @@ void CPc::ApplyLayerEffects( this->ApplySpriteJitter(quad, box, shiftX, 11, 5); if ((this->render.flags & 0x10000) != 0) { - const short level = this->render.unknown_00F4; + const short level = this->render.effectPhase; const short alpha = static_cast(255 - level * 20); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const float rise = 400.0f / mode->camera->camera.desiredDistance * static_cast(level * 20); @@ -1201,9 +1201,9 @@ void CPc::ApplyLayerEffects( } if ((this->render.flags & 0x20000) != 0) { - const unsigned char phase = this->render.unknown_00F6; + const unsigned char phase = this->render.tintPhase; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - short alpha = static_cast((this->render.unknown_00F6 - 10) * 17); + short alpha = static_cast((this->render.tintPhase - 10) * 17); if (alpha > 255) { alpha = 255; } @@ -1235,16 +1235,16 @@ void CPc::ApplyLayerEffects( // FUNCTION: fn_22647 void CPc::SetSprWeapon2(int first, int second) { this->weapon = first; - this->unknown_044C = second; + this->secondaryWeapon = second; int job = this->GetEffectiveJob(-1); if (this->IsCostumeOutfit()) { - job = this->unknown_04D4; + job = this->appearanceJob; } const int viewJob = job > 3950 ? job - 3950 : job; - if (this->unknown_02CC) { + if (this->isRiding) { return; } @@ -1267,12 +1267,12 @@ void CPc::SetSprWeapon2(int first, int second) { case JT_SKY_EMPEROR: case JT_SKY_EMPEROR2: { if ((this->GetEffectiveJob(-1) == JT_TAEKWON || this->GetEffectiveJob(-1) == JT_TAEKWON_B) && - this->GetEffectiveJob(-1) != this->unknown_04D0) { + this->GetEffectiveJob(-1) != this->bodyStyle) { return; } - const std::string actName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, 0, -1, 1, this->unknown_04D0); - const std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, 0, -1, 1, this->unknown_04D0); + const std::string actName = g_session.GetWeaponEffectActName(viewJob, this->sex, 0, -1, 1, this->bodyStyle); + const std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, 0, -1, 1, this->bodyStyle); this->LoadEquipAction(6, actName.c_str()); this->LoadEquipSprite(6, sprName.c_str()); return; @@ -1281,8 +1281,8 @@ void CPc::SetSprWeapon2(int first, int second) { case JT_WOLF_RANGER_H: case JT_WOLF_RANGER_B: case JT_WOLF_WINDHAWK: { - const std::string actName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); - const std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); + const std::string actName = g_session.GetWeaponEffectActName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); + const std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); this->LoadEquipAction(6, actName.c_str()); this->LoadEquipSprite(6, sprName.c_str()); return; @@ -1290,8 +1290,8 @@ void CPc::SetSprWeapon2(int first, int second) { case JT_MADOGEAR: case JT_MADOGEAR_H: case JT_MADOGEAR_B: { - std::string actName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); - std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); + std::string actName = g_session.GetWeaponEffectActName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); + std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); if (this->GetMadogearType() == 2) { std::size_t pos = actName.rfind("마도기어_"); if (pos != std::string::npos) { @@ -1307,8 +1307,8 @@ void CPc::SetSprWeapon2(int first, int second) { return; } case JT_MEISTER_MADOGEAR: { - std::string actName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); - std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, 0, -1, 0, this->unknown_04D0); + std::string actName = g_session.GetWeaponEffectActName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); + std::string sprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, 0, -1, 0, this->bodyStyle); if (this->GetMadogearType() == 2) { std::size_t pos = actName.rfind("MEISTER_MADOGEAR1"); if (pos != std::string::npos) { @@ -1326,7 +1326,7 @@ void CPc::SetSprWeapon2(int first, int second) { } const int weaponItem = this->weapon; - const int shieldItem = this->unknown_044C; + const int shieldItem = this->secondaryWeapon; if (weaponItem == 0 && shieldItem == 0) { return; } @@ -1347,8 +1347,8 @@ void CPc::SetSprWeapon2(int first, int second) { break; } - const std::string actName = g_session.GetWeaponActName(viewJob, this->unknown_0260, weaponType, -1, this->unknown_04D0); - const std::string sprName = g_session.GetWeaponSprName(viewJob, this->unknown_0260, weaponType, -1, this->unknown_04D0); + const std::string actName = g_session.GetWeaponActName(viewJob, this->sex, weaponType, -1, this->bodyStyle); + const std::string sprName = g_session.GetWeaponSprName(viewJob, this->sex, weaponType, -1, this->bodyStyle); this->LoadEquipAction(5, actName.c_str()); this->LoadEquipSprite(5, sprName.c_str()); @@ -1370,9 +1370,9 @@ void CPc::SetSprWeapon2(int first, int second) { case W_DOUBLE_DA: case W_DOUBLE_SA: { const std::string effectActName = - g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, weaponType, -1, 0, this->unknown_04D0); + g_session.GetWeaponEffectActName(viewJob, this->sex, weaponType, -1, 0, this->bodyStyle); const std::string effectSprName = - g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, weaponType, -1, 0, this->unknown_04D0); + g_session.GetWeaponEffectSprName(viewJob, this->sex, weaponType, -1, 0, this->bodyStyle); this->LoadEquipAction(6, effectActName.c_str()); this->LoadEquipSprite(6, effectSprName.c_str()); break; @@ -1382,10 +1382,10 @@ void CPc::SetSprWeapon2(int first, int second) { } int viewType = GetWeaponViewValue(this->weapon); - const std::string actName = g_session.GetWeaponActName(viewJob, this->unknown_0260, viewType, weaponItem, this->unknown_04D0); + const std::string actName = g_session.GetWeaponActName(viewJob, this->sex, viewType, weaponItem, this->bodyStyle); if (ResourceMgr::Instance().Exists(actName.c_str())) { this->LoadEquipAction(5, actName.c_str()); - const std::string sprName = g_session.GetWeaponSprName(viewJob, this->unknown_0260, viewType, weaponItem, this->unknown_04D0); + const std::string sprName = g_session.GetWeaponSprName(viewJob, this->sex, viewType, weaponItem, this->bodyStyle); this->LoadEquipSprite(5, sprName.c_str()); viewType = this->MapMotion(viewType); } else { @@ -1411,19 +1411,19 @@ void CPc::SetSprWeapon2(int first, int second) { } viewType = this->MapMotion(viewType); - const std::string fallbackActName = g_session.GetWeaponActName(viewJob, this->unknown_0260, viewType, -1, this->unknown_04D0); + const std::string fallbackActName = g_session.GetWeaponActName(viewJob, this->sex, viewType, -1, this->bodyStyle); if (ResourceMgr::Instance().Exists(fallbackActName.c_str())) { this->LoadEquipAction(5, fallbackActName.c_str()); - const std::string fallbackSprName = g_session.GetWeaponSprName(viewJob, this->unknown_0260, viewType, -1, this->unknown_04D0); + const std::string fallbackSprName = g_session.GetWeaponSprName(viewJob, this->sex, viewType, -1, this->bodyStyle); this->LoadEquipSprite(5, fallbackSprName.c_str()); } } - std::string effectActName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, viewType, weaponItem, 0, this->unknown_04D0); - std::string effectSprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, viewType, weaponItem, 0, this->unknown_04D0); + std::string effectActName = g_session.GetWeaponEffectActName(viewJob, this->sex, viewType, weaponItem, 0, this->bodyStyle); + std::string effectSprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, viewType, weaponItem, 0, this->bodyStyle); if (!ResourceMgr::Instance().Exists(effectActName.c_str())) { - effectActName = g_session.GetWeaponEffectActName(viewJob, this->unknown_0260, viewType, -1, 0, this->unknown_04D0); - effectSprName = g_session.GetWeaponEffectSprName(viewJob, this->unknown_0260, viewType, -1, 0, this->unknown_04D0); + effectActName = g_session.GetWeaponEffectActName(viewJob, this->sex, viewType, -1, 0, this->bodyStyle); + effectSprName = g_session.GetWeaponEffectSprName(viewJob, this->sex, viewType, -1, 0, this->bodyStyle); if (!ResourceMgr::Instance().Exists(effectActName.c_str())) { return; } @@ -1437,7 +1437,7 @@ void CPc::SetSprWeapon2(int first, int second) { // FUNCTION: fn_22649 void CPc::SetSprWeapon(int first, int second) { this->weapon = first; - this->unknown_044C = second; + this->secondaryWeapon = second; if (!g_session.IsJobWeaponTypeAllowed(this->GetEffectiveJob(-1), *reinterpret_cast(&first))) { this->LoadEquipAction(5, ""); @@ -1447,8 +1447,8 @@ void CPc::SetSprWeapon(int first, int second) { return; } - const std::string actName = g_session.GetWeaponActName(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, -1, this->unknown_04D0); - const std::string sprName = g_session.GetWeaponSprName(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, -1, this->unknown_04D0); + const std::string actName = g_session.GetWeaponActName(this->GetEffectiveJob(-1), this->sex, this->weapon, -1, this->bodyStyle); + const std::string sprName = g_session.GetWeaponSprName(this->GetEffectiveJob(-1), this->sex, this->weapon, -1, this->bodyStyle); this->LoadEquipAction(5, actName.c_str()); this->LoadEquipSprite(5, sprName.c_str()); @@ -1470,9 +1470,9 @@ void CPc::SetSprWeapon(int first, int second) { case W_DOUBLE_DA: case W_DOUBLE_SA: { const std::string effectActName = - g_session.GetWeaponEffectActName(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, -1, 0, this->unknown_04D0); + g_session.GetWeaponEffectActName(this->GetEffectiveJob(-1), this->sex, this->weapon, -1, 0, this->bodyStyle); const std::string effectSprName = - g_session.GetWeaponEffectSprName(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, -1, 0, this->unknown_04D0); + g_session.GetWeaponEffectSprName(this->GetEffectiveJob(-1), this->sex, this->weapon, -1, 0, this->bodyStyle); this->LoadEquipAction(6, effectActName.c_str()); this->LoadEquipSprite(6, effectSprName.c_str()); break; @@ -1492,10 +1492,10 @@ void CPlayer::RegisterPos() { // OFFSET: 0x00DB07F0 // FUNCTION: fn_22627 void CPc::SetSprAccessory2(int value) { - this->unknown_0454 = value; - this->LoadEquipAction(3, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, value).c_str()); + this->accessory2 = value; + this->LoadEquipAction(3, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->sex, this->head, value).c_str()); this->LoadEquipSprite( - 3, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, this->unknown_0454).c_str() + 3, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->sex, this->head, this->accessory2).c_str() ); if (this->HasId(678)) { @@ -1508,29 +1508,29 @@ void CPc::SetSprAccessory2(int value) { // OFFSET: 0x00DB09E0 // FUNCTION: fn_22629 void CPc::SetSprAccessory3(int value) { - this->unknown_0458 = value; - this->LoadEquipAction(4, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, value).c_str()); + this->accessory3 = value; + this->LoadEquipAction(4, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->sex, this->head, value).c_str()); this->LoadEquipSprite( - 4, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, this->unknown_0458).c_str() + 4, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->sex, this->head, this->accessory3).c_str() ); } // OFFSET: 0x00DB0B50 // FUNCTION: fn_22631 void CPc::SetSprAccessory(int value) { - this->unknown_0450 = value; - this->LoadEquipAction(2, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, value).c_str()); + this->accessory = value; + this->LoadEquipAction(2, g_session.GetAccessoryActName(this->GetEffectiveJob(-1), this->sex, this->head, value).c_str()); this->LoadEquipSprite( - 2, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->unknown_0260, this->unknown_0440, this->unknown_0450).c_str() + 2, g_session.GetAccessorySprName(this->GetEffectiveJob(-1), this->sex, this->head, this->accessory).c_str() ); } // OFFSET: 0x00DB1990 // FUNCTION: fn_22638 void CPc::SetSprHead(int value) { - this->unknown_0440 = value; - this->LoadEquipAction(1, g_session.GetHeadActName(this->unknown_04D4, this->unknown_0260, &this->unknown_0440).c_str()); - this->LoadEquipSprite(1, g_session.GetHeadSprName(this->unknown_04D4, this->unknown_0260, &this->unknown_0440).c_str()); + this->head = value; + this->LoadEquipAction(1, g_session.GetHeadActName(this->appearanceJob, this->sex, &this->head).c_str()); + this->LoadEquipSprite(1, g_session.GetHeadSprName(this->appearanceJob, this->sex, &this->head).c_str()); } // OFFSET: 0x00DB4C70 @@ -1617,7 +1617,7 @@ __declspec(noinline) void CGrannyPc::ReleaseMeshes() { } } - this->unknown_2550 = 0; + this->worldPose = 0; } // OFFSET: 0x00DAA3F0 @@ -1765,14 +1765,14 @@ CRes* CPc::GetEquipSprite(int slot) const { // OFFSET: 0x00DAB160 // FUNCTION: fn_22580 std::int64_t CGrannyPc::GetWeapon() { - return *reinterpret_cast(&this->unknown_0440); + return *reinterpret_cast(&this->weapon); } // OFFSET: 0x00DAB250 // FUNCTION: fn_22582 bool CPc::IsCostumeOutfit() const { return StateFlag12(this->stateFlags) || StateFlag16(this->stateFlags) || StateFlag18(this->stateFlags) || - StateFlag27(this->stateFlags) || StateFlag28(this->stateFlags) || this->unknown_03DC == 1; + StateFlag27(this->stateFlags) || StateFlag28(this->stateFlags) || this->mountedState == 1; } // OFFSET: 0x00DAB460 @@ -1850,12 +1850,12 @@ void CGrannyPc::UpdateAnimation(C3dGrannyModelRes* model) { } this->clock = GrannyGetSystemSeconds(); - this->unknown_0F24 += GrannyGetSecondsElapsed(&this->lastClock, &this->clock) * 2.0f; + this->animationTime += GrannyGetSecondsElapsed(&this->lastClock, &this->clock) * 2.0f; this->lastClock = this->clock; if (model != this->model) { model->PlayAnimation(this->motion, GrannyInstantiateModel(model->model), nullptr, 0); - model->Animate(this->unknown_0F24, GrannyInstantiateModel(model->model)); + model->Animate(this->animationTime, GrannyInstantiateModel(model->model)); return; } @@ -1864,13 +1864,13 @@ void CGrannyPc::UpdateAnimation(C3dGrannyModelRes* model) { this->controls[this->motion] = model->PlayAnimation(this->motion, GrannyInstantiateModel(model->model), this->controls[this->motion], 0); } - model->Animate(this->unknown_0F24 * g_depthAverageHalf, this->instance); + model->Animate(this->animationTime * g_depthAverageHalf, this->instance); } // OFFSET: 0x00DAC030 // FUNCTION: fn_22591 void CGrannyPc::ProcessMotion() { - if (this->render.unknown_0070 == 2) { + if (this->render.state == 2) { this->render.isMotionFinished = GrannyGetControlDurationLeft(this->controls[2]) < 0.1f; } else { this->render.isMotionFinished = true; @@ -2004,8 +2004,8 @@ void CPc::DrawBody(int, int layer, const float* position, float x, float y, floa CActRes* action = static_cast(this->GetEquipAction(0)); int motion; - if (this->render.unknown_0070 == 3 || this->unknown_017C != 0) { - this->render.previousAnimation = this->ActionBase(this->render.unknown_0070); + if (this->render.state == 3 || this->isTrickDead != 0) { + this->render.previousAnimation = this->ActionBase(this->render.state); motion = action->FrameCount(this->render.previousAnimation) - 1; this->render.curMotion = motion; } else { @@ -2031,7 +2031,7 @@ void CPc::DrawBody(int, int layer, const float* position, float x, float y, floa std::uint32_t color; if (this->GetMonsterTransformJob() == JT_THANATOS) { this->PrepareSprite(index, index, distanceScale, *cell, x, y, position, scale, &bottomRhw, &topRhw, image, &quad, box, &color, 0, 0, 0); - if (this->render.unknown_0070 == 0 && index == 1) { + if (this->render.state == 0 && index == 1) { quad.bottomRhw = bottomRhw + 0.000008f; quad.topRhw = topRhw + 0.00008f; } @@ -2049,13 +2049,13 @@ void CPc::DrawBody(int, int layer, const float* position, float x, float y, floa } quad.image = image; - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { bounds.Include(&quad.top); } int blend = this->blend; const std::uint32_t* palette = sprite->palette; - if (this->render.unknown_0048 != 0 && this->GetMonsterTransformJob() < 0 && this->HasShapeShift() == true) { + if (this->render.bodyPalette != 0 && this->GetMonsterTransformJob() < 0 && this->HasShapeShift() == true) { palette = static_cast(ResourceMgr::Instance().Load(this->render.name.c_str()))->palette; } @@ -2070,7 +2070,7 @@ void CPc::DrawBody(int, int layer, const float* position, float x, float y, floa } this->SetRenderInfo(&bounds.left, x, y); - this->render.unknown_00ECBytes[0] = 1; + this->render.effectPhaseBytes[0] = 1; } // OFFSET: 0x00DAD4D0 @@ -2087,9 +2087,9 @@ void CPc::RenderOverlaySprite(const float* matrix, int) { float reciprocalDepth; g_renderer->ProjectViewport(origin, matrix, &x, &y, &reciprocalDepth); const float distanceScale = g_renderer->ScaleDistance(reciprocalDepth); - this->render.unknown_005C = distanceScale / g_heightScale; + this->render.distanceScale = distanceScale / g_heightScale; const float scale = - g_renderer->UiScaleX() * (static_cast(static_cast(this->render.unknown_0078)) * this->render.scale) * this->render.unknown_005C; + g_renderer->UiScaleX() * (static_cast(static_cast(this->render.spriteOffsetX)) * this->render.scale) * this->render.distanceScale; RenderBounds bounds; bounds.left = static_cast(g_renderer->viewport.width); @@ -2098,7 +2098,7 @@ void CPc::RenderOverlaySprite(const float* matrix, int) { bounds.bottom = 0.0f; bounds.offset = reciprocalDepth; - ResourceMgr::Instance().Load(this->unknown_0418.c_str()); + ResourceMgr::Instance().Load(this->imfName.c_str()); int count = 0; bool drawn = false; if (std::strlen(this->equipActions[0] ? this->equipActions[0]->name.text : "") == 0) { @@ -2135,12 +2135,12 @@ void CPc::RenderOverlaySprite(const float* matrix, int) { ++count; drawn = true; quad.image = image; - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { bounds.Include(&quad.top); } const std::uint32_t* palette; - if (this->render.unknown_0048 != 0) { + if (this->render.bodyPalette != 0) { palette = static_cast(ResourceMgr::Instance().Load(this->render.name.c_str()))->palette; } else { palette = sprite->palette; @@ -2180,14 +2180,14 @@ bool CGrannyPc::OnProcess() { this->PlayFrameSounds(); - if (this->unknown_0180 != 0) { + if (this->isPlayHitWave != 0) { const vector3d& player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player)->render.position; g_soundMgr->PlayWave( - reinterpret_cast(this->unknown_0190), this->render.position.x - player.x, 0.0f, + reinterpret_cast(this->hitWaveName), this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0 ); - this->unknown_0180 = 0; + this->isPlayHitWave = 0; } float facing = this->render.angle; @@ -2197,9 +2197,9 @@ bool CGrannyPc::OnProcess() { } float angle; - if (this->unknown_10A0 == 1) { + if (this->snapFacing == 1) { angle = 180.0f - facing; - this->unknown_10A0 = 0; + this->snapFacing = 0; this->angle = angle; } else { angle = this->angle; @@ -2251,14 +2251,14 @@ bool CPc::OnProcess() { this->PlayFrameSounds(); - if (this->unknown_0180 != 0) { + if (this->isPlayHitWave != 0) { const vector3d& player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player)->render.position; g_soundMgr->PlayWave( - reinterpret_cast(this->unknown_0190), this->render.position.x - player.x, 0.0f, + reinterpret_cast(this->hitWaveName), this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0 ); - this->unknown_0180 = 0; + this->isPlayHitWave = 0; } const bool show = this->GetMonsterTransformJob() > 0; @@ -2317,10 +2317,10 @@ void CPc::Render(int argument) { return; } - if (this->render.unknown_0070 != 6 && this->render.unknown_0070 != 3) { + if (this->render.state != 6 && this->render.state != 3) { this->DrawShadow(argument, this->render.scale); } - if (this->render.unknown_0070 == 6) { + if (this->render.state == 6) { switch (this->GetEffectiveJob(-1)) { case JT_STAR2: case JT_STAR2_B: @@ -2342,7 +2342,7 @@ void CPc::Render(int argument) { return; } - if (this->unknown_0474 != 0) { + if (this->renderWithoutLayer != 0) { this->DrawSprite(argument, false, 0.0f); return; } @@ -2360,10 +2360,10 @@ void CPc::DrawLayers(const float* matrix, int unknown0030, char unknown0034) { // OFFSET: 0x00DABF50 // FUNCTION: fn_22589 void CGrannyPc::UpdateGaugeWindow() { - if (reinterpret_cast(this->unknown_0478) != nullptr) { - reinterpret_cast(this->unknown_0478)->Move( + if (reinterpret_cast(this->gaugeWindow) != nullptr) { + reinterpret_cast(this->gaugeWindow)->Move( this->render.screenX - 30, - static_cast(static_cast(g_renderer->viewport.height * 12 / 480) * this->render.unknown_005C + static_cast(this->render.screenY)) + static_cast(static_cast(g_renderer->viewport.height * 12 / 480) * this->render.distanceScale + static_cast(this->render.screenY)) ); } this->UpdateHpGauge(); @@ -2372,10 +2372,10 @@ void CGrannyPc::UpdateGaugeWindow() { // OFFSET: 0x00DABFC0 // FUNCTION: fn_22590 void CPc::UpdateGaugeWindow() { - if (reinterpret_cast(this->unknown_0490) != nullptr) { - reinterpret_cast(this->unknown_0490)->Move( + if (reinterpret_cast(this->gaugeWindow) != nullptr) { + reinterpret_cast(this->gaugeWindow)->Move( this->render.screenX - 30, - static_cast(static_cast(g_renderer->viewport.height * 12 / 480) * this->render.unknown_005C + static_cast(this->render.screenY)) + static_cast(static_cast(g_renderer->viewport.height * 12 / 480) * this->render.distanceScale + static_cast(this->render.screenY)) ); } this->UpdateHpGauge(); @@ -2384,17 +2384,17 @@ void CPc::UpdateGaugeWindow() { // OFFSET: 0x00DB1760 // FUNCTION: fn_22635 void CPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { - this->unknown_04D4 = first; + this->appearanceJob = first; this->SetUnknown0260(second); - this->unknown_0440 = third; + this->head = third; this->weapon = fourth; - this->unknown_044C = fifth; - this->unknown_0450 = sixth; - this->unknown_0454 = seventh; - this->unknown_0458 = eighth; - this->unknown_045C = ninth; - this->unknown_0444 = tenth; - this->render.unknown_0048 = eleventh; + this->secondaryWeapon = fifth; + this->accessory = sixth; + this->accessory2 = seventh; + this->accessory3 = eighth; + this->shield = ninth; + this->headPalette = tenth; + this->render.bodyPalette = eleventh; this->SetActorJob(first); int job = first; @@ -2408,40 +2408,40 @@ void CPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, job = 0x1c; } else if (StateFlag28(this->stateFlags) && !StateFlag15(this->stateFlags)) { job = 0x1d; - } else if (this->unknown_03DC == 1 && !StateFlag15(this->stateFlags)) { + } else if (this->mountedState == 1 && !StateFlag15(this->stateFlags)) { job = 0x1e; - } else if (this->unknown_02CC != 0) { + } else if (this->isRiding != 0) { job = g_session.GetRidingJob(job); } this->SetActorJob(job); - this->SetSprHead(this->unknown_0440); - this->SetSprWeapon(this->weapon, this->unknown_044C); - this->SetSprAccessory(this->unknown_0450); - this->SetSprAccessory2(this->unknown_0454); - this->SetSprAccessory3(this->unknown_0458); - this->SetSprShield(this->unknown_045C); + this->SetSprHead(this->head); + this->SetSprWeapon(this->weapon, this->secondaryWeapon); + this->SetSprAccessory(this->accessory); + this->SetSprAccessory2(this->accessory2); + this->SetSprAccessory3(this->accessory3); + this->SetSprShield(this->shield); this->SetImfFileName(); this->SetHeadPaletteName(); - this->SetBodyPalette(this->render.unknown_0048); + this->SetBodyPalette(this->render.bodyPalette); this->SetBodyPaletteName(); } // OFFSET: 0x00DB0CE0 // FUNCTION: fn_22633 void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { - this->unknown_04D4 = first; + this->appearanceJob = first; this->SetUnknown0260(second); - this->unknown_0440 = third; + this->head = third; this->weapon = fourth; - this->unknown_044C = fifth; - this->unknown_0450 = sixth; - this->unknown_0454 = seventh; - this->unknown_0458 = eighth; - this->unknown_045C = GetWeaponViewValue(fifth) < 0 ? fifth : 0; - this->unknown_0444 = ninth; - this->render.unknown_0048 = tenth; - this->render.unknown_0048 = g_session.GetBodyStyle(first, tenth, this->unknown_04D0); + this->secondaryWeapon = fifth; + this->accessory = sixth; + this->accessory2 = seventh; + this->accessory3 = eighth; + this->shield = GetWeaponViewValue(fifth) < 0 ? fifth : 0; + this->headPalette = ninth; + this->render.bodyPalette = tenth; + this->render.bodyPalette = g_session.GetBodyStyle(first, tenth, this->bodyStyle); int job = first; bool applyJob = true; @@ -2455,12 +2455,12 @@ void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, in job = 0x1c; } else if (StateFlag28(eleventh) && !StateFlag15(eleventh)) { job = 0x1d; - } else if (this->unknown_03DC == 1 && !StateFlag15(this->stateFlags)) { + } else if (this->mountedState == 1 && !StateFlag15(this->stateFlags)) { job = 0x1e; } else if (this->HasShapeShift()) { applyJob = false; this->SetSprJob(this->GetUnknown0404Job()); - } else if (this->unknown_02CC != 0) { + } else if (this->isRiding != 0) { job = g_session.GetRidingJob(first); } @@ -2468,10 +2468,10 @@ void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, in this->SetActorJob(job); } - this->SetSprHead(this->unknown_0440); + this->SetSprHead(this->head); if (!StateFlag12(eleventh) && !StateFlag16(eleventh) && !StateFlag18(eleventh) && !StateFlag27(eleventh) && - !StateFlag28(eleventh) && this->unknown_03DC != 1 && this->unknown_02CC == 0) { + !StateFlag28(eleventh) && this->mountedState != 1 && this->isRiding == 0) { switch (this->GetEffectiveJob(-1)) { case JT_ASSASSIN: case JT_ASSASSIN_H: @@ -2488,13 +2488,13 @@ void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, in } } - this->SetSprAccessory(this->unknown_0450); - this->SetSprAccessory2(this->unknown_0454); - this->SetSprAccessory3(this->unknown_0458); + this->SetSprAccessory(this->accessory); + this->SetSprAccessory2(this->accessory2); + this->SetSprAccessory3(this->accessory3); if (!StateFlag12(eleventh) && !StateFlag16(eleventh) && !StateFlag18(eleventh) && !StateFlag27(eleventh) && - !StateFlag28(eleventh) && this->unknown_03DC != 1 && this->unknown_02CC == 0) { - this->SetSprShield(this->unknown_045C); + !StateFlag28(eleventh) && this->mountedState != 1 && this->isRiding == 0) { + this->SetSprShield(this->shield); } this->SetImfFileName(); @@ -2506,67 +2506,67 @@ void CPc::SetSprAct2(int first, int second, int third, int fourth, int fifth, in // FUNCTION: fn_22640 void CPc::SetSprJob(int job) { if (job == JT_BARD || job == JT_BARD_H || job == JT_BARD_B) { - if (this->unknown_0260 == 0) { - this->unknown_0260 = 1; + if (this->sex == 0) { + this->sex = 1; } } else if (job == JT_DANCER || job == JT_DANCER_H || job == JT_DANCER_B) { - if (this->unknown_0260 == 1) { - this->unknown_0260 = 0; + if (this->sex == 1) { + this->sex = 0; } } else if (job == JT_MINSTREL) { - if (this->unknown_0260 == 0) { - this->unknown_0260 = 1; + if (this->sex == 0) { + this->sex = 1; } } else if (job == JT_WANDERER) { - if (this->unknown_0260 == 1) { - this->unknown_0260 = 0; + if (this->sex == 1) { + this->sex = 0; } } else if (job == JT_MINSTREL_H) { - if (this->unknown_0260 == 0) { - this->unknown_0260 = 1; + if (this->sex == 0) { + this->sex = 1; } } else if (job == JT_WANDERER_H) { - if (this->unknown_0260 == 1) { - this->unknown_0260 = 0; + if (this->sex == 1) { + this->sex = 0; } } else if (job == JT_TROUBADOUR) { - if (this->unknown_0260 == 0) { - this->unknown_0260 = 1; + if (this->sex == 0) { + this->sex = 1; } } else if (job == JT_TROUVERE) { - if (this->unknown_0260 == 1) { - this->unknown_0260 = 0; + if (this->sex == 1) { + this->sex = 0; } } - this->render.unknown_0054 = g_session.GetNpcLocationRadius(job, this->unknown_02CC == 1); + this->render.shadowScale = g_session.GetNpcLocationRadius(job, this->isRiding == 1); if (this->GetMonsterTransformJob() > 0) { this->LoadEquipAction(0, g_session.GetMonsterActName(this->GetMonsterTransformJob()).c_str()); this->LoadEquipSprite(0, g_session.GetMonsterSprName(this->GetMonsterTransformJob()).c_str()); } else if (StateFlag12(this->stateFlags) == true || job == JT_MARRIED) { - this->LoadEquipAction(0, g_session.GetRaceBodyResourceName(0, this->unknown_04D4, JT_MARRIED, this->unknown_0260, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetRaceBodyResourceName(1, this->unknown_04D4, JT_MARRIED, this->unknown_0260, 0).c_str()); + this->LoadEquipAction(0, g_session.GetRaceBodyResourceName(0, this->appearanceJob, JT_MARRIED, this->sex, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetRaceBodyResourceName(1, this->appearanceJob, JT_MARRIED, this->sex, 0).c_str()); } else if (StateFlag16(this->stateFlags) && !StateFlag15(this->stateFlags)) { - this->LoadEquipAction(0, GetBodyActionResourceName(JT_SANTA, this->unknown_0260, 0, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SANTA, this->unknown_0260, 0, 0).c_str()); + this->LoadEquipAction(0, GetBodyActionResourceName(JT_SANTA, this->sex, 0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SANTA, this->sex, 0, 0).c_str()); } else if (StateFlag18(this->stateFlags) && !StateFlag15(this->stateFlags)) { - this->LoadEquipAction(0, GetBodyActionResourceName(JT_SUMMER, this->unknown_0260, 0, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SUMMER, this->unknown_0260, 0, 0).c_str()); + this->LoadEquipAction(0, GetBodyActionResourceName(JT_SUMMER, this->sex, 0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SUMMER, this->sex, 0, 0).c_str()); } else if (StateFlag27(this->stateFlags) && !StateFlag15(this->stateFlags)) { - this->LoadEquipAction(0, GetBodyActionResourceName(JT_HANBOK, this->unknown_0260, 0, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(JT_HANBOK, this->unknown_0260, 0, 0).c_str()); + this->LoadEquipAction(0, GetBodyActionResourceName(JT_HANBOK, this->sex, 0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(JT_HANBOK, this->sex, 0, 0).c_str()); } else if (StateFlag28(this->stateFlags) && !StateFlag15(this->stateFlags)) { - this->LoadEquipAction(0, GetBodyActionResourceName(JT_OKTOBERFEST, this->unknown_0260, 0, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(JT_OKTOBERFEST, this->unknown_0260, 0, 0).c_str()); - } else if (this->unknown_03DC == 1 && !StateFlag15(this->stateFlags)) { - this->LoadEquipAction(0, GetBodyActionResourceName(JT_SUMMER2, this->unknown_0260, 0, 0).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SUMMER2, this->unknown_0260, 0, 0).c_str()); - } else if (this->unknown_02CC != 0) { + this->LoadEquipAction(0, GetBodyActionResourceName(JT_OKTOBERFEST, this->sex, 0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(JT_OKTOBERFEST, this->sex, 0, 0).c_str()); + } else if (this->mountedState == 1 && !StateFlag15(this->stateFlags)) { + this->LoadEquipAction(0, GetBodyActionResourceName(JT_SUMMER2, this->sex, 0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(JT_SUMMER2, this->sex, 0, 0).c_str()); + } else if (this->isRiding != 0) { this->LoadEquipAction( - 0, GetBodyActionResourceName(g_session.GetRidingJob(job), this->unknown_0260, this->unknown_04D0, 0).c_str() + 0, GetBodyActionResourceName(g_session.GetRidingJob(job), this->sex, this->bodyStyle, 0).c_str() ); - this->LoadEquipSprite(0, g_session.GetBodySprName(g_session.GetRidingJob(job), this->unknown_0260, this->unknown_04D0, 0).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(g_session.GetRidingJob(job), this->sex, this->bodyStyle, 0).c_str()); } else { const int effectiveJob = this->GetEffectiveJob(JobNames::BaseJob(job)); switch (effectiveJob) { @@ -2574,20 +2574,20 @@ void CPc::SetSprJob(int job) { case JT_MADOGEAR_H: case JT_MEISTER_MADOGEAR: if (this->GetMadogearType() == 2) { - this->render.unknown_0054 = 1.5f; + this->render.shadowScale = 1.5f; } break; case JT_MADOGEAR_B: if (this->GetMadogearType() == 2) { - this->render.unknown_0054 = 1.12f; + this->render.shadowScale = 1.12f; } break; } this->LoadEquipAction( - 0, GetBodyActionResourceName(effectiveJob, this->unknown_0260, this->unknown_04D0, this->GetMadogearType()).c_str() + 0, GetBodyActionResourceName(effectiveJob, this->sex, this->bodyStyle, this->GetMadogearType()).c_str() ); - this->LoadEquipSprite(0, g_session.GetBodySprName(effectiveJob, this->unknown_0260, this->unknown_04D0, this->GetMadogearType()).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(effectiveJob, this->sex, this->bodyStyle, this->GetMadogearType()).c_str()); } this->SetActionName(ResourceMgr::Instance(), this->equipActions[0] ? this->equipActions[0]->GetName() : ""); @@ -2620,22 +2620,22 @@ __declspec(noinline) void CPlayer::UpdateMsgEffect(bool show) { // FUNCTION: fn_22634 void CGrannyPc::SetSprActFull(int first, int second, int third, int fourth, int fifth, int sixth, int seventh, int eighth, int ninth, int tenth, int eleventh) { this->SetUnknown0260(second); - this->unknown_0434 = third; - this->unknown_0440 = fourth; - this->unknown_0448 = sixth; - this->unknown_044C = seventh; - this->unknown_0450 = eighth; - this->unknown_0454 = ninth; - this->unknown_0444 = fifth; - this->unknown_0438 = tenth; - this->render.unknown_0048 = eleventh; + this->head = third; + this->weapon = fourth; + this->accessory = sixth; + this->accessory2 = seventh; + this->accessory3 = eighth; + this->shield = ninth; + this->secondaryWeapon = fifth; + this->headPalette = tenth; + this->render.bodyPalette = eleventh; this->SetActorJob(first); - this->SetSprHead(this->unknown_0434); - this->SetSprWeapon(this->unknown_0440, this->unknown_0444); - this->SetSprAccessory(this->unknown_0448); - this->SetSprAccessory2(this->unknown_044C); - this->SetSprAccessory3(this->unknown_0450); - this->SetSprShield(this->unknown_0454); + this->SetSprHead(this->head); + this->SetSprWeapon(this->weapon, this->secondaryWeapon); + this->SetSprAccessory(this->accessory); + this->SetSprAccessory2(this->accessory2); + this->SetSprAccessory3(this->accessory3); + this->SetSprShield(this->shield); this->SetImfFileName(); this->SetHeadPaletteName(); @@ -2654,9 +2654,9 @@ void CGrannyPc::SetSprActFull(int first, int second, int third, int fourth, int std::memset(this->vertices[mesh], 0, this->model->GetTriangleCount(mesh) * 3 * sizeof(RenderVertex)); } - this->unknown_0F24 = 0.0f; + this->animationTime = 0.0f; this->lastClock = GrannyGetSystemSeconds(); - this->unknown_02E0 = 0; + this->actorType = 0; char* tag = std::strstr(this->modelName, "@hd"); if (!tag) { @@ -2730,46 +2730,46 @@ void CGrannyPc::SetSprActFull(int first, int second, int third, int fourth, int // OFFSET: 0x00DB0040 // FUNCTION: fn_22609 void CPc::SetBodyPaletteName() { - if (this->render.unknown_0048 == 0) { + if (this->render.bodyPalette == 0) { return; } if (this->GetMonsterTransformJob() < 0 && this->IsShapeShifted()) { std::string paletteName; - this->render.name.assign(static_cast(FormatOwnedString("몸\\%s_%d.pal", this->GetShapeShiftName().c_str(), this->render.unknown_0048))); + this->render.name.assign(static_cast(FormatOwnedString("몸\\%s_%d.pal", this->GetShapeShiftName().c_str(), this->render.bodyPalette))); return; } int job = this->GetEffectiveJob(-1); - const int costumeJob = this->unknown_04D0; - if (this->unknown_02CC != 0) { + const int costumeJob = this->bodyStyle; + if (this->isRiding != 0) { job = g_session.GetRidingJob(job); } - this->render.name.assign(static_cast(g_session.GetBodyPalName(job, this->unknown_0260, this->render.unknown_0048, costumeJob, this->GetMadogearType(), 0))); + this->render.name.assign(static_cast(g_session.GetBodyPalName(job, this->sex, this->render.bodyPalette, costumeJob, this->GetMadogearType(), 0))); } // OFFSET: 0x00DB2670 // FUNCTION: fn_22645 void CPc::SetSprShield(int value) { - this->unknown_045C = value; + this->shield = value; - if (this->unknown_02CC != 0) { + if (this->isRiding != 0) { this->LoadEquipAction(7, ""); this->LoadEquipSprite(7, ""); return; } const int job = this->GetEffectiveJob(-1); - this->LoadEquipAction(7, g_session.GetShieldActName(job, this->unknown_0260, this->unknown_045C, this->unknown_04D0).c_str()); - this->LoadEquipSprite(7, g_session.GetShieldSprName(job, this->unknown_0260, this->unknown_045C, this->unknown_04D0).c_str()); + this->LoadEquipAction(7, g_session.GetShieldActName(job, this->sex, this->shield, this->bodyStyle).c_str()); + this->LoadEquipSprite(7, g_session.GetShieldSprName(job, this->sex, this->shield, this->bodyStyle).c_str()); } // OFFSET: 0x00DB6670 // FUNCTION: fn_22668 void CPlayer::ApplyFollowOffset(CGameActor* target, float x, float z, int* row, int* column) { int step = target->GetNpcLocationRadius(); - if (target->unknown_02E0 == 1) { + if (target->actorType == 1) { step = 5; } else if (step == 0) { return; @@ -2813,7 +2813,7 @@ void CPlayer::ApplyFollowOffset(CGameActor* target, float x, float z, int* row, // OFFSET: 0x00DB6820 // FUNCTION: fn_22669 float CPlayer::AdjustFollowDistance(CGameActor* target, float distance) { - if (target->unknown_02E0 == 1) { + if (target->actorType == 1) { return std::max(distance - 20.0f, 0.0f); } @@ -2855,14 +2855,14 @@ bool CPlayer::OnProcess() { } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (this->unknown_050C != 0 && timeGetTime() > (g_session.m_averagePing >> 1) + this->unknown_0504) { + if (this->preMoveOn != 0 && timeGetTime() > (g_session.m_averagePing >> 1) + this->preMoveStartTick) { PlayerMoveRequest request; mode->WorldSubcell( this->render.position.x, this->render.position.z, request.column, request.row, request.subColumn, request.subRow ); request.serverTime = g_session.GetServerTime(); - request.destinationX = reinterpret_cast(this->unknown_04F8); - request.destinationY = this->unknown_04FC; + request.destinationX = reinterpret_cast(this->destCellX); + request.destinationY = this->destCellZ; const int address = reinterpret_cast(&request); this->SendMsg(nullptr, AM_MOVE, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } @@ -2873,19 +2873,19 @@ bool CPlayer::OnProcess() { this->PlayFrameSounds(); - if (this->unknown_0180 != 0) { + if (this->isPlayHitWave != 0) { const vector3d& player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player)->render.position; g_soundMgr->PlayWave( - reinterpret_cast(this->unknown_0190), this->render.position.x - player.x, 0.0f, + reinterpret_cast(this->hitWaveName), this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0 ); - this->unknown_0180 = 0; + this->isPlayHitWave = 0; } this->UpdateMsgEffect(this->GetMonsterTransformJob() > 0); - if (g_session.unknown_61B1) { + if (g_session.showCameraInfo) { UIWindow* window = g_windowMgr.LookupWindow(WID_VIEWCAMERAINFOWND); if (window != nullptr) { window->Invalidate(); @@ -2899,14 +2899,14 @@ bool CPlayer::OnProcess() { // FUNCTION: fn_22667 void CPlayer::UpdatePendingAction() { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - switch (this->unknown_0508) { + switch (this->proceedType) { case PT_ATTACK: case PT_ATTACK_2: { - CGameActor* target = static_cast(mode->scene->GetGameActorByAID(this->unknown_051C)); + CGameActor* target = static_cast(mode->scene->GetGameActorByAID(this->proceedTargetGid)); if (target == nullptr) { break; } - if (target->render.unknown_0070 == 3) { + if (target->render.state == 3) { return; } @@ -2914,18 +2914,18 @@ void CPlayer::UpdatePendingAction() { int row; mode->WorldCell(this->render.position.x, this->render.position.z, column, row); if (this->GetEffectiveJob(-1) == 16 || this->GetEffectiveJob(-1) == 4017 || this->GetEffectiveJob(-1) == 4039) { - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4 && state != 7 && state != 8) { return; } } else if ((this->GetEffectiveJob(-1) >= 4046 && this->GetEffectiveJob(-1) < 4361) || this->GetEffectiveJob(-1) == 24 || this->GetEffectiveJob(-1) == 25) { - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4 && state != 7 && state != 8 && state < 16) { return; } } else { - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4) { return; } @@ -2934,43 +2934,43 @@ void CPlayer::UpdatePendingAction() { const float distance = this->AdjustFollowDistance( target, target->CalcDist(this->render.position.x, this->render.position.y, this->render.position.z) ); - const bool inRange = static_cast(g_session.unknown_0F4C * 5) + 5.5f >= distance; - if ((reinterpret_cast(this->unknown_04F8) != column || this->unknown_04FC != row) && !inRange) { - const std::uint32_t delay = this->unknown_0508 != 5 ? 450 : 1200; - const bool elapsed = timeGetTime() > this->unknown_0524 + delay; - const int state = static_cast(this->render.unknown_0070); - int cellX = target->unknown_0158[5]; - int cellY = *reinterpret_cast(target->unknown_0170); + const bool inRange = static_cast(g_session.storeItemLimit * 5) + 5.5f >= distance; + if ((reinterpret_cast(this->destCellX) != column || this->destCellZ != row) && !inRange) { + const std::uint32_t delay = this->proceedType != 5 ? 450 : 1200; + const bool elapsed = timeGetTime() > this->tickOfMoveForAttack + delay; + const int state = static_cast(this->render.state); + int cellX = target->movementState[5]; + int cellY = *reinterpret_cast(target->destinationAndSpeed); float x; float z; - if (this->unknown_0508 == 5) { + if (this->proceedType == 5) { x = target->render.position.x; z = target->render.position.z; } else { mode->CellCenter(cellX, cellY, x, z); } this->ApplyFollowOffset(target, x, z, &cellY, &cellX); - mode->FindWalkableCellToward(this->render.position.x, this->render.position.z, x, z, cellX, cellY, g_session.unknown_0F4C); - if ((reinterpret_cast(this->unknown_04F8) != cellX || this->unknown_04FC != cellY) && state != 2 && - this->unknown_0514 == 0 && elapsed) { - reinterpret_cast(this->unknown_04F8) = cellX; - this->unknown_04FC = cellY; - this->unknown_0524 = timeGetTime(); + mode->FindWalkableCellToward(this->render.position.x, this->render.position.z, x, z, cellX, cellY, g_session.storeItemLimit); + if ((reinterpret_cast(this->destCellX) != cellX || this->destCellZ != cellY) && state != 2 && + this->isAttackRequest == 0 && elapsed) { + reinterpret_cast(this->destCellX) = cellX; + this->destCellZ = cellY; + this->tickOfMoveForAttack = timeGetTime(); this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, cellX, cellX >> 31, cellY, cellY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } return; } - if (this->unknown_0510 == 2) { + if (this->attackMode == 2) { this->SendMsg(nullptr, AM_CANCELATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (this->unknown_0514 != 0 || timeGetTime() <= this->unknown_0500 + 1200) { + if (this->isAttackRequest != 0 || timeGetTime() <= this->attackReqTime + 1200) { return; } - ++this->unknown_0520; - this->unknown_0500 = timeGetTime(); - this->unknown_0514 = 1; - if (this->unknown_0510 != 2) { + ++this->totalAttackReqCnt; + this->attackReqTime = timeGetTime(); + this->isAttackRequest = 1; + if (this->attackMode != 2) { this->SendMsg(nullptr, AM_REQ_ATTACK_REPEAT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { this->SendMsg(nullptr, AM_REQ_ATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -2979,10 +2979,10 @@ void CPlayer::UpdatePendingAction() { } case PT_SKILL: { CGameActor* target; - if (this->unknown_051C == g_session.m_aid) { + if (this->proceedTargetGid == g_session.m_aid) { target = this; } else { - target = static_cast(mode->scene->GetGameActorByAID(this->unknown_051C)); + target = static_cast(mode->scene->GetGameActorByAID(this->proceedTargetGid)); } if (target == nullptr) { break; @@ -2992,12 +2992,12 @@ void CPlayer::UpdatePendingAction() { int row; mode->WorldCell(this->render.position.x, this->render.position.z, column, row); const float x = target->render.position.x; - int cellX = target->unknown_0158[5]; - int cellY = *reinterpret_cast(target->unknown_0170); + int cellX = target->movementState[5]; + int cellY = *reinterpret_cast(target->destinationAndSpeed); const float z = target->render.position.z; - const int range = mode->GetSkillAttackRange(this->unknown_052C, this->unknown_0530); + const int range = mode->GetSkillAttackRange(this->skillId, this->skillUseLevel); mode->FindWalkableCellToward(this->render.position.x, this->render.position.z, x, z, cellX, cellY, range); - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4 && state < 16) { return; } @@ -3006,59 +3006,59 @@ void CPlayer::UpdatePendingAction() { target, target->CalcDist(this->render.position.x, this->render.position.y, this->render.position.z) ); const bool inRange = static_cast(range * 5) + 5.5f >= distance; - if ((reinterpret_cast(this->unknown_04F8) == column && this->unknown_04FC == row) || inRange) { + if ((reinterpret_cast(this->destCellX) == column && this->destCellZ == row) || inRange) { this->SendMsg(nullptr, AM_REQ_SKILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } - if (reinterpret_cast(this->unknown_04F8) == cellX && this->unknown_04FC == cellY) { + if (reinterpret_cast(this->destCellX) == cellX && this->destCellZ == cellY) { return; } - if (this->render.unknown_0070 == 2) { + if (this->render.state == 2) { return; } - this->unknown_04FC = cellY; - reinterpret_cast(this->unknown_04F8) = cellX; + this->destCellZ = cellY; + reinterpret_cast(this->destCellX) = cellX; this->ApplyFollowOffset(target, x, z, &cellY, &cellX); this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, cellX, cellX >> 31, cellY, cellY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return; } case PT_GROUNDSKILL: { - int groundX = this->unknown_0534; - int groundY = this->unknown_0538; + int groundX = this->gSkillDx; + int groundY = this->gSkillDy; int column; int row; mode->WorldCell(this->render.position.x, this->render.position.z, column, row); - const int range = mode->GetSkillAttackRange(this->unknown_052C, this->unknown_0530); + const int range = mode->GetSkillAttackRange(this->skillId, this->skillUseLevel); float x; float z; mode->CellCenter(groundX, groundY, x, z); mode->FindWalkableCellToward(this->render.position.x, this->render.position.z, x, z, groundX, groundY, range); - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4 && state < 16) { return; } const float distance = this->CalcDist(x, this->render.position.y, z); const bool inRange = static_cast(range * 5) + 5.5f >= distance; - if ((reinterpret_cast(this->unknown_04F8) == column && this->unknown_04FC == row) || inRange) { + if ((reinterpret_cast(this->destCellX) == column && this->destCellZ == row) || inRange) { this->SendMsg(nullptr, AM_REQ_GROUND_SKILL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; } - if (reinterpret_cast(this->unknown_04F8) == groundX && this->unknown_04FC == groundY) { + if (reinterpret_cast(this->destCellX) == groundX && this->destCellZ == groundY) { return; } - if (this->render.unknown_0070 == 2) { + if (this->render.state == 2) { return; } - this->unknown_04FC = groundY; - reinterpret_cast(this->unknown_04F8) = groundX; + this->destCellZ = groundY; + reinterpret_cast(this->destCellX) = groundX; this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, groundX, groundX >> 31, groundY, groundY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return; } case PT_PICKUPITEM: { - CItem* item = mode->scene->GetItemByAID(this->unknown_051C); + CItem* item = mode->scene->GetItemByAID(this->proceedTargetGid); if (item == nullptr) { break; } @@ -3072,30 +3072,30 @@ void CPlayer::UpdatePendingAction() { const int targetX = itemX; const int targetY = itemY; mode->StepTowardWalkableCell(column, row, itemX, itemY); - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 0 && state < 16) { return; } if (mode->IsWithinRange(column, row, targetX, targetY, 1)) { this->SendMsg(nullptr, AM_REQ_CHANGE_DIR, 0, targetX, targetX >> 31, targetY, targetY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); - if (!mode->HasUnknown01A4(this->unknown_051C)) { - mode->PushUnknown01A4(this->unknown_051C); - mode->SendMsg(MM_ITEMPICKUP, this->unknown_051C, 0, 0, 0); + if (!mode->HasUnknown01A4(this->proceedTargetGid)) { + mode->PushUnknown01A4(this->proceedTargetGid); + mode->SendMsg(MM_ITEMPICKUP, this->proceedTargetGid, 0, 0, 0); } break; } - if (reinterpret_cast(this->unknown_04F8) == itemX && this->unknown_04FC == itemY) { + if (reinterpret_cast(this->destCellX) == itemX && this->destCellZ == itemY) { return; } - this->unknown_04FC = itemY; - reinterpret_cast(this->unknown_04F8) = itemX; + this->destCellZ = itemY; + reinterpret_cast(this->destCellX) = itemX; this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, itemX, itemX >> 31, itemY, itemY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return; } case PT_TOUCH_SKILL: { - CGameActor* skill = static_cast(mode->scene->GetSkillByAID(this->unknown_051C)); + CGameActor* skill = static_cast(mode->scene->GetSkillByAID(this->proceedTargetGid)); if (skill == nullptr) { break; } @@ -3106,31 +3106,31 @@ void CPlayer::UpdatePendingAction() { int cellX; int cellY; mode->WorldCell(skill->render.position.x, skill->render.position.z, cellX, cellY); - int range = mode->GetSkillAttackRange(this->unknown_052C, this->unknown_0530); - if (mode->SendMsg(MM_GET_SKILL_USE_TYPE, 0, 0, 0, 0) == 0 && range < 5 && this->unknown_052C != 124) { - range = g_session.unknown_0F4C > 5 ? g_session.unknown_0F4C : 5; + int range = mode->GetSkillAttackRange(this->skillId, this->skillUseLevel); + if (mode->SendMsg(MM_GET_SKILL_USE_TYPE, 0, 0, 0, 0) == 0 && range < 5 && this->skillId != 124) { + range = g_session.storeItemLimit > 5 ? g_session.storeItemLimit : 5; } float x; float z; mode->CellCenter(cellX, cellY, x, z); mode->FindWalkableCellToward(this->render.position.x, this->render.position.z, x, z, cellX, cellY, range); - const int state = static_cast(this->render.unknown_0070); + const int state = static_cast(this->render.state); if (state != 1 && state != 0 && state != 4 && state < 16) { return; } const float distance = this->CalcDist(x, this->render.position.y, z); const bool inRange = static_cast(range * 5) + 5.5f >= distance; - if ((reinterpret_cast(this->unknown_04F8) != column || this->unknown_04FC != row) && !inRange) { - if (reinterpret_cast(this->unknown_04F8) == cellX && this->unknown_04FC == cellY) { + if ((reinterpret_cast(this->destCellX) != column || this->destCellZ != row) && !inRange) { + if (reinterpret_cast(this->destCellX) == cellX && this->destCellZ == cellY) { return; } - if (this->render.unknown_0070 == 2 && skill->GetEffectiveJob(-1) != UNT_ICEWALL && skill->GetEffectiveJob(-1) != UNT_BLASTMINE && + if (this->render.state == 2 && skill->GetEffectiveJob(-1) != UNT_ICEWALL && skill->GetEffectiveJob(-1) != UNT_BLASTMINE && skill->GetEffectiveJob(-1) != UNT_CLAYMORETRAP) { return; } - this->unknown_04FC = cellY; - reinterpret_cast(this->unknown_04F8) = cellX; + this->destCellZ = cellY; + reinterpret_cast(this->destCellX) = cellX; this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, cellX, cellX >> 31, cellY, cellY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); return; } @@ -3146,17 +3146,17 @@ void CPlayer::UpdatePendingAction() { case UNT_SOLIDTRAP: case UNT_SWIFTTRAP: case UNT_FLAMETRAP: - if (this->unknown_052C == 0) { - if (this->unknown_0510 == 2) { + if (this->skillId == 0) { + if (this->attackMode == 2) { this->SendMsg(nullptr, AM_CANCELATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (this->unknown_0514 != 0 || timeGetTime() <= this->unknown_0500 + 1200) { + if (this->isAttackRequest != 0 || timeGetTime() <= this->attackReqTime + 1200) { return; } - ++this->unknown_0520; - this->unknown_0500 = timeGetTime(); - this->unknown_0514 = 1; - if (this->unknown_0510 != 2) { + ++this->totalAttackReqCnt; + this->attackReqTime = timeGetTime(); + this->isAttackRequest = 1; + if (this->attackMode != 2) { this->SendMsg(nullptr, AM_REQ_ATTACK_REPEAT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { this->SendMsg(nullptr, AM_REQ_ATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -3183,7 +3183,7 @@ void CPlayer::ReapplySkillEffects() { } g_weatherEffect.StopDarken(); - this->unknown_0210 = static_cast(g_session.m_level); + this->characterLevel = static_cast(g_session.m_level); this->UpdateMaxLevelAura(); CTetraBallEffect* tetraBall; @@ -3196,9 +3196,9 @@ void CPlayer::ReapplySkillEffects() { for (std::vector::iterator it = g_activeSkillEffects.begin(); it != g_activeSkillEffects.end(); ++it) { const int type = it->id; - const int value = it->unknown_0008; - const int argument3 = it->unknown_000C; - const int argument4 = it->unknown_0010; + const int value = it->value1; + const int argument3 = it->value2; + const int argument4 = it->value3; switch (type) { case EFST_TWOHANDQUICKEN: { @@ -3302,7 +3302,7 @@ void CPlayer::ReapplySkillEffects() { this->LaunchEffect(effectId, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0xA4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0544 = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + this->skillEffect = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; } case EFST_SOULLINK: @@ -3461,10 +3461,10 @@ void CPlayer::ReapplySkillEffects() { case EFST_ALL_RIDING: this->SetRiding(1); this->SetSprJob(this->GetEffectiveJob(-1)); - this->SetBodyPalette(this->render.unknown_0048); + this->SetBodyPalette(this->render.bodyPalette); break; case EFST_ON_PUSH_CART: - this->SendMsg(nullptr, AM_STATUS_CHANGE, 0, type, type >> 31, 1, 0, g_session.unknown_5C1C, g_session.unknown_5C1C >> 31, 0, 0, 0, 0, 0, 0); + this->SendMsg(nullptr, AM_STATUS_CHANGE, 0, type, type >> 31, 1, 0, g_session.replayPacketMode, g_session.replayPacketMode >> 31, 0, 0, 0, 0, 0, 0); break; case EFST_TELEKINESIS_INTENSE: while (this->HasId(0x418)) { @@ -3586,7 +3586,7 @@ void CPlayer::ReapplySkillEffects() { } break; case EFST_SOULATTACK: - this->unknown_04D8[0] = 1; + this->alternateDoramAppearance[0] = 1; break; case EFST_IMMUNE_PROPERTY_NOTHING: case EFST_IMMUNE_PROPERTY_WATER: @@ -3667,7 +3667,7 @@ void CPlayer::ReapplySkillEffects() { this->LaunchEffect(0x14E, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); g_overrideColor = 1; this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0xA4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0544 = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + this->skillEffect = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case EFST_HANDICAPSTATE_DEEPSILENCE: case EFST_HANDICAPSTATE_SWOONING: @@ -3852,10 +3852,10 @@ void CPlayer::SendMsg( switch (static_cast(a) << 32 | static_cast(message)) { case AM_REQ_GROUND_SKILL: { PlayerSkillRequest request; - request.skill = this->unknown_052C; - request.x = this->unknown_0534; - request.y = this->unknown_0538; - request.level = this->unknown_0530; + request.skill = this->skillId; + request.x = this->gSkillDx; + request.y = this->gSkillDy; + request.level = this->skillUseLevel; if (request.skill == 0x7D) { g_windowMgr.EnsureWindow(WID_TALKBOXTRAPINPUTWND)->SendMsg(nullptr, UM_SET_SKILL_INFO, reinterpret_cast(&request), 0, 0, 0); } else if (request.skill == 0xDC) { @@ -3869,7 +3869,7 @@ void CPlayer::SendMsg( static_cast(g_modeMgr.GetGameMode()) ->WorldSubcell(this->render.position.x, this->render.position.z, column, row, subColumn, subRow); MovementRouteInterpolation route; - if (g_pathFinder.FindPath(timeGetTime(), column, row, subColumn, subRow, this->unknown_0534, this->unknown_0538, 150, route, 15) == true) { + if (g_pathFinder.FindPath(timeGetTime(), column, row, subColumn, subRow, this->gSkillDx, this->gSkillDy, 150, route, 15) == true) { metadata = route.EndMetadata(); } mode->SendMsg(MM_USE_SKILL_TOGROUND, reinterpret_cast(&request), metadata, 0, 0); @@ -3879,51 +3879,51 @@ void CPlayer::SendMsg( break; } case AM_REQ_SKILL: - mode->SendMsg(MM_USE_SKILL, this->unknown_052C, this->unknown_051C, this->unknown_0530, 0); + mode->SendMsg(MM_USE_SKILL, this->skillId, this->proceedTargetGid, this->skillUseLevel, 0); break; case AM_REQ_ATTACK_REPEAT: { - CRenderObject* target = mode->scene->GetGameActorByAID(this->unknown_051C); - if (target == nullptr || static_cast(target)->unknown_0314 != 7) { - mode->SendMsg(MM_REQUEST_ACT, 7, this->unknown_051C, 0, 0); + CRenderObject* target = mode->scene->GetGameActorByAID(this->proceedTargetGid); + if (target == nullptr || static_cast(target)->objectType != 7) { + mode->SendMsg(MM_REQUEST_ACT, 7, this->proceedTargetGid, 0, 0); } break; } case AM_REQ_ATTACK: - mode->SendMsg(MM_REQUEST_ACT, 0, this->unknown_051C, 0, 0); + mode->SendMsg(MM_REQUEST_ACT, 0, this->proceedTargetGid, 0, 0); break; case AM_REQ_SIT: if (!StateFlag01(this->stateFlags)) { - if (this->render.unknown_0070 == 0) { - mode->SendMsg(MM_REQUEST_ACT, 2, this->unknown_051C, 0, 0); - } else if (this->render.unknown_0070 == 6) { - mode->SendMsg(MM_REQUEST_ACT, 3, this->unknown_051C, 0, 0); + if (this->render.state == 0) { + mode->SendMsg(MM_REQUEST_ACT, 2, this->proceedTargetGid, 0, 0); + } else if (this->render.state == 6) { + mode->SendMsg(MM_REQUEST_ACT, 3, this->proceedTargetGid, 0, 0); } } break; case AM_REQ_MOVE: this->SendMsg(nullptr, AM_CANCELATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (this->render.unknown_0070 != 0x4B) { - if (this->IsSpecialState(this->render.unknown_0070)) { - this->unknown_0518 = 1; - this->unknown_053C = b; - this->unknown_0540 = d; + if (this->render.state != 0x4B) { + if (this->IsSpecialState(this->render.state)) { + this->isPreengageStateOfMove = 1; + this->preengageXOfMove = b; + this->preengageYOfMove = d; } else { - this->unknown_0518 = 0; - this->unknown_053C = -1; - this->unknown_0540 = -1; + this->isPreengageStateOfMove = 0; + this->preengageXOfMove = -1; + this->preengageYOfMove = -1; this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, b, b >> 31, d, d >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } } break; case AM_REQ_MOVE_PRIMITIVE: g_unknown173AD3F = false; - if (timeGetTime() > this->unknown_0528 + 350) { - this->unknown_0528 = timeGetTime(); + if (timeGetTime() > this->standTick + 350) { + this->standTick = timeGetTime(); mode->SendMsg(MM_REQUEST_MOVE, b, d, 0, 0); } break; case AM_REQ_CHANGE_DIR: { - const std::uint32_t state = this->render.unknown_0070; + const std::uint32_t state = this->render.state; if (state != 0 && state != 4 && state != 6) { break; } @@ -3943,18 +3943,18 @@ void CPlayer::SendMsg( direction -= 8; } if (direction == 0 || direction == 4) { - this->unknown_043C = 0; + this->headDir = 0; this->render.angle = facing; } else if (direction == 1) { - if (this->unknown_043C == 1) { - this->unknown_043C = 0; + if (this->headDir == 1) { + this->headDir = 0; this->render.angle = facing; } else { - this->unknown_043C = 1; + this->headDir = 1; } } else { if (direction == 2 || direction == 3) { - this->unknown_043C = 1; + this->headDir = 1; const float angle = facing + 45.0f; this->render.angle = angle; if (angle >= 360.0f) { @@ -3962,67 +3962,67 @@ void CPlayer::SendMsg( } } if (direction == 7) { - if (this->unknown_043C == 2) { - this->unknown_043C = 0; + if (this->headDir == 2) { + this->headDir = 0; this->render.angle = facing; } else { - this->unknown_043C = 2; + this->headDir = 2; } } else if (direction == 5 || direction == 6) { const float angle = facing - 45.0f; - this->unknown_043C = 2; + this->headDir = 2; this->render.angle = angle; if (angle < 0.0f) { this->render.angle = angle + 360.0f; } } } - const int motion = this->unknown_043C; + const int motion = this->headDir; this->render.curMotion = motion; this->render.angle = static_cast((CPlayer::AngleToDirection(this->render.angle) + 4) * 45); mode->SendMsg(MM_CHANGE_DIRECTION, CPlayer::AngleToDirection(this->render.angle), motion, 0, 0); break; } case AM_PREMOVE: - this->unknown_050C = 1; - this->unknown_0504 = timeGetTime(); - reinterpret_cast(this->unknown_04F8) = b; - this->unknown_04FC = d; + this->preMoveOn = 1; + this->preMoveStartTick = timeGetTime(); + reinterpret_cast(this->destCellX) = b; + this->destCellZ = d; break; case AM_MOVE: { - this->unknown_050C = 0; + this->preMoveOn = 0; const int* route = reinterpret_cast(b); this->routeStartTick = route[0]; - if (this->FindRoute(route[1], route[2], route[3], route[4], route[5], route[6], *reinterpret_cast(g_session.unknown_16F4))) { - this->unknown_0158[5] = route[5]; - *reinterpret_cast(this->unknown_0170) = route[6]; + if (this->FindRoute(route[1], route[2], route[3], route[4], route[5], route[6], *reinterpret_cast(g_session.healthPoints))) { + this->movementState[5] = route[5]; + *reinterpret_cast(this->destinationAndSpeed) = route[6]; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { int column; int row; int subColumn; int subRow; mode->WorldSubcell(this->render.position.x, this->render.position.z, column, row, subColumn, subRow); - if (this->FindRoute(column, row, subColumn, subRow, route[5], route[6], *reinterpret_cast(g_session.unknown_16F4))) { - this->unknown_0158[5] = route[5]; - *reinterpret_cast(this->unknown_0170) = route[6]; + if (this->FindRoute(column, row, subColumn, subRow, route[5], route[6], *reinterpret_cast(g_session.healthPoints))) { + this->movementState[5] = route[5]; + *reinterpret_cast(this->destinationAndSpeed) = route[6]; this->SetState(1, 1); } } - g_navigationManager.CheckArrival(this->unknown_0158[5], *reinterpret_cast(this->unknown_0170)); + g_navigationManager.CheckArrival(this->movementState[5], *reinterpret_cast(this->destinationAndSpeed)); break; } case AM_FREEZE: this->SetState(0, 1); break; case AM_CANCELATTACK: - this->unknown_0514 = 0; - this->unknown_0508 = 0; + this->isAttackRequest = 0; + this->proceedType = 0; mode->SendMsg(MM_SETLOCKONMOUSE, 0, 0, 0, 0); break; case AM_ATTACKCLICKUP: { - const int attackMode = this->unknown_0508; + const int attackMode = this->proceedType; if (attackMode != 1 && attackMode != 5) { if (attackMode == 3) { mode->SendMsg(MM_SETLOCKONMOUSE, 0, 0, 0, 0); @@ -4032,9 +4032,9 @@ void CPlayer::SendMsg( break; } } - if (this->unknown_0510 != 0) { - this->unknown_0510 = 2; - if (this->unknown_0520 != 0) { + if (this->attackMode != 0) { + this->attackMode = 2; + if (this->totalAttackReqCnt != 0) { this->SendMsg(nullptr, AM_CANCELATTACK, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); mode->SendMsg(MM_CANCEL_LOCKON, 0, 0, 0, 0); } @@ -4042,72 +4042,72 @@ void CPlayer::SendMsg( break; } case AM_SET_SKILL_USE_LEVEL: - this->unknown_0530 = b; + this->skillUseLevel = b; break; case AM_PROCEEDGROUNDSKILL: - if (this->render.unknown_0070 != 6 && + if (this->render.state != 6 && (!StateFlag01(this->stateFlags) || (b == 0x89 && c == 0) || (b == 0xD4 && c == 0) || (b == 0x211 && c == 0) || (b == 0x212 && c == 0))) { - this->unknown_0508 = 4; - this->unknown_052C = b; - this->unknown_0534 = d; - this->unknown_0538 = f; - this->unknown_051C = 0; + this->proceedType = 4; + this->skillId = b; + this->gSkillDx = d; + this->gSkillDy = f; + this->proceedTargetGid = 0; } break; case AM_PROCEEDSKILL: - if (this->render.unknown_0070 != 6 && + if (this->render.state != 6 && (!StateFlag01(this->stateFlags) || (d == 0x89 && e == 0) || (d == 0xD4 && e == 0) || (d == 0x211 && e == 0) || (d == 0x212 && e == 0) || (d == 0x250 && e == 0))) { - this->unknown_0508 = 3; - this->unknown_051C = b; - this->unknown_052C = d; + this->proceedType = 3; + this->proceedTargetGid = b; + this->skillId = d; } break; case AM_RESUMEPROCEEDATTACK: - if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) { - const int attackMode = this->unknown_0508 == 1 ? 5 : 1; - this->unknown_0524 = timeGetTime() - 1200; - this->unknown_0508 = attackMode; - this->unknown_051C = b; - this->unknown_0514 = 0; - this->unknown_0520 = 0; - reinterpret_cast(this->unknown_04F8) = -1; - this->unknown_04FC = -1; + if (this->render.state != 6 && !StateFlag01(this->stateFlags)) { + const int attackMode = this->proceedType == 1 ? 5 : 1; + this->tickOfMoveForAttack = timeGetTime() - 1200; + this->proceedType = attackMode; + this->proceedTargetGid = b; + this->isAttackRequest = 0; + this->totalAttackReqCnt = 0; + reinterpret_cast(this->destCellX) = -1; + this->destCellZ = -1; } break; case AM_PROCEEDATTACK: - if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) { + if (this->render.state != 6 && !StateFlag01(this->stateFlags)) { CRenderObject* target = mode->scene->GetGameActorByAID(b); if (target != nullptr) { - this->unknown_0508 = - static_cast(*reinterpret_cast(g_session.unknown_16F4) * 4 / 3) < - reinterpret_cast(static_cast(target)->unknown_0170)[1] + this->proceedType = + static_cast(*reinterpret_cast(g_session.healthPoints) * 4 / 3) < + reinterpret_cast(static_cast(target)->destinationAndSpeed)[1] ? 5 : 1; - this->unknown_051C = b; - this->unknown_0514 = 0; - this->unknown_0510 = d; - this->unknown_0520 = 0; + this->proceedTargetGid = b; + this->isAttackRequest = 0; + this->attackMode = d; + this->totalAttackReqCnt = 0; } } break; case AM_PROCEEDPICKUPITEM: - if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) { - this->unknown_0508 = 2; - this->unknown_051C = b; + if (this->render.state != 6 && !StateFlag01(this->stateFlags)) { + this->proceedType = 2; + this->proceedTargetGid = b; } break; case AM_PROCEEDTOUCHSKILL: - if (this->render.unknown_0070 != 6 && !StateFlag01(this->stateFlags)) { + if (this->render.state != 6 && !StateFlag01(this->stateFlags)) { const int* skill = reinterpret_cast(d); - this->unknown_0508 = 6; - this->unknown_052C = skill[1]; - this->unknown_0530 = skill[3]; - this->unknown_051C = b; - this->unknown_0510 = f; - this->unknown_0514 = 0; - this->unknown_0520 = 0; + this->proceedType = 6; + this->skillId = skill[1]; + this->skillUseLevel = skill[3]; + this->proceedTargetGid = b; + this->attackMode = f; + this->isAttackRequest = 0; + this->totalAttackReqCnt = 0; } break; case AM_CLEAR_ROUTE: @@ -4146,12 +4146,12 @@ void CGrannyPc::RenderModel( RenderCommand** commands = this->layerCommands[layer]; if (!model) { model = this->model; - this->unknown_2550 = (this->*update.asPose)(nullptr); + this->worldPose = (this->*update.asPose)(nullptr); commands = this->commands; } else if (animation) { pose = (this->*update.asPose)(animation); } else { - pose = this->unknown_2550; + pose = this->worldPose; } matrix rotation; @@ -4249,7 +4249,7 @@ void CGrannyPc::RenderModel( } if (layer != 1) { - this->unknown_2558.push_back(position); + this->attachmentPositions.push_back(position); } } @@ -4285,80 +4285,80 @@ void CPlayer::Initialize() { this->render.position.y = static_cast(g_modeMgr.GetGameMode())->scene->terrain ->Height(this->render.position.x, this->render.position.z); static_cast(g_modeMgr.GetGameMode()) - ->WorldCell(this->render.position.x, this->render.position.z, reinterpret_cast(this->unknown_04F8), this->unknown_04FC); + ->WorldCell(this->render.position.x, this->render.position.z, reinterpret_cast(this->destCellX), this->destCellZ); - this->unknown_0534 = 0; - this->unknown_0538 = 0; + this->gSkillDx = 0; + this->gSkillDy = 0; this->render.angle = static_cast((g_session.m_playerDir + 4) * 45); this->render.accountId = g_session.m_aid; this->guildId = g_guildInfo.m_guildId; - this->unknown_023C = -1; - this->unknown_0504 = 0; - this->unknown_050C = 0; - this->unknown_0508 = 0; - this->unknown_0510 = 0; - this->unknown_0520 = 0; - this->unknown_0514 = 0; - this->unknown_051C = 0; - this->render.unknown_00A4Bytes[1] = 1; - this->unknown_052C = 0; - this->unknown_0530 = 0; - this->unknown_0524 = timeGetTime() - 1200; - this->unknown_0500 = timeGetTime() - 1200; + this->pathStartCell = -1; + this->preMoveStartTick = 0; + this->preMoveOn = 0; + this->proceedType = 0; + this->attackMode = 0; + this->totalAttackReqCnt = 0; + this->isAttackRequest = 0; + this->proceedTargetGid = 0; + this->render.visibilityOptions[1] = 1; + this->skillId = 0; + this->skillUseLevel = 0; + this->tickOfMoveForAttack = timeGetTime() - 1200; + this->attackReqTime = timeGetTime() - 1200; this->render.screenX = g_renderer->viewport.centerX; this->render.screenY = g_renderer->viewport.centerY; - this->unknown_0518 = 0; - this->unknown_053C = -1; - this->unknown_0540 = -1; - this->unknown_0528 = timeGetTime() - 1200; + this->isPreengageStateOfMove = 0; + this->preengageXOfMove = -1; + this->preengageYOfMove = -1; + this->standTick = timeGetTime() - 1200; this->SetState(0, 1); - *reinterpret_cast(&this->unknown_0170[4]) = *reinterpret_cast(&g_session.unknown_16F4[0]); - this->render.unknown_00A8 = 1; + *reinterpret_cast(&this->destinationAndSpeed[4]) = *reinterpret_cast(&g_session.healthPoints[0]); + this->render.isCharacter = 1; this->SetUnknown0260(g_session.SyncUnknown0E98()); const int bodyState = this->bodyState; const std::uint32_t stateFlags = this->stateFlags; - const int effectState = this->unknown_02C4; - this->bodyState = *reinterpret_cast(&g_session.unknown_0F0C[0]); + const int effectState = this->effectState; + this->bodyState = *reinterpret_cast(&g_session.statusLevelEffects[0]); this->stateFlags = g_session.m_jobFlags; - this->unknown_02C4 = *reinterpret_cast(&g_session.unknown_0F0C[4]); - this->SetMadogearType(g_session.unknown_8074); + this->effectState = *reinterpret_cast(&g_session.statusLevelEffects[4]); + this->SetMadogearType(g_session.madogearType); this->SetBodyCostume(g_session.m_bodyCostume, 0); this->SetSprAct2( - g_session.GetDisplayJob(), g_session.SyncUnknown0E98(), g_session.m_head, *reinterpret_cast(&g_session.unknown_0EDC[0x4]), - *reinterpret_cast(&g_session.unknown_0EDC[0x8]), *reinterpret_cast(&g_session.unknown_0EF4[0x0]), - *reinterpret_cast(&g_session.unknown_0EF4[0x4]), *reinterpret_cast(&g_session.unknown_0EF4[0x8]), + g_session.GetDisplayJob(), g_session.SyncUnknown0E98(), g_session.m_head, *reinterpret_cast(&g_session.weaponAppearance[0x4]), + *reinterpret_cast(&g_session.weaponAppearance[0x8]), *reinterpret_cast(&g_session.accessoryAppearance[0x0]), + *reinterpret_cast(&g_session.accessoryAppearance[0x4]), *reinterpret_cast(&g_session.accessoryAppearance[0x8]), g_session.m_headPalette, g_session.m_bodyStyle, g_session.m_jobFlags ); this->SetSprRobe(g_session.m_robe, 0); - if (g_session.unknown_6184 != 0) { - const int value = g_session.unknown_6184; + if (g_session.playerAppearanceState != 0) { + const int value = g_session.playerAppearanceState; this->SendMsg(nullptr, AM_STATUS_CHANGE, 0, 856, 0, 1, 0, value, value >> 31, 0, 0, 0, 0, 0, 0); } this->bodyState = bodyState; this->stateFlags = stateFlags; - this->unknown_02C4 = effectState; + this->effectState = effectState; this->SetStatusStates( - *reinterpret_cast(&g_session.unknown_0F0C[0]), g_session.m_jobFlags, *reinterpret_cast(&g_session.unknown_0F0C[4]), false + *reinterpret_cast(&g_session.statusLevelEffects[0]), g_session.m_jobFlags, *reinterpret_cast(&g_session.statusLevelEffects[4]), false ); this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0xA4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0544 = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + this->skillEffect = this->LaunchEffect(0xA4, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (!g_statusRefreshSuppressed) { this->ReapplySkillEffects(); } this->msgEffect = nullptr; - this->unknown_0314 = 0; + this->objectType = 0; this->SetUnknown0404(g_session.GetUnknown8134()); } // OFFSET: 0x00DB4290 // FUNCTION: fn_22651 void CPc::SetState(int state, int resetPosition) { - int current = this->render.unknown_0070; - if (current == 3 || this->unknown_017C != 0) { + int current = this->render.state; + if (current == 3 || this->isTrickDead != 0) { return; } @@ -4367,15 +4367,15 @@ void CPc::SetState(int state, int resetPosition) { } if (state == 3) { - const int job = this->GetEffectiveJob(JobNames::BaseJob(this->unknown_025C)); - this->LoadEquipAction(0, GetBodyActionResourceName(job, this->unknown_0260, this->unknown_04D0, this->GetMadogearType()).c_str()); - this->LoadEquipSprite(0, g_session.GetBodySprName(job, this->unknown_0260, this->unknown_04D0, this->GetMadogearType()).c_str()); - current = this->render.unknown_0070; + const int job = this->GetEffectiveJob(JobNames::BaseJob(this->job)); + this->LoadEquipAction(0, GetBodyActionResourceName(job, this->sex, this->bodyStyle, this->GetMadogearType()).c_str()); + this->LoadEquipSprite(0, g_session.GetBodySprName(job, this->sex, this->bodyStyle, this->GetMadogearType()).c_str()); + current = this->render.state; } if (current == 4 && static_cast(resetPosition) == 1) { - this->render.position.x = this->unknown_02D0; - this->render.position.z = this->unknown_02D4; + this->render.position.x = this->damageDestX; + this->render.position.z = this->damageDestZ; } int action; @@ -4398,14 +4398,14 @@ void CPc::SetState(int state, int resetPosition) { this->RegisterPos(); this->SetAction(action, 4, 1); this->render.isMotionFinished = true; - this->render.curMotion = this->unknown_043C; + this->render.curMotion = this->headDir; break; case ST_MOVE: - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } - this->unknown_043C = 0; + this->headDir = 0; CGameActor::SetState(1, resetPosition); break; case ST_STAND: @@ -4423,7 +4423,7 @@ void CPc::SetState(int state, int resetPosition) { break; } } - this->render.curMotion = this->unknown_043C; + this->render.curMotion = this->headDir; switch (current) { case ST_ATTACK: case ST_DAMAGE: @@ -4454,15 +4454,15 @@ void CPc::SetState(int state, int resetPosition) { this->SetAction(action, 4, 0); break; default: - if (this->unknown_02C8 != 0) { + if (this->healthState != 0) { this->SetAction(action, 4, 0); } break; } - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; case ST_SKILL: - if (this->render.unknown_0114 == 1 || this->render.unknown_0070 == 6) { + if (this->render.specialMotionLocked == 1 || this->render.state == 6) { return; } this->SetAction(action, 6, 1); @@ -4485,10 +4485,10 @@ void CPc::SetState(int state, int resetPosition) { this->SetSequenceInterval(4); this->SetFrameSequence(0x60, 0, 3, 0x60, 3, 1, 1000, 0); } - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case ST_ATTACK: { - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } @@ -4500,7 +4500,7 @@ void CPc::SetState(int state, int resetPosition) { weaponAllowed = true; } else { weaponAllowed = IsJobWeaponAllowed( - this->GetEffectiveJob(-1), this->unknown_0260, (static_cast(this->unknown_044C) << 32) | static_cast(this->weapon) + this->GetEffectiveJob(-1), this->sex, (static_cast(this->secondaryWeapon) << 32) | static_cast(this->weapon) ); } @@ -4532,7 +4532,7 @@ void CPc::SetState(int state, int resetPosition) { } CGameActor::SetState(attackState, resetPosition); - this->unknown_0378 = AttackMotionLength(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, weaponAllowed); + this->attackMotion = AttackMotionLength(this->GetEffectiveJob(-1), this->sex, this->weapon, weaponAllowed); int weaponView = this->weapon; if (weaponView > 105) { @@ -4545,32 +4545,32 @@ void CPc::SetState(int state, int resetPosition) { this->SetArrowEffectSuppressed(false); } else { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->render.speed * this->unknown_0378, 0); + (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->render.speed * this->attackMotion, 0); } - this->unknown_0378 = 8.0f / this->render.speed + this->unknown_0378; + this->attackMotion = 8.0f / this->render.speed + this->attackMotion; } - if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true && this->unknown_04D8[0] == 1) { + if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true && this->alternateDoramAppearance[0] == 1) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->unknown_0378 * this->render.speed, this->GetEffectiveJob(-1)); - this->unknown_0378 = 8.0f / this->render.speed + this->unknown_0378; + (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->attackMotion * this->render.speed, this->GetEffectiveJob(-1)); + this->attackMotion = 8.0f / this->render.speed + this->attackMotion; } break; } case ST_ATTACK2: { - this->unknown_0178 = 0; + this->isCounter = 0; if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } const bool weaponAllowed = IsJobWeaponAllowed( - this->GetEffectiveJob(-1), this->unknown_0260, (static_cast(this->unknown_044C) << 32) | static_cast(this->weapon) + this->GetEffectiveJob(-1), this->sex, (static_cast(this->secondaryWeapon) << 32) | static_cast(this->weapon) ); CGameActor::SetState(weaponAllowed ? 9 : 2, resetPosition); - this->unknown_0378 = AttackMotionLength(this->GetEffectiveJob(-1), this->unknown_0260, this->weapon, weaponAllowed); - if ((this->weapon == 14 && this->unknown_044C == 0) || (this->weapon == 13 && this->unknown_044C == 0)) { + this->attackMotion = AttackMotionLength(this->GetEffectiveJob(-1), this->sex, this->weapon, weaponAllowed); + if ((this->weapon == 14 && this->secondaryWeapon == 0) || (this->weapon == 13 && this->secondaryWeapon == 0)) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->unknown_0378 * this->render.speed, 0); - this->unknown_0378 = 8.0f / this->render.speed + this->unknown_0378; + (mode->*spawnArrow)(&this->render.position, this->hitTargetAid, this->attackMotion * this->render.speed, 0); + this->attackMotion = 8.0f / this->render.speed + this->attackMotion; } break; } @@ -4580,8 +4580,8 @@ void CPc::SetState(int state, int resetPosition) { } this->render.previousAnimation = this->Get8Dir(this->render.angle) + this->render.animation; - this->render.unknown_0070 = state; - this->render.unknown_008C = timeGetTime(); + this->render.state = state; + this->render.motionStartTime = timeGetTime(); } // OFFSET: 0x00DAC400 @@ -4600,7 +4600,7 @@ void CGrannyPc::Render(int argument) { const matrix& view = *reinterpret_cast(argument); if (this->renderFrame == 0) { - this->model->unknown_03B0 = reinterpret_cast(&this->attachLayer); + this->model->hairPivot = reinterpret_cast(&this->attachLayer); this->RenderModel(view, light, nullptr, 0, nullptr); for (int layer = 1; layer < 10; ++layer) { if (this->layerModels[layer]) { @@ -4615,7 +4615,7 @@ void CGrannyPc::Render(int argument) { } else { this->RenderCached(view, 0, nullptr); if (this->layerModels[1]) { - this->layerModels[1]->unknown_03B0 = reinterpret_cast(&this->attachLayer); + this->layerModels[1]->hairPivot = reinterpret_cast(&this->attachLayer); } for (int layer = 1; layer < 10; ++layer) { if (this->layerModels[layer]) { @@ -4653,7 +4653,7 @@ void CGrannyPc::RenderShadow(int argument, vector3d lightDirection, bool cached) const int offsetZ = static_cast(this->render.position.z - centerZ); std::memset(g_groundShadowPixels, 0, sizeof(g_groundShadowPixels)); - for (const vector3d& point : this->unknown_2558) { + for (const vector3d& point : this->attachmentPositions) { const float x = point.x * 0.35f; const float y = point.y * 0.35f; const int pixelX = static_cast(x * sine + y * cosine + 17.0f) + offsetX; @@ -4665,8 +4665,8 @@ void CGrannyPc::RenderShadow(int argument, vector3d lightDirection, bool cached) g_groundShadowPixels[index] = 0x5F000000; } } - this->unknown_2558.clear(); - this->unknown_2554->Upload(0, 0, 35, 35, g_groundShadowPixels, 0, 0); + this->attachmentPositions.clear(); + this->shadowTexture->Upload(0, 0, 35, 35, g_groundShadowPixels, 0, 0); } mode->WorldSubcell(this->render.position.x, this->render.position.z, column, row, subColumn, subRow); @@ -4693,7 +4693,7 @@ void CGrannyPc::RenderShadow(int argument, vector3d lightDirection, bool cached) uv[6] = (row1 * groundSine + column1 * groundCosine + 2.5f) / 5.0f; uv[7] = (row1 * groundCosine - column1 * groundSine + 2.5f) / 5.0f; ground->DrawGridDecal( - reinterpret_cast(argument), column + j, row + i, 0x70FFFFFF, *this->unknown_2554, uv); + reinterpret_cast(argument), column + j, row + i, 0x70FFFFFF, *this->shadowTexture, uv); } } } @@ -4701,41 +4701,41 @@ void CGrannyPc::RenderShadow(int argument, vector3d lightDirection, bool cached) struct PcStandEntry { /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int sex; /* 000C */ int cellX; /* 0010 */ int cellY; /* 0014 */ int direction; /* 0018 */ int speed; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; + /* 001C */ int xSize; + /* 0020 */ int ySize; + /* 0024 */ int head; + /* 0028 */ int weapon; + /* 002C */ int secondaryWeapon; + /* 0030 */ int accessory; /* 0034 */ int state; /* 0038 */ int bodyState; /* 003C */ int effectState; /* 0040 */ std::uint32_t stateFlags; - /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; + /* 0044 */ int healthState; + /* 0048 */ int shield; + /* 004C */ int accessory2; + /* 0050 */ int accessory3; + /* 0054 */ int headPalette; + /* 0058 */ int bodyPalette; + /* 005C */ int headDir; /* 0060 */ int guildId; /* 0064 */ int guildVersion; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; + /* 0068 */ int honor; + /* 006C */ int virtue; /* 0070 */ int robe; - /* 0074 */ int unknown_0074; - /* 0078 */ int unknown_0078; + /* 0074 */ int pkState; + /* 0078 */ int bodyStyle; }; struct PcMoveEntry { /* 0000 */ std::uint32_t aid; /* 0004 */ int job; - /* 0008 */ int unknown_0008; + /* 0008 */ int sex; /* 000C */ std::uint32_t moveStartTick; /* 0010 */ int startX; /* 0014 */ int startY; @@ -4744,27 +4744,27 @@ struct PcMoveEntry { /* 0020 */ int destX; /* 0024 */ int destY; /* 0028 */ int speed; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; + /* 002C */ int head; + /* 0030 */ int weapon; + /* 0034 */ int secondaryWeapon; + /* 0038 */ int accessory; /* 003C */ int bodyState; /* 0040 */ int effectState; /* 0044 */ std::uint32_t stateFlags; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; + /* 0048 */ int healthState; + /* 004C */ int shield; + /* 0050 */ int accessory2; + /* 0054 */ int accessory3; + /* 0058 */ int headPalette; + /* 005C */ int bodyPalette; /* 0060 */ int unknown_0060; /* 0064 */ int guildId; /* 0068 */ int guildVersion; - /* 006C */ int unknown_006C; - /* 0070 */ int unknown_0070; + /* 006C */ int honor; + /* 0070 */ int virtue; /* 0074 */ int robe; - /* 0078 */ int unknown_0078; - /* 007C */ int unknown_007C; + /* 0078 */ int pkState; + /* 007C */ int bodyStyle; }; // OFFSET: 0x00DAE890 @@ -4775,25 +4775,25 @@ void CPc::SendMsg( CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); switch (*reinterpret_cast(&message)) { case AM_SET_HEAD_DIR: - if (this->render.unknown_0070 == 0 || this->render.unknown_0070 == 6) { + if (this->render.state == 0 || this->render.state == 6) { this->render.curMotion = b; } break; case AM_REMOVEGAGE: - if (this->unknown_0490) { - g_windowMgr.Schedule(this->unknown_0490); - this->unknown_0490 = nullptr; + if (this->gaugeWindow) { + g_windowMgr.Schedule(this->gaugeWindow); + this->gaugeWindow = nullptr; } break; case AM_UPDATEGAGE: - if (!this->unknown_0490) { - this->unknown_0490 = new UIPcGage(); - this->unknown_0490->SetSize(60, 5); - g_windowMgr.AddRenderedFront(this->unknown_0490); + if (!this->gaugeWindow) { + this->gaugeWindow = new UIPcGage(); + this->gaugeWindow->SetSize(60, 5); + g_windowMgr.AddRenderedFront(this->gaugeWindow); } - static_cast(this->unknown_0490)->SetValues(b, d); - static_cast(this->unknown_0490)->SetLimits(0, 0); - this->unknown_0490->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY); + static_cast(this->gaugeWindow)->SetValues(b, d); + static_cast(this->gaugeWindow)->SetLimits(0, 0); + this->gaugeWindow->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY); break; case AM_STANDENTRY: { PcStandEntry* entry = reinterpret_cast(b); @@ -4801,21 +4801,21 @@ void CPc::SendMsg( this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_043C = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0048, entry->unknown_0054, entry->unknown_0058 + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -4834,28 +4834,28 @@ void CPc::SendMsg( } case AM_STANDENTRY2: { PcStandEntry* entry = reinterpret_cast(b); - this->unknown_04D0 = entry->unknown_0078; + this->bodyStyle = entry->bodyStyle; mode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_043C = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprAct2( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0054, entry->unknown_0058, entry->stateFlags + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->headPalette, entry->bodyPalette, entry->stateFlags ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); - this->unknown_04CC = entry->unknown_0074; + this->SetPropensityInfo(entry->honor, entry->virtue); + this->pkState = entry->pkState; switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -4883,7 +4883,7 @@ void CPc::SendMsg( } else { this->SetSprWeapon2(static_cast(weapon), static_cast(weapon >> 32)); } - this->SetSprShield(this->unknown_045C); + this->SetSprShield(this->shield); this->SetHeadPaletteName(); this->SetBodyPaletteName(); break; @@ -4896,22 +4896,22 @@ void CPc::SendMsg( this->render.position.y = gameMode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_043C = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0048, entry->unknown_0054, entry->unknown_0058 + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -4934,30 +4934,30 @@ void CPc::SendMsg( } case AM_INITSTANDENTRY2: { PcStandEntry* entry = reinterpret_cast(b); - this->unknown_04D0 = entry->unknown_0078; + this->bodyStyle = entry->bodyStyle; this->render.accountId = entry->aid; CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); gameMode->CellCenter(entry->cellX, entry->cellY, this->render.position.x, this->render.position.z); this->render.position.y = gameMode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_043C = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprAct2( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0054, entry->unknown_0058, entry->stateFlags + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->headPalette, entry->bodyPalette, entry->stateFlags ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -4976,34 +4976,34 @@ void CPc::SendMsg( this->LaunchEffect(0x158, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } this->ShowPartyMemberEffect(entry->aid); - this->unknown_04CC = entry->unknown_0074; + this->pkState = entry->pkState; break; } case AM_INITMOVEENTRY: { PcMoveEntry* entry = reinterpret_cast(b); this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_043C = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_004C, entry->unknown_0058, entry->unknown_005C + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); this->render.position.x += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubX - 8); this->render.position.z += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubY - 8); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } @@ -5012,103 +5012,103 @@ void CPc::SendMsg( } case AM_INITMOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); - this->unknown_04D0 = entry->unknown_007C; + this->bodyStyle = entry->bodyStyle; this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_043C = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprAct2( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_0058, entry->unknown_005C, entry->stateFlags + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->headPalette, entry->bodyPalette, entry->stateFlags ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); this->render.position.x += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubX - 8); this->render.position.z += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubY - 8); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } this->ShowPartyMemberEffect(entry->aid); - this->unknown_04CC = entry->unknown_0078; + this->pkState = entry->pkState; break; } case AM_MOVEENTRY: { PcMoveEntry* entry = reinterpret_cast(b); - this->unknown_04D0 = entry->unknown_007C; + this->bodyStyle = entry->bodyStyle; this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_043C = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_004C, entry->unknown_0058, entry->unknown_005C + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } this->ShowPartyMemberEffect(entry->aid); - this->unknown_04CC = entry->unknown_0078; + this->pkState = entry->pkState; break; } case AM_MOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); - this->unknown_04D0 = entry->unknown_007C; + this->bodyStyle = entry->bodyStyle; this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_043C = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprAct2( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_0058, entry->unknown_005C, entry->stateFlags + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->headPalette, entry->bodyPalette, entry->stateFlags ); this->SetSprRobe(entry->robe, 0); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } this->ShowPartyMemberEffect(entry->aid); - this->unknown_04CC = entry->unknown_0078; - this->unknown_04D0 = entry->unknown_007C; + this->pkState = entry->pkState; + this->bodyStyle = entry->bodyStyle; break; } case AM_CHANGE_RANK: - this->unknown_0494 = d; - this->unknown_0498 = b; + this->pkRank = d; + this->pkTotal = b; break; case AM_MAKE_BIRD: { - if (this->unknown_037C[0] != 0) { + if (this->statusEffects[0] != 0) { break; } int effectId; - switch (this->unknown_04D0) { + switch (this->bodyStyle) { case JT_HUNTER_H: effectId = 0x17; break; @@ -5142,16 +5142,16 @@ void CPc::SendMsg( effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); effect->SetAnimationSpeed(6.0f); this->AddMsgEffect(effect); - this->unknown_037C[0] = reinterpret_cast(effect); + this->statusEffects[0] = reinterpret_cast(effect); break; } case AM_MAKE_WOLF: { - if (this->unknown_037C[1] != 0) { + if (this->statusEffects[1] != 0) { break; } int effectId; - switch (this->unknown_04D0) { + switch (this->bodyStyle) { case JT_RANGER: case JT_RANGER_H: case JT_WOLF_RANGER: @@ -5178,7 +5178,7 @@ void CPc::SendMsg( } effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->AddMsgEffect(effect); - this->unknown_037C[1] = reinterpret_cast(effect); + this->statusEffects[1] = reinterpret_cast(effect); break; } default: @@ -5197,25 +5197,25 @@ void CGrannyPc::SendMsg( CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); switch (*reinterpret_cast(&message)) { case AM_SET_HEAD_DIR: - if (this->render.unknown_0070 == 0 || this->render.unknown_0070 == 6) { + if (this->render.state == 0 || this->render.state == 6) { this->render.curMotion = b; } break; case AM_REMOVEGAGE: - if (this->unknown_0478) { - g_windowMgr.Schedule(this->unknown_0478); - this->unknown_0478 = nullptr; + if (this->gaugeWindow) { + g_windowMgr.Schedule(this->gaugeWindow); + this->gaugeWindow = nullptr; } break; case AM_UPDATEGAGE: - if (!this->unknown_0478) { - this->unknown_0478 = new UIPcGage(); - this->unknown_0478->SetSize(60, 5); - g_windowMgr.AddRenderedFront(this->unknown_0478); + if (!this->gaugeWindow) { + this->gaugeWindow = new UIPcGage(); + this->gaugeWindow->SetSize(60, 5); + g_windowMgr.AddRenderedFront(this->gaugeWindow); } - static_cast(this->unknown_0478)->SetValues(b, d); - static_cast(this->unknown_0478)->SetLimits(0, 0); - this->unknown_0478->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY); + static_cast(this->gaugeWindow)->SetValues(b, d); + static_cast(this->gaugeWindow)->SetLimits(0, 0); + this->gaugeWindow->Move(this->render.screenX - 30, ScaleByScreenHeight(12) + this->render.screenY); break; case AM_STANDENTRY: { PcStandEntry* entry = reinterpret_cast(b); @@ -5223,21 +5223,21 @@ void CGrannyPc::SendMsg( this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_0430 = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0048, entry->unknown_0054, entry->unknown_0058 + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -5260,21 +5260,21 @@ void CGrannyPc::SendMsg( this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_0430 = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0048, entry->unknown_0054, entry->unknown_0058 + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -5297,7 +5297,7 @@ void CGrannyPc::SendMsg( this->SetImfFileName(); const std::int64_t weapon = this->GetWeapon(); this->SetSprWeapon(static_cast(weapon), static_cast(weapon >> 32)); - this->SetSprShield(this->unknown_0454); + this->SetSprShield(this->shield); this->SetHeadPaletteName(); this->SetBodyPaletteName(); break; @@ -5311,22 +5311,22 @@ void CGrannyPc::SendMsg( this->render.position.y = gameMode->scene->terrain->Height(this->render.position.x, this->render.position.z); this->render.angle = static_cast((entry->direction + 4) * 45); - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; - this->unknown_0294 = entry->unknown_001C; - this->unknown_0298 = entry->unknown_0020; - this->unknown_0158[5] = entry->cellX; - *reinterpret_cast(this->unknown_0170) = entry->cellY; - this->unknown_0430 = entry->unknown_005C; - *reinterpret_cast(this->unknown_029C) = entry->unknown_0024; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; + this->xSize = entry->xSize; + this->ySize = entry->ySize; + this->movementState[5] = entry->cellX; + *reinterpret_cast(this->destinationAndSpeed) = entry->cellY; + this->headDir = entry->headDir; + *reinterpret_cast(this->headType) = entry->head; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_0024, entry->unknown_0028, entry->unknown_002C, entry->unknown_0030, entry->unknown_004C, - entry->unknown_0050, entry->unknown_0048, entry->unknown_0054, entry->unknown_0058 + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0044); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_0068, entry->unknown_006C); + this->SetPropensityInfo(entry->honor, entry->virtue); switch (entry->state) { case PCSTATE_STAND: this->SetState(0, 1); @@ -5350,28 +5350,28 @@ void CGrannyPc::SendMsg( case AM_INITMOVEENTRY: { PcMoveEntry* entry = reinterpret_cast(b); this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_0430 = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_004C, entry->unknown_0058, entry->unknown_005C + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); this->render.position.x += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubX - 8); this->render.position.z += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubY - 8); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } @@ -5381,31 +5381,31 @@ void CGrannyPc::SendMsg( case AM_INITMOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; this->stateFlags = entry->stateFlags; - this->unknown_02C4 = entry->effectState; + this->effectState = entry->effectState; this->bodyState = entry->bodyState; - this->unknown_0430 = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_004C, entry->unknown_0058, entry->unknown_005C + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); mode->CellCenter(entry->startX, entry->startY, this->render.position.x, this->render.position.z); this->render.position.x += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubX - 8); this->render.position.z += static_cast(mode->scene->terrain->cellSize) * 0.0625f * static_cast(entry->startSubY - 8); this->render.position.y = mode->scene->terrain->Height(this->render.position.x, this->render.position.z); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } else { this->SetState(0, 1); } @@ -5416,30 +5416,30 @@ void CGrannyPc::SendMsg( case AM_MOVEENTRY2: { PcMoveEntry* entry = reinterpret_cast(b); this->render.accountId = entry->aid; - *reinterpret_cast(&this->unknown_0170[4]) = entry->speed; + *reinterpret_cast(&this->destinationAndSpeed[4]) = entry->speed; this->routeStartTick = entry->moveStartTick; - this->unknown_0430 = 0; + this->headDir = 0; entry->job = MountedJob(entry->job, entry->stateFlags); this->SetSprActFull( - entry->job, entry->unknown_0008, entry->unknown_002C, entry->unknown_0030, entry->unknown_0034, entry->unknown_0038, entry->unknown_0050, - entry->unknown_0054, entry->unknown_004C, entry->unknown_0058, entry->unknown_005C + entry->job, entry->sex, entry->head, entry->weapon, entry->secondaryWeapon, entry->accessory, entry->accessory2, + entry->accessory3, entry->shield, entry->headPalette, entry->bodyPalette ); this->SetStatusStates(entry->bodyState, entry->stateFlags, entry->effectState, false); - this->SetUnknown02C8(entry->unknown_0048); + this->SetUnknown02C8(entry->healthState); this->SetGuildInfo(entry->guildId, entry->guildVersion); - this->SetPropensityInfo(entry->unknown_006C, entry->unknown_0070); + this->SetPropensityInfo(entry->honor, entry->virtue); if (this->FindRoute(entry->startX, entry->startY, entry->startSubX, entry->startSubY, entry->destX, entry->destY, entry->speed)) { - this->unknown_0158[5] = entry->destX; - *reinterpret_cast(this->unknown_0170) = entry->destY; + this->movementState[5] = entry->destX; + *reinterpret_cast(this->destinationAndSpeed) = entry->destY; this->SetState(1, 1); - this->unknown_023C = 0; + this->pathStartCell = 0; } this->ShowPartyMemberEffect(entry->aid); break; } case AM_CHANGE_RANK: - this->unknown_047C = d; - this->unknown_0480 = b; + this->pkRank = d; + this->pkTotal = b; break; default: CGameActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); @@ -5452,9 +5452,9 @@ void CGrannyPc::SendMsg( // OFFSET: 0x00DAC080 // FUNCTION: fn_22592 bool CGrannyPc::ProcessState() { - if (static_cast(this->unknown_0278) > 0 && timeGetTime() > static_cast(this->unknown_0278)) { + if (static_cast(this->freezeEndTick) > 0 && timeGetTime() > static_cast(this->freezeEndTick)) { this->render.isMotionFreezed = false; - this->unknown_0278 = 0; + this->freezeEndTick = 0; } if (!this->UpdateFadeOut()) { @@ -5462,7 +5462,7 @@ bool CGrannyPc::ProcessState() { } g_modeMgr.GetGameMode(); - switch (this->render.unknown_0070) { + switch (this->render.state) { case ST_BEGIN_SKILL: { this->ProcessMotion(); const int frames = static_cast(this->GetElapsedFrames()); @@ -5488,9 +5488,9 @@ bool CGrannyPc::ProcessState() { } return true; case ST_DEAD: - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.isMotionFreezed = false; case ST_SIT: this->ProcessMotion(); @@ -5503,9 +5503,9 @@ bool CGrannyPc::ProcessState() { // OFFSET: 0x00DAC200 // FUNCTION: fn_22593 bool CPc::ProcessState() { - if (static_cast(this->unknown_0278) > 0 && timeGetTime() > static_cast(this->unknown_0278)) { + if (static_cast(this->freezeEndTick) > 0 && timeGetTime() > static_cast(this->freezeEndTick)) { this->render.isMotionFreezed = false; - this->unknown_0278 = 0; + this->freezeEndTick = 0; } if (!this->UpdateFadeOut()) { @@ -5513,7 +5513,7 @@ bool CPc::ProcessState() { } g_modeMgr.GetGameMode(); - switch (this->render.unknown_0070) { + switch (this->render.state) { case ST_BEGIN_SKILL: { this->ProcessMotion(); const int frames = static_cast(this->GetElapsedFrames()); @@ -5558,9 +5558,9 @@ bool CPc::ProcessState() { } return true; case ST_DEAD: - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.isMotionFreezed = false; case ST_SIT: case 60: @@ -5572,7 +5572,7 @@ bool CPc::ProcessState() { case 51: this->ProcessMotion(); if (this->render.isMotionFinished == true) { - this->render.unknown_0070 = 2; + this->render.state = 2; } return true; default: @@ -5583,21 +5583,21 @@ bool CPc::ProcessState() { // OFFSET: 0x00DBA5D0 // FUNCTION: fn_22673 void CPlayer::SetState(int state, int resetPosition) { - if (this->render.unknown_0070 == 3) { + if (this->render.state == 3) { return; } if (state != 1) { - reinterpret_cast(this->unknown_04F8) = -1; - this->unknown_04FC = -1; + reinterpret_cast(this->destCellX) = -1; + this->destCellZ = -1; } - if (this->unknown_0518 != 0 && this->IsSpecialState(this->render.unknown_0070)) { - const int cellX = this->unknown_053C; - const int cellY = this->unknown_0540; - this->unknown_0518 = 0; - this->unknown_053C = -1; - this->unknown_0540 = -1; + if (this->isPreengageStateOfMove != 0 && this->IsSpecialState(this->render.state)) { + const int cellX = this->preengageXOfMove; + const int cellY = this->preengageYOfMove; + this->isPreengageStateOfMove = 0; + this->preengageXOfMove = -1; + this->preengageYOfMove = -1; this->SendMsg(nullptr, AM_REQ_MOVE_PRIMITIVE, 0, cellX, cellX >> 31, cellY, cellY >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } diff --git a/Source/Contents/Actors/RenderObject.cpp b/Source/Contents/Actors/RenderObject.cpp index deb2f7bfe..2df20458c 100644 --- a/Source/Contents/Actors/RenderObject.cpp +++ b/Source/Contents/Actors/RenderObject.cpp @@ -143,7 +143,7 @@ public: /* 00A0 */ RenderVertex* vertices[30]; /* 0118 */ granny_system_clock clock; /* 0128 */ granny_system_clock startClock; - /* 0138 */ float unknown_0138; + /* 0138 */ float animationTime; /* 013C */ unsigned char unknown_013C[4]; /* 0140 */ int tick; /* 0144 */ float angle; @@ -155,21 +155,21 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(C3dGrannyGameActor, model) == 0x414); -static_assert(offsetof(C3dGrannyGameActor, unknown_052C) == 0x52C); +static_assert(offsetof(C3dGrannyGameActor, motionProgress) == 0x52C); static_assert(offsetof(C3dGrannyGameActor, motion) == 0x544); static_assert(offsetof(C3dGrannyGameActor, controls) == 0x658); static_assert(offsetof(C3dGrannyGameActor, commands) == 0x41C); static_assert(offsetof(C3dGrannyGameActor, vertices) == 0x494); static_assert(offsetof(C3dGrannyGameActor, alpha) == 0x53C); static_assert(offsetof(C3dGrannyGameActor, name) == 0x54C); -static_assert(offsetof(C3dGrannyGameActor, unknown_0650) == 0x650); -static_assert(offsetof(C3dGrannyGameActor, unknown_06A8) == 0x6A8); +static_assert(offsetof(C3dGrannyGameActor, renderState) == 0x650); +static_assert(offsetof(C3dGrannyGameActor, initializeFacing) == 0x6A8); static_assert(offsetof(C3dGrannyGameActor, texture) == 0xDB8); static_assert(offsetof(C3dGrannyGameActor, angle) == 0x538); static_assert(offsetof(C3dGrannyGameActor, brightness) == 0x540); static_assert(offsetof(C3dGrannyGameActor, meshTextures) == 0x6AC); static_assert(offsetof(C3dGrannyGameActor, meshTransforms) == 0x814); -static_assert(offsetof(C3dGrannyGameActor, unknown_0DBC) == 0xDBC); +static_assert(offsetof(C3dGrannyGameActor, litPositions) == 0xDBC); static_assert(offsetof(CGrannyCorpse3d, tick) == 0x140); static_assert(offsetof(CGrannyCorpse3d, alpha) == 0x148); static_assert(offsetof(CGrannyCorpse3d, startClock) == 0x128); @@ -196,16 +196,16 @@ bool CRenderObject::OnProcess() { void CRenderObject::ProcessMotion() { this->render.previousAnimation = this->render.animation + this->Get8Dir(this->render.angle); g_modeMgr.GetGameMode(); - const float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); CActRes* action = this->render.action; - if (this->render.unknown_0070 == 0x2D) { + if (this->render.state == 0x2D) { action = static_cast(ResourceMgr::Instance().Load("인간족\\몸통\\여\\아크비숍_여2.Act")); } if (action == nullptr) { return; } - if (this->render.unknown_00D8 != 0) { + if (this->render.animationSequenceActive != 0) { this->render.sequenceAnimation = this->render.sequenceAnimations[this->render.sequenceIndex]; this->render.sequenceFrame = this->render.sequenceFrames[this->render.sequenceIndex]; if (this->render.sequenceFinished != 0) { @@ -213,8 +213,8 @@ void CRenderObject::ProcessMotion() { this->render.previousAnimation = this->render.sequenceAnimations[4] + this->Get8Dir(this->render.angle); this->render.curMotion = this->render.sequenceFrames[4]; if (this->render.sequenceDeadline == 0) { - this->render.unknown_00D8 = 0; - this->render.unknown_006C = 1; + this->render.animationSequenceActive = 0; + this->render.motionType = 1; } } else { this->render.animation = this->render.sequenceAnimation; @@ -225,12 +225,12 @@ void CRenderObject::ProcessMotion() { return; } if (timeGetTime() >= this->render.sequenceDeadline) { - this->render.unknown_00D8 = 0; + this->render.animationSequenceActive = 0; this->render.sequenceDeadline = 0; - this->render.unknown_006C = 1; + this->render.motionType = 1; this->render.isMotionFinished = true; } - if (this->render.sequenceFinished == 0 && this->render.sequenceTick % this->render.unknown_00C2 == 0) { + if (this->render.sequenceFinished == 0 && this->render.sequenceTick % this->render.sequenceInterval == 0) { ++this->render.sequenceIndex; } if (this->render.sequenceIndex > this->render.sequenceLast) { @@ -246,14 +246,14 @@ void CRenderObject::ProcessMotion() { return; } - if (this->render.unknown_00DC != 0) { + if (this->render.timedSequenceActive != 0) { if (this->render.sequenceFinished != 0) { this->render.animation = this->render.sequenceFinishAnimation; this->render.previousAnimation = this->render.sequenceFinishAnimation + this->Get8Dir(this->render.angle); this->render.curMotion = this->render.sequenceFinishFrame; if (this->render.sequenceDeadline == 0) { - this->render.unknown_00C8 = 0; - this->render.unknown_006C = 1; + this->render.frameSequenceActive = 0; + this->render.motionType = 1; } } else { this->render.animation = this->render.sequenceAnimation; @@ -264,13 +264,13 @@ void CRenderObject::ProcessMotion() { return; } if (timeGetTime() >= this->render.sequenceDeadline) { - this->render.unknown_00C8 = 0; + this->render.frameSequenceActive = 0; this->render.sequenceDeadline = 0; - this->render.unknown_006C = 1; + this->render.motionType = 1; this->render.isMotionFinished = true; } if (this->render.sequenceFinished == 0) { - if (this->render.unknown_00FCBytes[2] == 3) { + if (this->render.fontSequenceBytes[2] == 3) { this->render.sequenceFrame = static_cast(~static_cast(frame * -2.0f / this->render.speed) - this->render.sequenceLast); } else { @@ -278,13 +278,13 @@ void CRenderObject::ProcessMotion() { } } if (this->render.sequenceFrame > this->render.sequenceLast) { - if (this->render.unknown_00FCBytes[2] == 2) { + if (this->render.fontSequenceBytes[2] == 2) { ++this->render.sequenceTick; - this->render.unknown_00FCBytes[2] = 3; + this->render.fontSequenceBytes[2] = 3; this->render.sequenceFrame = 0; return; } - this->render.unknown_00FCBytes[2] = 0; + this->render.fontSequenceBytes[2] = 0; this->render.sequenceFrame = this->render.sequenceLast; this->render.sequenceFinished = 1; } @@ -292,14 +292,14 @@ void CRenderObject::ProcessMotion() { return; } - if (this->render.unknown_00C8 != 0) { + if (this->render.frameSequenceActive != 0) { if (this->render.sequenceFinished != 0) { this->render.animation = this->render.sequenceFinishAnimation; this->render.previousAnimation = this->render.sequenceFinishAnimation + this->Get8Dir(this->render.angle); this->render.curMotion = this->render.sequenceFinishFrame; if (this->render.sequenceDeadline == 0) { - this->render.unknown_00C8 = 0; - this->render.unknown_006C = 1; + this->render.frameSequenceActive = 0; + this->render.motionType = 1; } } else { this->render.animation = this->render.sequenceAnimation; @@ -310,12 +310,12 @@ void CRenderObject::ProcessMotion() { return; } if (timeGetTime() >= this->render.sequenceDeadline) { - this->render.unknown_00C8 = 0; + this->render.frameSequenceActive = 0; this->render.sequenceDeadline = 0; - this->render.unknown_006C = 1; + this->render.motionType = 1; this->render.isMotionFinished = true; } - if (this->render.sequenceFinished == 0 && this->render.sequenceTick % this->render.unknown_00C2 == 0) { + if (this->render.sequenceFinished == 0 && this->render.sequenceTick % this->render.sequenceInterval == 0) { if (this->render.sequenceLoop != 0 && this->render.sequenceFinishAnimation == 0 && this->render.sequenceFinishFrame != 0) { --this->render.sequenceFrame; this->render.sequenceFinishFrame = 0; @@ -351,7 +351,7 @@ void CRenderObject::ProcessMotion() { int count; int motion; float progress; - switch (this->render.unknown_006C) { + switch (this->render.motionType) { case MT_LOOP: this->render.curMotion = static_cast(frame / this->render.speed) % static_cast(action->FrameCount(this->render.previousAnimation)); @@ -362,7 +362,7 @@ void CRenderObject::ProcessMotion() { motion = static_cast(progress); break; case MT_STATIC: { - if (this->render.unknown_0070 != 2) { + if (this->render.state != 2) { return; } count = static_cast(action->FrameCount(this->render.previousAnimation)); @@ -383,7 +383,7 @@ void CRenderObject::ProcessMotion() { progress /= static_cast(count); if (progress >= 1.0f) { this->render.curMotion = count - 1; - if (progress >= this->render.unknown_0060) { + if (progress >= this->render.motionFinishThreshold) { this->render.isMotionFinished = true; } } @@ -392,10 +392,10 @@ void CRenderObject::ProcessMotion() { // OFFSET: 0x00CB0AD0 // FUNCTION: fn_21096 void CRenderObject::PlayFrameSounds() { - int lastMotion = static_cast(this->render.unknown_0044); - if (lastMotion != this->render.curMotion || this->render.unknown_0040 != static_cast(this->render.animation)) { - if (this->render.unknown_0040 != static_cast(this->render.animation)) { - this->render.unknown_0044 = 0; + int lastMotion = static_cast(this->render.lastSoundMotion); + if (lastMotion != this->render.curMotion || this->render.lastSoundAnimation != static_cast(this->render.animation)) { + if (this->render.lastSoundAnimation != static_cast(this->render.animation)) { + this->render.lastSoundMotion = 0; lastMotion = 0; } CActRes* action = this->render.action; @@ -415,10 +415,10 @@ void CRenderObject::PlayFrameSounds() { } } else if (lastMotion > this->render.curMotion) { const int count = static_cast(action->FrameCount(this->render.previousAnimation)); - lastMotion = static_cast(this->render.unknown_0044); + lastMotion = static_cast(this->render.lastSoundMotion); if (lastMotion >= count) { lastMotion = count - 1; - this->render.unknown_0044 = static_cast(lastMotion); + this->render.lastSoundMotion = static_cast(lastMotion); } for (int motion = lastMotion + 1; motion < count; ++motion) { const ActionFrame& actionFrame = action->Frame(this->render.previousAnimation, motion); @@ -448,8 +448,8 @@ void CRenderObject::PlayFrameSounds() { } } } - this->render.unknown_0044 = static_cast(this->render.curMotion); - this->render.unknown_0040 = static_cast(this->render.animation); + this->render.lastSoundMotion = static_cast(this->render.curMotion); + this->render.lastSoundAnimation = static_cast(this->render.animation); } // OFFSET: 0x00CBF920 @@ -484,7 +484,7 @@ void CRenderObject::SetRenderInfo(const float*, float, float) { // OFFSET: 0x00CC2DA0 // FUNCTION: fn_21146 __declspec(noinline) void CGameActor::SetUnknown0260(int value) { - this->unknown_0260 = value & 1; + this->sex = value & 1; } // OFFSET: 0x00CC2E00 @@ -533,7 +533,7 @@ void CRenderObject::SetAction(unsigned animation, int, int repeat) { this->render.speed = 1.0f; } } - speed = this->render.speed * this->render.unknown_0064; + speed = this->render.speed * this->render.motionSpeedScale; if (g_replayAnimationScaling != 0) { speed *= Replay::Instance().AnimationScale(); } @@ -544,13 +544,13 @@ void CRenderObject::SetAction(unsigned animation, int, int repeat) { this->render.animation = animation; this->render.previousAnimation = animation; this->render.curMotion = 0; - this->render.unknown_006C = repeat; + this->render.motionType = repeat; this->render.isMotionFinished = 0; - this->render.unknown_0060 = 1.0f; - this->render.unknown_0064 = 1.0f; - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.motionFinishThreshold = 1.0f; + this->render.motionSpeedScale = 1.0f; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; } // OFFSET: 0x00CBFC00 @@ -574,7 +574,7 @@ void CRenderObject::SetColor(int alpha, int red, int green, int blue) { // OFFSET: 0x00CAF050 // FUNCTION: fn_21078 void CRenderObject::ModifyArgb(int alpha, int red, int green, int blue) { - if (this->render.unknown_00A3 == 0) { + if (this->render.colorLocked == 0) { unsigned char* argb = reinterpret_cast(&this->render.color); int newAlpha = argb[3] + alpha; int newRed = argb[2] + red; @@ -590,15 +590,15 @@ void CRenderObject::ModifyArgb(int alpha, int red, int green, int blue) { // OFFSET: 0x00CC1C20 // FUNCTION: fn_21125 void CGameActor::SetUnknown0305(unsigned char value, int extra) { - this->unknown_0305 = value; - this->unknown_0308 = extra; + this->hasSp = value; + this->spGaugeValue = extra; } // OFFSET: 0x00CC1D20 // FUNCTION: fn_21127 void CGameActor::RaiseUnknown03C8(int value) { - if (value <= 0 || this->unknown_03C8 < value) { - this->unknown_03C8 = value; + if (value <= 0 || this->transformPriority < value) { + this->transformPriority = value; } } @@ -611,7 +611,7 @@ void CRenderObject::SetSequenceDeadline(std::uint32_t duration) { // OFFSET: 0x00CC1E90 // FUNCTION: fn_21131 void CRenderObject::SetSequenceInterval(unsigned char interval) { - this->render.unknown_00C2 = interval; + this->render.sequenceInterval = interval; } // OFFSET: 0x00CC1EA0 @@ -638,9 +638,9 @@ void CRenderObject::SetAnimationSequence( this->render.sequenceLoop = loop; this->render.sequenceTimed = timed; this->render.sequenceFinished = 0; - this->render.unknown_00D8 = 1; - this->render.unknown_00C8 = 0; - this->render.unknown_00DC = 0; + this->render.animationSequenceActive = 1; + this->render.frameSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.sequenceDeadline = timed != 0 ? timeGetTime() + duration : 0; this->render.sequenceTick = 1; } @@ -660,9 +660,9 @@ void CRenderObject::SetFrameSequence( this->render.sequenceLoop = loop; this->render.sequenceTimed = timed; this->render.sequenceFinished = 0; - this->render.unknown_00C8 = 1; - this->render.unknown_00DC = 0; - this->render.unknown_00D8 = 0; + this->render.frameSequenceActive = 1; + this->render.timedSequenceActive = 0; + this->render.animationSequenceActive = 0; this->render.sequenceDeadline = timed != 0 ? timeGetTime() + duration : 0; this->render.sequenceTick = 1; } @@ -670,7 +670,7 @@ void CRenderObject::SetFrameSequence( // OFFSET: 0x00CC2050 // FUNCTION: fn_21134 void CGameActor::SetUnknown02E4(int value) { - this->unknown_02E4 = value; + this->isGroupMemberVisible = value; } // OFFSET: 0x00CC2780 @@ -688,54 +688,54 @@ void CRenderObject::SetAnimationSpeed(float speed) { // OFFSET: 0x00CC2810 // FUNCTION: fn_21142 void CGameActor::SetUnknown02C8(int value) { - this->unknown_02C8 = value; + this->healthState = value; } // OFFSET: 0x00CBF970 // FUNCTION: fn_21117 void CGameActor::SetAction(unsigned animation, int motion, int repeat) { - if (this->unknown_0314 == 7) { + if (this->objectType == 7) { if (!this->render.action || static_cast(this->render.action->animations.size()) <= static_cast(animation)) { return; } } CRenderObject::SetAction(animation, motion, repeat); - this->unknown_0238 = 0; - this->unknown_0378 = -1.0f; + this->isNeverAnimation = 0; + this->attackMotion = -1.0f; } // OFFSET: 0x00CC15F0 // FUNCTION: fn_21121 int CRenderObject::HoverHeight() { - this->render.unknown_00F8 += 2; - if (this->render.unknown_00F8 >= 360) { - this->render.unknown_00F8 -= 360; + this->render.hoverAngle += 2; + if (this->render.hoverAngle >= 360) { + this->render.hoverAngle -= 360; } - const short angle = this->render.unknown_00F8; - const int state = this->render.unknown_0070; + const short angle = this->render.hoverAngle; + const int state = this->render.state; if (state == 0 || state == 1 || (this->render.flags & 0x40000) != 0) { - if (this->render.unknown_00FA < 20) { + if (this->render.hoverHeight < 20) { if (angle % 30 == 0) { - ++this->render.unknown_00FA; + ++this->render.hoverHeight; } - } else if (this->render.unknown_00FA > 20 && angle % 30 == 0) { - --this->render.unknown_00FA; + } else if (this->render.hoverHeight > 20 && angle % 30 == 0) { + --this->render.hoverHeight; } } else if (state == 6) { - if (this->render.unknown_00FA < 100) { + if (this->render.hoverHeight < 100) { if (angle % 30 == 0) { - ++this->render.unknown_00FA; + ++this->render.hoverHeight; } - } else if (this->render.unknown_00FA > 100 && angle % 30 == 0) { - --this->render.unknown_00FA; + } else if (this->render.hoverHeight > 100 && angle % 30 == 0) { + --this->render.hoverHeight; } - } else if (this->render.unknown_00FA != 0) { - --this->render.unknown_00FA; + } else if (this->render.hoverHeight != 0) { + --this->render.hoverHeight; } - const short height = static_cast(g_sinTable[angle] * 4.0f + this->render.unknown_00FA); + const short height = static_cast(g_sinTable[angle] * 4.0f + this->render.hoverHeight); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const short scaled = static_cast(400.0f / mode->camera->camera.desiredDistance * height); return scaled < 0 ? 0 : scaled; @@ -745,7 +745,7 @@ int CRenderObject::HoverHeight() { // FUNCTION: fn_21122 void CRenderObject::DrawStatusOverlays(SpriteQuad quad, const std::uint32_t* palette) { if ((this->render.flags & 0x100) != 0) { - const short level = this->render.unknown_00F4; + const short level = this->render.effectPhase; bool draw = true; if (level <= 5) { quad.color = (static_cast(level * 50) << 24) + 0xFFFFFF; @@ -800,7 +800,7 @@ void CRenderObject::ApplySwing(int mode, int& x, int& y, int& outX, int& outY) c return; } - const int swing = static_cast(180.0f - g_sinTable[this->render.unknown_00F4 * 5 + 90] * 180.0f); + const int swing = static_cast(180.0f - g_sinTable[this->render.effectPhase * 5 + 90] * 180.0f); const int angle = swing >= 360 ? swing - 360 : swing; if (mode == 1) { x = static_cast(g_sinTable[angle] * 40.0f + x); @@ -816,7 +816,7 @@ void CRenderObject::ApplySwing(int mode, int& x, int& y, int& outX, int& outY) c // OFFSET: 0x00CC1C40 // FUNCTION: fn_21126 __declspec(noinline) void CRenderObject::DrawTintedQuad(SpriteQuad& quad, short red, short green, short blue, const std::uint32_t* palette) { - const unsigned char phase = this->render.unknown_00F6; + const unsigned char phase = this->render.tintPhase; if (phase <= 10) { quad.color = (((((phase * 15) << 8) + red) << 8) + green << 8) + blue; } else if (phase <= 20) { @@ -826,7 +826,7 @@ __declspec(noinline) void CRenderObject::DrawTintedQuad(SpriteQuad& quad, short quad.color = ((((alpha << 8) + red) << 8) + green << 8) + blue; } - if (this->render.unknown_00F6 <= 50) { + if (this->render.tintPhase <= 50) { this->DrawQuad(quad, palette, 5, 0.0f, 0.0f, 0); this->DrawQuad(quad, palette, 5, 0.0f, 0.0f, 0); } @@ -869,16 +869,16 @@ void CGameActor::SetImfFileName() { // FUNCTION: fn_21141 void CGameActor::SetUnknown0318(const float* value, int index) { if (index == 0) { - std::memcpy(this->unknown_0318, value, sizeof(this->unknown_0318)); + std::memcpy(this->homunMsg, value, sizeof(this->homunMsg)); } else if (index == 1) { - std::memcpy(this->unknown_0348, value, sizeof(this->unknown_0348)); + std::memcpy(this->merMsg, value, sizeof(this->merMsg)); } } // OFFSET: 0x00CC2820 // FUNCTION: fn_21143 void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { // GLOBAL: gl_25185 static int s_minPickSize = static_cast(g_renderer->UiScaleX() * 40.0f); @@ -890,7 +890,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 200.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { - depth = this->unknown_0314 == 7 ? 50.0f : 400.0f; + depth = this->objectType == 7 ? 50.0f : 400.0f; } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } @@ -900,7 +900,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 200.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { - depth = this->unknown_0314 == 7 ? 50.0f : 400.0f; + depth = this->objectType == 7 ? 50.0f : 400.0f; } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } @@ -912,7 +912,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 100.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { - depth = this->unknown_0314 == 7 ? 50.0f : 200.0f; + depth = this->objectType == 7 ? 50.0f : 200.0f; } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } @@ -922,14 +922,14 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { } else if (g_session.IsNpcJob(this->GetEffectiveJob(-1))) { depth = 100.0f; } else if (g_session.IsMonsterClass(this->GetEffectiveJob(-1))) { - depth = this->unknown_0314 == 7 ? 50.0f : 200.0f; + depth = this->objectType == 7 ? 50.0f : 200.0f; } else if (g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0) { depth = 200.0f; } } } - switch (this->unknown_0314) { + switch (this->objectType) { case 9: case 10: case 13: @@ -938,7 +938,7 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { break; } - if (!this->unknown_03E1) { + if (!this->modelReady) { if (bounds[0] == static_cast(g_renderer->viewport.width) && bounds[1] == static_cast(g_renderer->viewport.height) && bounds[2] == 0.0f && bounds[3] == 0.0f) { return; @@ -953,13 +953,13 @@ void CGameActor::SetRenderInfo(const float* bounds, float x, float y) { info->depthOffset = depth + bounds[4]; info->accountId = this->render.accountId; info->job = this->GetEffectiveJob(-1); - info->unknown_0024 = this->unknown_02C8; - if (this->unknown_0314 == 7) { + info->healthState = this->healthState; + if (this->objectType == 7) { info->kind = 3; } else { info->kind = g_session.IsSkillIdInRange6001(this->GetEffectiveJob(-1)) != 0 ? 4 : 0; } - switch (this->unknown_0314) { + switch (this->objectType) { case 9: case 10: case 13: @@ -1095,9 +1095,9 @@ void CGameActor::PlayGroundSkillEffect(int sender, const int* skill, int argumen break; case HT_DETECTING: mode->LaunchDummyEffect(&position, 0x77, EffectLifetime(0x77) + 10, 0); - if (this->unknown_037C[0] != 0) { + if (this->statusEffects[0] != 0) { const int address = reinterpret_cast(&position); - reinterpret_cast(this->unknown_037C[0])->SendMsg(nullptr, AM_REQ_ATTACK, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + reinterpret_cast(this->statusEffects[0])->SendMsg(nullptr, AM_REQ_ATTACK, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; case AS_VENOMDUST: @@ -1246,9 +1246,9 @@ void CGameActor::PlayGroundSkillEffect(int sender, const int* skill, int argumen // FUNCTION: fn_21145 void CGameActor::SetUnknown0330(const float* value, int index) { if (index == 0) { - std::memcpy(this->unknown_0330, value, sizeof(this->unknown_0330)); + std::memcpy(this->homunResMsg, value, sizeof(this->homunResMsg)); } else if (index == 1) { - std::memcpy(this->unknown_0360, value, sizeof(this->unknown_0360)); + std::memcpy(this->merResMsg, value, sizeof(this->merResMsg)); } } @@ -1294,15 +1294,15 @@ void CGameActor::SetState(int state, int resetPosition) { g_session.m_homunActionState = 0; g_session.m_mercenaryActionState = 0; - if (this->render.unknown_0070 == 3 || this->unknown_017C != 0 || state == -1) { + if (this->render.state == 3 || this->isTrickDead != 0 || state == -1) { return; } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (this->render.unknown_0070 == 4 && static_cast(resetPosition) == 1) { - this->render.position.x = this->unknown_02D0; - this->render.position.z = this->unknown_02D4; - this->render.position.y = mode->scene->terrain->Height(this->unknown_02D0, this->unknown_02D4); + if (this->render.state == 4 && static_cast(resetPosition) == 1) { + this->render.position.x = this->damageDestX; + this->render.position.z = this->damageDestZ; + this->render.position.y = mode->scene->terrain->Height(this->damageDestX, this->damageDestZ); } const std::uint32_t aid = this->render.accountId; @@ -1313,7 +1313,7 @@ void CGameActor::SetState(int state, int resetPosition) { isPlayer = false; } - if (state != static_cast(this->render.unknown_0070) && this->render.unknown_0070 == 1 && isPlayer) { + if (state != static_cast(this->render.state) && this->render.state == 1 && isPlayer) { CellFloatPos pos; pos.x = this->render.position.x; pos.z = this->render.position.z; @@ -1331,7 +1331,7 @@ void CGameActor::SetState(int state, int resetPosition) { case ST_AUTOCOUNTER: if (g_session.IsPlayerJobId(this->GetEffectiveJob(-1))) { const std::int64_t weapon = this->GetWeapon(); - IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->unknown_0260, weapon); + IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->sex, weapon); this->SetAction(action, 4, 1); this->render.isMotionFreezed = true; } else { @@ -1340,7 +1340,7 @@ void CGameActor::SetState(int state, int resetPosition) { } break; case ST_DAMAGE: { - if (this->render.unknown_00C8 != 0 || this->render.unknown_00D8 != 0 || this->render.unknown_00DC != 0) { + if (this->render.frameSequenceActive != 0 || this->render.animationSequenceActive != 0 || this->render.timedSequenceActive != 0) { return; } @@ -1361,13 +1361,13 @@ void CGameActor::SetState(int state, int resetPosition) { break; } case ST_SKILL: - if (this->render.unknown_0070 == 6) { + if (this->render.state == 6) { return; } case ST_ATTACK: case ST_ATTACK2: - this->SetAction(action, 3, this->unknown_0404 == 1 ? 2 : 1); - if (this->render.unknown_0070 != 9 && this->render.unknown_0070 != 2) { + this->SetAction(action, 3, this->shapeShift == 1 ? 2 : 1); + if (this->render.state != 9 && this->render.state != 2) { if (this->hitTargetAid == g_session.m_aid) { CRenderObject* target = mode->scene->player; if (this->render.accountId != this->hitTargetAid) { @@ -1383,13 +1383,13 @@ void CGameActor::SetState(int state, int resetPosition) { if (this->GetEffectiveJob(-1) == 0x505) { this->LaunchAttackProjectile(this->hitTargetAid, 28.0f); } - this->unknown_0378 = static_cast(this->GetAttackMotion()); + this->attackMotion = static_cast(this->GetAttackMotion()); this->RegisterPos(); break; case ST_DEAD: - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.isMotionFreezed = false; if (this->bodyState == BODYSTATE_FREEZING) { this->SendMsg(nullptr, AM_DELETE_ICEEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -1408,13 +1408,13 @@ void CGameActor::SetState(int state, int resetPosition) { this->RegisterPos(); break; case ST_MOVE: - if (this->unknown_0184 == 0) { + if (this->isAsuraAttack == 0) { this->SetAction(action, 6, 0); } this->UnRegisterPos(); break; case ST_PICKUP: - this->unknown_0178 = 0; + this->isCounter = 0; this->render.isMotionFreezed = false; case ST_ATTACKWAIT: this->SetAction(action, 6, 1); @@ -1424,27 +1424,27 @@ void CGameActor::SetState(int state, int resetPosition) { this->RegisterPos(); break; case ST_DANCE: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 1, 3, 0, 0, 1, 99999999, 1); break; case ST_SING: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 1, 3, action, 1, 1, 99999999, 1); break; case ST_READYSHOT: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 0, 0, action, 0, 1, 3000, 0); break; case ST_THROW2: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetAnimationSequence(action, 0, action, 1, action, 2, action, 3, action, 4, 1, 1000, 0); break; case ST_READYJUMP: if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true) { - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetAnimationSequence(action, 0, action, 0, action, 0, action, 1, action, 1, 1, 3000, 0); } else { - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetAnimationSequence(action, 0, action, 0, action, 0, action, 1, action, 1, 1, 3000, 0); while (HasEffectOfType(this->state.effects, 0x1be)) { this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0x1be, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -1457,51 +1457,51 @@ void CGameActor::SetState(int state, int resetPosition) { } break; case ST_LANDJUMP: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetAnimationSequence(action, 1, action, 1, action, 1, action, 1, 8, 5, 1, 3000, 0); break; case ST_R_STORM: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 0, 0, action, 0, 1, 2000, 0); this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case ST_A_STORM: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 1, 1, action, 1, 1, 2000, 0); break; case ST_R_DOWN: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 2, 2, action, 2, 1, 2000, 0); this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case ST_SG_DOWN: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 2, 2, action, 2, 1, 1000, 0); break; case ST_A_DOWN: - this->render.unknown_00C2 = 5; + this->render.sequenceInterval = 5; this->SetAnimationSequence(0x50, 3, 0x50, 5, 0x50, 7, 0x50, 8, 0x50, 2, 1, 500, 0); break; case ST_R_TURN: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 3, 3, action, 3, 1, 2000, 0); this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case ST_SG_TURN: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 3, 3, action, 3, 1, 1000, 0); break; case ST_A_TURN: - this->render.unknown_00C2 = 5; + this->render.sequenceInterval = 5; this->SetAnimationSequence(action, 4, action, 5, action, 6, action, 7, action, 2, 1, 500, 0); break; case ST_R_COUNTER: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 4, 4, action, 4, 1, 2000, 0); this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case ST_A_COUNTER: { - this->render.unknown_00C2 = 4; + this->render.sequenceInterval = 4; int frame0; int frame1; int frame2; @@ -1525,35 +1525,35 @@ void CGameActor::SetState(int state, int resetPosition) { break; } case ST_R_DODGE: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 1, 1, action, 1, 1, 2000, 0); this->LaunchEffect(0x1c1, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case ST_A_JUMPKICK: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 5, 5, action, 5, 1, 3000, 0); break; case ST_NINJASKILL2: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 2, 5, action, 5, 1, 1000, 0); break; case 0x37: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 2, 4, action, 4, 1, 500, 0); break; case 0x38: this->render.isMotionFinished = false; case ST_NINJASKILL1: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 1, action, 1, 1, 500, 0); break; case 0x39: this->render.isMotionFinished = false; - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 5, 5, action, 5, 1, 500, 0); break; case ST_NINJAREADY: { - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; int random = rand() % 2; random = random < 0 ? 0 : random; const int frame = (random != 0) + 2; @@ -1561,7 +1561,7 @@ void CGameActor::SetState(int state, int resetPosition) { break; } case ST_GUNSKILL1: { - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; int random = rand() % 2; random = random < 0 ? 0 : random; if (random != 0) { @@ -1572,11 +1572,11 @@ void CGameActor::SetState(int state, int resetPosition) { break; } case ST_GUNSKILL3: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 2, action, 2, 1, 500, 0); break; case ST_GUNREADY: { - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; int random = rand() % 2; random = random < 0 ? 0 : random; const int frame = (random != 0) + 1; @@ -1584,15 +1584,15 @@ void CGameActor::SetState(int state, int resetPosition) { break; } case ST_GUNREADY2: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 0, 0, action, 0, 1, 500, 0); break; case ST_MADOSKILL: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 5, 5, action, 5, 1, 500, 0); break; case ST_MADOSKILL2: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 4, 4, action, 4, 1, 500, 0); break; case ST_AB_SPECIAL: @@ -1604,7 +1604,7 @@ void CGameActor::SetState(int state, int resetPosition) { this->SetAction(action, 3, 1); break; case 0x2e: - this->render.unknown_00C2 = 20; + this->render.sequenceInterval = 20; this->SetAnimationSequence(action, 0, action, 0, action, 0, action, 1, action, 1, 1, 3000, 0); while (HasEffectOfType(this->state.effects, 0x1be)) { this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 0x1be, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -1616,142 +1616,142 @@ void CGameActor::SetState(int state, int resetPosition) { this->LaunchEffect(0x19b, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); break; case 0x2f: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 3, action, 3, 1, 9999999, 1); break; case ST_GUNSKILL2: case 0x30: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 4, 5, action, 5, 1, 500, 0); break; case 0x31: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 7, action, 7, 1, 1000, 0); this->render.isMotionFinished = false; break; case 0x32: - this->render.unknown_00C2 = 10; + this->render.sequenceInterval = 10; this->SetFrameSequence(action, 0, 0, action, 0, 1, 9999999, 0); break; case 0x33: - this->render.unknown_00C2 = 4; + this->render.sequenceInterval = 4; this->SetAnimationSequence(action, 2, action, 3, action, 4, action, 4, action, 4, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x3e: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x3f: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x40: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 4, action, 4, 1, 500, 0); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x41: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 4, action, 4, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x3c: case 0x3d: case 0x42: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 0, action, 0, 1, 500, 0); break; case 0x43: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 5, action, 5, 1, 500, 0); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x44: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 5, action, 5, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x45: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 8, action, 8, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x46: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x4c: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x47: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 4, 8, action, 8, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x48: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 4, action, 4, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x49: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 3, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x4d: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 3, 7, action, 7, 1, 500, 0); this->render.isMotionFinished = false; break; case 0x4b: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 2, 5, action, 5, 1, 500, 1); this->render.isMotionFinished = false; break; case 0x4e: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 4, action, 4, 1, 500, 1); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x4f: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 1, 8, action, 4, 1, 500, 1); this->render.isMotionFinished = false; - this->unknown_0378 = 6.0f; + this->attackMotion = 6.0f; break; case 0x50: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 0, 5, action, 5, 1, 500, 1); this->render.isMotionFinished = false; break; case 0x51: - this->render.unknown_00C2 = 6; + this->render.sequenceInterval = 6; this->SetFrameSequence(action, 5, 5, action, 5, 1, 9999999, 0); break; } this->render.previousAnimation = this->Get8Dir(this->render.angle) + this->render.animation; - const int previous = this->render.unknown_0070; + const int previous = this->render.state; if (previous == 0 || previous == 6) { - this->render.unknown_0074 = previous; + this->render.previousState = previous; } - this->render.unknown_0070 = state; + this->render.state = state; if (state == 7 || state == 0x31) { - this->render.unknown_0070 = 7; + this->render.state = 7; } - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); } // OFFSET: 0x00CA9E50 @@ -1769,9 +1769,9 @@ void CRenderObject::RenderBlur( SpriteQuad quad; for (int direction = 1; direction < 5; ++direction) { - const float distance = static_cast(this->render.unknown_00F4) * scale; + const float distance = static_cast(this->render.effectPhase) * scale; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - short alpha = static_cast((30 - this->render.unknown_00F4) * 5); + short alpha = static_cast((30 - this->render.effectPhase) * 5); if (alpha < 0) { alpha = 0; } @@ -1805,7 +1805,7 @@ void CRenderObject::RenderBlur( quad.bottom -= static_cast(shift); quad.bottomRhw = bottomRhw; quad.topRhw = topRhw; - quad.angle = static_cast(cell->unknown_001C + static_cast(this->render.unknown_007C)); + quad.angle = static_cast(cell->rotation + static_cast(this->render.spriteAngle)); this->DrawQuad(quad, palette, 0x201, 0.0f, 0.0f, 0); } } @@ -1847,7 +1847,7 @@ void CRenderObject::RenderAura( return; } - unsigned char& phaseTick = this->render.unknown_00ECBytes[3]; + unsigned char& phaseTick = this->render.effectPhaseBytes[3]; ++phaseTick; if (phaseTick >= 200) { phaseTick -= 200; @@ -1881,7 +1881,7 @@ void CRenderObject::RenderAura( trail.color = (static_cast(alpha) << 24) + 0xFFFFFF; trail.bottomRhw = bottomRhw - spread * 0.000005f - 0.00001f; trail.topRhw = topRhw - spread * 0.000005f - 0.00001f; - trail.angle = static_cast(static_cast(this->render.unknown_007C) + cell->unknown_001C); + trail.angle = static_cast(static_cast(this->render.spriteAngle) + cell->rotation); if (blend != 5) { this->DrawQuad(trail, palette, blend, 0.0f, 0.0f, 0); } @@ -1900,7 +1900,7 @@ void CRenderObject::DrawPulseOutline( return; } - unsigned char& phase = this->render.unknown_00ECBytes[2]; + unsigned char& phase = this->render.effectPhaseBytes[2]; ++phase; if (phase > 180) { phase = 0; @@ -1928,7 +1928,7 @@ void CRenderObject::DrawPulseOutline( outline.topRhw = topRhw - 0.00005f; outline.image = image; outline.color = color; - outline.angle = static_cast(cell.unknown_001C + static_cast(this->render.unknown_007C)); + outline.angle = static_cast(cell.rotation + static_cast(this->render.spriteAngle)); this->DrawQuad(outline, palette, 5, 0.0f, 0.0f, 0); } @@ -1960,10 +1960,10 @@ void CRenderObject::DrawSpriteEffects( short step = 1; for (int distance = 3; distance <= 30; distance += 3, ++step) { short alpha; - if (this->render.unknown_00F4 > 130) { - alpha = 245 - step * 10 - this->render.unknown_00F4; + if (this->render.effectPhase > 130) { + alpha = 245 - step * 10 - this->render.effectPhase; } else { - alpha = this->render.unknown_00F4 - (step * 5 + 50); + alpha = this->render.effectPhase - (step * 5 + 50); } if (alpha > 200) { alpha = 200; @@ -1993,14 +1993,14 @@ void CRenderObject::DrawSpriteEffects( shadow.color = (alpha << 24) + 0xFFFFFF; shadow.bottomRhw = bottomRhw + spread * 0.000005f + 0.00001f; shadow.topRhw = topRhw + spread * 0.000005f + 0.00001f; - shadow.angle = static_cast(static_cast(this->render.unknown_007C) + cell->unknown_001C); + shadow.angle = static_cast(static_cast(this->render.spriteAngle) + cell->rotation); this->DrawQuad(shadow, palette, 5, 0.0f, 0.0f, 0); } } if ((this->render.flags & 0x80002) != 0) { for (int distance = 1; distance <= 2; ++distance) { - const unsigned char alpha = this->render.unknown_00F2; + const unsigned char alpha = this->render.outlineAlpha; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const float spread = 400.0f / mode->camera->camera.desiredDistance * static_cast(distance); @@ -2026,7 +2026,7 @@ void CRenderObject::DrawSpriteEffects( } else { glow.color = (alpha << 24) + 0x059B05; } - glow.angle = static_cast(static_cast(this->render.unknown_007C) + cell->unknown_001C); + glow.angle = static_cast(static_cast(this->render.spriteAngle) + cell->rotation); this->DrawQuad(glow, palette, 5, 0.0f, 0.0f, 0); } } @@ -2037,7 +2037,7 @@ void CRenderObject::DrawSpriteEffects( actor->ApplySpriteJitter(quad, box, offset, 21, 10); if ((this->render.flags & 0x100000) != 0) { - short angle = static_cast(cell->unknown_001C) + static_cast(this->render.unknown_007C) + 60; + short angle = static_cast(cell->rotation) + static_cast(this->render.spriteAngle) + 60; if (angle >= 360) { angle -= 360; } @@ -2163,7 +2163,7 @@ void CGameActor::SetPropensityInfo(int, int) { // OFFSET: 0x005A19E0 // FUNCTION: fn_03062 void CGameActor::SetRiding(unsigned char value) { - this->unknown_02CC = value; + this->isRiding = value; } // OFFSET: 0x005A1A40 @@ -2206,10 +2206,10 @@ int CGameActor::GetAttackMotion() { // FUNCTION: fn_21048 float* CGameActor::GetMsg2AI(int index) { if (index == 0) { - return this->unknown_0318; + return this->homunMsg; } if (index == 1) { - return this->unknown_0348; + return this->merMsg; } return nullptr; } @@ -2218,10 +2218,10 @@ float* CGameActor::GetMsg2AI(int index) { // FUNCTION: fn_21052 float* CGameActor::GetResMsg2AI(int index) { if (index == 0) { - return this->unknown_0330; + return this->homunResMsg; } if (index == 1) { - return this->unknown_0360; + return this->merResMsg; } return nullptr; } @@ -2229,7 +2229,7 @@ float* CGameActor::GetResMsg2AI(int index) { // OFFSET: 0x00CADB70 // FUNCTION: fn_21061 bool CGameActor::HasShapeShift() { - return this->unknown_0404 != 0; + return this->shapeShift != 0; } // OFFSET: 0x00CAE500 @@ -2246,12 +2246,12 @@ void CGameActor::MakeCorpse() { ); if (corpse) { - if (static_cast(this->render.unknown_010C) > 0) { - corpse->render.unknown_010C = this->render.unknown_010C; + if (static_cast(this->render.spriteJob) > 0) { + corpse->render.spriteJob = this->render.spriteJob; } if (CEffect* effect = g_effectMgr->Find(static_cast(this->render.accountId), 2374)) { - corpse->spriteOffset = *reinterpret_cast(&effect->unknown_0048); + corpse->spriteOffset = *reinterpret_cast(&effect->scaleParameter); } } } @@ -2260,7 +2260,7 @@ void CGameActor::MakeCorpse() { // FUNCTION: fn_21076 void CGameActor::ShowPartyMemberEffect(std::uint32_t accountId) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (mode->scene->unknown_0048 == 0 && mode->scene->unknown_0054 == 0) { + if (mode->scene->isPKZone == 0 && mode->scene->isEventPVPMode == 0) { return; } @@ -2427,8 +2427,8 @@ void CGameActor::LaunchAttackProjectile(int target, float scale) { // OFFSET: 0x00CABEB0 // FUNCTION: fn_21040 int CGameActor::GetMonsterTransformJob() { - if (this->unknown_03C4 != -1) { - return this->unknown_03C4; + if (this->monsterTransformJob != -1) { + return this->monsterTransformJob; } int result = -1; @@ -2436,15 +2436,15 @@ int CGameActor::GetMonsterTransformJob() { return g_session.GetPairValue(); } - if (this->unknown_03B8[0] != -1) { - result = this->unknown_03B8[0]; + if (this->transformJobs[0] != -1) { + result = this->transformJobs[0]; } - int second = this->unknown_03B8[1]; + int second = this->transformJobs[1]; if (second == -1) { second = result; } - if (this->unknown_03B8[2] != -1) { - second = this->unknown_03B8[2]; + if (this->transformJobs[2] != -1) { + second = this->transformJobs[2]; } return second; } @@ -2453,7 +2453,7 @@ int CGameActor::GetMonsterTransformJob() { // FUNCTION: fn_21042 int CGameActor::GetEffectiveJob(int job) { if (job == -1) { - job = this->unknown_025C; + job = this->job; } if (StateFlag12(this->GetStateFlags())) { @@ -2473,7 +2473,7 @@ int CGameActor::GetEffectiveJob(int job) { if (StateFlag28(this->GetStateFlags())) { return JT_OKTOBERFEST; } - if (this->unknown_03DC == 1) { + if (this->mountedState == 1) { return JT_SUMMER2; } } @@ -2595,7 +2595,7 @@ void CGameActor::SetModifyFactorOfmotionSpeed(int value) { value = g_maxMoveSpeed; } const float speed = static_cast(value) / 432.0f; - this->render.unknown_0064 = speed; + this->render.motionSpeedScale = speed; this->render.motionSpeed = speed; } @@ -2661,17 +2661,17 @@ void CCharacterNpc::Render(int) { return; } - CCharacterRender* characterRender = reinterpret_cast(this->unknown_0440); - characterRender->unknown_0040 = this->render.previousAnimation; - characterRender->unknown_0044 = this->render.curMotion; + CCharacterRender* characterRender = reinterpret_cast(this->characterRender); + characterRender->actionIndex = this->render.previousAnimation; + characterRender->frameIndex = this->render.curMotion; char useBounds = 0; - std::list drawList = characterRender->BuildDrawList(this->render.unknown_00A4Bytes[1], &useBounds); + std::list drawList = characterRender->BuildDrawList(this->render.visibilityOptions[1], &useBounds); float bounds[5]; - std::memcpy(bounds, characterRender->unknown_0094, sizeof(bounds)); - const float tlvertX = *reinterpret_cast(&characterRender->unknown_00A8); - const float tlvertY = *reinterpret_cast(&characterRender->unknown_00AC); + std::memcpy(bounds, characterRender->renderBounds, sizeof(bounds)); + const float tlvertX = *reinterpret_cast(&characterRender->screenX); + const float tlvertY = *reinterpret_cast(&characterRender->screenY); if (useBounds == 1) { this->SetRenderInfo(bounds, tlvertX, tlvertY); } else { @@ -2687,61 +2687,61 @@ struct CharacterNpcViewInfo { /* 0000 */ int unknown_0000; /* 0004 */ int job; /* 0008 */ int unknown_0008[10]; - /* 0030 */ int unknown_0030; + /* 0030 */ int standAccessory; /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; + /* 0038 */ int moveAccessory; /* 003C */ int unknown_003C[4]; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; - /* 0060 */ int unknown_0060; - /* 0064 */ int unknown_0064; + /* 004C */ int standAccessory2; + /* 0050 */ int standAccessory3OrMoveAccessory2; + /* 0054 */ int standBodyPaletteOrMoveAccessory3; + /* 0058 */ int standHeadPaletteOrMoveBodyPalette; + /* 005C */ int moveHeadPalette; + /* 0060 */ int guildId; + /* 0064 */ int guildEmblemVersion; /* 0068 */ int unknown_0068[2]; /* 0070 */ int robe; /* 0074 */ int robeAlt; - /* 0078 */ int unknown_0078; - /* 007C */ int unknown_007C; + /* 0078 */ int standBodyStyle; + /* 007C */ int moveBodyStyle; }; // INLINED static CCharacterRender* NpcCharacterRender(CCharacterNpc* self) { - return reinterpret_cast(self->unknown_0440); + return reinterpret_cast(self->characterRender); } // INLINED static __forceinline void FillCharacterNpcRenderPrimary(CCharacterNpc* self, CharacterNpcViewInfo* info) { - NpcCharacterRender(self)->unknown_0004 = *reinterpret_cast(&self->render.position.x); - NpcCharacterRender(self)->unknown_0008 = *reinterpret_cast(&self->render.position.y); - NpcCharacterRender(self)->unknown_000C = *reinterpret_cast(&self->render.position.z); - NpcCharacterRender(self)->unknown_0010 = self->unknown_025C; - NpcCharacterRender(self)->unknown_0018[0] = self->unknown_0260; - NpcCharacterRender(self)->unknown_0018[1] = *reinterpret_cast(&self->unknown_029C); - NpcCharacterRender(self)->unknown_0018[2] = info->unknown_0058; - NpcCharacterRender(self)->unknown_0018[3] = info->unknown_0054; - NpcCharacterRender(self)->unknown_0028 = info->unknown_0030; - NpcCharacterRender(self)->unknown_002C = info->unknown_004C; - NpcCharacterRender(self)->unknown_0030 = info->unknown_0050; + NpcCharacterRender(self)->positionX = *reinterpret_cast(&self->render.position.x); + NpcCharacterRender(self)->positionY = *reinterpret_cast(&self->render.position.y); + NpcCharacterRender(self)->positionZ = *reinterpret_cast(&self->render.position.z); + NpcCharacterRender(self)->job = self->job; + NpcCharacterRender(self)->appearance[0] = self->sex; + NpcCharacterRender(self)->appearance[1] = *reinterpret_cast(&self->headType); + NpcCharacterRender(self)->appearance[2] = info->standHeadPaletteOrMoveBodyPalette; + NpcCharacterRender(self)->appearance[3] = info->standBodyPaletteOrMoveAccessory3; + NpcCharacterRender(self)->lowerHeadgear = info->standAccessory; + NpcCharacterRender(self)->upperHeadgear = info->standAccessory2; + NpcCharacterRender(self)->middleHeadgear = info->standAccessory3OrMoveAccessory2; NpcCharacterRender(self)->SetRobe(info->robe); - NpcCharacterRender(self)->unknown_0050 = info->unknown_0078; + NpcCharacterRender(self)->bodyCostume = info->standBodyStyle; } // INLINED static __forceinline void FillCharacterNpcRenderSecondary(CCharacterNpc* self, CharacterNpcViewInfo* info) { - NpcCharacterRender(self)->unknown_0004 = *reinterpret_cast(&self->render.position.x); - NpcCharacterRender(self)->unknown_0008 = *reinterpret_cast(&self->render.position.y); - NpcCharacterRender(self)->unknown_000C = *reinterpret_cast(&self->render.position.z); - NpcCharacterRender(self)->unknown_0010 = self->unknown_025C; - NpcCharacterRender(self)->unknown_0018[0] = self->unknown_0260; - NpcCharacterRender(self)->unknown_0018[1] = *reinterpret_cast(&self->unknown_029C); - NpcCharacterRender(self)->unknown_0018[2] = info->unknown_005C; - NpcCharacterRender(self)->unknown_0018[3] = info->unknown_0058; - NpcCharacterRender(self)->unknown_0028 = info->unknown_0038; - NpcCharacterRender(self)->unknown_002C = info->unknown_0050; - NpcCharacterRender(self)->unknown_0030 = info->unknown_0054; + NpcCharacterRender(self)->positionX = *reinterpret_cast(&self->render.position.x); + NpcCharacterRender(self)->positionY = *reinterpret_cast(&self->render.position.y); + NpcCharacterRender(self)->positionZ = *reinterpret_cast(&self->render.position.z); + NpcCharacterRender(self)->job = self->job; + NpcCharacterRender(self)->appearance[0] = self->sex; + NpcCharacterRender(self)->appearance[1] = *reinterpret_cast(&self->headType); + NpcCharacterRender(self)->appearance[2] = info->moveHeadPalette; + NpcCharacterRender(self)->appearance[3] = info->standHeadPaletteOrMoveBodyPalette; + NpcCharacterRender(self)->lowerHeadgear = info->moveAccessory; + NpcCharacterRender(self)->upperHeadgear = info->standAccessory3OrMoveAccessory2; + NpcCharacterRender(self)->middleHeadgear = info->standBodyPaletteOrMoveAccessory3; NpcCharacterRender(self)->SetRobe(info->robeAlt); - NpcCharacterRender(self)->unknown_0050 = info->unknown_007C; + NpcCharacterRender(self)->bodyCostume = info->moveBodyStyle; } // OFFSET: 0x005A1530 @@ -2754,16 +2754,16 @@ void CCharacterNpc::SendMsg( case AM_INITSTANDENTRY: this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); this->render.visible = IsVisibleJob(info->job) ? 1 : 0; - this->SetGuildInfo(info->unknown_0060, info->unknown_0064); - if (this->unknown_0440 != nullptr) { + this->SetGuildInfo(info->guildId, info->guildEmblemVersion); + if (this->characterRender != nullptr) { return; } - this->unknown_0440 = reinterpret_cast(new CCharacterRender(0, 0)); + this->characterRender = reinterpret_cast(new CCharacterRender(0, 0)); FillCharacterNpcRenderPrimary(this, info); return; case AM_STANDENTRY: this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); - if (this->unknown_0440 == nullptr) { + if (this->characterRender == nullptr) { return; } FillCharacterNpcRenderPrimary(this, info); @@ -2771,16 +2771,16 @@ void CCharacterNpc::SendMsg( case AM_INITMOVEENTRY: case AM_INITMOVEENTRY2: this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); - if (this->unknown_0440 != nullptr) { + if (this->characterRender != nullptr) { return; } - this->unknown_0440 = reinterpret_cast(new CCharacterRender(0, 0)); + this->characterRender = reinterpret_cast(new CCharacterRender(0, 0)); FillCharacterNpcRenderSecondary(this, info); return; case AM_MOVEENTRY: case AM_MOVEENTRY2: this->EffectActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); - if (this->unknown_0440 == nullptr) { + if (this->characterRender == nullptr) { return; } FillCharacterNpcRenderSecondary(this, info); @@ -2794,38 +2794,38 @@ void CCharacterNpc::SendMsg( // OFFSET: 0x00CAC760 // FUNCTION: fn_21044 int CGameActor::GetUnknown0404Job() const { - switch (this->unknown_0404) { + switch (this->shapeShift) { case 1: return 0x1104; case 2: return 0x1105; default: - return this->unknown_025C; + return this->job; } } // OFFSET: 0x00CC1D40 // FUNCTION: fn_21128 void CGameActor::SetUnknown03B8(int value, int slot) { - this->unknown_03C8 = 0; + this->transformPriority = 0; if (this->render.accountId == g_session.m_aid) { g_session.SetPairValue(value, slot); } else if (slot == 0) { - this->unknown_03B8[0] = value; + this->transformJobs[0] = value; } else if (slot == 1) { - this->unknown_03B8[1] = value; + this->transformJobs[1] = value; } else if (slot == 2) { - this->unknown_03B8[2] = value; + this->transformJobs[2] = value; } if (value > 0) { this->SetSprJob(value); - this->SetState(this->render.unknown_0070, 1); + this->SetState(this->render.state, 1); return; } int job; - if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true || this->unknown_0404 == 0) { + if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true || this->shapeShift == 0) { job = this->GetEffectiveJob(-1); } else { job = this->GetUnknown0404Job(); @@ -2833,7 +2833,7 @@ void CGameActor::SetUnknown03B8(int value, int slot) { this->SetBodyPaletteName(); this->SetSprJob(job); - this->SetState(this->render.unknown_0070, 1); + this->SetState(this->render.state, 1); } // OFFSET: 0x00CC46D0 @@ -2841,7 +2841,7 @@ void CGameActor::SetUnknown03B8(int value, int slot) { void CGameActor::SetTetraBall(int index, int on, int value) { CTetraBallEffect* ball = nullptr; if (on == 1) { - if (value == 0 || this->unknown_0158[index] == value) { + if (value == 0 || this->movementState[index] == value) { return; } @@ -2891,7 +2891,7 @@ void CGameActor::SetTetraBall(int index, int on, int value) { } } - this->unknown_0158[index] = value; + this->movementState[index] = value; return; } @@ -2907,21 +2907,21 @@ void CGameActor::SetTetraBall(int index, int on, int value) { } } - this->unknown_0158[index] = 0; + this->movementState[index] = 0; } // OFFSET: 0x00CC40C0 // FUNCTION: fn_21157 void CGameActor::SetUnknown0404(int value) { - this->unknown_0404 = value; + this->shapeShift = value; } // OFFSET: 0x00CC3DE0 // FUNCTION: fn_21155 void CGameActor::SetUnknown008C(const std::uint32_t* value) { - this->render.unknown_008C = value[0]; - this->render.unknown_0090 = value[1]; - this->render.unknown_0094 = value[2]; + this->render.motionStartTime = value[0]; + this->render.savedTintColor = value[1]; + this->render.targetTintColor = value[2]; } // OFFSET: 0x00CC41E0 @@ -2933,13 +2933,13 @@ void CGameActor::UnRegisterPos() { // OFFSET: 0x00CC1E30 // FUNCTION: fn_21129 void CGameActor::SetUnknown03C4(int value) { - this->unknown_03C8 = 0; - this->unknown_03C4 = value; + this->transformPriority = 0; + this->monsterTransformJob = value; if (value <= 0) { value = this->GetEffectiveJob(-1); } this->SetSprJob(value); - this->SetState(this->render.unknown_0070, 1); + this->SetState(this->render.state, 1); } // OFFSET: 0x00CABDE0 @@ -3050,7 +3050,7 @@ static std::string ShapeShiftName(int form, int job) { // OFFSET: 0x00CACD00 // FUNCTION: fn_21046 std::string CGameActor::GetShapeShiftName() { - return ShapeShiftName(this->unknown_0404, this->unknown_025C); + return ShapeShiftName(this->shapeShift, this->job); } // OFFSET: 0x00CACD70 @@ -3129,7 +3129,7 @@ bool CGameActor::IsShapeShifted() { if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true) { return false; } - return this->unknown_0404 != 0; + return this->shapeShift != 0; } // OFFSET: 0x00CAA870 @@ -3178,8 +3178,8 @@ void CGameActor::SetHatEffect(int effectId, bool on) { bool show = on; CPc* pc; if (hatEffect == 254 && IsPlayerJob(this->GetEffectiveJob(-1)) && (pc = dynamic_cast(this)) != nullptr) { - pc->unknown_0438 = on ? pc->unknown_0438 | 0x10 : pc->unknown_0438 ^ 0x10; - show = (pc->unknown_0434 & 0x10) != 0 || (pc->unknown_0438 & 0x10) != 0; + pc->appearanceFlags = on ? pc->appearanceFlags | 0x10 : pc->appearanceFlags ^ 0x10; + show = (pc->virtue & 0x10) != 0 || (pc->appearanceFlags & 0x10) != 0; } if (!show) { return; @@ -3187,7 +3187,7 @@ void CGameActor::SetHatEffect(int effectId, bool on) { CEffect* effect = g_effectMgr->Spawn(this->render.accountId, hatEffect, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); if (effect) { - effect->unknown_00C8 = 1; + effect->headAttached = 1; } else { this->LaunchEffect(hatEffect, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } @@ -3199,7 +3199,7 @@ void CGameActor::SetEffectState(int effectId, bool on) { if (on) { CEffect* effect = g_effectMgr->Spawn(this->render.accountId, effectId, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); if (effect) { - effect->unknown_00C8 = 1; + effect->headAttached = 1; } } else { g_effectMgr->Retire(this->render.accountId, effectId); @@ -3219,7 +3219,7 @@ void CGameActor::SetEffectInstance(int effectId, int instance, bool on) { // OFFSET: 0x00CAAC80 // FUNCTION: fn_21022 void CGameActor::ResetJobEffects() { - this->unknown_02B8 = 0; + this->levelAuraType = 0; this->SendMsg(this, AM_DELETE_EFFECT, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->SendMsg(this, AM_DELETE_EFFECT, 0, 976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->SendMsg(this, AM_DELETE_EFFECT, 0, 977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -3249,32 +3249,32 @@ void CGameActor::ResetJobEffects() { // OFFSET: 0x00CAB020 // FUNCTION: fn_21024 __declspec(noinline) void CGameActor::ClearUnknown037C(int value) { - if (this->unknown_037C[1] == value) { - this->unknown_037C[1] = 0; - } else if (this->unknown_037C[0] == value) { - this->unknown_037C[0] = 0; - } else if (this->unknown_037C[2] == value) { - this->unknown_037C[2] = 0; - } else if (this->unknown_037C[3] == value) { - this->unknown_037C[3] = 0; - } else if (this->unknown_037C[4] == value) { - this->unknown_037C[4] = 0; - } else if (this->unknown_037C[5] == value) { - this->unknown_037C[5] = 0; - } else if (this->unknown_037C[6] == value) { - this->unknown_037C[6] = 0; - } else if (this->unknown_037C[8] == value) { - this->unknown_037C[8] = 0; - } else if (this->unknown_037C[9] == value) { - this->unknown_037C[9] = 0; - } else if (this->unknown_037C[7] == value) { - this->unknown_037C[7] = 0; - } else if (this->unknown_037C[10] == value) { - this->unknown_037C[10] = 0; - } else if (this->unknown_037C[11] == value) { - this->unknown_037C[11] = 0; - } else if (this->unknown_037C[12] == value) { - this->unknown_037C[12] = 0; + if (this->statusEffects[1] == value) { + this->statusEffects[1] = 0; + } else if (this->statusEffects[0] == value) { + this->statusEffects[0] = 0; + } else if (this->statusEffects[2] == value) { + this->statusEffects[2] = 0; + } else if (this->statusEffects[3] == value) { + this->statusEffects[3] = 0; + } else if (this->statusEffects[4] == value) { + this->statusEffects[4] = 0; + } else if (this->statusEffects[5] == value) { + this->statusEffects[5] = 0; + } else if (this->statusEffects[6] == value) { + this->statusEffects[6] = 0; + } else if (this->statusEffects[8] == value) { + this->statusEffects[8] = 0; + } else if (this->statusEffects[9] == value) { + this->statusEffects[9] = 0; + } else if (this->statusEffects[7] == value) { + this->statusEffects[7] = 0; + } else if (this->statusEffects[10] == value) { + this->statusEffects[10] = 0; + } else if (this->statusEffects[11] == value) { + this->statusEffects[11] = 0; + } else if (this->statusEffects[12] == value) { + this->statusEffects[12] = 0; } } @@ -3357,7 +3357,7 @@ int CGameActor::WeaponActionBase(int weaponType) { base = 40; break; case ST_AUTOCOUNTER: - base = IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->unknown_0260, this->GetWeapon()) ? 88 : 80; + base = IsJobWeaponAllowed(this->GetEffectiveJob(-1), this->sex, this->GetWeapon()) ? 88 : 80; break; case ST_DANCE: case ST_SING: @@ -3422,20 +3422,20 @@ int CGameActor::MountHeightOffset() { } if (g_session.IsBabyJob(this->GetEffectiveJob(-1))) { - return this->unknown_02CC ? 10 : -20; + return this->isRiding ? 10 : -20; } if (g_session.IsDoramJob(this->GetEffectiveJob(-1))) { - return this->unknown_02CC ? -40 : -30; + return this->isRiding ? -40 : -30; } - return this->unknown_02CC ? 30 : 0; + return this->isRiding ? 30 : 0; } // OFFSET: 0x00CABD30 // FUNCTION: fn_21036 int CGameActor::GetUnknown0404() { - return this->unknown_0404; + return this->shapeShift; } // OFFSET: 0x00CC4EA0 @@ -3443,7 +3443,7 @@ int CGameActor::GetUnknown0404() { C3dGrannyGameActor::C3dGrannyGameActor(const char* name) { this->model = nullptr; this->instance = nullptr; - this->unknown_06A8 = 1; + this->initializeFacing = 1; for (int mesh = 0; mesh < 30; ++mesh) { this->commands[mesh] = nullptr; this->vertices[mesh] = nullptr; @@ -3451,14 +3451,14 @@ C3dGrannyGameActor::C3dGrannyGameActor(const char* name) { this->motion = 0; this->alpha = 0xFF; std::strcpy(this->name, name); - this->unknown_0650 = 0; + this->renderState = 0; this->unknown_0654 = 0; for (int index = 0; index < 20; ++index) { this->controls[index] = nullptr; } this->emblemTexture = nullptr; this->texture = CreateTexture(35, 35, 1, false, false); - this->unknown_0DBC.resize(4900); + this->litPositions.resize(4900); } // OFFSET: 0x00CC7ED0 @@ -3488,13 +3488,13 @@ void C3dGrannyGameActor::SetSprAct(int job, int value, int) { } this->lastClock = GrannyGetSystemSeconds(); - this->unknown_052C = 0.0f; + this->motionProgress = 0.0f; if (job == JT_ZOMBIE_DRAGON || job == JT_HUGELING) { - this->unknown_02E0 = 1; - this->model->unknown_03A0 = 30.0f; - this->model->unknown_03A4 = 30.0f; + this->actorType = 1; + this->model->baseHeight = 30.0f; + this->model->topHeight = 30.0f; } else { - this->unknown_02E0 = job == JT_GUILD_FLAG ? 2 : 0; + this->actorType = job == JT_GUILD_FLAG ? 2 : 0; } } @@ -3527,41 +3527,41 @@ bool CGrannyCorpse3d::OnProcess() { // OFFSET: 0x00CC7D50 // FUNCTION: fn_21188 void C3dGrannyGameActor::SetAction(unsigned animation, int, int repeat) { - this->render.unknown_0070 = 0; + this->render.state = 0; switch (animation) { case 0: break; case 8: - this->render.unknown_0070 = 1; + this->render.state = 1; break; case 24: - this->render.unknown_0070 = 5; + this->render.state = 5; break; case 32: - this->render.unknown_0070 = 11; + this->render.state = 11; break; case 40: - this->render.unknown_0070 = 12; + this->render.state = 12; break; case 48: - this->render.unknown_0070 = 4; + this->render.state = 4; break; case 64: - this->render.unknown_0070 = 3; + this->render.state = 3; break; case 80: case 88: - this->render.unknown_0070 = 2; + this->render.state = 2; break; } - this->motion = this->render.unknown_0070; + this->motion = this->render.state; for (int i = 0; i < 20; ++i) { this->model->FreeControl(this->controls[i]); this->controls[i] = nullptr; } - this->unknown_052C = 0; + this->motionProgress = 0; this->controls[this->motion] = this->model->PlayAnimation(this->motion, this->instance, this->controls[this->motion], repeat == 1); } @@ -3590,7 +3590,7 @@ CGrannyCorpse3d::CGrannyCorpse3d(const char* name) { } this->startClock = GrannyGetSystemSeconds(); - this->unknown_0138 = 0; + this->animationTime = 0; this->tick = 0; this->control = this->model->PlayAnimation(3, this->instance, this->control, 1); } @@ -3630,8 +3630,8 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, int damage = info->damage; int hitCount = info->hitCount; const int extraDamage = info->extraDamage; - const int unknown_001C = info->unknown_001C; - const int unknown_0020 = info->unknown_0020; + const int unknown_001C = info->cellX; + const int unknown_0020 = info->cellY; const int attackSpeed = info->attackSpeed; const int motionSpeed = info->motionSpeed; @@ -3676,12 +3676,12 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, case DMG_CRITICAL: case DMG_LUCY_DODGE: case DMG_MULTI_HIT_CRITICAL: { - if (this->unknown_0178 != 0) { + if (this->isCounter != 0) { CRagEffect* effect = this->LaunchEffect(0x83, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (effect != nullptr) { effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0); } - this->unknown_0178 = 0; + this->isCounter = 0; } this->SetModifyFactorOfmotionSpeed(attackSpeed); @@ -3690,7 +3690,7 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, } this->Face(x, z); - unsigned delay = static_cast(this->unknown_0378 * this->render.speed * 24.0f); + unsigned delay = static_cast(this->attackMotion * this->render.speed * 24.0f); if (this->GetEffectiveJob(-1) == JT_ARCHER_SKELETON || this->GetEffectiveJob(-1) == JT_G_ARCHER_SKELETON) { delay += 0xC0; } else if (this->GetEffectiveJob(-1) == JT_ARCHER_GUARDIAN || this->GetEffectiveJob(-1) == JT_BOW_GUARDIAN) { @@ -3711,7 +3711,7 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, flag = 1; break; case DMG_LUCY_DODGE: - action = this->unknown_0178 != 0 ? 0x1A : 0x5E; + action = this->isCounter != 0 ? 0x1A : 0x5E; break; case DMG_MULTI_HIT_CRITICAL: action = 0x94; @@ -3763,15 +3763,15 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, message.targetAid = this->hitTargetAid; message.time = timeGetTime() + delay; message.attackerAid = this->render.accountId; - message.unknown_0014 = unknown_001C; - message.unknown_0018 = unknown_0020; - message.unknown_001C = flag; + message.cellX = unknown_001C; + message.cellY = unknown_0020; + message.hitEffect = flag; message.effectId = effectId; - message.unknown_002C = info->unknown_002C; + message.blueDamage = info->blueDamage; message.action = action; message.damage = damage; - message.unknown_0024 = 1; - message.unknown_0034 = 0; + message.monsterValue = 1; + message.skillTarget = 0; const std::int64_t address = reinterpret_cast(&message); if (hitCount == 1) { @@ -3846,15 +3846,15 @@ void CGameActor::ProcessHitMessage(CGameObject*, const ActorHitInfo* info, int, // OFFSET: 0x00CC5C70 // FUNCTION: fn_21180 void C3dGrannyGameActor::ProcessMotion() { - this->render.isMotionFinished = this->render.unknown_0070 != 2; - if (this->render.unknown_0070 != 2 || !(this->render.motionSpeed < 1.0f)) { + this->render.isMotionFinished = this->render.state != 2; + if (this->render.state != 2 || !(this->render.motionSpeed < 1.0f)) { return; } this->clock = GrannyGetSystemSeconds(); const float elapsed = GrannyGetSecondsElapsed(&this->lastClock, &this->clock) * 2.0f; - this->unknown_052C += elapsed / this->render.motionSpeed; - this->model->Animate(this->unknown_052C, this->instance); + this->motionProgress += elapsed / this->render.motionSpeed; + this->model->Animate(this->motionProgress, this->instance); this->lastClock = this->clock; if (this->motion == 2 && this->controls[2] != nullptr && GrannyGetControlDurationLeft(this->controls[2]) <= 0.0f) { @@ -3874,8 +3874,8 @@ void CGrannyCorpse3d::Render(int argument) { this->clock = GrannyGetSystemSeconds(); const float elapsed = GrannyGetSecondsElapsed(&this->startClock, &this->clock) * 2.0f; - this->unknown_0138 += elapsed; - this->model->Animate(this->unknown_0138, this->instance); + this->animationTime += elapsed; + this->model->Animate(this->animationTime, this->instance); this->startClock = this->clock; CWorld* scene = static_cast(g_modeMgr.GetGameMode())->scene; @@ -4007,11 +4007,11 @@ int ReturnZero() { // OFFSET: 0x00CC5D80 // FUNCTION: fn_21182 void C3dGrannyGameActor::Render(int argument) { - this->unknown_0DBC.clear(); + this->litPositions.clear(); this->clock = GrannyGetSystemSeconds(); const float elapsed = GrannyGetSecondsElapsed(&this->lastClock, &this->clock) * 2.0f; - this->unknown_052C += elapsed; - this->model->Animate(this->unknown_052C, this->instance); + this->motionProgress += elapsed; + this->model->Animate(this->motionProgress, this->instance); this->lastClock = this->clock; if (this->motion == 2 && this->controls[2] != nullptr && GrannyGetControlDurationLeft(this->controls[2]) <= 0.0f) { @@ -4025,11 +4025,11 @@ void C3dGrannyGameActor::Render(int argument) { light.green = 200; light.blue = 200; light.intensity = 0x80; - if (this->unknown_0650 == 1 || this->unknown_0650 == 2) { + if (this->renderState == 1 || this->renderState == 2) { return; } - if (this->unknown_02E0 == 2) { + if (this->actorType == 2) { this->RenderShadowed(argument); } else { this->RenderLit(argument, light); @@ -4107,7 +4107,7 @@ void C3dGrannyGameActor::RenderLit(int argument, const GrannyActorLight& light) matrix world; world.Compose(local, view); - if (this->unknown_025C == 0x49D && mesh == 28) { + if (this->job == 0x49D && mesh == 28) { this->LaunchEffect(0x175, vector3d{source[64].position[0], source[64].position[1], source[64].position[2]}, -this->angle); } @@ -4134,7 +4134,7 @@ void C3dGrannyGameActor::RenderLit(int argument, const GrannyActorLight& light) static_cast(light.blue + 0x38 + this->brightness) + (this->alpha << 24); } - this->unknown_0DBC.push_back(position); + this->litPositions.push_back(position); } command->texture = texture; @@ -4211,7 +4211,7 @@ void C3dGrannyGameActor::RenderShadowed(int argument) { continue; } - if (this->unknown_025C == 0x49D && mesh == 28) { + if (this->job == 0x49D && mesh == 28) { this->LaunchEffect(0x175, vector3d{source[64].position[0], source[64].position[1], source[64].position[2]}, -this->angle); } @@ -4240,7 +4240,7 @@ void C3dGrannyGameActor::RenderShadowed(int argument) { static_cast(static_cast(this->render.position.x) % 5); position.z = spin.values[5] * corner.y + spin.values[2] * corner.x + spin.values[8] * corner.z + spin.values[11] + static_cast(static_cast(this->render.position.z) % 5); - this->unknown_0DBC.push_back(position); + this->litPositions.push_back(position); CTexture* meshTexture; if (mesh == 1) { @@ -4285,7 +4285,7 @@ void CGameActor::SetCharm(int type, int count) { } this->charmType = type; - this->unknown_03D0 = count; + this->charmCount = count; if (!g_effectMgr->HasAllocator(0xE4)) { int effectId; if (type == 1) { @@ -4388,53 +4388,53 @@ void CGameActor::UpdateMaxLevelAura() { } if (IsTreeGroupTwoLocal(this->GetEffectiveJob(-1))) { - if (static_cast(this->unknown_0210) == g_session.m_maxLevel) { + if (static_cast(this->characterLevel) == g_session.m_maxLevel) { this->SendMsg(nullptr, 0x96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } if (IsTreeGroupThreeLocal(this->GetEffectiveJob(-1)) == true) { - if (static_cast(this->unknown_0210) == *reinterpret_cast(&g_session.unknown_7EF0[0x74])) { + if (static_cast(this->characterLevel) == *reinterpret_cast(&g_session.jobLevelLimits[0x74])) { this->SendMsg(nullptr, AM_MAKE_LEVEL4TH_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } if (g_session.IsSuperNovice2Job(this->GetEffectiveJob(-1))) { - if (static_cast(this->unknown_0210) == *reinterpret_cast(&g_session.unknown_7EF0[0])) { + if (static_cast(this->characterLevel) == *reinterpret_cast(&g_session.jobLevelLimits[0])) { this->SendMsg(nullptr, AM_MAKE_LEVEL160_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } if (g_session.IsExpandedJob(this->GetEffectiveJob(-1))) { - if (static_cast(this->unknown_0210) == *reinterpret_cast(&g_session.unknown_7EF0[4])) { + if (static_cast(this->characterLevel) == *reinterpret_cast(&g_session.jobLevelLimits[4])) { this->SendMsg(nullptr, AM_MAKE_LEVEL160_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } if (g_session.IsMercenaryJob(this->GetEffectiveJob(-1))) { - const int skill = static_cast(this->unknown_0210); - if (skill == *reinterpret_cast(&g_session.unknown_7EF0[8])) { + const int skill = static_cast(this->characterLevel); + if (skill == *reinterpret_cast(&g_session.jobLevelLimits[8])) { this->SendMsg(nullptr, 0x93, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - if (skill != *reinterpret_cast(g_session.unknown_7EE8)) { - this->unknown_02B4 = 0; + if (skill != *reinterpret_cast(g_session.maxBaseLevel)) { + this->hasLevelAura = 0; return; } if (g_session.IsNewMercenaryJob(this->GetEffectiveJob(-1)) != 0) { - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } this->SendMsg(nullptr, AM_MAKE_LEVEL99_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -4442,129 +4442,129 @@ void CGameActor::UpdateMaxLevelAura() { } if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true) { - if (static_cast(this->unknown_0210) == *reinterpret_cast(&g_session.unknown_7EF0[0x28])) { + if (static_cast(this->characterLevel) == *reinterpret_cast(&g_session.jobLevelLimits[0x28])) { this->SendMsg(nullptr, AM_MAKE_LEVEL160_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; return; } - if (static_cast(this->unknown_0210) == *reinterpret_cast(g_session.unknown_7EE8)) { + if (static_cast(this->characterLevel) == *reinterpret_cast(g_session.maxBaseLevel)) { this->SendMsg(nullptr, AM_MAKE_LEVEL99_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } - this->unknown_02B4 = 0; + this->hasLevelAura = 0; } // OFFSET: 0x00CC2340 // FUNCTION: fn_21139 void CGameActor::SetActorJob(int job) { - this->unknown_025C = job; + this->job = job; if (job < 0xfaf) { if (job == JT_CHICKEN_H) { - this->unknown_025C = 0xfa8; + this->job = 0xfa8; } else if (job == JT_CHICKEN) { - this->unknown_025C = 7; + this->job = 7; } else if (job == JT_CHICKEN2) { - this->unknown_025C = 0xe; + this->job = 0xe; } } else if (job < 0x10b7) { if (job == JT_WOLF_WINDHAWK) { - this->unknown_025C = 0x10a1; + this->job = 0x10a1; } else { switch (job) { case JT_CHICKEN2_H: - this->unknown_025C = 0xfaf; + this->job = 0xfaf; break; case JT_CHICKEN_B: - this->unknown_025C = 0xfbe; + this->job = 0xfbe; break; case JT_CHICKEN2_B: - this->unknown_025C = 0xfc5; + this->job = 0xfc5; break; case JT_STAR2: - this->unknown_025C = 0xfcf; + this->job = 0xfcf; break; case JT_RUNE_CHICKEN: case JT_RUNE_CHICKEN2: case JT_RUNE_CHICKEN3: case JT_RUNE_CHICKEN4: case JT_RUNE_CHICKEN5: - this->unknown_025C = 0xfd6; + this->job = 0xfd6; break; case JT_RUNE_CHICKEN_H: case JT_RUNE_CHICKEN2_H: case JT_RUNE_CHICKEN3_H: case JT_RUNE_CHICKEN4_H: case JT_RUNE_CHICKEN5_H: - this->unknown_025C = 0xfdc; + this->job = 0xfdc; break; case JT_ROYAL_CHICKEN: - this->unknown_025C = 0xfe2; + this->job = 0xfe2; break; case JT_ROYAL_CHICKEN_H: - this->unknown_025C = 0xfe9; + this->job = 0xfe9; break; case JT_WOLF_RANGER: - this->unknown_025C = 0xfd8; + this->job = 0xfd8; break; case JT_WOLF_RANGER_H: - this->unknown_025C = 0xfde; + this->job = 0xfde; break; case JT_MADOGEAR: - this->unknown_025C = 0xfda; + this->job = 0xfda; break; case JT_MADOGEAR_H: - this->unknown_025C = 0xfe0; + this->job = 0xfe0; break; case JT_RUNE_CHICKEN_B: - this->unknown_025C = 0x1000; + this->job = 0x1000; break; case JT_ROYAL_CHICKEN_B: - this->unknown_025C = 0x1006; + this->job = 0x1006; break; case JT_WOLF_RANGER_B: - this->unknown_025C = 0x1002; + this->job = 0x1002; break; case JT_MADOGEAR_B: - this->unknown_025C = 0x1004; + this->job = 0x1004; break; case JT_STAR2_B: - this->unknown_025C = 0x1082; + this->job = 0x1082; break; case JT_STAR2_EMPEROR_B: - this->unknown_025C = 0x1091; + this->job = 0x1091; break; } } } else { switch (job) { case JT_MEISTER_MADOGEAR: - this->unknown_025C = 0x109d; + this->job = 0x109d; break; case JT_DRAGON_KNIGHT_CHICKEN: - this->unknown_025C = 0x109c; + this->job = 0x109c; break; case JT_IMPERIAL_GUARD_CHICKEN: - this->unknown_025C = 0x10a2; + this->job = 0x10a2; break; case JT_SKY_EMPEROR2: - this->unknown_025C = 0x10ce; + this->job = 0x10ce; break; } } int slotJob; - if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true || this->unknown_0404 == 0) { + if (g_session.IsCostumeJob(this->GetEffectiveJob(-1)) == true || this->shapeShift == 0) { slotJob = this->GetEffectiveJob(-1); - } else if (this->unknown_0404 == 1) { + } else if (this->shapeShift == 1) { slotJob = 0x1104; - } else if (this->unknown_0404 == 2) { + } else if (this->shapeShift == 2) { slotJob = 0x1105; } else { - slotJob = this->unknown_025C; + slotJob = this->job; } this->SetSprJob(slotJob); @@ -4575,10 +4575,10 @@ void CGameActor::SetActorJob(int job) { // OFFSET: 0x00CAAFD0 // FUNCTION: fn_21023 void CGameActor::ClearUnknown0188() { - if (g_session.GetSceneUnknown004C() != 0 && this->unknown_0188 != 0) { - static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->unknown_0188); - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0188)); - this->unknown_0188 = 0; + if (g_session.GetSceneUnknown004C() != 0 && this->sceneNameWindow != 0) { + static_cast(g_modeMgr.GetGameMode())->RemoveUnknown0604(this->sceneNameWindow); + g_windowMgr.Schedule(reinterpret_cast(this->sceneNameWindow)); + this->sceneNameWindow = 0; } } @@ -4631,38 +4631,38 @@ void C3dGrannyGameActor::MakeCorpse() { // OFFSET: 0x00CC40D0 // FUNCTION: fn_21158 void CGameActor::ApplyNatureProtection() { - if (this->unknown_0404 == 3) { + if (this->shapeShift == 3) { return; } - this->unknown_0408 = this->unknown_0404; + this->savedShapeShift = this->shapeShift; this->SetState(0x51, 1); this->render.isMotionFreezed = true; - this->render.unknown_0114 = 1; - this->unknown_0404 = 3; - this->SetSprJob(this->unknown_025C); + this->render.specialMotionLocked = 1; + this->shapeShift = 3; + this->SetSprJob(this->job); const int costume = this->GetMadogearType(); const int costumeJob = this->GetBodyCostume(); this->render.name = g_equipmentResourceMgr->GetBodyPalName( - this->GetEffectiveJob(-1), this->unknown_0260, static_cast(this->render.unknown_0048), costumeJob, costume, 0 + this->GetEffectiveJob(-1), this->sex, static_cast(this->render.bodyPalette), costumeJob, costume, 0 ); } __declspec(noinline) void CGameActor::ProcessViewCheck() { - if (g_updateTick > 0 && (this->render.unknown_00EC & 0xFFu) == 1) { + if (g_updateTick > 0 && (this->render.effectPhaseState & 0xFFu) == 1) { this->render.flags = 0; - this->render.unknown_00EC &= 0xFFFFFF00u; + this->render.effectPhaseState &= 0xFFFFFF00u; } if (StateFlagsClear(this->stateFlags)) { - this->unknown_02D8 = 0x8ca0; + this->effectLaunchCnt = 0x8ca0; return; } timeGetTime(); if (StateFlag00(this->stateFlags)) { - if (static_cast(EffectLifetime(0x16)) <= static_cast(this->unknown_02D8)) { - this->unknown_02D8 = 0; + if (static_cast(EffectLifetime(0x16)) <= static_cast(this->effectLaunchCnt)) { + this->effectLaunchCnt = 0; vector3d zero; zero.x = 0.0f; zero.y = 0.0f; @@ -4672,8 +4672,8 @@ __declspec(noinline) void CGameActor::ProcessViewCheck() { } if (StateFlag13(this->stateFlags)) { - if (static_cast(EffectLifetime(0x21)) <= static_cast(this->unknown_02D8)) { - this->unknown_02D8 = 0; + if (static_cast(EffectLifetime(0x21)) <= static_cast(this->effectLaunchCnt)) { + this->effectLaunchCnt = 0; vector3d zero; zero.x = 0.0f; zero.y = 0.0f; @@ -4682,11 +4682,11 @@ __declspec(noinline) void CGameActor::ProcessViewCheck() { } } - ++this->unknown_02D8; + ++this->effectLaunchCnt; } __declspec(noinline) void CGameActor::ProcessActorEffects() { - for (auto it = this->unknown_02A8.begin(); it != this->unknown_02A8.end();) { + for (auto it = this->willBeAttackedList.begin(); it != this->willBeAttackedList.end();) { if (timeGetTime() < it->time) { ++it; continue; @@ -4696,7 +4696,7 @@ __declspec(noinline) void CGameActor::ProcessActorEffects() { this->SendMsg( nullptr, message.action, message.action >> 31, reinterpret_cast(&message.targetAid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - it = this->unknown_02A8.erase(it); + it = this->willBeAttackedList.erase(it); } } @@ -4716,9 +4716,9 @@ bool C3dGrannyGameActor::OnProcess() { this->render.angle = facing; } - if (this->unknown_06A8 == 1) { + if (this->initializeFacing == 1) { this->angle = 180.0f - facing; - this->unknown_06A8 = 0; + this->initializeFacing = 0; } else { float current = this->angle; const float target = 180.0f - static_cast(static_cast(facing)); @@ -4781,13 +4781,13 @@ void CGameActor::SpawnDamageDigits(int, int damage, std::uint32_t color, int typ } while (remaining != 0); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (type == 22 && this->unknown_03B0.size() != 0) { - for (auto it = this->unknown_03B0.begin(); it != this->unknown_03B0.end();) { + if (type == 22 && this->msgEffectList.size() != 0) { + for (auto it = this->msgEffectList.begin(); it != this->msgEffectList.end();) { CMsgEffect* effect = static_cast(*it); if (effect->m_type == 22) { this->ClearUnknown037C(reinterpret_cast(effect)); effect->SendMsg(this, AM_MASTER_DEAD, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - it = this->unknown_03B0.erase(it); + it = this->msgEffectList.erase(it); static_cast(g_modeMgr.GetGameMode())->scene->RemoveObject(effect); } else { ++it; @@ -4812,26 +4812,26 @@ void CGameActor::SpawnDamageDigits(int, int damage, std::uint32_t color, int typ effect->SendMsg(nullptr, AM_SETPOS2, 0, position, position >> 31, *it, *it >> 31, (count - index * 2) * 4 - 4, 0, 0, 0, 0, 0, 0, 0); } effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - effect->render.unknown_00B4 = 0; + effect->render.useGroundLighting = 0; if (type == 22) { effect->render.scale = 0.5f; } mode->AddSceneObject(effect); - this->unknown_03B0.push_back(effect); + this->msgEffectList.push_back(effect); } } // OFFSET: 0x005A10B0 // FUNCTION: fn_03040 CCharacterNpc::CCharacterNpc() : CNpc() { - this->unknown_0440 = 0; + this->characterRender = 0; } // INLINED CCharacterNpc::~CCharacterNpc() { - if (this->unknown_0440) { - delete this->unknown_0440; - this->unknown_0440 = nullptr; + if (this->characterRender) { + delete this->characterRender; + this->characterRender = nullptr; } } @@ -4843,7 +4843,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef const std::uint32_t previousFlags = this->stateFlags; this->bodyState = bodyState; this->stateFlags = stateFlags; - this->unknown_02C4 = effectState; + this->effectState = effectState; CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; unsigned char* const color = reinterpret_cast(&this->render.color); @@ -4877,11 +4877,11 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->render.enabled = 0; if (this->render.accountId != g_session.m_aid && g_session.IsAdminSubMode(7) == 0) { - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->SendMsg(nullptr, AM_REMOVEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_DELETE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -4893,21 +4893,21 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef if (!g_session.IsGuildMemberAccount(this->render.accountId)) { this->ClearUnknown0188(); } - if (this->unknown_018C) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_018C)); - this->unknown_018C = 0; + if (this->actorTitleWindow) { + g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); + this->actorTitleWindow = 0; } } else { if (notify) { this->SendMsg(nullptr, AM_MAKE_SMOKE_FFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; } this->render.enabled = 1; if (this->render.accountId != g_session.m_aid) { - this->render.unknown_00A4Bytes[0] = 1; + this->render.visibilityOptions[0] = 1; } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_MAKE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -4917,7 +4917,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_MAKE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } this->RefreshGuildEmblemWindow(); - if (this->unknown_02B4 != 0) { + if (this->hasLevelAura != 0) { this->UpdateMaxLevelAura(); } if (this->GetEffectiveJob(-1) == 45) { @@ -4932,11 +4932,11 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->render.visible = 0; this->render.enabled = 0; if (this->render.accountId != g_session.m_aid && g_session.IsAdminSubMode(7) == 0) { - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; this->SendMsg(nullptr, AM_REMOVEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_DELETE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -4948,17 +4948,17 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef if (!g_session.IsGuildMemberAccount(this->render.accountId)) { this->ClearUnknown0188(); } - if (this->unknown_018C) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_018C)); - this->unknown_018C = 0; + if (this->actorTitleWindow) { + g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); + this->actorTitleWindow = 0; } } else { this->render.visible = 1; this->render.enabled = 1; if (this->render.accountId != g_session.m_aid) { - this->render.unknown_00A4Bytes[0] = 1; + this->render.visibilityOptions[0] = 1; } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_MAKE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -4968,7 +4968,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_MAKE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } this->RefreshGuildEmblemWindow(); - if (this->unknown_02B4 != 0) { + if (this->hasLevelAura != 0) { this->UpdateMaxLevelAura(); } } @@ -5012,19 +5012,19 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->ResetJobEffects(); if (StateFlag06(this->stateFlags)) { const int admin = g_session.IsAdminSubMode(8); - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; if (admin == 0) { this->render.visible = 0; this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if (this->unknown_03B0.size() != 0) { - for (CGameObject* object : this->unknown_03B0) { + if (this->msgEffectList.size() != 0) { + for (CGameObject* object : this->msgEffectList) { static_cast(object)->m_visible = this->render.accountId == g_session.m_aid; } } } else { this->render.visible = 1; } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_DELETE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -5036,22 +5036,22 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef if (!g_session.IsGuildMemberAccount(this->render.accountId)) { this->ClearUnknown0188(); } - if (this->unknown_018C) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_018C)); - this->unknown_018C = 0; + if (this->actorTitleWindow) { + g_windowMgr.Schedule(reinterpret_cast(this->actorTitleWindow)); + this->actorTitleWindow = 0; } } else { this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 1; + this->render.visibilityOptions[0] = 1; if (!this->render.enabled && this->render.accountId != g_session.m_aid) { - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; } - if (this->unknown_03B0.size() != 0) { - for (CGameObject* object : this->unknown_03B0) { + if (this->msgEffectList.size() != 0) { + for (CGameObject* object : this->msgEffectList) { static_cast(object)->m_visible = true; } } - if (this->unknown_02FC > 0) { + if (this->maxHp > 0) { this->SendMsg(nullptr, AM_MAKE_CART, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } if (StateFlag04(this->stateFlags)) { @@ -5061,7 +5061,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_MAKE_WOLF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } this->RefreshGuildEmblemWindow(); - if (this->unknown_02B4 != 0) { + if (this->hasLevelAura != 0) { this->UpdateMaxLevelAura(); } } @@ -5077,7 +5077,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef g_soundMgr->PlayWave( "_stone_explosion.wav", this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0 ); - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; } case OPT1_FREEZE: { @@ -5089,20 +5089,20 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef ); this->render.isMotionFinished = true; this->render.isMotionFreezed = false; - this->render.unknown_00A3 = 0; + this->render.colorLocked = 0; color[1] = 0xFF; color[2] = 0xFF; color[0] = 0xFF; - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; } case OPT1_STUN: this->SendMsg(nullptr, AM_DELETE_STUN_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; case OPT1_SLEEP: this->SendMsg(nullptr, AM_DELETE_SLEEP_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - static_cast(g_modeMgr.GetGameMode())->unknown_02CC = 0; + static_cast(g_modeMgr.GetGameMode())->waitingUseItemAck = 0; break; case OPT1_BURNING: this->SendMsg(nullptr, AM_DELETE_BURNING_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -5120,7 +5120,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef case OPT1_STONE: this->render.isMotionFinished = true; this->render.isMotionFreezed = true; - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x40; color[2] = 0x40; color[0] = 0x40; @@ -5129,7 +5129,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_MAKE_ICEEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); this->render.isMotionFinished = true; this->render.isMotionFreezed = true; - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x80; color[2] = 0x00; color[0] = 0xFF; @@ -5153,7 +5153,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_MAKE_SLEEP_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); break; case OPT1_STONEWAIT: - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x80; color[2] = 0x80; color[0] = 0x80; @@ -5172,21 +5172,21 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef } bool poisonSound = false; - if (this->unknown_02C4 & 0x80) { + if (this->effectState & 0x80) { if (this->render.accountId == g_session.m_aid) { g_playerPoisoned = 1; } - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x32; color[2] = 0xFF; color[0] = 0xFF; poisonSound = true; - } else if (this->unknown_02C4 & 0x01) { + } else if (this->effectState & 0x01) { if (this->render.accountId == g_session.m_aid) { g_playerPoisoned = 1; } if (!this->HasId(812)) { - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x80; color[2] = 0xFF; color[0] = 0xFF; @@ -5210,9 +5210,9 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef } } - if (this->unknown_02C4 & 0x02) { + if (this->effectState & 0x02) { this->SendMsg(nullptr, AM_MAKE_CURSE_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->render.unknown_00A3 = 1; + this->render.colorLocked = 1; color[1] = 0x32; color[2] = 0xC8; color[0] = 0x32; @@ -5226,7 +5226,7 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_DELETE_CURSE_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - if (this->unknown_02C4 & 0x04) { + if (this->effectState & 0x04) { if (notify) { const vector3d& player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player)->render.position; g_soundMgr->PlayWave( @@ -5238,16 +5238,16 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->SendMsg(nullptr, AM_DELETE_SILENCE_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - this->SendMsg(nullptr, (this->unknown_02C4 & 0x20) ? AM_MAKE_ANGELUS_EFFECT : AM_DELETE_ANGELUS_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->SendMsg(nullptr, (this->effectState & 0x20) ? AM_MAKE_ANGELUS_EFFECT : AM_DELETE_ANGELUS_EFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - if ((this->unknown_02C4 & 0x08) && notify) { + if ((this->effectState & 0x08) && notify) { const vector3d& player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player)->render.position; g_soundMgr->PlayWave( "_confusion.wav", this->render.position.x - player.x, 0.0f, this->render.position.z - player.z, 250, 40, 1.0f, 0 ); } - if (this->unknown_02C4 & 0x10) { + if (this->effectState & 0x10) { if (this->render.accountId == g_session.m_aid) { g_overrideColor = 1; } @@ -5274,11 +5274,11 @@ void CGameActor::SetStatusStates(int bodyState, std::uint32_t stateFlags, int ef this->render.isMotionFreezed = false; } - if ((this->unknown_02C4 & 0x83) == 0 && this->bodyState != OPT1_FREEZE && this->bodyState != OPT1_STONE && this->bodyState != OPT1_STONEWAIT && + if ((this->effectState & 0x83) == 0 && this->bodyState != OPT1_FREEZE && this->bodyState != OPT1_STONE && this->bodyState != OPT1_STONEWAIT && static_cast(this->GetInstant(3)) != 1 && static_cast(this->GetInstant(12)) != 1 && static_cast(this->GetInstant(13)) != 1 && static_cast(this->GetInstant(14)) != 1 && static_cast(this->GetInstant(15)) != 1) { - this->render.unknown_00A3 = 0; + this->render.colorLocked = 0; color[1] = 0xFF; color[2] = 0xFF; color[0] = 0xFF; @@ -5306,8 +5306,8 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i int hitCount = info->hitCount; const int skillId = info->skillId; int type = info->type; - const int unknown_001C = info->unknown_001C; - const int unknown_0020 = info->unknown_0020; + const int unknown_001C = info->cellX; + const int unknown_0020 = info->cellY; const int attackSpeed = info->attackSpeed; const int motionSpeed = info->motionSpeed; if (hitCount <= 0 || hitCount > 36) { @@ -5379,7 +5379,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i if (target != nullptr) { if (!this->IsSkillWithoutAction(skillId)) { const float speed = static_cast(motionSpeed) / 288.0f; - const unsigned delay = static_cast(this->unknown_0378 * this->render.speed * 24.0f); + const unsigned delay = static_cast(this->attackMotion * this->render.speed * 24.0f); int effect = -1; int followEffect = -1; switch (skillId) { @@ -5413,15 +5413,15 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i message.damage = damage; message.time = timeGetTime() + delay; message.attackerAid = this->render.accountId; - message.unknown_0014 = unknown_001C; - message.unknown_0018 = unknown_0020; - message.unknown_001C = effect; + message.cellX = unknown_001C; + message.cellY = unknown_0020; + message.hitEffect = effect; message.effectId = followEffect; - message.unknown_0024 = level; + message.monsterValue = level; message.motionSpeed = speed; - message.unknown_002C = 0; - message.unknown_0030 = skillId; - message.unknown_0034 = 0; + message.blueDamage = 0; + message.skillId = skillId; + message.skillTarget = 0; target->SendMsg(this, AM_WILL_BE_ATTACKED, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } @@ -5432,21 +5432,21 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i g_session.PlaySkillEffect(skillId, hitCount, this, static_cast(target)); if (target != nullptr) { if (!this->IsSkillWithoutAction(skillId)) { - const unsigned delay = static_cast(this->unknown_0378 * this->render.speed * 24.0f); + const unsigned delay = static_cast(this->attackMotion * this->render.speed * 24.0f); message.targetAid = this->hitTargetAid; message.action = 0x61; message.damage = damage; message.time = timeGetTime() + delay; message.attackerAid = this->render.accountId; - message.unknown_0014 = unknown_001C; - message.unknown_0018 = unknown_0020; - message.unknown_001C = -1; + message.cellX = unknown_001C; + message.cellY = unknown_0020; + message.hitEffect = -1; message.effectId = -1; - message.unknown_0024 = level; + message.monsterValue = level; message.motionSpeed = static_cast(motionSpeed) / 288.0f; - message.unknown_002C = 0; - message.unknown_0030 = skillId; - message.unknown_0034 = 0; + message.blueDamage = 0; + message.skillId = skillId; + message.skillTarget = 0; target->SendMsg(this, AM_WILL_BE_ATTACKED, 0, address, address >> 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); return; } @@ -5501,8 +5501,8 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i g_session.PlaySkillEffect(skillId, hitCount, this, static_cast(target)); } - if (target != nullptr && target != this && !CSkillActionMgr::GetInstance()->KeepSkillAttackMotion(skillId, type) && this->render.unknown_0070 != 9 && - this->render.unknown_0070 != 2) { + if (target != nullptr && target != this && !CSkillActionMgr::GetInstance()->KeepSkillAttackMotion(skillId, type) && this->render.state != 9 && + this->render.state != 2) { this->Face(targetPos.x, targetPos.z); } @@ -5528,7 +5528,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i break; } - unsigned delay = static_cast(this->unknown_0378 * this->render.speed * 24.0f); + unsigned delay = static_cast(this->attackMotion * this->render.speed * 24.0f); if (this->GetEffectiveJob(-1) == 0x3F8 || this->GetEffectiveJob(-1) == 0x58C) { delay += 0xC0; } @@ -5684,15 +5684,15 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i message.damage = damage; message.time = timeGetTime() + delay; message.attackerAid = this->render.accountId; - message.unknown_0014 = unknown_001C; - message.unknown_0018 = unknown_0020; - message.unknown_001C = effect; + message.cellX = unknown_001C; + message.cellY = unknown_0020; + message.hitEffect = effect; message.effectId = followEffect; - message.unknown_0024 = level; + message.monsterValue = level; message.motionSpeed = static_cast(motionSpeed) / 288.0f; - message.unknown_002C = 0; - message.unknown_0030 = skillId; - message.unknown_0034 = 0; + message.blueDamage = 0; + message.skillId = skillId; + message.skillTarget = 0; switch (skillId) { case MO_COMBOFINISH: case CH_TIGERFIST: @@ -5752,7 +5752,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i case MO_INVESTIGATE: case MO_FINGEROFFENSIVE: case SR_RIDEINLIGHTNING: - if (this->unknown_0314 != 5) { + if (this->objectType != 5) { this->SetSequenceInterval(10); if (g_session.IsDoramJob(this->GetEffectiveJob(-1)) == true) { this->SetFrameSequence(0x58, 4, 5, 0x58, 5, 1, 1100, 0); @@ -5762,10 +5762,10 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i } break; case MO_EXTREMITYFIST: - if (this->unknown_0314 != 5) { + if (this->objectType != 5) { this->SetSequenceInterval(4); this->SetFrameSequence(0x58, 0, 7, 0x58, 7, 1, 3500, 0); - this->unknown_0184 = 1; + this->isAsuraAttack = 1; } break; case MO_CHAINCOMBO: @@ -5874,7 +5874,7 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i const int previous = hit; ++hit; message.effectId = -1; - message.unknown_0034 = hit; + message.skillTarget = hit; if (skillId == KN_PIERCE) { message.time += g_multiHitInterval + 80; total += damage; @@ -5910,17 +5910,17 @@ void CGameActor::ProcessSkillMessage(CGameObject*, const ActorSkillInfo* info, i case WL_COMET: message.action = action; if (previous & 1) { - message.unknown_001C = -1; + message.hitEffect = -1; } else if (g_serviceOptions.Get(229)) { - message.unknown_001C = 0x601; + message.hitEffect = 0x601; message.effectId = 0x602; } else { - message.unknown_001C = 0x588; + message.hitEffect = 0x588; message.effectId = 0x589; } break; case ABC_DEFT_STAB: - message.unknown_001C = -1; + message.hitEffect = -1; message.effectId = g_session.FindUnknown0700(skillId); message.action = action; break; diff --git a/Source/Contents/Actors/RenderObjectState.cpp b/Source/Contents/Actors/RenderObjectState.cpp index a41655088..0dec737bc 100644 --- a/Source/Contents/Actors/RenderObjectState.cpp +++ b/Source/Contents/Actors/RenderObjectState.cpp @@ -32,35 +32,35 @@ void RenderObjectState::Reset() { this->position.z = 0; this->animation = 0; this->previousAnimation = 0; - this->unknown_0040 = 0; + this->lastSoundAnimation = 0; this->curMotion = 0; - this->unknown_0044 = 0; + this->lastSoundMotion = 0; this->angle = 0; this->scale = 1; - this->unknown_0054 = 1; - this->unknown_006C = 0; + this->shadowScale = 1; + this->motionType = 0; this->speed = 1; - this->unknown_0070 = 0; + this->state = 0; this->visible = 1; this->enabled = 1; this->color = 0xFFFFFFFFu; - this->unknown_00A2 = 0; - this->unknown_00A4 = 0; + this->flatDepth = 0; + this->visibilityState = 0; this->isMotionFinished = 0; this->isMotionFreezed = 0; - this->unknown_0078 = 0; - this->unknown_007C = 0; + this->spriteOffsetX = 0; + this->spriteAngle = 0; this->started = timeGetTime(); this->isSingleColor = 0; this->isLieOnGround = 0; - this->unknown_00A3 = 0; + this->colorLocked = 0; this->overrideColor = 0xFFFF0000u; - this->unknown_0080 = 0; - this->unknown_0048 = 0; - this->unknown_005C = 1; - this->unknown_0060 = 1; - this->unknown_0064 = 1; - this->unknown_00A8 = 0; + this->depthLayer = 0; + this->bodyPalette = 0; + this->distanceScale = 1; + this->motionFinishThreshold = 1; + this->motionSpeedScale = 1; + this->isCharacter = 0; char spriteName[128]; char actionName[128]; @@ -87,26 +87,26 @@ void RenderObjectState::Reset() { this->action->Lock(); } - this->unknown_0090 = 0; - this->unknown_00F4 = 0; - this->unknown_00F6 = 0; - this->unknown_00F8 = 0; - this->unknown_00FA = 0; - this->unknown_00FC = 0; + this->savedTintColor = 0; + this->effectPhase = 0; + this->tintPhase = 0; + this->hoverAngle = 0; + this->hoverHeight = 0; + this->fontSequenceState = 0; this->unknown_0100 = 0; this->accountId = 0; - this->unknown_0114 = 0; - this->unknown_00C8 = 0; - this->unknown_00D8 = 0; - this->unknown_00DC = 0; - this->unknown_00C2 = 10; - this->unknown_00EC = 1; + this->specialMotionLocked = 0; + this->frameSequenceActive = 0; + this->animationSequenceActive = 0; + this->timedSequenceActive = 0; + this->sequenceInterval = 10; + this->effectPhaseState = 1; this->flags = 0; - this->unknown_00F0 = 0; - this->unknown_00F2 = 0; - this->unknown_00B4 = 1; + this->pulsePhaseState = 0; + this->outlineAlpha = 0; + this->useGroundLighting = 1; this->instant.Clear(); - this->unknown_0124 = 0; - this->unknown_0128 = 0; - this->unknown_012C = 0; + this->blendFlags = 0; + this->hoverOffsetLow = 0; + this->hoverOffsetHigh = 0; } diff --git a/Source/Contents/Actors/RenderObjectState.h b/Source/Contents/Actors/RenderObjectState.h index 7619ddde1..8bcbf1e9a 100644 --- a/Source/Contents/Actors/RenderObjectState.h +++ b/Source/Contents/Actors/RenderObjectState.h @@ -24,28 +24,28 @@ struct RenderObjectState { /* 0034 */ int animation; /* 0038 */ int previousAnimation; /* 003C */ int curMotion; - /* 0040 */ std::uint32_t unknown_0040; - /* 0044 */ std::uint32_t unknown_0044; - /* 0048 */ std::uint32_t unknown_0048; + /* 0040 */ std::uint32_t lastSoundAnimation; + /* 0044 */ std::uint32_t lastSoundMotion; + /* 0048 */ std::uint32_t bodyPalette; /* 004C */ float angle; /* 0050 */ float scale; - /* 0054 */ float unknown_0054; + /* 0054 */ float shadowScale; /* 0058 */ float speed; - /* 005C */ float unknown_005C; - /* 0060 */ float unknown_0060; - /* 0064 */ float unknown_0064; + /* 005C */ float distanceScale; + /* 0060 */ float motionFinishThreshold; + /* 0064 */ float motionSpeedScale; /* 0068 */ float motionSpeed; - /* 006C */ std::uint32_t unknown_006C; - /* 0070 */ std::uint32_t unknown_0070; - /* 0074 */ std::uint32_t unknown_0074; - /* 0078 */ std::uint32_t unknown_0078; - /* 007C */ std::uint32_t unknown_007C; - /* 0080 */ std::uint32_t unknown_0080; + /* 006C */ std::uint32_t motionType; + /* 0070 */ std::uint32_t state; + /* 0074 */ std::uint32_t previousState; + /* 0078 */ std::uint32_t spriteOffsetX; + /* 007C */ std::uint32_t spriteAngle; + /* 0080 */ std::uint32_t depthLayer; /* 0084 */ std::uint32_t overrideColor; /* 0088 */ std::uint32_t started; - /* 008C */ std::uint32_t unknown_008C; - /* 0090 */ std::uint32_t unknown_0090; - /* 0094 */ std::uint32_t unknown_0094; + /* 008C */ std::uint32_t motionStartTime; + /* 0090 */ std::uint32_t savedTintColor; + /* 0094 */ std::uint32_t targetTintColor; /* 0098 */ std::uint32_t color; /* 009C */ bool isLieOnGround; /* 009D */ bool isMotionFinished; @@ -53,68 +53,68 @@ struct RenderObjectState { /* 009F */ bool isSingleColor; /* 00A0 */ unsigned char visible; /* 00A1 */ unsigned char enabled; - /* 00A2 */ unsigned char unknown_00A2; - /* 00A3 */ unsigned char unknown_00A3; + /* 00A2 */ unsigned char flatDepth; + /* 00A3 */ unsigned char colorLocked; union { - /* 00A4 */ std::uint16_t unknown_00A4; - /* 00A4 */ unsigned char unknown_00A4Bytes[2]; + /* 00A4 */ std::uint16_t visibilityState; + /* 00A4 */ unsigned char visibilityOptions[2]; }; /* 00A6 */ unsigned char unknown_00A6[2]; - /* 00A8 */ std::uint32_t unknown_00A8; + /* 00A8 */ std::uint32_t isCharacter; /* 00AC */ int screenX; /* 00B0 */ int screenY; - /* 00B4 */ unsigned char unknown_00B4; + /* 00B4 */ unsigned char useGroundLighting; /* 00B5 */ unsigned char sequenceAnimation; /* 00B6 */ unsigned char sequenceFrame; /* 00B7 */ unsigned char sequenceAnimations[5]; /* 00BC */ unsigned char sequenceFrames[5]; /* 00C1 */ unsigned char sequenceLast; - /* 00C2 */ unsigned char unknown_00C2; + /* 00C2 */ unsigned char sequenceInterval; /* 00C3 */ unsigned char sequenceFinishAnimation; /* 00C4 */ unsigned char sequenceFinishFrame; /* 00C5 */ unsigned char sequenceIndex; /* 00C6 */ unsigned char unknown_00C6[2]; - /* 00C8 */ std::uint32_t unknown_00C8; + /* 00C8 */ std::uint32_t frameSequenceActive; /* 00CC */ int sequenceLoop; /* 00D0 */ int sequenceTimed; /* 00D4 */ int sequenceFinished; - /* 00D8 */ std::uint32_t unknown_00D8; - /* 00DC */ std::uint32_t unknown_00DC; + /* 00D8 */ std::uint32_t animationSequenceActive; + /* 00DC */ std::uint32_t timedSequenceActive; /* 00E0 */ std::uint32_t sequenceTick; /* 00E4 */ std::uint32_t sequenceDeadline; /* 00E8 */ std::uint32_t flags; union { - /* 00EC */ std::uint32_t unknown_00EC; - /* 00EC */ unsigned char unknown_00ECBytes[4]; + /* 00EC */ std::uint32_t effectPhaseState; + /* 00EC */ unsigned char effectPhaseBytes[4]; }; union { - /* 00F0 */ std::uint16_t unknown_00F0; + /* 00F0 */ std::uint16_t pulsePhaseState; /* 00F0 */ unsigned char pulsePhases[2]; }; - /* 00F2 */ unsigned char unknown_00F2; + /* 00F2 */ unsigned char outlineAlpha; /* 00F3 */ unsigned char unknown_00F3; - /* 00F4 */ short unknown_00F4; - /* 00F6 */ unsigned char unknown_00F6; + /* 00F4 */ short effectPhase; + /* 00F6 */ unsigned char tintPhase; /* 00F7 */ unsigned char unknown_00F7; - /* 00F8 */ short unknown_00F8; - /* 00FA */ unsigned char unknown_00FA; + /* 00F8 */ short hoverAngle; + /* 00FA */ unsigned char hoverHeight; /* 00FB */ unsigned char unknown_00FB; union { - /* 00FC */ std::uint32_t unknown_00FC; - /* 00FC */ unsigned char unknown_00FCBytes[4]; + /* 00FC */ std::uint32_t fontSequenceState; + /* 00FC */ unsigned char fontSequenceBytes[4]; }; /* 0100 */ unsigned char unknown_0100; /* 0101 */ unsigned char unknown_0101[3]; /* 0104 */ CSprRes* sprite; /* 0108 */ CActRes* action; - /* 010C */ std::uint32_t unknown_010C; + /* 010C */ std::uint32_t spriteJob; /* 0110 */ std::uint32_t accountId; - /* 0114 */ unsigned char unknown_0114; + /* 0114 */ unsigned char specialMotionLocked; /* 0115 */ unsigned char unknown_0115[3]; /* 0118 */ CInstantVar instant; - /* 0124 */ std::uint32_t unknown_0124; - /* 0128 */ std::uint32_t unknown_0128; - /* 012C */ std::uint32_t unknown_012C; + /* 0124 */ std::uint32_t blendFlags; + /* 0128 */ std::uint32_t hoverOffsetLow; + /* 012C */ std::uint32_t hoverOffsetHigh; /* 0130 */ unsigned char unknown_0130[8]; }; diff --git a/Source/Contents/Actors/Skill.cpp b/Source/Contents/Actors/Skill.cpp index f67ca6ab8..306585351 100644 --- a/Source/Contents/Actors/Skill.cpp +++ b/Source/Contents/Actors/Skill.cpp @@ -41,10 +41,10 @@ struct SkillHitMessage { /* 0008 */ int unknown_0008; /* 000C */ std::uint32_t targetAid; /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; + /* 0014 */ int monsterValue; /* 0018 */ int hitCount; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; + /* 001C */ int cellX; + /* 0020 */ int cellY; /* 0024 */ int unknown_0024; /* 0028 */ int motionSpeed; }; @@ -77,12 +77,12 @@ CSkill::CSkill(std::uint32_t aid) { this->skillAid = aid; this->SetActorJob(0x7E); this->m_effectTimer = 0x8CA0; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; this->render.enabled = 0; - this->unknown_0264[0] = 0; + this->actorWindows[0] = 0; this->m_model = nullptr; this->m_effect = nullptr; - this->unknown_0410 = 0; + this->sourceActorId = 0; this->range = 0; this->m_hasEffect = false; this->m_targets.clear(); @@ -91,9 +91,9 @@ CSkill::CSkill(std::uint32_t aid) { // OFFSET: 0x00E4AA30 // FUNCTION: fn_24259 CSkill::~CSkill() { - if (this->unknown_0264[0] != 0) { - g_windowMgr.Schedule(reinterpret_cast(this->unknown_0264[0])); - this->unknown_0264[0] = 0; + if (this->actorWindows[0] != 0) { + g_windowMgr.Schedule(reinterpret_cast(this->actorWindows[0])); + this->actorWindows[0] = 0; } this->ReleaseModel(); @@ -204,7 +204,7 @@ void CSkill::Render(int argument) { g_renderer->ProjectViewport(&this->render.position.x, reinterpret_cast(argument), &x, &y, &reciprocalDepth); CRenderer* renderer = g_renderer; const float scale = renderer->ScaleDistance(reciprocalDepth) / g_heightScale; - this->render.unknown_005C = scale; + this->render.distanceScale = scale; float bounds[5]; bounds[0] = x - (renderer->viewport.uiScaleX + renderer->viewport.uiScaleX) * scale; @@ -271,7 +271,7 @@ static_assert(sizeof(SkillPickInfo) == 0x28); // OFFSET: 0x00E55100 // FUNCTION: fn_24303 void CSkill::SetRenderInfo(const float* box, float x, float y) { - if (this->render.unknown_00A4Bytes[1] != 0) { + if (this->render.visibilityOptions[1] != 0) { // GLOBAL: gl_25171 static int minimum = static_cast(g_renderer->UiScaleX() * 34.0f); auto* info = static_cast(operator new(sizeof(SkillPickInfo))); @@ -354,29 +354,29 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int return; } - this->unknown_0248 = timeGetTime(); - if (this->unknown_0264[0] == 0) { + this->chatTick = timeGetTime(); + if (this->actorWindows[0] == 0) { UITransBalloonText* balloon = new UITransBalloonText(); - this->unknown_0264[0] = reinterpret_cast(balloon); + this->actorWindows[0] = reinterpret_cast(balloon); balloon->SetSize(8, 8); - g_windowMgr.AddRenderedFront(reinterpret_cast(this->unknown_0264[0])); + g_windowMgr.AddRenderedFront(reinterpret_cast(this->actorWindows[0])); } - UITransBalloonText* balloon = reinterpret_cast(this->unknown_0264[0]); + UITransBalloonText* balloon = reinterpret_cast(this->actorWindows[0]); balloon->SetText(text, 35); balloon->SetColors(0xFF8080, 0); - this->unknown_0288 = balloon->geometry.width; - this->unknown_028C = balloon->geometry.height; - balloon->Move(this->render.screenX - this->unknown_0288 / 2, this->render.screenY - g_renderer->viewport.height * 110 / 480); + this->chatWidth = balloon->geometry.width; + this->chatHeight = balloon->geometry.height; + balloon->Move(this->render.screenX - this->chatWidth / 2, this->render.screenY - g_renderer->viewport.height * 110 / 480); return; } case AM_SKILL: { const SkillHitMessage* hit = reinterpret_cast(b); const int skillId = hit->skillId; - const int unknown_0014 = hit->unknown_0014; - const int unknown_001C = hit->unknown_001C; - const int unknown_0020 = hit->unknown_0020; + const int unknown_0014 = hit->monsterValue; + const int unknown_001C = hit->cellX; + const int unknown_0020 = hit->cellY; const int motionSpeed = hit->motionSpeed; int hitCount = hit->hitCount; if (hitCount == 0) { @@ -467,15 +467,15 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int damageMessage.damage = damage; damageMessage.time = timeGetTime(); damageMessage.attackerAid = this->skillAid; - damageMessage.unknown_0014 = unknown_001C; - damageMessage.unknown_0018 = unknown_0020; - damageMessage.unknown_001C = effectId; + damageMessage.cellX = unknown_001C; + damageMessage.cellY = unknown_0020; + damageMessage.hitEffect = effectId; damageMessage.effectId = -1; - damageMessage.unknown_0024 = unknown_0014; + damageMessage.monsterValue = unknown_0014; damageMessage.motionSpeed = static_cast(motionSpeed) / 288.0f; - damageMessage.unknown_002C = 0; - damageMessage.unknown_0030 = skillId; - damageMessage.unknown_0034 = 0; + damageMessage.blueDamage = 0; + damageMessage.skillId = skillId; + damageMessage.skillTarget = 0; const int address = reinterpret_cast(&damageMessage); int total = damage; @@ -484,7 +484,7 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int ++index; damageMessage.time += g_multiHitInterval; total += damage; - damageMessage.unknown_0034 = index; + damageMessage.skillTarget = index; target->SendMsg(this, AM_WILL_BE_ATTACKED, 0, address, address >> 31, total, total >> 31, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -517,54 +517,54 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int const vector3d& position = this->render.position; switch (this->GetEffectiveJob(-1)) { case UNT_ICEWALL: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; return; case UNT_FIREWALL: case UNT_FIRE_MANTLE: { const vector3d& player = mode->scene->player->render.position; g_soundMgr->PlayWave("effect\\EF_FireWall.wav", position.x - player.x, 0.0f, position.z - player.z, 250, 40, 1.0f, 0); - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; } case UNT_TATAMIGAESHI: case UNT_FIREWALK: case UNT_ELECTRICWALK: case UNT_VACUUM_EXTREME: - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_GROUNDDRIFT_WIND: this->m_effectId = 0x6B; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_WALLOFTHORN: this->m_effectId = 0x6A; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; return; case UNT_WARMER: this->m_effectId = 0x6A; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_GROUNDDRIFT_DARK: case UNT_GROUNDDRIFT_FIRE: case UNT_GROUNDDRIFT_NEUTRAL: this->m_effectId = 0x63; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_GROUNDDRIFT_POISON: this->m_effectId = 0x8B; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_MAGENTATRAP: case UNT_COBALTTRAP: case UNT_MAIZETRAP: case UNT_VERDURETRAP: this->m_effectId = 0x8B; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; this->ShowModel(this->GetTrapModelName()); return; case UNT_ELECTRICSHOCKER: this->m_effectId = 0x6B; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; this->ShowModel(this->GetTrapModelName()); if (!this->HasId(0x91)) { this->LaunchEffect(0x91, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -573,37 +573,37 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int case UNT_FIRINGTRAP: case UNT_CLUSTERBOMB: this->m_effectId = 0x6B; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; this->ShowModel(this->GetTrapModelName()); return; case UNT_ICEBOUNDTRAP: this->m_effectId = 0x6C; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; this->ShowModel(this->GetTrapModelName()); return; case UNT_GROUNDDRIFT_WATER: this->m_effectId = 0x6C; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_KAEN: if (rand() % 8 == 0) { const vector3d& player = mode->scene->player->render.position; g_soundMgr->PlayWave("effect\\화염진.wav", position.x - player.x, 0.0f, position.z - player.z, 250, 40, 1.0f, 0); } - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; case UNT_TRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); return; case UNT_BLASTMINE: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x6A; this->ShowModel(this->GetTrapModelName()); return; case UNT_REVERBERATION: case UNT_NETHERWORLD: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x1D0; return; case UNT_SKIDTRAP: @@ -611,31 +611,31 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int case UNT_LANDMINE: case UNT_TALKIEBOX: case UNT_THORNS_TRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); return; case UNT_SANDMAN: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x8B; this->ShowModel(this->GetTrapModelName()); return; case UNT_FLASHER: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x63; this->ShowModel(this->GetTrapModelName()); return; case UNT_FREEZINGTRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x6C; this->ShowModel(this->GetTrapModelName()); return; case UNT_CLAYMORETRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->m_effectId = 0x6B; this->ShowModel(this->GetTrapModelName()); return; case UNT_SHOCKWAVE: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); if (this->render.enabled && !this->HasId(0x91)) { this->LaunchEffect(0x91, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -646,12 +646,12 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int if (unit->owner == g_session.m_aid) { source = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); } else { - source = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->unknown_0410)); + source = static_cast(static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAID(this->sourceActorId)); } if (source != nullptr) { CreateHallucinationPc( - source->GetEffectiveJob(-1), source->unknown_0260, source->unknown_0440, &this->render.position, 180, source->render.unknown_0048, - source->unknown_0444, source->GetBodyCostume() + source->GetEffectiveJob(-1), source->sex, source->head, &this->render.position, 180, source->render.bodyPalette, + source->headPalette, source->GetBodyCostume() ); } return; @@ -659,13 +659,13 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int case UNT_KINGS_GRACE: { const vector3d& player = mode->scene->player->render.position; g_soundMgr->PlayWave("effect\\lg_kings_grace.wav", position.x - player.x, 0.0f, position.z - player.z, 250, 40, 1.0f, 0); - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; } case UNT_MAGMA_ERUPTION: { const vector3d& player = mode->scene->player->render.position; g_soundMgr->PlayWave("effect\\NC_MAGMA_ERUPTION.wav", position.x - player.x, 0.0f, position.z - player.z, 250, 40, 1.0f, 0); - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; return; } case UNT_PNEUMA: @@ -863,35 +863,35 @@ void CSkill::SendMsg(CGameObject* sender, int message, int a, int b, int c, int g_effectMgr->Spawn(this->render.accountId, 0x903, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); return; case UNT_DEEPBLINDTRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); if (this->render.enabled) { g_effectMgr->Spawn(this->render.accountId, 0x752, position.x, position.y, position.z, 0, -1, 0, 0); } return; case UNT_SWIFTTRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); if (this->render.enabled) { g_effectMgr->Spawn(this->render.accountId, 0x756, position.x, position.y, position.z, 0, -1, 0, 0); } return; case UNT_SOLIDTRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); if (this->render.enabled) { g_effectMgr->Spawn(this->render.accountId, 0x75A, position.x, position.y, position.z, 0, -1, 0, 0); } return; case UNT_FLAMETRAP: - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->ShowModel(this->GetTrapModelName()); if (this->render.enabled) { g_effectMgr->Spawn(this->render.accountId, 0x77F, position.x, position.y, position.z, 0, -1, 0, 0); } return; default: { - CRenderObject* source = static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAidIncludeMe(this->unknown_0410); + CRenderObject* source = static_cast(g_modeMgr.GetGameMode())->scene->GetGameActorByAidIncludeMe(this->sourceActorId); CSkillActionMgr* actions = CSkillActionMgr::GetInstance(); actions->OnSkillObjectCreate(this->GetEffectiveJob(-1), unit->level, this, static_cast(source)); return; diff --git a/Source/Contents/Actors/Skill.h b/Source/Contents/Actors/Skill.h index 53d0e765f..70250cdbc 100644 --- a/Source/Contents/Actors/Skill.h +++ b/Source/Contents/Actors/Skill.h @@ -24,7 +24,7 @@ public: void SetRenderInfo(const float* box, float x, float y); void ShowModel(const char* modelName); - /* 0410 */ int unknown_0410; + /* 0410 */ int sourceActorId; /* 0414 */ unsigned m_effectTimer; /* 0418 */ std::uint32_t skillAid; /* 041C */ C3dActor* m_model; diff --git a/Source/Contents/Actors/SpriteDrawingPolicy.cpp b/Source/Contents/Actors/SpriteDrawingPolicy.cpp index 0f2ef686e..1df26284d 100644 --- a/Source/Contents/Actors/SpriteDrawingPolicy.cpp +++ b/Source/Contents/Actors/SpriteDrawingPolicy.cpp @@ -10,11 +10,11 @@ bool CCharacterRender::DrawOnTop() const { if (g_session.m_newRobeDrawOnTop == 1) { int unusedPriority = 1; g_session.m_hotkeyScript->Call( - "_New_DrawOnTop", "ddddd>bd", this->unknown_00BC, this->unknown_0018[0], this->unknown_0010, this->unknown_0040, this->unknown_0044, &drawOnTop, + "_New_DrawOnTop", "ddddd>bd", this->robe, this->appearance[0], this->job, this->actionIndex, this->frameIndex, &drawOnTop, &unusedPriority ); } else { - g_session.m_hotkeyScript->Call("DrawOnTop", "ddddd>b", this->unknown_00BC, this->unknown_0018[0], this->unknown_0010, this->unknown_0040, this->unknown_0044, &drawOnTop); + g_session.m_hotkeyScript->Call("DrawOnTop", "ddddd>b", this->robe, this->appearance[0], this->job, this->actionIndex, this->frameIndex, &drawOnTop); } return drawOnTop; @@ -23,6 +23,6 @@ bool CCharacterRender::DrawOnTop() const { // OFFSET: 0x008124B0 // FUNCTION: fn_10111 bool CCharacterRender::SetRobe(int robe) { - this->unknown_00BC = robe; - return g_session.m_hotkeyScript->CallTable("TB_Layer_Priority", "IsHelmRobe", "d>b", robe, &this->unknown_00C0); + this->robe = robe; + return g_session.m_hotkeyScript->CallTable("TB_Layer_Priority", "IsHelmRobe", "d>b", robe, &this->isHelmRobe); } diff --git a/Source/Contents/AdventureGuideMgr.cpp b/Source/Contents/AdventureGuideMgr.cpp index 4d21bdf45..00da59553 100644 --- a/Source/Contents/AdventureGuideMgr.cpp +++ b/Source/Contents/AdventureGuideMgr.cpp @@ -1119,7 +1119,7 @@ using AdventureGuideContentsTable = std::map& out) { out.clear(); for (const AdventureGuideEpisode& episode : m_episodes) { - if (episode.order <= g_session.m_level && g_session.m_level <= episode.unknown_001C) { + if (episode.order <= g_session.m_level && g_session.m_level <= episode.maxLevel) { out.push_back(episode); } } @@ -1213,13 +1213,13 @@ void CAdventureGuideMgr::GetContentsList(std::list>* table; switch (type) { case 1: - table = &unknown_003C; + table = &episodeContents; break; case 3: - table = &unknown_0044; + table = &questContents; break; case 4: - table = &unknown_004C; + table = &dungeonContents; break; default: return; @@ -1232,11 +1232,11 @@ void CAdventureGuideMgr::GetContentsList(std::listbegin(), (*contents)->end(), std::back_inserter(out), [](const std::pair& entry) { - return entry.second.unknown_0004 <= g_session.m_level && g_session.m_level <= entry.second.unknown_0008; + return entry.second.minLevel <= g_session.m_level && g_session.m_level <= entry.second.maxLevel; }); out.sort([](const std::pair& lhs, const std::pair& rhs) { - return lhs.second.unknown_0004 < rhs.second.unknown_0004; + return lhs.second.minLevel < rhs.second.minLevel; }); } @@ -1248,10 +1248,10 @@ void CAdventureGuideMgr::GetEntryList(std::list>* table; switch (type) { case 5: - table = &unknown_0054; + table = &itemEntries; break; case 6: - table = &unknown_005C; + table = &equipmentEntries; break; default: return; @@ -1264,7 +1264,7 @@ void CAdventureGuideMgr::GetEntryList(std::listbegin(), (*entries)->end(), std::back_inserter(out)); out.sort([](const std::pair& lhs, const std::pair& rhs) { - return lhs.second.unknown_0004 < rhs.second.unknown_0004; + return lhs.second.minLevel < rhs.second.minLevel; }); } @@ -1272,17 +1272,17 @@ void CAdventureGuideMgr::GetEntryList(std::list*> found = FindMapped(this->unknown_003C, id); + const std::optional*> found = FindMapped(this->episodeContents, id); if (!found) { return true; } return std::any_of((*found)->begin(), (*found)->end(), [](const auto& entry) { - return entry.second.unknown_0004 <= g_session.m_level && g_session.m_level <= entry.second.unknown_0008; + return entry.second.minLevel <= g_session.m_level && g_session.m_level <= entry.second.maxLevel; }); } case 4: { - const std::optional*> found = FindMapped(this->unknown_004C, id); + const std::optional*> found = FindMapped(this->dungeonContents, id); if (!found) { return true; } return std::any_of((*found)->begin(), (*found)->end(), [](const auto& entry) { - return entry.second.unknown_0004 <= g_session.m_level && g_session.m_level <= entry.second.unknown_0008; + return entry.second.minLevel <= g_session.m_level && g_session.m_level <= entry.second.maxLevel; }); } case 3: { - const std::optional*> found = FindMapped(this->unknown_0044, id); + const std::optional*> found = FindMapped(this->questContents, id); if (!found) { return true; } return std::any_of((*found)->begin(), (*found)->end(), [](const auto& entry) { - return entry.second.unknown_0004 <= g_session.m_level && g_session.m_level <= entry.second.unknown_0008; + return entry.second.minLevel <= g_session.m_level && g_session.m_level <= entry.second.maxLevel; }); } case 5: { - const std::optional*> found = FindMapped(this->unknown_0054, id); + const std::optional*> found = FindMapped(this->itemEntries, id); if (!found) { return true; } return std::any_of((*found)->begin(), (*found)->end(), [](const auto& entry) { return entry.second.IsAvailable(entry.first); }); } case 6: { - const std::optional*> found = FindMapped(this->unknown_005C, id); + const std::optional*> found = FindMapped(this->equipmentEntries, id); if (!found) { return true; } @@ -1629,7 +1629,7 @@ bool CAdventureGuideMgr::IsAvailable(int type, int id) { // OFFSET: 0x00667510 // FUNCTION: fn_05257 bool AdventureGuideEntry::IsAvailable(int itemId) const { - if (this->unknown_0004 > g_session.m_level || g_session.m_level > this->unknown_0008) { + if (this->minLevel > g_session.m_level || g_session.m_level > this->maxLevel) { return false; } diff --git a/Source/Contents/AdventureGuideMgr.h b/Source/Contents/AdventureGuideMgr.h index 0671a3d88..c4fe5786c 100644 --- a/Source/Contents/AdventureGuideMgr.h +++ b/Source/Contents/AdventureGuideMgr.h @@ -13,14 +13,14 @@ #include struct AdventureGuideDetail { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; + /* 0000 */ int minLevel; + /* 0004 */ int maxLevel; + /* 0008 */ int questId; /* 000C */ std::string text; }; struct AdventureGuideIntro { - /* 0000 */ int unknown_0000; + /* 0000 */ int type; /* 0004 */ std::string title; /* 001C */ std::string text; /* 0034 */ std::map details; @@ -34,7 +34,7 @@ struct AdventureGuideText { struct AdventureGuideEpisodeSource { /* 0000 */ const char* name; /* 0004 */ int order; - /* 0008 */ int unknown_0008; + /* 0008 */ int maxLevel; /* 000C */ std::vector values; }; @@ -43,15 +43,15 @@ struct AdventureGuideEpisode { /* 0000 */ std::string name; /* 0018 */ int order; - /* 001C */ int unknown_001C; + /* 001C */ int maxLevel; /* 0020 */ std::vector values; }; struct AdventureGuideContents { - /* 0000 */ std::uint8_t unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; + /* 0000 */ std::uint8_t flag; + /* 0004 */ int minLevel; + /* 0008 */ int maxLevel; + /* 000C */ int questId; /* 0010 */ std::string first; /* 0028 */ std::string second; /* 0040 */ std::vector values; @@ -60,11 +60,11 @@ struct AdventureGuideContents { struct AdventureGuideEntry { bool IsAvailable(int itemId) const; - /* 0000 */ std::uint8_t unknown_0000; - /* 0001 */ std::uint8_t unknown_0001; - /* 0002 */ std::uint8_t unknown_0002; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; + /* 0000 */ std::uint8_t firstFlag; + /* 0001 */ std::uint8_t secondFlag; + /* 0002 */ std::uint8_t thirdFlag; + /* 0004 */ int minLevel; + /* 0008 */ int maxLevel; /* 000C */ std::string text; /* 0024 */ std::vector values; }; @@ -88,14 +88,14 @@ public: /* 0004 */ CLuaInstance m_lua; /* 000C */ std::map m_intros; - /* 0014 */ std::string unknown_0014; - /* 002C */ std::map unknown_002C; + /* 0014 */ std::string introTitle; + /* 002C */ std::map introTexts; /* 0034 */ std::list m_episodes; - /* 003C */ std::map> unknown_003C; - /* 0044 */ std::map> unknown_0044; - /* 004C */ std::map> unknown_004C; - /* 0054 */ std::map> unknown_0054; - /* 005C */ std::map> unknown_005C; + /* 003C */ std::map> episodeContents; + /* 0044 */ std::map> questContents; + /* 004C */ std::map> dungeonContents; + /* 0054 */ std::map> itemEntries; + /* 005C */ std::map> equipmentEntries; /* 0064 */ bool m_initialized; CAdventureGuideMgr(); @@ -109,7 +109,7 @@ public: void GetEntryList(std::list>& out, int type, int id); AdventureGuideResult SetIntroTitle(std::string_view title) { - unknown_0014 = title; + introTitle = title; return AdventureGuideResult(true, "good"); } @@ -150,11 +150,11 @@ static_assert(offsetof(AdventureGuideEntry, text) == 0xC); static_assert(offsetof(AdventureGuideEntry, values) == 0x24); static_assert(offsetof(CAdventureGuideMgr, m_lua) == 0x4); static_assert(offsetof(CAdventureGuideMgr, m_intros) == 0xC); -static_assert(offsetof(CAdventureGuideMgr, unknown_0014) == 0x14); -static_assert(offsetof(CAdventureGuideMgr, unknown_002C) == 0x2C); +static_assert(offsetof(CAdventureGuideMgr, introTitle) == 0x14); +static_assert(offsetof(CAdventureGuideMgr, introTexts) == 0x2C); static_assert(offsetof(CAdventureGuideMgr, m_episodes) == 0x34); -static_assert(offsetof(CAdventureGuideMgr, unknown_003C) == 0x3C); -static_assert(offsetof(CAdventureGuideMgr, unknown_0054) == 0x54); +static_assert(offsetof(CAdventureGuideMgr, episodeContents) == 0x3C); +static_assert(offsetof(CAdventureGuideMgr, itemEntries) == 0x54); static_assert(offsetof(CAdventureGuideMgr, m_initialized) == 0x64); static_assert(sizeof(CAdventureGuideMgr) == 0x68); #endif diff --git a/Source/Contents/Camera/Camera.h b/Source/Contents/Camera/Camera.h index 6596bd033..a4f384bf3 100644 --- a/Source/Contents/Camera/Camera.h +++ b/Source/Contents/Camera/Camera.h @@ -46,7 +46,7 @@ public: /* 0080 */ CameraFrame frame; /* 00F8 */ WorldViewSpatial spatial; /* 01B0 */ CWorld* scene; - /* 01B4 */ CSkyBox* unknown_01B4; + /* 01B4 */ CSkyBox* skyBox; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Camera/CameraState.h b/Source/Contents/Camera/CameraState.h index 31b887b0b..b7fcc736d 100644 --- a/Source/Contents/Camera/CameraState.h +++ b/Source/Contents/Camera/CameraState.h @@ -33,7 +33,7 @@ struct CameraShake { /* 0004 */ float horizontal; /* 0008 */ float distance; /* 000C */ float pitch; - /* 0010 */ unsigned unknown_0010; + /* 0010 */ unsigned resetFlags; /* 0014 */ int enabled; /* 0018 */ unsigned start; /* 001C */ unsigned duration; diff --git a/Source/Contents/CashEmotionMgr.cpp b/Source/Contents/CashEmotionMgr.cpp index a44da0a8d..9fa62b887 100644 --- a/Source/Contents/CashEmotionMgr.cpp +++ b/Source/Contents/CashEmotionMgr.cpp @@ -165,7 +165,7 @@ public: protected: /* 00E0 */ bool m_pressed; - /* 00E4 */ std::string unknown_00E4; + /* 00E4 */ std::string priceText; }; class UICashEmotionScrollBar : public UIScrollBar { @@ -229,7 +229,7 @@ public: protected: /* 00B0 */ std::vector m_items; - /* 00BC */ ICashEmotionAction* unknown_00BC; + /* 00BC */ ICashEmotionAction* playAction; /* 00C0 */ std::string m_filter; }; @@ -305,11 +305,11 @@ protected: /* 00C4 */ UICashEmotionListChildWnd_Search* m_searchList; /* 00C8 */ std::map m_tabs; /* 00D0 */ char m_tab; - /* 00D4 */ UIBitmapButton* unknown_00D4; + /* 00D4 */ UIBitmapButton* m_backButton; /* 00D8 */ UIEditCtrl* m_searchEdit; - /* 00DC */ UIBitmapButton* unknown_00DC; - /* 00E0 */ UIBitmapButton* unknown_00E0; - /* 00E4 */ UIBitmapButton* unknown_00E4; + /* 00DC */ UIBitmapButton* m_searchButton; + /* 00E0 */ UIBitmapButton* m_shortcutButton; + /* 00E4 */ UIBitmapButton* m_buyButton; /* 00E8 */ UICashEmotionListChildWnd_Abstract* m_currentList; /* 00EC */ UIStaticText* m_period; }; @@ -399,7 +399,7 @@ bool CCashEmotionAction_Register::Execute(int packId, int emotionId) { return false; } - if (auto* emotionWnd = reinterpret_cast(g_windowMgr.unknown_0380)) { + if (auto* emotionWnd = reinterpret_cast(g_windowMgr.emotionWnd)) { emotionWnd->SetMacroText(name, -1); return true; } @@ -425,7 +425,7 @@ bool CCashEmotionAction_SelectedUnPurchasedPack::Execute(int packId, int) { suggestions->ToggleInput(); } - UICashEmotionListWnd* listWnd = static_cast(g_windowMgr.unknown_0384); + UICashEmotionListWnd* listWnd = static_cast(g_windowMgr.cashEmotionListWnd); if (!listWnd) { listWnd = static_cast(g_windowMgr.EnsureWindow(WID_CASHEMOTIONLISTWND)); } @@ -478,7 +478,7 @@ __declspec(noinline) std::pair CashEmotionCommand::Get(int index) cons // OFFSET: 0x00592520 // FUNCTION: fn_02856 CashEmotionData::CashEmotionData(int id, int subId, const char* name, int unknown20, int unknown24, int actId, int sprId) - : id(id), subId(subId), name(name), unknown_0020(unknown20), unknown_0024(unknown24), actId(actId), sprId(sprId) { + : id(id), subId(subId), name(name), actionIndex(unknown20), frameIndex(unknown24), actId(actId), sprId(sprId) { } // OFFSET: 0x00592820 @@ -501,8 +501,8 @@ bool CashEmotionPackOrder::operator()(const int& left, const int& right) const { // OFFSET: 0x00596430 // FUNCTION: fn_02915 CCashEmotionMgr::CCashEmotionMgr() - : m_enabled(true), unknown_0005{}, m_action(nullptr), unknown_000C(0), unknown_0010{}, m_emotionsByPack{}, unknown_0050{}, m_packNames{}, unknown_00B0{}, - m_commands{}, unknown_0198{} { + : m_enabled(true), unknown_0005{}, m_action(nullptr), basePackId(0), packs{}, m_emotionsByPack{}, emotionOrder{}, m_packNames{}, actIds{}, + m_commands{}, packOrder{} { } // OFFSET: 0x00598520 @@ -521,12 +521,12 @@ CCashEmotionMgr::~CCashEmotionMgr() { // OFFSET: 0x00598C70 // FUNCTION: fn_02934 void CCashEmotionMgr::Reset() { - this->unknown_0010.clear(); + this->packs.clear(); this->m_emotionsByPack.clear(); - this->unknown_0050.clear(); + this->emotionOrder.clear(); this->m_searchIndex.clear(); this->m_packNames.clear(); - this->unknown_00B0.clear(); + this->actIds.clear(); this->m_lastActId = 0; this->m_sprNames.clear(); this->m_sprIds.clear(); @@ -538,7 +538,7 @@ void CCashEmotionMgr::Reset() { this->m_shortcuts.clear(); this->ClearCommands(); - this->unknown_0198.clear(); + this->packOrder.clear(); this->m_ownedPacks.clear(); this->m_unownedPacks.clear(); } @@ -621,12 +621,12 @@ void CCashEmotionMgr::HideSuggestions() { void CCashEmotionMgr::RefreshCommands() { this->ClearCommands(); - const unsigned int now = _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; + const unsigned int now = _time32(nullptr) - this->serverTimeOffset - this->intendedDelay; for (auto& shortcut : this->m_shortcuts) { for (const std::pair& entry : shortcut.second->entries) { const int packId = entry.first; const int emotionId = entry.second; - if (packId != this->unknown_000C && !this->IsOwnedPack(packId) && !this->IsPackAvailable(now, packId)) { + if (packId != this->basePackId && !this->IsOwnedPack(packId) && !this->IsPackAvailable(now, packId)) { continue; } @@ -673,7 +673,7 @@ void CCashEmotionMgr::ProcessChatCommand(const char* command) { // OFFSET: 0x00599840 // FUNCTION: fn_45457 int CCashEmotionMgr::GetActFilePath(const char* name, bool add) { - return this->RegisterFileName(this->unknown_00B0, this->m_packNames, [this]() { return ++this->m_lastActId; }, name, add); + return this->RegisterFileName(this->actIds, this->m_packNames, [this]() { return ++this->m_lastActId; }, name, add); } // OFFSET: 0x005998C0 @@ -688,8 +688,8 @@ const char* CCashEmotionMgr::GetPackName(int packId) { std::vector CCashEmotionMgr::FindBaseEmotions(const char* filter) { std::vector result; - auto it = this->unknown_0050.find(this->unknown_000C); - if (it == this->unknown_0050.end()) { + auto it = this->emotionOrder.find(this->basePackId); + if (it == this->emotionOrder.end()) { return result; } @@ -699,7 +699,7 @@ std::vector CCashEmotionMgr::FindBaseEmotions(const char* filter) { others.reserve(it->second.size()); for (int emotionId : it->second) { - auto pack = this->m_emotionsByPack.find(this->unknown_000C); + auto pack = this->m_emotionsByPack.find(this->basePackId); if (pack == this->m_emotionsByPack.end()) { continue; } @@ -733,7 +733,7 @@ std::vector CCashEmotionMgr::FindBaseEmotions(const char* filter) { // OFFSET: 0x00599C60 // FUNCTION: fn_02945 CashEmotionTable* CCashEmotionMgr::GetBasePackEmotions() { - auto it = this->m_emotionsByPack.find(this->unknown_000C); + auto it = this->m_emotionsByPack.find(this->basePackId); return it != this->m_emotionsByPack.end() ? &it->second : nullptr; } @@ -789,8 +789,8 @@ const char* CCashEmotionMgr::GetEmotionName(int packId, int emotionId) { std::vector CCashEmotionMgr::GetPackEmotions(int packId) { std::vector result; - auto it = this->unknown_0050.find(packId); - if (it == this->unknown_0050.end()) { + auto it = this->emotionOrder.find(packId); + if (it == this->emotionOrder.end()) { return result; } @@ -827,8 +827,8 @@ CashEmotionTable* CCashEmotionMgr::GetPackEmotionTable(int packId) { // OFFSET: 0x0059A080 // FUNCTION: fn_02952 CashEmotionPack* CCashEmotionMgr::GetPack(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return nullptr; } @@ -838,8 +838,8 @@ CashEmotionPack* CCashEmotionMgr::GetPack(int packId) { // OFFSET: 0x0059A0C0 // FUNCTION: fn_02953 const char* CCashEmotionMgr::GetPackTitle(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return nullptr; } @@ -849,12 +849,12 @@ const char* CCashEmotionMgr::GetPackTitle(int packId) { // OFFSET: 0x0059A110 // FUNCTION: fn_02954 int CCashEmotionMgr::GetPackUnknown18(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return -1; } - return it->second.unknown_0018; + return it->second.price; } // OFFSET: 0x0059A150 @@ -906,8 +906,8 @@ int CCashEmotionMgr::RegisterFileName( // OFFSET: 0x0059A5B0 // FUNCTION: fn_02958 unsigned int CCashEmotionMgr::GetPackEndTime(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return 0; } @@ -917,8 +917,8 @@ unsigned int CCashEmotionMgr::GetPackEndTime(int packId) { // OFFSET: 0x0059A5F0 // FUNCTION: fn_02959 unsigned int CCashEmotionMgr::GetPackStartTime(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return 0; } @@ -939,7 +939,7 @@ void CCashEmotionMgr::Search( continue; } - if (entry.second.first == this->unknown_000C) { + if (entry.second.first == this->basePackId) { this->AddSearchResult(basePack, entry.second); } else if (this->IsOwnedPack(entry.second.first)) { this->AddSearchResult(ownedPacks, entry.second); @@ -1015,12 +1015,12 @@ std::vector CCashEmotionMgr::SortUnownedPacks(const char* filter) { // OFFSET: 0x0059AD40 // FUNCTION: fn_02965 int CCashEmotionMgr::GetPackUnknown24(int packId) { - auto it = this->unknown_0010.find(packId); - if (this->unknown_0010.end() == it) { + auto it = this->packs.find(packId); + if (this->packs.end() == it) { return 0; } - return it->second.unknown_0024; + return it->second.period; } // OFFSET: 0x0059AD80 @@ -1036,7 +1036,7 @@ void CCashEmotionMgr::LoadScripts() { g_session.m_hotkeyScript->Register("c_InsertOrderList", InsertOrderList); g_session.m_hotkeyScript->Load("Lua Files\\CashEmotion\\CashEmotionClientSetting", true, false); - g_session.m_hotkeyScript->Call("getEmotionClientSetting", "s>d", "IntendedDelay", &this->unknown_01CC); + g_session.m_hotkeyScript->Call("getEmotionClientSetting", "s>d", "IntendedDelay", &this->intendedDelay); g_session.m_hotkeyScript->Load("Lua Files\\CashEmotion\\CashEmotionListDefine_F", true, false); g_session.m_hotkeyScript->Load("Lua Files\\CashEmotion\\CashEmotionListDefine", true, false); @@ -1139,7 +1139,7 @@ void CCashEmotionMgr::InsertEmotion(const int packId, const int emotionId, int u return; } - const char* baseName = this->GetEmotionName(this->unknown_000C, emotionId); + const char* baseName = this->GetEmotionName(this->basePackId, emotionId); if (!baseName) { return; } @@ -1233,9 +1233,9 @@ bool CCashEmotionMgr::IsOwnedPack(int packId) { // OFFSET: 0x0059C5A0 // FUNCTION: fn_02977 bool CCashEmotionMgr::RemoveExpiredPacks() { - auto* listWnd = static_cast(g_windowMgr.unknown_0384); + auto* listWnd = static_cast(g_windowMgr.cashEmotionListWnd); bool expired = false; - const __time32_t now = _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; + const __time32_t now = _time32(nullptr) - this->serverTimeOffset - this->intendedDelay; for (auto it = this->m_expiry.begin(); it != this->m_expiry.end();) { if (!it->second.IsBefore(now + 1)) { @@ -1276,7 +1276,7 @@ void CCashEmotionMgr::RemoveOwnedPack(int packId, bool refresh, bool clearExpiry } if (refresh) { - if (auto* listWnd = static_cast(g_windowMgr.unknown_0384)) { + if (auto* listWnd = static_cast(g_windowMgr.cashEmotionListWnd)) { listWnd->RefreshPackLists(); } } @@ -1295,7 +1295,7 @@ void CCashEmotionMgr::RemoveOwnedPack(int packId, bool refresh, bool clearExpiry // FUNCTION: fn_02979 CashEmotionPackRefresh CCashEmotionMgr::RefreshUnownedPacks() { bool changed = false; - const unsigned int now = _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; + const unsigned int now = _time32(nullptr) - this->serverTimeOffset - this->intendedDelay; std::unordered_map owned; for (int packId : this->m_ownedPacks) { @@ -1308,12 +1308,12 @@ CashEmotionPackRefresh CCashEmotionMgr::RefreshUnownedPacks() { } std::vector packs; - const int total = static_cast(this->unknown_0198.size()); + const int total = static_cast(this->packOrder.size()); const int ownedCount = static_cast(this->m_ownedPacks.size()); packs.reserve(total > ownedCount ? total - ownedCount : 0); int nextTime = INT_MAX; - for (int packId : this->unknown_0198) { + for (int packId : this->packOrder) { CashEmotionPack* pack = this->GetPack(packId); if (!pack) { continue; @@ -1354,7 +1354,7 @@ CashEmotionPackRefresh CCashEmotionMgr::RefreshUnownedPacks() { // OFFSET: 0x0059CDE0 // FUNCTION: fn_02981 void CCashEmotionMgr::SetServerTime(int param) { - this->unknown_01D0 = _time32(nullptr) - param; + this->serverTimeOffset = _time32(nullptr) - param; } // OFFSET: 0x0059CE00 @@ -1368,8 +1368,8 @@ void CCashEmotionMgr::SetServerTimeZone(short serverBias) { localBias = static_cast(-info.Bias); } const int offset = (serverBias - localBias) * 60; - this->unknown_01D4 = offset; - for (auto& entry : this->unknown_0010) { + this->serverTimezoneOffset = offset; + for (auto& entry : this->packs) { CashEmotionPack& pack = entry.second; if (pack.originalStartTime) { pack.startTime = pack.originalStartTime - offset; @@ -1405,9 +1405,9 @@ void CCashEmotionMgr::AcquirePack(int packId, unsigned int expiry) { } this->SetOwnedPack(packId, expiry); - this->unknown_01C4 = -1; + this->selectedPackId = -1; - UICashEmotionListWnd* listWnd = static_cast(g_windowMgr.unknown_0384); + UICashEmotionListWnd* listWnd = static_cast(g_windowMgr.cashEmotionListWnd); if (listWnd) { listWnd->ResetLists(); listWnd->RefreshSelection(); @@ -1418,7 +1418,7 @@ void CCashEmotionMgr::AcquirePack(int packId, unsigned int expiry) { // OFFSET: 0x0059D2C0 // FUNCTION: fn_02986 bool CCashEmotionMgr::UpdatePurchasedPackExpiry() { - auto* listWnd = static_cast(g_windowMgr.unknown_0384); + auto* listWnd = static_cast(g_windowMgr.cashEmotionListWnd); if (!listWnd) { return false; } @@ -1450,7 +1450,7 @@ bool CCashEmotionMgr::UpdatePurchasedPackExpiry() { // OFFSET: 0x0059FC50 // FUNCTION: fn_03031 int CCashEmotionMgr::GetServerTime() { - return _time32(nullptr) - this->unknown_01D0 - this->unknown_01CC; + return _time32(nullptr) - this->serverTimeOffset - this->intendedDelay; } // OFFSET: 0x0059FC70 @@ -1540,7 +1540,7 @@ int CCashEmotionMgr::InsertEmotionMsgListTableForCustom(lua_State* state) { const int emotionId = luaL_checkinteger(state, 2); const int baseEmotionId = luaL_checkinteger(state, 3); - const char* name = g_cashEmotionMgr->GetEmotionName(g_cashEmotionMgr->unknown_000C, baseEmotionId); + const char* name = g_cashEmotionMgr->GetEmotionName(g_cashEmotionMgr->basePackId, baseEmotionId); if (name && std::strlen(name) > 1) { g_cashEmotionMgr->AddShortcut(name + 1, packId, emotionId); } @@ -1569,11 +1569,11 @@ int CCashEmotionMgr::InsertOrderList(lua_State* state) { const int emotionId = luaL_checkinteger(state, 2); CCashEmotionMgr* mgr = g_cashEmotionMgr; - auto it = mgr->unknown_0050.find(packId); - if (it == mgr->unknown_0050.end()) { + auto it = mgr->emotionOrder.find(packId); + if (it == mgr->emotionOrder.end()) { std::vector order; order.push_back(emotionId); - mgr->unknown_0050.emplace(packId, std::move(order)); + mgr->emotionOrder.emplace(packId, std::move(order)); } else { std::vector& order = it->second; if (std::find(order.begin(), order.end(), emotionId) == order.end()) { @@ -1631,8 +1631,8 @@ int CCashEmotionMgr::InsertPackInfo(lua_State* state) { } const char limited = static_cast(luaL_checkinteger(state, 10)); - if (g_cashEmotionMgr->unknown_0010.try_emplace(packId, name, unknown18, startTime, endTime, unknown24, limited).second == true) { - g_cashEmotionMgr->unknown_0198.push_back(packId); + if (g_cashEmotionMgr->packs.try_emplace(packId, name, unknown18, startTime, endTime, unknown24, limited).second == true) { + g_cashEmotionMgr->packOrder.push_back(packId); } return 1; @@ -1739,7 +1739,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_Basic::Refresh(const char* f this->RemoveChild(item, 0); } this->scrollPosition = 0; - this->unknown_009C = 0; + this->horizontalScrollPosition = 0; const int packId = g_cashEmotionMgr->BasePackId(); std::vector emotions = g_cashEmotionMgr->FindBaseEmotions(filter); @@ -1832,15 +1832,15 @@ int UICashEmotionListChildWnd_Basic::SendMsg(UIWindow* sender, int message, std: // FUNCTION: fn_09362 UICashEmotionListChildWnd_Purchase::UICashEmotionListChildWnd_Purchase(int width, int height) : UICashEmotionListChildWnd_Abstract(width, height, 0) { - this->unknown_00BC = new (std::nothrow) CCashEmotionAction_Play(); + this->playAction = new (std::nothrow) CCashEmotionAction_Play(); this->OnCreate(width, height); } // OFFSET: 0x007C4AD0 // FUNCTION: fn_09364 UICashEmotionListChildWnd_Purchase::~UICashEmotionListChildWnd_Purchase() { - delete this->unknown_00BC; - this->unknown_00BC = nullptr; + delete this->playAction; + this->playAction = nullptr; this->m_items.clear(); } @@ -1858,7 +1858,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_Purchase::Refresh(const char this->RemoveChild(item, 0); } this->scrollPosition = 0; - this->unknown_009C = 0; + this->horizontalScrollPosition = 0; std::list unused(this->m_items.begin(), this->m_items.end()); this->m_items.clear(); @@ -1874,7 +1874,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_Purchase::Refresh(const char UICashEmotionPack* pack; int height; - auto it = std::find_if(unused.begin(), unused.end(), [packId](UICashEmotionPack* item) { return item->unknown_00A8 == packId; }); + auto it = std::find_if(unused.begin(), unused.end(), [packId](UICashEmotionPack* item) { return item->packId == packId; }); if (it != unused.end() && (pack = *it) != nullptr) { unused.remove(pack); height = pack->geometry.height; @@ -1887,7 +1887,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_Purchase::Refresh(const char height = pack->SetPack(packId, true, true); } - pack->SetSaleBadge(info->unknown_0028); + pack->SetSaleBadge(info->saleBadge); Timestamp* expiry = g_cashEmotionMgr->FindExpiry(packId); if (expiry) { pack->SetTitle(expiryFormat.c_str()); @@ -1927,8 +1927,8 @@ int UICashEmotionListChildWnd_Purchase::SendMsg(UIWindow* sender, int message, s if (message != UM_CASH_EMOTION_ACTIVATE) { return UICashEmotionListChildWnd_Abstract::SendMsg(sender, message, argument1, argument2, argument3, argument4); } - if (this->unknown_00BC) { - this->unknown_00BC->Execute(argument1, argument2); + if (this->playAction) { + this->playAction->Execute(argument1, argument2); } return 0; } @@ -1938,7 +1938,7 @@ int UICashEmotionListChildWnd_Purchase::SendMsg(UIWindow* sender, int message, s void UICashEmotionListChildWnd_Purchase::UpdateExpiry(int packId, Timestamp* expiry) { auto it = this->m_items.begin(); for (; it != this->m_items.end(); ++it) { - if (packId == (*it)->unknown_00A8) { + if (packId == (*it)->packId) { break; } } @@ -2073,7 +2073,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_UnPurchased::Refresh(const c this->RemoveChild(item, 0); } this->scrollPosition = 0; - this->unknown_009C = 0; + this->horizontalScrollPosition = 0; std::list unused(this->m_items.begin(), this->m_items.end()); this->m_items.clear(); @@ -2089,7 +2089,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_UnPurchased::Refresh(const c UICashEmotionPack* pack; int height; - auto it = std::find_if(unused.begin(), unused.end(), [packId](UICashEmotionPack* item) { return item->unknown_00A8 == packId; }); + auto it = std::find_if(unused.begin(), unused.end(), [packId](UICashEmotionPack* item) { return item->packId == packId; }); if (it != unused.end() && (pack = *it) != nullptr) { unused.remove(pack); height = pack->geometry.height; @@ -2102,7 +2102,7 @@ __declspec(noinline) void UICashEmotionListChildWnd_UnPurchased::Refresh(const c height = pack->SetPack(packId, false, false); } - pack->SetSaleBadge(info->unknown_0028); + pack->SetSaleBadge(info->saleBadge); const unsigned int endTime = g_cashEmotionMgr->GetPackEndTime(packId); if (endTime) { pack->SetTitle(endFormat.c_str()); @@ -2146,7 +2146,7 @@ int UICashEmotionListChildWnd_UnPurchased::SendMsg(UIWindow* sender, int message this->parent->SendMsg(sender, UM_TOGGLEPUSH, argument1, 0, 0, 0); for (UICashEmotionPack* pack : this->m_items) { UICashEmotionPack_Unpurchase* item = static_cast(pack); - item->SetPressed(item->unknown_00A8 == argument1, false); + item->SetPressed(item->packId == argument1, false); } } return 0; @@ -2156,7 +2156,7 @@ int UICashEmotionListChildWnd_UnPurchased::SendMsg(UIWindow* sender, int message // FUNCTION: fn_09401 UICashEmotionListWnd::UICashEmotionListWnd() : UIFrameWnd(0), m_placement(nullptr), m_basicList(nullptr), m_purchaseList(nullptr), m_unpurchasedList(nullptr), m_searchList(nullptr), - m_tab(0), unknown_00D4(nullptr), m_searchEdit(nullptr), unknown_00DC(nullptr), unknown_00E0(nullptr), unknown_00E4(nullptr), m_currentList(nullptr), + m_tab(0), m_backButton(nullptr), m_searchEdit(nullptr), m_searchButton(nullptr), m_shortcutButton(nullptr), m_buyButton(nullptr), m_currentList(nullptr), m_period(nullptr) { } @@ -2222,10 +2222,10 @@ void UICashEmotionListWnd::OnCreate(int width, int height) { } } - this->unknown_00D4 = this->CreateButton(36, 22, 20, 18, 189, "유저인터페이스\\cashemotion\\btn_arrowback_%s.bmp", false); - this->unknown_00DC = this->CreateButton(221, 22, 26, 18, 190, "유저인터페이스\\cashemotion\\btn_search_%s.bmp", true); - this->unknown_00E0 = this->CreateButton(252, 22, 37, 18, 191, "유저인터페이스\\cashemotion\\btn_shortui_%s.bmp", false); - this->unknown_00E4 = this->CreateButton(247, 355, 42, 20, 526, "유저인터페이스\\cashemotion\\btn_buy_%s.bmp", true); + this->m_backButton = this->CreateButton(36, 22, 20, 18, 189, "유저인터페이스\\cashemotion\\btn_arrowback_%s.bmp", false); + this->m_searchButton = this->CreateButton(221, 22, 26, 18, 190, "유저인터페이스\\cashemotion\\btn_search_%s.bmp", true); + this->m_shortcutButton = this->CreateButton(252, 22, 37, 18, 191, "유저인터페이스\\cashemotion\\btn_shortui_%s.bmp", false); + this->m_buyButton = this->CreateButton(247, 355, 42, 20, 526, "유저인터페이스\\cashemotion\\btn_buy_%s.bmp", true); this->m_searchEdit = new (std::nothrow) UIEditCtrl2(); if (this->m_searchEdit) { @@ -2463,7 +2463,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } case 526: { - const int packId = g_cashEmotionMgr->unknown_01C4; + const int packId = g_cashEmotionMgr->selectedPackId; if (packId <= 0) { return 0; } @@ -2489,7 +2489,7 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } const bool free = price == 0; - if (!free && g_session.GetInventoryItemCount(g_cashEmotionMgr->unknown_01C8) < price) { + if (!free && g_session.GetInventoryItemCount(g_cashEmotionMgr->purchaseItemId) < price) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(g_simpleStringMgr->GetString("EMSG_EMOTION_EXPANTION_NOT_ENOUGH_NYANGVINE")), 255, 0, 0, 0); return 0; } @@ -2514,8 +2514,8 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a if (g_windowMgr.RunModal(box) == 187) { CashEmotionPurchasePacket packet; packet.id = 0xBEC; - packet.packId = g_cashEmotionMgr->unknown_01C4; - packet.itemId = g_cashEmotionMgr->unknown_01C8; + packet.packId = g_cashEmotionMgr->selectedPackId; + packet.itemId = g_cashEmotionMgr->purchaseItemId; packet.price = g_cashEmotionMgr->GetPackUnknown18(packet.packId); GetRagConnection().Send(sizeof(packet), &packet); } @@ -2525,10 +2525,10 @@ int UICashEmotionListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a return 0; case UM_TOGGLEPUSH: - if (this->unknown_00E4) { - this->unknown_00E4->Enable(1); + if (this->m_buyButton) { + this->m_buyButton->Enable(1); } - g_cashEmotionMgr->unknown_01C4 = argument1; + g_cashEmotionMgr->selectedPackId = argument1; return this->SetPeriod(argument1); case UM_REFRESH: @@ -2575,14 +2575,14 @@ void UICashEmotionListWnd::SetTab(char tab) { this->m_tab = tab; if (this->m_tab == 3) { - const int packId = g_cashEmotionMgr->unknown_01C4; - if (this->unknown_00E4) { - this->unknown_00E4->Enable(packId > 0); + const int packId = g_cashEmotionMgr->selectedPackId; + if (this->m_buyButton) { + this->m_buyButton->Enable(packId > 0); } this->SetPeriod(packId); } else { - if (this->unknown_00E4) { - this->unknown_00E4->Enable(0); + if (this->m_buyButton) { + this->m_buyButton->Enable(0); } this->SetPeriod(0); } @@ -2601,14 +2601,14 @@ void UICashEmotionListWnd::SetTab(char tab) { } } - if (this->unknown_00D4) { - this->unknown_00D4->SetDisabled(basic); - this->unknown_00D4->Invalidate(); + if (this->m_backButton) { + this->m_backButton->SetDisabled(basic); + this->m_backButton->Invalidate(); } - if (this->unknown_00DC) { - this->unknown_00DC->SetDisabled(basic); - this->unknown_00DC->Invalidate(); + if (this->m_searchButton) { + this->m_searchButton->SetDisabled(basic); + this->m_searchButton->Invalidate(); } if (this->m_currentList) { @@ -2651,14 +2651,14 @@ void UICashEmotionListWnd::UpdateExpiry(int packId, Timestamp* expiry) { // FUNCTION: fn_09422 void UICashEmotionListWnd::RefreshSelection() { if (this->m_tab == 3) { - const int packId = g_cashEmotionMgr->unknown_01C4; - if (this->unknown_00E4) { - this->unknown_00E4->Enable(packId > 0); + const int packId = g_cashEmotionMgr->selectedPackId; + if (this->m_buyButton) { + this->m_buyButton->Enable(packId > 0); } this->SetPeriod(packId); } else { - if (this->unknown_00E4) { - this->unknown_00E4->Enable(0); + if (this->m_buyButton) { + this->m_buyButton->Enable(0); } this->SetPeriod(0); } @@ -2918,7 +2918,7 @@ int UICashEmotionMiniWnd::SendMsg( // OFFSET: 0x007C9C40 // FUNCTION: fn_09438 UICashEmotionPack::UICashEmotionPack() - : UIWindow(0), unknown_0088(nullptr), m_titleText(nullptr), unknown_00A8(-1), m_limited(false) { + : UIWindow(0), packTitleText(nullptr), m_titleText(nullptr), packId(-1), m_limited(false) { } // OFFSET: 0x007C9D60 @@ -2986,9 +2986,9 @@ std::string UICashEmotionPack::GetPriceText(int packId) { // OFFSET: 0x007CA2C0 // FUNCTION: fn_09444 int UICashEmotionPack::SetPack(int packId, bool showTooltip, bool hoverable) { - this->unknown_00A8 = packId; - if (this->unknown_0088) { - this->unknown_0088->SetTextFitted(g_cashEmotionMgr->GetPackTitle(packId)); + this->packId = packId; + if (this->packTitleText) { + this->packTitleText->SetTextFitted(g_cashEmotionMgr->GetPackTitle(packId)); } for (UICashEmotionPiece* piece : this->m_pieces) { @@ -3039,7 +3039,7 @@ int UICashEmotionPack::SetPack(int packId, bool showTooltip, bool hoverable) { // FUNCTION: fn_09445 void UICashEmotionPack::OnCreate(int, int) { auto* priceText = new (std::nothrow) UIStaticText(); - this->unknown_0088 = priceText; + this->packTitleText = priceText; if (priceText) { priceText->SetSize(145, 14); priceText->Move(33, 14); @@ -3248,11 +3248,11 @@ int UICashEmotionPack_Purchase::SendMsg( // OFFSET: 0x007CAF60 // FUNCTION: fn_09464 int UICashEmotionPack_Search::SetResults(const char* title, const std::vector>& results) { - if (this->unknown_0088) { + if (this->packTitleText) { if (title) { - this->unknown_0088->SetTextFitted(title); + this->packTitleText->SetTextFitted(title); } else { - this->unknown_0088->SetText("", 0); + this->packTitleText->SetText("", 0); } } @@ -3372,7 +3372,7 @@ UICashEmotionPack_Unpurchase::UICashEmotionPack_Unpurchase() : UICashEmotionPack // FUNCTION: fn_09473 int UICashEmotionPack_Unpurchase::SetPack(int packId, bool showTooltip, bool hoverable) { const int height = UICashEmotionPack::SetPack(packId, showTooltip, hoverable); - this->unknown_00E4 = this->GetPriceText(packId); + this->priceText = this->GetPriceText(packId); return height; } @@ -3380,8 +3380,8 @@ int UICashEmotionPack_Unpurchase::SetPack(int packId, bool showTooltip, bool hov // FUNCTION: fn_09474 void UICashEmotionPack_Unpurchase::Paint() { UICashEmotionPack::Paint(); - if (!this->unknown_00E4.empty()) { - this->DrawRightAlignedText(233, 42, this->unknown_00E4.c_str(), 0, 0, 12, 0xE68C5A, 1); + if (!this->priceText.empty()) { + this->DrawRightAlignedText(233, 42, this->priceText.c_str(), 0, 0, 12, 0xE68C5A, 1); } } @@ -3389,7 +3389,7 @@ void UICashEmotionPack_Unpurchase::Paint() { // FUNCTION: fn_09475 void UICashEmotionPack_Unpurchase::OnLBtnDblClk(int, int) { if (!this->m_pressed && this->parent) { - this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->unknown_00A8, 0, 0, 0); + this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->packId, 0, 0, 0); } } @@ -3397,7 +3397,7 @@ void UICashEmotionPack_Unpurchase::OnLBtnDblClk(int, int) { // FUNCTION: fn_09476 void UICashEmotionPack_Unpurchase::OnLBtnDown(int, int) { if (!this->m_pressed && this->parent) { - this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->unknown_00A8, 0, 0, 0); + this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->packId, 0, 0, 0); } } @@ -3426,7 +3426,7 @@ int UICashEmotionPack_Unpurchase::SendMsg( } if (!this->m_pressed && this->parent) { - this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->unknown_00A8, 0, 0, 0); + this->parent->SendMsg(this, UM_CASH_EMOTION_SELECT_PACK, this->packId, 0, 0, 0); } return 0; @@ -3457,8 +3457,8 @@ void UICashEmotionPiece::Set(int packId, int emotionId, bool showTooltip, bool h if (this->m_button) { this->m_button->SetSprite(g_cashEmotionMgr->GetSprFileName(data->actId)); this->m_button->SetActName(g_cashEmotionMgr->GetPackName(data->sprId)); - this->m_button->unknown_00C0 = std::max(data->unknown_0024, 0); - this->m_button->unknown_00BC = std::max(data->unknown_0020, 0); + this->m_button->frameIndex = std::max(data->frameIndex, 0); + this->m_button->animationIndex = std::max(data->actionIndex, 0); if (showTooltip) { this->m_button->SetTooltip(data->name.c_str()); } else { @@ -3526,7 +3526,7 @@ void UICashEmotionPiece::OnMouseLeave() { // OFFSET: 0x007CBE30 // FUNCTION: fn_09487 void UICashEmotionPiece::OnProcess() { - if (this->m_button && this->m_button->unknown_00C4 != 0) { + if (this->m_button && this->m_button->animate != 0) { this->m_button->Invalidate(); } } @@ -3722,11 +3722,11 @@ void UICashEmotionSprBtn::Paint() { } CPaletteRes* paletteRes = nullptr; - if (this->unknown_00FC.size() != 0) { - paletteRes = static_cast(ResourceMgr::Instance().Load(this->unknown_00FC.c_str())); + if (this->paletteName.size() != 0) { + paletteRes = static_cast(ResourceMgr::Instance().Load(this->paletteName.c_str())); } - const ActionFrame* frame = &action->Frame(this->unknown_00BC, this->unknown_00C0); + const ActionFrame* frame = &action->Frame(this->animationIndex, this->frameIndex); if (!frame) { return; } @@ -3758,7 +3758,7 @@ void UICashEmotionSprBtn::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } if (!texture) { @@ -3797,19 +3797,19 @@ void UICashEmotionSprBtn::Paint() { const int sourceY = static_cast(record.v0 * 256.0f + clipY); surface->DrawSurface( x < 0 ? 0 : x, y < 0 ? 0 : y, texture, sourceX < 0 ? 0 : sourceX, sourceY < 0 ? 0 : sourceY, drawWidth < 0 ? 0 : drawWidth, - drawHeight < 0 ? 0 : drawHeight, cell->mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 1, 0 + drawHeight < 0 ? 0 : drawHeight, cell->mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 1, 0 ); } - if (this->unknown_00C4) { - ++this->unknown_00C0; - if (this->unknown_00BC >= static_cast(action->animations.size())) { - this->unknown_00BC = 0; - this->unknown_00C0 = 0; + if (this->animate) { + ++this->frameIndex; + if (this->animationIndex >= static_cast(action->animations.size())) { + this->animationIndex = 0; + this->frameIndex = 0; } - if (this->unknown_00C0 >= static_cast(action->FrameCount(this->unknown_00BC))) { - this->unknown_00C0 = 0; + if (this->frameIndex >= static_cast(action->FrameCount(this->animationIndex))) { + this->frameIndex = 0; } } } @@ -3850,12 +3850,12 @@ UISpriteButton2::UISpriteButton2(UIWindow* target) // OFFSET: 0x00850320 // FUNCTION: fn_10675 UISpriteButton::UISpriteButton() : UIButton() { - this->unknown_00BC = 0; - this->unknown_00C0 = 0; - this->unknown_00B4 = 0; - this->unknown_00B8 = 0; - this->unknown_00C4 = 0; - this->unknown_00C8 = 1; + this->animationIndex = 0; + this->frameIndex = 0; + this->spriteStateA = 0; + this->spriteStateB = 0; + this->animate = 0; + this->spriteMode = 1; } // OFFSET: 0x00851C10 @@ -3882,13 +3882,13 @@ void UIHeadsprButton::Paint() { } const std::uint32_t* palette; - if (this->unknown_00FC.size() != 0) { - palette = dynamic_cast(ResourceMgr::Instance().Load(this->unknown_00FC.c_str()))->palette; + if (this->paletteName.size() != 0) { + palette = dynamic_cast(ResourceMgr::Instance().Load(this->paletteName.c_str()))->palette; } else { palette = sprite->palette; } - const SpriteFrameCell& cell = action->Frame(this->unknown_00BC, 0).Cell(1); + const SpriteFrameCell& cell = action->Frame(this->animationIndex, 0).Cell(1); const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; if (!image) { return; @@ -3902,7 +3902,7 @@ void UIHeadsprButton::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } if (!texture) { @@ -3912,8 +3912,8 @@ void UIHeadsprButton::Paint() { const int sourceY = static_cast(record.v0 * 256.0f); const int sourceX = static_cast(record.u0 * 256.0f); this->geometry.surface->DrawSurface( - 0, 0, texture, sourceX < 0 ? 0 : sourceX, sourceY < 0 ? 0 : sourceY, image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, - image->unknown_0006 + 1, 0, 0 + 0, 0, texture, sourceX < 0 ? 0 : sourceX, sourceY < 0 ? 0 : sourceY, image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, + image->doubleHeight + 1, 0, 0 ); } @@ -3927,11 +3927,11 @@ void UISpriteButton::Paint() { } CPaletteRes* paletteRes = nullptr; - if (this->unknown_00FC.size() != 0) { - paletteRes = dynamic_cast(ResourceMgr::Instance().Load(this->unknown_00FC.c_str())); + if (this->paletteName.size() != 0) { + paletteRes = dynamic_cast(ResourceMgr::Instance().Load(this->paletteName.c_str())); } - const ActionFrame& frame = action->Frame(this->unknown_00BC, this->unknown_00C0); + const ActionFrame& frame = action->Frame(this->animationIndex, this->frameIndex); int halfWidth = 0; int halfHeight = 0; int baseX = 0; @@ -3952,7 +3952,7 @@ void UISpriteButton::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } const int width = this->geometry.width; @@ -3992,20 +3992,20 @@ void UISpriteButton::Paint() { const int top = static_cast(sourceY); this->geometry.surface->DrawSurface( left, y < 0 ? 0 : y, texture, sourceX < 0 ? 0 : sourceX, top < 0 ? 0 : top, drawWidth < 0 ? 0 : drawWidth, drawHeight < 0 ? 0 : drawHeight, - cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } - if (this->unknown_00C4) { - ++this->unknown_00C0; - if (this->unknown_00BC >= static_cast(action->animations.size())) { - this->unknown_00BC = 0; - this->unknown_00C0 = 0; + if (this->animate) { + ++this->frameIndex; + if (this->animationIndex >= static_cast(action->animations.size())) { + this->animationIndex = 0; + this->frameIndex = 0; } - if (this->unknown_00C0 >= static_cast(action->FrameCount(this->unknown_00BC))) { - this->unknown_00C0 = 0; + if (this->frameIndex >= static_cast(action->FrameCount(this->animationIndex))) { + this->frameIndex = 0; } } } @@ -4081,7 +4081,7 @@ __declspec(noinline) void UISpriteButton::SetActName(const char* name) { // OFFSET: 0x00867AA0 // FUNCTION: fn_10945 void UISpriteButton::SetPalette(const char* name) { - this->unknown_00FC = name; + this->paletteName = name; } // OFFSET: 0x00867AD0 diff --git a/Source/Contents/CashEmotionMgr.h b/Source/Contents/CashEmotionMgr.h index f7f17b190..2f3340781 100644 --- a/Source/Contents/CashEmotionMgr.h +++ b/Source/Contents/CashEmotionMgr.h @@ -44,8 +44,8 @@ struct CashEmotionData { /* 0000 */ int id; /* 0004 */ int subId; /* 0008 */ std::string name; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; + /* 0020 */ int actionIndex; + /* 0024 */ int frameIndex; /* 0028 */ int actId; /* 002C */ int sprId; }; @@ -53,7 +53,7 @@ struct CashEmotionData { struct CashEmotionPack { // INLINED CashEmotionPack(const char* name, int unknown18, unsigned int startTime, unsigned int endTime, int unknown24, char unknown28) - : name(name), unknown_0018(unknown18), startTime(startTime), endTime(endTime), unknown_0024(unknown24), unknown_0028(unknown28), + : name(name), price(unknown18), startTime(startTime), endTime(endTime), period(unknown24), saleBadge(unknown28), originalStartTime(startTime), originalEndTime(endTime) { } @@ -72,11 +72,11 @@ struct CashEmotionPack { } /* 0000 */ std::string name; - /* 0018 */ int unknown_0018; + /* 0018 */ int price; /* 001C */ unsigned int startTime; /* 0020 */ unsigned int endTime; - /* 0024 */ int unknown_0024; - /* 0028 */ bool unknown_0028; + /* 0024 */ int period; + /* 0028 */ bool saleBadge; /* 002C */ unsigned int originalStartTime; /* 0030 */ unsigned int originalEndTime; }; @@ -174,7 +174,7 @@ public: __declspec(noinline) int GetServerTime(); // INLINED int BasePackId() const { - return this->unknown_000C; + return this->basePackId; } static int InsertOrderList(lua_State* state); static int InsertEmotionEnum(lua_State* state); @@ -194,13 +194,13 @@ protected: /* 0004 */ bool m_enabled; /* 0005 */ std::uint8_t unknown_0005[3]; /* 0008 */ ICashEmotionAction* m_action; - /* 000C */ int unknown_000C; - /* 0010 */ std::unordered_map unknown_0010; + /* 000C */ int basePackId; + /* 0010 */ std::unordered_map packs; /* 0030 */ std::unordered_map m_emotionsByPack; - /* 0050 */ std::unordered_map, CashEmotionKeyHash> unknown_0050; + /* 0050 */ std::unordered_map, CashEmotionKeyHash> emotionOrder; /* 0070 */ std::unordered_map> m_searchIndex; /* 0090 */ CashEmotionFileNames m_packNames; - /* 00B0 */ std::unordered_map unknown_00B0; + /* 00B0 */ std::unordered_map actIds; /* 00D0 */ int m_lastActId = 0; /* 00D4 */ CashEmotionFileNames m_sprNames; /* 00F4 */ std::unordered_map m_sprIds; @@ -209,15 +209,15 @@ protected: /* 0138 */ std::unordered_map m_specials; /* 0158 */ std::unordered_map m_shortcuts; /* 0178 */ std::unordered_map m_commands; - /* 0198 */ std::vector unknown_0198; + /* 0198 */ std::vector packOrder; /* 01A4 */ std::vector m_ownedPacks; /* 01B0 */ std::list> m_expiry; /* 01B8 */ std::vector m_unownedPacks; - /* 01C4 */ int unknown_01C4 = -1; - /* 01C8 */ int unknown_01C8 = 6909; - /* 01CC */ int unknown_01CC = 0; - /* 01D0 */ int unknown_01D0 = 0; - /* 01D4 */ int unknown_01D4 = 0; + /* 01C4 */ int selectedPackId = -1; + /* 01C8 */ int purchaseItemId = 6909; + /* 01CC */ int intendedDelay = 0; + /* 01D0 */ int serverTimeOffset = 0; + /* 01D4 */ int serverTimezoneOffset = 0; }; extern CCashEmotionMgr* g_cashEmotionMgr; diff --git a/Source/Contents/ClientItemLists.cpp b/Source/Contents/ClientItemLists.cpp index a60ee3785..5d014b441 100644 --- a/Source/Contents/ClientItemLists.cpp +++ b/Source/Contents/ClientItemLists.cpp @@ -135,20 +135,20 @@ namespace { #pragma pack(pop) bool IsSameItem(const ITEM_INFO& value, const ITEM_INFO& item) { - if (value.itemId != item.itemId || std::memcmp(value.unknown_001C, item.unknown_001C, sizeof(value.unknown_001C)) != 0 || - value.identified != item.identified || value.unknown_0060 != item.unknown_0060 || value.unknown_0088 != item.unknown_0088) { + if (value.itemId != item.itemId || std::memcmp(value.cards, item.cards, sizeof(value.cards)) != 0 || + value.identified != item.identified || value.refiningLevel != item.refiningLevel || value.grade != item.grade) { return false; } - const int count = item.unknown_0098; + const int count = item.optionCount; - if (value.unknown_0098 != count || value.unknown_0098 >= 5) { + if (value.optionCount != count || value.optionCount >= 5) { return false; } - if (value.unknown_0098 != 0) { - const auto* left = reinterpret_cast(value.unknown_009C); - const auto* right = reinterpret_cast(item.unknown_009C); + if (value.optionCount != 0) { + const auto* left = reinterpret_cast(value.options); + const auto* right = reinterpret_cast(item.options); for (int index = 0; index < count; ++index) { if (left[index].id != right[index].id || left[index].value != right[index].value || left[index].param != right[index].param) { @@ -227,8 +227,8 @@ static_assert(sizeof(EquipmentProperties::CEquipmentPropertiesMgr) == 0x1FC); // OFFSET: 0x00AA6440 // FUNCTION: fn_17229 void __fastcall RefreshItemWindows(UIWindowMgr* mgr) { - if (mgr->unknown_01D4) { - reinterpret_cast(mgr->unknown_01D4)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (mgr->itemWnd) { + reinterpret_cast(mgr->itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } if (mgr->window_01E8) { mgr->window_01E8->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -258,19 +258,19 @@ void CGameMode::ReceiveItem1738Add(const unsigned char* data) { const ItemAddPacket packet = *reinterpret_cast(data); ItemRandomOption options[5] = {}; ITEM_INFO item; - item.unknown_0000[1] = packet.index; + item.identity[1] = packet.index; item.quantity = packet.amount; item.SetItemId(packet.itemId); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0000[0] = packet.type; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.identity[0] = packet.type; + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = 0; + item.grade = 0; g_session.AddItem1738(item, 1); } @@ -312,17 +312,17 @@ void ReceiveItemSlot(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = packet.type; + item.identity[0] = packet.type; item.SetItemId(packet.itemId); - item.unknown_0000[1] = 0xFFFFFFFF; + item.identity[1] = 0xFFFFFFFF; item.quantity = packet.slot; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } g_session.AddItemSlot(item); } @@ -341,17 +341,17 @@ void ReceiveItemSlotOptions(const unsigned char* data) { } ITEM_INFO item; - item.unknown_0000[0] = packet.type; + item.identity[0] = packet.type; item.SetItemId(packet.itemId); - item.unknown_0000[1] = 0xFFFFFFFF; + item.identity[1] = 0xFFFFFFFF; item.quantity = packet.slot; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0098 = CountItemOptions(packet.options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = packet.options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.optionCount = CountItemOptions(packet.options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = packet.options[index]; } g_session.AddItemSlot(item); } @@ -417,19 +417,19 @@ void CGameMode::ReceiveItem1740Add(const unsigned char* data) { const ItemAddPacket packet = *reinterpret_cast(data); ItemRandomOption options[5] = {}; ITEM_INFO item; - item.unknown_0000[1] = packet.index; + item.identity[1] = packet.index; item.quantity = packet.amount; item.SetItemId(packet.itemId); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0000[0] = packet.type; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.identity[0] = packet.type; + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = 0; + item.grade = 0; g_session.AddItem1740(item); } @@ -440,19 +440,19 @@ void CGameMode::ReceiveItem1740AddOptions(const unsigned char* data) { ItemRandomOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[1] = packet->index; + item.identity[1] = packet->index; item.quantity = packet->amount; item.SetItemId(packet->itemId); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0000[0] = packet->type; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.identity[0] = packet->type; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = 0; + item.grade = 0; g_session.AddItem1740(item); } @@ -463,19 +463,19 @@ void CGameMode::ReceiveItem1740AddGrade(const unsigned char* data) { ItemRandomOption options[5]; std::memcpy(options, packet.options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[1] = packet.index; + item.identity[1] = packet.index; item.quantity = packet.amount; item.SetItemId(packet.itemId); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0000[0] = packet.type; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.identity[0] = packet.type; + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = packet.grade; + item.grade = packet.grade; g_session.AddItem1740(item); } @@ -486,19 +486,19 @@ void CGameMode::ReceiveItem1738AddOptions(const unsigned char* data) { ItemRandomOption options[5]; std::memcpy(options, packet->options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[1] = packet->index; + item.identity[1] = packet->index; item.quantity = packet->amount; item.SetItemId(packet->itemId); item.identified = packet->identified; - item.unknown_005D = packet->damaged; - item.unknown_0060 = packet->refine; - item.unknown_0000[0] = packet->type; - std::memcpy(item.unknown_001C, packet->cards, sizeof(packet->cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet->damaged; + item.refiningLevel = packet->refine; + item.identity[0] = packet->type; + std::memcpy(item.cards, packet->cards, sizeof(packet->cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = 0; + item.grade = 0; g_session.AddItem1738(item, 1); } @@ -509,19 +509,19 @@ void CGameMode::ReceiveItem1738AddGrade(const unsigned char* data) { ItemRandomOption options[5]; std::memcpy(options, packet.options, sizeof(options)); ITEM_INFO item; - item.unknown_0000[1] = packet.index; + item.identity[1] = packet.index; item.quantity = packet.amount; item.SetItemId(packet.itemId); item.identified = packet.identified; - item.unknown_005D = packet.damaged; - item.unknown_0060 = packet.refine; - item.unknown_0000[0] = packet.type; - std::memcpy(item.unknown_001C, packet.cards, sizeof(packet.cards)); - item.unknown_0098 = CountItemOptions(options); - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = packet.damaged; + item.refiningLevel = packet.refine; + item.identity[0] = packet.type; + std::memcpy(item.cards, packet.cards, sizeof(packet.cards)); + item.optionCount = CountItemOptions(options); + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } - item.unknown_0088 = packet.grade; + item.grade = packet.grade; g_session.AddItem1738(item, 1); } @@ -556,24 +556,24 @@ namespace { // INLINED __forceinline void FillEquipItemListItem(ITEM_INFO& item, const EquipItemListRecord& record, const ItemRandomOption* options) { - item.unknown_0000[0] = record.type; - item.unknown_0000[1] = record.index; - item.unknown_0000[2] = record.location; - item.unknown_0000[3] = record.wearState; + item.identity[0] = record.type; + item.identity[1] = record.index; + item.identity[2] = record.location; + item.identity[3] = record.wearState; item.quantity = 1; - std::memcpy(item.unknown_001C, record.cards, sizeof(record.cards)); + std::memcpy(item.cards, record.cards, sizeof(record.cards)); item.SetItemId(record.itemId); item.identified = record.flags & 1; - item.unknown_005D = (record.flags >> 1) & 1; - item.unknown_0060 = record.refine; - item.unknown_0068 = record.expireTime; - item.unknown_0064 = record.bindOnEquip; - item.unknown_0070 = record.sprite; - item.unknown_0074[0] = (record.flags >> 2) & 1; - item.unknown_0098 = CountItemOptions(options); - item.unknown_0088 = record.grade; - for (int index = 0; index < item.unknown_0098; ++index) { - reinterpret_cast(item.unknown_009C)[index] = options[index]; + item.damaged = (record.flags >> 1) & 1; + item.refiningLevel = record.refine; + item.expireTime = record.expireTime; + item.bindOnEquip = record.bindOnEquip; + item.sprite = record.sprite; + item.flags[0] = (record.flags >> 2) & 1; + item.optionCount = CountItemOptions(options); + item.grade = record.grade; + for (int index = 0; index < item.optionCount; ++index) { + reinterpret_cast(item.options)[index] = options[index]; } } } @@ -608,24 +608,24 @@ void CGameMode::ReceiveEquipItemList(const unsigned char* packet) { ITEM_INFO item; FillEquipItemListItem(item, record, options); - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - g_session.unknown_1050 = item.unknown_0000[1]; + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + g_session.petEggIndex = item.identity[1]; } - if (item.unknown_0000[3] == 0) { + if (item.identity[3] == 0) { g_session.AddItem1710(item, 0); g_session.UpdateInventoryItem(item, 0); } else { char equipped = 1; - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { g_session.EquipItem2B50(item, &equipped); } else { g_session.EquipUnknown17F0(item, &equipped); } } - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.unknown_005D) { - const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).itemId.c_str()); + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) && item.damaged) { + const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).itemId.c_str()); if (!g_petEvolutionMgr->IsAutoFeeding(petEgg) && g_petAutoFeed == true) { g_session.SendPetAutoFeedOption(0); } @@ -659,18 +659,18 @@ void CGameMode::ReceiveItemListPart(unsigned char listType, int count, const uns const ItemListRecord* record = reinterpret_cast(data); for (int i = 0; i < count; ++i, ++record) { ITEM_INFO item; - item.unknown_0000[0] = record->type; - item.unknown_0000[1] = record->index; - item.unknown_0000[3] = record->location; - item.unknown_0000[2] = 0; + item.identity[0] = record->type; + item.identity[1] = record->index; + item.identity[3] = record->location; + item.identity[2] = 0; item.quantity = record->amount; - std::memcpy(item.unknown_001C, record->cards, sizeof(record->cards)); + std::memcpy(item.cards, record->cards, sizeof(record->cards)); item.SetItemId(record->itemId); - item.unknown_005D = 0; + item.damaged = 0; item.identified = record->flags & 1; - item.unknown_0068 = record->expireTime; - item.unknown_0060 = 0; - item.unknown_0074[0] = (record->flags >> 1) & 1; + item.expireTime = record->expireTime; + item.refiningLevel = 0; + item.flags[0] = (record->flags >> 1) & 1; switch (listType) { case INVTYPE_INVENTORY: g_session.UpdateInventoryItem(item, 0); @@ -738,10 +738,10 @@ __declspec(noinline) EquipSlots EquipSlotDecoder::Decode(int mask) const { // FUNCTION: fn_23282 __declspec(noinline) bool CSession::AddItem1710(const ITEM_INFO& item, unsigned char refresh) { for (ITEM_INFO& value : this->m_inventoryItems) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; - value.unknown_0074[1] = item.unknown_0074[1]; - value.unknown_0074[0] = item.unknown_0074[0]; + value.flags[1] = item.flags[1]; + value.flags[0] = item.flags[0]; if (refresh) { RefreshItemWindows(&g_windowMgr); } @@ -759,12 +759,12 @@ __declspec(noinline) bool CSession::AddItem1710(const ITEM_INFO& item, unsigned // OFFSET: 0x00DD7210 // FUNCTION: fn_23284 bool CSession::AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsigned char refresh) { - for (ITEM_INFO& value : this->unknown_1768) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantPurchaseSavedItems) { + if (value.identity[1] == item.identity[1]) { if (!alternate) { value.quantity += item.quantity; if (refresh == 1) { - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02FC)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantShopMakeWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -773,9 +773,9 @@ bool CSession::AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsig } } - this->unknown_1768.push_back(item); + this->merchantPurchaseSavedItems.push_back(item); if (refresh == 1) { - UIWindow* window = reinterpret_cast(alternate ? g_windowMgr.unknown_040C : g_windowMgr.unknown_02FC); + UIWindow* window = reinterpret_cast(alternate ? g_windowMgr.buyingShopMakeWnd : g_windowMgr.merchantShopMakeWnd); if (window) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -786,18 +786,18 @@ bool CSession::AddItem1768(const ITEM_INFO& item, unsigned char alternate, unsig // OFFSET: 0x00DD72C0 // FUNCTION: fn_23285 bool CSession::AddItem1740(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1740) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantShopItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02F4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantItemWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return false; } } - this->unknown_1740.push_back(item); - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02F4)) { + this->merchantShopItems.push_back(item); + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantItemWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return true; @@ -806,15 +806,15 @@ bool CSession::AddItem1740(const ITEM_INFO& item) { // OFFSET: 0x00DD7350 // FUNCTION: fn_23286 bool CSession::AddItem1750(const ITEM_INFO& item, int type, unsigned char refresh) { - for (ITEM_INFO& value : this->unknown_1750) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantMyShopItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; if (refresh == 1) { std::uint32_t window; if (type == 1) { - window = g_windowMgr.unknown_0410; + window = g_windowMgr.buyingShopMirrorItemWnd; } else { - window = type == 2 ? g_windowMgr.unknown_0420 : g_windowMgr.unknown_02F8; + window = type == 2 ? g_windowMgr.purchaseMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd; } if (window) { reinterpret_cast(window)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -824,13 +824,13 @@ bool CSession::AddItem1750(const ITEM_INFO& item, int type, unsigned char refres } } - this->unknown_1750.push_back(item); + this->merchantMyShopItems.push_back(item); if (refresh == 1) { std::uint32_t window; if (type == 1) { - window = g_windowMgr.unknown_0410; + window = g_windowMgr.buyingShopMirrorItemWnd; } else { - window = type == 2 ? g_windowMgr.unknown_0420 : g_windowMgr.unknown_02F8; + window = type == 2 ? g_windowMgr.purchaseMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd; } if (window) { reinterpret_cast(window)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -842,57 +842,57 @@ bool CSession::AddItem1750(const ITEM_INFO& item, int type, unsigned char refres // OFFSET: 0x00DD7420 // FUNCTION: fn_23287 void CSession::AddItem1758(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1758) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantPurchaseItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; return; } } - this->unknown_1758.push_back(item); + this->merchantPurchaseItems.push_back(item); } // OFFSET: 0x00DD7470 // FUNCTION: fn_23288 void CSession::AddItem1760(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1760) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantHopeToSellItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; return; } } - this->unknown_1760.push_back(item); + this->merchantHopeToSellItems.push_back(item); } // OFFSET: 0x00DD74C0 // FUNCTION: fn_23289 void CSession::AddItem1748(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1748) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->merchantMirrorItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; return; } } - this->unknown_1748.push_back(item); + this->merchantMirrorItems.push_back(item); } // OFFSET: 0x00DD7510 // FUNCTION: fn_23290 bool CSession::Equip(const ITEM_INFO& item) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1) { - ITEM_INFO& equipped = this->unknown_21A0[slot]; + ITEM_INFO& equipped = this->alternateEquippedItems[slot]; equipped = item; equipped.quantity = 1; - equipped.unknown_0068 = item.unknown_0068; - equipped.unknown_0064 = item.unknown_0064; - equipped.unknown_0070 = item.unknown_0070; + equipped.expireTime = item.expireTime; + equipped.bindOnEquip = item.bindOnEquip; + equipped.sprite = item.sprite; } } @@ -905,66 +905,66 @@ void CSession::AddItem1718(const RawItemBasic& item, int quantity, std::uint16_t ITEM_INFO value; value.AssignBasic(item); value.quantity = quantity; - value.unknown_006C = unknown_006C; - value.unknown_0060 = 0; - value.unknown_005D = 0; + value.priceFactor = unknown_006C; + value.refiningLevel = 0; + value.damaged = 0; value.SetItemId(std::atoi(value.itemId.c_str())); - this->unknown_1718.push_back(value); + this->shopItems.push_back(value); } // OFFSET: 0x00DD76C0 // FUNCTION: fn_23292 void CSession::AppendItem1718(const ITEM_INFO& item) { - this->unknown_1718.push_back(item); + this->shopItems.push_back(item); } // OFFSET: 0x00DD76D0 // FUNCTION: fn_23293 void CSession::MergeItem1718ByName(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1718) { + for (ITEM_INFO& value : this->shopItems) { if (value.itemId == item.itemId) { value.quantity = value.quantity == -1 ? -1 : value.quantity + item.quantity; return; } } - this->unknown_1718.push_back(item); + this->shopItems.push_back(item); } // OFFSET: 0x00DD7770 // FUNCTION: fn_23294 void CSession::MergeItem1720ByName(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1720) { + for (ITEM_INFO& value : this->purchaseItems) { if (value.itemId == item.itemId) { value.quantity += item.quantity; return; } } - this->unknown_1720.push_back(item); + this->purchaseItems.push_back(item); } // OFFSET: 0x00DD77F0 // FUNCTION: fn_23295 void CSession::MergeItem1720(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1720) { - const bool same = item.unknown_0074[3] ? value.unknown_0000[1] == item.unknown_0000[1] : value.itemId == item.itemId; + for (ITEM_INFO& value : this->purchaseItems) { + const bool same = item.flags[3] ? value.identity[1] == item.identity[1] : value.itemId == item.itemId; if (same) { value.quantity += item.quantity; return; } } - this->unknown_1720.push_back(item); + this->purchaseItems.push_back(item); } // OFFSET: 0x00DD7890 // FUNCTION: fn_23296 void CSession::AddItem1730(const ITEM_INFO& item) { - const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, item.unknown_0000[1]); - if (owned.unknown_0000[1] > 0) { - for (ITEM_INFO& value : this->unknown_1730) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, item.identity[1]); + if (owned.identity[1] > 0) { + for (ITEM_INFO& value : this->storageItems) { + if (value.identity[1] == item.identity[1]) { const int quantity = value.quantity + item.quantity; if (owned.quantity >= quantity) { value.quantity = quantity; @@ -974,7 +974,7 @@ void CSession::AddItem1730(const ITEM_INFO& item) { } if (owned.quantity >= item.quantity) { - this->unknown_1730.push_back(item); + this->storageItems.push_back(item); } } } @@ -984,29 +984,29 @@ void CSession::AddItem1730(const ITEM_INFO& item) { void CSession::AddItem1718(const RawItemBasic& item, int mode) { if (mode != 0) { const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, item.id); - if (owned.unknown_0000[1] != 0) { + if (owned.identity[1] != 0) { ITEM_INFO value(owned); value.AssignBasic(item); value.SetItemId(std::atoi(value.itemId.c_str())); - this->unknown_1718.push_back(value); + this->shopItems.push_back(value); } } else { ITEM_INFO value; value.AssignBasic(item); - value.unknown_0060 = 0; - value.unknown_005D = 0; + value.refiningLevel = 0; + value.damaged = 0; value.SetItemId(std::atoi(value.itemId.c_str())); - value.unknown_0000[2] = item.unknown_0034; - value.unknown_0070 = item.unknown_0038; - this->unknown_1718.push_back(value); + value.identity[2] = item.location; + value.sprite = item.sprite; + this->shopItems.push_back(value); } } // OFFSET: 0x00DD7B30 // FUNCTION: fn_23298 void CSession::MergeItem1718(const ITEM_INFO& item) { - for (ITEM_INFO& value : this->unknown_1718) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->shopItems) { + if (value.identity[1] == item.identity[1]) { if (value.quantity != -1) { value.quantity += item.quantity; } @@ -1014,7 +1014,7 @@ void CSession::MergeItem1718(const ITEM_INFO& item) { } } - this->unknown_1718.push_back(item); + this->shopItems.push_back(item); } // OFFSET: 0x00DD7B80 @@ -1024,8 +1024,8 @@ bool CSession::AddItem1738(const ITEM_INFO& item, unsigned char refresh) { return true; } - for (ITEM_INFO& value : this->unknown_1738) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + for (ITEM_INFO& value : this->cartItems) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; if (refresh && g_windowMgr.window_0288) { g_windowMgr.window_0288->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -1034,7 +1034,7 @@ bool CSession::AddItem1738(const ITEM_INFO& item, unsigned char refresh) { } } - this->unknown_1738.push_back(item); + this->cartItems.push_back(item); if (refresh && g_windowMgr.window_0288) { g_windowMgr.window_0288->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -1044,13 +1044,13 @@ bool CSession::AddItem1738(const ITEM_INFO& item, unsigned char refresh) { // OFFSET: 0x00DD6D70 // FUNCTION: fn_23280 bool CSession::EquipUnknown17F0(const ITEM_INFO& item, const char* name) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1 && slot < 10) { - ITEM_INFO& equipped = this->unknown_17F0[slot]; + ITEM_INFO& equipped = this->equippedItems[slot]; equipped = item; equipped.quantity = 1; } @@ -1069,21 +1069,21 @@ bool CSession::EquipUnknown17F0(const ITEM_INFO& item, const char* name) { // FUNCTION: fn_23599 bool CSession::OnItemEquipped(ITEM_INFO& item) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString("%s %s", item.DisplayName(0).c_str(), LookupMessage(MSI_ITEM_IS_EQUIPED)).c_str()), 0xC8FF00, 7, 0, 0); - if (item.unknown_0064 == 1) { - item.unknown_0064 = 2; + if (item.bindOnEquip == 1) { + item.bindOnEquip = 2; } - if (g_session.IsCostumeLocation(item.unknown_0000[3])) { + if (g_session.IsCostumeLocation(item.identity[3])) { char name[1] = ""; g_session.EquipItem2B50(item, name); } else { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1 && slot < 10) { - ITEM_INFO& equipped = this->unknown_17F0[slot]; + ITEM_INFO& equipped = this->equippedItems[slot]; equipped = item; equipped.quantity = 1; } @@ -1097,10 +1097,10 @@ bool CSession::OnItemEquipped(ITEM_INFO& item) { g_windowMgr.InvalidateFrames(); } - if (item.unknown_0000[3] != 0x8000) { - this->RemoveItem1710(item.unknown_0000[1], 1); + if (item.identity[3] != 0x8000) { + this->RemoveItem1710(item.identity[1], 1); } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_022C)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.itemParamChangeDisplayWnd)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } return true; @@ -1111,10 +1111,10 @@ bool CSession::OnItemEquipped(ITEM_INFO& item) { bool CSession::UnequipItem(int location, std::uint32_t identity) { if (location == 0x8000) { const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, identity); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString("%s%s", item.DisplayName(0).c_str(), LookupMessage(MSI_ITEM_IS_REMOVED)).c_str()), 0xFF, 7, 0, 0); } - this->unknown_16EC = 0; + this->equippedArrowIndex = 0; g_windowMgr.InvalidateFrames(); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -1129,24 +1129,24 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) { g_activeSkillEffects.erase(it); } - if (mode->scene && mode->scene->player && mode->scene->player->unknown_0544) { - mode->scene->player->unknown_0544->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); + if (mode->scene && mode->scene->player && mode->scene->player->skillEffect) { + mode->scene->player->skillEffect->SendMsg(nullptr, AM_SETCOUNT, 0, 1, 0, 0, 0, 0); } } } else { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { if (slots.values[2] != -1) { - ITEM_INFO& item = this->unknown_17F0[slots.values[2]]; + ITEM_INFO& item = this->equippedItems[slots.values[2]]; g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString("%s%s", item.DisplayName(0).c_str(), LookupMessage(MSI_ITEM_IS_REMOVED)).c_str()), 0xFF, 7, 0, 0); - item.unknown_0000[3] = 0; + item.identity[3] = 0; bool merged = false; for (ITEM_INFO& value : this->m_inventoryItems) { - if (value.unknown_0000[1] == item.unknown_0000[1]) { + if (value.identity[1] == item.identity[1]) { value.quantity += item.quantity; - value.unknown_0074[1] = item.unknown_0074[1]; - value.unknown_0074[0] = item.unknown_0074[0]; + value.flags[1] = item.flags[1]; + value.flags[0] = item.flags[0]; merged = true; break; } @@ -1159,10 +1159,10 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) { item.Reset(); } if (slots.values[1] != -1 && slots.values[1] < 10) { - this->unknown_17F0[slots.values[1]].Reset(); + this->equippedItems[slots.values[1]].Reset(); } if (slots.values[0] != -1 && slots.values[0] < 10) { - this->unknown_17F0[slots.values[0]].Reset(); + this->equippedItems[slots.values[0]].Reset(); } } RequestBasicInfoRefresh(); @@ -1173,7 +1173,7 @@ bool CSession::UnequipItem(int location, std::uint32_t identity) { } g_equipmentPropertiesMgr->UnequipWearable(location); g_windowMgr.InvalidateFrames(); - if (UIWindow* window = g_windowMgr.unknown_022C) { + if (UIWindow* window = g_windowMgr.itemParamChangeDisplayWnd) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } return true; @@ -1254,64 +1254,64 @@ void CSession::ClearInventory() { // OFFSET: 0x00DD88C0 // FUNCTION: fn_23314 void CSession::ClearItems1760And1748() { - this->unknown_1760.erase(this->unknown_1760.begin(), this->unknown_1760.end()); - this->unknown_1748.erase(this->unknown_1748.begin(), this->unknown_1748.end()); + this->merchantHopeToSellItems.erase(this->merchantHopeToSellItems.begin(), this->merchantHopeToSellItems.end()); + this->merchantMirrorItems.erase(this->merchantMirrorItems.begin(), this->merchantMirrorItems.end()); } // OFFSET: 0x00DD8900 // FUNCTION: fn_23315 void CSession::ClearItems1768() { - this->unknown_1768.erase(this->unknown_1768.begin(), this->unknown_1768.end()); + this->merchantPurchaseSavedItems.erase(this->merchantPurchaseSavedItems.begin(), this->merchantPurchaseSavedItems.end()); } // OFFSET: 0x00DD8920 // FUNCTION: fn_23316 void CSession::ClearItems1740() { - this->unknown_1740.erase(this->unknown_1740.begin(), this->unknown_1740.end()); + this->merchantShopItems.erase(this->merchantShopItems.begin(), this->merchantShopItems.end()); } // OFFSET: 0x00DD8940 // FUNCTION: fn_23317 __declspec(noinline) void CSession::ClearItems1750() { - this->unknown_1750.erase(this->unknown_1750.begin(), this->unknown_1750.end()); + this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); } // OFFSET: 0x00DD8960 // FUNCTION: fn_23318 void CSession::ClearItems1758() { - this->unknown_1758.erase(this->unknown_1758.begin(), this->unknown_1758.end()); + this->merchantPurchaseItems.erase(this->merchantPurchaseItems.begin(), this->merchantPurchaseItems.end()); } // OFFSET: 0x00DD8980 // FUNCTION: fn_23319 void CSession::ClearItems1760() { - this->unknown_1760.erase(this->unknown_1760.begin(), this->unknown_1760.end()); + this->merchantHopeToSellItems.erase(this->merchantHopeToSellItems.begin(), this->merchantHopeToSellItems.end()); } // OFFSET: 0x00DD89A0 // FUNCTION: fn_23320 void CSession::ClearItems1748() { - this->unknown_1748.erase(this->unknown_1748.begin(), this->unknown_1748.end()); + this->merchantMirrorItems.erase(this->merchantMirrorItems.begin(), this->merchantMirrorItems.end()); } // OFFSET: 0x00DD89C0 // FUNCTION: fn_23321 void CSession::ClearRecords0734() { - this->unknown_0734.clear(); + this->miniPartyRecords.clear(); } // OFFSET: 0x00DD8A20 // FUNCTION: fn_23322 void CSession::ClearItems1784(int index) { if (index >= 0 && static_cast(index) < 11) { - this->unknown_1784[index].erase(this->unknown_1784[index].begin(), this->unknown_1784[index].end()); + this->inventoryCategories[index].erase(this->inventoryCategories[index].begin(), this->inventoryCategories[index].end()); } } // OFFSET: 0x00DD8A50 // FUNCTION: fn_23323 void CSession::ClearItemSlotQuantities() { - this->unknown_5214 = 0; + this->otherExchangeMoney = 0; for (int index = 0; index < 10; ++index) { this->m_itemSlots[index].quantity = 0; @@ -1322,7 +1322,7 @@ void CSession::ClearItemSlotQuantities() { // FUNCTION: fn_23324 void CSession::ResetEquipped() { for (int index = 0; index < 10; ++index) { - this->unknown_21A0[index].Reset(); + this->alternateEquippedItems[index].Reset(); } } @@ -1341,25 +1341,25 @@ void CSession::ClearPartyMembers() { } this->m_partyMembers.clear(); - this->unknown_5464 = 0; - this->unknown_54C4 = ""; + this->partyLeader = 0; + this->partyName = ""; } // OFFSET: 0x00DD8BD0 // FUNCTION: fn_23326 void CSession::ResetUnknown166C() { - this->unknown_166C = 0; - this->unknown_167C = 0; - this->unknown_1680 = 0; - this->unknown_1670 = 0; - this->unknown_1674 = 0; - this->unknown_1678 = 0; + this->strengthBonus = 0; + this->dexterityBonus = 0; + this->luckBonus = 0; + this->agilityBonus = 0; + this->vitalityBonus = 0; + this->intelligenceBonus = 0; } // OFFSET: 0x00DD8C10 // FUNCTION: fn_23327 void CSession::ClearItems1720() { - this->unknown_1720.erase(this->unknown_1720.begin(), this->unknown_1720.end()); + this->purchaseItems.erase(this->purchaseItems.begin(), this->purchaseItems.end()); } // OFFSET: 0x00DD8C70 @@ -1373,41 +1373,41 @@ void CSession::ResetHotkeyDescriptions() { // OFFSET: 0x00DD8CA0 // FUNCTION: fn_23329 void CSession::ClearItems1738() { - this->unknown_1738.erase(this->unknown_1738.begin(), this->unknown_1738.end()); + this->cartItems.erase(this->cartItems.begin(), this->cartItems.end()); } // OFFSET: 0x00DD8CC0 // FUNCTION: fn_23330 void CSession::CopyItems1740To1750() { - this->unknown_1750.erase(this->unknown_1750.begin(), this->unknown_1750.end()); + this->merchantMyShopItems.erase(this->merchantMyShopItems.begin(), this->merchantMyShopItems.end()); - for (auto item = this->unknown_1740.begin(); item != this->unknown_1740.end(); ++item) { - this->unknown_1750.push_back(*item); + for (auto item = this->merchantShopItems.begin(); item != this->merchantShopItems.end(); ++item) { + this->merchantMyShopItems.push_back(*item); } } // OFFSET: 0x00DD8DB0 // FUNCTION: fn_23331 void CSession::CopyItems1760To1770() { - this->unknown_1770.erase(this->unknown_1770.begin(), this->unknown_1770.end()); + this->filteredInventoryItems.erase(this->filteredInventoryItems.begin(), this->filteredInventoryItems.end()); - for (auto item = this->unknown_1760.begin(); item != this->unknown_1760.end(); ++item) { - this->unknown_1770.push_back(*item); + for (auto item = this->merchantHopeToSellItems.begin(); item != this->merchantHopeToSellItems.end(); ++item) { + this->filteredInventoryItems.push_back(*item); } } // OFFSET: 0x00DD8EA0 // FUNCTION: fn_23332 std::pair CSession::FindItem1750(const ITEM_INFO& item, unsigned char) { - auto found = this->unknown_1750.begin(); + auto found = this->merchantMyShopItems.begin(); - for (; found != this->unknown_1750.end(); ++found) { + for (; found != this->merchantMyShopItems.end(); ++found) { if (IsSameItem(*found, item)) { break; } } - return found != this->unknown_1750.end() ? std::make_pair(true, *found) : std::make_pair(false, ITEM_INFO()); + return found != this->merchantMyShopItems.end() ? std::make_pair(true, *found) : std::make_pair(false, ITEM_INFO()); } // OFFSET: 0x00DD91C0 @@ -1487,12 +1487,12 @@ __declspec(noinline) int CSession::IsDifferentName(const char* name, const char* // OFFSET: 0x00DDA470 // FUNCTION: fn_23338 void CSession::RemoveItem1758ByItemId(ITEM_INFO& item) { - for (auto it = this->unknown_1758.begin(); it != this->unknown_1758.end(); ++it) { + for (auto it = this->merchantPurchaseItems.begin(); it != this->merchantPurchaseItems.end(); ++it) { if (std::atoi(it->itemId.c_str()) == std::atoi(item.itemId.c_str())) { item.itemId = it->itemId; it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1758.erase(it); + this->merchantPurchaseItems.erase(it); } return; } @@ -1503,15 +1503,15 @@ void CSession::RemoveItem1758ByItemId(ITEM_INFO& item) { // FUNCTION: fn_23339 void CSession::RemoveItem1710(std::uint32_t id, int quantity) { for (auto it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { - if (it->unknown_0000[1] == id) { + if (it->identity[1] == id) { if (it->quantity <= quantity) { this->m_inventoryItems.erase(it); } else { it->quantity -= quantity; } for (auto it2 = this->m_inventoryItems.begin(); it2 != this->m_inventoryItems.end(); ++it2) { - if (it2->unknown_0000[1] == id) { - it2->unknown_0074[2] = 0; + if (it2->identity[1] == id) { + it2->flags[2] = 0; break; } } @@ -1524,7 +1524,7 @@ void CSession::RemoveItem1710(std::uint32_t id, int quantity) { // OFFSET: 0x00DFF0E0 // FUNCTION: fn_23609 void CSession::RefreshItem1768Window(unsigned char alternate, int argument) { - if (UIWindow* window = reinterpret_cast(alternate ? g_windowMgr.unknown_040C : g_windowMgr.unknown_02FC)) { + if (UIWindow* window = reinterpret_cast(alternate ? g_windowMgr.buyingShopMakeWnd : g_windowMgr.merchantShopMakeWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, argument, 0, 0, 0); } } @@ -1533,16 +1533,16 @@ void CSession::RefreshItem1768Window(unsigned char alternate, int argument) { // FUNCTION: fn_23340 bool CSession::RemoveItem1768(const ITEM_INFO& item, unsigned char alternate) { int index = 0; - for (auto it = this->unknown_1768.begin(); it != this->unknown_1768.end(); ++it, ++index) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->merchantPurchaseSavedItems.begin(); it != this->merchantPurchaseSavedItems.end(); ++it, ++index) { + if (it->identity[1] == item.identity[1]) { if (alternate) { - this->unknown_1768.erase(it); + this->merchantPurchaseSavedItems.erase(it); this->RefreshItem1768Window(1, 0); return true; } it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1768.erase(it); + this->merchantPurchaseSavedItems.erase(it); this->RefreshItem1768Window(0, index + 1); return true; } @@ -1557,25 +1557,25 @@ bool CSession::RemoveItem1768(const ITEM_INFO& item, unsigned char alternate) { // OFFSET: 0x00DDA690 // FUNCTION: fn_23341 bool CSession::RemoveItem1740(const ITEM_INFO& item) { - for (auto it = this->unknown_1740.begin(); it != this->unknown_1740.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->merchantShopItems.begin(); it != this->merchantShopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1740.erase(it); + this->merchantShopItems.erase(it); } - for (auto it2 = this->unknown_1740.begin(); it2 != this->unknown_1740.end(); ++it2) { - if (it2->unknown_0000[1] == item.unknown_0000[1]) { - it2->unknown_0074[2] = 0; + for (auto it2 = this->merchantShopItems.begin(); it2 != this->merchantShopItems.end(); ++it2) { + if (it2->identity[1] == item.identity[1]) { + it2->flags[2] = 0; break; } } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02F4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantItemWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return true; } } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_02F4)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.merchantItemWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } return false; @@ -1584,12 +1584,12 @@ bool CSession::RemoveItem1740(const ITEM_INFO& item) { // OFFSET: 0x00DDA8B0 // FUNCTION: fn_23343 void CSession::RemoveItem1758(ITEM_INFO& item) { - for (auto it = this->unknown_1758.begin(); it != this->unknown_1758.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->merchantPurchaseItems.begin(); it != this->merchantPurchaseItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { item.itemId = it->itemId; it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1758.erase(it); + this->merchantPurchaseItems.erase(it); } return; } @@ -1599,11 +1599,11 @@ void CSession::RemoveItem1758(ITEM_INFO& item) { // OFFSET: 0x00DDA920 // FUNCTION: fn_23344 void CSession::RemoveItem1760(const ITEM_INFO& item) { - for (auto it = this->unknown_1760.begin(); it != this->unknown_1760.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->merchantHopeToSellItems.begin(); it != this->merchantHopeToSellItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1760.erase(it); + this->merchantHopeToSellItems.erase(it); } return; } @@ -1613,12 +1613,12 @@ void CSession::RemoveItem1760(const ITEM_INFO& item) { // OFFSET: 0x00DDA9C0 // FUNCTION: fn_23345 void CSession::RemoveItem1718ByItemId(const ITEM_INFO& item) { - for (auto it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { + for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { if (std::atoi(it->itemId.c_str()) == std::atoi(item.itemId.c_str())) { if (it->quantity != -1) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1718.erase(it); + this->shopItems.erase(it); } } return; @@ -1629,12 +1629,12 @@ void CSession::RemoveItem1718ByItemId(const ITEM_INFO& item) { // OFFSET: 0x00DDAA50 // FUNCTION: fn_23346 void CSession::RemoveItem1718(const ITEM_INFO& item) { - for (auto it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { if (it->quantity != -1) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1718.erase(it); + this->shopItems.erase(it); } } return; @@ -1645,11 +1645,11 @@ void CSession::RemoveItem1718(const ITEM_INFO& item) { // OFFSET: 0x00DDAAB0 // FUNCTION: fn_23347 void CSession::RemoveItem1720ByName(const ITEM_INFO& item) { - for (auto it = this->unknown_1720.begin(); it != this->unknown_1720.end(); ++it) { + for (auto it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { if (it->itemId == item.itemId) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1720.erase(it); + this->purchaseItems.erase(it); } return; } @@ -1659,11 +1659,11 @@ void CSession::RemoveItem1720ByName(const ITEM_INFO& item) { // OFFSET: 0x00DDAC40 // FUNCTION: fn_23349 void CSession::RemoveItem1730(const ITEM_INFO& item) { - for (auto it = this->unknown_1730.begin(); it != this->unknown_1730.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->storageItems.begin(); it != this->storageItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1730.erase(it); + this->storageItems.erase(it); } return; } @@ -1673,11 +1673,11 @@ void CSession::RemoveItem1730(const ITEM_INFO& item) { // OFFSET: 0x00DDAC90 // FUNCTION: fn_23350 void CSession::ReduceItem1718(const ITEM_INFO& item) { - for (auto it = this->unknown_1718.begin(); it != this->unknown_1718.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->shopItems.begin(); it != this->shopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1718.erase(it); + this->shopItems.erase(it); } return; } @@ -1687,15 +1687,15 @@ void CSession::ReduceItem1718(const ITEM_INFO& item) { // OFFSET: 0x00DDACE0 // FUNCTION: fn_23351 bool CSession::RemoveItem1738(const ITEM_INFO& item) { - for (auto it = this->unknown_1738.begin(); it != this->unknown_1738.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->cartItems.begin(); it != this->cartItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1738.erase(it); + this->cartItems.erase(it); } - for (auto it2 = this->unknown_1738.begin(); it2 != this->unknown_1738.end(); ++it2) { - if (it2->unknown_0000[1] == item.unknown_0000[1]) { - it2->unknown_0074[2] = 0; + for (auto it2 = this->cartItems.begin(); it2 != this->cartItems.end(); ++it2) { + if (it2->identity[1] == item.identity[1]) { + it2->flags[2] = 0; break; } } @@ -1714,23 +1714,23 @@ bool CSession::RemoveItem1738(const ITEM_INFO& item) { // OFFSET: 0x00E2EC10 // FUNCTION: fn_24149 bool CSession::EquipItem6B68(const ITEM_INFO& item) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1) { - ITEM_INFO& equipped = this->unknown_6B68[slot]; + ITEM_INFO& equipped = this->swapEquippedItems[slot]; equipped = item; equipped.quantity = 1; - equipped.unknown_0068 = item.unknown_0068; - equipped.unknown_0064 = item.unknown_0064; - equipped.unknown_0070 = item.unknown_0070; + equipped.expireTime = item.expireTime; + equipped.bindOnEquip = item.bindOnEquip; + equipped.sprite = item.sprite; } } - if (g_windowMgr.unknown_01E0) { - static_cast(g_windowMgr.unknown_01E0)->NotifyEquipmentChanged(); + if (g_windowMgr.equipWnd) { + static_cast(g_windowMgr.equipWnd)->NotifyEquipmentChanged(); } RefreshItemWindows(&g_windowMgr); return true; @@ -1744,7 +1744,7 @@ ITEM_INFO CSession::FindItemByIdentity(std::uint32_t identity, int location) { } ITEM_INFO item = LookupClientItemByIdentity(this->m_inventoryItems, identity); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { return item; } @@ -1759,13 +1759,13 @@ ITEM_INFO CSession::FindItemByIdentity(std::uint32_t identity, int location) { } else { item = this->GetItem17F0(slot); } - if (item.unknown_0000[1] == identity) { + if (item.identity[1] == identity) { break; } } } - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { return item; } @@ -1778,8 +1778,8 @@ void CSession::SetItems1750(int count, const short* ids) { this->ClearItems1750(); for (int i = 0; i < count; ++i) { const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, ids[i]); - if (item.unknown_0000[1] > 0) { - this->unknown_1750.push_back(item); + if (item.identity[1] > 0) { + this->merchantMyShopItems.push_back(item); } } } @@ -1823,12 +1823,12 @@ bool CSession::AddExchangeItem(ITEM_INFO item) { return false; } - this->RemoveItem1710(item.unknown_0000[1], item.quantity); + this->RemoveItem1710(item.identity[1], item.quantity); ITEM_INFO added = item; int index = 0; for (; index < 10; ++index) { - if (this->m_exchangeItems[index].quantity != 0 && this->m_exchangeItems[index].unknown_0000[1] == added.unknown_0000[1]) { + if (this->m_exchangeItems[index].quantity != 0 && this->m_exchangeItems[index].identity[1] == added.identity[1]) { this->m_exchangeItems[index].quantity += added.quantity; break; } diff --git a/Source/Contents/ClientState.cpp b/Source/Contents/ClientState.cpp index ec443e262..6998a0932 100644 --- a/Source/Contents/ClientState.cpp +++ b/Source/Contents/ClientState.cpp @@ -90,31 +90,31 @@ std::uint32_t CSession::ReadReplayStats(const std::vector& data) this->InvalidateWindowFrames(); return offset; case 2010: - std::memcpy(&this->unknown_166C, data.data() + offset, header.bytes); + std::memcpy(&this->strengthBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2011: - std::memcpy(&this->unknown_1670, data.data() + offset, header.bytes); + std::memcpy(&this->agilityBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2012: - std::memcpy(&this->unknown_1674, data.data() + offset, header.bytes); + std::memcpy(&this->vitalityBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2013: - std::memcpy(&this->unknown_1678, data.data() + offset, header.bytes); + std::memcpy(&this->intelligenceBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2014: - std::memcpy(&this->unknown_167C, data.data() + offset, header.bytes); + std::memcpy(&this->dexterityBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2015: - std::memcpy(&this->unknown_1680, data.data() + offset, header.bytes); + std::memcpy(&this->luckBonus, data.data() + offset, header.bytes); offset += header.bytes; break; case 2016: - std::memcpy(&this->unknown_0F4C, data.data() + offset, header.bytes); + std::memcpy(&this->storeItemLimit, data.data() + offset, header.bytes); offset += header.bytes; break; case 2017: @@ -126,59 +126,59 @@ std::uint32_t CSession::ReadReplayStats(const std::vector& data) offset += header.bytes; break; case 2019: - std::memcpy(&this->unknown_532C, data.data() + offset, header.bytes); + std::memcpy(&this->randomStatIndexA, data.data() + offset, header.bytes); offset += header.bytes; break; case 2020: - std::memcpy(&this->unknown_5330, data.data() + offset, header.bytes); + std::memcpy(&this->randomStatIndexB, data.data() + offset, header.bytes); offset += header.bytes; break; case 2021: - std::memcpy(&this->unknown_5334, data.data() + offset, header.bytes); + std::memcpy(&this->randomStatIndexC, data.data() + offset, header.bytes); offset += header.bytes; break; case 2022: - std::memcpy(&this->unknown_5338, data.data() + offset, header.bytes); + std::memcpy(&this->randomStatIndexD, data.data() + offset, header.bytes); offset += header.bytes; break; case 2023: - std::memcpy(&this->unknown_533C, data.data() + offset, header.bytes); + std::memcpy(&this->randomStatIndexE, data.data() + offset, header.bytes); offset += header.bytes; break; case 2024: - std::memcpy(this->unknown_5340, data.data() + offset, header.bytes); + std::memcpy(this->randomStatValues, data.data() + offset, header.bytes); offset += header.bytes; break; case 2025: - std::memcpy(this->unknown_5370, data.data() + offset, header.bytes); + std::memcpy(this->replayStatValuesA, data.data() + offset, header.bytes); offset += header.bytes; break; case 2026: - std::memcpy(this->unknown_53A0, data.data() + offset, header.bytes); + std::memcpy(this->replayStatValuesB, data.data() + offset, header.bytes); offset += header.bytes; break; case 2027: - std::memcpy(this->unknown_53D0, data.data() + offset, header.bytes); + std::memcpy(this->replayStatValuesC, data.data() + offset, header.bytes); offset += header.bytes; break; case 2028: - std::memcpy(this->unknown_5400, data.data() + offset, header.bytes); + std::memcpy(this->minimapTokenStorage, data.data() + offset, header.bytes); offset += header.bytes; break; case 2029: - std::memcpy(&this->unknown_5568, data.data() + offset, header.bytes); + std::memcpy(&this->hp, data.data() + offset, header.bytes); offset += header.bytes; break; case 2030: - std::memcpy(&this->unknown_556C, data.data() + offset, header.bytes); + std::memcpy(&this->maxHp, data.data() + offset, header.bytes); offset += header.bytes; break; case 2031: - std::memcpy(&this->unknown_5570[0], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0], data.data() + offset, header.bytes); offset += header.bytes; break; case 2032: - std::memcpy(&this->unknown_5570[4], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[4], data.data() + offset, header.bytes); offset += header.bytes; break; case 2033: @@ -186,19 +186,19 @@ std::uint32_t CSession::ReadReplayStats(const std::vector& data) offset += header.bytes; break; case 2034: - std::memcpy(&this->unknown_5480, data.data() + offset, header.bytes); + std::memcpy(&this->quitBlocked, data.data() + offset, header.bytes); offset += header.bytes; break; case 2035: - std::memcpy(&this->unknown_5484, data.data() + offset, header.bytes); + std::memcpy(&this->battleChat, data.data() + offset, header.bytes); offset += header.bytes; break; case 2036: - std::memcpy(&this->unknown_5488, data.data() + offset, header.bytes); + std::memcpy(&this->quitAllowed, data.data() + offset, header.bytes); offset += header.bytes; break; case 2037: - std::memcpy(&this->unknown_548C, data.data() + offset, header.bytes); + std::memcpy(&this->sessionFlag, data.data() + offset, header.bytes); offset += header.bytes; break; case 2038: @@ -207,12 +207,12 @@ std::uint32_t CSession::ReadReplayStats(const std::vector& data) offset += header.bytes; break; case 2052: { - std::memcpy(&this->unknown_8074, data.data() + offset, header.bytes); + std::memcpy(&this->madogearType, data.data() + offset, header.bytes); offset += header.bytes; CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; if (player) { - player->SetMadogearType(this->unknown_8074); - player->SendMsg(nullptr, this->unknown_8074 ? 105 : 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + player->SetMadogearType(this->madogearType); + player->SendMsg(nullptr, this->madogearType ? 105 : 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } break; } @@ -248,15 +248,15 @@ std::uint32_t CSession::ReadReplayMessenger(const std::vector& da case 4501: return offset; case 4010: - std::memcpy(&this->unknown_5938, data.data() + offset, header.bytes); + std::memcpy(&this->replaySessionFlag, data.data() + offset, header.bytes); offset += header.bytes; break; case 4011: - std::memcpy(&this->unknown_5460, data.data() + offset, header.bytes); + std::memcpy(&this->partyBlocked, data.data() + offset, header.bytes); offset += header.bytes; break; case 4012: - std::memcpy(&this->unknown_5464, data.data() + offset, header.bytes); + std::memcpy(&this->partyLeader, data.data() + offset, header.bytes); offset += header.bytes; break; case 4013: { @@ -264,7 +264,7 @@ std::uint32_t CSession::ReadReplayMessenger(const std::vector& da std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, data.data() + offset, header.bytes); offset += header.bytes; - this->unknown_54AC = buffer; + this->partyRequestName = buffer; break; } case 4014: { @@ -272,7 +272,7 @@ std::uint32_t CSession::ReadReplayMessenger(const std::vector& da std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, data.data() + offset, header.bytes); offset += header.bytes; - this->unknown_54C4 = buffer; + this->partyName = buffer; break; } case 4015: @@ -312,63 +312,63 @@ std::uint32_t CSession::ReadReplayItems(const std::vector& data) case 4703: return offset; case 4701: - std::memcpy(&this->unknown_5210, data.data() + offset, header.bytes); + std::memcpy(&this->exchangeMoney, data.data() + offset, header.bytes); offset += header.bytes; break; case 4702: - std::memcpy(&this->unknown_5214, data.data() + offset, header.bytes); + std::memcpy(&this->otherExchangeMoney, data.data() + offset, header.bytes); offset += header.bytes; break; case 4510: offset = ReadItemList(this->m_inventoryItems, offset, header.bytes, data); break; case 4511: - offset = ReadItemList(this->unknown_1718, offset, header.bytes, data); + offset = ReadItemList(this->shopItems, offset, header.bytes, data); break; case 4512: - offset = ReadItemList(this->unknown_1720, offset, header.bytes, data); + offset = ReadItemList(this->purchaseItems, offset, header.bytes, data); break; case 4513: - offset = ReadItemList(this->unknown_1728, offset, header.bytes, data); + offset = ReadItemList(this->sellItems, offset, header.bytes, data); break; case 4514: - offset = ReadItemList(this->unknown_1730, offset, header.bytes, data); + offset = ReadItemList(this->storageItems, offset, header.bytes, data); break; case 4515: - offset = ReadItemList(this->unknown_1738, offset, header.bytes, data); + offset = ReadItemList(this->cartItems, offset, header.bytes, data); break; case 4516: - offset = ReadItemList(this->unknown_1740, offset, header.bytes, data); + offset = ReadItemList(this->merchantShopItems, offset, header.bytes, data); break; case 4517: - offset = ReadItemList(this->unknown_1748, offset, header.bytes, data); + offset = ReadItemList(this->merchantMirrorItems, offset, header.bytes, data); break; case 4518: - offset = ReadItemList(this->unknown_1750, offset, header.bytes, data); + offset = ReadItemList(this->merchantMyShopItems, offset, header.bytes, data); break; case 4519: - offset = ReadItemList(this->unknown_1758, offset, header.bytes, data); + offset = ReadItemList(this->merchantPurchaseItems, offset, header.bytes, data); break; case 4520: - offset = ReadItemList(this->unknown_1760, offset, header.bytes, data); + offset = ReadItemList(this->merchantHopeToSellItems, offset, header.bytes, data); break; case 4521: - offset = ReadItemList(this->unknown_1768, offset, header.bytes, data); + offset = ReadItemList(this->merchantPurchaseSavedItems, offset, header.bytes, data); break; case 4522: - offset = ReadItemList(this->unknown_1770, offset, header.bytes, data); + offset = ReadItemList(this->filteredInventoryItems, offset, header.bytes, data); break; case 4601: - offset = ReadItemArray(this->unknown_17F0, offset, header.bytes, data); + offset = ReadItemArray(this->equippedItems, offset, header.bytes, data); break; case 4602: - offset = ReadItemArray(this->unknown_21A0, offset, header.bytes, data); + offset = ReadItemArray(this->alternateEquippedItems, offset, header.bytes, data); break; case 4603: - offset = ReadItemArray(this->unknown_2B50, offset, header.bytes, data); + offset = ReadItemArray(this->costumeItems, offset, header.bytes, data); break; case 4604: - offset = ReadItemArray(this->unknown_3500, offset, header.bytes, data); + offset = ReadItemArray(this->alternateCostumeItems, offset, header.bytes, data); break; case 4605: offset = ReadItemArray(this->m_exchangeItems, offset, header.bytes, data); @@ -459,23 +459,23 @@ std::uint32_t CSession::ReadReplayExtra(const std::vector& data) done = true; break; case 5510: - std::memcpy(&this->unknown_593C, data.data() + offset, header.bytes); + std::memcpy(&this->memorialWindowOpen, data.data() + offset, header.bytes); offset += header.bytes; break; case 5511: - std::memcpy(&this->unknown_5940, data.data() + offset, header.bytes); + std::memcpy(&this->memorialWindowX, data.data() + offset, header.bytes); offset += header.bytes; break; case 5512: - std::memcpy(&this->unknown_5944, data.data() + offset, header.bytes); + std::memcpy(&this->memorialWindowY, data.data() + offset, header.bytes); offset += header.bytes; break; case 5513: - std::memcpy(&this->unknown_5948, data.data() + offset, header.bytes); + std::memcpy(&this->memorialDungeonState, data.data() + offset, header.bytes); offset += header.bytes; break; case 5514: - std::memcpy(&this->unknown_594C, data.data() + offset, header.bytes); + std::memcpy(&this->memorialReplayValue, data.data() + offset, header.bytes); offset += header.bytes; break; case 5515: { @@ -483,19 +483,19 @@ std::uint32_t CSession::ReadReplayExtra(const std::vector& data) std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, data.data() + offset, header.bytes); offset += header.bytes; - this->unknown_5950 = buffer; + this->memorialDungeonName = buffer; break; } case 5516: - std::memcpy(&this->unknown_5968, data.data() + offset, header.bytes); + std::memcpy(&this->memorialQueuePosition, data.data() + offset, header.bytes); offset += header.bytes; break; case 5517: - std::memcpy(&this->unknown_596C, data.data() + offset, header.bytes); + std::memcpy(&this->memorialCreationTime, data.data() + offset, header.bytes); offset += header.bytes; break; case 5518: - std::memcpy(&this->unknown_5970, data.data() + offset, header.bytes); + std::memcpy(&this->memorialExpirationTime, data.data() + offset, header.bytes); offset += header.bytes; break; default: @@ -508,7 +508,7 @@ std::uint32_t CSession::ReadReplayExtra(const std::vector& data) } } - if (this->unknown_593C == 1) { + if (this->memorialWindowOpen == 1) { g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND); } @@ -542,43 +542,43 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d case 5001: return offset; case 5101: - std::memcpy(&this->unknown_5570[8], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[8], data.data() + offset, header.bytes); offset += header.bytes; break; case 5102: - std::memcpy(&this->unknown_5570[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 5103: - std::memcpy(&this->unknown_5570[0x2C], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x2C], data.data() + offset, header.bytes); offset += header.bytes; break; case 5104: - std::memcpy(&this->unknown_5570[0x30], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x30], data.data() + offset, header.bytes); offset += header.bytes; break; case 5105: - std::memcpy(&this->unknown_5570[0x34], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x34], data.data() + offset, header.bytes); offset += header.bytes; break; case 5106: - std::memcpy(&this->unknown_5570[0x38], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x38], data.data() + offset, header.bytes); offset += header.bytes; break; case 5107: - std::memcpy(&this->unknown_5570[0x3C], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x3C], data.data() + offset, header.bytes); offset += header.bytes; break; case 5108: - std::memcpy(&this->unknown_5570[0x40], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x40], data.data() + offset, header.bytes); offset += header.bytes; break; case 5109: - std::memcpy(&this->unknown_5570[0x44], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x44], data.data() + offset, header.bytes); offset += header.bytes; break; case 5110: - std::memcpy(&this->unknown_5570[0x48], data.data() + offset, header.bytes); + std::memcpy(&this->spAndHomunculusStats[0x48], data.data() + offset, header.bytes); offset += header.bytes; break; case 5111: @@ -586,7 +586,7 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5112: - std::memcpy(this->unknown_55C0, data.data() + offset, header.bytes); + std::memcpy(this->homunLevel, data.data() + offset, header.bytes); offset += header.bytes; break; case 5113: @@ -594,7 +594,7 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5114: - std::memcpy(this->unknown_55C8, data.data() + offset, header.bytes); + std::memcpy(this->homunMaxHp, data.data() + offset, header.bytes); offset += header.bytes; break; case 5115: @@ -602,15 +602,15 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5116: - std::memcpy(&this->unknown_55D0, data.data() + offset, header.bytes); + std::memcpy(&this->homunMaxSp, data.data() + offset, header.bytes); offset += header.bytes; break; case 5117: - std::memcpy(&this->unknown_55D4, data.data() + offset, header.bytes); + std::memcpy(&this->homunFriendly, data.data() + offset, header.bytes); offset += header.bytes; break; case 5118: - std::memcpy(&this->unknown_55D8, data.data() + offset, header.bytes); + std::memcpy(&this->homunAccessory, data.data() + offset, header.bytes); offset += header.bytes; break; case 5119: @@ -622,43 +622,43 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5121: - std::memcpy(&this->unknown_55F0, data.data() + offset, header.bytes); + std::memcpy(&this->homunHunger, data.data() + offset, header.bytes); offset += header.bytes; break; case 5122: - std::memcpy(&this->unknown_55F4, data.data() + offset, header.bytes); + std::memcpy(&this->homunMaxHunger, data.data() + offset, header.bytes); offset += header.bytes; break; case 5123: - std::memcpy(&this->unknown_55F8, data.data() + offset, header.bytes); + std::memcpy(&this->homunNameModified, data.data() + offset, header.bytes); offset += header.bytes; break; case 5124: - std::memcpy(&this->unknown_55FC, data.data() + offset, header.bytes); + std::memcpy(&this->homunEnemyGid, data.data() + offset, header.bytes); offset += header.bytes; break; case 5125: - std::memcpy(&this->unknown_5600, data.data() + offset, header.bytes); + std::memcpy(&this->homunEnemyX, data.data() + offset, header.bytes); offset += header.bytes; break; case 5126: - std::memcpy(&this->unknown_5604, data.data() + offset, header.bytes); + std::memcpy(&this->homunEnemyY, data.data() + offset, header.bytes); offset += header.bytes; break; case 5127: - std::memcpy(&this->unknown_5608, data.data() + offset, header.bytes); + std::memcpy(&this->moveHomunEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5128: - std::memcpy(&this->unknown_560C, data.data() + offset, header.bytes); + std::memcpy(&this->selectHomunEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5129: - std::memcpy(&this->unknown_5610, data.data() + offset, header.bytes); + std::memcpy(&this->attackHomunEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5130: - std::memcpy(&this->unknown_5614, data.data() + offset, header.bytes); + std::memcpy(&this->homunAlive, data.data() + offset, header.bytes); offset += header.bytes; break; case 5131: @@ -670,15 +670,15 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5133: - std::memcpy(&this->unknown_5620[0], data.data() + offset, header.bytes); + std::memcpy(&this->companionTargetState[0], data.data() + offset, header.bytes); offset += header.bytes; break; case 5134: - std::memcpy(&this->unknown_5620[4], data.data() + offset, header.bytes); + std::memcpy(&this->companionTargetState[4], data.data() + offset, header.bytes); offset += header.bytes; break; case 5201: - std::memcpy(&this->unknown_5620[8], data.data() + offset, header.bytes); + std::memcpy(&this->companionTargetState[8], data.data() + offset, header.bytes); offset += header.bytes; break; case 5202: @@ -754,7 +754,7 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5220: - std::memcpy(this->unknown_5690, data.data() + offset, header.bytes); + std::memcpy(this->mercenaryAttackRange, data.data() + offset, header.bytes); offset += header.bytes; break; case 5221: @@ -762,31 +762,31 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5222: - std::memcpy(&this->unknown_5698, data.data() + offset, header.bytes); + std::memcpy(&this->mercenaryEnemyGid, data.data() + offset, header.bytes); offset += header.bytes; break; case 5223: - std::memcpy(&this->unknown_569C, data.data() + offset, header.bytes); + std::memcpy(&this->mercenaryEnemyX, data.data() + offset, header.bytes); offset += header.bytes; break; case 5224: - std::memcpy(&this->unknown_56A0, data.data() + offset, header.bytes); + std::memcpy(&this->mercenaryEnemyY, data.data() + offset, header.bytes); offset += header.bytes; break; case 5225: - std::memcpy(&this->unknown_56A4, data.data() + offset, header.bytes); + std::memcpy(&this->moveMercenaryEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5226: - std::memcpy(&this->unknown_56A8, data.data() + offset, header.bytes); + std::memcpy(&this->selectMercenaryEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5227: - std::memcpy(&this->unknown_56AC, data.data() + offset, header.bytes); + std::memcpy(&this->attackMercenaryEnemy, data.data() + offset, header.bytes); offset += header.bytes; break; case 5228: - std::memcpy(&this->unknown_56B0, data.data() + offset, header.bytes); + std::memcpy(&this->mercenaryAlive, data.data() + offset, header.bytes); offset += header.bytes; break; case 5229: @@ -794,31 +794,31 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5301: - std::memcpy(&this->unknown_1010, data.data() + offset, header.bytes); + std::memcpy(&this->petGid, data.data() + offset, header.bytes); offset += header.bytes; break; case 5302: - std::memcpy(this->unknown_1014, data.data() + offset, header.bytes); + std::memcpy(this->petNameModified, data.data() + offset, header.bytes); offset += header.bytes; break; case 5303: - std::memcpy(this->unknown_1018, data.data() + offset, header.bytes); + std::memcpy(this->petName, data.data() + offset, header.bytes); offset += header.bytes; break; case 5304: - std::memcpy(&this->unknown_1038, data.data() + offset, header.bytes); + std::memcpy(&this->petAccessory, data.data() + offset, header.bytes); offset += header.bytes; break; case 5305: - std::memcpy(&this->unknown_103C, data.data() + offset, header.bytes); + std::memcpy(&this->petJob, data.data() + offset, header.bytes); offset += header.bytes; break; case 5306: - std::memcpy(&this->unknown_1040, data.data() + offset, header.bytes); + std::memcpy(&this->petLevel, data.data() + offset, header.bytes); offset += header.bytes; break; case 5307: - std::memcpy(&this->unknown_1044, data.data() + offset, header.bytes); + std::memcpy(&this->petHunger, data.data() + offset, header.bytes); offset += header.bytes; break; case 5308: @@ -826,31 +826,31 @@ std::uint32_t CSession::ReadReplayCompanions(const std::vector& d offset += header.bytes; break; case 5309: - std::memcpy(&this->unknown_1050, data.data() + offset, header.bytes); + std::memcpy(&this->petEggIndex, data.data() + offset, header.bytes); offset += header.bytes; break; case 5310: - std::memcpy(&this->unknown_1054, data.data() + offset, header.bytes); + std::memcpy(&this->petPreviousHunger, data.data() + offset, header.bytes); offset += header.bytes; break; case 5401: - std::memcpy(&this->unknown_5BC0, data.data() + offset, header.bytes); + std::memcpy(&this->elementalGid, data.data() + offset, header.bytes); offset += header.bytes; break; case 5402: - std::memcpy(&this->unknown_5BC4, data.data() + offset, header.bytes); + std::memcpy(&this->elementalHp, data.data() + offset, header.bytes); offset += header.bytes; break; case 5403: - std::memcpy(&this->unknown_5BC8, data.data() + offset, header.bytes); + std::memcpy(&this->elementalSp, data.data() + offset, header.bytes); offset += header.bytes; break; case 5404: - std::memcpy(&this->unknown_5BCC, data.data() + offset, header.bytes); + std::memcpy(&this->elementalMaxHp, data.data() + offset, header.bytes); offset += header.bytes; break; case 5405: - std::memcpy(&this->unknown_5BD0, data.data() + offset, header.bytes); + std::memcpy(&this->elementalMaxSp, data.data() + offset, header.bytes); offset += header.bytes; break; default: @@ -936,7 +936,7 @@ std::uint32_t CSession::ReadReplayShortcuts(const std::vector& da break; case 7101: g_session.ClearSlots06EB(); - std::memcpy(&this->unknown_06EB, data.data() + offset, header.bytes); + std::memcpy(&this->quickSlot, data.data() + offset, header.bytes); offset += header.bytes; break; default: @@ -998,7 +998,7 @@ void __stdcall SetPetInfoAlert(bool enabled) { void CSession::CollectCardItems() { this->m_cardItems.clear(); for (std::list::iterator it = this->m_inventoryItems.begin(); it != this->m_inventoryItems.end(); ++it) { - if (it->unknown_0000[0] == 6) { + if (it->identity[0] == 6) { this->m_cardItems.push_back(*it); } } @@ -1007,15 +1007,15 @@ void CSession::CollectCardItems() { // OFFSET: 0x00E48B70 // FUNCTION: fn_24226 void RequestBasicInfoRefresh() { - if (g_windowMgr.unknown_01E0 != nullptr) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); + if (g_windowMgr.equipWnd != nullptr) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_SET_DISABLE, 575, 0, 0, 0); } } // OFFSET: 0x00E49290 // FUNCTION: fn_24232 void CSession::SetUnknown5BC0(int value) { - this->unknown_5BC0 = value; + this->elementalGid = value; UIWindow* window = g_windowMgr.LookupWindow(WID_SKILLDELAYINFO); if (window != nullptr) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); @@ -1163,7 +1163,7 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1015: - std::memcpy(&this->unknown_162C[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->playerExperienceState[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1016: @@ -1171,11 +1171,11 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1017: - std::memcpy(this->unknown_1654, data.data() + offset, header.bytes); + std::memcpy(this->statusPoints, data.data() + offset, header.bytes); offset += header.bytes; break; case 1018: - std::memcpy(&this->unknown_162C[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->playerExperienceState[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 1019: @@ -1191,11 +1191,11 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1022: - std::memcpy(this->unknown_1664, data.data() + offset, header.bytes); + std::memcpy(this->companionSkillPoints, data.data() + offset, header.bytes); offset += header.bytes; break; case 1023: - std::memcpy(&this->unknown_1664[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->companionSkillPoints[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1024: @@ -1223,87 +1223,87 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1030: - std::memcpy(this->unknown_169C, data.data() + offset, header.bytes); + std::memcpy(this->combatStats, data.data() + offset, header.bytes); offset += header.bytes; break; case 1031: - std::memcpy(&this->unknown_169C[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1032: - std::memcpy(&this->unknown_169C[0x8], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x8], data.data() + offset, header.bytes); offset += header.bytes; break; case 1033: - std::memcpy(&this->unknown_169C[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 1034: - std::memcpy(&this->unknown_169C[0x10], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x10], data.data() + offset, header.bytes); offset += header.bytes; break; case 1035: - std::memcpy(&this->unknown_169C[0x14], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x14], data.data() + offset, header.bytes); offset += header.bytes; break; case 1036: - std::memcpy(&this->unknown_169C[0x18], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x18], data.data() + offset, header.bytes); offset += header.bytes; break; case 1037: - std::memcpy(&this->unknown_169C[0x1C], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x1C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1038: - std::memcpy(&this->unknown_169C[0x20], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x20], data.data() + offset, header.bytes); offset += header.bytes; break; case 1039: - std::memcpy(&this->unknown_169C[0x24], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x24], data.data() + offset, header.bytes); offset += header.bytes; break; case 1040: - std::memcpy(&this->unknown_169C[0x28], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x28], data.data() + offset, header.bytes); offset += header.bytes; break; case 1041: - std::memcpy(&this->unknown_169C[0x2C], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x2C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1042: - std::memcpy(&this->unknown_169C[0x30], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x30], data.data() + offset, header.bytes); offset += header.bytes; break; case 1043: - std::memcpy(&this->unknown_169C[0x34], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x34], data.data() + offset, header.bytes); offset += header.bytes; break; case 1044: - std::memcpy(&this->unknown_169C[0x38], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x38], data.data() + offset, header.bytes); offset += header.bytes; break; case 1045: - std::memcpy(&this->unknown_169C[0x3C], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x3C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1046: - std::memcpy(&this->unknown_169C[0x40], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x40], data.data() + offset, header.bytes); offset += header.bytes; break; case 1047: - std::memcpy(&this->unknown_169C[0x44], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x44], data.data() + offset, header.bytes); offset += header.bytes; break; case 1048: - std::memcpy(&this->unknown_169C[0x48], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x48], data.data() + offset, header.bytes); offset += header.bytes; break; case 1049: - std::memcpy(&this->unknown_169C[0x4C], data.data() + offset, header.bytes); + std::memcpy(&this->combatStats[0x4C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1050: - std::memcpy(&this->unknown_16EC, data.data() + offset, header.bytes); + std::memcpy(&this->equippedArrowIndex, data.data() + offset, header.bytes); offset += header.bytes; break; case 1051: @@ -1311,35 +1311,35 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1052: - std::memcpy(this->unknown_16F4, data.data() + offset, header.bytes); + std::memcpy(this->healthPoints, data.data() + offset, header.bytes); offset += header.bytes; break; case 1053: - std::memcpy(&this->unknown_16F4[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->healthPoints[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1054: - std::memcpy(&this->unknown_162C[0x14], data.data() + offset, header.bytes); + std::memcpy(&this->playerExperienceState[0x14], data.data() + offset, header.bytes); offset += header.bytes; break; case 1055: - std::memcpy(&this->unknown_162C[0x1C], data.data() + offset, header.bytes); + std::memcpy(&this->playerExperienceState[0x1C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1056: - std::memcpy(this->unknown_1704, data.data() + offset, header.bytes); + std::memcpy(this->optionFlags, data.data() + offset, header.bytes); offset += header.bytes; break; case 1057: - std::memcpy(&this->unknown_1708, data.data() + offset, header.bytes); + std::memcpy(&this->monsterInfoEnabled, data.data() + offset, header.bytes); offset += header.bytes; break; case 1058: - std::memcpy(this->unknown_170C, data.data() + offset, header.bytes); + std::memcpy(this->clientTimeOffset, data.data() + offset, header.bytes); offset += header.bytes; break; case 1059: - std::memcpy(&this->unknown_0EA0[0x30], data.data() + offset, header.bytes); + std::memcpy(&this->characterLoginData[0x30], data.data() + offset, header.bytes); offset += header.bytes; break; case 1060: @@ -1347,11 +1347,11 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1061: - std::memcpy(&this->unknown_0EDC[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->weaponAppearance[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1062: - std::memcpy(&this->unknown_0EDC[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->weaponAppearance[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 1063: @@ -1363,23 +1363,23 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1065: - std::memcpy(this->unknown_0EF4, data.data() + offset, header.bytes); + std::memcpy(this->accessoryAppearance, data.data() + offset, header.bytes); offset += header.bytes; break; case 1066: - std::memcpy(&this->unknown_0EF4[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->accessoryAppearance[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1067: - std::memcpy(&this->unknown_0EF4[0x8], data.data() + offset, header.bytes); + std::memcpy(&this->accessoryAppearance[0x8], data.data() + offset, header.bytes); offset += header.bytes; break; case 1068: - std::memcpy(this->unknown_0F0C, data.data() + offset, header.bytes); + std::memcpy(this->statusLevelEffects, data.data() + offset, header.bytes); offset += header.bytes; break; case 1069: - std::memcpy(&this->unknown_0F0C[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->statusLevelEffects[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1070: @@ -1391,47 +1391,47 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1072: - std::memcpy(&this->unknown_5974[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1073: - std::memcpy(&this->unknown_5974[0x8], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x8], data.data() + offset, header.bytes); offset += header.bytes; break; case 1074: - std::memcpy(&this->unknown_5974[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 1075: - std::memcpy(&this->unknown_5974[0x10], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x10], data.data() + offset, header.bytes); offset += header.bytes; break; case 1076: - std::memcpy(&this->unknown_5974[0x14], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x14], data.data() + offset, header.bytes); offset += header.bytes; break; case 1077: - std::memcpy(&this->unknown_5974[0x18], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x18], data.data() + offset, header.bytes); offset += header.bytes; break; case 1078: - std::memcpy(&this->unknown_5974[0x1C], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x1C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1079: - std::memcpy(&this->unknown_5974[0x20], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x20], data.data() + offset, header.bytes); offset += header.bytes; break; case 1080: - std::memcpy(&this->unknown_5974[0x24], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x24], data.data() + offset, header.bytes); offset += header.bytes; break; case 1081: - std::memcpy(&this->unknown_5974[0x2C], data.data() + offset, header.bytes); + std::memcpy(&this->equipmentViewState[0x2C], data.data() + offset, header.bytes); offset += header.bytes; break; case 1082: - std::memcpy(this->unknown_0F24, data.data() + offset, header.bytes); + std::memcpy(this->playerTeam, data.data() + offset, header.bytes); offset += header.bytes; break; case 1083: @@ -1443,7 +1443,7 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1085: - std::memcpy(this->unknown_0F30, data.data() + offset, header.bytes); + std::memcpy(this->chatFont, data.data() + offset, header.bytes); offset += header.bytes; break; case 1086: @@ -1463,40 +1463,40 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1090: - std::memcpy(this->unknown_0F44, data.data() + offset, header.bytes); + std::memcpy(this->storeSlotCounts, data.data() + offset, header.bytes); offset += header.bytes; break; case 1091: - std::memcpy(&this->unknown_0F44[0x4], data.data() + offset, header.bytes); + std::memcpy(&this->storeSlotCounts[0x4], data.data() + offset, header.bytes); offset += header.bytes; break; case 1092: - std::memcpy(&this->unknown_5490[0x8], data.data() + offset, header.bytes); + std::memcpy(&this->itemSendState[0x8], data.data() + offset, header.bytes); offset += header.bytes; break; case 1093: - std::memcpy(&this->unknown_5490[0xC], data.data() + offset, header.bytes); + std::memcpy(&this->itemSendState[0xC], data.data() + offset, header.bytes); offset += header.bytes; break; case 1094: - std::memcpy(&this->unknown_54A0, data.data() + offset, header.bytes); + std::memcpy(&this->partyExpShare, data.data() + offset, header.bytes); offset += header.bytes; break; case 1095: - std::memcpy(&this->unknown_54A4, data.data() + offset, header.bytes); + std::memcpy(&this->partyItemCollect, data.data() + offset, header.bytes); offset += header.bytes; break; case 1096: - std::memcpy(&this->unknown_54A8, data.data() + offset, header.bytes); + std::memcpy(&this->partyItemDistribute, data.data() + offset, header.bytes); offset += header.bytes; break; case 1097: - this->unknown_550C.resize(header.bytes); - std::memcpy(this->unknown_550C.data(), data.data() + offset, header.bytes); + this->storeTitle.resize(header.bytes); + std::memcpy(this->storeTitle.data(), data.data() + offset, header.bytes); offset += header.bytes; break; case 1099: - std::memcpy(&this->unknown_5468, data.data() + offset, header.bytes); + std::memcpy(&this->adoptionSkillAvailable, data.data() + offset, header.bytes); offset += header.bytes; break; case 1100: @@ -1504,7 +1504,7 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da offset += header.bytes; break; case 1101: - std::memcpy(&this->unknown_7FBC, data.data() + offset, header.bytes); + std::memcpy(&this->extraInventorySlots, data.data() + offset, header.bytes); offset += header.bytes; break; default: @@ -1519,10 +1519,10 @@ std::uint32_t CSession::ReadReplayCharacter(const std::vector& da // OFFSET: 0x00DE93F0 // FUNCTION: fn_23500 void CSession::ResetMercenaryStats() { - this->unknown_56A4 = 0; - this->unknown_56A8 = 0; - this->unknown_56AC = 0; - this->unknown_5698 = 0; - this->unknown_569C = 0; - this->unknown_56A0 = 0; + this->moveMercenaryEnemy = 0; + this->selectMercenaryEnemy = 0; + this->attackMercenaryEnemy = 0; + this->mercenaryEnemyGid = 0; + this->mercenaryEnemyX = 0; + this->mercenaryEnemyY = 0; } diff --git a/Source/Contents/ClientTiming.cpp b/Source/Contents/ClientTiming.cpp index 53ac1f105..98a597ec0 100644 --- a/Source/Contents/ClientTiming.cpp +++ b/Source/Contents/ClientTiming.cpp @@ -84,8 +84,8 @@ struct NaviUnknownBlock { // OFFSET: 0x00B8C870 // FUNCTION: fn_19426 CNavi_Object::CNavi_Object() - : cellX(0), cellY(0), unknown_0058(0), unknown_005C(0), unknown_0060(0), unknown_0064(0), unknown_0068(0), - unknown_006C(0), unknown_0070(0), unknown_0074(0), unknown_0078(0) { + : cellX(0), cellY(0), job(0), sex(0), bodyPalette(0), head(0), headPalette(0), + accessory0(0), accessory1(0), accessory2(0), robe(0) { this->id = -1; this->type = 101; this->index = 0; @@ -104,8 +104,8 @@ NaviUnknownBlock::NaviUnknownBlock() // OFFSET: 0x00B8C710 // FUNCTION: fn_19425 CNavi_Object::CNavi_Object(int type, int index, const char* name, const char* title, int cellX, int cellY, CNaviInfo* info) - : cellX(0), cellY(0), unknown_0058(0), unknown_005C(0), unknown_0060(0), unknown_0064(0), unknown_0068(0), unknown_006C(0), - unknown_0070(0), unknown_0074(0), unknown_0078(0) { + : cellX(0), cellY(0), job(0), sex(0), bodyPalette(0), head(0), headPalette(0), accessory0(0), + accessory1(0), accessory2(0), robe(0) { this->type = type; this->id = -1; this->index = index; @@ -122,11 +122,11 @@ CNavi_Object::CNavi_Object(int type, int index, const char* name, const char* ti // OFFSET: 0x00B8C520 // FUNCTION: fn_19423 -CNavi_Link::CNavi_Link() : unknown_0080(0), unknown_0084(0) { +CNavi_Link::CNavi_Link() : linkedCellX(0), linkedCellY(0) { this->type = 200; this->linkedInfo = nullptr; - this->unknown_0080 = 0; - this->unknown_0084 = 0; + this->linkedCellX = 0; + this->linkedCellY = 0; this->depth = -1; } @@ -135,7 +135,7 @@ CNavi_Link::CNavi_Link() : unknown_0080(0), unknown_0084(0) { CNavi_Link::CNavi_Link( int type, int index, const char* name, const char* title, int cellX, int cellY, CNaviInfo* info, CNaviInfo* linkedInfo, int unknown80, int unknown84 ) - : unknown_0080(0), unknown_0084(0) { + : linkedCellX(0), linkedCellY(0) { this->type = type; this->index = index; if (name) { @@ -148,8 +148,8 @@ CNavi_Link::CNavi_Link( this->cellY = cellY; this->info = info; this->linkedInfo = linkedInfo; - this->unknown_0080 = unknown80; - this->unknown_0084 = unknown84; + this->linkedCellX = unknown80; + this->linkedCellY = unknown84; this->depth = 0; } @@ -314,15 +314,15 @@ bool CNavigationManager::LoadScript(LuaScript* script) { if (info) { CNavi_Object* npc = info->FindNpcAt(pickX, pickY); if (npc) { - npc->unknown_0058 = pick[0]; - npc->unknown_005C = pick[1]; - npc->unknown_0060 = pick[2]; - npc->unknown_0064 = pick[3]; - npc->unknown_0068 = pick[4]; - npc->unknown_006C = pick[5]; - npc->unknown_0070 = pick[6]; - npc->unknown_0074 = pick[7]; - npc->unknown_0078 = pick[8]; + npc->job = pick[0]; + npc->sex = pick[1]; + npc->bodyPalette = pick[2]; + npc->head = pick[3]; + npc->headPalette = pick[4]; + npc->accessory0 = pick[5]; + npc->accessory1 = pick[6]; + npc->accessory2 = pick[7]; + npc->robe = pick[8]; } } } @@ -460,7 +460,7 @@ bool CNavigationManager::LoadScript(LuaScript* script) { } } - this->unknown_1244 = this->FindObject("prontera"); + this->playerMapInfo = this->FindObject("prontera"); this->data.ResetLinkDepths(); return true; } @@ -538,65 +538,65 @@ void CSession::SetHotkeyDescription(const char* description, int index) { // FUNCTION: fn_23914 void CSession::SetHotkeyDescription(const char* description, std::uint32_t skillLevel, int index) { for (int slot = 9 * this->m_hotkeyPage; slot < 9 * (this->m_hotkeyPage + 1); ++slot) { - if (this->m_hotkeyDescriptions[slot] == description && this->unknown_0420[slot] == skillLevel) { + if (this->m_hotkeyDescriptions[slot] == description && this->hotkeySkillLevels[slot] == skillLevel) { this->m_hotkeyDescriptions[slot] = "nothing"; - this->unknown_0420[slot] = 0; + this->hotkeySkillLevels[slot] = 0; } } if (std::strlen(description) == 0) { this->m_hotkeyDescriptions[index] = "nothing"; - this->unknown_0420[index] = 0; + this->hotkeySkillLevels[index] = 0; } else { this->m_hotkeyDescriptions[index] = description; - this->unknown_0420[index] = skillLevel; + this->hotkeySkillLevels[index] = skillLevel; } } // OFFSET: 0x00E26540 // FUNCTION: fn_23915 void CSession::SetHotkeySkillLevel(std::uint32_t skillLevel, int index) { - this->unknown_0420[index] = skillLevel; + this->hotkeySkillLevels[index] = skillLevel; } // OFFSET: 0x00E265C0 // FUNCTION: fn_23916 void CSession::RefreshTrackedAchievement(int id) { - std::vector& tracked = this->unknown_6178; + std::vector& tracked = this->trackedAchievements; auto found = std::find_if(tracked.begin(), tracked.end(), [id](SessionRecord6178 record) { return id == record.id; }); if (found == tracked.end()) { return; } - auto record = g_session.unknown_6144.find(id); - SessionRecord6144 progress = record != g_session.unknown_6144.end() ? record->second : SessionRecord6144(); + auto record = g_session.achievements.find(id); + SessionRecord6144 progress = record != g_session.achievements.end() ? record->second : SessionRecord6144(); AchievementInfo info; g_achievementMgr->GetAchievement(info, id); - found->unknown_0001 = reinterpret_cast(&progress.unknown_0000)[1]; + found->completed = reinterpret_cast(&progress.completionFlags)[1]; for (unsigned int i = 0; i < info.rewards.size(); ++i) { const AchievementReward& reward = info.rewards[i]; - SessionRecord6178Entry& entry = found->unknown_0020[i]; + SessionRecord6178Entry& entry = found->objectives[i]; - if (info.unknown_0064 == 0) { + if (info.progressMode == 0) { if (reward.text.size() > 40) { entry.text = static_cast(FormatOwnedString("- %s...", reward.text.substr(0, 40).c_str())); } else { entry.text = static_cast(FormatOwnedString("- %s", reward.text.c_str())); } - entry.completed = static_cast(progress.unknown_0004[i]) > 0; - } else if (info.unknown_0064 == 1) { - int value = progress.unknown_0004[i]; - std::string count = FormatOwnedString("(%d/%d)", value, reward.unknown_0018); + entry.completed = static_cast(progress.objectives[i]) > 0; + } else if (info.progressMode == 1) { + int value = progress.objectives[i]; + std::string count = FormatOwnedString("(%d/%d)", value, reward.targetCount); if (reward.text.size() + count.size() > 40) { entry.text = static_cast(FormatOwnedString("- %s...%s", reward.text.substr(0, 40 - count.size()).c_str(), count.c_str())); } else { entry.text = static_cast(FormatOwnedString("- %s %s", reward.text.c_str(), count.c_str())); } - entry.completed = value == reward.unknown_0018; + entry.completed = value == reward.targetCount; } } } @@ -632,7 +632,7 @@ SessionShop* CSession::GetShop(int shopId) { // FUNCTION: fn_23641 void CSession::SetShopFlag(int shopId, char flag) { if (SessionShop* shop = this->GetShop(shopId)) { - shop->unknown_0000 = static_cast(flag); + shop->flag = static_cast(flag); } } @@ -644,11 +644,11 @@ void CSession::SetShopItem(int shopId, unsigned int index, int itemId, int first return; } - if (shop->unknown_0004.size() <= index) { - shop->unknown_0004.resize(index + 1); + if (shop->items.size() <= index) { + shop->items.resize(index + 1); } - std::map>& items = shop->unknown_0004[index]; + std::map>& items = shop->items[index]; if (items.find(itemId) == items.end()) { items[itemId] = index == 0 ? std::make_pair(1, second) : std::make_pair(first, second); } @@ -756,22 +756,22 @@ void CSession::LoadRobeAlpha() { // OFFSET: 0x00E010B0 // FUNCTION: fn_23646 int CSession::SetUnknown8134(int value) { - this->unknown_8134 = value; + this->playerSkillMode = value; return value; } // OFFSET: 0x00DDBB50 // FUNCTION: fn_23359 int CSession::GetUnknown8134() const { - return this->unknown_8134; + return this->playerSkillMode; } // OFFSET: 0x00E01670 // FUNCTION: fn_23647 void CSession::ClearUnknown1710(int id) { for (ITEM_INFO& entry : this->m_inventoryItems) { - if (entry.unknown_0000[1] == static_cast(id)) { - entry.unknown_0074[2] = 0; + if (entry.identity[1] == static_cast(id)) { + entry.flags[2] = 0; break; } } @@ -780,9 +780,9 @@ void CSession::ClearUnknown1710(int id) { // OFFSET: 0x00E016A0 // FUNCTION: fn_23648 void CSession::ClearUnknown1740(int id) { - for (ITEM_INFO& entry : this->unknown_1740) { - if (entry.unknown_0000[1] == static_cast(id)) { - entry.unknown_0074[2] = 0; + for (ITEM_INFO& entry : this->merchantShopItems) { + if (entry.identity[1] == static_cast(id)) { + entry.flags[2] = 0; break; } } @@ -791,9 +791,9 @@ void CSession::ClearUnknown1740(int id) { // OFFSET: 0x00E016D0 // FUNCTION: fn_23649 void CSession::ClearUnknown1738(int id) { - for (ITEM_INFO& entry : this->unknown_1738) { - if (entry.unknown_0000[1] == static_cast(id)) { - entry.unknown_0074[2] = 0; + for (ITEM_INFO& entry : this->cartItems) { + if (entry.identity[1] == static_cast(id)) { + entry.flags[2] = 0; break; } } @@ -826,8 +826,8 @@ std::uint32_t CSession::SyncServerTime(std::uint32_t serverTime) { // OFFSET: 0x00DE4D80 // FUNCTION: fn_23490 void CSession::LoadDamageSkinSettings() { - g_session.m_hotkeyScript->Call("GetDamageSkinSize", ">d", &this->unknown_80C8); - if (this->m_damageSkinIndex < 0 || this->m_damageSkinIndex >= this->unknown_80C8) { + g_session.m_hotkeyScript->Call("GetDamageSkinSize", ">d", &this->damageSkinCount); + if (this->m_damageSkinIndex < 0 || this->m_damageSkinIndex >= this->damageSkinCount) { this->m_damageSkinIndex = 0; } if (this->m_damageSkinMode < 0 || this->m_damageSkinMode >= 4) { @@ -842,10 +842,10 @@ void CSession::LoadDamageSkinSettings() { this->m_damageResourceName = resourceName; } if (name80EC) { - this->unknown_80EC = name80EC; + this->damageSpriteName = name80EC; } if (name8104) { - this->unknown_8104 = name8104; + this->damageSkinAuxiliaryName = name8104; } g_session.m_hotkeyScript->Call("GetDamageMillionUnit", "d>d", this->m_damageSkinIndex, &this->m_damageMillionUnit); } @@ -857,7 +857,7 @@ bool CSession::LoadExceptionMinimapNameTable() { this->m_navigationForbiddenMaps.clear(); this->m_navigationForbiddenMaps.reserve(512); - CCommonObject& storage = reinterpret_cast(this->unknown_5400[0x30]); + CCommonObject& storage = reinterpret_cast(this->minimapTokenStorage[0x30]); const bool loaded = storage.LoadTokens(tokens, "ExceptionMinimapNameTable.txt", 0); for (char* token : tokens) { @@ -921,10 +921,10 @@ bool CSession::LoadFogParameters() { // OFFSET: 0x00DE5B40 // FUNCTION: fn_23493 void CSession::ClearHomunStatus() { - this->unknown_5608 = 0; - this->unknown_560C = 0; - this->unknown_5610 = 0; - this->unknown_55FC = 0; - this->unknown_5600 = 0; - this->unknown_5604 = 0; + this->moveHomunEnemy = 0; + this->selectHomunEnemy = 0; + this->attackHomunEnemy = 0; + this->homunEnemyGid = 0; + this->homunEnemyX = 0; + this->homunEnemyY = 0; } diff --git a/Source/Contents/Configuration/GameSettingsMgr.h b/Source/Contents/Configuration/GameSettingsMgr.h index 3ca7a76b9..fe1a5fdaf 100644 --- a/Source/Contents/Configuration/GameSettingsMgr.h +++ b/Source/Contents/Configuration/GameSettingsMgr.h @@ -24,8 +24,8 @@ struct GameSettingsOption { /* 0040 */ std::string description; /* 0058 */ unsigned char defaultValue; /* 0059 */ unsigned char unknown_0059[3]; - /* 005C */ int unknown_005c = 4698; - /* 0060 */ int unknown_0060 = 4698; + /* 005C */ int enabledMessage = 4698; + /* 0060 */ int disabledMessage = 4698; }; class CGameSettingsMgr : public Singleton, public CLuaInstance { diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index 71c970d49..c631aef47 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -67,8 +67,8 @@ struct GameSettingsOption { /* 0040 */ std::string description; /* 0058 */ unsigned char defaultValue; /* 0059 */ unsigned char unknown_0059[3]; - /* 005C */ int unknown_005c = 4698; - /* 0060 */ int unknown_0060 = 4698; + /* 005C */ int enabledMessage = 4698; + /* 0060 */ int disabledMessage = 4698; }; class CGameSettingsMgr : public Singleton, public CLuaInstance { @@ -453,10 +453,10 @@ void GameSettings::SetOption(int id, unsigned char value, bool notify) { if (entry != this->actions.end()) { const std::function action = entry->second; if (action) { - action(id, value, notify, (*option)->unknown_005c, (*option)->unknown_0060); + action(id, value, notify, (*option)->enabledMessage, (*option)->disabledMessage); } } else { - ApplyServiceOption(id, value, notify, (*option)->unknown_005c, (*option)->unknown_0060); + ApplyServiceOption(id, value, notify, (*option)->enabledMessage, (*option)->disabledMessage); } } @@ -622,8 +622,8 @@ bool GameSettings::ReadOptionTable() { lua_gettable(state, -2); const int disabledMessage = FindMessageId(lua_tostring(state, -1)); lua_pop(state, 1); - option.unknown_005c = enabledMessage; - option.unknown_0060 = disabledMessage; + option.enabledMessage = enabledMessage; + option.disabledMessage = disabledMessage; } lua_pop(state, 1); @@ -908,8 +908,8 @@ void ApplyServiceOptionItemWnd(int id, unsigned char value, bool notify, int ena } } - if (g_windowMgr.unknown_01D4 != nullptr) { - static_cast(g_windowMgr.unknown_01D4)->RefreshOptionBox(); + if (g_windowMgr.itemWnd != nullptr) { + static_cast(g_windowMgr.itemWnd)->RefreshOptionBox(); } } #pragma inline_depth() @@ -938,8 +938,8 @@ void ToggleSitStand() { player->render.angle = static_cast(std::ceil(player->render.angle)); mode->SendMsg(MM_CHANGE_DIRECTION, (static_cast(player->render.angle) + 180) / 45 % 8, motion, 0, 0); - if (player->render.unknown_0070 == 6) { - std::list& times = mode->unknown_05D4; + if (player->render.state == 6) { + std::list& times = mode->periodicTicks; times.pop_front(); times.push_back(timeGetTime()); const unsigned long elapsed = times.back() - times.front(); @@ -1053,7 +1053,7 @@ void ApplyServiceOptionSessionFlag(int id, unsigned char value, bool notify, int } } - *reinterpret_cast(g_session.unknown_5454) = value; + *reinterpret_cast(g_session.interactionFlags) = value; } #pragma inline_depth() @@ -1172,7 +1172,7 @@ void ApplyServiceOptionNotifyWindow(int id, unsigned char value, bool notify, in } } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01C0)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.minimapZoomWnd)) { window->SendMsg(nullptr, UM_COMMAND, 0x1F6, 0, 0, 0); } } @@ -1207,8 +1207,8 @@ void ApplyServiceOptionHideWindow(int id, unsigned char value, bool notify, int } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (mode && mode->unknown_05D0 && !g_serviceOptions.Get(id)) { - mode->unknown_05D0->Show(0); + if (mode && mode->statusIconTooltip && !g_serviceOptions.Get(id)) { + mode->statusIconTooltip->Show(0); } } #pragma inline_depth() @@ -1266,19 +1266,19 @@ void ApplyServiceOptionWeatherFlag(int id, unsigned char value, bool notify, int } } - g_weatherEffect.unknown_0001 = value ^ 1; + g_weatherEffect.enabled = value ^ 1; } #pragma inline_depth() // OFFSET: 0x006C5AD0 // FUNCTION: fn_06364 void ApplyServiceOptionWindow27() { - if (g_windowMgr.unknown_0304 != 0) { + if (g_windowMgr.merchantItemMyShopWnd != 0) { g_windowMgr.Confirm(LookupMessage(MSI_CANT_OPEN_STORE_WHILE_CHAT), 0, true, false, 0, "Message", 0x118, 0x78, 0); return; } - if (g_windowMgr.unknown_02FC != 0) { + if (g_windowMgr.merchantShopMakeWnd != 0) { CMode* mode = g_modeMgr.GetGameMode(); if (mode) { mode->SendMsg(MM_REQ_OPENSTORE, 0, 0, 0, 0); @@ -1341,8 +1341,8 @@ void ApplyItemWndServiceOption(int id, unsigned char value, bool notify, int ena } } - if (g_windowMgr.unknown_01D4) { - static_cast(g_windowMgr.unknown_01D4)->RefreshOptionBox(); + if (g_windowMgr.itemWnd) { + static_cast(g_windowMgr.itemWnd)->RefreshOptionBox(); } } @@ -1543,7 +1543,7 @@ void CSession::LoadOptionInfo() { } g_skinInfo.m_name = this->GetOptionString("SkinName", ""); - this->unknown_1708 = g_serviceOptions.Get(0x2E); + this->monsterInfoEnabled = g_serviceOptions.Get(0x2E); g_showBattleFieldIcon = this->GetOptionInteger("ShowBattleFieldIcon", 1) != 0; Singleton::GetInstance()->ApplyScriptOption(ConfineCursor, "MouseExclusive"); diff --git a/Source/Contents/EffectResourceSwitcher.cpp b/Source/Contents/EffectResourceSwitcher.cpp index 199ec2d42..61072aa64 100644 --- a/Source/Contents/EffectResourceSwitcher.cpp +++ b/Source/Contents/EffectResourceSwitcher.cpp @@ -293,31 +293,31 @@ void CEZ2STREffectEx::Open() { emitter->offset.x = info->offsetX; emitter->offset.y = info->offsetY; emitter->offset.z = 0.0f; - if (info->unknown_0024 & 1) { + if (info->flags & 1) { this->retained = 1; emitter->looping = 1; } - emitter->duration = info->unknown_0040[1]; - this->frameStep = info->unknown_0040[1] / 16; - if (!info->unknown_0028.empty()) { - this->AddEvent(0, info->unknown_0028.c_str(), this->frameStep + 1, 0); + emitter->duration = info->delays[1]; + this->frameStep = info->delays[1] / 16; + if (!info->soundPath.empty()) { + this->AddEvent(0, info->soundPath.c_str(), this->frameStep + 1, 0); } - if (info->unknown_0040[0] >= 0) { - this->AddEvent(1, nullptr, info->unknown_0040[0], 0); + if (info->delays[0] >= 0) { + this->AddEvent(1, nullptr, info->delays[0], 0); } - if (info->unknown_0024 & 2) { + if (info->flags & 2) { particle->flags = 0xD; } - if (info->unknown_0024 & 4) { + if (info->flags & 4) { particle->flags = 0x205; } - emitter->unknown_3FEA = (info->unknown_0024 >> 3) & 1; - emitter->unknown_3FEB = (info->unknown_0024 >> 4) & 1; + emitter->repeatFrame = (info->flags >> 3) & 1; + emitter->followGround = (info->flags >> 4) & 1; this->emitter = emitter; } @@ -355,7 +355,7 @@ void CEZ2STREffectEx::OnProcess() { this->emitter->remainingTime -= 0.05f; } - if (this->emitter->unknown_3FEB) { + if (this->emitter->followGround) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); this->position[1] = mode->scene->terrain->Height(this->position[0], this->position[2]); } @@ -377,7 +377,7 @@ void CEZ2STREffectEx::OnProcess() { reinterpret_cast(emitter)->Process(0.0f, 0.0f, 0.0f); } - if (this->emitter->unknown_3FEA == 1 && this->emitter->unknown_3F58 == 1) { + if (this->emitter->repeatFrame == 1 && this->emitter->playbackState == 1) { this->frame = this->frameStep; } @@ -410,7 +410,7 @@ void CEZ2STREffectEx::SetAlpha(float argument) { // FUNCTION: fn_06973 void CEZ2STREffectEx::SetFlipX(int argument) { if (this->emitter) { - this->emitter->unknown_3FE8 = static_cast(argument); + this->emitter->flipX = static_cast(argument); } } @@ -418,7 +418,7 @@ void CEZ2STREffectEx::SetFlipX(int argument) { // FUNCTION: fn_06974 void CEZ2STREffectEx::SetFlipY(int argument) { if (this->emitter) { - this->emitter->unknown_3FE9 = static_cast(argument); + this->emitter->flipY = static_cast(argument); } } @@ -441,7 +441,7 @@ void CEZ2STREffectEx::EnableGroundRender() { // FUNCTION: fn_06977 void CEZ2STREffectEx::SetLifeTime(int argument) { if (this->emitter) { - this->emitter->unknown_3F98 = argument; + this->emitter->lifetimeLimit = argument; } } @@ -449,7 +449,7 @@ void CEZ2STREffectEx::SetLifeTime(int argument) { // FUNCTION: fn_06978 void CEZ2STREffectEx::SetAngle(float argument) { if (this->emitter) { - this->emitter->unknown_3FA4 = argument; + this->emitter->rotationAngle = argument; } } @@ -457,7 +457,7 @@ void CEZ2STREffectEx::SetAngle(float argument) { // FUNCTION: fn_06979 void CEZ2STREffectEx::SetPitch(float argument) { if (this->emitter) { - this->emitter->unknown_3FA8 = argument; + this->emitter->pitch = argument; } } @@ -465,7 +465,7 @@ void CEZ2STREffectEx::SetPitch(float argument) { // FUNCTION: fn_06980 void CEZ2STREffectEx::SetYaw(float argument) { if (this->emitter) { - this->emitter->unknown_3FAC = argument; + this->emitter->yaw = argument; } } @@ -473,7 +473,7 @@ void CEZ2STREffectEx::SetYaw(float argument) { // FUNCTION: fn_06981 void CEZ2STREffectEx::SetScale(float argument) { if (this->emitter) { - this->emitter->unknown_3FB0 = argument; + this->emitter->scale = argument; } } @@ -500,24 +500,24 @@ void CEZ2STREffectMgr::InfoInserter::operator()(const std::pair(this->manager->effects.size()); info.name = static_cast(FromUtf8(record.name, g_textCodePage)); info.offsetX = static_cast(record.offsetX); - if (record.unknown_0028) { - info.unknown_0024 |= 1; + if (record.infinite) { + info.flags |= 1; } - if (record.unknown_0029) { - info.unknown_0024 |= 2; + if (record.floor) { + info.flags |= 2; } info.offsetY = static_cast(record.offsetY); - if (record.unknown_002A) { - info.unknown_0024 |= 4; + if (record.aboveUi) { + info.flags |= 4; } - info.unknown_0028 = static_cast(FromUtf8(record.unknown_002C, g_textCodePage)); - if (record.unknown_0044) { - info.unknown_0024 |= 8; + info.soundPath = static_cast(FromUtf8(record.soundPath, g_textCodePage)); + if (record.soundLoop) { + info.flags |= 8; } - info.unknown_0040[0] = record.unknown_0048[0]; - info.unknown_0040[1] = record.unknown_0048[1]; - if (record.unknown_0050) { - info.unknown_0024 |= 16; + info.delays[0] = record.delays[0]; + info.delays[1] = record.delays[1]; + if (record.toGround) { + info.flags |= 16; } std::string key = FromUtf8(entry.first, g_textCodePage); diff --git a/Source/Contents/EffectResourceSwitcher.h b/Source/Contents/EffectResourceSwitcher.h index ac113267d..492b10f36 100644 --- a/Source/Contents/EffectResourceSwitcher.h +++ b/Source/Contents/EffectResourceSwitcher.h @@ -18,22 +18,22 @@ struct EZ2STREffectInfo { /* 0004 */ std::string name; /* 001C */ float offsetX; /* 0020 */ float offsetY; - /* 0024 */ unsigned int unknown_0024 = 0; - /* 0028 */ std::string unknown_0028; - /* 0040 */ int unknown_0040[2] = {-1, 0}; + /* 0024 */ unsigned int flags = 0; + /* 0028 */ std::string soundPath; + /* 0040 */ int delays[2] = {-1, 0}; }; struct EZ2STREffectRecord { /* 0000 */ std::string name; /* 0018 */ double offsetX; /* 0020 */ double offsetY; - /* 0028 */ bool unknown_0028; - /* 0029 */ bool unknown_0029; - /* 002A */ bool unknown_002A; - /* 002C */ std::string unknown_002C; - /* 0044 */ bool unknown_0044; - /* 0048 */ int unknown_0048[2]; - /* 0050 */ bool unknown_0050; + /* 0028 */ bool infinite; + /* 0029 */ bool floor; + /* 002A */ bool aboveUi; + /* 002C */ std::string soundPath; + /* 0044 */ bool soundLoop; + /* 0048 */ int delays[2]; + /* 0050 */ bool toGround; }; class CEZ2STREffectMgr : public Singleton { @@ -81,13 +81,13 @@ public: static_assert(sizeof(EZ2STREffectInfo) == 0x48); static_assert(sizeof(CEZ2STREffectMgr) == 0xC); static_assert(sizeof(EZ2STREffectRecord) == 0x58); -static_assert(offsetof(EZ2STREffectRecord, unknown_002C) == 0x2C); -static_assert(offsetof(EZ2STREffectRecord, unknown_0050) == 0x50); +static_assert(offsetof(EZ2STREffectRecord, soundPath) == 0x2C); +static_assert(offsetof(EZ2STREffectRecord, toGround) == 0x50); static_assert(offsetof(EZ2STREmitter, currentFrame) == 0x3CC4); static_assert(offsetof(EZ2STREmitter, looping) == 0x3F5C); -static_assert(offsetof(EZ2STREmitter, unknown_3F98) == 0x3F98); +static_assert(offsetof(EZ2STREmitter, lifetimeLimit) == 0x3F98); static_assert(offsetof(EZ2STREmitter, remainingTime) == 0x3FB4); -static_assert(offsetof(EZ2STREmitter, unknown_3FE9) == 0x3FE9); +static_assert(offsetof(EZ2STREmitter, flipY) == 0x3FE9); static_assert(offsetof(EffectResourceSwitcher, effect) == 0xD0); static_assert(offsetof(EffectResourceSwitcher, targetName) == 0xF8); static_assert(sizeof(EffectResourceSwitcher) == 0x110); diff --git a/Source/Contents/Effects/AMachineEffect.cpp b/Source/Contents/Effects/AMachineEffect.cpp index 726e48a4b..5a5398c44 100644 --- a/Source/Contents/Effects/AMachineEffect.cpp +++ b/Source/Contents/Effects/AMachineEffect.cpp @@ -8,7 +8,7 @@ // OFFSET: 0x006F6510 // FUNCTION: fn_06846 -CAMachineEffect::CAMachineEffect() : CEffect(-1), unknown_00D4(0) { +CAMachineEffect::CAMachineEffect() : CEffect(-1), state(0) { } // OFFSET: 0x006F6A50 @@ -19,41 +19,41 @@ void CAMachineEffect::Open() { CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (particle) { particle->Load("a_machine\\a_machine\\a_machine_attack_waiting.str"); - this->unknown_00CC[0] = particle; + this->stateParticles[0] = particle; } particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (particle) { particle->Load("a_machine\\a_machine\\a_machine_attack.str"); - this->unknown_00CC[1] = particle; + this->stateParticles[1] = particle; } particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (particle) { particle->Load("a_machine\\a_machine\\a_machine_waiting.str"); particle->m_loop = true; - this->unknown_00CC[2] = particle; + this->stateParticles[2] = particle; } } // OFFSET: 0x006F6940 // FUNCTION: fn_06850 void CAMachineEffect::Close() { - for (std::map::iterator it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { + for (std::map::iterator it = this->stateParticles.begin(); it != this->stateParticles.end(); ++it) { if (it->second) { FreeParticle(it->second); it->second = nullptr; } } - this->unknown_00CC.clear(); + this->stateParticles.clear(); } // OFFSET: 0x006F6DB0 // FUNCTION: fn_06853 void CAMachineEffect::OnProcess() { - const int key = this->unknown_00D4; - std::map::iterator it = this->unknown_00CC.find(key); - if (it == this->unknown_00CC.end()) { + const int key = this->state; + std::map::iterator it = this->stateParticles.find(key); + if (it == this->stateParticles.end()) { return; } @@ -81,9 +81,9 @@ void CAMachineEffect::OnProcess() { // OFFSET: 0x006F7000 // FUNCTION: fn_06854 void CAMachineEffect::Render() { - const int key = this->unknown_00D4; - std::map::iterator it = this->unknown_00CC.find(key); - if (it == this->unknown_00CC.end()) { + const int key = this->state; + std::map::iterator it = this->stateParticles.find(key); + if (it == this->stateParticles.end()) { return; } @@ -104,8 +104,8 @@ bool CAMachineEffect::IsAlive() { // OFFSET: 0x006F7070 // FUNCTION: fn_06855 void CAMachineEffect::PlayAttack() { - std::map::iterator it = this->unknown_00CC.find(1); - if (it == this->unknown_00CC.end()) { + std::map::iterator it = this->stateParticles.find(1); + if (it == this->stateParticles.end()) { return; } @@ -115,15 +115,15 @@ void CAMachineEffect::PlayAttack() { } particle->Restart(); - this->unknown_00D4 = 1; + this->state = 1; } // OFFSET: 0x006F70E0 // FUNCTION: fn_06856 void CAMachineEffect::SetState(int state) { const int key = state; - std::map::iterator it = this->unknown_00CC.find(key); - if (it == this->unknown_00CC.end()) { + std::map::iterator it = this->stateParticles.find(key); + if (it == this->stateParticles.end()) { return; } @@ -133,5 +133,5 @@ void CAMachineEffect::SetState(int state) { } particle->Restart(); - this->unknown_00D4 = state; + this->state = state; } diff --git a/Source/Contents/Effects/AMachineEffect.h b/Source/Contents/Effects/AMachineEffect.h index 522b39ae5..d38e4615a 100644 --- a/Source/Contents/Effects/AMachineEffect.h +++ b/Source/Contents/Effects/AMachineEffect.h @@ -20,13 +20,13 @@ public: void PlayAttack(); __declspec(noinline) void SetState(int state); - /* 00CC */ std::map unknown_00CC; - /* 00D4 */ int unknown_00D4; + /* 00CC */ std::map stateParticles; + /* 00D4 */ int state; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CAMachineEffect) == 0xD8); -static_assert(offsetof(CAMachineEffect, unknown_00D4) == 0xD4); +static_assert(offsetof(CAMachineEffect, state) == 0xD4); #endif #endif diff --git a/Source/Contents/Effects/AcidifiedThrow.cpp b/Source/Contents/Effects/AcidifiedThrow.cpp index 55983776f..43ca192b2 100644 --- a/Source/Contents/Effects/AcidifiedThrow.cpp +++ b/Source/Contents/Effects/AcidifiedThrow.cpp @@ -16,23 +16,23 @@ // OFFSET: 0x006F3540 // FUNCTION: fn_06821 CAcidifiedThrow::CAcidifiedThrow() : CEffect(-1) { - this->unknown_00E4.x = 0.0f; - this->unknown_00E4.y = 0.0f; - this->unknown_00E4.z = 0.0f; + this->impactPosition.x = 0.0f; + this->impactPosition.y = 0.0f; + this->impactPosition.z = 0.0f; } // OFFSET: 0x006F3750 // FUNCTION: fn_06823 void CAcidifiedThrow::Close() { - if (this->unknown_00CC) { - FreeParticle(reinterpret_cast(this->unknown_00CC)); - this->unknown_00CC = nullptr; + if (this->projectileEmitter) { + FreeParticle(reinterpret_cast(this->projectileEmitter)); + this->projectileEmitter = nullptr; } for (__int64 i = 0; i < 3; ++i) { - if (this->unknown_00D0[i]) { - FreeParticle(reinterpret_cast(this->unknown_00D0[i])); - this->unknown_00D0[i] = nullptr; + if (this->impactEmitters[i]) { + FreeParticle(reinterpret_cast(this->impactEmitters[i])); + this->impactEmitters[i] = nullptr; } } } @@ -40,53 +40,53 @@ void CAcidifiedThrow::Close() { // OFFSET: 0x006F37D0 // FUNCTION: fn_06824 void CAcidifiedThrow::Open() { - this->unknown_00CC = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); - this->unknown_00D0[0] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); - this->unknown_00D0[1] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); - this->unknown_00D0[2] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); + this->projectileEmitter = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); + this->impactEmitters[0] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); + this->impactEmitters[1] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); + this->impactEmitters[2] = reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); - if (!this->unknown_00CC || !this->unknown_00D0[0] || !this->unknown_00D0[1] || !this->unknown_00D0[2]) { + if (!this->projectileEmitter || !this->impactEmitters[0] || !this->impactEmitters[1] || !this->impactEmitters[2]) { return; } switch (this->id) { case 0x89E: - reinterpret_cast(this->unknown_00CC)->Load("acidified_zone_fire\\acidified_zone_fire_c\\acidified_zone_fire_c.str"); - reinterpret_cast(this->unknown_00D0[0])->Load("acidified_zone_fire\\acidified_zone_fire_b\\acidified_zone_fire_b.str"); - reinterpret_cast(this->unknown_00D0[1])->Load("acidified_zone_fire\\acidified_zone_fire_b_bottom\\acidified_zone_fire_b_bottom.str"); - reinterpret_cast(this->unknown_00D0[2])->Load("acidified_zone_fire\\acidified_zone_fire_water\\acidified_zone_fire_water.str"); + reinterpret_cast(this->projectileEmitter)->Load("acidified_zone_fire\\acidified_zone_fire_c\\acidified_zone_fire_c.str"); + reinterpret_cast(this->impactEmitters[0])->Load("acidified_zone_fire\\acidified_zone_fire_b\\acidified_zone_fire_b.str"); + reinterpret_cast(this->impactEmitters[1])->Load("acidified_zone_fire\\acidified_zone_fire_b_bottom\\acidified_zone_fire_b_bottom.str"); + reinterpret_cast(this->impactEmitters[2])->Load("acidified_zone_fire\\acidified_zone_fire_water\\acidified_zone_fire_water.str"); break; case 0x8A6: - reinterpret_cast(this->unknown_00CC)->Load("acidified_zone_water\\acidified_zone_water_c\\acidified_zone_water_c.str"); - reinterpret_cast(this->unknown_00D0[0])->Load("acidified_zone_water\\acidified_zone_water_b\\acidified_zone_water_b.str"); - reinterpret_cast(this->unknown_00D0[1])->Load("acidified_zone_water\\acidified_zone_water_b_bottom\\acidified_zone_water_b_bottom.str"); - reinterpret_cast(this->unknown_00D0[2])->Load("acidified_zone_water\\acidified_zone_water_water\\acidified_zone_water_water.str"); + reinterpret_cast(this->projectileEmitter)->Load("acidified_zone_water\\acidified_zone_water_c\\acidified_zone_water_c.str"); + reinterpret_cast(this->impactEmitters[0])->Load("acidified_zone_water\\acidified_zone_water_b\\acidified_zone_water_b.str"); + reinterpret_cast(this->impactEmitters[1])->Load("acidified_zone_water\\acidified_zone_water_b_bottom\\acidified_zone_water_b_bottom.str"); + reinterpret_cast(this->impactEmitters[2])->Load("acidified_zone_water\\acidified_zone_water_water\\acidified_zone_water_water.str"); break; case 0x8AE: - reinterpret_cast(this->unknown_00CC)->Load("acidified_zone_wind\\acidified_zone_wind_c\\acidified_zone_wind_c.str"); - reinterpret_cast(this->unknown_00D0[0])->Load("acidified_zone_wind\\acidified_zone_wind_b\\acidified_zone_wind_b.str"); - reinterpret_cast(this->unknown_00D0[1])->Load("acidified_zone_wind\\acidified_zone_wind_b_bottom\\acidified_zone_wind_b_bottom.str"); - reinterpret_cast(this->unknown_00D0[2])->Load("acidified_zone_wind\\acidified_zone_wind_water\\acidified_zone_wind_water.str"); + reinterpret_cast(this->projectileEmitter)->Load("acidified_zone_wind\\acidified_zone_wind_c\\acidified_zone_wind_c.str"); + reinterpret_cast(this->impactEmitters[0])->Load("acidified_zone_wind\\acidified_zone_wind_b\\acidified_zone_wind_b.str"); + reinterpret_cast(this->impactEmitters[1])->Load("acidified_zone_wind\\acidified_zone_wind_b_bottom\\acidified_zone_wind_b_bottom.str"); + reinterpret_cast(this->impactEmitters[2])->Load("acidified_zone_wind\\acidified_zone_wind_water\\acidified_zone_wind_water.str"); break; case 0x8B6: - reinterpret_cast(this->unknown_00CC)->Load("acidified_zone_ground\\acidified_zone_ground_c\\acidified_zone_ground_c.str"); - reinterpret_cast(this->unknown_00D0[0])->Load("acidified_zone_ground\\acidified_zone_ground_b\\acidified_zone_ground_b.str"); - reinterpret_cast(this->unknown_00D0[1])->Load("acidified_zone_ground\\acidified_zone_ground_b_bottom\\acidified_zone_ground_b_bottom.str"); - reinterpret_cast(this->unknown_00D0[2])->Load("acidified_zone_ground\\acidified_zone_ground_water\\acidified_zone_ground_water.str"); + reinterpret_cast(this->projectileEmitter)->Load("acidified_zone_ground\\acidified_zone_ground_c\\acidified_zone_ground_c.str"); + reinterpret_cast(this->impactEmitters[0])->Load("acidified_zone_ground\\acidified_zone_ground_b\\acidified_zone_ground_b.str"); + reinterpret_cast(this->impactEmitters[1])->Load("acidified_zone_ground\\acidified_zone_ground_b_bottom\\acidified_zone_ground_b_bottom.str"); + reinterpret_cast(this->impactEmitters[2])->Load("acidified_zone_ground\\acidified_zone_ground_water\\acidified_zone_ground_water.str"); break; default: break; } - this->unknown_00CC->looping = 1; - this->unknown_00E4.x = 0.0f; - this->unknown_00E4.y = 0.0f; - this->unknown_00E4.z = 0.0f; - this->unknown_00E0 = 1.0f; + this->projectileEmitter->looping = 1; + this->impactPosition.x = 0.0f; + this->impactPosition.y = 0.0f; + this->impactPosition.z = 0.0f; + this->trajectoryTime = 1.0f; this->active = true; } @@ -107,10 +107,10 @@ void CAcidifiedThrow::OnProcess() { CRenderObject* sourceActor = FindRenderObject(this->sourceActor); if (sourceActor) { - this->unknown_00E4 = sourceActor->render.position; + this->impactPosition = sourceActor->render.position; } - if (this->unknown_00CC) { + if (this->projectileEmitter) { const vector3d actorPos = actor->render.position; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const matrix& view = mode->camera->frame.view; @@ -119,7 +119,7 @@ void CAcidifiedThrow::OnProcess() { float actorViewY = actorPos.x * view.values[1] + actorPos.y * view.values[4] + actorPos.z * view.values[7] + view.values[10]; float actorViewZ = actorPos.x * view.values[2] + actorPos.y * view.values[5] + actorPos.z * view.values[8] + view.values[11]; - float targetViewX = this->unknown_00E4.x * view.values[0] + this->unknown_00E4.y * view.values[3] + this->unknown_00E4.z * view.values[6] + view.values[9]; + float targetViewX = this->impactPosition.x * view.values[0] + this->impactPosition.y * view.values[3] + this->impactPosition.z * view.values[6] + view.values[9]; matrix rotation; if (targetViewX >= actorViewX) { @@ -135,11 +135,11 @@ void CAcidifiedThrow::OnProcess() { float worldY = actorViewX * inverse.values[1] + actorViewY * inverse.values[4] + actorViewZ * inverse.values[7] + inverse.values[10]; float worldZ = actorViewX * inverse.values[2] + actorViewY * inverse.values[5] + actorViewZ * inverse.values[8] + inverse.values[11]; - this->unknown_00E0 -= 0.07f; + this->trajectoryTime -= 0.07f; - const float dx = this->unknown_00E4.x - worldX; - const float dy = this->unknown_00E4.y - worldY; - const float dz = this->unknown_00E4.z - worldZ; + const float dx = this->impactPosition.x - worldX; + const float dy = this->impactPosition.y - worldY; + const float dz = this->impactPosition.z - worldZ; const float distSq = dy * dy + dx * dx + dz * dz; const float length = SquareRoot(distSq); const float inverseDist = 1.0f / SquareRoot(distSq); @@ -153,33 +153,33 @@ void CAcidifiedThrow::OnProcess() { float rotY = offset.x * rotation.values[1] + offset.y * rotation.values[4] + offset.z * rotation.values[7] + rotation.values[10]; float rotZ = offset.x * rotation.values[2] + offset.y * rotation.values[5] + offset.z * rotation.values[8] + rotation.values[11]; - float p1X = this->unknown_00E4.x + rotX; - float p1Y = this->unknown_00E4.y + rotY; - float p1Z = this->unknown_00E4.z + rotZ; + float p1X = this->impactPosition.x + rotX; + float p1Y = this->impactPosition.y + rotY; + float p1Z = this->impactPosition.z + rotZ; - float t = this->unknown_00E0; + float t = this->trajectoryTime; float oneMinusT = 1.0f - t; float term0 = static_cast(std::pow(static_cast(oneMinusT), 2.0)); float term1 = (t + t) * oneMinusT; float term2 = static_cast(std::pow(static_cast(t), 2.0)); - EZ2STREmitter* emitter = this->unknown_00CC; - emitter->position.x = term0 * this->unknown_00E4.x + term1 * p1X + term2 * worldX; - emitter->position.y = term0 * this->unknown_00E4.y + term1 * p1Y + term2 * worldY; - emitter->position.z = term0 * this->unknown_00E4.z + term1 * p1Z + term2 * worldZ; + EZ2STREmitter* emitter = this->projectileEmitter; + emitter->position.x = term0 * this->impactPosition.x + term1 * p1X + term2 * worldX; + emitter->position.y = term0 * this->impactPosition.y + term1 * p1Y + term2 * worldY; + emitter->position.z = term0 * this->impactPosition.z + term1 * p1Z + term2 * worldZ; reinterpret_cast(emitter)->Process(0.0f, 0.0f, 0.0f); - if (this->unknown_00E0 > 0.0f) { + if (this->trajectoryTime > 0.0f) { return; } - FreeParticle(reinterpret_cast(this->unknown_00CC)); - this->unknown_00CC = nullptr; + FreeParticle(reinterpret_cast(this->projectileEmitter)); + this->projectileEmitter = nullptr; CRenderObject* player = reinterpret_cast(mode->scene->player); - float soundX = player->render.position.x - this->unknown_00E4.x; - float soundZ = player->render.position.z - this->unknown_00E4.z; + float soundX = player->render.position.x - this->impactPosition.x; + float soundZ = player->render.position.z - this->impactPosition.z; g_soundMgr->PlayWave("effect\\BO_ACIDIFIED_ZONE.wav", soundX, 0.0f, soundZ, 250, 40, 1.0f, 0); @@ -203,17 +203,17 @@ void CAcidifiedThrow::OnProcess() { __int64 activeCount = 0; for (__int64 i = 0; i < 3; ++i) { - EZ2STREmitter* emitter = this->unknown_00D0[i]; + EZ2STREmitter* emitter = this->impactEmitters[i]; if (emitter) { if (emitter->lifetime == 0.0f || static_cast(emitter->elapsed) < emitter->lifetime * 60.0f) { - emitter->position.x = this->unknown_00E4.x - 1.0f; - emitter->position.y = this->unknown_00E4.y - 14.0f; - emitter->position.z = this->unknown_00E4.z; + emitter->position.x = this->impactPosition.x - 1.0f; + emitter->position.y = this->impactPosition.y - 14.0f; + emitter->position.z = this->impactPosition.z; reinterpret_cast(emitter)->Process(0.0f, 0.0f, 0.0f); ++activeCount; } else { FreeParticle(reinterpret_cast(emitter)); - this->unknown_00D0[i] = nullptr; + this->impactEmitters[i] = nullptr; } } } @@ -226,14 +226,14 @@ void CAcidifiedThrow::OnProcess() { // OFFSET: 0x006F4790 // FUNCTION: fn_06827 void CAcidifiedThrow::Render() { - if (this->unknown_00CC) { - reinterpret_cast(this->unknown_00CC)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (this->projectileEmitter) { + reinterpret_cast(this->projectileEmitter)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); return; } for (__int64 i = 0; i < 3; ++i) { - if (this->unknown_00D0[i]) { - reinterpret_cast(this->unknown_00D0[i])->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (this->impactEmitters[i]) { + reinterpret_cast(this->impactEmitters[i])->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } } } diff --git a/Source/Contents/Effects/AcidifiedThrow.h b/Source/Contents/Effects/AcidifiedThrow.h index 6149cc4d0..517479a3b 100644 --- a/Source/Contents/Effects/AcidifiedThrow.h +++ b/Source/Contents/Effects/AcidifiedThrow.h @@ -18,18 +18,18 @@ public: void Close() override; bool IsAlive() override; - /* 00CC */ EZ2STREmitter* unknown_00CC; - /* 00D0 */ EZ2STREmitter* unknown_00D0[3]; + /* 00CC */ EZ2STREmitter* projectileEmitter; + /* 00D0 */ EZ2STREmitter* impactEmitters[3]; /* 00DC */ bool active; /* 00DD */ unsigned char unknown_00DD[3]; - /* 00E0 */ float unknown_00E0; - /* 00E4 */ vector3d unknown_00E4; + /* 00E0 */ float trajectoryTime; + /* 00E4 */ vector3d impactPosition; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CAcidifiedThrow) == 0xF0); static_assert(offsetof(CAcidifiedThrow, active) == 0xDC); -static_assert(offsetof(CAcidifiedThrow, unknown_00E4) == 0xE4); +static_assert(offsetof(CAcidifiedThrow, impactPosition) == 0xE4); #endif #endif diff --git a/Source/Contents/Effects/AnimatedEmitterEffect.cpp b/Source/Contents/Effects/AnimatedEmitterEffect.cpp index fd07df655..988d96d3e 100644 --- a/Source/Contents/Effects/AnimatedEmitterEffect.cpp +++ b/Source/Contents/Effects/AnimatedEmitterEffect.cpp @@ -39,13 +39,13 @@ void CAnimatedEmitterEffect::Open() { // OFFSET: 0x006FA7C0 // FUNCTION: fn_06891 void CAnimatedEmitterEffect::InitParticle(CParticle* particle) { - particle->unknown_0054 = static_cast(rand() % 2); + particle->animationParameter = static_cast(rand() % 2); CEmitterEffect::InitParticle(particle); } // OFFSET: 0x006FA800 // FUNCTION: fn_06892 void CAnimatedEmitterEffect::UpdateParticle(CParticle* particle) { - particle->SetTexture(this->frames[static_cast(particle->unknown_0054)][particle->unknown_00E8 / 8 % 5]); + particle->SetTexture(this->frames[static_cast(particle->animationParameter)][particle->elapsedFrames / 8 % 5]); CEmitterEffect::UpdateParticle(particle); } diff --git a/Source/Contents/Effects/ArrowEffect.cpp b/Source/Contents/Effects/ArrowEffect.cpp index 139de6e41..dc7fbe0e8 100644 --- a/Source/Contents/Effects/ArrowEffect.cpp +++ b/Source/Contents/Effects/ArrowEffect.cpp @@ -40,7 +40,7 @@ void CArrowEffect::Reset() { // OFFSET: 0x00E4BE60 // FUNCTION: fn_24280 bool CArrowEffect::OnProcess() { - float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); if (this->startFrame > frame) { return true; } @@ -94,7 +94,7 @@ bool CArrowEffect::OnProcess() { } } - this->render.unknown_007C = this->GetDir(this->render.angle); + this->render.spriteAngle = this->GetDir(this->render.angle); g_modeMgr.GetGameMode(); this->render.position.x = frame * this->velocity.x + this->startPos.x; this->render.position.y = frame * this->velocity.y + this->startPos.y; @@ -266,7 +266,7 @@ void CArrowEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c return; } - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); if ((static_cast(g) << 32 | static_cast(f)) != 0) { this->startFrame = *reinterpret_cast(f); } diff --git a/Source/Contents/Effects/AstralStrikeEffect.cpp b/Source/Contents/Effects/AstralStrikeEffect.cpp index 78fbcfb31..11a97ef0b 100644 --- a/Source/Contents/Effects/AstralStrikeEffect.cpp +++ b/Source/Contents/Effects/AstralStrikeEffect.cpp @@ -24,7 +24,7 @@ __forceinline bool IsParticleActive(const CEZ2STRParticle* particle) { if (0.0f == particle->life) { return true; } - return particle->life * 60.0f > static_cast(particle->unknown_00E8); + return particle->life * 60.0f > static_cast(particle->elapsedFrames); } } @@ -51,7 +51,7 @@ void CAstralStrikeEffect::Init() { // FUNCTION: fn_06831 void CAstralStrikeEffect::SpawnStrike() { const __int64 ranges[10] = {5, 5, 5, 7, 7, 7, 9, 9, 9, 11}; - const __int64 range = ranges[std::min(this->unknown_00B0, 10) - 1] * 50; + const __int64 range = ranges[std::min(this->effectLevel, 10) - 1] * 50; vector3d position = *reinterpret_cast(this->position); const int span = static_cast(range) + 1; @@ -137,7 +137,7 @@ void CAstralStrikeEffect::OnProcess() { if (this->ActorExists() == true && this->emitters.empty()) { const __int64 intervals[10] = {11, 11, 11, 9, 9, 9, 7, 7, 7, 5}; - if (0 == this->frame % intervals[std::min(this->unknown_00B0, 10) - 1]) { + if (0 == this->frame % intervals[std::min(this->effectLevel, 10) - 1]) { this->SpawnStrike(); } } diff --git a/Source/Contents/Effects/AxeBoomerang.cpp b/Source/Contents/Effects/AxeBoomerang.cpp index 978313e6f..2f0df4e61 100644 --- a/Source/Contents/Effects/AxeBoomerang.cpp +++ b/Source/Contents/Effects/AxeBoomerang.cpp @@ -17,26 +17,26 @@ // OFFSET: 0x006F5820 // FUNCTION: fn_06837 CAxeBoomerang::CAxeBoomerang() : CEffect(-1) { - this->unknown_00DC.x = 0.0f; - this->unknown_00DC.y = 0.0f; - this->unknown_00DC.z = 0.0f; - this->unknown_00E8.x = 0.0f; - this->unknown_0050 = 0; - this->unknown_00E8.x = 0.0f; - this->unknown_00E8.y = 0.0f; - this->unknown_00E8.z = 0.0f; + this->particlePosition.x = 0.0f; + this->particlePosition.y = 0.0f; + this->particlePosition.z = 0.0f; + this->launchPosition.x = 0.0f; + this->rotationParameter = 0; + this->launchPosition.x = 0.0f; + this->launchPosition.y = 0.0f; + this->launchPosition.z = 0.0f; } // OFFSET: 0x006F5A60 // FUNCTION: fn_06839 void CAxeBoomerang::Close() { - FreeParticle(reinterpret_cast(this->unknown_00CC)); + FreeParticle(reinterpret_cast(this->emitter)); } // OFFSET: 0x006F5A70 // FUNCTION: fn_06840 void CAxeBoomerang::Open() { - CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(&this->unknown_00DC, 5)); + CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(&this->particlePosition, 5)); if (this->id == 0x887) { particle->Load(std::string("shield_shooting\\shield_shooting\\shield_shooting.str")); } else if (g_serviceOptions.Get(229) == 0) { @@ -46,43 +46,43 @@ void CAxeBoomerang::Open() { } particle->m_loop = true; - this->unknown_00CC = reinterpret_cast(particle); - this->unknown_00D0 = 1; - this->unknown_00D1 = 0; - this->unknown_00D4 = 0; - this->unknown_00D8 = 1.0f; + this->emitter = reinterpret_cast(particle); + this->alive = 1; + this->returning = 0; + this->processCount = 0; + this->trajectoryTime = 1.0f; } // OFFSET: 0x006F5CD0 // FUNCTION: fn_06841 bool CAxeBoomerang::IsAlive() { - return this->unknown_00D0 != 0; + return this->alive != 0; } // OFFSET: 0x006F5CE0 // FUNCTION: fn_06842 void CAxeBoomerang::OnProcess() { - if (this->unknown_00CC) { + if (this->emitter) { CRenderObject* actor = FindRenderObject(this->actor); if (!actor) { - this->unknown_00D0 = 0; + this->alive = 0; } else { CRenderObject* sourceActor = FindRenderObject(this->sourceActor); if (sourceActor) { - this->unknown_00E8 = sourceActor->render.position; + this->launchPosition = sourceActor->render.position; } float scale; float angle; - if (this->unknown_00D1 == 0) { - this->unknown_00D8 -= 0.05f; - if (this->unknown_00D8 <= 0.0f) { - this->unknown_00D1 = 1; + if (this->returning == 0) { + this->trajectoryTime -= 0.05f; + if (this->trajectoryTime <= 0.0f) { + this->returning = 1; } scale = 20.0f; angle = 1.745329f; } else { - this->unknown_00D8 += 0.02f; + this->trajectoryTime += 0.02f; scale = 40.0f; angle = 4.537855f; } @@ -90,9 +90,9 @@ void CAxeBoomerang::OnProcess() { matrix rotation; rotation.MakeYRotation(angle); - const float dy = this->unknown_00E8.y - actor->render.position.y; - const float dx = this->unknown_00E8.x - actor->render.position.x; - const float dz = this->unknown_00E8.z - actor->render.position.z; + const float dy = this->launchPosition.y - actor->render.position.y; + const float dx = this->launchPosition.x - actor->render.position.x; + const float dz = this->launchPosition.z - actor->render.position.z; const float length = SquareRoot(dy * dy + dx * dx + dz * dz); const float invDist = 1.0f / length; @@ -100,7 +100,7 @@ void CAxeBoomerang::OnProcess() { const float offsetY = invDist * dy * scale; const float offsetZ = invDist * dz * scale; - const float t = this->unknown_00D8; + const float t = this->trajectoryTime; const float oneMinusT = 1.0f - t; const float term0 = static_cast(std::pow(static_cast(oneMinusT), 2.0)); const float term1 = (t + t) * oneMinusT; @@ -108,26 +108,26 @@ void CAxeBoomerang::OnProcess() { const bool finished = 1.0f <= t; - this->unknown_00DC.x = (offsetY * rotation.values[3] + offsetX * rotation.values[0] + offsetZ * rotation.values[6] + rotation.values[9] + this->unknown_00E8.x) * term1 + term2 * actor->render.position.x + term0 * this->unknown_00E8.x; - this->unknown_00DC.y = (offsetY * rotation.values[4] + offsetX * rotation.values[1] + offsetZ * rotation.values[7] + rotation.values[10] + this->unknown_00E8.y) * term1 + term2 * actor->render.position.y + term0 * this->unknown_00E8.y; - this->unknown_00DC.z = (offsetY * rotation.values[5] + offsetX * rotation.values[2] + offsetZ * rotation.values[8] + rotation.values[11] + this->unknown_00E8.z) * term1 + term2 * actor->render.position.z + term0 * this->unknown_00E8.z; + this->particlePosition.x = (offsetY * rotation.values[3] + offsetX * rotation.values[0] + offsetZ * rotation.values[6] + rotation.values[9] + this->launchPosition.x) * term1 + term2 * actor->render.position.x + term0 * this->launchPosition.x; + this->particlePosition.y = (offsetY * rotation.values[4] + offsetX * rotation.values[1] + offsetZ * rotation.values[7] + rotation.values[10] + this->launchPosition.y) * term1 + term2 * actor->render.position.y + term0 * this->launchPosition.y; + this->particlePosition.z = (offsetY * rotation.values[5] + offsetX * rotation.values[2] + offsetZ * rotation.values[8] + rotation.values[11] + this->launchPosition.z) * term1 + term2 * actor->render.position.z + term0 * this->launchPosition.z; if (finished) { - this->unknown_00D0 = 0; + this->alive = 0; } - this->unknown_00CC->position = this->unknown_00DC; - reinterpret_cast(this->unknown_00CC)->Process(0.0f, 0.0f, 0.0f); + this->emitter->position = this->particlePosition; + reinterpret_cast(this->emitter)->Process(0.0f, 0.0f, 0.0f); } } - ++this->unknown_00D4; + ++this->processCount; } // OFFSET: 0x006F63F0 // FUNCTION: fn_06843 void CAxeBoomerang::Render() { - CEZ2STRParticle* particle = reinterpret_cast(this->unknown_00CC); + CEZ2STRParticle* particle = reinterpret_cast(this->emitter); if (particle) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); particle->DrawScreen(mode->camera->frame.view); diff --git a/Source/Contents/Effects/AxeBoomerang.h b/Source/Contents/Effects/AxeBoomerang.h index 1710c9fe3..8b5ddeea8 100644 --- a/Source/Contents/Effects/AxeBoomerang.h +++ b/Source/Contents/Effects/AxeBoomerang.h @@ -18,20 +18,20 @@ public: void Close() override; bool IsAlive() override; - /* 00CC */ EZ2STREmitter* unknown_00CC; - /* 00D0 */ unsigned char unknown_00D0; - /* 00D1 */ unsigned char unknown_00D1; + /* 00CC */ EZ2STREmitter* emitter; + /* 00D0 */ unsigned char alive; + /* 00D1 */ unsigned char returning; /* 00D2 */ unsigned char unknown_00D2[2]; - /* 00D4 */ int unknown_00D4; - /* 00D8 */ float unknown_00D8; - /* 00DC */ vector3d unknown_00DC; - /* 00E8 */ vector3d unknown_00E8; + /* 00D4 */ int processCount; + /* 00D8 */ float trajectoryTime; + /* 00DC */ vector3d particlePosition; + /* 00E8 */ vector3d launchPosition; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CAxeBoomerang) == 0xF4); -static_assert(offsetof(CAxeBoomerang, unknown_00D0) == 0xD0); -static_assert(offsetof(CAxeBoomerang, unknown_00E8) == 0xE8); +static_assert(offsetof(CAxeBoomerang, alive) == 0xD0); +static_assert(offsetof(CAxeBoomerang, launchPosition) == 0xE8); #endif #endif diff --git a/Source/Contents/Effects/Bash.cpp b/Source/Contents/Effects/Bash.cpp index eae5dc661..f7b4af295 100644 --- a/Source/Contents/Effects/Bash.cpp +++ b/Source/Contents/Effects/Bash.cpp @@ -48,18 +48,18 @@ void CBash::Open() { this->screenX = screen.x; this->screenY = screen.y - 40.0f; - const int fadeFrame = this->unknown_002C - 10; + const int fadeFrame = this->effectLifetime - 10; int index = 0; for (int angle = 0; angle < 360; angle += 36) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 1); - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); particle->scale = 100.0f; - particle->unknown_00C0 = 28.333334f; - float* values = &particle->unknown_0054; + particle->speedParameter = 28.333334f; + float* values = &particle->animationParameter; values[0] = 28.333334f; values[1] = static_cast(fadeFrame); values[2] = 170.0f; @@ -74,11 +74,11 @@ void CBash::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 1); const int angle = rand() % 360; const float speed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; - const float acceleration = -(speed / static_cast(this->unknown_002C)) / 1.5f; + const float acceleration = -(speed / static_cast(this->effectLifetime)) / 1.5f; const int width = rand() % 25; const int radius = rand() % 40; const int growth = rand() % 30; - float* values = &particle->unknown_0054; + float* values = &particle->animationParameter; values[0] = static_cast(std::max(angle, 0)); values[1] = speed; values[2] = acceleration; @@ -87,7 +87,7 @@ void CBash::Open() { values[5] = static_cast(std::max(growth, 0) + 20) / 10.0f; values[6] = 200.0f; values[7] = 20.0f; - values[8] = static_cast(this->unknown_002C - this->unknown_002C / 3); + values[8] = static_cast(this->effectLifetime - this->effectLifetime / 3); particle->alpha = 0; particle->SetTexture("EFFECT\\alpha_center.tga"); this->sparks.push_back(particle); @@ -105,12 +105,12 @@ bool CBash::IsAlive() { void CBash::OnProcess() { for (auto it = this->rays.begin(); it != this->rays.end(); ++it) { CParticle* particle = *it; - float* values = &particle->unknown_0054; + float* values = &particle->animationParameter; const int fadeFrame = static_cast(values[1]); const int limit = static_cast(values[2]); float step = values[0]; if (this->frame == fadeFrame) { - step = static_cast(-(particle->alpha / (this->unknown_002C - this->frame))); + step = static_cast(-(particle->alpha / (this->effectLifetime - this->frame))); } values[0] = step; @@ -119,13 +119,13 @@ void CBash::OnProcess() { alpha = 0; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->alpha = std::min(alpha, limit); } for (auto it = this->sparks.begin(); it != this->sparks.end(); ++it) { CParticle* particle = *it; - float* values = &particle->unknown_0054; + float* values = &particle->animationParameter; const int fadeFrame = static_cast(values[8]); const int limit = static_cast(values[6]); const float speed = values[2] + values[1]; @@ -133,7 +133,7 @@ void CBash::OnProcess() { float step = values[7]; const float angle = speed + values[0]; if (this->frame == fadeFrame) { - step = static_cast(-(particle->alpha / (this->unknown_002C - this->frame))); + step = static_cast(-(particle->alpha / (this->effectLifetime - this->frame))); } values[0] = angle; @@ -145,7 +145,7 @@ void CBash::OnProcess() { alpha = 0; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->alpha = std::min(alpha, limit); } } @@ -155,13 +155,13 @@ void CBash::OnProcess() { void CBash::Render() { for (auto it = this->rays.begin(); it != this->rays.end(); ++it) { CParticle* particle = *it; - const int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4)); + const int angle = static_cast(*reinterpret_cast(&particle->angleBits)); const float scale = particle->scale; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; const float nextCosine = g_cosTable[angle + 36]; const float nextSine = g_sinTable[angle + 36]; - const float left = static_cast(particle->unknown_000C % 4) * 0.25f; + const float left = static_cast(particle->columnIndex % 4) * 0.25f; const std::uint32_t color = ((particle->alpha << 8 | particle->red) << 8 | particle->green) << 8 | particle->blue; const float inner = 0.0f; @@ -196,14 +196,14 @@ void CBash::Render() { vertices[3].u = left; vertices[3].v = 1.0f; primitive.texture = particle->texture; - primitive.unknown_0018 = particle->sourceBlend; - primitive.unknown_001C = particle->destinationBlend; + primitive.sourceBlend = particle->sourceBlend; + primitive.destinationBlend = particle->destinationBlend; g_renderer->queues.Submit(&primitive, static_cast(particle->flags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } for (auto it = this->sparks.begin(); it != this->sparks.end(); ++it) { CParticle* particle = *it; - const float* values = &particle->unknown_0054; + const float* values = &particle->animationParameter; const float angle = values[0]; const float width = values[3]; const float radius = values[4]; @@ -246,8 +246,8 @@ void CBash::Render() { vertices[3].u = 0.5f; vertices[3].v = 0.0f; primitive.texture = particle->texture; - primitive.unknown_0018 = particle->sourceBlend; - primitive.unknown_001C = particle->destinationBlend; + primitive.sourceBlend = particle->sourceBlend; + primitive.destinationBlend = particle->destinationBlend; g_renderer->queues.Submit(&primitive, static_cast(particle->flags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } } diff --git a/Source/Contents/Effects/BindTrapEffect.cpp b/Source/Contents/Effects/BindTrapEffect.cpp index 2ddafcd7f..154b21aa0 100644 --- a/Source/Contents/Effects/BindTrapEffect.cpp +++ b/Source/Contents/Effects/BindTrapEffect.cpp @@ -13,7 +13,7 @@ // OFFSET: 0x006FB2F0 // FUNCTION: fn_06903 CBindTrapEffect::CBindTrapEffect() : CEffect(-1), particles() { - this->unknown_002C = 8000; + this->effectLifetime = 8000; } // OFFSET: 0x006FB4E0 @@ -25,13 +25,13 @@ void CBindTrapEffect::AddParticle(int index) { } particle->SetTexture("effect\\hero_011.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 255; - particle->unknown_00C4 = 0; - particle->unknown_004C = 0; + particle->angleBits = 0; + particle->phaseParameter = 0; particle->scale = static_cast(index) * 6.0f + 9.0f; InitParticleQuad(particle->vertices); this->particles.push_back(particle); @@ -92,7 +92,7 @@ void CBindTrapEffect::OnProcess() { particle->transform = composed; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/BlastForge.cpp b/Source/Contents/Effects/BlastForge.cpp index 19a5b04b0..984661e84 100644 --- a/Source/Contents/Effects/BlastForge.cpp +++ b/Source/Contents/Effects/BlastForge.cpp @@ -11,44 +11,44 @@ // OFFSET: 0x006F7360 // FUNCTION: fn_06858 -CBlastForge::CBlastForge() : CEffect(-1), unknown_00DC(0), startTime(timeGetTime()) { - this->unknown_00CC = nullptr; - this->unknown_00D0 = nullptr; - this->unknown_00D4 = nullptr; - this->unknown_00D8 = nullptr; +CBlastForge::CBlastForge() : CEffect(-1), openToggle(0), startTime(timeGetTime()) { + this->loopParticle = nullptr; + this->loopBottomParticle = nullptr; + this->blastParticle = nullptr; + this->blastBottomParticle = nullptr; } // OFFSET: 0x006F7660 // FUNCTION: fn_06860 void CBlastForge::RestartBlastParticles() { - if (this->unknown_00D4) { - FreeParticle(this->unknown_00D4); - this->unknown_00D4 = nullptr; + if (this->blastParticle) { + FreeParticle(this->blastParticle); + this->blastParticle = nullptr; } - if (this->unknown_00D8) { - FreeParticle(this->unknown_00D8); - this->unknown_00D8 = nullptr; + if (this->blastBottomParticle) { + FreeParticle(this->blastBottomParticle); + this->blastBottomParticle = nullptr; } - this->unknown_00D4 = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); - this->unknown_00D8 = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); + this->blastParticle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); + this->blastBottomParticle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); - if (this->unknown_00D4 && this->unknown_00D8) { - this->unknown_00D4->Open("blast_forge\\blast_forge\\blast_forge.str"); - this->unknown_00D8->Open("blast_forge\\blast_forge\\blast_forge_bottom.str"); + if (this->blastParticle && this->blastBottomParticle) { + this->blastParticle->Open("blast_forge\\blast_forge\\blast_forge.str"); + this->blastBottomParticle->Open("blast_forge\\blast_forge\\blast_forge_bottom.str"); } } // OFFSET: 0x006F7820 // FUNCTION: fn_06861 void CBlastForge::Close() { - FreeParticle(this->unknown_00CC); - FreeParticle(this->unknown_00D0); - if (this->unknown_00D4) { - FreeParticle(this->unknown_00D4); + FreeParticle(this->loopParticle); + FreeParticle(this->loopBottomParticle); + if (this->blastParticle) { + FreeParticle(this->blastParticle); } - if (this->unknown_00D8) { - FreeParticle(this->unknown_00D8); + if (this->blastBottomParticle) { + FreeParticle(this->blastBottomParticle); } } @@ -56,15 +56,15 @@ void CBlastForge::Close() { // FUNCTION: fn_06862 void CBlastForge::Open() { this->retained = 1; - this->unknown_00DC = (this->unknown_00DC == 0); - this->unknown_00CC = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); - this->unknown_00D0 = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); + this->openToggle = (this->openToggle == 0); + this->loopParticle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); + this->loopBottomParticle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); - if (this->unknown_00CC && this->unknown_00D0) { - this->unknown_00CC->Open("blast_forge\\blast_forge\\blast_forge_5s.str"); - this->unknown_00D0->Open("blast_forge\\blast_forge\\blast_forge_5s_bottom.str"); - this->unknown_00CC->m_loop = true; - this->unknown_00D0->m_loop = true; + if (this->loopParticle && this->loopBottomParticle) { + this->loopParticle->Open("blast_forge\\blast_forge\\blast_forge_5s.str"); + this->loopBottomParticle->Open("blast_forge\\blast_forge\\blast_forge_5s_bottom.str"); + this->loopParticle->m_loop = true; + this->loopBottomParticle->m_loop = true; } this->RestartBlastParticles(); @@ -79,50 +79,50 @@ bool CBlastForge::IsAlive() { // OFFSET: 0x006F7A30 // FUNCTION: fn_06864 void CBlastForge::OnProcess() { - if (this->unknown_00CC) { - this->unknown_00CC->position.x = this->position[0]; - this->unknown_00CC->position.y = this->position[1]; - this->unknown_00CC->position.z = this->position[2]; + if (this->loopParticle) { + this->loopParticle->position.x = this->position[0]; + this->loopParticle->position.y = this->position[1]; + this->loopParticle->position.z = this->position[2]; const matrix& view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - float px = this->unknown_00CC->position.x; - float py = this->unknown_00CC->position.y; - float pz = this->unknown_00CC->position.z; + float px = this->loopParticle->position.x; + float py = this->loopParticle->position.y; + float pz = this->loopParticle->position.z; float vx = py * view.values[3] + px * view.values[0] + pz * view.values[6] + view.values[9]; float vy = (py * view.values[4] + px * view.values[1] + pz * view.values[7] + view.values[10]) - 8.0f; float vz = py * view.values[5] + px * view.values[2] + pz * view.values[8] + view.values[11]; - this->unknown_00CC->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; - this->unknown_00CC->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; - this->unknown_00CC->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; + this->loopParticle->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; + this->loopParticle->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; + this->loopParticle->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; - this->unknown_00CC->Process(0.0f, 0.0f, 0.0f); + this->loopParticle->Process(0.0f, 0.0f, 0.0f); } - if (this->unknown_00D0) { - this->unknown_00D0->position.x = this->position[0]; - this->unknown_00D0->position.y = this->position[1]; - this->unknown_00D0->position.z = this->position[2]; + if (this->loopBottomParticle) { + this->loopBottomParticle->position.x = this->position[0]; + this->loopBottomParticle->position.y = this->position[1]; + this->loopBottomParticle->position.z = this->position[2]; const matrix& view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - float px = this->unknown_00D0->position.x; - float py = this->unknown_00D0->position.y; - float pz = this->unknown_00D0->position.z; + float px = this->loopBottomParticle->position.x; + float py = this->loopBottomParticle->position.y; + float pz = this->loopBottomParticle->position.z; float vx = py * view.values[3] + px * view.values[0] + pz * view.values[6] + view.values[9]; float vy = (py * view.values[4] + px * view.values[1] + pz * view.values[7] + view.values[10]) - 8.0f; float vz = py * view.values[5] + px * view.values[2] + pz * view.values[8] + view.values[11]; - this->unknown_00D0->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; - this->unknown_00D0->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; - this->unknown_00D0->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; + this->loopBottomParticle->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; + this->loopBottomParticle->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; + this->loopBottomParticle->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; - this->unknown_00D0->Process(0.0f, 0.0f, 0.0f); + this->loopBottomParticle->Process(0.0f, 0.0f, 0.0f); } this->ProcessBlastParticles(); @@ -131,76 +131,76 @@ void CBlastForge::OnProcess() { // OFFSET: 0x006F7EA0 // FUNCTION: fn_06865 void CBlastForge::Render() { - if (!this->unknown_00D4) { - if (this->unknown_00CC) { - this->unknown_00CC->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (!this->blastParticle) { + if (this->loopParticle) { + this->loopParticle->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } - if (this->unknown_00D0) { - this->unknown_00D0->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (this->loopBottomParticle) { + this->loopBottomParticle->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } } - if (this->unknown_00D4) { - this->unknown_00D4->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (this->blastParticle) { + this->blastParticle->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } - if (this->unknown_00D8) { - this->unknown_00D8->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); + if (this->blastBottomParticle) { + this->blastBottomParticle->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } } // OFFSET: 0x006F7F80 // FUNCTION: fn_06866 void CBlastForge::ProcessBlastParticles() { - if (this->unknown_00D4 && this->unknown_00D8) { - if (this->unknown_00D4->life == 0.0f || static_cast(this->unknown_00D4->unknown_00E8) < this->unknown_00D4->life * 60.0f) { - this->unknown_00D4->position.x = this->position[0]; - this->unknown_00D4->position.y = this->position[1]; - this->unknown_00D4->position.z = this->position[2]; + if (this->blastParticle && this->blastBottomParticle) { + if (this->blastParticle->life == 0.0f || static_cast(this->blastParticle->elapsedFrames) < this->blastParticle->life * 60.0f) { + this->blastParticle->position.x = this->position[0]; + this->blastParticle->position.y = this->position[1]; + this->blastParticle->position.z = this->position[2]; const matrix& view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - float px = this->unknown_00D4->position.x; - float py = this->unknown_00D4->position.y; - float pz = this->unknown_00D4->position.z; + float px = this->blastParticle->position.x; + float py = this->blastParticle->position.y; + float pz = this->blastParticle->position.z; float vx = py * view.values[3] + px * view.values[0] + pz * view.values[6] + view.values[9]; float vy = (py * view.values[4] + px * view.values[1] + pz * view.values[7] + view.values[10]) - 8.0f; float vz = py * view.values[5] + px * view.values[2] + pz * view.values[8] + view.values[11]; - this->unknown_00D4->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; - this->unknown_00D4->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; - this->unknown_00D4->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; + this->blastParticle->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; + this->blastParticle->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; + this->blastParticle->position.z = vy * inverse.values[5] + vx * inverse.values[2] + vz * inverse.values[8] + inverse.values[11]; - this->unknown_00D4->Process(0.0f, 0.0f, 0.0f); + this->blastParticle->Process(0.0f, 0.0f, 0.0f); - if (this->unknown_00D8) { - this->unknown_00D8->position.x = this->position[0]; - this->unknown_00D8->position.y = this->position[1]; - this->unknown_00D8->position.z = this->position[2]; + if (this->blastBottomParticle) { + this->blastBottomParticle->position.x = this->position[0]; + this->blastBottomParticle->position.y = this->position[1]; + this->blastBottomParticle->position.z = this->position[2]; const matrix& view2 = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse2 = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - float px2 = this->unknown_00D8->position.x; - float py2 = this->unknown_00D8->position.y; - float pz2 = this->unknown_00D8->position.z; + float px2 = this->blastBottomParticle->position.x; + float py2 = this->blastBottomParticle->position.y; + float pz2 = this->blastBottomParticle->position.z; float vx2 = py2 * view2.values[3] + px2 * view2.values[0] + pz2 * view2.values[6] + view2.values[9]; float vy2 = (py2 * view2.values[4] + px2 * view2.values[1] + pz2 * view2.values[7] + view2.values[10]) - 8.0f; float vz2 = py2 * view2.values[5] + px2 * view2.values[2] + pz2 * view2.values[8] + view2.values[11]; - this->unknown_00D8->position.x = vy2 * inverse2.values[3] + vx2 * inverse2.values[0] + vz2 * inverse2.values[6] + inverse2.values[9]; - this->unknown_00D8->position.y = vy2 * inverse2.values[4] + vx2 * inverse2.values[1] + vz2 * inverse2.values[7] + inverse2.values[10]; - this->unknown_00D8->position.z = vy2 * inverse2.values[5] + vx2 * inverse2.values[2] + vz2 * inverse2.values[8] + inverse2.values[11]; + this->blastBottomParticle->position.x = vy2 * inverse2.values[3] + vx2 * inverse2.values[0] + vz2 * inverse2.values[6] + inverse2.values[9]; + this->blastBottomParticle->position.y = vy2 * inverse2.values[4] + vx2 * inverse2.values[1] + vz2 * inverse2.values[7] + inverse2.values[10]; + this->blastBottomParticle->position.z = vy2 * inverse2.values[5] + vx2 * inverse2.values[2] + vz2 * inverse2.values[8] + inverse2.values[11]; - this->unknown_00D8->Process(0.0f, 0.0f, 0.0f); + this->blastBottomParticle->Process(0.0f, 0.0f, 0.0f); } } else { - FreeParticle(this->unknown_00D4); - FreeParticle(this->unknown_00D8); - this->unknown_00D4 = nullptr; - this->unknown_00D8 = nullptr; + FreeParticle(this->blastParticle); + FreeParticle(this->blastBottomParticle); + this->blastParticle = nullptr; + this->blastBottomParticle = nullptr; } } diff --git a/Source/Contents/Effects/BlastForge.h b/Source/Contents/Effects/BlastForge.h index 7c4b95057..060597130 100644 --- a/Source/Contents/Effects/BlastForge.h +++ b/Source/Contents/Effects/BlastForge.h @@ -20,18 +20,18 @@ public: void RestartBlastParticles(); void ProcessBlastParticles(); - /* 00CC */ CEZ2STRParticle* unknown_00CC; - /* 00D0 */ CEZ2STRParticle* unknown_00D0; - /* 00D4 */ CEZ2STRParticle* unknown_00D4; - /* 00D8 */ CEZ2STRParticle* unknown_00D8; - /* 00DC */ unsigned char unknown_00DC; + /* 00CC */ CEZ2STRParticle* loopParticle; + /* 00D0 */ CEZ2STRParticle* loopBottomParticle; + /* 00D4 */ CEZ2STRParticle* blastParticle; + /* 00D8 */ CEZ2STRParticle* blastBottomParticle; + /* 00DC */ unsigned char openToggle; /* 00DD */ unsigned char unknown_00DD[3]; /* 00E0 */ std::int64_t startTime; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CBlastForge) == 0xE8); -static_assert(offsetof(CBlastForge, unknown_00DC) == 0xDC); +static_assert(offsetof(CBlastForge, openToggle) == 0xDC); static_assert(offsetof(CBlastForge, startTime) == 0xE0); #endif diff --git a/Source/Contents/Effects/CaneOfEvilEyeEffect.cpp b/Source/Contents/Effects/CaneOfEvilEyeEffect.cpp index 7fe12a62f..645a6e15f 100644 --- a/Source/Contents/Effects/CaneOfEvilEyeEffect.cpp +++ b/Source/Contents/Effects/CaneOfEvilEyeEffect.cpp @@ -19,7 +19,7 @@ __forceinline bool IsParticleActive(const CEZ2STRParticle* particle) { if (0.0f == particle->life) { return true; } - return particle->life * 60.0f > static_cast(particle->unknown_00E8); + return particle->life * 60.0f > static_cast(particle->elapsedFrames); } } @@ -52,10 +52,10 @@ CEZ2STRParticle* CCaneOfEvilEyeEffect::CreateEye(int type, const float* position break; } - eye->unknown_00D0 = position[0]; - eye->unknown_00D4 = position[1]; - eye->unknown_00D8 = position[2]; - eye->unknown_00A8 = static_cast(type); + eye->offsetX = position[0]; + eye->offsetY = position[1]; + eye->offsetZ = position[2]; + eye->animationState = static_cast(type); return eye; } @@ -79,24 +79,24 @@ CEZ2STRParticle* CCaneOfEvilEyeEffect::CreateLight(int type, const float* positi break; } - light->unknown_00DC = position[0]; - light->unknown_00E0 = position[1]; - light->unknown_00E4 = position[2]; - light->unknown_00A8 = static_cast(type); + light->originX = position[0]; + light->originY = position[1]; + light->originZ = position[2]; + light->animationState = static_cast(type); return light; } // OFFSET: 0x006F8D40 // FUNCTION: fn_06874 void CCaneOfEvilEyeEffect::SpawnLights() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { CEZ2STRParticle* eye = *it; if (eye) { float position[3]; - position[0] = eye->unknown_00D0 + 0.0f; - position[1] = eye->unknown_00D4 + 3.5f; - position[2] = eye->unknown_00D8 + 0.0f; - this->unknown_00DC.push_back(this->CreateLight(1, position)); + position[0] = eye->offsetX + 0.0f; + position[1] = eye->offsetY + 3.5f; + position[2] = eye->offsetZ + 0.0f; + this->lights.push_back(this->CreateLight(1, position)); } } } @@ -104,35 +104,35 @@ void CCaneOfEvilEyeEffect::SpawnLights() { // OFFSET: 0x006F8DF0 // FUNCTION: fn_06875 void CCaneOfEvilEyeEffect::Close() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { if (*it) { FreeParticle(*it); } } - this->unknown_00D0.clear(); + this->eyes.clear(); - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->lights.begin(); it != this->lights.end(); ++it) { if (*it) { FreeParticle(*it); } } - this->unknown_00DC.clear(); + this->lights.clear(); } // OFFSET: 0x006F8E70 // FUNCTION: fn_06876 void CCaneOfEvilEyeEffect::RemoveNullEmitters() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end();) { + for (auto it = this->eyes.begin(); it != this->eyes.end();) { if (*it == nullptr) { - it = this->unknown_00D0.erase(it); + it = this->eyes.erase(it); } else { ++it; } } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end();) { + for (auto it = this->lights.begin(); it != this->lights.end();) { if (*it == nullptr) { - it = this->unknown_00DC.erase(it); + it = this->lights.erase(it); } else { ++it; } @@ -142,18 +142,18 @@ void CCaneOfEvilEyeEffect::RemoveNullEmitters() { // OFFSET: 0x006F8F00 // FUNCTION: fn_06877 void CCaneOfEvilEyeEffect::Finish() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { CEZ2STRParticle* eye = *it; if (eye) { - *it = this->CreateEye(3, &eye->unknown_00D0); + *it = this->CreateEye(3, &eye->offsetX); FreeParticle(eye); } } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->lights.begin(); it != this->lights.end(); ++it) { CEZ2STRParticle* light = *it; - if (light && light->unknown_00A8 != 3) { - *it = this->CreateLight(3, &light->unknown_00DC); + if (light && light->animationState != 3) { + *it = this->CreateLight(3, &light->originX); FreeParticle(light); } } @@ -176,7 +176,7 @@ void CCaneOfEvilEyeEffect::Open() { offsets[7] = {20.0f, -12.0f, 20.0f}; for (unsigned int index = 0; index < 8; ++index) { - this->unknown_00D0.push_back(this->CreateEye(1, &offsets[index].x)); + this->eyes.push_back(this->CreateEye(1, &offsets[index].x)); } this->SpawnLights(); @@ -185,7 +185,7 @@ void CCaneOfEvilEyeEffect::Open() { // OFFSET: 0x006F9340 // FUNCTION: fn_06879 bool CCaneOfEvilEyeEffect::IsAlive() { - if (this->ActorExists() && (!this->unknown_00D0.empty() || !this->unknown_00DC.empty())) { + if (this->ActorExists() && (!this->eyes.empty() || !this->lights.empty())) { return true; } @@ -195,20 +195,20 @@ bool CCaneOfEvilEyeEffect::IsAlive() { // OFFSET: 0x006F9370 // FUNCTION: fn_06880 void CCaneOfEvilEyeEffect::UpdateEyes() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { CEZ2STRParticle* eye = *it; if (IsParticleActive(eye) != true) { - *it = eye->unknown_00A8 == 1 ? this->CreateEye(2, &eye->unknown_00D0) : nullptr; + *it = eye->animationState == 1 ? this->CreateEye(2, &eye->offsetX) : nullptr; FreeParticle(eye); } } - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { CEZ2STRParticle* eye = *it; if (eye) { - const float x = this->position[0] + eye->unknown_00D0; - const float y = this->position[1] + eye->unknown_00D4; - const float z = this->position[2] + eye->unknown_00D8; + const float x = this->position[0] + eye->offsetX; + const float y = this->position[1] + eye->offsetY; + const float z = this->position[2] + eye->offsetZ; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; const float viewX = y * view[3] + x * view[0] + z * view[6] + view[9]; @@ -241,14 +241,14 @@ void CCaneOfEvilEyeEffect::OnProcess() { // OFFSET: 0x006F9690 // FUNCTION: fn_45459 void CCaneOfEvilEyeEffect::UpdateLights() { - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->lights.begin(); it != this->lights.end(); ++it) { CEZ2STRParticle* light = *it; if (IsParticleActive(light) != true) { CEZ2STRParticle* next; - if (light->unknown_00A8 == 1) { - next = this->CreateLight(3, &light->unknown_00DC); - } else if (light->unknown_00A8 == 2) { - next = this->CreateLight(3, &light->unknown_00DC); + if (light->animationState == 1) { + next = this->CreateLight(3, &light->originX); + } else if (light->animationState == 2) { + next = this->CreateLight(3, &light->originX); } else { next = nullptr; } @@ -258,13 +258,13 @@ void CCaneOfEvilEyeEffect::UpdateLights() { } } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->lights.begin(); it != this->lights.end(); ++it) { CEZ2STRParticle* light = *it; if (light) { vector3d from; - from.x = this->position[0] + light->unknown_00DC; - from.y = light->unknown_00E0 + this->position[1]; - from.z = light->unknown_00E4 + this->position[2]; + from.x = this->position[0] + light->originX; + from.y = light->originY + this->position[1]; + from.z = light->originZ + this->position[2]; float fromReciprocalDepth = 0.0f; float toReciprocalDepth = 0.0f; @@ -286,9 +286,9 @@ void CCaneOfEvilEyeEffect::UpdateLights() { light->m_angle = static_cast(angle); light->m_scale = SquareRoot(distance) * 0.0044f; - const float x = light->unknown_00D0 + this->position[0]; - const float y = light->unknown_00D4 + this->position[1]; - const float z = light->unknown_00D8 + this->position[2]; + const float x = light->offsetX + this->position[0]; + const float y = light->offsetY + this->position[1]; + const float z = light->offsetZ + this->position[2]; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; const float viewX = y * view[3] + x * view[0] + z * view[6] + view[9]; @@ -307,13 +307,13 @@ void CCaneOfEvilEyeEffect::UpdateLights() { // OFFSET: 0x006F9D40 // FUNCTION: fn_06882 void CCaneOfEvilEyeEffect::Render() { - for (auto it = this->unknown_00D0.begin(); it != this->unknown_00D0.end(); ++it) { + for (auto it = this->eyes.begin(); it != this->eyes.end(); ++it) { if (*it) { (*it)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->lights.begin(); it != this->lights.end(); ++it) { if (*it) { (*it)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } diff --git a/Source/Contents/Effects/CaneOfEvilEyeEffect.h b/Source/Contents/Effects/CaneOfEvilEyeEffect.h index 0874af6bd..12e51a94c 100644 --- a/Source/Contents/Effects/CaneOfEvilEyeEffect.h +++ b/Source/Contents/Effects/CaneOfEvilEyeEffect.h @@ -27,14 +27,14 @@ public: void UpdateLights(); /* 00CC */ std::uint32_t startTime; - /* 00D0 */ std::vector unknown_00D0; - /* 00DC */ std::vector unknown_00DC; + /* 00D0 */ std::vector eyes; + /* 00DC */ std::vector lights; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CCaneOfEvilEyeEffect) == 0xE8); -static_assert(offsetof(CCaneOfEvilEyeEffect, unknown_00D0) == 0xD0); -static_assert(offsetof(CCaneOfEvilEyeEffect, unknown_00DC) == 0xDC); +static_assert(offsetof(CCaneOfEvilEyeEffect, eyes) == 0xD0); +static_assert(offsetof(CCaneOfEvilEyeEffect, lights) == 0xDC); #endif #endif diff --git a/Source/Contents/Effects/CartCannon.cpp b/Source/Contents/Effects/CartCannon.cpp index 1b04fe935..77a72b376 100644 --- a/Source/Contents/Effects/CartCannon.cpp +++ b/Source/Contents/Effects/CartCannon.cpp @@ -21,7 +21,7 @@ CCartCannon::CCartCannon() : CEffect(-1) { this->startPosition.x = 0.0f; this->startPosition.y = 0.0f; this->startPosition.z = 0.0f; - this->unknown_0050 = 0; + this->rotationParameter = 0; } // OFFSET: 0x006FAA80 diff --git a/Source/Contents/Effects/CellRangeEffect.cpp b/Source/Contents/Effects/CellRangeEffect.cpp index c76ef83f2..acd80dfce 100644 --- a/Source/Contents/Effects/CellRangeEffect.cpp +++ b/Source/Contents/Effects/CellRangeEffect.cpp @@ -28,7 +28,7 @@ void CCellRangeEffect::SetCellTexture(CParticle* particle) { return; } - const int frame = (particle->unknown_00E8 + particle->unknown_000C) / 10 % 3 + 1; + const int frame = (particle->elapsedFrames + particle->columnIndex) / 10 % 3 + 1; std::string name; switch (this->id) { case EF_KO_ZENKAI_WATER: @@ -80,10 +80,10 @@ void CCellRangeEffect::Open() { for (int column = -range; column <= range; ++column) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 1; particle->alpha = 255; particle->SetColor(255, 255, 255); particle->SetTexture("effect\\torch_violet08.bmp"); @@ -105,8 +105,8 @@ void CCellRangeEffect::OnProcess() { if (particle) { vector3d position; std::memcpy(&position, this->position, sizeof(position)); - position.x = static_cast(particle->unknown_000C) * this->cellSize + position.x; - position.z = static_cast(particle->unknown_0010) * this->cellSize + position.z; + position.x = static_cast(particle->columnIndex) * this->cellSize + position.x; + position.z = static_cast(particle->rowIndex) * this->cellSize + position.z; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); position.y = mode->scene->terrain->Height(position.x, position.z) - 1.2f; particle->position.x = position.x; @@ -127,7 +127,7 @@ void CCellRangeEffect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/CharacterParticleBundle.cpp b/Source/Contents/Effects/CharacterParticleBundle.cpp index fe3e1b27c..c7d60fb0b 100644 --- a/Source/Contents/Effects/CharacterParticleBundle.cpp +++ b/Source/Contents/Effects/CharacterParticleBundle.cpp @@ -58,7 +58,7 @@ namespace { // OFFSET: 0x005A2E50 // FUNCTION: fn_03122 -CharacterParticleBundle::CharacterParticleBundle() : CEffect(-1), startTime(0), unknown_00D8(0), particles() { +CharacterParticleBundle::CharacterParticleBundle() : CEffect(-1), startTime(0), elapsedFrames(0), particles() { } // OFFSET: 0x005A31F0 @@ -75,9 +75,9 @@ void CChopChopClawMarks::UpdateParticlePosition(CEZ2STRParticle* particle) { const float x = this->position[0]; const float y = this->position[1]; const float z = this->position[2]; - const float viewX = view[0] * x + view[3] * y + view[6] * z + view[9] + this->offsetX + particle->unknown_00D0; - const float viewY = view[1] * x + view[4] * y + view[7] * z + view[10] - this->offsetY + particle->unknown_00D4; - const float viewZ = view[2] * x + view[5] * y + view[8] * z + view[11] + particle->unknown_00D8; + const float viewX = view[0] * x + view[3] * y + view[6] * z + view[9] + this->offsetX + particle->offsetX; + const float viewY = view[1] * x + view[4] * y + view[7] * z + view[10] - this->offsetY + particle->offsetY; + const float viewZ = view[2] * x + view[5] * y + view[8] * z + view[11] + particle->offsetZ; particle->position.x = viewY * inverse[3] + viewX * inverse[0] + viewZ * inverse[6] + inverse[9]; particle->position.y = viewX * inverse[1] + viewY * inverse[4] + viewZ * inverse[7] + inverse[10]; particle->position.z = viewX * inverse[2] + viewY * inverse[5] + viewZ * inverse[8] + inverse[11]; @@ -112,9 +112,9 @@ void CChopChopClawMarks::SpawnParticle() { // GLOBAL: gl_24875 thread_local EncryptedName name(bytes); particle->Load(name.Text()); - particle->unknown_00D0 = x; - particle->unknown_00D4 = y; - particle->unknown_00D8 = 0.0f; + particle->offsetX = x; + particle->offsetY = y; + particle->offsetZ = 0.0f; particle->m_angle = static_cast(std::ranges::max(rand() % 360, 0)); this->particles.push_back(particle); } @@ -186,7 +186,7 @@ void CharacterParticleBundle::OnInit() { // OFFSET: 0x005A3E50 // FUNCTION: fn_03137 void CharacterParticleBundle::Open() { - this->unknown_00D8 = 0; + this->elapsedFrames = 0; this->startTime = std::chrono::steady_clock::now().time_since_epoch().count(); this->OnInit(); } @@ -195,7 +195,7 @@ void CharacterParticleBundle::Open() { // FUNCTION: fn_03138 bool CChopChopClawMarks::IsAlive() { if (this->ActorExists()) { - const std::chrono::milliseconds limit = std::chrono::seconds(this->unknown_002C); + const std::chrono::milliseconds limit = std::chrono::seconds(this->effectLifetime); const std::chrono::nanoseconds elapsed = std::chrono::steady_clock::now().time_since_epoch() - std::chrono::nanoseconds(this->startTime); if (std::chrono::duration_cast(elapsed) <= limit) { return true; @@ -225,7 +225,7 @@ void CharacterParticleBundle::OnProcess() { this->UpdateParticlePosition(particle); this->ProcessParticle(particle); } - ++this->unknown_00D8; + ++this->elapsedFrames; } // OFFSET: 0x005A4000 diff --git a/Source/Contents/Effects/CharacterParticleBundle.h b/Source/Contents/Effects/CharacterParticleBundle.h index db0e879c3..4cbde07bf 100644 --- a/Source/Contents/Effects/CharacterParticleBundle.h +++ b/Source/Contents/Effects/CharacterParticleBundle.h @@ -28,7 +28,7 @@ public: /* 00CC */ int unknown_00CC; /* 00D0 */ long long startTime; - /* 00D8 */ int unknown_00D8; + /* 00D8 */ int elapsedFrames; /* 00DC */ std::vector particles; }; diff --git a/Source/Contents/Effects/ChargingPierceEffect.cpp b/Source/Contents/Effects/ChargingPierceEffect.cpp index 741fb46e2..7b952be7a 100644 --- a/Source/Contents/Effects/ChargingPierceEffect.cpp +++ b/Source/Contents/Effects/ChargingPierceEffect.cpp @@ -56,9 +56,9 @@ void CChargingPierceNewEffect::SetCount(int count) { } particle->Load(std::string("DRAGON_KNIGHT\\DK_CHARGINGPIERCE\\chargingpierce_cast2\\chargingpierce_cast2.str")); - particle->unknown_00D0 = s_chargingPierceNewOffsets[index].x; - particle->unknown_00D4 = s_chargingPierceNewOffsets[index].y; - particle->unknown_00D8 = s_chargingPierceNewOffsets[index].z; + particle->offsetX = s_chargingPierceNewOffsets[index].x; + particle->offsetY = s_chargingPierceNewOffsets[index].y; + particle->offsetZ = s_chargingPierceNewOffsets[index].z; particle->m_hold = true; particle->m_scale = 0.75f; this->emitters.push_back(particle); @@ -181,7 +181,7 @@ void CChargingPierceEffect::OnProcess() { } if (CEZ2STRParticle* emitter = this->emitters[index]) { - if (emitter->life == 0.0f || static_cast(emitter->unknown_00E8) < emitter->life * 60.0f) { + if (emitter->life == 0.0f || static_cast(emitter->elapsedFrames) < emitter->life * 60.0f) { if (g_modeMgr.GetGameMode()) { float height = -13.0f; if (CGameActor* actor = static_cast(FindRenderObject(this->actor))) { @@ -200,17 +200,17 @@ void CChargingPierceEffect::OnProcess() { emitter->position.y = viewX * inverse[1] + viewY * inverse[4] + viewZ * inverse[7] + inverse[10]; emitter->position.z = viewX * inverse[2] + viewY * inverse[5] + viewZ * inverse[8] + inverse[11]; emitter->Process(0.0f, 0.0f, 0.0f); - ++emitter->unknown_00E8; + ++emitter->elapsedFrames; } } else { FreeParticle(emitter); this->emitters[index] = nullptr; if (!this->sparks[index]) { CParticle* spark = CreateParticle(reinterpret_cast(this->position), 0x101); - spark->unknown_0004 = this->id; - spark->unknown_000C = 1; - spark->unknown_0010 = 0; - spark->unknown_0008 = 1; + spark->effectId = this->id; + spark->columnIndex = 1; + spark->rowIndex = 0; + spark->groupIndex = 1; spark->SetTexture("effect\\new_chargingpierce\\cha_orb.bmp"); spark->scale = 1.5f; spark->depthOffset = 0.035f; @@ -233,9 +233,9 @@ void CChargingPierceNewEffect::OnProcess() { const matrix view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - const float viewX = view.values[0] * x + view.values[3] * y + view.values[6] * z + view.values[9] + particle->unknown_00D0; - const float viewY = view.values[1] * x + view.values[4] * y + view.values[7] * z + view.values[10] + particle->unknown_00D4; - const float viewZ = view.values[2] * x + view.values[5] * y + view.values[8] * z + view.values[11] + particle->unknown_00D8; + const float viewX = view.values[0] * x + view.values[3] * y + view.values[6] * z + view.values[9] + particle->offsetX; + const float viewY = view.values[1] * x + view.values[4] * y + view.values[7] * z + view.values[10] + particle->offsetY; + const float viewZ = view.values[2] * x + view.values[5] * y + view.values[8] * z + view.values[11] + particle->offsetZ; particle->position.x = viewY * inverse.values[3] + viewX * inverse.values[0] + viewZ * inverse.values[6] + inverse.values[9]; particle->position.y = viewY * inverse.values[4] + viewX * inverse.values[1] + viewZ * inverse.values[7] + inverse.values[10]; particle->position.z = viewY * inverse.values[5] + viewX * inverse.values[2] + viewZ * inverse.values[8] + inverse.values[11]; diff --git a/Source/Contents/Effects/CherryBlossomEffect.cpp b/Source/Contents/Effects/CherryBlossomEffect.cpp index 765ca40ef..c9de5e52f 100644 --- a/Source/Contents/Effects/CherryBlossomEffect.cpp +++ b/Source/Contents/Effects/CherryBlossomEffect.cpp @@ -34,17 +34,17 @@ void CCherryBlossomEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\cherry_circle.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 2; - particle->unknown_00C0 = 0.15f; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 2; + particle->speedParameter = 0.15f; particle->scale = 0.55f; particle->alpha = 0; this->offsets[row * 4 + column] = vector3d{0.0f, static_cast(std::max(rand() % 100, 0)), 0.0f}; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } @@ -64,21 +64,21 @@ void CCherryBlossomEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const int index = particle->unknown_000C + particle->unknown_0010 * 4; - const float speed = particle->unknown_00C0; + const int index = particle->columnIndex + particle->rowIndex * 4; + const float speed = particle->speedParameter; vector3d& offset = this->offsets[index]; if (offset.y < 0.0f) { if (offset.y < -30.0f) { offset = vector3d{0.0f, static_cast(std::max(rand() % 100, 0)), 0.0f}; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } particle->alpha = 0; } else { - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 2; ++i) { const int current = static_cast(angles[i]); const int delta = static_cast(angles[i + 2]) - current; @@ -127,7 +127,7 @@ void CCherryBlossomEffect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/ClimaxEffect.cpp b/Source/Contents/Effects/ClimaxEffect.cpp index 890e589c8..bdeb280c9 100644 --- a/Source/Contents/Effects/ClimaxEffect.cpp +++ b/Source/Contents/Effects/ClimaxEffect.cpp @@ -36,7 +36,7 @@ void CClimaxEffect::Open() { this->particles[0] = particle; CParticle* bottom = CreateEZ2STRParticle(reinterpret_cast(this->position), 13); - switch (this->unknown_00B0) { + switch (this->effectLevel) { case 1: static_cast(bottom)->Load("climax\\climax_bottom\\climax_bottom_1.str"); break; @@ -97,7 +97,7 @@ void CClimaxEffect::OnProcess() { } climax->Process(0.0f, 0.0f, 0.0f); - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/CloudEffect.cpp b/Source/Contents/Effects/CloudEffect.cpp index 94461db7e..d32e54501 100644 --- a/Source/Contents/Effects/CloudEffect.cpp +++ b/Source/Contents/Effects/CloudEffect.cpp @@ -55,10 +55,10 @@ void CCloud::Close() { void CCloud::Open() { this->particle = CreateParticle(reinterpret_cast(this->position), 1); if (CParticle* particle = this->particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; this->particle->sourceBlend = 5; this->particle->destinationBlend = 6; } @@ -84,7 +84,7 @@ void CCloud::ResetParticles() { return; } - this->particle->unknown_00E8 = 0; + this->particle->elapsedFrames = 0; CParticle* particle = this->particle; const int rangeZ = static_cast(this->offsetRangeZ); const int offsetZ = rangeZ ? std::max(0, rand() % rangeZ) : 0; @@ -92,9 +92,9 @@ void CCloud::ResetParticles() { const int offsetY = rangeY ? std::max(0, rand() % rangeY) : 0; const int rangeX = static_cast(this->offsetRangeX); const int offsetX = rangeX ? std::max(0, rand() % rangeX) : 0; - particle->unknown_00D0 = static_cast(offsetX); - particle->unknown_00D4 = static_cast(offsetY); - particle->unknown_00D8 = static_cast(offsetZ); + particle->offsetX = static_cast(offsetX); + particle->offsetY = static_cast(offsetY); + particle->offsetZ = static_cast(offsetZ); this->particle->SetColor(this->red, this->green, this->blue); this->particle->alpha = 0; @@ -117,7 +117,7 @@ void CCloud::OnProcess() { return; } - const int frame = particle->unknown_00E8; + const int frame = particle->elapsedFrames; if (frame < this->fadeInEnd) { const float value = this->alpha + this->fadeInStep; this->alpha = value > 255.0f ? 255.0f : value; @@ -144,7 +144,7 @@ void CCloud::OnProcess() { matrix transform; transform.Compose(scale, rotation); this->particle->transform = transform; - ++this->particle->unknown_00E8; + ++this->particle->elapsedFrames; } // OFFSET: 0x006FC090 @@ -162,14 +162,14 @@ void CCloud::Drift() { StepDrift(this->driftZ, this->driftTargetZ); CParticle* particle = this->particle; - float offsetX = particle->unknown_00D0; - const float offsetY = particle->unknown_00D4; - float offsetZ = particle->unknown_00D8; + float offsetX = particle->offsetX; + const float offsetY = particle->offsetY; + float offsetZ = particle->offsetZ; offsetX = g_sinTable[this->driftX] * 0.05f + offsetX; offsetZ = g_sinTable[this->driftZ] * 0.05f + offsetZ; - particle->unknown_00D0 = offsetX; - particle->unknown_00D4 = offsetY; - particle->unknown_00D8 = offsetZ; + particle->offsetX = offsetX; + particle->offsetY = offsetY; + particle->offsetZ = offsetZ; this->particle->position.x = offsetX + this->position[0]; this->particle->position.y = offsetY + this->position[1]; diff --git a/Source/Contents/Effects/CloudKillEffect.cpp b/Source/Contents/Effects/CloudKillEffect.cpp index 27016ffae..71bb4ec71 100644 --- a/Source/Contents/Effects/CloudKillEffect.cpp +++ b/Source/Contents/Effects/CloudKillEffect.cpp @@ -12,10 +12,10 @@ // OFFSET: 0x006FC410 // FUNCTION: fn_06923 CCloudKillEffect::CCloudKillEffect() : CEffect(1080) { - this->unknown_002C = 9999; - this->unknown_00E4 = 1; - this->unknown_00DC = 10; - this->unknown_00E0 = 40; + this->effectLifetime = 9999; + this->emitting = 1; + this->particleLifetimeFrames = 10; + this->spriteLifetimeFrames = 40; } // OFFSET: 0x006FC600 @@ -30,28 +30,28 @@ void CCloudKillEffect::AddSprites() { for (int x = -10; x <= 10; x += 4) { CParticle* created = CreateSpriteParticle(reinterpret_cast(this->position), 1); CSpriteParticle* particle = static_cast(created); - matrix& rotation = *reinterpret_cast(particle->unknown_0198); + matrix& rotation = *reinterpret_cast(particle->rotationStorage); rotation.IsIdentity(); rotation.MakeYRotation(GetRadian(std::max(rand() % 360, 0))); const float distance = static_cast(std::max(rand() % 6, 0) + 2); const float* values = rotation.values; - particle->unknown_00DC = values[3] * 0.0f + values[0] * 0.0f + distance * values[6] + values[9] + static_cast(x); - particle->unknown_00E0 = values[4] * 0.0f + values[1] * 0.0f + distance * values[7] + values[10] + 0.0f; - particle->unknown_00E4 = values[5] * 0.0f + values[2] * 0.0f + distance * values[8] + values[11] + static_cast(z); + particle->originX = values[3] * 0.0f + values[0] * 0.0f + distance * values[6] + values[9] + static_cast(x); + particle->originY = values[4] * 0.0f + values[1] * 0.0f + distance * values[7] + values[10] + 0.0f; + particle->originZ = values[5] * 0.0f + values[2] * 0.0f + distance * values[8] + values[11] + static_cast(z); rotation.MakeXRotation(GetRadian(90)); const float speed = static_cast(std::max(rand() % 30, 0) + 30) / 100.0f; const float acceleration = -(speed / 40.0f) * g_depthAverageHalf; const int size = std::max(rand() % 50, 0); particle->frameDelay = speed; - reinterpret_cast(particle->unknown_02DC) = acceleration; + reinterpret_cast(particle->accelerationStorage) = acceleration; particle->scale = static_cast(size + 40) / 170.0f; - reinterpret_cast(particle->unknown_02D4) = 3.0f; + reinterpret_cast(particle->spinBits) = 3.0f; particle->alpha = 0; - particle->unknown_0054 = 25.4f; - reinterpret_cast(particle->unknown_0058) = 32.0f; + particle->animationParameter = 25.4f; + reinterpret_cast(particle->animationParameters) = 32.0f; particle->SetSprite("이팩트\\particle3.spr"); particle->SetAction("이팩트\\particle3.act"); - particle->life = static_cast(this->unknown_00E0) / 60.0f; + particle->life = static_cast(this->spriteLifetimeFrames) / 60.0f; this->sprites.push_back(created); } } @@ -85,50 +85,50 @@ bool CCloudKillEffect::IsAlive() { // OFFSET: 0x006FCE60 // FUNCTION: fn_06930 void CCloudKillEffect::OnProcess() { - if (this->unknown_00E4 && this->frame % 5 == 0) { + if (this->emitting && this->frame % 5 == 0) { CSpriteParticle* particle = static_cast(CreateSpriteParticle(reinterpret_cast(this->position), 1)); - matrix& rotation = *reinterpret_cast(particle->unknown_0198); + matrix& rotation = *reinterpret_cast(particle->rotationStorage); rotation.IsIdentity(); rotation.MakeYRotation(GetRadian(std::max(rand() % 360, 0))); rotation.MakeXRotation(GetRadian(90)); const float speed = static_cast(std::max(rand() % 20, 0) + 20) / 80.0f; particle->frameDelay = speed; - reinterpret_cast(particle->unknown_02DC) = -(speed / 10.0f) * g_depthAverageHalf; + reinterpret_cast(particle->accelerationStorage) = -(speed / 10.0f) * g_depthAverageHalf; particle->scale = 0.8f; - reinterpret_cast(particle->unknown_02D4) = 3.0f; + reinterpret_cast(particle->spinBits) = 3.0f; particle->alpha = 70; - particle->unknown_0054 = 25.4f; - reinterpret_cast(particle->unknown_0058) = 8.0f; + particle->animationParameter = 25.4f; + reinterpret_cast(particle->animationParameters) = 8.0f; particle->SetSprite("이팩트\\particle3.spr"); particle->SetAction("이팩트\\particle3.act"); - particle->life = static_cast(this->unknown_00DC) / 60.0f; + particle->life = static_cast(this->particleLifetimeFrames) / 60.0f; this->particles.push_back(static_cast(particle)); } for (auto it = this->particles.begin(); it != this->particles.end();) { CSpriteParticle* particle = static_cast(*it); - if (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->unknown_00E8)) { - const float* values = reinterpret_cast(particle->unknown_0198)->values; - float& angle = reinterpret_cast(particle->unknown_00C4); - const float speed = reinterpret_cast(particle->unknown_02DC) + particle->frameDelay; + if (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->elapsedFrames)) { + const float* values = reinterpret_cast(particle->rotationStorage)->values; + float& angle = reinterpret_cast(particle->angleBits); + const float speed = reinterpret_cast(particle->accelerationStorage) + particle->frameDelay; particle->frameDelay = speed; particle->velocity.x = values[3] * 0.0f + values[0] * 0.0f + speed * values[6] + values[9] + particle->velocity.x; particle->velocity.y = values[4] * 0.0f + values[1] * 0.0f + speed * values[7] + values[10] + particle->velocity.y; particle->velocity.z = values[5] * 0.0f + values[2] * 0.0f + speed * values[8] + values[11] + particle->velocity.z; - angle = reinterpret_cast(particle->unknown_02D4) + angle; + angle = reinterpret_cast(particle->spinBits) + angle; particle->position.z = particle->velocity.z + this->position[2]; particle->position.x = particle->velocity.x + this->position[0]; particle->position.y = particle->velocity.y + this->position[1]; - const int age = particle->unknown_00E8; - float fade = particle->unknown_0054; - if (age == static_cast(reinterpret_cast(particle->unknown_0058))) { - fade = -(static_cast(particle->alpha) / static_cast(this->unknown_00DC - age)); + const int age = particle->elapsedFrames; + float fade = particle->animationParameter; + if (age == static_cast(reinterpret_cast(particle->animationParameters))) { + fade = -(static_cast(particle->alpha) / static_cast(this->particleLifetimeFrames - age)); } - particle->unknown_0054 = fade; + particle->animationParameter = fade; const float level = fade + static_cast(particle->alpha); const float positive = 0.0f <= level ? level : 0.0f; particle->alpha = static_cast(positive <= 254.0f ? positive : 254.0f); - particle->unknown_00E8 = age + 1; + particle->elapsedFrames = age + 1; ++it; } else { FreeParticle(particle); @@ -136,34 +136,34 @@ void CCloudKillEffect::OnProcess() { } } - if (this->unknown_00E4 && this->frame % 9 == 0) { + if (this->emitting && this->frame % 9 == 0) { this->AddSprites(); } for (auto it = this->sprites.begin(); it != this->sprites.end();) { CSpriteParticle* particle = static_cast(*it); - if (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->unknown_00E8)) { - const float* values = reinterpret_cast(particle->unknown_0198)->values; - float& angle = reinterpret_cast(particle->unknown_00C4); - const float speed = reinterpret_cast(particle->unknown_02DC) + particle->frameDelay; + if (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->elapsedFrames)) { + const float* values = reinterpret_cast(particle->rotationStorage)->values; + float& angle = reinterpret_cast(particle->angleBits); + const float speed = reinterpret_cast(particle->accelerationStorage) + particle->frameDelay; particle->frameDelay = speed; particle->velocity.x = values[3] * 0.0f + values[0] * 0.0f + speed * values[6] + values[9] + particle->velocity.x; particle->velocity.y = values[4] * 0.0f + values[1] * 0.0f + speed * values[7] + values[10] + particle->velocity.y; particle->velocity.z = values[5] * 0.0f + values[2] * 0.0f + speed * values[8] + values[11] + particle->velocity.z; - particle->position.y = particle->unknown_00E0 + this->position[1] + particle->velocity.y; - particle->position.x = particle->unknown_00DC + this->position[0] + particle->velocity.x; - particle->position.z = this->position[2] + particle->unknown_00E4 + particle->velocity.z; - angle = reinterpret_cast(particle->unknown_02D4) + angle; - const int age = particle->unknown_00E8; - float fade = particle->unknown_0054; - if (age == static_cast(reinterpret_cast(particle->unknown_0058))) { - fade = -(static_cast(particle->alpha) / static_cast(this->unknown_00E0 - age)); + particle->position.y = particle->originY + this->position[1] + particle->velocity.y; + particle->position.x = particle->originX + this->position[0] + particle->velocity.x; + particle->position.z = this->position[2] + particle->originZ + particle->velocity.z; + angle = reinterpret_cast(particle->spinBits) + angle; + const int age = particle->elapsedFrames; + float fade = particle->animationParameter; + if (age == static_cast(reinterpret_cast(particle->animationParameters))) { + fade = -(static_cast(particle->alpha) / static_cast(this->spriteLifetimeFrames - age)); } - particle->unknown_0054 = fade; + particle->animationParameter = fade; const float level = fade + static_cast(particle->alpha); const float positive = 0.0f <= level ? level : 0.0f; particle->alpha = static_cast(positive <= 254.0f ? positive : 254.0f); - particle->unknown_00E8 = age + 1; + particle->elapsedFrames = age + 1; ++it; } else { FreeParticle(particle); @@ -172,8 +172,8 @@ void CCloudKillEffect::OnProcess() { } if (!this->ActorExists()) { - this->unknown_00E4 = 0; - this->unknown_002C = this->frame + 50; + this->emitting = 0; + this->effectLifetime = this->frame + 50; } } diff --git a/Source/Contents/Effects/CloudKillEffect.h b/Source/Contents/Effects/CloudKillEffect.h index 845ff6728..f016e4f13 100644 --- a/Source/Contents/Effects/CloudKillEffect.h +++ b/Source/Contents/Effects/CloudKillEffect.h @@ -22,14 +22,14 @@ public: /* 00CC */ std::list particles; /* 00D4 */ std::list sprites; - /* 00DC */ int unknown_00DC; - /* 00E0 */ int unknown_00E0; - /* 00E4 */ unsigned char unknown_00E4; + /* 00DC */ int particleLifetimeFrames; + /* 00E0 */ int spriteLifetimeFrames; + /* 00E4 */ unsigned char emitting; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(CCloudKillEffect, particles) == 0xCC); -static_assert(offsetof(CCloudKillEffect, unknown_00E4) == 0xE4); +static_assert(offsetof(CCloudKillEffect, emitting) == 0xE4); #endif #endif diff --git a/Source/Contents/Effects/CommonFloorEffect.cpp b/Source/Contents/Effects/CommonFloorEffect.cpp index 2a5c03869..756ad1fb8 100644 --- a/Source/Contents/Effects/CommonFloorEffect.cpp +++ b/Source/Contents/Effects/CommonFloorEffect.cpp @@ -45,14 +45,14 @@ void CCommonFloorEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\ra_unlimit.tga"); - particle->unknown_0004 = this->id; - particle->unknown_0008 = 1; - particle->unknown_000C = i; - particle->unknown_0010 = 0; + particle->effectId = this->id; + particle->groupIndex = 1; + particle->columnIndex = i; + particle->rowIndex = 0; particle->alpha = 90; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_004C = angle; - particle->unknown_00C0 = 6.0f; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->phaseParameter = angle; + particle->speedParameter = 6.0f; particle->scale = 15.0f; InitParticleQuad(particle->vertices); this->particles.push_back(particle); @@ -69,14 +69,14 @@ void CCommonFloorEffect::ResetParticles() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - particle->scale = *reinterpret_cast(&this->unknown_0048); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(*reinterpret_cast(this->unknown_004C)); - particle->unknown_004C = static_cast(static_cast(particle->unknown_0010) * *reinterpret_cast(&this->unknown_0050)); - particle->alpha = *reinterpret_cast(this->unknown_0054); + particle->scale = *reinterpret_cast(&this->scaleParameter); + *reinterpret_cast(&particle->angleBits) = static_cast(*reinterpret_cast(this->angleParameter)); + particle->phaseParameter = static_cast(static_cast(particle->rowIndex) * *reinterpret_cast(&this->rotationParameter)); + particle->alpha = *reinterpret_cast(this->alphaParameters); particle->sourceBlend = 5; particle->destinationBlend = 7; InitParticleQuad(particle->vertices); - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; } } // OFFSET: 0x006FDD90 @@ -93,7 +93,7 @@ void CCommonFloorEffect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - int angle = static_cast(particle->unknown_00C0 + *reinterpret_cast(&particle->unknown_00C4)); + int angle = static_cast(particle->speedParameter + *reinterpret_cast(&particle->angleBits)); if (angle >= 360) { angle -= 360; } else if (angle < 0) { @@ -101,7 +101,7 @@ void CCommonFloorEffect::OnProcess() { } const float degrees = static_cast(angle); - *reinterpret_cast(&particle->unknown_00C4) = degrees; + *reinterpret_cast(&particle->angleBits) = degrees; matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); @@ -116,7 +116,7 @@ void CCommonFloorEffect::OnProcess() { result.Compose(scale, rotation); particle->transform = result; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } diff --git a/Source/Contents/Effects/Competentia.cpp b/Source/Contents/Effects/Competentia.cpp index 65fe22049..947b9a657 100644 --- a/Source/Contents/Effects/Competentia.cpp +++ b/Source/Contents/Effects/Competentia.cpp @@ -70,7 +70,7 @@ bool CCompetentia::IsAlive() { void CCompetentia::OnProcess() { for (auto current = this->particles.begin(); current != this->particles.end();) { CParticle* particle = *current; - if (particle->life == 0.0f || static_cast(particle->unknown_00E8) < particle->life * 60.0f) { + if (particle->life == 0.0f || static_cast(particle->elapsedFrames) < particle->life * 60.0f) { if (particle) { static_cast(particle)->Process(0.0f, -80.0f, 0.0f); } diff --git a/Source/Contents/Effects/CresciveBolt.cpp b/Source/Contents/Effects/CresciveBolt.cpp index 61525eedd..860716212 100644 --- a/Source/Contents/Effects/CresciveBolt.cpp +++ b/Source/Contents/Effects/CresciveBolt.cpp @@ -65,7 +65,7 @@ bool CCresciveBolt::IsAlive() { return true; } - return static_cast(this->particle->unknown_00E8) < this->particle->life * 60.0f; + return static_cast(this->particle->elapsedFrames) < this->particle->life * 60.0f; } // OFFSET: 0x0070AED0 diff --git a/Source/Contents/Effects/DummyEffectLauncher.cpp b/Source/Contents/Effects/DummyEffectLauncher.cpp index 43c5b2f12..cc7705e43 100644 --- a/Source/Contents/Effects/DummyEffectLauncher.cpp +++ b/Source/Contents/Effects/DummyEffectLauncher.cpp @@ -10,7 +10,7 @@ // OFFSET: 0x00E4C1C0 // FUNCTION: fn_24281 bool CDummyEffectLauncher::OnProcess() { - const float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); const float limit = static_cast(this->lifeFrames); return !(frame > limit); } @@ -28,7 +28,7 @@ __declspec(safebuffers) void CDummyEffectLauncher::SendMsg(CGameObject* sender, this->render.position.y = position->y; this->render.position.z = position->z; this->render.visible = 0; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); if (g_effectMgr->Spawn(0, d, this->render.position.x, this->render.position.y, this->render.position.z, 0, -1, 0, 0) != nullptr) { return; } diff --git a/Source/Contents/Effects/EZ2STREffect.cpp b/Source/Contents/Effects/EZ2STREffect.cpp index e8e2698ca..0ad086e81 100644 --- a/Source/Contents/Effects/EZ2STREffect.cpp +++ b/Source/Contents/Effects/EZ2STREffect.cpp @@ -1555,7 +1555,7 @@ bool CEZ2STRScreenEffect::IsAttachedToHead() const { // OFFSET: 0x00B51A60 // FUNCTION: fn_19032 bool CEZ2STRScreenEffect::ApplyHeadOffset(CEZ2STRParticle* particle) { - if (this->unknown_00C8 != 1 && this->IsAttachedToHead() != true) { + if (this->headAttached != 1 && this->IsAttachedToHead() != true) { return false; } @@ -1632,7 +1632,7 @@ bool CEZ2STRScreenEffect::IsVisible() { return false; } - if (actor->unknown_0304 > 0) { + if (actor->hpGaugeFlags > 0) { return actor->EffectVisible(); } @@ -1643,7 +1643,7 @@ bool CEZ2STRScreenEffect::IsVisible() { // FUNCTION: fn_19042 bool CEZ2STRScreenEffect::IsAlive() { int id = this->id; - if (this->unknown_00C8 == 1) { + if (this->headAttached == 1) { return this->ActorExists(); } @@ -1768,7 +1768,7 @@ bool CEZ2STRScreenEffect::IsAlive() { return true; } - return particle->life * 60.0f > static_cast(particle->unknown_00E8); + return particle->life * 60.0f > static_cast(particle->elapsedFrames); } // OFFSET: 0x00B56D30 @@ -5395,9 +5395,9 @@ void CEZ2STRScreenEffect::OnProcess() { } } - ++this->particle->unknown_00E8; + ++this->particle->elapsedFrames; if (this->id == 0x851) { - int frame = this->particle->unknown_00E8 - 30; + int frame = this->particle->elapsedFrames - 30; if (frame >= 0 && frame % 64 == 0) { CRenderObject* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); g_soundMgr->PlayWave( @@ -5423,7 +5423,7 @@ void CEZ2STRScreenEffect::OnProcess() { particle->m_shiftY = factor * shift[1]; } - this->particle->m_lift = *reinterpret_cast(&actor->render.unknown_0128); + this->particle->m_lift = *reinterpret_cast(&actor->render.hoverOffsetLow); } // OFFSET: 0x00B661B0 @@ -5500,11 +5500,11 @@ void CEZ2STRScreenEffect::SetId(int id) { case EF_MERMAID_LONGING: case EF_GIFT_OF_SNOW: case EF_TIME_ACCESSORY: - this->unknown_00C8 = 1; + this->headAttached = 1; break; default: if (id >= 0x9B5) { - this->unknown_00C8 = 1; + this->headAttached = 1; } break; } @@ -5608,7 +5608,7 @@ void CEZ2STRScreenEffect::Open() { particle->m_actorId = this->actor; - if (this->unknown_00C8 == 1) { + if (this->headAttached == 1) { this->retained = 1; particle->m_loop = true; bool adjustSize = false; @@ -5753,7 +5753,7 @@ void CEZ2STRScreenEffect::Open() { break; } - if (this->unknown_00C4 > 0) { + if (this->instanceId > 0) { particle->m_loop = true; } @@ -6057,7 +6057,7 @@ void CEZ2STRScreenEffect::InitEvents() { case EF_DEADLY_PROJECTION_HIT: { CGameActor* actor = static_cast(FindRenderObject(this->actor)); - if (actor && actor->bodyState == 0 && actor->unknown_02C4 == 0) { + if (actor && actor->bodyState == 0 && actor->effectState == 0) { this->AddEvent(0, "effect\\AG_DEADLY_PROJECTION.wav", 0, 0); } break; @@ -6221,7 +6221,7 @@ void CEZ2STRScreenEffect::InitEvents() { case EF_STRATUM_TREMOR_BOTTOM: this->particle->flags = 13; - switch (this->unknown_00B0) { + switch (this->effectLevel) { case 1: this->SetScale(0.7f); break; diff --git a/Source/Contents/Effects/Effect.cpp b/Source/Contents/Effects/Effect.cpp index fb6b973e6..b471f2dc4 100644 --- a/Source/Contents/Effects/Effect.cpp +++ b/Source/Contents/Effects/Effect.cpp @@ -21,12 +21,12 @@ // OFFSET: 0x00B4DAE0 // FUNCTION: fn_18979 CEffect::CEffect(int value) - : id(value), position{0.0f, 0.0f, 0.0f}, sourcePosition{0.0f, 0.0f, 0.0f}, actor(0), sourceActor(0), frame(0), unknown_002C(60), unknown_0030(1), outsideRange(0), range(130), - unknown_00B0(-1) { + : id(value), position{0.0f, 0.0f, 0.0f}, sourcePosition{0.0f, 0.0f, 0.0f}, actor(0), sourceActor(0), frame(0), effectLifetime(60), effectArgument(1), outsideRange(0), range(130), + effectLevel(-1) { this->retained = 0; this->forceRender = 0; - this->unknown_00C8 = 0; - this->unknown_00C4 = 0; + this->headAttached = 0; + this->instanceId = 0; } // OFFSET: 0x00B4DD10 @@ -63,11 +63,11 @@ bool CEffect::RetireIfInactive() { // FUNCTION: fn_18986 bool CEffect::IsVisible() { EffectActor* actor = static_cast(FindRenderObject(this->actor)); - if (!actor || actor->render.unknown_00A8 == 0) { + if (!actor || actor->render.isCharacter == 0) { return true; } - if (this->unknown_00C8 == 0) { + if (this->headAttached == 0) { if (this->actor == g_session.m_aid) { return true; } @@ -218,7 +218,7 @@ bool CEffect::ActorExists() const { // OFFSET: 0x00B4E6C0 // FUNCTION: fn_19000 bool CEffect::IsFinished() const { - return this->frame >= this->unknown_002C; + return this->frame >= this->effectLifetime; } // OFFSET: 0x00B249A0 diff --git a/Source/Contents/Effects/Effect.h b/Source/Contents/Effects/Effect.h index 4195bc26a..7a5d52873 100644 --- a/Source/Contents/Effects/Effect.h +++ b/Source/Contents/Effects/Effect.h @@ -70,24 +70,24 @@ public: /* 0020 */ std::uint32_t actor; /* 0024 */ std::uint32_t sourceActor; /* 0028 */ int frame; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; + /* 002C */ int effectLifetime; + /* 0030 */ int effectArgument; /* 0034 */ unsigned char outsideRange; /* 0035 */ unsigned char unknown_0035[3]; /* 0038 */ int range; - /* 003C */ unsigned char unknown_003C[12]; - /* 0048 */ int unknown_0048; - /* 004C */ unsigned char unknown_004C[4]; - /* 0050 */ int unknown_0050; - /* 0054 */ unsigned char unknown_0054[92]; - /* 00B0 */ int unknown_00B0; + /* 003C */ unsigned char areaParameters[12]; + /* 0048 */ int scaleParameter; + /* 004C */ unsigned char angleParameter[4]; + /* 0050 */ int rotationParameter; + /* 0054 */ unsigned char alphaParameters[92]; + /* 00B0 */ int effectLevel; /* 00B4 */ std::vector events; /* 00C0 */ unsigned char retained; - /* 00C1 */ unsigned char unknown_00C1; + /* 00C1 */ unsigned char emissionStopped; /* 00C2 */ unsigned char forceRender; /* 00C3 */ unsigned char unknown_00C3; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ unsigned char unknown_00C8; + /* 00C4 */ int instanceId; + /* 00C8 */ unsigned char headAttached; /* 00C9 */ unsigned char unknown_00C9[3]; }; @@ -96,7 +96,7 @@ static_assert(sizeof(EffectEvent) == 36); static_assert(offsetof(EffectEvent, text) == 0xC); static_assert(sizeof(CEffect) == 204); static_assert(offsetof(CEffect, events) == 0xB4); -static_assert(offsetof(CEffect, unknown_00C8) == 0xC8); +static_assert(offsetof(CEffect, headAttached) == 0xC8); #endif #endif diff --git a/Source/Contents/Effects/EffectActor.cpp b/Source/Contents/Effects/EffectActor.cpp index 8bec2dd41..704354aa7 100644 --- a/Source/Contents/Effects/EffectActor.cpp +++ b/Source/Contents/Effects/EffectActor.cpp @@ -3,7 +3,7 @@ #include "Contents/Effects/RagEffect.h" // INLINED -EffectActorState::EffectActorState() : unknown_0138(-1), unknown_013C(0), unknown_0140(0), first(nullptr), second(nullptr) { +EffectActorState::EffectActorState() : unknown_0138(-1), unknown_013C(0), effectLaunched(0), first(nullptr), second(nullptr) { } // INLINED @@ -37,7 +37,7 @@ EffectActor::~EffectActor() { void EffectActor::ResetEffectState() { this->state.unknown_0138 = -1; this->state.unknown_013C = 0; - this->state.unknown_0140 = 0; + this->state.effectLaunched = 0; this->state.first = nullptr; this->state.second = nullptr; this->render.unknown_0130[0] = 0; diff --git a/Source/Contents/Effects/EffectActor.h b/Source/Contents/Effects/EffectActor.h index 893351c1d..2b0e36a50 100644 --- a/Source/Contents/Effects/EffectActor.h +++ b/Source/Contents/Effects/EffectActor.h @@ -16,7 +16,7 @@ struct EffectActorState { /* 0138 */ int unknown_0138; /* 013C */ std::uint32_t unknown_013C; - /* 0140 */ std::uint32_t unknown_0140; + /* 0140 */ std::uint32_t effectLaunched; /* 0144 */ std::list effects; /* 014C */ CRagEffect* first; /* 0150 */ CRagEffect* second; diff --git a/Source/Contents/Effects/EffectEmitter.h b/Source/Contents/Effects/EffectEmitter.h index 23e05b37b..5329a51c6 100644 --- a/Source/Contents/Effects/EffectEmitter.h +++ b/Source/Contents/Effects/EffectEmitter.h @@ -27,23 +27,23 @@ struct EZ2STREmitter { /* 3CC4 */ int currentFrame; /* 3CC8 */ int frameCount; /* 3CCC */ unsigned char unknown_3CCC[0x28C]; - /* 3F58 */ int unknown_3F58; + /* 3F58 */ int playbackState; /* 3F5C */ unsigned char looping; /* 3F5D */ unsigned char fadeOut; /* 3F5E */ unsigned char unknown_3F5E[0x3A]; - /* 3F98 */ int unknown_3F98; + /* 3F98 */ int lifetimeLimit; /* 3F9C */ int unknown_3F9C; /* 3FA0 */ int duration; - /* 3FA4 */ float unknown_3FA4; - /* 3FA8 */ float unknown_3FA8; - /* 3FAC */ float unknown_3FAC; - /* 3FB0 */ float unknown_3FB0; + /* 3FA4 */ float rotationAngle; + /* 3FA8 */ float pitch; + /* 3FAC */ float yaw; + /* 3FB0 */ float scale; /* 3FB4 */ float remainingTime; /* 3FB8 */ unsigned char unknown_3FB8[0x30]; - /* 3FE8 */ unsigned char unknown_3FE8; - /* 3FE9 */ unsigned char unknown_3FE9; - /* 3FEA */ unsigned char unknown_3FEA; - /* 3FEB */ unsigned char unknown_3FEB; + /* 3FE8 */ unsigned char flipX; + /* 3FE9 */ unsigned char flipY; + /* 3FEA */ unsigned char repeatFrame; + /* 3FEB */ unsigned char followGround; }; #if defined(_WIN32) && !defined(_WIN64) @@ -54,8 +54,8 @@ static_assert(offsetof(EZ2STREmitter, elapsed) == 0xE8); static_assert(offsetof(EZ2STREmitter, velocity) == 0x2C8); static_assert(offsetof(EZ2STREmitter, speed) == 0x2D8); static_assert(offsetof(EZ2STREmitter, currentFrame) == 0x3CC4); -static_assert(offsetof(EZ2STREmitter, unknown_3F58) == 0x3F58); -static_assert(offsetof(EZ2STREmitter, unknown_3FEB) == 0x3FEB); +static_assert(offsetof(EZ2STREmitter, playbackState) == 0x3F58); +static_assert(offsetof(EZ2STREmitter, followGround) == 0x3FEB); #endif #endif diff --git a/Source/Contents/Effects/EffectLists.cpp b/Source/Contents/Effects/EffectLists.cpp index e89af9625..2262e18b5 100644 --- a/Source/Contents/Effects/EffectLists.cpp +++ b/Source/Contents/Effects/EffectLists.cpp @@ -190,7 +190,7 @@ CEffect* EffectLists::Find(int actor, int instance, int id) const { if (found != this->active.end()) { for (CEffect* effect : found->second) { - if (effect->id == id && effect->unknown_00C4 == instance) { + if (effect->id == id && effect->instanceId == instance) { return effect; } } @@ -373,10 +373,10 @@ CEffect* EffectLists::Spawn(int actor, int id, float x, float y, float z, std::u effect->position[2] = z; effect->SetId(id); if (frame != -1) { - effect->unknown_00B0 = frame; + effect->effectLevel = frame; } if (instance > 0) { - effect->unknown_00C4 = instance; + effect->instanceId = instance; effect->retained = 1; } effect->Open(); diff --git a/Source/Contents/Effects/EffectMaker.cpp b/Source/Contents/Effects/EffectMaker.cpp index 3a2c63f3d..37695862c 100644 --- a/Source/Contents/Effects/EffectMaker.cpp +++ b/Source/Contents/Effects/EffectMaker.cpp @@ -28,25 +28,25 @@ namespace { // OFFSET: 0x00E4A2B0 // FUNCTION: fn_24251 CEffectMaker::CEffectMaker() { - this->unknown_0160 = -1; - this->unknown_015C = 360; - this->unknown_0158 = 360; - this->unknown_0164 = 0; - this->unknown_0168 = 0; - this->unknown_016C = 0; - this->unknown_0170 = 0; + this->effectId = -1; + this->spawnInterval = 360; + this->elapsedFrames = 360; + this->parameter1 = 0; + this->parameter2 = 0; + this->parameter3 = 0; + this->parameter4 = 0; } // OFFSET: 0x00E4BA80 // FUNCTION: fn_24278 void CEffectMaker::Reset() { - this->unknown_0160 = -1; - this->unknown_015C = 360; - this->unknown_0158 = 360; - this->unknown_0164 = 0; - this->unknown_0168 = 0; - this->unknown_016C = 0; - this->unknown_0170 = 0; + this->effectId = -1; + this->spawnInterval = 360; + this->elapsedFrames = 360; + this->parameter1 = 0; + this->parameter2 = 0; + this->parameter3 = 0; + this->parameter4 = 0; } // OFFSET: 0x00E4C210 @@ -54,15 +54,15 @@ void CEffectMaker::Reset() { bool CEffectMaker::OnProcess() { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); CPlayer* player = mode->scene->player; - if (this->CalcDist(player->render.position.x, player->render.position.z) < 130.0f && this->unknown_0158 >= this->unknown_015C) { - this->unknown_0158 = 0; - CRagEffect* effect = this->LaunchEffect(this->unknown_0160, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + if (this->CalcDist(player->render.position.x, player->render.position.z) < 130.0f && this->elapsedFrames >= this->spawnInterval) { + this->elapsedFrames = 0; + CRagEffect* effect = this->LaunchEffect(this->effectId, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); if (effect != nullptr) { - effect->SendMsg(nullptr, AM_SETPARAM, 0, reinterpret_cast(&this->unknown_0164), 0, 0, 0, 0); + effect->SendMsg(nullptr, AM_SETPARAM, 0, reinterpret_cast(&this->parameter1), 0, 0, 0, 0); } } - ++this->unknown_0158; + ++this->elapsedFrames; return true; } @@ -80,21 +80,21 @@ void CEffectMaker::SendMsg(CGameObject* sender, int message, int a, int b, int c } const WorldEffectRecord* record = reinterpret_cast(b); - this->unknown_0160 = record->id; + this->effectId = record->id; if (record->id != 45) { - this->unknown_015C = static_cast(record->delay); - this->unknown_0158 = static_cast(record->delay - static_cast(RandomBelow(24))); + this->spawnInterval = static_cast(record->delay); + this->elapsedFrames = static_cast(record->delay - static_cast(RandomBelow(24))); } else { const int jitter = RandomBelow(static_cast(record->delay / 10.0f)); - this->unknown_015C = static_cast(static_cast(jitter) + record->delay - record->delay / 20.0f); - this->unknown_0158 = RandomBelow(static_cast(record->delay + 1.0f)); + this->spawnInterval = static_cast(static_cast(jitter) + record->delay - record->delay / 20.0f); + this->elapsedFrames = RandomBelow(static_cast(record->delay + 1.0f)); } this->render.position.x = record->position[0]; this->render.position.y = record->position[1]; this->render.position.z = record->position[2]; - this->unknown_0164 = record->parameters[0]; - this->unknown_0168 = record->parameters[1]; - this->unknown_016C = record->parameters[2]; - this->unknown_0170 = record->parameters[3]; + this->parameter1 = record->parameters[0]; + this->parameter2 = record->parameters[1]; + this->parameter3 = record->parameters[2]; + this->parameter4 = record->parameters[3]; } diff --git a/Source/Contents/Effects/EffectMaker.h b/Source/Contents/Effects/EffectMaker.h index 4ec1b06e1..c5dbf14a2 100644 --- a/Source/Contents/Effects/EffectMaker.h +++ b/Source/Contents/Effects/EffectMaker.h @@ -13,18 +13,18 @@ struct CEffectMaker : EffectActor { void Reset(); - /* 0158 */ unsigned unknown_0158; - /* 015C */ unsigned unknown_015C; - /* 0160 */ int unknown_0160; - /* 0164 */ float unknown_0164; - /* 0168 */ float unknown_0168; - /* 016C */ float unknown_016C; - /* 0170 */ float unknown_0170; + /* 0158 */ unsigned elapsedFrames; + /* 015C */ unsigned spawnInterval; + /* 0160 */ int effectId; + /* 0164 */ float parameter1; + /* 0168 */ float parameter2; + /* 016C */ float parameter3; + /* 0170 */ float parameter4; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(CEffectMaker, unknown_0158) == 0x158); -static_assert(offsetof(CEffectMaker, unknown_0170) == 0x170); +static_assert(offsetof(CEffectMaker, elapsedFrames) == 0x158); +static_assert(offsetof(CEffectMaker, parameter4) == 0x170); #endif #endif diff --git a/Source/Contents/Effects/EffectMemoryMgr.cpp b/Source/Contents/Effects/EffectMemoryMgr.cpp index cae4fb2b2..21eb8b517 100644 --- a/Source/Contents/Effects/EffectMemoryMgr.cpp +++ b/Source/Contents/Effects/EffectMemoryMgr.cpp @@ -225,7 +225,7 @@ __declspec(noinline) void CEffectMemoryMgr::Free(int type, CParticle* particle) // FUNCTION: fn_19290 CParticle* CreateEZ2STRParticle(const vector3d* position, int flags) { CParticle* particle = g_effectMemoryMgr->Alloc(2); - particle->unknown_02B0 = 2; + particle->poolIndex = 2; particle->position = *position; particle->flags = flags; return particle; @@ -235,7 +235,7 @@ CParticle* CreateEZ2STRParticle(const vector3d* position, int flags) { // FUNCTION: fn_19291 CParticle* CreateMultiTexParticle(const vector3d* position, int flags) { CParticle* particle = g_effectMemoryMgr->Alloc(3); - particle->unknown_02B0 = 3; + particle->poolIndex = 3; particle->position = *position; particle->flags = flags; return particle; @@ -245,7 +245,7 @@ CParticle* CreateMultiTexParticle(const vector3d* position, int flags) { // FUNCTION: fn_19292 CParticle* CreateParticle(const vector3d* position, int flags) { CParticle* particle = g_effectMemoryMgr->Alloc(0); - particle->unknown_02B0 = 0; + particle->poolIndex = 0; particle->position = *position; particle->flags = flags; return particle; @@ -255,7 +255,7 @@ CParticle* CreateParticle(const vector3d* position, int flags) { // FUNCTION: fn_19293 CParticle* CreateSpriteParticle(const vector3d* position, int flags) { CParticle* particle = g_effectMemoryMgr->Alloc(1); - particle->unknown_02B0 = 1; + particle->poolIndex = 1; particle->position = *position; particle->flags = flags; return particle; @@ -267,5 +267,5 @@ void FreeParticle(CParticle* particle) { if (particle) { particle->ReleaseResource(); } - g_effectMemoryMgr->Free(particle->unknown_02B0, particle); + g_effectMemoryMgr->Free(particle->poolIndex, particle); } diff --git a/Source/Contents/Effects/EffectPrim.cpp b/Source/Contents/Effects/EffectPrim.cpp index dd1634e3e..cd6ba0334 100644 --- a/Source/Contents/Effects/EffectPrim.cpp +++ b/Source/Contents/Effects/EffectPrim.cpp @@ -12,15 +12,15 @@ __forceinline EffectPrimitiveState::EffectPrimitiveState(RenderObjectState& rend this->count = 0; this->pattern = 0; this->renderFlag = 1; - this->unknown_014C.x = 0; - this->unknown_014C.y = 0; - this->unknown_014C.z = 0; + this->changeFlags.x = 0; + this->changeFlags.y = 0; + this->changeFlags.z = 0; this->chRadiSpeed = 0; this->isDisappear = 0; - this->unknown_0138 = 0; + this->changePointReached = 0; this->master = nullptr; this->chCnt = 0; - this->unknown_01D8 = 0; + this->colorCycleIndex = 0; this->stateCnt = 0; this->radius = 0; this->minRadius = 0; @@ -96,12 +96,12 @@ __forceinline EffectPrimitiveState::EffectPrimitiveState(RenderObjectState& rend render.curMotion = 0; this->totalTexture = 1; this->v1 = 0; - this->unknown_02DC = 0; + this->u1Bits = 0; this->v2 = 1.0f; this->u2 = 1.0f; - this->unknown_01C8[0] = 0; - this->unknown_FA10 = 0; - this->unknown_FA14 = 0; + this->useRenderFlag[0] = 0; + this->spriteLiftLow = 0; + this->spriteLiftHigh = 0; this->speed3d = {}; this->orgPos = {}; diff --git a/Source/Contents/Effects/EffectPrimitiveArcs.cpp b/Source/Contents/Effects/EffectPrimitiveArcs.cpp index d779b28c4..4cdd9f13e 100644 --- a/Source/Contents/Effects/EffectPrimitiveArcs.cpp +++ b/Source/Contents/Effects/EffectPrimitiveArcs.cpp @@ -325,7 +325,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSprites(matrix& wtm) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const double scale = record.scale; const float top = static_cast(cell.y * scale * cell.scaleY * distanceScale + screenY); - const float bottom = static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); + const float bottom = static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f) { continue; } @@ -333,14 +333,14 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSprites(matrix& wtm) { float left; float right; if ((cell.mirrored & 1) != 0) { - left = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + left = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); right = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); if (right >= static_cast(g_renderer->viewport.width) || left <= 0.0f) { continue; } } else { left = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); - right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); if (left >= static_cast(g_renderer->viewport.width) || right <= 0.0f) { continue; } @@ -361,7 +361,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSprites(matrix& wtm) { } else if (slot.flag1[0] == 1) { quad.color = (alpha << 24) + 0x3737FF; } - quad.angle = static_cast(cell.unknown_001C) + this->state.roll; + quad.angle = static_cast(cell.rotation) + this->state.roll; quad.image = image; this->DrawQuad(quad, sprite->palette, 5, 0.0f, 0.0f, 0); @@ -379,7 +379,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSprites(matrix& wtm) { } else if (slot.flag1[0] == 1) { quad.color = (alpha << 24) + 0x3737FF; } - quad.angle = static_cast(cell.unknown_001C) + this->state.roll; + quad.angle = static_cast(cell.rotation) + this->state.roll; quad.image = image; this->DrawQuad(quad, sprite->palette, 5, 0.0f, 0.0f, 0); } @@ -1687,7 +1687,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSpriteGlow(matrix& wtm) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const double scale = record.scale; const float top = static_cast(cell.y * scale * cell.scaleY * distanceScale + screenY); - const float bottom = static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); + const float bottom = static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f) { continue; } @@ -1695,14 +1695,14 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSpriteGlow(matrix& wtm) { float left; float right; if ((cell.mirrored & 1) != 0) { - left = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + left = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); right = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); if (right >= static_cast(g_renderer->viewport.width) || left <= 0.0f) { continue; } } else { left = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); - right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); if (left >= static_cast(g_renderer->viewport.width) || right <= 0.0f) { continue; } @@ -1715,7 +1715,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSpriteGlow(matrix& wtm) { quad.right = right; quad.bottomRhw = 1.0f / ((bottom - screenY) * g_tangent + depth); quad.topRhw = 1.0f / ((top - screenY) * g_tangent + depth); - quad.angle = static_cast(cell.unknown_001C) + this->state.roll; + quad.angle = static_cast(cell.rotation) + this->state.roll; unsigned char red = static_cast(cell.color); unsigned char green = static_cast(cell.color >> 8); @@ -1735,7 +1735,7 @@ __declspec(safebuffers) void CEffectPrim::RenderSegmentSpriteGlow(matrix& wtm) { glow.bottomRhw = 1.0f / ((bottom - screenY) * g_tangent + depth) + 0.0001f; glow.topRhw = 1.0f / ((top - screenY) * g_tangent + depth) + 0.0001f; glow.color = color; - glow.angle = static_cast(cell.unknown_001C) + this->state.roll; + glow.angle = static_cast(cell.rotation) + this->state.roll; this->DrawQuad(glow, sprite->palette, 5, 0.0f, 0.0f, 0); } } diff --git a/Source/Contents/Effects/EffectPrimitiveColor.cpp b/Source/Contents/Effects/EffectPrimitiveColor.cpp index 33f50408e..052d38ecf 100644 --- a/Source/Contents/Effects/EffectPrimitiveColor.cpp +++ b/Source/Contents/Effects/EffectPrimitiveColor.cpp @@ -5,30 +5,30 @@ // OFFSET: 0x00BC5E00 // FUNCTION: fn_19849 void EffectPrimitiveState::ProcessAlpha() { - if (this->unknown_014C.z != 0) { - int index = this->unknown_01D8; + if (this->changeFlags.z != 0) { + int index = this->colorCycleIndex; if (index < 0 || static_cast(index) > this->chPoint.size() - 1) { - this->unknown_01D8 = 0; + this->colorCycleIndex = 0; index = 0; } if (static_cast(this->stateCnt) == this->chPoint[index]) { this->alpha = this->chVal1[index]; this->maxAlpha = this->chVal2[index]; - this->unknown_01D8 = index + 1; + this->colorCycleIndex = index + 1; } - } else if (this->unknown_014C.y != 0) { - int index = this->unknown_01D8; + } else if (this->changeFlags.y != 0) { + int index = this->colorCycleIndex; if (index < 0 || static_cast(index) >= this->chPoint.size()) { - this->unknown_01D8 = 0; + this->colorCycleIndex = 0; index = 0; } if (static_cast(this->stateCnt) == this->chPoint[index]) { this->alphaSpeed = this->chVal1[index]; - this->unknown_01D8 = index + 1; + this->colorCycleIndex = index + 1; } } diff --git a/Source/Contents/Effects/EffectPrimitiveMotion.cpp b/Source/Contents/Effects/EffectPrimitiveMotion.cpp index 88ebbee98..9523a7fd8 100644 --- a/Source/Contents/Effects/EffectPrimitiveMotion.cpp +++ b/Source/Contents/Effects/EffectPrimitiveMotion.cpp @@ -114,7 +114,7 @@ bool CEffectPrim::MoveEffectPrimitive() { }; if (this->state.changePoint == this->state.stateCnt) { - this->state.unknown_0138 = 1; + this->state.changePointReached = 1; constexpr float sentinel = 0.0001f; if (this->state.changeWidthSpeed != sentinel) { @@ -193,7 +193,7 @@ bool CEffectPrim::MoveEffectPrimitive() { if ((this->state.pattern & 0x400u) != 0) { if (3.0f >= this->CalcDist(this->state.master->state.deltaPos[0], this->state.master->state.deltaPos[2])) { - this->state.unknown_014C.x = std::bit_cast(1u); + this->state.changeFlags.x = std::bit_cast(1u); return false; } @@ -2576,7 +2576,7 @@ bool CEffectPrim::Prim3DTextureNoMaster() { if ((particle.pattern & 0x400u) != 0) { if (3.0f >= this->CalcDist(particle.master->state.deltaPos[0], particle.master->state.deltaPos[2])) { - particle.unknown_014C.x = std::bit_cast(1u); + particle.changeFlags.x = std::bit_cast(1u); return false; } @@ -2822,18 +2822,18 @@ bool CEffectPrim::Prim3DParticleOrbit() { } if (this->state.chRadiSpeed != 0) { - int index = this->state.unknown_01D8; + int index = this->state.colorCycleIndex; const std::uint32_t count = static_cast(this->state.chPoint.size()); if (index < 0 || static_cast(index) >= count) { index = 0; - this->state.unknown_01D8 = 0; + this->state.colorCycleIndex = 0; } if (static_cast(frame) == this->state.chPoint[index]) { this->state.radiusSpeed = this->state.chVal1[index]; this->state.radiusAccel = this->state.chVal2[index]; - this->state.unknown_01D8 = index + 1; + this->state.colorCycleIndex = index + 1; } } @@ -2906,7 +2906,7 @@ void CEffectPrim::ShiftSegment() { record.corners[corner] = previous.corners[corner]; } - record.unknown_003C = previous.unknown_003C; + record.radius = previous.radius; record.angle = previous.angle; std::memcpy(record.matrix, previous.matrix, sizeof(record.matrix)); record.alpha = this->state.alpha - this->state.alpha / static_cast(count) * static_cast(index); @@ -2927,7 +2927,7 @@ void CEffectPrim::ShiftSegment() { first.corners[corner] = this->state.segPos[corner]; } - first.unknown_003C = this->state.radius; + first.radius = this->state.radius; first.scale = this->state.size; first.angle = this->state.longitude; std::memcpy(first.matrix, this->state.transform, sizeof(first.matrix)); @@ -7719,7 +7719,7 @@ bool CEffectPrim::Move2DPrimitive() { } if (effect != g_activeSkillEffects.end()) { - const std::uint32_t expiration = effect->unknown_0004; + const std::uint32_t expiration = effect->expiration; const DWORD now = timeGetTime(); if (expiration > now || g_replayAnimationScaling != 0) { diff --git a/Source/Contents/Effects/EffectPrimitiveRecords.cpp b/Source/Contents/Effects/EffectPrimitiveRecords.cpp index 6453c72db..a3a93e213 100644 --- a/Source/Contents/Effects/EffectPrimitiveRecords.cpp +++ b/Source/Contents/Effects/EffectPrimitiveRecords.cpp @@ -11,7 +11,7 @@ void CEffectPrim::InitSegment() { EffectPrimitiveRecord& record = this->state.records[index]; record.position = this->render.position; std::memcpy(record.corners, this->state.segPos, sizeof(record.corners)); - record.unknown_003C = this->state.radius; + record.radius = this->state.radius; record.scale = this->state.size; record.angle = this->state.longitude; std::memcpy(record.matrix, this->state.transform, sizeof(record.matrix)); diff --git a/Source/Contents/Effects/EffectPrimitiveRendering.cpp b/Source/Contents/Effects/EffectPrimitiveRendering.cpp index e1a31b8df..251dd81e4 100644 --- a/Source/Contents/Effects/EffectPrimitiveRendering.cpp +++ b/Source/Contents/Effects/EffectPrimitiveRendering.cpp @@ -797,18 +797,18 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( const RagEffectState& master = this->state.master->state; const int blend = pw != 0 ? 6 : 2; int red = r; - if (master.unknown_11C88[0] != -1) { - red = static_cast(master.unknown_11C88[0]); + if (master.colorChannels[0] != -1) { + red = static_cast(master.colorChannels[0]); } int green = g; - if (master.unknown_11C88[1] != -1) { - green = static_cast(master.unknown_11C88[1]); + if (master.colorChannels[1] != -1) { + green = static_cast(master.colorChannels[1]); } int blue = b; - if (master.unknown_11C88[2] != -1) { - blue = static_cast(master.unknown_11C88[2]); + if (master.colorChannels[2] != -1) { + blue = static_cast(master.colorChannels[2]); } - int destBlend = master.unknown_11C88[3]; + int destBlend = master.colorChannels[3]; if (destBlend == -1) { destBlend = blend; } @@ -840,11 +840,11 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( RenderTriangle& triangle = this->state.triangles[*rpCnt]; if (pw == 10) { - triangle.unknown_0064 = 2; - triangle.unknown_0068 = 1; + triangle.sourceBlend = 2; + triangle.destinationBlend = 1; } else { - triangle.unknown_0064 = 5; - triangle.unknown_0068 = pw == 99 ? 6 : destBlend; + triangle.sourceBlend = 5; + triangle.destinationBlend = pw == 99 ? 6 : destBlend; } RenderVertex first{}; @@ -885,7 +885,7 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( triangle.vertices[2].x = center.x - width; for (int index = 0; index < 3; ++index) { - triangle.vertices[index].y += static_cast(-30 * g_renderer->viewport.height / 480) * this->render.unknown_005C; + triangle.vertices[index].y += static_cast(-30 * g_renderer->viewport.height / 480) * this->render.distanceScale; } } @@ -907,11 +907,11 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( RenderTriangle& triangle = this->state.triangles[*rpCnt]; if (pw == 10) { - triangle.unknown_0064 = 2; - triangle.unknown_0068 = 1; + triangle.sourceBlend = 2; + triangle.destinationBlend = 1; } else { - triangle.unknown_0064 = 5; - triangle.unknown_0068 = pw == 99 ? 6 : destBlend; + triangle.sourceBlend = 5; + triangle.destinationBlend = pw == 99 ? 6 : destBlend; } RenderVertex first{}; @@ -952,7 +952,7 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( triangle.vertices[2].x = center.x + width; for (int index = 0; index < 3; ++index) { - triangle.vertices[index].y += static_cast(-30 * g_renderer->viewport.height / 480) * this->render.unknown_005C; + triangle.vertices[index].y += static_cast(-30 * g_renderer->viewport.height / 480) * this->render.distanceScale; } } @@ -1192,17 +1192,17 @@ void CEffectPrim::RenderTeiRect( } const RagEffectState& master = this->state.master->state; - if (master.unknown_11C88[3] != -1) { - blend = master.unknown_11C88[3]; + if (master.colorChannels[3] != -1) { + blend = master.colorChannels[3]; } - if (master.unknown_11C88[0] != -1) { - red = master.unknown_11C88[0]; + if (master.colorChannels[0] != -1) { + red = master.colorChannels[0]; } - if (master.unknown_11C88[1] != -1) { - green = master.unknown_11C88[1]; + if (master.colorChannels[1] != -1) { + green = master.colorChannels[1]; } - if (master.unknown_11C88[2] != -1) { - blue = master.unknown_11C88[2]; + if (master.colorChannels[2] != -1) { + blue = master.colorChannels[2]; } const std::uint32_t color = static_cast(((((alpha << 8) + red) << 8) + green) << 8) + blue; @@ -1245,8 +1245,8 @@ void CEffectPrim::RenderTeiRect( for (int half = 0; half < 2; ++half) { RenderTriangle& triangle = this->state.triangles[*rpCnt]; - triangle.unknown_0064 = 5; - triangle.unknown_0068 = blend; + triangle.sourceBlend = 5; + triangle.destinationBlend = blend; for (int index = 0; index < 3; ++index) { RenderVertex& vertex = triangle.vertices[index]; @@ -1275,10 +1275,10 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( ) { const RagEffectState& master = this->state.master->state; const int blend = pw != 0 ? 6 : 2; - const int red = master.unknown_11C88[0] != -1 ? static_cast(master.unknown_11C88[0]) : r; - const int green = master.unknown_11C88[1] != -1 ? static_cast(master.unknown_11C88[1]) : g; - const int blue = master.unknown_11C88[2] != -1 ? static_cast(master.unknown_11C88[2]) : b; - const int destBlend = master.unknown_11C88[3] != -1 ? master.unknown_11C88[3] : blend; + const int red = master.colorChannels[0] != -1 ? static_cast(master.colorChannels[0]) : r; + const int green = master.colorChannels[1] != -1 ? static_cast(master.colorChannels[1]) : g; + const int blue = master.colorChannels[2] != -1 ? static_cast(master.colorChannels[2]) : b; + const int destBlend = master.colorChannels[3] != -1 ? master.colorChannels[3] : blend; if (*rpCnt >= 510) { return; @@ -1307,8 +1307,8 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( vec4.z += position.z; alignas(16) RenderVertex vertex; - this->state.triangles[*rpCnt].unknown_0064 = 5; - this->state.triangles[*rpCnt].unknown_0068 = destBlend; + this->state.triangles[*rpCnt].sourceBlend = 5; + this->state.triangles[*rpCnt].destinationBlend = destBlend; vertex = {0.0f, 0.0f, 0.0f, 0.0f, 0, 0xFF000000, 0.0f, 0.0f}; g_renderer->viewport.Project(&vec1.x, wtm.values, vertex); this->state.triangles[*rpCnt].vertices[0] = vertex; @@ -1336,8 +1336,8 @@ __declspec(safebuffers) void CEffectPrim::RenderTeiRect( ++*rpCnt; } - this->state.triangles[*rpCnt].unknown_0064 = 5; - this->state.triangles[*rpCnt].unknown_0068 = destBlend; + this->state.triangles[*rpCnt].sourceBlend = 5; + this->state.triangles[*rpCnt].destinationBlend = destBlend; vertex = {0.0f, 0.0f, 0.0f, 0.0f, 0, 0xFF000000, 0.0f, 0.0f}; g_renderer->viewport.Project(&vec4.x, wtm.values, vertex); this->state.triangles[*rpCnt].vertices[0] = vertex; @@ -5295,8 +5295,8 @@ void CEffectPrim::RenderRecordRings(matrix& wtm) { for (int index = 0; index < this->state.numSegment; ++index) { const EffectPrimitiveRecord& record = this->state.records[index]; - const float inner = record.unknown_003C - this->state.size; - const float outer = record.unknown_003C; + const float inner = record.radius - this->state.size; + const float outer = record.radius; for (float i = 0.0f; last >= i; i += this->state.arcAngle) { const int angle1 = static_cast(i); @@ -5585,8 +5585,8 @@ void CEffectPrim::RenderPyramid(matrix& wtm) { if (triangle->Visible()) { RenderTriangle& submitted = *triangle++; if (this->state.slots[0].flag1[0] == 3) { - submitted.unknown_0064 = 5; - submitted.unknown_0068 = 2; + submitted.sourceBlend = 5; + submitted.destinationBlend = 2; g_renderer->queues.SubmitTriangle(submitted, 5, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } else { g_renderer->queues.SubmitTriangle(submitted, 1, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); @@ -6661,7 +6661,7 @@ void CEffectPrim::Render2DPrimitive() { tri0.texture = this->state.textures[this->render.curMotion]; - const std::uint16_t flag1 = (this->state.unknown_01C8[0] == 0) ? 1 : static_cast(this->state.renderFlag); + const std::uint16_t flag1 = (this->state.useRenderFlag[0] == 0) ? 1 : static_cast(this->state.renderFlag); g_renderer->queues.SubmitTriangle(tri0, flag1, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); RenderTriangle& tri1 = this->state.triangles[1]; @@ -6691,13 +6691,13 @@ void CEffectPrim::Render2DPrimitive() { tri1.texture = this->state.textures[this->render.curMotion]; - const std::uint16_t flag2 = (this->state.unknown_01C8[0] == 0) ? 1 : static_cast(this->state.renderFlag); + const std::uint16_t flag2 = (this->state.useRenderFlag[0] == 0) ? 1 : static_cast(this->state.renderFlag); g_renderer->queues.SubmitTriangle(tri1, flag2, g_renderer->commands, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); if (this->state.slots[0].life == 'b') { for (const ActiveSkillEffect& effect : g_activeSkillEffects) { if (effect.id == static_cast(this->state.slots[0].rotStart)) { - const std::uint32_t expire = effect.unknown_0004; + const std::uint32_t expire = effect.expiration; bool match = false; if (timeGetTime() < expire && expire != 999999 && expire != 0) { match = true; @@ -6753,7 +6753,7 @@ void CEffectPrim::RenderSegmentSprites2(matrix& wtm) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const double scale = record.scale; const float top = static_cast(cell.y * scale * cell.scaleY * distanceScale + screenY); - const float bottom = static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); + const float bottom = static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f) { continue; } @@ -6762,12 +6762,12 @@ void CEffectPrim::RenderSegmentSprites2(matrix& wtm) { float right; if ((cell.mirrored & 1) == 0) { left = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); - right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); if (left >= static_cast(g_renderer->viewport.width)) { continue; } } else { - left = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + left = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); right = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); if (right >= static_cast(g_renderer->viewport.width)) { continue; @@ -6790,7 +6790,7 @@ void CEffectPrim::RenderSegmentSprites2(matrix& wtm) { } else { quad.color = (cell.color & 0xFF00FF00) | ((cell.color & 0xFF) << 16) | ((cell.color >> 16) & 0xFF); } - quad.angle = static_cast(cell.unknown_001C) + this->state.roll; + quad.angle = static_cast(cell.rotation) + this->state.roll; quad.image = image; this->DrawQuad(quad, sprite->palette, this->state.renderFlag, 0.0f, 0.0f, 0); } diff --git a/Source/Contents/Effects/EffectPrimitiveSprites.cpp b/Source/Contents/Effects/EffectPrimitiveSprites.cpp index 9d8ff49a8..99e791459 100644 --- a/Source/Contents/Effects/EffectPrimitiveSprites.cpp +++ b/Source/Contents/Effects/EffectPrimitiveSprites.cpp @@ -161,10 +161,10 @@ __declspec(safebuffers) void CEffectPrim::RenderGroundSprite(matrix& wtm) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const double factor = distanceScale; const float left = static_cast(cell.x * factor * cell.scaleX + screenX); - const float right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * factor * cell.scaleX + screenX + 1.0); - const float lift = static_cast(static_cast(*reinterpret_cast(&this->state.unknown_FA10))); + const float right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * factor * cell.scaleX + screenX + 1.0); + const float lift = static_cast(static_cast(*reinterpret_cast(&this->state.spriteLiftLow))); const float top = static_cast(cell.y * factor * cell.scaleY + screenY) - lift; - const float bottom = static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell.y) * factor * cell.scaleY + screenY + 1.0) - lift; + const float bottom = static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell.y) * factor * cell.scaleY + screenY + 1.0) - lift; if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f || left >= static_cast(g_renderer->viewport.width) || right <= 0.0f) { return; @@ -172,14 +172,14 @@ __declspec(safebuffers) void CEffectPrim::RenderGroundSprite(matrix& wtm) { SpriteQuad quad; quad.top = top; - quad.left = static_cast(static_cast(this->render.unknown_0078)) + left; + quad.left = static_cast(static_cast(this->render.spriteOffsetX)) + left; quad.bottom = bottom; - quad.right = static_cast(static_cast(this->render.unknown_0078)) + right; + quad.right = static_cast(static_cast(this->render.spriteOffsetX)) + right; const std::uint32_t color = static_cast(((static_cast(cell.color >> 24) << 8 | (cell.color & 0xFF)) << 8 | (cell.color >> 8 & 0xFF)) << 8) | (cell.color >> 16 & 0xFF); quad.bottomRhw = 1.0f / (depth - (bottom - screenY) * g_cotangent) + 0.00001f; quad.topRhw = 1.0f / (depth - (top - screenY) * g_cotangent) + 0.00001f; - quad.angle = static_cast(cell.unknown_001C); + quad.angle = static_cast(cell.rotation); const float alphaScale = static_cast(static_cast(this->state.alpha)) / 255.0f; quad.color = static_cast(static_cast(static_cast(alphaScale * static_cast(color >> 24)))) << 24 | (color & 0xFFFFFF); quad.image = image; @@ -239,7 +239,7 @@ void CEffectPrim::RenderSegmentSpriteTrail(matrix& wtm) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const double scale = record.scale; const float top = static_cast(cell.y * scale * cell.scaleY * distanceScale + screenY); - const float bottom = static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); + const float bottom = static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell.y) * scale * cell.scaleY * distanceScale + screenY); if (top >= static_cast(g_renderer->viewport.height) || bottom <= 0.0f) { continue; } @@ -247,14 +247,14 @@ void CEffectPrim::RenderSegmentSpriteTrail(matrix& wtm) { float left; float right; if ((cell.mirrored & 1) != 0) { - left = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + left = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); right = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); if (right >= static_cast(g_renderer->viewport.width) || left <= 0.0f) { continue; } } else { left = static_cast(cell.x * scale * cell.scaleX * distanceScale + screenX); - right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); + right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell.x) * scale * cell.scaleX * distanceScale + screenX); if (left >= static_cast(g_renderer->viewport.width) || right <= 0.0f) { continue; } @@ -264,7 +264,7 @@ void CEffectPrim::RenderSegmentSpriteTrail(matrix& wtm) { const unsigned char green = static_cast(cell.color >> 8); const unsigned char blue = static_cast(cell.color >> 16); const std::uint32_t color = (((((alpha << 8) + red) << 8) + green) << 8) + blue; - const float angle = static_cast(cell.unknown_001C) + this->state.roll; + const float angle = static_cast(cell.rotation) + this->state.roll; DrawTrailSpriteQuad(*this, slot.vecBPre, top, left, bottom, right, screenY, depth, 0.0001f, angle, color, image, sprite->palette, 0x101); const float glowTop = top - 2.0f; diff --git a/Source/Contents/Effects/EffectPrimitiveState.cpp b/Source/Contents/Effects/EffectPrimitiveState.cpp index a17a975e5..3d69a761b 100644 --- a/Source/Contents/Effects/EffectPrimitiveState.cpp +++ b/Source/Contents/Effects/EffectPrimitiveState.cpp @@ -34,16 +34,16 @@ EffectPrimitiveState::~EffectPrimitiveState() { // OFFSET: 0x00BAE460 // FUNCTION: fn_19765 void EffectPrimitiveState::GetColorOverride(unsigned char* red, unsigned char* green, unsigned char* blue) { - if (this->master->state.unknown_11C88[0] != -1) { - *red = static_cast(this->master->state.unknown_11C88[0]); + if (this->master->state.colorChannels[0] != -1) { + *red = static_cast(this->master->state.colorChannels[0]); } - if (this->master->state.unknown_11C88[1] != -1) { - *green = static_cast(this->master->state.unknown_11C88[1]); + if (this->master->state.colorChannels[1] != -1) { + *green = static_cast(this->master->state.colorChannels[1]); } - if (this->master->state.unknown_11C88[2] != -1) { - *blue = static_cast(this->master->state.unknown_11C88[2]); + if (this->master->state.colorChannels[2] != -1) { + *blue = static_cast(this->master->state.colorChannels[2]); } } diff --git a/Source/Contents/Effects/EffectPrimitiveState.h b/Source/Contents/Effects/EffectPrimitiveState.h index 94d28c593..71dae6d7b 100644 --- a/Source/Contents/Effects/EffectPrimitiveState.h +++ b/Source/Contents/Effects/EffectPrimitiveState.h @@ -15,7 +15,7 @@ class CTexture; struct EffectPrimitiveRecord { /* 0000 */ vector3d position; /* 000C */ vector3d corners[4]; - /* 003C */ float unknown_003C; + /* 003C */ float radius; /* 0040 */ float scale; /* 0044 */ float angle; /* 0048 */ float matrix[12]; @@ -59,23 +59,23 @@ struct EffectPrimitiveState { void ProcessAlpha(); void GetColorOverride(unsigned char* red, unsigned char* green, unsigned char* blue); - /* 0138 */ std::uint32_t unknown_0138; + /* 0138 */ std::uint32_t changePointReached; /* 013C */ std::uint32_t isChangeProcessed; /* 0140 */ CRagEffect* master; /* 0144 */ CTexture** textures; /* 0148 */ std::uint32_t playWaveName; - /* 014C */ vector3d unknown_014C; + /* 014C */ vector3d changeFlags; /* 0158 */ std::uint32_t chRadiSpeed; /* 015C */ std::uint32_t isDisappear; /* 0160 */ float transform[12]; /* 0190 */ float rotTransform[12]; /* 01C0 */ std::uint32_t argb; /* 01C4 */ std::uint32_t renderFlag; - /* 01C8 */ unsigned char unknown_01C8[4]; + /* 01C8 */ unsigned char useRenderFlag[4]; /* 01CC */ std::uint32_t type; /* 01D0 */ int count; /* 01D4 */ std::uint32_t chCnt; - /* 01D8 */ int unknown_01D8; + /* 01D8 */ int colorCycleIndex; /* 01DC */ std::uint32_t pattern; /* 01E0 */ int stateCnt; /* 01E4 */ int duration; @@ -118,7 +118,7 @@ struct EffectPrimitiveState { /* 02D0 */ float changeHeightAccel; /* 02D4 */ float maxAlpha; /* 02D8 */ float minAlpha; - /* 02DC */ std::uint32_t unknown_02DC; + /* 02DC */ std::uint32_t u1Bits; /* 02E0 */ float u2; /* 02E4 */ float v1; /* 02E8 */ float v2; @@ -165,8 +165,8 @@ struct EffectPrimitiveState { /* 03E8 */ EffectPrimitiveSlot slots[4]; /* 06B8 */ EffectPrimitiveRecord records[50]; /* 2210 */ RenderTriangle triangles[512]; - /* FA10 */ std::uint32_t unknown_FA10; - /* FA14 */ std::uint32_t unknown_FA14; + /* FA10 */ std::uint32_t spriteLiftLow; + /* FA14 */ std::uint32_t spriteLiftHigh; }; class CActRes; diff --git a/Source/Contents/Effects/EffectVisibility.cpp b/Source/Contents/Effects/EffectVisibility.cpp index 7cbfaf8c3..e926e8ebb 100644 --- a/Source/Contents/Effects/EffectVisibility.cpp +++ b/Source/Contents/Effects/EffectVisibility.cpp @@ -22,7 +22,7 @@ bool CRagEffect::PartyEffectVisible() { return false; } - if (target->render.unknown_00A8 != 0 && target->render.accountId != g_session.m_aid) { + if (target->render.isCharacter != 0 && target->render.accountId != g_session.m_aid) { if (!g_session.IsPvpMap() || !g_session.IsPartyMember(target->render.accountId, true)) { if (!target->EffectVisible()) { return false; @@ -37,11 +37,11 @@ bool CRagEffect::PartyEffectVisible() { return false; } - if (actor->render.unknown_00A8 == 0) { + if (actor->render.isCharacter == 0) { return true; } - if (this->state.unknown_11CA0 == 0) { + if (this->state.visibilityFlags == 0) { if (actor->render.accountId == g_session.m_aid) { return true; } diff --git a/Source/Contents/Effects/ElectricEffect.cpp b/Source/Contents/Effects/ElectricEffect.cpp index ab1e8664d..501c16202 100644 --- a/Source/Contents/Effects/ElectricEffect.cpp +++ b/Source/Contents/Effects/ElectricEffect.cpp @@ -26,21 +26,21 @@ void CElectricEffect::AddBolt(int tilt) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = row; - particle->unknown_0008 = strand; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = row; + particle->groupIndex = strand; particle->SetTexture("effect\\elec1.tga"); - particle->unknown_00C0 = 0.1f; + particle->speedParameter = 0.1f; particle->alpha = 0; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->scale = 0.0f; - *reinterpret_cast(&particle->unknown_00C4) = spin; - particle->unknown_0050 = 0; + *reinterpret_cast(&particle->angleBits) = spin; + particle->angleParameter = 0; InitParticleQuad(particle->vertices); this->bolts.push_back(particle); - float* arc = &particle->unknown_0054; + float* arc = &particle->animationParameter; arc[20] = 9.0f; for (int index = 20; index > 0; --index) { float value = arc[index] + 9.0f; @@ -69,7 +69,7 @@ void CElectricEffect::Close() { // OFFSET: 0x00B4EE80 // FUNCTION: fn_19004 void CElectricEffect::Open() { - this->unknown_002C = 300; + this->effectLifetime = 300; } // OFFSET: 0x00B4EF40 @@ -101,9 +101,9 @@ void CElectricEffect::OnProcess() { particle->position.z = this->position[2]; const float scale = particle->scale + 0.4f; - ++particle->unknown_00E8; + ++particle->elapsedFrames; int alpha = scale > 15.0f ? particle->alpha - 2 : particle->alpha; - if (particle->unknown_00E8 <= 25) { + if (particle->elapsedFrames <= 25) { alpha += 5 + (std::max)(rand() % 4, 0); } particle->scale = scale; @@ -114,18 +114,18 @@ void CElectricEffect::OnProcess() { rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); particle->transform = rotation; - const int segment = particle->unknown_000C; - const int strand = particle->unknown_0008; + const int segment = particle->columnIndex; + const int strand = particle->groupIndex; vector3d unused[2] = {}; if (strand == 0) { - const float* arc = &particle->unknown_0054; + const float* arc = &particle->animationParameter; for (int index = 0; index < 2; ++index) { const float bend = arc[segment + index]; const float radius = bend / 90.0f * particle->scale; - this->path[index].x = radius * g_cosTable[particle->unknown_004C]; - this->path[index].y = -particle->scale * g_sinTable[static_cast(bend)] * *reinterpret_cast(&particle->unknown_00C4); - this->path[index].z = radius * g_sinTable[particle->unknown_004C]; + this->path[index].x = radius * g_cosTable[particle->phaseParameter]; + this->path[index].y = -particle->scale * g_sinTable[static_cast(bend)] * *reinterpret_cast(&particle->angleBits); + this->path[index].z = radius * g_sinTable[particle->phaseParameter]; const int jitterZ = rand() % 7; const int jitterY = rand() % 7; @@ -153,7 +153,7 @@ void CElectricEffect::OnProcess() { } if (segment >= 1 && segment <= 18) { - const float radius = particle->unknown_00C0; + const float radius = particle->speedParameter; const float horizontal = radius * g_cosTable[strand * 120]; const float vertical = radius * g_sinTable[strand * 120]; const float offsetX = horizontal * g_cosTable[this->angle]; @@ -189,8 +189,8 @@ void CElectricEffect::OnProcess() { void CElectricEffect::Render() { for (auto it = this->bolts.begin(); it != this->bolts.end(); ++it) { CParticle* bolt = *it; - if (bolt && static_cast(bolt->unknown_000C - 1) <= 17 && bolt->unknown_0008 > 0) { - const int frame = bolt->unknown_000C; + if (bolt && static_cast(bolt->columnIndex - 1) <= 17 && bolt->groupIndex > 0) { + const int frame = bolt->columnIndex; const int alpha = bolt->alpha; const int faded = alpha - frame * 5; bolt->alpha = faded >= 0 ? faded : 0; @@ -201,8 +201,8 @@ void CElectricEffect::Render() { quad.depth = true; quad.left = 0.0f; quad.right = 1.0f; - quad.top = static_cast(bolt->unknown_000C - 1) / 21.0f; - quad.bottom = static_cast(bolt->unknown_000C) / 21.0f; + quad.top = static_cast(bolt->columnIndex - 1) / 21.0f; + quad.bottom = static_cast(bolt->columnIndex) / 21.0f; bolt->Render(quad); bolt->alpha = alpha; } diff --git a/Source/Contents/Effects/EmitterEffect.cpp b/Source/Contents/Effects/EmitterEffect.cpp index 37b9d42e6..3e08fdc5f 100644 --- a/Source/Contents/Effects/EmitterEffect.cpp +++ b/Source/Contents/Effects/EmitterEffect.cpp @@ -39,7 +39,7 @@ void CEmitterEffect::Open() { for (int i = 0; i < this->count; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_00C0 = this->particleSpeed; + particle->speedParameter = this->particleSpeed; this->InitParticle(particle); this->pool.Add(particle); this->particles.push_back(particle); @@ -56,17 +56,17 @@ void CEmitterEffect::InitParticle(CParticle* particle) { particle->SetTexture(this->texture.c_str()); particle->life = RandomRange(this->lifeMin, this->lifeMax); particle->scale = RandomRange(this->scaleMin, this->scaleMax); - particle->unknown_0030.x = RandomRange(this->velocityMin.x, this->velocityMax.x); - particle->unknown_0030.y = RandomRange(this->velocityMin.y, this->velocityMax.y); - particle->unknown_0030.z = RandomRange(this->velocityMin.z, this->velocityMax.z); + particle->motionVelocity.x = RandomRange(this->velocityMin.x, this->velocityMax.x); + particle->motionVelocity.y = RandomRange(this->velocityMin.y, this->velocityMax.y); + particle->motionVelocity.z = RandomRange(this->velocityMin.z, this->velocityMax.z); const float x = RandomRange(-this->spread.x, this->spread.x); const float y = RandomRange(-this->spread.y, this->spread.y) - 10.0f; const float z = RandomRange(-this->spread.z, this->spread.z); - particle->unknown_00D0 = 0.0f + x; - particle->unknown_00D4 = 0.0f + y; + particle->offsetX = 0.0f + x; + particle->offsetY = 0.0f + y; particle->alpha = 0; - particle->unknown_00D8 = 0.0f + z; - particle->unknown_00E8 = 0; + particle->offsetZ = 0.0f + z; + particle->elapsedFrames = 0; if (this->sourceBlend != -1) { particle->sourceBlend = this->sourceBlend; @@ -87,7 +87,7 @@ void CEmitterEffect::ResetParticles() { CParticle* particle = *it; this->InitParticle(particle); if (this->pool.IsActive(particle) == true && - (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->unknown_00E8) || this->fixedAlpha == 1)) { + (particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->elapsedFrames) || this->fixedAlpha == 1)) { particle->alpha = this->alpha; } } @@ -106,7 +106,7 @@ bool CEmitterEffect::IsAlive() { // OFFSET: 0x00B50390 // FUNCTION: fn_19016 void CEmitterEffect::OnProcess() { - if (!this->unknown_00C1) { + if (!this->emissionStopped) { const float rate = static_cast(static_cast(RandomRange(this->rateMin, this->rateMax))) * this->timeScale; int spawn = static_cast(rate); float carry = rate - static_cast(spawn) + this->emitCarry; @@ -160,9 +160,9 @@ void CEmitterEffect::UpdateParticle(CParticle* particle) { particle->position.z = this->position[2]; if (this->pool.IsActive(particle) == true) { - const int age = particle->unknown_00E8; + const int age = particle->elapsedFrames; - if (particle->life != 0.0f && !(particle->life * 60.0f > static_cast(age)) && (!this->fixedAlpha || this->unknown_00C1)) { + if (particle->life != 0.0f && !(particle->life * 60.0f > static_cast(age)) && (!this->fixedAlpha || this->emissionStopped)) { this->pool.Release(particle); } else { particle->SetColor(static_cast(this->red), static_cast(this->green), static_cast(this->blue)); @@ -181,16 +181,16 @@ void CEmitterEffect::UpdateParticle(CParticle* particle) { } const float step = this->timeScale; - const float speed = particle->unknown_00C0; - particle->unknown_00D4 += particle->unknown_0030.y * speed * step; - particle->unknown_00D8 += particle->unknown_0030.z * speed * step; - particle->unknown_00D0 += particle->unknown_0030.x * speed * step; - particle->position.y += particle->unknown_00D4; - particle->position.z += particle->unknown_00D8; - particle->position.x += particle->unknown_00D0; - particle->unknown_0030.x += step * this->acceleration.x; - particle->unknown_0030.y += step * this->acceleration.y; - particle->unknown_0030.z += step * this->acceleration.z; + const float speed = particle->speedParameter; + particle->offsetY += particle->motionVelocity.y * speed * step; + particle->offsetZ += particle->motionVelocity.z * speed * step; + particle->offsetX += particle->motionVelocity.x * speed * step; + particle->position.y += particle->offsetY; + particle->position.z += particle->offsetZ; + particle->position.x += particle->offsetX; + particle->motionVelocity.x += step * this->acceleration.x; + particle->motionVelocity.y += step * this->acceleration.y; + particle->motionVelocity.z += step * this->acceleration.z; if (this->billboard == 1) { matrix transform; @@ -215,7 +215,7 @@ void CEmitterEffect::UpdateParticle(CParticle* particle) { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } // OFFSET: 0x00B50C60 @@ -234,7 +234,7 @@ void CEmitterEffect::SetParticleSpeed(float value) { if (this->particleSpeed != value) { this->particleSpeed = value; for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { - (*it)->unknown_00C0 = this->particleSpeed; + (*it)->speedParameter = this->particleSpeed; } } } @@ -244,11 +244,11 @@ void CEmitterEffect::SetParticleSpeed(float value) { void CEmitterEffect::CheckRange() { if (this->InRange() == true) { this->outsideRange = 0; - this->unknown_00C1 = 0; + this->emissionStopped = 0; return; } - this->unknown_00C1 = 1; + this->emissionStopped = 1; if (this->pool.active == 0) { this->outsideRange = 1; } diff --git a/Source/Contents/Effects/EnergyOrbEffect.cpp b/Source/Contents/Effects/EnergyOrbEffect.cpp index 507502a11..c13d4836b 100644 --- a/Source/Contents/Effects/EnergyOrbEffect.cpp +++ b/Source/Contents/Effects/EnergyOrbEffect.cpp @@ -44,26 +44,26 @@ void CEnergyOrbEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_0010 = i; - particle->unknown_000C = j; - particle->unknown_0008 = 1; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(360 / this->count * i); + particle->effectId = this->id; + particle->rowIndex = i; + particle->columnIndex = j; + particle->groupIndex = 1; + *reinterpret_cast(&particle->angleBits) = static_cast(360 / this->count * i); particle->SetTexture("effect\\thunder_center.bmp"); particle->alpha = 0; particle->scale = 0.8f; - particle->unknown_00C0 = 0.15f; - particle->unknown_0054 = 8.0f; - particle->unknown_004C = angle; - *reinterpret_cast(&particle->unknown_0058[0]) = static_cast(phase); - *reinterpret_cast(&particle->unknown_0058[4]) = -12.0f; + particle->speedParameter = 0.15f; + particle->animationParameter = 8.0f; + particle->phaseParameter = angle; + *reinterpret_cast(&particle->animationParameters[0]) = static_cast(phase); + *reinterpret_cast(&particle->animationParameters[4]) = -12.0f; if (j == 0) { particle->destinationBlend = 6; } switch (this->id) { case EF_CHOOKGI: - particle->SetColor(particle->unknown_000C != 0 ? -1 : 0, particle->unknown_000C != 0 ? -1 : 0, particle->unknown_000C != 0 ? 0 : 255); + particle->SetColor(particle->columnIndex != 0 ? -1 : 0, particle->columnIndex != 0 ? -1 : 0, particle->columnIndex != 0 ? 0 : 255); break; case EF_CHOOKGI_FIRE: particle->SetTexture("effect\\FireOrb.bmp"); @@ -84,10 +84,10 @@ void CEnergyOrbEffect::Open() { case EF_OB_GENSOU: particle->SetTexture("effect\\fog1.tga"); particle->scale = 6.0f; - particle->unknown_00C0 = 0.05f; - particle->unknown_0054 = 4.0f; - *reinterpret_cast(&particle->unknown_0058[0]) = 0.0f; - *reinterpret_cast(&particle->unknown_0058[4]) = -8.0f; + particle->speedParameter = 0.05f; + particle->animationParameter = 4.0f; + *reinterpret_cast(&particle->animationParameters[0]) = 0.0f; + *reinterpret_cast(&particle->animationParameters[4]) = -8.0f; particle->destinationBlend = 6; break; } @@ -111,15 +111,15 @@ void CEnergyOrbEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - if (particle->unknown_00E8 <= 200) { + if (particle->elapsedFrames <= 200) { ++particle->alpha; } - float angle = particle->unknown_00C0 * 5.0f + *reinterpret_cast(&particle->unknown_00C4); + float angle = particle->speedParameter * 5.0f + *reinterpret_cast(&particle->angleBits); if (angle > 360.0f) { angle -= 360.0f; } - *reinterpret_cast(&particle->unknown_00C4) = angle; + *reinterpret_cast(&particle->angleBits) = angle; if (particle->alpha > 0) { matrix rotation; @@ -128,9 +128,9 @@ void CEnergyOrbEffect::OnProcess() { rotation.AppendXRotation(3.141592f); const float scale = particle->scale; - particle->unknown_004C = static_cast(static_cast(particle->unknown_004C) + *reinterpret_cast(&particle->unknown_0058[0])) % 360; - float pulse = scale * 0.1f * g_sinTable[particle->unknown_004C]; - if (this->mode > 1 && particle->unknown_000C == 0) { + particle->phaseParameter = static_cast(static_cast(particle->phaseParameter) + *reinterpret_cast(&particle->animationParameters[0])) % 360; + float pulse = scale * 0.1f * g_sinTable[particle->phaseParameter]; + if (this->mode > 1 && particle->columnIndex == 0) { pulse = static_cast(scale * 0.1 + pulse); } const float size = scale + pulse; @@ -138,12 +138,12 @@ void CEnergyOrbEffect::OnProcess() { std::memcpy(scaling.values, g_identityMatrix, sizeof(scaling.values)); scaling.SetScale(size, size, size); - const float wave = g_sinTable[particle->unknown_004C] * 0.6f; - const int index = static_cast(*reinterpret_cast(&particle->unknown_00C4)); - const float radius = wave + particle->unknown_0054; + const float wave = g_sinTable[particle->phaseParameter] * 0.6f; + const int index = static_cast(*reinterpret_cast(&particle->angleBits)); + const float radius = wave + particle->animationParameter; matrix translation; std::memcpy(translation.values, g_identityMatrix, sizeof(translation.values)); - translation.MakeTranslate(radius * g_cosTable[index], wave * *reinterpret_cast(&particle->unknown_0058[0]) + *reinterpret_cast(&particle->unknown_0058[4]), radius * g_sinTable[index]); + translation.MakeTranslate(radius * g_cosTable[index], wave * *reinterpret_cast(&particle->animationParameters[0]) + *reinterpret_cast(&particle->animationParameters[4]), radius * g_sinTable[index]); matrix scaled; scaled.Compose(scaling, rotation); @@ -152,7 +152,7 @@ void CEnergyOrbEffect::OnProcess() { particle->transform = result; } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/EvilLandEffect.cpp b/Source/Contents/Effects/EvilLandEffect.cpp index fb283139d..5f16403f4 100644 --- a/Source/Contents/Effects/EvilLandEffect.cpp +++ b/Source/Contents/Effects/EvilLandEffect.cpp @@ -26,24 +26,24 @@ void CEvilLandEffect::Close() { // FUNCTION: fn_06948 void CEvilLandEffect::Open() { CTexture* texture = g_texMgr.Load("effect\\EVILLAND\\demonground.tga", 0, false, true, false); - const float textureStepU = static_cast(texture->ImageWidth()) / static_cast(texture->TextureWidth()) / static_cast(this->unknown_00B0); - const float textureStepV = static_cast(texture->ImageHeight()) / static_cast(texture->TextureHeight()) / static_cast(this->unknown_00B0); + const float textureStepU = static_cast(texture->ImageWidth()) / static_cast(texture->TextureWidth()) / static_cast(this->effectLevel); + const float textureStepV = static_cast(texture->ImageHeight()) / static_cast(texture->TextureHeight()) / static_cast(this->effectLevel); CTexture* alpha = g_texMgr.Load("effect\\EVILLAND\\demonground_alpha_translucent.tga", 0, false, true, false); - const float alphaStepU = static_cast(alpha->ImageWidth()) / static_cast(alpha->TextureWidth()) / static_cast(this->unknown_00B0); - const float alphaStepV = static_cast(alpha->ImageHeight()) / static_cast(alpha->TextureHeight()) / static_cast(this->unknown_00B0); + const float alphaStepU = static_cast(alpha->ImageWidth()) / static_cast(alpha->TextureWidth()) / static_cast(this->effectLevel); + const float alphaStepV = static_cast(alpha->ImageHeight()) / static_cast(alpha->TextureHeight()) / static_cast(this->effectLevel); - for (int row = 0; row < this->unknown_00B0; ++row) { - for (int column = 0; column < this->unknown_00B0; ++column) { + for (int row = 0; row < this->effectLevel; ++row) { + for (int column = 0; column < this->effectLevel; ++column) { CMultiTexParticle* particle = static_cast(CreateMultiTexParticle(reinterpret_cast(this->position), -1)); if (!particle) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_0010 = row; - particle->unknown_000C = column; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->rowIndex = row; + particle->columnIndex = column; + particle->groupIndex = 1; particle->texture1 = texture; particle->texture2 = alpha; @@ -98,8 +98,8 @@ void CEvilLandEffect::Render() { int column = 0; int row = 0; gameMode->WorldCell(this->position[0], this->position[2], column, row); - const int half = this->unknown_00B0 / 2; - particle->Render(particle->unknown_000C - half + column, particle->unknown_0010 - half + row); + const int half = this->effectLevel / 2; + particle->Render(particle->columnIndex - half + column, particle->rowIndex - half + row); } } } diff --git a/Source/Contents/Effects/EvilsPawEffect.cpp b/Source/Contents/Effects/EvilsPawEffect.cpp index 150b7c597..b38eb78d6 100644 --- a/Source/Contents/Effects/EvilsPawEffect.cpp +++ b/Source/Contents/Effects/EvilsPawEffect.cpp @@ -34,9 +34,9 @@ void CEvilsPawEffect::Open() { particle->SetColor(255, 255, 255); particle->alpha = 255; particle->scale = static_cast(this->size); - particle->unknown_00D0 = this->offset.x; - particle->unknown_00D4 = this->offset.y; - particle->unknown_00D8 = this->offset.z; + particle->offsetX = this->offset.x; + particle->offsetY = this->offset.y; + particle->offsetZ = this->offset.z; particle->sourceBlend = 5; particle->destinationBlend = 6; InitParticleQuad(particle->vertices); @@ -62,9 +62,9 @@ void CEvilsPawEffect::ResetParticles() { particle->SetColor(255, 255, 255); particle->alpha = 255; particle->scale = static_cast(this->size); - particle->unknown_00D0 = this->offset.x; - particle->unknown_00D4 = this->offset.y; - particle->unknown_00D8 = this->offset.z; + particle->offsetX = this->offset.x; + particle->offsetY = this->offset.y; + particle->offsetZ = this->offset.z; } } @@ -102,7 +102,7 @@ void CEvilsPawEffect::OnProcess() { particle->position.y = this->position[1] + this->offset.y; particle->position.z = this->position[2] + this->offset.z; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } if (--this->delayCounter < 0) { diff --git a/Source/Contents/Effects/FlowerCastingEffect.cpp b/Source/Contents/Effects/FlowerCastingEffect.cpp index 1bbaa51f1..22448d9c1 100644 --- a/Source/Contents/Effects/FlowerCastingEffect.cpp +++ b/Source/Contents/Effects/FlowerCastingEffect.cpp @@ -21,64 +21,64 @@ void CFlowerCastingEffect::AddRing(int kind) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_0050 = 315; + particle->angleParameter = 315; particle->alpha = 0; - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); + float& baseAngle = *reinterpret_cast(&particle->angleBits); if (kind == 0) { if (ring == 0) { particle->scale = 4.5f; - particle->unknown_004C = 85; - particle->unknown_00C0 = 27.0f; + particle->phaseParameter = 85; + particle->speedParameter = 27.0f; baseAngle = 0.0f; } else if (ring == 1) { particle->scale = 5.0f; - particle->unknown_004C = 80; - particle->unknown_00C0 = 28.0f; + particle->phaseParameter = 80; + particle->speedParameter = 28.0f; baseAngle = 90.0f; } else if (ring == 2) { particle->scale = 5.5f; - particle->unknown_004C = 70; - particle->unknown_00C0 = 29.0f; + particle->phaseParameter = 70; + particle->speedParameter = 29.0f; baseAngle = 180.0f; } else if (ring == 3) { particle->scale = 5.0f; - particle->unknown_004C = 75; - particle->unknown_00C0 = 30.0f; + particle->phaseParameter = 75; + particle->speedParameter = 30.0f; baseAngle = 270.0f; } } else if (kind == 1) { if (ring == 0) { particle->scale = 5.5f; - particle->unknown_004C = 50; - particle->unknown_00C0 = 30.0f; + particle->phaseParameter = 50; + particle->speedParameter = 30.0f; baseAngle = 90.0f; } else if (ring == 1) { particle->scale = 6.0f; - particle->unknown_004C = 55; - particle->unknown_00C0 = 29.0f; + particle->phaseParameter = 55; + particle->speedParameter = 29.0f; baseAngle = 180.0f; } else if (ring == 2) { particle->scale = 6.5f; - particle->unknown_004C = 65; - particle->unknown_00C0 = 28.0f; + particle->phaseParameter = 65; + particle->speedParameter = 28.0f; baseAngle = 270.0f; } else if (ring == 3) { particle->scale = 6.0f; - particle->unknown_004C = 60; - particle->unknown_00C0 = 27.0f; + particle->phaseParameter = 60; + particle->speedParameter = 27.0f; baseAngle = 0.0f; } } particle->SetColor(100, 100, 255); - particle->unknown_0054 = 0.0f; - *reinterpret_cast(particle->unknown_0058) = particle->unknown_00C0; + particle->animationParameter = 0.0f; + *reinterpret_cast(particle->animationParameters) = particle->speedParameter; InitParticleQuad(particle->vertices); this->particles.push_back(particle); } @@ -98,7 +98,7 @@ void CFlowerCastingEffect::Close() { // OFFSET: 0x00B66CA0 // FUNCTION: fn_19061 void CFlowerCastingEffect::Open() { - this->unknown_002C = 400; + this->effectLifetime = 400; CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const vector3d& player = reinterpret_cast(world->player)->render.position; @@ -123,11 +123,11 @@ void CFlowerCastingEffect::OnProcess() { (*it)->position.z = this->position[2]; CParticle* particle = *it; - if (particle && particle->unknown_00E8 > 0) { - float radius = g_sinTable[particle->unknown_00E8 % 90 * 4] * 2.5f + *reinterpret_cast(particle->unknown_0058); - particle->unknown_00C0 = radius; + if (particle && particle->elapsedFrames > 0) { + float radius = g_sinTable[particle->elapsedFrames % 90 * 4] * 2.5f + *reinterpret_cast(particle->animationParameters); + particle->speedParameter = radius; - const int age = particle->unknown_00E8; + const int age = particle->elapsedFrames; int alpha = particle->alpha; if (age > 110) { alpha = (std::max)(alpha - 1, 0); @@ -136,16 +136,16 @@ void CFlowerCastingEffect::OnProcess() { } particle->alpha = alpha; - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; radius *= g_sinTable[segment * 9]; if (age <= 90) { radius *= g_sinTable[age]; } radius = (std::max)(radius, 0.0f); - const float baseAngle = *reinterpret_cast(&particle->unknown_00C4); - const int angle = static_cast(static_cast(particle->unknown_0050 / 20.0f) * segment + baseAngle) % 360; - const int tilt = particle->unknown_004C; + const float baseAngle = *reinterpret_cast(&particle->angleBits); + const int angle = static_cast(static_cast(particle->angleParameter / 20.0f) * segment + baseAngle) % 360; + const int tilt = particle->phaseParameter; const float spread = radius * g_cosTable[tilt]; const float height = radius * g_sinTable[tilt]; const float cosine = g_cosTable[angle]; @@ -179,7 +179,7 @@ void CFlowerCastingEffect::OnProcess() { this->lastOuter = points[1]; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -188,11 +188,11 @@ void CFlowerCastingEffect::OnProcess() { void CFlowerCastingEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_000C <= 0) { + if (!particle || particle->columnIndex <= 0) { continue; } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/FortuneKissEffect.cpp b/Source/Contents/Effects/FortuneKissEffect.cpp index d78d234c2..e711ee82f 100644 --- a/Source/Contents/Effects/FortuneKissEffect.cpp +++ b/Source/Contents/Effects/FortuneKissEffect.cpp @@ -26,16 +26,16 @@ void CFortuneKiss::Open() { } particle->SetTexture("effect\\kiss.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 255; - particle->unknown_00C4 = 0; - particle->unknown_004C = 0; + particle->angleBits = 0; + particle->phaseParameter = 0; particle->scale = 1.0f; - particle->unknown_0054 = -5.0f - static_cast(rand() % 5); - *reinterpret_cast(particle->unknown_0058) = 0.0f; + particle->animationParameter = -5.0f - static_cast(rand() % 5); + *reinterpret_cast(particle->animationParameters) = 0.0f; InitParticleQuad(particle->vertices); this->angle = rand() % 359; this->particles.push_back(particle); @@ -60,8 +60,8 @@ void CFortuneKiss::OnProcess() { this->angle = 0; } - float& offset = *reinterpret_cast(&particle->unknown_0048[0xC]); - float& width = *reinterpret_cast(&particle->unknown_0048[0x10]); + float& offset = *reinterpret_cast(&particle->effectParameters[0xC]); + float& width = *reinterpret_cast(&particle->effectParameters[0x10]); const float cosine = g_cosTable[this->angle]; const float newOffset = offset - cosine * 0.05; const float newWidth = cosine * 0.02 + width; @@ -83,7 +83,7 @@ void CFortuneKiss::OnProcess() { result.Compose(first, translate); particle->transform = result; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } diff --git a/Source/Contents/Effects/FriggSongEffect.cpp b/Source/Contents/Effects/FriggSongEffect.cpp index 126811d45..f0e867f0f 100644 --- a/Source/Contents/Effects/FriggSongEffect.cpp +++ b/Source/Contents/Effects/FriggSongEffect.cpp @@ -11,7 +11,7 @@ // OFFSET: 0x00701BB0 // FUNCTION: fn_06999 CFriggSongEffect::CFriggSongEffect() : CEffect(0x423), lastInner{} { - this->unknown_002C = EffectLifetime(0x423); + this->effectLifetime = EffectLifetime(0x423); } // OFFSET: 0x00701EE0 @@ -34,28 +34,28 @@ void CFriggSongEffect::Open() { } particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 50; particle->SetColor(50, 200, 50); - particle->unknown_0050 = 360; - particle->unknown_00C0 = 120.0f; - particle->unknown_004C = 90; - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); - baseAngle = static_cast(particle->unknown_0010 * 10); - particle->scale = static_cast(particle->unknown_0010) * 0.5f + 2.5f; - (&particle->unknown_0054)[particle->unknown_0010] = 0.0f; - particle->unknown_00E8 = particle->unknown_0010; + particle->angleParameter = 360; + particle->speedParameter = 120.0f; + particle->phaseParameter = 90; + float& baseAngle = *reinterpret_cast(&particle->angleBits); + baseAngle = static_cast(particle->rowIndex * 10); + particle->scale = static_cast(particle->rowIndex) * 0.5f + 2.5f; + (&particle->animationParameter)[particle->rowIndex] = 0.0f; + particle->elapsedFrames = particle->rowIndex; - int angle = static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * particle->unknown_000C) + baseAngle) % 360; - if (particle->unknown_000C == 20) { + int angle = static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * particle->columnIndex) + baseAngle) % 360; + if (particle->columnIndex == 20) { angle = static_cast(baseAngle); } - const int tilt = particle->unknown_004C; - const float radius = particle->unknown_00C0; + const int tilt = particle->phaseParameter; + const float radius = particle->speedParameter; vector3d points[2] = {}; points[0].x = particle->scale * g_cosTable[angle]; points[0].y = 0.0f; @@ -64,7 +64,7 @@ void CFriggSongEffect::Open() { points[1].y = 0.0f - radius * g_sinTable[tilt]; points[1].z = points[0].z + radius * g_cosTable[tilt] * g_sinTable[angle]; - if (particle->unknown_000C >= 1 && particle->unknown_000C <= 20) { + if (particle->columnIndex >= 1 && particle->columnIndex <= 20) { particle->vertices[1].x = points[1].x; particle->vertices[1].y = points[1].y; particle->vertices[1].z = points[1].z; @@ -105,18 +105,18 @@ void CFriggSongEffect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - const int age = particle->unknown_00E8; - const float baseAngle = *reinterpret_cast(&particle->unknown_00C4); + const int age = particle->elapsedFrames; + const float baseAngle = *reinterpret_cast(&particle->angleBits); const int angle = static_cast(baseAngle - static_cast(age)); - float& height = *reinterpret_cast(&particle->unknown_0048[0xC]); + float& height = *reinterpret_cast(&particle->effectParameters[0xC]); if (age < 20) { height = 1.0f; } else if (age <= 140) { - height = (std::max)(0.0f, g_sinTable[age - 20] * particle->unknown_00C0); + height = (std::max)(0.0f, g_sinTable[age - 20] * particle->speedParameter); } else { - const float speed = particle->unknown_00C0; - particle->unknown_00C0 = (std::max)(0.0f, speed - 0.5f - speed * 0.01f); - height = particle->unknown_00C0; + const float speed = particle->speedParameter; + particle->speedParameter = (std::max)(0.0f, speed - 0.5f - speed * 0.01f); + height = particle->speedParameter; } matrix rotation; @@ -129,7 +129,7 @@ void CFriggSongEffect::OnProcess() { rotation.Compose(first, scale); particle->transform = rotation; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -142,7 +142,7 @@ void CFriggSongEffect::Render() { continue; } - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/FuumaShouakuEffect.cpp b/Source/Contents/Effects/FuumaShouakuEffect.cpp index a4174e3f6..10f1d9e4f 100644 --- a/Source/Contents/Effects/FuumaShouakuEffect.cpp +++ b/Source/Contents/Effects/FuumaShouakuEffect.cpp @@ -14,7 +14,7 @@ // OFFSET: 0x007028C0 // FUNCTION: fn_07007 CFuumaShouakuEffect::CFuumaShouakuEffect() - : CEffect(0x930), first(nullptr), second(nullptr), unknown_00D4(0), unknown_00D8(0), unknown_00DC(0), unknown_00E0(0) { + : CEffect(0x930), first(nullptr), second(nullptr), velocityX(0), velocityY(0), velocityZ(0), travelFrames(0) { } // OFFSET: 0x00702A20 @@ -46,15 +46,15 @@ void CFuumaShouakuEffect::Open() { const float dy = this->sourcePosition[1] - this->position[1]; const float dx = this->sourcePosition[0] - this->position[0]; const float dz = this->sourcePosition[2] - this->position[2]; - this->unknown_00E0 = static_cast(SquareRoot(dy * dy + dx * dx + dz * dz) * g_depthAverageHalf); + this->travelFrames = static_cast(SquareRoot(dy * dy + dx * dx + dz * dz) * g_depthAverageHalf); - this->unknown_00D4 = this->sourcePosition[0] - this->position[0]; - this->unknown_00D8 = this->sourcePosition[1] - this->position[1]; - this->unknown_00DC = this->sourcePosition[2] - this->position[2]; - const float scale = 1.0f / SquareRoot(this->unknown_00D4 * this->unknown_00D4 + this->unknown_00D8 * this->unknown_00D8 + this->unknown_00DC * this->unknown_00DC); - this->unknown_00D4 = scale * this->unknown_00D4 * 2.0f; - this->unknown_00D8 = scale * this->unknown_00D8 * 2.0f; - this->unknown_00DC = scale * this->unknown_00DC * 2.0f; + this->velocityX = this->sourcePosition[0] - this->position[0]; + this->velocityY = this->sourcePosition[1] - this->position[1]; + this->velocityZ = this->sourcePosition[2] - this->position[2]; + const float scale = 1.0f / SquareRoot(this->velocityX * this->velocityX + this->velocityY * this->velocityY + this->velocityZ * this->velocityZ); + this->velocityX = scale * this->velocityX * 2.0f; + this->velocityY = scale * this->velocityY * 2.0f; + this->velocityZ = scale * this->velocityZ * 2.0f; this->first->m_angle = ScreenAngle(this->position, this->sourcePosition, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values); } @@ -68,11 +68,11 @@ bool CFuumaShouakuEffect::IsAlive() { // OFFSET: 0x00702CD0 // FUNCTION: fn_07012 void CFuumaShouakuEffect::OnProcess() { - if (this->frame < this->unknown_00E0) { + if (this->frame < this->travelFrames) { if (this->first) { - this->first->position.x += this->unknown_00D4; - this->first->position.y += this->unknown_00D8; - this->first->position.z += this->unknown_00DC; + this->first->position.x += this->velocityX; + this->first->position.y += this->velocityY; + this->first->position.z += this->velocityZ; } } else if (!this->second) { if (this->first) { @@ -84,10 +84,10 @@ void CFuumaShouakuEffect::OnProcess() { if (this->second) { this->second->Load(std::string("SHINKIRO_SHIRANUI\\SS_FUUMASHOUAKU\\fuumashouaku_00\\fuumashouaku_00.str")); this->second->m_loop = true; - this->AddEvent(0, "effect\\SHINKIRO_SHIRANUI\\SS_FUUMASHOUAKU.wav", this->unknown_00E0 + 1, 0); + this->AddEvent(0, "effect\\SHINKIRO_SHIRANUI\\SS_FUUMASHOUAKU.wav", this->travelFrames + 1, 0); } } else if (this->second->m_frame == 1) { - this->frame = this->unknown_00E0; + this->frame = this->travelFrames; } if (this->first) { diff --git a/Source/Contents/Effects/FuumaShouakuEffect.h b/Source/Contents/Effects/FuumaShouakuEffect.h index 9f6fc8af7..cc0d8c42d 100644 --- a/Source/Contents/Effects/FuumaShouakuEffect.h +++ b/Source/Contents/Effects/FuumaShouakuEffect.h @@ -19,10 +19,10 @@ public: /* 00CC */ CEZ2STRParticle* first; /* 00D0 */ CEZ2STRParticle* second; - /* 00D4 */ float unknown_00D4; - /* 00D8 */ float unknown_00D8; - /* 00DC */ float unknown_00DC; - /* 00E0 */ int unknown_00E0; + /* 00D4 */ float velocityX; + /* 00D8 */ float velocityY; + /* 00DC */ float velocityZ; + /* 00E0 */ int travelFrames; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Effects/GlassWallEffect.cpp b/Source/Contents/Effects/GlassWallEffect.cpp index 879a0076d..061c6e871 100644 --- a/Source/Contents/Effects/GlassWallEffect.cpp +++ b/Source/Contents/Effects/GlassWallEffect.cpp @@ -18,16 +18,16 @@ CGlassWall::~CGlassWall() { // OFFSET: 0x00B44860 // FUNCTION: fn_18890 void CGlassWall::AddPanel(float angle, float scale, float x, float y, float z) { - const int startFrame = this->unknown_002C - 6; + const int startFrame = this->effectLifetime - 6; CParticle* particle = CreateParticle(reinterpret_cast(this->position), 1); - float* params = &particle->unknown_0054; + float* params = &particle->animationParameter; particle->scale = scale; - particle->unknown_00C0 = 0.25f; + particle->speedParameter = 0.25f; particle->alpha = 0; - *reinterpret_cast(&particle->unknown_00C4) = angle; - particle->unknown_00D0 = x; - particle->unknown_00D4 = y; - particle->unknown_00D8 = z; + *reinterpret_cast(&particle->angleBits) = angle; + particle->offsetX = x; + particle->offsetY = y; + particle->offsetZ = z; params[0] = 40.0f; params[1] = 30.0f; params[2] = static_cast(startFrame); @@ -89,9 +89,9 @@ void CGlassWall::OnProcess() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; const int frame = this->frame; - float* params = &particle->unknown_0054; + float* params = &particle->animationParameter; const int maxAlpha = static_cast(params[3]); - float speed = particle->unknown_00C0; + float speed = particle->speedParameter; const float angle = speed + params[0]; float fade = params[1]; if (frame % static_cast(params[4]) == 0) { @@ -99,7 +99,7 @@ void CGlassWall::OnProcess() { } if (frame == static_cast(params[2])) { - fade = static_cast(-(particle->alpha / (this->unknown_002C - frame))); + fade = static_cast(-(particle->alpha / (this->effectLifetime - frame))); } int alpha = static_cast(static_cast(particle->alpha) + fade); @@ -108,18 +108,18 @@ void CGlassWall::OnProcess() { } matrix translation; - translation.MakeTranslate(particle->position.x + particle->unknown_00D0, particle->position.y + particle->unknown_00D4, - particle->position.z + particle->unknown_00D8); + translation.MakeTranslate(particle->position.x + particle->offsetX, particle->position.y + particle->offsetY, + particle->position.z + particle->offsetZ); matrix rotation; - rotation.MakeYRotation(GetRadian(static_cast(*reinterpret_cast(&particle->unknown_00C4)))); + rotation.MakeYRotation(GetRadian(static_cast(*reinterpret_cast(&particle->angleBits)))); matrix result; result.Compose(rotation, translation); params[0] = angle; particle->alpha = alpha > maxAlpha ? maxAlpha : alpha; - ++particle->unknown_00E8; + ++particle->elapsedFrames; params[1] = fade; - particle->unknown_00C0 = speed; + particle->speedParameter = speed; particle->transform = result; } @@ -134,7 +134,7 @@ void CGlassWall::Render() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; const float width = particle->scale; - const float height = particle->unknown_0054; + const float height = particle->animationParameter; particle->vertices[0].x = 0.0f; particle->vertices[0].y = -height; particle->vertices[0].z = width; diff --git a/Source/Contents/Effects/GravityControlEffect.h b/Source/Contents/Effects/GravityControlEffect.h index eb7926d1c..6d4a12d56 100644 --- a/Source/Contents/Effects/GravityControlEffect.h +++ b/Source/Contents/Effects/GravityControlEffect.h @@ -7,7 +7,7 @@ class CGravityControlEffect : public CEffect { public: - CGravityControlEffect() : CEffect(-1), target(0), unknown_00D0(0), unknown_00D4(-20.0f) {} + CGravityControlEffect() : CEffect(-1), target(0), heightOffset(0), minimumHeightOffset(-20.0f) {} void Open() override; void OnProcess() override; @@ -17,8 +17,8 @@ public: ~CGravityControlEffect() override; /* 00CC */ int target; - /* 00D0 */ float unknown_00D0; - /* 00D4 */ float unknown_00D4; + /* 00D0 */ float heightOffset; + /* 00D4 */ float minimumHeightOffset; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Effects/HealEffect.cpp b/Source/Contents/Effects/HealEffect.cpp index a46fd8553..42fa4ea36 100644 --- a/Source/Contents/Effects/HealEffect.cpp +++ b/Source/Contents/Effects/HealEffect.cpp @@ -27,20 +27,20 @@ void CHealEffect::AddSparks(int kind) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\pok1.tga"); particle->alpha = 0; - particle->unknown_00C4 = 0; - particle->unknown_0050 = 0; + particle->angleBits = 0; + particle->angleParameter = 0; const int driftZ = (std::max)(rand() % 13, 0); const int driftX = (std::max)(rand() % 13, 0); - particle->unknown_00D4 = 0.0f; - particle->unknown_00D0 = static_cast(driftX - 6); - particle->unknown_00D8 = static_cast(driftZ - 6); + particle->offsetY = 0.0f; + particle->offsetX = static_cast(driftX - 6); + particle->offsetZ = static_cast(driftZ - 6); particle->SetColor(220, 250, 220); InitParticleQuad(particle->vertices); this->sparkParticles.push_back(particle); @@ -50,28 +50,28 @@ void CHealEffect::AddSparks(int kind) { case 3: case 6: particle->scale = static_cast((std::max)(rand() % 10, 0)) * 0.1f + 2.0f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; break; case 1: particle->scale = static_cast((std::max)(rand() % 10, 0)) * 0.1f + 2.0f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.6f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.6f; break; case 2: particle->scale = static_cast((std::max)(rand() % 40, 0)) * 0.1f + 0.4f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; break; case 4: particle->scale = static_cast((std::max)(rand() % 10, 0)) * 0.1f + 2.0f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.3f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.3f; break; case 7: particle->scale = static_cast((std::max)(rand() % 10, 0)) * 0.1f + 2.0f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; particle->SetColor(0, 255, 255); break; case 8: particle->scale = static_cast((std::max)(rand() % 10, 0)) * 0.1f + 2.0f; - particle->unknown_0054 = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; + particle->animationParameter = static_cast((std::max)(rand() % 40, 0)) * 0.01f + 0.4f; particle->SetColor(255, 255, 0); break; } @@ -90,20 +90,20 @@ void CHealEffect::AddColumn(int kind) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; - particle->unknown_0050 = 360; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = row; + particle->groupIndex = 1; + particle->angleParameter = 360; particle->alpha = 0; - particle->unknown_004C = 90; - particle->unknown_0054 = 0.0f; + particle->phaseParameter = 90; + particle->animationParameter = 0.0f; - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); + float& baseAngle = *reinterpret_cast(&particle->angleBits); switch (kind) { case 0: particle->SetTexture("effect\\ring_white.tga"); - particle->unknown_00C0 = 60.0f; + particle->speedParameter = 60.0f; baseAngle = static_cast(angle); particle->scale = static_cast(row) * 0.4f + 4.6f; particle->SetColor(140, 210, 140); @@ -111,7 +111,7 @@ void CHealEffect::AddColumn(int kind) { break; case 1: particle->SetTexture("effect\\ring_white.tga"); - particle->unknown_00C0 = 60.0f; + particle->speedParameter = 60.0f; baseAngle = static_cast(angle); particle->scale = static_cast(row) * 0.4f + 4.6f; particle->SetColor(140, 210, 140); @@ -119,7 +119,7 @@ void CHealEffect::AddColumn(int kind) { break; case 2: particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_00C0 = 90.0f; + particle->speedParameter = 90.0f; baseAngle = static_cast(angle); particle->scale = static_cast(row) * 0.1f + 4.2f; particle->SetColor(140, 210, 140); @@ -127,7 +127,7 @@ void CHealEffect::AddColumn(int kind) { break; case 3: particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_00C0 = randomHeight; + particle->speedParameter = randomHeight; baseAngle = static_cast(randomAngle); particle->scale = static_cast((std::max)(rand() % 100, 0)) * 0.005f + 4.5f + static_cast(row) * 0.2f; particle->SetColor(255, 255, 255); @@ -135,7 +135,7 @@ void CHealEffect::AddColumn(int kind) { break; case 4: particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_00C0 = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; + particle->speedParameter = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; baseAngle = static_cast(randomAngle); particle->scale = static_cast(row) * 0.2f + 4.6f; particle->SetColor(140, 210, 140); @@ -143,7 +143,7 @@ void CHealEffect::AddColumn(int kind) { break; case 5: particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_00C0 = 60.0f; + particle->speedParameter = 60.0f; baseAngle = static_cast(angle); particle->scale = static_cast(row) * 0.4f + 4.6f; particle->SetColor(100, 100, 255); @@ -151,7 +151,7 @@ void CHealEffect::AddColumn(int kind) { break; case 6: particle->SetTexture("effect\\ring_white.tga"); - particle->unknown_00C0 = 60.0f; + particle->speedParameter = 60.0f; baseAngle = static_cast(angle); particle->scale = static_cast(row) * 0.4f + 4.6f; particle->SetColor(115, 25, 115); @@ -159,7 +159,7 @@ void CHealEffect::AddColumn(int kind) { break; case 7: particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_00C0 = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; + particle->speedParameter = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; baseAngle = static_cast(randomAngle); particle->scale = static_cast(row) * 0.2f + 4.6f; particle->SetColor(0, 255, 255); @@ -167,7 +167,7 @@ void CHealEffect::AddColumn(int kind) { break; case 8: particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_00C0 = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; + particle->speedParameter = static_cast((std::max)(rand() % 20, 0) * row) + 40.0f; baseAngle = static_cast(randomAngle); particle->scale = static_cast(row) * 0.2f + 4.6f; particle->SetColor(255, 255, 0); @@ -192,49 +192,49 @@ void CHealEffect::AddCone(int kind) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; - particle->unknown_0050 = 360; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = row; + particle->groupIndex = 1; + particle->angleParameter = 360; particle->alpha = 0; - particle->unknown_0054 = 0.0f; + particle->animationParameter = 0.0f; - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); + float& baseAngle = *reinterpret_cast(&particle->angleBits); switch (kind) { case 0: particle->SetTexture("effect\\ring_white.tga"); baseAngle = static_cast(randomAngle); - particle->unknown_00C0 = 12.0f; + particle->speedParameter = 12.0f; particle->scale = static_cast(row) * 0.2f + 5.0f; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->SetColor(140, 210, 140); this->coneLifetime = 60; break; case 1: particle->SetTexture("effect\\ring_white.tga"); baseAngle = static_cast(randomAngle); - particle->unknown_00C0 = 18.0f; + particle->speedParameter = 18.0f; particle->scale = static_cast(row) * 0.2f + 5.0f; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->SetColor(140, 210, 140); this->coneLifetime = 40; break; case 2: particle->SetTexture("effect\\alpha_down.tga"); baseAngle = static_cast(randomAngle); - particle->unknown_00C0 = 10.0f; + particle->speedParameter = 10.0f; particle->scale = static_cast(row) * 0.1f + 5.3f; - particle->unknown_004C = tilt - 4; + particle->phaseParameter = tilt - 4; particle->SetColor(140, 210, 140); this->coneLifetime = 30; break; case 5: particle->SetTexture("effect\\ring_blue.tga"); baseAngle = static_cast(randomAngle); - particle->unknown_00C0 = 18.0f; + particle->speedParameter = 18.0f; particle->scale = static_cast(row) * 0.2f + 5.0f; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->SetColor(100, 100, 255); this->coneLifetime = 40; break; @@ -263,7 +263,7 @@ void CHealEffect::UpdateParticleVertices(CParticle* particle) { const float scale = particle->scale; vector3d points[4] = {}; - const int angle = particle->unknown_0050; + const int angle = particle->angleParameter; points[0].x = scale * g_cosTable[angle % 360]; points[0].y = 0.0f; points[0].z = scale * g_sinTable[angle % 360]; @@ -282,9 +282,9 @@ void CHealEffect::UpdateParticleVertices(CParticle* particle) { this->RotateToCamera(points); - const float baseX = particle->unknown_00D0; - const float baseY = particle->unknown_00D4; - const float baseZ = particle->unknown_00D8; + const float baseX = particle->offsetX; + const float baseY = particle->offsetY; + const float baseZ = particle->offsetZ; particle->vertices[0].x = baseX + points[3].x; particle->vertices[0].y = baseY + points[3].y; @@ -331,7 +331,7 @@ bool CHealEffect::IsAlive() { // OFFSET: 0x00B68770 // FUNCTION: fn_19072 void CHealEffect::Open() { - this->unknown_002C = 100; + this->effectLifetime = 100; } // OFFSET: 0x00B68780 @@ -441,7 +441,7 @@ void CHealEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const int age = particle->unknown_00E8; + const int age = particle->elapsedFrames; int alpha = particle->alpha; if (this->columnLifetime < 0 || age < this->columnLifetime) { if (age < 16) { @@ -452,19 +452,19 @@ void CHealEffect::OnProcess() { } particle->alpha = alpha; - const int segment = particle->unknown_000C; - float height = particle->unknown_00C0 * 0.25f * g_sinTable[((4 - particle->unknown_0010) * age + segment * 34) % 360] + particle->unknown_00C0 * 0.75f; - if (particle->unknown_00E8 < 91) { - height *= g_sinTable[particle->unknown_00E8]; + const int segment = particle->columnIndex; + float height = particle->speedParameter * 0.25f * g_sinTable[((4 - particle->rowIndex) * age + segment * 34) % 360] + particle->speedParameter * 0.75f; + if (particle->elapsedFrames < 91) { + height *= g_sinTable[particle->elapsedFrames]; } height = (std::max)(height, 0.0f); - const float baseAngle = *reinterpret_cast(&particle->unknown_00C4); - const int angle = static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * segment) + baseAngle) % 360; - const float tiltCos = g_cosTable[particle->unknown_004C]; + const float baseAngle = *reinterpret_cast(&particle->angleBits); + const int angle = static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * segment) + baseAngle) % 360; + const float tiltCos = g_cosTable[particle->phaseParameter]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; - const float tiltSin = g_sinTable[particle->unknown_004C]; + const float tiltSin = g_sinTable[particle->phaseParameter]; const float bottomX = particle->scale * cosine; const float bottomZ = particle->scale * sine; @@ -495,7 +495,7 @@ void CHealEffect::OnProcess() { this->columnEdge[0].z = bottomZ; this->columnEdge[1].z = topZ; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (auto it = this->coneParticles.begin(); it != this->coneParticles.end(); ++it) { @@ -504,7 +504,7 @@ void CHealEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const int age = particle->unknown_00E8; + const int age = particle->elapsedFrames; int alpha = particle->alpha; if (this->coneLifetime < 0 || age < this->coneLifetime) { if (age < 16) { @@ -515,19 +515,19 @@ void CHealEffect::OnProcess() { } particle->alpha = alpha; - const int segment = particle->unknown_000C; - float height = particle->unknown_00C0 * 0.25f * g_sinTable[((segment * 17 + age) * 2) % 360] + particle->unknown_00C0 * 0.75f; + const int segment = particle->columnIndex; + float height = particle->speedParameter * 0.25f * g_sinTable[((segment * 17 + age) * 2) % 360] + particle->speedParameter * 0.75f; if (age < 91) { height *= g_sinTable[age]; } height = (std::max)(height, 0.0f); - const float baseAngle = *reinterpret_cast(&particle->unknown_00C4); - const int angle = static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * segment) + baseAngle) % 360; - const float tiltCos = g_cosTable[particle->unknown_004C]; + const float baseAngle = *reinterpret_cast(&particle->angleBits); + const int angle = static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * segment) + baseAngle) % 360; + const float tiltCos = g_cosTable[particle->phaseParameter]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; - const float tiltSin = g_sinTable[particle->unknown_004C]; + const float tiltSin = g_sinTable[particle->phaseParameter]; const float bottomX = particle->scale * cosine; const float bottomZ = particle->scale * sine; @@ -558,7 +558,7 @@ void CHealEffect::OnProcess() { this->coneEdge[1].y = topY; this->coneEdge[1].z = topZ; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (auto it = this->sparkParticles.begin(); it != this->sparkParticles.end(); ++it) { @@ -567,14 +567,14 @@ void CHealEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - particle->unknown_0050 += particle->unknown_0050 - 5 >= 0 ? -5 : 355; + particle->angleParameter += particle->angleParameter - 5 >= 0 ? -5 : 355; int alpha = particle->alpha; - if (particle->unknown_00E8 < 11) { + if (particle->elapsedFrames < 11) { alpha += 15; } else if (this->id != 312) { - const int segment = particle->unknown_000C; - if ((5 - segment) * 7 == particle->unknown_00E8 || 36 - segment * 7 == particle->unknown_00E8) { + const int segment = particle->columnIndex; + if ((5 - segment) * 7 == particle->elapsedFrames || 36 - segment * 7 == particle->elapsedFrames) { particle->SetTexture("effect\\pok3.tga"); } else { particle->SetTexture("effect\\pok1.tga"); @@ -582,12 +582,12 @@ void CHealEffect::OnProcess() { } particle->alpha = (std::max)(alpha - 3, 0); - particle->unknown_00D0 -= 0.0f; - particle->unknown_00D4 -= particle->unknown_0054; - particle->unknown_00D8 -= 0.0f; + particle->offsetX -= 0.0f; + particle->offsetY -= particle->animationParameter; + particle->offsetZ -= 0.0f; } this->UpdateParticleVertices(particle); - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -596,8 +596,8 @@ void CHealEffect::OnProcess() { void CHealEffect::Render() { for (auto it = this->columnParticles.begin(); it != this->columnParticles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { - const int segment = particle->unknown_000C; + if (particle && particle->columnIndex > 0) { + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; @@ -612,8 +612,8 @@ void CHealEffect::Render() { for (auto it = this->coneParticles.begin(); it != this->coneParticles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { - const int segment = particle->unknown_000C; + if (particle && particle->columnIndex > 0) { + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/HealSpEffect.cpp b/Source/Contents/Effects/HealSpEffect.cpp index 1955b5937..4c6f66488 100644 --- a/Source/Contents/Effects/HealSpEffect.cpp +++ b/Source/Contents/Effects/HealSpEffect.cpp @@ -18,15 +18,15 @@ CHealSp::~CHealSp() { // FUNCTION: fn_18898 void CHealSp::AddRing(float inner, float outer, float height, int duration) { const float fadeFrame = static_cast(duration) / 30.0f; - const float holdFrame = static_cast(this->unknown_00E0); + const float holdFrame = static_cast(this->holdFrame); for (int segment = 0; segment < 10; ++segment) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 1); - float* params = &particle->unknown_0054; - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; - particle->unknown_00C0 = 5.0f; + float* params = &particle->animationParameter; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = 0; + particle->groupIndex = 1; + particle->speedParameter = 5.0f; particle->scale = height; params[0] = inner; params[1] = outer; @@ -83,7 +83,7 @@ void CHealSp::OnProcess() { const float y = values[4] * 0.0f + values[1] * 0.0f + values[7] * 3.0f + values[10]; const float z = values[5] * 0.0f + values[2] * 0.0f + values[8] * 3.0f + values[11]; CSpriteParticle* sprite = static_cast(CreateSpriteParticle(reinterpret_cast(this->position), 1)); - float* params = &sprite->unknown_0054; + float* params = &sprite->animationParameter; sprite->life = 0.5f; sprite->scale = 0.55f; params[0] = 3.0f; @@ -103,32 +103,32 @@ void CHealSp::OnProcess() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - float* params = &particle->unknown_0054; + float* params = &particle->animationParameter; float fade = params[2]; - const float spin = particle->unknown_00C0; + const float spin = particle->speedParameter; const float endFrame = params[3]; const float maxAlpha = params[4]; const float alpha = params[6]; const float angle = spin + params[5]; rotation.MakeYRotation(GetRadian(static_cast(angle))); if (this->frame == static_cast(endFrame)) { - fade = -(alpha / static_cast(this->unknown_002C - this->frame)); + fade = -(alpha / static_cast(this->effectLifetime - this->frame)); } const float level = std::min(std::max(alpha + fade, 0.0f), static_cast(static_cast(maxAlpha))); - this->unknown_00E4 = static_cast(level); + this->alphaLevel = static_cast(level); params[2] = fade; params[5] = spin + angle; params[6] = level; - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->transform = rotation; - particle->alpha = this->unknown_00E4; + particle->alpha = this->alphaLevel; } for (std::list::iterator it = this->sprites.begin(); it != this->sprites.end();) { CSpriteParticle* sprite = *it; - if (sprite->life == 0.0f || static_cast(sprite->unknown_00E8) < sprite->life * 60.0f) { - float* params = &sprite->unknown_0054; + if (sprite->life == 0.0f || static_cast(sprite->elapsedFrames) < sprite->life * 60.0f) { + float* params = &sprite->animationParameter; const float radius = params[0]; const float delay = params[4]; float fade = params[5]; @@ -143,14 +143,14 @@ void CHealSp::OnProcess() { const float y = values[4] * 0.0f + values[1] * 0.0f + values[7] * radius + values[10] + (origin.y + velocity.y); const float z = values[5] * 0.0f + values[2] * 0.0f + values[8] * radius + values[11] + (origin.z + velocity.z); float level; - if (this->frame < this->unknown_00E0) { - if (sprite->unknown_00E8 == static_cast(delay)) { - fade = -(alpha / static_cast(30 - sprite->unknown_00E8)); + if (this->frame < this->holdFrame) { + if (sprite->elapsedFrames == static_cast(delay)) { + fade = -(alpha / static_cast(30 - sprite->elapsedFrames)); } level = std::min(std::max(alpha + fade, 0.0f), 255.0f); } else { - level = static_cast(this->unknown_00E4); + level = static_cast(this->alphaLevel); } params[2] = lift; @@ -160,7 +160,7 @@ void CHealSp::OnProcess() { sprite->position.x = x; sprite->position.y = y; sprite->position.z = z; - ++sprite->unknown_00E8; + ++sprite->elapsedFrames; ++it; } else { FreeParticle(sprite); @@ -174,10 +174,10 @@ void CHealSp::OnProcess() { void CHealSp::Render() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; const float height = particle->scale; - const float outer = *reinterpret_cast(particle->unknown_0058); - const float inner = particle->unknown_0054; + const float outer = *reinterpret_cast(particle->animationParameters); + const float inner = particle->animationParameter; const float startCos = g_cosTable[segment * 36]; const float startSin = g_sinTable[segment * 36]; const float endCos = g_cosTable[segment * 36 + 36]; @@ -196,7 +196,7 @@ void CHealSp::Render() { particle->vertices[3].y = -height; particle->vertices[3].z = endSin * inner; - const float left = static_cast(particle->unknown_000C % 4) * 0.25f; + const float left = static_cast(particle->columnIndex % 4) * 0.25f; const ParticleQuad quad = {false, 1.0f, 0.0f, left, left + 0.25f, false, true}; particle->Render(quad); } diff --git a/Source/Contents/Effects/HealSpEffect.h b/Source/Contents/Effects/HealSpEffect.h index dcb065ae4..0d37aa953 100644 --- a/Source/Contents/Effects/HealSpEffect.h +++ b/Source/Contents/Effects/HealSpEffect.h @@ -23,8 +23,8 @@ public: /* 00CC */ std::vector particles; /* 00D8 */ std::list sprites; - /* 00E0 */ int unknown_00E0; - /* 00E4 */ int unknown_00E4; + /* 00E0 */ int holdFrame; + /* 00E4 */ int alphaLevel; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Effects/HitLineEffect.cpp b/Source/Contents/Effects/HitLineEffect.cpp index 42d7419c9..0d736c751 100644 --- a/Source/Contents/Effects/HitLineEffect.cpp +++ b/Source/Contents/Effects/HitLineEffect.cpp @@ -29,17 +29,17 @@ void CHitLineEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\white02.bmp"); - particle->unknown_0010 = line; - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0008 = 4; - particle->unknown_00E8 = delay; + particle->rowIndex = line; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->groupIndex = 4; + particle->elapsedFrames = delay; particle->scale = 0.1f; - *reinterpret_cast(particle->unknown_0048) = brightness; - particle->unknown_004C = angle; - particle->unknown_00C0 = 14.0f; - float* turns = &particle->unknown_0054; - unsigned char* halfTurns = &particle->unknown_00A8; + *reinterpret_cast(particle->effectParameters) = brightness; + particle->phaseParameter = angle; + particle->speedParameter = 14.0f; + float* turns = &particle->animationParameter; + unsigned char* halfTurns = &particle->animationState; for (int index = 0; index < 21; ++index) { halfTurns[index] = 0; turns[index] = 0.0f; @@ -66,16 +66,16 @@ void CHitLineEffect::OnProcess() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - if (particle && particle->unknown_00E8 > 0) { - int& brightness = *reinterpret_cast(particle->unknown_0048); + if (particle && particle->elapsedFrames > 0) { + int& brightness = *reinterpret_cast(particle->effectParameters); short level = static_cast(brightness); - if (particle->unknown_00E8 > 35) { + if (particle->elapsedFrames > 35) { level -= 5; } brightness = std::max(level, 0); - float* turns = &particle->unknown_0054; - unsigned char* halfTurns = &particle->unknown_00A8; + float* turns = &particle->animationParameter; + unsigned char* halfTurns = &particle->animationState; float turn = turns[0] + 8.0f; if (turn > 180.0f) { ++halfTurns[0]; @@ -89,7 +89,7 @@ void CHitLineEffect::OnProcess() { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -98,15 +98,15 @@ void CHitLineEffect::OnProcess() { void CHitLineEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (!particle || *reinterpret_cast(particle->unknown_0048) <= 0 || particle->unknown_00E8 <= 0) { + if (!particle || *reinterpret_cast(particle->effectParameters) <= 0 || particle->elapsedFrames <= 0) { continue; } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; vector3d points[2] = {}; - const float radius = particle->unknown_00C0; - const float* turns = &particle->unknown_0054; - const unsigned char* halfTurns = &particle->unknown_00A8; + const float radius = particle->speedParameter; + const float* turns = &particle->animationParameter; + const unsigned char* halfTurns = &particle->animationState; for (int index = 0; index < 2; ++index) { const int count = static_cast(halfTurns[segment + index]); float distance = 0.0f; @@ -128,8 +128,8 @@ void CHitLineEffect::Render() { } points[index].y = height * scale; - points[index].x = g_cosTable[particle->unknown_004C] * distance; - points[index].z = g_sinTable[particle->unknown_004C] * distance; + points[index].x = g_cosTable[particle->phaseParameter] * distance; + points[index].z = g_sinTable[particle->phaseParameter] * distance; } const float dz = points[0].z - points[1].z; @@ -181,7 +181,7 @@ void CHitLineEffect::Render() { particle->vertices[2].x = this->previous[0].x; particle->vertices[2].y = this->previous[0].y; particle->vertices[2].z = this->previous[0].z; - const int alpha = *reinterpret_cast(particle->unknown_0048) - segment * 5; + const int alpha = *reinterpret_cast(particle->effectParameters) - segment * 5; if (alpha > 0) { particle->alpha = alpha; particle->SetColor(255, 200, static_cast(segment * 7 + 10)); diff --git a/Source/Contents/Effects/JupitelThunderStormEffect.cpp b/Source/Contents/Effects/JupitelThunderStormEffect.cpp index 253b3d0a9..8994dcc24 100644 --- a/Source/Contents/Effects/JupitelThunderStormEffect.cpp +++ b/Source/Contents/Effects/JupitelThunderStormEffect.cpp @@ -15,7 +15,7 @@ // INLINED static bool ParticleAlive(const CParticle* particle) { - return particle->life == 0.0f || static_cast(particle->unknown_00E8) < particle->life * 60.0f; + return particle->life == 0.0f || static_cast(particle->elapsedFrames) < particle->life * 60.0f; } // OFFSET: 0x00705F80 @@ -65,8 +65,8 @@ void CJupitelThunderStormEffect::Open() { int corners[4][2] = {{-1, 1}, {1, 1}, {-1, -1}, {1, -1}}; int index = 0; - const int rings = (this->unknown_00B0 - 1) / 4; - const int lastDelay = ((this->unknown_00B0 - 1) / 2 + 6) * 150; + const int rings = (this->effectLevel - 1) / 4; + const int lastDelay = ((this->effectLevel - 1) / 2 + 6) * 150; for (int delay = 80; delay <= lastDelay; delay += 80, ++index) { CEZ2STRParticle* bolt = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (!bolt) { diff --git a/Source/Contents/Effects/Level150Effect.cpp b/Source/Contents/Effects/Level150Effect.cpp index ae27026a6..e23fff634 100644 --- a/Source/Contents/Effects/Level150Effect.cpp +++ b/Source/Contents/Effects/Level150Effect.cpp @@ -58,10 +58,10 @@ void CLevel150Effect::AddBubbleRing(int alphaOffset) { } particle->SetTexture(FormatOwnedString("effect\\W_bubble%02d.tga", segment + 1).c_str()); - particle->unknown_0004 = this->id; - particle->unknown_0010 = ring; - particle->unknown_000C = segment; - particle->unknown_0008 = 4; + particle->effectId = this->id; + particle->rowIndex = ring; + particle->columnIndex = segment; + particle->groupIndex = 4; particle->alpha = alphaOffset + (3 - ring) * 45; if (effectId == 978) { @@ -74,21 +74,21 @@ void CLevel150Effect::AddBubbleRing(int alphaOffset) { particle->SetColor(255, 155, 0); } - *reinterpret_cast(&particle->unknown_00C4) = static_cast((ring + 2) * 90 % 360); - particle->unknown_0050 = 360; - particle->unknown_00C0 = 30.0f - static_cast(ring); + *reinterpret_cast(&particle->angleBits) = static_cast((ring + 2) * 90 % 360); + particle->angleParameter = 360; + particle->speedParameter = 30.0f - static_cast(ring); particle->scale = 3.5f; - particle->unknown_004C = 80; - particle->unknown_0054 = 0.0f; - particle->unknown_00E8 = 0; + particle->phaseParameter = 80; + particle->animationParameter = 0.0f; + particle->elapsedFrames = 0; - const int index = particle->unknown_000C; - const float radius = particle->unknown_00C0 * g_sinTable[index * 9] * 0.15f + particle->unknown_00C0; + const int index = particle->columnIndex; + const float radius = particle->speedParameter * g_sinTable[index * 9] * 0.15f + particle->speedParameter; const int direction = - static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * index) + - *reinterpret_cast(&particle->unknown_00C4)) % + static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * index) + + *reinterpret_cast(&particle->angleBits)) % 360; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float spread = radius * g_cosTable[tilt]; const float height = radius * g_sinTable[tilt]; const float cosine = g_cosTable[direction]; @@ -136,21 +136,21 @@ void CLevel150Effect::AddShock(int kind) { for (int index = 0; index < 2; ++index) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 13); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; - particle->unknown_004C = index * 180; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; + particle->phaseParameter = index * 180; particle->alpha = 200; - particle->unknown_0054 = -1.0f; - particle->unknown_00E8 = 0; + particle->animationParameter = -1.0f; + particle->elapsedFrames = 0; if (kind == 3) { particle->SetTexture("effect\\cir0002.tga"); - *reinterpret_cast(particle->unknown_0058) = 18.0f; + *reinterpret_cast(particle->animationParameters) = 18.0f; } else { particle->SetTexture("effect\\emp shock.tga"); - *reinterpret_cast(particle->unknown_0058) = 11.0f; + *reinterpret_cast(particle->animationParameters) = 11.0f; } this->shocks.push_back(particle); @@ -221,7 +221,7 @@ void CLevel150Effect::OnProcess() { particle->position.z = this->position[2]; if (particle) { - int tilt = particle->unknown_004C - 1; + int tilt = particle->phaseParameter - 1; float scale = particle->scale + 0.07f; int alpha = particle->alpha; if (tilt < 10) { @@ -242,17 +242,17 @@ void CLevel150Effect::OnProcess() { particle->alpha = alpha; particle->scale = scale; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; - const float radius = particle->unknown_00C0; - const int segment = particle->unknown_000C; + const float radius = particle->speedParameter; + const int segment = particle->columnIndex; matrix transform; std::memcpy(transform.values, g_identityMatrix, sizeof(transform.values)); transform.SetScale(scale * 0.5f, radius * g_sinTable[tilt] / (radius * g_sinTable[segment * 9] * 0.15f + radius), scale * 0.5f); particle->transform = transform; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (std::vector::iterator it = this->shocks.begin(); it != this->shocks.end(); ++it) { @@ -262,15 +262,15 @@ void CLevel150Effect::OnProcess() { particle->position.z = this->position[2]; if (particle) { - int tilt = particle->unknown_004C + 3; + int tilt = particle->phaseParameter + 3; if (tilt >= 360) { tilt -= 360; } - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; - const float size = *reinterpret_cast(particle->unknown_0058); + const float size = *reinterpret_cast(particle->animationParameters); const float scale = size * 0.1f * g_sinTable[tilt] + 1.0f + size * 0.8f; - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const int yaw = static_cast(mode->camera->camera.yaw); @@ -287,7 +287,7 @@ void CLevel150Effect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -296,13 +296,13 @@ void CLevel150Effect::OnProcess() { void CLevel150Effect::Render() { for (std::vector::iterator it = this->bubbles.begin(); it != this->bubbles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_000C <= 0) { + if (!particle || particle->columnIndex <= 0) { continue; } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; const ParticleQuad quad = {false, 0.0f, 1.0f, static_cast(segment) / 21.0f, static_cast(segment + 1) / 21.0f, false, true}; - particle->SetTexture(FormatOwnedString("effect\\W_bubble%02d.tga", particle->unknown_00E8 % 27 + 1).c_str()); + particle->SetTexture(FormatOwnedString("effect\\W_bubble%02d.tga", particle->elapsedFrames % 27 + 1).c_str()); particle->Render(quad); } @@ -349,15 +349,15 @@ void CLevel150SubEffect::Init() { } particle->SetTexture("effect\\emp shock.tga"); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(rand() % 360, 0)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); particle->alpha = 200; - particle->unknown_0054 = 10.0f; - *reinterpret_cast(particle->unknown_0058) = 10.0f; - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; - particle->unknown_00E8 = -20 * ring; + particle->animationParameter = 10.0f; + *reinterpret_cast(particle->animationParameters) = 10.0f; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = ring; + particle->groupIndex = 1; + particle->elapsedFrames = -20 * ring; this->particles.push_back(particle); if (effectId == 979) { @@ -404,24 +404,24 @@ void CLevel150SubEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; - if (particle && particle->unknown_00E8 > 0) { - float size = particle->unknown_0054 * 1.02; + if (particle && particle->elapsedFrames > 0) { + float size = particle->animationParameter * 1.02; if (size > 20.0f) { int alpha = particle->alpha - 3; if (alpha <= 0) { size = 10.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(rand() % 360, 0)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); alpha = 200; } particle->alpha = alpha; } - particle->unknown_0054 = size; + particle->animationParameter = size; - const int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4)); + const int angle = static_cast(*reinterpret_cast(&particle->angleBits)); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const int yaw = static_cast(mode->camera->camera.yaw); - const float scale = particle->unknown_0054; - const float height = *reinterpret_cast(particle->unknown_0058); + const float scale = particle->animationParameter; + const float height = *reinterpret_cast(particle->animationParameters); matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); @@ -439,7 +439,7 @@ void CLevel150SubEffect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/Level99Effect.cpp b/Source/Contents/Effects/Level99Effect.cpp index 096204d41..00429bb60 100644 --- a/Source/Contents/Effects/Level99Effect.cpp +++ b/Source/Contents/Effects/Level99Effect.cpp @@ -48,26 +48,26 @@ void CLevel99Effect::AddRings() { } particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = row; - particle->unknown_0008 = 3; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = row; + particle->groupIndex = 3; particle->alpha = 120; particle->SetColor(100, 100, 255); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(startAngle); - particle->unknown_0050 = 315; - particle->unknown_00C0 = 15.0f - static_cast(row) * 2.0f; + *reinterpret_cast(&particle->angleBits) = static_cast(startAngle); + particle->angleParameter = 315; + particle->speedParameter = 15.0f - static_cast(row) * 2.0f; particle->scale = static_cast(row) * 0.2f + 3.9f; - particle->unknown_004C = tilt; - particle->unknown_0054 = 0.0f; + particle->phaseParameter = tilt; + particle->animationParameter = 0.0f; InitParticleQuad(particle->vertices); this->sprites.push_back(particle); - const int index = particle->unknown_000C; - const float radius = g_sinTable[index * 9] * particle->unknown_00C0; - const float baseAngle = *reinterpret_cast(&particle->unknown_00C4); - const int angle = static_cast(static_cast(particle->unknown_0050 / 20.0f) * index + baseAngle) % 360; - const int ringTilt = particle->unknown_004C; + const int index = particle->columnIndex; + const float radius = g_sinTable[index * 9] * particle->speedParameter; + const float baseAngle = *reinterpret_cast(&particle->angleBits); + const int angle = static_cast(static_cast(particle->angleParameter / 20.0f) * index + baseAngle) % 360; + const int ringTilt = particle->phaseParameter; const float spread = radius * g_cosTable[ringTilt]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; @@ -89,16 +89,16 @@ void CLevel99Effect::AddRings() { particle->vertices[1].z = points[1].z; if (index != 0) { - particle->vertices[0].x = this->unknown_00CC[1].x; - particle->vertices[0].y = this->unknown_00CC[1].y; - particle->vertices[0].z = this->unknown_00CC[1].z; - particle->vertices[2].x = this->unknown_00CC[0].x; - particle->vertices[2].y = this->unknown_00CC[0].y; - particle->vertices[2].z = this->unknown_00CC[0].z; + particle->vertices[0].x = this->previousRingPoints[1].x; + particle->vertices[0].y = this->previousRingPoints[1].y; + particle->vertices[0].z = this->previousRingPoints[1].z; + particle->vertices[2].x = this->previousRingPoints[0].x; + particle->vertices[2].y = this->previousRingPoints[0].y; + particle->vertices[2].z = this->previousRingPoints[0].z; } - this->unknown_00CC[0] = points[0]; - this->unknown_00CC[1] = points[1]; + this->previousRingPoints[0] = points[0]; + this->previousRingPoints[1] = points[1]; } ++row; @@ -131,13 +131,13 @@ void CLevel99Effect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 13); if (particle) { particle->SetTexture("effect\\pikapika2.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 200; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_004C = tilt; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->phaseParameter = tilt; particle->scale = 9.0f; InitParticleQuad(particle->vertices); this->sparkles.push_back(particle); @@ -168,14 +168,14 @@ void CLevel99Effect::OnProcess() { if (CParticle* particle = *it) { matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); - rotation.MakeZRotation(*reinterpret_cast(&particle->unknown_00C4) / 180.0f * 3.141592f); + rotation.MakeZRotation(*reinterpret_cast(&particle->angleBits) / 180.0f * 3.141592f); rotation.AppendXRotation(1.570796f); - int phase = particle->unknown_004C + 3; + int phase = particle->phaseParameter + 3; if (phase >= 360) { phase -= 360; } - particle->unknown_004C = phase; + particle->phaseParameter = phase; matrix scale; std::memcpy(scale.values, g_identityMatrix, sizeof(scale.values)); @@ -186,7 +186,7 @@ void CLevel99Effect::OnProcess() { result.Compose(scale, rotation); particle->transform = result; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } for (auto it = this->sprites.begin(); it != this->sprites.end(); ++it) { @@ -195,8 +195,8 @@ void CLevel99Effect::OnProcess() { (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); - const float degrees = static_cast(static_cast(static_cast(particle->unknown_0010) + baseAngle + 3.0f)); + float& baseAngle = *reinterpret_cast(&particle->angleBits); + const float degrees = static_cast(static_cast(static_cast(particle->rowIndex) + baseAngle + 3.0f)); baseAngle = degrees; matrix rotation; @@ -204,7 +204,7 @@ void CLevel99Effect::OnProcess() { rotation.MakeYRotation(degrees / 180.0f * 3.141592f); particle->transform = rotation; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -220,8 +220,8 @@ void CLevel99Effect::Render() { for (std::vector::iterator it = this->sprites.begin(); it != this->sprites.end(); ++it) { CParticle* sprite = *it; - if (sprite && sprite->unknown_000C > 0) { - const int frame = sprite->unknown_000C; + if (sprite && sprite->columnIndex > 0) { + const int frame = sprite->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/Level99Effect.h b/Source/Contents/Effects/Level99Effect.h index 44f586b60..ddff87840 100644 --- a/Source/Contents/Effects/Level99Effect.h +++ b/Source/Contents/Effects/Level99Effect.h @@ -23,13 +23,13 @@ public: void AddRings(); - /* 00CC */ vector3d unknown_00CC[2] = {}; + /* 00CC */ vector3d previousRingPoints[2] = {}; /* 00E4 */ std::vector sparkles; /* 00F0 */ std::vector sprites; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(CLevel99Effect, unknown_00CC) == 0xCC); +static_assert(offsetof(CLevel99Effect, previousRingPoints) == 0xCC); static_assert(offsetof(CLevel99Effect, sparkles) == 0xE4); static_assert(offsetof(CLevel99Effect, sprites) == 0xF0); #endif diff --git a/Source/Contents/Effects/Level99Orb1Effect.cpp b/Source/Contents/Effects/Level99Orb1Effect.cpp index 5cd163c5e..53d0a3c83 100644 --- a/Source/Contents/Effects/Level99Orb1Effect.cpp +++ b/Source/Contents/Effects/Level99Orb1Effect.cpp @@ -34,11 +34,11 @@ void CLevel99Orb1Effect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\whitelight.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 2; - particle->unknown_00C0 = 0.15f; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 2; + particle->speedParameter = 0.15f; particle->scale = 1.8f; particle->SetColor(80, 80, 255); particle->alpha = 0; @@ -48,7 +48,7 @@ void CLevel99Orb1Effect::Open() { offset.y = static_cast(std::max(rand() % 100, 0)); offset.z = 0.0f; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } @@ -74,8 +74,8 @@ void CLevel99Orb1Effect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const int index = particle->unknown_000C + particle->unknown_0010 * 4; - const float speed = particle->unknown_00C0; + const int index = particle->columnIndex + particle->rowIndex * 4; + const float speed = particle->speedParameter; vector3d& offset = this->offsets[index]; if (offset.y < 0.0f) { if (offset.y < -30.0f) { @@ -83,14 +83,14 @@ void CLevel99Orb1Effect::OnProcess() { offset.y = static_cast(std::max(rand() % 100, 0)); offset.z = 0.0f; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } particle->alpha = 0; } else { - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 2; ++i) { const int current = static_cast(angles[i]); const int delta = static_cast(angles[i + 2]) - current; @@ -138,7 +138,7 @@ void CLevel99Orb1Effect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/Level99Orb2Effect.cpp b/Source/Contents/Effects/Level99Orb2Effect.cpp index 5f0cf18c3..2c1c66807 100644 --- a/Source/Contents/Effects/Level99Orb2Effect.cpp +++ b/Source/Contents/Effects/Level99Orb2Effect.cpp @@ -40,11 +40,11 @@ void CLevel99Orb2Effect::Open() { } particle->SetTexture("effect\\freezing_circle.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 2; - particle->unknown_00C0 = 0.15f; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 2; + particle->speedParameter = 0.15f; particle->scale = 0.55f; particle->alpha = 0; @@ -54,7 +54,7 @@ void CLevel99Orb2Effect::Open() { offset.y = height; offset.z = 0.0f; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } @@ -79,8 +79,8 @@ void CLevel99Orb2Effect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const float speed = particle->unknown_00C0; - EffectPoint& offset = this->offsets[particle->unknown_0010][particle->unknown_000C]; + const float speed = particle->speedParameter; + EffectPoint& offset = this->offsets[particle->rowIndex][particle->columnIndex]; if (offset.y < 0.0f) { if (offset.y < -30.0f) { const float height = static_cast(std::max(rand() % 100, 0)); @@ -88,14 +88,14 @@ void CLevel99Orb2Effect::OnProcess() { offset.y = height; offset.z = 0.0f; - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 4; ++i) { angles[i] = static_cast(std::max(rand() % 360, 0)); } particle->alpha = 0; } else { - float* angles = &particle->unknown_0054; + float* angles = &particle->animationParameter; for (int i = 0; i < 2; ++i) { const int current = static_cast(angles[i]); const int difference = static_cast(angles[i + 2]) - current; @@ -109,7 +109,7 @@ void CLevel99Orb2Effect::OnProcess() { } } - offset.x += speed * g_sinTable[static_cast(particle->unknown_0054)]; + offset.x += speed * g_sinTable[static_cast(particle->animationParameter)]; offset.z += speed * g_sinTable[static_cast(angles[1])]; if (offset.y < -20.0f) { particle->alpha = std::max(particle->alpha - 4, 0); @@ -140,7 +140,7 @@ void CLevel99Orb2Effect::OnProcess() { result.Compose(scaled, translation); particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/LightSphereEffect.cpp b/Source/Contents/Effects/LightSphereEffect.cpp index cfed3eff1..e78249af2 100644 --- a/Source/Contents/Effects/LightSphereEffect.cpp +++ b/Source/Contents/Effects/LightSphereEffect.cpp @@ -25,24 +25,24 @@ void CLightSphereEffect::CreateRayParticles(int param) { CParticle* particle = CreateParticle(reinterpret_cast(&this->position), 5); if (particle != nullptr) { particle->SetTexture("effect\\white02.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = c; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = c; + particle->groupIndex = 1; particle->alpha = 40; particle->scale = 1.0f; int r1 = std::rand() % 360; - particle->unknown_004C = r1 < 0 ? 0 : r1; + particle->phaseParameter = r1 < 0 ? 0 : r1; int r2 = std::rand() % 360; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(r2 < 0 ? 0 : r2); + *reinterpret_cast(&particle->angleBits) = static_cast(r2 < 0 ? 0 : r2); int r3 = std::rand() % 360; - particle->unknown_0050 = r3 < 0 ? 0 : r3; + particle->angleParameter = r3 < 0 ? 0 : r3; - particle->unknown_0054 = 10.0f; - *reinterpret_cast(particle->unknown_0058) = static_cast(param); + particle->animationParameter = 10.0f; + *reinterpret_cast(particle->animationParameters) = static_cast(param); switch (this->id) { case EF_LIGHTSPHERE_SUN: { @@ -123,14 +123,14 @@ void CLightSphereEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(&this->position), 5); if (particle != nullptr) { particle->SetTexture("effect\\thunder_center.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->scale = 3.5f; particle->alpha = 1; - particle->unknown_0054 = -10.0f; - *reinterpret_cast(particle->unknown_0058) = 0.0f; + particle->animationParameter = -10.0f; + *reinterpret_cast(particle->animationParameters) = 0.0f; switch (this->id) { case EF_LIGHTSPHERE_SUN: @@ -185,7 +185,7 @@ void CLightSphereEffect::OnProcess() { position.z = this->position[2]; if (particle != nullptr) { - if (particle->unknown_00E8 < 300) { + if (particle->elapsedFrames < 300) { const int alpha = particle->alpha + 1; particle->alpha = alpha >= 255 ? 255 : alpha; } else { @@ -193,7 +193,7 @@ void CLightSphereEffect::OnProcess() { particle->alpha = alpha < 0 ? 0 : alpha; } - float& phase = *reinterpret_cast(particle->unknown_0058); + float& phase = *reinterpret_cast(particle->animationParameters); const int spin = (static_cast(phase) + 2) % 360; phase = static_cast(spin); const float scale = particle->scale * g_sinTable[spin] * 0.05f + particle->scale; @@ -211,14 +211,14 @@ void CLightSphereEffect::OnProcess() { matrix translation; std::memcpy(translation.values, g_identityMatrix, sizeof(translation.values)); - translation.MakeTranslate(0.0f, particle->unknown_0054, 0.0f); + translation.MakeTranslate(0.0f, particle->animationParameter, 0.0f); matrix transform; transform.Compose(billboard, translation); particle->transform = transform; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (std::vector::iterator it = this->rays.begin(); it != this->rays.end(); ++it) { @@ -237,7 +237,7 @@ void CLightSphereEffect::OnProcess() { particle->scale = scale; int alpha = particle->alpha; - if (particle->unknown_00E8 > 500) { + if (particle->elapsedFrames > 500) { --alpha; if (alpha < 0) { alpha = 0; @@ -245,33 +245,33 @@ void CLightSphereEffect::OnProcess() { } particle->alpha = alpha; - const int previous = particle->unknown_0050; + const int previous = particle->angleParameter; const int roll = std::rand() % 2; const int phase = (previous + 1 + (roll < 0 ? 0 : roll)) % 360; - particle->unknown_0050 = phase; + particle->angleParameter = phase; vector3d points[3]{}; const float radius = particle->scale * g_sinTable[phase] + particle->scale; - const int pitch = particle->unknown_004C; - const int yaw = static_cast(*reinterpret_cast(&particle->unknown_00C4)); + const int pitch = particle->phaseParameter; + const int yaw = static_cast(*reinterpret_cast(&particle->angleBits)); const float flat = radius * g_cosTable[pitch]; points[0].x = flat * g_cosTable[yaw]; - points[0].y = radius * g_sinTable[pitch] - particle->unknown_0054; + points[0].y = radius * g_sinTable[pitch] - particle->animationParameter; points[0].z = flat * g_sinTable[yaw]; - if (*reinterpret_cast(particle->unknown_0058) == 0.0f) { + if (*reinterpret_cast(particle->animationParameters) == 0.0f) { points[1].x = -0.5f; - points[1].y = -particle->unknown_0054; + points[1].y = -particle->animationParameter; points[1].z = 0.0f; points[2].x = 0.5f; - points[2].y = -particle->unknown_0054; + points[2].y = -particle->animationParameter; points[2].z = 0.0f; } else { points[1].x = 0.0f; - points[1].y = -particle->unknown_0054; + points[1].y = -particle->animationParameter; points[1].z = -0.5f; points[2].x = 0.0f; - points[2].y = -particle->unknown_0054; + points[2].y = -particle->animationParameter; points[2].z = 0.5f; } @@ -289,7 +289,7 @@ void CLightSphereEffect::OnProcess() { particle->vertices[3].z = points[2].z; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/MagicFloorEffect.cpp b/Source/Contents/Effects/MagicFloorEffect.cpp index f893aaf1b..b806fe26d 100644 --- a/Source/Contents/Effects/MagicFloorEffect.cpp +++ b/Source/Contents/Effects/MagicFloorEffect.cpp @@ -33,13 +33,13 @@ void CMagicFloorEffect::AddFloors() { } particle->SetTexture(textures[index]); - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 255; - *reinterpret_cast(&particle->unknown_00C4) = 0.0f; - particle->unknown_004C = 0; + *reinterpret_cast(&particle->angleBits) = 0.0f; + particle->phaseParameter = 0; particle->scale = 30.0f; InitParticleQuad(particle->vertices); this->floors.push_back(particle); @@ -58,22 +58,22 @@ void CMagicFloorEffect::AddClouds(int layer) { } particle->SetTexture("effect\\cloud11.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->alpha = 200; - particle->unknown_0050 = 30; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_004C = std::max(0, rand() % 21) + 80; - particle->unknown_0054 = 1.0f; + particle->angleParameter = 30; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->phaseParameter = std::max(0, rand() % 21) + 80; + particle->animationParameter = 1.0f; particle->SetColor(255, 100, 100); if (layer == 0) { - particle->unknown_00C0 = 48.0f - static_cast(ring) * 5.0f; + particle->speedParameter = 48.0f - static_cast(ring) * 5.0f; particle->scale = 11.0f; } else if (layer == 1) { - particle->unknown_00C0 = 28.0f - static_cast(ring) * 5.0f; + particle->speedParameter = 28.0f - static_cast(ring) * 5.0f; particle->scale = 22.0f; } @@ -116,14 +116,14 @@ void CMagicFloorEffect::ResetParticles() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - particle->scale = *reinterpret_cast(&this->unknown_0048); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(*reinterpret_cast(this->unknown_004C)); - particle->unknown_004C = static_cast(static_cast(particle->unknown_0010) * *reinterpret_cast(&this->unknown_0050)); - particle->alpha = *reinterpret_cast(this->unknown_0054); + particle->scale = *reinterpret_cast(&this->scaleParameter); + *reinterpret_cast(&particle->angleBits) = static_cast(*reinterpret_cast(this->angleParameter)); + particle->phaseParameter = static_cast(static_cast(particle->rowIndex) * *reinterpret_cast(&this->rotationParameter)); + particle->alpha = *reinterpret_cast(this->alphaParameters); particle->sourceBlend = 5; particle->destinationBlend = 7; InitParticleQuad(particle->vertices); - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; } } @@ -143,9 +143,9 @@ void CMagicFloorEffect::OnProcess() { particle->position.z = this->position[2]; if (particle) { - const float current = *reinterpret_cast(&particle->unknown_00C4); + const float current = *reinterpret_cast(&particle->angleBits); int angle = 0; - switch (particle->unknown_000C) { + switch (particle->columnIndex) { case 0: case 1: angle = static_cast(current + 1.0f); @@ -166,7 +166,7 @@ void CMagicFloorEffect::OnProcess() { angle += 360; } - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); rotation.MakeZRotation(static_cast(angle) / 180.0f * 3.141592f); @@ -179,7 +179,7 @@ void CMagicFloorEffect::OnProcess() { particle->transform = result; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { @@ -189,12 +189,12 @@ void CMagicFloorEffect::OnProcess() { particle->position.z = this->position[2]; if (particle) { - const int direction = static_cast(*reinterpret_cast(&particle->unknown_00C4) + 5.0f) % 360; - const int sweep = std::min(particle->unknown_0050 + 3, 180); - particle->unknown_0050 = sweep; + const int direction = static_cast(*reinterpret_cast(&particle->angleBits) + 5.0f) % 360; + const int sweep = std::min(particle->angleParameter + 3, 180); + particle->angleParameter = sweep; int alpha = particle->alpha; - const int phase = particle->unknown_00E8 % 300; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(direction); + const int phase = particle->elapsedFrames % 300; + *reinterpret_cast(&particle->angleBits) = static_cast(direction); if (phase == 0) { alpha = 50; } else if (phase > 100) { @@ -205,22 +205,22 @@ void CMagicFloorEffect::OnProcess() { } particle->alpha = alpha; - const int segment = particle->unknown_000C; - const float radius = particle->unknown_0054; + const int segment = particle->columnIndex; + const float radius = particle->animationParameter; const int angle = static_cast(static_cast(static_cast(static_cast(sweep) / 20.0f) * segment) + - *reinterpret_cast(&particle->unknown_00C4)) % + *reinterpret_cast(&particle->angleBits)) % 360; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float spread = radius * g_cosTable[tilt]; const float height = radius * g_sinTable[tilt]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; - const float floorRadius = *reinterpret_cast(&this->unknown_0048); + const float floorRadius = *reinterpret_cast(&this->scaleParameter); EffectPoint points[4]; points[0].x = floorRadius * cosine; - points[0].y = -particle->unknown_00C0; + points[0].y = -particle->speedParameter; points[0].z = floorRadius * sine; points[1].x = points[0].x + cosine * spread; points[1].y = points[0].y - height; @@ -250,7 +250,7 @@ void CMagicFloorEffect::OnProcess() { this->lastPoints[1].z = points[1].z; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -265,15 +265,15 @@ void CMagicFloorEffect::Render() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { + if (particle && particle->columnIndex > 0) { ParticleQuad quad; quad.billboard = false; quad.unused = false; quad.depth = true; quad.top = 0.0f; quad.bottom = 1.0f; - quad.left = static_cast(particle->unknown_000C - 1) / 21.0f; - quad.right = static_cast(particle->unknown_000C) / 21.0f; + quad.left = static_cast(particle->columnIndex - 1) / 21.0f; + quad.right = static_cast(particle->columnIndex) / 21.0f; particle->Render(quad); } } diff --git a/Source/Contents/Effects/MagnumBreak.cpp b/Source/Contents/Effects/MagnumBreak.cpp index 6a943a720..73fd0cf53 100644 --- a/Source/Contents/Effects/MagnumBreak.cpp +++ b/Source/Contents/Effects/MagnumBreak.cpp @@ -7,20 +7,20 @@ // OFFSET: 0x00B49AD0 // FUNCTION: fn_18938 void CMagnumBreak::AddRings() { - const float growth = -(1.75f / static_cast(this->unknown_002C)) * 0.5f; + const float growth = -(1.75f / static_cast(this->effectLifetime)) * 0.5f; for (int index = 0; index < 10; ++index) { CParticle* ring = CreateParticle(reinterpret_cast(this->position), 0x201); - ring->unknown_0004 = this->id; - ring->unknown_000C = index; - ring->unknown_0010 = 0; - ring->unknown_0008 = 1; - *reinterpret_cast(&ring->unknown_00C4) = static_cast(index) * 36.0f; + ring->effectId = this->id; + ring->columnIndex = index; + ring->rowIndex = 0; + ring->groupIndex = 1; + *reinterpret_cast(&ring->angleBits) = static_cast(index) * 36.0f; ring->scale = 0.0f; - ring->unknown_00C0 = 1.75f; - *reinterpret_cast(&ring->unknown_0048[0x0C]) = growth; - *reinterpret_cast(&ring->unknown_0048[0x10]) = 12.0f; - *reinterpret_cast(&ring->unknown_0048[0x14]) = 0.0f; + ring->speedParameter = 1.75f; + *reinterpret_cast(&ring->effectParameters[0x0C]) = growth; + *reinterpret_cast(&ring->effectParameters[0x10]) = 12.0f; + *reinterpret_cast(&ring->effectParameters[0x14]) = 0.0f; ring->SetTexture("effect\\ring_yellow.tga"); this->rings.push_back(ring); } @@ -28,20 +28,20 @@ void CMagnumBreak::AddRings() { // INLINED void CMagnumBreak::AddWaves() { - const float growth = -(1.15f / static_cast(this->unknown_002C)) * 0.5f; + const float growth = -(1.15f / static_cast(this->effectLifetime)) * 0.5f; for (int tilt = -90; tilt <= 54; tilt += 36) { for (int angle = 0; angle <= 324; angle += 36) { CParticle* wave = CreateParticle(reinterpret_cast(this->position), 1); - wave->unknown_0004 = this->id; - wave->unknown_000C = angle; - wave->unknown_0010 = tilt; - wave->unknown_0008 = 1; + wave->effectId = this->id; + wave->columnIndex = angle; + wave->rowIndex = tilt; + wave->groupIndex = 1; wave->scale = 0.0f; - wave->unknown_00C0 = 1.15f; - *reinterpret_cast(&wave->unknown_0048[0x0C]) = growth; - *reinterpret_cast(&wave->unknown_0048[0x10]) = 3.0f; - *reinterpret_cast(&wave->unknown_0048[0x14]) = 0.0f; + wave->speedParameter = 1.15f; + *reinterpret_cast(&wave->effectParameters[0x0C]) = growth; + *reinterpret_cast(&wave->effectParameters[0x10]) = 3.0f; + *reinterpret_cast(&wave->effectParameters[0x14]) = 0.0f; wave->SetTexture("effect\\대폭발.tga"); this->waves.push_back(wave); } @@ -81,38 +81,38 @@ bool CMagnumBreak::IsAlive() { void CMagnumBreak::OnProcess() { for (std::vector::iterator it = this->rings.begin(); it != this->rings.end(); ++it) { CParticle* ring = *it; - float& growth = *reinterpret_cast(&ring->unknown_0048[0x0C]); - float& maximum = *reinterpret_cast(&ring->unknown_0048[0x10]); - float& spin = *reinterpret_cast(&ring->unknown_0048[0x14]); + float& growth = *reinterpret_cast(&ring->effectParameters[0x0C]); + float& maximum = *reinterpret_cast(&ring->effectParameters[0x10]); + float& spin = *reinterpret_cast(&ring->effectParameters[0x14]); const float angle = spin; - float speed = growth + ring->unknown_00C0; + float speed = growth + ring->speedParameter; speed = speed > 0.0f ? speed : 0.0f; float scale = speed + ring->scale; scale = scale < maximum ? scale : maximum; matrix rotation; rotation.MakeXRotation(1.5707964f); ring->scale = scale; - ring->unknown_00C0 = speed; + ring->speedParameter = speed; spin = angle + speed; - ++ring->unknown_00E8; + ++ring->elapsedFrames; ring->alpha = this->alpha; ring->transform = rotation; } for (std::vector::iterator it = this->waves.begin(); it != this->waves.end(); ++it) { CParticle* wave = *it; - const float speed = *reinterpret_cast(&wave->unknown_0048[0x0C]) + wave->unknown_00C0; - wave->unknown_00C0 = speed; + const float speed = *reinterpret_cast(&wave->effectParameters[0x0C]) + wave->speedParameter; + wave->speedParameter = speed; wave->scale = speed + wave->scale; - *reinterpret_cast(&wave->unknown_0048[0x14]) = - *reinterpret_cast(&wave->unknown_0048[0x10]) + *reinterpret_cast(&wave->unknown_0048[0x14]); - ++wave->unknown_00E8; + *reinterpret_cast(&wave->effectParameters[0x14]) = + *reinterpret_cast(&wave->effectParameters[0x10]) + *reinterpret_cast(&wave->effectParameters[0x14]); + ++wave->elapsedFrames; wave->alpha = this->alpha; } float step; if (this->frame == this->fadeFrame) { - step = static_cast(-(this->alpha / (this->unknown_002C - this->frame))); + step = static_cast(-(this->alpha / (this->effectLifetime - this->frame))); this->fadeStep = step; } else { step = this->fadeStep; @@ -132,8 +132,8 @@ void CMagnumBreak::OnProcess() { void CMagnumBreak::Render() { for (std::vector::iterator it = this->rings.begin(); it != this->rings.end(); ++it) { CParticle* ring = *it; - const int angle = static_cast(*reinterpret_cast(&ring->unknown_00C4)); - const float outer = *reinterpret_cast(&ring->unknown_0048[0x14]); + const int angle = static_cast(*reinterpret_cast(&ring->angleBits)); + const float outer = *reinterpret_cast(&ring->effectParameters[0x14]); const float inner = outer - ring->scale; const float cos0 = g_cosTable[angle]; const float sin0 = g_sinTable[angle]; @@ -155,7 +155,7 @@ void CMagnumBreak::Render() { quad.billboard = false; quad.top = 1.0f; quad.bottom = 0.0f; - quad.left = static_cast(ring->unknown_000C % 4) * 0.25f; + quad.left = static_cast(ring->columnIndex % 4) * 0.25f; quad.right = quad.left + 0.25f; quad.unused = false; quad.depth = true; @@ -167,8 +167,8 @@ void CMagnumBreak::Render() { CMagnumBreak::UpdateWave(wave); ParticleQuad quad; quad.billboard = false; - quad.left = static_cast(wave->unknown_000C / 36) * 0.1f; - quad.top = static_cast(static_cast((static_cast(wave->unknown_0010) + 90.0f) / 36.0f)) * 0.2f; + quad.left = static_cast(wave->columnIndex / 36) * 0.1f; + quad.top = static_cast(static_cast((static_cast(wave->rowIndex) + 90.0f) / 36.0f)) * 0.2f; quad.right = quad.left + 0.1f; quad.bottom = quad.top + 0.2f; quad.unused = false; @@ -180,9 +180,9 @@ void CMagnumBreak::Render() { // OFFSET: 0x00B4A590 // FUNCTION: fn_18944 void CMagnumBreak::UpdateWave(CParticle* particle) { - const int spin = static_cast(*reinterpret_cast(&particle->unknown_0048[0x14])); - const int yaw = particle->unknown_000C; - const int pitch = particle->unknown_0010; + const int spin = static_cast(*reinterpret_cast(&particle->effectParameters[0x14])); + const int yaw = particle->columnIndex; + const int pitch = particle->rowIndex; const float yaw0 = GetRadian(spin + yaw); const float pitch0 = GetRadian(pitch); const float yaw1 = GetRadian(static_cast(static_cast(yaw + 36) + 0.25f + static_cast(spin))); diff --git a/Source/Contents/Effects/MandraAttackEffect.cpp b/Source/Contents/Effects/MandraAttackEffect.cpp index 27bbb3d5b..0bcb41ed7 100644 --- a/Source/Contents/Effects/MandraAttackEffect.cpp +++ b/Source/Contents/Effects/MandraAttackEffect.cpp @@ -18,7 +18,7 @@ CMandraAttackEffect::CMandraAttackEffect() { // OFFSET: 0x00E4C310 // FUNCTION: fn_24285 bool CMandraAttackEffect::OnProcess() { - float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); float startFrame = this->startFrame; if (startFrame > frame) { this->render.visible = 0; @@ -162,7 +162,7 @@ void CMandraAttackEffect::SendMsg(CGameObject* sender, int message, int a, int b this->render.position.y = target.y; this->render.position.z = target.z; this->render.visible = 1; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); this->SetAnimationSpeed(this->GetActRes()->Speed(0)); if (f == 0x42C) { this->SetAnimationSpeed(2.0f); diff --git a/Source/Contents/Effects/MapChainEffect.cpp b/Source/Contents/Effects/MapChainEffect.cpp index 912c1af6c..6b507de97 100644 --- a/Source/Contents/Effects/MapChainEffect.cpp +++ b/Source/Contents/Effects/MapChainEffect.cpp @@ -12,7 +12,7 @@ // OFFSET: 0x00B4A9E0 // FUNCTION: fn_18945 CMapChainEffect::CMapChainEffect() - : CEffect(1024), particles(), unknown_00F0(2), unknown_00F4(2), unknown_00F8(2), unknown_00FC(2), unknown_0100(2) { + : CEffect(1024), particles(), chainModeA(2), chainModeB(2), chainModeC(2), chainModeD(2), chainModeE(2) { } // OFFSET: 0x00B4AB90 @@ -23,18 +23,18 @@ void CMapChainEffect::CreateChainParticles(int param) { for (int i = 0; i < 21; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(&this->position), 5); if (particle != nullptr) { - particle->unknown_0010 = local8; - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0008 = 1; - particle->unknown_00C0 = 10.0f; + particle->rowIndex = local8; + particle->effectId = this->id; + particle->columnIndex = i; + particle->groupIndex = 1; + particle->speedParameter = 10.0f; particle->scale = 14.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(localC); - particle->unknown_004C = param; + *reinterpret_cast(&particle->angleBits) = static_cast(localC); + particle->phaseParameter = param; particle->alpha = 255; - particle->unknown_0050 = 60; - particle->unknown_0054 = -14.0f; - *reinterpret_cast(particle->unknown_0058) = 1.0f; + particle->angleParameter = 60; + particle->animationParameter = -14.0f; + *reinterpret_cast(particle->animationParameters) = 1.0f; particle->destinationBlend = 6; InitParticleQuad(particle->vertices); particle->SetTexture("effect\\hero_005.tga"); @@ -48,18 +48,18 @@ void CMapChainEffect::CreateChainParticles(int param) { for (int i = 0; i < 21; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(&this->position), 5); if (particle != nullptr) { - particle->unknown_0010 = localC2; - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0008 = 1; - particle->unknown_00C0 = 10.0f; + particle->rowIndex = localC2; + particle->effectId = this->id; + particle->columnIndex = i; + particle->groupIndex = 1; + particle->speedParameter = 10.0f; particle->scale = 14.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(local82); - particle->unknown_004C = param; + *reinterpret_cast(&particle->angleBits) = static_cast(local82); + particle->phaseParameter = param; particle->alpha = 255; - particle->unknown_0050 = 60; - particle->unknown_0054 = -14.0f; - *reinterpret_cast(particle->unknown_0058) = 1.0f; + particle->angleParameter = 60; + particle->animationParameter = -14.0f; + *reinterpret_cast(particle->animationParameters) = 1.0f; particle->sourceBlend = 5; particle->destinationBlend = 7; InitParticleQuad(particle->vertices); @@ -100,15 +100,15 @@ void CMapChainEffect::ResetParticles() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - particle->unknown_00C0 = *reinterpret_cast(base + 0x44); + particle->speedParameter = *reinterpret_cast(base + 0x44); particle->scale = *reinterpret_cast(base + 0x48); particle->alpha = *reinterpret_cast(base + 0x54); - particle->unknown_0054 = *reinterpret_cast(base + 0x5C); - *reinterpret_cast(particle->unknown_0058) = *reinterpret_cast(base + 0x60); + particle->animationParameter = *reinterpret_cast(base + 0x5C); + *reinterpret_cast(particle->animationParameters) = *reinterpret_cast(base + 0x60); particle->sourceBlend = 5; particle->destinationBlend = 7; InitParticleQuad(particle->vertices); - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; } } @@ -127,16 +127,16 @@ void CMapChainEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - float& angle = *reinterpret_cast(&particle->unknown_00C4); - const float speed = *reinterpret_cast(particle->unknown_0058); + float& angle = *reinterpret_cast(&particle->angleBits); + const float speed = *reinterpret_cast(particle->animationParameters); angle += speed; if (angle >= 360.0f) { angle -= 360.0f; } - if (particle->unknown_0010 > 5) { + if (particle->rowIndex > 5) { int delta = -3; - if (particle->unknown_00E8 % 600 <= 250) { + if (particle->elapsedFrames % 600 <= 250) { delta = 3; } particle->alpha += delta; @@ -153,12 +153,12 @@ void CMapChainEffect::OnProcess() { rotation.MakeYRotation(view->camera.yaw / -180.0f * 3.141592f); particle->transform = rotation; - const int segment = particle->unknown_000C; - const int index = static_cast(static_cast(static_cast(particle->unknown_0050 / 20.0f) * segment) + angle) % 360; + const int segment = particle->columnIndex; + const int index = static_cast(static_cast(static_cast(particle->angleParameter / 20.0f) * segment) + angle) % 360; vector3d points[4] = {}; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float sinIndex = g_sinTable[index]; const float cosIndex = g_cosTable[index]; const float sinTilt = g_sinTable[tilt]; @@ -166,13 +166,13 @@ void CMapChainEffect::OnProcess() { const float termX = (sinTilt * particle->scale) * cosIndex; const float termZ = (particle->scale * cosTilt) * cosIndex; - const float widthCos = particle->unknown_00C0 * cosTilt; - const float widthSin = particle->unknown_00C0 * sinTilt; + const float widthCos = particle->speedParameter * cosTilt; + const float widthSin = particle->speedParameter * sinTilt; const float v1x = (termX - widthCos) + 0.0f; const float v3x = (termX + widthCos) + 0.0f; - const float v1y = (particle->scale * sinIndex - 0.0f) + particle->unknown_0054; - const float v3y = (particle->scale * sinIndex + 0.0f) + particle->unknown_0054; + const float v1y = (particle->scale * sinIndex - 0.0f) + particle->animationParameter; + const float v3y = (particle->scale * sinIndex + 0.0f) + particle->animationParameter; const float v1z = (termZ + widthSin) + 0.0f; const float v3z = (termZ - widthSin) + 0.0f; @@ -201,7 +201,7 @@ void CMapChainEffect::OnProcess() { this->corners[0].z = v3z; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -210,8 +210,8 @@ void CMapChainEffect::OnProcess() { void CMapChainEffect::Render() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { - if (particle->unknown_0010 < 6) { + if (particle && particle->columnIndex > 0) { + if (particle->rowIndex < 6) { particle->destinationBlend = 6; } @@ -219,8 +219,8 @@ void CMapChainEffect::Render() { quad.billboard = false; quad.top = 0.0f; quad.bottom = 1.0f; - quad.left = static_cast(particle->unknown_000C - 1) / 21.0f; - quad.right = static_cast(particle->unknown_000C) / 21.0f; + quad.left = static_cast(particle->columnIndex - 1) / 21.0f; + quad.right = static_cast(particle->columnIndex) / 21.0f; quad.unused = true; quad.depth = true; particle->Render(quad); diff --git a/Source/Contents/Effects/MapChainEffect.h b/Source/Contents/Effects/MapChainEffect.h index 02f5a90f1..389af805f 100644 --- a/Source/Contents/Effects/MapChainEffect.h +++ b/Source/Contents/Effects/MapChainEffect.h @@ -31,11 +31,11 @@ public: /* 00CC */ MapChainPoint corners[2]; /* 00E4 */ std::vector particles; - /* 00F0 */ int unknown_00F0; - /* 00F4 */ int unknown_00F4; - /* 00F8 */ int unknown_00F8; - /* 00FC */ int unknown_00FC; - /* 0100 */ int unknown_0100; + /* 00F0 */ int chainModeA; + /* 00F4 */ int chainModeB; + /* 00F8 */ int chainModeC; + /* 00FC */ int chainModeD; + /* 0100 */ int chainModeE; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Effects/MapMagicZoneEffect.cpp b/Source/Contents/Effects/MapMagicZoneEffect.cpp index aa604d17e..de4745150 100644 --- a/Source/Contents/Effects/MapMagicZoneEffect.cpp +++ b/Source/Contents/Effects/MapMagicZoneEffect.cpp @@ -14,24 +14,24 @@ void CMapMagicZoneEffect::AddSpinner(int kind) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; if (kind == 0) { particle->SetTexture("effect\\mjin2.tga"); - *reinterpret_cast(&particle->unknown_00C4) = 0.0f; + *reinterpret_cast(&particle->angleBits) = 0.0f; particle->alpha = 200; - particle->unknown_0054 = -0.5f; + particle->animationParameter = -0.5f; } else if (kind == 1) { particle->SetTexture("effect\\mjin.tga"); - *reinterpret_cast(&particle->unknown_00C4) = 45.0f; + *reinterpret_cast(&particle->angleBits) = 45.0f; particle->alpha = 50; - particle->unknown_0054 = -0.4f; + particle->animationParameter = -0.4f; } particle->scale = 30.0f; - particle->unknown_004C = 0; + particle->phaseParameter = 0; InitParticleQuad(particle->vertices); this->spinners.push_back(particle); } @@ -66,16 +66,16 @@ void CMapMagicZoneEffect::Open() { for (int angle = 0; angle < 360; angle += 180) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\pikapika2.bmp"); particle->scale = 46.0f; - particle->unknown_004C = angle; - *reinterpret_cast(&particle->unknown_00C4) = 0.0f; + particle->phaseParameter = angle; + *reinterpret_cast(&particle->angleBits) = 0.0f; particle->alpha = 25; - particle->unknown_0054 = -1.0f; + particle->animationParameter = -1.0f; InitParticleQuad(particle->vertices); this->petals.push_back(particle); } @@ -90,17 +90,17 @@ void CMapMagicZoneEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_0010 = row; - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0008 = 3; + particle->rowIndex = row; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->groupIndex = 3; particle->alpha = 50; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_0050 = 315; - particle->unknown_00C0 = 15.0f - (static_cast(row) + static_cast(row)); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->angleParameter = 315; + particle->speedParameter = 15.0f - (static_cast(row) + static_cast(row)); particle->scale = static_cast(row) * 0.2f + 12.9f; - particle->unknown_004C = height; - particle->unknown_0054 = 0.0f; + particle->phaseParameter = height; + particle->animationParameter = 0.0f; InitParticleQuad(particle->vertices); this->ribbon.push_back(particle); } @@ -125,7 +125,7 @@ void CMapMagicZoneEffect::OnProcess() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - ++particle->unknown_00E8; + ++particle->elapsedFrames; this->UpdateSpinner(particle); } @@ -134,13 +134,13 @@ void CMapMagicZoneEffect::OnProcess() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - ++particle->unknown_00E8; + ++particle->elapsedFrames; vector3d corners[4]{}; - const int angle = particle->unknown_000C * 23; - particle->unknown_004C = (particle->unknown_004C + 3) % 360; - const float radius = (g_sinTable[particle->unknown_004C] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; - const float height = particle->unknown_0054; + const int angle = particle->columnIndex * 23; + particle->phaseParameter = (particle->phaseParameter + 3) % 360; + const float radius = (g_sinTable[particle->phaseParameter] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; + const float height = particle->animationParameter; for (int corner = 0; corner < 4; ++corner) { const int index = (angle + corner * 90) % 360; @@ -173,21 +173,21 @@ void CMapMagicZoneEffect::OnProcess() { particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - ++particle->unknown_00E8; - float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); - spinAngle = static_cast(static_cast(particle->unknown_0010 + spinAngle + 3.0f)); + ++particle->elapsedFrames; + float& spinAngle = *reinterpret_cast(&particle->angleBits); + spinAngle = static_cast(static_cast(particle->rowIndex + spinAngle + 3.0f)); matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); particle->transform = rotation; - const int segment = particle->unknown_000C; - const float wave = g_sinTable[segment * 9] * particle->unknown_00C0; - const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int segment = particle->columnIndex; + const float wave = g_sinTable[segment * 9] * particle->speedParameter; + const int step = static_cast(static_cast(particle->angleParameter) / 20.0f); const int angle = static_cast(static_cast(step * segment) + spinAngle) % 360; - const float flat = wave * g_cosTable[particle->unknown_004C]; - const float rise = wave * g_sinTable[particle->unknown_004C]; + const float flat = wave * g_cosTable[particle->phaseParameter]; + const float rise = wave * g_sinTable[particle->phaseParameter]; vector3d points[2]{}; points[0].x = particle->scale * g_cosTable[angle]; @@ -222,11 +222,11 @@ void CMapMagicZoneEffect::OnProcess() { void CMapMagicZoneEffect::UpdateSpinner(CParticle* particle) { if (particle) { vector3d corners[4]{}; - float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + float& spinAngle = *reinterpret_cast(&particle->angleBits); const int angle = static_cast(spinAngle + 1.0f); spinAngle = static_cast(angle % 360); - const float radius = (g_sinTable[particle->unknown_004C] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; - const float height = particle->unknown_0054; + const float radius = (g_sinTable[particle->phaseParameter] + 1.0f) * (particle->scale * 0.1f) + particle->scale * 0.8f; + const float height = particle->animationParameter; for (int corner = 0; corner < 4; ++corner) { const int index = (angle + corner * 90) % 360; @@ -275,8 +275,8 @@ void CMapMagicZoneEffect::Render() { for (std::vector::iterator it = this->ribbon.begin(); it != this->ribbon.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { - const int segment = particle->unknown_000C; + if (particle && particle->columnIndex > 0) { + const int segment = particle->columnIndex; particle->destinationBlend = 6; ParticleQuad quad; quad.billboard = false; diff --git a/Source/Contents/Effects/MappillarEffect.cpp b/Source/Contents/Effects/MappillarEffect.cpp index c4a086655..568975477 100644 --- a/Source/Contents/Effects/MappillarEffect.cpp +++ b/Source/Contents/Effects/MappillarEffect.cpp @@ -28,30 +28,30 @@ void CMappillarEffect::Open() { } particle->SetTexture("effect\\ring_blue.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->alpha = 70; particle->SetColor(100, 100, 255); - float& baseAngle = *reinterpret_cast(&particle->unknown_00C4); - particle->unknown_0050 = 360; - particle->unknown_00C0 = 120.0f; - particle->unknown_004C = 89; - baseAngle = static_cast(particle->unknown_0010 * 90); - particle->scale = static_cast(particle->unknown_0010) * 0.5f + 11.0f; - reinterpret_cast(&particle->unknown_0054)[particle->unknown_0010] = 0; - particle->unknown_00E8 = particle->unknown_0010 * 30; + float& baseAngle = *reinterpret_cast(&particle->angleBits); + particle->angleParameter = 360; + particle->speedParameter = 120.0f; + particle->phaseParameter = 89; + baseAngle = static_cast(particle->rowIndex * 90); + particle->scale = static_cast(particle->rowIndex) * 0.5f + 11.0f; + reinterpret_cast(&particle->animationParameter)[particle->rowIndex] = 0; + particle->elapsedFrames = particle->rowIndex * 30; - int angle = static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * particle->unknown_000C) + baseAngle) % 360; - if (particle->unknown_000C == 20) { + int angle = static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * particle->columnIndex) + baseAngle) % 360; + if (particle->columnIndex == 20) { angle = static_cast(baseAngle); } - const int tilt = particle->unknown_004C; - const float spread = particle->unknown_00C0 * g_cosTable[tilt]; - const float height = particle->unknown_00C0 * g_sinTable[tilt]; + const int tilt = particle->phaseParameter; + const float spread = particle->speedParameter * g_cosTable[tilt]; + const float height = particle->speedParameter * g_sinTable[tilt]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; @@ -63,7 +63,7 @@ void CMappillarEffect::Open() { points[1].y = 0.0f - height; points[1].z = points[0].z + spread * sine; - if (particle->unknown_000C >= 1 && particle->unknown_000C <= 20) { + if (particle->columnIndex >= 1 && particle->columnIndex <= 20) { particle->vertices[1].x = points[1].x; particle->vertices[1].y = points[1].y; particle->vertices[1].z = points[1].z; @@ -99,24 +99,24 @@ void CMappillarEffect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - if (particle->unknown_0010 != 3 || particle->unknown_000C != 21 || particle->unknown_00E8 <= 999) { - const int frame = particle->unknown_00E8; - const int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4) - static_cast(frame)); + if (particle->rowIndex != 3 || particle->columnIndex != 21 || particle->elapsedFrames <= 999) { + const int frame = particle->elapsedFrames; + const int angle = static_cast(*reinterpret_cast(&particle->angleBits) - static_cast(frame)); float height; if (frame >= 800) { - particle->unknown_00C0 = std::max(0.0f, particle->unknown_00C0 - 1.0f); - height = particle->unknown_00C0; + particle->speedParameter = std::max(0.0f, particle->speedParameter - 1.0f); + height = particle->speedParameter; } else if (frame < 200) { height = 0.0f; } else if (frame > 290) { - height = particle->unknown_00C0; + height = particle->speedParameter; } else { - height = g_sinTable[frame - 200] * particle->unknown_00C0; + height = g_sinTable[frame - 200] * particle->speedParameter; } - particle->unknown_0054 = height; + particle->animationParameter = height; if (height < 0.0f) { - particle->unknown_0054 = 0.0f; + particle->animationParameter = 0.0f; } matrix rotation; @@ -124,13 +124,13 @@ void CMappillarEffect::OnProcess() { rotation.MakeYRotation(static_cast(angle) / 180.0f * 3.141592f); matrix scale; std::memcpy(scale.values, g_identityMatrix, sizeof(scale.values)); - scale.SetScale(1.0f, particle->unknown_0054 / 100.0f * 1.1f, 1.0f); + scale.SetScale(1.0f, particle->animationParameter / 100.0f * 1.1f, 1.0f); const matrix first = rotation; rotation.Compose(first, scale); particle->transform = rotation; } } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -140,7 +140,7 @@ void CMappillarEffect::Render() { for (std::vector::iterator it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; if (particle) { - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/MeteorEffect.cpp b/Source/Contents/Effects/MeteorEffect.cpp index 8a4903dd6..b1f3dd3ad 100644 --- a/Source/Contents/Effects/MeteorEffect.cpp +++ b/Source/Contents/Effects/MeteorEffect.cpp @@ -14,11 +14,11 @@ // OFFSET: 0x007077D0 // FUNCTION: fn_07055 void CMeteorEffect::Close() { - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { FreeParticle(*it); } - this->unknown_00CC.clear(); + this->particles.clear(); } // OFFSET: 0x00707810 @@ -28,7 +28,7 @@ void CMeteorEffect::Open() { case 1099: case 1111: { const long long counts[6] = {0, 3, 3, 5, 5, 7}; - unsigned int level = this->unknown_00B0; + unsigned int level = this->effectLevel; if (level > 5) { level = 5; } @@ -51,13 +51,13 @@ void CMeteorEffect::Open() { break; } - particle->unknown_0004 = this->id; - particle->unknown_000C = static_cast(i); - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = static_cast(i); + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\su_lunaticcarrotbeat\\su_lunaticcarrotbeat.spr"); particle->SetAction("이팩트\\su_lunaticcarrotbeat\\su_lunaticcarrotbeat.act"); - particle->unknown_00EC |= 0x200; + particle->renderOptions |= 0x200; particle->frameDelay = 4.0f; particle->depthOffset = 0.00015f; particle->loopMode = 1; @@ -65,7 +65,7 @@ void CMeteorEffect::Open() { particle->alpha = 100; } - this->unknown_00CC.push_back(particle); + this->particles.push_back(particle); } break; } @@ -79,13 +79,13 @@ void CMeteorEffect::Open() { return; } - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\su_cn_meteor\\su_cn_meteor.spr"); particle->SetAction("이팩트\\su_cn_meteor\\su_cn_meteor.act"); - particle->unknown_00EC |= 0x200; + particle->renderOptions |= 0x200; particle->frameDelay = 4.0f; particle->depthOffset = 0.00015f; particle->loopMode = 1; @@ -93,7 +93,7 @@ void CMeteorEffect::Open() { particle->alpha = 100; } - this->unknown_00CC.push_back(particle); + this->particles.push_back(particle); break; } @@ -105,27 +105,27 @@ void CMeteorEffect::Open() { // OFFSET: 0x00707B40 // FUNCTION: fn_07057 bool CMeteorEffect::IsAlive() { - return !this->unknown_00CC.empty(); + return !this->particles.empty(); } // OFFSET: 0x00707B50 // FUNCTION: fn_07058 void CMeteorEffect::OnProcess() { - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ) { + for (auto it = this->particles.begin(); it != this->particles.end(); ) { CParticle* particle = *it; - if (particle->life == 0.0f || static_cast(particle->unknown_00E8) < particle->life * 60.0f) { + if (particle->life == 0.0f || static_cast(particle->elapsedFrames) < particle->life * 60.0f) { if (particle) { CSpriteParticle* spriteParticle = static_cast(particle); spriteParticle->UpdateFrame(); - if (static_cast(spriteParticle->frame) == *reinterpret_cast(&this->unknown_00D8)) { + if (static_cast(spriteParticle->frame) == *reinterpret_cast(&this->quakeFrameLow)) { g_modeMgr.GetGameMode()->SendMsg(MM_QUAKE, 0, 0, 0, 0); } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } ++it; } else { FreeParticle(particle); - it = this->unknown_00CC.erase(it); + it = this->particles.erase(it); } } } @@ -133,9 +133,9 @@ void CMeteorEffect::OnProcess() { // OFFSET: 0x00707CA0 // FUNCTION: fn_07059 void CMeteorEffect::Render() { - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if ((particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->unknown_00E8)) && particle) { + if ((particle->life == 0.0f || particle->life * 60.0f > static_cast(particle->elapsedFrames)) && particle) { static_cast(particle)->Draw(0); } } diff --git a/Source/Contents/Effects/MonsterSkillEffects.cpp b/Source/Contents/Effects/MonsterSkillEffects.cpp index d4e9ecd40..da40b60f0 100644 --- a/Source/Contents/Effects/MonsterSkillEffects.cpp +++ b/Source/Contents/Effects/MonsterSkillEffects.cpp @@ -142,41 +142,41 @@ void CRootTwistEffect::Render() { // OFFSET: 0x0070C7F0 // FUNCTION: fn_07137 bool CSprArrowEffect::IsAlive() { - return this->unknown_00FD; + return this->alive; } // OFFSET: 0x0070C800 // FUNCTION: fn_07138 void CSprArrowEffect::OnProcess() { const float ticks = - static_cast(static_cast(timeGetTime() - static_cast(this->unknown_00D0)) / 24.0); - if (this->unknown_00F4 > ticks) { + static_cast(static_cast(timeGetTime() - static_cast(this->startTick)) / 24.0); + if (this->delayFrames > ticks) { return; } - CSpriteParticle* particle = reinterpret_cast(this->unknown_00CC); + CSpriteParticle* particle = reinterpret_cast(this->spriteParticle); if (!particle || !particle->action) { return; } - if (!this->unknown_00FC) { - this->unknown_00FC = 1; + if (!this->launched) { + this->launched = 1; this->SetSourceActor(this->sourceActor); const float dx = this->sourcePosition[0] - particle->position.x; const float dy = this->sourcePosition[1] - particle->position.y; const float dz = this->sourcePosition[2] - particle->position.z; - this->unknown_00E0 = dx * 0.125f; - this->unknown_00E4 = dy * 0.125f; - this->unknown_00E8 = dz * 0.125f; + this->velocityX = dx * 0.125f; + this->velocityY = dy * 0.125f; + this->velocityZ = dz * 0.125f; const float lengthSquared = dy * dy + dx * dx + dz * dz; const float length = SquareRoot(lengthSquared); if (length < 40.0f) { - this->unknown_00EC = 40.0f / length; - this->unknown_00E0 *= this->unknown_00EC; - this->unknown_00E4 *= this->unknown_00EC; - this->unknown_00E8 *= this->unknown_00EC; + this->travelSpeedScale = 40.0f / length; + this->velocityX *= this->travelSpeedScale; + this->velocityY *= this->travelSpeedScale; + this->velocityZ *= this->travelSpeedScale; } float angle = 0.0f; @@ -186,7 +186,7 @@ void CSprArrowEffect::OnProcess() { angle += 360.0f; } } - this->unknown_00F0 = angle; + this->heading = angle; const float inverse = 1.0f / SquareRoot(lengthSquared); particle->position.x += inverse * dx * 2.5f; @@ -194,35 +194,35 @@ void CSprArrowEffect::OnProcess() { particle->position.z += inverse * dz * 2.5f; } - ++particle->unknown_00E8; - const float time = ticks - this->unknown_00F4; + ++particle->elapsedFrames; + const float time = ticks - this->delayFrames; if (this->frame > 8) { const int last = static_cast(particle->action->FrameCount(0)) - 1; - this->unknown_00F8 = std::min(this->unknown_00F8 + 1, last); + this->spriteFrame = std::min(this->spriteFrame + 1, last); } - reinterpret_cast(particle->unknown_00C4) = - this->unknown_00F0 - static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw; - particle->position.x = time * this->unknown_00E0 + this->unknown_00D4 + particle->velocity.x; - particle->position.y = this->unknown_00E4 * time + this->unknown_00D8 + particle->velocity.y; - particle->position.z = this->unknown_00E8 * time + this->unknown_00DC + particle->velocity.z; - if (time > 8.0f / this->unknown_00EC) { - this->unknown_00FD = false; + reinterpret_cast(particle->angleBits) = + this->heading - static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw; + particle->position.x = time * this->velocityX + this->startX + particle->velocity.x; + particle->position.y = this->velocityY * time + this->startY + particle->velocity.y; + particle->position.z = this->velocityZ * time + this->startZ + particle->velocity.z; + if (time > 8.0f / this->travelSpeedScale) { + this->alive = false; } } // OFFSET: 0x0070CB80 // FUNCTION: fn_07139 void CSprArrowEffect::Render() { - if (this->unknown_00CC != 0 && this->unknown_00FC) { - AsSprite(reinterpret_cast(this->unknown_00CC))->Draw(1); + if (this->spriteParticle != 0 && this->launched) { + AsSprite(reinterpret_cast(this->spriteParticle))->Draw(1); } } // OFFSET: 0x0070CBA0 // FUNCTION: fn_07140 void CSprArrowEffect::SetBulletSprite(int job) { - CSpriteParticle* particle = reinterpret_cast(this->unknown_00CC); + CSpriteParticle* particle = reinterpret_cast(this->spriteParticle); if (!particle) { return; } @@ -304,12 +304,12 @@ void CSprArrowEffect::SetBulletSprite(int job) { } if (std::strlen(name) == 0) { - this->unknown_00FD = false; + this->alive = false; return; } particle->SetSprite(std::format("몬스터\\{}.spr", name).c_str()); - reinterpret_cast(this->unknown_00CC)->SetAction(std::format("몬스터\\{}.act", name).c_str()); + reinterpret_cast(this->spriteParticle)->SetAction(std::format("몬스터\\{}.act", name).c_str()); } // OFFSET: 0x0070CEA0 @@ -329,14 +329,14 @@ void CSpriteMableEffect::Open() { CSpriteParticle* particle = AsSprite(emitter); - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->scale = 0.3f; particle->alpha = 200; - particle->unknown_0054 = static_cast(i) * 2.0943947f; - reinterpret_cast(particle->unknown_0058) = 0.0f; + particle->animationParameter = static_cast(i) * 2.0943947f; + reinterpret_cast(particle->animationParameters) = 0.0f; particle->loopMode = 3; switch (i) { case 0: @@ -353,7 +353,7 @@ void CSpriteMableEffect::Open() { break; } - this->unknown_002C = 9999; + this->effectLifetime = 9999; this->emitters.push_back(emitter); } } @@ -391,10 +391,10 @@ void CStemSpearEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\sv_stemspear\\sv_stemspear.spr"); particle->SetAction("이팩트\\sv_stemspear\\sv_stemspear.act"); @@ -402,7 +402,7 @@ void CStemSpearEffect::Open() { emitter->velocity.x = 0.0f; emitter->velocity.y = 0.0f; emitter->velocity.z = 0.0f; - this->unknown_002C = 16; + this->effectLifetime = 16; const float dx = this->sourcePosition[0] - this->position[0]; const float dz = this->sourcePosition[2] - this->position[2]; @@ -416,8 +416,8 @@ void CStemSpearEffect::Open() { direction += 360.0f; } emitter->baseAngle = static_cast(direction); - emitter->speed = SquareRoot(dx * dx + dz * dz) / static_cast(this->unknown_002C); - emitter->elapsed = -(this->unknown_002C / 4) * i; + emitter->speed = SquareRoot(dx * dx + dz * dz) / static_cast(this->effectLifetime); + emitter->elapsed = -(this->effectLifetime / 4) * i; this->emitters.push_back(emitter); } } @@ -431,7 +431,7 @@ void __stdcall Nullsub226(int) { // FUNCTION: fn_07153 bool CStemSpearEffect::IsAlive() { for (auto emitter = this->emitters.begin(); emitter != this->emitters.end(); ++emitter) { - if ((*emitter)->elapsed < this->unknown_002C) { + if ((*emitter)->elapsed < this->effectLifetime) { return true; } } @@ -479,7 +479,7 @@ void CStemSpearEffect::OnProcess() { // FUNCTION: fn_07155 void CStemSpearEffect::Render() { for (auto emitter = this->emitters.begin(); emitter != this->emitters.end(); ++emitter) { - if ((*emitter)->elapsed > 0 && (*emitter)->elapsed < this->unknown_002C) { + if ((*emitter)->elapsed > 0 && (*emitter)->elapsed < this->effectLifetime) { AsSprite(*emitter)->Draw(1); } } @@ -488,7 +488,7 @@ void CStemSpearEffect::Render() { // OFFSET: 0x0070DB30 // FUNCTION: fn_07160 bool CSvgSpiritEffect::IsAlive() { - return this->emitter->elapsed < this->unknown_002C; + return this->emitter->elapsed < this->effectLifetime; } // OFFSET: 0x0070DB50 @@ -523,7 +523,7 @@ void CSvgSpiritEffect::OnProcess() { // FUNCTION: fn_07162 void CSvgSpiritEffect::Render() { EZ2STREmitter* emitter = this->emitter; - if (emitter->elapsed > 0 && emitter->elapsed < this->unknown_002C) { + if (emitter->elapsed > 0 && emitter->elapsed < this->effectLifetime) { AsSprite(emitter)->Draw(1); } } @@ -550,7 +550,7 @@ void CTunaPartyEffect::Render() { // OFFSET: 0x0070E0C0 // FUNCTION: fn_07170 CCurseOfCubeEffect::CCurseOfCubeEffect() - : CEffect(-1), unknown_00D8(0), unknown_00DC(0), unknown_00E0(-10.0f), unknown_00E4(0) { + : CEffect(-1), spawnPhase(0), viewOffsetX(0), viewOffsetY(-10.0f), viewOffsetZ(0) { } // OFFSET: 0x0070EB10 @@ -558,7 +558,7 @@ CCurseOfCubeEffect::CCurseOfCubeEffect() void CCurseOfCubeEffect::Restart() { this->Close(); this->SpawnShock(); - this->unknown_00D8 = 3; + this->spawnPhase = 3; } // OFFSET: 0x0070EB30 @@ -567,7 +567,7 @@ void CCurseOfCubeEffect::Open() { this->retained = 1; this->SpawnStart(); if (!this->emitters.empty()) { - this->unknown_00D8 = 1; + this->spawnPhase = 1; } } @@ -601,10 +601,10 @@ void CWarningPlaneEffect::AddPlane(vector3d position) { EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { particle->SetTexture("warning_plane.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->scale = 2.5f; particle->alpha = 150; particle->SetColor(255, 0, 0); @@ -632,7 +632,7 @@ bool CWarningPlaneEffect::IsAlive() { // OFFSET: 0x0070FC60 // FUNCTION: fn_07194 bool CCylinderEffect::IsAlive() { - return this->startTime + this->unknown_002C >= timeGetTime(); + return this->startTime + this->effectLifetime >= timeGetTime(); } // OFFSET: 0x0070F720 @@ -651,18 +651,18 @@ void CCylinderEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = static_cast(i); - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = static_cast(i); + particle->rowIndex = 0; + particle->groupIndex = 1; InitParticleQuad(particle->vertices); - particle->unknown_00C4 = 0; + particle->angleBits = 0; if (this->id == 2077) { particle->SetTexture("effect\\nipelheim\\nipelheim_cast\\nip_cast.tga"); particle->scale = 4.5f; - particle->unknown_004C = 70; - particle->unknown_0054 = 25.0f; - particle->unknown_00C0 = 0.052359872f; + particle->phaseParameter = 70; + particle->animationParameter = 25.0f; + particle->speedParameter = 0.052359872f; particle->sourceBlend = 5; particle->destinationBlend = 6; } @@ -727,7 +727,7 @@ void CCylinderEffect::Render() { continue; } - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; @@ -760,7 +760,7 @@ void CDancingKnifeEffect::Render() { } } - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->secondStrikeEmitters.begin(); it != this->secondStrikeEmitters.end(); ++it) { if (*it) { AsParticle(*it)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } @@ -844,7 +844,7 @@ CEternalSlashCountEffect::CEternalSlashCountEffect() : CEffect(1913), emitter(nu // OFFSET: 0x00711280 // FUNCTION: fn_07216 void CEternalSlashCountEffect::Open() { - if (static_cast(this->unknown_00B0) - 1 > 4) { + if (static_cast(this->effectLevel) - 1 > 4) { return; } @@ -854,10 +854,10 @@ void CEternalSlashCountEffect::Open() { return; } - particle->Load(FormatOwnedString("eternal_slash\\eternal_slash_count\\eternal_slash_count_%02d.str", this->unknown_00B0)); - particle->unknown_00D0 = 0.0f; - particle->unknown_00D4 = -25.0f; - particle->unknown_00D8 = 0.0f; + particle->Load(FormatOwnedString("eternal_slash\\eternal_slash_count\\eternal_slash_count_%02d.str", this->effectLevel)); + particle->offsetX = 0.0f; + particle->offsetY = -25.0f; + particle->offsetZ = 0.0f; this->emitter = reinterpret_cast(particle); } @@ -899,7 +899,7 @@ void CEternalSlashCountEffect::Render() { // OFFSET: 0x00711420 // FUNCTION: fn_07220 -CFallenAngelEffect::CFallenAngelEffect() : CEffect(1140), emitter(nullptr), unknown_00D0(0), unknown_00D4(0), unknown_00D8(0) { +CFallenAngelEffect::CFallenAngelEffect() : CEffect(1140), emitter(nullptr), startX(0), startY(0), startZ(0) { } // OFFSET: 0x00711580 @@ -914,9 +914,9 @@ void CFallenAngelEffect::Open() { } InitParticleQuad(AsParticle(this->emitter)->vertices); - this->unknown_00D0 = this->position[0]; - this->unknown_00D4 = this->position[1]; - this->unknown_00D8 = this->position[2]; + this->startX = this->position[0]; + this->startY = this->position[1]; + this->startZ = this->position[2]; } // OFFSET: 0x00711690 @@ -934,8 +934,8 @@ bool CFallenAngelEffect::IsAlive() { void CFallenAngelEffect::OnProcess() { EZ2STREmitter* emitter = this->emitter; const vector3d start = emitter->position; - const float dx = this->unknown_00D0 - this->position[0]; - const float dz = this->unknown_00D8 - this->position[2]; + const float dx = this->startX - this->position[0]; + const float dz = this->startZ - this->position[2]; const float speed = 1.0f / SquareRoot(dx * dx + 0.0f + dz * dz); emitter->position.x = start.x + dx * speed * 0.09f; @@ -975,7 +975,7 @@ CFloralFlareRoad::CFloralFlareRoad() : CEffect(1804) { // FUNCTION: fn_07231 void CFloralFlareRoad::Open() { CEZ2STRParticle* bottom = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); - this->unknown_00CC = reinterpret_cast(bottom); + this->emitter = reinterpret_cast(bottom); bottom->Load(std::string("froral_flareroad\\froral_flareroad_bottom\\froral_flareroad_bottom.str")); for (int delay = 0; delay < 4500; delay += 300) { @@ -1005,8 +1005,8 @@ bool CFloralFlareRoad::IsAlive() { // OFFSET: 0x00711DB0 // FUNCTION: fn_07233 void CFloralFlareRoad::OnProcess() { - if (this->unknown_00CC) { - AsParticle(this->unknown_00CC)->Process(0.0f, -80.0f, 0.0f); + if (this->emitter) { + AsParticle(this->emitter)->Process(0.0f, -80.0f, 0.0f); } for (auto it = this->emitters.begin(); it != this->emitters.end();) { @@ -1026,8 +1026,8 @@ void CFloralFlareRoad::OnProcess() { // OFFSET: 0x00711ED0 // FUNCTION: fn_07234 void CFloralFlareRoad::Render() { - if (this->unknown_00CC) { - AsParticle(this->unknown_00CC) + if (this->emitter) { + AsParticle(this->emitter) ->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } @@ -1040,7 +1040,7 @@ void CFloralFlareRoad::Render() { // OFFSET: 0x00711F80 // FUNCTION: fn_07235 -CFootprintEffect::CFootprintEffect() : CEffect(2411), stepDistance(50.0), unknown_0110(1), lastPosition{}, unknown_0120(-1000.0f) { +CFootprintEffect::CFootprintEffect() : CEffect(2411), stepDistance(50.0), leftFoot(1), lastPosition{}, lastGroundHeight(-1000.0f) { this->lastPosition.x = this->position[0]; this->lastPosition.y = this->position[1]; this->lastPosition.z = this->position[2]; @@ -1050,7 +1050,7 @@ CFootprintEffect::CFootprintEffect() : CEffect(2411), stepDistance(50.0), unknow // FUNCTION: fn_07238 bool CFootprintEffect::IsVisible() { EffectActor* actor = static_cast(FindRenderObject(this->actor)); - if (!actor || actor->render.unknown_00A8 == 0) { + if (!actor || actor->render.isCharacter == 0) { return true; } @@ -1066,28 +1066,28 @@ bool CFootprintEffect::IsVisible() { void CFootprintEffect::Open() { char* leftFile = nullptr; char* rightFile = nullptr; - g_session.m_hotkeyScript->Call("GetFootprintPngFile", "d>ss", this->unknown_00C4, &leftFile, &rightFile); + g_session.m_hotkeyScript->Call("GetFootprintPngFile", "d>ss", this->instanceId, &leftFile, &rightFile); if (!leftFile || std::strlen(leftFile) == 0 || !rightFile || std::strlen(rightFile) == 0) { return; } - this->unknown_00D4 = leftFile; - this->unknown_00EC = rightFile; + this->leftTexture = leftFile; + this->rightTexture = rightFile; double scale = 5.0; - g_session.m_hotkeyScript->Call("GetFootprintPngScale", "d>l", this->unknown_00C4, &scale); - *reinterpret_cast(&this->unknown_0048) = static_cast(scale); + g_session.m_hotkeyScript->Call("GetFootprintPngScale", "d>l", this->instanceId, &scale); + *reinterpret_cast(&this->scaleParameter) = static_cast(scale); int alpha = 250; - g_session.m_hotkeyScript->Call("GetFootprintPngAplha", "d>d", this->unknown_00C4, &alpha); - *reinterpret_cast(this->unknown_0054) = alpha; + g_session.m_hotkeyScript->Call("GetFootprintPngAplha", "d>d", this->instanceId, &alpha); + *reinterpret_cast(this->alphaParameters) = alpha; int duration = 10; - g_session.m_hotkeyScript->Call("GetFootprintPngDuration", "d>d", this->unknown_00C4, &duration); - this->unknown_002C = duration; + g_session.m_hotkeyScript->Call("GetFootprintPngDuration", "d>d", this->instanceId, &duration); + this->effectLifetime = duration; - g_session.m_hotkeyScript->Call("GetFootprintStride", "d>l", this->unknown_00C4, &this->stepDistance); - this->unknown_0120 = 0.0f; + g_session.m_hotkeyScript->Call("GetFootprintStride", "d>l", this->instanceId, &this->stepDistance); + this->lastGroundHeight = 0.0f; } // OFFSET: 0x007127A0 @@ -1099,7 +1099,7 @@ bool CFootprintEffect::IsAlive() { // OFFSET: 0x007127B0 // FUNCTION: fn_07241 CParticle* CFootprintEffect::SpawnFootprint() { - const std::string& texture = this->unknown_0110 ? this->unknown_00D4 : this->unknown_00EC; + const std::string& texture = this->leftFoot ? this->leftTexture : this->rightTexture; if (texture.size() == 0) { return nullptr; } @@ -1109,17 +1109,17 @@ CParticle* CFootprintEffect::SpawnFootprint() { return particle; } - particle->alpha = *reinterpret_cast(this->unknown_0054); - particle->life = static_cast(this->unknown_002C); + particle->alpha = *reinterpret_cast(this->alphaParameters); + particle->life = static_cast(this->effectLifetime); particle->sourceBlend = 5; particle->destinationBlend = 6; - particle->unknown_00C0 = static_cast(*reinterpret_cast(this->unknown_0054)) / static_cast(this->unknown_002C * 60); + particle->speedParameter = static_cast(*reinterpret_cast(this->alphaParameters)) / static_cast(this->effectLifetime * 60); particle->SetTexture(texture); InitParticleQuad(particle->vertices); const float angle = ScreenAngle(&this->lastPosition.x, this->position, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values) + 90.0f; - const float scale = *reinterpret_cast(&this->unknown_0048); + const float scale = *reinterpret_cast(&this->scaleParameter); matrix world; world.SetScale(scale, scale, 0.0f); world.AppendXRotation(1.5707964f); @@ -1132,16 +1132,16 @@ CParticle* CFootprintEffect::SpawnFootprint() { const float z = vertex.x * world.values[2] + vertex.y * world.values[5] + 0.0f * world.values[8] + world.values[11]; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); float y = mode->scene->terrain->PlaneHeight(x, z) - 2.0f; - if (this->unknown_0120 != -1000.0f && y - this->unknown_0120 > 5.0f) { - y = this->unknown_0120; + if (this->lastGroundHeight != -1000.0f && y - this->lastGroundHeight > 5.0f) { + y = this->lastGroundHeight; } - this->unknown_0120 = y; + this->lastGroundHeight = y; vertex.x = x; vertex.y = y; vertex.z = z; } - this->unknown_0110 = this->unknown_0110 == 0; + this->leftFoot = this->leftFoot == 0; this->lastPosition.x = this->position[0]; this->lastPosition.y = this->position[1]; this->lastPosition.z = this->position[2]; @@ -1165,8 +1165,8 @@ void CFootprintEffect::OnProcess() { EZ2STREmitter* emitter = *it; CParticle* particle = AsParticle(emitter); if (IsEmitterAlive(emitter)) { - particle->alpha = static_cast(std::max(static_cast(particle->alpha) - particle->unknown_00C0, 0.0f)); - ++particle->unknown_00E8; + particle->alpha = static_cast(std::max(static_cast(particle->alpha) - particle->speedParameter, 0.0f)); + ++particle->elapsedFrames; ++it; } else { FreeParticle(particle); @@ -1186,8 +1186,8 @@ void CFootprintEffect::Render() { // OFFSET: 0x00712CA0 // FUNCTION: fn_07245 CFootprintStrEffect::CFootprintStrEffect() - : CEffect(2412), unknown_0140(1.0), unknown_0148(1.0), unknown_0150(0.0), unknown_0158(50.0), unknown_0160(2.0), - unknown_0168(0), unknown_0169(1), unknown_016C{} { + : CEffect(2412), bottomScale(1.0), topScale(1.0), topHeight(0.0), stepDistance(50.0), footGap(2.0), + adjustAngle(0), leftFoot(1), lastPosition{} { } // OFFSET: 0x007130E0 @@ -1198,17 +1198,17 @@ void CFootprintStrEffect::Close() { } this->emitters.clear(); - for (EZ2STREmitter* emitter : this->unknown_00D4) { + for (EZ2STREmitter* emitter : this->topEmitters) { FreeParticle(AsParticle(emitter)); } - this->unknown_00D4.clear(); + this->topEmitters.clear(); } // OFFSET: 0x00713370 // FUNCTION: fn_07248 bool CFootprintStrEffect::IsVisible() { EffectActor* actor = static_cast(FindRenderObject(this->actor)); - if (!actor || actor->render.unknown_00A8 == 0) { + if (!actor || actor->render.isCharacter == 0) { return true; } @@ -1224,28 +1224,28 @@ bool CFootprintStrEffect::IsVisible() { void CFootprintStrEffect::Open() { char* leftFile = nullptr; char* rightFile = nullptr; - g_session.m_hotkeyScript->Call("GetFootprintStrFileBottom", "d>ss", this->unknown_00C4, &leftFile, &rightFile); + g_session.m_hotkeyScript->Call("GetFootprintStrFileBottom", "d>ss", this->instanceId, &leftFile, &rightFile); if (!IsNullOrEmpty(leftFile) && !IsNullOrEmpty(rightFile)) { - this->unknown_00DC = leftFile; - this->unknown_00F4 = rightFile; + this->leftBottomFile = leftFile; + this->rightBottomFile = rightFile; } - g_session.m_hotkeyScript->Call("GetFootprintStrFileTop", "d>ss", this->unknown_00C4, &leftFile, &rightFile); + g_session.m_hotkeyScript->Call("GetFootprintStrFileTop", "d>ss", this->instanceId, &leftFile, &rightFile); if (!IsNullOrEmpty(leftFile) && !IsNullOrEmpty(rightFile)) { - this->unknown_010C = leftFile; - this->unknown_0124 = rightFile; + this->leftTopFile = leftFile; + this->rightTopFile = rightFile; } - if (this->unknown_00DC.size() == 0 && this->unknown_00F4.size() == 0 && this->unknown_010C.size() == 0 && - this->unknown_0124.size() == 0) { + if (this->leftBottomFile.size() == 0 && this->rightBottomFile.size() == 0 && this->leftTopFile.size() == 0 && + this->rightTopFile.size() == 0) { return; } - g_session.m_hotkeyScript->Call("GetFootprintStrScale", "d>ll", this->unknown_00C4, &this->unknown_0140, &this->unknown_0148); - g_session.m_hotkeyScript->Call("GetFootprintStrTopHeight", "d>l", this->unknown_00C4, &this->unknown_0150); - g_session.m_hotkeyScript->Call("GetFootprintStride", "d>l", this->unknown_00C4, &this->unknown_0158); - g_session.m_hotkeyScript->Call("GetFootprintStrGap", "d>l", this->unknown_00C4, &this->unknown_0160); - g_session.m_hotkeyScript->Call("IsFootprintStrAdjustAngle", "d>b", this->unknown_00C4, &this->unknown_0168); + g_session.m_hotkeyScript->Call("GetFootprintStrScale", "d>ll", this->instanceId, &this->bottomScale, &this->topScale); + g_session.m_hotkeyScript->Call("GetFootprintStrTopHeight", "d>l", this->instanceId, &this->topHeight); + g_session.m_hotkeyScript->Call("GetFootprintStride", "d>l", this->instanceId, &this->stepDistance); + g_session.m_hotkeyScript->Call("GetFootprintStrGap", "d>l", this->instanceId, &this->footGap); + g_session.m_hotkeyScript->Call("IsFootprintStrAdjustAngle", "d>b", this->instanceId, &this->adjustAngle); } // OFFSET: 0x00713830 @@ -1258,9 +1258,9 @@ bool CFootprintStrEffect::IsAlive() { // FUNCTION: fn_07251 void CFootprintStrEffect::SpawnFootprint() { vector3d direction; - direction.x = this->position[0] - this->unknown_016C.x; + direction.x = this->position[0] - this->lastPosition.x; direction.y = 0.0f; - direction.z = this->position[2] - this->unknown_016C.z; + direction.z = this->position[2] - this->lastPosition.z; const float inverse = 1.0f / SquareRoot(direction.x * direction.x + direction.y * direction.y + direction.z * direction.z); direction.x = inverse * direction.x; direction.y = inverse * direction.y; @@ -1268,8 +1268,8 @@ void CFootprintStrEffect::SpawnFootprint() { matrix rotation; rotation.MakeYRotation(1.5707964f); - const float side = static_cast((this->unknown_0169 != 0) * 2 - 1); - const float gap = static_cast(this->unknown_0160); + const float side = static_cast((this->leftFoot != 0) * 2 - 1); + const float gap = static_cast(this->footGap); vector3d point; point.x = (direction.x * rotation.values[0] + direction.y * rotation.values[3] + direction.z * rotation.values[6] + rotation.values[9]) * gap * side + @@ -1280,52 +1280,52 @@ void CFootprintStrEffect::SpawnFootprint() { point.y = static_cast(g_modeMgr.GetGameMode())->scene->terrain->Height(point.x, point.z); vector3d spawn = point; - const std::string& bottom = this->unknown_0169 ? this->unknown_00DC : this->unknown_00F4; + const std::string& bottom = this->leftFoot ? this->leftBottomFile : this->rightBottomFile; if (bottom.size() != 0) { CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(&spawn, 5)); EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { float angle; - if (this->unknown_0168) { - angle = ScreenAngle(&this->unknown_016C.x, &spawn.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values) + 90.0f; + if (this->adjustAngle) { + angle = ScreenAngle(&this->lastPosition.x, &spawn.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values) + 90.0f; } else { angle = 0.0f; } particle->Open(bottom); - particle->m_scale = static_cast(this->unknown_0140); + particle->m_scale = static_cast(this->bottomScale); particle->m_angle = angle; this->emitters.push_back(emitter); } } - const std::string& top = this->unknown_0169 ? this->unknown_010C : this->unknown_0124; + const std::string& top = this->leftFoot ? this->leftTopFile : this->rightTopFile; if (top.size() != 0) { spawn.x = point.x + 0.0f; - spawn.y = point.y + static_cast(-this->unknown_0150); + spawn.y = point.y + static_cast(-this->topHeight); spawn.z = point.z + 0.0f; CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(&spawn, 5)); EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { particle->Open(top); particle->depthOffset = 0.000035f; - particle->m_scale = static_cast(this->unknown_0148); - this->unknown_00D4.push_back(emitter); + particle->m_scale = static_cast(this->topScale); + this->topEmitters.push_back(emitter); } } - this->unknown_0169 = this->unknown_0169 == 0; - this->unknown_016C.x = this->position[0]; - this->unknown_016C.y = this->position[1]; - this->unknown_016C.z = this->position[2]; + this->leftFoot = this->leftFoot == 0; + this->lastPosition.x = this->position[0]; + this->lastPosition.y = this->position[1]; + this->lastPosition.z = this->position[2]; } // OFFSET: 0x00713E00 // FUNCTION: fn_07252 void CFootprintStrEffect::OnProcess() { - const float dx = this->position[0] - this->unknown_016C.x; - const float dy = this->position[1] - this->unknown_016C.y; - const float dz = this->position[2] - this->unknown_016C.z; - if (static_cast(dx * dx + dy * dy + dz * dz) > this->unknown_0158) { + const float dx = this->position[0] - this->lastPosition.x; + const float dy = this->position[1] - this->lastPosition.y; + const float dz = this->position[2] - this->lastPosition.z; + if (static_cast(dx * dx + dy * dy + dz * dz) > this->stepDistance) { this->SpawnFootprint(); } @@ -1339,13 +1339,13 @@ void CFootprintStrEffect::OnProcess() { } } - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end();) { + for (auto it = this->topEmitters.begin(); it != this->topEmitters.end();) { CEZ2STRParticle* particle = AsParticle(*it); if (particle->Process(0.0f, 0.0f, 0.0f)) { ++it; } else { FreeParticle(particle); - it = this->unknown_00D4.erase(it); + it = this->topEmitters.erase(it); } } } @@ -1357,7 +1357,7 @@ void CFootprintStrEffect::Render() { AsParticle(emitter)->DrawGround(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } - for (EZ2STREmitter* emitter : this->unknown_00D4) { + for (EZ2STREmitter* emitter : this->topEmitters) { AsParticle(emitter)->DrawBillboards(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } } @@ -1365,22 +1365,22 @@ void CFootprintStrEffect::Render() { // OFFSET: 0x00714250 // FUNCTION: fn_07259 CFromTheAbyssEffect::CFromTheAbyssEffect() : CEffect(-1), maxLevel(5), level(0) { - this->unknown_00E0[0] = AbyssWave{0.8f, {-4.8f, -9.1f, 0.0f}}; - this->unknown_00E0[1] = AbyssWave{0.6f, {-3.4f, -12.8f, 0.0f}}; - this->unknown_00E0[2] = AbyssWave{0.5f, {-0.7f, -14.0f, 0.0f}}; - this->unknown_00E0[3] = AbyssWave{0.7f, {2.7f, -14.0f, 0.0f}}; - this->unknown_00E0[4] = AbyssWave{0.4f, {4.3f, -10.0f, 0.0f}}; + this->waves[0] = AbyssWave{0.8f, {-4.8f, -9.1f, 0.0f}}; + this->waves[1] = AbyssWave{0.6f, {-3.4f, -12.8f, 0.0f}}; + this->waves[2] = AbyssWave{0.5f, {-0.7f, -14.0f, 0.0f}}; + this->waves[3] = AbyssWave{0.7f, {2.7f, -14.0f, 0.0f}}; + this->waves[4] = AbyssWave{0.4f, {4.3f, -10.0f, 0.0f}}; } // OFFSET: 0x00715160 // FUNCTION: fn_07265 void CFromTheAbyssEffect::Close() { - for (auto it = this->unknown_00E8.begin(); it != this->unknown_00E8.end(); ++it) { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { if (it->second.emitter) { FreeParticle(AsParticle(it->second.emitter)); } } - this->unknown_00E8.clear(); + this->particles.clear(); } // OFFSET: 0x00715400 @@ -1398,7 +1398,7 @@ bool CFromTheAbyssEffect::IsAlive() { // OFFSET: 0x00715420 // FUNCTION: fn_07268 void CFromTheAbyssEffect::OnProcess() { - for (auto it = this->unknown_00E8.begin(); it != this->unknown_00E8.end(); ++it) { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { this->UpdateParticle(it->first, it->second); } } @@ -1428,7 +1428,7 @@ void CFromTheAbyssEffect::UpdateParticle(long long key, AbyssParticle particle) case 3: if (IsEmitterAlive(emitter) != true) { FreeParticle(AsParticle(emitter)); - AbyssParticle& entry = this->unknown_00E8[key]; + AbyssParticle& entry = this->particles[key]; entry.kind = 0; entry.emitter = nullptr; return; @@ -1452,7 +1452,7 @@ void CFromTheAbyssEffect::UpdateParticle(long long key, AbyssParticle particle) dying->offset = offset; } - AbyssParticle& entry = this->unknown_00E8[key]; + AbyssParticle& entry = this->particles[key]; entry.kind = 2; entry.emitter = dying; return; @@ -1469,7 +1469,7 @@ void CFromTheAbyssEffect::UpdateParticle(long long key, AbyssParticle particle) // OFFSET: 0x00715C80 // FUNCTION: fn_07270 void CFromTheAbyssEffect::Render() { - for (auto it = this->unknown_00E8.begin(); it != this->unknown_00E8.end(); ++it) { + for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { EZ2STREmitter* emitter = it->second.emitter; if (emitter) { AsParticle(emitter)->DrawScreen(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); @@ -1486,8 +1486,8 @@ void CFromTheAbyssEffect::SetLevel(long long level) { if (level > this->level) { for (long long i = this->level; i < level; ++i) { - auto it = this->unknown_00E8.find(i); - if (it != this->unknown_00E8.end() && it->second.emitter) { + auto it = this->particles.find(i); + if (it != this->particles.end() && it->second.emitter) { FreeParticle(AsParticle(it->second.emitter)); } @@ -1495,17 +1495,17 @@ void CFromTheAbyssEffect::SetLevel(long long level) { reinterpret_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (emitter) { AsParticle(emitter)->Load("from_the_abyss\\from_the_abyss_shadowball_create\\from_the_abyss_shadowball_create.str"); - AsParticle(emitter)->m_scale = this->unknown_00E0[i].scale; - emitter->offset = this->unknown_00E0[i].offset; - AbyssParticle& entry = this->unknown_00E8[i]; + AsParticle(emitter)->m_scale = this->waves[i].scale; + emitter->offset = this->waves[i].offset; + AbyssParticle& entry = this->particles[i]; entry.emitter = emitter; entry.kind = 1; } } } else if (level < this->level) { for (long long i = this->level - 1; i > level - 1; --i) { - auto it = this->unknown_00E8.find(i); - if (it != this->unknown_00E8.end() && it->second.emitter) { + auto it = this->particles.find(i); + if (it != this->particles.end() && it->second.emitter) { EZ2STREmitter* previous = it->second.emitter; const double scale = AsParticle(previous)->m_scale; const vector3d offset = previous->offset; @@ -1518,7 +1518,7 @@ void CFromTheAbyssEffect::SetLevel(long long level) { emitter->offset = offset; } - AbyssParticle& entry = this->unknown_00E8[i]; + AbyssParticle& entry = this->particles[i]; entry.kind = 3; entry.emitter = emitter; } @@ -1547,10 +1547,10 @@ void CFullScreenEffect::Open() { return; } - particle->unknown_0004 = this->id; - particle->unknown_000C = static_cast(i); - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = static_cast(i); + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture(texture.c_str()); particle->sourceBlend = 5; particle->destinationBlend = 6; @@ -1591,7 +1591,7 @@ void CFullScreenEffect::Render() { const std::uint32_t color = ((particle->alpha << 8 | particle->red) << 8 | particle->green) << 8 | particle->blue; RenderVertex* vertices = primitive.quad; - switch (particle->unknown_000C) { + switch (particle->columnIndex) { case 0: SetScreenVertex(vertices[0], 0.0f, 0.0f, color, right, top); SetScreenVertex(vertices[1], static_cast(g_renderer->viewport.centerX), 0.0f, color, left, top); @@ -1618,15 +1618,15 @@ void CFullScreenEffect::Render() { break; } - primitive.unknown_0018 = particle->sourceBlend; - primitive.unknown_001C = particle->destinationBlend; + primitive.sourceBlend = particle->sourceBlend; + primitive.destinationBlend = particle->destinationBlend; g_renderer->queues.Submit(&primitive, static_cast(particle->flags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } } // OFFSET: 0x007176E0 // FUNCTION: fn_07280 -CGaleStorm::CGaleStorm() : CEffect(1973), unknown_00D8(5), unknown_00DC(0) { +CGaleStorm::CGaleStorm() : CEffect(1973), countLow(5), countHigh(0) { } // OFFSET: 0x00717DE0 @@ -1634,7 +1634,7 @@ CGaleStorm::CGaleStorm() : CEffect(1973), unknown_00D8(5), unknown_00DC(0) { void CGaleStorm::Open() { long long table[10] = {5, 5, 5, 5, 7, 7, 7, 9, 9, 11}; - unsigned int index = this->unknown_00B0; + unsigned int index = this->effectLevel; if (index > 10) { index = 10; } @@ -1645,7 +1645,7 @@ void CGaleStorm::Open() { // OFFSET: 0x00717EB0 // FUNCTION: fn_07286 bool CGaleStorm::IsAlive() { - if (this->frame > this->unknown_002C && this->emitters.empty()) { + if (this->frame > this->effectLifetime && this->emitters.empty()) { return false; } @@ -1677,15 +1677,15 @@ void CGravityControlEffect::Render() { // FUNCTION: fn_07294 CHawkVumerangEffect::CHawkVumerangEffect() : CEffect(1968), - unknown_00E0(10), - unknown_00E4(0), - unknown_00E8(6.283184051513672), - unknown_00F0(0), - unknown_00F4(-17.0f), - unknown_00F8(0), - unknown_0100{}, - unknown_010C{}, - unknown_0118{} { + countLow(10), + countHigh(0), + angularRange(6.283184051513672), + orbitOffsetX(0), + orbitOffsetY(-17.0f), + orbitOffsetZ(0), + targetPosition{}, + originPosition{}, + orbitCenter{} { } // OFFSET: 0x00718620 @@ -1696,10 +1696,10 @@ CHawkVumerangEffect::~CHawkVumerangEffect() { // OFFSET: 0x007187F0 // FUNCTION: fn_07297 void CHawkVumerangEffect::Close() { - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end(); ++it) { + for (auto it = this->finishedEmitters.begin(); it != this->finishedEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00D4.clear(); + this->finishedEmitters.clear(); for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { FreeParticle(AsParticle(*it)); } @@ -1722,23 +1722,23 @@ void CHawkVumerangEffect::OnProcess() { EZ2STREmitter* emitter = this->emitters.back(); this->emitters.pop_back(); - const DWORD elapsed = timeGetTime() - this->unknown_00FC; - double angle = static_cast(elapsed) / static_cast(this->unknown_002C * 2) * this->unknown_00E8; - if (angle < this->unknown_00E8) { - angle += this->unknown_0130; + const DWORD elapsed = timeGetTime() - this->startTime; + double angle = static_cast(elapsed) / static_cast(this->effectLifetime * 2) * this->angularRange; + if (angle < this->angularRange) { + angle += this->startAngle; if (angle > 6.283184f) { angle -= 6.283184f; } AsParticle(emitter)->m_angle = 360.0f - static_cast(angle) / 3.141592f * 180.0f; - const float sine = static_cast(std::sin(static_cast(angle)) * this->unknown_0128); - const float cosine = static_cast(std::cos(static_cast(angle)) * this->unknown_0128); - emitter->position.z = this->unknown_0118.z + sine + this->unknown_00F8; - emitter->position.x = cosine + this->unknown_0118.x + this->unknown_00F0; - emitter->position.y = this->unknown_0118.y + 0.0f + this->unknown_00F4; + const float sine = static_cast(std::sin(static_cast(angle)) * this->orbitRadius); + const float cosine = static_cast(std::cos(static_cast(angle)) * this->orbitRadius); + emitter->position.z = this->orbitCenter.z + sine + this->orbitOffsetZ; + emitter->position.x = cosine + this->orbitCenter.x + this->orbitOffsetX; + emitter->position.y = this->orbitCenter.y + 0.0f + this->orbitOffsetY; this->emitters.emplace_front(emitter); } else { - this->unknown_00D4.push_back(emitter); + this->finishedEmitters.push_back(emitter); } long long index = this->count - this->emitters.size(); @@ -1891,7 +1891,7 @@ void CDropItemEffect::Render() { // OFFSET: 0x0071B8C0 // FUNCTION: fn_07318 CJupitelThunderHit::CJupitelThunderHit() : CEffect(-1) { - this->unknown_002C = 250; + this->effectLifetime = 250; } // OFFSET: 0x0071BAB0 @@ -1917,11 +1917,11 @@ void CJupitelThunderHit::SpawnHit() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 0x203); EZ2STREmitter* emitter = reinterpret_cast(particle); - particle->unknown_00E8 = -10; + particle->elapsedFrames = -10; particle->scale = 7.5f; - particle->unknown_00A8 = 0; + particle->animationState = 0; particle->SetTexture("effect\\thunder_plazma_blast_a.bmp"); - this->unknown_00D8.push_back(emitter); + this->hitEmitters.push_back(emitter); } // OFFSET: 0x0071C270 @@ -1940,7 +1940,7 @@ void CJupitelThunderHit::SpawnSpark() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 0x203); EZ2STREmitter* emitter = reinterpret_cast(particle); particle->SetTexture(texture); - particle->unknown_00C0 = 2.5f; + particle->speedParameter = 2.5f; this->emitters.push_back(emitter); } @@ -1974,11 +1974,11 @@ void CJupitelThunderHit::OnProcess() { for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { ++(*it)->elapsed; CEZ2STRParticle* particle = AsParticle(*it); - if (particle && particle->unknown_00E8 >= 0) { - if (particle->unknown_00E8 == 10) { - particle->unknown_00E8 = -10; + if (particle && particle->elapsedFrames >= 0) { + if (particle->elapsedFrames == 10) { + particle->elapsedFrames = -10; } else { - const float scale = static_cast(particle->unknown_00E8) * particle->unknown_00C0; + const float scale = static_cast(particle->elapsedFrames) * particle->speedParameter; matrix rotation; rotation.MakeXRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch / 180.0f * 3.141592f); matrix scaling; @@ -1994,17 +1994,17 @@ void CJupitelThunderHit::OnProcess() { } } - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->hitEmitters.begin(); it != this->hitEmitters.end(); ++it) { ++(*it)->elapsed; CEZ2STRParticle* particle = AsParticle(*it); - if (particle && particle->unknown_00E8 >= 0) { - std::size_t index = static_cast(particle->unknown_00A8) + 1; + if (particle && particle->elapsedFrames >= 0) { + std::size_t index = static_cast(particle->animationState) + 1; if (index >= this->textures.size()) { index = 0; } particle->SetTexture(this->textures[index]); - particle->unknown_00A8 = static_cast(index); + particle->animationState = static_cast(index); matrix rotation; rotation.MakeXRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch / 180.0f * 3.141592f); matrix scaling; @@ -2029,7 +2029,7 @@ void CJupitelThunderHit::Render() { } } - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->hitEmitters.begin(); it != this->hitEmitters.end(); ++it) { EZ2STREmitter* emitter = *it; if (emitter && emitter->elapsed >= 0) { AsParticle(emitter)->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); @@ -2039,7 +2039,7 @@ void CJupitelThunderHit::Render() { // OFFSET: 0x0071CCB0 // FUNCTION: fn_07327 -CNewCloudKillEffect::CNewCloudKillEffect() : CEffect(1196), unknown_00F4(0), unknown_00F8(0) { +CNewCloudKillEffect::CNewCloudKillEffect() : CEffect(1196), circleResetTime(0), cloudResetTime(0) { } // OFFSET: 0x0071CE00 @@ -2050,26 +2050,26 @@ CNewCloudKillEffect::~CNewCloudKillEffect() { // OFFSET: 0x0071D460 // FUNCTION: fn_07333 void CNewCloudKillEffect::Close() { - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { + for (auto it = this->circleEmitters.begin(); it != this->circleEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00CC.clear(); - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end(); ++it) { + this->circleEmitters.clear(); + for (auto it = this->cloudEmitters.begin(); it != this->cloudEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00D4.clear(); - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + this->cloudEmitters.clear(); + for (auto it = this->smokeEmitters.begin(); it != this->smokeEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00DC.clear(); - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { + this->smokeEmitters.clear(); + for (auto it = this->lightningEmitters.begin(); it != this->lightningEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00E4.clear(); - for (auto it = this->unknown_00EC.begin(); it != this->unknown_00EC.end(); ++it) { + this->lightningEmitters.clear(); + for (auto it = this->mistEmitters.begin(); it != this->mistEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00EC.clear(); + this->mistEmitters.clear(); } // OFFSET: 0x0071DEC0 @@ -2083,24 +2083,24 @@ bool CNewCloudKillEffect::IsAlive() { void CNewCloudKillEffect::OnProcess() { const unsigned int now = timeGetTime(); - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { - if (now - static_cast(this->unknown_00F4) > 5000) { + for (auto it = this->circleEmitters.begin(); it != this->circleEmitters.end(); ++it) { + if (now - static_cast(this->circleResetTime) > 5000) { CEZ2STRParticle* particle = AsParticle(*it); particle->alpha = 0xFF; - *reinterpret_cast(&particle->unknown_00C4) = 0.0f; - particle->unknown_00E8 = 60; - particle->unknown_00A8 = 0; + *reinterpret_cast(&particle->angleBits) = 0.0f; + particle->elapsedFrames = 60; + particle->animationState = 0; InitParticleQuad(particle->vertices); } if (CEZ2STRParticle* particle = AsParticle(*it)) { - if (particle->unknown_00E8 == 0) { - particle->unknown_00A8 = 1; + if (particle->elapsedFrames == 0) { + particle->animationState = 1; } else { - int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4) + 1.0f); + int angle = static_cast(*reinterpret_cast(&particle->angleBits) + 1.0f); angle %= 360; - particle->alpha = static_cast(static_cast(particle->unknown_00E8) * 4.25f); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + particle->alpha = static_cast(static_cast(particle->elapsedFrames) * 4.25f); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); matrix rotation; rotation.MakeZRotation(static_cast(angle) / 180.0f * 3.141592f); @@ -2119,15 +2119,15 @@ void CNewCloudKillEffect::OnProcess() { } } - --AsParticle(*it)->unknown_00E8; + --AsParticle(*it)->elapsedFrames; } - if (now - static_cast(this->unknown_00F4) > 5000) { - this->unknown_00F4 = static_cast(timeGetTime()); + if (now - static_cast(this->circleResetTime) > 5000) { + this->circleResetTime = static_cast(timeGetTime()); } - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end(); ++it) { - if (now - static_cast(this->unknown_00F8) > 5000) { + for (auto it = this->cloudEmitters.begin(); it != this->cloudEmitters.end(); ++it) { + if (now - static_cast(this->cloudResetTime) > 5000) { ResetCloudParticle(AsParticle(*it)); } @@ -2135,21 +2135,21 @@ void CNewCloudKillEffect::OnProcess() { int alpha = std::max(particle->alpha - 3, 0); particle->alpha = alpha; if (alpha == 0) { - particle->unknown_00A8 = 1; + particle->animationState = 1; } else { - const float fall = particle->unknown_00C0 * 1.0f; + const float fall = particle->speedParameter * 1.0f; particle->scale -= particle->scale / static_cast(alpha); - particle->unknown_00D4 -= fall; - particle->unknown_00D0 += 0.0f; - particle->unknown_00D8 += 0.0f; + particle->offsetY -= fall; + particle->offsetX += 0.0f; + particle->offsetZ += 0.0f; - particle->position.x = particle->unknown_00D0 + this->position[0]; - particle->position.y = particle->unknown_00D4 + this->position[1]; - particle->position.z = particle->unknown_00D8 + this->position[2]; + particle->position.x = particle->offsetX + this->position[0]; + particle->position.y = particle->offsetY + this->position[1]; + particle->position.z = particle->offsetZ + this->position[2]; - int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4) + 1.0f); + int angle = static_cast(*reinterpret_cast(&particle->angleBits) + 1.0f); angle %= 360; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); matrix rotation; rotation.MakeZRotation(static_cast(angle) / 180.0f * 3.141592f); @@ -2167,25 +2167,25 @@ void CNewCloudKillEffect::OnProcess() { } } - if (now - static_cast(this->unknown_00F8) > 5000) { - this->unknown_00F8 = static_cast(timeGetTime()); + if (now - static_cast(this->cloudResetTime) > 5000) { + this->cloudResetTime = static_cast(timeGetTime()); } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { - ++AsParticle(*it)->unknown_00E8; + for (auto it = this->smokeEmitters.begin(); it != this->smokeEmitters.end(); ++it) { + ++AsParticle(*it)->elapsedFrames; CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00E8 <= 0 || particle == nullptr) { + if (particle->elapsedFrames <= 0 || particle == nullptr) { continue; } - const int maximum = *reinterpret_cast(particle->unknown_0048); - if (particle->unknown_00A8 == 0) { + const int maximum = *reinterpret_cast(particle->effectParameters); + if (particle->animationState == 0) { int alpha = std::min(particle->alpha + 2, maximum); particle->alpha = alpha; if (alpha == maximum) { - particle->unknown_00A8 = 1; + particle->animationState = 1; } - } else if (particle->unknown_00A8 == 1) { + } else if (particle->animationState == 1) { int alpha = std::max(particle->alpha - 1, 0); particle->alpha = alpha; if (alpha == 0) { @@ -2195,14 +2195,14 @@ void CNewCloudKillEffect::OnProcess() { particle->scale -= particle->scale / static_cast(alpha); } - const float fall = particle->unknown_00C0 * 1.0f; - particle->unknown_00D4 -= fall; - particle->unknown_00D0 += 0.0f; - particle->unknown_00D8 += 0.0f; + const float fall = particle->speedParameter * 1.0f; + particle->offsetY -= fall; + particle->offsetX += 0.0f; + particle->offsetZ += 0.0f; - particle->position.x = particle->unknown_00D0 + this->position[0]; - particle->position.y = particle->unknown_00D4 + this->position[1]; - particle->position.z = particle->unknown_00D8 + this->position[2]; + particle->position.x = particle->offsetX + this->position[0]; + particle->position.y = particle->offsetY + this->position[1]; + particle->position.z = particle->offsetZ + this->position[2]; matrix scale; scale.SetScale(particle->scale, particle->scale, 1.0f); @@ -2217,20 +2217,20 @@ void CNewCloudKillEffect::OnProcess() { particle->transform = transform; } - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { + for (auto it = this->lightningEmitters.begin(); it != this->lightningEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00E8 >= particle->unknown_004C) { + if (particle->elapsedFrames >= particle->phaseParameter) { ResetLightning(particle); } else { - int state = std::max(static_cast(particle->unknown_00A8) - 1, 0); - particle->unknown_00A8 = static_cast(state); + int state = std::max(static_cast(particle->animationState) - 1, 0); + particle->animationState = static_cast(state); particle->alpha = state * 25; matrix scale; scale.SetScale(particle->scale, particle->scale, 1.0f); matrix rotation; - rotation.MakeZRotation(*reinterpret_cast(&particle->unknown_00C4) / 180.0f * 3.141592f); + rotation.MakeZRotation(*reinterpret_cast(&particle->angleBits) / 180.0f * 3.141592f); rotation.AppendXRotation( static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch / 180.0f * 3.141592f ); @@ -2244,32 +2244,32 @@ void CNewCloudKillEffect::OnProcess() { static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / 180.0f * 3.141592f ); - particle->position.x = yaw.values[0] * particle->unknown_00D0 + yaw.values[3] * particle->unknown_00D4 + - yaw.values[6] * particle->unknown_00D8 + yaw.values[9] + this->position[0]; - particle->position.y = yaw.values[1] * particle->unknown_00D0 + yaw.values[4] * particle->unknown_00D4 + - yaw.values[7] * particle->unknown_00D8 + yaw.values[10] + this->position[1]; - particle->position.z = yaw.values[2] * particle->unknown_00D0 + yaw.values[5] * particle->unknown_00D4 + - yaw.values[8] * particle->unknown_00D8 + yaw.values[11] + this->position[2]; + particle->position.x = yaw.values[0] * particle->offsetX + yaw.values[3] * particle->offsetY + + yaw.values[6] * particle->offsetZ + yaw.values[9] + this->position[0]; + particle->position.y = yaw.values[1] * particle->offsetX + yaw.values[4] * particle->offsetY + + yaw.values[7] * particle->offsetZ + yaw.values[10] + this->position[1]; + particle->position.z = yaw.values[2] * particle->offsetX + yaw.values[5] * particle->offsetY + + yaw.values[8] * particle->offsetZ + yaw.values[11] + this->position[2]; } - ++AsParticle(*it)->unknown_00E8; + ++AsParticle(*it)->elapsedFrames; } - for (auto it = this->unknown_00EC.begin(); it != this->unknown_00EC.end(); ++it) { - ++AsParticle(*it)->unknown_00E8; + for (auto it = this->mistEmitters.begin(); it != this->mistEmitters.end(); ++it) { + ++AsParticle(*it)->elapsedFrames; CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00E8 <= 0 || particle == nullptr) { + if (particle->elapsedFrames <= 0 || particle == nullptr) { continue; } - const int maximum = *reinterpret_cast(particle->unknown_0048); - if (particle->unknown_00A8 == 0) { + const int maximum = *reinterpret_cast(particle->effectParameters); + if (particle->animationState == 0) { int alpha = std::min(particle->alpha + 5, maximum); particle->alpha = alpha; if (alpha == maximum) { - particle->unknown_00A8 = 1; + particle->animationState = 1; } - } else if (particle->unknown_00A8 == 1) { + } else if (particle->animationState == 1) { int alpha = std::max(particle->alpha - 2, 0); particle->alpha = alpha; if (alpha == 0) { @@ -2279,14 +2279,14 @@ void CNewCloudKillEffect::OnProcess() { particle->scale = (particle->scale / static_cast(maximum)) * static_cast(alpha); } - const float fall = particle->unknown_00C0 * 1.0f; - particle->unknown_00D4 -= fall; - particle->unknown_00D0 += 0.0f; - particle->unknown_00D8 += 0.0f; + const float fall = particle->speedParameter * 1.0f; + particle->offsetY -= fall; + particle->offsetX += 0.0f; + particle->offsetZ += 0.0f; - particle->position.x = particle->unknown_00D0 + this->position[0]; - particle->position.y = particle->unknown_00D4 + this->position[1]; - particle->position.z = particle->unknown_00D8 + this->position[2]; + particle->position.x = particle->offsetX + this->position[0]; + particle->position.y = particle->offsetY + this->position[1]; + particle->position.z = particle->offsetZ + this->position[2]; matrix scale; scale.SetScale(particle->scale, particle->scale, 1.0f); @@ -2382,7 +2382,7 @@ CPneumaticusProcellaEffect::CPneumaticusProcellaEffect() : CEffect(1957) { // FUNCTION: fn_07354 void CPneumaticusProcellaEffect::Open() { double scale; - switch (this->unknown_00B0) { + switch (this->effectLevel) { case 1: case 2: case 3: @@ -2578,26 +2578,26 @@ void CRandomOptEffect::Init() { } particle->SetTexture("effect\\alpha_down.tga"); - particle->unknown_0004 = this->id; - particle->unknown_0010 = ring; - particle->unknown_000C = i; - particle->unknown_0008 = 3; + particle->effectId = this->id; + particle->rowIndex = ring; + particle->columnIndex = i; + particle->groupIndex = 3; particle->sourceBlend = 5; particle->destinationBlend = 6; particle->alpha = alpha; particle->SetColor(100, 100, 255); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(baseAngle); + *reinterpret_cast(&particle->angleBits) = static_cast(baseAngle); const float level = static_cast(ring); - particle->unknown_0050 = 360; - particle->unknown_00C0 = 100.0f - level * 10.0f; + particle->angleParameter = 360; + particle->speedParameter = 100.0f - level * 10.0f; particle->scale = level * 0.2f + 0.5f; - particle->unknown_004C = static_cast(level * 0.5f + 90.0f); - particle->unknown_0054 = 0.0f; + particle->phaseParameter = static_cast(level * 0.5f + 90.0f); + particle->animationParameter = 0.0f; switch (this->id) { case EF_UNK_1186: particle->SetColor(255, 200, 255); - particle->unknown_00C0 = 120.0f - level * 12.0f; + particle->speedParameter = 120.0f - level * 12.0f; particle->scale = level * 0.24f + 0.6f; break; case EF_UNK_1187: @@ -2621,14 +2621,14 @@ void CRandomOptEffect::Init() { this->particles.push_back(particle); if (particle) { - const int segment = particle->unknown_000C; - const float height = g_sinTable[segment * 9] * particle->unknown_00C0; - const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int segment = particle->columnIndex; + const float height = g_sinTable[segment * 9] * particle->speedParameter; + const int step = static_cast(static_cast(particle->angleParameter) / 20.0f); const int angle = - static_cast(static_cast(step * segment) + *reinterpret_cast(&particle->unknown_00C4)) % + static_cast(static_cast(step * segment) + *reinterpret_cast(&particle->angleBits)) % 360; - const float spread = height * g_cosTable[particle->unknown_004C]; - const float lift = height * g_sinTable[particle->unknown_004C]; + const float spread = height * g_cosTable[particle->phaseParameter]; + const float lift = height * g_sinTable[particle->phaseParameter]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; const float innerX = particle->scale * cosine; @@ -2704,8 +2704,8 @@ void CRandomOptEffect::OnProcess() { if (particle) { const int angle = static_cast( - static_cast(particle->unknown_0010) + *reinterpret_cast(&particle->unknown_00C4) + 3.0f); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + static_cast(particle->rowIndex) + *reinterpret_cast(&particle->angleBits) + 3.0f); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); @@ -2713,7 +2713,7 @@ void CRandomOptEffect::OnProcess() { particle->transform = rotation; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -2726,7 +2726,7 @@ void CRandomOptEffect::Render() { continue; } - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; if (texPart <= 0) { continue; } @@ -2745,13 +2745,13 @@ void CRandomOptEffect::Render() { // OFFSET: 0x00721560 // FUNCTION: fn_07374 -CRichsCoinEffect::CRichsCoinEffect() : CEffect(1135), unknown_00E4(0) { +CRichsCoinEffect::CRichsCoinEffect() : CEffect(1135), coinCount(0) { } // OFFSET: 0x007218D0 // FUNCTION: fn_07377 void CRichsCoinEffect::Open() { - int count = this->unknown_00E4; + int count = this->coinCount; if (count > 5) { count = 5; } else if (count <= 0) { @@ -2762,21 +2762,21 @@ void CRichsCoinEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\rl_richs_coin_b\\rcoin1.bmp"); - particle->unknown_0054 = static_cast(360 / count * i) / 180.0f * 3.141592f - 10.0f; - reinterpret_cast(particle->unknown_0058) = 0.0f; + particle->animationParameter = static_cast(360 / count * i) / 180.0f * 3.141592f - 10.0f; + reinterpret_cast(particle->animationParameters) = 0.0f; InitParticleQuad(particle->vertices); this->particles.push_back(particle); } } - if (this->unknown_00E4 > 5) { - const int lights = this->unknown_00E4 - 5; + if (this->coinCount > 5) { + const int lights = this->coinCount - 5; for (int i = 0; i < lights; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\rl_richs_coin_b\\light.bmp"); - particle->unknown_0054 = static_cast(i * 72) / 180.0f * 3.141592f - 10.0f; - reinterpret_cast(particle->unknown_0058) = 0.0f; + particle->animationParameter = static_cast(i * 72) / 180.0f * 3.141592f - 10.0f; + reinterpret_cast(particle->animationParameters) = 0.0f; particle->scale = 1.5f; matrix scale; std::memcpy(scale.values, g_identityMatrix, sizeof(scale.values)); @@ -3184,7 +3184,7 @@ void CServantWeaponNewEffect::Shoot(int skill) { // OFFSET: 0x00725130 // FUNCTION: fn_07410 CSevereRainStorm::CSevereRainStorm() : CEffect(-1) { - this->unknown_0050 = 0; + this->rotationParameter = 0; } // OFFSET: 0x007251C0 @@ -3196,54 +3196,54 @@ CSevereRainStorm::~CSevereRainStorm() { // FUNCTION: fn_07334 void CNewCloudKillEffect::ResetMistParticle(CParticle* particle) { particle->alpha = 0; - *reinterpret_cast(particle->unknown_0048) = std::max(rand() % 50, 0) + 150; - particle->unknown_00A8 = 0; - particle->unknown_00E8 = 0; + *reinterpret_cast(particle->effectParameters) = std::max(rand() % 50, 0) + 150; + particle->animationState = 0; + particle->elapsedFrames = 0; InitParticleQuad(particle->vertices); const int spread = std::max(rand() % 15, 0) + 2; const int angle = std::max(rand() % 360, 0); - particle->unknown_00D4 = 0.0f; - particle->unknown_00D8 = static_cast(spread) * g_sinTable[angle]; - particle->unknown_00D0 = static_cast(spread) * g_cosTable[angle]; + particle->offsetY = 0.0f; + particle->offsetZ = static_cast(spread) * g_sinTable[angle]; + particle->offsetX = static_cast(spread) * g_cosTable[angle]; particle->scale = static_cast(std::max(rand() % 10, 0)) * 0.1f + 0.5f; - particle->unknown_00C0 = static_cast(std::max(rand() % 30, 0)) * 0.01f + 0.05f; + particle->speedParameter = static_cast(std::max(rand() % 30, 0)) * 0.01f + 0.05f; } // OFFSET: 0x0071D760 // FUNCTION: fn_07335 void CNewCloudKillEffect::Open() { - this->unknown_00F4 = static_cast(timeGetTime()); - this->unknown_00F8 = static_cast(timeGetTime()); + this->circleResetTime = static_cast(timeGetTime()); + this->cloudResetTime = static_cast(timeGetTime()); CParticle* circle = CreateParticle(reinterpret_cast(this->position), 5); EZ2STREmitter* circleEmitter = reinterpret_cast(circle); if (circle) { circle->SetTexture("effect\\new_cloud_kill\\ef_cloud_circle.tga"); - circle->unknown_0004 = this->id; - circle->unknown_000C = 1; - circle->unknown_0010 = 0; - circle->unknown_0008 = 1; + circle->effectId = this->id; + circle->columnIndex = 1; + circle->rowIndex = 0; + circle->groupIndex = 1; circle->scale = 20.0f; circle->alpha = 0xFF; - circle->unknown_00C4 = 0; - circle->unknown_00E8 = 60; - circle->unknown_00A8 = 0; + circle->angleBits = 0; + circle->elapsedFrames = 60; + circle->animationState = 0; InitParticleQuad(circle->vertices); - this->unknown_00CC.push_back(circleEmitter); + this->circleEmitters.push_back(circleEmitter); } for (int i = 0; i < 100; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\new_cloud_kill\\ef_cloud_kill.tga"); ResetCloudParticle(particle); - this->unknown_00D4.push_back(emitter); + this->cloudEmitters.push_back(emitter); } } @@ -3251,44 +3251,44 @@ void CNewCloudKillEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\new_cloud_kill\\ef_cloud_kill.tga"); ResetSmokeParticle(particle); - particle->unknown_00E8 = -std::max(0, rand() % 71); - this->unknown_00DC.push_back(emitter); + particle->elapsedFrames = -std::max(0, rand() % 71); + this->smokeEmitters.push_back(emitter); } } CParticle* lightning = CreateParticle(reinterpret_cast(this->position), 5); EZ2STREmitter* lightningEmitter = reinterpret_cast(lightning); if (lightning) { - lightning->unknown_0004 = this->id; - lightning->unknown_000C = 1; - lightning->unknown_0010 = 0; - lightning->unknown_0008 = 1; + lightning->effectId = this->id; + lightning->columnIndex = 1; + lightning->rowIndex = 0; + lightning->groupIndex = 1; lightning->SetTexture("effect\\new_cloud_kill\\ef_comm_lightning_cloud.tga"); lightning->alpha = 0xFF; lightning->depthOffset = 0.035f; ResetLightning(lightning); - lightning->unknown_004C = 50; - this->unknown_00E4.push_back(lightningEmitter); + lightning->phaseParameter = 50; + this->lightningEmitters.push_back(lightningEmitter); } for (int i = 0; i < 30; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); EZ2STREmitter* emitter = reinterpret_cast(particle); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\new_cloud_kill\\ef_cloud_kill.tga"); ResetMistParticle(particle); - particle->unknown_00E8 = -std::max(0, rand() % 80); - this->unknown_00EC.push_back(emitter); + particle->elapsedFrames = -std::max(0, rand() % 80); + this->mistEmitters.push_back(emitter); } } } @@ -3296,16 +3296,16 @@ void CNewCloudKillEffect::Open() { // OFFSET: 0x0071DB70 // FUNCTION: fn_07337 void CNewCloudKillEffect::ResetCloudParticle(CParticle* particle) { - particle->unknown_00A9[0] = std::max(rand() % 2, 0); + particle->frameParameters[0] = std::max(rand() % 2, 0); const int angle = std::max(rand() % 360, 0); - particle->unknown_00D4 = 0.0f; + particle->offsetY = 0.0f; particle->alpha = 0xFF; - particle->unknown_00D0 = g_cosTable[angle] * 18.0f; - particle->unknown_00D8 = g_sinTable[angle] * 18.0f; + particle->offsetX = g_cosTable[angle] * 18.0f; + particle->offsetZ = g_sinTable[angle] * 18.0f; particle->scale = static_cast(std::max(rand() % 31, 0)) * 0.1f + 2.0f; - particle->unknown_00A8 = 0; - particle->unknown_00C0 = static_cast(std::max(rand() % 31, 0)) * 0.01f + 0.05f; + particle->animationState = 0; + particle->speedParameter = static_cast(std::max(rand() % 31, 0)) * 0.01f + 0.05f; InitParticleQuad(particle->vertices); } @@ -3313,14 +3313,14 @@ void CNewCloudKillEffect::ResetCloudParticle(CParticle* particle) { // FUNCTION: fn_07338 void CNewCloudKillEffect::ResetLightning(CParticle* particle) { particle->scale = static_cast(std::max(rand() % 5, 0)) + 10.0f; - particle->unknown_00A8 = 10; - particle->unknown_00A9[0] = std::max(rand() % 4, 0); - particle->unknown_004C = std::max(rand() % 50, 0) + 10; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(rand() % 360, 0)); - particle->unknown_00D8 = static_cast(std::max(rand() % 10, 0)) - 5.0f; - particle->unknown_00D0 = static_cast(std::max(rand() % 10, 0)) - 5.0f; - particle->unknown_00D4 = -10.0f; - particle->unknown_00E8 = 0; + particle->animationState = 10; + particle->frameParameters[0] = std::max(rand() % 4, 0); + particle->phaseParameter = std::max(rand() % 50, 0) + 10; + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); + particle->offsetZ = static_cast(std::max(rand() % 10, 0)) - 5.0f; + particle->offsetX = static_cast(std::max(rand() % 10, 0)) - 5.0f; + particle->offsetY = -10.0f; + particle->elapsedFrames = 0; InitParticleQuad(particle->vertices); } @@ -3328,21 +3328,21 @@ void CNewCloudKillEffect::ResetLightning(CParticle* particle) { // FUNCTION: fn_07339 void CNewCloudKillEffect::ResetSmokeParticle(CParticle* particle) { particle->alpha = 0; - particle->unknown_00A8 = 0; - particle->unknown_00E8 = 0; + particle->animationState = 0; + particle->elapsedFrames = 0; InitParticleQuad(particle->vertices); particle->scale = static_cast(std::max(rand() % 51, 0)) * 0.1f + 7.0f; - particle->unknown_00D4 = particle->scale * -0.5f; + particle->offsetY = particle->scale * -0.5f; const int spread = std::max(rand() % 13, 0) + 2; const int angle = std::max(rand() % 360, 0); - particle->unknown_00D8 = static_cast(spread) * g_sinTable[angle]; - particle->unknown_00D0 = static_cast(spread) * g_cosTable[angle]; + particle->offsetZ = static_cast(spread) * g_sinTable[angle]; + particle->offsetX = static_cast(spread) * g_cosTable[angle]; - particle->unknown_00A9[0] = std::max(rand() % 4, 0); - *reinterpret_cast(particle->unknown_0048) = std::max(rand() % 151, 0) + 50; - particle->unknown_00C0 = static_cast(std::max(rand() % 10, 0)) * 0.01f + 0.05f; + particle->frameParameters[0] = std::max(rand() % 4, 0); + *reinterpret_cast(particle->effectParameters) = std::max(rand() % 151, 0) + 50; + particle->speedParameter = static_cast(std::max(rand() % 10, 0)) * 0.01f + 0.05f; } // OFFSET: 0x0070C2B0 @@ -3438,9 +3438,9 @@ void CCylinderEffect::Close() { // OFFSET: 0x0070C520 // FUNCTION: fn_07135 void CSprArrowEffect::Close() { - if (this->unknown_00CC != 0) { - FreeParticle(reinterpret_cast(this->unknown_00CC)); - this->unknown_00CC = 0; + if (this->spriteParticle != 0) { + FreeParticle(reinterpret_cast(this->spriteParticle)); + this->spriteParticle = 0; } } @@ -3505,7 +3505,7 @@ void CDropItemEffect::Close() { // OFFSET: 0x00711A20 // FUNCTION: fn_07230 void CFloralFlareRoad::Close() { - FreeParticle(AsParticle(this->unknown_00CC)); + FreeParticle(AsParticle(this->emitter)); for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { FreeParticle(AsParticle(*it)); } @@ -3563,10 +3563,10 @@ void CDancingKnifeEffect::Close() { FreeParticle(AsParticle(*it)); } this->emitters.clear(); - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->secondStrikeEmitters.begin(); it != this->secondStrikeEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00D8.clear(); + this->secondStrikeEmitters.clear(); } // OFFSET: 0x0071C4B0 @@ -3576,10 +3576,10 @@ void CJupitelThunderHit::Close() { FreeParticle(AsParticle(*it)); } this->emitters.clear(); - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->hitEmitters.begin(); it != this->hitEmitters.end(); ++it) { FreeParticle(AsParticle(*it)); } - this->unknown_00D8.clear(); + this->hitEmitters.clear(); } // OFFSET: 0x00721860 @@ -3600,17 +3600,17 @@ void CRichsCoinEffect::Close() { void CSevereRainStorm::SpawnParticles() { switch (this->id) { case EF_UNK_1752: - if (this->unknown_00D4 % (4 - (this->unknown_00B0 + 1) / 2) == 0) { + if (this->elapsedFrames % (4 - (this->effectLevel + 1) / 2) == 0) { this->SpawnCrystalRain(); } break; case EF_UNK_1276: - if (this->unknown_00D4 % 3 == 0) { + if (this->elapsedFrames % 3 == 0) { this->SpawnSevereRain(); } break; case EF_UNK_2026: - if (this->unknown_00D4 % 5 == 0) { + if (this->elapsedFrames % 5 == 0) { vector3d position = {this->position[0], this->position[1], this->position[2]}; position.x = (static_cast(std::max(0, rand() % 451)) - 225.0f) * 0.1f + position.x; position.z = (static_cast(std::max(0, rand() % 451)) - 225.0f) * 0.1f + position.z; @@ -3622,9 +3622,9 @@ void CSevereRainStorm::SpawnParticles() { } break; case EF_UNK_2165: - if (this->unknown_00D4 % (9 - this->unknown_00B0 / 3) == 0) { + if (this->elapsedFrames % (9 - this->effectLevel / 3) == 0) { const long long ranges[10] = {3, 3, 3, 5, 5, 5, 7, 7, 7, 9}; - const long long spread = ranges[std::min(static_cast(this->unknown_00B0), 10u) - 1] * 50; + const long long spread = ranges[std::min(static_cast(this->effectLevel), 10u) - 1] * 50; vector3d position = {this->position[0], this->position[1], this->position[2]}; const float half = static_cast(spread) * 0.5f; position.x = (static_cast(std::max(0, rand() % (static_cast(spread) + 1))) - half) * 0.1f + position.x; @@ -3637,32 +3637,32 @@ void CSevereRainStorm::SpawnParticles() { } break; case EF_UNK_2348: - if (this->ActorExists() && this->unknown_00D4 % 15 == 0) { - this->SpawnTwinklingGalaxy(this->unknown_00D4 / 15 % 4); + if (this->ActorExists() && this->elapsedFrames % 15 == 0) { + this->SpawnTwinklingGalaxy(this->elapsedFrames / 15 % 4); } break; case EF_UNK_2349: - if (this->ActorExists() && this->unknown_00D4 % 18 == 0) { + if (this->ActorExists() && this->elapsedFrames % 18 == 0) { this->SpawnGalaxyStar(); } break; case EF_UNK_2350: - if (this->ActorExists() && this->unknown_00D4 % 18 == 0) { + if (this->ActorExists() && this->elapsedFrames % 18 == 0) { this->SpawnStarCannon(); } break; case EF_UNK_2351: - if (this->ActorExists() && this->unknown_00D4 % 15 == 0) { + if (this->ActorExists() && this->elapsedFrames % 15 == 0) { this->SpawnGrenades(); } break; case EF_UNK_2354: - if (this->ActorExists() && this->unknown_00D4 % 15 == 0) { + if (this->ActorExists() && this->elapsedFrames % 15 == 0) { this->SpawnBombardHits(); } break; case EF_UNK_2462: - if (this->unknown_00D4 % (9 - this->unknown_00B0 / 3) == 0) { + if (this->elapsedFrames % (9 - this->effectLevel / 3) == 0) { this->SpawnCrossRain(); } break; @@ -3673,7 +3673,7 @@ void CSevereRainStorm::SpawnParticles() { // FUNCTION: fn_07414 void CSevereRainStorm::SpawnCrossRain() { const int ranges[10] = {3, 3, 3, 5, 5, 5, 7, 7, 7, 9}; - const int index = std::max(0, std::min(this->unknown_00B0 - 1, 9)); + const int index = std::max(0, std::min(this->effectLevel - 1, 9)); vector3d position = {this->position[0], this->position[1], this->position[2]}; const int spread = ranges[index] * 50; @@ -3692,8 +3692,8 @@ void CSevereRainStorm::SpawnCrossRain() { // FUNCTION: fn_07415 void CSevereRainStorm::SpawnGrenades() { const long long ranges[5] = {11, 11, 11, 9, 9}; - const long long spread = ranges[std::min(static_cast(this->unknown_00B0), 5u) - 1] * 50; - for (int count = 0; count < (this->unknown_00B0 + 1) / 2; ++count) { + const long long spread = ranges[std::min(static_cast(this->effectLevel), 5u) - 1] * 50; + for (int count = 0; count < (this->effectLevel + 1) / 2; ++count) { const float half = static_cast(spread) * 0.5f; const vector3d base = {this->position[0] + 0.0f, this->position[1] - 15.0f, this->position[2] + 0.0f}; vector3d position = base; @@ -3739,7 +3739,7 @@ void CSevereRainStorm::SpawnBombardHits() { // FUNCTION: fn_07417 void CSevereRainStorm::SpawnCrystalRain() { const long long ranges[5] = {11, 13, 15, 17, 19}; - const long long spread = ranges[std::min(static_cast(this->unknown_00B0), 5u) - 1] * 50; + const long long spread = ranges[std::min(static_cast(this->effectLevel), 5u) - 1] * 50; vector3d position = {this->position[0], this->position[1], this->position[2]}; const float half = static_cast(spread) * 0.5f; position.x = (static_cast(std::max(0, rand() % (static_cast(spread) + 1))) - half) * 0.1f + position.x; @@ -3790,18 +3790,18 @@ void CSevereRainStorm::SpawnTwinklingGalaxy(int index) { CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); if (particle) { particle->Load(std::string("SKY_EMPEROR\\SKE_TWINKLING_GALAXY\\twinkling_galaxy_bottom\\ske_twinkling_galaxy_bottom.str")); - particle->unknown_00D0 = 0.2f; - particle->unknown_00D4 = -13.5f; - particle->unknown_00D8 = 0.0f; + particle->offsetX = 0.2f; + particle->offsetY = -13.5f; + particle->offsetZ = 0.0f; this->emitters.push_back(reinterpret_cast(particle)); } particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (particle) { particle->Load(FormatOwnedString("SKY_EMPEROR\\SKE_TWINKLING_GALAXY\\twinkling_galaxy\\ske_twinkling_galaxy%02d.str", index)); - particle->unknown_00D0 = 0.2f; - particle->unknown_00D4 = -13.5f; - particle->unknown_00D8 = 0.0f; + particle->offsetX = 0.2f; + particle->offsetY = -13.5f; + particle->offsetZ = 0.0f; this->emitters.push_back(reinterpret_cast(particle)); } @@ -3812,7 +3812,7 @@ void CSevereRainStorm::SpawnTwinklingGalaxy(int index) { // FUNCTION: fn_07420 void CSevereRainStorm::SpawnStarCannon() { const long long ranges[5] = {13, 13, 11, 11, 9}; - const long long spread = ranges[std::min(static_cast(this->unknown_00B0), 5u) - 1] * 50; + const long long spread = ranges[std::min(static_cast(this->effectLevel), 5u) - 1] * 50; const vector3d base = {this->position[0] + 0.0f, this->position[1] - 15.0f, this->position[2] + 0.0f}; vector3d position = base; const float half = static_cast(spread) * 0.5f; @@ -3840,7 +3840,7 @@ void CSevereRainStorm::SpawnStarCannon() { // FUNCTION: fn_07421 void CSevereRainStorm::SpawnGalaxyStar() { const long long ranges[5] = {13, 13, 11, 11, 9}; - const long long spread = ranges[std::min(static_cast(this->unknown_00B0), 5u) - 1] * 50; + const long long spread = ranges[std::min(static_cast(this->effectLevel), 5u) - 1] * 50; const vector3d base = {this->position[0] + 0.0f, this->position[1] - 15.0f, this->position[2] + 0.0f}; vector3d position = base; const float half = static_cast(spread) * 0.5f; @@ -3876,7 +3876,7 @@ void CSevereRainStorm::Close() { // OFFSET: 0x007278C0 // FUNCTION: fn_07423 void CSevereRainStorm::Open() { - this->unknown_00D4 = 0; + this->elapsedFrames = 0; if (this->id == 2348) { this->retained = 1; } @@ -3891,12 +3891,12 @@ bool CSevereRainStorm::IsAlive() { case EF_UNK_2462: return this->ActorExists(); case EF_UNK_1276: - if (this->unknown_00D4 > 240) { + if (this->elapsedFrames > 240) { return false; } break; case EF_UNK_2026: - if (EffectLifetime(2026) < this->unknown_00D4) { + if (EffectLifetime(2026) < this->elapsedFrames) { return false; } break; @@ -3953,7 +3953,7 @@ void CSevereRainStorm::OnProcess() { } ++it; } - ++this->unknown_00D4; + ++this->elapsedFrames; } // OFFSET: 0x00727C70 @@ -4058,15 +4058,15 @@ void CTunaPartyEffect::Open() { CSpriteParticle* particle = AsSprite(emitter); - particle->unknown_0004 = this->id; - particle->unknown_000C = 1; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 1; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\su_tunaparty\\su_tunaparty.spr"); particle->SetAction("이팩트\\su_tunaparty\\su_tunaparty.act"); - particle->unknown_0054 = 0.0f; + particle->animationParameter = 0.0f; particle->loopMode = 3; - this->unknown_002C = 9999; + this->effectLifetime = 9999; this->emitters.push_back(emitter); } @@ -4075,8 +4075,8 @@ void CTunaPartyEffect::Open() { void CTunaPartyEffect::OnProcess() { for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { CSpriteParticle* particle = AsSprite(*it); - const float phase = particle->unknown_0054 + 0.05f; - particle->unknown_0054 = phase; + const float phase = particle->animationParameter + 0.05f; + particle->animationParameter = phase; const float cosine = std::cos(phase) * 10.0f; const float sine = std::sin(phase) * 10.0f; particle->position.y = this->position[1] - 10.0f; @@ -4094,7 +4094,7 @@ void CTunaPartyEffect::OnProcess() { if (direction < 0) { direction += 8; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->frame = direction; } } @@ -4106,18 +4106,18 @@ void CRootTwistEffect::Open() { reinterpret_cast(CreateSpriteParticle(reinterpret_cast(this->position), 0x101)); if (emitter) { CSpriteParticle* particle = AsSprite(emitter); - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\su_sv_roottwist\\su_sv_roottwist.spr"); particle->SetAction("이팩트\\su_sv_roottwist\\su_sv_roottwist.act"); - particle->unknown_00EC |= 0x200; + particle->renderOptions |= 0x200; particle->frameDelay = 8.0f; particle->depthOffset = 0.00015f; this->emitters.push_back(emitter); } - this->unknown_002C = 9999; + this->effectLifetime = 9999; } // OFFSET: 0x0070D9B0 @@ -4129,16 +4129,16 @@ void CSvgSpiritEffect::Open() { } CSpriteParticle* sprite = AsSprite(this->emitter); - sprite->unknown_0004 = this->id; - sprite->unknown_000C = 0; - sprite->unknown_0010 = 0; - sprite->unknown_0008 = 1; + sprite->effectId = this->id; + sprite->columnIndex = 0; + sprite->rowIndex = 0; + sprite->groupIndex = 1; sprite->SetSprite("몬스터\\svg_spirit.spr"); sprite->SetAction("몬스터\\svg_spirit.act"); this->emitter->velocity.x = 0.0f; this->emitter->velocity.y = 0.0f; this->emitter->velocity.z = 0.0f; - this->unknown_002C = 16; + this->effectLifetime = 16; const float deltaX = this->sourcePosition[0] - this->position[0]; const float deltaZ = this->sourcePosition[2] - this->position[2]; float angle = (static_cast(std::atan2(static_cast(deltaX), static_cast(-deltaZ))) / 3.141592f) * 180.0f; @@ -4150,7 +4150,7 @@ void CSvgSpiritEffect::Open() { angle += 360.0f; } this->emitter->baseAngle = static_cast(angle); - this->emitter->speed = SquareRoot(deltaX * deltaX + deltaZ * deltaZ) / static_cast(this->unknown_002C); + this->emitter->speed = SquareRoot(deltaX * deltaX + deltaZ * deltaZ) / static_cast(this->effectLifetime); this->emitter->elapsed = 0; } @@ -4180,44 +4180,44 @@ void CCurseOfCubeEffect::SpawnShock() { // OFFSET: 0x0071F0C0 // FUNCTION: fn_07342 void CNewCloudKillEffect::Render() { - for (auto it = this->unknown_00CC.begin(); it != this->unknown_00CC.end(); ++it) { + for (auto it = this->circleEmitters.begin(); it != this->circleEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00A8 != 0 || !particle) { + if (particle->animationState != 0 || !particle) { continue; } particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); } - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end(); ++it) { + for (auto it = this->cloudEmitters.begin(); it != this->cloudEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00A8 != 0 || !particle) { + if (particle->animationState != 0 || !particle) { continue; } - const int frame = static_cast(particle->unknown_00A9[0]); + const int frame = static_cast(particle->frameParameters[0]); const ParticleQuad quad = {false, 0.5f, 0.75f, static_cast(frame + 1) * 0.25f, static_cast(frame + 2) * 0.25f, false, true}; particle->Render(quad); } - for (auto it = this->unknown_00DC.begin(); it != this->unknown_00DC.end(); ++it) { + for (auto it = this->smokeEmitters.begin(); it != this->smokeEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00E8 <= 0 || !particle) { + if (particle->elapsedFrames <= 0 || !particle) { continue; } - const int frame = static_cast(particle->unknown_00A9[0]); + const int frame = static_cast(particle->frameParameters[0]); const ParticleQuad quad = {false, 0.0f, 0.25f, static_cast(frame) * 0.25f, static_cast(frame + 1) * 0.25f, false, true}; particle->Render(quad); } - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { + for (auto it = this->lightningEmitters.begin(); it != this->lightningEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (static_cast(particle->unknown_00A8) <= 0 || !particle) { + if (static_cast(particle->animationState) <= 0 || !particle) { continue; } - const int frame = static_cast(particle->unknown_00A9[0]); + const int frame = static_cast(particle->frameParameters[0]); const ParticleQuad quad = {false, static_cast(frame / 2) * 0.5f, static_cast(frame / 2 + 1) * 0.5f, @@ -4228,9 +4228,9 @@ void CNewCloudKillEffect::Render() { particle->Render(quad); } - for (auto it = this->unknown_00EC.begin(); it != this->unknown_00EC.end(); ++it) { + for (auto it = this->mistEmitters.begin(); it != this->mistEmitters.end(); ++it) { CEZ2STRParticle* particle = AsParticle(*it); - if (particle->unknown_00E8 <= 0 || !particle) { + if (particle->elapsedFrames <= 0 || !particle) { continue; } @@ -4260,13 +4260,13 @@ void CDancingKnifeEffect::SpawnSecondStrike() { bottom->Load(std::string("dancing_knife\\dancing_knife_bottom\\dancing_knife_skill_bottom_02.str")); bottom->m_loop = true; bottom->m_actorId = this->actor; - this->unknown_00D8.push_back(reinterpret_cast(bottom)); + this->secondStrikeEmitters.push_back(reinterpret_cast(bottom)); CEZ2STRParticle* knife = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); knife->Load(std::string("dancing_knife\\dancing_knife\\dancing_knife_skill_02.str")); knife->m_loop = true; knife->m_actorId = this->actor; - this->unknown_00D8.push_back(reinterpret_cast(knife)); + this->secondStrikeEmitters.push_back(reinterpret_cast(knife)); } // OFFSET: 0x00710800 @@ -4300,7 +4300,7 @@ void CDancingKnifeEffect::OnProcess() { this->SpawnSecondStrike(); } - for (auto it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (auto it = this->secondStrikeEmitters.begin(); it != this->secondStrikeEmitters.end(); ++it) { EZ2STREmitter* emitter = *it; if (emitter) { emitter->position.x = this->position[0] + 0.0f; @@ -4387,11 +4387,11 @@ void CCurseOfCubeEffect::OnProcess() { const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; const float vx = position.x * view.values[0] + position.y * view.values[3] + position.z * view.values[6] + view.values[9] + - this->unknown_00DC; + this->viewOffsetX; const float vy = position.x * view.values[1] + position.y * view.values[4] + position.z * view.values[7] + view.values[10] + - this->unknown_00E0; + this->viewOffsetY; const float vz = position.y * view.values[5] + position.x * view.values[2] + position.z * view.values[8] + view.values[11] + - this->unknown_00E4; + this->viewOffsetZ; emitter->position.x = vy * inverse.values[3] + vx * inverse.values[0] + vz * inverse.values[6] + inverse.values[9]; emitter->position.y = vy * inverse.values[4] + vx * inverse.values[1] + vz * inverse.values[7] + inverse.values[10]; @@ -4405,10 +4405,10 @@ void CCurseOfCubeEffect::OnProcess() { } } - if (this->unknown_00D8 == 1 && this->emitters.empty()) { + if (this->spawnPhase == 1 && this->emitters.empty()) { this->SpawnLoop(); if (!this->emitters.empty()) { - this->unknown_00D8 = 2; + this->spawnPhase = 2; } } } @@ -4417,25 +4417,25 @@ void CCurseOfCubeEffect::OnProcess() { // FUNCTION: fn_07136 void CSprArrowEffect::Open() { CSpriteParticle* particle = static_cast(CreateSpriteParticle(reinterpret_cast(this->position), 0x101)); - this->unknown_00CC = reinterpret_cast(particle); + this->spriteParticle = reinterpret_cast(particle); if (!particle) { return; } - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->velocity.x = 0.0f; particle->velocity.y = -10.0f; particle->velocity.z = 0.0f; particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; - this->unknown_00D0 = static_cast(timeGetTime()); - this->unknown_00D4 = this->position[0]; - this->unknown_00D8 = this->position[1]; - this->unknown_00DC = this->position[2]; + this->startTick = static_cast(timeGetTime()); + this->startX = this->position[0]; + this->startY = this->position[1]; + this->startZ = this->position[2]; } struct CylinderSlice { @@ -4485,17 +4485,17 @@ void CCylinderEffect::OnProcess() { } CEZ2STRParticle* particle = AsParticle(emitter); - float& angle = reinterpret_cast(particle->unknown_00C4); + float& angle = reinterpret_cast(particle->angleBits); const double baseAngle = angle; CylinderSlice slice; slice.radius = particle->scale; - slice.pitch = static_cast(particle->unknown_004C) / 180.0f * 3.141592f; - slice.height = particle->unknown_0054; + slice.pitch = static_cast(particle->phaseParameter) / 180.0f * 3.141592f; + slice.height = particle->animationParameter; vector3d front[2]; vector3d back[2]; - const double offset = static_cast(particle->unknown_000C) * 0.29919925332069397 + baseAngle; + const double offset = static_cast(particle->columnIndex) * 0.29919925332069397 + baseAngle; slice.ComputePoints(front, offset); slice.ComputePoints(back, offset + 0.29919925332069397); @@ -4512,7 +4512,7 @@ void CCylinderEffect::OnProcess() { particle->vertices[3].y = back[0].y; particle->vertices[3].z = back[0].z; - angle = static_cast(static_cast(particle->unknown_00C0) + baseAngle); + angle = static_cast(static_cast(particle->speedParameter) + baseAngle); } } @@ -4521,22 +4521,22 @@ void CCylinderEffect::OnProcess() { void CSpriteMableEffect::OnProcess() { for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { CSpriteParticle* particle = AsSprite(*it); - particle->unknown_0054 += 0.02f; - reinterpret_cast(particle->unknown_0058) += 0.05f; + particle->animationParameter += 0.02f; + reinterpret_cast(particle->animationParameters) += 0.05f; - particle->position.x = static_cast(std::sin(static_cast(particle->unknown_0054))) * 6.0f + this->position[0]; + particle->position.x = static_cast(std::sin(static_cast(particle->animationParameter))) * 6.0f + this->position[0]; particle->position.y = - static_cast(std::sin(static_cast(reinterpret_cast(particle->unknown_0058)))) * 3.0f - 6.0f + this->position[1]; - particle->position.z = static_cast(std::cos(static_cast(particle->unknown_0054))) * 6.0f + this->position[2]; + static_cast(std::sin(static_cast(reinterpret_cast(particle->animationParameters)))) * 3.0f - 6.0f + this->position[1]; + particle->position.z = static_cast(std::cos(static_cast(particle->animationParameter))) * 6.0f + this->position[2]; - int angle = static_cast(static_cast(static_cast(particle->unknown_0054 / 3.141592f * 180.0f) % 360) - + int angle = static_cast(static_cast(static_cast(particle->animationParameter / 3.141592f * 180.0f) % 360) - static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw); if (angle < 0) { angle += 360; } const int frame = (angle - 75) / 30; - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->frame = frame < 0 ? frame + 12 : frame; } } @@ -4555,9 +4555,9 @@ void CGravityControlEffect::Close() { } actor->render.position.y = static_cast(g_modeMgr.GetGameMode())->scene->terrain->Height(actor->render.position.x, actor->render.position.z); - actor->unknown_03F0.x = 0.0f; - actor->unknown_03F0.y = 0.0f; - actor->unknown_03F0.z = 0.0f; + actor->positionDelta.x = 0.0f; + actor->positionDelta.y = 0.0f; + actor->positionDelta.z = 0.0f; if (this->id == 0x4B1) { CRenderObject* player = reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->scene->player); @@ -4575,19 +4575,19 @@ void CGravityControlEffect::OnProcess() { return; } - float depth = this->unknown_00D0 - g_depthAverageHalf; - if (this->unknown_00D4 > depth) { - depth = this->unknown_00D4; + float depth = this->heightOffset - g_depthAverageHalf; + if (this->minimumHeightOffset > depth) { + depth = this->minimumHeightOffset; } - this->unknown_00D0 = depth; + this->heightOffset = depth; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); const float height = mode->scene->terrain->Height(actor->render.position.x, actor->render.position.z); - const int offset = static_cast(this->unknown_00D0); - actor->unknown_03F0.x = 0.0f; - actor->unknown_03F0.z = 0.0f; - actor->unknown_03F0.y = static_cast(offset); - actor->render.position.y = height + this->unknown_00D0; + const int offset = static_cast(this->heightOffset); + actor->positionDelta.x = 0.0f; + actor->positionDelta.z = 0.0f; + actor->positionDelta.y = static_cast(offset); + actor->render.position.y = height + this->heightOffset; if (this->target) { EZ2STREmitter* emitter = reinterpret_cast(this->target); @@ -4644,7 +4644,7 @@ void CGaleStorm::SpawnStorm() { // FUNCTION: fn_07287 void CGaleStorm::OnProcess() { const int frame = this->frame; - if (frame <= this->unknown_002C) { + if (frame <= this->effectLifetime) { if (frame % (100 / this->count) == 0) { this->SpawnStorm(); } @@ -4686,30 +4686,30 @@ void CGravityControlEffect::Open() { // OFFSET: 0x007188C0 // FUNCTION: fn_07298 void CHawkVumerangEffect::Open() { - this->unknown_00FC = timeGetTime(); - this->unknown_0100.x = this->position[0]; - this->unknown_0100.y = this->position[1]; - this->unknown_0100.z = this->position[2]; - this->unknown_010C.x = this->sourcePosition[0]; - this->unknown_010C.y = this->sourcePosition[1]; - this->unknown_010C.z = this->sourcePosition[2]; - this->unknown_0118.x = (this->unknown_010C.x + this->unknown_0100.x) * 0.5f; - this->unknown_0118.y = (this->unknown_010C.y + this->unknown_0100.y) * 0.5f; - this->unknown_0118.z = (this->unknown_010C.z + this->unknown_0100.z) * 0.5f; + this->startTime = timeGetTime(); + this->targetPosition.x = this->position[0]; + this->targetPosition.y = this->position[1]; + this->targetPosition.z = this->position[2]; + this->originPosition.x = this->sourcePosition[0]; + this->originPosition.y = this->sourcePosition[1]; + this->originPosition.z = this->sourcePosition[2]; + this->orbitCenter.x = (this->originPosition.x + this->targetPosition.x) * 0.5f; + this->orbitCenter.y = (this->originPosition.y + this->targetPosition.y) * 0.5f; + this->orbitCenter.z = (this->originPosition.z + this->targetPosition.z) * 0.5f; - const float dx = this->unknown_010C.x - this->unknown_0100.x; - const float dy = this->unknown_010C.y - this->unknown_0100.y; - const float dz = this->unknown_010C.z - this->unknown_0100.z; - this->unknown_0128 = SquareRoot(dy * dy + dx * dx + dz * dz) * 0.5f; - this->unknown_0130 = std::acos(static_cast(this->unknown_0100.x - this->unknown_0118.x) / this->unknown_0128); - if (this->unknown_0118.z > this->unknown_0100.z) { - this->unknown_0130 = 6.283184f - this->unknown_0130; + const float dx = this->originPosition.x - this->targetPosition.x; + const float dy = this->originPosition.y - this->targetPosition.y; + const float dz = this->originPosition.z - this->targetPosition.z; + this->orbitRadius = SquareRoot(dy * dy + dx * dx + dz * dz) * 0.5f; + this->startAngle = std::acos(static_cast(this->targetPosition.x - this->orbitCenter.x) / this->orbitRadius); + if (this->orbitCenter.z > this->targetPosition.z) { + this->startAngle = 6.283184f - this->startAngle; } for (long long i = 0; i < this->count; ++i) { CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); particle->Open("hawkvumerang\\hawkvumerang\\hawkvumerang.str"); - particle->m_angle = 360.0f - static_cast(this->unknown_0130) / 3.141592f * 180.0f; + particle->m_angle = 360.0f - static_cast(this->startAngle) / 3.141592f * 180.0f; particle->m_loop = true; this->emitters.push_back(reinterpret_cast(particle)); } @@ -4728,8 +4728,8 @@ void CRichsCoinEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - const float angle = particle->unknown_0054 + 0.015f; - particle->unknown_0054 = angle; + const float angle = particle->animationParameter + 0.015f; + particle->animationParameter = angle; particle->position.z = static_cast(std::cos(static_cast(angle))) * 7.0f + this->position[2]; particle->position.x = static_cast(std::sin(static_cast(angle))) * 7.0f + this->position[0]; particle->position.y = this->position[1] - 10.0f; @@ -4746,7 +4746,7 @@ void CRichsCoinEffect::OnProcess() { std::sprintf(name, "effect\\rl_richs_coin_b\\rcoin%d.bmp", frame % 5 + 1); particle->SetTexture(name); } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (auto it = this->coins.begin(); it != this->coins.end(); ++it) { @@ -4755,13 +4755,13 @@ void CRichsCoinEffect::OnProcess() { coin->position.y = this->position[1]; coin->position.z = this->position[2]; if (coin) { - const float angle = coin->unknown_0054 + 0.015f; - coin->unknown_0054 = angle; + const float angle = coin->animationParameter + 0.015f; + coin->animationParameter = angle; coin->position.z = static_cast(std::cos(static_cast(angle))) * 7.0f + this->position[2]; coin->position.y = this->position[1] - 10.0f; coin->position.x = static_cast(std::sin(static_cast(angle))) * 7.0f + this->position[0]; } - ++coin->unknown_00E8; + ++coin->elapsedFrames; } } diff --git a/Source/Contents/Effects/MonsterSkillEffects.h b/Source/Contents/Effects/MonsterSkillEffects.h index 773f1ddf7..4dae14e35 100644 --- a/Source/Contents/Effects/MonsterSkillEffects.h +++ b/Source/Contents/Effects/MonsterSkillEffects.h @@ -99,10 +99,10 @@ public: void Restart(); /* 00CC */ std::vector emitters; - /* 00D8 */ int unknown_00D8; - /* 00DC */ float unknown_00DC; - /* 00E0 */ float unknown_00E0; - /* 00E4 */ float unknown_00E4; + /* 00D8 */ int spawnPhase; + /* 00DC */ float viewOffsetX; + /* 00E0 */ float viewOffsetY; + /* 00E4 */ float viewOffsetZ; }; class CWarningPlaneEffect : public CEffect { @@ -146,7 +146,7 @@ public: void SpawnSecondStrike(); /* 00CC */ std::vector emitters; - /* 00D8 */ std::vector unknown_00D8; + /* 00D8 */ std::vector secondStrikeEmitters; /* 00E4 */ unsigned char secondStrike; /* 00E5 */ unsigned char unknown_00E5[3]; }; @@ -186,9 +186,9 @@ public: void SetPosition(vector3d position); /* 00CC */ EZ2STREmitter* emitter; - /* 00D0 */ float unknown_00D0; - /* 00D4 */ float unknown_00D4; - /* 00D8 */ float unknown_00D8; + /* 00D0 */ float startX; + /* 00D4 */ float startY; + /* 00D8 */ float startZ; }; class CFloralFlareRoad : public CEffect { @@ -200,7 +200,7 @@ public: bool IsAlive() override; void Close() override; - /* 00CC */ EZ2STREmitter* unknown_00CC; + /* 00CC */ EZ2STREmitter* emitter; /* 00D0 */ std::vector emitters; }; @@ -216,14 +216,14 @@ public: CParticle* SpawnFootprint(); /* 00CC */ std::list emitters; - /* 00D4 */ std::string unknown_00D4; - /* 00EC */ std::string unknown_00EC; + /* 00D4 */ std::string leftTexture; + /* 00EC */ std::string rightTexture; /* 0104 */ int unknown_0104; /* 0108 */ double stepDistance; - /* 0110 */ unsigned char unknown_0110; + /* 0110 */ unsigned char leftFoot; /* 0111 */ unsigned char unknown_0111[3]; /* 0114 */ vector3d lastPosition; - /* 0120 */ float unknown_0120; + /* 0120 */ float lastGroundHeight; /* 0124 */ int unknown_0124; }; @@ -239,19 +239,19 @@ public: void SpawnFootprint(); /* 00CC */ std::list emitters; - /* 00D4 */ std::list unknown_00D4; - /* 00DC */ std::string unknown_00DC; - /* 00F4 */ std::string unknown_00F4; - /* 010C */ std::string unknown_010C; - /* 0124 */ std::string unknown_0124; - /* 0140 */ double unknown_0140; - /* 0148 */ double unknown_0148; - /* 0150 */ double unknown_0150; - /* 0158 */ double unknown_0158; - /* 0160 */ double unknown_0160; - /* 0168 */ unsigned char unknown_0168; - /* 0169 */ unsigned char unknown_0169; - /* 016C */ vector3d unknown_016C; + /* 00D4 */ std::list topEmitters; + /* 00DC */ std::string leftBottomFile; + /* 00F4 */ std::string rightBottomFile; + /* 010C */ std::string leftTopFile; + /* 0124 */ std::string rightTopFile; + /* 0140 */ double bottomScale; + /* 0148 */ double topScale; + /* 0150 */ double topHeight; + /* 0158 */ double stepDistance; + /* 0160 */ double footGap; + /* 0168 */ unsigned char adjustAngle; + /* 0169 */ unsigned char leftFoot; + /* 016C */ vector3d lastPosition; }; class CFromTheAbyssEffect : public CEffect { @@ -278,8 +278,8 @@ public: /* 00CC */ unsigned char unknown_00CC[4]; /* 00D0 */ long long maxLevel; /* 00D8 */ long long level; - /* 00E0 */ std::map unknown_00E0; - /* 00E8 */ std::map unknown_00E8; + /* 00E0 */ std::map waves; + /* 00E8 */ std::map particles; }; class CParticle; @@ -365,7 +365,7 @@ public: /* 00CC */ std::vector particles; /* 00D8 */ std::vector coins; - /* 00E4 */ int unknown_00E4; + /* 00E4 */ int coinCount; }; class CSavageImpactEffect : public CEffect { @@ -435,7 +435,7 @@ public: void SpawnGalaxyStar(); /* 00CC */ std::list emitters; - /* 00D4 */ int unknown_00D4; + /* 00D4 */ int elapsedFrames; }; class CGaleStorm : public CEffect { @@ -452,8 +452,8 @@ public: /* 00CC */ std::vector emitters; union { struct { - /* 00D8 */ int unknown_00D8; - /* 00DC */ int unknown_00DC; + /* 00D8 */ int countLow; + /* 00DC */ int countHigh; }; /* 00D8 */ long long count; }; @@ -471,7 +471,7 @@ public: void SpawnSpark(); /* 00CC */ std::vector emitters; - /* 00D8 */ std::vector unknown_00D8; + /* 00D8 */ std::vector hitEmitters; /* 00E4 */ std::vector textures; }; @@ -489,13 +489,13 @@ public: void ResetLightning(CParticle* particle); void ResetSmokeParticle(CParticle* particle); - /* 00CC */ std::list unknown_00CC; - /* 00D4 */ std::list unknown_00D4; - /* 00DC */ std::list unknown_00DC; - /* 00E4 */ std::list unknown_00E4; - /* 00EC */ std::list unknown_00EC; - /* 00F4 */ int unknown_00F4; - /* 00F8 */ int unknown_00F8; + /* 00CC */ std::list circleEmitters; + /* 00D4 */ std::list cloudEmitters; + /* 00DC */ std::list smokeEmitters; + /* 00E4 */ std::list lightningEmitters; + /* 00EC */ std::list mistEmitters; + /* 00F4 */ int circleResetTime; + /* 00F8 */ int cloudResetTime; }; // VTABLE: vt_01909 @@ -530,26 +530,26 @@ public: void OnProcess() override; /* 00CC */ std::list emitters; - /* 00D4 */ std::list unknown_00D4; + /* 00D4 */ std::list finishedEmitters; /* 00DC */ int unknown_00DC; union { struct { - /* 00E0 */ int unknown_00E0; - /* 00E4 */ int unknown_00E4; + /* 00E0 */ int countLow; + /* 00E4 */ int countHigh; }; /* 00E0 */ long long count; }; - /* 00E8 */ double unknown_00E8; - /* 00F0 */ float unknown_00F0; - /* 00F4 */ float unknown_00F4; - /* 00F8 */ float unknown_00F8; - /* 00FC */ unsigned int unknown_00FC; - /* 0100 */ vector3d unknown_0100; - /* 010C */ vector3d unknown_010C; - /* 0118 */ vector3d unknown_0118; + /* 00E8 */ double angularRange; + /* 00F0 */ float orbitOffsetX; + /* 00F4 */ float orbitOffsetY; + /* 00F8 */ float orbitOffsetZ; + /* 00FC */ unsigned int startTime; + /* 0100 */ vector3d targetPosition; + /* 010C */ vector3d originPosition; + /* 0118 */ vector3d orbitCenter; /* 0124 */ int unknown_0124; - /* 0128 */ double unknown_0128; - /* 0130 */ double unknown_0130; + /* 0128 */ double orbitRadius; + /* 0130 */ double startAngle; }; #if defined(_WIN32) && !defined(_WIN64) @@ -563,17 +563,17 @@ static_assert(sizeof(CEternalSlashAttackEffect) == 0xD8); static_assert(sizeof(CEternalSlashCountEffect) == 0xD0); static_assert(sizeof(CFallenAngelEffect) == 0xDC); static_assert(sizeof(CFromTheAbyssEffect) == 0xF0); -static_assert(offsetof(CFromTheAbyssEffect, unknown_00E0) == 0xE0); -static_assert(offsetof(CFromTheAbyssEffect, unknown_00E8) == 0xE8); +static_assert(offsetof(CFromTheAbyssEffect, waves) == 0xE0); +static_assert(offsetof(CFromTheAbyssEffect, particles) == 0xE8); static_assert(sizeof(CFloralFlareRoad) == 0xDC); static_assert(offsetof(CFootprintEffect, stepDistance) == 0x108); static_assert(offsetof(CFootprintEffect, lastPosition) == 0x114); static_assert(sizeof(CFootprintEffect) == 0x128); static_assert(sizeof(CFootprintStrEffect) == 0x178); -static_assert(offsetof(CFootprintStrEffect, unknown_00DC) == 0xDC); -static_assert(offsetof(CFootprintStrEffect, unknown_0124) == 0x124); -static_assert(offsetof(CFootprintStrEffect, unknown_0140) == 0x140); -static_assert(offsetof(CFootprintStrEffect, unknown_016C) == 0x16C); +static_assert(offsetof(CFootprintStrEffect, leftBottomFile) == 0xDC); +static_assert(offsetof(CFootprintStrEffect, rightTopFile) == 0x124); +static_assert(offsetof(CFootprintStrEffect, bottomScale) == 0x140); +static_assert(offsetof(CFootprintStrEffect, lastPosition) == 0x16C); static_assert(offsetof(CFullScreenEffect, loaded) == 0xD8); static_assert(sizeof(CFullScreenEffect) == 0xDC); static_assert(sizeof(CPetitioEffect) == 0xD8); @@ -586,17 +586,17 @@ static_assert(sizeof(CServantWeaponEffect) == 0x144); static_assert(sizeof(CServantWeaponNewEffect) == 0xDC); static_assert(sizeof(CSevereRainStorm) == 0xD8); static_assert(sizeof(CGaleStorm) == 0xE0); -static_assert(offsetof(CGaleStorm, unknown_00D8) == 0xD8); +static_assert(offsetof(CGaleStorm, countLow) == 0xD8); static_assert(sizeof(CJupitelThunderHit) == 0xF0); static_assert(offsetof(CJupitelThunderHit, textures) == 0xE4); static_assert(sizeof(CNewCloudKillEffect) == 0xFC); -static_assert(offsetof(CNewCloudKillEffect, unknown_00F4) == 0xF4); +static_assert(offsetof(CNewCloudKillEffect, circleResetTime) == 0xF4); static_assert(offsetof(CDropItemEffect, emitters) == 0xD4); static_assert(offsetof(CDropItemEffect, position) == 0x110); static_assert(sizeof(CDropItemEffect) == 0x11C); -static_assert(offsetof(CHawkVumerangEffect, unknown_00D4) == 0xD4); -static_assert(offsetof(CHawkVumerangEffect, unknown_0100) == 0x100); -static_assert(offsetof(CHawkVumerangEffect, unknown_0130) == 0x130); +static_assert(offsetof(CHawkVumerangEffect, finishedEmitters) == 0xD4); +static_assert(offsetof(CHawkVumerangEffect, targetPosition) == 0x100); +static_assert(offsetof(CHawkVumerangEffect, startAngle) == 0x130); static_assert(sizeof(CHawkVumerangEffect) == 0x138); #endif diff --git a/Source/Contents/Effects/MsgEffect.cpp b/Source/Contents/Effects/MsgEffect.cpp index fdfbfd01f..6dbe618bf 100644 --- a/Source/Contents/Effects/MsgEffect.cpp +++ b/Source/Contents/Effects/MsgEffect.cpp @@ -48,27 +48,27 @@ CMsgEffect::CMsgEffect() { this->m_drift.x = 0.0f; this->m_drift.y = 0.0f; this->m_drift.z = 0.0f; - this->unknown_016C.x = 0.0f; - this->unknown_016C.y = 0.0f; - this->unknown_016C.z = 0.0f; + this->origin.x = 0.0f; + this->origin.y = 0.0f; + this->origin.z = 0.0f; this->m_velocity.x = 0.0f; this->m_owner = nullptr; this->render.animation = 0; this->render.curMotion = 0; - this->render.unknown_00A2 = 1; + this->render.flatDepth = 1; this->m_value = 0; this->m_type = 0; this->m_finished = 0; - this->unknown_018C = 0.0f; + this->travelDistance = 0.0f; this->m_baseY = 1.0f; this->m_baseX = 1.0f; this->m_scale = 1.0f; - this->unknown_01A0 = 0; - this->unknown_01A4 = 0; - this->render.unknown_0080 = 0xFFFFFFFF; + this->processTick = 0; + this->previousAnimation = 0; + this->render.depthLayer = 0xFFFFFFFF; this->m_digit = 0; - this->unknown_01B4 = 0; - this->unknown_01B0 = 1; + this->activeMotion = 0; + this->motionInitialized = 1; ClearVector(this->m_drift); ClearVector(this->m_velocity); this->m_visible = true; @@ -190,12 +190,12 @@ bool CMsgEffect::OnProcess() { if (this->m_type != 0x12 || !this->m_visible) { return false; } - if (this->unknown_01A0 > 35 && this->unknown_01B4 != 0) { - this->unknown_01B4 = 0; + if (this->processTick > 35 && this->activeMotion != 0) { + this->activeMotion = 0; this->m_finished = 0; return true; } - if (this->unknown_01B4 == 0) { + if (this->activeMotion == 0) { return false; } } @@ -240,11 +240,11 @@ bool CMsgEffect::OnProcess() { if (frames == 0) { return true; } - const int tick = this->unknown_01A0; + const int tick = this->processTick; this->render.curMotion = static_cast(static_cast(tick) / this->render.speed) % frames; - if (this->unknown_01B4 == 1) { + if (this->activeMotion == 1) { if (this->render.curMotion >= frames - 1) { - this->unknown_01B4 = 0; + this->activeMotion = 0; } if (tick < 8) { this->render.position.x = this->m_velocity.x + this->render.position.x; @@ -252,7 +252,7 @@ bool CMsgEffect::OnProcess() { this->render.position.z = this->m_velocity.z + this->render.position.z; } } - this->unknown_01A0 = tick + 1; + this->processTick = tick + 1; return true; } @@ -389,7 +389,7 @@ bool CMsgEffect::OnProcess() { } const float motion = elapsed / this->render.speed; this->render.curMotion = static_cast(motion) % frames; - if (this->m_type == 1 && this->render.unknown_0070 == 10000) { + if (this->m_type == 1 && this->render.state == 10000) { this->render.curMotion = 15; const ActionFrame& frame = action->Frame(this->render.previousAnimation, 15); const_cast(frame.cells[0]).mirrored = 0; @@ -448,7 +448,7 @@ bool CMsgEffect::OnProcess() { return true; case MET_BIRD: - if (this->unknown_01B4 != 0 && this->m_owner != nullptr) { + if (this->activeMotion != 0 && this->m_owner != nullptr) { CRenderObject* owner = static_cast(this->m_owner); this->Face(owner->render.position.x, owner->render.position.z); this->render.angle -= 180.0f; @@ -457,12 +457,12 @@ bool CMsgEffect::OnProcess() { } this->render.previousAnimation = this->Get8Dir2(this->render.angle, 1) + 8; this->render.position.x = this->m_velocity.x + this->render.position.x; - const int tick = this->unknown_01A0; + const int tick = this->processTick; if (tick > 10 && tick < 25) { - this->unknown_019C = this->m_velocity.x; + this->initialVelocityX = this->m_velocity.x; this->render.position.z = this->m_velocity.z + this->render.position.z; } else { - this->unknown_019C = this->m_velocity.x; + this->initialVelocityX = this->m_velocity.x; this->render.position.y = this->m_velocity.y + this->render.position.y; this->render.position.z = this->m_velocity.z + this->render.position.z; if (tick >= 25) { @@ -471,8 +471,8 @@ bool CMsgEffect::OnProcess() { } } this->GetActRes(); - ++this->unknown_01A0; - this->unknown_01A4 = this->render.previousAnimation; + ++this->processTick; + this->previousAnimation = this->render.previousAnimation; this->render.curMotion = 0; return true; } @@ -482,9 +482,9 @@ bool CMsgEffect::OnProcess() { { CActRes* action = this->GetActRes(); const int frames = static_cast(action->FrameCount(this->render.previousAnimation)); - int tick = this->unknown_01A0; + int tick = this->processTick; if (tick % static_cast(this->render.speed) == 0) { - if (this->unknown_01B0 != 0) { + if (this->motionInitialized != 0) { ++this->render.curMotion; } tick = 0; @@ -492,8 +492,8 @@ bool CMsgEffect::OnProcess() { if (this->render.curMotion >= frames) { this->render.curMotion = 0; } - this->unknown_01A4 = this->render.previousAnimation; - this->unknown_01A0 = tick + 1; + this->previousAnimation = this->render.previousAnimation; + this->processTick = tick + 1; } return true; @@ -1060,9 +1060,9 @@ bool CSkill::OnProcess() { CRagEffect* effect = this->LaunchEffect(0x394, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); g_soundMgr->PlayWave("effect\\EF_FireWall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); if (effect) { - effect->state.unknown_11C88[0] = 20; - effect->state.unknown_11C88[1] = 20; - effect->state.unknown_11C88[2] = 180; + effect->state.colorChannels[0] = 20; + effect->state.colorChannels[1] = 20; + effect->state.colorChannels[2] = 180; } } break; @@ -1073,9 +1073,9 @@ bool CSkill::OnProcess() { CRagEffect* effect = this->LaunchEffect(0x394, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); g_soundMgr->PlayWave("effect\\EF_FireWall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); if (effect) { - effect->state.unknown_11C88[0] = 20; - effect->state.unknown_11C88[1] = 180; - effect->state.unknown_11C88[2] = 20; + effect->state.colorChannels[0] = 20; + effect->state.colorChannels[1] = 180; + effect->state.colorChannels[2] = 20; } } break; @@ -1086,9 +1086,9 @@ bool CSkill::OnProcess() { CRagEffect* effect = this->LaunchEffect(0x394, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); g_soundMgr->PlayWave("effect\\EF_FireWall.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); if (effect) { - effect->state.unknown_11C88[0] = 40; - effect->state.unknown_11C88[1] = 40; - effect->state.unknown_11C88[2] = 40; + effect->state.colorChannels[0] = 40; + effect->state.colorChannels[1] = 40; + effect->state.colorChannels[2] = 40; } } break; @@ -1221,7 +1221,7 @@ void CMsgEffect::FollowOwner() { this->render.position.z = z; this->m_velocity.z = z; } - this->render.unknown_0124 = 0x200; + this->render.blendFlags = 0x200; break; case MET_PKEFFECT: @@ -1265,7 +1265,7 @@ void CMsgEffect::FollowOwner() { this->render.position.x = owner->render.position.x; this->render.position.y = owner->render.position.y; this->render.position.z = owner->render.position.z; - if (this->render.unknown_0070 == 10000) { + if (this->render.state == 10000) { this->render.position.y -= 10.0f; } else { this->render.position.y -= 20.0f; @@ -1280,7 +1280,7 @@ void CMsgEffect::FollowOwner() { this->render.position.x = owner->render.position.x; this->render.position.y = owner->render.position.y; this->render.position.z = owner->render.position.z; - this->render.position.y = this->render.position.y - static_cast(static_cast(this->m_owner)->unknown_03C8) - 10.0f; + this->render.position.y = this->render.position.y - static_cast(static_cast(this->m_owner)->transformPriority) - 10.0f; } break; @@ -1306,7 +1306,7 @@ void CMsgEffect::FollowOwner() { this->render.position.x = owner->render.position.x; this->render.position.y = owner->render.position.y; this->render.position.z = owner->render.position.z; - if (this->render.unknown_0070 == 10000) { + if (this->render.state == 10000) { this->render.position.y -= 10.0f; } else { this->render.position.y -= 20.0f; @@ -1329,10 +1329,10 @@ void CMsgEffect::FollowOwner() { case 3: case 4: case 5: - this->render.unknown_0080 = 3; + this->render.depthLayer = 3; break; default: - this->render.unknown_0080 = static_cast(-3); + this->render.depthLayer = static_cast(-3); break; } } @@ -1345,7 +1345,7 @@ void CMsgEffect::FollowOwner() { const float dist = static_cast(this->m_owner)->CalcDist(this->render.position.x, this->render.position.z); const int dir = this->Get8Dir2(this->render.angle, 1); CRenderObject* owner = static_cast(this->m_owner); - if (this->unknown_01B4 == 1) { + if (this->activeMotion == 1) { this->render.previousAnimation = this->render.animation + dir + 12 + ((dir + 4 < 8) ? 8 : 0); } else if (dist > 15.0f) { const vector3d oldPosition = this->render.position; @@ -1363,15 +1363,15 @@ void CMsgEffect::FollowOwner() { } const float movedX = this->render.position.x - oldPosition.x; const float movedZ = this->render.position.z - oldPosition.z; - this->unknown_018C += SquareRoot(movedZ * movedZ + movedX * movedX); - if (static_cast(this->m_owner)->render.unknown_0070 == 0 && dist < 16.0f) { + this->travelDistance += SquareRoot(movedZ * movedZ + movedX * movedX); + if (static_cast(this->m_owner)->render.state == 0 && dist < 16.0f) { this->render.previousAnimation = this->render.animation + dir; } - } else if (owner->render.unknown_0070 == 4) { + } else if (owner->render.state == 4) { this->render.previousAnimation = this->render.animation + 0x18 + dir; - } else if (owner->render.unknown_0070 == 3) { + } else if (owner->render.state == 3) { this->render.previousAnimation = this->render.animation + 0x20 + dir; - } else if (owner->render.unknown_0070 == 0 || dist <= 14.0f) { + } else if (owner->render.state == 0 || dist <= 14.0f) { this->render.previousAnimation = this->render.animation + dir; } this->Face(owner->render.position.x, owner->render.position.z); @@ -1396,10 +1396,10 @@ void CMsgEffect::FollowOwner() { this->render.position.z = direction.y * 5.0f + owner->render.position.z; const float movedX = this->render.position.x - oldPosition.x; const float movedZ = this->render.position.z - oldPosition.z; - this->unknown_018C += SquareRoot(movedZ * movedZ + movedX * movedX); + this->travelDistance += SquareRoot(movedZ * movedZ + movedX * movedX); CActRes* action = this->GetActRes(); const unsigned frames = action->FrameCount(this->render.previousAnimation); - this->render.curMotion = static_cast(this->unknown_018C * 0.23f * 4.0f / this->render.speed) % static_cast(frames); + this->render.curMotion = static_cast(this->travelDistance * 0.23f * 4.0f / this->render.speed) % static_cast(frames); } this->Face(owner->render.position.x, owner->render.position.z); this->render.position.y = scene->terrain->Height(this->render.position.x, this->render.position.z); @@ -1407,15 +1407,15 @@ void CMsgEffect::FollowOwner() { break; case MET_BIRD: - if (this->m_owner != nullptr && this->unknown_01B4 == 0) { + if (this->m_owner != nullptr && this->activeMotion == 0) { CWorld* scene = static_cast(g_modeMgr.GetGameMode())->scene; const float dist = static_cast(this->m_owner)->CalcDist(this->render.position.x, this->render.position.z); const int dir = this->Get8Dir2(this->render.angle, 1); CRenderObject* owner = static_cast(this->m_owner); this->render.previousAnimation = this->render.animation + dir; - if (this->unknown_01B0 == 0) { + if (this->motionInitialized == 0) { if (dist <= 25.0f) { - this->unknown_01B0 = 1; + this->motionInitialized = 1; } const vector3d oldPosition = this->render.position; vector2d direction; @@ -1427,8 +1427,8 @@ void CMsgEffect::FollowOwner() { this->render.position.z += (owner->render.position.z - this->render.position.z) / 25.0f; const float movedX = this->render.position.x - oldPosition.x; const float movedZ = this->render.position.z - oldPosition.z; - this->unknown_018C += SquareRoot(movedZ * movedZ + movedX * movedX); - } else if (dist > 12.0f && this->unknown_01B4 == 0) { + this->travelDistance += SquareRoot(movedZ * movedZ + movedX * movedX); + } else if (dist > 12.0f && this->activeMotion == 0) { const vector3d oldPosition = this->render.position; vector2d direction; direction.x = this->render.position.x - owner->render.position.x; @@ -1438,7 +1438,7 @@ void CMsgEffect::FollowOwner() { this->render.position.z += (owner->render.position.z - this->render.position.z) / dist; const float movedX = this->render.position.x - oldPosition.x; const float movedZ = this->render.position.z - oldPosition.z; - this->unknown_018C += SquareRoot(movedZ * movedZ + movedX * movedX); + this->travelDistance += SquareRoot(movedZ * movedZ + movedX * movedX); } else if (dist > 3.0f) { const vector3d oldPosition = this->render.position; vector2d direction; @@ -1449,7 +1449,7 @@ void CMsgEffect::FollowOwner() { this->render.position.z += (owner->render.position.z - this->render.position.z) / 20.0f; const float movedX = this->render.position.x - oldPosition.x; const float movedZ = this->render.position.z - oldPosition.z; - this->unknown_018C += SquareRoot(movedZ * movedZ + movedX * movedX); + this->travelDistance += SquareRoot(movedZ * movedZ + movedX * movedX); } this->Face(owner->render.position.x, owner->render.position.z); this->render.position.y = scene->terrain->Height(this->render.position.x, this->render.position.z) - 25.0f; @@ -1520,8 +1520,8 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (this->m_type == 18) { this->m_velocity.x = (position->x - this->render.position.x) / 10.0f; this->m_velocity.y = (position->y - this->render.position.y) / 10.0f; - this->unknown_01B4 = 1; - this->unknown_01B0 = 0; + this->activeMotion = 1; + this->motionInitialized = 0; this->m_velocity.z = (position->z - this->render.position.z) / 10.0f; return; } @@ -1529,8 +1529,8 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, if (this->m_type == 27 || this->m_type == 31) { this->m_velocity.x = (position->x - this->render.position.x) / 10.0f; this->m_velocity.y = (position->y - this->render.position.y) / 10.0f; - this->unknown_01B4 = 1; - this->unknown_01A0 = 0; + this->activeMotion = 1; + this->processTick = 0; this->m_velocity.z = (position->z - this->render.position.z) / 10.0f; return; } @@ -1592,10 +1592,10 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, switch (d) { case MET_CART: case 31: - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 0; - this->render.unknown_00A4Bytes[0] = 1; - this->render.unknown_0054 = 1.0f; + this->render.flatDepth = 0; + this->render.depthLayer = 0; + this->render.visibilityOptions[0] = 1; + this->render.shadowScale = 1.0f; break; case MET_PKEFFECT: @@ -1604,26 +1604,26 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, case MET_CURSE_EFFECT: this->SetColor(0x7F, -1, -1, -1); - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 5; + this->render.flatDepth = 0; + this->render.depthLayer = 5; break; case MET_ICEEFFECT: case MET_ICEBREAKEFFECT: - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 5; + this->render.flatDepth = 0; + this->render.depthLayer = 5; break; case MET_BIRD: - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 0; + this->render.flatDepth = 0; + this->render.depthLayer = 0; break; case 27: - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 0; - this->render.unknown_00A4Bytes[0] = 1; - this->render.unknown_0054 = 2.0f; + this->render.flatDepth = 0; + this->render.depthLayer = 0; + this->render.visibilityOptions[0] = 1; + this->render.shadowScale = 2.0f; break; } return; @@ -1682,18 +1682,18 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.curMotion = 0; } - this->render.unknown_0078 = f; + this->render.spriteOffsetX = f; this->m_digit = f; this->render.scale = 5.0f; this->m_scale = 5.0f; - this->render.unknown_0080 = static_cast(-2); - this->render.unknown_008C = timeGetTime(); + this->render.depthLayer = static_cast(-2); + this->render.motionStartTime = timeGetTime(); return; } case AM_SETPOS: { this->render.visible = 1; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); if ((static_cast(e) << 32 | static_cast(d)) != 0) { const std::string* names = reinterpret_cast(d); this->SetSpriteName(ResourceMgr::Instance(), names[0].c_str()); @@ -1702,7 +1702,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, if ((static_cast(g) << 32 | static_cast(f)) == 1000) { this->SetAction(10, 4, 0); - this->render.unknown_0070 = 10000; + this->render.state = 10000; this->render.color = 0xFFFF0000; } else { this->SetAction(f, 4, 1); @@ -1736,7 +1736,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.scale = 5.0f; this->m_scale = 5.0f; this->m_baseY = this->render.position.y; - this->render.unknown_0080 = static_cast(-5); + this->render.depthLayer = static_cast(-5); break; case MET_CRITICAL_EFFECT: @@ -1748,7 +1748,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.curMotion = 1; this->render.scale = 3.0f; this->m_scale = 3.0f; - this->render.unknown_0080 = static_cast(-5); + this->render.depthLayer = static_cast(-5); this->m_baseY = this->render.position.y; this->render.color = 0xFFAAAAAA; break; @@ -1759,7 +1759,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.position.z = position->z; this->render.position.y -= 12.0f; this->render.curMotion = 0; - this->render.unknown_0080 = static_cast(-5); + this->render.depthLayer = static_cast(-5); this->m_baseY = this->render.position.y; break; @@ -1771,7 +1771,7 @@ void CMsgEffect::SendMsg(CGameObject* sender, int message, int a, int b, int c, this->render.curMotion = 0; this->render.scale = 1.0f; this->m_scale = 1.0f; - this->render.unknown_0080 = static_cast(-5); + this->render.depthLayer = static_cast(-5); this->m_baseY = this->render.position.y; break; diff --git a/Source/Contents/Effects/MsgEffect.h b/Source/Contents/Effects/MsgEffect.h index 0f7be4453..a44ca944c 100644 --- a/Source/Contents/Effects/MsgEffect.h +++ b/Source/Contents/Effects/MsgEffect.h @@ -23,21 +23,21 @@ public: /* 0159 */ unsigned char unknown_0159[0x03]; /* 015C */ CGameObject* m_owner; /* 0160 */ vector3d m_drift; - /* 016C */ vector3d unknown_016C; + /* 016C */ vector3d origin; /* 0178 */ vector3d m_velocity; /* 0184 */ int m_value; /* 0188 */ int m_finished; - /* 018C */ float unknown_018C; + /* 018C */ float travelDistance; /* 0190 */ float m_baseY; /* 0194 */ float m_baseX; /* 0198 */ float m_scale; - /* 019C */ float unknown_019C; - /* 01A0 */ int unknown_01A0; - /* 01A4 */ int unknown_01A4; + /* 019C */ float initialVelocityX; + /* 01A0 */ int processTick; + /* 01A4 */ int previousAnimation; /* 01A8 */ int m_type; /* 01AC */ int m_digit; - /* 01B0 */ int unknown_01B0; - /* 01B4 */ int unknown_01B4; + /* 01B0 */ int motionInitialized; + /* 01B4 */ int activeMotion; }; class CSummonActorEffect : public CMsgEffect { diff --git a/Source/Contents/Effects/NyanggrassEffect.cpp b/Source/Contents/Effects/NyanggrassEffect.cpp index 8601b0645..def7c289b 100644 --- a/Source/Contents/Effects/NyanggrassEffect.cpp +++ b/Source/Contents/Effects/NyanggrassEffect.cpp @@ -123,7 +123,7 @@ void CMultiTexParticle::Render(int column, int row) { // OFFSET: 0x00708260 // FUNCTION: fn_07070 -CNyanggrassEffect::CNyanggrassEffect() : CEffect(-1), unknown_00D8(0) { +CNyanggrassEffect::CNyanggrassEffect() : CEffect(-1), gridSize(0) { } // OFFSET: 0x007085B0 @@ -139,32 +139,32 @@ void CNyanggrassEffect::Close() { // OFFSET: 0x007085F0 // FUNCTION: fn_07073 void CNyanggrassEffect::Open() { - switch (this->unknown_00B0) { + switch (this->effectLevel) { case 1: case 2: - this->unknown_00D8 = 5; + this->gridSize = 5; break; case 3: case 4: - this->unknown_00D8 = 7; + this->gridSize = 7; break; case 5: - this->unknown_00D8 = 9; + this->gridSize = 9; break; } - for (int row = 0; row < this->unknown_00D8; ++row) { - for (int column = 0; column < this->unknown_00D8; ++column) { + for (int row = 0; row < this->gridSize; ++row) { + for (int column = 0; column < this->gridSize; ++column) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 1); if (particle) { CEZ2STRParticle* effect = static_cast(particle); - effect->unknown_0004 = this->id; - effect->unknown_000C = 0; - effect->unknown_0010 = 0; - effect->unknown_0008 = 1; + effect->effectId = this->id; + effect->columnIndex = 0; + effect->rowIndex = 0; + effect->groupIndex = 1; effect->m_loop = true; const vector3d origin = *reinterpret_cast(this->position); - const int half = this->unknown_00D8 / 2; + const int half = this->gridSize / 2; effect->position.x = static_cast((column - half) * 5) + origin.x; effect->position.y = origin.y; effect->position.z = static_cast((row - half) * 5) + origin.z; @@ -191,6 +191,6 @@ void CNyanggrassEffect::OnProcess() { static_cast(particle)->Process(0.0f, 0.0f, 0.0f); } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/NyanggrassEffect.h b/Source/Contents/Effects/NyanggrassEffect.h index 8d524cac5..cbcb1b32d 100644 --- a/Source/Contents/Effects/NyanggrassEffect.h +++ b/Source/Contents/Effects/NyanggrassEffect.h @@ -38,7 +38,7 @@ public: bool IsAlive() override; /* 00CC */ std::vector particles; - /* 00D8 */ int unknown_00D8; + /* 00D8 */ int gridSize; }; #if defined(_WIN32) && !defined(_WIN64) @@ -51,7 +51,7 @@ static_assert(offsetof(CMultiTexParticle, uv2) == 0x300); static_assert(offsetof(CMultiTexParticle, offsetU) == 0x320); static_assert(offsetof(CMultiTexParticle, offsetV) == 0x324); static_assert(sizeof(CNyanggrassEffect) == 0xDC); -static_assert(offsetof(CNyanggrassEffect, unknown_00D8) == 0xD8); +static_assert(offsetof(CNyanggrassEffect, gridSize) == 0xD8); #endif #endif diff --git a/Source/Contents/Effects/Particle.cpp b/Source/Contents/Effects/Particle.cpp index 27b1ef0fb..436b8fcc7 100644 --- a/Source/Contents/Effects/Particle.cpp +++ b/Source/Contents/Effects/Particle.cpp @@ -513,9 +513,9 @@ void CEZ2STRParticle::RenderBillboard(EZeffectClip* clip, EZeffectTransform* tra } primitive->texture = texture; - primitive->unknown_0018 = transform->srcalpha; - primitive->unknown_001C = transform->destalpha; - primitive->unknown_0020 = transform->mtpreset; + primitive->sourceBlend = transform->srcalpha; + primitive->destinationBlend = transform->destalpha; + primitive->textureMode = transform->mtpreset; this->flags |= 0x20; this->submit(primitive, this->flags); } @@ -625,9 +625,9 @@ void CEZ2STRParticle::RenderScreen(EZeffectClip* clip, EZeffectTransform* transf } primitive->texture = texture; - primitive->unknown_0018 = transform->srcalpha; - primitive->unknown_001C = transform->destalpha; - primitive->unknown_0020 = transform->mtpreset; + primitive->sourceBlend = transform->srcalpha; + primitive->destinationBlend = transform->destalpha; + primitive->textureMode = transform->mtpreset; this->flags |= 0x20; this->submit(primitive, this->flags); } @@ -683,9 +683,9 @@ void CEZ2STRParticle::RenderGround(EZeffectClip* clip, EZeffectTransform* transf } primitive->texture = texture; - primitive->unknown_0018 = transform->srcalpha; - primitive->unknown_001C = transform->destalpha; - primitive->unknown_0020 = transform->mtpreset; + primitive->sourceBlend = transform->srcalpha; + primitive->destinationBlend = transform->destalpha; + primitive->textureMode = transform->mtpreset; this->flags |= 0x20; this->submit(primitive, this->flags); } @@ -723,18 +723,18 @@ static __forceinline void ResetParticle(CParticle& particle) { particle.green = 0xFF; particle.blue = 0xFF; particle.scale = 1.0f; - particle.unknown_00C0 = 0; + particle.speedParameter = 0; particle.texture = nullptr; particle.alpha = 0xFF; - particle.unknown_00C4 = 0; + particle.angleBits = 0; particle.life = 0; - particle.unknown_00C8 = 0; - particle.unknown_0014 = 0; - particle.unknown_00E8 = 0; - particle.unknown_00EC = 0; - particle.unknown_00D0 = 0; - particle.unknown_00D4 = 0; - particle.unknown_00D8 = 0; + particle.auxiliaryParameter = 0; + particle.auxiliaryIndex = 0; + particle.elapsedFrames = 0; + particle.renderOptions = 0; + particle.offsetX = 0; + particle.offsetY = 0; + particle.offsetZ = 0; particle.sourceBlend = 5; particle.destinationBlend = 2; particle.primitive = RenderPrimitive(); @@ -745,9 +745,9 @@ static __forceinline void ResetParticle(CParticle& particle) { particle.vertices[i].x = 0; particle.vertices[i].y = 0; particle.vertices[i].z = 0; - particle.unknown_0278[i].x = 0; - particle.unknown_0278[i].y = 0; - particle.unknown_0278[i].z = 0; + particle.corners[i].x = 0; + particle.corners[i].y = 0; + particle.corners[i].z = 0; } InitParticleQuad(particle.vertices); @@ -768,7 +768,7 @@ CParticle::CParticle(vector3d position, int flags) : flags(flags), position(posi vertex.v = 0; } - for (vector3d& corner : this->unknown_0278) { + for (vector3d& corner : this->corners) { corner.x = 0; corner.y = 0; corner.z = 0; @@ -898,8 +898,8 @@ void CParticle::Render(bool billboard, float top, float bottom, float left, floa } this->primitive.texture = this->texture; - this->primitive.unknown_0018 = this->sourceBlend; - this->primitive.unknown_001C = this->destinationBlend; + this->primitive.sourceBlend = this->sourceBlend; + this->primitive.destinationBlend = this->destinationBlend; g_renderer->queues.Submit(&this->primitive, static_cast(this->flags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } @@ -942,7 +942,7 @@ void CParticle::SetTexture(std::string name) { // OFFSET: 0x00B40200 // FUNCTION: fn_18845 void CParticle::SetRenderFlag(unsigned char value) { - *reinterpret_cast(&this->primitive.unknown_0014) = value; + *reinterpret_cast(&this->primitive.depthFlags) = value; } // OFFSET: 0x00B40210 diff --git a/Source/Contents/Effects/Particle.h b/Source/Contents/Effects/Particle.h index 9c7527723..7d86e4c6e 100644 --- a/Source/Contents/Effects/Particle.h +++ b/Source/Contents/Effects/Particle.h @@ -58,48 +58,48 @@ public: void SetTexture(std::string name); void SetRenderFlag(unsigned char value); - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; + /* 0004 */ int effectId; + /* 0008 */ int groupIndex; + /* 000C */ int columnIndex; + /* 0010 */ int rowIndex; + /* 0014 */ int auxiliaryIndex; /* 0018 */ CTexture* texture; /* 001C */ int flags; /* 0020 */ float scale; /* 0024 */ vector3d position; - /* 0030 */ vector3d unknown_0030 = {}; + /* 0030 */ vector3d motionVelocity = {}; /* 003C */ short red; /* 003E */ short green; /* 0040 */ short blue; /* 0042 */ unsigned char unknown_0042[2]; /* 0044 */ int alpha; - /* 0048 */ unsigned char unknown_0048[4]; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ float unknown_0054; - /* 0058 */ unsigned char unknown_0058[0x50]; - /* 00A8 */ unsigned char unknown_00A8; - /* 00A9 */ unsigned char unknown_00A9[0x17]; - /* 00C0 */ float unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; + /* 0048 */ unsigned char effectParameters[4]; + /* 004C */ int phaseParameter; + /* 0050 */ int angleParameter; + /* 0054 */ float animationParameter; + /* 0058 */ unsigned char animationParameters[0x50]; + /* 00A8 */ unsigned char animationState; + /* 00A9 */ unsigned char frameParameters[0x17]; + /* 00C0 */ float speedParameter; + /* 00C4 */ int angleBits; + /* 00C8 */ int auxiliaryParameter; /* 00CC */ float life; - /* 00D0 */ float unknown_00D0 = 0; - /* 00D4 */ float unknown_00D4 = 0; - /* 00D8 */ float unknown_00D8 = 0; - /* 00DC */ float unknown_00DC = 0; - /* 00E0 */ float unknown_00E0 = 0; - /* 00E4 */ float unknown_00E4 = 0; - /* 00E8 */ int unknown_00E8; - /* 00EC */ int unknown_00EC; + /* 00D0 */ float offsetX = 0; + /* 00D4 */ float offsetY = 0; + /* 00D8 */ float offsetZ = 0; + /* 00DC */ float originX = 0; + /* 00E0 */ float originY = 0; + /* 00E4 */ float originZ = 0; + /* 00E8 */ int elapsedFrames; + /* 00EC */ int renderOptions; /* 00F0 */ RenderPrimitive primitive; - /* 0198 */ unsigned char unknown_0198[0x30]; + /* 0198 */ unsigned char rotationStorage[0x30]; /* 01C8 */ matrix transform; /* 01F8 */ RenderVertex vertices[4]; - /* 0278 */ vector3d unknown_0278[4]; + /* 0278 */ vector3d corners[4]; /* 02A8 */ int sourceBlend; /* 02AC */ int destinationBlend; - /* 02B0 */ int unknown_02B0; + /* 02B0 */ int poolIndex; /* 02B4 */ float depthOffset; /* 02B8 */ ParticleSubmit submit; }; diff --git a/Source/Contents/Effects/PartyMemberEffects.cpp b/Source/Contents/Effects/PartyMemberEffects.cpp index cdec1db3b..92e7420fc 100644 --- a/Source/Contents/Effects/PartyMemberEffects.cpp +++ b/Source/Contents/Effects/PartyMemberEffects.cpp @@ -69,9 +69,9 @@ bool CRollingCutterRagEffect::OnProcess() { return false; } - if (g_updateTick > 0 && this->state.parent->render.unknown_00ECBytes[0] == 1) { + if (g_updateTick > 0 && this->state.parent->render.effectPhaseBytes[0] == 1) { this->state.parent->render.flags = 0; - this->state.parent->render.unknown_00ECBytes[0] = 0; + this->state.parent->render.effectPhaseBytes[0] = 0; } this->render.position = this->state.parent->render.position; @@ -108,7 +108,7 @@ CRagEffect* EffectActor::LaunchEffect(int effectId, vector3d deltaPos, float rot CRagEffect* effect; if (effectId == 127) { - this->state.unknown_0140 = 1; + this->state.effectLaunched = 1; RecordLaunch(effectId); effect = new CRagEffect(); } else { @@ -143,7 +143,7 @@ CRagEffect* EffectActor::LaunchEffect(int effectId, vector3d deltaPos, float rot deltaPos.x = x; deltaPos.z = z; - if (effectId == 166 && this->render.unknown_00A8 == 0) { + if (effectId == 166 && this->render.isCharacter == 0) { return nullptr; } @@ -181,7 +181,7 @@ CRagEffect* EffectActor::LaunchTaggedEffect(int effectId, std::uint32_t tag) { // INLINED bool PartyMemberEffects::Enabled() const { - return this->mode && (this->mode->scene->unknown_0048 != 0 || this->mode->scene->unknown_0054 != 0); + return this->mode && (this->mode->scene->isPKZone != 0 || this->mode->scene->isEventPVPMode != 0); } // INLINED diff --git a/Source/Contents/Effects/PokJukEffect.cpp b/Source/Contents/Effects/PokJukEffect.cpp index 476523bbb..95264cb9c 100644 --- a/Source/Contents/Effects/PokJukEffect.cpp +++ b/Source/Contents/Effects/PokJukEffect.cpp @@ -18,17 +18,17 @@ void CPokJukEffect::SpawnParticles() { for (int column = 0; column < 160; ++column) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; - particle->unknown_00E8 = -300 - std::max(rand() % 50, 0); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(rand() % 360, 0)); + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 1; + particle->elapsedFrames = -300 - std::max(rand() % 50, 0); + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); particle->alpha = 0; - particle->unknown_00C0 = 2.0f; + particle->speedParameter = 2.0f; particle->scale = static_cast(std::max(rand() % 100, 0)) * 0.004f + 0.4f; - particle->unknown_0050 = std::max(rand() % 360, 0); - particle->unknown_004C = std::max(rand() % 360, 0); + particle->angleParameter = std::max(rand() % 360, 0); + particle->phaseParameter = std::max(rand() % 360, 0); InitParticleQuad(particle->vertices); this->particles.push_back(particle); @@ -99,8 +99,8 @@ void CPokJukEffect::OnProcess() { position.z = this->position[2]; if (particle != nullptr) { - const int index = particle->unknown_0010 * 160 + particle->unknown_000C; - const int age = particle->unknown_00E8; + const int index = particle->rowIndex * 160 + particle->columnIndex; + const int age = particle->elapsedFrames; if (age > 0) { vector3d* trail = this->trails[index]; @@ -125,7 +125,7 @@ void CPokJukEffect::OnProcess() { this->beats[index] = 0; } - float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + float& spinAngle = *reinterpret_cast(&particle->angleBits); spinAngle = static_cast((static_cast(spinAngle) + 5) % 360); if (this->states[index] == 0) { @@ -136,12 +136,12 @@ void CPokJukEffect::OnProcess() { particle->alpha = 250; } } else if (this->states[index] == 1) { - const int heading = particle->unknown_0050; + const int heading = particle->angleParameter; const float speed = particle->scale; trail[0].y += speed * g_sinTable[heading]; const float flat = speed * g_cosTable[heading]; - trail[0].x += flat * g_cosTable[particle->unknown_004C]; - trail[0].z += flat * g_sinTable[particle->unknown_004C]; + trail[0].x += flat * g_cosTable[particle->phaseParameter]; + trail[0].z += flat * g_sinTable[particle->phaseParameter]; trail[0].y += 0.02f; particle->scale = speed * 0.98f; @@ -158,9 +158,9 @@ void CPokJukEffect::OnProcess() { } if (age > 2000) { - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; const int heading = std::rand() % 360; - particle->unknown_004C = heading < 0 ? 0 : heading; + particle->phaseParameter = heading < 0 ? 0 : heading; const int spread = std::rand() % 100; particle->scale = static_cast(spread < 0 ? 0 : spread) * 0.004f + 0.4f; trail[0].x = -15.0f; @@ -171,7 +171,7 @@ void CPokJukEffect::OnProcess() { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -183,14 +183,14 @@ void CPokJukEffect::Render() { if (particle && particle->alpha > 0) { float shrink = 0.0f; - const int index = particle->unknown_0010 * 160 + particle->unknown_000C; + const int index = particle->rowIndex * 160 + particle->columnIndex; for (int layer = 0; layer < 2; ++layer) { vector3d corners[4]{}; - const float radius = particle->unknown_00C0 - shrink; + const float radius = particle->speedParameter - shrink; for (int corner = 0; corner < 4; ++corner) { - const int angle = static_cast(static_cast(corner * 90) + *reinterpret_cast(&particle->unknown_00C4)) % 360; + const int angle = static_cast(static_cast(corner * 90) + *reinterpret_cast(&particle->angleBits)) % 360; corners[corner].x = radius * g_cosTable[angle]; corners[corner].y = 0.0f; corners[corner].z = radius * g_sinTable[angle]; diff --git a/Source/Contents/Effects/PowderingEffect.cpp b/Source/Contents/Effects/PowderingEffect.cpp index 2788e974f..47738154c 100644 --- a/Source/Contents/Effects/PowderingEffect.cpp +++ b/Source/Contents/Effects/PowderingEffect.cpp @@ -13,7 +13,7 @@ // OFFSET: 0x00708E70 // FUNCTION: fn_07085 -CPowderingEffect::CPowderingEffect() : CEffect(-1), unknown_00E4(0) { +CPowderingEffect::CPowderingEffect() : CEffect(-1), particleGridSize(0) { } // OFFSET: 0x007092C0 @@ -33,51 +33,51 @@ void CPowderingEffect::Close() { // OFFSET: 0x00709330 // FUNCTION: fn_07089 void CPowderingEffect::Open() { - if (this->unknown_00B0 == 1 || this->unknown_00B0 == 2) { - this->unknown_00E4 = 3; - } else if (this->unknown_00B0 == 3 || this->unknown_00B0 == 4) { - this->unknown_00E4 = 5; - } else if (this->unknown_00B0 == 5) { - this->unknown_00E4 = 7; + if (this->effectLevel == 1 || this->effectLevel == 2) { + this->particleGridSize = 3; + } else if (this->effectLevel == 3 || this->effectLevel == 4) { + this->particleGridSize = 5; + } else if (this->effectLevel == 5) { + this->particleGridSize = 7; } - for (int i = 0; i < this->unknown_00E4 * this->unknown_00E4; ++i) { + for (int i = 0; i < this->particleGridSize * this->particleGridSize; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (!particle) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("smoke2.bmp"); - const int span1 = this->unknown_00E4 * 5; + const int span1 = this->particleGridSize * 5; int r1 = 0; if (span1 != 0) { r1 = std::max(rand() % span1, 0); } const int r1Final = r1 - span1 / 2 + 1; - const int span2 = this->unknown_00E4 * 5; + const int span2 = this->particleGridSize * 5; int r2 = 0; if (span2 != 0) { r2 = std::max(rand() % span2, 0); } const int r2Final = r2 - span2 / 2 + 1; - particle->unknown_00D4 = 0.0f; - particle->unknown_00D0 = static_cast(r1Final); - particle->unknown_00D8 = static_cast(r2Final); + particle->offsetY = 0.0f; + particle->offsetX = static_cast(r1Final); + particle->offsetZ = static_cast(r2Final); this->InitSmokeParticle(particle); InitParticleQuad(particle->vertices); this->smokeParticles.push_back(particle); } - for (int i = 0; i < this->unknown_00E4 * this->unknown_00E4; ++i) { + for (int i = 0; i < this->particleGridSize * this->particleGridSize; ++i) { CSpriteParticle* particle = static_cast( CreateSpriteParticle(reinterpret_cast(this->position), 1) ); @@ -85,10 +85,10 @@ void CPowderingEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetSprite("이팩트\\particle2.spr"); particle->SetAction("이팩트\\particle2.act"); @@ -104,7 +104,7 @@ void CPowderingEffect::Open() { void CPowderingEffect::InitSpriteParticle(CParticle* particle) { CSpriteParticle* spriteParticle = static_cast(particle); - const int span1 = this->unknown_00E4 * 5; + const int span1 = this->particleGridSize * 5; int r1 = 0; if (span1 != 0) { r1 = std::max(rand() % span1, 0); @@ -113,7 +113,7 @@ void CPowderingEffect::InitSpriteParticle(CParticle* particle) { const float yVal = static_cast(std::max(rand() % 7, 0) + 7); - const int span2 = this->unknown_00E4 * 5; + const int span2 = this->particleGridSize * 5; int r2 = 0; if (span2 != 0) { r2 = std::max(rand() % span2, 0); @@ -127,7 +127,7 @@ void CPowderingEffect::InitSpriteParticle(CParticle* particle) { const int r3 = std::max(rand() % 3, 0) + 1; spriteParticle->alpha = 0; - spriteParticle->unknown_00A8 = 0; + spriteParticle->animationState = 0; spriteParticle->scale = 0.5f - static_cast(r3) * 0.1f; } @@ -148,36 +148,36 @@ void CPowderingEffect::InitSmokeParticle(CParticle* particle) { particle->alpha = 0; const int r2Clamped = std::max(r2, 0); - particle->unknown_0050 = r2Clamped + 30; + particle->angleParameter = r2Clamped + 30; const int r1Clamped = std::max(r1, 0); - particle->unknown_00C0 = - (static_cast(r1Clamped + 1) * 0.1f + 6.0f) / static_cast(particle->unknown_0050 * 2); + particle->speedParameter = + (static_cast(r1Clamped + 1) * 0.1f + 6.0f) / static_cast(particle->angleParameter * 2); const int r3 = std::max(rand() % 100, 0); const int targetAlpha = r3 + 50; - *reinterpret_cast(particle->unknown_0048) = targetAlpha; - *reinterpret_cast(particle->unknown_0058) = static_cast(targetAlpha / particle->unknown_0050); + *reinterpret_cast(particle->effectParameters) = targetAlpha; + *reinterpret_cast(particle->animationParameters) = static_cast(targetAlpha / particle->angleParameter); const int r4 = rand() % 100; const int r5 = rand() % 50; const short s4 = static_cast(std::max(r4, 0)); const short s5 = static_cast(std::max(r5, 0)); particle->SetColor(115 - s5, 255, 150 - s4); - particle->unknown_00A8 = 0; + particle->animationState = 0; } // OFFSET: 0x007097B0 // FUNCTION: fn_07093 bool CPowderingEffect::IsAlive() { for (CParticle* particle : this->smokeParticles) { - if (particle->unknown_00A8 != 2) { + if (particle->animationState != 2) { return true; } } for (CParticle* particle : this->spriteParticles) { - if (particle->unknown_00A8 != 2) { + if (particle->animationState != 2) { return true; } } @@ -190,31 +190,31 @@ bool CPowderingEffect::IsAlive() { void CPowderingEffect::OnProcess() { for (auto it = this->smokeParticles.begin(); it != this->smokeParticles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_00A8 == 2) { + if (!particle || particle->animationState == 2) { continue; } - const int targetAlpha = *reinterpret_cast(particle->unknown_0048); - const float scale = particle->unknown_00C0 + particle->scale; + const int targetAlpha = *reinterpret_cast(particle->effectParameters); + const float scale = particle->speedParameter + particle->scale; int alpha = particle->alpha; - const int step = targetAlpha / particle->unknown_0050; + const int step = targetAlpha / particle->angleParameter; - if (particle->unknown_00A8 == 0) { + if (particle->animationState == 0) { alpha += step; if (targetAlpha <= alpha) { alpha = targetAlpha; - particle->unknown_00A8 = 1; + particle->animationState = 1; } - } else if (particle->unknown_00A8 == 1) { + } else if (particle->animationState == 1) { alpha -= step; if (alpha < 0) { if (this->ActorExists()) { - particle->unknown_00A8 = 0; + particle->animationState = 0; this->InitSmokeParticle(particle); continue; } else { alpha = 0; - particle->unknown_00A8 = 2; + particle->animationState = 2; } } } @@ -233,35 +233,35 @@ void CPowderingEffect::OnProcess() { result.Compose(scaleMat, rotation); particle->transform = result; - particle->position.x = this->position[0] + 0.0f + particle->unknown_00D0; - particle->position.y = this->position[1] - 10.0f + particle->unknown_00D4; - particle->position.z = this->position[2] + 0.0f + particle->unknown_00D8; - ++particle->unknown_00E8; + particle->position.x = this->position[0] + 0.0f + particle->offsetX; + particle->position.y = this->position[1] - 10.0f + particle->offsetY; + particle->position.z = this->position[2] + 0.0f + particle->offsetZ; + ++particle->elapsedFrames; } for (auto it = this->spriteParticles.begin(); it != this->spriteParticles.end(); ++it) { CSpriteParticle* particle = *it; - if (!particle || particle->unknown_00A8 == 2) { + if (!particle || particle->animationState == 2) { continue; } int alpha = particle->alpha; - if (particle->unknown_00A8 == 0) { + if (particle->animationState == 0) { alpha += std::max(rand() % 30, 0); if (alpha >= 255) { alpha = 254; - particle->unknown_00A8 = 1; + particle->animationState = 1; } - } else if (particle->unknown_00A8 == 1) { + } else if (particle->animationState == 1) { alpha -= std::max(rand() % 30, 0); if (alpha < 0) { if (this->ActorExists()) { - particle->unknown_00A8 = 0; + particle->animationState = 0; this->InitSpriteParticle(particle); continue; } else { alpha = 0; - particle->unknown_00A8 = 2; + particle->animationState = 2; } } } @@ -270,7 +270,7 @@ void CPowderingEffect::OnProcess() { particle->alpha = alpha; velocity.y += static_cast(std::max(rand() % 10, 0)) * 0.01f; particle->velocity = velocity; - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->position.x = velocity.x + this->position[0]; particle->position.y = velocity.y + this->position[1]; particle->position.z = velocity.z + this->position[2]; @@ -282,14 +282,14 @@ void CPowderingEffect::OnProcess() { void CPowderingEffect::Render() { for (auto it = this->smokeParticles.begin(); it != this->smokeParticles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_00A8 != 2) { + if (particle && particle->animationState != 2) { particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); } } for (auto it = this->spriteParticles.begin(); it != this->spriteParticles.end(); ++it) { CSpriteParticle* particle = *it; - if (particle && particle->unknown_00A8 != 2) { + if (particle && particle->animationState != 2) { particle->Draw(1); } } diff --git a/Source/Contents/Effects/PowderingEffect.h b/Source/Contents/Effects/PowderingEffect.h index 537551ef4..cf2374e91 100644 --- a/Source/Contents/Effects/PowderingEffect.h +++ b/Source/Contents/Effects/PowderingEffect.h @@ -25,13 +25,13 @@ public: /* 00CC */ std::vector smokeParticles; /* 00D8 */ std::vector spriteParticles; - /* 00E4 */ int unknown_00E4; + /* 00E4 */ int particleGridSize; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CPowderingEffect) == 0xE8); static_assert(offsetof(CPowderingEffect, spriteParticles) == 0xD8); -static_assert(offsetof(CPowderingEffect, unknown_00E4) == 0xE4); +static_assert(offsetof(CPowderingEffect, particleGridSize) == 0xE4); #endif #endif diff --git a/Source/Contents/Effects/RagEffect.cpp b/Source/Contents/Effects/RagEffect.cpp index a1498a77b..72057397a 100644 --- a/Source/Contents/Effects/RagEffect.cpp +++ b/Source/Contents/Effects/RagEffect.cpp @@ -47,8 +47,8 @@ // INLINED inline RagEffectState::RagEffectState() : parent(nullptr), defZ(0), isDirection(0), type(0), level(1), flag(0), count(0), stateCnt(0), deltaPos{}, deltaPos2{}, deltaPos3{}, - resource(nullptr), resourceData(nullptr), currentLayer(0), loopCount(0), loopLimit(0), unknown_11C84(nullptr), unknown_11C88{-1, -1, -1, -1}, - forceRender(0), tag(0), unknown_11CA0(0) { + resource(nullptr), resourceData(nullptr), currentLayer(0), loopCount(0), loopLimit(0), currentPrimitive(nullptr), colorChannels{-1, -1, -1, -1}, + forceRender(0), tag(0), visibilityFlags(0) { for (unsigned index = 0; index < 20; ++index) { auto* record = this->objSeg + index * 80; const std::uint32_t zero = 0; @@ -132,12 +132,12 @@ static int BlendTintChannel(unsigned char tint, float value) { // INLINED static bool HasTint(const EffectActor& parent) { - return reinterpret_cast(parent.render.unknown_0090) != 0; + return reinterpret_cast(parent.render.savedTintColor) != 0; } // INLINED static void SetBlendedTint(CRenderObject& target, const EffectActor& parent, const vector3d& color) { - const unsigned char* tint = reinterpret_cast(&parent.render.unknown_0094); + const unsigned char* tint = reinterpret_cast(&parent.render.targetTintColor); target.SetColor(-1, BlendTintChannel(tint[1], color.x), BlendTintChannel(tint[2], color.y), BlendTintChannel(tint[3], color.z)); } @@ -264,41 +264,41 @@ void CRagEffect::FireBall() { } PlayEffectWave(*this, "effect\\EF_FireBall.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->pattern |= 0x120u; - this->state.unknown_11C84->deltaPos2 = {0.0f, -15.0f, 0.0f}; - Owner(this->state.unknown_11C84).Face(this->state.deltaPos[0], this->state.deltaPos[2]); - this->state.unknown_11C84->longitude = -Owner(this->state.unknown_11C84).render.angle; - Owner(this->state.unknown_11C84).render.angle = 180.0f - Owner(this->state.unknown_11C84).render.angle; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->pattern |= 0x120u; + this->state.currentPrimitive->deltaPos2 = {0.0f, -15.0f, 0.0f}; + Owner(this->state.currentPrimitive).Face(this->state.deltaPos[0], this->state.deltaPos[2]); + this->state.currentPrimitive->longitude = -Owner(this->state.currentPrimitive).render.angle; + Owner(this->state.currentPrimitive).render.angle = 180.0f - Owner(this->state.currentPrimitive).render.angle; - if (Owner(this->state.unknown_11C84).render.angle < 0.0f) { - Owner(this->state.unknown_11C84).render.angle = Owner(this->state.unknown_11C84).render.angle + 360.0f; + if (Owner(this->state.currentPrimitive).render.angle < 0.0f) { + Owner(this->state.currentPrimitive).render.angle = Owner(this->state.currentPrimitive).render.angle + 360.0f; } - CEffectPrim& particle = Owner(this->state.unknown_11C84); + CEffectPrim& particle = Owner(this->state.currentPrimitive); particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); - reinterpret_cast(this->state.unknown_11C84->transform)->MakeYRotation(GetRadian(static_cast(this->state.unknown_11C84->longitude))); - this->state.unknown_11C84->size = 1.3f; - this->state.unknown_11C84->animSpeed = 1; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeYRotation(GetRadian(static_cast(this->state.currentPrimitive->longitude))); + this->state.currentPrimitive->size = 1.3f; + this->state.currentPrimitive->animSpeed = 1; if (this->state.stateCnt != 20) { - this->state.unknown_11C84->red = 246; - this->state.unknown_11C84->green = 199; - this->state.unknown_11C84->blue = 76; + this->state.currentPrimitive->red = 246; + this->state.currentPrimitive->green = 199; + this->state.currentPrimitive->blue = 76; if (this->state.stateCnt == 24) { - this->state.unknown_11C84->alpha = 180.0f; + this->state.currentPrimitive->alpha = 180.0f; } else if (this->state.stateCnt == 28) { - this->state.unknown_11C84->alpha = 130.0f; + this->state.currentPrimitive->alpha = 130.0f; } else { - this->state.unknown_11C84->alpha = 80.0f; + this->state.currentPrimitive->alpha = 80.0f; } } - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\fireball.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\fireball.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\fireball.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\fireball.act"); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C147D0 @@ -308,40 +308,40 @@ void CRagEffect::FireSparks() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern |= 4u; - this->state.unknown_11C84->pattern |= 0x80u; - this->state.unknown_11C84->duration = 140; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern |= 4u; + this->state.currentPrimitive->pattern |= 0x80u; + this->state.currentPrimitive->duration = 140; this->state.duration = 140; - this->state.unknown_11C84->speed = static_cast(std::max(0, rand() % 35) + 15) / 100.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->latitude = static_cast(std::max(0, rand() % 360)); - EffectPrimitiveState& yaw = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(0, rand() % 35) + 15) / 100.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->latitude = static_cast(std::max(0, rand() % 360)); + EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); - EffectPrimitiveState& pitch = *this->state.unknown_11C84; + EffectPrimitiveState& pitch = *this->state.currentPrimitive; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); - const float* m = this->state.unknown_11C84->transform; + const float* m = this->state.currentPrimitive->transform; const float distance = static_cast(std::max(0, rand() % 13) + 2); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2.x = (((m[3] * 0.0f + m[0] * 0.0f) + distance * m[6]) + m[9]) + 0.0f; moving.deltaPos2.y = (((m[1] * 0.0f + m[4] * 0.0f) + distance * m[7]) + m[10]) - 10.0f; moving.deltaPos2.z = (((m[5] * 0.0f + m[2] * 0.0f) + distance * m[8]) + m[11]) + 0.0f; - this->state.unknown_11C84->chCnt = std::max(0, rand() % 25) + 5; - this->state.unknown_11C84->size = static_cast(std::max(0, rand() % 70) + 30) / 100.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 80.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 1.5f; - this->state.unknown_11C84->unknown_014C.z = std::bit_cast(1u); - this->state.unknown_11C84->unknown_01D8 = 0; - this->state.unknown_11C84->chPoint.push_back(40.0f); - this->state.unknown_11C84->chVal1.push_back(120.0f); - this->state.unknown_11C84->chVal2.push_back(200.0f); - this->state.unknown_11C84->chPoint.push_back(100.0f); - this->state.unknown_11C84->chVal1.push_back(0.0f); - this->state.unknown_11C84->chVal2.push_back(80.0f); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->chCnt = std::max(0, rand() % 25) + 5; + this->state.currentPrimitive->size = static_cast(std::max(0, rand() % 70) + 30) / 100.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 80.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 1.5f; + this->state.currentPrimitive->changeFlags.z = std::bit_cast(1u); + this->state.currentPrimitive->colorCycleIndex = 0; + this->state.currentPrimitive->chPoint.push_back(40.0f); + this->state.currentPrimitive->chVal1.push_back(120.0f); + this->state.currentPrimitive->chVal2.push_back(200.0f); + this->state.currentPrimitive->chPoint.push_back(100.0f); + this->state.currentPrimitive->chVal1.push_back(0.0f); + this->state.currentPrimitive->chVal2.push_back(80.0f); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C15AB0 @@ -421,40 +421,40 @@ void CRagEffect::FrostDiver(char type) { } this->render.position = saved; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->pattern |= 1u; - this->state.unknown_11C84->slots[0].flag1[0] = type == 3 ? 3 : 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->pattern |= 1u; + this->state.currentPrimitive->slots[0].flag1[0] = type == 3 ? 3 : 0; const int angle = std::max(rand() % 360, 0); const float distance = static_cast(std::max(rand() % 10, 0) + 5) / 10.0f; const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); - this->state.unknown_11C84->deltaPos2.y = 30.0f; - this->state.unknown_11C84->deltaPos2.x = sine * distance; - this->state.unknown_11C84->deltaPos2.z = -distance * cosine; - vector3d& velocity = this->state.unknown_11C84->deltaPos2; + this->state.currentPrimitive->deltaPos2.y = 30.0f; + this->state.currentPrimitive->deltaPos2.x = sine * distance; + this->state.currentPrimitive->deltaPos2.z = -distance * cosine; + vector3d& velocity = this->state.currentPrimitive->deltaPos2; velocity.x = this->state.deltaPos3[0] + velocity.x; velocity.y = this->state.deltaPos3[1] + velocity.y; velocity.z = this->state.deltaPos3[2] + velocity.z; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 40, 0) + 60) / 100.0f; - this->state.unknown_11C84->heightSize = static_cast(std::max(rand() % 30, 0) + 150) / 10.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 30, 0) + 75); - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 40, 0) + 60) / 100.0f; + this->state.currentPrimitive->heightSize = static_cast(std::max(rand() % 30, 0) + 150) / 10.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 30, 0) + 75); + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - EffectPrimitiveState& copy = *this->state.unknown_11C84; + EffectPrimitiveState& copy = *this->state.currentPrimitive; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); - this->state.unknown_11C84->speed = 3.0f; - EffectPrimitiveState& slow = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = 3.0f; + EffectPrimitiveState& slow = *this->state.currentPrimitive; const float decay = -(slow.speed / slow.duration); slow.accel = decay + decay; - this->state.unknown_11C84->chCnt = 20; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->chCnt = 20; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + AllocateTextures(*this->state.currentPrimitive); CTexture* texture = g_texMgr.Load("effect\\ice.tga", 0, false, true, false); - this->state.unknown_11C84->textures[0] = texture; + this->state.currentPrimitive->textures[0] = texture; this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; @@ -495,39 +495,39 @@ void CRagEffect::GrimTooth() { } this->render.position = saved; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern |= 1u; - this->state.unknown_11C84->duration = 40; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 9, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern |= 1u; + this->state.currentPrimitive->duration = 40; const int angle = std::max(rand() % 360, 0); rand(); ClientSine(angle); ClientCosine(angle); - this->state.unknown_11C84->deltaPos2 = {0.0f, 20.0f, 0.0f}; - vector3d& velocity = this->state.unknown_11C84->deltaPos2; + this->state.currentPrimitive->deltaPos2 = {0.0f, 20.0f, 0.0f}; + vector3d& velocity = this->state.currentPrimitive->deltaPos2; velocity.x = this->state.deltaPos3[0] + velocity.x; velocity.y = this->state.deltaPos3[1] + velocity.y; velocity.z = this->state.deltaPos3[2] + velocity.z; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 40, 0) + 60) / 100.0f; - this->state.unknown_11C84->heightSize = 10.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 30, 0) + 75); - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 40, 0) + 60) / 100.0f; + this->state.currentPrimitive->heightSize = 10.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 30, 0) + 75); + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - EffectPrimitiveState& copy = *this->state.unknown_11C84; + EffectPrimitiveState& copy = *this->state.currentPrimitive; std::memcpy(copy.rotTransform, copy.transform, sizeof(copy.rotTransform)); - this->state.unknown_11C84->speed = 3.0f; - EffectPrimitiveState& slow = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = 3.0f; + EffectPrimitiveState& slow = *this->state.currentPrimitive; const float decay = -(slow.speed / slow.duration); slow.accel = decay + decay; - this->state.unknown_11C84->chCnt = 6; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->chCnt = 6; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + AllocateTextures(*this->state.currentPrimitive); CTexture* texture = g_texMgr.Load("effect\\stone.bmp", 0, false, true, false); this->state.deltaPos3[0] = this->state.deltaPos3[0] - this->state.deltaPos2[0]; this->state.deltaPos3[1] = this->state.deltaPos3[1] - this->state.deltaPos2[1]; - this->state.unknown_11C84->textures[0] = texture; + this->state.currentPrimitive->textures[0] = texture; this->state.deltaPos3[2] = this->state.deltaPos3[2] - this->state.deltaPos2[2]; } @@ -586,49 +586,49 @@ void CRagEffect::IncAgiDex() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_IncAgiDex.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->speed = 1.5f; - EffectPrimitiveState& slow = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->speed = 1.5f; + EffectPrimitiveState& slow = *this->state.currentPrimitive; slow.accel = -(slow.speed / static_cast(slow.duration)) * 1.2f; - this->state.unknown_11C84->widthSize = 40.0f; - this->state.unknown_11C84->heightSize = 20.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 15.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 15; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\dex_agi_up.bmp", 0, false, true, false); - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->widthSize = 40.0f; + this->state.currentPrimitive->heightSize = 20.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 15.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 15; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\dex_agi_up.bmp", 0, false, true, false); + this->state.currentPrimitive->slots[0].flag1[0] = 0; } if ((this->state.stateCnt & 1) != 0) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 50; - EffectPrimitiveState& spin = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 50; + EffectPrimitiveState& spin = *this->state.currentPrimitive; reinterpret_cast(spin.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; const float distance = static_cast(std::max(rand() % 7, 0) + 2); const vector3d step = RotatedForward(moving.transform, distance); moving.deltaPos2.x = step.x; moving.deltaPos2.y = step.y; moving.deltaPos2.z = step.z; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(90)); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 20) / 100.0f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.18f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 20) / 100.0f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.18f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].flag1[0] = 0; } // OFFSET: 0x00C1BDC0 @@ -644,49 +644,49 @@ void CRagEffect::IncAgility() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_IncAgility.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->speed = 1.5f; - EffectPrimitiveState& slow = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->speed = 1.5f; + EffectPrimitiveState& slow = *this->state.currentPrimitive; slow.accel = -(slow.speed / static_cast(slow.duration)) * 1.2f; - this->state.unknown_11C84->widthSize = 40.0f; - this->state.unknown_11C84->heightSize = 20.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 15.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 15; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\agi_up.bmp", 0, false, true, false); - this->state.unknown_11C84->slots[0].flag1[0] = 99; + this->state.currentPrimitive->widthSize = 40.0f; + this->state.currentPrimitive->heightSize = 20.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 15.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 15; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\agi_up.bmp", 0, false, true, false); + this->state.currentPrimitive->slots[0].flag1[0] = 99; } if ((this->state.stateCnt & 1) != 0) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 50; - EffectPrimitiveState& spin = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 50; + EffectPrimitiveState& spin = *this->state.currentPrimitive; reinterpret_cast(spin.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; const float distance = static_cast(std::max(rand() % 7, 0) + 2); const vector3d step = RotatedForward(moving.transform, distance); moving.deltaPos2.x = step.x; moving.deltaPos2.y = step.y; moving.deltaPos2.z = step.z; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(90)); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 20) / 100.0f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.18f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].flag1[0] = 99; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 20) / 100.0f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.18f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].flag1[0] = 99; } // OFFSET: 0x00C18490 @@ -702,80 +702,80 @@ void CRagEffect::Hit1() { facing += 360; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 10; - this->state.unknown_11C84->longitude = static_cast(facing); - this->state.unknown_11C84->latitude = -90.0f; - EffectPrimitiveState& flat = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 10; + this->state.currentPrimitive->longitude = static_cast(facing); + this->state.currentPrimitive->latitude = -90.0f; + EffectPrimitiveState& flat = *this->state.currentPrimitive; reinterpret_cast(flat.transform)->MakeXRotation(GetRadian(static_cast(flat.latitude))); - EffectPrimitiveState& facingRing = *this->state.unknown_11C84; + EffectPrimitiveState& facingRing = *this->state.currentPrimitive; reinterpret_cast(facingRing.transform)->AppendYRotation(GetRadian(static_cast(facingRing.longitude))); - this->state.unknown_11C84->deltaPos2 = {0.0f, -10.0f, 0.0f}; - this->state.unknown_11C84->speed = 0.7f; - EffectPrimitiveState& expanding = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; + this->state.currentPrimitive->speed = 0.7f; + EffectPrimitiveState& expanding = *this->state.currentPrimitive; expanding.accel = -(expanding.speed / static_cast(expanding.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->outerSize = 10.0f; - this->state.unknown_11C84->innerSize = 5.0f; - this->state.unknown_11C84->heightSize = 3.5f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive->outerSize = 10.0f; + this->state.currentPrimitive->innerSize = 5.0f; + this->state.currentPrimitive->heightSize = 3.5f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); if (g_serviceOptions.Get(0xe5) != 0) { return; } for (int count = 0; count < 2; ++count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& aimed = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); - EffectPrimitiveState& pitched = *this->state.unknown_11C84; + EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - EffectPrimitiveState& braking = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 0; count < 2; ++count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& aimed = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); - EffectPrimitiveState& pitched = *this->state.unknown_11C84; + EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; - EffectPrimitiveState& level = *this->state.unknown_11C84; + EffectPrimitiveState& level = *this->state.currentPrimitive; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - EffectPrimitiveState& braking = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; - EffectPrimitiveState& falling = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; + EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration) * 2.0f); - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -798,37 +798,37 @@ void CRagEffect::Hit2(int option) { int index = 0; for (float degree = 0.0f; degree < 360.0f; degree += 45.0f, ++index) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern = 1; - this->state.unknown_11C84->duration = std::max(0, rand() % 20) + 10; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern = 1; + this->state.currentPrimitive->duration = std::max(0, rand() % 20) + 10; const float heading = (degree - 15.0f) + static_cast(std::max(0, rand() % 30)); - this->state.unknown_11C84->roll = heading; - this->state.unknown_11C84->longitude = heading; - this->state.unknown_11C84->speed = static_cast(std::max(0, rand() % 45) + 5) / 10.0f; - EffectPrimitiveState& moving = *this->state.unknown_11C84; + this->state.currentPrimitive->roll = heading; + this->state.currentPrimitive->longitude = heading; + this->state.currentPrimitive->speed = static_cast(std::max(0, rand() % 45) + 5) / 10.0f; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.accel = -(moving.speed / static_cast(moving.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->widthSize = static_cast(std::max(0, rand() % 15) + 5); - this->state.unknown_11C84->heightSize = static_cast(std::max(0, rand() % 20) + 20); - EffectPrimitiveState& narrowing = *this->state.unknown_11C84; + this->state.currentPrimitive->widthSize = static_cast(std::max(0, rand() % 15) + 5); + this->state.currentPrimitive->heightSize = static_cast(std::max(0, rand() % 20) + 20); + EffectPrimitiveState& narrowing = *this->state.currentPrimitive; narrowing.widthSpeed = -(narrowing.widthSize / static_cast(narrowing.duration)); - this->state.unknown_11C84->heightSpeed = 1.5f; - this->state.unknown_11C84->heightAccel = 0.25f; + this->state.currentPrimitive->heightSpeed = 1.5f; + this->state.currentPrimitive->heightAccel = 0.25f; const float spread = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->deltaPos2.x = ClientSine(static_cast(degree)) * spread; - this->state.unknown_11C84->deltaPos2.y = ClientCosine(static_cast(degree)) * -spread; - this->state.unknown_11C84->deltaPos2.y -= 20.0f; + this->state.currentPrimitive->deltaPos2.x = ClientSine(static_cast(degree)) * spread; + this->state.currentPrimitive->deltaPos2.y = ClientCosine(static_cast(degree)) * -spread; + this->state.currentPrimitive->deltaPos2.y -= 20.0f; if (option != 0) { - this->state.unknown_11C84->red = 120; - this->state.unknown_11C84->green = 120; + this->state.currentPrimitive->red = 120; + this->state.currentPrimitive->green = 120; } - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha * 0.125f; - this->state.unknown_11C84->slots[0].life = 0; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load((index & 1) == 0 ? "effect\\lens1.tga" : "effect\\lens2.tga", 0, false, true, false); + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha * 0.125f; + this->state.currentPrimitive->slots[0].life = 0; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load((index & 1) == 0 ? "effect\\lens1.tga" : "effect\\lens2.tga", 0, false, true, false); } } @@ -1074,38 +1074,38 @@ void CRagEffect::SpearBmr() { } PlayEffectWave(*this, "effect\\EF_FireBall.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 15; - this->state.unknown_11C84->pattern |= 0x120u; - this->state.unknown_11C84->deltaPos2 = {0.0f, -15.0f, 0.0f}; - Owner(this->state.unknown_11C84).Face(this->state.deltaPos[0], this->state.deltaPos[2]); - this->state.unknown_11C84->longitude = -Owner(this->state.unknown_11C84).render.angle; - Owner(this->state.unknown_11C84).render.angle = 180.0f - Owner(this->state.unknown_11C84).render.angle; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 15; + this->state.currentPrimitive->pattern |= 0x120u; + this->state.currentPrimitive->deltaPos2 = {0.0f, -15.0f, 0.0f}; + Owner(this->state.currentPrimitive).Face(this->state.deltaPos[0], this->state.deltaPos[2]); + this->state.currentPrimitive->longitude = -Owner(this->state.currentPrimitive).render.angle; + Owner(this->state.currentPrimitive).render.angle = 180.0f - Owner(this->state.currentPrimitive).render.angle; - if (Owner(this->state.unknown_11C84).render.angle < 0.0f) { - Owner(this->state.unknown_11C84).render.angle = Owner(this->state.unknown_11C84).render.angle + 360.0f; + if (Owner(this->state.currentPrimitive).render.angle < 0.0f) { + Owner(this->state.currentPrimitive).render.angle = Owner(this->state.currentPrimitive).render.angle + 360.0f; } - CEffectPrim& particle = Owner(this->state.unknown_11C84); + CEffectPrim& particle = Owner(this->state.currentPrimitive); particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); - reinterpret_cast(this->state.unknown_11C84->transform)->MakeYRotation(GetRadian(static_cast(this->state.unknown_11C84->longitude))); - this->state.unknown_11C84->size = 1.0f; - this->state.unknown_11C84->animSpeed = 1; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeYRotation(GetRadian(static_cast(this->state.currentPrimitive->longitude))); + this->state.currentPrimitive->size = 1.0f; + this->state.currentPrimitive->animSpeed = 1; if (this->state.stateCnt != 0) { if (this->state.stateCnt == 4) { - this->state.unknown_11C84->alpha = 180.0f; + this->state.currentPrimitive->alpha = 180.0f; } else if (this->state.stateCnt == 8) { - this->state.unknown_11C84->alpha = 130.0f; + this->state.currentPrimitive->alpha = 130.0f; } else { - this->state.unknown_11C84->alpha = 80.0f; + this->state.currentPrimitive->alpha = 80.0f; } } this->SetAction(this->Get8Dir2(this->state.parent->render.angle, 1), 1, 1); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\창.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\창.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\창.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\창.act"); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C3BD40 @@ -1113,67 +1113,67 @@ void CRagEffect::SpearBmr() { void CRagEffect::SprayPond() { if (this->state.stateCnt == 0) { for (int angle = 0; angle < 360; angle += 45) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern = 2; - this->state.unknown_11C84->duration = 130; - EffectPrimitiveState& yaw = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern = 2; + this->state.currentPrimitive->duration = 130; + EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(static_cast(angle) + 22.5f))); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; const vector3d edge = RotatedForward(moving.transform, 12.2f); moving.deltaPos2.x = edge.x + 0.0f; moving.deltaPos2.y = edge.y - 2.0f; moving.deltaPos2.z = edge.z + 0.0f; - EffectPrimitiveState& facing = *this->state.unknown_11C84; + EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.rotTransform)->MakeYRotation(GetRadian(static_cast(static_cast(angle + 90) + 22.5f))); - this->state.unknown_11C84->alpha = 120.0f; - this->state.unknown_11C84->widthSize = 5.0f; - this->state.unknown_11C84->heightSize = 2.7f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\pond_water.bmp", 0, false, true, false); + this->state.currentPrimitive->alpha = 120.0f; + this->state.currentPrimitive->widthSize = 5.0f; + this->state.currentPrimitive->heightSize = 2.7f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pond_water.bmp", 0, false, true, false); } } if (this->state.stateCnt % 10 == 0) { for (int angle = 0; angle < 360; angle += 45) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - EffectPrimitiveState& yaw = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(static_cast(angle) + 22.5f))); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; const vector3d edge = RotatedForward(moving.transform, 13.8f); moving.deltaPos2.x = edge.x; moving.deltaPos2.y = edge.y; moving.deltaPos2.z = edge.z; - EffectPrimitiveState& roll = *this->state.unknown_11C84; + EffectPrimitiveState& roll = *this->state.currentPrimitive; reinterpret_cast(roll.rotTransform)->MakeZRotation(GetRadian(90)); - EffectPrimitiveState& facing = *this->state.unknown_11C84; + EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.rotTransform)->AppendYRotation(GetRadian(static_cast(static_cast(angle + 90) + 22.5f))); - this->state.unknown_11C84->alpha = 100.0f; - this->state.unknown_11C84->fadeOutCnt = 0; - this->state.unknown_11C84->widthSize = 5.5f; - this->state.unknown_11C84->heightSize = 1.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->alpha = 100.0f; + this->state.currentPrimitive->fadeOutCnt = 0; + this->state.currentPrimitive->widthSize = 5.5f; + this->state.currentPrimitive->heightSize = 1.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } } if (this->state.stateCnt % 20 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 25; - this->state.unknown_11C84->radius = 13.0f; - this->state.unknown_11C84->arcAngle = 10.0f; - this->state.unknown_11C84->size = 1.25f; - this->state.unknown_11C84->latitude = 90.0f; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 25; + this->state.currentPrimitive->radius = 13.0f; + this->state.currentPrimitive->arcAngle = 10.0f; + this->state.currentPrimitive->size = 1.25f; + this->state.currentPrimitive->latitude = 90.0f; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - this->state.unknown_11C84->radiusSpeed = 0.25f; - EffectPrimitiveState& growing = *this->state.unknown_11C84; + this->state.currentPrimitive->radiusSpeed = 0.25f; + EffectPrimitiveState& growing = *this->state.currentPrimitive; growing.radiusAccel = -(growing.radiusSpeed / growing.duration); - this->state.unknown_11C84->alpha = 100.0f; - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->alpha = 100.0f; + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } } @@ -1620,37 +1620,37 @@ void CRagEffect::Bash() { PlayEffectWave(*this, "effect\\EF_Bash.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->pattern |= 1; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->radius = 100.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 170.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->pattern |= 1; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->radius = 100.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 170.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); const int sparkCount = g_serviceOptions.Get(0xe5) != 0 ? 10 : 20; for (int spark = 0; spark < sparkCount; ++spark) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; - EffectPrimitiveState& current = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; + EffectPrimitiveState& current = *this->state.currentPrimitive; current.longAccel = -(current.longSpeed / static_cast(current.duration)) / 1.5f; - this->state.unknown_11C84->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; - this->state.unknown_11C84->heightSize = static_cast(std::max(rand() % 40, 0) + 20); - this->state.unknown_11C84->heightSpeed = static_cast(std::max(rand() % 30, 0) + 20) / 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; + this->state.currentPrimitive->heightSize = static_cast(std::max(rand() % 40, 0) + 20); + this->state.currentPrimitive->heightSpeed = static_cast(std::max(rand() % 30, 0) + 20) / 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } @@ -1728,8 +1728,8 @@ void CRagEffect::Blessing() { // INLINED static __forceinline void SpawnBottomQuad(CRagEffect& effect, const vector3d& velocity, int angle) { - effect.state.unknown_11C84 = &CreateEffectParticle(effect, effect.render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - EffectPrimitiveState& quad = *effect.state.unknown_11C84; + effect.state.currentPrimitive = &CreateEffectParticle(effect, effect.render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + EffectPrimitiveState& quad = *effect.state.currentPrimitive; quad.duration = 9999; quad.commonPattern = 1; quad.pattern = 0x28; @@ -1859,33 +1859,33 @@ void CRagEffect::Steal() { PlayEffectWave(*this, "effect\\EF_Steal.wav"); for (int count = 0; count < 10; ++count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& aimed = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); - EffectPrimitiveState& pitched = *this->state.unknown_11C84; + EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; - EffectPrimitiveState& level = *this->state.unknown_11C84; + EffectPrimitiveState& level = *this->state.currentPrimitive; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 50) / 100.0f; - EffectPrimitiveState& braking = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 50) / 100.0f; + EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - EffectPrimitiveState& falling = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration)) * 2.0f; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 100) / 100.0f; - EffectPrimitiveState& shrinking = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 100) / 100.0f; + EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / static_cast(shrinking.duration)); - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle7.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle7.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle7.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle7.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -2071,7 +2071,7 @@ void CRagEffect::Sphere() { (m[2] * 0.0f - m[5] * 30.0f) + distance * m[8] + m[11] }; this->state.lastPrim->state.chRadiSpeed = 1; - this->state.lastPrim->state.unknown_01D8 = 0; + this->state.lastPrim->state.colorCycleIndex = 0; this->state.lastPrim->state.chPoint.push_back(95.0f); this->state.lastPrim->state.chVal1.push_back(-0.15f); this->state.lastPrim->state.chVal2.push_back(this->state.lastPrim->state.radiusAccel); @@ -2153,34 +2153,34 @@ bool CRagEffect::Signum() { PlayEffectWave(*this, "effect\\EF_Signum.wav"); PlayEffectWave(*this, "effect\\EF_Bash.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->pattern |= 1; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->radius = 100.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 170.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->pattern |= 1; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->radius = 100.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 170.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); for (int ray = 0; ray < 20; ++ray) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 35; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->longSpeed = static_cast(std::max(0, rand() % 60) + 10) / 10.0f; - EffectPrimitiveState& turning = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 35; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->longSpeed = static_cast(std::max(0, rand() % 60) + 10) / 10.0f; + EffectPrimitiveState& turning = *this->state.currentPrimitive; turning.longAccel = -(turning.longSpeed / static_cast(turning.duration)) / 1.5f; - this->state.unknown_11C84->arcAngle = static_cast(std::max(0, rand() % 25) + 15) / 10.0f; - this->state.unknown_11C84->heightSize = static_cast(std::max(0, rand() % 60) + 30); - this->state.unknown_11C84->heightSpeed = static_cast(std::max(0, rand() % 35) + 95) / 10.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->arcAngle = static_cast(std::max(0, rand() % 25) + 15) / 10.0f; + this->state.currentPrimitive->heightSize = static_cast(std::max(0, rand() % 60) + 30); + this->state.currentPrimitive->heightSpeed = static_cast(std::max(0, rand() % 35) + 95) / 10.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } @@ -2280,34 +2280,34 @@ void CRagEffect::Entry() { bool CRagEffect::CartRevolution() { if (this->state.stateCnt == 7 || this->state.stateCnt == 20) { PlayEffectWave(*this, "effect\\EF_MagnumBreak.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->renderFlag |= 0x200u; - this->state.unknown_11C84->maxAlpha = 180.0f; - this->state.unknown_11C84->latitude = 90.0f; - this->state.unknown_11C84->radiusSpeed = 1.75f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->renderFlag |= 0x200u; + this->state.currentPrimitive->maxAlpha = 180.0f; + this->state.currentPrimitive->latitude = 90.0f; + this->state.currentPrimitive->radiusSpeed = 1.75f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * 0.5f; - this->state.unknown_11C84->innerSize = 5.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 15.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 15; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); + this->state.currentPrimitive->innerSize = 5.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 15.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 15; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->radiusSpeed = 1.35f; - EffectPrimitiveState& blast = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->radiusSpeed = 1.35f; + EffectPrimitiveState& blast = *this->state.currentPrimitive; blast.radiusAccel = -(blast.radiusSpeed / static_cast(blast.duration)) * 0.5f; - this->state.unknown_11C84->longSpeed = 3.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 240.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 7.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 15; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); + this->state.currentPrimitive->longSpeed = 3.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 240.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 7.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 15; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); } if (this->state.stateCnt < 300) { @@ -2423,18 +2423,18 @@ void CRagEffect::Exit() { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.duration = 100; - this->state.unknown_11C84->duration = 100; - this->state.unknown_11C84->outerSize = 4.5f; - this->state.unknown_11C84->innerSize = 4.5f; - this->state.unknown_11C84->heightSize = 35.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 90.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 30.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->duration = 100; + this->state.currentPrimitive->outerSize = 4.5f; + this->state.currentPrimitive->innerSize = 4.5f; + this->state.currentPrimitive->heightSize = 35.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 90.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 30.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); PlayEffectWave(*this, "_heal_effect.wav"); } @@ -2443,23 +2443,23 @@ void CRagEffect::Exit() { } if (this->state.stateCnt % 9 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; rand(); - this->state.unknown_11C84->radius = 3.0f; - this->state.unknown_11C84->duration = 50; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->gravSpeed = -1.2f; - EffectPrimitiveState& rise = *this->state.unknown_11C84; + this->state.currentPrimitive->radius = 3.0f; + this->state.currentPrimitive->duration = 50; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->gravSpeed = -1.2f; + EffectPrimitiveState& rise = *this->state.currentPrimitive; rise.gravAccel = -(rise.gravSpeed / static_cast(rise.duration)) / 1.5f; - EffectPrimitiveState& particle = *this->state.unknown_11C84; + EffectPrimitiveState& particle = *this->state.currentPrimitive; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); - this->state.unknown_11C84->deltaPos2 = RotatedForward(this->state.unknown_11C84->transform, this->state.unknown_11C84->radius); - this->state.unknown_11C84->size = 0.55f; - const int duration = this->state.unknown_11C84->duration; - this->state.unknown_11C84->fadeOutCnt = duration - duration / 3; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->deltaPos2 = RotatedForward(this->state.currentPrimitive->transform, this->state.currentPrimitive->radius); + this->state.currentPrimitive->size = 0.55f; + const int duration = this->state.currentPrimitive->duration; + this->state.currentPrimitive->fadeOutCnt = duration - duration / 3; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -2544,26 +2544,26 @@ bool CRagEffect::Potion_Berserk() { this->render.position = this->state.parent->render.position; if (static_cast(this->state.stateCnt - 13) < 97u && this->state.stateCnt % 4 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - EffectPrimitiveState& particle = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + EffectPrimitiveState& particle = *this->state.currentPrimitive; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& spot = *this->state.unknown_11C84; + EffectPrimitiveState& spot = *this->state.currentPrimitive; spot.deltaPos2 = RotatedForward(spot.transform, static_cast(std::max(rand() % 7, 0) + 2)); - reinterpret_cast(this->state.unknown_11C84->transform)->MakeXRotation(GetRadian(90)); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 20) / 60.0f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.2f; - this->state.unknown_11C84->red = 240; - this->state.unknown_11C84->green = 0; - this->state.unknown_11C84->blue = 0; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 180.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeXRotation(GetRadian(90)); + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 20) / 60.0f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.2f; + this->state.currentPrimitive->red = 240; + this->state.currentPrimitive->green = 0; + this->state.currentPrimitive->blue = 0; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 180.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); @@ -2800,25 +2800,25 @@ void CRagEffect::Rainbow(const char* name, int unused) { if (this->state.stateCnt == 0) { const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; this->render.position = this->state.parent->render.position; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 93, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->slots[0].alphaT = static_cast(camera->camera.yaw); - this->state.unknown_11C84->slots[0].alphaT = static_cast(360 - this->state.unknown_11C84->slots[0].alphaT); - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 50.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 180; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].riseAngle = this->state.unknown_11C84->slots[0].alphaT; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 93, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->slots[0].alphaT = static_cast(camera->camera.yaw); + this->state.currentPrimitive->slots[0].alphaT = static_cast(360 - this->state.currentPrimitive->slots[0].alphaT); + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 50.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 180; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].riseAngle = this->state.currentPrimitive->slots[0].alphaT; } } @@ -3008,24 +3008,24 @@ void CRagEffect::TexturedSpiral(const char* name, int, int) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 162, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 162, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].distance = 100.0f; - this->state.unknown_11C84->slots[index].alphaB = 255; - this->state.unknown_11C84->slots[index].riseAngle = static_cast((this->state.stateCnt * 4 + index) * 30); - this->state.unknown_11C84->slots[index].rotStart = 0; - this->state.unknown_11C84->slots[index].height[0] = -5.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].distance = 100.0f; + this->state.currentPrimitive->slots[index].alphaB = 255; + this->state.currentPrimitive->slots[index].riseAngle = static_cast((this->state.stateCnt * 4 + index) * 30); + this->state.currentPrimitive->slots[index].rotStart = 0; + this->state.currentPrimitive->slots[index].height[0] = -5.0f; } } @@ -3139,26 +3139,26 @@ void CRagEffect::TexturedSpiralSmall(const char* name, int, int) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 163, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 163, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 0; + this->state.currentPrimitive->slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 1; - this->state.unknown_11C84->slots[slot].process = 0; - this->state.unknown_11C84->slots[slot].distance = 50.0f; - this->state.unknown_11C84->slots[slot].alphaB = 255; - this->state.unknown_11C84->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); - this->state.unknown_11C84->slots[slot].rotStart = 0; - this->state.unknown_11C84->slots[slot].height[0] = -5.0f; - this->state.unknown_11C84->slots[slot].height[1] = 0.0f; + this->state.currentPrimitive->slots[slot].life = 1; + this->state.currentPrimitive->slots[slot].process = 0; + this->state.currentPrimitive->slots[slot].distance = 50.0f; + this->state.currentPrimitive->slots[slot].alphaB = 255; + this->state.currentPrimitive->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); + this->state.currentPrimitive->slots[slot].rotStart = 0; + this->state.currentPrimitive->slots[slot].height[0] = -5.0f; + this->state.currentPrimitive->slots[slot].height[1] = 0.0f; } } @@ -3174,27 +3174,27 @@ void CRagEffect::TexturedSpiralTall(const char* name, int, int) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 164, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 164, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 0; + this->state.currentPrimitive->slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 1; - this->state.unknown_11C84->slots[slot].process = 0; - this->state.unknown_11C84->slots[slot].distance = 100.0f; - this->state.unknown_11C84->slots[slot].maxHeight = 15.0f; - this->state.unknown_11C84->slots[slot].alphaB = 255; - this->state.unknown_11C84->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); - this->state.unknown_11C84->slots[slot].rotStart = 0; - this->state.unknown_11C84->slots[slot].height[0] = -5.0f; - this->state.unknown_11C84->slots[slot].height[1] = 0.0f; + this->state.currentPrimitive->slots[slot].life = 1; + this->state.currentPrimitive->slots[slot].process = 0; + this->state.currentPrimitive->slots[slot].distance = 100.0f; + this->state.currentPrimitive->slots[slot].maxHeight = 15.0f; + this->state.currentPrimitive->slots[slot].alphaB = 255; + this->state.currentPrimitive->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); + this->state.currentPrimitive->slots[slot].rotStart = 0; + this->state.currentPrimitive->slots[slot].height[0] = -5.0f; + this->state.currentPrimitive->slots[slot].height[1] = 0.0f; } } @@ -3210,28 +3210,28 @@ void CRagEffect::TexturedSpiralFade(const char* name, int, int) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 165, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 165, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 0; + this->state.currentPrimitive->slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 1; - this->state.unknown_11C84->slots[slot].process = 0; - this->state.unknown_11C84->slots[slot].distance = 0.0f; - this->state.unknown_11C84->slots[slot].height[10] = 0.0f; - this->state.unknown_11C84->slots[slot].maxHeight = 15.0f; - this->state.unknown_11C84->slots[slot].alphaB = 0; - this->state.unknown_11C84->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); - this->state.unknown_11C84->slots[slot].rotStart = 0; - this->state.unknown_11C84->slots[slot].height[0] = -5.0f; - this->state.unknown_11C84->slots[slot].height[1] = 0.0f; + this->state.currentPrimitive->slots[slot].life = 1; + this->state.currentPrimitive->slots[slot].process = 0; + this->state.currentPrimitive->slots[slot].distance = 0.0f; + this->state.currentPrimitive->slots[slot].height[10] = 0.0f; + this->state.currentPrimitive->slots[slot].maxHeight = 15.0f; + this->state.currentPrimitive->slots[slot].alphaB = 0; + this->state.currentPrimitive->slots[slot].riseAngle = static_cast((this->state.stateCnt * 4 + slot) * 30); + this->state.currentPrimitive->slots[slot].rotStart = 0; + this->state.currentPrimitive->slots[slot].height[0] = -5.0f; + this->state.currentPrimitive->slots[slot].height[1] = 0.0f; } } @@ -3449,27 +3449,27 @@ void CRagEffect::PurpleSlash(std::int16_t angle) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 92, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 92, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; const int offset = std::max(rand() % 6, 0); for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = index - 28 - offset; - this->state.unknown_11C84->slots[index].distance = 20.0f; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 5, 0)) + (this->render.position.y - 10.0f); - this->state.unknown_11C84->slots[index].rotStart = angle; - this->state.unknown_11C84->slots[index].height[1] = 0.8f; - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].flag1[1] = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = index - 28 - offset; + this->state.currentPrimitive->slots[index].distance = 20.0f; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 5, 0)) + (this->render.position.y - 10.0f); + this->state.currentPrimitive->slots[index].rotStart = angle; + this->state.currentPrimitive->slots[index].height[1] = 0.8f; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].flag1[1] = 0; } } @@ -3485,33 +3485,33 @@ void CRagEffect::TexturedPair(const char* name) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 76, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 4.0f; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].maxHeight = 10.0f; - this->state.unknown_11C84->slots[0].distance = 2.0f; - this->state.unknown_11C84->slots[0].height[0] = -8.0f; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 0; - this->state.unknown_11C84->slots[0].alphaB = 200; - this->state.unknown_11C84->slots[0].riseAngle = 0; - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].maxHeight = 10.0f; - this->state.unknown_11C84->slots[1].distance = 2.0f; - this->state.unknown_11C84->slots[1].height[0] = -8.0f; - this->state.unknown_11C84->slots[1].rotStart = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 0; - this->state.unknown_11C84->slots[1].alphaB = 200; - this->state.unknown_11C84->slots[1].riseAngle = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 76, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 4.0f; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].maxHeight = 10.0f; + this->state.currentPrimitive->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].height[0] = -8.0f; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[0].alphaB = 200; + this->state.currentPrimitive->slots[0].riseAngle = 0; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].maxHeight = 10.0f; + this->state.currentPrimitive->slots[1].distance = 2.0f; + this->state.currentPrimitive->slots[1].height[0] = -8.0f; + this->state.currentPrimitive->slots[1].rotStart = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[1].alphaB = 200; + this->state.currentPrimitive->slots[1].riseAngle = 0; } // OFFSET: 0x00C549C0 @@ -3730,98 +3730,98 @@ void CRagEffect::TexturedFourRing(const char* name, char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 90, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->renderFlag |= 5u; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 90, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->renderFlag |= 5u; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; const float scale = static_cast(kind); for (int index = 0; index < 2; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; if (kind == 0 || kind == 10 || kind == 20) { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(index) + 30.0f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(index) + 30.0f; } else { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(index) + 20.0f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(index) + 20.0f; } if (kind == 0 || kind == 10) { - this->state.unknown_11C84->slots[index].alphaB = 65; - this->state.unknown_11C84->slots[index].alphaT = 2415; + this->state.currentPrimitive->slots[index].alphaB = 65; + this->state.currentPrimitive->slots[index].alphaT = 2415; } else if (kind == 20) { - this->state.unknown_11C84->slots[index].alphaB = 65; - this->state.unknown_11C84->slots[index].alphaT = 2170; + this->state.currentPrimitive->slots[index].alphaB = 65; + this->state.currentPrimitive->slots[index].alphaT = 2170; } else { - this->state.unknown_11C84->slots[index].alphaB = 32; - this->state.unknown_11C84->slots[index].alphaT = kind == 21 ? 2140 : 2385; + this->state.currentPrimitive->slots[index].alphaB = 32; + this->state.currentPrimitive->slots[index].alphaT = kind == 21 ? 2140 : 2385; } if (kind >= 10 && kind < 20) { - this->state.unknown_11C84->slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); + this->state.currentPrimitive->slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); } if (kind == 10 || kind == 20) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(index) * 0.4f + 7.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(index) * 0.4f + 7.0f; } else if (kind == 11 || kind == 21) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(index) * 0.4f + 8.5f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(index) * 0.4f + 8.5f; } else if (kind == 0) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(index) * 0.4f + 12.5f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(index) * 0.4f + 12.5f; } else { - this->state.unknown_11C84->slots[index].height[0] = static_cast(index) * 0.4f + 14.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(index) * 0.4f + 14.0f; } - this->state.unknown_11C84->slots[index].height[1] = this->state.unknown_11C84->slots[index].height[0]; - this->state.unknown_11C84->slots[index].height[4] = scale; + this->state.currentPrimitive->slots[index].height[1] = this->state.currentPrimitive->slots[index].height[0]; + this->state.currentPrimitive->slots[index].height[4] = scale; } for (int index = 2; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; if (kind == 0 || kind == 10 || kind == 20) { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(index) + 30.0f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(index) + 30.0f; } else { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(index) + 20.0f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(index) + 20.0f; } if (kind == 10 || kind == 20) { - this->state.unknown_11C84->slots[index].distance = static_cast(index - 2) * 30.2f; + this->state.currentPrimitive->slots[index].distance = static_cast(index - 2) * 30.2f; } else if (kind == 11 || kind == 21) { - this->state.unknown_11C84->slots[index].distance = static_cast(index - 2) * 30.2f + 15.1f; + this->state.currentPrimitive->slots[index].distance = static_cast(index - 2) * 30.2f + 15.1f; } else if (kind == 0) { - this->state.unknown_11C84->slots[index].distance = static_cast(index - 2) * 53.2f; + this->state.currentPrimitive->slots[index].distance = static_cast(index - 2) * 53.2f; } else { - this->state.unknown_11C84->slots[index].distance = static_cast(index - 2) * 53.2f + 26.6f; + this->state.currentPrimitive->slots[index].distance = static_cast(index - 2) * 53.2f + 26.6f; } if (kind == 10 || kind == 20) { - this->state.unknown_11C84->slots[index].height[0] = 7.8f; + this->state.currentPrimitive->slots[index].height[0] = 7.8f; } else if (kind == 11 || kind == 21) { - this->state.unknown_11C84->slots[index].height[0] = 9.3f; + this->state.currentPrimitive->slots[index].height[0] = 9.3f; } else if (kind == 0) { - this->state.unknown_11C84->slots[index].height[0] = 13.3f; + this->state.currentPrimitive->slots[index].height[0] = 13.3f; } else { - this->state.unknown_11C84->slots[index].height[0] = 14.8f; + this->state.currentPrimitive->slots[index].height[0] = 14.8f; } - this->state.unknown_11C84->slots[index].height[1] = this->state.unknown_11C84->slots[index].height[0]; - this->state.unknown_11C84->slots[index].height[3] = kind >= 10 ? 18.6f : 26.6f; - this->state.unknown_11C84->slots[index].alphaB = 15; - this->state.unknown_11C84->slots[index].alphaT = kind < 20 ? 2415 : 2170; + this->state.currentPrimitive->slots[index].height[1] = this->state.currentPrimitive->slots[index].height[0]; + this->state.currentPrimitive->slots[index].height[3] = kind >= 10 ? 18.6f : 26.6f; + this->state.currentPrimitive->slots[index].alphaB = 15; + this->state.currentPrimitive->slots[index].alphaT = kind < 20 ? 2415 : 2170; if (kind >= 10 && kind < 20) { - this->state.unknown_11C84->slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); + this->state.currentPrimitive->slots[index].alphaT = static_cast(this->state.duration > 30000 ? 30000 : this->state.duration - 90); } - this->state.unknown_11C84->slots[index].height[4] = scale; + this->state.currentPrimitive->slots[index].height[4] = scale; } } @@ -3838,15 +3838,15 @@ void CRagEffect::TexturedSkillIcon(const char* name, std::int16_t level, std::in return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - this->state.unknown_11C84->textures = new CTexture*[this->state.unknown_11C84->totalTexture]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; if (mode == 2) { std::sprintf(iconName, "유저인터페이스\\item\\%s.bmp", CSkillInfo::IdName(*g_session.m_hotkeyScript, 2285)); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(iconName, 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(iconName, 0, false, true, false); } else if (level > 0) { int skillId; if (rand() % 2 == 0) { @@ -3856,37 +3856,37 @@ void CRagEffect::TexturedSkillIcon(const char* name, std::int16_t level, std::in } std::sprintf(iconName, "유저인터페이스\\item\\%s.bmp", CSkillInfo::IdName(*g_session.m_hotkeyScript, skillId)); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(iconName, 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(iconName, 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); } - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; if (level > 0) { - this->state.unknown_11C84->slots[0].distance = 5.0f; - this->state.unknown_11C84->slots[0].height[0] = 1.0f; - this->state.unknown_11C84->slots[0].flag1[4] = 4; + this->state.currentPrimitive->slots[0].distance = 5.0f; + this->state.currentPrimitive->slots[0].height[0] = 1.0f; + this->state.currentPrimitive->slots[0].flag1[4] = 4; } else { - this->state.unknown_11C84->slots[0].distance = mode == 3 ? 7.0f : 18.0f; - this->state.unknown_11C84->slots[0].height[0] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[4] = 1; + this->state.currentPrimitive->slots[0].distance = mode == 3 ? 7.0f : 18.0f; + this->state.currentPrimitive->slots[0].height[0] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[4] = 1; } - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].flag1[0] = 0; for (int index = 1; index < 21; ++index) { - this->state.unknown_11C84->slots[0].height[index] = 0.0f; + this->state.currentPrimitive->slots[0].height[index] = 0.0f; } - this->state.unknown_11C84->slots[0].flag1[5] = 0; + this->state.currentPrimitive->slots[0].flag1[5] = 0; } // OFFSET: 0x00C59960 @@ -4278,29 +4278,29 @@ void CRagEffect::FeatherBurst(const char* name, std::int16_t angle, char) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 91, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 10.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 91, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 10.0f; for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 0; + this->state.currentPrimitive->slots[slot].life = 0; } for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 1; - this->state.unknown_11C84->slots[slot].process = -std::max(0, rand() % 20); - this->state.unknown_11C84->slots[slot].maxHeight = static_cast(std::max(0, rand() % 11)) * 0.2f + 2.0f; - this->state.unknown_11C84->slots[slot].distance = 5.0f; - this->state.unknown_11C84->slots[slot].height[0] = -10.0f; - this->state.unknown_11C84->slots[slot].rotStart = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[slot].riseAngle = static_cast(slot * 45 + angle); - this->state.unknown_11C84->slots[slot].alphaB = 0; - this->state.unknown_11C84->slots[slot].fullDisplayAngle = static_cast(std::max(0, rand() % 91) + 180); - this->state.unknown_11C84->slots[slot].height[1] = static_cast(std::max(0, rand() % 4) + 3); + this->state.currentPrimitive->slots[slot].life = 1; + this->state.currentPrimitive->slots[slot].process = -std::max(0, rand() % 20); + this->state.currentPrimitive->slots[slot].maxHeight = static_cast(std::max(0, rand() % 11)) * 0.2f + 2.0f; + this->state.currentPrimitive->slots[slot].distance = 5.0f; + this->state.currentPrimitive->slots[slot].height[0] = -10.0f; + this->state.currentPrimitive->slots[slot].rotStart = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[slot].riseAngle = static_cast(slot * 45 + angle); + this->state.currentPrimitive->slots[slot].alphaB = 0; + this->state.currentPrimitive->slots[slot].fullDisplayAngle = static_cast(std::max(0, rand() % 91) + 180); + this->state.currentPrimitive->slots[slot].height[1] = static_cast(std::max(0, rand() % 4) + 3); } } @@ -4316,29 +4316,29 @@ void CRagEffect::FeatherRing(const char* name, std::int16_t angle, char large) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 77, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = large == 1 ? 10.0f : 4.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 77, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = large == 1 ? 10.0f : 4.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(rand() % 11, 0)) * 0.2f + 4.0f; - this->state.unknown_11C84->slots[index].distance = 14.0f; - this->state.unknown_11C84->slots[index].height[0] = -14.0f; - this->state.unknown_11C84->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(index * 45 + angle); - this->state.unknown_11C84->slots[index].alphaB = 100; - this->state.unknown_11C84->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 91, 0) + 180); - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(rand() % 4, 0) + 3); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(rand() % 11, 0)) * 0.2f + 4.0f; + this->state.currentPrimitive->slots[index].distance = 14.0f; + this->state.currentPrimitive->slots[index].height[0] = -14.0f; + this->state.currentPrimitive->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(index * 45 + angle); + this->state.currentPrimitive->slots[index].alphaB = 100; + this->state.currentPrimitive->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 91, 0) + 180); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(rand() % 4, 0) + 3); } } @@ -4478,7 +4478,7 @@ void CRagEffect::BubbleSpiral(int angle, const char*, char flag) { // OFFSET: 0x00C6D2C0 // FUNCTION: fn_20299 void CRagEffect::BubbleSpiralKind(int angle, const char*, char kind) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; char name[64]; const RenderObjectState& parent = this->state.parent->render; @@ -4494,7 +4494,7 @@ void CRagEffect::BubbleSpiralKind(int angle, const char*, char kind) { this->state.duration = 100; } - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 144, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 144, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; @@ -4749,36 +4749,36 @@ void CRagEffect::TexturedSprayKind(const char* name, float spin, char kind) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 43, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 43, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); this->render.position.y -= 12.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].vecBNow.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[index].vecBNow.y = this->state.deltaPos[1]; - this->state.unknown_11C84->slots[index].vecBNow.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[index].process = -18 - std::max(rand() % 30, 0); - this->state.unknown_11C84->slots[index].distance = 12.0f; - this->state.unknown_11C84->slots[index].height[0] = 1.0f; - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].height[1] = spin; - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].vecBNow.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[index].vecBNow.y = this->state.deltaPos[1]; + this->state.currentPrimitive->slots[index].vecBNow.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[index].process = -18 - std::max(rand() % 30, 0); + this->state.currentPrimitive->slots[index].distance = 12.0f; + this->state.currentPrimitive->slots[index].height[0] = 1.0f; + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[1] = spin; + this->state.currentPrimitive->slots[index].alphaB = 0; if (kind == 1) { - this->state.unknown_11C84->slots[index].flag1[0] = 6; + this->state.currentPrimitive->slots[index].flag1[0] = 6; } else if (kind == 7) { - this->state.unknown_11C84->slots[index].flag1[0] = 7; + this->state.currentPrimitive->slots[index].flag1[0] = 7; } else if (kind == 8) { - this->state.unknown_11C84->slots[index].flag1[0] = 8; + this->state.currentPrimitive->slots[index].flag1[0] = 8; } else { - this->state.unknown_11C84->slots[index].flag1[0] = kind == 9 ? 9 : 2; + this->state.currentPrimitive->slots[index].flag1[0] = kind == 9 ? 9 : 2; } } } @@ -4891,13 +4891,13 @@ void CRagEffect::TexturedSwirl(unsigned char clockwise, const char* name) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0x201; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0x201; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); - for (EffectPrimitiveSlot& slot : this->state.unknown_11C84->slots) { + for (EffectPrimitiveSlot& slot : this->state.currentPrimitive->slots) { slot.life = 1; slot.process = 0; slot.distance = 100.0f; @@ -5314,7 +5314,7 @@ void CRagEffect::GRANDCROSS2(char flag) { // OFFSET: 0x00C5B940 // FUNCTION: fn_20223 void CRagEffect::Magnum2(const char* name) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { this->state.count = 0; @@ -5328,7 +5328,7 @@ void CRagEffect::Magnum2(const char* name) { const unsigned int elapsed = static_cast(frame - 25); if (elapsed < 31) { if (frame % 3 == 0 && ++this->state.count < 11) { - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 73, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 73, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; stored()->state.totalTexture = 1; @@ -5514,40 +5514,40 @@ void CRagEffect::SonicWave(char sonic) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 86, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = sonic != 1 ? 1 : 4; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 86, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = sonic != 1 ? 1 : 4; + AllocateTextures(*this->state.currentPrimitive); if (sonic == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\sonic_wave1.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\sonic_wave2.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\sonic_wave3.tga", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\sonic_wave4.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\sonic_wave1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\sonic_wave2.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\sonic_wave3.tga", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\sonic_wave4.tga", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\purpleslash.tga", 0, false, true, false); } - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; - RenderObjectState& primRender = Owner(this->state.unknown_11C84).render; + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; + RenderObjectState& primRender = Owner(this->state.currentPrimitive).render; primRender.position.x = this->render.position.x; primRender.position.y = this->render.position.y; primRender.position.z = this->render.position.z; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].process = index - 28; - this->state.unknown_11C84->slots[index].distance = 20.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 5, 0)) + (this->render.position.y - 10.0f); - this->state.unknown_11C84->slots[index].rotStart = 0; - this->state.unknown_11C84->slots[index].height[1] = 0.8f; - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].flag1[1] = sonic; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].process = index - 28; + this->state.currentPrimitive->slots[index].distance = 20.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 5, 0)) + (this->render.position.y - 10.0f); + this->state.currentPrimitive->slots[index].rotStart = 0; + this->state.currentPrimitive->slots[index].height[1] = 0.8f; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].flag1[1] = sonic; } } @@ -5694,17 +5694,17 @@ void CRagEffect::TexturedScatterArc(const char* name, std::int16_t angle, std::i return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 94, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 94, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(0, rand() % 11)) * 0.2f + 2.5f; - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(0, rand() % 11)) * 0.2f + 2.5f; + this->state.currentPrimitive->slots[index].alphaB = 0; std::int16_t direction = static_cast(std::max(0, rand() % 90) + angle); if (direction >= 360) { @@ -5713,17 +5713,17 @@ void CRagEffect::TexturedScatterArc(const char* name, std::int16_t angle, std::i const float cosine = g_cosTable[direction]; const float sine = g_sinTable[direction]; - this->state.unknown_11C84->slots[index].process = -std::max(0, rand() % 11); - this->state.unknown_11C84->slots[index].riseAngle = direction; - this->state.unknown_11C84->slots[index].maxHeight = 0.03f; - this->state.unknown_11C84->slots[index].vecBPre.x = cosine * 4.0f; - this->state.unknown_11C84->slots[index].vecBPre.z = sine * 4.0f; - this->state.unknown_11C84->slots[index].vecBPre.y = 0.0f; - this->state.unknown_11C84->slots[index].vecBNow.y = -4.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].process = -std::max(0, rand() % 11); + this->state.currentPrimitive->slots[index].riseAngle = direction; + this->state.currentPrimitive->slots[index].maxHeight = 0.03f; + this->state.currentPrimitive->slots[index].vecBPre.x = cosine * 4.0f; + this->state.currentPrimitive->slots[index].vecBPre.z = sine * 4.0f; + this->state.currentPrimitive->slots[index].vecBPre.y = 0.0f; + this->state.currentPrimitive->slots[index].vecBNow.y = -4.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(0, rand() % 360)); } } @@ -5739,36 +5739,36 @@ void CRagEffect::LineStreak(std::int16_t kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0x201; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\line3y.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0x201; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\line3y.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].distance = 100.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].distance = 100.0f; if (kind % 10 == 0) { - this->state.unknown_11C84->slots[index].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); + this->state.currentPrimitive->slots[index].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); } else if (kind % 10 == 1) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; } - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(rand() % 200, 0)); - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(rand() % 4, 0)) * 0.1f + 0.3f; - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(rand() % 3, 0) + 0); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(rand() % 200, 0)); + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(rand() % 4, 0)) * 0.1f + 0.3f; + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(rand() % 3, 0) + 0); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; Get_Angle( - this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.unknown_11C84->slots[index].riseAngle + this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.currentPrimitive->slots[index].riseAngle ); - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].alphaB = 0; } } @@ -5784,38 +5784,38 @@ void CRagEffect::LineStreakKind(std::int16_t kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(kind < 10 ? "effect\\line3.tga" : "effect\\line3y.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(kind < 10 ? "effect\\line3.tga" : "effect\\line3y.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].distance = 100.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].distance = 100.0f; if (kind % 10 == 0) { - this->state.unknown_11C84->slots[index].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); + this->state.currentPrimitive->slots[index].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); } else if (kind % 10 == 1) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; } - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(rand() % 200, 0)); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(rand() % 200, 0)); if (kind < 10) { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(rand() % 4, 0)) * 0.1f + 0.3f; - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(rand() % 3, 0) + 30); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(rand() % 4, 0)) * 0.1f + 0.3f; + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(rand() % 3, 0) + 30); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; } Get_Angle( - this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.unknown_11C84->slots[index].riseAngle + this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.currentPrimitive->slots[index].riseAngle ); - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].alphaB = 0; } } @@ -5877,43 +5877,43 @@ void CRagEffect::TexturedCrossStaged(const char* name, char level) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 41, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 41, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); if (level < 2) { - this->state.unknown_11C84->size = 4.0f; + this->state.currentPrimitive->size = 4.0f; } else if (level == 2) { - this->state.unknown_11C84->size = 7.0f; + this->state.currentPrimitive->size = 7.0f; } else if (level == 3) { - this->state.unknown_11C84->size = 6.0f; + this->state.currentPrimitive->size = 6.0f; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = index * 30; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[index].maxHeight = 120.0f; - this->state.unknown_11C84->slots[index].rotStart = static_cast(index * 90); - this->state.unknown_11C84->slots[index].alphaB = 50; - this->state.unknown_11C84->slots[index].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = index * 30; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[index].maxHeight = 120.0f; + this->state.currentPrimitive->slots[index].rotStart = static_cast(index * 90); + this->state.currentPrimitive->slots[index].alphaB = 50; + this->state.currentPrimitive->slots[index].vecBNow.y = 0.0f; if (level == 0 || level > 1) { - this->state.unknown_11C84->slots[index].alphaB = 50; - this->state.unknown_11C84->slots[index].distance = static_cast(index) * 0.5f + 2.0f; + this->state.currentPrimitive->slots[index].alphaB = 50; + this->state.currentPrimitive->slots[index].distance = static_cast(index) * 0.5f + 2.0f; } else { - this->state.unknown_11C84->slots[index].alphaB = 70; - this->state.unknown_11C84->slots[index].distance = static_cast(index) * 0.5f + 11.0f; + this->state.currentPrimitive->slots[index].alphaB = 70; + this->state.currentPrimitive->slots[index].distance = static_cast(index) * 0.5f + 11.0f; } - this->state.unknown_11C84->slots[index].alphaT = 0; - this->state.unknown_11C84->slots[index].riseAngle = 89; + this->state.currentPrimitive->slots[index].alphaT = 0; + this->state.currentPrimitive->slots[index].riseAngle = 89; for (int height = 0; height < 21; ++height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[height] = 0; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[height] = 0; } } } @@ -5930,40 +5930,40 @@ void CRagEffect::ElectricArc(char kind, std::int16_t) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 102, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 102, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].alphaB = 0; Get_Angle( - this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.unknown_11C84->slots[index].riseAngle + this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.currentPrimitive->slots[index].riseAngle ); - this->state.unknown_11C84->slots[index].distance = 0.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(index < 2 ? index * 180 : index * 180 - 360); - this->state.unknown_11C84->slots[index].vecTNow.x = static_cast(std::max(rand() % 6, 0)) * 0.01f + 0.2f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[index].vecTNow.y = 20.0f; + this->state.currentPrimitive->slots[index].distance = 0.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(index < 2 ? index * 180 : index * 180 - 360); + this->state.currentPrimitive->slots[index].vecTNow.x = static_cast(std::max(rand() % 6, 0)) * 0.01f + 0.2f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].vecTNow.y = 20.0f; for (int height = 1; height < 21; ++height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; } - this->state.unknown_11C84->slots[index].alphaT = phase; + this->state.currentPrimitive->slots[index].alphaT = phase; } } @@ -6134,33 +6134,33 @@ void CRagEffect::PokBurst() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 52, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\pok2.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 52, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\pok2.tga", 0, false, true, false); this->render.position.x -= 15.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = -300 - std::max(rand() % 50, 0); - this->state.unknown_11C84->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].vecBNow = {this->render.position.x, this->render.position.y, this->render.position.z}; - this->state.unknown_11C84->slots[index].vecTPre = {this->render.position.x, this->render.position.y, this->render.position.z}; - this->state.unknown_11C84->slots[index].vecTNow = {this->render.position.x, this->render.position.y, this->render.position.z}; - this->state.unknown_11C84->slots[index].vecBPre = {this->render.position.x, this->render.position.y, this->render.position.z}; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].maxHeight = 2.0f; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(rand() % 5, 0)); - this->state.unknown_11C84->slots[index].flag1[1] = 0; - this->state.unknown_11C84->slots[index].flag1[3] = 0; - this->state.unknown_11C84->slots[index].flag1[2] = static_cast(std::max(rand() % 4, 0) * 20); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 100, 0)) * 0.004f + 0.4f; - this->state.unknown_11C84->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = -300 - std::max(rand() % 50, 0); + this->state.currentPrimitive->slots[index].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].vecBNow = {this->render.position.x, this->render.position.y, this->render.position.z}; + this->state.currentPrimitive->slots[index].vecTPre = {this->render.position.x, this->render.position.y, this->render.position.z}; + this->state.currentPrimitive->slots[index].vecTNow = {this->render.position.x, this->render.position.y, this->render.position.z}; + this->state.currentPrimitive->slots[index].vecBPre = {this->render.position.x, this->render.position.y, this->render.position.z}; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].maxHeight = 2.0f; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(rand() % 5, 0)); + this->state.currentPrimitive->slots[index].flag1[1] = 0; + this->state.currentPrimitive->slots[index].flag1[3] = 0; + this->state.currentPrimitive->slots[index].flag1[2] = static_cast(std::max(rand() % 4, 0) * 20); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 100, 0)) * 0.004f + 0.4f; + this->state.currentPrimitive->slots[index].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); } } @@ -6176,31 +6176,31 @@ void CRagEffect::TexturedTumble(const char* name, char) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 115, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 115, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int slot = 0; slot < 4; ++slot) { - this->state.unknown_11C84->slots[slot].life = 1; - this->state.unknown_11C84->slots[slot].maxHeight = 1.0f; - this->state.unknown_11C84->slots[slot].distance = static_cast(std::max(0, rand() % 6)) * 0.1f + 2.5f; - this->state.unknown_11C84->slots[slot].process = 0; - this->state.unknown_11C84->slots[slot].vecBPre = {0.0f, 0.0f, 0.0f}; - this->state.unknown_11C84->slots[slot].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[slot].height[2] = static_cast(std::max(0, rand() % 180)); - this->state.unknown_11C84->slots[slot].height[12] = 230.0f; - this->state.unknown_11C84->slots[slot].vecBNow = {0.0f, 0.0f, 0.0f}; - this->state.unknown_11C84->slots[slot].height[4] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[slot].height[6] = static_cast(std::max(0, rand() % 180)); - this->state.unknown_11C84->slots[slot].height[13] = 230.0f; - this->state.unknown_11C84->slots[slot].vecTPre = {0.0f, 0.0f, 0.0f}; - this->state.unknown_11C84->slots[slot].height[8] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[slot].height[10] = static_cast(std::max(0, rand() % 180)); - this->state.unknown_11C84->slots[slot].height[14] = 230.0f; - this->state.unknown_11C84->slots[slot].height[15] = static_cast(std::max(0, rand() % 3) + 1); + this->state.currentPrimitive->slots[slot].life = 1; + this->state.currentPrimitive->slots[slot].maxHeight = 1.0f; + this->state.currentPrimitive->slots[slot].distance = static_cast(std::max(0, rand() % 6)) * 0.1f + 2.5f; + this->state.currentPrimitive->slots[slot].process = 0; + this->state.currentPrimitive->slots[slot].vecBPre = {0.0f, 0.0f, 0.0f}; + this->state.currentPrimitive->slots[slot].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[slot].height[2] = static_cast(std::max(0, rand() % 180)); + this->state.currentPrimitive->slots[slot].height[12] = 230.0f; + this->state.currentPrimitive->slots[slot].vecBNow = {0.0f, 0.0f, 0.0f}; + this->state.currentPrimitive->slots[slot].height[4] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[slot].height[6] = static_cast(std::max(0, rand() % 180)); + this->state.currentPrimitive->slots[slot].height[13] = 230.0f; + this->state.currentPrimitive->slots[slot].vecTPre = {0.0f, 0.0f, 0.0f}; + this->state.currentPrimitive->slots[slot].height[8] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[slot].height[10] = static_cast(std::max(0, rand() % 180)); + this->state.currentPrimitive->slots[slot].height[14] = 230.0f; + this->state.currentPrimitive->slots[slot].height[15] = static_cast(std::max(0, rand() % 3) + 1); } } @@ -6216,44 +6216,44 @@ void CRagEffect::LineStreakTextured(std::int16_t kind, const char* name) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0x201; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0x201; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; const int mode = kind % 10; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].distance = 100.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].distance = 100.0f; if (mode == 0) { - this->state.unknown_11C84->slots[index].height[0] = -15.0f - static_cast(std::max(0, rand() % 11)); + this->state.currentPrimitive->slots[index].height[0] = -15.0f - static_cast(std::max(0, rand() % 11)); } else if (mode == 1) { - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(0, rand() % 11)) + 15.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(0, rand() % 11)) + 15.0f; } - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(0, rand() % 200)); - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(0, rand() % 6)) * 0.1f + 0.5f; - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(0, rand() % 31)) + 40.0f; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 10); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(0, rand() % 11)) * 0.1f + 1.0f; + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(0, rand() % 200)); + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(0, rand() % 6)) * 0.1f + 0.5f; + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(0, rand() % 31)) + 40.0f; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 10); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(0, rand() % 11)) * 0.1f + 1.0f; if (static_cast(kind - 20) < 10) { - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 33); + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 33); } else if (static_cast(kind - 30) < 10) { - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 36); + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(std::max(0, rand() % 3) + 36); } Get_Angle( - this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.unknown_11C84->slots[index].riseAngle + this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.currentPrimitive->slots[index].riseAngle ); - this->state.unknown_11C84->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].alphaB = 0; } } @@ -6328,28 +6328,28 @@ void CRagEffect::WeddingBurst(const char* name, char silent) { PlayEffectWave(*this, "effect\\wedding.wav"); } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 78, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 78, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(0, rand() % 31)) * 0.01f + 0.3f; - this->state.unknown_11C84->slots[index].rotStart = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(index * 45); - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(0, rand() % 101) - 50); - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(-110 - std::max(0, rand() % 50)); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(0, rand() % 101) - 50); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(0, rand() % 26)) * 0.01f + 0.25f; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(0, rand() % 31)) * 0.01f + 0.3f; + this->state.currentPrimitive->slots[index].rotStart = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(index * 45); + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(0, rand() % 101) - 50); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(-110 - std::max(0, rand() % 50)); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(0, rand() % 101) - 50); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(0, rand() % 26)) * 0.01f + 0.25f; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 0; } } @@ -6453,8 +6453,8 @@ void CRagEffect::TexturedScatterSphere(const char* name, char flag, int) { } CEffectPrim* particle = CreateEffectParticle(*this, this->render, 159, 0.0f, 0.0f, 0.0f, WorldObjects()); - this->state.unknown_11C84 = reinterpret_cast(particle); - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + this->state.currentPrimitive = reinterpret_cast(particle); + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(particle->state); @@ -6492,32 +6492,32 @@ void CRagEffect::DigitalSpace(int effectId) { } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 168, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 168, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; if (effectId == 1240) { - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\digital_space\\digital_space.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\digital_space\\digital_space.act"); - Owner(this->state.unknown_11C84).render.previousAnimation = 0; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 8; - this->state.unknown_11C84->renderFlag = 0x209; - this->state.unknown_11C84->pattern |= 0x200; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\digital_space\\digital_space.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\digital_space\\digital_space.act"); + Owner(this->state.currentPrimitive).render.previousAnimation = 0; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 8; + this->state.currentPrimitive->renderFlag = 0x209; + this->state.currentPrimitive->pattern |= 0x200; } } - if (this->state.parent && this->state.unknown_11C84) { - this->state.unknown_11C84->unknown_FA10 = this->state.parent->render.unknown_0128; - this->state.unknown_11C84->unknown_FA14 = this->state.parent->render.unknown_012C; + if (this->state.parent && this->state.currentPrimitive) { + this->state.currentPrimitive->spriteLiftLow = this->state.parent->render.hoverOffsetLow; + this->state.currentPrimitive->spriteLiftHigh = this->state.parent->render.hoverOffsetHigh; } - if (this->state.parent && this->state.unknown_11C84) { - this->state.unknown_11C84->alpha = static_cast(this->state.parent->render.unknown_0130[0] ? 70 : 255); + if (this->state.parent && this->state.currentPrimitive) { + this->state.currentPrimitive->alpha = static_cast(this->state.parent->render.unknown_0130[0] ? 70 : 255); } if (this->state.stateCnt == this->state.duration - 1) { this->state.stateCnt = 0; - this->state.unknown_11C84->stateCnt = 0; + this->state.currentPrimitive->stateCnt = 0; } } @@ -6533,27 +6533,27 @@ void CRagEffect::TexturedFloatingDust(const char* name, int) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 157, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 157, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(rand() % 51, 0)) * 0.01f + 2.5f; - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 31, 0)) * 0.1f + 7.0f; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].fullDisplayAngle = static_cast(rand() % 360); - this->state.unknown_11C84->slots[index].height[0] = static_cast(rand() % 33); - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(rand() % 21 - 80); - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(rand() % 3); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(rand() % 51, 0)) * 0.01f + 2.5f; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 31, 0)) * 0.1f + 7.0f; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].fullDisplayAngle = static_cast(rand() % 360); + this->state.currentPrimitive->slots[index].height[0] = static_cast(rand() % 33); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(rand() % 21 - 80); + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(rand() % 3); } } @@ -6569,41 +6569,41 @@ void CRagEffect::Mavka(char flag) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 152, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 152, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->size = 0.3f; - this->state.unknown_11C84->slots[index].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[index].vecBPre.y = 0.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = 0.0f; - this->state.unknown_11C84->slots[index].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[index].vecTPre.x = 0.0f; - this->state.unknown_11C84->slots[index].vecTPre.y = 0.0f; - this->state.unknown_11C84->slots[index].rotStart = 0; - this->state.unknown_11C84->slots[index].riseAngle = 0; - this->state.unknown_11C84->slots[index].distance = 2.0f; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->size = 0.3f; + this->state.currentPrimitive->slots[index].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[index].vecBPre.y = 0.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = 0.0f; + this->state.currentPrimitive->slots[index].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[index].vecTPre.x = 0.0f; + this->state.currentPrimitive->slots[index].vecTPre.y = 0.0f; + this->state.currentPrimitive->slots[index].rotStart = 0; + this->state.currentPrimitive->slots[index].riseAngle = 0; + this->state.currentPrimitive->slots[index].distance = 2.0f; for (int height = 0; height < 6; ++height) { - this->state.unknown_11C84->slots[index].height[height] = static_cast(rand() % 360); + this->state.currentPrimitive->slots[index].height[height] = static_cast(rand() % 360); } for (int height = 6; height < 12; ++height) { - this->state.unknown_11C84->slots[index].height[height] = static_cast(rand() % 360); + this->state.currentPrimitive->slots[index].height[height] = static_cast(rand() % 360); } - this->state.unknown_11C84->slots[index].flag1[0] = flag; + this->state.currentPrimitive->slots[index].flag1[0] = flag; } - this->state.unknown_11C84->alpha = 0.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mavka.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\mavka.act"); - this->state.unknown_11C84->animSpeed = 8; - this->state.unknown_11C84->renderFlag |= 0x200; - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->alpha = 0.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mavka.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\mavka.act"); + this->state.currentPrimitive->animSpeed = 8; + this->state.currentPrimitive->renderFlag |= 0x200; + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C77600 @@ -6617,34 +6617,34 @@ void CRagEffect::TexturedFanSweep(const char* name, char wide) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 146, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 146, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = index * -8; - this->state.unknown_11C84->slots[index].maxHeight = wide ? 20.0f : 30.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = index * -8; + this->state.currentPrimitive->slots[index].maxHeight = wide ? 20.0f : 30.0f; Get_Angle( - this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.unknown_11C84->slots[index].rotStart + this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, &this->state.currentPrimitive->slots[index].rotStart ); - this->state.unknown_11C84->slots[index].fullDisplayAngle = 315; - this->state.unknown_11C84->slots[index].rotStart += 195; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 315; + this->state.currentPrimitive->slots[index].rotStart += 195; - if (this->state.unknown_11C84->slots[index].rotStart >= 360) { - this->state.unknown_11C84->slots[index].rotStart -= 360; + if (this->state.currentPrimitive->slots[index].rotStart >= 360) { + this->state.currentPrimitive->slots[index].rotStart -= 360; } - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].distance = (wide ? 9.0f : 6.0f) - static_cast(index) * 0.1f; - this->state.unknown_11C84->slots[index].riseAngle = static_cast((14 - index) * 5); - this->state.unknown_11C84->slots[index].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.x = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.z = 0.0f; - this->state.unknown_11C84->slots[index].vecTPre.x = 0.0f; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].distance = (wide ? 9.0f : 6.0f) - static_cast(index) * 0.1f; + this->state.currentPrimitive->slots[index].riseAngle = static_cast((14 - index) * 5); + this->state.currentPrimitive->slots[index].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.x = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.z = 0.0f; + this->state.currentPrimitive->slots[index].vecTPre.x = 0.0f; } } @@ -6829,50 +6829,50 @@ void CRagEffect::ElectricFan(const char*, std::int16_t fade) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 135, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 135, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; if (index == 0) { - this->state.unknown_11C84->slots[0].alphaB = 250; + this->state.currentPrimitive->slots[0].alphaB = 250; } else { - this->state.unknown_11C84->slots[index].alphaB = static_cast(140 - index * 30); + this->state.currentPrimitive->slots[index].alphaB = static_cast(140 - index * 30); } - this->state.unknown_11C84->slots[index].riseAngle = static_cast(this->state.parent->render.angle - 90.0f); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(this->state.parent->render.angle - 90.0f); - if (this->state.unknown_11C84->slots[index].riseAngle < 0) { - this->state.unknown_11C84->slots[index].riseAngle += 360; + if (this->state.currentPrimitive->slots[index].riseAngle < 0) { + this->state.currentPrimitive->slots[index].riseAngle += 360; } - this->state.unknown_11C84->slots[index].distance = 20.0f; - this->state.unknown_11C84->slots[index].height[0] = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.x = static_cast(std::max(rand() % 11, 0)) * 0.01f + 0.0f; - this->state.unknown_11C84->slots[index].vecBNow = this->render.position; - this->state.unknown_11C84->slots[index].vecBNow.y -= 10.0f; - this->state.unknown_11C84->slots[index].vecTNow.y = 20.0f; + this->state.currentPrimitive->slots[index].distance = 20.0f; + this->state.currentPrimitive->slots[index].height[0] = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.x = static_cast(std::max(rand() % 11, 0)) * 0.01f + 0.0f; + this->state.currentPrimitive->slots[index].vecBNow = this->render.position; + this->state.currentPrimitive->slots[index].vecBNow.y -= 10.0f; + this->state.currentPrimitive->slots[index].vecTNow.y = 20.0f; for (int step = 20; step > 0; --step) { - this->state.unknown_11C84->slots[index].height[step] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[step] = 0; + this->state.currentPrimitive->slots[index].height[step] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[step] = 0; } - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].alphaT = fade; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].alphaT = fade; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 0; } } @@ -6929,69 +6929,69 @@ void CRagEffect::TexturedSpread(const char* name, char kind) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 137, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 137, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind < 2) { - this->state.unknown_11C84->size = 4.0f; + this->state.currentPrimitive->size = 4.0f; } else if (kind == 2) { - this->state.unknown_11C84->size = 7.0f; + this->state.currentPrimitive->size = 7.0f; } else if (kind == 3) { - this->state.unknown_11C84->size = 6.0f; + this->state.currentPrimitive->size = 6.0f; } else if (kind == 10) { - this->state.unknown_11C84->size = static_cast(rand() % 5 + 4); + this->state.currentPrimitive->size = static_cast(rand() % 5 + 4); } else if (kind == 11) { - this->state.unknown_11C84->size = 5.0f; + this->state.currentPrimitive->size = 5.0f; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[index].rotStart = static_cast(index * 90); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[index].rotStart = static_cast(index * 90); float radius; if (kind == 11) { - this->state.unknown_11C84->slots[index].alphaB = 50; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(index * 20) + 60.0f; - this->state.unknown_11C84->slots[index].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[index].process = rand() % 40 + 60; + this->state.currentPrimitive->slots[index].alphaB = 50; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(index * 20) + 60.0f; + this->state.currentPrimitive->slots[index].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[index].process = rand() % 40 + 60; radius = static_cast(rand() % 31) * 0.1f + 6.0f; } else { - this->state.unknown_11C84->slots[index].alphaB = 150; - this->state.unknown_11C84->slots[index].maxHeight = 120.0f; - this->state.unknown_11C84->slots[index].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[index].alphaB = 150; + this->state.currentPrimitive->slots[index].maxHeight = 120.0f; + this->state.currentPrimitive->slots[index].vecBNow.y = 0.0f; if (kind == 10) { - this->state.unknown_11C84->slots[index].process = rand() % 100; + this->state.currentPrimitive->slots[index].process = rand() % 100; radius = static_cast(rand() % 41); } else { - this->state.unknown_11C84->slots[index].process = rand() % 40 + 60; + this->state.currentPrimitive->slots[index].process = rand() % 40 + 60; radius = 5.0f; } } const std::int16_t angle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].vecBNow.x = radius * g_cosTable[angle]; - this->state.unknown_11C84->slots[index].vecBNow.z = radius * g_sinTable[angle]; - this->state.unknown_11C84->slots[index].distance = static_cast(rand() % 11) * 0.015f + 0.15f; - this->state.unknown_11C84->slots[index].alphaT = 0; - this->state.unknown_11C84->slots[index].riseAngle = 90; + this->state.currentPrimitive->slots[index].vecBNow.x = radius * g_cosTable[angle]; + this->state.currentPrimitive->slots[index].vecBNow.z = radius * g_sinTable[angle]; + this->state.currentPrimitive->slots[index].distance = static_cast(rand() % 11) * 0.015f + 0.15f; + this->state.currentPrimitive->slots[index].alphaT = 0; + this->state.currentPrimitive->slots[index].riseAngle = 90; for (int step = 0; step < 21; ++step) { - this->state.unknown_11C84->slots[index].height[step] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[step] = 0; + this->state.currentPrimitive->slots[index].height[step] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[step] = 0; } - this->state.unknown_11C84->slots[index].vecTPre.x = this->state.deltaPos[0] - this->render.position.x; - this->state.unknown_11C84->slots[index].vecTPre.y = this->state.deltaPos[1] - this->render.position.y; - this->state.unknown_11C84->slots[index].vecTPre.z = this->state.deltaPos[2] - this->render.position.z; + this->state.currentPrimitive->slots[index].vecTPre.x = this->state.deltaPos[0] - this->render.position.x; + this->state.currentPrimitive->slots[index].vecTPre.y = this->state.deltaPos[1] - this->render.position.y; + this->state.currentPrimitive->slots[index].vecTPre.z = this->state.deltaPos[2] - this->render.position.z; } } @@ -7490,7 +7490,7 @@ void CRagEffect::TexturedForkBolt(const char* name, char flag) { // OFFSET: 0x00C77F50 // FUNCTION: fn_20349 void CRagEffect::MonsterSpriteBurst(char kind) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; @@ -7509,7 +7509,7 @@ void CRagEffect::MonsterSpriteBurst(char kind) { return; } - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 153, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 153, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.duration = this->state.duration - this->state.stateCnt; for (int i = 0; i < 4; ++i) { stored()->state.slots[i].life = 0; @@ -7794,21 +7794,21 @@ void CRagEffect::TexturedDescendingRings(const char* name, char flag) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 141, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 141, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 0; + this->state.currentPrimitive->slots[i].life = 0; } for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = i * -10; - this->state.unknown_11C84->slots[i].distance = 20.0f; - this->state.unknown_11C84->slots[i].flag1[2] = 2; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = i * -10; + this->state.currentPrimitive->slots[i].distance = 20.0f; + this->state.currentPrimitive->slots[i].flag1[2] = 2; float drop; if (i == 0) { drop = 30.0f; @@ -7820,15 +7820,15 @@ void CRagEffect::TexturedDescendingRings(const char* name, char flag) { drop = 0.0f; } - this->state.unknown_11C84->slots[i].vecBPre.y = this->render.position.y - drop; - this->state.unknown_11C84->slots[i].fullDisplayAngle = 215; - this->state.unknown_11C84->slots[i].height[8] = 0.0f; - this->state.unknown_11C84->slots[i].alphaB = 255; - this->state.unknown_11C84->slots[i].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[i].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[i].rotStart = 0; - this->state.unknown_11C84->slots[i].flag1[0] = 0; - this->state.unknown_11C84->slots[i].flag1[4] = flag; + this->state.currentPrimitive->slots[i].vecBPre.y = this->render.position.y - drop; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 215; + this->state.currentPrimitive->slots[i].height[8] = 0.0f; + this->state.currentPrimitive->slots[i].alphaB = 255; + this->state.currentPrimitive->slots[i].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[i].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[i].rotStart = 0; + this->state.currentPrimitive->slots[i].flag1[0] = 0; + this->state.currentPrimitive->slots[i].flag1[4] = flag; } } @@ -7844,28 +7844,28 @@ void CRagEffect::TexturedQuadSpiral(const char* name) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 31, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 31, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (long long i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[i].maxHeight = 25.0f; - this->state.unknown_11C84->slots[i].riseAngle = 80; - this->state.unknown_11C84->slots[i].rotStart = static_cast(i * 90); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].alphaT = 5; - this->state.unknown_11C84->slots[i].distance = static_cast(i) + 1.0f; - this->state.unknown_11C84->slots[i].vecBNow.y = 0.0f; - this->state.unknown_11C84->accel = 99.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[i].maxHeight = 25.0f; + this->state.currentPrimitive->slots[i].riseAngle = 80; + this->state.currentPrimitive->slots[i].rotStart = static_cast(i * 90); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].alphaT = 5; + this->state.currentPrimitive->slots[i].distance = static_cast(i) + 1.0f; + this->state.currentPrimitive->slots[i].vecBNow.y = 0.0f; + this->state.currentPrimitive->accel = 99.0f; for (long long j = 0; j < 21; ++j) { - this->state.unknown_11C84->slots[i].height[j] = 0.0f; - this->state.unknown_11C84->slots[i].flag1[j] = 0; + this->state.currentPrimitive->slots[i].height[j] = 0.0f; + this->state.currentPrimitive->slots[i].flag1[j] = 0; } } } @@ -7921,40 +7921,40 @@ void CRagEffect::CloudBurst() { this->render.position.z = parent.position.z; if (this->state.stateCnt < 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos.z = this->state.deltaPos[2]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos.z = this->state.deltaPos[2]; const float targetX = this->state.deltaPos[0]; const float x = this->render.position.x; const float targetZ = this->state.deltaPos[2]; const float z = this->render.position.z; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = -std::max(rand() % 20, 0); - Get_Angle(targetX - x, targetZ - z, &this->state.unknown_11C84->slots[i].rotStart); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.x; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.z; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; - this->state.unknown_11C84->slots[i].vecBNow.x -= - g_cosTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecBNow.z -= - g_sinTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecTNow.x = this->state.unknown_11C84->slots[i].vecBNow.x; - this->state.unknown_11C84->slots[i].vecTNow.z = this->state.unknown_11C84->slots[i].vecBNow.z; - this->state.unknown_11C84->slots[i].vecTNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].maxHeight = 0.25f; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.2f + 20.0f; - this->state.unknown_11C84->slots[i].height[4] = 4.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = -std::max(rand() % 20, 0); + Get_Angle(targetX - x, targetZ - z, &this->state.currentPrimitive->slots[i].rotStart); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.x; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.z; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; + this->state.currentPrimitive->slots[i].vecBNow.x -= + g_cosTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecBNow.z -= + g_sinTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecTNow.x = this->state.currentPrimitive->slots[i].vecBNow.x; + this->state.currentPrimitive->slots[i].vecTNow.z = this->state.currentPrimitive->slots[i].vecBNow.z; + this->state.currentPrimitive->slots[i].vecTNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].maxHeight = 0.25f; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.2f + 20.0f; + this->state.currentPrimitive->slots[i].height[4] = 4.0f; } } @@ -7976,38 +7976,38 @@ void CRagEffect::CloudSpread() { this->render.position.z = parent.position.z; if (this->state.stateCnt < 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos.z = this->state.deltaPos[2]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos.z = this->state.deltaPos[2]; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = -std::max(rand() % 20, 0); - Get_Angle(dx, dz, &this->state.unknown_11C84->slots[i].rotStart); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.3f - 15.0f + this->render.position.x; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.3f - 15.0f + this->render.position.z; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].height[1] = 100.0f; - this->state.unknown_11C84->slots[i].vecBNow.x -= - g_cosTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecBNow.z -= - g_sinTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecTNow.x = this->state.unknown_11C84->slots[i].vecBNow.x; - this->state.unknown_11C84->slots[i].vecTNow.z = this->state.unknown_11C84->slots[i].vecBNow.z; - this->state.unknown_11C84->slots[i].vecTNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].maxHeight = 0.25f; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.5f + 100.0f; - this->state.unknown_11C84->slots[i].height[4] = 5.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = -std::max(rand() % 20, 0); + Get_Angle(dx, dz, &this->state.currentPrimitive->slots[i].rotStart); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.3f - 15.0f + this->render.position.x; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.3f - 15.0f + this->render.position.z; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].height[1] = 100.0f; + this->state.currentPrimitive->slots[i].vecBNow.x -= + g_cosTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecBNow.z -= + g_sinTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecTNow.x = this->state.currentPrimitive->slots[i].vecBNow.x; + this->state.currentPrimitive->slots[i].vecTNow.z = this->state.currentPrimitive->slots[i].vecBNow.z; + this->state.currentPrimitive->slots[i].vecTNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].maxHeight = 0.25f; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.5f + 100.0f; + this->state.currentPrimitive->slots[i].height[4] = 5.0f; } } @@ -8032,8 +8032,8 @@ void CRagEffect::FrostSplash(int, int) { this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; CEffectPrim* particle = CreateEffectParticle(*this, this->render, 150, 0.0f, 0.0f, 0.0f, WorldObjects()); - this->state.unknown_11C84 = reinterpret_cast(particle); - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + this->state.currentPrimitive = reinterpret_cast(particle); + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; stored()->state.totalTexture = 1; @@ -8150,7 +8150,7 @@ void CRagEffect::AssassinCloakingClear() { } this->state.parent->SetColor(50, 0, 0, 0); - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; } // OFFSET: 0x00C710C0 @@ -8170,27 +8170,27 @@ void CRagEffect::TintedRisingSparkles(char) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 50; - EffectPrimitiveState& particle = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 50; + EffectPrimitiveState& particle = *this->state.currentPrimitive; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); const float distance = static_cast(std::max(rand() % 7, 0) + 3); - this->state.unknown_11C84->deltaPos2 = RotatedForward(this->state.unknown_11C84->transform, distance); - this->state.unknown_11C84->deltaPos2.y -= 20.0f; - reinterpret_cast(this->state.unknown_11C84->transform)->MakeXRotation(GetRadian(-90)); - this->state.unknown_11C84->accel = 0.015f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.18f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->red = rand() % 3 == 0 ? 255 : 140; - this->state.unknown_11C84->green = rand() % 3 == 0 ? 255 : 140; - this->state.unknown_11C84->blue = rand() % 3 == 0 ? 255 : 140; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->deltaPos2 = RotatedForward(this->state.currentPrimitive->transform, distance); + this->state.currentPrimitive->deltaPos2.y -= 20.0f; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeXRotation(GetRadian(-90)); + this->state.currentPrimitive->accel = 0.015f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.18f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->red = rand() % 3 == 0 ? 255 : 140; + this->state.currentPrimitive->green = rand() % 3 == 0 ? 255 : 140; + this->state.currentPrimitive->blue = rand() % 3 == 0 ? 255 : 140; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } // OFFSET: 0x00C71C60 @@ -8256,29 +8256,29 @@ void CRagEffect::RocketPunch() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->pattern |= 0x100u; - this->state.unknown_11C84->deltaPos2 = {0.0f, -15.0f, 0.0f}; - Owner(this->state.unknown_11C84).Face(this->state.deltaPos[0], this->state.deltaPos[2]); - this->state.unknown_11C84->longitude = -Owner(this->state.unknown_11C84).render.angle; - if (Owner(this->state.unknown_11C84).render.angle < 0.0f) { - Owner(this->state.unknown_11C84).render.angle = Owner(this->state.unknown_11C84).render.angle + 360.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->pattern |= 0x100u; + this->state.currentPrimitive->deltaPos2 = {0.0f, -15.0f, 0.0f}; + Owner(this->state.currentPrimitive).Face(this->state.deltaPos[0], this->state.deltaPos[2]); + this->state.currentPrimitive->longitude = -Owner(this->state.currentPrimitive).render.angle; + if (Owner(this->state.currentPrimitive).render.angle < 0.0f) { + Owner(this->state.currentPrimitive).render.angle = Owner(this->state.currentPrimitive).render.angle + 360.0f; } - CEffectPrim& particle = Owner(this->state.unknown_11C84); + CEffectPrim& particle = Owner(this->state.currentPrimitive); particle.state.speed = -(particle.CalcDist(this->state.deltaPos[0], this->state.deltaPos[2]) / particle.state.duration); - reinterpret_cast(this->state.unknown_11C84->transform)->MakeYRotation(GetRadian(static_cast(this->state.unknown_11C84->longitude))); - this->state.unknown_11C84->size = 1.0f; - this->state.unknown_11C84->animSpeed = 1; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeYRotation(GetRadian(static_cast(this->state.currentPrimitive->longitude))); + this->state.currentPrimitive->size = 1.0f; + this->state.currentPrimitive->animSpeed = 1; if (this->state.stateCnt == 0) { - this->state.unknown_11C84->pattern |= 0x200u; + this->state.currentPrimitive->pattern |= 0x200u; } else { - this->state.unknown_11C84->alpha = static_cast((8 - this->state.stateCnt) * 10); + this->state.currentPrimitive->alpha = static_cast((8 - this->state.stateCnt) * 10); } - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\남_로켓트펀치.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\남_로켓트펀치.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\남_로켓트펀치.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\남_로켓트펀치.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; @@ -8288,16 +8288,16 @@ void CRagEffect::RocketPunch() { } if (direction >= 180 && direction < 270) { - Owner(this->state.unknown_11C84).SetAction(4, 16, 1); + Owner(this->state.currentPrimitive).SetAction(4, 16, 1); } else if (direction >= 90 && direction < 180) { - Owner(this->state.unknown_11C84).SetAction(6, 16, 1); + Owner(this->state.currentPrimitive).SetAction(6, 16, 1); } else if (direction >= 0 && direction < 90) { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(2, 16, 1); + Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C73120 @@ -8470,24 +8470,24 @@ void CRagEffect::TexturedQuadRing(std::int16_t baseAlpha, const char* name, char // INLINED static __forceinline void LaunchTwinkleRing(CRagEffect& effect, const char* name, char level) { - effect.state.unknown_11C84 = &CreateEffectParticle(effect, effect.render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - effect.state.unknown_11C84->renderFlag = 0; - effect.state.unknown_11C84->renderFlag |= 1u; - effect.state.unknown_11C84->renderFlag |= 5u; - effect.state.unknown_11C84->duration = effect.state.duration; - AllocateTextures(*effect.state.unknown_11C84); - effect.state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - effect.state.unknown_11C84->size = 1.0f; + effect.state.currentPrimitive = &CreateEffectParticle(effect, effect.render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + effect.state.currentPrimitive->renderFlag = 0; + effect.state.currentPrimitive->renderFlag |= 1u; + effect.state.currentPrimitive->renderFlag |= 5u; + effect.state.currentPrimitive->duration = effect.state.duration; + AllocateTextures(*effect.state.currentPrimitive); + effect.state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + effect.state.currentPrimitive->size = 1.0f; for (int i = 0; i < 4; ++i) { - effect.state.unknown_11C84->slots[i].life = 1; - effect.state.unknown_11C84->slots[i].process = i * -20; - effect.state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - effect.state.unknown_11C84->slots[i].maxHeight = 10.0f; - effect.state.unknown_11C84->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); - effect.state.unknown_11C84->slots[i].alphaB = 100; - effect.state.unknown_11C84->slots[i].height[4] = 10.0f; - effect.state.unknown_11C84->slots[i].height[3] = static_cast(i); - effect.state.unknown_11C84->slots[i].height[5] = static_cast(level); + effect.state.currentPrimitive->slots[i].life = 1; + effect.state.currentPrimitive->slots[i].process = i * -20; + effect.state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + effect.state.currentPrimitive->slots[i].maxHeight = 10.0f; + effect.state.currentPrimitive->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); + effect.state.currentPrimitive->slots[i].alphaB = 100; + effect.state.currentPrimitive->slots[i].height[4] = 10.0f; + effect.state.currentPrimitive->slots[i].height[3] = static_cast(i); + effect.state.currentPrimitive->slots[i].height[5] = static_cast(level); } } @@ -8543,76 +8543,76 @@ void CRagEffect::TetraVortexPillar(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 140, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 140, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; if (kind == 4) { - this->state.unknown_11C84->totalTexture = 8; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\tv-1.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\tv-2.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\tv-3.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\tv-4.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\tv-5.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[5] = g_texMgr.Load("effect\\tv-6.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[6] = g_texMgr.Load("effect\\tv-7.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[7] = g_texMgr.Load("effect\\tv-8.bmp", 0, false, true, false); + this->state.currentPrimitive->totalTexture = 8; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\tv-1.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\tv-2.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\tv-3.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\tv-4.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\tv-5.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[5] = g_texMgr.Load("effect\\tv-6.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[6] = g_texMgr.Load("effect\\tv-7.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[7] = g_texMgr.Load("effect\\tv-8.bmp", 0, false, true, false); } - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].life = 1; + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].life = 1; if (this->state.param[0] > 0.0f) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0]; + this->state.currentPrimitive->slots[0].distance = this->state.param[0]; } else { - this->state.unknown_11C84->slots[0].distance = 30.0f; + this->state.currentPrimitive->slots[0].distance = 30.0f; } - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 10.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 10.0f; if (kind == 4) { switch (this->state.type) { case EF_TETRA_FIRE: - this->state.unknown_11C84->slots[0].flag1[2] = 20; + this->state.currentPrimitive->slots[0].flag1[2] = 20; break; case EF_TETRA_WATER: - this->state.unknown_11C84->slots[0].flag1[2] = 18; + this->state.currentPrimitive->slots[0].flag1[2] = 18; break; case EF_TETRA_WIND: - this->state.unknown_11C84->slots[0].flag1[2] = 17; + this->state.currentPrimitive->slots[0].flag1[2] = 17; break; case EF_TETRA_GROUND: - this->state.unknown_11C84->slots[0].flag1[2] = 19; + this->state.currentPrimitive->slots[0].flag1[2] = 19; break; } - this->state.unknown_11C84->slots[0].fullDisplayAngle = 120; - this->state.unknown_11C84->slots[0].height[10] = 1.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 120; + this->state.currentPrimitive->slots[0].height[10] = 1.0f; } else { - this->state.unknown_11C84->slots[0].flag1[2] = 17; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 17; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; } - this->state.unknown_11C84->slots[0].height[8] = 0.0f; - this->state.unknown_11C84->slots[0].alphaB = 200; - this->state.unknown_11C84->slots[0].vecBNow.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[0].vecBNow.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[0].vecBNow.y = this->state.deltaPos[1] - 35.0f; - this->state.unknown_11C84->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].flag1[0] = 0; - this->state.unknown_11C84->slots[0].flag1[4] = kind; + this->state.currentPrimitive->slots[0].height[8] = 0.0f; + this->state.currentPrimitive->slots[0].alphaB = 200; + this->state.currentPrimitive->slots[0].vecBNow.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[0].vecBNow.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[0].vecBNow.y = this->state.deltaPos[1] - 35.0f; + this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].flag1[4] = kind; } // INLINED static __forceinline void LaunchFireballVolley(CRagEffect& effect, float turn, int shade, int fade) { CEffectPrim* particle = CreateEffectParticle(effect, effect.render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); - effect.state.unknown_11C84 = reinterpret_cast(particle); + effect.state.currentPrimitive = reinterpret_cast(particle); auto stored = [&]() -> CEffectPrim* { - return reinterpret_cast(effect.state.unknown_11C84); + return reinterpret_cast(effect.state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = 20; @@ -8772,39 +8772,39 @@ void CRagEffect::AlphaCenterStream() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos.z = this->state.deltaPos[2]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos.z = this->state.deltaPos[2]; const float dz = this->state.deltaPos[2] - this->render.position.z; const float dx = this->state.deltaPos[0] - this->render.position.x; const float range = SquareRoot(dz * dz + dx * dx); for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = -30 - std::max(rand() % 110, 0); - Get_Angle(dx, dz, &this->state.unknown_11C84->slots[i].rotStart); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.08f - 4.0f + this->render.position.x; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.08f - 4.0f + this->render.position.z; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; - this->state.unknown_11C84->slots[i].vecBNow.x -= - g_cosTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecBNow.z -= - g_sinTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecTNow.x = this->state.unknown_11C84->slots[i].vecBNow.x; - this->state.unknown_11C84->slots[i].vecTNow.z = this->state.unknown_11C84->slots[i].vecBNow.z; - this->state.unknown_11C84->slots[i].vecTNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].maxHeight = static_cast(std::max(rand() % 11, 0)) * 0.008f + 0.02f; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.06f + 4.0f; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.3f + range; - this->state.unknown_11C84->slots[i].height[4] = 3.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = -30 - std::max(rand() % 110, 0); + Get_Angle(dx, dz, &this->state.currentPrimitive->slots[i].rotStart); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.08f - 4.0f + this->render.position.x; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.08f - 4.0f + this->render.position.z; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; + this->state.currentPrimitive->slots[i].vecBNow.x -= + g_cosTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecBNow.z -= + g_sinTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecTNow.x = this->state.currentPrimitive->slots[i].vecBNow.x; + this->state.currentPrimitive->slots[i].vecTNow.z = this->state.currentPrimitive->slots[i].vecBNow.z; + this->state.currentPrimitive->slots[i].vecTNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(std::max(rand() % 11, 0)) * 0.008f + 0.02f; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.06f + 4.0f; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.3f + range; + this->state.currentPrimitive->slots[i].height[4] = 3.0f; } } @@ -8817,38 +8817,38 @@ void CRagEffect::CloudDrift() { this->render.position.z = parent.position.z; if (this->state.stateCnt < 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos.z = this->state.deltaPos[2]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 69, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos.z = this->state.deltaPos[2]; const float dx = this->state.deltaPos[0] - this->render.position.x; const float dz = this->state.deltaPos[2] - this->render.position.z; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = -std::max(rand() % 20, 0); - Get_Angle(dx, dz, &this->state.unknown_11C84->slots[i].rotStart); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.x; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.z; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; - this->state.unknown_11C84->slots[i].vecBNow.x -= - g_cosTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecBNow.z -= - g_sinTable[this->state.unknown_11C84->slots[i].rotStart] * this->state.unknown_11C84->slots[i].height[1]; - this->state.unknown_11C84->slots[i].vecTNow.x = this->state.unknown_11C84->slots[i].vecBNow.x; - this->state.unknown_11C84->slots[i].vecTNow.z = this->state.unknown_11C84->slots[i].vecBNow.z; - this->state.unknown_11C84->slots[i].vecTNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].maxHeight = 0.25f; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.2f + 20.0f; - this->state.unknown_11C84->slots[i].height[4] = 0.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = -std::max(rand() % 20, 0); + Get_Angle(dx, dz, &this->state.currentPrimitive->slots[i].rotStart); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.x; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 100, 0)) * 0.06f - 3.0f + this->render.position.z; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(rand() % 100, 0)) * 0.15f; + this->state.currentPrimitive->slots[i].vecBNow.x -= + g_cosTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecBNow.z -= + g_sinTable[this->state.currentPrimitive->slots[i].rotStart] * this->state.currentPrimitive->slots[i].height[1]; + this->state.currentPrimitive->slots[i].vecTNow.x = this->state.currentPrimitive->slots[i].vecBNow.x; + this->state.currentPrimitive->slots[i].vecTNow.z = this->state.currentPrimitive->slots[i].vecBNow.z; + this->state.currentPrimitive->slots[i].vecTNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].maxHeight = 0.25f; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 100, 0)) * 0.04f + 8.0f; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 100, 0)) * 0.2f + 20.0f; + this->state.currentPrimitive->slots[i].height[4] = 0.0f; } } @@ -8885,59 +8885,59 @@ void CRagEffect::ScatterItemIcons(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 123, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 123, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); if (kind == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("유저인터페이스\\item\\하얀허브.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("유저인터페이스\\item\\하얀허브.bmp", 0, false, true, false); } else if (kind == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("유저인터페이스\\item\\화이트슬림포션.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("유저인터페이스\\item\\화이트슬림포션.bmp", 0, false, true, false); } else if (kind == 2) { const char pick = static_cast(std::max(0, rand() % 3)); if (pick == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("유저인터페이스\\item\\화염병.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("유저인터페이스\\item\\화염병.bmp", 0, false, true, false); } else if (pick == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("유저인터페이스\\item\\염산병.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("유저인터페이스\\item\\염산병.bmp", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("유저인터페이스\\item\\알코올.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("유저인터페이스\\item\\알코올.bmp", 0, false, true, false); } } for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].height[7] = 3.0f; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].flag1[0] = 0; - this->state.unknown_11C84->slots[i].rotStart = static_cast(static_cast(this->state.duration) - 50); - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(0, rand() % 160) - 80); - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(0, rand() % 160) - 80); + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].height[7] = 3.0f; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].flag1[0] = 0; + this->state.currentPrimitive->slots[i].rotStart = static_cast(static_cast(this->state.duration) - 50); + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(0, rand() % 160) - 80); + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(0, rand() % 160) - 80); CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const int drop = rand() % 66; - this->state.unknown_11C84->slots[i].vecBNow.y = + this->state.currentPrimitive->slots[i].vecBNow.y = world->terrain->Height( - this->state.unknown_11C84->slots[i].vecBNow.x + this->render.position.x, this->state.unknown_11C84->slots[i].vecBNow.z + this->render.position.z + this->state.currentPrimitive->slots[i].vecBNow.x + this->render.position.x, this->state.currentPrimitive->slots[i].vecBNow.z + this->render.position.z ) - 5.0f - static_cast(std::max(drop, 0)); - this->state.unknown_11C84->slots[i].vecBNow.x = this->render.position.x + this->state.unknown_11C84->slots[i].vecBNow.x; - this->state.unknown_11C84->slots[i].vecBNow.z = this->render.position.z + this->state.unknown_11C84->slots[i].vecBNow.z; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 3.0f; - this->state.unknown_11C84->slots[i].height[8] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].flag1[2] = 7; + this->state.currentPrimitive->slots[i].vecBNow.x = this->render.position.x + this->state.currentPrimitive->slots[i].vecBNow.x; + this->state.currentPrimitive->slots[i].vecBNow.z = this->render.position.z + this->state.currentPrimitive->slots[i].vecBNow.z; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 3.0f; + this->state.currentPrimitive->slots[i].height[8] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].flag1[2] = 7; } } // OFFSET: 0x00C69910 // FUNCTION: fn_20290 void CRagEffect::Vallentine(char kind) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; @@ -8948,7 +8948,7 @@ void CRagEffect::Vallentine(char kind) { } PlayEffectWave(*this, "effect\\vallentine.wav"); - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.pattern |= 0x200u; stored()->state.duration = this->state.duration; stored()->state.deltaPos2.y = 0.0f; @@ -9297,18 +9297,18 @@ void CRagEffect::FrostScatter(char swapAxes, char narrow) { // INLINED static __forceinline void SetupRippleSlot(CRagEffect& effect, int slot, std::int16_t rotStart, float distance, std::int16_t riseAngle) { - effect.state.unknown_11C84->slots[slot].life = 1; - effect.state.unknown_11C84->slots[slot].process = 0; - effect.state.unknown_11C84->slots[slot].fullDisplayAngle = 360; - effect.state.unknown_11C84->slots[slot].rotStart = rotStart; - effect.state.unknown_11C84->slots[slot].alphaB = 0; - effect.state.unknown_11C84->slots[slot].distance = distance; - effect.state.unknown_11C84->slots[slot].maxHeight = effect.state.unknown_11C84->slots[slot].distance; - effect.state.unknown_11C84->slots[slot].riseAngle = riseAngle; - effect.state.unknown_11C84->slots[slot].vecBNow.y = 0.0f; + effect.state.currentPrimitive->slots[slot].life = 1; + effect.state.currentPrimitive->slots[slot].process = 0; + effect.state.currentPrimitive->slots[slot].fullDisplayAngle = 360; + effect.state.currentPrimitive->slots[slot].rotStart = rotStart; + effect.state.currentPrimitive->slots[slot].alphaB = 0; + effect.state.currentPrimitive->slots[slot].distance = distance; + effect.state.currentPrimitive->slots[slot].maxHeight = effect.state.currentPrimitive->slots[slot].distance; + effect.state.currentPrimitive->slots[slot].riseAngle = riseAngle; + effect.state.currentPrimitive->slots[slot].vecBNow.y = 0.0f; for (int j = 0; j < 21; ++j) { - effect.state.unknown_11C84->slots[slot].height[j] = 0.0f; - effect.state.unknown_11C84->slots[slot].flag1[j] = 0; + effect.state.currentPrimitive->slots[slot].height[j] = 0.0f; + effect.state.currentPrimitive->slots[slot].flag1[j] = 0; } } @@ -9318,15 +9318,15 @@ static __forceinline void LaunchRippleRings(CRagEffect& effect, const char* name effect.render.position.x = parent.position.x; effect.render.position.y = parent.position.y; effect.render.position.z = parent.position.z; - effect.state.unknown_11C84 = &CreateEffectParticle(effect, effect.render, 65, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - effect.state.unknown_11C84->renderFlag = 5; - effect.state.unknown_11C84->duration = effect.state.duration; - AllocateTextures(*effect.state.unknown_11C84); - effect.state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + effect.state.currentPrimitive = &CreateEffectParticle(effect, effect.render, 65, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + effect.state.currentPrimitive->renderFlag = 5; + effect.state.currentPrimitive->duration = effect.state.duration; + AllocateTextures(*effect.state.currentPrimitive); + effect.state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); if (kind == 0) { - effect.state.unknown_11C84->size = smallSize; + effect.state.currentPrimitive->size = smallSize; } else if (kind == 1) { - effect.state.unknown_11C84->size = 18.0f; + effect.state.currentPrimitive->size = 18.0f; } SetupRippleSlot(effect, 0, static_cast(270 + turn), 2.5f + growth, static_cast(53 - turn)); @@ -9351,49 +9351,49 @@ void CRagEffect::AlphaDownRipples(const char* name, char kind) { } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 99999999; - this->state.unknown_11C84->pattern |= 1u; - this->state.unknown_11C84->radius = 15.0f; - this->state.unknown_11C84->deltaPos2.y -= 1.5f; - this->state.unknown_11C84->latitude = 90.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 128.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 99999999; + this->state.currentPrimitive->pattern |= 1u; + this->state.currentPrimitive->radius = 15.0f; + this->state.currentPrimitive->deltaPos2.y -= 1.5f; + this->state.currentPrimitive->latitude = 90.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 128.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } if (this->state.stateCnt % 10 != 0) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->radius = static_cast(std::max(rand() % 200, 0) / 100) * 0.75f + 4.5f; - this->state.unknown_11C84->radiusSpeed = 0.0005f; - this->state.unknown_11C84->duration = 70; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->radius = static_cast(std::max(rand() % 200, 0) / 100) * 0.75f + 4.5f; + this->state.currentPrimitive->radiusSpeed = 0.0005f; + this->state.currentPrimitive->duration = 70; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); if (std::max(rand() % 2, 0) == 0) { - this->state.unknown_11C84->longSpeed = 2.5f - static_cast(std::max(rand() % 11, 0)) * 0.1f; + this->state.currentPrimitive->longSpeed = 2.5f - static_cast(std::max(rand() % 11, 0)) * 0.1f; } else { - this->state.unknown_11C84->longSpeed = static_cast(std::max(rand() % 11, 0)) * 0.1f - 2.5f; + this->state.currentPrimitive->longSpeed = static_cast(std::max(rand() % 11, 0)) * 0.1f - 2.5f; } - this->state.unknown_11C84->gravSpeed = -0.3f; - EffectPrimitiveState& falling = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -0.3f; + EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / falling.duration) / 1.5f; - EffectPrimitiveState& particle = *this->state.unknown_11C84; + EffectPrimitiveState& particle = *this->state.currentPrimitive; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(static_cast(particle.longitude))); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2 = RotatedForward(moving.transform, moving.radius); - this->state.unknown_11C84->size = static_cast(std::max(rand() % 10, 0) / 10) + 0.7f; - const int lifetime = this->state.unknown_11C84->duration; - this->state.unknown_11C84->fadeOutCnt = lifetime - lifetime / 3; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = static_cast(std::max(rand() % 10, 0) / 10) + 0.7f; + const int lifetime = this->state.currentPrimitive->duration; + this->state.currentPrimitive->fadeOutCnt = lifetime - lifetime / 3; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C0E820 @@ -9403,36 +9403,36 @@ bool CRagEffect::Coin() { const int coinCount = g_serviceOptions.Get(0xe5) != 0 ? 2 : 5; for (int coin = 0; coin < coinCount; ++coin) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = std::max(rand() % 30, 0) + 40; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 12, 0) * 30); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = std::max(rand() % 30, 0) + 40; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 12, 0) * 30); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; reinterpret_cast(launched.transform)->MakeYRotation(GetRadian(static_cast(launched.longitude))); const float distance = static_cast(std::max(rand() % 2, 0) + 2); - const vector3d offset = RotatedForward(this->state.unknown_11C84->transform, distance); - this->state.unknown_11C84->deltaPos2 = {offset.x + 0.0f, offset.y - 10.0f, offset.z + 0.0f}; + const vector3d offset = RotatedForward(this->state.currentPrimitive->transform, distance); + this->state.currentPrimitive->deltaPos2 = {offset.x + 0.0f, offset.y - 10.0f, offset.z + 0.0f}; - EffectPrimitiveState& turned = *this->state.unknown_11C84; + EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->MakeYRotation(GetRadian(static_cast(turned.longitude))); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 50) / 100.0f; - EffectPrimitiveState& thrown = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 50) / 100.0f; + EffectPrimitiveState& thrown = *this->state.currentPrimitive; thrown.accel = -(thrown.speed / static_cast(thrown.duration)) / 3.5f; - this->state.unknown_11C84->gravSpeed = -static_cast(std::max(rand() % 100, 0) + 50) / 25.0f; - EffectPrimitiveState& dropped = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 100, 0) + 50) / 25.0f; + EffectPrimitiveState& dropped = *this->state.currentPrimitive; dropped.gravAccel = -(dropped.gravSpeed / static_cast(dropped.duration) * 4.0f); - this->state.unknown_11C84->size = 2.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - this->state.unknown_11C84->playWaveType = 1; - this->state.unknown_11C84->animSpeed = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\동전.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\동전.act"); - this->state.unknown_11C84->numSegment = 2; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = 2.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + this->state.currentPrimitive->playWaveType = 1; + this->state.currentPrimitive->animSpeed = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\동전.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\동전.act"); + this->state.currentPrimitive->numSegment = 2; + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -9674,7 +9674,7 @@ void CRagEffect::SageMagicRod() { // OFFSET: 0x00C59610 // FUNCTION: fn_20213 void CRagEffect::SakuraFireArrow() { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; const RenderObjectState& parent = this->state.parent->render; this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; @@ -9690,7 +9690,7 @@ void CRagEffect::SakuraFireArrow() { return; } - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 124, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 124, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.duration = this->state.duration; stored()->state.slots[0].life = 1; stored()->state.slots[0].maxHeight = static_cast(std::max(0, rand() % 3) + 2) * 0.15f; @@ -9896,7 +9896,7 @@ void CRagEffect::AssassinCloaking() { } this->state.parent->SetColor(50, -1, -1, -1); - this->render.unknown_00A4Bytes[0] = 0; + this->render.visibilityOptions[0] = 0; } // OFFSET: 0x00C1E4A0 @@ -9914,53 +9914,53 @@ void CRagEffect::LockOnMarker() { this->render.position.z = parent.position.z; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern |= 0x800u; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->longSpeed = 4.5f; - this->state.unknown_11C84->roll = 90.0f; - this->state.unknown_11C84->changeWidthAccel = 0.0f; - this->state.unknown_11C84->changeHeightAccel = 0.0f; - this->state.unknown_11C84->widthSize = 30.0f; - this->state.unknown_11C84->heightSize = 30.0f; - this->state.unknown_11C84->widthSpeed = -1.0f; - this->state.unknown_11C84->heightSpeed = -1.0f; - this->state.unknown_11C84->changePoint = 20; - this->state.unknown_11C84->changeWidthSpeed = 0.0f; - this->state.unknown_11C84->changeHeightSpeed = 0.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->RGBCycleDelay = 20; - this->state.unknown_11C84->red = 250; - this->state.unknown_11C84->blue = 150; - this->state.unknown_11C84->blueSpeed = -15; - this->state.unknown_11C84->green = 150; - this->state.unknown_11C84->greenSpeed = -15; - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern |= 0x800u; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->longSpeed = 4.5f; + this->state.currentPrimitive->roll = 90.0f; + this->state.currentPrimitive->changeWidthAccel = 0.0f; + this->state.currentPrimitive->changeHeightAccel = 0.0f; + this->state.currentPrimitive->widthSize = 30.0f; + this->state.currentPrimitive->heightSize = 30.0f; + this->state.currentPrimitive->widthSpeed = -1.0f; + this->state.currentPrimitive->heightSpeed = -1.0f; + this->state.currentPrimitive->changePoint = 20; + this->state.currentPrimitive->changeWidthSpeed = 0.0f; + this->state.currentPrimitive->changeHeightSpeed = 0.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->RGBCycleDelay = 20; + this->state.currentPrimitive->red = 250; + this->state.currentPrimitive->blue = 150; + this->state.currentPrimitive->blueSpeed = -15; + this->state.currentPrimitive->green = 150; + this->state.currentPrimitive->greenSpeed = -15; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern |= 0x800u; - this->state.unknown_11C84->longitude = 45.0f; - this->state.unknown_11C84->longSpeed = 4.5f; - this->state.unknown_11C84->roll = 90.0f; - this->state.unknown_11C84->widthSize = 30.0f; - this->state.unknown_11C84->heightSize = 30.0f; - this->state.unknown_11C84->widthSpeed = -1.0f; - this->state.unknown_11C84->heightSpeed = -1.0f; - this->state.unknown_11C84->changePoint = 20; - this->state.unknown_11C84->changeWidthSpeed = 0.0f; - this->state.unknown_11C84->changeHeightSpeed = 0.0f; - this->state.unknown_11C84->changeWidthAccel = 0.0f; - this->state.unknown_11C84->changeHeightAccel = 0.0f; - this->state.unknown_11C84->RGBCycleDelay = 20; - this->state.unknown_11C84->red = 250; - this->state.unknown_11C84->blue = 150; - this->state.unknown_11C84->blueSpeed = -15; - this->state.unknown_11C84->green = 150; - this->state.unknown_11C84->greenSpeed = -15; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern |= 0x800u; + this->state.currentPrimitive->longitude = 45.0f; + this->state.currentPrimitive->longSpeed = 4.5f; + this->state.currentPrimitive->roll = 90.0f; + this->state.currentPrimitive->widthSize = 30.0f; + this->state.currentPrimitive->heightSize = 30.0f; + this->state.currentPrimitive->widthSpeed = -1.0f; + this->state.currentPrimitive->heightSpeed = -1.0f; + this->state.currentPrimitive->changePoint = 20; + this->state.currentPrimitive->changeWidthSpeed = 0.0f; + this->state.currentPrimitive->changeHeightSpeed = 0.0f; + this->state.currentPrimitive->changeWidthAccel = 0.0f; + this->state.currentPrimitive->changeHeightAccel = 0.0f; + this->state.currentPrimitive->RGBCycleDelay = 20; + this->state.currentPrimitive->red = 250; + this->state.currentPrimitive->blue = 150; + this->state.currentPrimitive->blueSpeed = -15; + this->state.currentPrimitive->green = 150; + this->state.currentPrimitive->greenSpeed = -15; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; @@ -10058,7 +10058,7 @@ void CRagEffect::SpawnBlurAfterimage() { return; } - const std::uint32_t action = this->state.parent->render.unknown_0070; + const std::uint32_t action = this->state.parent->render.state; if (action == 0 || action == 10 || action == 6 || action == 11 || action == 13) { return; } @@ -10192,31 +10192,31 @@ void CRagEffect::NapalmFragments() { PlayEffectWave(*this, "effect\\EF_NapalmBeat.wav"); } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; const int distance = std::max(rand() % 50, 0) + 10; const float radius = static_cast(distance); const float angle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->deltaPos2.x = ClientSine(static_cast(angle)) * radius; - this->state.unknown_11C84->deltaPos2.y = ClientCosine(static_cast(angle)) * -static_cast(distance); - this->state.unknown_11C84->deltaPos2.y -= 20.0f; + this->state.currentPrimitive->deltaPos2.x = ClientSine(static_cast(angle)) * radius; + this->state.currentPrimitive->deltaPos2.y = ClientCosine(static_cast(angle)) * -static_cast(distance); + this->state.currentPrimitive->deltaPos2.y -= 20.0f; const float size = static_cast(std::max(rand() % 40, 0) + 20); - this->state.unknown_11C84->heightSize = size; - this->state.unknown_11C84->widthSize = size; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + this->state.currentPrimitive->heightSize = size; + this->state.currentPrimitive->widthSize = size; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 3; - this->state.unknown_11C84->repeatAnim = 0; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->totalTexture = 8; - AllocateTextures(*this->state.unknown_11C84); - for (int index = 0; index < static_cast(this->state.unknown_11C84->totalTexture); ++index) { + this->state.currentPrimitive->repeatAnim = 0; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->totalTexture = 8; + AllocateTextures(*this->state.currentPrimitive); + for (int index = 0; index < static_cast(this->state.currentPrimitive->totalTexture); ++index) { char name[128]; std::sprintf(name, "effect\\폭발%d.TGA", index + 1); - this->state.unknown_11C84->textures[index] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[index] = g_texMgr.Load(name, 0, false, true, false); } - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].flag1[0] = 0; } // OFFSET: 0x00C20240 @@ -10575,22 +10575,22 @@ bool CRagEffect::OnProcess2() { case EF_DRAGONSMOKE: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2], WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->rollSpeed = 0.75f; - EffectPrimitiveState& tilted = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->rollSpeed = 0.75f; + EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(std::max(rand() % 30, 0) + 75)); - EffectPrimitiveState& turned = *this->state.unknown_11C84; + EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->AppendYRotation(GetRadian(std::max(rand() % 360, 0))); - this->state.unknown_11C84->deltaPos2.y = -9.0f; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; - this->state.unknown_11C84->size = 1.5f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2.y = -9.0f; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; + this->state.currentPrimitive->size = 1.5f; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 3; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; } @@ -10617,18 +10617,18 @@ void CRagEffect::StoneCurseRing() { this->state.duration = 9999; PlayEffectWave(*this, "effect\\EF_StoneCurse.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->arcAngle = 10.0f; - this->state.unknown_11C84->innerSize = 10.0f; - this->state.unknown_11C84->radiusSpeed = 7.0f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->arcAngle = 10.0f; + this->state.currentPrimitive->innerSize = 10.0f; + this->state.currentPrimitive->radiusSpeed = 7.0f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; const float slowdown = -(ring.radiusSpeed / (ring.duration + 40)); ring.radiusAccel = slowdown + slowdown; - this->state.unknown_11C84->fadeOutCnt = 0; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->fadeOutCnt = 0; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } // OFFSET: 0x00C49300 @@ -10646,154 +10646,154 @@ void CRagEffect::SkyCloud(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 33, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1u; - this->state.unknown_11C84->renderFlag |= 5u; - this->state.unknown_11C84->duration = this->state.duration; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 33, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1u; + this->state.currentPrimitive->renderFlag |= 5u; + this->state.currentPrimitive->duration = this->state.duration; if (kind == 3) { - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); const char pick = static_cast(std::max(rand() % 3, 0)); if (pick == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\fog1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\fog1.tga", 0, false, true, false); } else if (pick == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\fog2.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\fog2.tga", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\fog3.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\fog3.tga", 0, false, true, false); } } else if (kind == 9 || kind == 15) { - this->state.unknown_11C84->totalTexture = 6; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\star01.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\star02.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\star03.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\star04.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\star05.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[5] = g_texMgr.Load("effect\\star06.bmp", 0, false, true, false); + this->state.currentPrimitive->totalTexture = 6; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\star01.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\star02.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\star03.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\star04.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\star05.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[5] = g_texMgr.Load("effect\\star06.bmp", 0, false, true, false); } else { - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); const char pick = static_cast(std::max(rand() % 3, 0)); if (pick == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud4.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud4.tga", 0, false, true, false); } else if (pick == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud1.tga", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud2.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud2.tga", 0, false, true, false); } } const float layer = static_cast(kind); for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].height[7] = layer; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 45; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].height[7] = layer; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 45; if (kind == 0) { - this->state.unknown_11C84->slots[index].height[6] = -152.0f; + this->state.currentPrimitive->slots[index].height[6] = -152.0f; - if (this->render.position.y > this->state.unknown_11C84->slots[index].height[6]) { - this->state.unknown_11C84->slots[index].process = 300; + if (this->render.position.y > this->state.currentPrimitive->slots[index].height[6]) { + this->state.currentPrimitive->slots[index].process = 300; } } - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].rotStart = static_cast(std::max(rand() % 200, 0) + 300); + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].rotStart = static_cast(std::max(rand() % 200, 0) + 300); if (kind == 0) { - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) - 125.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) - 125.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); } else if (kind == 2) { - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 0.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 0.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); } else if (kind == 3) { - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); const CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const EffectPrimitiveSlot& slot = this->state.unknown_11C84->slots[index]; - this->state.unknown_11C84->slots[index].vecBNow.y = + const EffectPrimitiveSlot& slot = this->state.currentPrimitive->slots[index]; + this->state.currentPrimitive->slots[index].vecBNow.y = mode->scene->terrain->Height(slot.vecBNow.x + this->render.position.x, this->render.position.z + slot.vecBNow.z) - 20.0f - static_cast(std::max(rand() % 5, 0)); } else if (kind == 5) { - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 20.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 20.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 300, 0) - 150); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 300, 0) - 150); } else if (kind == 9 || kind == 15) { - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 80.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 200, 0) + 25); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 200, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 80.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 200, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 200, 0) + 25); if (std::string(static_cast(g_modeMgr.GetGameMode())->mapName) == "ecl_fild01.rsw") { - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 400, 0) + 25); - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 400, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 400, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 400, 0) + 25); } if (std::max(rand() % 2, 0) == 0) { - this->state.unknown_11C84->slots[index].vecBNow.x = this->state.unknown_11C84->slots[index].vecBNow.x * -1.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->state.currentPrimitive->slots[index].vecBNow.x * -1.0f; } if (std::max(rand() % 2, 0) == 0) { - this->state.unknown_11C84->slots[index].vecBNow.z = this->state.unknown_11C84->slots[index].vecBNow.z * -1.0f; + this->state.currentPrimitive->slots[index].vecBNow.z = this->state.currentPrimitive->slots[index].vecBNow.z * -1.0f; } } else { - this->state.unknown_11C84->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 40.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = static_cast(std::max(rand() % 200, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.y = static_cast(std::max(rand() % 10, 0)) + 40.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = static_cast(std::max(rand() % 200, 0) + 25); if (std::max(rand() % 2, 0) == 0) { - this->state.unknown_11C84->slots[index].vecBNow.x = this->state.unknown_11C84->slots[index].vecBNow.x * -1.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->state.currentPrimitive->slots[index].vecBNow.x * -1.0f; } - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(std::max(rand() % 200, 0) + 25); + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(std::max(rand() % 200, 0) + 25); if (std::max(rand() % 2, 0) == 0) { - this->state.unknown_11C84->slots[index].vecBNow.z = this->state.unknown_11C84->slots[index].vecBNow.z * -1.0f; + this->state.currentPrimitive->slots[index].vecBNow.z = this->state.currentPrimitive->slots[index].vecBNow.z * -1.0f; } } - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x + this->state.unknown_11C84->slots[index].vecBNow.x; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z + this->state.unknown_11C84->slots[index].vecBNow.z; - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x + this->state.currentPrimitive->slots[index].vecBNow.x; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z + this->state.currentPrimitive->slots[index].vecBNow.z; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(rand() % 360, 0)); if (kind == 3) { - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 10, 0)) + 35.0f; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 10, 0)) + 35.0f; } else { - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 20, 0)) + 30.0f; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 20, 0)) + 30.0f; } - this->state.unknown_11C84->slots[index].height[8] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].height[8] = static_cast(std::max(rand() % 360, 0)); if (kind == 3) { - this->state.unknown_11C84->slots[index].flag1[2] = 12; + this->state.currentPrimitive->slots[index].flag1[2] = 12; } else if (kind == 5) { - this->state.unknown_11C84->slots[index].flag1[2] = 14; + this->state.currentPrimitive->slots[index].flag1[2] = 14; } else if (kind == 7) { - this->state.unknown_11C84->slots[index].flag1[2] = 16; + this->state.currentPrimitive->slots[index].flag1[2] = 16; } else if (kind == 8) { - this->state.unknown_11C84->slots[index].flag1[2] = 17; + this->state.currentPrimitive->slots[index].flag1[2] = 17; } else if (kind == 9) { - this->state.unknown_11C84->slots[index].flag1[2] = 23; + this->state.currentPrimitive->slots[index].flag1[2] = 23; } else if (kind == 15) { - this->state.unknown_11C84->slots[index].flag1[2] = 25; + this->state.currentPrimitive->slots[index].flag1[2] = 25; } else if (kind == 11) { - this->state.unknown_11C84->slots[index].flag1[2] = 14; + this->state.currentPrimitive->slots[index].flag1[2] = 14; } else if (kind == 12) { - this->state.unknown_11C84->slots[index].flag1[2] = 16; + this->state.currentPrimitive->slots[index].flag1[2] = 16; } else if (kind == 13) { - this->state.unknown_11C84->slots[index].flag1[2] = 17; + this->state.currentPrimitive->slots[index].flag1[2] = 17; } else { - this->state.unknown_11C84->slots[index].flag1[2] = kind == 14 ? 24 : 0; + this->state.currentPrimitive->slots[index].flag1[2] = kind == 14 ? 24 : 0; } } } @@ -10862,43 +10862,43 @@ void CRagEffect::ElectricRingEarly(char kind, std::int16_t angle) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 101, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 101, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\elec1.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].riseAngle = static_cast(index * 45 + angle); - this->state.unknown_11C84->slots[index].distance = 0.0f; - this->state.unknown_11C84->slots[index].height[0] = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.x = static_cast(std::max(rand() % 11, 0)) * 0.01f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[index].vecBNow.y -= 5.0f; - this->state.unknown_11C84->slots[index].vecTNow.y = 20.0f; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].riseAngle = static_cast(index * 45 + angle); + this->state.currentPrimitive->slots[index].distance = 0.0f; + this->state.currentPrimitive->slots[index].height[0] = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.x = static_cast(std::max(rand() % 11, 0)) * 0.01f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].vecBNow.y -= 5.0f; + this->state.currentPrimitive->slots[index].vecTNow.y = 20.0f; for (int height = 20; height > 0; --height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[height] = 0; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[height] = 0; } - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].alphaT = phase; - this->state.unknown_11C84->slots[index].fullDisplayAngle = 3; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].alphaT = phase; + this->state.currentPrimitive->slots[index].fullDisplayAngle = 3; } } @@ -11016,40 +11016,40 @@ void CRagEffect::WhiteSparks(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 70, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1; - this->state.unknown_11C84->renderFlag |= 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 70, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1; + this->state.currentPrimitive->renderFlag |= 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = -std::max(rand() % 26, 0); - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 8, 0)) + 6.0f; - this->state.unknown_11C84->slots[index].flag1[0] = 0; - this->state.unknown_11C84->slots[index].height[0] = 0.0f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = -std::max(rand() % 26, 0); + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 8, 0)) + 6.0f; + this->state.currentPrimitive->slots[index].flag1[0] = 0; + this->state.currentPrimitive->slots[index].height[0] = 0.0f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; for (int height = 20; height > 0; --height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[height] = 0; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[height] = 0; } - this->state.unknown_11C84->slots[index].alphaT = phase; + this->state.currentPrimitive->slots[index].alphaT = phase; } } @@ -11110,45 +11110,45 @@ void CRagEffect::Waterfall(const char* name, char flag, char tall, char variant) this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); if (variant == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); } else if (variant == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); } int width = 80; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].alphaB = 80; - this->state.unknown_11C84->slots[index].flag1[0] = flag; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].alphaB = 80; + this->state.currentPrimitive->slots[index].flag1[0] = flag; if (tall == 0) { - this->state.unknown_11C84->slots[index].distance = static_cast(index + 36); + this->state.currentPrimitive->slots[index].distance = static_cast(index + 36); } else if (tall == 1) { - this->state.unknown_11C84->slots[index].distance = static_cast(index + 18); + this->state.currentPrimitive->slots[index].distance = static_cast(index + 18); } - this->state.unknown_11C84->slots[index].flag1[2] = static_cast(static_cast(this->state.param[0])); + this->state.currentPrimitive->slots[index].flag1[2] = static_cast(static_cast(this->state.param[0])); for (int height = 0; height < 20; ++height) { - this->state.unknown_11C84->slots[index].height[height] = static_cast(height * 40); + this->state.currentPrimitive->slots[index].height[height] = static_cast(height * 40); } - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(index) - 1.0f; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(width); - this->state.unknown_11C84->slots[index].flag1[1] = 0; + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(index) - 1.0f; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(width); + this->state.currentPrimitive->slots[index].flag1[1] = 0; width -= 13; if (width < 29) { @@ -11169,41 +11169,41 @@ bool CRagEffect::GlassWall() { const float* m = rotation.values; for (int side = 1; side > -2; side -= 2) { const float along = static_cast(side) * 2.6f; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern = 40; - this->state.unknown_11C84->type = 50; - this->state.unknown_11C84->deltaPos2 = RotatedForward(m, along); - this->state.unknown_11C84->longitude = static_cast(angle + 90); - this->state.unknown_11C84->widthSize = 3.0f; - this->state.unknown_11C84->heightSize = 40.0f; - this->state.unknown_11C84->heightSpeed = 0.25f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 180.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern = 40; + this->state.currentPrimitive->type = 50; + this->state.currentPrimitive->deltaPos2 = RotatedForward(m, along); + this->state.currentPrimitive->longitude = static_cast(angle + 90); + this->state.currentPrimitive->widthSize = 3.0f; + this->state.currentPrimitive->heightSize = 40.0f; + this->state.currentPrimitive->heightSpeed = 0.25f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 180.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); const float across = static_cast(side) * 3.0f; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern = 40; - this->state.unknown_11C84->type = 50; - this->state.unknown_11C84->deltaPos2 = { + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern = 40; + this->state.currentPrimitive->type = 50; + this->state.currentPrimitive->deltaPos2 = { across * m[0] + m[3] * 0.0f + m[6] * 0.0f + m[9], across * m[1] + m[4] * 0.0f + m[7] * 0.0f + m[10], across * m[2] + m[5] * 0.0f + m[8] * 0.0f + m[11] }; - this->state.unknown_11C84->longitude = static_cast(angle); - this->state.unknown_11C84->widthSize = 2.6f; - this->state.unknown_11C84->heightSize = 40.0f; - this->state.unknown_11C84->heightSpeed = 0.25f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 180.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive->longitude = static_cast(angle); + this->state.currentPrimitive->widthSize = 2.6f; + this->state.currentPrimitive->heightSize = 40.0f; + this->state.currentPrimitive->heightSpeed = 0.25f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 180.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } @@ -11216,50 +11216,50 @@ bool CRagEffect::GlassWall() { void CRagEffect::Portal() { if (this->state.stateCnt == 0) { g_modeMgr.GetGameMode(); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->arcAngle = 36.0f; - this->state.unknown_11C84->outerSize = 3.5f; - this->state.unknown_11C84->innerSize = 3.5f; - this->state.unknown_11C84->longSpeed = 4.0f; - this->state.unknown_11C84->heightSize = 40.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 128.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->arcAngle = 36.0f; - this->state.unknown_11C84->outerSize = 4.0f; - this->state.unknown_11C84->innerSize = 4.0f; - this->state.unknown_11C84->longSpeed = 5.0f; - this->state.unknown_11C84->heightSize = 50.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 128.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->arcAngle = 36.0f; + this->state.currentPrimitive->outerSize = 3.5f; + this->state.currentPrimitive->innerSize = 3.5f; + this->state.currentPrimitive->longSpeed = 4.0f; + this->state.currentPrimitive->heightSize = 40.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 128.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->arcAngle = 36.0f; + this->state.currentPrimitive->outerSize = 4.0f; + this->state.currentPrimitive->innerSize = 4.0f; + this->state.currentPrimitive->longSpeed = 5.0f; + this->state.currentPrimitive->heightSize = 50.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 128.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } if (this->state.stateCnt % 14 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->innerSize = 8.0f; - this->state.unknown_11C84->latitude = 90.0f; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->innerSize = 8.0f; + this->state.currentPrimitive->latitude = 90.0f; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - this->state.unknown_11C84->radiusSpeed = 1.0f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive->radiusSpeed = 1.0f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * 0.5f; - const int duration = this->state.unknown_11C84->duration; - this->state.unknown_11C84->fadeOutCnt = duration - duration / 2; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + const int duration = this->state.currentPrimitive->duration; + this->state.currentPrimitive->fadeOutCnt = duration - duration / 2; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } @@ -11273,22 +11273,22 @@ void CRagEffect::YufitelHit(char kind) { this->render.position.z = parent.position.z; if (this->state.stateCnt % 20 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 10; - this->state.unknown_11C84->pattern |= 0x40u; - this->state.unknown_11C84->renderFlag |= 2u; - this->state.unknown_11C84->renderFlag |= 0x200u; - this->state.unknown_11C84->deltaPos2.y = -5.0f; - this->state.unknown_11C84->widthSpeed = 2.5f; - this->state.unknown_11C84->heightSpeed = 2.5f; - this->state.unknown_11C84->changePoint = 10; - this->state.unknown_11C84->changeWidthSpeed = 0.0f; - this->state.unknown_11C84->changeHeightSpeed = 0.0f; - this->state.unknown_11C84->changeWidthAccel = -this->state.unknown_11C84->changeWidthSpeed / 50.0f; - this->state.unknown_11C84->changeHeightAccel = -this->state.unknown_11C84->changeHeightSpeed / 50.0f; - this->state.unknown_11C84->fadeOutCnt = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 10; + this->state.currentPrimitive->pattern |= 0x40u; + this->state.currentPrimitive->renderFlag |= 2u; + this->state.currentPrimitive->renderFlag |= 0x200u; + this->state.currentPrimitive->deltaPos2.y = -5.0f; + this->state.currentPrimitive->widthSpeed = 2.5f; + this->state.currentPrimitive->heightSpeed = 2.5f; + this->state.currentPrimitive->changePoint = 10; + this->state.currentPrimitive->changeWidthSpeed = 0.0f; + this->state.currentPrimitive->changeHeightSpeed = 0.0f; + this->state.currentPrimitive->changeWidthAccel = -this->state.currentPrimitive->changeWidthSpeed / 50.0f; + this->state.currentPrimitive->changeHeightAccel = -this->state.currentPrimitive->changeHeightSpeed / 50.0f; + this->state.currentPrimitive->fadeOutCnt = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(kind == 0 ? "effect\\thunder_pang.bmp" : "effect\\pokjuk_d.bmp", 0, false, true, false); } @@ -11296,34 +11296,34 @@ void CRagEffect::YufitelHit(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 300; - this->state.unknown_11C84->pattern |= 0x40u; - this->state.unknown_11C84->renderFlag |= 0x200u; - this->state.unknown_11C84->renderFlag |= 2u; - this->state.unknown_11C84->deltaPos2.y = -5.0f; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->widthSize = 7.5f; - this->state.unknown_11C84->heightSize = 7.5f; - this->state.unknown_11C84->animSpeed = 1; - this->state.unknown_11C84->totalTexture = 5; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 300; + this->state.currentPrimitive->pattern |= 0x40u; + this->state.currentPrimitive->renderFlag |= 0x200u; + this->state.currentPrimitive->renderFlag |= 2u; + this->state.currentPrimitive->deltaPos2.y = -5.0f; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->widthSize = 7.5f; + this->state.currentPrimitive->heightSize = 7.5f; + this->state.currentPrimitive->animSpeed = 1; + this->state.currentPrimitive->totalTexture = 5; + AllocateTextures(*this->state.currentPrimitive); const char* last; if (kind == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\thunder_plazma_blast_a.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\thunder_plazma_blast_b.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\thunder_ball_d.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\thunder_ball_e.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\thunder_plazma_blast_a.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\thunder_plazma_blast_b.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\thunder_ball_d.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\thunder_ball_e.bmp", 0, false, true, false); last = "effect\\thunder_ball_f.bmp"; } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\thunder_ball_b.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\thunder_ball_c.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\thunder_ball_b.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\twirl_soft.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\thunder_ball_c.bmp", 0, false, true, false); last = "effect\\twirl_soft.bmp"; } - this->state.unknown_11C84->textures[4] = g_texMgr.Load(last, 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load(last, 0, false, true, false); } // OFFSET: 0x00C457B0 @@ -11513,31 +11513,31 @@ void CRagEffect::Sightrasher() { const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 85 - this->state.stateCnt; - this->state.unknown_11C84->pattern |= 0x400u; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 85 - this->state.stateCnt; + this->state.currentPrimitive->pattern |= 0x400u; const float reach = static_cast(this->state.stateCnt / 5) + 5.0f; - this->state.unknown_11C84->deltaPos2.x = reach * sine; - this->state.unknown_11C84->deltaPos2.z = -reach * cosine; - this->state.unknown_11C84->deltaPos2.y = static_cast(this->state.stateCnt / 3 - 20); - this->state.unknown_11C84->speed3d.y = 0.0f; - this->state.unknown_11C84->speed3d.x = static_cast(static_cast(sine)); - this->state.unknown_11C84->speed3d.z = static_cast(static_cast(cosine) * -1.0); - this->state.unknown_11C84->animSpeed = std::max(rand() % 2, 0) + 3; - this->state.unknown_11C84->size = 2.5f - static_cast(this->state.stateCnt) / 10.0f; - this->state.unknown_11C84->alpha = static_cast((75 - this->state.stateCnt) * 2); - this->state.unknown_11C84->deltaPosAccel = {0.0f, 0.0f, 0.0f}; - this->state.unknown_11C84->changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); - this->state.unknown_11C84->changeSpeed3d.y = 0.0f; - this->state.unknown_11C84->changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); - this->state.unknown_11C84->changePoint = 35 - this->state.stateCnt; - this->state.unknown_11C84->changeAccel3d.x = -0.004f; - this->state.unknown_11C84->changeAccel3d.y = 0.0f; - this->state.unknown_11C84->changeAccel3d.z = 0.004f; - this->state.unknown_11C84->fadeOutCnt = 65 - this->state.stateCnt; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->deltaPos2.x = reach * sine; + this->state.currentPrimitive->deltaPos2.z = -reach * cosine; + this->state.currentPrimitive->deltaPos2.y = static_cast(this->state.stateCnt / 3 - 20); + this->state.currentPrimitive->speed3d.y = 0.0f; + this->state.currentPrimitive->speed3d.x = static_cast(static_cast(sine)); + this->state.currentPrimitive->speed3d.z = static_cast(static_cast(cosine) * -1.0); + this->state.currentPrimitive->animSpeed = std::max(rand() % 2, 0) + 3; + this->state.currentPrimitive->size = 2.5f - static_cast(this->state.stateCnt) / 10.0f; + this->state.currentPrimitive->alpha = static_cast((75 - this->state.stateCnt) * 2); + this->state.currentPrimitive->deltaPosAccel = {0.0f, 0.0f, 0.0f}; + this->state.currentPrimitive->changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); + this->state.currentPrimitive->changeSpeed3d.y = 0.0f; + this->state.currentPrimitive->changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); + this->state.currentPrimitive->changePoint = 35 - this->state.stateCnt; + this->state.currentPrimitive->changeAccel3d.x = -0.004f; + this->state.currentPrimitive->changeAccel3d.y = 0.0f; + this->state.currentPrimitive->changeAccel3d.z = 0.004f; + this->state.currentPrimitive->fadeOutCnt = 65 - this->state.stateCnt; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); + Owner(this->state.currentPrimitive).InitSegment(); } for (int i = 0; i < 8; ++i) { @@ -11545,28 +11545,28 @@ void CRagEffect::Sightrasher() { const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 85 - this->state.stateCnt; - this->state.unknown_11C84->pattern |= 0x400u; - this->state.unknown_11C84->deltaPos2.y = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 85 - this->state.stateCnt; + this->state.currentPrimitive->pattern |= 0x400u; + this->state.currentPrimitive->deltaPos2.y = 0.0f; const float reach = static_cast(this->state.stateCnt / 5) + 5.0f; - this->state.unknown_11C84->deltaPos2.x = reach * sine; - this->state.unknown_11C84->deltaPos2.z = -reach * cosine; - this->state.unknown_11C84->speed3d.y = 0.0f; - this->state.unknown_11C84->speed3d.x = static_cast(static_cast(sine)); - this->state.unknown_11C84->speed3d.z = static_cast(static_cast(cosine) * -1.0); - this->state.unknown_11C84->animSpeed = 3; - this->state.unknown_11C84->size = 1.0f - static_cast(this->state.stateCnt) / 30.0f; - this->state.unknown_11C84->alpha = static_cast((75 - this->state.stateCnt) * 2); - this->state.unknown_11C84->changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); - this->state.unknown_11C84->changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); - this->state.unknown_11C84->changePoint = 35 - this->state.stateCnt; - this->state.unknown_11C84->changeAccel3d.x = -0.004f; - this->state.unknown_11C84->changeAccel3d.z = 0.004f; - this->state.unknown_11C84->fadeOutCnt = 65 - this->state.stateCnt; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "Shadow.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->deltaPos2.x = reach * sine; + this->state.currentPrimitive->deltaPos2.z = -reach * cosine; + this->state.currentPrimitive->speed3d.y = 0.0f; + this->state.currentPrimitive->speed3d.x = static_cast(static_cast(sine)); + this->state.currentPrimitive->speed3d.z = static_cast(static_cast(cosine) * -1.0); + this->state.currentPrimitive->animSpeed = 3; + this->state.currentPrimitive->size = 1.0f - static_cast(this->state.stateCnt) / 30.0f; + this->state.currentPrimitive->alpha = static_cast((75 - this->state.stateCnt) * 2); + this->state.currentPrimitive->changeSpeed3d.x = static_cast(static_cast(sine) * 0.5); + this->state.currentPrimitive->changeSpeed3d.z = static_cast(static_cast(cosine) * -0.5); + this->state.currentPrimitive->changePoint = 35 - this->state.stateCnt; + this->state.currentPrimitive->changeAccel3d.x = -0.004f; + this->state.currentPrimitive->changeAccel3d.z = 0.004f; + this->state.currentPrimitive->fadeOutCnt = 65 - this->state.stateCnt; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "Shadow.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -11574,18 +11574,18 @@ void CRagEffect::Sightrasher() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->latitude = 90.0f; - this->state.unknown_11C84->radiusSpeed = 2.5f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->latitude = 90.0f; + this->state.currentPrimitive->radiusSpeed = 2.5f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / ring.duration) / 1.5f; - this->state.unknown_11C84->innerSize = -10.0f; - this->state.unknown_11C84->alpha = 150.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); + this->state.currentPrimitive->innerSize = -10.0f; + this->state.currentPrimitive->alpha = 150.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } // OFFSET: 0x00C35610 @@ -11597,90 +11597,90 @@ void CRagEffect::RingBurstSparks() { const int facing = static_cast(180.0f - this->state.parent->render.angle); const int direction = facing < 0 ? facing + 360 : facing; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 15; - this->state.unknown_11C84->longitude = static_cast(direction); - this->state.unknown_11C84->latitude = -90.0f; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 15; + this->state.currentPrimitive->longitude = static_cast(direction); + this->state.currentPrimitive->latitude = -90.0f; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - this->state.unknown_11C84->deltaPos2 = {0.0f, -10.0f, 0.0f}; - this->state.unknown_11C84->speed = 0.7f; - EffectPrimitiveState& slow = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; + this->state.currentPrimitive->speed = 0.7f; + EffectPrimitiveState& slow = *this->state.currentPrimitive; slow.accel = -(slow.speed / slow.duration) * 0.5f; - this->state.unknown_11C84->outerSize = static_cast(this->state.stateCnt * 0.1 + 11.0); - this->state.unknown_11C84->innerSize = static_cast(this->state.stateCnt * 0.1 + 6.0); - this->state.unknown_11C84->heightSize = 2.5f; - const int lifetime = this->state.unknown_11C84->duration; - this->state.unknown_11C84->fadeOutCnt = lifetime - lifetime / 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); + this->state.currentPrimitive->outerSize = static_cast(this->state.stateCnt * 0.1 + 11.0); + this->state.currentPrimitive->innerSize = static_cast(this->state.stateCnt * 0.1 + 6.0); + this->state.currentPrimitive->heightSize = 2.5f; + const int lifetime = this->state.currentPrimitive->duration; + this->state.currentPrimitive->fadeOutCnt = lifetime - lifetime / 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); if (this->state.stateCnt <= 0) { return; } for (int count = 4; count != 0; --count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + direction - 40); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& yaw = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + direction - 40); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); - EffectPrimitiveState& pitch = *this->state.unknown_11C84; + EffectPrimitiveState& pitch = *this->state.currentPrimitive; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); - EffectPrimitiveState& spark = *this->state.unknown_11C84; + EffectPrimitiveState& spark = *this->state.currentPrimitive; spark.deltaPos3 = RotatedForward(spark.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2.x = moving.deltaPos3.x + 0.0f; moving.deltaPos2.y = moving.deltaPos3.y - 10.0f; moving.deltaPos2.z = moving.deltaPos3.z + 0.0f; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - EffectPrimitiveState& fading = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + EffectPrimitiveState& fading = *this->state.currentPrimitive; fading.accel = -(fading.speed / fading.duration) * 0.5f; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - EffectPrimitiveState& shrinking = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 4; count != 0; --count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + direction + 140); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& yaw = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + direction + 140); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& yaw = *this->state.currentPrimitive; reinterpret_cast(yaw.transform)->MakeYRotation(GetRadian(static_cast(yaw.longitude))); - EffectPrimitiveState& pitch = *this->state.unknown_11C84; + EffectPrimitiveState& pitch = *this->state.currentPrimitive; reinterpret_cast(pitch.transform)->AppendXRotation(GetRadian(static_cast(pitch.latitude))); - EffectPrimitiveState& spark = *this->state.unknown_11C84; + EffectPrimitiveState& spark = *this->state.currentPrimitive; spark.deltaPos3 = RotatedForward(spark.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.deltaPos2.x = moving.deltaPos3.x + 0.0f; moving.deltaPos2.y = moving.deltaPos3.y - 10.0f; moving.deltaPos2.z = moving.deltaPos3.z + 0.0f; - EffectPrimitiveState& facingYaw = *this->state.unknown_11C84; + EffectPrimitiveState& facingYaw = *this->state.currentPrimitive; reinterpret_cast(facingYaw.transform)->MakeYRotation(GetRadian(static_cast(facingYaw.longitude))); - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - EffectPrimitiveState& fading = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + EffectPrimitiveState& fading = *this->state.currentPrimitive; fading.accel = -(fading.speed / fading.duration) * 0.5f; - this->state.unknown_11C84->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; - EffectPrimitiveState& falling = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; + EffectPrimitiveState& falling = *this->state.currentPrimitive; const float fall = falling.gravSpeed / falling.duration; falling.gravAccel = -(fall + fall); - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - EffectPrimitiveState& shrinking = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -11695,49 +11695,49 @@ void CRagEffect::WaterBubble(int) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 142, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 117; - this->state.unknown_11C84->textures = new CTexture*[this->state.unknown_11C84->totalTexture]; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 142, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 117; + this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; char name[64]; for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_C_water_%02d.tga", index); - this->state.unknown_11C84->textures[index] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[index] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_B_water_%02d.tga", index); - this->state.unknown_11C84->textures[index + 30] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[index + 30] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 27; ++index) { std::sprintf(name, "effect\\W_bubble%02d.tga", index + 1); - this->state.unknown_11C84->textures[index + 60] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[index + 60] = g_texMgr.Load(name, 0, false, true, false); } for (int index = 0; index < 30; ++index) { std::sprintf(name, "effect\\W_A_water_%02d.tga", index); - this->state.unknown_11C84->textures[index + 87] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->textures[index + 87] = g_texMgr.Load(name, 0, false, true, false); } - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].alphaB = 230; - this->state.unknown_11C84->slots[0].vecBNow.z = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].alphaB = 230; + this->state.currentPrimitive->slots[0].vecBNow.z = 0.0f; if (this->state.param[0] < 20.0f) { - this->state.unknown_11C84->slots[0].distance = 40.0f; + this->state.currentPrimitive->slots[0].distance = 40.0f; } else { - this->state.unknown_11C84->slots[0].distance = this->state.param[0]; + this->state.currentPrimitive->slots[0].distance = this->state.param[0]; } - this->state.unknown_11C84->slots[0].rotStart = static_cast(this->state.param[1] >= 360.0f ? 0 : static_cast(this->state.param[1])); + this->state.currentPrimitive->slots[0].rotStart = static_cast(this->state.param[1] >= 360.0f ? 0 : static_cast(this->state.param[1])); } // OFFSET: 0x00C134B0 @@ -11757,10 +11757,10 @@ void CRagEffect::FireArrow() { const int frame = this->state.stateCnt; if (frame >= 12 && (frame - 12) % 10 == 0 && frame - 12 < static_cast(this->state.count)) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 70; - this->state.unknown_11C84->pattern = 0x14; - EffectPrimitiveState& arrow = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 70; + this->state.currentPrimitive->pattern = 0x14; + EffectPrimitiveState& arrow = *this->state.currentPrimitive; const int spreadZ = std::max(rand() % 10, 0); const int spreadX = std::max(rand() % 10, 0); arrow.deltaPos2.y = -60.0f; @@ -11769,58 +11769,58 @@ void CRagEffect::FireArrow() { const int aimZ = std::max(rand() % 4, 0); const int aimX = std::max(rand() % 4, 0); const float heading = CRenderObject::Heading( - this->state.unknown_11C84->deltaPos2.x, this->state.unknown_11C84->deltaPos2.z, static_cast(aimX - 2), static_cast(aimZ - 2) + this->state.currentPrimitive->deltaPos2.x, this->state.currentPrimitive->deltaPos2.z, static_cast(aimX - 2), static_cast(aimZ - 2) ); - this->state.unknown_11C84->longitude = -heading; + this->state.currentPrimitive->longitude = -heading; this->state.longitude = -heading; - const float dx = std::fabs(this->state.unknown_11C84->deltaPos2.x); - const float dz = std::fabs(this->state.unknown_11C84->deltaPos2.z); + const float dx = std::fabs(this->state.currentPrimitive->deltaPos2.x); + const float dz = std::fabs(this->state.currentPrimitive->deltaPos2.z); const float run = SquareRoot(dx * dx + dz * dz); - const float pitch = CRenderObject::Heading(-std::fabs(this->state.unknown_11C84->deltaPos2.y), run, 0.0f, 0.0f); - this->state.unknown_11C84->latitude = pitch; + const float pitch = CRenderObject::Heading(-std::fabs(this->state.currentPrimitive->deltaPos2.y), run, 0.0f, 0.0f); + this->state.currentPrimitive->latitude = pitch; this->state.latitude = pitch; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - this->state.unknown_11C84->speed = -2.75f; - this->state.unknown_11C84->widthSize = 14.0f; - this->state.unknown_11C84->heightSize = 3.5f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - this->state.unknown_11C84->totalTexture = 6; - this->state.unknown_11C84->animSpeed = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\불화살1.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\불화살2.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\불화살3.tga", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\불화살4.tga", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\불화살5.tga", 0, false, true, false); - this->state.unknown_11C84->textures[5] = g_texMgr.Load("effect\\불화살6.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->speed = -2.75f; + this->state.currentPrimitive->widthSize = 14.0f; + this->state.currentPrimitive->heightSize = 3.5f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + this->state.currentPrimitive->totalTexture = 6; + this->state.currentPrimitive->animSpeed = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\불화살1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\불화살2.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\불화살3.tga", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\불화살4.tga", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\불화살5.tga", 0, false, true, false); + this->state.currentPrimitive->textures[5] = g_texMgr.Load("effect\\불화살6.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } if (this->state.stateCnt > 0 && this->state.stateCnt % 4 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 40, 0)) + (this->state.longitude - 20.0f); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 20, 0)) + (this->state.latitude - 10.0f); - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 40, 0)) + (this->state.longitude - 20.0f); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 20, 0)) + (this->state.latitude - 10.0f); + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - this->state.unknown_11C84->deltaPos2.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos2.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos2.z = this->state.deltaPos[2]; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - EffectPrimitiveState& slowing = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos2.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos2.z = this->state.deltaPos[2]; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + EffectPrimitiveState& slowing = *this->state.currentPrimitive; slowing.accel = -(slowing.speed / slowing.duration) / 1.5f; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 30, 0) + 20) / 100.0f; - EffectPrimitiveState& shrinking = *this->state.unknown_11C84; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 30, 0) + 20) / 100.0f; + EffectPrimitiveState& shrinking = *this->state.currentPrimitive; shrinking.sizeSpeed = -(shrinking.size / shrinking.duration); - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle4.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle4.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle4.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle4.act"); + Owner(this->state.currentPrimitive).InitSegment(); } if (this->state.flag == 0) { @@ -11828,20 +11828,20 @@ void CRagEffect::FireArrow() { } this->state.flag = 0; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->latitude = 90.0f; - this->state.unknown_11C84->radiusSpeed = 1.2f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->latitude = 90.0f; + this->state.currentPrimitive->radiusSpeed = 1.2f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; const float slowdown = -(ring.radiusSpeed / (ring.duration + 40)); ring.radiusAccel = slowdown + slowdown; - this->state.unknown_11C84->innerSize = 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); + this->state.currentPrimitive->innerSize = 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } // GLOBAL: gl_24762 @@ -11866,40 +11866,40 @@ void CRagEffect::BlitzBeat() { if (this->state.stateCnt == 0) { g_blitzBeatCount = this->state.stateCnt; for (int count = 10; count != 0; --count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->renderFlag |= 0x200u; - this->state.unknown_11C84->longitude = this->state.parent->render.angle; - EffectPrimitiveState& facing = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->renderFlag |= 0x200u; + this->state.currentPrimitive->longitude = this->state.parent->render.angle; + EffectPrimitiveState& facing = *this->state.currentPrimitive; reinterpret_cast(facing.transform)->MakeYRotation(GetRadian(static_cast(facing.longitude))); const float spin = static_cast(std::max(rand() % 360, 0)); const float sine = ClientSine(static_cast(spin)); const float cosine = ClientCosine(static_cast(spin)); - EffectPrimitiveState& moving = *this->state.unknown_11C84; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.speed3d = RotatedForward(moving.transform, 15.0f); - EffectPrimitiveState& origin = *this->state.unknown_11C84; + EffectPrimitiveState& origin = *this->state.currentPrimitive; origin.deltaPos.x = origin.deltaPos.x + origin.speed3d.x; origin.deltaPos.y = origin.speed3d.y + origin.deltaPos.y; origin.deltaPos.z = origin.speed3d.z + origin.deltaPos.z; - this->state.unknown_11C84->deltaPos2.y = -7.0f; - this->state.unknown_11C84->deltaPos2.x = sine * 3.5f; - this->state.unknown_11C84->deltaPos2.z = cosine * -3.5f; - this->state.unknown_11C84->speed = -1.2f; - this->state.unknown_11C84->accel = -0.1f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 40, 0) + 20) / 10.0f; - this->state.unknown_11C84->heightSize = 0.2f; - this->state.unknown_11C84->widthSpeed = 0.1f; - this->state.unknown_11C84->widthAccel = -0.01f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 250.0f; - this->state.unknown_11C84->changePoint = 10; - this->state.unknown_11C84->changeSpeed = -0.3f; - this->state.unknown_11C84->changeAccel = 0.001f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha * 0.5f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->deltaPos2.y = -7.0f; + this->state.currentPrimitive->deltaPos2.x = sine * 3.5f; + this->state.currentPrimitive->deltaPos2.z = cosine * -3.5f; + this->state.currentPrimitive->speed = -1.2f; + this->state.currentPrimitive->accel = -0.1f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 40, 0) + 20) / 10.0f; + this->state.currentPrimitive->heightSize = 0.2f; + this->state.currentPrimitive->widthSpeed = 0.1f; + this->state.currentPrimitive->widthAccel = -0.01f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 250.0f; + this->state.currentPrimitive->changePoint = 10; + this->state.currentPrimitive->changeSpeed = -0.3f; + this->state.currentPrimitive->changeAccel = 0.001f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha * 0.5f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } } @@ -11911,40 +11911,40 @@ void CRagEffect::BlitzBeat() { const int driftX = rand(); const int driftY = rand(); rand(); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 12; - this->state.unknown_11C84->longitude = static_cast(static_cast(facing)); - this->state.unknown_11C84->latitude = -90.0f; - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 12; + this->state.currentPrimitive->longitude = static_cast(static_cast(facing)); + this->state.currentPrimitive->latitude = -90.0f; + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - EffectPrimitiveState& thrust = *this->state.unknown_11C84; + EffectPrimitiveState& thrust = *this->state.currentPrimitive; const float* m = thrust.transform; thrust.speed3d = { (m[0] * 0.0f - m[3] * 2.0f) + m[6] + m[9], (m[1] * 0.0f - m[4] * 2.0f) + m[7] + m[10], (m[2] * 0.0f - m[5] * 2.0f) + m[8] + m[11] }; - EffectPrimitiveState& origin = *this->state.unknown_11C84; + EffectPrimitiveState& origin = *this->state.currentPrimitive; origin.deltaPos.x = origin.speed3d.x + origin.deltaPos.x; origin.deltaPos.y = origin.speed3d.y + origin.deltaPos.y; origin.deltaPos.z = origin.speed3d.z + origin.deltaPos.z; - this->state.unknown_11C84->deltaPos2.z = 0.0f; - this->state.unknown_11C84->deltaPos2.x = static_cast((std::max(driftX % 10, 0) + 1) / 5); - this->state.unknown_11C84->deltaPos2.y = static_cast((std::max(driftY % 20, 0) + 1) / 2 - 12); - this->state.unknown_11C84->speed = 0.4f; - EffectPrimitiveState& slowing = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2.z = 0.0f; + this->state.currentPrimitive->deltaPos2.x = static_cast((std::max(driftX % 10, 0) + 1) / 5); + this->state.currentPrimitive->deltaPos2.y = static_cast((std::max(driftY % 20, 0) + 1) / 2 - 12); + this->state.currentPrimitive->speed = 0.4f; + EffectPrimitiveState& slowing = *this->state.currentPrimitive; slowing.accel = -(slowing.speed / slowing.duration) * 0.5f; - this->state.unknown_11C84->outerSize = 1.5f; - this->state.unknown_11C84->innerSize = 0.5f; - this->state.unknown_11C84->heightSize = 3.5f; - const int lifetime = this->state.unknown_11C84->duration; - this->state.unknown_11C84->fadeOutCnt = lifetime - lifetime / 2; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->outerSize = 1.5f; + this->state.currentPrimitive->innerSize = 0.5f; + this->state.currentPrimitive->heightSize = 3.5f; + const int lifetime = this->state.currentPrimitive->duration; + this->state.currentPrimitive->fadeOutCnt = lifetime - lifetime / 2; + AllocateTextures(*this->state.currentPrimitive); CTexture* texture = g_texMgr.Load("effect\\magic_green.tga", 0, false, true, false); ++g_blitzBeatCount; - this->state.unknown_11C84->textures[0] = texture; + this->state.currentPrimitive->textures[0] = texture; } // OFFSET: 0x00C5C450 @@ -12089,33 +12089,33 @@ void CRagEffect::Bubble_Drop() { count = 50.0f; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 127, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\썬더스톰파티클.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 127, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\썬더스톰파티클.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].distance = 1.0f; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[0].vecBPre.z = 0.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = -count; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].height[1] = 1.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].flag1[0] = 0; - this->state.unknown_11C84->slots[0].flag1[2] = 2; - this->state.unknown_11C84->slots[0].flag1[4] = static_cast(static_cast(count)); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].distance = 1.0f; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[0].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = -count; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].height[1] = 1.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].flag1[2] = 2; + this->state.currentPrimitive->slots[0].flag1[4] = static_cast(static_cast(count)); - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].alphaB = 0; - this->state.unknown_11C84->slots[3].life = 1; - this->state.unknown_11C84->slots[3].alphaB = 0; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].alphaB = 0; + this->state.currentPrimitive->slots[3].life = 1; + this->state.currentPrimitive->slots[3].alphaB = 0; } // OFFSET: 0x00C52490 @@ -12630,82 +12630,82 @@ void CRagEffect::HitDark() { facing += 360; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 10; - this->state.unknown_11C84->longitude = static_cast(facing); - this->state.unknown_11C84->latitude = -90.0f; - EffectPrimitiveState& flat = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 10; + this->state.currentPrimitive->longitude = static_cast(facing); + this->state.currentPrimitive->latitude = -90.0f; + EffectPrimitiveState& flat = *this->state.currentPrimitive; reinterpret_cast(flat.transform)->MakeXRotation(GetRadian(static_cast(flat.latitude))); - EffectPrimitiveState& facingRing = *this->state.unknown_11C84; + EffectPrimitiveState& facingRing = *this->state.currentPrimitive; reinterpret_cast(facingRing.transform)->AppendYRotation(GetRadian(static_cast(facingRing.longitude))); - this->state.unknown_11C84->deltaPos2 = {0.0f, -10.0f, 0.0f}; - this->state.unknown_11C84->speed = 0.7f; - EffectPrimitiveState& expanding = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2 = {0.0f, -10.0f, 0.0f}; + this->state.currentPrimitive->speed = 0.7f; + EffectPrimitiveState& expanding = *this->state.currentPrimitive; expanding.accel = -(expanding.speed / static_cast(expanding.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->outerSize = 10.0f; - this->state.unknown_11C84->innerSize = 5.0f; - this->state.unknown_11C84->heightSize = 3.5f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive->outerSize = 10.0f; + this->state.currentPrimitive->innerSize = 5.0f; + this->state.currentPrimitive->heightSize = 3.5f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); for (int count = 0; count < 2; ++count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& aimed = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing - 40)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); - EffectPrimitiveState& pitched = *this->state.unknown_11C84; + EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - EffectPrimitiveState& braking = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - this->state.unknown_11C84->red = 20; - this->state.unknown_11C84->green = 20; - this->state.unknown_11C84->blue = 20; - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + this->state.currentPrimitive->red = 20; + this->state.currentPrimitive->green = 20; + this->state.currentPrimitive->blue = 20; + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } for (int count = 0; count < 2; ++count) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 100, 0) - 50); - EffectPrimitiveState& aimed = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 6, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 80, 0) + (facing + 140)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 100, 0) - 50); + EffectPrimitiveState& aimed = *this->state.currentPrimitive; reinterpret_cast(aimed.transform)->MakeYRotation(GetRadian(static_cast(aimed.longitude))); - EffectPrimitiveState& pitched = *this->state.unknown_11C84; + EffectPrimitiveState& pitched = *this->state.currentPrimitive; reinterpret_cast(pitched.transform)->AppendXRotation(GetRadian(static_cast(pitched.latitude))); - EffectPrimitiveState& launched = *this->state.unknown_11C84; + EffectPrimitiveState& launched = *this->state.currentPrimitive; launched.deltaPos3 = RotatedForward(launched.transform, static_cast(std::max(rand() % 4, 0) + 4)); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; placed.deltaPos2 = {placed.deltaPos3.x + 0.0f, placed.deltaPos3.y - 10.0f, placed.deltaPos3.z + 0.0f}; - EffectPrimitiveState& level = *this->state.unknown_11C84; + EffectPrimitiveState& level = *this->state.currentPrimitive; reinterpret_cast(level.transform)->MakeYRotation(GetRadian(static_cast(level.longitude))); - this->state.unknown_11C84->duration = std::max(rand() % 24, 0) + 6; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; - EffectPrimitiveState& braking = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = std::max(rand() % 24, 0) + 6; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 90, 0) + 60) / 100.0f; + EffectPrimitiveState& braking = *this->state.currentPrimitive; braking.accel = -(braking.speed / static_cast(braking.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; - EffectPrimitiveState& falling = *this->state.unknown_11C84; + this->state.currentPrimitive->gravSpeed = -static_cast(std::max(rand() % 90, 0) + 30) / 100.0f; + EffectPrimitiveState& falling = *this->state.currentPrimitive; falling.gravAccel = -(falling.gravSpeed / static_cast(falling.duration) * 2.0f); - this->state.unknown_11C84->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; - this->state.unknown_11C84->red = 20; - this->state.unknown_11C84->green = 20; - this->state.unknown_11C84->blue = 20; - this->state.unknown_11C84->fadeOutCnt = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - this->state.unknown_11C84->numSegment = 3; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = static_cast(std::max(rand() % 100, 0) + 60) / 100.0f; + this->state.currentPrimitive->red = 20; + this->state.currentPrimitive->green = 20; + this->state.currentPrimitive->blue = 20; + this->state.currentPrimitive->fadeOutCnt = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + this->state.currentPrimitive->numSegment = 3; + Owner(this->state.currentPrimitive).InitSegment(); } } @@ -12724,62 +12724,62 @@ void CRagEffect::IceArrow() { if (this->state.stateCnt >= 12) { const int frameOffset = this->state.stateCnt - 12; if (frameOffset % 10 == 0 && frameOffset < static_cast(this->state.count)) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 70; - this->state.unknown_11C84->pattern = 20; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 70; + this->state.currentPrimitive->pattern = 20; - this->state.unknown_11C84->deltaPos2.y = -60.0f; - this->state.unknown_11C84->deltaPos2.x = static_cast(std::max(rand() % 10, 0) + 25); - this->state.unknown_11C84->deltaPos2.z = static_cast(std::max(rand() % 10, 0) + 15); + this->state.currentPrimitive->deltaPos2.y = -60.0f; + this->state.currentPrimitive->deltaPos2.x = static_cast(std::max(rand() % 10, 0) + 25); + this->state.currentPrimitive->deltaPos2.z = static_cast(std::max(rand() % 10, 0) + 15); const int rx = std::max(rand() % 4, 0) - 2; const int rz = std::max(rand() % 4, 0) - 2; const float angleY = -CRenderObject::Heading( - this->state.unknown_11C84->deltaPos2.x, - this->state.unknown_11C84->deltaPos2.z, + this->state.currentPrimitive->deltaPos2.x, + this->state.currentPrimitive->deltaPos2.z, static_cast(rx), static_cast(rz) ); - this->state.unknown_11C84->longitude = angleY; + this->state.currentPrimitive->longitude = angleY; this->state.longitude = angleY; const float distXZ = SquareRoot( - this->state.unknown_11C84->deltaPos2.x * this->state.unknown_11C84->deltaPos2.x + - this->state.unknown_11C84->deltaPos2.z * this->state.unknown_11C84->deltaPos2.z + this->state.currentPrimitive->deltaPos2.x * this->state.currentPrimitive->deltaPos2.x + + this->state.currentPrimitive->deltaPos2.z * this->state.currentPrimitive->deltaPos2.z ); - const float angleX = CRenderObject::Heading(-this->state.unknown_11C84->deltaPos2.y, distXZ, 0.0f, 0.0f); - this->state.unknown_11C84->latitude = angleX; + const float angleX = CRenderObject::Heading(-this->state.currentPrimitive->deltaPos2.y, distXZ, 0.0f, 0.0f); + this->state.currentPrimitive->latitude = angleX; this->state.latitude = angleX; matrix rotation; - rotation.MakeXRotation(GetRadian(static_cast(this->state.unknown_11C84->latitude))); - rotation.AppendYRotation(GetRadian(static_cast(this->state.unknown_11C84->longitude))); + rotation.MakeXRotation(GetRadian(static_cast(this->state.currentPrimitive->latitude))); + rotation.AppendYRotation(GetRadian(static_cast(this->state.currentPrimitive->longitude))); - this->state.unknown_11C84->speed = -2.75f; - this->state.unknown_11C84->widthSize = 11.5f; - this->state.unknown_11C84->heightSize = 3.8f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\icearrow.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->speed = -2.75f; + this->state.currentPrimitive->widthSize = 11.5f; + this->state.currentPrimitive->heightSize = 3.8f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\icearrow.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } } if (this->state.flag != 0) { this->state.flag = 0; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->latitude = 90.0f; - this->state.unknown_11C84->radiusSpeed = 1.2f; - const float accel = -(this->state.unknown_11C84->radiusSpeed / static_cast(this->state.unknown_11C84->duration + 40)); - this->state.unknown_11C84->radiusAccel = accel + accel; - this->state.unknown_11C84->innerSize = 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->latitude = 90.0f; + this->state.currentPrimitive->radiusSpeed = 1.2f; + const float accel = -(this->state.currentPrimitive->radiusSpeed / static_cast(this->state.currentPrimitive->duration + 40)); + this->state.currentPrimitive->radiusAccel = accel + accel; + this->state.currentPrimitive->innerSize = 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } } @@ -12800,47 +12800,47 @@ void CRagEffect::Flasher() { this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 70; - this->state.unknown_11C84->pattern = 65; - this->state.unknown_11C84->renderFlag |= 2; - this->state.unknown_11C84->deltaPos2.y = -10.0f; - this->state.unknown_11C84->widthSize = 20.0f; - this->state.unknown_11C84->heightSize = 20.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 6.0f; - this->state.unknown_11C84->chRadiSpeed = 1; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 70; + this->state.currentPrimitive->pattern = 65; + this->state.currentPrimitive->renderFlag |= 2; + this->state.currentPrimitive->deltaPos2.y = -10.0f; + this->state.currentPrimitive->widthSize = 20.0f; + this->state.currentPrimitive->heightSize = 20.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 6.0f; + this->state.currentPrimitive->chRadiSpeed = 1; - this->state.unknown_11C84->chPoint.push_back(40.0f); - this->state.unknown_11C84->chVal1.push_back(120.0f); - this->state.unknown_11C84->chVal2.push_back(200.0f); + this->state.currentPrimitive->chPoint.push_back(40.0f); + this->state.currentPrimitive->chVal1.push_back(120.0f); + this->state.currentPrimitive->chVal2.push_back(200.0f); - this->state.unknown_11C84->chPoint.push_back(100.0f); - this->state.unknown_11C84->chVal1.push_back(0.0f); - this->state.unknown_11C84->chVal2.push_back(80.0f); + this->state.currentPrimitive->chPoint.push_back(100.0f); + this->state.currentPrimitive->chVal1.push_back(0.0f); + this->state.currentPrimitive->chVal2.push_back(80.0f); - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\thunder_center.bmp", 0, false, true, false); for (int i = 0; i < 20; ++i) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 70; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; - const float accel = -(this->state.unknown_11C84->longSpeed / static_cast(this->state.unknown_11C84->duration)); - this->state.unknown_11C84->longAccel = accel / 1.5f; - this->state.unknown_11C84->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; - this->state.unknown_11C84->heightSize = static_cast(std::max(rand() % 40, 0) + 20); - this->state.unknown_11C84->heightSpeed = static_cast(std::max(rand() % 30, 0) + 50) / 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 70; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; + const float accel = -(this->state.currentPrimitive->longSpeed / static_cast(this->state.currentPrimitive->duration)); + this->state.currentPrimitive->longAccel = accel / 1.5f; + this->state.currentPrimitive->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; + this->state.currentPrimitive->heightSize = static_cast(std::max(rand() % 40, 0) + 20); + this->state.currentPrimitive->heightSpeed = static_cast(std::max(rand() % 30, 0) + 50) / 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } } } @@ -13103,41 +13103,41 @@ void CRagEffect::HasteUp() { if (this->state.stateCnt == 0) { for (int index = 0; index < 20; ++index) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 80; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; - EffectPrimitiveState& flash = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 80; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->longSpeed = static_cast(std::max(rand() % 60, 0) + 10) / 10.0f; + EffectPrimitiveState& flash = *this->state.currentPrimitive; flash.longAccel = -(flash.longSpeed / static_cast(flash.duration)) / 1.5f; - this->state.unknown_11C84->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; - this->state.unknown_11C84->heightSize = 0.0f; - this->state.unknown_11C84->heightSpeed = static_cast(std::max(rand() % 20, 0) + 50) / 13.0f; - this->state.unknown_11C84->changePoint = 40; - this->state.unknown_11C84->changeSpeed = static_cast(std::max(rand() % 10, 0) + 15) / 10.0f; - this->state.unknown_11C84->changeAccel = 0.0f; - this->state.unknown_11C84->changeHeightSpeed = 0.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive->arcAngle = static_cast(std::max(rand() % 25, 0) + 5) / 10.0f; + this->state.currentPrimitive->heightSize = 0.0f; + this->state.currentPrimitive->heightSpeed = static_cast(std::max(rand() % 20, 0) + 50) / 13.0f; + this->state.currentPrimitive->changePoint = 40; + this->state.currentPrimitive->changeSpeed = static_cast(std::max(rand() % 10, 0) + 15) / 10.0f; + this->state.currentPrimitive->changeAccel = 0.0f; + this->state.currentPrimitive->changeHeightSpeed = 0.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } if (this->state.stateCnt == 0) { for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 100; - this->state.unknown_11C84->radius = 7.0f; - this->state.unknown_11C84->gravSpeed = -0.1f; - this->state.unknown_11C84->gravAccel = -0.002f; - this->state.unknown_11C84->longitude = static_cast(index * 90); - this->state.unknown_11C84->longAccel = 0.2f; - this->state.unknown_11C84->longSpeed = static_cast(this->state.stateCnt) * this->state.unknown_11C84->longAccel + 0.3f; - this->state.unknown_11C84->size = 1.2f; - EffectPrimitiveState& orbit = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 100; + this->state.currentPrimitive->radius = 7.0f; + this->state.currentPrimitive->gravSpeed = -0.1f; + this->state.currentPrimitive->gravAccel = -0.002f; + this->state.currentPrimitive->longitude = static_cast(index * 90); + this->state.currentPrimitive->longAccel = 0.2f; + this->state.currentPrimitive->longSpeed = static_cast(this->state.stateCnt) * this->state.currentPrimitive->longAccel + 0.3f; + this->state.currentPrimitive->size = 1.2f; + EffectPrimitiveState& orbit = *this->state.currentPrimitive; reinterpret_cast(orbit.transform)->MakeYRotation(GetRadian(static_cast(orbit.longitude))); - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 10; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 10; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } } @@ -13382,9 +13382,9 @@ void CRagEffect::StoneWall() { // INLINED static __forceinline void LaunchTintedFireballVolley(CRagEffect& effect, float turn, int red, int green, int blue, int fade) { CEffectPrim* particle = CreateEffectParticle(effect, effect.render, 5, 0.0f, 0.0f, 0.0f, WorldObjects()); - effect.state.unknown_11C84 = reinterpret_cast(particle); + effect.state.currentPrimitive = reinterpret_cast(particle); auto stored = [&]() -> CEffectPrim* { - return reinterpret_cast(effect.state.unknown_11C84); + return reinterpret_cast(effect.state.currentPrimitive); }; stored()->state.duration = 20; stored()->state.pattern |= 0x120u; @@ -13652,61 +13652,61 @@ void CRagEffect::WhiteSparkRing(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; - Owner(this->state.unknown_11C84).render.position = this->render.position; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->deltaPos = {this->state.deltaPos[0], this->state.deltaPos[1], this->state.deltaPos[2]}; + Owner(this->state.currentPrimitive).render.position = this->render.position; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; const std::int16_t phase = kind; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; + this->state.currentPrimitive->slots[index].life = 1; if (kind == 3) { - this->state.unknown_11C84->slots[index].process = -(25 + std::max(0, rand() % 21)); - this->state.unknown_11C84->slots[index].maxHeight = 0.06f; + this->state.currentPrimitive->slots[index].process = -(25 + std::max(0, rand() % 21)); + this->state.currentPrimitive->slots[index].maxHeight = 0.06f; } else { - this->state.unknown_11C84->slots[index].process = -(15 + std::max(0, rand() % 26)); - this->state.unknown_11C84->slots[index].maxHeight = 0.07f; + this->state.currentPrimitive->slots[index].process = -(15 + std::max(0, rand() % 26)); + this->state.currentPrimitive->slots[index].maxHeight = 0.07f; } - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(0, rand() % 121) + 125); + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(0, rand() % 121) + 125); Get_Angle( this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], - &this->state.unknown_11C84->slots[index].riseAngle + &this->state.currentPrimitive->slots[index].riseAngle ); - this->state.unknown_11C84->slots[index].riseAngle += static_cast(std::max(0, rand() % 121) - 60); + this->state.currentPrimitive->slots[index].riseAngle += static_cast(std::max(0, rand() % 121) - 60); - if (this->state.unknown_11C84->slots[index].riseAngle >= 360) { - this->state.unknown_11C84->slots[index].riseAngle -= 360; + if (this->state.currentPrimitive->slots[index].riseAngle >= 360) { + this->state.currentPrimitive->slots[index].riseAngle -= 360; } - if (this->state.unknown_11C84->slots[index].riseAngle < 0) { - this->state.unknown_11C84->slots[index].riseAngle += 360; + if (this->state.currentPrimitive->slots[index].riseAngle < 0) { + this->state.currentPrimitive->slots[index].riseAngle += 360; } - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(0, rand() % 7)) + 6.0f; - this->state.unknown_11C84->slots[index].height[0] = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.x = static_cast(std::max(0, rand() % 7)) * 0.1f + 0.8f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[index].vecTNow.y = 3.0f; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(0, rand() % 7)) + 6.0f; + this->state.currentPrimitive->slots[index].height[0] = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.x = static_cast(std::max(0, rand() % 7)) * 0.1f + 0.8f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].vecTNow.y = 3.0f; for (int height = 20; height > 0; --height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[height] = 0; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[height] = 0; } - this->state.unknown_11C84->slots[index].alphaT = phase; + this->state.currentPrimitive->slots[index].alphaT = phase; } } // OFFSET: 0x00C5E740 @@ -13718,51 +13718,51 @@ void CRagEffect::WhiteLightTrail(const char* name, char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 96, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 96, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; if (kind == 0) { - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].maxHeight = static_cast(std::max(0, rand() % 16)) * 0.01f + 0.1f; - this->state.unknown_11C84->slots[0].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 3.0f; - this->state.unknown_11C84->slots[0].process = -std::max(0, rand() % 26); - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].vecBPre.y = static_cast(-std::max(0, rand() % 8)); + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].maxHeight = static_cast(std::max(0, rand() % 16)) * 0.01f + 0.1f; + this->state.currentPrimitive->slots[0].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 3.0f; + this->state.currentPrimitive->slots[0].process = -std::max(0, rand() % 26); + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].vecBPre.y = static_cast(-std::max(0, rand() % 8)); const int heading = std::max(0, rand() % 360); - this->state.unknown_11C84->slots[0].vecBPre.x = g_cosTable[heading] * 2.5f; - this->state.unknown_11C84->slots[0].vecBPre.z = g_sinTable[heading] * 2.5f; - this->state.unknown_11C84->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].flag1[0] = 1; + this->state.currentPrimitive->slots[0].vecBPre.x = g_cosTable[heading] * 2.5f; + this->state.currentPrimitive->slots[0].vecBPre.z = g_sinTable[heading] * 2.5f; + this->state.currentPrimitive->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].flag1[0] = 1; return; } if (kind == 1) { for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].maxHeight = static_cast(std::max(0, rand() % 11)) * 0.005f + 0.08f; - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(0, rand() % 11)) * 0.05f + 2.0f; - this->state.unknown_11C84->slots[index].process = -std::max(0, rand() % 26); - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].vecBPre.y = static_cast(-std::max(0, rand() % 8)); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(std::max(0, rand() % 11)) * 0.005f + 0.08f; + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(0, rand() % 11)) * 0.05f + 2.0f; + this->state.currentPrimitive->slots[index].process = -std::max(0, rand() % 26); + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].vecBPre.y = static_cast(-std::max(0, rand() % 8)); const int heading = std::max(0, rand() % 360); - this->state.unknown_11C84->slots[index].vecBPre.x = g_cosTable[heading] * 3.5f; - this->state.unknown_11C84->slots[index].vecBPre.z = g_sinTable[heading] * 3.5f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[index].flag1[0] = 2; + this->state.currentPrimitive->slots[index].vecBPre.x = g_cosTable[heading] * 3.5f; + this->state.currentPrimitive->slots[index].vecBPre.z = g_sinTable[heading] * 3.5f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[index].flag1[0] = 2; } } } @@ -13787,74 +13787,74 @@ void CRagEffect::ElementalOrbit(char kind) { int angle = 0; for (int index = 0; index < count; ++index) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 32, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].height[0] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].height[1] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].height[2] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].height[3] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].height[4] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].height[5] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 32, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].height[0] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].height[1] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].height[2] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].height[3] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].height[4] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].height[5] = static_cast(std::max(rand() % 360, 0)); if (kind == 1) { - this->state.unknown_11C84->slots[0].height[6] = static_cast(angle); - this->state.unknown_11C84->slots[0].height[7] = -14.0f; - this->state.unknown_11C84->slots[0].distance = 1.3f; - this->state.unknown_11C84->slots[0].height[10] = 1.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].height[6] = static_cast(angle); + this->state.currentPrimitive->slots[0].height[7] = -14.0f; + this->state.currentPrimitive->slots[0].distance = 1.3f; + this->state.currentPrimitive->slots[0].height[10] = 1.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 0; } else if (kind == 3 || kind == 4) { - this->state.unknown_11C84->slots[0].height[6] = + this->state.currentPrimitive->slots[0].height[6] = this->state.deltaPos[0] > 5.0f ? static_cast(angle) : static_cast(phase) / this->state.deltaPos[0]; - this->state.unknown_11C84->slots[0].height[7] = -15.0f; - this->state.unknown_11C84->slots[0].distance = 1.0f; + this->state.currentPrimitive->slots[0].height[7] = -15.0f; + this->state.currentPrimitive->slots[0].distance = 1.0f; if (this->state.deltaPos[0] > 5.0f) { if (this->state.deltaPos[0] - static_cast(index) >= 6.0f) { - this->state.unknown_11C84->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].distance = 2.0f; } } - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 1; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 1; } else { - this->state.unknown_11C84->slots[0].height[6] = static_cast(angle); - this->state.unknown_11C84->slots[0].height[7] = -15.0f; - this->state.unknown_11C84->slots[0].distance = 2.0f; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].height[6] = static_cast(angle); + this->state.currentPrimitive->slots[0].height[7] = -15.0f; + this->state.currentPrimitive->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 0; if (this->state.deltaPos[0] > 10.0f) { - this->state.unknown_11C84->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].distance = 2.0f; if (this->state.deltaPos[0] - static_cast(index) >= 11.0f) { - this->state.unknown_11C84->slots[0].flag1[0] = static_cast(21); + this->state.currentPrimitive->slots[0].flag1[0] = static_cast(21); } else { - this->state.unknown_11C84->slots[0].flag1[0] = static_cast(20); + this->state.currentPrimitive->slots[0].flag1[0] = static_cast(20); } } else if (this->state.deltaPos[0] > 5.0f) { if (this->state.deltaPos[0] - static_cast(index) >= 6.0f) { - this->state.unknown_11C84->slots[0].distance = 2.0f; - this->state.unknown_11C84->slots[0].flag1[0] = static_cast(20); + this->state.currentPrimitive->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].flag1[0] = static_cast(20); } } } if (kind > 9) { - this->state.unknown_11C84->slots[0].height[6] += static_cast(std::max(rand() % 360, 0)); - if (this->state.unknown_11C84->slots[0].height[6] >= 360.0f) { - this->state.unknown_11C84->slots[0].height[6] -= 360.0f; + this->state.currentPrimitive->slots[0].height[6] += static_cast(std::max(rand() % 360, 0)); + if (this->state.currentPrimitive->slots[0].height[6] >= 360.0f) { + this->state.currentPrimitive->slots[0].height[6] -= 360.0f; } - this->state.unknown_11C84->slots[0].flag1[0] = static_cast(kind); - this->state.unknown_11C84->slots[0].distance = 6.0f; - this->state.unknown_11C84->totalTexture = 1; + this->state.currentPrimitive->slots[0].flag1[0] = static_cast(kind); + this->state.currentPrimitive->slots[0].distance = 6.0f; + this->state.currentPrimitive->totalTexture = 1; } - this->state.unknown_11C84->slots[0].height[8] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].process = 0; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive->slots[0].height[8] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].process = 0; + AllocateTextures(*this->state.currentPrimitive); const char* texture; @@ -13879,7 +13879,7 @@ void CRagEffect::ElementalOrbit(char kind) { break; } - this->state.unknown_11C84->textures[0] = g_texMgr.Load(texture, 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(texture, 0, false, true, false); phase += 360; angle += 72; } @@ -14222,69 +14222,69 @@ void CRagEffect::WhiteSparkStreak(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 100, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\white02.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; + this->state.currentPrimitive->slots[index].life = 1; if (kind == 1) { - this->state.unknown_11C84->slots[index].process = -std::max(rand() % 11, 0); - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 5, 0)) + 5.0f; - this->state.unknown_11C84->slots[index].vecTNow.y = 3.0f; + this->state.currentPrimitive->slots[index].process = -std::max(rand() % 11, 0); + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 5, 0)) + 5.0f; + this->state.currentPrimitive->slots[index].vecTNow.y = 3.0f; } else if (kind == 3) { - this->state.unknown_11C84->slots[index].process = -30 - std::max(rand() % 41, 0); - this->state.unknown_11C84->slots[index].maxHeight = 0.07f; - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(rand() % 121, 0) + 125); - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 6, 0)) + 6.0f; - this->state.unknown_11C84->slots[index].vecTNow.y = 4.0f; + this->state.currentPrimitive->slots[index].process = -30 - std::max(rand() % 41, 0); + this->state.currentPrimitive->slots[index].maxHeight = 0.07f; + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(rand() % 121, 0) + 125); + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 6, 0)) + 6.0f; + this->state.currentPrimitive->slots[index].vecTNow.y = 4.0f; } else { - this->state.unknown_11C84->slots[index].process = -std::max(rand() % 26, 0); - this->state.unknown_11C84->slots[index].maxHeight = 0.1f; + this->state.currentPrimitive->slots[index].process = -std::max(rand() % 26, 0); + this->state.currentPrimitive->slots[index].maxHeight = 0.1f; if (kind < 3) { - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(rand() % 51, 0) + 125); } else { - this->state.unknown_11C84->slots[index].alphaB = static_cast(std::max(rand() % 121, 0) + 125); + this->state.currentPrimitive->slots[index].alphaB = static_cast(std::max(rand() % 121, 0) + 125); } - this->state.unknown_11C84->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[index].distance = static_cast(std::max(rand() % 6, 0)) + 6.0f; - this->state.unknown_11C84->slots[index].vecTNow.y = 5.0f; + this->state.currentPrimitive->slots[index].riseAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[index].distance = static_cast(std::max(rand() % 6, 0)) + 6.0f; + this->state.currentPrimitive->slots[index].vecTNow.y = 5.0f; } - this->state.unknown_11C84->slots[index].height[0] = 0.0f; - this->state.unknown_11C84->slots[index].vecTNow.x = static_cast(std::max(rand() % 7, 0)) * 0.1f + 0.6f; - this->state.unknown_11C84->slots[index].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[index].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[index].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[index].height[0] = 0.0f; + this->state.currentPrimitive->slots[index].vecTNow.x = static_cast(std::max(rand() % 7, 0)) * 0.1f + 0.6f; + this->state.currentPrimitive->slots[index].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[index].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[index].vecBNow.z = this->render.position.z; for (int height = 1; height < 21; ++height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; - this->state.unknown_11C84->slots[index].flag1[height] = 0; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].flag1[height] = 0; } - this->state.unknown_11C84->slots[index].alphaT = kind; + this->state.currentPrimitive->slots[index].alphaT = kind; if (kind == 1) { for (int step = 0; step < 10; ++step) { - this->state.unknown_11C84->slots[index].height[0] += 6.0f; + this->state.currentPrimitive->slots[index].height[0] += 6.0f; - if (this->state.unknown_11C84->slots[index].height[0] > 180.0f) { - this->state.unknown_11C84->slots[index].height[0] = 180.0f; + if (this->state.currentPrimitive->slots[index].height[0] > 180.0f) { + this->state.currentPrimitive->slots[index].height[0] = 180.0f; } - for (int layer = static_cast(this->state.unknown_11C84->slots[index].vecTNow.y); layer > 0; --layer) { - this->state.unknown_11C84->slots[index].height[layer] = this->state.unknown_11C84->slots[index].height[layer - 1]; + for (int layer = static_cast(this->state.currentPrimitive->slots[index].vecTNow.y); layer > 0; --layer) { + this->state.currentPrimitive->slots[index].height[layer] = this->state.currentPrimitive->slots[index].height[layer - 1]; } } } @@ -14457,95 +14457,95 @@ void CRagEffect::AsuraStrike(char kind) { } if (this->state.stateCnt == 1) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1u; - this->state.unknown_11C84->renderFlag |= 5u; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1u; + this->state.currentPrimitive->renderFlag |= 5u; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); if (kind == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\asura3.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\asura2.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\asura1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\asura3.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\asura2.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\asura1.tga", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\asura13.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\asura12.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\asura11.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\asura13.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\asura12.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\asura11.tga", 0, false, true, false); } - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 3; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = index * 20 - 40; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(index); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = index * 20 - 40; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(index); if (kind == 0) { - this->state.unknown_11C84->slots[index].distance = 18.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(-6 - index * 12); - this->state.unknown_11C84->slots[index].flag1[4] = 0; + this->state.currentPrimitive->slots[index].distance = 18.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(-6 - index * 12); + this->state.currentPrimitive->slots[index].flag1[4] = 0; } else { - this->state.unknown_11C84->slots[index].distance = 24.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(-8 - index * 16); - this->state.unknown_11C84->slots[index].flag1[4] = 3; + this->state.currentPrimitive->slots[index].distance = 24.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(-8 - index * 16); + this->state.currentPrimitive->slots[index].flag1[4] = 3; } for (int height = 1; height < 11; ++height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; } } } if (this->state.stateCnt == 21) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1u; - this->state.unknown_11C84->renderFlag |= 5u; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 68, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1u; + this->state.currentPrimitive->renderFlag |= 5u; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); if (kind == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\asura4.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\asura5.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\asura6.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\asura4.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\asura5.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\asura6.tga", 0, false, true, false); } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\asura14.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\asura15.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\asura16.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\asura14.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\asura15.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\asura16.tga", 0, false, true, false); } - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } for (int index = 0; index < 3; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = -40 - index * 20; - this->state.unknown_11C84->slots[index].alphaB = 0; - this->state.unknown_11C84->slots[index].flag1[0] = static_cast(index); + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = -40 - index * 20; + this->state.currentPrimitive->slots[index].alphaB = 0; + this->state.currentPrimitive->slots[index].flag1[0] = static_cast(index); if (kind == 0) { - this->state.unknown_11C84->slots[index].distance = 18.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(6 + index * 12); - this->state.unknown_11C84->slots[index].flag1[4] = 0; + this->state.currentPrimitive->slots[index].distance = 18.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(6 + index * 12); + this->state.currentPrimitive->slots[index].flag1[4] = 0; } else { - this->state.unknown_11C84->slots[index].distance = 24.0f; - this->state.unknown_11C84->slots[index].height[0] = static_cast(8 + index * 16); - this->state.unknown_11C84->slots[index].flag1[4] = 3; + this->state.currentPrimitive->slots[index].distance = 24.0f; + this->state.currentPrimitive->slots[index].height[0] = static_cast(8 + index * 16); + this->state.currentPrimitive->slots[index].flag1[4] = 3; } for (int height = 1; height < 11; ++height) { - this->state.unknown_11C84->slots[index].height[height] = 0.0f; + this->state.currentPrimitive->slots[index].height[height] = 0.0f; } } } @@ -14561,75 +14561,75 @@ void CRagEffect::QuadRingStackSized(const char* name, char kind) { if (kind == 33) { kind = 0; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 25, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 25, 0.0f, 0.0f, 0.0f, WorldObjects())->state; } else { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 23, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 23, 0.0f, 0.0f, 0.0f, WorldObjects())->state; } - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = static_cast(kind); + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = static_cast(kind); - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 315; - this->state.unknown_11C84->slots[0].maxHeight = 25.0f; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].alphaB = 180; - this->state.unknown_11C84->slots[0].distance = 4.5f; - this->state.unknown_11C84->slots[0].riseAngle = 70; - this->state.unknown_11C84->slots[0].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 315; + this->state.currentPrimitive->slots[0].maxHeight = 25.0f; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].alphaB = 180; + this->state.currentPrimitive->slots[0].distance = 4.5f; + this->state.currentPrimitive->slots[0].riseAngle = 70; + this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { - this->state.unknown_11C84->slots[0].height[height] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[height] = 0; + this->state.currentPrimitive->slots[0].height[height] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[height] = 0; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 315; - this->state.unknown_11C84->slots[1].maxHeight = 22.0f; - this->state.unknown_11C84->slots[1].rotStart = 90; - this->state.unknown_11C84->slots[1].alphaB = 180; - this->state.unknown_11C84->slots[1].distance = 5.0f; - this->state.unknown_11C84->slots[1].riseAngle = 57; - this->state.unknown_11C84->slots[1].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 315; + this->state.currentPrimitive->slots[1].maxHeight = 22.0f; + this->state.currentPrimitive->slots[1].rotStart = 90; + this->state.currentPrimitive->slots[1].alphaB = 180; + this->state.currentPrimitive->slots[1].distance = 5.0f; + this->state.currentPrimitive->slots[1].riseAngle = 57; + this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { - this->state.unknown_11C84->slots[1].height[height] = 0.0f; - this->state.unknown_11C84->slots[1].flag1[height] = 0; + this->state.currentPrimitive->slots[1].height[height] = 0.0f; + this->state.currentPrimitive->slots[1].flag1[height] = 0; } - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].process = 0; - this->state.unknown_11C84->slots[2].fullDisplayAngle = 315; - this->state.unknown_11C84->slots[2].maxHeight = 19.0f; - this->state.unknown_11C84->slots[2].rotStart = 180; - this->state.unknown_11C84->slots[2].alphaB = 180; - this->state.unknown_11C84->slots[2].distance = 5.5f; - this->state.unknown_11C84->slots[2].riseAngle = 45; - this->state.unknown_11C84->slots[2].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].process = 0; + this->state.currentPrimitive->slots[2].fullDisplayAngle = 315; + this->state.currentPrimitive->slots[2].maxHeight = 19.0f; + this->state.currentPrimitive->slots[2].rotStart = 180; + this->state.currentPrimitive->slots[2].alphaB = 180; + this->state.currentPrimitive->slots[2].distance = 5.5f; + this->state.currentPrimitive->slots[2].riseAngle = 45; + this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { - this->state.unknown_11C84->slots[2].height[height] = 0.0f; - this->state.unknown_11C84->slots[2].flag1[height] = 0; + this->state.currentPrimitive->slots[2].height[height] = 0.0f; + this->state.currentPrimitive->slots[2].flag1[height] = 0; } - this->state.unknown_11C84->slots[3].life = 1; - this->state.unknown_11C84->slots[3].process = 0; - this->state.unknown_11C84->slots[3].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[3].maxHeight = 250.0f; - this->state.unknown_11C84->slots[3].rotStart = 0; - this->state.unknown_11C84->slots[3].alphaB = 70; - this->state.unknown_11C84->slots[3].distance = 4.0f; - this->state.unknown_11C84->slots[3].riseAngle = 89; - this->state.unknown_11C84->slots[3].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[3].life = 1; + this->state.currentPrimitive->slots[3].process = 0; + this->state.currentPrimitive->slots[3].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[3].maxHeight = 250.0f; + this->state.currentPrimitive->slots[3].rotStart = 0; + this->state.currentPrimitive->slots[3].alphaB = 70; + this->state.currentPrimitive->slots[3].distance = 4.0f; + this->state.currentPrimitive->slots[3].riseAngle = 89; + this->state.currentPrimitive->slots[3].vecBNow.y = 0.0f; for (int height = 0; height < 21; ++height) { - this->state.unknown_11C84->slots[3].height[height] = 0.0f; - this->state.unknown_11C84->slots[3].flag1[height] = 0; + this->state.currentPrimitive->slots[3].height[height] = 0.0f; + this->state.currentPrimitive->slots[3].flag1[height] = 0; } } @@ -14645,27 +14645,27 @@ void CRagEffect::Sakura() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].maxHeight = static_cast(std::max(0, rand() % 2) + 2) * 0.1f; - this->state.unknown_11C84->size = static_cast(std::max(0, rand() % 6) + 22) / 100.0f; - this->state.unknown_11C84->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].vecBPre.x = static_cast(std::max(0, rand() % 300)) + this->render.position.x - 150.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 200.0f; - this->state.unknown_11C84->slots[0].vecBPre.z = static_cast(std::max(0, rand() % 300)) + this->render.position.z - 150.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 0; - this->state.unknown_11C84->alpha = 200.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\sakura01.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\sakura01.act"); - Owner(this->state.unknown_11C84).SetAction(rand() % 3, 36, 0); - Owner(this->state.unknown_11C84).InitSegment(); - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].maxHeight = static_cast(std::max(0, rand() % 2) + 2) * 0.1f; + this->state.currentPrimitive->size = static_cast(std::max(0, rand() % 6) + 22) / 100.0f; + this->state.currentPrimitive->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].vecBPre.x = static_cast(std::max(0, rand() % 300)) + this->render.position.x - 150.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 200.0f; + this->state.currentPrimitive->slots[0].vecBPre.z = static_cast(std::max(0, rand() % 300)) + this->render.position.z - 150.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 0; + this->state.currentPrimitive->alpha = 200.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\sakura01.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "\uc774\ud329\ud2b8\\sakura01.act"); + Owner(this->state.currentPrimitive).SetAction(rand() % 3, 36, 0); + Owner(this->state.currentPrimitive).InitSegment(); + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; } // OFFSET: 0x00C47F70 @@ -14810,36 +14810,36 @@ void CRagEffect::Gravitation() { for (int z = -10; z < 15; z += 5) { for (int x = -10; x < 15; x += 5) { for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 117, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern = 1; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 117, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern = 1; const int angle = std::max(rand() % 360, 0); rand(); ClientSine(angle); ClientCosine(angle); - this->state.unknown_11C84->deltaPos2.y = 10.0f; - this->state.unknown_11C84->deltaPos2.x = static_cast(x); - this->state.unknown_11C84->deltaPos2.z = static_cast(z); - this->state.unknown_11C84->duration = 250; - this->state.unknown_11C84->size = static_cast(std::max(rand() % 50, 0) + 300) / 100.0f; - this->state.unknown_11C84->heightSize = 18.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->latitude = static_cast(std::max(rand() % 40, 0) + 60); - EffectPrimitiveState& tilt = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2.y = 10.0f; + this->state.currentPrimitive->deltaPos2.x = static_cast(x); + this->state.currentPrimitive->deltaPos2.z = static_cast(z); + this->state.currentPrimitive->duration = 250; + this->state.currentPrimitive->size = static_cast(std::max(rand() % 50, 0) + 300) / 100.0f; + this->state.currentPrimitive->heightSize = 18.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->latitude = static_cast(std::max(rand() % 40, 0) + 60); + EffectPrimitiveState& tilt = *this->state.currentPrimitive; reinterpret_cast(tilt.transform)->MakeXRotation(GetRadian(static_cast(tilt.latitude))); - EffectPrimitiveState& turn = *this->state.unknown_11C84; + EffectPrimitiveState& turn = *this->state.currentPrimitive; reinterpret_cast(turn.transform)->AppendYRotation(GetRadian(static_cast(turn.longitude))); - EffectPrimitiveState& center = *this->state.unknown_11C84; + EffectPrimitiveState& center = *this->state.currentPrimitive; std::memcpy(center.rotTransform, center.transform, sizeof(center.rotTransform)); - this->state.unknown_11C84->speed = 1.0f; - this->state.unknown_11C84->accel = 0.01f; - this->state.unknown_11C84->alpha = 20.0f; - this->state.unknown_11C84->chCnt = 15; - this->state.unknown_11C84->changePoint = 12; - this->state.unknown_11C84->changeSpeed = -1.2f; - this->state.unknown_11C84->changeAccel = 0.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 10; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(i < 2 ? "effect\\stone.bmp" : "effect\\ice.tga", 0, false, true, false); + this->state.currentPrimitive->speed = 1.0f; + this->state.currentPrimitive->accel = 0.01f; + this->state.currentPrimitive->alpha = 20.0f; + this->state.currentPrimitive->chCnt = 15; + this->state.currentPrimitive->changePoint = 12; + this->state.currentPrimitive->changeSpeed = -1.2f; + this->state.currentPrimitive->changeAccel = 0.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 10; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(i < 2 ? "effect\\stone.bmp" : "effect\\ice.tga", 0, false, true, false); } } } @@ -14853,19 +14853,19 @@ void CRagEffect::ForestLight(const char* name, char flag) { } this->render.position = this->state.parent->render.position; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 66, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 66, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 0; + this->state.currentPrimitive->slots[i].life = 0; } for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; std::int16_t alphaB = 25; @@ -14877,33 +14877,33 @@ void CRagEffect::ForestLight(const char* name, char flag) { alphaB = 40; } - this->state.unknown_11C84->slots[i].alphaB = alphaB; + this->state.currentPrimitive->slots[i].alphaB = alphaB; - this->state.unknown_11C84->slots[i].distance = 0.0f; + this->state.currentPrimitive->slots[i].distance = 0.0f; if (i == 3) { - this->state.unknown_11C84->slots[3].process = 180; + this->state.currentPrimitive->slots[3].process = 180; if (flag == 1 || flag == 11) { - this->state.unknown_11C84->slots[3].maxHeight = 4.0f; + this->state.currentPrimitive->slots[3].maxHeight = 4.0f; } else if (flag == 2 || flag == 12 || flag == 13) { - this->state.unknown_11C84->slots[3].maxHeight = 1.0f; + this->state.currentPrimitive->slots[3].maxHeight = 1.0f; } else { - this->state.unknown_11C84->slots[3].maxHeight = 2.0f; + this->state.currentPrimitive->slots[3].maxHeight = 2.0f; } } else if (flag == 1 || flag == 11) { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(i * 2) + 4.0f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(i * 2) + 4.0f; } else if (flag == 2 || flag == 12 || flag == 13) { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(i) * 0.5f + 1.0f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(i) * 0.5f + 1.0f; } else { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(i) + 2.0f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(i) + 2.0f; } - this->state.unknown_11C84->slots[i].height[0] = this->state.unknown_11C84->slots[i].maxHeight; - this->state.unknown_11C84->slots[i].rotStart = static_cast(i * 25); - this->state.unknown_11C84->slots[i].vecTNow.x = this->render.position.x; - this->state.unknown_11C84->slots[i].vecTNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].vecTNow.z = this->render.position.z; + this->state.currentPrimitive->slots[i].height[0] = this->state.currentPrimitive->slots[i].maxHeight; + this->state.currentPrimitive->slots[i].rotStart = static_cast(i * 25); + this->state.currentPrimitive->slots[i].vecTNow.x = this->render.position.x; + this->state.currentPrimitive->slots[i].vecTNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].vecTNow.z = this->render.position.z; this->state.deltaPos[0] = this->render.position.x; this->state.deltaPos[1] = this->render.position.y; this->state.deltaPos[2] = this->render.position.z; @@ -14918,10 +14918,10 @@ void CRagEffect::ForestLight(const char* name, char flag) { this->state.deltaPos[2] -= 70.0f; } - this->state.unknown_11C84->slots[i].vecTPre.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[i].vecTPre.y = this->state.deltaPos[1]; - this->state.unknown_11C84->slots[i].vecTPre.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[i].flag1[0] = flag; + this->state.currentPrimitive->slots[i].vecTPre.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[i].vecTPre.y = this->state.deltaPos[1]; + this->state.currentPrimitive->slots[i].vecTPre.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[i].flag1[0] = flag; } } @@ -15040,9 +15040,9 @@ void CRagEffect::RenderAniClip(EZeffectClip* clip, const EZeffectTransform* tran } primitive->texture = texture; - primitive->unknown_0018 = transform->srcalpha; - primitive->unknown_001C = transform->destalpha; - primitive->unknown_0020 = transform->mtpreset; + primitive->sourceBlend = transform->srcalpha; + primitive->destinationBlend = transform->destalpha; + primitive->textureMode = transform->mtpreset; g_renderer->queues.Submit(primitive, 5, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } @@ -15059,22 +15059,22 @@ void CRagEffect::SandScatter() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern = 8; - this->state.unknown_11C84->duration = this->state.duration - std::max(0, rand() % 100); - this->state.unknown_11C84->speed = static_cast(std::max(0, rand() % 300) + 260) / 100.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(0, rand() % 15) + 130); - this->state.unknown_11C84->widthSize = 30.0f; - this->state.unknown_11C84->heightSize = 30.0f; - this->state.unknown_11C84->deltaPos2.x = static_cast(std::max(0, rand() % 640) - 500); - this->state.unknown_11C84->deltaPos2.y = static_cast(std::max(0, rand() % 50) - 240); - this->state.unknown_11C84->chCnt = std::max(0, rand() % 10) + 10; - this->state.unknown_11C84->alpha = 128.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - this->state.unknown_11C84->totalTexture = 1; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\sand1.bmp", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern = 8; + this->state.currentPrimitive->duration = this->state.duration - std::max(0, rand() % 100); + this->state.currentPrimitive->speed = static_cast(std::max(0, rand() % 300) + 260) / 100.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(0, rand() % 15) + 130); + this->state.currentPrimitive->widthSize = 30.0f; + this->state.currentPrimitive->heightSize = 30.0f; + this->state.currentPrimitive->deltaPos2.x = static_cast(std::max(0, rand() % 640) - 500); + this->state.currentPrimitive->deltaPos2.y = static_cast(std::max(0, rand() % 50) - 240); + this->state.currentPrimitive->chCnt = std::max(0, rand() % 10) + 10; + this->state.currentPrimitive->alpha = 128.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + this->state.currentPrimitive->totalTexture = 1; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\sand1.bmp", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } // OFFSET: 0x00C38D80 @@ -15185,13 +15185,13 @@ void CRagEffect::SendMsg( this->SetStateDuration(static_cast(first)); break; case AM_CHANGE_COLOR: - this->state.unknown_11C88[0] = static_cast(first); - this->state.unknown_11C88[1] = static_cast(second); - this->state.unknown_11C88[2] = static_cast(third); + this->state.colorChannels[0] = static_cast(first); + this->state.colorChannels[1] = static_cast(second); + this->state.colorChannels[2] = static_cast(third); break; case AM_EFFECT_LOOP_COUNT: if (first == 735 || first == 736 || first == 737 || first == 738) { - this->state.unknown_11C84->isChangeProcessed = static_cast(second); + this->state.currentPrimitive->isChangeProcessed = static_cast(second); } break; } @@ -15219,34 +15219,34 @@ void CRagEffect::Sight() { const float cosine = ClientCosine(angle); GetRadian(angle); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->deltaPos2.x = sine * 15.0f; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->deltaPos2.z = cosine * -15.0f; - this->state.unknown_11C84->deltaPosAccel.y = 0.1f; - this->state.unknown_11C84->animSpeed = 3; - this->state.unknown_11C84->size = 2.5f; - this->state.unknown_11C84->sizeSpeed = -0.1f; - this->state.unknown_11C84->alpha = 150.0f; - this->state.unknown_11C84->alphaSpeed = -3.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->deltaPos2.x = sine * 15.0f; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->deltaPos2.z = cosine * -15.0f; + this->state.currentPrimitive->deltaPosAccel.y = 0.1f; + this->state.currentPrimitive->animSpeed = 3; + this->state.currentPrimitive->size = 2.5f; + this->state.currentPrimitive->sizeSpeed = -0.1f; + this->state.currentPrimitive->alpha = 150.0f; + this->state.currentPrimitive->alphaSpeed = -3.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); + Owner(this->state.currentPrimitive).InitSegment(); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->deltaPos2.x = sine * 15.0f; - this->state.unknown_11C84->deltaPos2.y = 0.0f; - this->state.unknown_11C84->deltaPos2.z = cosine * -15.0f; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->size = 1.5f; - this->state.unknown_11C84->sizeSpeed = -0.06f; - this->state.unknown_11C84->alpha = 120.0f; - this->state.unknown_11C84->alphaSpeed = -1.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "Shadow.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->deltaPos2.x = sine * 15.0f; + this->state.currentPrimitive->deltaPos2.y = 0.0f; + this->state.currentPrimitive->deltaPos2.z = cosine * -15.0f; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->size = 1.5f; + this->state.currentPrimitive->sizeSpeed = -0.06f; + this->state.currentPrimitive->alpha = 120.0f; + this->state.currentPrimitive->alphaSpeed = -1.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "Shadow.act"); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C3D190 // FUNCTION: fn_20115 @@ -15259,22 +15259,22 @@ void CRagEffect::AlphaCenterRise() { if (this->state.stateCnt == 0) { for (int i = 20; i != 0; --i) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - this->state.unknown_11C84->deltaPos2.y = -40.0f; - this->state.unknown_11C84->longitude = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->longSpeed = static_cast(std::max(0, rand() % 60) + 10) / 10.0f; - const float accel = -(this->state.unknown_11C84->longSpeed / static_cast(this->state.unknown_11C84->duration)); - this->state.unknown_11C84->longAccel = accel / 1.5f; - this->state.unknown_11C84->arcAngle = static_cast(std::max(0, rand() % 25) + 5) / 10.0f; - this->state.unknown_11C84->heightSize = static_cast(std::max(0, rand() % 40) + 20); - this->state.unknown_11C84->heightSpeed = static_cast(std::max(0, rand() % 30) + 20) / 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - this->state.unknown_11C84->duration / 3; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 3, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + this->state.currentPrimitive->deltaPos2.y = -40.0f; + this->state.currentPrimitive->longitude = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->longSpeed = static_cast(std::max(0, rand() % 60) + 10) / 10.0f; + const float accel = -(this->state.currentPrimitive->longSpeed / static_cast(this->state.currentPrimitive->duration)); + this->state.currentPrimitive->longAccel = accel / 1.5f; + this->state.currentPrimitive->arcAngle = static_cast(std::max(0, rand() % 25) + 5) / 10.0f; + this->state.currentPrimitive->heightSize = static_cast(std::max(0, rand() % 40) + 20); + this->state.currentPrimitive->heightSpeed = static_cast(std::max(0, rand() % 30) + 20) / 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - this->state.currentPrimitive->duration / 3; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("EFFECT\\alpha_center.tga", 0, false, true, false); } return; @@ -15299,26 +15299,26 @@ bool CRagEffect::Potion_Awakening() { this->render.position = this->state.parent->render.position; if (static_cast(this->state.stateCnt - 13) <= 96u && this->state.stateCnt % 4 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 40; - EffectPrimitiveState& particle = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 40; + EffectPrimitiveState& particle = *this->state.currentPrimitive; reinterpret_cast(particle.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& spot = *this->state.unknown_11C84; + EffectPrimitiveState& spot = *this->state.currentPrimitive; spot.deltaPos2 = RotatedForward(spot.transform, static_cast(std::max(rand() % 7, 0) + 2)); - reinterpret_cast(this->state.unknown_11C84->transform)->MakeXRotation(GetRadian(90)); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 50, 0) + 20) / 60.0f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.2f; - this->state.unknown_11C84->red = 240; - this->state.unknown_11C84->green = 240; - this->state.unknown_11C84->blue = 120; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 180.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + reinterpret_cast(this->state.currentPrimitive->transform)->MakeXRotation(GetRadian(90)); + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 50, 0) + 20) / 60.0f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.2f; + this->state.currentPrimitive->red = 240; + this->state.currentPrimitive->green = 240; + this->state.currentPrimitive->blue = 120; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 180.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } this->ProcessEZ2STR(0.0f, -80.0f, 0.0f); @@ -15383,7 +15383,7 @@ void CRagEffect::StatusIconColumn() { this->state.lastPrim = CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects()); this->state.lastPrim->state.renderFlag = 0x201; - this->state.lastPrim->state.unknown_01C8[0] = 1; + this->state.lastPrim->state.useRenderFlag[0] = 1; this->state.lastPrim->state.pattern = 4; this->state.lastPrim->render.curMotion = 0; this->state.lastPrim->state.duration = 99999999; @@ -15477,54 +15477,54 @@ void CRagEffect::DecAgility() { if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_DecAgility.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->deltaPos2.y -= 80.0f; - this->state.unknown_11C84->longitude = 180.0f; - this->state.unknown_11C84->speed = 1.0f; - EffectPrimitiveState& banner = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->deltaPos2.y -= 80.0f; + this->state.currentPrimitive->longitude = 180.0f; + this->state.currentPrimitive->speed = 1.0f; + EffectPrimitiveState& banner = *this->state.currentPrimitive; banner.accel = -(banner.speed / static_cast(banner.duration)); - this->state.unknown_11C84->widthSize = 40.0f; - this->state.unknown_11C84->heightSize = 10.0f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 15.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 15; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\slow.bmp", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->widthSize = 40.0f; + this->state.currentPrimitive->heightSize = 10.0f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 15.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 15; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\slow.bmp", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } if ((this->state.stateCnt & 1) != 0) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 50; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 16, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 50; - EffectPrimitiveState& streak = *this->state.unknown_11C84; + EffectPrimitiveState& streak = *this->state.currentPrimitive; reinterpret_cast(streak.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& placed = *this->state.unknown_11C84; + EffectPrimitiveState& placed = *this->state.currentPrimitive; const vector3d offset = RotatedForward(placed.transform, static_cast(std::max(rand() % 7, 0) + 2)); placed.deltaPos2.x = offset.x; placed.deltaPos2.y = offset.y; placed.deltaPos2.z = offset.z; - this->state.unknown_11C84->deltaPos2.y -= 20.0f; + this->state.currentPrimitive->deltaPos2.y -= 20.0f; - EffectPrimitiveState& upright = *this->state.unknown_11C84; + EffectPrimitiveState& upright = *this->state.currentPrimitive; reinterpret_cast(upright.transform)->MakeXRotation(GetRadian(-90)); - this->state.unknown_11C84->accel = 0.015f; - this->state.unknown_11C84->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; - this->state.unknown_11C84->heightSize = 0.18f; - this->state.unknown_11C84->alpha = 0.0f; - this->state.unknown_11C84->maxAlpha = 200.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 20.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 20; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + this->state.currentPrimitive->accel = 0.015f; + this->state.currentPrimitive->widthSize = static_cast(std::max(rand() % 60, 0) + 30) / 10.0f; + this->state.currentPrimitive->heightSize = 0.18f; + this->state.currentPrimitive->alpha = 0.0f; + this->state.currentPrimitive->maxAlpha = 200.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 20.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 20; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ac_center2.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } // OFFSET: 0x00C0FD10 @@ -15613,9 +15613,9 @@ void CRagEffect::TexturedSkillAura(char type) { // OFFSET: 0x00C5F010 // FUNCTION: fn_20242 void CRagEffect::VioletRingCloud(char type) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -15677,7 +15677,7 @@ void CRagEffect::VioletRingCloud(char type) { if (this->state.stateCnt == 1) { this->render.position = this->state.parent->render.position; - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 63, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -15740,7 +15740,7 @@ void CRagEffect::VioletRingCloud(char type) { } if (this->state.stateCnt == 2) { - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -15809,129 +15809,129 @@ void CRagEffect::VioletRingCloud(char type) { // FUNCTION: fn_20243 void CRagEffect::TexturedMagicRing(char type) { if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); if (type == 3) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_red.tga", 0, false, true, false); - this->state.unknown_11C84->size = 10.0f; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_red.tga", 0, false, true, false); + this->state.currentPrimitive->size = 10.0f; } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); - this->state.unknown_11C84->size = 4.0f; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\magic_violet.tga", 0, false, true, false); + this->state.currentPrimitive->size = 4.0f; } - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[0].maxHeight = 80.0f; - this->state.unknown_11C84->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 7.0f; - this->state.unknown_11C84->slots[0].riseAngle = 90; - this->state.unknown_11C84->slots[0].alphaT = static_cast(type == 1 ? -1 : 1400); - this->state.unknown_11C84->slots[0].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[0].maxHeight = 80.0f; + this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 7.0f; + this->state.currentPrimitive->slots[0].riseAngle = 90; + this->state.currentPrimitive->slots[0].alphaT = static_cast(type == 1 ? -1 : 1400); + this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[0].height[i] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[i] = 3; + this->state.currentPrimitive->slots[0].height[i] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[i] = 3; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[1].maxHeight = 80.0f; - this->state.unknown_11C84->slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[1].distance = 5.5f; - this->state.unknown_11C84->slots[1].riseAngle = 90; - this->state.unknown_11C84->slots[1].alphaT = static_cast(type == 1 ? -1 : 1400); - this->state.unknown_11C84->slots[1].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[1].maxHeight = 80.0f; + this->state.currentPrimitive->slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[1].distance = 5.5f; + this->state.currentPrimitive->slots[1].riseAngle = 90; + this->state.currentPrimitive->slots[1].alphaT = static_cast(type == 1 ? -1 : 1400); + this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[1].height[i] = 0.0f; - this->state.unknown_11C84->slots[1].flag1[i] = 3; + this->state.currentPrimitive->slots[1].height[i] = 0.0f; + this->state.currentPrimitive->slots[1].flag1[i] = 3; } - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].process = 0; - this->state.unknown_11C84->slots[2].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[2].maxHeight = 80.0f; - this->state.unknown_11C84->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[2].alphaB = 0; - this->state.unknown_11C84->slots[2].distance = 4.0f; - this->state.unknown_11C84->slots[2].riseAngle = 90; - this->state.unknown_11C84->slots[2].alphaT = static_cast(type == 1 ? -1 : 1400); - this->state.unknown_11C84->slots[2].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].process = 0; + this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[2].maxHeight = 80.0f; + this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[2].alphaB = 0; + this->state.currentPrimitive->slots[2].distance = 4.0f; + this->state.currentPrimitive->slots[2].riseAngle = 90; + this->state.currentPrimitive->slots[2].alphaT = static_cast(type == 1 ? -1 : 1400); + this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[2].height[i] = 0.0f; - this->state.unknown_11C84->slots[2].flag1[i] = 3; + this->state.currentPrimitive->slots[2].height[i] = 0.0f; + this->state.currentPrimitive->slots[2].flag1[i] = 3; } - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive->slots[3].life = 0; } if (this->state.stateCnt == 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); - this->state.unknown_11C84->size = type == 3 ? 10.0f : 4.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); + this->state.currentPrimitive->size = type == 3 ? 10.0f : 4.0f; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 30; - this->state.unknown_11C84->slots[0].maxHeight = 2.5f; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 13.0f; - this->state.unknown_11C84->slots[0].riseAngle = 90; - this->state.unknown_11C84->slots[0].alphaT = 3; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 30; + this->state.currentPrimitive->slots[0].maxHeight = 2.5f; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 13.0f; + this->state.currentPrimitive->slots[0].riseAngle = 90; + this->state.currentPrimitive->slots[0].alphaT = 3; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[0].height[i] = 1.5f; - this->state.unknown_11C84->slots[0].flag1[i] = 0; + this->state.currentPrimitive->slots[0].height[i] = 1.5f; + this->state.currentPrimitive->slots[0].flag1[i] = 0; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 30; - this->state.unknown_11C84->slots[1].maxHeight = 5.0f; - this->state.unknown_11C84->slots[1].rotStart = 90; - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[1].distance = 11.0f; - this->state.unknown_11C84->slots[1].riseAngle = 90; - this->state.unknown_11C84->slots[1].alphaT = 3; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 30; + this->state.currentPrimitive->slots[1].maxHeight = 5.0f; + this->state.currentPrimitive->slots[1].rotStart = 90; + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[1].distance = 11.0f; + this->state.currentPrimitive->slots[1].riseAngle = 90; + this->state.currentPrimitive->slots[1].alphaT = 3; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[1].height[i] = 1.5f; - this->state.unknown_11C84->slots[1].flag1[i] = 0; + this->state.currentPrimitive->slots[1].height[i] = 1.5f; + this->state.currentPrimitive->slots[1].flag1[i] = 0; } - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].process = 0; - this->state.unknown_11C84->slots[2].fullDisplayAngle = 30; - this->state.unknown_11C84->slots[2].maxHeight = 7.5f; - this->state.unknown_11C84->slots[2].rotStart = 180; - this->state.unknown_11C84->slots[2].alphaB = 0; - this->state.unknown_11C84->slots[2].distance = 9.0f; - this->state.unknown_11C84->slots[2].riseAngle = 90; - this->state.unknown_11C84->slots[2].alphaT = 3; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].process = 0; + this->state.currentPrimitive->slots[2].fullDisplayAngle = 30; + this->state.currentPrimitive->slots[2].maxHeight = 7.5f; + this->state.currentPrimitive->slots[2].rotStart = 180; + this->state.currentPrimitive->slots[2].alphaB = 0; + this->state.currentPrimitive->slots[2].distance = 9.0f; + this->state.currentPrimitive->slots[2].riseAngle = 90; + this->state.currentPrimitive->slots[2].alphaT = 3; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[2].height[i] = 1.5f; - this->state.unknown_11C84->slots[2].flag1[i] = 0; + this->state.currentPrimitive->slots[2].height[i] = 1.5f; + this->state.currentPrimitive->slots[2].flag1[i] = 0; } - this->state.unknown_11C84->slots[3].life = 1; - this->state.unknown_11C84->slots[3].process = 0; - this->state.unknown_11C84->slots[3].fullDisplayAngle = 30; - this->state.unknown_11C84->slots[3].maxHeight = 10.0f; - this->state.unknown_11C84->slots[3].rotStart = 270; - this->state.unknown_11C84->slots[3].alphaB = 0; - this->state.unknown_11C84->slots[3].distance = 8.0f; - this->state.unknown_11C84->slots[3].riseAngle = 90; - this->state.unknown_11C84->slots[3].alphaT = 3; + this->state.currentPrimitive->slots[3].life = 1; + this->state.currentPrimitive->slots[3].process = 0; + this->state.currentPrimitive->slots[3].fullDisplayAngle = 30; + this->state.currentPrimitive->slots[3].maxHeight = 10.0f; + this->state.currentPrimitive->slots[3].rotStart = 270; + this->state.currentPrimitive->slots[3].alphaB = 0; + this->state.currentPrimitive->slots[3].distance = 8.0f; + this->state.currentPrimitive->slots[3].riseAngle = 90; + this->state.currentPrimitive->slots[3].alphaT = 3; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[3].height[i] = 1.5f; - this->state.unknown_11C84->slots[3].flag1[i] = 0; + this->state.currentPrimitive->slots[3].height[i] = 1.5f; + this->state.currentPrimitive->slots[3].flag1[i] = 0; } } } @@ -16075,11 +16075,11 @@ void CRagEffect::TexturedRisingRing(const char* name) { // OFFSET: 0x00C52D20 // FUNCTION: fn_20196 bool CRagEffect::TexturedRisingRingStages(const char* name, char level) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -16137,7 +16137,7 @@ bool CRagEffect::TexturedRisingRingStages(const char* name, char level) { if (level == 1) { if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -16194,7 +16194,7 @@ bool CRagEffect::TexturedRisingRingStages(const char* name, char level) { } else { if (this->state.stateCnt == 30) { PlayEffectWave(*this, "effect\\EF_GlassWall.wav"); - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -16250,7 +16250,7 @@ bool CRagEffect::TexturedRisingRingStages(const char* name, char level) { } if (this->state.stateCnt == 60) { - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -16318,17 +16318,17 @@ void CRagEffect::Cloud11Burst(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); - this->state.unknown_11C84->size = kind == 1 ? 8.0f : 5.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 62, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\cloud11.tga", 0, false, true, false); + this->state.currentPrimitive->size = kind == 1 ? 8.0f : 5.0f; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = 30; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 30; float maxHeight; if (kind == 1) { @@ -16341,13 +16341,13 @@ void CRagEffect::Cloud11Burst(char kind) { maxHeight = static_cast(i) * 2.0f + 5.0f; } - this->state.unknown_11C84->slots[i].maxHeight = maxHeight; - this->state.unknown_11C84->slots[i].rotStart = static_cast(i * 90); - this->state.unknown_11C84->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].maxHeight = maxHeight; + this->state.currentPrimitive->slots[i].rotStart = static_cast(i * 90); + this->state.currentPrimitive->slots[i].alphaB = 0; float distance; if (kind >= 2) { - this->state.unknown_11C84->slots[i].alphaT = 2; + this->state.currentPrimitive->slots[i].alphaT = 2; if (kind == 2) { distance = 14.0f - static_cast(i) * 2.0f; } else if (kind == 3) { @@ -16356,7 +16356,7 @@ void CRagEffect::Cloud11Burst(char kind) { distance = static_cast(std::max(rand() % 101, 0)) * 0.03f + 4.5f; } } else { - this->state.unknown_11C84->slots[i].alphaT = 1; + this->state.currentPrimitive->slots[i].alphaT = 1; if (kind == 1) { distance = static_cast(std::max(rand() % 101, 0)) * 0.01f + 2.5f; } else { @@ -16364,12 +16364,12 @@ void CRagEffect::Cloud11Burst(char kind) { } } - this->state.unknown_11C84->slots[i].distance = distance; - this->state.unknown_11C84->slots[i].riseAngle = static_cast(std::max(rand() % 21, 0) + 80); + this->state.currentPrimitive->slots[i].distance = distance; + this->state.currentPrimitive->slots[i].riseAngle = static_cast(std::max(rand() % 21, 0) + 80); for (int j = 0; j < 21; ++j) { - this->state.unknown_11C84->slots[i].height[j] = 1.0f; - this->state.unknown_11C84->slots[i].flag1[j] = 0; + this->state.currentPrimitive->slots[i].height[j] = 1.0f; + this->state.currentPrimitive->slots[i].flag1[j] = 0; } } } @@ -16507,55 +16507,55 @@ void CRagEffect::WaterfallSheets(char first, char second, char third) { this->render.position.x = parent.position.x; this->render.position.y = parent.position.y; this->render.position.z = parent.position.z; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 3; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 79, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 3; + AllocateTextures(*this->state.currentPrimitive); if (third == 0) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\waterfall11.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\waterfall12.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\waterfall13.tga", 0, false, true, false); } else if (third == 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\waterfall31.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\waterfall32.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\waterfall33.tga", 0, false, true, false); } else if (third == 10) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); } int width = 80; int tall = 30; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 1; - this->state.unknown_11C84->slots[index].process = 0; - this->state.unknown_11C84->slots[index].alphaB = 120; - this->state.unknown_11C84->slots[index].flag1[0] = first; - this->state.unknown_11C84->slots[index].distance = static_cast(index + 36); - this->state.unknown_11C84->slots[index].flag1[2] = 10; + this->state.currentPrimitive->slots[index].life = 1; + this->state.currentPrimitive->slots[index].process = 0; + this->state.currentPrimitive->slots[index].alphaB = 120; + this->state.currentPrimitive->slots[index].flag1[0] = first; + this->state.currentPrimitive->slots[index].distance = static_cast(index + 36); + this->state.currentPrimitive->slots[index].flag1[2] = 10; for (int height = 0; height < 20; ++height) { - this->state.unknown_11C84->slots[index].height[height] = static_cast(height * 40); + this->state.currentPrimitive->slots[index].height[height] = static_cast(height * 40); } - this->state.unknown_11C84->slots[index].vecBNow.z = static_cast(index) * 0.25f - 1.0f; + this->state.currentPrimitive->slots[index].vecBNow.z = static_cast(index) * 0.25f - 1.0f; if (second == 0) { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(width); - this->state.unknown_11C84->slots[index].flag1[1] = 1; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(width); + this->state.currentPrimitive->slots[index].flag1[1] = 1; } else if (second == 1) { - this->state.unknown_11C84->slots[index].maxHeight = static_cast(tall); - this->state.unknown_11C84->slots[index].flag1[1] = 1; + this->state.currentPrimitive->slots[index].maxHeight = static_cast(tall); + this->state.currentPrimitive->slots[index].flag1[1] = 1; } else if (second == 10) { - this->state.unknown_11C84->slots[index].maxHeight = 0.0f; - this->state.unknown_11C84->slots[index].alphaB = 70; - this->state.unknown_11C84->slots[index].flag1[1] = 10; + this->state.currentPrimitive->slots[index].maxHeight = 0.0f; + this->state.currentPrimitive->slots[index].alphaB = 70; + this->state.currentPrimitive->slots[index].flag1[1] = 10; } else { - this->state.unknown_11C84->slots[index].flag1[1] = 1; + this->state.currentPrimitive->slots[index].flag1[1] = 1; } tall -= 6; @@ -16634,53 +16634,53 @@ void CRagEffect::EmpShockBurst(const char* name, char flag) { } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1; - this->state.unknown_11C84->renderFlag |= 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 1.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1; + this->state.currentPrimitive->renderFlag |= 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 1.0f; int process = 0; for (int i = 0; process > -80; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = process; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].maxHeight = 10.0f; - this->state.unknown_11C84->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].alphaB = 200; - this->state.unknown_11C84->slots[i].height[3] = static_cast(i); - this->state.unknown_11C84->slots[i].height[4] = 10.0f; - this->state.unknown_11C84->slots[i].height[5] = static_cast(flag); + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = process; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].maxHeight = 10.0f; + this->state.currentPrimitive->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].alphaB = 200; + this->state.currentPrimitive->slots[i].height[3] = static_cast(i); + this->state.currentPrimitive->slots[i].height[4] = 10.0f; + this->state.currentPrimitive->slots[i].height[5] = static_cast(flag); process -= 20; } } if (this->state.stateCnt == 10) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1; - this->state.unknown_11C84->renderFlag |= 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 1.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 132, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1; + this->state.currentPrimitive->renderFlag |= 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 1.0f; int process = 0; for (int i = 0; process > -80; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = process; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].maxHeight = 10.0f; - this->state.unknown_11C84->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].alphaB = 200; - this->state.unknown_11C84->slots[i].height[3] = static_cast(i); - this->state.unknown_11C84->slots[i].height[4] = 10.0f; - this->state.unknown_11C84->slots[i].height[5] = static_cast(flag); + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = process; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].maxHeight = 10.0f; + this->state.currentPrimitive->slots[i].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].alphaB = 200; + this->state.currentPrimitive->slots[i].height[3] = static_cast(i); + this->state.currentPrimitive->slots[i].height[4] = 10.0f; + this->state.currentPrimitive->slots[i].height[5] = static_cast(flag); process -= 20; } } @@ -16689,7 +16689,7 @@ void CRagEffect::EmpShockBurst(const char* name, char flag) { // OFFSET: 0x00C64CA0 // FUNCTION: fn_20264 void CPc::SetSprShoe(int value) { - this->unknown_0460[0] = value; + this->shoe[0] = value; } // OFFSET: 0x00C46410 @@ -16704,57 +16704,57 @@ void CRagEffect::TexturedMagicRing(const char* name, char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 48, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 48, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int i = 0; i < 4; ++i) { if (kind == 0) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].vecBPre.x = static_cast(std::max(rand() % 40, 0) - 20); - this->state.unknown_11C84->slots[i].vecBPre.z = static_cast(std::max(rand() % 40, 0) - 20); - this->state.unknown_11C84->slots[i].vecBNow.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = 0.0f; - this->state.unknown_11C84->slots[i].alphaB = 15; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].vecBPre.x = static_cast(std::max(rand() % 40, 0) - 20); + this->state.currentPrimitive->slots[i].vecBPre.z = static_cast(std::max(rand() % 40, 0) - 20); + this->state.currentPrimitive->slots[i].vecBNow.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = 0.0f; + this->state.currentPrimitive->slots[i].alphaB = 15; } else if (kind == 1 || kind == 2) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); if (i < 2) { - this->state.unknown_11C84->slots[i].vecBPre.x = static_cast(std::max(rand() % 7, 0)) - 3.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = -3.0f; - this->state.unknown_11C84->slots[i].vecBNow.x = -this->state.unknown_11C84->slots[i].vecBPre.x; - this->state.unknown_11C84->slots[i].vecBNow.z = 3.0f; + this->state.currentPrimitive->slots[i].vecBPre.x = static_cast(std::max(rand() % 7, 0)) - 3.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = -3.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = -this->state.currentPrimitive->slots[i].vecBPre.x; + this->state.currentPrimitive->slots[i].vecBNow.z = 3.0f; } else { - this->state.unknown_11C84->slots[i].vecBPre.x = -3.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = static_cast(std::max(rand() % 7, 0)) - 3.0f; - this->state.unknown_11C84->slots[i].vecBNow.x = 3.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = -this->state.unknown_11C84->slots[i].vecBPre.z; + this->state.currentPrimitive->slots[i].vecBPre.x = -3.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = static_cast(std::max(rand() % 7, 0)) - 3.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = 3.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = -this->state.currentPrimitive->slots[i].vecBPre.z; } - this->state.unknown_11C84->slots[i].alphaB = 50; - this->state.unknown_11C84->slots[i].height[0] = static_cast(kind); + this->state.currentPrimitive->slots[i].alphaB = 50; + this->state.currentPrimitive->slots[i].height[0] = static_cast(kind); } else if (kind == 3 || kind == 4) { - this->state.unknown_11C84->slots[i].life = i < 2 ? 1 : 0; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].life = i < 2 ? 1 : 0; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); if (i < 1) { - this->state.unknown_11C84->slots[i].vecBPre.x = 6.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.x = -6.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.x = 6.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = -6.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = -6.0f; - this->state.unknown_11C84->slots[i].vecBNow.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = 6.0f; + this->state.currentPrimitive->slots[i].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = -6.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = 6.0f; } - this->state.unknown_11C84->slots[i].alphaB = 100; - this->state.unknown_11C84->slots[i].height[0] = static_cast(kind); + this->state.currentPrimitive->slots[i].alphaB = 100; + this->state.currentPrimitive->slots[i].height[0] = static_cast(kind); } } } @@ -16869,53 +16869,53 @@ void CRagEffect::TexturedStorm2(const char* name, char kind) { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 111, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 111, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int i = 0; i < 2; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].maxHeight = 0.07f; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 1.0f; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].vecBPre.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[i].vecBPre.y = this->state.deltaPos[1]; - this->state.unknown_11C84->slots[i].vecBPre.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[12] = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[i].vecBNow.y = this->state.deltaPos[1]; - this->state.unknown_11C84->slots[i].vecBNow.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[i].height[4] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[5] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[6] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[13] = 0.0f; - this->state.unknown_11C84->slots[i].vecTPre.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[i].vecTPre.y = this->state.deltaPos[1]; - this->state.unknown_11C84->slots[i].vecTPre.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[i].height[8] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[9] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[10] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].height[14] = 0.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].maxHeight = 0.07f; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(0, rand() % 11)) * 0.1f + 1.0f; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].vecBPre.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[i].vecBPre.y = this->state.deltaPos[1]; + this->state.currentPrimitive->slots[i].vecBPre.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[12] = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[i].vecBNow.y = this->state.deltaPos[1]; + this->state.currentPrimitive->slots[i].vecBNow.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[i].height[4] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[5] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[6] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[13] = 0.0f; + this->state.currentPrimitive->slots[i].vecTPre.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[i].vecTPre.y = this->state.deltaPos[1]; + this->state.currentPrimitive->slots[i].vecTPre.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[i].height[8] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[9] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[10] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].height[14] = 0.0f; if (kind == 2) { - this->state.unknown_11C84->slots[i].height[15] = 4.0f; + this->state.currentPrimitive->slots[i].height[15] = 4.0f; } else if (kind == 3) { - this->state.unknown_11C84->slots[i].height[15] = static_cast(rand() % 3 + 1); + this->state.currentPrimitive->slots[i].height[15] = static_cast(rand() % 3 + 1); } else { - this->state.unknown_11C84->slots[i].height[15] = 0.0f; + this->state.currentPrimitive->slots[i].height[15] = 0.0f; } } } @@ -16930,51 +16930,51 @@ void CRagEffect::RingRedPulse(const char* name, float x, float z) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 110, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 10.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 110, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 10.0f; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[0].maxHeight = 12.0f; - this->state.unknown_11C84->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 2.3f; - this->state.unknown_11C84->slots[0].riseAngle = 86; - this->state.unknown_11C84->slots[0].alphaT = static_cast(this->state.duration) - 25; - this->state.unknown_11C84->slots[0].vecBNow.x = x; - this->state.unknown_11C84->slots[0].vecBNow.y = 1234.5f; - this->state.unknown_11C84->slots[0].vecBNow.z = z; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[0].maxHeight = 12.0f; + this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 2.3f; + this->state.currentPrimitive->slots[0].riseAngle = 86; + this->state.currentPrimitive->slots[0].alphaT = static_cast(this->state.duration) - 25; + this->state.currentPrimitive->slots[0].vecBNow.x = x; + this->state.currentPrimitive->slots[0].vecBNow.y = 1234.5f; + this->state.currentPrimitive->slots[0].vecBNow.z = z; for (int j = 0; j < 21; ++j) { - this->state.unknown_11C84->slots[0].height[j] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[j] = 33; + this->state.currentPrimitive->slots[0].height[j] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[j] = 33; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[1].maxHeight = 25.0f; - this->state.unknown_11C84->slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[1].distance = 2.0f; - this->state.unknown_11C84->slots[1].riseAngle = 90; - this->state.unknown_11C84->slots[1].alphaT = static_cast(this->state.duration) - 25; - this->state.unknown_11C84->slots[1].vecBNow.x = x; - this->state.unknown_11C84->slots[1].vecBNow.y = 1234.5f; - this->state.unknown_11C84->slots[1].vecBNow.z = z; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[1].maxHeight = 25.0f; + this->state.currentPrimitive->slots[1].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[1].distance = 2.0f; + this->state.currentPrimitive->slots[1].riseAngle = 90; + this->state.currentPrimitive->slots[1].alphaT = static_cast(this->state.duration) - 25; + this->state.currentPrimitive->slots[1].vecBNow.x = x; + this->state.currentPrimitive->slots[1].vecBNow.y = 1234.5f; + this->state.currentPrimitive->slots[1].vecBNow.z = z; for (int j = 0; j < 21; ++j) { - this->state.unknown_11C84->slots[1].height[j] = 0.0f; - this->state.unknown_11C84->slots[1].flag1[j] = 33; + this->state.currentPrimitive->slots[1].height[j] = 0.0f; + this->state.currentPrimitive->slots[1].flag1[j] = 33; } - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; } // OFFSET: 0x00C47990 @@ -16986,52 +16986,52 @@ void CRagEffect::LineStreakLayered(short kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0x201; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 56, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0x201; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(kind < 10 ? "effect\\line3.tga" : "effect\\line3y.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].distance = 100.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].distance = 100.0f; if (kind % 10 == 0) { - this->state.unknown_11C84->slots[i].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); + this->state.currentPrimitive->slots[i].height[0] = -15.0f - static_cast(std::max(rand() % 11, 0)); } else if (kind % 10 == 1) { - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 11, 0)) + 15.0f; } - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(rand() % 200, 0)); + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(rand() % 200, 0)); if (kind < 10) { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.3f; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; - this->state.unknown_11C84->slots[i].flag1[0] = static_cast(rand() % 3); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.3f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 20.0f; + this->state.currentPrimitive->slots[i].flag1[0] = static_cast(rand() % 3); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; } else if (kind > 19) { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.4f; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 30.0f; - this->state.unknown_11C84->slots[i].flag1[0] = static_cast(rand() % 3 + 20); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(rand() % 4) * 0.1f + 0.4f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 30.0f; + this->state.currentPrimitive->slots[i].flag1[0] = static_cast(rand() % 3 + 20); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(rand() % 21, 0)) * 0.1f + 1.5f; } else { - this->state.unknown_11C84->slots[i].maxHeight = static_cast(std::max(rand() % 6, 0)) * 0.1f + g_depthAverageHalf; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 40.0f; - this->state.unknown_11C84->slots[i].flag1[0] = static_cast(rand() % 3 + 10); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(rand() % 11, 0)) * 0.1f + 1.0f; + this->state.currentPrimitive->slots[i].maxHeight = static_cast(std::max(rand() % 6, 0)) * 0.1f + g_depthAverageHalf; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 31, 0)) + 40.0f; + this->state.currentPrimitive->slots[i].flag1[0] = static_cast(rand() % 3 + 10); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(rand() % 11, 0)) * 0.1f + 1.0f; } Get_Angle( this->state.deltaPos[0] - this->render.position.x, this->state.deltaPos[2] - this->render.position.z, - &this->state.unknown_11C84->slots[i].riseAngle + &this->state.currentPrimitive->slots[i].riseAngle ); - this->state.unknown_11C84->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].alphaB = 0; } } @@ -17046,59 +17046,59 @@ void CRagEffect::TorchRedRing(char kind) { this->render.position = this->state.parent->render.position; - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 133, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 13; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\torch_red01.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\torch_red02.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\torch_red03.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\torch_red04.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\torch_red05.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[5] = g_texMgr.Load("effect\\torch_red06.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[6] = g_texMgr.Load("effect\\torch_red07.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[7] = g_texMgr.Load("effect\\torch_red08.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[8] = g_texMgr.Load("effect\\torch_red09.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[9] = g_texMgr.Load("effect\\torch_red10.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[10] = g_texMgr.Load("effect\\torch_red11.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[11] = g_texMgr.Load("effect\\torch_red12.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[12] = g_texMgr.Load("effect\\torch_red13.bmp", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 133, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 13; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\torch_red01.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\torch_red02.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\torch_red03.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\torch_red04.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\torch_red05.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[5] = g_texMgr.Load("effect\\torch_red06.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[6] = g_texMgr.Load("effect\\torch_red07.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[7] = g_texMgr.Load("effect\\torch_red08.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[8] = g_texMgr.Load("effect\\torch_red09.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[9] = g_texMgr.Load("effect\\torch_red10.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[10] = g_texMgr.Load("effect\\torch_red11.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[11] = g_texMgr.Load("effect\\torch_red12.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[12] = g_texMgr.Load("effect\\torch_red13.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].distance = 12.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 12.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 4; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; - this->state.unknown_11C84->slots[0].height[8] = 0.0f; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->deltaPos.x = this->state.deltaPos[0]; - this->state.unknown_11C84->deltaPos.y = this->state.deltaPos[1]; - this->state.unknown_11C84->deltaPos.z = this->state.deltaPos[2]; + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].distance = 12.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 12.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 4; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].height[8] = 0.0f; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->deltaPos.x = this->state.deltaPos[0]; + this->state.currentPrimitive->deltaPos.y = this->state.deltaPos[1]; + this->state.currentPrimitive->deltaPos.z = this->state.deltaPos[2]; Get_Angle( this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], - &this->state.unknown_11C84->slots[0].riseAngle + &this->state.currentPrimitive->slots[0].riseAngle ); - this->state.unknown_11C84->slots[0].riseAngle += 180; + this->state.currentPrimitive->slots[0].riseAngle += 180; - if (this->state.unknown_11C84->slots[0].riseAngle >= 360) { - this->state.unknown_11C84->slots[0].riseAngle -= 360; + if (this->state.currentPrimitive->slots[0].riseAngle >= 360) { + this->state.currentPrimitive->slots[0].riseAngle -= 360; } - this->state.unknown_11C84->slots[0].vecBNow.x = this->state.deltaPos[0]; - this->state.unknown_11C84->slots[0].vecBNow.z = this->state.deltaPos[2]; - this->state.unknown_11C84->slots[0].vecBNow.y = this->state.unknown_11C84->slots[0].vecBPre.y; - this->state.unknown_11C84->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].flag1[0] = 0; - this->state.unknown_11C84->slots[0].flag1[4] = kind; + this->state.currentPrimitive->slots[0].vecBNow.x = this->state.deltaPos[0]; + this->state.currentPrimitive->slots[0].vecBNow.z = this->state.deltaPos[2]; + this->state.currentPrimitive->slots[0].vecBNow.y = this->state.currentPrimitive->slots[0].vecBPre.y; + this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].flag1[4] = kind; } // OFFSET: 0x00C510C0 @@ -17110,72 +17110,72 @@ void CRagEffect::TexturedSlashAir(const char* name, char size, char phase) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 108, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = static_cast(size); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 108, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = static_cast(size); for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].fullDisplayAngle = 315; - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 315; + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.y = 0.0f; if (phase == 0) { if (i == 0) { - this->state.unknown_11C84->slots[i].distance = 4.5f; - this->state.unknown_11C84->slots[i].riseAngle = 85; - this->state.unknown_11C84->slots[i].maxHeight = 27.0f; - this->state.unknown_11C84->slots[i].rotStart = 0; + this->state.currentPrimitive->slots[i].distance = 4.5f; + this->state.currentPrimitive->slots[i].riseAngle = 85; + this->state.currentPrimitive->slots[i].maxHeight = 27.0f; + this->state.currentPrimitive->slots[i].rotStart = 0; } else if (i == 1) { - this->state.unknown_11C84->slots[i].distance = 5.0f; - this->state.unknown_11C84->slots[i].riseAngle = 80; - this->state.unknown_11C84->slots[i].maxHeight = 28.0f; - this->state.unknown_11C84->slots[i].rotStart = 90; + this->state.currentPrimitive->slots[i].distance = 5.0f; + this->state.currentPrimitive->slots[i].riseAngle = 80; + this->state.currentPrimitive->slots[i].maxHeight = 28.0f; + this->state.currentPrimitive->slots[i].rotStart = 90; } else if (i == 2) { - this->state.unknown_11C84->slots[i].distance = 5.5f; - this->state.unknown_11C84->slots[i].riseAngle = 70; - this->state.unknown_11C84->slots[i].maxHeight = 29.0f; - this->state.unknown_11C84->slots[i].rotStart = 180; + this->state.currentPrimitive->slots[i].distance = 5.5f; + this->state.currentPrimitive->slots[i].riseAngle = 70; + this->state.currentPrimitive->slots[i].maxHeight = 29.0f; + this->state.currentPrimitive->slots[i].rotStart = 180; } else if (i == 3) { - this->state.unknown_11C84->slots[i].distance = 5.0f; - this->state.unknown_11C84->slots[i].riseAngle = 75; - this->state.unknown_11C84->slots[i].maxHeight = 30.0f; - this->state.unknown_11C84->slots[i].rotStart = 270; + this->state.currentPrimitive->slots[i].distance = 5.0f; + this->state.currentPrimitive->slots[i].riseAngle = 75; + this->state.currentPrimitive->slots[i].maxHeight = 30.0f; + this->state.currentPrimitive->slots[i].rotStart = 270; } } else if (phase == 1) { if (i == 0) { - this->state.unknown_11C84->slots[i].distance = 5.5f; - this->state.unknown_11C84->slots[i].riseAngle = 50; - this->state.unknown_11C84->slots[i].maxHeight = 30.0f; - this->state.unknown_11C84->slots[i].rotStart = 90; + this->state.currentPrimitive->slots[i].distance = 5.5f; + this->state.currentPrimitive->slots[i].riseAngle = 50; + this->state.currentPrimitive->slots[i].maxHeight = 30.0f; + this->state.currentPrimitive->slots[i].rotStart = 90; } else if (i == 1) { - this->state.unknown_11C84->slots[i].distance = 6.0f; - this->state.unknown_11C84->slots[i].riseAngle = 55; - this->state.unknown_11C84->slots[i].maxHeight = 29.0f; - this->state.unknown_11C84->slots[i].rotStart = 180; + this->state.currentPrimitive->slots[i].distance = 6.0f; + this->state.currentPrimitive->slots[i].riseAngle = 55; + this->state.currentPrimitive->slots[i].maxHeight = 29.0f; + this->state.currentPrimitive->slots[i].rotStart = 180; } else if (i == 2) { - this->state.unknown_11C84->slots[i].distance = 6.5f; - this->state.unknown_11C84->slots[i].riseAngle = 65; - this->state.unknown_11C84->slots[i].maxHeight = 28.0f; - this->state.unknown_11C84->slots[i].rotStart = 270; + this->state.currentPrimitive->slots[i].distance = 6.5f; + this->state.currentPrimitive->slots[i].riseAngle = 65; + this->state.currentPrimitive->slots[i].maxHeight = 28.0f; + this->state.currentPrimitive->slots[i].rotStart = 270; } else if (i == 3) { - this->state.unknown_11C84->slots[i].distance = 6.0f; - this->state.unknown_11C84->slots[i].riseAngle = 60; - this->state.unknown_11C84->slots[i].maxHeight = 27.0f; - this->state.unknown_11C84->slots[i].rotStart = 0; + this->state.currentPrimitive->slots[i].distance = 6.0f; + this->state.currentPrimitive->slots[i].riseAngle = 60; + this->state.currentPrimitive->slots[i].maxHeight = 27.0f; + this->state.currentPrimitive->slots[i].rotStart = 0; } } - this->state.unknown_11C84->slots[i].vecTNow.x = static_cast(this->state.unknown_11C84->slots[i].riseAngle); - this->state.unknown_11C84->slots[i].vecTNow.y = this->state.unknown_11C84->slots[i].maxHeight; + this->state.currentPrimitive->slots[i].vecTNow.x = static_cast(this->state.currentPrimitive->slots[i].riseAngle); + this->state.currentPrimitive->slots[i].vecTNow.y = this->state.currentPrimitive->slots[i].maxHeight; for (int j = 0; j < 21; ++j) { - this->state.unknown_11C84->slots[i].height[j] = 0.0f; - this->state.unknown_11C84->slots[i].flag1[j] = 0; + this->state.currentPrimitive->slots[i].height[j] = 0.0f; + this->state.currentPrimitive->slots[i].flag1[j] = 0; } } } @@ -17189,46 +17189,46 @@ void CRagEffect::SuperSlashFan(char count, char value) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 35, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 5; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 35, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 5; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int i = 0; i < count; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].distance = 3.5f; - this->state.unknown_11C84->slots[i].vecBPre.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[0] = 10.0f; - this->state.unknown_11C84->slots[i].height[1] = 70.0f; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecBNow.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[4] = 10.0f; - this->state.unknown_11C84->slots[i].height[5] = 130.0f; - this->state.unknown_11C84->slots[i].height[6] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecTPre.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[8] = 10.0f; - this->state.unknown_11C84->slots[i].height[9] = 190.0f; - this->state.unknown_11C84->slots[i].height[10] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecTNow.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[12] = 10.0f; - this->state.unknown_11C84->slots[i].height[13] = 250.0f; - this->state.unknown_11C84->slots[i].height[14] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[15] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].flag1[4] = value; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].distance = 3.5f; + this->state.currentPrimitive->slots[i].vecBPre.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[0] = 10.0f; + this->state.currentPrimitive->slots[i].height[1] = 70.0f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecBNow.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[4] = 10.0f; + this->state.currentPrimitive->slots[i].height[5] = 130.0f; + this->state.currentPrimitive->slots[i].height[6] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecTPre.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[8] = 10.0f; + this->state.currentPrimitive->slots[i].height[9] = 190.0f; + this->state.currentPrimitive->slots[i].height[10] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecTNow.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[12] = 10.0f; + this->state.currentPrimitive->slots[i].height[13] = 250.0f; + this->state.currentPrimitive->slots[i].height[14] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[15] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].flag1[4] = value; } } @@ -17241,47 +17241,47 @@ void CRagEffect::SuperSlashSpread(char count, char value) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 99, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 5; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); - this->state.unknown_11C84->textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - this->state.unknown_11C84->slots[0].life = 0; - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 99, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 5; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\super1.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\super2.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[2] = g_texMgr.Load("effect\\super3.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[3] = g_texMgr.Load("effect\\super4.bmp", 0, false, true, false); + this->state.currentPrimitive->textures[4] = g_texMgr.Load("effect\\super5.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + this->state.currentPrimitive->slots[0].life = 0; + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; for (int i = 0; i < count; ++i) { - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].distance = 2.0f; - this->state.unknown_11C84->slots[i].vecBPre.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[0] = 10.0f; - this->state.unknown_11C84->slots[i].height[1] = 40.0f; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecBNow.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[4] = 10.0f; - this->state.unknown_11C84->slots[i].height[5] = 80.0f; - this->state.unknown_11C84->slots[i].height[6] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecTPre.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[8] = 10.0f; - this->state.unknown_11C84->slots[i].height[9] = 120.0f; - this->state.unknown_11C84->slots[i].height[10] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].vecTNow.y = -static_cast(std::max(0, rand() % 10)); - this->state.unknown_11C84->slots[i].height[12] = 10.0f; - this->state.unknown_11C84->slots[i].height[13] = 160.0f; - this->state.unknown_11C84->slots[i].height[14] = static_cast(std::max(0, rand() % 5)); - this->state.unknown_11C84->slots[i].height[15] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[i].flag1[4] = value; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].distance = 2.0f; + this->state.currentPrimitive->slots[i].vecBPre.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[0] = 10.0f; + this->state.currentPrimitive->slots[i].height[1] = 40.0f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecBNow.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[4] = 10.0f; + this->state.currentPrimitive->slots[i].height[5] = 80.0f; + this->state.currentPrimitive->slots[i].height[6] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[7] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecTPre.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[8] = 10.0f; + this->state.currentPrimitive->slots[i].height[9] = 120.0f; + this->state.currentPrimitive->slots[i].height[10] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[11] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].vecTNow.y = -static_cast(std::max(0, rand() % 10)); + this->state.currentPrimitive->slots[i].height[12] = 10.0f; + this->state.currentPrimitive->slots[i].height[13] = 160.0f; + this->state.currentPrimitive->slots[i].height[14] = static_cast(std::max(0, rand() % 5)); + this->state.currentPrimitive->slots[i].height[15] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[i].flag1[4] = value; } } @@ -17355,7 +17355,7 @@ void CPlayer::UpdateFootprints(int kind) { // FUNCTION: fn_20334 void CPlayer::RefreshEffect164() { this->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0544 = this->LaunchEffect(164, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + this->skillEffect = this->LaunchEffect(164, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } // OFFSET: 0x00C4FAB0 @@ -17465,8 +17465,8 @@ void CRagEffect::TexturedGroundRing(const char* name, char flag, int unused1, in } CEffectPrim* particle = CreateEffectParticle(*this, this->render, 169, 0.0f, 0.0f, 0.0f, WorldObjects()); - this->state.unknown_11C84 = reinterpret_cast(particle); - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + this->state.currentPrimitive = reinterpret_cast(particle); + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; AllocateTextures(stored()->state); @@ -17555,27 +17555,27 @@ void CRagEffect::Maple() { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].maxHeight = static_cast(std::max(0, rand() % 4) + 2) * 0.03f; - this->state.unknown_11C84->size = static_cast(std::max(0, rand() % 6) + 35) / 100.0f; - this->state.unknown_11C84->slots[0].vecBPre.x = static_cast(std::max(0, rand() % 300)) + this->render.position.x - 150.0f; - this->state.unknown_11C84->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 200.0f; - this->state.unknown_11C84->slots[0].vecBPre.z = static_cast(std::max(0, rand() % 300)) + this->render.position.z - 150.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 1; - this->state.unknown_11C84->alpha = 200.0f; - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\단풍.act"); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\단풍.spr"); - Owner(this->state.unknown_11C84).SetAction(0, 36, 0); - Owner(this->state.unknown_11C84).InitSegment(); - this->state.unknown_11C84->slots[1].life = 0; - this->state.unknown_11C84->slots[2].life = 0; - this->state.unknown_11C84->slots[3].life = 0; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 40, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].maxHeight = static_cast(std::max(0, rand() % 4) + 2) * 0.03f; + this->state.currentPrimitive->size = static_cast(std::max(0, rand() % 6) + 35) / 100.0f; + this->state.currentPrimitive->slots[0].vecBPre.x = static_cast(std::max(0, rand() % 300)) + this->render.position.x - 150.0f; + this->state.currentPrimitive->slots[0].height[0] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[1] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[2] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].height[3] = static_cast(std::max(0, rand() % 360)); + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 200.0f; + this->state.currentPrimitive->slots[0].vecBPre.z = static_cast(std::max(0, rand() % 300)) + this->render.position.z - 150.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 1; + this->state.currentPrimitive->alpha = 200.0f; + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\단풍.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\단풍.spr"); + Owner(this->state.currentPrimitive).SetAction(0, 36, 0); + Owner(this->state.currentPrimitive).InitSegment(); + this->state.currentPrimitive->slots[1].life = 0; + this->state.currentPrimitive->slots[2].life = 0; + this->state.currentPrimitive->slots[3].life = 0; } // OFFSET: 0x00C526D0 @@ -17990,110 +17990,110 @@ void CRagEffect::TexturedAura(const char* name, char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 82, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 82, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; for (int index = 0; index < 4; ++index) { - this->state.unknown_11C84->slots[index].life = 0; + this->state.currentPrimitive->slots[index].life = 0; } - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; if (kind == 1) { - this->state.unknown_11C84->slots[0].distance = 8.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 0; - this->state.unknown_11C84->slots[0].height[10] = 1.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 120; + this->state.currentPrimitive->slots[0].distance = 8.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 0; + this->state.currentPrimitive->slots[0].height[10] = 1.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 120; } else if (kind == 2) { - this->state.unknown_11C84->slots[0].distance = 10.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 10.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 2; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 10.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 10.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 2; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 3) { - this->state.unknown_11C84->slots[0].distance = 8.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 3; - this->state.unknown_11C84->slots[0].height[10] = 2.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 155; + this->state.currentPrimitive->slots[0].distance = 8.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 3; + this->state.currentPrimitive->slots[0].height[10] = 2.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 155; } else if (kind == 4) { - this->state.unknown_11C84->slots[0].distance = 6.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 0; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 6.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 0; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 10 || kind == 11) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.7f : 70.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 10; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.7f : 70.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 10; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 12) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 1.2f : 120.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 12; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 1.2f : 120.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 12; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 13) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 3.0f : 300.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 12; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 3.0f : 300.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 12; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 14) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 4; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 4; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 15) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 15; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] : 30.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 15; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 16 || kind == 17) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.5f; + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.5f; if (kind == 17) { - this->state.unknown_11C84->slots[0].distance *= 0.85f; + this->state.currentPrimitive->slots[0].distance *= 0.85f; } - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 5; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 5; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 18) { - this->state.unknown_11C84->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y; - this->state.unknown_11C84->slots[0].flag1[2] = 5; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = this->state.param[0] > 0.0f ? this->state.param[0] * 0.9f : 9.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y; + this->state.currentPrimitive->slots[0].flag1[2] = 5; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 19) { - this->state.unknown_11C84->slots[0].distance = 8.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 15; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = 8.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 15; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else if (kind == 20) { - this->state.unknown_11C84->slots[0].distance = 2.4f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 27.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 0; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 2.4f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 27.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 0; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 21) { - this->state.unknown_11C84->slots[0].distance = 24.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 10.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 4; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 90; + this->state.currentPrimitive->slots[0].distance = 24.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 10.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 4; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 90; } else if (kind == 22) { - this->state.unknown_11C84->slots[0].distance = 4.0f; + this->state.currentPrimitive->slots[0].distance = 4.0f; float lift = -30.0f; if (this->state.parent != nullptr) { @@ -18106,44 +18106,44 @@ void CRagEffect::TexturedAura(const char* name, char kind) { } } - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y + lift; - this->state.unknown_11C84->slots[0].flag1[2] = 16; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y + lift; + this->state.currentPrimitive->slots[0].flag1[2] = 16; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 30) { - this->state.unknown_11C84->slots[0].distance = 24.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 19; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 24.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 19; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 31) { - this->state.unknown_11C84->slots[0].distance = 2.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 0; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 2.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 0; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } else if (kind == 32) { - this->state.unknown_11C84->slots[0].distance = 8.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 30.0f; - this->state.unknown_11C84->slots[0].flag1[2] = kind; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].distance = 8.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 30.0f; + this->state.currentPrimitive->slots[0].flag1[2] = kind; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = static_cast(std::max(rand() % 360, 0)); } else { - this->state.unknown_11C84->slots[0].distance = 5.0f; - this->state.unknown_11C84->slots[0].vecBPre.y = this->render.position.y - 10.0f; - this->state.unknown_11C84->slots[0].flag1[2] = 2; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 135; + this->state.currentPrimitive->slots[0].distance = 5.0f; + this->state.currentPrimitive->slots[0].vecBPre.y = this->render.position.y - 10.0f; + this->state.currentPrimitive->slots[0].flag1[2] = 2; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 135; } - this->state.unknown_11C84->slots[0].height[8] = 0.0f; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].vecBNow.x = this->render.position.x; - this->state.unknown_11C84->slots[0].vecBNow.z = this->render.position.z; - this->state.unknown_11C84->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[0].flag1[0] = 0; - this->state.unknown_11C84->slots[0].flag1[4] = static_cast(kind == 4 ? 1 : kind); - this->state.unknown_11C84->slots[0].height[15] = this->render.position.y - this->state.unknown_11C84->slots[0].vecBPre.y; + this->state.currentPrimitive->slots[0].height[8] = 0.0f; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].vecBNow.x = this->render.position.x; + this->state.currentPrimitive->slots[0].vecBNow.z = this->render.position.z; + this->state.currentPrimitive->slots[0].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[0].flag1[0] = 0; + this->state.currentPrimitive->slots[0].flag1[4] = static_cast(kind == 4 ? 1 : kind); + this->state.currentPrimitive->slots[0].height[15] = this->render.position.y - this->state.currentPrimitive->slots[0].vecBPre.y; } // OFFSET: 0x00C55470 @@ -18152,108 +18152,108 @@ void CRagEffect::HealRingSparkle(const char* name, char type) { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load(name, 0, false, true, false); - this->state.unknown_11C84->size = type == 2 ? 4.0f : 9.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load(name, 0, false, true, false); + this->state.currentPrimitive->size = type == 2 ? 4.0f : 9.0f; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[0].maxHeight = 60.0f; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 4.6f; - this->state.unknown_11C84->slots[0].riseAngle = 90; - this->state.unknown_11C84->slots[0].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[0].alphaT = type != 0 ? 40 : 60; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[0].maxHeight = 60.0f; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 4.6f; + this->state.currentPrimitive->slots[0].riseAngle = 90; + this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[0].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[0].height[i] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[i] = 0; + this->state.currentPrimitive->slots[0].height[i] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[i] = 0; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[1].maxHeight = 60.0f; - this->state.unknown_11C84->slots[1].rotStart = 180; - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[1].distance = 5.0f; - this->state.unknown_11C84->slots[1].riseAngle = 90; - this->state.unknown_11C84->slots[1].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[1].alphaT = type != 0 ? 40 : 60; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[1].maxHeight = 60.0f; + this->state.currentPrimitive->slots[1].rotStart = 180; + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[1].distance = 5.0f; + this->state.currentPrimitive->slots[1].riseAngle = 90; + this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[1].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[1].height[i] = 0.0f; - this->state.unknown_11C84->slots[1].flag1[i] = 0; + this->state.currentPrimitive->slots[1].height[i] = 0.0f; + this->state.currentPrimitive->slots[1].flag1[i] = 0; } - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].process = 0; - this->state.unknown_11C84->slots[2].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[2].maxHeight = type != 0 ? 18.0f : 12.0f; - this->state.unknown_11C84->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[2].alphaB = 0; - this->state.unknown_11C84->slots[2].distance = 5.0f; - this->state.unknown_11C84->slots[2].riseAngle = 50; - this->state.unknown_11C84->slots[2].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[2].alphaT = type != 0 ? 40 : 60; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].process = 0; + this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[2].maxHeight = type != 0 ? 18.0f : 12.0f; + this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[2].alphaB = 0; + this->state.currentPrimitive->slots[2].distance = 5.0f; + this->state.currentPrimitive->slots[2].riseAngle = 50; + this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[2].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[2].height[i] = 0.0f; - this->state.unknown_11C84->slots[2].flag1[i] = 0; + this->state.currentPrimitive->slots[2].height[i] = 0.0f; + this->state.currentPrimitive->slots[2].flag1[i] = 0; } - this->state.unknown_11C84->slots[3].life = 1; - this->state.unknown_11C84->slots[3].process = 0; - this->state.unknown_11C84->slots[3].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[3].maxHeight = type == 0 ? 12.0f : 18.0f; - this->state.unknown_11C84->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[3].alphaB = 0; - this->state.unknown_11C84->slots[3].distance = 5.2f; - this->state.unknown_11C84->slots[3].riseAngle = 48; - this->state.unknown_11C84->slots[3].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[3].alphaT = type != 0 ? 40 : 60; + this->state.currentPrimitive->slots[3].life = 1; + this->state.currentPrimitive->slots[3].process = 0; + this->state.currentPrimitive->slots[3].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[3].maxHeight = type == 0 ? 12.0f : 18.0f; + this->state.currentPrimitive->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[3].alphaB = 0; + this->state.currentPrimitive->slots[3].distance = 5.2f; + this->state.currentPrimitive->slots[3].riseAngle = 48; + this->state.currentPrimitive->slots[3].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[3].alphaT = type != 0 ? 40 : 60; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[3].height[i] = 0.0f; - this->state.unknown_11C84->slots[3].flag1[i] = 0; + this->state.currentPrimitive->slots[3].height[i] = 0.0f; + this->state.currentPrimitive->slots[3].flag1[i] = 0; } if (type < 2) { PlayEffectWave(*this, "_heal_effect.wav"); } } else if (this->state.stateCnt <= 50 && this->state.stateCnt % 6 == 0 && type < 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - Owner(this->state.unknown_11C84).render.position = this->render.position; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + Owner(this->state.currentPrimitive).render.position = this->render.position; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.0f; - this->state.unknown_11C84->slots[i].height[8] = 0.0f; - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].rotStart = 0; - this->state.unknown_11C84->slots[i].height[1] = 0.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.0f; + this->state.currentPrimitive->slots[i].height[8] = 0.0f; + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].rotStart = 0; + this->state.currentPrimitive->slots[i].height[1] = 0.0f; if (type == 0) { - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; } else { - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.6f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.6f; } - this->state.unknown_11C84->slots[i].fullDisplayAngle = 0; - this->state.unknown_11C84->slots[i].flag1[0] = 0; - this->state.unknown_11C84->slots[i].flag1[1] = 1; - this->state.unknown_11C84->slots[i].flag1[2] = 11; - this->state.unknown_11C84->slots[i].height[7] = 0.0f; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[i].flag1[0] = 0; + this->state.currentPrimitive->slots[i].flag1[1] = 1; + this->state.currentPrimitive->slots[i].flag1[2] = 11; + this->state.currentPrimitive->slots[i].height[7] = 0.0f; } } @@ -18262,102 +18262,102 @@ void CRagEffect::HealRingSparkle(const char* name, char type) { } if (this->state.stateCnt == 1) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); - this->state.unknown_11C84->size = 9.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 60, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_down.tga", 0, false, true, false); + this->state.currentPrimitive->size = 9.0f; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->slots[0].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[0].maxHeight = 90.0f; - this->state.unknown_11C84->slots[0].rotStart = 0; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].distance = 4.2f; - this->state.unknown_11C84->slots[0].riseAngle = 90; - this->state.unknown_11C84->slots[0].alphaT = 40; - this->state.unknown_11C84->slots[0].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->slots[0].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[0].maxHeight = 90.0f; + this->state.currentPrimitive->slots[0].rotStart = 0; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].distance = 4.2f; + this->state.currentPrimitive->slots[0].riseAngle = 90; + this->state.currentPrimitive->slots[0].alphaT = 40; + this->state.currentPrimitive->slots[0].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[0].height[i] = 0.0f; - this->state.unknown_11C84->slots[0].flag1[i] = 0; + this->state.currentPrimitive->slots[0].height[i] = 0.0f; + this->state.currentPrimitive->slots[0].flag1[i] = 0; } - this->state.unknown_11C84->slots[1].life = 1; - this->state.unknown_11C84->slots[1].process = 0; - this->state.unknown_11C84->slots[1].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[1].maxHeight = 90.0f; - this->state.unknown_11C84->slots[1].rotStart = 90; - this->state.unknown_11C84->slots[1].alphaB = 0; - this->state.unknown_11C84->slots[1].distance = 4.3f; - this->state.unknown_11C84->slots[1].riseAngle = 90; - this->state.unknown_11C84->slots[1].alphaT = 40; - this->state.unknown_11C84->slots[1].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[1].life = 1; + this->state.currentPrimitive->slots[1].process = 0; + this->state.currentPrimitive->slots[1].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[1].maxHeight = 90.0f; + this->state.currentPrimitive->slots[1].rotStart = 90; + this->state.currentPrimitive->slots[1].alphaB = 0; + this->state.currentPrimitive->slots[1].distance = 4.3f; + this->state.currentPrimitive->slots[1].riseAngle = 90; + this->state.currentPrimitive->slots[1].alphaT = 40; + this->state.currentPrimitive->slots[1].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[1].height[i] = 0.0f; - this->state.unknown_11C84->slots[1].flag1[i] = 0; + this->state.currentPrimitive->slots[1].height[i] = 0.0f; + this->state.currentPrimitive->slots[1].flag1[i] = 0; } - this->state.unknown_11C84->slots[2].life = 1; - this->state.unknown_11C84->slots[2].process = 0; - this->state.unknown_11C84->slots[2].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[2].maxHeight = 10.0f; - this->state.unknown_11C84->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[2].alphaB = 0; - this->state.unknown_11C84->slots[2].distance = 5.3f; - this->state.unknown_11C84->slots[2].riseAngle = 46; - this->state.unknown_11C84->slots[2].alphaT = 30; - this->state.unknown_11C84->slots[2].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[2].life = 1; + this->state.currentPrimitive->slots[2].process = 0; + this->state.currentPrimitive->slots[2].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[2].maxHeight = 10.0f; + this->state.currentPrimitive->slots[2].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[2].alphaB = 0; + this->state.currentPrimitive->slots[2].distance = 5.3f; + this->state.currentPrimitive->slots[2].riseAngle = 46; + this->state.currentPrimitive->slots[2].alphaT = 30; + this->state.currentPrimitive->slots[2].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[2].height[i] = 0.0f; - this->state.unknown_11C84->slots[2].flag1[i] = 0; + this->state.currentPrimitive->slots[2].height[i] = 0.0f; + this->state.currentPrimitive->slots[2].flag1[i] = 0; } - this->state.unknown_11C84->slots[3].life = 1; - this->state.unknown_11C84->slots[3].process = 0; - this->state.unknown_11C84->slots[3].fullDisplayAngle = 360; - this->state.unknown_11C84->slots[3].maxHeight = 10.0f; - this->state.unknown_11C84->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[3].alphaB = 0; - this->state.unknown_11C84->slots[3].distance = 5.4f; - this->state.unknown_11C84->slots[3].riseAngle = 44; - this->state.unknown_11C84->slots[3].alphaT = 30; - this->state.unknown_11C84->slots[3].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[3].life = 1; + this->state.currentPrimitive->slots[3].process = 0; + this->state.currentPrimitive->slots[3].fullDisplayAngle = 360; + this->state.currentPrimitive->slots[3].maxHeight = 10.0f; + this->state.currentPrimitive->slots[3].rotStart = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[3].alphaB = 0; + this->state.currentPrimitive->slots[3].distance = 5.4f; + this->state.currentPrimitive->slots[3].riseAngle = 44; + this->state.currentPrimitive->slots[3].alphaT = 30; + this->state.currentPrimitive->slots[3].vecBNow.y = 0.0f; for (int i = 0; i < 21; ++i) { - this->state.unknown_11C84->slots[3].height[i] = 0.0f; - this->state.unknown_11C84->slots[3].flag1[i] = 0; + this->state.currentPrimitive->slots[3].height[i] = 0.0f; + this->state.currentPrimitive->slots[3].flag1[i] = 0; } } if (this->state.stateCnt <= 50 && this->state.stateCnt % 9 == 2) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->totalTexture = 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); - this->state.unknown_11C84->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; - Owner(this->state.unknown_11C84).render.position = this->render.position; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 59, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->totalTexture = 2; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\pok1.tga", 0, false, true, false); + this->state.currentPrimitive->textures[1] = g_texMgr.Load("effect\\pok3.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; + Owner(this->state.currentPrimitive).render.position = this->render.position; for (int i = 0; i < 4; ++i) { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].process = 0; - this->state.unknown_11C84->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.4f; - this->state.unknown_11C84->slots[i].height[8] = 0.0f; - this->state.unknown_11C84->slots[i].alphaB = 0; - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; - this->state.unknown_11C84->slots[i].vecBNow.y = this->render.position.y; - this->state.unknown_11C84->slots[i].rotStart = 0; - this->state.unknown_11C84->slots[i].height[1] = 0.0f; - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; - this->state.unknown_11C84->slots[i].fullDisplayAngle = 0; - this->state.unknown_11C84->slots[i].flag1[0] = 0; - this->state.unknown_11C84->slots[i].flag1[1] = 1; - this->state.unknown_11C84->slots[i].flag1[2] = 11; - this->state.unknown_11C84->slots[i].height[7] = 0.0f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].process = 0; + this->state.currentPrimitive->slots[i].distance = static_cast(std::max(rand() % 10, 0)) * 0.1f + 2.4f; + this->state.currentPrimitive->slots[i].height[8] = 0.0f; + this->state.currentPrimitive->slots[i].alphaB = 0; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 13, 0)) + this->render.position.x - 6.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 13, 0)) + this->render.position.z - 6.0f; + this->state.currentPrimitive->slots[i].vecBNow.y = this->render.position.y; + this->state.currentPrimitive->slots[i].rotStart = 0; + this->state.currentPrimitive->slots[i].height[1] = 0.0f; + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 40, 0)) * 0.01f + 0.4f; + this->state.currentPrimitive->slots[i].fullDisplayAngle = 0; + this->state.currentPrimitive->slots[i].flag1[0] = 0; + this->state.currentPrimitive->slots[i].flag1[1] = 1; + this->state.currentPrimitive->slots[i].flag1[2] = 11; + this->state.currentPrimitive->slots[i].height[7] = 0.0f; } } } @@ -18523,167 +18523,167 @@ void CRagEffect::FreezingCircle(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 29, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 0; - this->state.unknown_11C84->renderFlag |= 1; - this->state.unknown_11C84->renderFlag |= 5; - this->state.unknown_11C84->duration = this->state.duration; - AllocateTextures(*this->state.unknown_11C84); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 29, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 0; + this->state.currentPrimitive->renderFlag |= 1; + this->state.currentPrimitive->renderFlag |= 5; + this->state.currentPrimitive->duration = this->state.duration; + AllocateTextures(*this->state.currentPrimitive); if (kind == 3) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ghost.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ghost.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; } else if (kind < 1) { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\freezing_circle.bmp", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\freezing_circle.bmp", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; } else { - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\whitelight.tga", 0, false, true, false); - this->state.unknown_11C84->size = 0.0f; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\whitelight.tga", 0, false, true, false); + this->state.currentPrimitive->size = 0.0f; if (kind == 2) { - this->state.unknown_11C84->size = 7.0f; + this->state.currentPrimitive->size = 7.0f; } } for (int i = 0; i < 4; ++i) { if (kind == 3) { if (i < 1) { - this->state.unknown_11C84->slots[i].life = 1; + this->state.currentPrimitive->slots[i].life = 1; } else { - this->state.unknown_11C84->slots[i].life = 0; + this->state.currentPrimitive->slots[i].life = 0; } - this->state.unknown_11C84->slots[i].maxHeight = 0.15f; - this->state.unknown_11C84->slots[i].distance = 3.2f; - this->state.unknown_11C84->slots[i].maxHeight = 0.6f; - this->state.unknown_11C84->slots[i].vecBPre.x = static_cast(std::max(rand() % 15, 0) - 8); - this->state.unknown_11C84->slots[i].vecBPre.z = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].maxHeight = 0.15f; + this->state.currentPrimitive->slots[i].distance = 3.2f; + this->state.currentPrimitive->slots[i].maxHeight = 0.6f; + this->state.currentPrimitive->slots[i].vecBPre.x = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecBPre.z = static_cast(std::max(rand() % 15, 0) - 8); } else if (kind == 7 || kind == 8) { if (i < 2) { - this->state.unknown_11C84->slots[i].life = 1; + this->state.currentPrimitive->slots[i].life = 1; } else { - this->state.unknown_11C84->slots[i].life = 0; + this->state.currentPrimitive->slots[i].life = 0; } - this->state.unknown_11C84->slots[i].maxHeight = 0.15f; + this->state.currentPrimitive->slots[i].maxHeight = 0.15f; if (kind == 7) { - this->state.unknown_11C84->slots[i].distance = 0.8f; + this->state.currentPrimitive->slots[i].distance = 0.8f; } else { - this->state.unknown_11C84->slots[i].distance = 2.4f; + this->state.currentPrimitive->slots[i].distance = 2.4f; } - this->state.unknown_11C84->slots[i].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].life = 1; - this->state.unknown_11C84->slots[i].maxHeight = 0.15f; + this->state.currentPrimitive->slots[i].life = 1; + this->state.currentPrimitive->slots[i].maxHeight = 0.15f; if (kind == 6) { - this->state.unknown_11C84->slots[i].distance = 2.4f; - this->state.unknown_11C84->slots[i].vecBPre.x = static_cast(std::max(rand() % 35, 0) - 17); - this->state.unknown_11C84->slots[i].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[i].distance = 2.4f; + this->state.currentPrimitive->slots[i].vecBPre.x = static_cast(std::max(rand() % 35, 0) - 17); + this->state.currentPrimitive->slots[i].vecBPre.z = 0.0f; } else if (kind == 1 || kind == 4 || kind == 5 || kind >= 8) { - this->state.unknown_11C84->slots[i].distance = 2.4f; - this->state.unknown_11C84->slots[i].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[i].distance = 2.4f; + this->state.currentPrimitive->slots[i].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].distance = 0.8f; - this->state.unknown_11C84->slots[i].vecBPre.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBPre.z = 0.0f; + this->state.currentPrimitive->slots[i].distance = 0.8f; + this->state.currentPrimitive->slots[i].vecBPre.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.z = 0.0f; } } - this->state.unknown_11C84->slots[i].vecBPre.y = static_cast(std::max(rand() % 100, 0)); - this->state.unknown_11C84->slots[i].height[0] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[1] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[2] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[3] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].vecBPre.y = static_cast(std::max(rand() % 100, 0)); + this->state.currentPrimitive->slots[i].height[0] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[1] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[2] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[3] = static_cast(std::max(rand() % 360, 0)); if (kind == 3) { - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 15, 0) - 8); - this->state.unknown_11C84->slots[i].vecBNow.z = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecBNow.z = static_cast(std::max(rand() % 15, 0) - 8); } else if (kind == 6) { - this->state.unknown_11C84->slots[i].vecBNow.x = static_cast(std::max(rand() % 35, 0) - 17); - this->state.unknown_11C84->slots[i].vecBNow.z = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = static_cast(std::max(rand() % 35, 0) - 17); + this->state.currentPrimitive->slots[i].vecBNow.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].vecBNow.x = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.z = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.x = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.z = 0.0f; } - this->state.unknown_11C84->slots[i].vecBNow.y = static_cast(std::max(rand() % 100, 0)); - this->state.unknown_11C84->slots[i].height[4] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[5] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[6] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[7] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].vecBNow.y = static_cast(std::max(rand() % 100, 0)); + this->state.currentPrimitive->slots[i].height[4] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[5] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[6] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[7] = static_cast(std::max(rand() % 360, 0)); if (kind == 3) { - this->state.unknown_11C84->slots[i].vecTPre.x = static_cast(std::max(rand() % 15, 0) - 8); - this->state.unknown_11C84->slots[i].vecTPre.z = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecTPre.x = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecTPre.z = static_cast(std::max(rand() % 15, 0) - 8); } else if (kind == 6) { - this->state.unknown_11C84->slots[i].vecTPre.x = static_cast(std::max(rand() % 35, 0) - 17); - this->state.unknown_11C84->slots[i].vecTPre.z = 0.0f; + this->state.currentPrimitive->slots[i].vecTPre.x = static_cast(std::max(rand() % 35, 0) - 17); + this->state.currentPrimitive->slots[i].vecTPre.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].vecTPre.x = 0.0f; - this->state.unknown_11C84->slots[i].vecTPre.z = 0.0f; + this->state.currentPrimitive->slots[i].vecTPre.x = 0.0f; + this->state.currentPrimitive->slots[i].vecTPre.z = 0.0f; } - this->state.unknown_11C84->slots[i].vecTPre.y = static_cast(std::max(rand() % 100, 0)); - this->state.unknown_11C84->slots[i].height[8] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[9] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[10] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[11] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].vecTPre.y = static_cast(std::max(rand() % 100, 0)); + this->state.currentPrimitive->slots[i].height[8] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[9] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[10] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[11] = static_cast(std::max(rand() % 360, 0)); if (kind == 3) { - this->state.unknown_11C84->slots[i].vecTNow.x = static_cast(std::max(rand() % 15, 0) - 8); - this->state.unknown_11C84->slots[i].vecTNow.z = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecTNow.x = static_cast(std::max(rand() % 15, 0) - 8); + this->state.currentPrimitive->slots[i].vecTNow.z = static_cast(std::max(rand() % 15, 0) - 8); } else if (kind == 6) { - this->state.unknown_11C84->slots[i].vecTNow.x = static_cast(std::max(rand() % 35, 0) - 17); - this->state.unknown_11C84->slots[i].vecTNow.z = 0.0f; + this->state.currentPrimitive->slots[i].vecTNow.x = static_cast(std::max(rand() % 35, 0) - 17); + this->state.currentPrimitive->slots[i].vecTNow.z = 0.0f; } else { - this->state.unknown_11C84->slots[i].vecTNow.x = 0.0f; - this->state.unknown_11C84->slots[i].vecTNow.z = 0.0f; + this->state.currentPrimitive->slots[i].vecTNow.x = 0.0f; + this->state.currentPrimitive->slots[i].vecTNow.z = 0.0f; } - this->state.unknown_11C84->slots[i].vecTNow.y = static_cast(std::max(rand() % 100, 0)); - this->state.unknown_11C84->slots[i].height[12] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[13] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[14] = static_cast(std::max(rand() % 360, 0)); - this->state.unknown_11C84->slots[i].height[15] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].vecTNow.y = static_cast(std::max(rand() % 100, 0)); + this->state.currentPrimitive->slots[i].height[12] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[13] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[14] = static_cast(std::max(rand() % 360, 0)); + this->state.currentPrimitive->slots[i].height[15] = static_cast(std::max(rand() % 360, 0)); if (kind == 4) { - this->state.unknown_11C84->slots[i].vecBPre.y = -40.0f; - this->state.unknown_11C84->slots[i].vecBNow.y = -50.0f; - this->state.unknown_11C84->slots[i].vecTPre.y = -60.0f; - this->state.unknown_11C84->slots[i].vecTNow.y = -70.0f; - this->state.unknown_11C84->slots[i].flag1[0] = 14; + this->state.currentPrimitive->slots[i].vecBPre.y = -40.0f; + this->state.currentPrimitive->slots[i].vecBNow.y = -50.0f; + this->state.currentPrimitive->slots[i].vecTPre.y = -60.0f; + this->state.currentPrimitive->slots[i].vecTNow.y = -70.0f; + this->state.currentPrimitive->slots[i].flag1[0] = 14; } else if (kind == 6) { - this->state.unknown_11C84->slots[i].vecBPre.y = static_cast(-40 - std::max(rand() % 40, 0)); - this->state.unknown_11C84->slots[i].vecBNow.y = static_cast(-40 - std::max(rand() % 40, 0)); - this->state.unknown_11C84->slots[i].vecTPre.y = static_cast(-40 - std::max(rand() % 40, 0)); - this->state.unknown_11C84->slots[i].vecTNow.y = static_cast(-40 - std::max(rand() % 40, 0)); - this->state.unknown_11C84->slots[i].flag1[0] = 16; + this->state.currentPrimitive->slots[i].vecBPre.y = static_cast(-40 - std::max(rand() % 40, 0)); + this->state.currentPrimitive->slots[i].vecBNow.y = static_cast(-40 - std::max(rand() % 40, 0)); + this->state.currentPrimitive->slots[i].vecTPre.y = static_cast(-40 - std::max(rand() % 40, 0)); + this->state.currentPrimitive->slots[i].vecTNow.y = static_cast(-40 - std::max(rand() % 40, 0)); + this->state.currentPrimitive->slots[i].flag1[0] = 16; } else { if (kind == 5 || kind == 7) { - this->state.unknown_11C84->slots[i].vecBPre.y = 0.0f; - this->state.unknown_11C84->slots[i].vecBNow.y = 0.0f; - this->state.unknown_11C84->slots[i].vecTPre.y = 0.0f; - this->state.unknown_11C84->slots[i].vecTNow.y = 0.0f; + this->state.currentPrimitive->slots[i].vecBPre.y = 0.0f; + this->state.currentPrimitive->slots[i].vecBNow.y = 0.0f; + this->state.currentPrimitive->slots[i].vecTPre.y = 0.0f; + this->state.currentPrimitive->slots[i].vecTNow.y = 0.0f; } if (kind == 1) { - this->state.unknown_11C84->slots[i].flag1[0] = kind; + this->state.currentPrimitive->slots[i].flag1[0] = kind; } else if (kind == 3) { - this->state.unknown_11C84->slots[i].flag1[0] = 11; + this->state.currentPrimitive->slots[i].flag1[0] = 11; } else if (kind == 5 || kind == 7 || kind == 8) { - this->state.unknown_11C84->slots[i].flag1[0] = 15; - this->state.unknown_11C84->slots[i].flag1[1] = 0; - this->state.unknown_11C84->slots[i].flag1[2] = 0; - this->state.unknown_11C84->slots[i].flag1[3] = 0; - this->state.unknown_11C84->slots[i].flag1[4] = 0; - this->state.unknown_11C84->slots[i].flag1[5] = kind; + this->state.currentPrimitive->slots[i].flag1[0] = 15; + this->state.currentPrimitive->slots[i].flag1[1] = 0; + this->state.currentPrimitive->slots[i].flag1[2] = 0; + this->state.currentPrimitive->slots[i].flag1[3] = 0; + this->state.currentPrimitive->slots[i].flag1[4] = 0; + this->state.currentPrimitive->slots[i].flag1[5] = kind; } else { - this->state.unknown_11C84->slots[i].flag1[0] = 0; + this->state.currentPrimitive->slots[i].flag1[0] = 0; } } } @@ -18692,7 +18692,7 @@ void CRagEffect::FreezingCircle(char kind) { // OFFSET: 0x00C4BB00 // FUNCTION: fn_20175 void CRagEffect::TorchDust(char kind) { - auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.unknown_11C84); }; + auto stored = [&]() -> CEffectPrim* { return reinterpret_cast(this->state.currentPrimitive); }; this->render.position = this->state.parent->render.position; if (this->state.stateCnt != 0) { @@ -18700,7 +18700,7 @@ void CRagEffect::TorchDust(char kind) { } this->render.position = this->state.parent->render.position; - this->state.unknown_11C84 = reinterpret_cast(CreateEffectParticle(*this, this->render, 128, 0.0f, 0.0f, 0.0f, WorldObjects())); + this->state.currentPrimitive = reinterpret_cast(CreateEffectParticle(*this, this->render, 128, 0.0f, 0.0f, 0.0f, WorldObjects())); stored()->state.renderFlag = 5; stored()->state.duration = this->state.duration; @@ -18913,57 +18913,57 @@ void CRagEffect::TexturedClassChange(char kind) { return; } - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->deltaPos2.y = 0.0f; - this->state.unknown_11C84->renderFlag |= 0x200u; - this->state.unknown_11C84->pattern |= 0x200u; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->repeatAnim = 0; - this->state.unknown_11C84->alphaSpeed = 0.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->deltaPos2.y = 0.0f; + this->state.currentPrimitive->renderFlag |= 0x200u; + this->state.currentPrimitive->pattern |= 0x200u; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->repeatAnim = 0; + this->state.currentPrimitive->alphaSpeed = 0.0f; switch (kind) { case 0: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\캐슬링.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\캐슬링.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\캐슬링.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\캐슬링.act"); break; case 1: PlayEffectWave(*this, "effect\\h_blood_lust.wav"); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블러드러스트.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\블러드러스트.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블러드러스트.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블러드러스트.act"); break; case 2: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_thunder.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\item_thunder.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_thunder.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_thunder.act"); break; case 3: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_cloud.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\item_cloud.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_cloud.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_cloud.act"); break; case 4: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_curse.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\item_curse.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_curse.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_curse.act"); break; case 5: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_zzz.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\item_zzz.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_zzz.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_zzz.act"); break; case 6: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_rain.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\item_rain.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\item_rain.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\item_rain.act"); break; case 7: PlayEffectWave(*this, "effect\\ef_firehit.wav"); - this->state.unknown_11C84->animSpeed = 3; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = 220.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef01.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef01.act"); + this->state.currentPrimitive->animSpeed = 3; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = 220.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef01.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef01.act"); break; case 8: { - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef02.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef02.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef02.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef02.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; @@ -18973,152 +18973,152 @@ void CRagEffect::TexturedClassChange(char kind) { } if (direction >= 180 && direction < 270) { - Owner(this->state.unknown_11C84).SetAction(2, 16, 1); + Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } else if (direction >= 90 && direction < 180) { - Owner(this->state.unknown_11C84).SetAction(3, 16, 1); + Owner(this->state.currentPrimitive).SetAction(3, 16, 1); } else if (direction >= 0 && direction < 90) { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(1, 16, 1); + Owner(this->state.currentPrimitive).SetAction(1, 16, 1); } break; } case 9: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef03.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef03.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef03.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef03.act"); break; case 10: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef04.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef04.act"); - this->state.unknown_11C84->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef04.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef04.act"); + this->state.currentPrimitive->repeatAnim = 1; break; case 11: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef05.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef05.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef05.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef05.act"); break; case 12: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef06.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef06.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef06.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef06.act"); break; case 13: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef07.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef07.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\m_ef07.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\m_ef07.act"); break; case 14: - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\합격_.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\합격_.act"); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\합격_.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\합격_.act"); break; case 15: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그림자베기.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\그림자베기.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그림자베기.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\그림자베기.act"); if (std::max(rand() % 2, 0) == 0) { - Owner(this->state.unknown_11C84).SetAction(4, 16, 1); + Owner(this->state.currentPrimitive).SetAction(4, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } break; case 16: - this->state.unknown_11C84->deltaPos2.y = -6.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->animSpeed = 6; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\다다미.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\다다미.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -6.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->animSpeed = 6; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\다다미.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\다다미.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 17: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\안개베기.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\안개베기.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\안개베기.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\안개베기.act"); if (std::max(rand() % 2, 0) == 0) { - Owner(this->state.unknown_11C84).SetAction(2, 16, 1); + Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } break; case 18: - this->state.unknown_11C84->deltaPos2.y = -6.0f; - this->state.unknown_11C84->animSpeed = 2; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\일섬.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\일섬.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -6.0f; + this->state.currentPrimitive->animSpeed = 2; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\일섬.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\일섬.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 19: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->animSpeed = std::max(rand() % 5, 0) + 3; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\화염진.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\화염진.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->animSpeed = std::max(rand() % 5, 0) + 3; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\화염진.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\화염진.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 20: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\데스페라도.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\데스페라도.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\데스페라도.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\데스페라도.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 21: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\라이트닝스피어.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 22: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블라인드스피어.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 23: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\포이즌스피어.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 24: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\프리징스피어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\프리징스피어.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\프리징스피어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\프리징스피어.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 25: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\플레어스피어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\플레어스피어.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\플레어스피어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\플레어스피어.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 26: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\래피드샤워.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\래피드샤워.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\래피드샤워.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\래피드샤워.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 27: - this->state.unknown_11C84->animSpeed = 2; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 2; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\매지컬불릿.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 28: { - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\스프레드.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\스프레드.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\스프레드.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\스프레드.act"); std::int16_t angle; Get_Angle(this->render.position.x - this->state.deltaPos[0], this->render.position.z - this->state.deltaPos[2], &angle); const CView* camera = static_cast(g_modeMgr.GetGameMode())->camera; @@ -19128,422 +19128,422 @@ void CRagEffect::TexturedClassChange(char kind) { } if (direction >= 180 && direction < 270) { - Owner(this->state.unknown_11C84).SetAction(4, 16, 1); + Owner(this->state.currentPrimitive).SetAction(4, 16, 1); } else if (direction >= 90 && direction < 180) { - Owner(this->state.unknown_11C84).SetAction(6, 16, 1); + Owner(this->state.currentPrimitive).SetAction(6, 16, 1); } else if (direction >= 0 && direction < 90) { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(2, 16, 1); + Owner(this->state.currentPrimitive).SetAction(2, 16, 1); } break; } case 29: - this->state.unknown_11C84->animSpeed = 2; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트래킹.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\트래킹.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 2; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트래킹.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트래킹.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 30: - this->state.unknown_11C84->animSpeed = 2; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트리플액션.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\트리플액션.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 2; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트리플액션.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트리플액션.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 31: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\어스퀘이크.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 32: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_러브.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 33: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_화이트데이.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 34: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_발렌타인.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 35: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_생일.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 36: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\폭죽_크리스마스.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\itempokjuk.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 37: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\mobile_ef04.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 38: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mashofa.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\mashofa.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\mashofa.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\mashofa.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\t_에너지방출.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 39: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\soule.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\soule.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\soule.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\soule.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); g_soundMgr->PlayWave("effect\\매직 크래쉬.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); break; case 50: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\기본트랩.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\기본트랩.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\기본트랩.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\기본트랩.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 51: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\담황색트랩.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\담황색트랩.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\담황색트랩.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\담황색트랩.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 52: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\암청색트랩.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\암청색트랩.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\암청색트랩.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\암청색트랩.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 53: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\자홍색트랩.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 54: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\청록색트랩.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\청록색트랩.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\청록색트랩.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\청록색트랩.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 60: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\stapo.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\stapo.act"); - this->state.unknown_11C84->deltaPos2.y = -8.0f; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\stapo.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\stapo.act"); + this->state.currentPrimitive->deltaPos2.y = -8.0f; if (rand() % 2 == 0) { - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); } else { - Owner(this->state.unknown_11C84).SetAction(7, 16, 1); + Owner(this->state.currentPrimitive).SetAction(7, 16, 1); } break; case 61: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = std::max(rand() % 3, 0) + 8; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = static_cast(rand() % 71 + 70); - this->state.unknown_11C84->size = static_cast(rand() % 11) * 0.04f + 0.4f; - this->state.unknown_11C84->red = 85; - this->state.unknown_11C84->green = 255; - this->state.unknown_11C84->blue = 85; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.act"); - Owner(this->state.unknown_11C84).SetAction(rand() % 8, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = std::max(rand() % 3, 0) + 8; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = static_cast(rand() % 71 + 70); + this->state.currentPrimitive->size = static_cast(rand() % 11) * 0.04f + 0.4f; + this->state.currentPrimitive->red = 85; + this->state.currentPrimitive->green = 255; + this->state.currentPrimitive->blue = 85; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\Ancient_tree.act"); + Owner(this->state.currentPrimitive).SetAction(rand() % 8, 16, 1); break; case 62: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = std::max(rand() % 3, 0) + 8; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = static_cast(rand() % 71 + 70); - this->state.unknown_11C84->size = static_cast(rand() % 11) * 0.04f + 0.4f; - this->state.unknown_11C84->red = 85; - this->state.unknown_11C84->green = 255; - this->state.unknown_11C84->blue = 85; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ifrit.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\ifrit.act"); - Owner(this->state.unknown_11C84).SetAction(rand() % 8 + 0x20, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = std::max(rand() % 3, 0) + 8; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = static_cast(rand() % 71 + 70); + this->state.currentPrimitive->size = static_cast(rand() % 11) * 0.04f + 0.4f; + this->state.currentPrimitive->red = 85; + this->state.currentPrimitive->green = 255; + this->state.currentPrimitive->blue = 85; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\ifrit.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\ifrit.act"); + Owner(this->state.currentPrimitive).SetAction(rand() % 8 + 0x20, 16, 1); break; case 63: - this->state.unknown_11C84->deltaPos2.y = -12.0f; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 6; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = 255.0f; - this->state.unknown_11C84->size = 0.7f; - this->state.unknown_11C84->red = 155; - this->state.unknown_11C84->green = 255; - this->state.unknown_11C84->blue = 155; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.act"); - Owner(this->state.unknown_11C84).SetAction(rand() % 8, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -12.0f; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 6; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = 255.0f; + this->state.currentPrimitive->size = 0.7f; + this->state.currentPrimitive->red = 155; + this->state.currentPrimitive->green = 255; + this->state.currentPrimitive->blue = 155; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\mavka_bullet.act"); + Owner(this->state.currentPrimitive).SetAction(rand() % 8, 16, 1); break; case 64: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 3; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = 205.0f; - this->state.unknown_11C84->size = 2.5f; - this->state.unknown_11C84->red = 155; - this->state.unknown_11C84->green = 155; - this->state.unknown_11C84->blue = 155; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 3; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = 205.0f; + this->state.currentPrimitive->size = 2.5f; + this->state.currentPrimitive->red = 155; + this->state.currentPrimitive->green = 155; + this->state.currentPrimitive->blue = 155; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 65: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->pattern = 0; - this->state.unknown_11C84->alpha = 205.0f; - this->state.unknown_11C84->size = 2.5f; - this->state.unknown_11C84->red = 155; - this->state.unknown_11C84->green = 155; - this->state.unknown_11C84->blue = 155; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); - Owner(this->state.unknown_11C84).SetAction(4, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->pattern = 0; + this->state.currentPrimitive->alpha = 205.0f; + this->state.currentPrimitive->size = 2.5f; + this->state.currentPrimitive->red = 155; + this->state.currentPrimitive->green = 155; + this->state.currentPrimitive->blue = 155; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "몬스터\\breeze.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "몬스터\\breeze.act"); + Owner(this->state.currentPrimitive).SetAction(4, 16, 1); break; case 70: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\거스트.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\거스트.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\거스트.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\거스트.act"); break; case 71: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블래스트.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\블래스트.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\블래스트.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\블래스트.act"); break; case 72: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\아쿠아플레이.act"); break; case 73: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\업히벌.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\업히벌.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\업히벌.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\업히벌.act"); break; case 74: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\와일드스톰.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\와일드스톰.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\와일드스톰.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\와일드스톰.act"); break; case 75: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\칠리에어.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\칠리에어.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\칠리에어.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\칠리에어.act"); break; case 76: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\커즈드소일.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\커즈드소일.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\커즈드소일.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\커즈드소일.act"); break; case 77: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\쿨러.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\쿨러.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\쿨러.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\쿨러.act"); break; case 78: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트로픽.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\트로픽.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\트로픽.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\트로픽.act"); break; case 79: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\파이로테크닉.act"); break; case 80: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\페트롤로지.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\페트롤로지.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\페트롤로지.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\페트롤로지.act"); break; case 81: - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\히터.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\히터.act"); + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\히터.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\히터.act"); break; case 82: - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\silent_brz.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\silent_brz.act"); + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\silent_brz.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\silent_brz.act"); break; case 83: - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->repeatAnim = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\magma_flow.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\magma_flow.act"); + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->repeatAnim = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\magma_flow.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\magma_flow.act"); break; case 84: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->animSpeed = 10; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine.act"); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->animSpeed = 10; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine.act"); break; case 85: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->animSpeed = 10; - this->state.unknown_11C84->repeatAnim = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine_.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine_.act"); - Owner(this->state.unknown_11C84).SetAction(0, 10, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->animSpeed = 10; + this->state.currentPrimitive->repeatAnim = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\icemine_.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\icemine_.act"); + Owner(this->state.currentPrimitive).SetAction(0, 10, 1); break; case 86: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\RK_DRAGONBREATH_WATER.act"); break; case 87: - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\wideweb.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\wideweb.act"); + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\wideweb.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\wideweb.act"); break; case 88: - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\burnt.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\burnt.act"); + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\burnt.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\burnt.act"); break; case 90: - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->renderFlag = 1; - this->state.unknown_11C84->repeatAnim = 1; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.act"); - Owner(this->state.unknown_11C84).SetAction(0, 16, 1); + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->renderFlag = 1; + this->state.currentPrimitive->repeatAnim = 1; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\그라운드드리프트.act"); + Owner(this->state.currentPrimitive).SetAction(0, 16, 1); break; case 91: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->deltaPos2.y = -4.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->deltaPos2.y = -4.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\나뭇잎_완성.act"); break; case 94: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->deltaPos2.y = -4.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->deltaPos2.y = -4.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder.act"); break; case 95: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->animSpeed = 4; - this->state.unknown_11C84->deltaPos2.y = -4.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->animSpeed = 4; + this->state.currentPrimitive->deltaPos2.y = -4.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Black_Thunder\\Black_Thunder_Dark.act"); break; case 96: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Angel_Magic_Circle.act"); break; case 97: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Animal_Magic_Circle.act"); break; case 98: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Devil_Magic_Circle.act"); break; case 99: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Dragon_Magic_Circle.act"); break; case 100: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Fish_Magic_Circle.act"); break; case 101: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Human_Magic_Circle.act"); break; case 102: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Insect_Magic_Circle.act"); break; case 103: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Nothing_Magic_Circle.act"); break; case 104: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Plant_Magic_Circle.act"); break; case 105: - this->state.unknown_11C84->repeatAnim = 1; - this->state.unknown_11C84->renderFlag = 0xd; - this->state.unknown_11C84->animSpeed = 4; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.act"); + this->state.currentPrimitive->repeatAnim = 1; + this->state.currentPrimitive->renderFlag = 0xd; + this->state.currentPrimitive->animSpeed = 4; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Barmund_Magic_Circle\\Undead_Magic_Circle.act"); break; } - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).InitSegment(); } // OFFSET: 0x00C213C0 @@ -19553,7 +19553,7 @@ bool CRagEffect::OnProcess3() { case EF_BLUELIGHTBODY: if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; - this->state.parent->render.unknown_00F6 = 20; + this->state.parent->render.tintPhase = 20; } break; case EF_EL_GUST: @@ -19765,7 +19765,7 @@ bool CRagEffect::OnProcess3() { case EF_GUMGANG5: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_blue.tga", 3); if (this->state.stateCnt <= 30) { @@ -19781,7 +19781,7 @@ bool CRagEffect::OnProcess3() { case EF_GUMGANG9: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_brown.tga", 4); if (this->state.stateCnt <= 30) { @@ -19797,7 +19797,7 @@ bool CRagEffect::OnProcess3() { case EF_GUMGANG8: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_yellow.tga", 4); if (this->state.stateCnt <= 30) { @@ -19813,7 +19813,7 @@ bool CRagEffect::OnProcess3() { case EF_GUMGANG7: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_red.tga", 4); if (this->state.stateCnt <= 30) { @@ -20299,8 +20299,8 @@ bool CRagEffect::OnProcess3() { this->state.parent->SetColor(-1, value, value, value); } else if (this->state.stateCnt >= 61) { CGameActor* actor = reinterpret_cast(this->state.parent); - if (actor->render.unknown_00A8 != 0 && (actor->unknown_02C4 & 1) != 0) { - actor->render.unknown_00A3 = 1; + if (actor->render.isCharacter != 0 && (actor->effectState & 1) != 0) { + actor->render.colorLocked = 1; this->state.parent->SetColor(-1, 255, 128, 255); } } @@ -20603,7 +20603,7 @@ bool CRagEffect::OnProcess3() { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } - if (this->state.parent->render.unknown_0070 == 0 || this->state.parent->render.unknown_0070 == 2) { + if (this->state.parent->render.state == 0 || this->state.parent->render.state == 2) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { @@ -21096,9 +21096,9 @@ bool CRagEffect::OnProcess3() { if ((this->state.parent->render.flags & 2) == 0) { this->state.parent->render.flags += 2; if (this->state.stateCnt < 25) { - this->state.parent->render.unknown_00F2 = static_cast(this->state.stateCnt * 8); + this->state.parent->render.outlineAlpha = static_cast(this->state.stateCnt * 8); } else { - this->state.parent->render.unknown_00F2 = 200; + this->state.parent->render.outlineAlpha = 200; } } break; @@ -21126,14 +21126,14 @@ bool CRagEffect::OnProcess3() { case EF_UNDEADBODY: if ((this->state.parent->render.flags & 0x80000) == 0) { this->state.parent->render.flags += 0x80000; - this->state.parent->render.unknown_00F2 = static_cast(std::min(this->state.stateCnt, 200)); + this->state.parent->render.outlineAlpha = static_cast(std::min(this->state.stateCnt, 200)); } break; case EF_UNDEADBODY_DEL: if (this->state.stateCnt < 40) { if ((this->state.parent->render.flags & 0x80000) == 0) { this->state.parent->render.flags += 0x80000; - this->state.parent->render.unknown_00F2 = static_cast(200 - this->state.stateCnt * 5); + this->state.parent->render.outlineAlpha = static_cast(200 - this->state.stateCnt * 5); } } break; @@ -21310,16 +21310,16 @@ bool CRagEffect::OnProcess3() { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_ThunderStorm.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->renderFlag |= 0x200; - this->state.unknown_11C84->pattern |= 0x200; - this->state.unknown_11C84->deltaPos2.y = -4.5f; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->size = 2.5f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\썬더스톰.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\썬더스톰.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->renderFlag |= 0x200; + this->state.currentPrimitive->pattern |= 0x200; + this->state.currentPrimitive->deltaPos2.y = -4.5f; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->size = 2.5f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\썬더스톰.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\썬더스톰.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_STIN4: @@ -21442,20 +21442,20 @@ bool CRagEffect::OnProcess3() { const float sine = ClientSine(angle); const float cosine = ClientCosine(angle); GetRadian(angle); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 20; - this->state.unknown_11C84->deltaPos2.x = sine * 15.0f; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->deltaPos2.z = cosine * -15.0f; - this->state.unknown_11C84->deltaPosAccel.y = 0.1f; - this->state.unknown_11C84->animSpeed = 3; - this->state.unknown_11C84->size = 2.5f; - this->state.unknown_11C84->sizeSpeed = -0.1f; - this->state.unknown_11C84->alpha = 50.0f; - this->state.unknown_11C84->alphaSpeed = -3.0f; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 20; + this->state.currentPrimitive->deltaPos2.x = sine * 15.0f; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->deltaPos2.z = cosine * -15.0f; + this->state.currentPrimitive->deltaPosAccel.y = 0.1f; + this->state.currentPrimitive->animSpeed = 3; + this->state.currentPrimitive->size = 2.5f; + this->state.currentPrimitive->sizeSpeed = -0.1f; + this->state.currentPrimitive->alpha = 50.0f; + this->state.currentPrimitive->alphaSpeed = -3.0f; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\Sight.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\Sight.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } break; @@ -21487,14 +21487,14 @@ bool CRagEffect::OnProcess3() { case EF_BLUEBODY: if ((this->state.parent->render.flags & 0x4000) == 0 && this->state.stateCnt <= 150) { this->state.parent->render.flags += 0x4000; - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt / 3); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt / 3); } break; case EF_MADNESS_BLUE: if (this->state.stateCnt % 4 == 0) { if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; - this->state.parent->render.unknown_00F6 = 20; + this->state.parent->render.tintPhase = 20; } } break; @@ -21502,7 +21502,7 @@ bool CRagEffect::OnProcess3() { if (this->state.stateCnt % 4 == 0) { if ((this->state.parent->render.flags & 0x40000) == 0) { this->state.parent->render.flags += 0x40000; - this->state.parent->render.unknown_00F6 = 20; + this->state.parent->render.tintPhase = 20; } } break; @@ -21510,10 +21510,10 @@ bool CRagEffect::OnProcess3() { if (this->state.stateCnt < 200 && (this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 25) { - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } if (this->state.stateCnt >= 151 && this->state.stateCnt <= 175) { - this->state.parent->render.unknown_00F6 = static_cast(175 - this->state.stateCnt); + this->state.parent->render.tintPhase = static_cast(175 - this->state.stateCnt); } } this->ParticleTime("effect\\white02.bmp", 1); @@ -21764,7 +21764,7 @@ bool CRagEffect::OnProcess3() { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } - if (this->state.parent->render.enabled != 0 && this->state.parent->render.unknown_0070 == 0) { + if (this->state.parent->render.enabled != 0 && this->state.parent->render.state == 0) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { @@ -21784,7 +21784,7 @@ bool CRagEffect::OnProcess3() { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\EF_BeginSpell.wav"); } - if (this->state.parent->render.unknown_0070 == 0) { + if (this->state.parent->render.state == 0) { if (this->state.stateCnt <= 15) { this->state.parent->render.angle += 12.0f; } else if (this->state.stateCnt <= 30) { @@ -21935,7 +21935,7 @@ bool CRagEffect::OnProcess3() { case EF_QUAKEBODY3: if (this->state.stateCnt >= 31 && this->state.stateCnt <= 50) { this->state.parent->render.flags |= 0x2000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } break; case EF_QUAKEBODY4: @@ -21945,7 +21945,7 @@ bool CRagEffect::OnProcess3() { } if (this->state.stateCnt > 20) { this->state.parent->render.flags |= 0x2000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); if (this->state.stateCnt % 2 == 0) { this->state.parent->SetColor(-1, 250, 50, 50); } else { @@ -21956,13 +21956,13 @@ bool CRagEffect::OnProcess3() { case EF_RED_HIT: if (this->state.stateCnt <= 16) { this->state.parent->render.flags |= 0x40000; - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt * 3); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt * 3); } break; case EF_BLUE_HIT: if (this->state.stateCnt <= 16) { this->state.parent->render.flags |= 0x4000; - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt * 3); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt * 3); } break; case EF_REDLIGHTBODY: @@ -21970,9 +21970,9 @@ bool CRagEffect::OnProcess3() { if ((this->state.parent->render.flags & 0x40000) == 0) { this->state.parent->render.flags += 0x40000; if (this->state.stateCnt <= 200) { - this->state.parent->render.unknown_00F6 = static_cast(static_cast(this->state.stateCnt) * 0.125f); + this->state.parent->render.tintPhase = static_cast(static_cast(this->state.stateCnt) * 0.125f); } else { - this->state.parent->render.unknown_00F6 = 25; + this->state.parent->render.tintPhase = 25; } } break; @@ -22257,28 +22257,28 @@ bool CRagEffect::OnProcess3() { if (this->state.stateCnt == 0) { const vector3d offset = {0.0f, 0.0f, 0.0f}; for (int angle = 0; angle < 1440; angle += 360) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 171, offset.x, offset.y, offset.z, WorldObjects())->state; - this->state.unknown_11C84->renderFlag = 5; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->slots[0].life = 1; - this->state.unknown_11C84->slots[0].height[0] = 0.0f; - this->state.unknown_11C84->slots[0].height[1] = 0.0f; - this->state.unknown_11C84->slots[0].height[2] = 0.0f; - this->state.unknown_11C84->slots[0].height[3] = 0.0f; - this->state.unknown_11C84->slots[0].height[4] = 0.0f; - this->state.unknown_11C84->slots[0].height[5] = 0.0f; - this->state.unknown_11C84->slots[0].height[6] = static_cast(angle / 4); - this->state.unknown_11C84->slots[0].height[7] = -8.0f; - this->state.unknown_11C84->slots[0].height[8] = 0.0f; - this->state.unknown_11C84->slots[0].height[9] = 0.0f; - this->state.unknown_11C84->slots[0].height[10] = 0.0f; - this->state.unknown_11C84->slots[0].distance = 8.0f; - this->state.unknown_11C84->slots[0].flag1[0] = 1; - this->state.unknown_11C84->slots[0].alphaB = 0; - this->state.unknown_11C84->slots[0].process = 0; - this->state.unknown_11C84->totalTexture = 1; - this->state.unknown_11C84->textures = new CTexture*[this->state.unknown_11C84->totalTexture]; - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\lg_kings_grace.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 171, offset.x, offset.y, offset.z, WorldObjects())->state; + this->state.currentPrimitive->renderFlag = 5; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->slots[0].life = 1; + this->state.currentPrimitive->slots[0].height[0] = 0.0f; + this->state.currentPrimitive->slots[0].height[1] = 0.0f; + this->state.currentPrimitive->slots[0].height[2] = 0.0f; + this->state.currentPrimitive->slots[0].height[3] = 0.0f; + this->state.currentPrimitive->slots[0].height[4] = 0.0f; + this->state.currentPrimitive->slots[0].height[5] = 0.0f; + this->state.currentPrimitive->slots[0].height[6] = static_cast(angle / 4); + this->state.currentPrimitive->slots[0].height[7] = -8.0f; + this->state.currentPrimitive->slots[0].height[8] = 0.0f; + this->state.currentPrimitive->slots[0].height[9] = 0.0f; + this->state.currentPrimitive->slots[0].height[10] = 0.0f; + this->state.currentPrimitive->slots[0].distance = 8.0f; + this->state.currentPrimitive->slots[0].flag1[0] = 1; + this->state.currentPrimitive->slots[0].alphaB = 0; + this->state.currentPrimitive->slots[0].process = 0; + this->state.currentPrimitive->totalTexture = 1; + this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\lg_kings_grace.tga", 0, false, true, false); } } break; @@ -22309,7 +22309,7 @@ bool CRagEffect::OnProcess3() { } if ((this->state.parent->render.flags & 0x10000) == 0 && this->state.stateCnt > 10) { this->state.parent->render.flags += 0x10000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 10); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 10); } break; case EF_ESCAPE: @@ -22471,7 +22471,7 @@ bool CRagEffect::OnProcess3() { } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt >= 14 && this->GetDuration() > this->state.stateCnt) { this->state.parent->render.flags += 0x40; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 14); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 14); } break; case EF_SOUL_REAPER_COLLECT: @@ -22519,9 +22519,9 @@ bool CRagEffect::OnProcess3() { if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 150) { - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt / 8); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt / 8); } else { - this->state.parent->render.unknown_00F6 = 15; + this->state.parent->render.tintPhase = 15; } } break; @@ -22549,26 +22549,26 @@ bool CRagEffect::OnProcess3() { } } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, offset.x, offset.y, offset.z, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern |= 0x800; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->longSpeed = 2.5f; - this->state.unknown_11C84->roll = 90.0f; - this->state.unknown_11C84->changeWidthAccel = 0.0f; - this->state.unknown_11C84->changeHeightAccel = 0.0f; - this->state.unknown_11C84->widthSize = 40.0f; - this->state.unknown_11C84->heightSize = 40.0f; - this->state.unknown_11C84->widthSpeed = -1.0f; - this->state.unknown_11C84->heightSpeed = -1.0f; - this->state.unknown_11C84->changePoint = 20; - this->state.unknown_11C84->changeWidthSpeed = 0.0f; - this->state.unknown_11C84->changeHeightSpeed = 0.0f; - this->state.unknown_11C84->textures = new CTexture*[this->state.unknown_11C84->totalTexture]; - this->state.unknown_11C84->red = 254; - this->state.unknown_11C84->blue = 254; - this->state.unknown_11C84->green = 254; - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\new_jackfrost\\new_jackfrost_magicrune\\jack_magic_rune.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, offset.x, offset.y, offset.z, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern |= 0x800; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->longSpeed = 2.5f; + this->state.currentPrimitive->roll = 90.0f; + this->state.currentPrimitive->changeWidthAccel = 0.0f; + this->state.currentPrimitive->changeHeightAccel = 0.0f; + this->state.currentPrimitive->widthSize = 40.0f; + this->state.currentPrimitive->heightSize = 40.0f; + this->state.currentPrimitive->widthSpeed = -1.0f; + this->state.currentPrimitive->heightSpeed = -1.0f; + this->state.currentPrimitive->changePoint = 20; + this->state.currentPrimitive->changeWidthSpeed = 0.0f; + this->state.currentPrimitive->changeHeightSpeed = 0.0f; + this->state.currentPrimitive->textures = new CTexture*[this->state.currentPrimitive->totalTexture]; + this->state.currentPrimitive->red = 254; + this->state.currentPrimitive->blue = 254; + this->state.currentPrimitive->green = 254; + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\new_jackfrost\\new_jackfrost_magicrune\\jack_magic_rune.tga", 0, false, true, false); } } break; @@ -22581,7 +22581,7 @@ bool CRagEffect::OnProcess3() { case EF_NEW_MAGNUM_BREAK: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } if (this->state.stateCnt <= 30) { if ((this->state.parent->render.flags & 1) == 0) { @@ -22766,7 +22766,7 @@ bool CRagEffect::OnProcess3() { plant->SetActionName(ResourceMgr::Instance(), "sprite\\몬스터\\red_plant.act"); plant->SetActorJob(1078); } - plant->SetSprAct(plant->GetEffectiveJob(-1), plant->unknown_0260, 0); + plant->SetSprAct(plant->GetEffectiveJob(-1), plant->sex, 0); WorldObjects().push_back(plant); } break; @@ -23013,7 +23013,7 @@ bool CRagEffect::OnProcess3() { case EF_VOLCANO_BLACK: if (this->state.stateCnt >= 0) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } this->TexturedCrossKind("effect\\ring_black.tga", 4); if (this->state.stateCnt <= 30) { @@ -23052,11 +23052,11 @@ bool CRagEffect::OnProcess3() { case EF_FORCE_ANIM_27: if (this->state.stateCnt == 5) { this->render.position = this->state.parent->render.position; - this->state.parent->render.unknown_0070 = 27; + this->state.parent->render.state = 27; this->state.parent->SetFrameSequence(96, 5, 5, 96, 5, 1, 25, 0); } else if (this->state.stateCnt == 35) { - if (this->state.parent->render.unknown_0070 == 27) { - this->state.parent->render.unknown_0070 = 2; + if (this->state.parent->render.state == 27) { + this->state.parent->render.state = 2; } } break; @@ -23257,9 +23257,9 @@ bool CRagEffect::OnProcess() { break; } - if (g_updateTick > 0 && this->state.parent->render.unknown_00ECBytes[0] == 1) { + if (g_updateTick > 0 && this->state.parent->render.effectPhaseBytes[0] == 1) { this->state.parent->render.flags = 0; - this->state.parent->render.unknown_00ECBytes[0] = 0; + this->state.parent->render.effectPhaseBytes[0] = 0; } if (this->state.type >= 300 && this->state.type <= 373) { @@ -23395,72 +23395,72 @@ bool CRagEffect::OnProcess() { float cosine = ClientCosine(angle); GetRadian(angle); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 25; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 25; sine *= 15.0f; - this->state.unknown_11C84->deltaPos2.x = sine; - this->state.unknown_11C84->deltaPos2.y = -10.0f; + this->state.currentPrimitive->deltaPos2.x = sine; + this->state.currentPrimitive->deltaPos2.y = -10.0f; cosine *= -15.0f; - this->state.unknown_11C84->deltaPos2.z = cosine; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle2.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle2.act"); - this->state.unknown_11C84->size = 3.0f; - this->state.unknown_11C84->sizeSpeed = -0.1f; - this->state.unknown_11C84->alpha = 250.0f; - this->state.unknown_11C84->alphaSpeed = -3.0f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->deltaPos2.z = cosine; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle2.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle2.act"); + this->state.currentPrimitive->size = 3.0f; + this->state.currentPrimitive->sizeSpeed = -0.1f; + this->state.currentPrimitive->alpha = 250.0f; + this->state.currentPrimitive->alphaSpeed = -3.0f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + Owner(this->state.currentPrimitive).InitSegment(); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 25; - this->state.unknown_11C84->deltaPos2.x = sine; - this->state.unknown_11C84->deltaPos2.y = 0.0f; - this->state.unknown_11C84->deltaPos2.z = cosine; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "Shadow.act"); - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->size = 1.5f; - this->state.unknown_11C84->sizeSpeed = -0.06f; - this->state.unknown_11C84->alpha = 150.0f; - this->state.unknown_11C84->alphaSpeed = -2.5f; - this->state.unknown_11C84->fadeOutCnt = this->state.unknown_11C84->duration - 6; - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 25; + this->state.currentPrimitive->deltaPos2.x = sine; + this->state.currentPrimitive->deltaPos2.y = 0.0f; + this->state.currentPrimitive->deltaPos2.z = cosine; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "Shadow.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "Shadow.act"); + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->size = 1.5f; + this->state.currentPrimitive->sizeSpeed = -0.06f; + this->state.currentPrimitive->alpha = 150.0f; + this->state.currentPrimitive->alphaSpeed = -2.5f; + this->state.currentPrimitive->fadeOutCnt = this->state.currentPrimitive->duration - 6; + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_TELEPORTATION: if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Teleportation.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 60; - this->state.unknown_11C84->pattern |= 1; - this->state.unknown_11C84->outerSize = 4.0f; - this->state.unknown_11C84->innerSize = 4.0f; - this->state.unknown_11C84->heightSpeed = 5.0f; - this->state.unknown_11C84->heightAccel = 0.25f; - this->state.unknown_11C84->longSpeed = 2.0f; - this->state.unknown_11C84->fadeOutCnt = 0; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 60; + this->state.currentPrimitive->pattern |= 1; + this->state.currentPrimitive->outerSize = 4.0f; + this->state.currentPrimitive->innerSize = 4.0f; + this->state.currentPrimitive->heightSpeed = 5.0f; + this->state.currentPrimitive->heightAccel = 0.25f; + this->state.currentPrimitive->longSpeed = 2.0f; + this->state.currentPrimitive->fadeOutCnt = 0; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } break; case EF_READYPORTAL: if (this->state.stateCnt % 14 == 0) { PlayEffectWave(*this, "effect\\EF_ReadyPortal.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->deltaPos2.y = -1.0f; - this->state.unknown_11C84->innerSize = 8.0f; - this->state.unknown_11C84->latitude = 90.0f; - EffectPrimitiveState& tilted = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 12, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->deltaPos2.y = -1.0f; + this->state.currentPrimitive->innerSize = 8.0f; + this->state.currentPrimitive->latitude = 90.0f; + EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(static_cast(tilted.latitude))); - this->state.unknown_11C84->radiusSpeed = 1.0f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive->radiusSpeed = 1.0f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration)) * g_depthAverageHalf; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; - Owner(this->state.unknown_11C84).InitSegment(); - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); + Owner(this->state.currentPrimitive).InitSegment(); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_blue.tga", 0, false, true, false); } break; case EF_PORTAL: @@ -23476,14 +23476,14 @@ bool CRagEffect::OnProcess() { this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_Aqua.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->repeatAnim = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\성수뜨기.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\성수뜨기.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->repeatAnim = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\성수뜨기.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\성수뜨기.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SIGNUM: @@ -23510,21 +23510,21 @@ bool CRagEffect::OnProcess() { if (this->state.stateCnt == 0) { const int count = std::max(rand() % 4, 0) + 1; for (int index = 0; index < count; ++index) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - EffectPrimitiveState& tilted = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(std::max(rand() % 30, 0) + 75)); - EffectPrimitiveState& turned = *this->state.unknown_11C84; + EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->AppendYRotation(GetRadian(std::max(rand() % 360, 0))); - this->state.unknown_11C84->deltaPos2.y = -9.0f; - this->state.unknown_11C84->rollSpeed = 0.75f; - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; - this->state.unknown_11C84->size = 1.5f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + this->state.currentPrimitive->deltaPos2.y = -9.0f; + this->state.currentPrimitive->rollSpeed = 0.75f; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 3, 0) + 3) / 10.0f; + this->state.currentPrimitive->size = 1.5f; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 3; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\굴뚝연기.act"); + Owner(this->state.currentPrimitive).InitSegment(); } } break; @@ -23537,21 +23537,21 @@ bool CRagEffect::OnProcess() { case EF_TORCH: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern |= 0x200; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->deltaPos2.y = -10.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern |= 0x200; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->deltaPos2.y = -10.0f; if (this->state.param[0] <= 0.0f) { this->state.param[0] = 1.0f; } if (this->state.param[1] < 1.0f) { this->state.param[1] = 1.0f; } - this->state.unknown_11C84->size = this->state.param[0]; - this->state.unknown_11C84->animSpeed = static_cast(this->state.param[1]); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\torch_01.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\torch_01.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = this->state.param[0]; + this->state.currentPrimitive->animSpeed = static_cast(this->state.param[1]); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\torch_01.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\torch_01.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SPRAYPOND: @@ -23578,22 +23578,22 @@ bool CRagEffect::OnProcess() { this->state.tlvertY = vertex.y; const int roll = rand() % 360; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 30; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->widthSize = 10.0f; - this->state.unknown_11C84->heightSize = 10.0f; - this->state.unknown_11C84->widthSpeed = 5.7f; - this->state.unknown_11C84->heightSpeed = 5.7f; - this->state.unknown_11C84->roll = static_cast(std::max(roll, 0)); - this->state.unknown_11C84->rollSpeed = -18.0f; - EffectPrimitiveState& spin = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 0, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 30; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->widthSize = 10.0f; + this->state.currentPrimitive->heightSize = 10.0f; + this->state.currentPrimitive->widthSpeed = 5.7f; + this->state.currentPrimitive->heightSpeed = 5.7f; + this->state.currentPrimitive->roll = static_cast(std::max(roll, 0)); + this->state.currentPrimitive->rollSpeed = -18.0f; + EffectPrimitiveState& spin = *this->state.currentPrimitive; spin.rollAccel = -(spin.rollSpeed / static_cast(spin.duration)) / 2.5f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\FireRing.tga", 0, false, true, false); - this->state.unknown_11C84->slots[0].life = 0; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\FireRing.tga", 0, false, true, false); + this->state.currentPrimitive->slots[0].life = 0; } break; } @@ -23647,15 +23647,15 @@ bool CRagEffect::OnProcess() { break; case EF_POISONHIT: if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->size = 1.5f; - this->state.unknown_11C84->animSpeed = 2; - this->state.unknown_11C84->pattern |= 0x200; - this->state.unknown_11C84->repeatAnim = 0; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\PoisonHit.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\PoisonHit.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->size = 1.5f; + this->state.currentPrimitive->animSpeed = 2; + this->state.currentPrimitive->pattern |= 0x200; + this->state.currentPrimitive->repeatAnim = 0; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\PoisonHit.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\PoisonHit.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_BEGINSPELL2: @@ -23712,14 +23712,14 @@ bool CRagEffect::OnProcess() { break; case EF_BARRIER: if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 250; - this->state.unknown_11C84->radius = 13.5f; - this->state.unknown_11C84->deltaPos2.y = -10.0f; - this->state.unknown_11C84->longitude = 2.0f; - this->state.unknown_11C84->alpha = 100.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 14, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 250; + this->state.currentPrimitive->radius = 13.5f; + this->state.currentPrimitive->deltaPos2.y = -10.0f; + this->state.currentPrimitive->longitude = 2.0f; + this->state.currentPrimitive->alpha = 100.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\대폭발.tga", 0, false, true, false); } break; case EF_INVENOM: @@ -23767,28 +23767,28 @@ bool CRagEffect::OnProcess() { break; case EF_CONE: if (this->state.stateCnt % 130 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 7, 0.0f, 0.0f, 0.0f, WorldObjects())->state; this->state.duration = 200; - this->state.unknown_11C84->duration = 300; - this->state.unknown_11C84->radius = 0.1f; - this->state.unknown_11C84->radiusSpeed = 0.2f; - this->state.unknown_11C84->gravSpeed = 0.1f; - this->state.unknown_11C84->gravAccel = 0.005f; - this->state.unknown_11C84->longitude = 2.0f; - this->state.unknown_11C84->longSpeed = 15.0f; - this->state.unknown_11C84->longAccel = -0.01f; - this->state.unknown_11C84->size = 1.2f; - EffectPrimitiveState& turned = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = 300; + this->state.currentPrimitive->radius = 0.1f; + this->state.currentPrimitive->radiusSpeed = 0.2f; + this->state.currentPrimitive->gravSpeed = 0.1f; + this->state.currentPrimitive->gravAccel = 0.005f; + this->state.currentPrimitive->longitude = 2.0f; + this->state.currentPrimitive->longSpeed = 15.0f; + this->state.currentPrimitive->longAccel = -0.01f; + this->state.currentPrimitive->size = 1.2f; + EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->MakeYRotation(GetRadian(static_cast(turned.longitude))); - EffectPrimitiveState& orbit = *this->state.unknown_11C84; + EffectPrimitiveState& orbit = *this->state.currentPrimitive; const float* transform = orbit.transform; const float radius = orbit.radius; orbit.deltaPos2.x = (transform[0] * 0.0f - transform[3] * 30.0f) + radius * transform[6] + transform[9]; orbit.deltaPos2.y = (transform[1] * 0.0f - transform[4] * 30.0f) + radius * transform[7] + transform[10]; orbit.deltaPos2.z = (transform[2] * 0.0f - transform[5] * 30.0f) + radius * transform[8] + transform[11]; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle1.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle1.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SPHERE: @@ -24102,18 +24102,18 @@ bool CRagEffect::OnProcess() { PlayEffectWave(*this, "effect\\wizard_fire_ivy.wav"); } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->pattern = 0x40; - this->state.unknown_11C84->pattern |= 0x100; - this->state.unknown_11C84->renderFlag |= 2; - this->state.unknown_11C84->widthSize = 3.5f; - this->state.unknown_11C84->heightSize = 3.5f; - EffectPrimitiveState& rise = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->pattern = 0x40; + this->state.currentPrimitive->pattern |= 0x100; + this->state.currentPrimitive->renderFlag |= 2; + this->state.currentPrimitive->widthSize = 3.5f; + this->state.currentPrimitive->heightSize = 3.5f; + EffectPrimitiveState& rise = *this->state.currentPrimitive; rise.speed3d.y = -(25.0f / static_cast(rise.duration)); - this->state.unknown_11C84->deltaPos2.y = -5.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\fire_ivy.bmp", 0, false, true, false); + this->state.currentPrimitive->deltaPos2.y = -5.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\fire_ivy.bmp", 0, false, true, false); } break; case EF_DETECTING: @@ -24131,17 +24131,17 @@ bool CRagEffect::OnProcess() { this->state.tlvertY = vertex.y; if (this->state.stateCnt == 0) { PlayEffectWave(*this, "effect\\EF_StoneCurse.wav"); - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->fadeOutCnt = 0; - this->state.unknown_11C84->deltaPos2.y = -20.0f; - this->state.unknown_11C84->arcAngle = 10.0f; - this->state.unknown_11C84->innerSize = 10.0f; - this->state.unknown_11C84->radiusSpeed = 7.0f; - EffectPrimitiveState& ring = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 4, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->fadeOutCnt = 0; + this->state.currentPrimitive->deltaPos2.y = -20.0f; + this->state.currentPrimitive->arcAngle = 10.0f; + this->state.currentPrimitive->innerSize = 10.0f; + this->state.currentPrimitive->radiusSpeed = 7.0f; + EffectPrimitiveState& ring = *this->state.currentPrimitive; ring.radiusAccel = -(ring.radiusSpeed / static_cast(ring.duration + 40)) * 2.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\alpha_center.tga", 0, false, true, false); } break; } @@ -24207,34 +24207,34 @@ bool CRagEffect::OnProcess() { break; case EF_REVIVE: if (this->state.stateCnt % 25 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 60; - this->state.unknown_11C84->longSpeed = 1.5f; - this->state.unknown_11C84->longAccel = 0.03f; - this->state.unknown_11C84->outerSize = 10.5f; - this->state.unknown_11C84->innerSpeed = -0.12f; - this->state.unknown_11C84->innerAccel = 0.003f; - this->state.unknown_11C84->outerSpeed = -0.12f; - this->state.unknown_11C84->outerAccel = 0.003f; - this->state.unknown_11C84->innerSize = 7.5f; - this->state.unknown_11C84->heightSize = 7.5f; - this->state.unknown_11C84->alpha = 240.0f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 13, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 60; + this->state.currentPrimitive->longSpeed = 1.5f; + this->state.currentPrimitive->longAccel = 0.03f; + this->state.currentPrimitive->outerSize = 10.5f; + this->state.currentPrimitive->innerSpeed = -0.12f; + this->state.currentPrimitive->innerAccel = 0.003f; + this->state.currentPrimitive->outerSpeed = -0.12f; + this->state.currentPrimitive->outerAccel = 0.003f; + this->state.currentPrimitive->innerSize = 7.5f; + this->state.currentPrimitive->heightSize = 7.5f; + this->state.currentPrimitive->alpha = 240.0f; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 2; if (this->state.stateCnt == 0) { - this->state.unknown_11C84->duration = this->state.duration; - this->state.unknown_11C84->innerSpeed = 0.0f; - this->state.unknown_11C84->innerAccel = 0.0f; - this->state.unknown_11C84->longSpeed = 1.5f; - this->state.unknown_11C84->outerSize = 11.0f; - this->state.unknown_11C84->innerSize = 7.5f; - this->state.unknown_11C84->outerSpeed = 0.0f; - this->state.unknown_11C84->outerAccel = 0.0f; - EffectPrimitiveState& late = *this->state.unknown_11C84; + this->state.currentPrimitive->duration = this->state.duration; + this->state.currentPrimitive->innerSpeed = 0.0f; + this->state.currentPrimitive->innerAccel = 0.0f; + this->state.currentPrimitive->longSpeed = 1.5f; + this->state.currentPrimitive->outerSize = 11.0f; + this->state.currentPrimitive->innerSize = 7.5f; + this->state.currentPrimitive->outerSpeed = 0.0f; + this->state.currentPrimitive->outerAccel = 0.0f; + EffectPrimitiveState& late = *this->state.currentPrimitive; late.fadeOutCnt = late.duration - late.duration / 10; } - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\ring_yellow.tga", 0, false, true, false); } break; case EF_HEAVENSDRIVE: @@ -24273,24 +24273,24 @@ bool CRagEffect::OnProcess() { this->state.stateCnt = 0; } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 9999; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->longSpeed = 4.5f; - this->state.unknown_11C84->roll = 90.0f; - this->state.unknown_11C84->widthSize = 4.0f; - this->state.unknown_11C84->heightSize = 4.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 9999; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->longSpeed = 4.5f; + this->state.currentPrimitive->roll = 90.0f; + this->state.currentPrimitive->widthSize = 4.0f; + this->state.currentPrimitive->heightSize = 4.0f; if (this->state.count == 11) { - this->state.unknown_11C84->red = 0; - this->state.unknown_11C84->blue = 0; - this->state.unknown_11C84->green = 250; + this->state.currentPrimitive->red = 0; + this->state.currentPrimitive->blue = 0; + this->state.currentPrimitive->green = 250; } else { - this->state.unknown_11C84->red = 250; - this->state.unknown_11C84->blue = (10 - this->state.count) * 25; - this->state.unknown_11C84->green = (10 - this->state.count) * 25; + this->state.currentPrimitive->red = 250; + this->state.currentPrimitive->blue = (10 - this->state.count) * 25; + this->state.currentPrimitive->green = (10 - this->state.count) * 25; } - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\LockOn128.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z) - 2.0f; @@ -24303,17 +24303,17 @@ bool CRagEffect::OnProcess() { this->state.stateCnt = 0; } if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 9999; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->roll = 90.0f; - this->state.unknown_11C84->widthSize = 4.0f; - this->state.unknown_11C84->heightSize = 4.0f; - this->state.unknown_11C84->red = 50; - this->state.unknown_11C84->blue = 253; - this->state.unknown_11C84->green = 50; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\party.tga", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 9999; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->roll = 90.0f; + this->state.currentPrimitive->widthSize = 4.0f; + this->state.currentPrimitive->heightSize = 4.0f; + this->state.currentPrimitive->red = 50; + this->state.currentPrimitive->blue = 253; + this->state.currentPrimitive->green = 50; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\party.tga", 0, false, true, false); } CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; this->render.position.y = world->terrain->Height(this->render.position.x, this->render.position.z) - 2.0f; @@ -24331,23 +24331,23 @@ bool CRagEffect::OnProcess() { case EF_BANJJAKII: this->render.position = this->state.parent->render.position; if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->pattern |= 0x200; - this->state.unknown_11C84->duration = 125; - this->state.unknown_11C84->deltaPos2.y = -10.0f; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->pattern |= 0x200; + this->state.currentPrimitive->duration = 125; + this->state.currentPrimitive->deltaPos2.y = -10.0f; if (this->state.param[0] <= 0.0f) { this->state.param[0] = 1.0f; } if (this->state.param[1] < 1.0f) { this->state.param[1] = 1.0f; } - this->state.unknown_11C84->animSpeed = static_cast(this->state.param[1]); - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\크리스마스.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\크리스마스.act"); + this->state.currentPrimitive->animSpeed = static_cast(this->state.param[1]); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\크리스마스.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\크리스마스.act"); const int kind = rand() % 10; - this->state.unknown_11C84->size = kind % 3 == 1 ? 0.01f : 1.0f; - Owner(this->state.unknown_11C84).SetAction(kind / 2, 1, 1); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive->size = kind % 3 == 1 ? 0.01f : 1.0f; + Owner(this->state.currentPrimitive).SetAction(kind / 2, 1, 1); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_MAKEBLUR: @@ -24360,24 +24360,24 @@ bool CRagEffect::OnProcess() { break; case EF_VENOMDUST2: if (this->state.stateCnt % 5 == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 10; - EffectPrimitiveState& turned = *this->state.unknown_11C84; + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 10; + EffectPrimitiveState& turned = *this->state.currentPrimitive; reinterpret_cast(turned.transform)->MakeYRotation(GetRadian(std::max(rand() % 360, 0))); - EffectPrimitiveState& tilted = *this->state.unknown_11C84; + EffectPrimitiveState& tilted = *this->state.currentPrimitive; reinterpret_cast(tilted.transform)->MakeXRotation(GetRadian(90)); - this->state.unknown_11C84->speed = static_cast(std::max(rand() % 20, 0) + 20) / 80.0f; - EffectPrimitiveState& moving = *this->state.unknown_11C84; + this->state.currentPrimitive->speed = static_cast(std::max(rand() % 20, 0) + 20) / 80.0f; + EffectPrimitiveState& moving = *this->state.currentPrimitive; moving.accel = -(moving.speed / static_cast(moving.duration)) * g_depthAverageHalf; - this->state.unknown_11C84->size = 0.8f; - this->state.unknown_11C84->rollSpeed = 3.0f; - this->state.unknown_11C84->alpha = 70.0f; - this->state.unknown_11C84->alphaSpeed = this->state.unknown_11C84->maxAlpha / 10.0f; - EffectPrimitiveState& fade = *this->state.unknown_11C84; + this->state.currentPrimitive->size = 0.8f; + this->state.currentPrimitive->rollSpeed = 3.0f; + this->state.currentPrimitive->alpha = 70.0f; + this->state.currentPrimitive->alphaSpeed = this->state.currentPrimitive->maxAlpha / 10.0f; + EffectPrimitiveState& fade = *this->state.currentPrimitive; fade.fadeOutCnt = fade.duration - fade.duration / 5; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle3.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\particle3.act"); - Owner(this->state.unknown_11C84).InitSegment(); + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\particle3.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\particle3.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_CHANGEDARK: @@ -24454,15 +24454,15 @@ bool CRagEffect::OnProcess() { } case EF_CURSEATTACK: if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 9999; - this->state.unknown_11C84->longitude = 0.0f; - this->state.unknown_11C84->longSpeed = 4.5f; - this->state.unknown_11C84->deltaPos2.y -= 30.0f; - this->state.unknown_11C84->widthSize = 4.0f; - this->state.unknown_11C84->heightSize = 4.0f; - AllocateTextures(*this->state.unknown_11C84); - this->state.unknown_11C84->textures[0] = g_texMgr.Load("effect\\curse.bmp", 0, false, true, false); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 15, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 9999; + this->state.currentPrimitive->longitude = 0.0f; + this->state.currentPrimitive->longSpeed = 4.5f; + this->state.currentPrimitive->deltaPos2.y -= 30.0f; + this->state.currentPrimitive->widthSize = 4.0f; + this->state.currentPrimitive->heightSize = 4.0f; + AllocateTextures(*this->state.currentPrimitive); + this->state.currentPrimitive->textures[0] = g_texMgr.Load("effect\\curse.bmp", 0, false, true, false); } break; case EF_LEVEL99: @@ -24505,18 +24505,18 @@ bool CRagEffect::OnProcess() { break; case EF_DARKBREATH: if (this->state.stateCnt == 0) { - this->state.unknown_11C84 = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; - this->state.unknown_11C84->duration = 65; - this->state.unknown_11C84->renderFlag |= 0x200; - this->state.unknown_11C84->deltaPos2.y -= 20.0f; - this->state.unknown_11C84->size = 0.8f; - this->state.unknown_11C84->animSpeed = 1; - this->state.unknown_11C84->green = 0; - this->state.unknown_11C84->blue = 0; - this->state.unknown_11C84->fadeOutCnt = 60; - Owner(this->state.unknown_11C84).SetSpriteName(ResourceMgr::Instance(), "이팩트\\DarkBreath.spr"); - Owner(this->state.unknown_11C84).SetActionName(ResourceMgr::Instance(), "이팩트\\DarkBreath.act"); - Owner(this->state.unknown_11C84).InitSegment(); + this->state.currentPrimitive = &CreateEffectParticle(*this, this->render, 5, 0.0f, 0.0f, 0.0f, WorldObjects())->state; + this->state.currentPrimitive->duration = 65; + this->state.currentPrimitive->renderFlag |= 0x200; + this->state.currentPrimitive->deltaPos2.y -= 20.0f; + this->state.currentPrimitive->size = 0.8f; + this->state.currentPrimitive->animSpeed = 1; + this->state.currentPrimitive->green = 0; + this->state.currentPrimitive->blue = 0; + this->state.currentPrimitive->fadeOutCnt = 60; + Owner(this->state.currentPrimitive).SetSpriteName(ResourceMgr::Instance(), "이팩트\\DarkBreath.spr"); + Owner(this->state.currentPrimitive).SetActionName(ResourceMgr::Instance(), "이팩트\\DarkBreath.act"); + Owner(this->state.currentPrimitive).InitSegment(); } break; case EF_SUMMONSLAVE: @@ -25146,13 +25146,13 @@ bool CRagEffect::OnProcess() { } if ((this->state.parent->render.flags & 0x20) == 0 && this->state.stateCnt >= 17 && this->state.stateCnt <= 50) { this->state.parent->render.flags += 0x20; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 17); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 17); } break; case EF_SPINEDBODY: if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt < 18) { this->state.parent->render.flags += 0x40; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt * 2); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt * 2); } break; case EF_KICKEDBODY: @@ -25166,7 +25166,7 @@ bool CRagEffect::OnProcess() { } if ((this->state.parent->render.flags & 0x80) == 0 && this->state.stateCnt >= 30) { this->state.parent->render.flags += 0x80; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 30); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 30); } break; case EF_AIRTEXTURE: @@ -25176,7 +25176,7 @@ bool CRagEffect::OnProcess() { if ((this->state.parent->render.flags & 0x100) == 0) { this->state.parent->render.flags += 0x100; if (this->state.stateCnt < 15) { - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } } break; @@ -25222,27 +25222,27 @@ bool CRagEffect::OnProcess() { case EF_ASURABODY: if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; - this->state.parent->render.unknown_00F2 = this->state.stateCnt < 200 ? static_cast(this->state.stateCnt) : 200; + this->state.parent->render.outlineAlpha = this->state.stateCnt < 200 ? static_cast(this->state.stateCnt) : 200; } break; case EF_4WAYBODY: if (this->state.stateCnt >= 30) { this->state.parent->render.flags |= 0x1000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 30); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 30); } break; case EF_QUAKEBODY: case EF_QUAKEBODY2: if ((this->state.parent->render.flags & 0x2000) == 0) { this->state.parent->render.flags += 0x2000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt); } break; case EF_ASURABODY_MONSTER: if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; if (this->state.stateCnt < 150) { - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt + 50); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt + 50); } } break; @@ -25339,17 +25339,17 @@ bool CRagEffect::OnProcess() { } if ((this->state.parent->render.flags & 0x10000) == 0 && this->state.stateCnt > 35) { this->state.parent->render.flags += 0x10000; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 35); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 35); } break; case EF_LANDBODY: if ((this->state.parent->render.flags & 0x20000) == 0) { this->state.parent->render.flags += 0x20000; - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt < 25) { this->state.parent->render.flags += 0x40; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt + 11); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt + 11); } break; case EF_FOOT3: @@ -25362,7 +25362,7 @@ bool CRagEffect::OnProcess() { if ((this->state.parent->render.flags & 0x4000) == 0) { this->state.parent->render.flags += 0x4000; if (this->state.stateCnt <= 50) { - this->state.parent->render.unknown_00F6 = static_cast(this->state.stateCnt); + this->state.parent->render.tintPhase = static_cast(this->state.stateCnt); } } break; @@ -25394,11 +25394,11 @@ bool CRagEffect::OnProcess() { PlayEffectWave(*this, "effect\\T_날라차기.wav"); } if (this->state.stateCnt == 5) { - this->state.parent->render.unknown_0070 = 27; + this->state.parent->render.state = 27; this->state.parent->SetFrameSequence(0x60, 5, 5, 0x60, 5, 1, 25, 0); } - if (this->state.stateCnt == 35 && this->state.parent->render.unknown_0070 == 27) { - this->state.parent->render.unknown_0070 = 2; + if (this->state.stateCnt == 35 && this->state.parent->render.state == 27) { + this->state.parent->render.state = 2; } break; case EF_STORMKICK1: @@ -25439,7 +25439,7 @@ bool CRagEffect::OnProcess() { if (this->state.stateCnt == 15) { this->render.position = this->state.parent->render.position; PlayEffectWave(*this, "effect\\T_회피.wav"); - this->state.parent->render.unknown_0070 = 37; + this->state.parent->render.state = 37; this->state.parent->SetFrameSequence(0x60, 2, 2, 0x60, 2, 1, 25, 0); } for (int index = 0; index < 30; ++index) { @@ -25467,7 +25467,7 @@ bool CRagEffect::OnProcess() { } if ((this->state.parent->render.flags & 0x40) == 0 && this->state.stateCnt >= 14 && this->state.stateCnt <= 49) { this->state.parent->render.flags += 0x40; - this->state.parent->render.unknown_00F4 = static_cast(this->state.stateCnt - 14); + this->state.parent->render.effectPhase = static_cast(this->state.stateCnt - 14); } break; case EF_BEGINASURA1: @@ -25543,9 +25543,9 @@ bool CRagEffect::OnProcess() { if ((this->state.parent->render.flags & 0x800) == 0) { this->state.parent->render.flags += 0x800; if (this->state.stateCnt < 200) { - this->state.parent->render.unknown_00F2 = static_cast(this->state.stateCnt); + this->state.parent->render.outlineAlpha = static_cast(this->state.stateCnt); } else if (this->state.stateCnt < 400) { - this->state.parent->render.unknown_00F2 = static_cast(400 - this->state.stateCnt); + this->state.parent->render.outlineAlpha = static_cast(400 - this->state.stateCnt); } } this->TexturedSlashAir("effect\\ring_blue.tga", 4, 0); diff --git a/Source/Contents/Effects/RagEffectState.h b/Source/Contents/Effects/RagEffectState.h index 2145e5552..85201e6f4 100644 --- a/Source/Contents/Effects/RagEffectState.h +++ b/Source/Contents/Effects/RagEffectState.h @@ -46,14 +46,14 @@ struct RagEffectState { /* 11B44 */ int loopCount; /* 11B48 */ int loopLimit; union { - /* 11B4C */ EffectPrimitiveState* unknown_11C84; + /* 11B4C */ EffectPrimitiveState* currentPrimitive; /* 11B4C */ CEffectPrim* lastPrim; }; - /* 11B50 */ std::int32_t unknown_11C88[4]; + /* 11B50 */ std::int32_t colorChannels[4]; /* 11B60 */ unsigned char forceRender; /* 11B61 */ unsigned char unknown_11C99[3]; /* 11B64 */ std::uint32_t tag; - /* 11B68 */ unsigned char unknown_11CA0; + /* 11B68 */ unsigned char visibilityFlags; /* 11B69 */ unsigned char unknown_11CA1[7]; }; diff --git a/Source/Contents/Effects/RainbowEffect.cpp b/Source/Contents/Effects/RainbowEffect.cpp index c83fc11d1..02ace2d73 100644 --- a/Source/Contents/Effects/RainbowEffect.cpp +++ b/Source/Contents/Effects/RainbowEffect.cpp @@ -28,23 +28,23 @@ void CRainbowEffect::Open() { for (int column = 0; column < 21; ++column) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 1; particle->SetTexture("effect\\alpha_center.tga"); particle->alpha = 0; particle->scale = 50.0f; - particle->unknown_0050 = 180; - particle->unknown_00C4 = 0; - particle->unknown_004C = angle; + particle->angleParameter = 180; + particle->angleBits = 0; + particle->phaseParameter = angle; InitParticleQuad(particle->vertices); this->bands.push_back(particle); } } } - this->unknown_002C = 300; + this->effectLifetime = 300; } // OFFSET: 0x00B70DF0 @@ -66,13 +66,13 @@ void CRainbowEffect::OnProcess() { if (particle != nullptr) { int alpha = particle->alpha; - if (particle->unknown_00E8 <= 180) { + if (particle->elapsedFrames <= 180) { ++alpha; - } else if (particle->unknown_00E8 <= 360) { + } else if (particle->elapsedFrames <= 360) { --alpha; } - float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + float& spinAngle = *reinterpret_cast(&particle->angleBits); spinAngle += 1.0f; if (alpha < 0) { @@ -86,9 +86,9 @@ void CRainbowEffect::OnProcess() { rotation.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); particle->transform = rotation; - const int band = particle->unknown_0010; - const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); - const int angle = static_cast(static_cast(step * particle->unknown_000C) + spinAngle) % 360; + const int band = particle->rowIndex; + const int step = static_cast(static_cast(particle->angleParameter) / 20.0f); + const int angle = static_cast(static_cast(step * particle->columnIndex) + spinAngle) % 360; vector3d points[4]{}; const float width = particle->scale * g_cosTable[angle]; @@ -97,18 +97,18 @@ void CRainbowEffect::OnProcess() { float ratio = 1.0f - static_cast(band) * 0.05f; float flat = width * ratio; float rise = height * ratio; - points[0].x = g_cosTable[particle->unknown_004C] * flat; + points[0].x = g_cosTable[particle->phaseParameter] * flat; points[0].y = rise + rise; - points[0].z = g_sinTable[particle->unknown_004C] * flat; + points[0].z = g_sinTable[particle->phaseParameter] * flat; ratio = 1.0f - static_cast(band + 1) * 0.05f; flat = width * ratio; rise = height * ratio; - points[1].x = g_cosTable[particle->unknown_004C] * flat; + points[1].x = g_cosTable[particle->phaseParameter] * flat; points[1].y = rise + rise; - points[1].z = g_sinTable[particle->unknown_004C] * flat; + points[1].z = g_sinTable[particle->phaseParameter] * flat; - if (particle->unknown_000C != 0) { + if (particle->columnIndex != 0) { particle->vertices[0].x = points[1].x; particle->vertices[0].y = points[1].y; particle->vertices[0].z = points[1].z; @@ -151,7 +151,7 @@ void CRainbowEffect::OnProcess() { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -161,8 +161,8 @@ void CRainbowEffect::Render() { for (std::vector::iterator it = this->bands.begin(); it != this->bands.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { - const int segment = particle->unknown_000C; + if (particle && particle->columnIndex > 0) { + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/RectUpEffect.cpp b/Source/Contents/Effects/RectUpEffect.cpp index 3baca1613..8024681f0 100644 --- a/Source/Contents/Effects/RectUpEffect.cpp +++ b/Source/Contents/Effects/RectUpEffect.cpp @@ -12,7 +12,7 @@ // OFFSET: 0x00709F50 // FUNCTION: fn_07096 -CRectUpEffect::CRectUpEffect() : CEffect(1088), unknown_00CC{} { +CRectUpEffect::CRectUpEffect() : CEffect(1088), previousEdge{} { } // OFFSET: 0x0070A410 @@ -34,27 +34,27 @@ bool CRectUpEffect::IsAlive() { void CRectUpEffect::OnProcess() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - particle->position.x = this->position[0] + particle->unknown_00D0; - particle->position.y = this->position[1] + particle->unknown_00D4; - particle->position.z = this->position[2] + particle->unknown_00D8; + particle->position.x = this->position[0] + particle->offsetX; + particle->position.y = this->position[1] + particle->offsetY; + particle->position.z = this->position[2] + particle->offsetZ; - int& phase = particle->unknown_0050; + int& phase = particle->angleParameter; phase += phase + 1 < 360 ? 1 : -359; - if (particle->unknown_00E8 > this->unknown_00E4) { + if (particle->elapsedFrames > this->particleLifetime) { particle->alpha = std::max(particle->alpha - 2, 0); } - float height = particle->unknown_00C0 * g_sinTable[phase] * 0.35f + particle->unknown_00C0 * 0.65f; - if (particle->unknown_00E8 < 90) { - height *= g_sinTable[particle->unknown_00E8]; + float height = particle->speedParameter * g_sinTable[phase] * 0.35f + particle->speedParameter * 0.65f; + if (particle->elapsedFrames < 90) { + height *= g_sinTable[particle->elapsedFrames]; } - particle->unknown_0054 = height; + particle->animationParameter = height; this->ProcessParticle(particle); matrix rotation; std::memcpy(rotation.values, g_identityMatrix, sizeof(rotation.values)); rotation.AppendYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->transform = rotation; } } @@ -65,8 +65,8 @@ void CRectUpEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; if (particle) { - const int previous = particle->unknown_000C; - const int angle = static_cast(*reinterpret_cast(&particle->unknown_00C4)) % 360; + const int previous = particle->columnIndex; + const int angle = static_cast(*reinterpret_cast(&particle->angleBits)) % 360; const float x = particle->scale * g_cosTable[angle]; const float z = particle->scale * g_sinTable[angle]; @@ -75,7 +75,7 @@ void CRectUpEffect::Render() { edge[0].y = 0.0f; edge[0].z = z; edge[1].x = x; - edge[1].y = -particle->unknown_0054; + edge[1].y = -particle->animationParameter; edge[1].z = z; particle->vertices[1].x = edge[1].x; @@ -85,15 +85,15 @@ void CRectUpEffect::Render() { particle->vertices[3].y = edge[0].y; particle->vertices[3].z = edge[0].z; if (previous) { - particle->vertices[0].x = this->unknown_00CC[1].x; - particle->vertices[0].y = this->unknown_00CC[1].y; - particle->vertices[0].z = this->unknown_00CC[1].z; - particle->vertices[2].x = this->unknown_00CC[0].x; - particle->vertices[2].y = this->unknown_00CC[0].y; - particle->vertices[2].z = this->unknown_00CC[0].z; + particle->vertices[0].x = this->previousEdge[1].x; + particle->vertices[0].y = this->previousEdge[1].y; + particle->vertices[0].z = this->previousEdge[1].z; + particle->vertices[2].x = this->previousEdge[0].x; + particle->vertices[2].y = this->previousEdge[0].y; + particle->vertices[2].z = this->previousEdge[0].z; } - this->unknown_00CC[0] = edge[0]; - this->unknown_00CC[1] = edge[1]; + this->previousEdge[0] = edge[0]; + this->previousEdge[1] = edge[1]; if (previous) { particle->Render(false, 0.0f, 1.0f, 0.0f, 1.0f, false, true); @@ -106,9 +106,9 @@ void CRectUpEffect::Render() { // FUNCTION: fn_07104 void CRectUpEffect::ProcessParticle(CParticle* particle) { if (particle && this->id == 1088) { - particle->unknown_004C += particle->unknown_004C + 1 < 360 ? 1 : -359; - const int base = *reinterpret_cast(particle->unknown_0048); - particle->SetColor(255, 255, static_cast(g_sinTable[particle->unknown_004C] * 100.0f + static_cast(base))); + particle->phaseParameter += particle->phaseParameter + 1 < 360 ? 1 : -359; + const int base = *reinterpret_cast(particle->effectParameters); + particle->SetColor(255, 255, static_cast(g_sinTable[particle->phaseParameter] * 100.0f + static_cast(base))); } } @@ -136,7 +136,7 @@ void CRectUpEffect::Open() { return; } - this->unknown_00E4 = 1880; + this->particleLifetime = 1880; for (int z = -5; z < 10; z += 5) { for (int x = -5; x < 10; x += 5) { int index = 0; @@ -146,23 +146,23 @@ void CRectUpEffect::Open() { continue; } - particle->unknown_00D0 = static_cast(x); - particle->unknown_00D4 = 0.0f; - particle->unknown_00D8 = static_cast(z); - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; - particle->unknown_0050 = std::max(rand() % 360, 0); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_0054 = 0.0f; + particle->offsetX = static_cast(x); + particle->offsetY = 0.0f; + particle->offsetZ = static_cast(z); + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; + particle->angleParameter = std::max(rand() % 360, 0); + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->animationParameter = 0.0f; if (this->id == 1088) { - particle->unknown_00C0 = 16.0f; + particle->speedParameter = 16.0f; particle->alpha = 120; particle->scale = 3.5f; const int shade = std::max(rand() % 50, 0) + 100; - std::memcpy(particle->unknown_0048, &shade, sizeof(shade)); - particle->unknown_004C = 0; + std::memcpy(particle->effectParameters, &shade, sizeof(shade)); + particle->phaseParameter = 0; } this->InitParticle(particle); InitParticleQuad(particle->vertices); diff --git a/Source/Contents/Effects/RectUpEffect.h b/Source/Contents/Effects/RectUpEffect.h index 817e2a824..a140ab71e 100644 --- a/Source/Contents/Effects/RectUpEffect.h +++ b/Source/Contents/Effects/RectUpEffect.h @@ -22,14 +22,14 @@ public: virtual void ProcessParticle(CParticle* particle); virtual void InitParticle(CParticle* particle); - /* 00CC */ vector3d unknown_00CC[2]; - /* 00E4 */ int unknown_00E4; + /* 00CC */ vector3d previousEdge[2]; + /* 00E4 */ int particleLifetime; /* 00E8 */ std::vector particles; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CRectUpEffect) == 0xF4); -static_assert(offsetof(CRectUpEffect, unknown_00E4) == 0xE4); +static_assert(offsetof(CRectUpEffect, particleLifetime) == 0xE4); static_assert(offsetof(CRectUpEffect, particles) == 0xE8); #endif diff --git a/Source/Contents/Effects/RedLineEffect.cpp b/Source/Contents/Effects/RedLineEffect.cpp index 44a3a9e2c..47dc509a2 100644 --- a/Source/Contents/Effects/RedLineEffect.cpp +++ b/Source/Contents/Effects/RedLineEffect.cpp @@ -22,21 +22,21 @@ void CRedLineEffect::CreateLines(int layer) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { particle->SetTexture("effect\\ring_red.tga"); - particle->unknown_0010 = row; - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0008 = 3; - particle->unknown_0050 = 360; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + particle->rowIndex = row; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->groupIndex = 3; + particle->angleParameter = 360; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); particle->alpha = 150; - particle->unknown_00C0 = 120.0f; - particle->unknown_004C = 90; + particle->speedParameter = 120.0f; + particle->phaseParameter = 90; particle->scale = scale; - particle->unknown_00D0 = directionX; - particle->unknown_00D8 = directionZ; - particle->unknown_00D4 = 0.0f; - particle->unknown_00E8 = life; - particle->unknown_0054 = static_cast(layer); + particle->offsetX = directionX; + particle->offsetZ = directionZ; + particle->offsetY = 0.0f; + particle->elapsedFrames = life; + particle->animationParameter = static_cast(layer); InitParticleQuad(particle->vertices); this->lines.push_back(particle); } @@ -61,7 +61,7 @@ void CRedLineEffect::Close() { void CRedLineEffect::Open() { this->CreateLines(0); this->CreateLines(1); - this->unknown_002C = 75; + this->effectLifetime = 75; } // OFFSET: 0x00B71BE0 @@ -81,9 +81,9 @@ void CRedLineEffect::OnProcess() { position.z = this->position[2]; if (particle != nullptr) { - float& spinAngle = *reinterpret_cast(&particle->unknown_00C4); + float& spinAngle = *reinterpret_cast(&particle->angleBits); float spin = spinAngle + 1.0f; - const int age = particle->unknown_00E8; + const int age = particle->elapsedFrames; if (spin >= 360.0f) { spin -= 360.0f; @@ -97,33 +97,33 @@ void CRedLineEffect::OnProcess() { if (age < 100) { width = 0.0f; } else if (age <= 115) { - width = g_sinTable[(age - 100) * 6] * particle->unknown_00C0; + width = g_sinTable[(age - 100) * 6] * particle->speedParameter; } else { - width = particle->unknown_00C0; + width = particle->speedParameter; } } else { - const float shrunk = particle->unknown_00C0 - 5.0f; + const float shrunk = particle->speedParameter - 5.0f; const int alpha = particle->alpha - 15; particle->alpha = alpha < 0 ? 0 : alpha; - particle->unknown_00C0 = shrunk < 0.0f ? 0.0f : shrunk; - width = particle->unknown_00C0; + particle->speedParameter = shrunk < 0.0f ? 0.0f : shrunk; + width = particle->speedParameter; } if (width < 0.0f) { width = 0.0f; } - const int segment = particle->unknown_000C; - const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int segment = particle->columnIndex; + const int step = static_cast(static_cast(particle->angleParameter) / 20.0f); const int angle = static_cast(static_cast(step * segment) + spin) % 360; - const float flat = width * g_cosTable[particle->unknown_004C]; - const float rise = width * g_sinTable[particle->unknown_004C]; + const float flat = width * g_cosTable[particle->phaseParameter]; + const float rise = width * g_sinTable[particle->phaseParameter]; vector3d points[2]{}; points[0].x = particle->scale * g_cosTable[angle]; points[0].z = particle->scale * g_sinTable[angle]; - if (particle->unknown_0054 == 1.0f) { + if (particle->animationParameter == 1.0f) { points[0].x *= 1.5f; points[0].z *= 1.5f; } @@ -132,12 +132,12 @@ void CRedLineEffect::OnProcess() { points[1].y = points[0].y - rise; points[1].z = flat * g_sinTable[angle] + points[0].z; - points[0].x += particle->unknown_00D0; - points[0].y += particle->unknown_00D4; - points[0].z += particle->unknown_00D8; - points[1].x += particle->unknown_00D0; - points[1].y += particle->unknown_00D4; - points[1].z += particle->unknown_00D8; + points[0].x += particle->offsetX; + points[0].y += particle->offsetY; + points[0].z += particle->offsetZ; + points[1].x += particle->offsetX; + points[1].y += particle->offsetY; + points[1].z += particle->offsetZ; particle->vertices[1].x = points[1].x; particle->vertices[1].y = points[1].y; @@ -159,7 +159,7 @@ void CRedLineEffect::OnProcess() { this->previousOuter = points[1]; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -169,11 +169,11 @@ void CRedLineEffect::Render() { for (std::vector::iterator it = this->lines.begin(); it != this->lines.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_000C > 0) { + if (particle && particle->columnIndex > 0) { int blend; short shade; - if (particle->unknown_0054 == 0.0f) { + if (particle->animationParameter == 0.0f) { shade = 10; blend = 6; } else { @@ -184,7 +184,7 @@ void CRedLineEffect::Render() { particle->destinationBlend = blend; particle->SetColor(255, shade, shade); - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; const ParticleQuad quad = {false, 0.0f, 1.0f, static_cast(segment - 1) / 21.0f, static_cast(segment) / 21.0f, false, true}; particle->Render(quad); } diff --git a/Source/Contents/Effects/RichManKim.cpp b/Source/Contents/Effects/RichManKim.cpp index 27c9dd516..8fc565c67 100644 --- a/Source/Contents/Effects/RichManKim.cpp +++ b/Source/Contents/Effects/RichManKim.cpp @@ -25,16 +25,16 @@ void CRichManKim::Open() { } particle->SetTexture("effect\\pocket.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = 0; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 0; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 200; - particle->unknown_00C4 = 0; - particle->unknown_004C = 0; + particle->angleBits = 0; + particle->phaseParameter = 0; particle->scale = 1.0f; - *reinterpret_cast(particle->unknown_0058) = 0.0f; - particle->unknown_0054 = -5.0f - static_cast(rand() % 5); + *reinterpret_cast(particle->animationParameters) = 0.0f; + particle->animationParameter = -5.0f - static_cast(rand() % 5); particle->SetColor(200, 200, 200); InitParticleQuad(particle->vertices); this->angleIndex = rand() % 359; @@ -63,9 +63,9 @@ void CRichManKim::OnProcess() { index = 0; } - float& width = *reinterpret_cast(particle->unknown_0058); - const float height = static_cast(static_cast(particle->unknown_0054) - static_cast(g_cosTable[index]) * 0.08); - particle->unknown_0054 = height; + float& width = *reinterpret_cast(particle->animationParameters); + const float height = static_cast(static_cast(particle->animationParameter) - static_cast(g_cosTable[index]) * 0.08); + particle->animationParameter = height; const float stretch = static_cast(static_cast(g_cosTable[index]) * 0.003 + static_cast(width)); width = stretch; @@ -86,7 +86,7 @@ void CRichManKim::OnProcess() { particle->transform = transform; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/RotateBgEffect.cpp b/Source/Contents/Effects/RotateBgEffect.cpp index 1a876d0ef..a648862dc 100644 --- a/Source/Contents/Effects/RotateBgEffect.cpp +++ b/Source/Contents/Effects/RotateBgEffect.cpp @@ -32,19 +32,19 @@ void CRotateBgEffect::Open() { for (int index = 0; index < 10; ++index) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->SetTexture("effect\\storm2.tga"); particle->alpha = 0; particle->scale = 2.0f; particle->SetColor(50, 50, 255); - float* values = &particle->unknown_0054; + float* values = &particle->animationParameter; values[0] = 40.0f; values[1] = 30.0f; values[2] = 5.0f; - particle->unknown_004C = start; + particle->phaseParameter = start; this->particles.push_back(particle); } } @@ -56,16 +56,16 @@ void CRotateBgEffect::Open() { for (int index = 0; index < 21; ++index) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = layer; - particle->unknown_0008 = 2; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = layer; + particle->groupIndex = 2; particle->SetTexture("effect\\cloud11.tga"); - particle->unknown_0050 = 30; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); + particle->angleParameter = 30; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); particle->alpha = 0; - particle->unknown_004C = span; - particle->unknown_0054 = 28.0f - static_cast(layer) * 5.0f; + particle->phaseParameter = span; + particle->animationParameter = 28.0f - static_cast(layer) * 5.0f; particle->scale = 7.0f - static_cast(layer); this->segmentParticles.push_back(particle); } @@ -100,15 +100,15 @@ void CRotateBgEffect::OnProcess() { alpha = std::max(alpha, 0); particle->alpha = alpha; if (alpha > 0) { - const int index = particle->unknown_000C; - const float* values = &particle->unknown_0054; + const int index = particle->columnIndex; + const float* values = &particle->animationParameter; float height; if (index == 0) { this->height = -values[1]; this->radius = values[0]; const int step = std::max(rand() % 3, 0); - this->angle = (particle->unknown_004C + 3 + step) % 360; - particle->unknown_004C = this->angle; + this->angle = (particle->phaseParameter + 3 + step) % 360; + particle->phaseParameter = this->angle; height = this->height; } else { this->height = values[2] + this->height; @@ -139,7 +139,7 @@ void CRotateBgEffect::OnProcess() { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (auto it = this->segmentParticles.begin(); it != this->segmentParticles.end(); ++it) { @@ -148,32 +148,32 @@ void CRotateBgEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - if (particle->unknown_000C == 0) { - this->segmentAngle = static_cast(*reinterpret_cast(&particle->unknown_00C4)); - this->segmentSpan = particle->unknown_0050; + if (particle->columnIndex == 0) { + this->segmentAngle = static_cast(*reinterpret_cast(&particle->angleBits)); + this->segmentSpan = particle->angleParameter; this->segmentAlpha = particle->alpha; this->segmentScale = particle->scale; this->segmentReady = 1; } else if (!this->segmentReady) { - ++particle->unknown_00E8; + ++particle->elapsedFrames; continue; } this->segmentAngle += 5; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(this->segmentAngle % 360); + *reinterpret_cast(&particle->angleBits) = static_cast(this->segmentAngle % 360); this->segmentSpan += 3; if (this->segmentSpan > 180) { this->segmentSpan = 180; } - particle->unknown_0050 = this->segmentSpan; - if (particle->unknown_00E8 <= 12) { + particle->angleParameter = this->segmentSpan; + if (particle->elapsedFrames <= 12) { ++this->segmentAlpha; particle->alpha = this->segmentAlpha; } else { this->segmentScale += 0.1f; particle->scale = this->segmentScale; - if (particle->unknown_00E8 > 50) { + if (particle->elapsedFrames > 50) { if (--this->segmentAlpha < 0) { this->segmentAlpha = 0; } @@ -182,9 +182,9 @@ void CRotateBgEffect::OnProcess() { } } - const int index = particle->unknown_000C; - const int span = particle->unknown_0050; - const float rotation = *reinterpret_cast(&particle->unknown_00C4); + const int index = particle->columnIndex; + const int span = particle->angleParameter; + const float rotation = *reinterpret_cast(&particle->angleBits); int angle = static_cast(static_cast(static_cast(static_cast(span) / 21.0f) * index) + rotation) % 360; if (span == 360 && index == 20) { angle = static_cast(rotation); @@ -192,11 +192,11 @@ void CRotateBgEffect::OnProcess() { const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float tiltCosine = g_cosTable[tilt]; const float scale = particle->scale; const float innerX = scale * cosine; - const float innerY = -particle->unknown_0054; + const float innerY = -particle->animationParameter; const float innerZ = scale * sine; const float outerX = innerX + tiltCosine * cosine; const float outerY = innerY - g_sinTable[tilt]; @@ -224,7 +224,7 @@ void CRotateBgEffect::OnProcess() { this->lastOuter.z = outerZ; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -239,7 +239,7 @@ void CRotateBgEffect::Render() { for (auto it = this->segmentParticles.begin(); it != this->segmentParticles.end(); ++it) { if (CParticle* particle = *it) { - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/RotateItemEffect.cpp b/Source/Contents/Effects/RotateItemEffect.cpp index 168553631..e5f6a692c 100644 --- a/Source/Contents/Effects/RotateItemEffect.cpp +++ b/Source/Contents/Effects/RotateItemEffect.cpp @@ -35,17 +35,17 @@ void CRotateItemEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("유저인터페이스\\item\\쿠나이_독.bmp"); particle->scale = 2.5f; particle->SetColor(255, 200, 255); - *reinterpret_cast(&particle->unknown_00C4) = 360.0f; - particle->unknown_00C0 = 0.4f; + *reinterpret_cast(&particle->angleBits) = 360.0f; + particle->speedParameter = 0.4f; particle->alpha = 255; - particle->unknown_0054 = 13.0f; + particle->animationParameter = 13.0f; particle->destinationBlend = 6; this->particles.push_back(particle); } @@ -66,25 +66,25 @@ void CRotateItemEffect::OnProcess() { (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { if (this->frame >= 5) { - float& particleAngle = *reinterpret_cast(&particle->unknown_00C4); - if (particle->unknown_000C == 0) { - particleAngle = static_cast(static_cast(particle->unknown_00C0 * 45.0f + particleAngle) % 360); + float& particleAngle = *reinterpret_cast(&particle->angleBits); + if (particle->columnIndex == 0) { + particleAngle = static_cast(static_cast(particle->speedParameter * 45.0f + particleAngle) % 360); if (this->id != 984) { if (CRenderObject* object = FindRenderObject(this->actor)) { - object->render.angle = static_cast(static_cast(particle->unknown_00C0 * 45.0f + object->render.angle) % 360); + object->render.angle = static_cast(static_cast(particle->speedParameter * 45.0f + object->render.angle) % 360); } } } else { - this->alpha -= particle->unknown_000C == 1 ? 150 : 25; + this->alpha -= particle->columnIndex == 1 ? 150 : 25; particle->alpha = this->alpha; particleAngle = this->angle; } const int index = static_cast(particleAngle); - const float radius = particle->unknown_0054; - particle->unknown_00D0 = radius * g_cosTable[index]; - particle->unknown_00D4 = -8.0f; - particle->unknown_00D8 = radius * g_sinTable[index]; + const float radius = particle->animationParameter; + particle->offsetX = radius * g_cosTable[index]; + particle->offsetY = -8.0f; + particle->offsetZ = radius * g_sinTable[index]; this->angle = static_cast(static_cast(particleAngle - 5.0f) % 360); this->alpha = particle->alpha; if (particle->alpha > 0) { @@ -98,7 +98,7 @@ void CRotateItemEffect::OnProcess() { scale.SetScale(particle->scale, particle->scale, 1.0f); matrix translate; std::memcpy(translate.values, g_identityMatrix, sizeof(translate.values)); - translate.MakeTranslate(particle->unknown_00D0, particle->unknown_00D4, particle->unknown_00D8); + translate.MakeTranslate(particle->offsetX, particle->offsetY, particle->offsetZ); matrix first; first.Compose(scale, rotation); matrix result; @@ -107,7 +107,7 @@ void CRotateItemEffect::OnProcess() { } } } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } diff --git a/Source/Contents/Effects/RotateLineEffect.cpp b/Source/Contents/Effects/RotateLineEffect.cpp index 18615fa77..fd0b71a7f 100644 --- a/Source/Contents/Effects/RotateLineEffect.cpp +++ b/Source/Contents/Effects/RotateLineEffect.cpp @@ -35,18 +35,18 @@ void CRotateLineEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->SetTexture("effect\\cloud11.tga"); - particle->unknown_0050 = 30; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(startAngle); + particle->angleParameter = 30; + *reinterpret_cast(&particle->angleBits) = static_cast(startAngle); particle->alpha = 50; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->scale = 7.0f - static_cast(ring); - particle->unknown_0054 = 28.0f - static_cast(ring) * 5.0f; - *reinterpret_cast(particle->unknown_0058) = 3.0f; + particle->animationParameter = 28.0f - static_cast(ring) * 5.0f; + *reinterpret_cast(particle->animationParameters) = 3.0f; switch (this->id) { case EF_ROTATE_LINE_GRAY: particle->SetColor(50, 50, 50); @@ -78,16 +78,16 @@ void CRotateLineEffect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - float& particleAngle = *reinterpret_cast(&particle->unknown_00C4); - int& particleSpread = particle->unknown_0050; - if (particle->unknown_000C == 0) { + float& particleAngle = *reinterpret_cast(&particle->angleBits); + int& particleSpread = particle->angleParameter; + if (particle->columnIndex == 0) { this->angle = static_cast(particleAngle); this->spread = particleSpread; this->alpha = particle->alpha; this->scale = particle->scale; this->started = true; } else if (!this->started) { - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; continue; } @@ -99,12 +99,12 @@ void CRotateLineEffect::OnProcess() { } particleSpread = this->spread; - if (particle->unknown_00E8 <= 12) { + if (particle->elapsedFrames <= 12) { particle->alpha = ++this->alpha; } else { this->scale += 0.1f; particle->scale = this->scale; - if (particle->unknown_00E8 > 50) { + if (particle->elapsedFrames > 50) { if (--this->alpha < 0) { this->alpha = 0; } @@ -112,7 +112,7 @@ void CRotateLineEffect::OnProcess() { } } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; int index = static_cast(static_cast(static_cast(particleSpread / 21.0f) * segment) + particleAngle) % 360; if (particleSpread == 360 && segment == 20) { index = static_cast(particleAngle); @@ -120,12 +120,12 @@ void CRotateLineEffect::OnProcess() { const float cosine = g_cosTable[index]; const float sine = g_sinTable[index]; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float tiltCosine = g_cosTable[tilt]; vector3d points[2] = {}; - const float height = *reinterpret_cast(particle->unknown_0058); + const float height = *reinterpret_cast(particle->animationParameters); points[0].x = cosine * particle->scale; - points[0].y = -particle->unknown_0054; + points[0].y = -particle->animationParameter; points[0].z = sine * particle->scale; points[1].x = points[0].x + tiltCosine * cosine; points[1].y = height - g_sinTable[tilt] + points[0].y; @@ -148,7 +148,7 @@ void CRotateLineEffect::OnProcess() { this->previous[0] = points[0]; this->previous[1] = points[1]; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -157,7 +157,7 @@ void CRotateLineEffect::OnProcess() { void CRotateLineEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { if (CParticle* particle = *it) { - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/SaintCastingEffect.cpp b/Source/Contents/Effects/SaintCastingEffect.cpp index 743565fde..8db32322c 100644 --- a/Source/Contents/Effects/SaintCastingEffect.cpp +++ b/Source/Contents/Effects/SaintCastingEffect.cpp @@ -20,27 +20,27 @@ void CSaintCastingEffect::AddRing(const char* texture, int alpha) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->SetTexture(texture); particle->alpha = alpha; - particle->unknown_0050 = 360; + particle->angleParameter = 360; particle->scale = 4.1f; - particle->unknown_004C = 80; - particle->unknown_0054 = 0.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast((particle->unknown_0010 + 2) * 90 % 360); + particle->phaseParameter = 80; + particle->animationParameter = 0.0f; + *reinterpret_cast(&particle->angleBits) = static_cast((particle->rowIndex + 2) * 90 % 360); switch (this->id) { case EF_COUPLECASTING: - particle->alpha += (3 - particle->unknown_0010) * 45; - particle->unknown_00C0 = 20.0f - static_cast(particle->unknown_0010); + particle->alpha += (3 - particle->rowIndex) * 45; + particle->speedParameter = 20.0f - static_cast(particle->rowIndex); break; case EF_AURABLADE: particle->alpha = 0; - particle->unknown_00E8 = -5 * particle->unknown_0010; - particle->unknown_00C0 = 15.0f - static_cast(particle->unknown_0010); + particle->elapsedFrames = -5 * particle->rowIndex; + particle->speedParameter = 15.0f - static_cast(particle->rowIndex); break; case EF_BEGINSPELL: case EF_BEGINSPELL6: @@ -50,8 +50,8 @@ void CSaintCastingEffect::AddRing(const char* texture, int alpha) { case EF_DARKCASTING2: case EF_GREENCASTING: particle->alpha = 0; - particle->unknown_00E8 = -5 * particle->unknown_0010; - particle->unknown_00C0 = 20.0f - static_cast(particle->unknown_0010); + particle->elapsedFrames = -5 * particle->rowIndex; + particle->speedParameter = 20.0f - static_cast(particle->rowIndex); break; } @@ -142,17 +142,17 @@ void CSaintCastingEffect::Open() { switch (this->id) { case EF_BEGINSPELL: case EF_BEGINSPELL6: - this->unknown_002C = 56; + this->effectLifetime = 56; break; case EF_COUPLECASTING: - this->unknown_002C = 1000; + this->effectLifetime = 1000; break; case EF_AURABLADE: case EF_DARKCASTING: case EF_HOMUNCASTING: case EF_DARKCASTING2: case EF_GREENCASTING: - this->unknown_002C = 60; + this->effectLifetime = 60; break; } } @@ -172,8 +172,8 @@ void CSaintCastingEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; - if (particle && particle->unknown_00E8 > 0) { - const int previousTilt = particle->unknown_004C - 1; + if (particle && particle->elapsedFrames > 0) { + const int previousTilt = particle->phaseParameter - 1; float scale = particle->scale + 0.07f; int tilt = previousTilt < 10 ? 10 : previousTilt; int alpha = previousTilt >= 10 ? particle->alpha : 0; @@ -184,7 +184,7 @@ void CSaintCastingEffect::OnProcess() { alpha -= 3; if (alpha <= 0) { alpha = 0; - if (particle->unknown_00E8 < this->unknown_002C - 30) { + if (particle->elapsedFrames < this->effectLifetime - 30) { tilt = this->id == EF_AURABLADE ? 64 : 74; scale = 3.37f; } @@ -192,19 +192,19 @@ void CSaintCastingEffect::OnProcess() { } particle->scale = scale; - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; particle->alpha = alpha; - const int ring = particle->unknown_0010; - const int wave = ring < 2 ? ring * 90 + particle->unknown_00E8 : (ring * 45 + particle->unknown_00E8) * 2; - const int segment = particle->unknown_000C; + const int ring = particle->rowIndex; + const int wave = ring < 2 ? ring * 90 + particle->elapsedFrames : (ring * 45 + particle->elapsedFrames) * 2; + const int segment = particle->columnIndex; const float radius = - particle->unknown_00C0 * g_sinTable[segment * 9] * 0.3f * g_sinTable[wave % 360] + particle->unknown_00C0; + particle->speedParameter * g_sinTable[segment * 9] * 0.3f * g_sinTable[wave % 360] + particle->speedParameter; const float height = radius * g_sinTable[tilt]; const float spread = radius * g_cosTable[tilt]; const int angle = - static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * segment) + - *reinterpret_cast(&particle->unknown_00C4)) % + static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * segment) + + *reinterpret_cast(&particle->angleBits)) % 360; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; @@ -232,7 +232,7 @@ void CSaintCastingEffect::OnProcess() { this->lastOuter = outer; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -241,7 +241,7 @@ void CSaintCastingEffect::OnProcess() { void CSaintCastingEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_000C <= 0) { + if (!particle || particle->columnIndex <= 0) { continue; } @@ -249,7 +249,7 @@ void CSaintCastingEffect::Render() { particle->destinationBlend = 6; } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/ScatterEffect.cpp b/Source/Contents/Effects/ScatterEffect.cpp index 611da596b..58fc310a4 100644 --- a/Source/Contents/Effects/ScatterEffect.cpp +++ b/Source/Contents/Effects/ScatterEffect.cpp @@ -32,23 +32,23 @@ void CScatterEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; if (this->id == 1002) { - this->unknown_002C = 300; + this->effectLifetime = 300; particle->SetSprite("이팩트\\sakura01.spr"); particle->SetAction("이팩트\\sakura01.act"); particle->scale = static_cast(std::max(0, rand() % 6) + 22) / 70.0f; particle->frameDelay = static_cast(std::max(0, rand() % 3) + 2) * 0.15f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(0, rand() % 360)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(0, rand() % 360)); const int angle = std::max(0, rand() % 360); particle->velocity.x = 0.0f; particle->velocity.y = 0.0f; particle->velocity.z = 0.0f; particle->alpha = 250; - particle->unknown_004C = angle; + particle->phaseParameter = angle; particle->destinationBlend = 6; } @@ -75,7 +75,7 @@ void CScatterEffect::OnProcess() { particle->alpha = 0; } - const int angle = particle->unknown_004C; + const int angle = particle->phaseParameter; particle->velocity.y += particle->frameDelay; particle->velocity.x += g_cosTable[angle] * 0.2f; particle->velocity.z += g_sinTable[angle] * 0.2f; @@ -85,7 +85,7 @@ void CScatterEffect::OnProcess() { translate.MakeTranslate(particle->velocity.x + 0.0f, particle->velocity.y - 40.0f, particle->velocity.z + 0.0f); particle->transform = translate; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } diff --git a/Source/Contents/Effects/ShadowExceedEffect.cpp b/Source/Contents/Effects/ShadowExceedEffect.cpp index b470c3f36..e109ea06b 100644 --- a/Source/Contents/Effects/ShadowExceedEffect.cpp +++ b/Source/Contents/Effects/ShadowExceedEffect.cpp @@ -15,7 +15,7 @@ // OFFSET: 0x00727CF0 // FUNCTION: fn_07427 -CShadowExceed::CShadowExceed() : CEffect(1867), unknown_00D8(0) { +CShadowExceed::CShadowExceed() : CEffect(1867), finishSpawned(0) { } // OFFSET: 0x00727E60 @@ -37,7 +37,7 @@ void CShadowExceed::Close() { // OFFSET: 0x00727FC0 // FUNCTION: fn_07431 void CShadowExceed::Open() { - this->unknown_00D8 = 0; + this->finishSpawned = 0; CRenderObject* actor = FindRenderObject(this->actor); if (!actor) { @@ -73,9 +73,9 @@ void CShadowExceed::Open() { const float offsetX = 0.3f - ClientSine(static_cast(actor->render.angle)) * 5.0f; for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { if (*it) { - (*it)->unknown_00D0 = offsetX; - (*it)->unknown_00D4 = offsetY; - (*it)->unknown_00D8 = 0.0f; + (*it)->offsetX = offsetX; + (*it)->offsetY = offsetY; + (*it)->offsetZ = 0.0f; } } @@ -93,16 +93,16 @@ bool CShadowExceed::IsAlive() { void CShadowExceed::OnProcess() { for (auto it = this->emitters.begin(); it != this->emitters.end();) { CEZ2STRParticle* emitter = *it; - if (emitter->life == 0.0f || emitter->life * 60.0f > static_cast(emitter->unknown_00E8)) { + if (emitter->life == 0.0f || emitter->life * 60.0f > static_cast(emitter->elapsedFrames)) { if (emitter) { const float x = this->position[0]; const float y = this->position[1]; const float z = this->position[2]; const float* view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values; const float* inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse.values; - const float viewX = view[0] * x + view[3] * y + view[6] * z + view[9] + emitter->unknown_00D0; - const float viewY = view[1] * x + view[4] * y + view[7] * z + view[10] + emitter->unknown_00D4; - const float viewZ = view[2] * x + view[5] * y + view[8] * z + view[11] + emitter->unknown_00D8; + const float viewX = view[0] * x + view[3] * y + view[6] * z + view[9] + emitter->offsetX; + const float viewY = view[1] * x + view[4] * y + view[7] * z + view[10] + emitter->offsetY; + const float viewZ = view[2] * x + view[5] * y + view[8] * z + view[11] + emitter->offsetZ; emitter->position.x = viewY * inverse[3] + viewX * inverse[0] + viewZ * inverse[6] + inverse[9]; emitter->position.y = viewY * inverse[4] + viewX * inverse[1] + viewZ * inverse[7] + inverse[10]; emitter->position.z = viewY * inverse[5] + viewX * inverse[2] + viewZ * inverse[8] + inverse[11]; @@ -115,8 +115,8 @@ void CShadowExceed::OnProcess() { } } - if (this->emitters.empty() && !this->unknown_00D8) { - this->unknown_00D8 = 1; + if (this->emitters.empty() && !this->finishSpawned) { + this->finishSpawned = 1; CRenderObject* actor = FindRenderObject(this->actor); if (actor) { while (static_cast(actor)->HasId(1004) == true) { diff --git a/Source/Contents/Effects/ShadowExceedEffect.h b/Source/Contents/Effects/ShadowExceedEffect.h index 5671ed449..1f0d2cd55 100644 --- a/Source/Contents/Effects/ShadowExceedEffect.h +++ b/Source/Contents/Effects/ShadowExceedEffect.h @@ -18,12 +18,12 @@ public: bool IsAlive() override; /* 00CC */ std::vector emitters; - /* 00D8 */ unsigned char unknown_00D8; + /* 00D8 */ unsigned char finishSpawned; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CShadowExceed) == 0xDC); -static_assert(offsetof(CShadowExceed, unknown_00D8) == 0xD8); +static_assert(offsetof(CShadowExceed, finishSpawned) == 0xD8); #endif #endif diff --git a/Source/Contents/Effects/ShadowExceedNewEffect.cpp b/Source/Contents/Effects/ShadowExceedNewEffect.cpp index eb03b1ab8..38f2a417e 100644 --- a/Source/Contents/Effects/ShadowExceedNewEffect.cpp +++ b/Source/Contents/Effects/ShadowExceedNewEffect.cpp @@ -36,9 +36,9 @@ void CShadowExceedNew::Open() { CEZ2STRParticle* emitter = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (emitter) { emitter->Load(std::string("SHADOW_CROSS\\SHC_SHADOW_EXCEED\\shadow_exceed\\shadow_exceed_f_shadow_bottom.str")); - emitter->unknown_00D0 = 0.0f; - emitter->unknown_00D4 = -12.0f; - emitter->unknown_00D8 = 0.0f; + emitter->offsetX = 0.0f; + emitter->offsetY = -12.0f; + emitter->offsetZ = 0.0f; emitter->m_scale = 0.14f; this->frontEmitters.push_back(emitter); } @@ -46,9 +46,9 @@ void CShadowExceedNew::Open() { emitter = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (emitter) { emitter->Load(std::string("SHADOW_CROSS\\SHC_SHADOW_EXCEED\\shadow_exceed\\shadow_exceed_f_shadow.str")); - emitter->unknown_00D0 = 0.0f; - emitter->unknown_00D4 = -10.0f; - emitter->unknown_00D8 = 0.0f; + emitter->offsetX = 0.0f; + emitter->offsetY = -10.0f; + emitter->offsetZ = 0.0f; emitter->m_scale = 0.14f; this->frontEmitters.push_back(emitter); } @@ -56,9 +56,9 @@ void CShadowExceedNew::Open() { emitter = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (emitter) { emitter->Load(std::string("SHADOW_CROSS\\SHC_SHADOW_EXCEED\\shadow_exceed\\shadow_exceed_b_shadow_bottom.str")); - emitter->unknown_00D0 = 0.0f; - emitter->unknown_00D4 = -12.0f; - emitter->unknown_00D8 = 0.0f; + emitter->offsetX = 0.0f; + emitter->offsetY = -12.0f; + emitter->offsetZ = 0.0f; emitter->m_scale = 0.14f; emitter->depthOffset = 0.0003f; this->backEmitters.push_back(emitter); @@ -67,9 +67,9 @@ void CShadowExceedNew::Open() { emitter = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); if (emitter) { emitter->Load(std::string("SHADOW_CROSS\\SHC_SHADOW_EXCEED\\shadow_exceed\\shadow_exceed_b_shadow.str")); - emitter->unknown_00D0 = 0.0f; - emitter->unknown_00D4 = -10.0f; - emitter->unknown_00D8 = 0.0f; + emitter->offsetX = 0.0f; + emitter->offsetY = -10.0f; + emitter->offsetZ = 0.0f; emitter->m_scale = 0.14f; emitter->depthOffset = 0.0003f; this->backEmitters.push_back(emitter); @@ -106,13 +106,13 @@ void CShadowExceedNew::OnProcess() { const float z = cosine * 5.0f + actor->render.position.z; const float x = -sine * 5.0f + actor->render.position.x; const int direction = actor->render.previousAnimation % 8; - this->unknown_00CC = static_cast(direction - 2) < 4; + this->drawBackEmitters = static_cast(direction - 2) < 4; for (auto it = this->frontEmitters.begin(); it != this->frontEmitters.end();) { CEZ2STRParticle* emitter = *it; - emitter->position.x = x + emitter->unknown_00D0; - emitter->position.y = y + emitter->unknown_00D4; - emitter->position.z = z + emitter->unknown_00D8; + emitter->position.x = x + emitter->offsetX; + emitter->position.y = y + emitter->offsetY; + emitter->position.z = z + emitter->offsetZ; emitter->m_flipX = direction == 0 || direction == 1; if (!emitter->Process(0.0f, 0.0f, 0.0f)) { FreeParticle(*it); @@ -124,9 +124,9 @@ void CShadowExceedNew::OnProcess() { for (auto it = this->backEmitters.begin(); it != this->backEmitters.end();) { CEZ2STRParticle* emitter = *it; - emitter->position.x = x + emitter->unknown_00D0; - emitter->position.y = y + emitter->unknown_00D4; - emitter->position.z = z + emitter->unknown_00D8; + emitter->position.x = x + emitter->offsetX; + emitter->position.y = y + emitter->offsetY; + emitter->position.z = z + emitter->offsetZ; emitter->m_flipX = direction == 4 || direction == 5; if (!emitter->Process(0.0f, 0.0f, 0.0f)) { FreeParticle(*it); @@ -140,7 +140,7 @@ void CShadowExceedNew::OnProcess() { // OFFSET: 0x00729280 // FUNCTION: fn_07438 void CShadowExceedNew::Render() { - if (!this->unknown_00CC) { + if (!this->drawBackEmitters) { for (auto it = this->frontEmitters.begin(); it != this->frontEmitters.end(); ++it) { (*it)->DrawBillboards(static_cast(g_modeMgr.GetGameMode())->camera->frame.view); } diff --git a/Source/Contents/Effects/SkillEffects.h b/Source/Contents/Effects/SkillEffects.h index 4b7736470..fc1dbac9c 100644 --- a/Source/Contents/Effects/SkillEffects.h +++ b/Source/Contents/Effects/SkillEffects.h @@ -12,7 +12,7 @@ class CParticle; class CMeteorEffect : public CEffect { public: - CMeteorEffect() : CEffect(-1), unknown_00D8(12), unknown_00DC(0) {} + CMeteorEffect() : CEffect(-1), quakeFrameLow(12), quakeFrameHigh(0) {} void Open() override; void OnProcess() override; @@ -21,14 +21,14 @@ public: bool IsAlive() override; ~CMeteorEffect() override; - /* 00CC */ std::vector unknown_00CC; - /* 00D8 */ int unknown_00D8; - /* 00DC */ int unknown_00DC; + /* 00CC */ std::vector particles; + /* 00D8 */ int quakeFrameLow; + /* 00DC */ int quakeFrameHigh; }; class CShadowExceedNew : public CEffect { public: - CShadowExceedNew() : CEffect(2467), unknown_00CC(0) {} + CShadowExceedNew() : CEffect(2467), drawBackEmitters(0) {} void Open() override; void OnProcess() override; @@ -37,7 +37,7 @@ public: bool IsAlive() override; ~CShadowExceedNew() override; - /* 00CC */ unsigned char unknown_00CC; + /* 00CC */ unsigned char drawBackEmitters; /* 00D0 */ std::list frontEmitters; /* 00D8 */ std::list backEmitters; }; @@ -45,9 +45,9 @@ public: class CSprArrowEffect : public CEffect { public: CSprArrowEffect() - : CEffect(2404), unknown_00CC(0), unknown_00D0(0), unknown_00D4(0), unknown_00D8(0), unknown_00DC(0), unknown_00E0(0), - unknown_00E4(0), unknown_00E8(0), unknown_00EC(1.0f), unknown_00F0(0), unknown_00F4(0), unknown_00F8(0), unknown_00FC(0), - unknown_00FD(1) {} + : CEffect(2404), spriteParticle(0), startTick(0), startX(0), startY(0), startZ(0), velocityX(0), + velocityY(0), velocityZ(0), travelSpeedScale(1.0f), heading(0), delayFrames(0), spriteFrame(0), launched(0), + alive(1) {} void Open() override; void OnProcess() override; @@ -56,29 +56,29 @@ public: bool IsAlive() override; ~CSprArrowEffect() override; void SetBulletSprite(int job); - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; - /* 00D4 */ float unknown_00D4; - /* 00D8 */ float unknown_00D8; - /* 00DC */ float unknown_00DC; - /* 00E0 */ float unknown_00E0; - /* 00E4 */ float unknown_00E4; - /* 00E8 */ float unknown_00E8; - /* 00EC */ float unknown_00EC; - /* 00F0 */ float unknown_00F0; - /* 00F4 */ float unknown_00F4; - /* 00F8 */ int unknown_00F8; - /* 00FC */ unsigned char unknown_00FC; - /* 00FD */ bool unknown_00FD; + /* 00CC */ int spriteParticle; + /* 00D0 */ int startTick; + /* 00D4 */ float startX; + /* 00D8 */ float startY; + /* 00DC */ float startZ; + /* 00E0 */ float velocityX; + /* 00E4 */ float velocityY; + /* 00E8 */ float velocityZ; + /* 00EC */ float travelSpeedScale; + /* 00F0 */ float heading; + /* 00F4 */ float delayFrames; + /* 00F8 */ int spriteFrame; + /* 00FC */ unsigned char launched; + /* 00FD */ bool alive; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CMeteorEffect) == 0xE0); -static_assert(offsetof(CMeteorEffect, unknown_00D8) == 0xD8); +static_assert(offsetof(CMeteorEffect, quakeFrameLow) == 0xD8); static_assert(sizeof(CShadowExceedNew) == 0xE0); static_assert(offsetof(CShadowExceedNew, backEmitters) == 0xD8); static_assert(sizeof(CSprArrowEffect) == 0x100); -static_assert(offsetof(CSprArrowEffect, unknown_00FD) == 0xFD); +static_assert(offsetof(CSprArrowEffect, alive) == 0xFD); #endif #endif diff --git a/Source/Contents/Effects/SmokeEffect.cpp b/Source/Contents/Effects/SmokeEffect.cpp index 1aff8c867..7715bf7ca 100644 --- a/Source/Contents/Effects/SmokeEffect.cpp +++ b/Source/Contents/Effects/SmokeEffect.cpp @@ -29,10 +29,10 @@ void CSmokeEffect::Open() { for (int i = 0; i < 4; ++i) { CSpriteParticle* particle = static_cast(CreateSpriteParticle(reinterpret_cast(this->position), 1)); if (particle) { - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; this->particles.push_back(particle); } } @@ -52,17 +52,17 @@ void CSmokeEffect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CSpriteParticle* particle = *it) { - matrix& rotation = *reinterpret_cast(particle->unknown_0198); - float& angle = *reinterpret_cast(&particle->unknown_00C4); - float& spin = *reinterpret_cast(&particle->unknown_02D4); - if (particle->unknown_00E8 < 50) { + matrix& rotation = *reinterpret_cast(particle->rotationStorage); + float& angle = *reinterpret_cast(&particle->angleBits); + float& spin = *reinterpret_cast(&particle->spinBits); + if (particle->elapsedFrames < 50) { const float speed = particle->frameDelay; const float* values = rotation.values; particle->velocity.x += values[3] * 0.0f + values[0] * 0.0f + speed * values[6] + values[9]; particle->velocity.y += values[4] * 0.0f + values[1] * 0.0f + speed * values[7] + values[10]; particle->velocity.z += values[5] * 0.0f + values[2] * 0.0f + speed * values[8] + values[11]; angle += spin; - if (particle->unknown_00E8 > 34) { + if (particle->elapsedFrames > 34) { particle->alpha = std::max(particle->alpha - 15, 0); } } else { @@ -71,7 +71,7 @@ void CSmokeEffect::OnProcess() { particle->scale = 1.5f; spin = 0.75f; particle->frameDelay = static_cast(std::max(0, rand() % 3) + 3) / 10.0f; - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; particle->velocity.x = 0.0f; particle->velocity.y = 0.0f; particle->velocity.z = 0.0f; @@ -88,7 +88,7 @@ void CSmokeEffect::OnProcess() { translate.MakeTranslate(particle->velocity.x + 0.0f, particle->velocity.y - 9.0f, particle->velocity.z + 0.0f); particle->transform = translate; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -96,7 +96,7 @@ void CSmokeEffect::OnProcess() { // FUNCTION: fn_19180 void CSmokeEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { - if (*it && (*it)->unknown_000C < this->visibleCount) { + if (*it && (*it)->columnIndex < this->visibleCount) { (*it)->Draw(1); } } diff --git a/Source/Contents/Effects/SoulCollectEffect.cpp b/Source/Contents/Effects/SoulCollectEffect.cpp index e243f69e6..af9ec9322 100644 --- a/Source/Contents/Effects/SoulCollectEffect.cpp +++ b/Source/Contents/Effects/SoulCollectEffect.cpp @@ -14,7 +14,7 @@ // OFFSET: 0x0072A210 // FUNCTION: fn_07455 CSoulCollectEffect::CSoulCollectEffect() : CEffect(-1) { - this->unknown_0050 = 0; + this->rotationParameter = 0; } // OFFSET: 0x0072A2A0 @@ -34,14 +34,14 @@ void CSoulCollectEffect::Close() { // OFFSET: 0x0072A5F0 // FUNCTION: fn_07460 void CSoulCollectEffect::Open() { - const int count = this->unknown_00B0; + const int count = this->effectLevel; if (count < 0) { return; } const int current = static_cast(this->particles.size() / 2); if (current < count) { - for (int index = 0; index < this->unknown_00B0 - current; ++index) { + for (int index = 0; index < this->effectLevel - current; ++index) { for (int layer = 0; layer < 2; ++layer) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (!particle) { @@ -49,10 +49,10 @@ void CSoulCollectEffect::Open() { } particle->SetTexture("effect\\soul_collect\\soul_collect.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = static_cast(this->particles.size() / 2); - particle->unknown_0010 = layer; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = static_cast(this->particles.size() / 2); + particle->rowIndex = layer; + particle->groupIndex = 1; particle->alpha = 0; if (layer == 0) { particle->depthOffset = 0.00001f; @@ -64,7 +64,7 @@ void CSoulCollectEffect::Open() { } } } else if (current > count) { - for (int index = 0; index < current - this->unknown_00B0; ++index) { + for (int index = 0; index < current - this->effectLevel; ++index) { if (this->particles.size() != 0) { for (int layer = 0; layer < 2; ++layer) { FreeParticle(this->particles.back()); @@ -84,7 +84,7 @@ bool CSoulCollectEffect::IsAlive() { // OFFSET: 0x0072A800 // FUNCTION: fn_07463 void CSoulCollectEffect::OnProcess() { - float& rotation = reinterpret_cast(this->unknown_0050); + float& rotation = reinterpret_cast(this->rotationParameter); for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; @@ -93,7 +93,7 @@ void CSoulCollectEffect::OnProcess() { } const unsigned int pairs = this->particles.size() / 2; - const int index = particle->unknown_000C; + const int index = particle->columnIndex; if (index < static_cast(pairs - 5)) { particle->alpha = 0; continue; @@ -124,7 +124,7 @@ void CSoulCollectEffect::OnProcess() { break; } - if (particle->unknown_0010 == 1) { + if (particle->rowIndex == 1) { particle->scale *= 0.5f; particle->SetColor(255, 255, 255); maxAlpha = 255; diff --git a/Source/Contents/Effects/SoulUnityEffect.cpp b/Source/Contents/Effects/SoulUnityEffect.cpp index c90435b92..8ba6b9c39 100644 --- a/Source/Contents/Effects/SoulUnityEffect.cpp +++ b/Source/Contents/Effects/SoulUnityEffect.cpp @@ -35,10 +35,10 @@ void CSoulUnityEffect::Open() { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 0); if (particle) { particle->SetTexture("effect\\soul_unity\\soul_unity.bmp"); - particle->unknown_0004 = this->id; - particle->unknown_000C = 1; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 1; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->scale = 2.5f; particle->depthOffset = 0.035f; InitParticleQuad(particle->vertices); @@ -63,7 +63,7 @@ void CSoulUnityEffect::OnProcess() { float height = -15.0f; CGameActor* actor = static_cast(FindRenderObject(this->actor)); - if (actor && actor->unknown_02CC) { + if (actor && actor->isRiding) { height = -20.0f; } diff --git a/Source/Contents/Effects/SphereWind2Effect.cpp b/Source/Contents/Effects/SphereWind2Effect.cpp index 38a28cab0..2e4d27868 100644 --- a/Source/Contents/Effects/SphereWind2Effect.cpp +++ b/Source/Contents/Effects/SphereWind2Effect.cpp @@ -40,19 +40,19 @@ void CSphereWind2Effect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = part; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; - particle->unknown_00E8 = delay; - particle->unknown_00C0 = radius; + particle->effectId = this->id; + particle->columnIndex = part; + particle->rowIndex = ring; + particle->groupIndex = 1; + particle->elapsedFrames = delay; + particle->speedParameter = radius; particle->scale = 5.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(rotation); - particle->unknown_004C = angle; + *reinterpret_cast(&particle->angleBits) = static_cast(rotation); + particle->phaseParameter = angle; particle->alpha = 0; - particle->unknown_0050 = step; - particle->unknown_0054 = -10.0f; - *reinterpret_cast(particle->unknown_0058) = static_cast(speed); + particle->angleParameter = step; + particle->animationParameter = -10.0f; + *reinterpret_cast(particle->animationParameters) = static_cast(speed); particle->SetTexture("effect\\fire_ivy.bmp"); particle->SetColor(255, 89, 182); InitParticleQuad(particle->vertices); @@ -66,7 +66,7 @@ void CSphereWind2Effect::Open() { CWorld* world = static_cast(g_modeMgr.GetGameMode())->scene; const vector3d& player = reinterpret_cast(world->player)->render.position; g_soundMgr->PlayWave("effect\\EF_Blessing.wav", this->position[0] - player.x, 0.0f, this->position[2] - player.z, 250, 40, 1.0f, 0); - this->unknown_002C = 200; + this->effectLifetime = 200; } // OFFSET: 0x00B775E0 @@ -83,11 +83,11 @@ void CSphereWind2Effect::OnProcess() { (*it)->position.y = this->position[1]; (*it)->position.z = this->position[2]; if (CParticle* particle = *it) { - if (particle->unknown_00E8 > 0) { + if (particle->elapsedFrames > 0) { int alpha = particle->alpha; - if (particle->unknown_00E8 <= 25) { + if (particle->elapsedFrames <= 25) { alpha += 2; - } else if (particle->unknown_00E8 > 70) { + } else if (particle->elapsedFrames > 70) { alpha -= 2; } @@ -95,25 +95,25 @@ void CSphereWind2Effect::OnProcess() { particle->alpha = alpha < 0 ? 0 : alpha; particle->scale = scale; - const int oldAngle = particle->unknown_004C; - particle->unknown_004C = oldAngle + (oldAngle + 1 < 360 ? 1 : -359); - const int angle = particle->unknown_004C; + const int oldAngle = particle->phaseParameter; + particle->phaseParameter = oldAngle + (oldAngle + 1 < 360 ? 1 : -359); + const int angle = particle->phaseParameter; - const int texPart = particle->unknown_000C; - float& spin = *reinterpret_cast(&particle->unknown_00C4); - float rotation = *reinterpret_cast(particle->unknown_0058) + spin; + const int texPart = particle->columnIndex; + float& spin = *reinterpret_cast(&particle->angleBits); + float rotation = *reinterpret_cast(particle->animationParameters) + spin; if (rotation >= 360.0f) { rotation -= 360.0f; } spin = rotation; - const int step = static_cast(static_cast(particle->unknown_0050) / 20.0f); + const int step = static_cast(static_cast(particle->angleParameter) / 20.0f); const int pitch = static_cast(static_cast(step * texPart) + rotation) % 360; - const float radius = particle->unknown_00C0; + const float radius = particle->speedParameter; const vector3d center = {scale * g_cosTable[angle] * g_cosTable[pitch], scale * g_sinTable[angle] * g_cosTable[pitch], scale * g_sinTable[pitch]}; const vector3d side = {-g_sinTable[angle] * radius, radius * g_cosTable[angle], 0.0f}; - const vector3d offset = {0.0f, particle->unknown_0054, 0.0f}; + const vector3d offset = {0.0f, particle->animationParameter, 0.0f}; const vector3d inner = {center.x - side.x + offset.x, center.y - side.y + offset.y, center.z - side.z + offset.z}; const vector3d outer = {center.x + side.x + offset.x, center.y + side.y + offset.y, center.z + side.z + offset.z}; @@ -137,7 +137,7 @@ void CSphereWind2Effect::OnProcess() { this->lastOuter = outer; } } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } @@ -146,8 +146,8 @@ void CSphereWind2Effect::OnProcess() { void CSphereWind2Effect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (particle && particle->unknown_00E8 > 0 && particle->unknown_000C > 0) { - const int texPart = particle->unknown_000C; + if (particle && particle->elapsedFrames > 0 && particle->columnIndex > 0) { + const int texPart = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/SphereWindEffect.cpp b/Source/Contents/Effects/SphereWindEffect.cpp index 72ca999d6..d85ab84e5 100644 --- a/Source/Contents/Effects/SphereWindEffect.cpp +++ b/Source/Contents/Effects/SphereWindEffect.cpp @@ -39,18 +39,18 @@ void CSphereWindEffect::Open() { continue; } - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0004 = this->id; - particle->unknown_0008 = 1; - particle->unknown_00C0 = radius; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->effectId = this->id; + particle->groupIndex = 1; + particle->speedParameter = radius; particle->scale = 14.0f; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(rotation); - particle->unknown_004C = tilt; + *reinterpret_cast(&particle->angleBits) = static_cast(rotation); + particle->phaseParameter = tilt; particle->alpha = 100; - particle->unknown_0050 = spread; - particle->unknown_0054 = -14.0f; - *reinterpret_cast(particle->unknown_0058) = static_cast(spin); + particle->angleParameter = spread; + particle->animationParameter = -14.0f; + *reinterpret_cast(particle->animationParameters) = static_cast(spin); InitParticleQuad(particle->vertices); this->particles.push_back(particle); @@ -83,16 +83,16 @@ void CSphereWindEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; this->UpdateParticle(particle); - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } // OFFSET: 0x00B78480 // FUNCTION: fn_19192 __declspec(noinline) void CSphereWindEffect::UpdateParticle(CParticle* particle) { - float& rotation = *reinterpret_cast(&particle->unknown_00C4); + float& rotation = *reinterpret_cast(&particle->angleBits); if (particle) { - float value = *reinterpret_cast(particle->unknown_0058) + rotation; + float value = *reinterpret_cast(particle->animationParameters) + rotation; if (value >= 360.0f) { value -= 360.0f; } @@ -104,11 +104,11 @@ __declspec(noinline) void CSphereWindEffect::UpdateParticle(CParticle* particle) transform.MakeYRotation(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw / -180.0f * 3.141592f); particle->transform = transform; - const int segment = particle->unknown_000C; - const int angle = static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * segment) + rotation) % 360; - const int tilt = particle->unknown_004C; + const int segment = particle->columnIndex; + const int angle = static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * segment) + rotation) % 360; + const int tilt = particle->phaseParameter; const float scale = particle->scale; - const float radius = particle->unknown_00C0; + const float radius = particle->speedParameter; const float ringX = g_cosTable[tilt] * scale * g_cosTable[angle]; const float ringY = g_sinTable[tilt] * scale * g_cosTable[angle]; @@ -116,8 +116,8 @@ __declspec(noinline) void CSphereWindEffect::UpdateParticle(CParticle* particle) const float spreadX = g_sinTable[tilt] * radius; const float spreadY = g_cosTable[tilt] * radius; - const vector3d inner = {ringX - spreadX, ringY + spreadY + particle->unknown_0054, ringZ}; - const vector3d outer = {ringX + spreadX, ringY - spreadY + particle->unknown_0054, ringZ}; + const vector3d inner = {ringX - spreadX, ringY + spreadY + particle->animationParameter, ringZ}; + const vector3d outer = {ringX + spreadX, ringY - spreadY + particle->animationParameter, ringZ}; particle->vertices[1].x = outer.x; particle->vertices[1].y = outer.y; @@ -144,11 +144,11 @@ __declspec(noinline) void CSphereWindEffect::UpdateParticle(CParticle* particle) void CSphereWindEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_000C <= 0) { + if (!particle || particle->columnIndex <= 0) { continue; } - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/SpriteEffect.cpp b/Source/Contents/Effects/SpriteEffect.cpp index 742497371..33d9df25f 100644 --- a/Source/Contents/Effects/SpriteEffect.cpp +++ b/Source/Contents/Effects/SpriteEffect.cpp @@ -76,12 +76,12 @@ void CSpriteEffect::Open() { return; } - particle->unknown_0004 = this->id; - particle->unknown_000C = 1; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 1; + particle->rowIndex = 0; + particle->groupIndex = 1; this->SetupParticle(particle); - particle->unknown_02F4 = this->actor; + particle->actorId = this->actor; this->particles.push_back(particle); } @@ -92,10 +92,10 @@ void CSpriteEffect::SetupParticle(CSpriteParticle* particle) { return; } - particle->unknown_00EC |= 0x200; + particle->renderOptions |= 0x200; particle->frameDelay = 2.0f; particle->alpha = 255; - this->unknown_002C = 100; + this->effectLifetime = 100; switch (this->id) { case EF_GROUND_EXPLOSION: @@ -107,7 +107,7 @@ void CSpriteEffect::SetupParticle(CSpriteParticle* particle) { case EF_UNK_1130: particle->SetSprite("이팩트\\bakuretsu_hadou\\bakuretsu_hadou.spr"); particle->SetAction("이팩트\\bakuretsu_hadou\\bakuretsu_hadou.act"); - particle->unknown_00EC |= 0x200; + particle->renderOptions |= 0x200; particle->depthOffset = 0.0003f; particle->flags = 0x101; particle->loopMode = 0; @@ -385,7 +385,7 @@ void CSpriteEffect::SetupParticle(CSpriteParticle* particle) { void CSpriteEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CSpriteParticle* particle = *it; - if (particle->unknown_00E8 > 0) { + if (particle->elapsedFrames > 0) { particle->Draw(1); } } @@ -452,7 +452,7 @@ bool CSpriteEffect::IsAlive() { return true; } - if (particle->life * 60.0f > static_cast(particle->unknown_00E8)) { + if (particle->life * 60.0f > static_cast(particle->elapsedFrames)) { return true; } } @@ -465,7 +465,7 @@ bool CSpriteEffect::IsAlive() { void CSpriteEffect::OnProcess() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CSpriteParticle* particle = *it; - ++particle->unknown_00E8; + ++particle->elapsedFrames; switch (this->id) { case EF_UNK_1130: { @@ -583,19 +583,19 @@ void CSpriteEffect::OnProcess() { break; } case EF_UNK_2443: - particle->unknown_02BC = 1; - particle->unknown_02BD = 1; - particle->unknown_02C4 = 0.0f; - particle->unknown_02C0 = 0.0f; + particle->applyActorExtent = 1; + particle->applyActorLift = 1; + particle->screenOffsetY = 0.0f; + particle->screenOffsetX = 0.0f; particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; break; case EF_UNK_2458: - particle->unknown_02BC = 1; - particle->unknown_02BD = 1; - particle->unknown_02C4 = -105.0f; - particle->unknown_02C0 = 0.0f; + particle->applyActorExtent = 1; + particle->applyActorLift = 1; + particle->screenOffsetY = -105.0f; + particle->screenOffsetX = 0.0f; particle->position.x = this->position[0]; particle->position.y = this->position[1]; particle->position.z = this->position[2]; diff --git a/Source/Contents/Effects/SpriteParticle.cpp b/Source/Contents/Effects/SpriteParticle.cpp index 70aceb49f..b0202969d 100644 --- a/Source/Contents/Effects/SpriteParticle.cpp +++ b/Source/Contents/Effects/SpriteParticle.cpp @@ -33,13 +33,13 @@ static __forceinline bool IsParticleActive(const CSpriteParticle* particle) { if (0.0f == particle->life) { return true; } - return particle->life * 60.0f > static_cast(particle->unknown_00E8); + return particle->life * 60.0f > static_cast(particle->elapsedFrames); } // OFFSET: 0x00B40B60 // FUNCTION: fn_18861 CSpriteParticle::CSpriteParticle(vector3d position, int flags) - : CParticle(position, flags), unknown_02BC(0), unknown_02BD(0), velocity(), sprite(nullptr), action(nullptr) { + : CParticle(position, flags), applyActorExtent(0), applyActorLift(0), velocity(), sprite(nullptr), action(nullptr) { this->Reset(); } @@ -50,18 +50,18 @@ void CSpriteParticle::Reset() { this->sprite = nullptr; this->action = nullptr; this->frameDelay = 0; - this->unknown_02D4 = 0; + this->spinBits = 0; this->velocity.x = 0; this->velocity.y = 0; this->velocity.z = 0; this->animation = 0; this->frame = 0; this->loopMode = 0; - this->unknown_02BC = 0; - this->unknown_02BD = 0; - this->unknown_02C0 = 0; - this->unknown_02C4 = 0; - this->unknown_02F4 = 0; + this->applyActorExtent = 0; + this->applyActorLift = 0; + this->screenOffsetX = 0; + this->screenOffsetY = 0; + this->actorId = 0; } // OFFSET: 0x00B40E30 @@ -73,7 +73,7 @@ void CSpriteParticle::UpdateFrame() { const long long frameCount = static_cast(this->action->FrameCount(this->animation)); const long long delay = static_cast(this->frameDelay); - if (0 == delay || (this->unknown_00E8 >= delay && 0 == this->unknown_00E8 % delay)) { + if (0 == delay || (this->elapsedFrames >= delay && 0 == this->elapsedFrames % delay)) { ++this->frame; } @@ -121,7 +121,7 @@ void CSpriteParticle::Draw(char mode) { float distance; g_renderer->ProjectViewport(&this->position.x, view, &screenX, &screenY, &distance); float scaleDistance = g_renderer->ScaleDistance(distance); - if (CRenderObject* renderObject = FindRenderObject(this->unknown_02F4)) { + if (CRenderObject* renderObject = FindRenderObject(this->actorId)) { renderObject->ScaleByFadePulse(scaleDistance); } @@ -134,7 +134,7 @@ void CSpriteParticle::Draw(char mode) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; SpriteAtlasRecord record{}; - CTexture* texture = static_cast(const_cast(image->unknown_0008)); + CTexture* texture = static_cast(const_cast(image->surface)); if (!texture) { texture = g_renderer->atlas.Find(image, sprite->palette, record); if (!texture) { @@ -143,9 +143,9 @@ void CSpriteParticle::Draw(char mode) { } else { record.u0 = 0.0f; record.v0 = 0.0f; - const CTexture* widthTexture = static_cast(image->unknown_0008); + const CTexture* widthTexture = static_cast(image->surface); record.u1 = static_cast(widthTexture->ImageWidth()) / static_cast(widthTexture->TextureWidth()); - const CTexture* heightTexture = static_cast(image->unknown_0008); + const CTexture* heightTexture = static_cast(image->surface); record.v1 = static_cast(heightTexture->ImageHeight()) / static_cast(heightTexture->TextureHeight()); } @@ -155,7 +155,7 @@ void CSpriteParticle::Draw(char mode) { std::memcpy(primitive->vertices, this->vertices, sizeof(this->vertices)); primitive->texture = texture; - if ((this->unknown_00EC & 0x200) != 0) { + if ((this->renderOptions & 0x200) != 0) { const std::uint32_t a = static_cast( static_cast(this->alpha) * (1.0f / 255.0f) * static_cast(cell.color >> 24) * (1.0f / 255.0f) * 255.0f @@ -175,7 +175,7 @@ void CSpriteParticle::Draw(char mode) { matrix scaleMatrix; scaleMatrix.SetScale(cellScaleX * halfWidth, cellScaleY * halfHeight, 1.0f); matrix cellRotation; - cellRotation.MakeZRotation(ToRadians(static_cast(cell.unknown_001C))); + cellRotation.MakeZRotation(ToRadians(static_cast(cell.rotation))); matrix cellTranslate; cellTranslate.MakeTranslate((static_cast(cell.x) + halfWidth) * cellScaleX, (static_cast(cell.y) + halfHeight) * cellScaleY, 0.0f); @@ -202,7 +202,7 @@ void CSpriteParticle::Draw(char mode) { matrix worldScale; worldScale.SetScale(this->scale, this->scale, 1.0f); matrix worldRotation; - worldRotation.MakeZRotation(ToRadians(*reinterpret_cast(&this->unknown_00C4))); + worldRotation.MakeZRotation(ToRadians(*reinterpret_cast(&this->angleBits))); worldRotation.AppendXRotation(ToRadians(static_cast(g_modeMgr.GetGameMode())->camera->camera.pitch)); worldRotation.AppendYRotation(ToRadians(static_cast(g_modeMgr.GetGameMode())->camera->camera.yaw)); matrix worldTranslate; @@ -231,19 +231,19 @@ void CSpriteParticle::Draw(char mode) { g_renderer->viewport.Project(&worldVertices[v].x, view, primitive->vertices[v]); } - if (CRenderObject* renderObject = FindRenderObject(this->unknown_02F4)) { - float offsetX = this->unknown_02C0; - float offsetY = this->unknown_02C4; + if (CRenderObject* renderObject = FindRenderObject(this->actorId)) { + float offsetX = this->screenOffsetX; + float offsetY = this->screenOffsetY; CGameActor* actor = static_cast(renderObject); if (actor->GetMonsterTransformJob() <= 0) { - if (this->unknown_02BC != 0) { + if (this->applyActorExtent != 0) { float extent[2]; float* p = actor->GetExtent(extent); offsetX += p[0]; offsetY += p[1]; } - if (this->unknown_02BD != 0) { - offsetY -= static_cast(static_cast(*reinterpret_cast(&renderObject->render.unknown_0128))); + if (this->applyActorLift != 0) { + offsetY -= static_cast(static_cast(*reinterpret_cast(&renderObject->render.hoverOffsetLow))); } } offsetX *= scaleDistance; @@ -262,8 +262,8 @@ void CSpriteParticle::Draw(char mode) { } } - primitive->unknown_0018 = 5; - primitive->unknown_001C = (this->flags != 5) ? 6 : 2; + primitive->sourceBlend = 5; + primitive->destinationBlend = (this->flags != 5) ? 6 : 2; g_renderer->queues.Submit(primitive, static_cast(this->flags), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } } diff --git a/Source/Contents/Effects/SpriteParticle.h b/Source/Contents/Effects/SpriteParticle.h index 0d86759ee..a564635e4 100644 --- a/Source/Contents/Effects/SpriteParticle.h +++ b/Source/Contents/Effects/SpriteParticle.h @@ -17,21 +17,21 @@ public: void SetSprite(const char* name); void Draw(char mode); - /* 02BC */ unsigned char unknown_02BC; - /* 02BD */ unsigned char unknown_02BD; + /* 02BC */ unsigned char applyActorExtent; + /* 02BD */ unsigned char applyActorLift; /* 02BE */ unsigned char unknown_02BE[2]; - /* 02C0 */ float unknown_02C0; - /* 02C4 */ float unknown_02C4; + /* 02C0 */ float screenOffsetX; + /* 02C4 */ float screenOffsetY; /* 02C8 */ vector3d velocity; - /* 02D4 */ int unknown_02D4; + /* 02D4 */ int spinBits; /* 02D8 */ float frameDelay; - /* 02DC */ unsigned char unknown_02DC[4]; + /* 02DC */ unsigned char accelerationStorage[4]; /* 02E0 */ CSprRes* sprite; /* 02E4 */ CActRes* action; /* 02E8 */ int animation; /* 02EC */ int frame; /* 02F0 */ int loopMode; - /* 02F4 */ int unknown_02F4; + /* 02F4 */ int actorId; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/Contents/Effects/SquareRangeEffect.cpp b/Source/Contents/Effects/SquareRangeEffect.cpp index 6084d7a1a..9cc276e97 100644 --- a/Source/Contents/Effects/SquareRangeEffect.cpp +++ b/Source/Contents/Effects/SquareRangeEffect.cpp @@ -38,7 +38,7 @@ void CSquareRangeEffect::Open() { particle->SetTexture("effect\\SquareRange.tga"); particle->scale = this->size * 2.5f; if (this->id == 991) { - this->unknown_002C = 300; + this->effectLifetime = 300; particle->SetColor(92, 92, 92); particle->destinationBlend = 6; } @@ -81,7 +81,7 @@ void CSquareRangeEffect::OnProcess() { particle->transform = transform; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/StarEffect.cpp b/Source/Contents/Effects/StarEffect.cpp index d3498db1f..0794e8723 100644 --- a/Source/Contents/Effects/StarEffect.cpp +++ b/Source/Contents/Effects/StarEffect.cpp @@ -47,10 +47,10 @@ void CStarEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = ring; + particle->groupIndex = 1; this->SetupParticle(particle); this->particles.push_back(particle); } @@ -60,9 +60,9 @@ void CStarEffect::Open() { // OFFSET: 0x00B79FA0 // FUNCTION: fn_19205 void CStarEffect::SetupParticle(CParticle* particle) { - StarParticleState& state = *reinterpret_cast(&particle->unknown_0054); + StarParticleState& state = *reinterpret_cast(&particle->animationParameter); - particle->unknown_00E8 = 0; + particle->elapsedFrames = 0; particle->alpha = 0; for (int index = 0; index < 4; ++index) { state.angles[index] = static_cast(std::max(rand() % 360, 0)); @@ -84,9 +84,9 @@ void CStarEffect::SetupParticle(CParticle* particle) { speedZ *= -1.0f; } - particle->unknown_00D0 = speedX; - particle->unknown_00D4 = speedY; - particle->unknown_00D8 = speedZ; + particle->offsetX = speedX; + particle->offsetY = speedY; + particle->offsetZ = speedZ; } // OFFSET: 0x00B7A160 @@ -104,7 +104,7 @@ void CStarEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; this->UpdateParticle(particle); - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -115,8 +115,8 @@ void CStarEffect::UpdateParticle(CParticle* particle) { return; } - StarParticleState& state = *reinterpret_cast(&particle->unknown_0054); - if (particle->unknown_00E8 % 14 == 0) { + StarParticleState& state = *reinterpret_cast(&particle->animationParameter); + if (particle->elapsedFrames % 14 == 0) { int texture = static_cast(state.texture) + 1; if (texture > 6) { texture = 1; @@ -125,7 +125,7 @@ void CStarEffect::UpdateParticle(CParticle* particle) { particle->SetTexture(FormatOwnedString("effect\\star%02d.bmp", texture).c_str()); } - const int frame = particle->unknown_00E8; + const int frame = particle->elapsedFrames; int alpha = particle->alpha; if (frame < 80) { alpha += 3; @@ -156,15 +156,15 @@ void CStarEffect::UpdateParticle(CParticle* particle) { state.angles[pair * 2] = static_cast(current); } - const float offsetX = particle->unknown_00D0; - const float offsetY = particle->unknown_00D4; - const float offsetZ = particle->unknown_00D8; - particle->unknown_00D4 = offsetY; - particle->unknown_00D0 = g_sinTable[static_cast(state.angles[0])] * 0.05f + offsetX; - particle->unknown_00D8 = g_sinTable[static_cast(state.angles[2])] * 0.05f + offsetZ; - particle->position.x = particle->unknown_00D0 + this->position[0]; + const float offsetX = particle->offsetX; + const float offsetY = particle->offsetY; + const float offsetZ = particle->offsetZ; + particle->offsetY = offsetY; + particle->offsetX = g_sinTable[static_cast(state.angles[0])] * 0.05f + offsetX; + particle->offsetZ = g_sinTable[static_cast(state.angles[2])] * 0.05f + offsetZ; + particle->position.x = particle->offsetX + this->position[0]; particle->position.y = offsetY; - particle->position.z = particle->unknown_00D8 + this->position[2]; + particle->position.z = particle->offsetZ + this->position[2]; int phase = static_cast(state.phase + 1.0f); if (phase >= 360) { diff --git a/Source/Contents/Effects/StarEmperorEffect.cpp b/Source/Contents/Effects/StarEmperorEffect.cpp index dca9b0eac..ede0ce587 100644 --- a/Source/Contents/Effects/StarEmperorEffect.cpp +++ b/Source/Contents/Effects/StarEmperorEffect.cpp @@ -82,17 +82,17 @@ void CStarEmperorEffect::Close() { // OFFSET: 0x0072C490 // FUNCTION: fn_07478 void CStarEmperorEffect::Open() { - this->unknown_002C = this->id != 1203 ? 30 : 60; + this->effectLifetime = this->id != 1203 ? 30 : 60; this->BuildSphere(); for (int i = 0; i < 10; ++i) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 0x201); - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\star_emperor\\ring_white.tga"); - particle->unknown_004C = 36; + particle->phaseParameter = 36; this->rings.push_back(particle); } } @@ -119,15 +119,15 @@ void CStarEmperorEffect::UpdateRing(CParticle* particle) { return; } - const int startAngle = particle->unknown_004C * particle->unknown_000C; - const int endAngle = (particle->unknown_000C + 1) * particle->unknown_004C; - int step = particle->unknown_00E8 + 1; + const int startAngle = particle->phaseParameter * particle->columnIndex; + const int endAngle = (particle->columnIndex + 1) * particle->phaseParameter; + int step = particle->elapsedFrames + 1; if (this->id == 1203) { - const int half = this->unknown_002C / 2; - step = half > particle->unknown_00E8 ? half - particle->unknown_00E8 : particle->unknown_00E8 - half; + const int half = this->effectLifetime / 2; + step = half > particle->elapsedFrames ? half - particle->elapsedFrames : particle->elapsedFrames - half; } - const float outer = -(1.75f / static_cast(this->unknown_002C)) * g_depthAverageHalf * static_cast((step + 1) * step / 2) + + const float outer = -(1.75f / static_cast(this->effectLifetime)) * g_depthAverageHalf * static_cast((step + 1) * step / 2) + static_cast(step) * 1.75f; float inner = 0.0f; if (outer > 12.0f) { @@ -159,18 +159,18 @@ void CStarEmperorEffect::UpdateRing(CParticle* particle) { particle->transform = rotation; if (this->id == 1203) { - const int quarter = this->unknown_002C / 4; + const int quarter = this->effectLifetime / 4; if (quarter <= step) { - step = this->unknown_002C - step; + step = this->effectLifetime - step; } particle->alpha = 255 / quarter * step; } else { - const int half = this->unknown_002C / 2; + const int half = this->effectLifetime / 2; const int scale = 255 / half; - if (half > particle->unknown_00E8) { + if (half > particle->elapsedFrames) { particle->alpha = step * scale; } else { - particle->alpha = (this->unknown_002C - step) * scale; + particle->alpha = (this->effectLifetime - step) * scale; } } @@ -184,14 +184,14 @@ void CStarEmperorEffect::UpdateRing(CParticle* particle) { void CStarEmperorEffect::OnProcess() { for (std::vector::iterator it = this->sphere.begin(); it != this->sphere.end(); ++it) { if (CParticle* particle = *it) { - const int frame = particle->unknown_00E8; + const int frame = particle->elapsedFrames; int step = frame + 1; if (this->id == 1203) { - const int half = this->unknown_002C / 2; + const int half = this->effectLifetime / 2; step = half > frame ? half - frame : frame - half; } - const float size = -(1.15f / static_cast(this->unknown_002C)) * g_depthAverageHalf * static_cast((step + 1) * step / 2) + + const float size = -(1.15f / static_cast(this->effectLifetime)) * g_depthAverageHalf * static_cast((step + 1) * step / 2) + static_cast(step) * 1.15f; matrix scale; scale.SetScale(size, size, size); @@ -202,18 +202,18 @@ void CStarEmperorEffect::OnProcess() { particle->transform = result; if (this->id == 1203) { - const int quarter = this->unknown_002C / 4; + const int quarter = this->effectLifetime / 4; if (quarter <= step) { - step = this->unknown_002C - step; + step = this->effectLifetime - step; } particle->alpha = 255 / quarter * step; } else { - const int half = this->unknown_002C / 2; + const int half = this->effectLifetime / 2; const int fade = 255 / half; - if (half > particle->unknown_00E8) { + if (half > particle->elapsedFrames) { particle->alpha = step * fade; } else { - particle->alpha = (this->unknown_002C - step) * fade; + particle->alpha = (this->effectLifetime - step) * fade; } } @@ -222,12 +222,12 @@ void CStarEmperorEffect::OnProcess() { particle->position.z = this->position[2]; } - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } for (std::vector::iterator it = this->rings.begin(); it != this->rings.end(); ++it) { this->UpdateRing(*it); - ++(*it)->unknown_00E8; + ++(*it)->elapsedFrames; } } diff --git a/Source/Contents/Effects/StealEffect.cpp b/Source/Contents/Effects/StealEffect.cpp index 855c0bf49..1e5e5c02f 100644 --- a/Source/Contents/Effects/StealEffect.cpp +++ b/Source/Contents/Effects/StealEffect.cpp @@ -22,7 +22,7 @@ CSteal::~CSteal() { // FUNCTION: fn_18969 void CSteal::SpawnParticles() { for (int i = 0; i < 10; ++i) { - const int life = this->unknown_002C; + const int life = this->effectLifetime; const int yaw = std::max(rand() % 360, 0); const int pitch = std::max(rand() % 100, 0) - 50; @@ -52,14 +52,14 @@ void CSteal::SpawnParticles() { const float velocityZ = 0.0f * rotation.values[5] + 0.0f * rotation.values[2] + distance * rotation.values[8] + rotation.values[11] + 0.0f; CSpriteParticle* particle = static_cast(CreateSpriteParticle(reinterpret_cast(this->position), 1)); - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->scale = scale; particle->frameDelay = frameDelay; - float* params = &particle->unknown_0054; + float* params = &particle->animationParameter; params[0] = shrink; params[1] = static_cast(yaw); params[2] = static_cast(pitch); @@ -108,9 +108,9 @@ void CSteal::OnProcess() { CSpriteParticle* particle = *it; const vector3d origin = *reinterpret_cast(this->position); const float scale = particle->scale; - float* params = &particle->unknown_0054; + float* params = &particle->animationParameter; const float scaleStep = params[5]; - const int index = particle->unknown_000C; + const int index = particle->columnIndex; const vector3d velocity = particle->velocity; float lift = params[3] + params[4]; const float distance = std::max(0.0f, params[0] + particle->frameDelay); @@ -135,7 +135,7 @@ void CSteal::OnProcess() { } } - ++particle->unknown_00E8; + ++particle->elapsedFrames; particle->scale = newScale; particle->frameDelay = distance; params[3] = lift; diff --git a/Source/Contents/Effects/StormCannonEffect.h b/Source/Contents/Effects/StormCannonEffect.h index f9edcba89..9b4a19a08 100644 --- a/Source/Contents/Effects/StormCannonEffect.h +++ b/Source/Contents/Effects/StormCannonEffect.h @@ -20,7 +20,7 @@ public: // INLINED int& Alpha() { - return *reinterpret_cast(this->unknown_0054); + return *reinterpret_cast(this->alphaParameters); } /* 00CC */ std::vector emitters; diff --git a/Source/Contents/Effects/StormGustEffect.cpp b/Source/Contents/Effects/StormGustEffect.cpp index 5dcc34bea..0c79ac261 100644 --- a/Source/Contents/Effects/StormGustEffect.cpp +++ b/Source/Contents/Effects/StormGustEffect.cpp @@ -32,10 +32,10 @@ void CStormGustEffect::Open() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->SetTexture("effect\\ice.tga"); particle->alpha = 250; @@ -44,14 +44,14 @@ void CStormGustEffect::Open() { const float cosine = ClientCosine(static_cast(angle)); const float velocityZ = cosine * -static_cast(speed); const float velocityX = ClientSine(static_cast(angle)) * speed; - particle->unknown_00D0 = velocityX; - particle->unknown_00D4 = 20.0f; - particle->unknown_00D8 = velocityZ; + particle->offsetX = velocityX; + particle->offsetY = 20.0f; + particle->offsetZ = velocityZ; - particle->unknown_00C0 = 1.5f; + particle->speedParameter = 1.5f; particle->scale = static_cast(std::max(rand() % 100, 0) + 400) / 100.0f; - matrix& rotation = *reinterpret_cast(particle->unknown_0198); + matrix& rotation = *reinterpret_cast(particle->rotationStorage); rotation.IsIdentity(); rotation.MakeXRotation(100.0f / 180.0f * 3.141592f); rotation.AppendYRotation(static_cast(std::max(rand() % 360, 0)) / 180.0f * 3.141592f); @@ -74,20 +74,20 @@ void CStormGustEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - if (particle->unknown_00E8 == 3) { - particle->unknown_00C0 = 0.0f; + if (particle->elapsedFrames == 3) { + particle->speedParameter = 0.0f; } - const float speed = particle->unknown_00C0; - const matrix& rotation = *reinterpret_cast(particle->unknown_0198); + const float speed = particle->speedParameter; + const matrix& rotation = *reinterpret_cast(particle->rotationStorage); const float* values = rotation.values; - particle->unknown_00D0 += values[3] * 0.0f + values[0] * 0.0f + speed * values[6] + values[9]; - particle->unknown_00D4 += values[4] * 0.0f + values[1] * 0.0f + speed * values[7] + values[10]; - particle->unknown_00D8 += values[5] * 0.0f + values[2] * 0.0f + speed * values[8] + values[11]; + particle->offsetX += values[3] * 0.0f + values[0] * 0.0f + speed * values[6] + values[9]; + particle->offsetY += values[4] * 0.0f + values[1] * 0.0f + speed * values[7] + values[10]; + particle->offsetZ += values[5] * 0.0f + values[2] * 0.0f + speed * values[8] + values[11]; matrix translation; std::memcpy(translation.values, g_identityMatrix, sizeof(translation.values)); - translation.MakeTranslate(particle->unknown_00D0, particle->unknown_00D4, particle->unknown_00D8); + translation.MakeTranslate(particle->offsetX, particle->offsetY, particle->offsetZ); matrix scale; std::memcpy(scale.values, g_identityMatrix, sizeof(scale.values)); scale.SetScale(particle->scale, particle->scale, 1.0f); @@ -111,7 +111,7 @@ void CStormGustEffect::OnProcess() { particle->alpha = alpha; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } diff --git a/Source/Contents/Effects/StormKickEffect.cpp b/Source/Contents/Effects/StormKickEffect.cpp index bf827726e..230d14d86 100644 --- a/Source/Contents/Effects/StormKickEffect.cpp +++ b/Source/Contents/Effects/StormKickEffect.cpp @@ -27,16 +27,16 @@ void CStormKickEffect::CreateStorms(int layer) { } particle->SetTexture("effect\\storm2.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; - particle->unknown_00C0 = 40.0f; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; + particle->speedParameter = 40.0f; particle->alpha = 0; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(std::max(rand() % 360, 0)); + *reinterpret_cast(&particle->angleBits) = static_cast(std::max(rand() % 360, 0)); particle->scale = 2.0f; - particle->unknown_0054 = 50.0f; - float* motion = reinterpret_cast(particle->unknown_0058); + particle->animationParameter = 50.0f; + float* motion = reinterpret_cast(particle->animationParameters); motion[0] = 5.0f; motion[1] = static_cast(layer); @@ -86,29 +86,29 @@ void CStormKickEffect::CreateClouds(int layer) { } particle->SetTexture("effect\\cloud11.tga"); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; particle->alpha = 0; - particle->unknown_0050 = 30; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(angle); - particle->unknown_004C = std::max(rand() % 21, 0) + 80; - particle->unknown_0054 = 1.0f; + particle->angleParameter = 30; + *reinterpret_cast(&particle->angleBits) = static_cast(angle); + particle->phaseParameter = std::max(rand() % 21, 0) + 80; + particle->animationParameter = 1.0f; if (this->id == EF_STORMKICK8) { if (layer == 0) { - particle->unknown_00C0 = 28.0f - ring * 5.0f; + particle->speedParameter = 28.0f - ring * 5.0f; particle->scale = 10.0f - ring * 2.0f; } else if (layer == 1) { - particle->unknown_00C0 = 18.0f - ring * 5.0f; + particle->speedParameter = 18.0f - ring * 5.0f; particle->scale = 5.0f - ring; } } else if (layer == 0) { - particle->unknown_00C0 = 48.0f - ring * 5.0f; + particle->speedParameter = 48.0f - ring * 5.0f; particle->scale = 14.0f - ring * 2.0f; } else if (layer == 1) { - particle->unknown_00C0 = 28.0f - ring * 5.0f; + particle->speedParameter = 28.0f - ring * 5.0f; particle->scale = 6.0f - ring; } @@ -127,11 +127,11 @@ void CStormKickEffect::UpdateStorm(CParticle* particle) { return; } - const float* motion = reinterpret_cast(particle->unknown_0058); - const int segment = particle->unknown_000C; - float radius = particle->unknown_00C0; - const float height = -particle->unknown_0054 + segment * motion[0]; - int angle = static_cast(static_cast(segment * 45) + *reinterpret_cast(&particle->unknown_00C4)) % 360; + const float* motion = reinterpret_cast(particle->animationParameters); + const int segment = particle->columnIndex; + float radius = particle->speedParameter; + const float height = -particle->animationParameter + segment * motion[0]; + int angle = static_cast(static_cast(segment * 45) + *reinterpret_cast(&particle->angleBits)) % 360; for (int step = 1; step <= segment; ++step) { radius -= (2.2f - step * 0.2f) * particle->scale; } @@ -215,13 +215,13 @@ void CStormKickEffect::Open() { case EF_STORMKICK2: case EF_STORMKICK3: case EF_STORMKICK6: - this->unknown_002C = 100; + this->effectLifetime = 100; break; case EF_STORMKICK7: - this->unknown_002C = 1000; + this->effectLifetime = 1000; break; case EF_STORMKICK8: - this->unknown_002C = 60; + this->effectLifetime = 60; break; } } @@ -258,15 +258,15 @@ void CStormKickEffect::OnProcess() { particle->position.z = this->position[2]; if (particle) { int alpha = particle->alpha; - if (particle->unknown_00E8 > 60 && this->id != EF_STORMKICK7) { + if (particle->elapsedFrames > 60 && this->id != EF_STORMKICK7) { alpha = std::max(alpha - 1, 0); } - if (particle->unknown_00E8 <= 40) { + if (particle->elapsedFrames <= 40) { ++alpha; } particle->alpha = alpha; - float& rotation = *reinterpret_cast(&particle->unknown_00C4); + float& rotation = *reinterpret_cast(&particle->angleBits); rotation = static_cast(static_cast(rotation - static_cast(std::max(rand() % 3, 0) + 3)) % 360); matrix transform; @@ -275,7 +275,7 @@ void CStormKickEffect::OnProcess() { particle->transform = transform; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } for (auto it = this->clouds.begin(); it != this->clouds.end(); ++it) { @@ -284,11 +284,11 @@ void CStormKickEffect::OnProcess() { particle->position.y = this->position[1]; particle->position.z = this->position[2]; if (particle) { - float& rotation = *reinterpret_cast(&particle->unknown_00C4); + float& rotation = *reinterpret_cast(&particle->angleBits); const float nextRotation = static_cast(static_cast(rotation + 5.0f) % 360); - const int spread = std::min(particle->unknown_0050 + 3, 180); - particle->unknown_0050 = spread; - const int frame = particle->unknown_00E8; + const int spread = std::min(particle->angleParameter + 3, 180); + particle->angleParameter = spread; + const int frame = particle->elapsedFrames; int alpha = particle->alpha; rotation = nextRotation; @@ -308,16 +308,16 @@ void CStormKickEffect::OnProcess() { particle->scale += 0.1f; } - const int segment = particle->unknown_000C; - const float radius = particle->unknown_0054; + const int segment = particle->columnIndex; + const float radius = particle->animationParameter; const int angle = static_cast(static_cast(static_cast(static_cast(spread) / 20.0f) * segment) + nextRotation) % 360; - const int tilt = particle->unknown_004C; + const int tilt = particle->phaseParameter; const float horizontal = radius * g_cosTable[tilt]; const float vertical = radius * g_sinTable[tilt]; EffectPoint corners[4]; corners[3].x = g_cosTable[angle] * particle->scale; - corners[3].y = -particle->unknown_00C0; + corners[3].y = -particle->speedParameter; corners[3].z = g_sinTable[angle] * particle->scale; corners[1].x = corners[3].x + g_cosTable[angle] * horizontal; corners[1].y = corners[3].y - vertical; @@ -342,7 +342,7 @@ void CStormKickEffect::OnProcess() { this->lastPoints[1] = corners[1]; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } CRenderObject* actor = FindRenderObject(this->actor); @@ -381,7 +381,7 @@ void CStormKickEffect::Render() { for (auto it = this->storms.begin(); it != this->storms.end(); ++it) { CParticle* particle = *it; const int alpha = particle->alpha; - const float* motion = reinterpret_cast(particle->unknown_0058); + const float* motion = reinterpret_cast(particle->animationParameters); switch (this->id) { case EF_STORMKICK1: @@ -414,7 +414,7 @@ void CStormKickEffect::Render() { continue; } - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; if (texPart <= 0) { continue; } diff --git a/Source/Contents/Effects/SunStanceEffect.cpp b/Source/Contents/Effects/SunStanceEffect.cpp index 7745371c9..e31565763 100644 --- a/Source/Contents/Effects/SunStanceEffect.cpp +++ b/Source/Contents/Effects/SunStanceEffect.cpp @@ -61,13 +61,13 @@ void CSunStanceEffect::Open() { } particle->SetTexture(texture); - particle->unknown_0004 = this->id; - particle->unknown_000C = 1; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = 1; + particle->rowIndex = 0; + particle->groupIndex = 1; particle->alpha = 255; particle->scale = 3.0f; - particle->unknown_0054 = static_cast(index) * 2.0943947f; + particle->animationParameter = static_cast(index) * 2.0943947f; InitParticleQuad(particle->vertices); this->particles.push_back(particle); } @@ -96,8 +96,8 @@ void CSunStanceEffect::OnProcess() { result.Compose(scaling, rotation); particle->transform = result; - particle->unknown_0054 += 0.02f; - const float angle = particle->unknown_0054; + particle->animationParameter += 0.02f; + const float angle = particle->animationParameter; const float cosine = std::cos(angle) * 8.0f; const float sine = std::sin(angle) * 8.0f; particle->position.z = cosine + this->position[2]; diff --git a/Source/Contents/Effects/TalismanMarkEffect.cpp b/Source/Contents/Effects/TalismanMarkEffect.cpp index e216479d4..1949e0b05 100644 --- a/Source/Contents/Effects/TalismanMarkEffect.cpp +++ b/Source/Contents/Effects/TalismanMarkEffect.cpp @@ -63,8 +63,8 @@ void CTalismanMarkEffect::PlayEnd() { continue; } - const int index = particle->unknown_000C; - const int angle = particle->unknown_004C; + const int index = particle->columnIndex; + const int angle = particle->phaseParameter; FreeParticle(particle); particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); @@ -73,15 +73,15 @@ void CTalismanMarkEffect::PlayEnd() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; InitParticleQuad(particle->vertices); particle->m_actorId = this->actor; particle->Load(s_talismanEndEffects.at(index)); - particle->unknown_004C = angle; - particle->unknown_00A8 = 2; + particle->phaseParameter = angle; + particle->animationState = 2; *it = particle; } } @@ -91,21 +91,21 @@ void CTalismanMarkEffect::PlayEnd() { void CTalismanMarkEffect::Open() { this->retained = 1; - for (int i = 0; i < std::min(this->unknown_00B0, 4); ++i) { + for (int i = 0; i < std::min(this->effectLevel, 4); ++i) { CEZ2STRParticle* particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); if (!particle) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = i; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = i; + particle->rowIndex = 0; + particle->groupIndex = 1; InitParticleQuad(particle->vertices); particle->m_actorId = this->actor; particle->Load(s_talismanStartEffects.at(i)); - particle->unknown_004C = (i / 2 + i % 2 * 2) * 90; - particle->unknown_00A8 = 0; + particle->phaseParameter = (i / 2 + i % 2 * 2) * 90; + particle->animationState = 0; this->particles.push_back(particle); } } @@ -119,15 +119,15 @@ void CTalismanMarkEffect::OnProcess() { continue; } - switch (particle->unknown_00A8) { + switch (particle->animationState) { case 0: - if (particle->life == 0.0f || particle->life * 60.0f > particle->unknown_00E8) { + if (particle->life == 0.0f || particle->life * 60.0f > particle->elapsedFrames) { break; } { - const int index = particle->unknown_000C; - const int angle = particle->unknown_004C; + const int index = particle->columnIndex; + const int angle = particle->phaseParameter; FreeParticle(particle); particle = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 13)); @@ -136,15 +136,15 @@ void CTalismanMarkEffect::OnProcess() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = index; - particle->unknown_0010 = 0; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = index; + particle->rowIndex = 0; + particle->groupIndex = 1; InitParticleQuad(particle->vertices); particle->m_actorId = this->actor; particle->Load(s_talismanLoopEffects.at(index)); - particle->unknown_004C = angle; - particle->unknown_00A8 = 1; + particle->phaseParameter = angle; + particle->animationState = 1; particle->m_loop = true; *it = particle; } @@ -152,7 +152,7 @@ void CTalismanMarkEffect::OnProcess() { case 1: break; case 2: - if (particle->life == 0.0f || particle->life * 60.0f > particle->unknown_00E8) { + if (particle->life == 0.0f || particle->life * 60.0f > particle->elapsedFrames) { break; } @@ -192,10 +192,10 @@ void CTalismanMarkEffect::UpdateParticle(CEZ2STRParticle* particle) { const float viewZ = view[2] * center.x + view[5] * center.y + view[8] * center.z + view[11]; const float* inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse.values; - int angle = particle->unknown_004C; - if (particle->unknown_00A8 == 1) { + int angle = particle->phaseParameter; + if (particle->animationState == 1) { angle = (angle + 1) % 360; - particle->unknown_004C = angle; + particle->phaseParameter = angle; } const float radians = static_cast(angle) / 180.0f * 3.141592f; diff --git a/Source/Contents/Effects/TetraBallEffect.cpp b/Source/Contents/Effects/TetraBallEffect.cpp index 21c3b0ef4..1d59c2fe4 100644 --- a/Source/Contents/Effects/TetraBallEffect.cpp +++ b/Source/Contents/Effects/TetraBallEffect.cpp @@ -10,7 +10,7 @@ // OFFSET: 0x0072E680 // FUNCTION: fn_07509 CTetraBallEffect::CTetraBallEffect() : CEffect(-1) { - this->unknown_0050 = 0; + this->rotationParameter = 0; for (int index = 0; index < 5; ++index) { this->balls[index] = nullptr; } @@ -98,7 +98,7 @@ void CTetraBallEffect::OnProcess() { ball->position.y = this->position[1]; ball->position.z = this->position[2]; ball->Process(0.0f, 0.0f, 0.0f); - ++ball->unknown_00E8; + ++ball->elapsedFrames; } } } diff --git a/Source/Contents/Effects/ThrowEffects.cpp b/Source/Contents/Effects/ThrowEffects.cpp index d9e4de387..b474a72c4 100644 --- a/Source/Contents/Effects/ThrowEffects.cpp +++ b/Source/Contents/Effects/ThrowEffects.cpp @@ -17,8 +17,8 @@ // OFFSET: 0x00B7CB10 // FUNCTION: fn_19227 CThrowItemEffect::CThrowItemEffect() - : CEffect(-1), unknown_00CC(0), unknown_00D0(0), unknown_00D4(1), unknown_00D8(4), unknown_00DC(0), unknown_00E0(0), unknown_00EC(0), - unknown_00F0(0), unknown_00F4(0) { + : CEffect(-1), travelFrames(0), launchDelay(0), projectileCount(1), trailCount(4), heightDelta(0), arcHeight(0), trailX(0), + trailY(0), trailZ(0) { } // OFFSET: 0x00B7CCC0 @@ -36,73 +36,73 @@ void CThrowItemEffect::Close() { void CThrowItemEffect::Open() { switch (this->id) { case EF_THROW_HAPPOKUNAI: - this->unknown_00D4 = 8; + this->projectileCount = 8; break; case EF_THROW_MULTIPLE_COIN: - this->unknown_00D4 = 10; + this->projectileCount = 10; break; case EF_KAIHOU: if (CGameActor* owner = static_cast(FindRenderObject(this->actor))) { - this->unknown_00D4 = owner->unknown_03D0; - this->unknown_00D8 = 1; + this->projectileCount = owner->charmCount; + this->trailCount = 1; } break; } - for (int row = 0; row < this->unknown_00D4; ++row) { - for (int column = 0; column < this->unknown_00D8; ++column) { + for (int row = 0; row < this->projectileCount; ++row) { + for (int column = 0; column < this->trailCount; ++column) { CParticle* particle = CreateParticle(reinterpret_cast(this->position), 5); if (!particle) { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = column; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = column; + particle->rowIndex = row; + particle->groupIndex = 1; switch (this->id) { case EF_THROWITEM: - this->unknown_002C = 300; - this->unknown_00E0 = 30.0f; + this->effectLifetime = 300; + this->arcHeight = 30.0f; this->InitTrajectory(particle); particle->SetTexture("유저인터페이스\\item\\빈병.bmp"); particle->scale = 1.5f; particle->SetColor(135, 255, 135); - particle->unknown_00C4 = 0; - particle->unknown_00C0 = particle->unknown_0054 / 25.0f; + particle->angleBits = 0; + particle->speedParameter = particle->animationParameter / 25.0f; particle->alpha = 255; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D4 = this->position[1] - 8.0f; - particle->unknown_00D8 = this->position[2]; + particle->offsetX = this->position[0]; + particle->offsetY = this->position[1] - 8.0f; + particle->offsetZ = this->position[2]; particle->destinationBlend = 6; break; case EF_THROWITEM2: particle->SetTexture("유저인터페이스\\item\\빈포션병.bmp"); - this->InitPotionParticle(particle, this->unknown_0030 == -1 ? 1 : this->unknown_0030); + this->InitPotionParticle(particle, this->effectArgument == -1 ? 1 : this->effectArgument); break; case EF_THROWITEM3: - this->unknown_002C = 300; - this->unknown_00E0 = 10.0f; + this->effectLifetime = 300; + this->arcHeight = 10.0f; particle->SetTexture("유저인터페이스\\item\\돌.bmp"); particle->scale = 1.0f; particle->SetColor(255, 255, 255); - particle->unknown_00C4 = 0; - particle->unknown_00C0 = 2.0f; + particle->angleBits = 0; + particle->speedParameter = 2.0f; particle->alpha = 255; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D4 = this->position[1] - 8.0f; - particle->unknown_00D8 = this->position[2]; + particle->offsetX = this->position[0]; + particle->offsetY = this->position[1] - 8.0f; + particle->offsetZ = this->position[2]; particle->destinationBlend = 6; break; case EF_THROWITEM4: - this->unknown_00D0 = 5; + this->launchDelay = 5; particle->SetTexture("유저인터페이스\\item\\화염병.bmp"); this->InitFlameParticle(particle); break; case EF_THROWITEM5: particle->SetTexture("유저인터페이스\\item\\버서크포션.bmp"); - this->InitPotionParticle(particle, this->unknown_0030 == -1 ? 1 : this->unknown_0030); + this->InitPotionParticle(particle, this->effectArgument == -1 ? 1 : this->effectArgument); break; case EF_THROWITEM6: particle->SetTexture("유저인터페이스\\item\\베넘나이프.bmp"); @@ -126,29 +126,29 @@ void CThrowItemEffect::Open() { break; case EF_THROWITEM11: particle->SetTexture("유저인터페이스\\item\\폭탄버섯포자.bmp"); - this->InitPotionParticle(particle, this->unknown_0030 == -1 ? 1 : this->unknown_0030); + this->InitPotionParticle(particle, this->effectArgument == -1 ? 1 : this->effectArgument); break; case EF_THROWITEM4_1: - this->unknown_00D0 = 10; + this->launchDelay = 10; particle->SetTexture("유저인터페이스\\item\\염산병.bmp"); this->InitFlameParticle(particle); break; case EF_THROW_BAKURETSU: particle->SetTexture("유저인터페이스\\item\\쿠나이_화.bmp"); this->InitSpinParticle(particle); - particle->unknown_00C0 = 1.0f; + particle->speedParameter = 1.0f; case EF_THROW_HAPPOKUNAI: - this->unknown_002C = 200; - this->unknown_00E0 = 1.0f; + this->effectLifetime = 200; + this->arcHeight = 1.0f; particle->SetTexture("유저인터페이스\\item\\쿠나이_독.bmp"); particle->scale = 3.0f; particle->SetColor(255, 200, 255); - *reinterpret_cast(&particle->unknown_00C4) = 330.0f; - particle->unknown_00C0 = 1.5f; + *reinterpret_cast(&particle->angleBits) = 330.0f; + particle->speedParameter = 1.5f; particle->alpha = 255; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D8 = this->position[2]; - particle->unknown_00D4 = this->position[1] - 8.0f; + particle->offsetX = this->position[0]; + particle->offsetZ = this->position[2]; + particle->offsetY = this->position[1] - 8.0f; particle->destinationBlend = 6; if (this->sourceActor == 0) { this->sourcePosition[1] = this->position[1]; @@ -157,18 +157,18 @@ void CThrowItemEffect::Open() { } break; case EF_THROW_MULTIPLE_COIN: - this->unknown_002C = 200; - this->unknown_00E0 = 10.0f; + this->effectLifetime = 200; + this->arcHeight = 10.0f; particle->SetTexture("effect\\coin_a.bmp"); particle->scale = 2.5f; particle->SetColor(255, 200, 0); - *reinterpret_cast(&particle->unknown_00C4) = 330.0f; - particle->unknown_00C0 = 2.0f; + *reinterpret_cast(&particle->angleBits) = 330.0f; + particle->speedParameter = 2.0f; particle->alpha = 255; particle->destinationBlend = 6; - particle->unknown_00D8 = this->position[2]; - particle->unknown_00D4 = this->position[1] - 8.0f; - particle->unknown_00D0 = this->position[0]; + particle->offsetZ = this->position[2]; + particle->offsetY = this->position[1] - 8.0f; + particle->offsetX = this->position[0]; break; case EF_KAIHOU: if (CGameActor* owner = static_cast(FindRenderObject(this->actor))) { @@ -188,14 +188,14 @@ void CThrowItemEffect::Open() { break; } - this->unknown_002C = 200; + this->effectLifetime = 200; particle->scale = 2.0f; - *reinterpret_cast(&particle->unknown_00C4) = 330.0f; - particle->unknown_00C0 = 1.5f; + *reinterpret_cast(&particle->angleBits) = 330.0f; + particle->speedParameter = 1.5f; particle->alpha = 255; - particle->unknown_00D8 = this->position[2]; - particle->unknown_00D4 = this->position[1] - 15.0f; - particle->unknown_00D0 = this->position[0]; + particle->offsetZ = this->position[2]; + particle->offsetY = this->position[1] - 15.0f; + particle->offsetX = this->position[0]; } break; } @@ -209,33 +209,33 @@ void CThrowItemEffect::Open() { // OFFSET: 0x00B7D3B0 // FUNCTION: fn_19231 void CThrowItemEffect::InitFlameParticle(CParticle* particle) { - this->unknown_002C = 300; - this->unknown_00E0 = 1.0f; + this->effectLifetime = 300; + this->arcHeight = 1.0f; this->InitTrajectory(particle); particle->scale = 1.5f; particle->SetColor(255, 255, 255); - particle->unknown_00C4 = 0; + particle->angleBits = 0; particle->alpha = 255; - particle->unknown_00C0 = particle->unknown_0054 / 25.0f; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D8 = this->position[2]; + particle->speedParameter = particle->animationParameter / 25.0f; + particle->offsetX = this->position[0]; + particle->offsetZ = this->position[2]; particle->destinationBlend = 6; - particle->unknown_00D4 = this->position[1] - 8.0f; + particle->offsetY = this->position[1] - 8.0f; } // OFFSET: 0x00B7D4D0 // FUNCTION: fn_19232 void CThrowItemEffect::InitPotionParticle(CParticle* particle, int kind) { - this->unknown_002C = 300; - this->unknown_00E0 = 30.0f; + this->effectLifetime = 300; + this->arcHeight = 30.0f; this->InitTrajectory(particle); particle->scale = 1.5f; - particle->unknown_00C4 = 0; + particle->angleBits = 0; particle->alpha = 255; - particle->unknown_00C0 = particle->unknown_0054 / 25.0f; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D8 = this->position[2]; - particle->unknown_00D4 = this->position[1] - 8.0f; + particle->speedParameter = particle->animationParameter / 25.0f; + particle->offsetX = this->position[0]; + particle->offsetZ = this->position[2]; + particle->offsetY = this->position[1] - 8.0f; if (kind != 6) { particle->destinationBlend = 6; @@ -259,16 +259,16 @@ void CThrowItemEffect::InitPotionParticle(CParticle* particle, int kind) { // OFFSET: 0x00B7D810 // FUNCTION: fn_19233 void CThrowItemEffect::InitSpinParticle(CParticle* particle) { - this->unknown_002C = 200; - this->unknown_00E0 = 1.0f; + this->effectLifetime = 200; + this->arcHeight = 1.0f; particle->scale = 2.0f; particle->SetColor(255, 200, 255); - *reinterpret_cast(&particle->unknown_00C4) = 330.0f; - particle->unknown_00C0 = 3.0f; + *reinterpret_cast(&particle->angleBits) = 330.0f; + particle->speedParameter = 3.0f; particle->alpha = 255; - particle->unknown_00D0 = this->position[0]; - particle->unknown_00D4 = this->position[1] - 8.0f; - particle->unknown_00D8 = this->position[2]; + particle->offsetX = this->position[0]; + particle->offsetY = this->position[1] - 8.0f; + particle->offsetZ = this->position[2]; particle->destinationBlend = 6; } @@ -307,44 +307,44 @@ void CThrowItemEffect::OnProcess() { target->position.y = this->position[1]; target->position.z = this->position[2]; - if (target != nullptr && this->unknown_00D0 <= this->frame) { - float& angle = target->unknown_00C0; - float& rotation = *reinterpret_cast(&target->unknown_00C4); - float& offsetX = *reinterpret_cast(&target->unknown_00D0); - float& offsetY = *reinterpret_cast(&target->unknown_00D4); - float& offsetZ = *reinterpret_cast(&target->unknown_00D8); + if (target != nullptr && this->launchDelay <= this->frame) { + float& angle = target->speedParameter; + float& rotation = *reinterpret_cast(&target->angleBits); + float& offsetX = *reinterpret_cast(&target->offsetX); + float& offsetY = *reinterpret_cast(&target->offsetY); + float& offsetZ = *reinterpret_cast(&target->offsetZ); - if (target->unknown_000C == 0) { + if (target->columnIndex == 0) { rotation = static_cast(static_cast(rotation + 45.0f) % 360); } else { - this->unknown_00E4 -= target->unknown_000C == 1 ? 150 : 25; - target->alpha = this->unknown_00E4; - offsetX = this->unknown_00EC; - offsetY = this->unknown_00F0; - offsetZ = this->unknown_00F4; - rotation = this->unknown_00E8; + this->trailAlpha -= target->columnIndex == 1 ? 150 : 25; + target->alpha = this->trailAlpha; + offsetX = this->trailX; + offsetY = this->trailY; + offsetZ = this->trailZ; + rotation = this->trailRotation; } - const float progress = static_cast(this->frame) / static_cast(this->unknown_00CC); + const float progress = static_cast(this->frame) / static_cast(this->travelFrames); float height = 0.0f; if (progress > 1.05f) { const int alpha = target->alpha - 20; target->alpha = alpha > 0 ? alpha : 0; } else { - const int index = *reinterpret_cast(&target->unknown_0048[4]); - const float radius = angle / *reinterpret_cast(&target->unknown_0048[0xC]); + const int index = *reinterpret_cast(&target->effectParameters[4]); + const float radius = angle / *reinterpret_cast(&target->effectParameters[0xC]); offsetX = angle * g_cosTable[index] + offsetX; - offsetY = radius * this->unknown_00DC + offsetY; + offsetY = radius * this->heightDelta + offsetY; offsetZ = angle * g_sinTable[index] + offsetZ; - height = g_sinTable[-static_cast(progress * -180.0f)] * this->unknown_00E0; + height = g_sinTable[-static_cast(progress * -180.0f)] * this->arcHeight; } - this->unknown_00EC = offsetX; - this->unknown_00F0 = offsetY; - this->unknown_00F4 = offsetZ; - this->unknown_00E8 = rotation; - this->unknown_00E4 = target->alpha; + this->trailX = offsetX; + this->trailY = offsetY; + this->trailZ = offsetZ; + this->trailRotation = rotation; + this->trailAlpha = target->alpha; if (target->alpha > 0) { matrix view; @@ -367,7 +367,7 @@ void CThrowItemEffect::OnProcess() { transform.Compose(rotationMatrix, translate); target->transform = transform; - if (this->id == 0x3D5 && target->unknown_0010 == 0 && target->unknown_000C == 0) { + if (this->id == 0x3D5 && target->rowIndex == 0 && target->columnIndex == 0) { CRenderObject* object = FindRenderObject(this->actor); if (object != nullptr) { @@ -378,7 +378,7 @@ void CThrowItemEffect::OnProcess() { } } - ++target->unknown_00E8; + ++target->elapsedFrames; } } @@ -397,22 +397,22 @@ void CThrowItemEffect::Render() { void CThrowItemEffect::InitTrajectory(CParticle* particle) { const float deltaX = this->sourcePosition[0] - this->position[0]; const float deltaZ = this->sourcePosition[2] - this->position[2]; - this->unknown_00DC = this->sourcePosition[1] - this->position[1]; + this->heightDelta = this->sourcePosition[1] - this->position[1]; const unsigned short heading = static_cast(static_cast(DirectionAngle(deltaX, deltaZ))); unsigned short offset = 0; if (this->id == 981) { - offset = static_cast(static_cast(360 / this->unknown_00D4) * static_cast(particle->unknown_0010)); + offset = static_cast(static_cast(360 / this->projectileCount) * static_cast(particle->rowIndex)); } - particle->unknown_004C = static_cast(heading + offset) % 360; + particle->phaseParameter = static_cast(heading + offset) % 360; const float distance = SquareRoot(deltaZ * deltaZ + deltaX * deltaX); - particle->unknown_0054 = distance; + particle->animationParameter = distance; for (int step = 0; step < 100; ++step) { - if (static_cast(step) * particle->unknown_00C0 > distance) { - this->unknown_00CC = step; + if (static_cast(step) * particle->speedParameter > distance) { + this->travelFrames = step; return; } } @@ -429,19 +429,19 @@ void CVolcanoEffect::AddRings() { continue; } - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = row; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = row; + particle->groupIndex = 1; switch (this->id) { case EF_GANBANTEIN: - particle->unknown_00C0 = 15.0f; - particle->unknown_004C = 70; - particle->unknown_0054 = 0.0f; - particle->unknown_0050 = 360; + particle->speedParameter = 15.0f; + particle->phaseParameter = 70; + particle->animationParameter = 0.0f; + particle->angleParameter = 360; particle->alpha = 1; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(row * 90); + *reinterpret_cast(&particle->angleBits) = static_cast(row * 90); particle->scale = static_cast(row) + 1.0f; break; case EF_VOLCANO: @@ -455,21 +455,21 @@ void CVolcanoEffect::AddRings() { case EF_GUMGANG7: case EF_GUMGANG8: case EF_GUMGANG9: - particle->unknown_00C0 = 25.0f; - particle->unknown_004C = 80; - particle->unknown_0054 = 0.0f; - particle->unknown_0050 = 360; + particle->speedParameter = 25.0f; + particle->phaseParameter = 80; + particle->animationParameter = 0.0f; + particle->angleParameter = 360; particle->alpha = 1; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(baseAngle); + *reinterpret_cast(&particle->angleBits) = static_cast(baseAngle); particle->scale = static_cast(row) + 1.0f; break; case EF_GUMGANG5: particle->alpha = 1; - particle->unknown_0050 = 360; - particle->unknown_00C0 = 25.0f; - particle->unknown_004C = 80; - *reinterpret_cast(&particle->unknown_00C4) = static_cast(row * 90); - particle->unknown_0054 = 0.0f; + particle->angleParameter = 360; + particle->speedParameter = 25.0f; + particle->phaseParameter = 80; + *reinterpret_cast(&particle->angleBits) = static_cast(row * 90); + particle->animationParameter = 0.0f; particle->scale = static_cast(row) + 1.0f; particle->SetColor(0, 0, 255); break; @@ -572,7 +572,7 @@ void CVolcanoEffect::OnProcess() { if (particle) { particle->scale += this->id == EF_GUMGANG2 ? 0.1f : 0.3f; - int tilt = particle->unknown_004C - 1; + int tilt = particle->phaseParameter - 1; if (this->id == EF_GUMGANG2) { if (tilt < 30) { tilt = 30; @@ -580,9 +580,9 @@ void CVolcanoEffect::OnProcess() { } else if (tilt < 40) { tilt = 40; } - particle->unknown_004C = tilt; + particle->phaseParameter = tilt; - float& spin = *reinterpret_cast(&particle->unknown_00C4); + float& spin = *reinterpret_cast(&particle->angleBits); spin = static_cast(static_cast(spin) + (this->id != EF_GUMGANG2) * 2 + 3); switch (this->id) { @@ -613,17 +613,17 @@ void CVolcanoEffect::OnProcess() { break; } - if (particle->unknown_00E8 > 10) { + if (particle->elapsedFrames > 10) { const int alpha = particle->alpha - fadeOut; particle->alpha = alpha > 0 ? alpha : 0; } else { particle->alpha += fadeIn; } - const int segment = particle->unknown_000C; - const float radius = g_sinTable[segment * 9] * particle->unknown_00C0; + const int segment = particle->columnIndex; + const float radius = g_sinTable[segment * 9] * particle->speedParameter; const int angle = - static_cast(static_cast(static_cast(static_cast(particle->unknown_0050) / 20.0f) * segment) + spin) % 360; + static_cast(static_cast(static_cast(static_cast(particle->angleParameter) / 20.0f) * segment) + spin) % 360; const float spread = radius * g_cosTable[tilt]; const float cosine = g_cosTable[angle]; const float sine = g_sinTable[angle]; @@ -657,7 +657,7 @@ void CVolcanoEffect::OnProcess() { this->lastOuter = corners[1]; } - ++particle->unknown_00E8; + ++particle->elapsedFrames; } } @@ -666,13 +666,13 @@ void CVolcanoEffect::OnProcess() { void CVolcanoEffect::Render() { for (auto it = this->particles.begin(); it != this->particles.end(); ++it) { CParticle* particle = *it; - if (!particle || particle->unknown_000C <= 0) { + if (!particle || particle->columnIndex <= 0) { continue; } particle->destinationBlend = 6; - const int segment = particle->unknown_000C; + const int segment = particle->columnIndex; ParticleQuad quad; quad.billboard = false; quad.unused = false; diff --git a/Source/Contents/Effects/ThrowEffects.h b/Source/Contents/Effects/ThrowEffects.h index 0426b01b4..5e5902bfc 100644 --- a/Source/Contents/Effects/ThrowEffects.h +++ b/Source/Contents/Effects/ThrowEffects.h @@ -23,17 +23,17 @@ public: void InitSpinParticle(CParticle* particle); void InitTrajectory(CParticle* particle); - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; - /* 00D4 */ int unknown_00D4; - /* 00D8 */ int unknown_00D8; - /* 00DC */ float unknown_00DC; - /* 00E0 */ float unknown_00E0; - /* 00E4 */ int unknown_00E4; - /* 00E8 */ float unknown_00E8; - /* 00EC */ float unknown_00EC; - /* 00F0 */ float unknown_00F0; - /* 00F4 */ float unknown_00F4; + /* 00CC */ int travelFrames; + /* 00D0 */ int launchDelay; + /* 00D4 */ int projectileCount; + /* 00D8 */ int trailCount; + /* 00DC */ float heightDelta; + /* 00E0 */ float arcHeight; + /* 00E4 */ int trailAlpha; + /* 00E8 */ float trailRotation; + /* 00EC */ float trailX; + /* 00F0 */ float trailY; + /* 00F4 */ float trailZ; /* 00F8 */ std::vector particles; }; diff --git a/Source/Contents/Effects/TriangleShotArrow.cpp b/Source/Contents/Effects/TriangleShotArrow.cpp index 403cd9332..56823542b 100644 --- a/Source/Contents/Effects/TriangleShotArrow.cpp +++ b/Source/Contents/Effects/TriangleShotArrow.cpp @@ -15,7 +15,7 @@ void FreeParticle(CParticle* particle); // OFFSET: 0x0072ED00 // FUNCTION: fn_07521 CTriangleShotArrow::CTriangleShotArrow() : CEffect(-1), current{}, direction{}, origin{} { - this->unknown_0050 = 0; + this->rotationParameter = 0; } // OFFSET: 0x0072EE80 diff --git a/Source/Contents/Effects/ViolentQuakeEffect.cpp b/Source/Contents/Effects/ViolentQuakeEffect.cpp index f59c51212..965bd1565 100644 --- a/Source/Contents/Effects/ViolentQuakeEffect.cpp +++ b/Source/Contents/Effects/ViolentQuakeEffect.cpp @@ -62,9 +62,9 @@ void CViolentQuakeEffect::Open() { case EF_UNK_1760: { CEZ2STRParticle* emitter = static_cast(CreateEZ2STRParticle(reinterpret_cast(this->position), 5)); emitter->Load(FormatOwnedString("violentquake\\violentquake\\violentquake_%02d.str", std::max(rand() % 3, 0) + 1)); - emitter->unknown_00D0 = 0.0f; - emitter->unknown_00D4 = -8.0f; - emitter->unknown_00D8 = 0.0f; + emitter->offsetX = 0.0f; + emitter->offsetY = -8.0f; + emitter->offsetZ = 0.0f; this->emitters.push_back(emitter); this->AddEvent(0, "effect\\AG_VIOLENT_QUAKE.wav", 0, 0); break; @@ -80,7 +80,7 @@ void CViolentQuakeEffect::Open() { bool CViolentQuakeEffect::IsAlive() { for (auto it = this->emitters.begin(); it != this->emitters.end(); ++it) { CEZ2STRParticle* emitter = *it; - if (emitter->life == 0.0f || (emitter->life * 60.0f > static_cast(emitter->unknown_00E8)) == true) { + if (emitter->life == 0.0f || (emitter->life * 60.0f > static_cast(emitter->elapsedFrames)) == true) { return true; } } @@ -101,9 +101,9 @@ void CViolentQuakeEffect::OnProcess() { const matrix view = static_cast(g_modeMgr.GetGameMode())->camera->frame.view; const matrix& inverse = static_cast(g_modeMgr.GetGameMode())->camera->frame.inverse; - const float viewX = view.values[0] * origin.x + view.values[3] * origin.y + view.values[6] * origin.z + view.values[9] + emitter->unknown_00D0; - const float viewY = view.values[1] * origin.x + view.values[4] * origin.y + view.values[7] * origin.z + view.values[10] + emitter->unknown_00D4; - const float viewZ = view.values[2] * origin.x + view.values[5] * origin.y + view.values[8] * origin.z + view.values[11] + emitter->unknown_00D8; + const float viewX = view.values[0] * origin.x + view.values[3] * origin.y + view.values[6] * origin.z + view.values[9] + emitter->offsetX; + const float viewY = view.values[1] * origin.x + view.values[4] * origin.y + view.values[7] * origin.z + view.values[10] + emitter->offsetY; + const float viewZ = view.values[2] * origin.x + view.values[5] * origin.y + view.values[8] * origin.z + view.values[11] + emitter->offsetZ; emitter->position.x = viewY * inverse.values[3] + viewX * inverse.values[0] + viewZ * inverse.values[6] + inverse.values[9]; emitter->position.y = viewY * inverse.values[4] + viewX * inverse.values[1] + viewZ * inverse.values[7] + inverse.values[10]; diff --git a/Source/Contents/Effects/WindEffect.cpp b/Source/Contents/Effects/WindEffect.cpp index 899805978..3421c0615 100644 --- a/Source/Contents/Effects/WindEffect.cpp +++ b/Source/Contents/Effects/WindEffect.cpp @@ -38,9 +38,9 @@ void CWindEffect::Init() { particle->alpha = alpha; particle->SetColor(this->red, this->green, this->blue); particle->scale = this->particleScale; - particle->unknown_0054 = this->ringCount > 1 ? this->height / static_cast(this->ringCount - 1) * static_cast(ring) : 0.0f; - particle->unknown_00C0 = this->angleSpeed; - particle->unknown_0050 = this->arcLength; + particle->animationParameter = this->ringCount > 1 ? this->height / static_cast(this->ringCount - 1) * static_cast(ring) : 0.0f; + particle->speedParameter = this->angleSpeed; + particle->angleParameter = this->arcLength; if (this->sourceBlend != -1) { particle->sourceBlend = this->sourceBlend; } @@ -48,13 +48,13 @@ void CWindEffect::Init() { particle->destinationBlend = this->destinationBlend; } particle->SetTexture(this->textureName); - *reinterpret_cast(&particle->unknown_00C4) = static_cast(segment) * step + static_cast(startAngle); - particle->unknown_00A8 = 0; + *reinterpret_cast(&particle->angleBits) = static_cast(segment) * step + static_cast(startAngle); + particle->animationState = 0; InitParticleQuad(particle->vertices); - particle->unknown_0004 = this->id; - particle->unknown_000C = segment; - particle->unknown_0010 = ring; - particle->unknown_0008 = 1; + particle->effectId = this->id; + particle->columnIndex = segment; + particle->rowIndex = ring; + particle->groupIndex = 1; this->particles.push_back(particle); } } @@ -98,12 +98,12 @@ void CWindEffect::OnProcess() { continue; } - switch (particle->unknown_00A8) { + switch (particle->animationState) { case 0: { int alpha = particle->alpha + 1; if (alpha >= this->maxAlpha) { alpha = this->maxAlpha; - particle->unknown_00A8 = 1; + particle->animationState = 1; } particle->alpha = alpha; break; @@ -112,15 +112,15 @@ void CWindEffect::OnProcess() { int alpha = particle->alpha - 1; if (alpha <= 0) { alpha = 0; - particle->unknown_00A8 = 0; + particle->animationState = 0; } particle->alpha = alpha; break; } } - float& angle = *reinterpret_cast(&particle->unknown_00C4); - float nextAngle = particle->unknown_00C0 + angle; + float& angle = *reinterpret_cast(&particle->angleBits); + float nextAngle = particle->speedParameter + angle; if (nextAngle > 360.0f) { nextAngle -= 360.0f; } @@ -132,7 +132,7 @@ void CWindEffect::OnProcess() { vector3d points[4] = {}; const float scale = particle->scale; points[0].x += scale * cosine; - points[0].y = scale * 0.0f - particle->unknown_0054; + points[0].y = scale * 0.0f - particle->animationParameter; points[0].z += scale * sine; points[1].x = (cosine + 0.0f) * this->width + points[0].x; points[1].y = this->width + points[0].y; @@ -152,7 +152,7 @@ void CWindEffect::OnProcess() { particle->vertices[3].y = bottom.y; particle->vertices[3].z = bottom.z; - if (particle->unknown_000C != 0) { + if (particle->columnIndex != 0) { particle->vertices[0].x = this->lastTop.x; particle->vertices[0].y = this->lastTop.y; particle->vertices[0].z = this->lastTop.z; @@ -175,7 +175,7 @@ void CWindEffect::Render() { continue; } - const int texPart = particle->unknown_000C; + const int texPart = particle->columnIndex; if (texPart <= 0) { continue; } diff --git a/Source/Contents/Emblems/EmblemDataMgr.cpp b/Source/Contents/Emblems/EmblemDataMgr.cpp index 5dfeb0902..7b108fea0 100644 --- a/Source/Contents/Emblems/EmblemDataMgr.cpp +++ b/Source/Contents/Emblems/EmblemDataMgr.cpp @@ -112,7 +112,7 @@ void CEmblemDataMgr::RefreshUrls(LuaScript& settings, LuaScript& tables, const c // OFFSET: 0x005EB260 // FUNCTION: fn_03972 void CEmblemDataMgr::Download(std::uint32_t guildId, std::uint32_t version) { - const std::string token(reinterpret_cast(&g_session.unknown_807C[0x08]), 16); + const std::string token(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16); g_asyncWorkMgr->DownloadEmblem( this->m_downloadUrl, g_session.m_aid, token, g_session.m_accountName, guildId, version, GetRagConnection() ); @@ -126,7 +126,7 @@ bool CEmblemDataMgr::Upload(std::uint32_t guildId, std::string path) { } std::string token; - token.assign(reinterpret_cast(&g_session.unknown_807C[0x08]), 16); + token.assign(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16); g_asyncWorkMgr->UploadEmblem(this->m_uploadUrl, g_session.m_aid, token, g_session.m_accountName, guildId, path); return true; diff --git a/Source/Contents/EnchantMgr.cpp b/Source/Contents/EnchantMgr.cpp index 756050f93..2961cbf00 100644 --- a/Source/Contents/EnchantMgr.cpp +++ b/Source/Contents/EnchantMgr.cpp @@ -103,7 +103,7 @@ void CEnchantMgr::HandleEnchantResult(int messageId, int itemId) { } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, this->m_request.index); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } diff --git a/Source/Contents/EntryQueueMgr.cpp b/Source/Contents/EntryQueueMgr.cpp index de43e4f3a..845f029e5 100644 --- a/Source/Contents/EntryQueueMgr.cpp +++ b/Source/Contents/EntryQueueMgr.cpp @@ -240,7 +240,7 @@ void CEntryQueueMgr::OnStatus(const EntryQueueStatus* packet) { if (window && this->current) { static_cast(window)->SetInfo( - packet->queueName, this->current->unknown_0210 + this->current->unknown_020C, packet->ranking + packet->queueName, this->current->maxLevel + this->current->minLevel, packet->ranking ); } diff --git a/Source/Contents/EntryQueueMgr.h b/Source/Contents/EntryQueueMgr.h index 7a7d81463..9174d70df 100644 --- a/Source/Contents/EntryQueueMgr.h +++ b/Source/Contents/EntryQueueMgr.h @@ -18,20 +18,20 @@ struct EntryQueueInfo { /* 0000 */ int id; /* 0004 */ char name[0x104]; /* 0108 */ char displayName[0x104]; - /* 020C */ int unknown_020C; - /* 0210 */ int unknown_0210; - /* 0214 */ unsigned char unknown_0214; - /* 0215 */ unsigned char unknown_0215; - /* 0216 */ unsigned char unknown_0216; - /* 0217 */ unsigned char unknown_0217; - /* 0218 */ unsigned char unknown_0218; - /* 021C */ int unknown_021C; - /* 0220 */ int unknown_0220; - /* 0224 */ char unknown_0224[0x104]; - /* 0328 */ char unknown_0328[0x104]; - /* 042C */ char unknown_042C[0x104]; - /* 0530 */ char unknown_0530[0x104]; - /* 0634 */ char unknown_0634[0x104]; + /* 020C */ int minLevel; + /* 0210 */ int maxLevel; + /* 0214 */ unsigned char queueFlagA; + /* 0215 */ unsigned char queueFlagB; + /* 0216 */ unsigned char queueFlagC; + /* 0217 */ unsigned char queueFlagD; + /* 0218 */ unsigned char limitType; + /* 021C */ int limitValue; + /* 0220 */ int limitValueEnd; + /* 0224 */ char description[0x104]; + /* 0328 */ char rulesText[0x104]; + /* 042C */ char rewardText[0x104]; + /* 0530 */ char extraText[0x104]; + /* 0634 */ char bitmapName[0x104]; }; struct EntryQueueNotice { @@ -95,9 +95,9 @@ void DestroyEntryQueueMgr(); static_assert(sizeof(EntryQueueInfo) == 0x738); static_assert(offsetof(EntryQueueStatus, ranking) == 0x1A); static_assert(sizeof(EntryQueueReady) == 0x32); -static_assert(offsetof(EntryQueueInfo, unknown_020C) == 0x20C); -static_assert(offsetof(EntryQueueInfo, unknown_021C) == 0x21C); -static_assert(offsetof(EntryQueueInfo, unknown_0634) == 0x634); +static_assert(offsetof(EntryQueueInfo, minLevel) == 0x20C); +static_assert(offsetof(EntryQueueInfo, limitValue) == 0x21C); +static_assert(offsetof(EntryQueueInfo, bitmapName) == 0x634); static_assert(offsetof(CEntryQueueMgr, characterName) == 0x1C); static_assert(offsetof(CEntryQueueMgr, current) == 0x34); static_assert(sizeof(CEntryQueueMgr) == 0x3C); diff --git a/Source/Contents/EquipmentResourceMgr.h b/Source/Contents/EquipmentResourceMgr.h index 4bc1601a4..e6b392a71 100644 --- a/Source/Contents/EquipmentResourceMgr.h +++ b/Source/Contents/EquipmentResourceMgr.h @@ -11,9 +11,9 @@ public: static void Destroy(); /* 0004 */ bool m_initialized; - /* 0008 */ std::vector unknown_0008; - /* 0014 */ std::vector unknown_0014; - /* 0020 */ std::vector unknown_0020; + /* 0008 */ std::vector resourceNamesA; + /* 0014 */ std::vector resourceNamesB; + /* 0020 */ std::vector resourceNamesC; // INLINED EquipmentResourceMgr() { diff --git a/Source/Contents/EquipmentResources.cpp b/Source/Contents/EquipmentResources.cpp index 8222c238b..e919b79b8 100644 --- a/Source/Contents/EquipmentResources.cpp +++ b/Source/Contents/EquipmentResources.cpp @@ -37,9 +37,9 @@ bool EquipmentResourceMgr::Create() { // OFFSET: 0x00BA9A60 // FUNCTION: fn_19744 void EquipmentResourceMgr::Clear() { - this->unknown_0008.clear(); - this->unknown_0014.clear(); - this->unknown_0020.clear(); + this->resourceNamesA.clear(); + this->resourceNamesB.clear(); + this->resourceNamesC.clear(); } // OFFSET: 0x00BA9AD0 diff --git a/Source/Contents/FlyingShipRouteInfo.cpp b/Source/Contents/FlyingShipRouteInfo.cpp index 894b816dc..123cb1e38 100644 --- a/Source/Contents/FlyingShipRouteInfo.cpp +++ b/Source/Contents/FlyingShipRouteInfo.cpp @@ -12,8 +12,8 @@ // OFFSET: 0x009105F0 // FUNCTION: fn_12503 CFlyingShipRouteInfo::CFlyingShipRouteInfo() - : unknown_0010(0), unknown_0014(0), unknown_0018(0), unknown_001C(0), unknown_0020(0), unknown_0024(0), unknown_0028(1), unknown_002C(0), unknown_0030(0), - unknown_0034(0) { + : unknown_0010(0), unknown_0014(0), segmentIndex(0), segmentProgress(0), segmentLength(0), travelledDistance(0), routeReset(1), routeType(0), lineColor(0), + routeState(0) { } // OFFSET: 0x00910A70 @@ -23,7 +23,7 @@ FlyingShipRouteEntry::FlyingShipRouteEntry(FlyingShipRouteEntry&& other) noexcep // OFFSET: 0x0092B000 // FUNCTION: fn_12657 void CFlyingShipRouteInfo::Draw(UIRoMapWnd* wnd) { - if (this->unknown_0038.empty()) { + if (this->lineTextureName.empty()) { return; } @@ -33,19 +33,19 @@ void CFlyingShipRouteInfo::Draw(UIRoMapWnd* wnd) { const FlyingShipRouteEntry& entry = this->entries[i + 1]; targets.insert(std::pair(entry.name, entry)); - CTexture* texture = g_texMgr.Load(this->unknown_0038.c_str(), 0, true, true, false); + CTexture* texture = g_texMgr.Load(this->lineTextureName.c_str(), 0, true, true, false); DrawScreenLine( - g_renderer->primitives, g_renderer->queues, from.unknown_002C[0], from.unknown_002C[1], entry.unknown_002C[0], entry.unknown_002C[1], 2, texture, - static_cast(this->unknown_0030), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd + g_renderer->primitives, g_renderer->queues, from.screenPosition[0], from.screenPosition[1], entry.screenPosition[0], entry.screenPosition[1], 2, texture, + static_cast(this->lineColor), g_renderer->fog.supported != 0, g_depthStart, g_depthEnd ); } - const FlyingShipRouteEntry& from = this->entries[this->unknown_0018]; - const FlyingShipRouteEntry& to = this->entries[this->unknown_0018 + 1]; + const FlyingShipRouteEntry& from = this->entries[this->segmentIndex]; + const FlyingShipRouteEntry& to = this->entries[this->segmentIndex + 1]; CTexture* head = g_texMgr.Load("유저인터페이스\\worldview_interface\\wv_airplen32.bmp", 0, true, true, false); CTexture* body = g_texMgr.Load("유저인터페이스\\worldview_interface\\wv_Airf.bmp", 0, true, true, false); wnd->DrawDashedArrow( - from.unknown_002C[0], from.unknown_002C[1], to.unknown_002C[0], to.unknown_002C[1], 0x10, 0x10, body, 0x14, head, this->unknown_001C, 0xFFFFFFFF, 6 + from.screenPosition[0], from.screenPosition[1], to.screenPosition[0], to.screenPosition[1], 0x10, 0x10, body, 0x14, head, this->segmentProgress, 0xFFFFFFFF, 6 ); for (std::map::iterator it = targets.begin(); it != targets.end(); ++it) { diff --git a/Source/Contents/FlyingShipRouteInfo.h b/Source/Contents/FlyingShipRouteInfo.h index cb11c0c16..92b92b0c5 100644 --- a/Source/Contents/FlyingShipRouteInfo.h +++ b/Source/Contents/FlyingShipRouteInfo.h @@ -12,7 +12,7 @@ struct FlyingShipRouteEntry { /* 0000 */ std::string name; /* 0018 */ int unknown_0018[4]; /* 0028 */ int unknown_0028; - /* 002C */ float unknown_002C[2]; + /* 002C */ float screenPosition[2]; /* 0034 */ float unknown_0034; /* 0038 */ float unknown_0038; @@ -37,21 +37,21 @@ public: /* 0004 */ std::vector entries; /* 0010 */ int unknown_0010; /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ float unknown_001C; - /* 0020 */ float unknown_0020; - /* 0024 */ float unknown_0024; - /* 0028 */ unsigned char unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ int unknown_0030; + /* 0018 */ int segmentIndex; + /* 001C */ float segmentProgress; + /* 0020 */ float segmentLength; + /* 0024 */ float travelledDistance; + /* 0028 */ unsigned char routeReset; + /* 002C */ int routeType; + /* 0030 */ int lineColor; union { - /* 0034 */ short unknown_0034; + /* 0034 */ short routeState; struct { /* 0034 */ unsigned char m_moving; /* 0035 */ unsigned char m_routeBuilt; }; }; - /* 0038 */ std::string unknown_0038; + /* 0038 */ std::string lineTextureName; }; #if defined(_WIN32) && !defined(_WIN64) @@ -60,9 +60,9 @@ static_assert(offsetof(FlyingShipRouteEntry, unknown_0018) == 0x18); static_assert(offsetof(FlyingShipRouteEntry, unknown_0038) == 0x38); static_assert(sizeof(CFlyingShipRouteInfo) == 0x50); static_assert(offsetof(CFlyingShipRouteInfo, entries) == 0x04); -static_assert(offsetof(CFlyingShipRouteInfo, unknown_0028) == 0x28); -static_assert(offsetof(CFlyingShipRouteInfo, unknown_0034) == 0x34); -static_assert(offsetof(CFlyingShipRouteInfo, unknown_0038) == 0x38); +static_assert(offsetof(CFlyingShipRouteInfo, routeReset) == 0x28); +static_assert(offsetof(CFlyingShipRouteInfo, routeState) == 0x34); +static_assert(offsetof(CFlyingShipRouteInfo, lineTextureName) == 0x38); #endif #endif diff --git a/Source/Contents/Ground/GroundDecals.cpp b/Source/Contents/Ground/GroundDecals.cpp index dc15d7fb0..a93737e8a 100644 --- a/Source/Contents/Ground/GroundDecals.cpp +++ b/Source/Contents/Ground/GroundDecals.cpp @@ -96,8 +96,8 @@ namespace { primitive->vertices[corner].v = scaleV * uv[corner * 2 + 1]; } - primitive->unknown_0018 = 5; - primitive->unknown_001C = 6; + primitive->sourceBlend = 5; + primitive->destinationBlend = 6; primitive->texture = &texture; for (unsigned corner = 0; corner < 4; ++corner) { @@ -186,8 +186,8 @@ void GroundGeometry::DrawTerrainOverlay( primitive->vertices[corner].diffuse = color; } - primitive->unknown_0018 = 5; - primitive->unknown_001C = 6; + primitive->sourceBlend = 5; + primitive->destinationBlend = 6; primitive->texture = texture; g_renderer->queues.Submit(primitive, 1, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } diff --git a/Source/Contents/Ground/GroundGeometry.cpp b/Source/Contents/Ground/GroundGeometry.cpp index 7d48813b0..dbea81e4d 100644 --- a/Source/Contents/Ground/GroundGeometry.cpp +++ b/Source/Contents/Ground/GroundGeometry.cpp @@ -76,7 +76,7 @@ namespace { // INLINED GroundBase::GroundBase() : terrain(nullptr), cellSize(10.0f), waterLevel(0.0f), waterAnimation(3), waterPitch(50), waterPhase(2), waterType(0), waterHeight(1.0f), - unknown_0050(0), unknown_0054(0), loaded(0) { + waterStateA(0), waterStateB(0), loaded(0) { } // INLINED @@ -106,8 +106,8 @@ void GroundGeometry::Reset(int columns, int rows) { this->height = rows; this->cells.resize(static_cast(columns) * static_cast(rows)); this->lighting.resize(4u * static_cast(columns) * static_cast(rows), {1.0f, 1.0f, 1.0f}); - this->unknown_005C = 0; - this->unknown_0058 = 0; + this->waterStateD = 0; + this->waterStateC = 0; } // OFFSET: 0x00AC0350 diff --git a/Source/Contents/Ground/GroundGeometry.h b/Source/Contents/Ground/GroundGeometry.h index 7fb40c95a..30126987b 100644 --- a/Source/Contents/Ground/GroundGeometry.h +++ b/Source/Contents/Ground/GroundGeometry.h @@ -14,7 +14,7 @@ struct GroundLightmap { /* 0000 */ unsigned char color[4]; /* 0004 */ CTexture* texture; /* 0008 */ float uv[4][2]; - /* 0028 */ std::uint32_t unknown_0028[4]; + /* 0028 */ std::uint32_t cornerColors[4]; }; class GroundLightmapSet { @@ -70,10 +70,10 @@ public: /* 0044 */ int waterPhase; /* 0048 */ int waterType; /* 004C */ float waterHeight; - /* 0050 */ std::uint32_t unknown_0050; - /* 0054 */ std::uint32_t unknown_0054; - /* 0058 */ std::uint32_t unknown_0058; - /* 005C */ std::uint32_t unknown_005C; + /* 0050 */ std::uint32_t waterStateA; + /* 0054 */ std::uint32_t waterStateB; + /* 0058 */ std::uint32_t waterStateC; + /* 005C */ std::uint32_t waterStateD; /* 0060 */ int loaded; }; @@ -124,7 +124,7 @@ public: static_assert(sizeof(GroundLightmap) == 56); static_assert(offsetof(GroundLightmap, texture) == 0x04); static_assert(offsetof(GroundLightmap, uv) == 0x08); -static_assert(offsetof(GroundLightmap, unknown_0028) == 0x28); +static_assert(offsetof(GroundLightmap, cornerColors) == 0x28); static_assert(sizeof(GroundLightmapSet) == 0x20); static_assert(offsetof(GroundLightmapSet, lightmapCount) == 0x18); static_assert(offsetof(GroundLightmapSet, atlasCount) == 0x1C); diff --git a/Source/Contents/Ground/GroundLightmaps.cpp b/Source/Contents/Ground/GroundLightmaps.cpp index d8b39e138..c75d2185d 100644 --- a/Source/Contents/Ground/GroundLightmaps.cpp +++ b/Source/Contents/Ground/GroundLightmaps.cpp @@ -69,7 +69,7 @@ void GroundLightmapSet::Build(CGndRes& resource) { for (unsigned corner = 0; corner < 4; ++corner) { const unsigned pixel = samples[corner]; - map.unknown_0028[corner] = (static_cast(decoded[pixel]) << 24) | (static_cast(decoded[64 + pixel * 3]) << 16) | + map.cornerColors[corner] = (static_cast(decoded[pixel]) << 24) | (static_cast(decoded[64 + pixel * 3]) << 16) | (static_cast(decoded[65 + pixel * 3]) << 8) | decoded[66 + pixel * 3]; } } diff --git a/Source/Contents/Ground/GroundSamples.cpp b/Source/Contents/Ground/GroundSamples.cpp index 73d8df57e..a4c306a04 100644 --- a/Source/Contents/Ground/GroundSamples.cpp +++ b/Source/Contents/Ground/GroundSamples.cpp @@ -48,10 +48,10 @@ int GroundBase::Lighting(int, int, float&, float&, float&) const { // INLINED static __forceinline void ReadLightmapSample(const GroundCell& cell, unsigned sample, unsigned char& alpha, unsigned char& red, unsigned char& green, unsigned char& blue) { - alpha = static_cast(cell.top->lightmap->unknown_0028[sample] >> 24); - red = static_cast(cell.top->lightmap->unknown_0028[sample] >> 16); - green = static_cast(cell.top->lightmap->unknown_0028[sample] >> 8); - blue = static_cast(cell.top->lightmap->unknown_0028[sample]); + alpha = static_cast(cell.top->lightmap->cornerColors[sample] >> 24); + red = static_cast(cell.top->lightmap->cornerColors[sample] >> 16); + green = static_cast(cell.top->lightmap->cornerColors[sample] >> 8); + blue = static_cast(cell.top->lightmap->cornerColors[sample]); } // OFFSET: 0x00AC11D0 diff --git a/Source/Contents/Ground/GroundWaterRendering.cpp b/Source/Contents/Ground/GroundWaterRendering.cpp index 4843d9749..d276105b8 100644 --- a/Source/Contents/Ground/GroundWaterRendering.cpp +++ b/Source/Contents/Ground/GroundWaterRendering.cpp @@ -103,7 +103,7 @@ void GroundGeometry::DrawWaterCell( primitive->vertices[corner].v = (corner & 2) ? bottom : top; } - primitive->unknown_0014 = (primitive->unknown_0014 & 0xFF00u) | 1u; + primitive->depthFlags = (primitive->depthFlags & 0xFF00u) | 1u; primitive->texture = surface.texture; g_renderer->queues.Submit(primitive, 1, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } diff --git a/Source/Contents/GuildInfo.cpp b/Source/Contents/GuildInfo.cpp index a505e3058..561be5945 100644 --- a/Source/Contents/GuildInfo.cpp +++ b/Source/Contents/GuildInfo.cpp @@ -22,7 +22,7 @@ GuildInfo::GuildInfo() { // OFFSET: 0x00AE40C0 // FUNCTION: fn_18029 void GuildInfo::AddUnknown00EC(const Unknown00ECEntry& entry) { - this->unknown_00EC.push_back(entry); + this->bannedMembers.push_back(entry); g_windowMgr.RefreshGuildWindows(); } @@ -41,7 +41,7 @@ void GuildInfo::ChangeMemberPosition(int aid, int cid, int position) { // OFFSET: 0x00AE4230 // FUNCTION: fn_18031 void GuildInfo::ClearUnknown0114() { - this->unknown_0114.clear(); + this->agitIds.clear(); } // OFFSET: 0x00AE4240 @@ -53,9 +53,9 @@ void GuildInfo::ClearMembers() { // OFFSET: 0x00AE4270 // FUNCTION: fn_18033 void GuildInfo::RemoveUnknown0114(int value) { - for (auto it = this->unknown_0114.begin(); it != this->unknown_0114.end(); ++it) { + for (auto it = this->agitIds.begin(); it != this->agitIds.end(); ++it) { if (*it == value) { - this->unknown_0114.erase(it); + this->agitIds.erase(it); return; } } @@ -64,9 +64,9 @@ void GuildInfo::RemoveUnknown0114(int value) { // OFFSET: 0x00AE42C0 // FUNCTION: fn_18034 void GuildInfo::RemoveRelatedGuild(int unknown_0000, int unknown_0004) { - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { - if (it->unknown_0000 == unknown_0000 && it->unknown_0004 == unknown_0004) { - this->unknown_00E4.erase(it); + for (auto it = this->relatedGuilds.begin(); it != this->relatedGuilds.end(); ++it) { + if (it->guildId == unknown_0000 && it->relation == unknown_0004) { + this->relatedGuilds.erase(it); g_windowMgr.RefreshGuildWindows(); return; } @@ -87,15 +87,15 @@ int GuildInfo::GetMemberAccountId(const char* name) { // OFFSET: 0x00AE43E0 // FUNCTION: fn_18036 int GuildInfo::GetUnknown0114(int index) { - return this->unknown_0114[index]; + return this->agitIds[index]; } // OFFSET: 0x00AE4690 // FUNCTION: fn_18037 int GuildInfo::CountRelatedGuilds(int unknown_0004) { int count = 0; - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { - if (it->unknown_0004 == unknown_0004) { + for (auto it = this->relatedGuilds.begin(); it != this->relatedGuilds.end(); ++it) { + if (it->relation == unknown_0004) { ++count; } } @@ -105,7 +105,7 @@ int GuildInfo::CountRelatedGuilds(int unknown_0004) { // OFFSET: 0x00AE46C0 // FUNCTION: fn_18038 int GuildInfo::GetUnknown0114Count() { - return static_cast(this->unknown_0114.size()); + return static_cast(this->agitIds.size()); } // OFFSET: 0x00AE4740 @@ -118,48 +118,48 @@ void GuildInfo::Init() { static_cast(g_modeMgr.GetGameMode())->scene->player->SetGdid(0); } - this->unknown_00AC = 0; - this->unknown_00B0 = 0; - this->unknown_00B4 = 0; - this->unknown_00D0 = 0; - this->unknown_00B8 = 0; - this->unknown_00A4 = -1; - this->unknown_00BC = 0; - this->unknown_00C0 = 0; - this->unknown_00C4 = 0; - this->unknown_00C8 = 0; - this->unknown_00CC = 0; - this->unknown_0000.clear(); - this->unknown_0018.clear(); - this->unknown_0030.clear(); - this->unknown_0048.clear(); - this->unknown_0060 = 0; - this->unknown_0064 = 0; - this->unknown_006C = 0; - this->unknown_0070 = 0; - this->unknown_0074.clear(); - this->unknown_008C = 0; - this->unknown_0090 = 0; - this->unknown_0094 = 0; - this->unknown_0098 = 0; - this->unknown_009C = 0; - this->unknown_00A0 = 0; - this->unknown_00D4.clear(); + this->canInvite = 0; + this->canExpel = 0; + this->isMaster = 0; + this->masterCharacterId = 0; + this->requestState = 0; + this->guildTabBitmask = -1; + this->infoRequested = 0; + this->membersRequested = 0; + this->positionsRequested = 0; + this->skillsRequested = 0; + this->bansRequested = 0; + this->guildName.clear(); + this->masterName.clear(); + this->subject.clear(); + this->notice.clear(); + this->guildLevel = 0; + this->memberCount = 0; + this->maxMemberCount = 0; + this->memberAverageLevel = 0; + this->manageLand.clear(); + this->exp = 0; + this->nextExp = 0; + this->emblem = 0; + this->points = 0; + this->honor = 0; + this->virtue = 0; + this->positions.clear(); this->m_members.clear(); - this->unknown_00E4.clear(); - this->unknown_00EC.clear(); - this->unknown_00F4.clear(); + this->relatedGuilds.clear(); + this->bannedMembers.clear(); + this->guildList.clear(); this->m_positions.clear(); - this->unknown_0104.clear(); - this->unknown_010C.clear(); - this->unknown_0114.clear(); + this->pendingMemberPositions.clear(); + this->pendingPositionChanges.clear(); + this->agitIds.clear(); } // OFFSET: 0x00AE49F0 // FUNCTION: fn_18040 bool GuildInfo::HasRelatedGuild(int unknown_0000) { - for (auto it = this->unknown_00E4.begin(); it != this->unknown_00E4.end(); ++it) { - if (it->unknown_0000 == unknown_0000 && it->unknown_0004 == 0) { + for (auto it = this->relatedGuilds.begin(); it != this->relatedGuilds.end(); ++it) { + if (it->guildId == unknown_0000 && it->relation == 0) { return true; } } @@ -219,8 +219,8 @@ int GuildInfo::DeleteMember(const char* name) { // OFFSET: 0x00AE4D30 // FUNCTION: fn_18044 void GuildInfo::UpdateCharacterName(int characterId, const char* name) { - if (this->unknown_00D0 == characterId) { - this->unknown_0018 = name; + if (this->masterCharacterId == characterId) { + this->masterName = name; } std::string unknownName = LookupMessage(MSI_NAMELESS_USER); @@ -233,7 +233,7 @@ void GuildInfo::UpdateCharacterName(int characterId, const char* name) { } } - for (auto it = this->unknown_00EC.begin(); it != this->unknown_00EC.end(); ++it) { + for (auto it = this->bannedMembers.begin(); it != this->bannedMembers.end(); ++it) { if (it->characterId == characterId) { if (it->name.empty() || it->name == unknownName) { it->name = name; @@ -252,9 +252,9 @@ void GuildInfo::UpdateCharacterName(int characterId, const char* name) { void GuildInfo::UpdateMemberStatus(int accountId, int online, int characterId, short unknown_002C, short unknown_0020, short unknown_0024) { for (auto it = this->m_members.begin(); it != this->m_members.end(); ++it) { if (characterId == it->characterId) { - it->unknown_002C = unknown_002C; - it->unknown_0020 = unknown_0020; - it->unknown_0024 = unknown_0024; + it->sex = unknown_002C; + it->head = unknown_0020; + it->headPalette = unknown_0024; it->online = online; break; } @@ -266,7 +266,7 @@ void GuildInfo::UpdateMemberStatus(int accountId, int online, int characterId, s ++count; } } - this->unknown_0068 = count; + this->onlineMemberCount = count; g_windowMgr.RefreshGuildWindows(); } @@ -286,22 +286,22 @@ void GuildInfo::SetMemberOnline(int accountId, int online) { ++count; } } - this->unknown_0068 = count; + this->onlineMemberCount = count; g_windowMgr.RefreshGuildWindows(); } // OFFSET: 0x00AE5030 // FUNCTION: fn_18047 void GuildInfo::SetMasterCharacterId(int characterId) { - this->unknown_00D0 = characterId; - this->unknown_00B4 = characterId == static_cast(g_session.m_gid); + this->masterCharacterId = characterId; + this->isMaster = characterId == static_cast(g_session.m_gid); } // OFFSET: 0x00AE5090 // FUNCTION: fn_18048 void GuildInfo::UpdateUnknown00D4(Unknown00D4Entry entry) { - for (auto it = this->unknown_00D4.begin(); it != this->unknown_00D4.end(); ++it) { - if (it->unknown_0004 == entry.unknown_0004) { + for (auto it = this->positions.begin(); it != this->positions.end(); ++it) { + if (it->positionId == entry.positionId) { *it = entry; return; } @@ -311,13 +311,13 @@ void GuildInfo::UpdateUnknown00D4(Unknown00D4Entry entry) { // OFFSET: 0x00AE3F40 // FUNCTION: fn_18027 void GuildInfo::AddUnknown0114(int value) { - const auto found = std::find_if(this->unknown_0114.begin(), this->unknown_0114.end(), + const auto found = std::find_if(this->agitIds.begin(), this->agitIds.end(), [value](int entry) { return value == entry; }); - if (found != this->unknown_0114.end()) { + if (found != this->agitIds.end()) { return; } - this->unknown_0114.push_back(value); + this->agitIds.push_back(value); } // OFFSET: 0x00AE3FA0 diff --git a/Source/Contents/GuildInfo.h b/Source/Contents/GuildInfo.h index 218491f30..cdef706f4 100644 --- a/Source/Contents/GuildInfo.h +++ b/Source/Contents/GuildInfo.h @@ -20,80 +20,80 @@ public: /* 0000 */ int accountId; /* 0004 */ int characterId; /* 0008 */ std::string name; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; + /* 0020 */ int head; + /* 0024 */ int headPalette; /* 0028 */ int job; - /* 002C */ int unknown_002C; + /* 002C */ int sex; /* 0030 */ int positionId; /* 0034 */ std::string positionName; /* 004C */ int level; - /* 0050 */ std::string unknown_0050; + /* 0050 */ std::string memo; /* 0068 */ float expRatio; /* 006C */ int exp; /* 0070 */ int online; - /* 0074 */ unsigned char unknown_0074[0x04]; + /* 0074 */ unsigned char lastOfflineTime[0x04]; }; struct Unknown00D4Entry { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ std::string unknown_0008; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; + /* 0000 */ int ranking; + /* 0004 */ int positionId; + /* 0008 */ std::string name; + /* 0020 */ int canInvite; + /* 0024 */ int canExpel; + /* 0028 */ int tax; + /* 002C */ int canStorage; }; struct RelatedGuild { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ std::string unknown_0008; + /* 0000 */ int guildId; + /* 0004 */ int relation; + /* 0008 */ std::string name; }; struct Unknown00ECEntry { /* 0000 */ int characterId; /* 0004 */ std::string name; - /* 001C */ std::string unknown_001C; - /* 0034 */ std::string unknown_0034; + /* 001C */ std::string accountName; + /* 0034 */ std::string reason; }; - /* 0000 */ std::string unknown_0000; - /* 0018 */ std::string unknown_0018; - /* 0030 */ std::string unknown_0030; - /* 0048 */ std::string unknown_0048; - /* 0060 */ int unknown_0060; - /* 0064 */ int unknown_0064; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; - /* 0070 */ int unknown_0070; - /* 0074 */ std::string unknown_0074; - /* 008C */ int unknown_008C; - /* 0090 */ int unknown_0090; - /* 0094 */ int unknown_0094; - /* 0098 */ int unknown_0098; - /* 009C */ int unknown_009C; - /* 00A0 */ int unknown_00A0; - /* 00A4 */ int unknown_00A4; + /* 0000 */ std::string guildName; + /* 0018 */ std::string masterName; + /* 0030 */ std::string subject; + /* 0048 */ std::string notice; + /* 0060 */ int guildLevel; + /* 0064 */ int memberCount; + /* 0068 */ int onlineMemberCount; + /* 006C */ int maxMemberCount; + /* 0070 */ int memberAverageLevel; + /* 0074 */ std::string manageLand; + /* 008C */ int exp; + /* 0090 */ int nextExp; + /* 0094 */ int emblem; + /* 0098 */ int points; + /* 009C */ int honor; + /* 00A0 */ int virtue; + /* 00A4 */ int guildTabBitmask; /* 00A8 */ std::uint32_t m_guildId; - /* 00AC */ int unknown_00AC; - /* 00B0 */ int unknown_00B0; - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; - /* 00D0 */ std::uint32_t unknown_00D0; - /* 00D4 */ std::list unknown_00D4; + /* 00AC */ int canInvite; + /* 00B0 */ int canExpel; + /* 00B4 */ int isMaster; + /* 00B8 */ int requestState; + /* 00BC */ int infoRequested; + /* 00C0 */ int membersRequested; + /* 00C4 */ int positionsRequested; + /* 00C8 */ int skillsRequested; + /* 00CC */ int bansRequested; + /* 00D0 */ std::uint32_t masterCharacterId; + /* 00D4 */ std::list positions; /* 00DC */ std::list m_members; - /* 00E4 */ std::list unknown_00E4; - /* 00EC */ std::list unknown_00EC; - /* 00F4 */ std::list unknown_00F4; + /* 00E4 */ std::list relatedGuilds; + /* 00EC */ std::list bannedMembers; + /* 00F4 */ std::list guildList; /* 00FC */ std::map m_positions; - /* 0104 */ std::map unknown_0104; - /* 010C */ std::map unknown_010C; - /* 0114 */ std::vector unknown_0114; + /* 0104 */ std::map pendingMemberPositions; + /* 010C */ std::map pendingPositionChanges; + /* 0114 */ std::vector agitIds; GuildInfo(); void ChangeMemberPosition(int aid, int cid, int position); @@ -139,8 +139,8 @@ static_assert(sizeof(GuildInfo::RelatedGuild) == 0x20); static_assert(sizeof(GuildInfo::Unknown00ECEntry) == 0x4C); static_assert(offsetof(GuildInfo::Unknown00ECEntry, characterId) == 0x00); static_assert(offsetof(GuildInfo::Unknown00ECEntry, name) == 0x04); -static_assert(offsetof(GuildInfo::Unknown00ECEntry, unknown_001C) == 0x1C); -static_assert(offsetof(GuildInfo::Unknown00ECEntry, unknown_0034) == 0x34); +static_assert(offsetof(GuildInfo::Unknown00ECEntry, accountName) == 0x1C); +static_assert(offsetof(GuildInfo::Unknown00ECEntry, reason) == 0x34); static_assert(sizeof(GuildInfo) == 0x120); static_assert(offsetof(GuildInfo, m_guildId) == 0xA8); diff --git a/Source/Contents/HeadResources.cpp b/Source/Contents/HeadResources.cpp index 8c4123b05..5671be8dc 100644 --- a/Source/Contents/HeadResources.cpp +++ b/Source/Contents/HeadResources.cpp @@ -105,19 +105,19 @@ int CSession::GetDisplayJob() { return job + 13; } } else if (job == 4058) { - if (g_session.unknown_8074 != 0) { + if (g_session.madogearType != 0) { return job + 28; } } else if (job == 4064) { - if (g_session.unknown_8074 != 0) { + if (g_session.madogearType != 0) { return job + 23; } } else if (job == 4100) { - if (g_session.unknown_8074 != 0) { + if (g_session.madogearType != 0) { return job + 12; } } else if (job == 4253) { - if (g_session.unknown_8074 != 0) { + if (g_session.madogearType != 0) { return job + 26; } } else if (job == 4226) { @@ -298,7 +298,7 @@ std::string CSession::GetHeadPalName(int head, int job, int sex, int palette) { // OFFSET: 0x00DDCF60 // FUNCTION: fn_23376 std::string CSession::GetPlayerHeadPalName() { - return g_equipmentResourceMgr->GetHeadPalName(this->m_head, this->m_job, this->unknown_0E98, this->m_headPalette); + return g_equipmentResourceMgr->GetHeadPalName(this->m_head, this->m_job, this->cachedSex, this->m_headPalette); } // OFFSET: 0x00DDCFE0 diff --git a/Source/Contents/HitSounds.cpp b/Source/Contents/HitSounds.cpp index 2b8be679d..9c8fbdc9f 100644 --- a/Source/Contents/HitSounds.cpp +++ b/Source/Contents/HitSounds.cpp @@ -10,7 +10,7 @@ // FUNCTION: fn_23395 const char* CSession::GetHitWaveName(int job) { if (!((job >= 31 && job < 1000) || job < 0 || (job > 1000 && job < 3999) || (job >= 20021 && job <= 31999))) { - const std::vector& jobWaves = reinterpret_cast&>(this->unknown_525C[0x0C]); + const std::vector& jobWaves = reinterpret_cast&>(this->weaponSoundTables[0x0C]); if (job > 3950) { return jobWaves.begin()[job - 3950].c_str(); } @@ -31,7 +31,7 @@ const char* CSession::GetHitWaveName(int job) { } } - const std::vector& weaponWaves = reinterpret_cast&>(this->unknown_525C[0x18]); + const std::vector& weaponWaves = reinterpret_cast&>(this->weaponSoundTables[0x18]); if (weaponWaves.empty() || weaponWaves.size() <= static_cast(weapon)) { return nullptr; } @@ -73,7 +73,7 @@ const char* CSession::GetWeaponHitWaveName(int weapon) { } } - const std::vector& weaponWaves = reinterpret_cast&>(this->unknown_525C[0x18]); + const std::vector& weaponWaves = reinterpret_cast&>(this->weaponSoundTables[0x18]); if (weaponWaves.empty() || weaponWaves.size() <= static_cast(realWeapon)) { return nullptr; } @@ -101,7 +101,7 @@ const char* CSession::GetWeaponHitWaveName(int weapon) { // OFFSET: 0x00DE5BD0 // FUNCTION: fn_23494 void CSession::InitJobHitWaveNames() { - std::vector& jobWaves = reinterpret_cast&>(this->unknown_525C[0x0C]); + std::vector& jobWaves = reinterpret_cast&>(this->weaponSoundTables[0x0C]); jobWaves.clear(); jobWaves.resize(28053, "player_clothes.wav"); jobWaves[0] = "player_clothes.wav"; diff --git a/Source/Contents/Items/BarterMarketItemMgr.cpp b/Source/Contents/Items/BarterMarketItemMgr.cpp index ea498c0b9..1179465b2 100644 --- a/Source/Contents/Items/BarterMarketItemMgr.cpp +++ b/Source/Contents/Items/BarterMarketItemMgr.cpp @@ -850,7 +850,7 @@ void CExpandedBarterMarketItemMgr::LoadInventoryItems() for (int i = 0; i < count; ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); if (item.identified) { - this->itemInfos.insert(std::make_pair(item.unknown_0060, item)); + this->itemInfos.insert(std::make_pair(item.refiningLevel, item)); } } } @@ -867,7 +867,7 @@ bool CExpandedBarterMarketItemMgr::HasRequiredItems() if (it == this->itemInfos.end()) { return false; } - if (std::atoi(it->second.itemId.c_str()) == chunk->field_0 && (chunk->field_4 <= 0 || it->second.unknown_0060 >= chunk->field_4)) { + if (std::atoi(it->second.itemId.c_str()) == chunk->field_0 && (chunk->field_4 <= 0 || it->second.refiningLevel >= chunk->field_4)) { if (it->second.quantity > required) { it->second.quantity -= required; break; diff --git a/Source/Contents/Items/ItemDescription.cpp b/Source/Contents/Items/ItemDescription.cpp index 5afda2348..83dbff7d0 100644 --- a/Source/Contents/Items/ItemDescription.cpp +++ b/Source/Contents/Items/ItemDescription.cpp @@ -13,8 +13,8 @@ std::map g_itemDescriptions; // OFFSET: 0x006D3540 // FUNCTION: fn_06540 ITEM_DESC::ITEM_DESC() - : identifiedName(nullptr), identifiedResource(nullptr), unidentifiedName(nullptr), unidentifiedResource(nullptr), unknown_002C(0), slots(0), - unknown_0040(0) { + : identifiedName(nullptr), identifiedResource(nullptr), unidentifiedName(nullptr), unidentifiedResource(nullptr), descriptionFlags(0), slots(0), + viewId(0) { } #pragma inline_depth(0) @@ -36,10 +36,10 @@ ITEM_DESC& ITEM_DESC::operator=(const ITEM_DESC& other) { this->unidentifiedName = other.unidentifiedName; this->unidentifiedResource = other.unidentifiedResource; this->unidentifiedDescription.assign(other.unidentifiedDescription.begin(), other.unidentifiedDescription.end()); - this->unknown_002C = other.unknown_002C; + this->descriptionFlags = other.descriptionFlags; this->slots = other.slots; - this->unknown_0034.assign(other.unknown_0034.begin(), other.unknown_0034.end()); - this->unknown_0040 = other.unknown_0040; + this->descriptionValues.assign(other.descriptionValues.begin(), other.descriptionValues.end()); + this->viewId = other.viewId; return *this; } diff --git a/Source/Contents/Items/ItemDescription.h b/Source/Contents/Items/ItemDescription.h index a3ee793d8..c83b2dc03 100644 --- a/Source/Contents/Items/ItemDescription.h +++ b/Source/Contents/Items/ItemDescription.h @@ -20,10 +20,10 @@ public: /* 0018 */ const char* unidentifiedName; /* 001C */ const char* unidentifiedResource; /* 0020 */ std::vector unidentifiedDescription; - /* 002C */ int unknown_002C; + /* 002C */ int descriptionFlags; /* 0030 */ int slots; - /* 0034 */ std::vector unknown_0034; - /* 0040 */ int unknown_0040; + /* 0034 */ std::vector descriptionValues; + /* 0040 */ int viewId; }; extern std::map g_itemDescriptions; diff --git a/Source/Contents/Items/ItemInfo.cpp b/Source/Contents/Items/ItemInfo.cpp index 11ec99665..e1dbc0dbf 100644 --- a/Source/Contents/Items/ItemInfo.cpp +++ b/Source/Contents/Items/ItemInfo.cpp @@ -75,130 +75,130 @@ __declspec(noinline) ITEM_INFO::ITEM_INFO(int) { // OFFSET: 0x005D8F90 // FUNCTION: fn_03753 -ITEM_INFO::ITEM_INFO(const ITEM_INFO& other) : itemId(other.itemId), unknown_0044(other.unknown_0044) { - std::memcpy(this->unknown_0000, other.unknown_0000, sizeof(this->unknown_0000)); +ITEM_INFO::ITEM_INFO(const ITEM_INFO& other) : itemId(other.itemId), displayName(other.displayName) { + std::memcpy(this->identity, other.identity, sizeof(this->identity)); this->quantity = other.quantity; - std::memcpy(this->unknown_0014, other.unknown_0014, sizeof(this->unknown_0014)); - std::memcpy(this->unknown_001C, other.unknown_001C, sizeof(this->unknown_001C)); + std::memcpy(this->prices, other.prices, sizeof(this->prices)); + std::memcpy(this->cards, other.cards, sizeof(this->cards)); this->identified = other.identified; - this->unknown_005D = other.unknown_005D; - this->unknown_0060 = other.unknown_0060; - this->unknown_0064 = other.unknown_0064; - this->unknown_0066 = other.unknown_0066; - this->unknown_0068 = other.unknown_0068; - this->unknown_006C = other.unknown_006C; - this->unknown_0070 = other.unknown_0070; - std::memcpy(this->unknown_0074, other.unknown_0074, sizeof(this->unknown_0074)); - std::memcpy(this->unknown_0078, other.unknown_0078, sizeof(this->unknown_0078)); - this->unknown_0088 = other.unknown_0088; - this->unknown_0090 = other.unknown_0090; - this->unknown_0098 = other.unknown_0098; - std::memcpy(this->unknown_009C, other.unknown_009C, sizeof(this->unknown_009C)); - std::memcpy(this->unknown_00B8, other.unknown_00B8, sizeof(this->unknown_00B8)); - this->unknown_00C0 = other.unknown_00C0; - std::memcpy(this->unknown_00C1, other.unknown_00C1, sizeof(this->unknown_00C1)); - std::memcpy(this->unknown_00D9, other.unknown_00D9, sizeof(this->unknown_00D9)); + this->damaged = other.damaged; + this->refiningLevel = other.refiningLevel; + this->bindOnEquip = other.bindOnEquip; + this->durationInHours = other.durationInHours; + this->expireTime = other.expireTime; + this->priceFactor = other.priceFactor; + this->sprite = other.sprite; + std::memcpy(this->flags, other.flags, sizeof(this->flags)); + std::memcpy(this->saleData, other.saleData, sizeof(this->saleData)); + this->grade = other.grade; + this->productId = other.productId; + this->optionCount = other.optionCount; + std::memcpy(this->options, other.options, sizeof(this->options)); + std::memcpy(this->recordIds, other.recordIds, sizeof(this->recordIds)); + this->recordType = other.recordType; + std::memcpy(this->recordName, other.recordName, sizeof(this->recordName)); + std::memcpy(this->recordDate, other.recordDate, sizeof(this->recordDate)); } // OFFSET: 0x006D52B0 // FUNCTION: fn_06569 __declspec(noinline) ITEM_INFO& ITEM_INFO::operator=(const ITEM_INFO& other) { for (int index = 0; index < 4; ++index) { - this->unknown_0000[index] = other.unknown_0000[index]; + this->identity[index] = other.identity[index]; } this->quantity = other.quantity; - this->unknown_0014[0] = other.unknown_0014[0]; - this->unknown_0014[1] = other.unknown_0014[1]; - memcpy_s(this->unknown_001C, sizeof(this->unknown_001C), other.unknown_001C, sizeof(other.unknown_001C)); + this->prices[0] = other.prices[0]; + this->prices[1] = other.prices[1]; + memcpy_s(this->cards, sizeof(this->cards), other.cards, sizeof(other.cards)); this->itemId = other.itemId; - this->unknown_0044 = other.unknown_0044; + this->displayName = other.displayName; this->identified = other.identified; - this->unknown_005D = other.unknown_005D; - this->unknown_0060 = other.unknown_0060; - this->unknown_0064 = other.unknown_0064; - this->unknown_0066 = other.unknown_0066; - this->unknown_0068 = other.unknown_0068; - this->unknown_006C = other.unknown_006C; - this->unknown_0070 = other.unknown_0070; - this->unknown_0074[0] = other.unknown_0074[0]; - this->unknown_0074[1] = other.unknown_0074[1]; - this->unknown_0074[2] = other.unknown_0074[2]; - this->unknown_0098 = other.unknown_0098; - memcpy_s(this->unknown_009C, sizeof(this->unknown_009C), other.unknown_009C, sizeof(other.unknown_009C)); - this->unknown_0074[3] = other.unknown_0074[3]; - this->unknown_0078[0] = other.unknown_0078[0]; - this->unknown_0078[3] = other.unknown_0078[3]; - this->unknown_0078[1] = other.unknown_0078[1]; - this->unknown_0078[2] = other.unknown_0078[2]; - this->unknown_0088 = other.unknown_0088; - this->unknown_0090 = other.unknown_0090; + this->damaged = other.damaged; + this->refiningLevel = other.refiningLevel; + this->bindOnEquip = other.bindOnEquip; + this->durationInHours = other.durationInHours; + this->expireTime = other.expireTime; + this->priceFactor = other.priceFactor; + this->sprite = other.sprite; + this->flags[0] = other.flags[0]; + this->flags[1] = other.flags[1]; + this->flags[2] = other.flags[2]; + this->optionCount = other.optionCount; + memcpy_s(this->options, sizeof(this->options), other.options, sizeof(other.options)); + this->flags[3] = other.flags[3]; + this->saleData[0] = other.saleData[0]; + this->saleData[3] = other.saleData[3]; + this->saleData[1] = other.saleData[1]; + this->saleData[2] = other.saleData[2]; + this->grade = other.grade; + this->productId = other.productId; return *this; } // OFFSET: 0x006D5550 // FUNCTION: fn_06573 std::uint32_t ITEM_INFO::Assign(const RawItemData& item) { - this->unknown_0000[0] = item.unknown_0018; - this->unknown_0000[1] = item.unknown_0004; + this->identity[0] = item.type; + this->identity[1] = item.index; this->quantity = item.quantity; - this->unknown_0014[0] = item.unknown_0008; - this->unknown_0014[1] = item.unknown_000C; + this->prices[0] = item.price; + this->prices[1] = item.realPrice; for (int index = 0; index < 4; ++index) { - std::memcpy(this->unknown_001C + index * 4, &item.cards[index], sizeof(item.cards[index])); + std::memcpy(this->cards + index * 4, &item.cards[index], sizeof(item.cards[index])); } this->itemId = item.itemId; this->identified = item.identified; - this->unknown_0060 = item.unknown_001C; + this->refiningLevel = item.refiningLevel; - this->unknown_0098 = item.optionCount > 5 ? 0 : item.optionCount; + this->optionCount = item.optionCount > 5 ? 0 : item.optionCount; - for (int index = 0; index < this->unknown_0098; ++index) { - std::memcpy(this->unknown_009C + index * 5, item.options + index * 5, 5); + for (int index = 0; index < this->optionCount; ++index) { + std::memcpy(this->options + index * 5, item.options + index * 5, 5); } - this->unknown_0088 = item.unknown_00AC; - this->unknown_0074[3] = item.unknown_00AE; - this->unknown_0000[2] = item.unknown_00B0; - this->unknown_0070 = item.unknown_00B8; + this->grade = item.grade; + this->flags[3] = item.hasIndex; + this->identity[2] = item.location; + this->sprite = item.sprite; - return this->unknown_0070; + return this->sprite; } // OFFSET: 0x006D8A90 // FUNCTION: fn_06606 void ITEM_INFO::Reset() { for (int index = 0; index < 4; ++index) { - this->unknown_0000[index] = 0; + this->identity[index] = 0; } this->quantity = 0; for (int index = 0; index < 2; ++index) { - this->unknown_0014[index] = 0; + this->prices[index] = 0; } - std::memset(this->unknown_001C, 0, sizeof(this->unknown_001C)); + std::memset(this->cards, 0, sizeof(this->cards)); this->itemId = ""; - this->unknown_0044 = ""; - this->identified = this->unknown_005D = 0; - this->unknown_0060 = 0; - this->unknown_0064 = 0; - this->unknown_0066 = 0; - this->unknown_0068 = 0; - this->unknown_006C = 0; - this->unknown_0070 = 0; - this->unknown_0098 = 0; + this->displayName = ""; + this->identified = this->damaged = 0; + this->refiningLevel = 0; + this->bindOnEquip = 0; + this->durationInHours = 0; + this->expireTime = 0; + this->priceFactor = 0; + this->sprite = 0; + this->optionCount = 0; for (int index = 0; index < 25; ++index) { - this->unknown_009C[index] = 0; + this->options[index] = 0; } for (int index = 0; index < 4; ++index) { - this->unknown_0074[index] = 0; + this->flags[index] = 0; } for (int index = 0; index < 4; ++index) { - this->unknown_0078[index] = 0; + this->saleData[index] = 0; } - this->unknown_0088 = 0; - this->unknown_0090 = 0; + this->grade = 0; + this->productId = 0; } // OFFSET: 0x00DDD4E0 @@ -226,7 +226,7 @@ ITEM_INFO LookupClientItemByIdentity(const std::list& values, std::ui auto it = values.begin(); for (; it != values.end(); ++it) { - if (it->unknown_0000[1] == id) { + if (it->identity[1] == id) { break; } } @@ -237,22 +237,22 @@ ITEM_INFO LookupClientItemByIdentity(const std::list& values, std::ui // OFFSET: 0x006D5450 // FUNCTION: fn_06570 ITEM_INFO& ITEM_INFO::AssignBasic(const RawItemBasic& item) { - this->unknown_0000[1] = item.id; - this->unknown_0014[0] = item.unknown_0004; - this->unknown_0014[1] = item.unknown_0008; - this->unknown_0000[0] = item.unknown_000C; + this->identity[1] = item.id; + this->prices[0] = item.price; + this->prices[1] = item.realPrice; + this->identity[0] = item.type; this->identified = item.identified; this->itemId = item.itemId; - this->unknown_0070 = item.unknown_0038; - this->unknown_0000[2] = item.unknown_0034; - this->unknown_0074[3] = item.id != -1; + this->sprite = item.sprite; + this->identity[2] = item.location; + this->flags[3] = item.id != -1; return *this; } // OFFSET: 0x006D54C0 // FUNCTION: fn_06571 bool ITEM_INFO::operator<(const ITEM_INFO& other) const { - return this->unknown_0044 < other.unknown_0044; + return this->displayName < other.displayName; } // OFFSET: 0x006D8B60 @@ -304,8 +304,8 @@ bool MatchItemName(std::string name, std::string query, unsigned char partial, s // OFFSET: 0x006D8FE0 // FUNCTION: fn_06609 bool ITEM_INFO::SetName(const char* name) { - this->unknown_0044 = name; - return this->unknown_0044.empty(); + this->displayName = name; + return this->displayName.empty(); } // OFFSET: 0x006D9010 @@ -337,19 +337,19 @@ std::uint32_t ITEM_INFO::Deserialize(const std::vector& data) { case 282: return offset; case 283: - std::memcpy(&this->unknown_0000[0], source, header.bytes); + std::memcpy(&this->identity[0], source, header.bytes); offset += header.bytes; break; case 284: - std::memcpy(&this->unknown_0000[2], source, header.bytes); + std::memcpy(&this->identity[2], source, header.bytes); offset += header.bytes; break; case 285: - std::memcpy(&this->unknown_0000[1], source, header.bytes); + std::memcpy(&this->identity[1], source, header.bytes); offset += header.bytes; break; case 286: - std::memcpy(&this->unknown_0000[3], source, header.bytes); + std::memcpy(&this->identity[3], source, header.bytes); offset += header.bytes; break; case 287: @@ -357,15 +357,15 @@ std::uint32_t ITEM_INFO::Deserialize(const std::vector& data) { offset += header.bytes; break; case 288: - std::memcpy(&this->unknown_0014[0], source, header.bytes); + std::memcpy(&this->prices[0], source, header.bytes); offset += header.bytes; break; case 289: - std::memcpy(&this->unknown_0014[1], source, header.bytes); + std::memcpy(&this->prices[1], source, header.bytes); offset += header.bytes; break; case 290: - std::memcpy(this->unknown_001C, source, header.bytes); + std::memcpy(this->cards, source, header.bytes); offset += header.bytes; break; case 291: { @@ -381,7 +381,7 @@ std::uint32_t ITEM_INFO::Deserialize(const std::vector& data) { std::memset(buffer, 0, sizeof(buffer)); std::memcpy(buffer, data.data() + offset, header.bytes); offset += header.bytes; - this->unknown_0044 = buffer; + this->displayName = buffer; break; } case 293: @@ -389,35 +389,35 @@ std::uint32_t ITEM_INFO::Deserialize(const std::vector& data) { offset += header.bytes; break; case 294: - std::memcpy(&this->unknown_005D, source, header.bytes); + std::memcpy(&this->damaged, source, header.bytes); offset += header.bytes; break; case 295: - std::memcpy(&this->unknown_0060, source, header.bytes); + std::memcpy(&this->refiningLevel, source, header.bytes); offset += header.bytes; break; case 296: - std::memcpy(&this->unknown_0064, source, header.bytes); + std::memcpy(&this->bindOnEquip, source, header.bytes); offset += header.bytes; break; case 297: - std::memcpy(&this->unknown_0068, source, header.bytes); + std::memcpy(&this->expireTime, source, header.bytes); offset += header.bytes; break; case 298: - std::memcpy(&this->unknown_0070, source, header.bytes); + std::memcpy(&this->sprite, source, header.bytes); offset += header.bytes; break; case 299: - std::memcpy(&this->unknown_0088, source, header.bytes); + std::memcpy(&this->grade, source, header.bytes); offset += header.bytes; break; case 300: - std::memcpy(&this->unknown_0098, source, header.bytes); + std::memcpy(&this->optionCount, source, header.bytes); offset += header.bytes; break; case 301: - std::memcpy(this->unknown_009C, source, header.bytes); + std::memcpy(this->options, source, header.bytes); offset += header.bytes; break; default: @@ -432,10 +432,10 @@ std::uint32_t ITEM_INFO::Deserialize(const std::vector& data) { // OFFSET: 0x00DFB9D0 // FUNCTION: fn_23584 bool CSession::HasRequiredItems() const { - for (auto it = this->unknown_1730.begin(); it != this->unknown_1730.end(); ++it) { + for (auto it = this->storageItems.begin(); it != this->storageItems.end(); ++it) { const ITEM_INFO& required = *it; - const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, required.unknown_0000[1]); - if (owned.unknown_0000[1] <= 0 || owned.quantity < required.quantity) { + const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, required.identity[1]); + if (owned.identity[1] <= 0 || owned.quantity < required.quantity) { return false; } } @@ -446,12 +446,12 @@ bool CSession::HasRequiredItems() const { // OFFSET: 0x00DFBD90 // FUNCTION: fn_23588 bool CSession::IsSlotItemIdentity(std::uint32_t id) const { - if (id != 0 && id == this->unknown_16EC) { + if (id != 0 && id == this->equippedArrowIndex) { return true; } for (int index = 0; index < 10; ++index) { - if (this->unknown_17F0[index].quantity == 1 && this->unknown_17F0[index].unknown_0000[1] == id) { + if (this->equippedItems[index].quantity == 1 && this->equippedItems[index].identity[1] == id) { return true; } } @@ -463,7 +463,7 @@ bool CSession::IsSlotItemIdentity(std::uint32_t id) const { // FUNCTION: fn_23589 bool CSession::HasInventoryItem(std::uint32_t id) const { for (const ITEM_INFO& value : this->m_inventoryItems) { - if (value.unknown_0000[1] == id) { + if (value.identity[1] == id) { return true; } } @@ -474,13 +474,13 @@ bool CSession::HasInventoryItem(std::uint32_t id) const { // OFFSET: 0x00DFBE40 // FUNCTION: fn_23591 bool CSession::HasItemId(int itemId) const { - const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, this->unknown_16EC); - if (owned.unknown_0000[1] > 0 && std::atoi(owned.itemId.c_str()) == itemId) { + const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, this->equippedArrowIndex); + if (owned.identity[1] > 0 && std::atoi(owned.itemId.c_str()) == itemId) { return true; } for (int index = 0; index < 10; ++index) { - if (std::atoi(this->unknown_17F0[index].itemId.c_str()) == itemId || std::atoi(this->unknown_2B50[index].itemId.c_str()) == itemId) { + if (std::atoi(this->equippedItems[index].itemId.c_str()) == itemId || std::atoi(this->costumeItems[index].itemId.c_str()) == itemId) { return true; } } @@ -491,16 +491,16 @@ bool CSession::HasItemId(int itemId) const { // OFFSET: 0x00DFBF70 // FUNCTION: fn_23592 bool CSession::HasItemCount(int itemId, int count) const { - const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, this->unknown_16EC); - if (owned.unknown_0000[1] != 0 && std::atoi(owned.itemId.c_str()) == itemId) { + const ITEM_INFO owned = LookupClientItemByIdentity(this->m_inventoryItems, this->equippedArrowIndex); + if (owned.identity[1] != 0 && std::atoi(owned.itemId.c_str()) == itemId) { return true; } for (int index = 0; index < 10; ++index) { - if (std::atoi(this->unknown_17F0[index].itemId.c_str()) == itemId && this->unknown_17F0[index].unknown_0060 >= count) { + if (std::atoi(this->equippedItems[index].itemId.c_str()) == itemId && this->equippedItems[index].refiningLevel >= count) { return true; } - if (std::atoi(this->unknown_2B50[index].itemId.c_str()) == itemId && this->unknown_2B50[index].unknown_0060 >= count) { + if (std::atoi(this->costumeItems[index].itemId.c_str()) == itemId && this->costumeItems[index].refiningLevel >= count) { return true; } } @@ -512,7 +512,7 @@ bool CSession::HasItemCount(int itemId, int count) const { // FUNCTION: fn_06600 bool ITEM_INFO::HasSpecialCard() const { std::uint32_t card; - std::memcpy(&card, this->unknown_001C, sizeof(card)); + std::memcpy(&card, this->cards, sizeof(card)); return card == 254 || card == 255; } @@ -571,9 +571,9 @@ int ITEM_INFO::GetItemId() const { // FUNCTION: fn_06611 void ITEM_INFO::SetOption(ItemOption option, const int& index) { if (index < 5) { - std::memcpy(this->unknown_009C + index * 5, &option.id, sizeof(option.id)); - this->unknown_009C[index * 5 + 4] = option.parameter; - std::memcpy(this->unknown_009C + index * 5 + 2, &option.value, sizeof(option.value)); + std::memcpy(this->options + index * 5, &option.id, sizeof(option.id)); + this->options[index * 5 + 4] = option.parameter; + std::memcpy(this->options + index * 5 + 2, &option.value, sizeof(option.value)); } } @@ -581,7 +581,7 @@ void ITEM_INFO::SetOption(ItemOption option, const int& index) { // FUNCTION: fn_06613 void ITEM_INFO::SetCard(const int& card, const int& index) { if (index < 4) { - std::memcpy(this->unknown_001C + index * 4, &card, sizeof(card)); + std::memcpy(this->cards + index * 4, &card, sizeof(card)); } } @@ -691,23 +691,23 @@ int ReadItemArray(ITEM_INFO* items, int offset, int size, const std::vectorunknown_1750.begin(); it != this->unknown_1750.end(); ++it) { - if (it->unknown_0000[1] == item.unknown_0000[1]) { + for (auto it = this->merchantMyShopItems.begin(); it != this->merchantMyShopItems.end(); ++it) { + if (it->identity[1] == item.identity[1]) { if (type == 0) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1750.erase(it); + this->merchantMyShopItems.erase(it); } } else { - this->unknown_1750.erase(it); + this->merchantMyShopItems.erase(it); } if (refresh == 1) { std::uint32_t window; if (type == 1) { - window = g_windowMgr.unknown_0410; + window = g_windowMgr.buyingShopMirrorItemWnd; } else { - window = type == 2 ? g_windowMgr.unknown_0420 : g_windowMgr.unknown_02F8; + window = type == 2 ? g_windowMgr.purchaseMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd; } if (window) { @@ -721,9 +721,9 @@ bool CSession::RemoveItem1750(const ITEM_INFO& item, int type, unsigned char ref if (refresh == 1) { std::uint32_t window; if (type == 1) { - window = g_windowMgr.unknown_0410; + window = g_windowMgr.buyingShopMirrorItemWnd; } else { - window = type == 2 ? g_windowMgr.unknown_0420 : g_windowMgr.unknown_02F8; + window = type == 2 ? g_windowMgr.purchaseMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd; } if (window) { @@ -736,13 +736,13 @@ bool CSession::RemoveItem1750(const ITEM_INFO& item, int type, unsigned char ref // OFFSET: 0x00DDAB30 // FUNCTION: fn_23348 void CSession::RemoveItem1720(const ITEM_INFO& item) { - const bool hasFlag = item.unknown_0074[3] != 0; - for (auto it = this->unknown_1720.begin(); it != this->unknown_1720.end(); ++it) { - const bool same = hasFlag ? it->unknown_0000[1] == item.unknown_0000[1] : it->itemId == item.itemId; + const bool hasFlag = item.flags[3] != 0; + for (auto it = this->purchaseItems.begin(); it != this->purchaseItems.end(); ++it) { + const bool same = hasFlag ? it->identity[1] == item.identity[1] : it->itemId == item.itemId; if (same) { it->quantity -= item.quantity; if (it->quantity <= 0) { - this->unknown_1720.erase(it); + this->purchaseItems.erase(it); } return; } diff --git a/Source/Contents/Items/ItemInfo.h b/Source/Contents/Items/ItemInfo.h index 5509719a3..493de3af6 100644 --- a/Source/Contents/Items/ItemInfo.h +++ b/Source/Contents/Items/ItemInfo.h @@ -9,13 +9,13 @@ struct RawItemData { /* 0000 */ std::uint32_t unknown_0000; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ std::uint32_t unknown_000C; + /* 0004 */ std::uint32_t index; + /* 0008 */ std::uint32_t price; + /* 000C */ std::uint32_t realPrice; /* 0010 */ std::int32_t quantity; /* 0014 */ std::uint32_t unknown_0014; - /* 0018 */ std::uint32_t unknown_0018; - /* 001C */ std::uint32_t unknown_001C; + /* 0018 */ std::uint32_t type; + /* 001C */ std::uint32_t refiningLevel; /* 0020 */ unsigned char identified; /* 0021 */ unsigned char unknown_0021[27]; /* 003C */ std::string itemId; @@ -25,12 +25,12 @@ struct RawItemData { /* 0088 */ std::int32_t optionCount; /* 008C */ unsigned char options[25]; /* 00A5 */ unsigned char unknown_00A5[7]; - /* 00AC */ std::int16_t unknown_00AC; - /* 00AE */ unsigned char unknown_00AE; + /* 00AC */ std::int16_t grade; + /* 00AE */ unsigned char hasIndex; /* 00AF */ unsigned char unknown_00AF; - /* 00B0 */ std::uint32_t unknown_00B0; + /* 00B0 */ std::uint32_t location; /* 00B4 */ std::uint32_t unknown_00B4; - /* 00B8 */ std::uint32_t unknown_00B8; + /* 00B8 */ std::uint32_t sprite; }; #if defined(_WIN32) && !defined(_WIN64) @@ -39,19 +39,19 @@ static_assert(sizeof(RawItemData) == 188); struct RawItemBasic { /* 0000 */ std::int32_t id; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ std::uint32_t unknown_000C; + /* 0004 */ std::uint32_t price; + /* 0008 */ std::uint32_t realPrice; + /* 000C */ std::uint32_t type; /* 0010 */ unsigned char identified; /* 0011 */ char itemId[33]; - /* 0034 */ std::uint32_t unknown_0034; - /* 0038 */ std::int32_t unknown_0038; + /* 0034 */ std::uint32_t location; + /* 0038 */ std::int32_t sprite; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(RawItemBasic, itemId) == 0x11); -static_assert(offsetof(RawItemBasic, unknown_0034) == 0x34); -static_assert(offsetof(RawItemBasic, unknown_0038) == 0x38); +static_assert(offsetof(RawItemBasic, location) == 0x34); +static_assert(offsetof(RawItemBasic, sprite) == 0x38); #endif struct ItemOption { @@ -94,30 +94,30 @@ struct alignas(8) ITEM_INFO { const std::vector& Description() const; std::vector Serialize() const; std::uint32_t Deserialize(const std::vector& data); - /* 0000 */ std::uint32_t unknown_0000[4]; + /* 0000 */ std::uint32_t identity[4]; /* 0010 */ std::int32_t quantity; - /* 0014 */ std::uint32_t unknown_0014[2]; - /* 001C */ unsigned char unknown_001C[16]; + /* 0014 */ std::uint32_t prices[2]; + /* 001C */ unsigned char cards[16]; /* 002C */ std::string itemId; - /* 0044 */ std::string unknown_0044; + /* 0044 */ std::string displayName; /* 005C */ unsigned char identified; - /* 005D */ unsigned char unknown_005D; - /* 0060 */ std::int32_t unknown_0060; - /* 0064 */ std::uint16_t unknown_0064; - /* 0066 */ unsigned char unknown_0066; - /* 0068 */ std::uint32_t unknown_0068; - /* 006C */ std::uint16_t unknown_006C; - /* 0070 */ std::int32_t unknown_0070; - /* 0074 */ unsigned char unknown_0074[4]; - /* 0078 */ std::uint32_t unknown_0078[4]; - /* 0088 */ std::int16_t unknown_0088; - /* 0090 */ std::uint64_t unknown_0090; - /* 0098 */ std::int32_t unknown_0098; - /* 009C */ unsigned char unknown_009C[25]; - /* 00B8 */ std::uint32_t unknown_00B8[2]; - /* 00C0 */ unsigned char unknown_00C0; - /* 00C1 */ unsigned char unknown_00C1[24]; - /* 00D9 */ unsigned char unknown_00D9[24]; + /* 005D */ unsigned char damaged; + /* 0060 */ std::int32_t refiningLevel; + /* 0064 */ std::uint16_t bindOnEquip; + /* 0066 */ unsigned char durationInHours; + /* 0068 */ std::uint32_t expireTime; + /* 006C */ std::uint16_t priceFactor; + /* 0070 */ std::int32_t sprite; + /* 0074 */ unsigned char flags[4]; + /* 0078 */ std::uint32_t saleData[4]; + /* 0088 */ std::int16_t grade; + /* 0090 */ std::uint64_t productId; + /* 0098 */ std::int32_t optionCount; + /* 009C */ unsigned char options[25]; + /* 00B8 */ std::uint32_t recordIds[2]; + /* 00C0 */ unsigned char recordType; + /* 00C1 */ unsigned char recordName[24]; + /* 00D9 */ unsigned char recordDate[24]; }; ITEM_INFO LookupClientItem(const std::list& values, int id, unsigned char requireIdentified); diff --git a/Source/Contents/Items/ItemInfoMgr.cpp b/Source/Contents/Items/ItemInfoMgr.cpp index 557ce364e..bf5b65406 100644 --- a/Source/Contents/Items/ItemInfoMgr.cpp +++ b/Source/Contents/Items/ItemInfoMgr.cpp @@ -150,7 +150,7 @@ void CItemInfoMgr::SetItemInfo(std::map& descriptions) const { std::for_each(it->second.unidentifiedDescription.begin(), it->second.unidentifiedDescription.end(), lcMyInsertDesc(&desc.unidentifiedDescription)); desc.slots = it->second.slotCount; - desc.unknown_0040 = it->second.classNum; + desc.viewId = it->second.classNum; } } diff --git a/Source/Contents/Items/ItemLink.cpp b/Source/Contents/Items/ItemLink.cpp index cf17f56af..31768db01 100644 --- a/Source/Contents/Items/ItemLink.cpp +++ b/Source/Contents/Items/ItemLink.cpp @@ -219,16 +219,16 @@ bool ItemFromLinkFields(const std::vector& fields, ITEM_INFO& item return false; } - item.unknown_0000[2] = fields[0]; + item.identity[2] = fields[0]; item.SetItemId(fields[2]); if (fields[1] != 0) { - item.unknown_0000[0] = 4; + item.identity[0] = 4; } - item.unknown_0060 = fields[3]; - item.unknown_0070 = fields[4]; - item.unknown_0088 = static_cast(fields[5]); + item.refiningLevel = fields[3]; + item.sprite = fields[4]; + item.grade = static_cast(fields[5]); int cardCount = 0; if (fields.size() > 6) { @@ -242,7 +242,7 @@ bool ItemFromLinkFields(const std::vector& fields, ITEM_INFO& item if (static_cast(cardCount + 8) < fields.size()) { const int optionCount = fields[cardCount + 8]; - item.unknown_0098 = optionCount; + item.optionCount = optionCount; for (int option = 1; option < optionCount + 1; ++option) { const int* record = &fields[cardCount + 9 + (option - 1) * 3]; diff --git a/Source/Contents/Items/ItemNaming.cpp b/Source/Contents/Items/ItemNaming.cpp index 8f7e5cf86..467e78343 100644 --- a/Source/Contents/Items/ItemNaming.cpp +++ b/Source/Contents/Items/ItemNaming.cpp @@ -27,7 +27,7 @@ std::map> g_bookItemNames; // OFFSET: 0x006D8810 // FUNCTION: fn_06597 bool Equipment(const ITEM_INFO& item) { - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -47,13 +47,13 @@ bool Equipment(const ITEM_INFO& item) { namespace { // INLINED void CardIds(const ITEM_INFO& item, int (&ids)[4]) { - std::memcpy(ids, item.unknown_001C, sizeof(ids)); + std::memcpy(ids, item.cards, sizeof(ids)); } // INLINED int CardId(const ITEM_INFO& item, int index) { int id; - std::memcpy(&id, &item.unknown_001C[index * sizeof(id)], sizeof(id)); + std::memcpy(&id, &item.cards[index * sizeof(id)], sizeof(id)); return id; } @@ -93,13 +93,13 @@ bool ITEM_INFO::HasCards() const { // FUNCTION: fn_06577 __declspec(noinline) int ITEM_INFO::Grade(char* output, int& capacity, unsigned char consume) const { char grade[2] = {}; - if (this->unknown_0088 == 1) { + if (this->grade == 1) { grade[0] = 'D'; - } else if (this->unknown_0088 == 2) { + } else if (this->grade == 2) { grade[0] = 'C'; - } else if (this->unknown_0088 == 3) { + } else if (this->grade == 3) { grade[0] = 'B'; - } else if (this->unknown_0088 == 4) { + } else if (this->grade == 4) { grade[0] = 'A'; } @@ -311,11 +311,11 @@ std::string ITEM_INFO::DisplayName(unsigned char detailed) const { AppendText(result, text, this->Apprentice(text, capacity, 0)); AppendName(*this, result, text, capacity); } else if (cards[0] == 254 && cards[1] == 0) { - if (this->unknown_0060 > 0) { + if (this->refiningLevel > 0) { AppendText(result, text, this->Refine(text, capacity, 0)); } - if (this->unknown_0088 > 0) { + if (this->grade > 0) { AppendText(result, text, this->Grade(text, capacity, 0)); } @@ -332,11 +332,11 @@ std::string ITEM_INFO::DisplayName(unsigned char detailed) const { if (!Equipment(*this) && detailed == 0) { AppendName(*this, result, text, capacity); } else { - if (this->unknown_0060 > 0) { + if (this->refiningLevel > 0) { AppendText(result, text, this->Refine(text, capacity, 0)); } - if (this->unknown_0088 > 0) { + if (this->grade > 0) { AppendText(result, text, this->Grade(text, capacity, 0)); } @@ -414,26 +414,26 @@ std::vector ITEM_INFO::Serialize() const { }; append(281, nullptr, 0); - append(283, &this->unknown_0000[0], 4); - append(285, &this->unknown_0000[1], 4); - append(284, &this->unknown_0000[2], 4); - append(286, &this->unknown_0000[3], 4); + append(283, &this->identity[0], 4); + append(285, &this->identity[1], 4); + append(284, &this->identity[2], 4); + append(286, &this->identity[3], 4); append(287, &this->quantity, 4); - append(288, &this->unknown_0014[0], 4); - append(289, &this->unknown_0014[1], 4); - append(290, this->unknown_001C, 16); + append(288, &this->prices[0], 4); + append(289, &this->prices[1], 4); + append(290, this->cards, 16); const int id = std::atoi(this->itemId.c_str()); append(291, &id, 4); - append(292, this->unknown_0044.c_str(), static_cast(this->unknown_0044.size())); + append(292, this->displayName.c_str(), static_cast(this->displayName.size())); append(293, &this->identified, 1); - append(294, &this->unknown_005D, 1); - append(295, &this->unknown_0060, 4); - append(296, &this->unknown_0064, 2); - append(297, &this->unknown_0068, 4); - append(298, &this->unknown_0070, 4); - append(299, &this->unknown_0088, 2); - append(300, &this->unknown_0098, 4); - append(301, this->unknown_009C, 25); + append(294, &this->damaged, 1); + append(295, &this->refiningLevel, 4); + append(296, &this->bindOnEquip, 2); + append(297, &this->expireTime, 4); + append(298, &this->sprite, 4); + append(299, &this->grade, 2); + append(300, &this->optionCount, 4); + append(301, this->options, 25); append(282, nullptr, 0); return result; } @@ -726,14 +726,14 @@ __declspec(noinline) void LoadItemNameTables() { g_tableStorage.LoadTokens(tokens, "itemSlotTable.txt", 0); for (std::vector::iterator token = tokens.begin(); token != tokens.end(); token += 2) { - EnsureItemDescription(std::atoi(*token), g_itemDescriptions).unknown_002C = std::atoi(token[1]); + EnsureItemDescription(std::atoi(*token), g_itemDescriptions).descriptionFlags = std::atoi(token[1]); } g_tableStorage.LoadTokens(tokens, "itemParamTable.txt", 0); for (std::vector::iterator token = tokens.begin(); token != tokens.end(); token += 3) { ITEM_DESC& desc = EnsureItemDescription(std::atoi(*token), g_itemDescriptions); - desc.unknown_0034.push_back(std::atoi(token[1])); - desc.unknown_0034.push_back(std::atoi(token[2])); + desc.descriptionValues.push_back(std::atoi(token[1])); + desc.descriptionValues.push_back(std::atoi(token[2])); } g_tableStorage.LoadTokens(tokens, "CardItemNameTable.txt", 0); @@ -835,7 +835,7 @@ std::uint32_t __fastcall ItemCardColor(const ITEM_INFO* item) { int ITEM_INFO::Element(char* output, int& capacity, unsigned char consume) const { const char* text = nullptr; - switch (this->unknown_001C[4]) { + switch (this->cards[4]) { case 0: { const int id = std::atoi(this->itemId.c_str()); text = LookupMessage(id == 2634 || id == 2635 ? 2976 : 450); @@ -873,7 +873,7 @@ int ITEM_INFO::Element(char* output, int& capacity, unsigned char consume) const // FUNCTION: fn_06584 int ITEM_INFO::Star(char* output, int& capacity, unsigned char consume) const { const char* text = nullptr; - switch (this->unknown_001C[5]) { + switch (this->cards[5]) { case 5: text = LookupMessage(MSI_ONE_STARPIECE); break; @@ -918,7 +918,7 @@ int ITEM_INFO::Apprentice(char* output, int& capacity, unsigned char consume) co // OFFSET: 0x006D70A0 // FUNCTION: fn_06589 int ITEM_INFO::Refine(char* output, int& capacity, unsigned char consume) const { - const int bytes = StringFormat(output, capacity, static_cast(-1), "+%d ", this->unknown_0060); + const int bytes = StringFormat(output, capacity, static_cast(-1), "+%d ", this->refiningLevel); if (bytes > 0) { if (consume) { diff --git a/Source/Contents/Items/SelectPackageItemMgr.cpp b/Source/Contents/Items/SelectPackageItemMgr.cpp index 9bde1aae5..db7178f90 100644 --- a/Source/Contents/Items/SelectPackageItemMgr.cpp +++ b/Source/Contents/Items/SelectPackageItemMgr.cpp @@ -158,17 +158,17 @@ int CSelectPackageItemMgr::LuaAddItem(lua_State* L) { item.SetItemId(static_cast(itemId)); item.identified = 1; item.quantity = static_cast(quantity); - item.unknown_0000[0] = static_cast(static_cast(kind)); - item.unknown_0060 = static_cast(value); - item.unknown_0088 = static_cast(static_cast(refine)); + item.identity[0] = static_cast(static_cast(kind)); + item.refiningLevel = static_cast(value); + item.grade = static_cast(static_cast(refine)); const int optionValue = static_cast(option); if (optionValue != 0) { - item.unknown_0066 = 1; - item.unknown_0068 = optionValue; + item.durationInHours = 1; + item.expireTime = optionValue; } if (placeholder) { - *reinterpret_cast(item.unknown_009C) = g_itemOptionPlaceholderId; - item.unknown_0098 = 3; + *reinterpret_cast(item.options) = g_itemOptionPlaceholderId; + item.optionCount = 3; } } @@ -216,7 +216,7 @@ int CSelectPackageItemMgr::LuaAddTab(lua_State* L) { // FUNCTION: fn_04448 bool CSelectPackageItemMgr::OpenItem(unsigned int itemIndex) { const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, itemIndex); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { const int packageId = std::atoi(item.itemId.c_str()); if (this->m_packages.find(packageId) != this->m_packages.end()) { if (g_windowMgr.LookupWindow(WID_SELECTPACKAGEITEMBOX) == nullptr || g_windowMgr.CloseWindow(WID_SELECTPACKAGEITEMBOX)) { diff --git a/Source/Contents/Jobs/JobInheritance.cpp b/Source/Contents/Jobs/JobInheritance.cpp index c430c431c..7cf1da60e 100644 --- a/Source/Contents/Jobs/JobInheritance.cpp +++ b/Source/Contents/Jobs/JobInheritance.cpp @@ -140,13 +140,13 @@ bool CSession::IsNavigationAllowed() const { // OFFSET: 0x00DFA810 // FUNCTION: fn_23579 bool IsNavigationActive() { - if (g_windowMgr.unknown_0250 != 0) { + if (g_windowMgr.itemShopWnd != 0) { return false; } if (g_windowMgr.HasNavigationBlocker() == true) { return false; } - if (g_windowMgr.unknown_01E4 != 0) { + if (g_windowMgr.nCashWnd != 0) { return false; } return true; @@ -1098,7 +1098,7 @@ std::string CSession::GetWeaponName(int weapon) { // FUNCTION: fn_23482 const char* CSession::GetWeaponClassName(int item) { const char* name = nullptr; - if (g_session.m_hotkeyScript->Call("ReqWeaponNameByClassNum", "d>s", FindItemDescription(item).unknown_0040, &name)) { + if (g_session.m_hotkeyScript->Call("ReqWeaponNameByClassNum", "d>s", FindItemDescription(item).viewId, &name)) { return name; } @@ -1200,7 +1200,7 @@ std::string GetJobTitleString(int job) { // OFFSET: 0x00E19530 // FUNCTION: fn_23841 int __stdcall GetWeaponViewValue(int weapon) { - const int value = FindItemDescription(weapon).unknown_0040; + const int value = FindItemDescription(weapon).viewId; if (weapon > 2100 && weapon < 2200 || static_cast(weapon - 28901) <= 0x61 || static_cast(weapon - 460000) <= 0x270F) { return -1; @@ -1292,14 +1292,14 @@ bool ResetHotkeySlots() { // OFFSET: 0x00E25E60 // FUNCTION: fn_23909 std::pair* CSession::InsertPair(int key, int value) { - for (std::vector>::iterator it = this->unknown_0778.begin(); it != this->unknown_0778.end(); ++it) { + for (std::vector>::iterator it = this->keyValues.begin(); it != this->keyValues.end(); ++it) { if (key == it->first) { it->second = value; return &*it; } } - return &this->unknown_0778.emplace_back(std::make_pair(key, value)); + return &this->keyValues.emplace_back(std::make_pair(key, value)); } // OFFSET: 0x00E0A1F0 @@ -1322,7 +1322,7 @@ int CSession::GetPairValue() const { // FUNCTION: fn_23793 int CSession::GetPetTargetAid() const { int target = 0; - std::uint32_t aid = *reinterpret_cast(&this->unknown_5570[8]); + std::uint32_t aid = *reinterpret_cast(&this->spAndHomunculusStats[8]); CGameMode* mode; CRenderObject* actor; if (aid != 0 && (mode = static_cast(g_modeMgr.GetGameMode())) != nullptr && @@ -1330,7 +1330,7 @@ int CSession::GetPetTargetAid() const { target = static_cast(actor)->hitTargetAid; } - aid = *reinterpret_cast(&this->unknown_5620[8]); + aid = *reinterpret_cast(&this->companionTargetState[8]); if (aid != 0 && (mode = static_cast(g_modeMgr.GetGameMode())) != nullptr && (actor = mode->scene->GetGameActorByAID(aid)) != nullptr) { target = static_cast(actor)->hitTargetAid; @@ -1348,7 +1348,7 @@ int CSession::GetPetTargetAid() const { // OFFSET: 0x00E1D950 // FUNCTION: fn_23854 int CSession::WorldUnknown0050() const { - return static_cast(g_modeMgr.GetGameMode())->scene->unknown_0050; + return static_cast(g_modeMgr.GetGameMode())->scene->isBattleFieldMode; } // OFFSET: 0x00E1D970 @@ -1416,49 +1416,49 @@ int CSession::IsTrickDeadActive() const { // OFFSET: 0x00E1DAA0 // FUNCTION: fn_23860 int CSession::GetMapProperty08() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 8); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 8); } // OFFSET: 0x00E1DAB0 // FUNCTION: fn_23861 int CSession::GetMapProperty07() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 7); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 7); } // OFFSET: 0x00E1DAC0 // FUNCTION: fn_23862 int CSession::GetMapProperty13() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 0x13); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 0x13); } // OFFSET: 0x00E1DAD0 // FUNCTION: fn_23863 int CSession::GetMapProperty11() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 0x11); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 0x11); } // OFFSET: 0x00E1DAE0 // FUNCTION: fn_23864 int CSession::GetMapProperty10() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 0x10); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 0x10); } // OFFSET: 0x00E1DAF0 // FUNCTION: fn_23865 int CSession::GetMapProperty12() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 0x12); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 0x12); } // OFFSET: 0x00E1DB00 // FUNCTION: fn_23866 int CSession::GetMapProperty09() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 9); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 9); } // OFFSET: 0x00E1DB10 // FUNCTION: fn_23867 int CSession::GetMapProperty0F() const { - return g_mapPropertyMgr->GetValue(this->unknown_0000, 0xF); + return g_mapPropertyMgr->GetValue(this->mapPropertyId, 0xF); } // OFFSET: 0x00E1DB20 @@ -1482,7 +1482,7 @@ bool CSession::IsMiscItemType(int type) const { // OFFSET: 0x00E1DBA0 // FUNCTION: fn_23870 bool CSession::HasUnknown6178Records() const { - return this->unknown_6178.size() != 0; + return this->trackedAchievements.size() != 0; } // OFFSET: 0x00E1DBD0 @@ -1593,11 +1593,11 @@ int CSession::SetHotkeyEntry(char enabled, int id, int value, int slot) { for (int index = 0; index < 2; ++index) { NormalItemSlot& entry = this->SkillHotkey(index); - if (id == static_cast(entry.itemId) && value == entry.unknown_0005 && enabled == static_cast(entry.unknown_0000) || + if (id == static_cast(entry.itemId) && value == entry.value && enabled == static_cast(entry.enabled) || !CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, static_cast(entry.itemId)) && id == static_cast(entry.itemId)) { - entry.unknown_0000 = 0; + entry.enabled = 0; entry.itemId = 0; - entry.unknown_0005 = 0; + entry.value = 0; g_modeMgr.GetGameMode()->SendMsg(MM_SHORTCUT_KEY_CHANGE, index + 36, 0, 0, 0); } } @@ -1608,9 +1608,9 @@ int CSession::SetHotkeyEntry(char enabled, int id, int value, int slot) { } NormalItemSlot& target = this->SkillHotkey(slot); - target.unknown_0000 = static_cast(enabled); + target.enabled = static_cast(enabled); target.itemId = static_cast(id); - target.unknown_0005 = static_cast(value); + target.value = static_cast(value); return g_modeMgr.GetGameMode()->SendMsg(MM_SHORTCUT_KEY_CHANGE, slot + 36, 0, 0, 0); } @@ -1619,8 +1619,8 @@ int CSession::SetHotkeyEntry(char enabled, int id, int value, int slot) { // FUNCTION: fn_23912 int CSession::SetFlag(char value) { const int result = value & 1; - this->unknown_0E98 = result; - this->unknown_5558 = result; + this->cachedSex = result; + this->currentSex = result; return result; } @@ -1804,7 +1804,7 @@ public: /* 0038 */ bool m_active; /* 003C */ int m_type; - /* 0040 */ int unknown_0040; + /* 0040 */ int equippedItemIndex; /* 0044 */ std::vector m_attachables; /* 0050 */ std::list m_children; }; @@ -1815,7 +1815,7 @@ public: /* 0004 */ unsigned char unknown_0004[0x9]; /* 000D */ bool m_dirty; /* 000E */ unsigned char unknown_000E[0x12]; - /* 0020 */ UIWindow* unknown_0020; + /* 0020 */ UIWindow* observerWindow; /* 0024 */ std::unordered_map properties1; CEquipmentPropertiesMgr(); @@ -1837,8 +1837,8 @@ void CEquipmentPropertiesMgr::RemoveWearable(const int& location) { delete wearable; this->properties1.erase(key); } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->observerWindow != nullptr) { + this->observerWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } } @@ -1852,27 +1852,27 @@ bool CSession::UnequipItem2B50(int location) { const EquipSlots slots = g_session.GetEquipSlots(location); if (slots.values[2] < 10) { if (slots.values[2] != -1) { - ITEM_INFO& item = this->unknown_2B50[slots.values[2]]; + ITEM_INFO& item = this->costumeItems[slots.values[2]]; const char* message = LookupMessage(MSI_ITEM_IS_REMOVED); const std::string name = item.DisplayName(0); const std::string text = FormatOwnedString("%s%s", name.c_str(), message); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text.c_str()), 0xFF, 7, 0, 0); - item.unknown_0000[3] = 0; + item.identity[3] = 0; this->AddItem1710(item, 1); item.Reset(); } if (slots.values[1] != -1 && slots.values[1] < 10) { - this->unknown_2B50[slots.values[1]].Reset(); + this->costumeItems[slots.values[1]].Reset(); } if (slots.values[0] != -1 && slots.values[0] < 10) { - this->unknown_2B50[slots.values[0]].Reset(); + this->costumeItems[slots.values[0]].Reset(); } } RequestBasicInfoRefresh(); } this->InvalidateWindowFrames(); - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_022C)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.itemParamChangeDisplayWnd)) { window->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (g_equipmentPropertiesMgr == nullptr) { @@ -1967,49 +1967,49 @@ bool CSession::PlaySkillGroundEffect(int skillId, vector3d position) { // FUNCTION: fn_24162 int CSession::GetMaxBaseLevel(int job) const { if (g_session.IsTreeGroupThree(job) == true) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x74]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x74]); } if (g_session.IsTreeGroupTwo(job)) { return g_session.m_maxLevel; } if (g_session.IsSuperNovice2Job(job)) { - return *reinterpret_cast(&g_session.unknown_7EF0[0]); + return *reinterpret_cast(&g_session.jobLevelLimits[0]); } if (g_session.IsExpandedJob(job)) { - return *reinterpret_cast(&g_session.unknown_7EF0[4]); + return *reinterpret_cast(&g_session.jobLevelLimits[4]); } - return g_session.IsDoramJob(job) == true ? *reinterpret_cast(&g_session.unknown_7EF0[0x28]) - : *reinterpret_cast(g_session.unknown_7EE8); + return g_session.IsDoramJob(job) == true ? *reinterpret_cast(&g_session.jobLevelLimits[0x28]) + : *reinterpret_cast(g_session.maxBaseLevel); } // OFFSET: 0x00E2FA80 // FUNCTION: fn_24163 int CSession::GetMaxJobLevel(int job) const { if (g_session.IsSuperNoviceJob(job)) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x10]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x10]); } if ((job >= JT_KNIGHT_H && job < JT_NOVICE_B) || job == JT_GUNSLINGER || job == JT_NINJA || job == JT_GUNSLINGER_B || job == JT_NINJA_B || job == JT_DRUID || job == JT_DRUID_B) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x18]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x18]); } if (job == JT_NOVICE || job == JT_NOVICE_B || job == JT_NOVICE_H) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x0C]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x0C]); } if (g_session.IsTreeGroupThree(job) == true) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x78]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x78]); } if (g_session.IsTreeGroupTwo(job)) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x1C]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x1C]); } if (!g_session.IsExpandedJob(job)) { if (g_session.IsDoramJob(job) == true) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x2C]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x2C]); } if (!g_session.IsSuperNovice2Job(job)) { - return *reinterpret_cast(&g_session.unknown_7EF0[0x14]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x14]); } } - return *reinterpret_cast(&g_session.unknown_7EF0[0x24]); + return *reinterpret_cast(&g_session.jobLevelLimits[0x24]); } // OFFSET: 0x00E1E690 diff --git a/Source/Contents/Jobs/JobNameInitialization.cpp b/Source/Contents/Jobs/JobNameInitialization.cpp index 0bdc80374..8958b6891 100644 --- a/Source/Contents/Jobs/JobNameInitialization.cpp +++ b/Source/Contents/Jobs/JobNameInitialization.cpp @@ -85,8 +85,8 @@ void CSession::InitJobNameTable() { this->m_sexLabels.resize(2, "F"); this->m_sexLabels[0] = "F"; this->m_sexLabels[1] = "M"; - this->unknown_0710.resize(20, 0); - this->m_skillBundle.unknown_0064.resize(7999, 0); + this->extendedSkillLevels.resize(20, 0); + this->m_skillBundle.skillValues.resize(7999, 0); this->m_mercSkillLevels.resize(258, 0); this->m_homunSkillLevels.resize(61, 0); } diff --git a/Source/Contents/MapNameTable.cpp b/Source/Contents/MapNameTable.cpp index c42bd342e..299be5719 100644 --- a/Source/Contents/MapNameTable.cpp +++ b/Source/Contents/MapNameTable.cpp @@ -50,7 +50,7 @@ private: // FUNCTION: fn_23498 bool CSession::LoadMapNameTable() { std::vector tokens; - CCommonObject& storage = reinterpret_cast(this->unknown_5400[0x30]); + CCommonObject& storage = reinterpret_cast(this->minimapTokenStorage[0x30]); const char source[] = {'\x52', '\x88', '\x4B', '\xB1', '\x0A', '\x62', '\x9E', '\x43', '\x5E', '\x8B', '\x57', '\x9A', '\x45', '\x7B', '\x83', '\x63', '\x3F'}; thread_local EncryptedName name(source); const bool loaded = storage.LoadTokens(tokens, name.Text(), 0); diff --git a/Source/Contents/MapSkyMgr.cpp b/Source/Contents/MapSkyMgr.cpp index 16b55adbf..b13945f8b 100644 --- a/Source/Contents/MapSkyMgr.cpp +++ b/Source/Contents/MapSkyMgr.cpp @@ -25,13 +25,13 @@ struct MapSkyCloud : CEffect { /* 00F8 */ float velocityX; /* 00FC */ float velocityY; /* 0100 */ float velocityZ; - /* 0104 */ float unknown_0104; - /* 0108 */ float unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ int unknown_0110; - /* 0114 */ int unknown_0114; - /* 0118 */ int unknown_0118; - /* 011C */ float unknown_011C; + /* 0104 */ float scriptFloatParameterA; + /* 0108 */ float scriptFloatParameterB; + /* 010C */ int scriptIntegerParameterA; + /* 0110 */ int scriptIntegerParameterB; + /* 0114 */ int scriptIntegerParameterC; + /* 0118 */ int scriptIntegerParameterD; + /* 011C */ float scriptFloatParameterC; /* 0120 */ float spanX; /* 0124 */ float spanZ; /* 0128 */ unsigned char flag; @@ -67,7 +67,7 @@ bool CMapSkyMgr::LoadData() { // OFFSET: 0x00C7B200 // FUNCTION: fn_20362 CWeatherEffect::CWeatherEffect() - : darken(0), unknown_0001(1), lightning(0), actor(nullptr), targetColor{}, effect(nullptr), counter(0) { + : darken(0), enabled(1), lightning(0), actor(nullptr), targetColor{}, effect(nullptr), counter(0) { this->color[0] = 1.0f; this->color[1] = 1.0f; this->color[2] = 1.0f; @@ -380,13 +380,13 @@ void CMapSkyMgr::CreateClouds(const std::string& mapName) { cloud->velocityX = static_cast(velX); cloud->velocityY = static_cast(velY); cloud->velocityZ = static_cast(velZ); - cloud->unknown_010C = param0; - cloud->unknown_0110 = param1; - cloud->unknown_0114 = param3; - cloud->unknown_0118 = param4; - cloud->unknown_0104 = static_cast(param2); - cloud->unknown_0108 = static_cast(param5); - cloud->unknown_011C = static_cast(param7); + cloud->scriptIntegerParameterA = param0; + cloud->scriptIntegerParameterB = param1; + cloud->scriptIntegerParameterC = param3; + cloud->scriptIntegerParameterD = param4; + cloud->scriptFloatParameterA = static_cast(param2); + cloud->scriptFloatParameterB = static_cast(param5); + cloud->scriptFloatParameterC = static_cast(param7); cloud->spanX = spanX; cloud->spanZ = spanZ; cloud->flag = flag; @@ -435,7 +435,7 @@ void CMapSkyMgr::Apply(const std::string& mapName) { unsigned char fog = 0; this->m_script->Call("IsBackGroundFog", "s>b", sky.c_str(), &fog); if (fog == 1) { - static_cast(g_modeMgr.GetGameMode())->scene->unknown_00FC = true; + static_cast(g_modeMgr.GetGameMode())->scene->backgroundFog = true; } } @@ -469,11 +469,11 @@ void RegisterLowercaseName(const char* name) { character = static_cast(std::tolower(static_cast(character))); } - for (const std::string& entry : g_session.unknown_80A8) { + for (const std::string& entry : g_session.skyMapNames) { if (entry == lowered) { return; } } - g_session.unknown_80A8.push_back(lowered.c_str()); + g_session.skyMapNames.push_back(lowered.c_str()); } diff --git a/Source/Contents/MapSkyMgr.h b/Source/Contents/MapSkyMgr.h index 7cc556aec..251368657 100644 --- a/Source/Contents/MapSkyMgr.h +++ b/Source/Contents/MapSkyMgr.h @@ -30,7 +30,7 @@ public: void Unused(); /* 0000 */ unsigned char darken; - /* 0001 */ unsigned char unknown_0001; + /* 0001 */ unsigned char enabled; /* 0002 */ unsigned char lightning; /* 0004 */ std::vector> mapWeathers; /* 0010 */ void* actor; diff --git a/Source/Contents/Messenger/ClientMessenger.cpp b/Source/Contents/Messenger/ClientMessenger.cpp index 2d9d7358f..1be3e809c 100644 --- a/Source/Contents/Messenger/ClientMessenger.cpp +++ b/Source/Contents/Messenger/ClientMessenger.cpp @@ -88,24 +88,25 @@ struct EquipmentEntryB { struct EquipmentPropertyDefinition { /* 0000 */ unsigned int group = 0; /* 0004 */ unsigned int id = 0; - /* 0008 */ std::string unknown_0008; - /* 0020 */ std::vector unknown_0020; - /* 002C */ int unknown_002C = 0; + /* 0008 */ std::string formatText; + /* 0020 */ std::vector functions; + /* 002C */ int functionMode = 0; /* 0030 */ int mode; - /* 0034 */ std::vector unknown_0034; - /* 0040 */ int unknown_0040 = 0; - /* 0044 */ std::string unknown_0044; - /* 005C */ std::map unknown_005C; - /* 0064 */ std::string unknown_0064; - /* 007C */ int unknown_007C = 0; + /* 0034 */ std::vector signLabels; + /* 0040 */ int separatorMode = 0; + /* 0044 */ std::string separator; + /* 005C */ std::map formatOptions; + /* 0064 */ std::string uniqueGroup; + /* 007C */ int uniqueKeyMode = 0; bool IsTwoDimensional() const; }; struct EquipmentPropertyGroup { - /* 0000 */ std::string unknown_0000; + /* 0000 */ std::string name; /* 0018 */ std::map definitions; - explicit EquipmentPropertyGroup(const char* name) : unknown_0000(name) { + // INLINED + explicit EquipmentPropertyGroup(const char* name) : name(name) { } ~EquipmentPropertyGroup(); std::string& GetName(); @@ -255,7 +256,7 @@ EquipmentProperties::CEquipmentProperties* EquipmentProperties::CEquipmentProper return this; } - if (this->m_definition->unknown_007C != 0) { + if (this->m_definition->uniqueKeyMode != 0) { if (source->m_keys.size() != 1) { return this; } @@ -307,38 +308,38 @@ namespace EquipmentProperties { }; struct CEquipmentInfo { - /* 0000 */ int unknown_0000; + /* 0000 */ int kind; /* 0004 */ std::unordered_map values; - /* 0024 */ std::unordered_map unknown_0024; + /* 0024 */ std::unordered_map statProperties; }; class CEquipmentPropertiesMgr { public: /* 0004 */ CLuaInstance script; - /* 000C */ bool unknown_000C; + /* 000C */ bool loadValid; /* 000D */ bool m_dirty = false; /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; + /* 0014 */ int shopId; /* 0018 */ EquipmentPropertyStore* store; - /* 001C */ int unknown_001C; - /* 0020 */ UIWindow* unknown_0020; + /* 001C */ int currentEquipment; + /* 0020 */ UIWindow* notifyWindow; /* 0024 */ std::unordered_map properties1; /* 0044 */ std::unordered_map properties2; /* 0064 */ std::unordered_map properties3; - /* 0084 */ std::multiset unknown_0084; - /* 008C */ std::map unknown_008C; - /* 0094 */ std::unordered_map unknown_0094; - /* 00B4 */ std::unordered_map unknown_00B4; + /* 0084 */ std::multiset activeItems; + /* 008C */ std::map propertyGroups; + /* 0094 */ std::unordered_map equipmentInfo; + /* 00B4 */ std::unordered_map statVariables; /* 00D4 */ std::unordered_map> m_itemCombinations; /* 00F4 */ std::unordered_map> m_combinationItems; - /* 0114 */ std::unordered_map> unknown_0114; - /* 0134 */ std::unordered_map unknown_0134; + /* 0114 */ std::unordered_map> skillGroups; + /* 0134 */ std::unordered_map constantValues; /* 0154 */ std::unordered_map m_definitionsByName; - /* 0174 */ std::unordered_map unknown_0174; - /* 0194 */ std::set unknown_0194; - /* 019C */ std::unordered_map unknown_019C; - /* 01BC */ std::unordered_map>, CEquipmentValueHash> unknown_01BC; - /* 01DC */ std::unordered_map, CEquipmentValueHash>, CEquipmentValueHash> unknown_01DC; + /* 0174 */ std::unordered_map randomOptionDefinitions; + /* 0194 */ std::set functionPairs; + /* 019C */ std::unordered_map displayValues; + /* 01BC */ std::unordered_map>, CEquipmentValueHash> levelRates; + /* 01DC */ std::unordered_map, CEquipmentValueHash>, CEquipmentValueHash> categoryValues; static CEquipmentPropertiesMgr* GetInstance(); @@ -432,7 +433,7 @@ namespace EquipmentProperties { public: /* 0038 */ bool m_active; /* 003C */ int m_type; - /* 0040 */ int unknown_0040; + /* 0040 */ int inventoryIndex; /* 0044 */ std::vector m_attachables; /* 0050 */ std::list m_children; @@ -500,7 +501,7 @@ const COLORREF g_equipmentApplyColor = RGB(0, 255, 200); // OFFSET: 0x006BF770 // FUNCTION: fn_06293 __declspec(noinline) bool EquipmentPropertyDefinition::IsTwoDimensional() const { - return this->unknown_0040 != 0; + return this->separatorMode != 0; } // OFFSET: 0x0068A340 @@ -554,7 +555,7 @@ EquipmentPropertyGroup::~EquipmentPropertyGroup() { // OFFSET: 0x0069BCF0 // FUNCTION: fn_05808 std::string& EquipmentPropertyGroup::GetName() { - return this->unknown_0000; + return this->name; } // OFFSET: 0x0069BD00 @@ -566,14 +567,14 @@ std::map& EquipmentPropertyGroup::Ge // OFFSET: 0x006A1AA0 // FUNCTION: fn_06013 EquipmentProperties::CEquipmentPropertiesMgr::CEquipmentPropertiesMgr() - : unknown_000C(1), unknown_0010(-1), unknown_0014(-1), store(new EquipmentPropertyStore), unknown_001C(0), unknown_0020(0) { + : loadValid(1), unknown_0010(-1), shopId(-1), store(new EquipmentPropertyStore), currentEquipment(0), notifyWindow(0) { } // OFFSET: 0x006ABE90 // FUNCTION: fn_06170 void EquipmentProperties::CEquipmentPropertiesMgr::Clear() { - this->unknown_001C = 0; - this->unknown_0084.clear(); + this->currentEquipment = 0; + this->activeItems.clear(); for (auto& property : this->properties1) { delete property.second; } @@ -737,9 +738,9 @@ void EquipmentProperties::CEquipment::AddProperty(const std::string& name, const return; } - const int sign = (definition->unknown_0020[0] == op) * 2 - 1; + const int sign = (definition->functions[0] == op) * 2 - 1; if (value == 0x7FFFFFFF) { - if (index == -1 && definition->mode == 1 && definition->unknown_002C == 0) { + if (index == -1 && definition->mode == 1 && definition->functionMode == 0) { CEquipmentProperties property(definition); this->m_properties += &property; } @@ -794,8 +795,8 @@ int FindShopId(CSession& session, std::string name) { bool EquipmentProperties::CEquipmentWearable::UpdateActive() { const bool previous = this->m_active; SessionShop* shop = g_session.FindShop(FindShopId(g_session, std::string())); - if (shop != nullptr && !shop->unknown_0004.empty()) { - this->m_active = shop->unknown_0004[0].find(this->m_id) != shop->unknown_0004[0].end(); + if (shop != nullptr && !shop->items.empty()) { + this->m_active = shop->items[0].find(this->m_id) != shop->items[0].end(); } else { this->m_active = true; } @@ -930,26 +931,26 @@ void EquipmentProperties::CEquipmentWearable::Load(bool force) { lua_pushinteger(state, this->m_id); lua_gettable(state, 1); if (lua_type(state, -1) == LUA_TTABLE) { - for (auto& entry : this->m_info->unknown_0024) { + for (auto& entry : this->m_info->statProperties) { this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", entry.first), "AddExtParam", -1, entry.second, -1); } if (!g_session.IsCostumeLocation(this->m_type) && this->m_info != nullptr) { - const ITEM_INFO equipped = g_session.GetItem17F0(this->unknown_0040); - if (equipped.unknown_0000[1] > 0) { + const ITEM_INFO equipped = g_session.GetItem17F0(this->inventoryIndex); + if (equipped.identity[1] > 0) { const int key = this->GetValue(2); - const int level = equipped.unknown_0060; + const int level = equipped.refiningLevel; if (level > 0) { - switch (this->m_info->unknown_0000) { + switch (this->m_info->kind) { case 2: case 3: { const int bonus = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01BC(1, key, level); if (bonus != 0) { - const int rate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.unknown_0088, 1); + const int rate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.grade, 1); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0x29), "AddExtParam", -1, static_cast(static_cast(rate * bonus) / 10.0f + static_cast(bonus)), -1); - if (this->m_info->unknown_0000 == 2) { - const int magicRate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.unknown_0088, 2); + if (this->m_info->kind == 2) { + const int magicRate = CEquipmentPropertiesMgr::GetInstance()->GetUnknown01DC(1, equipped.grade, 2); this->AddProperty(std::format("AddExtParam arg1:0 arg2:{0}", 0xC8), "AddExtParam", -1, static_cast(static_cast(magicRate * bonus) / 10.0f + static_cast(bonus)), -1); } @@ -1096,46 +1097,46 @@ std::string EquipmentProperties::CEquipmentProperties1Dim::Describe(bool detaile } if (detailed == false) { - auto minimum = this->m_definition->unknown_005C.find(0); - if (minimum != this->m_definition->unknown_005C.end()) { + auto minimum = this->m_definition->formatOptions.find(0); + if (minimum != this->m_definition->formatOptions.end()) { value = std::max(value, minimum->second); } - auto maximum = this->m_definition->unknown_005C.find(1); - if (maximum != this->m_definition->unknown_005C.end()) { + auto maximum = this->m_definition->formatOptions.find(1); + if (maximum != this->m_definition->formatOptions.end()) { value = std::min(value, maximum->second); } } double result = value; - auto divisor = this->m_definition->unknown_005C.find(2); - if (divisor != this->m_definition->unknown_005C.end()) { + auto divisor = this->m_definition->formatOptions.find(2); + if (divisor != this->m_definition->formatOptions.end()) { result /= divisor->second; } int precision = 0; - auto digits = this->m_definition->unknown_005C.find(3); - if (digits != this->m_definition->unknown_005C.end()) { + auto digits = this->m_definition->formatOptions.find(3); + if (digits != this->m_definition->formatOptions.end()) { precision = digits->second; } - const double sign = (result < 0.0 && this->m_definition->unknown_0034.size() == 2) ? -1.0 : 1.0; + const double sign = (result < 0.0 && this->m_definition->signLabels.size() == 2) ? -1.0 : 1.0; const double scale = std::pow(10.0, precision); const double rounded = std::floor(result * scale) / scale; std::string number = std::vformat("{:.{}f}", std::make_format_args(sign * rounded, precision)); if (rounded != 0.0) { const int nonPositive = rounded <= 0.0; - switch (this->m_definition->unknown_0034.size()) { + switch (this->m_definition->signLabels.size()) { case 0: text = EncodeText(g_textCodePage, - std::vformat(DecodeText(g_textCodePage, this->m_definition->unknown_0008), std::make_wformat_args(DecodeText(g_textCodePage, number)))); + std::vformat(DecodeText(g_textCodePage, this->m_definition->formatText), std::make_wformat_args(DecodeText(g_textCodePage, number)))); break; case 2: { const int index = negative == true ? nonPositive ^ 1 : nonPositive; if (index == 1) { text += "{~}"; } - text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->unknown_0008), + text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->formatText), std::make_wformat_args(DecodeText(g_textCodePage, number), - DecodeText(g_textCodePage, this->m_definition->unknown_0034[index])))); + DecodeText(g_textCodePage, this->m_definition->signLabels[index])))); break; } } @@ -1155,7 +1156,7 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile for (auto entry = this->m_values.rbegin(); entry != this->m_values.rend(); ++entry) { std::string argument; unsigned int hash = 5381; - for (const char* character = this->m_definition->unknown_0044.c_str(); *character != '\0'; ++character) { + for (const char* character = this->m_definition->separator.c_str(); *character != '\0'; ++character) { hash = hash * 33 + *character; } switch (hash) { @@ -1204,28 +1205,28 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile int value = entry->second; if (detailed == false) { - auto minimum = this->m_definition->unknown_005C.find(0); - if (minimum != this->m_definition->unknown_005C.end()) { + auto minimum = this->m_definition->formatOptions.find(0); + if (minimum != this->m_definition->formatOptions.end()) { value = std::max(value, minimum->second); } - auto maximum = this->m_definition->unknown_005C.find(1); - if (maximum != this->m_definition->unknown_005C.end()) { + auto maximum = this->m_definition->formatOptions.find(1); + if (maximum != this->m_definition->formatOptions.end()) { value = std::min(value, maximum->second); } } double result = value; - auto divisor = this->m_definition->unknown_005C.find(2); - if (divisor != this->m_definition->unknown_005C.end()) { + auto divisor = this->m_definition->formatOptions.find(2); + if (divisor != this->m_definition->formatOptions.end()) { result /= divisor->second; } int precision = 0; - auto digits = this->m_definition->unknown_005C.find(3); - if (digits != this->m_definition->unknown_005C.end()) { + auto digits = this->m_definition->formatOptions.find(3); + if (digits != this->m_definition->formatOptions.end()) { precision = digits->second; } - const double sign = (result < 0.0 && this->m_definition->unknown_0034.size() == 2) ? -1.0 : 1.0; + const double sign = (result < 0.0 && this->m_definition->signLabels.size() == 2) ? -1.0 : 1.0; const double scale = std::pow(10.0, precision); const double rounded = std::floor(result * scale) / scale; std::string number = std::vformat("{:.{}f}", std::make_format_args(sign * rounded, precision)); @@ -1234,9 +1235,9 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile text += "\n"; } const int nonPositive = rounded <= 0.0; - switch (this->m_definition->unknown_0034.size()) { + switch (this->m_definition->signLabels.size()) { case 0: - text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->unknown_0008), + text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->formatText), std::make_wformat_args(DecodeText(g_textCodePage, number), DecodeText(g_textCodePage, argument)))); break; case 2: { @@ -1245,9 +1246,9 @@ std::string EquipmentProperties::CEquipmentProperties2Dim::Describe(bool detaile text += "{~}"; } text += EncodeText(g_textCodePage, - std::vformat(DecodeText(g_textCodePage, this->m_definition->unknown_0008), + std::vformat(DecodeText(g_textCodePage, this->m_definition->formatText), std::make_wformat_args(DecodeText(g_textCodePage, number), DecodeText(g_textCodePage, argument), - DecodeText(g_textCodePage, this->m_definition->unknown_0034[index])))); + DecodeText(g_textCodePage, this->m_definition->signLabels[index])))); break; } } @@ -1268,13 +1269,13 @@ std::string EquipmentProperties::CEquipmentProperties::Describe(bool detailed, b return text; } - switch (this->m_definition->unknown_0034.size()) { + switch (this->m_definition->signLabels.size()) { case 0: - text = this->m_definition->unknown_0008; + text = this->m_definition->formatText; break; case 2: - text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->unknown_0008), - std::make_wformat_args(DecodeText(g_textCodePage, this->m_definition->unknown_0034[negative])))); + text += EncodeText(g_textCodePage, std::vformat(DecodeText(g_textCodePage, this->m_definition->formatText), + std::make_wformat_args(DecodeText(g_textCodePage, this->m_definition->signLabels[negative])))); break; } return text; @@ -1288,10 +1289,10 @@ void EquipmentPropertyStore::RemoveDuplicateNames() { for (auto it = group.second.begin(); it != group.second.end();) { EquipmentProperty* property = it->second; EquipmentPropertyDefinition* definition = property->m_definition; - if (definition == nullptr || definition->unknown_0064.size() == 0) { + if (definition == nullptr || definition->uniqueGroup.size() == 0) { ++it; - } else if (names.find(definition->unknown_0064) == names.end()) { - names.insert(definition->unknown_0064); + } else if (names.find(definition->uniqueGroup) == names.end()) { + names.insert(definition->uniqueGroup); ++it; } else { delete property; @@ -1304,8 +1305,8 @@ void EquipmentPropertyStore::RemoveDuplicateNames() { // OFFSET: 0x006AC2A0 // FUNCTION: fn_06172 const int& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0134(const int& key) { - auto found = this->unknown_0134.find(key); - if (this->unknown_0134.end() == found) { + auto found = this->constantValues.find(key); + if (this->constantValues.end() == found) { return key; } return found->second.value; @@ -1314,7 +1315,7 @@ const int& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0134(const in // OFFSET: 0x006AC3B0 // FUNCTION: fn_06174 int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown001C() { - return this->unknown_001C; + return this->currentEquipment; } // OFFSET: 0x006AC3C0 @@ -1330,8 +1331,8 @@ EquipmentProperties::CEquipmentWearable* EquipmentProperties::CEquipmentProperti // OFFSET: 0x006AC440 // FUNCTION: fn_06176 EquipmentProperties::CEquipmentInfo* EquipmentProperties::CEquipmentPropertiesMgr::FindUnknown0094(const int& key) { - auto found = this->unknown_0094.find(key); - if (this->unknown_0094.end() == found) { + auto found = this->equipmentInfo.find(key); + if (this->equipmentInfo.end() == found) { return nullptr; } return &found->second; @@ -1973,8 +1974,8 @@ int GetNormalThirdJob(int job) { // OFFSET: 0x006AD500 // FUNCTION: fn_06184 EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown0174(const int& key) { - auto found = this->unknown_0174.find(key); - if (this->unknown_0174.end() == found) { + auto found = this->randomOptionDefinitions.find(key); + if (this->randomOptionDefinitions.end() == found) { return nullptr; } return found->second; @@ -2072,8 +2073,8 @@ int GetEquipLocationIndex(const int& mask) { // OFFSET: 0x006AD880 // FUNCTION: fn_06187 std::list* EquipmentProperties::CEquipmentPropertiesMgr::FindUnknown0114(const int& key) { - auto found = this->unknown_0114.find(key); - if (found == this->unknown_0114.end()) { + auto found = this->skillGroups.find(key); + if (found == this->skillGroups.end()) { return nullptr; } return &found->second; @@ -2082,13 +2083,13 @@ std::list* EquipmentProperties::CEquipmentPropertiesMgr::FindUnkno // OFFSET: 0x006AD900 // FUNCTION: fn_06188 std::unordered_map& EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown019C() { - return this->unknown_019C; + return this->displayValues; } // OFFSET: 0x006B0120 // FUNCTION: fn_06190 bool EquipmentProperties::CEquipmentPropertiesMgr::HasUnknown0194(const std::uint64_t& key) { - return this->unknown_0194.contains(key); + return this->functionPairs.contains(key); } // OFFSET: 0x006B0170 @@ -2112,11 +2113,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadADSkill() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid key({1})", name, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { unsigned int value = 0; type = lua_type(this->script.GetState(), -1); if (type == LUA_TNUMBER) { @@ -2125,12 +2126,12 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadADSkill() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid value({1})", name, result), 0); } - if (this->unknown_000C) { - this->unknown_0134.try_emplace(key, EquipmentValueA{static_cast(value)}); + if (this->loadValid) { + this->constantValues.try_emplace(key, EquipmentValueA{static_cast(value)}); } } lua_settop(state, -2); @@ -2139,7 +2140,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadADSkill() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2165,18 +2166,18 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadCombiitem() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid entry key({1})", name, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { std::vector items; result = this->script.GetFieldUIntArray(items, "Item"); - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Combiitem[{0}] has invalid 'Item' table({1})", key, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { for (unsigned int item : items) { this->m_combinationItems[key].push_back(item); } @@ -2188,7 +2189,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadCombiitem() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2213,11 +2214,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEnumVar() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid entry key({1})", name, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { std::vector values; if (lua_type(state, -1) == LUA_TTABLE) { lua_pushnil(state); @@ -2292,7 +2293,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEnumVar() { break; } if (variable != 0) { - this->unknown_00B4.emplace(variable, values[1]); + this->statVariables.emplace(variable, values[1]); } } } @@ -2305,7 +2306,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEnumVar() { // OFFSET: 0x006B3C00 // FUNCTION: fn_06196 void EquipmentProperties::CEquipmentPropertiesMgr::LoadIgnoreEquipmentProperties() { - if (!this->unknown_000C) { + if (!this->loadValid) { return; } lua_State* state = this->script.GetState(); @@ -2321,38 +2322,38 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadIgnoreEquipmentProperties ++index; std::vector functions; int result = this->script.GetFieldStringArray(functions, "func"); - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0}'s sub table[{1}] has invaild 'func' field({2})", name, index, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_000C &= functions.size() != 0; + this->loadValid &= functions.size() != 0; if (functions.size() == 0) { ShowErrorDialog(std::format("{0}'s sub table[{1}]'s 'func' table has 0 value", name, index), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_000C &= functions.size() <= 2; + this->loadValid &= functions.size() <= 2; if (functions.size() > 2) { ShowErrorDialog(std::format("{0}'s sub table[{1}]'s 'func' table has more than 2 values", name, index), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } std::map conditions; result = this->script.GetFieldUIntMap(conditions, "cond"); const bool valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("{0}'s sub table[{1}]'s has invalid 'cond' table({2})", name, index, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -2365,14 +2366,14 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadIgnoreEquipmentProperties for (const char* character = text.c_str(); *character != '\0'; ++character) { hash = hash * 33 + *character; } - this->unknown_0194.insert(hash); + this->functionPairs.insert(hash); } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("{0}'s sub table[{1}]'s 'cond' table has some error", name, index), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } lua_settop(state, -2); @@ -2381,7 +2382,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadIgnoreEquipmentProperties ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2398,7 +2399,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { if (lua_type(state, -1) == LUA_TTABLE) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { std::string key; int result = 0; int type = lua_type(this->script.GetState(), -2); @@ -2407,17 +2408,17 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}", result, name), 0); } - if (this->unknown_000C) { + if (this->loadValid) { bool valid = lua_type(state, -1) == LUA_TTABLE; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid data type: {0}.{1}", name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int kind = 0; unsigned int hash = 5381; for (const char* character = key.c_str(); *character != '\0'; ++character) { @@ -2440,14 +2441,14 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { valid = false; break; } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid value: {0}.{1}", name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { std::string category; type = lua_type(this->script.GetState(), -2); if (type == LUA_TSTRING) { @@ -2456,17 +2457,17 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}.{2}", result, name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { valid = lua_type(state, -1) == LUA_TTABLE; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid data type: {0}.{1}.{2}", name, key, category), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int categoryIndex = 0; hash = 5381; for (const char* character = category.c_str(); *character != '\0'; ++character) { @@ -2500,14 +2501,14 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { valid = false; break; } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid value: {0}.{1}.{2}", name, key, category), 0); } - if (this->unknown_000C) { + if (this->loadValid) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { std::string field; type = lua_type(this->script.GetState(), -2); if (type == LUA_TSTRING) { @@ -2517,11 +2518,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { result = (type != LUA_TNIL) + 1; } valid = result == 0; - this->unknown_000C &= valid; + this->loadValid &= valid; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}.{2}.{3}", result, name, key, category), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int fieldIndex = 0; hash = 5381; for (const char* character = field.c_str(); *character != '\0'; ++character) { @@ -2538,11 +2539,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { valid = false; break; } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid key: {0}.{1}.{2}", name, key, category), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int value; type = lua_type(this->script.GetState(), -1); if (type == LUA_TNUMBER) { @@ -2551,12 +2552,12 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid value: {0}.{1}.{2}.{3}", name, key, category, field), 0); } - if (this->unknown_000C) { - this->unknown_01DC[kind][categoryIndex][fieldIndex].value = value; + if (this->loadValid) { + this->categoryValues[kind][categoryIndex][fieldIndex].value = value; } } } @@ -2579,7 +2580,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadGradeBonus() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2596,7 +2597,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { if (lua_type(state, -1) == LUA_TTABLE) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { std::string key; int result = 0; int type = lua_type(this->script.GetState(), -2); @@ -2605,17 +2606,17 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}", result, name), 0); } - if (this->unknown_000C) { + if (this->loadValid) { bool valid = lua_type(state, -1) == LUA_TTABLE; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid data type: {0}.{1}", name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int kind = 0; unsigned int hash = 5381; for (const char* character = key.c_str(); *character != '\0'; ++character) { @@ -2638,14 +2639,14 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { valid = false; break; } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid value: {0}.{1}", name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { unsigned int level; type = lua_type(this->script.GetState(), -2); if (type == LUA_TNUMBER) { @@ -2654,20 +2655,20 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}.{2}", result, name, key), 0); } - if (this->unknown_000C) { + if (this->loadValid) { valid = lua_type(state, -1) == LUA_TTABLE; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("invalid data type: {0}.{1}.{2}", name, key, level), 0); } - if (this->unknown_000C) { + if (this->loadValid) { lua_pushnil(state); while (lua_next(state, -2) != 0) { - if (this->unknown_000C) { + if (this->loadValid) { unsigned int index = -1; type = lua_type(this->script.GetState(), -2); if (type == LUA_TNUMBER) { @@ -2676,11 +2677,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid key({0}): {1}.{2}.{3}", result, name, key, level), 0); } - if (this->unknown_000C) { + if (this->loadValid) { int value = -1; type = lua_type(this->script.GetState(), -1); if (type == LUA_TNUMBER) { @@ -2689,12 +2690,12 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("invalid value({0}): {1}.{2}.{3}.{4}", result, name, key, level, index), 0); } - if (this->unknown_000C) { - this->unknown_01BC[kind][level][index] = static_cast(value); + if (this->loadValid) { + this->levelRates[kind][level][index] = static_cast(value); } } } @@ -2715,7 +2716,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadRefiningBonus() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2742,11 +2743,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadSkillGroup() { keyResult = (type != LUA_TNIL) + 1; } const bool keyValid = keyResult == 0; - this->unknown_000C &= keyValid; + this->loadValid &= keyValid; if (keyResult != 0) { ShowErrorDialog(std::format("{0} table has invalid entry key({1})", name, keyResult), 0); } - if (this->unknown_000C && lua_type(state, -1) == LUA_TTABLE) { + if (this->loadValid && lua_type(state, -1) == LUA_TTABLE) { lua_pushnil(state); while (lua_next(state, -2) != 0) { unsigned int skill = 0; @@ -2758,12 +2759,12 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadSkillGroup() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= keyValid; + this->loadValid &= keyValid; if (keyResult != 0) { ShowErrorDialog(std::format("SkillGroup[{0}] has invalid 'Skill' table({1})", key, result), 0); } - if (this->unknown_000C) { - this->unknown_0114[key].push_back(skill); + if (this->loadValid) { + this->skillGroups[key].push_back(skill); } lua_settop(state, -2); } @@ -2774,7 +2775,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadSkillGroup() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -2782,7 +2783,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadSkillGroup() { // OFFSET: 0x006B7760 // FUNCTION: fn_06210 void EquipmentProperties::CEquipmentPropertiesMgr::SetWindow(UIWindow* window) { - this->unknown_0020 = window; + this->notifyWindow = window; } // OFFSET: 0x006A6490 @@ -3967,15 +3968,15 @@ void EquipmentProperties::CEquipmentPropertiesMgr::ApplyProperty(const char* nam } } - if (this->unknown_001C != 0) { - reinterpret_cast(this->unknown_001C)->AddProperty(text, name, index, value, key); + if (this->currentEquipment != 0) { + reinterpret_cast(this->currentEquipment)->AddProperty(text, name, index, value, key); } } // OFFSET: 0x006AB810 // FUNCTION: fn_06169 void EquipmentProperties::CEquipmentPropertiesMgr::EquipItem(const int& itemId, bool notify) { - this->unknown_0084.insert(itemId); + this->activeItems.insert(itemId); auto combinations = this->m_itemCombinations.find(itemId); if (combinations == this->m_itemCombinations.end()) { @@ -3990,7 +3991,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::EquipItem(const int& itemId, bool complete = true; for (const unsigned int& item : items->second) { - if (this->unknown_0084.count(item) == 0) { + if (this->activeItems.count(item) == 0) { complete = false; break; } @@ -4009,7 +4010,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::EquipItem(const int& itemId, // OFFSET: 0x006ABF80 // FUNCTION: fn_06171 void EquipmentProperties::CEquipmentPropertiesMgr::UnequipItem(const int& itemId, bool notify) { - this->unknown_0084.extract(itemId); + this->activeItems.extract(itemId); auto combinations = this->m_itemCombinations.find(itemId); if (combinations == this->m_itemCombinations.end()) { @@ -4023,7 +4024,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::UnequipItem(const int& itemId } for (const unsigned int& item : items->second) { - if (this->unknown_0084.count(item) != 0) { + if (this->activeItems.count(item) != 0) { continue; } @@ -4076,8 +4077,8 @@ EquipmentPropertyDefinition* EquipmentProperties::CEquipmentPropertiesMgr::FindD // OFFSET: 0x006AD580 // FUNCTION: fn_06185 int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01BC(const int& first, const int& second, const unsigned int& third) { - auto outer = this->unknown_01BC.find(first); - if (this->unknown_01BC.end() == outer) { + auto outer = this->levelRates.find(first); + if (this->levelRates.end() == outer) { return 0; } auto middle = outer->second.find(second); @@ -4118,8 +4119,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::AddExpansion(const int& kind, equipment->Load(notify); this->EquipItem(equipment->GetId(), notify); - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -4141,8 +4142,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RemoveExpansion(const int& ki this->properties2.erase(found); } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -4169,8 +4170,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshExpansion(const int& k } } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -4178,7 +4179,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshExpansion(const int& k // FUNCTION: fn_06206 void EquipmentProperties::CEquipmentPropertiesMgr::RefreshShop() { const int shopId = FindShopId(g_session, std::string()); - if (this->unknown_0014 != shopId) { + if (this->shopId != shopId) { for (auto& entry : this->properties1) { const bool previous = entry.second->IsActive(); this->m_dirty |= entry.second->UpdateActive(); @@ -4197,9 +4198,9 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshShop() { } } } - this->unknown_0014 = shopId; - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + this->shopId = shopId; + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -4225,8 +4226,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::Rebuild() { // OFFSET: 0x006B75C0 // FUNCTION: fn_06208 void EquipmentProperties::CEquipmentPropertiesMgr::SetCurrentEquipment(CEquipment* equipment) { - this->unknown_019C.clear(); - this->unknown_001C = reinterpret_cast(equipment); + this->displayValues.clear(); + this->currentEquipment = reinterpret_cast(equipment); } // OFFSET: 0x006B7770 @@ -4242,8 +4243,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshPretend() { this->m_dirty |= entry.second->IsPretend(); } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -4747,8 +4748,8 @@ int GetEquipWeaponLv(lua_State* state) { int GetLocation(lua_State* state) { int index = 0; EquipmentProperties::CEquipmentPropertiesMgr* mgr = EquipmentProperties::CEquipmentPropertiesMgr::GetInstance(); - if (mgr->unknown_001C != 0) { - const int location = reinterpret_cast(mgr->unknown_001C)->GetLocation(); + if (mgr->currentEquipment != 0) { + const int location = reinterpret_cast(mgr->currentEquipment)->GetLocation(); index = GetEquipLocationIndex(location); } lua_pushnumber(state, index); @@ -4826,10 +4827,10 @@ int GetPlayerValue(lua_State* state) { int value = 0; switch (args[0]) { case SP_SP: - value = *reinterpret_cast(&g_session.unknown_5570[0]); + value = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); break; case SP_MAXSP: - value = *reinterpret_cast(&g_session.unknown_5570[4]); + value = *reinterpret_cast(&g_session.spAndHomunculusStats[4]); break; case SP_BASELEVEL: value = g_session.m_level; @@ -5029,7 +5030,7 @@ void CSession::AddPartyMember(MessengerMember& member) { this->m_partyMembers.push_back(member); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (mode && (mode->scene->unknown_0048 != 0 || mode->scene->unknown_0054 != 0)) { + if (mode && (mode->scene->isPKZone != 0 || mode->scene->isEventPVPMode != 0)) { EffectActor* actor = static_cast(mode->scene->GetGameActorByAID(member.accountId)); if (actor && !actor->HasId(160)) { actor->LaunchEffect(160, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); @@ -5257,7 +5258,7 @@ void CGameMode::NotifyItemBounds() { if (g_windowMgr.window_02C8) { g_windowMgr.window_02C8->SendMsg(nullptr, UM_COMMAND, 34, g_session.m_aid, 0, 0); } - g_windowMgr.NotifyItemWindows(g_session.m_aid, g_session.unknown_5568, g_session.unknown_556C); + g_windowMgr.NotifyItemWindows(g_session.m_aid, g_session.hp, g_session.maxHp); } // OFFSET: 0x0069C980 @@ -5436,13 +5437,13 @@ bool CGameMode::IsAllowedPair(int kind, int value) { case 8: return value == 6 || value == 9; case 0x16: - if (g_windowMgr.unknown_0064 != 0) { + if (g_windowMgr.dragAllItems != 0) { return false; } case 0xA0: return value == 4 || value == 5; case 0x18: - if (g_windowMgr.unknown_0064 != 0) { + if (g_windowMgr.dragAllItems != 0) { return false; } case 0x17: @@ -5482,7 +5483,7 @@ bool CGameMode::IsWithinRange(const int& x1, const int& y1, const int& x2, const // OFFSET: 0x00CD74B0 // FUNCTION: fn_21293 bool CGameMode::IsRegisterCell(int x, int y) { - for (auto& entry : this->unknown_019C) { + for (auto& entry : this->actorPosList) { if (entry.second.first == x && entry.second.second == y) { CGameActor* actor = static_cast(this->scene->GetGameActorByAID(entry.first)); if (actor == nullptr) { @@ -5499,7 +5500,7 @@ bool CGameMode::IsRegisterCell(int x, int y) { // OFFSET: 0x00CD7560 // FUNCTION: fn_21294 bool CGameMode::HasUnknown01A4(int value) { - for (int entry : this->unknown_01A4) { + for (int entry : this->pickupReqItemNaidList) { if (entry == value) { return true; } @@ -5514,7 +5515,7 @@ bool CGameMode::IsValidCell(int x, int y) { return false; } CPlayer* player = this->scene->player; - if (x == reinterpret_cast(player->unknown_04F8) && y == player->unknown_04FC) { + if (x == reinterpret_cast(player->destCellX) && y == player->destCellZ) { return false; } int column; @@ -5530,40 +5531,40 @@ bool CGameMode::IsValidCell(int x, int y) { __declspec(noinline) void CSession::UpdateRandomStats() { if (g_resetMessengerRandomStats != 0) { g_resetMessengerRandomStats = 0; - this->unknown_5334 = std::max(std::rand() % 12, 0); - this->unknown_5330 = std::max(std::rand() % 12, 0); - this->unknown_533C = std::max(std::rand() % 12, 0); - this->unknown_532C = std::max(std::rand() % 12, 0); - this->unknown_5338 = std::max(std::rand() % 12, 0); + this->randomStatIndexC = std::max(std::rand() % 12, 0); + this->randomStatIndexB = std::max(std::rand() % 12, 0); + this->randomStatIndexE = std::max(std::rand() % 12, 0); + this->randomStatIndexA = std::max(std::rand() % 12, 0); + this->randomStatIndexD = std::max(std::rand() % 12, 0); } - const int bound70 = reinterpret_cast(this->unknown_5570[0]); - const int bound74 = reinterpret_cast(this->unknown_5570[4]); - const int bound68 = this->unknown_5568; - const int bound6C = this->unknown_556C; - this->unknown_5334 = std::max(std::rand() % 12, 0); - this->unknown_532C = std::max(std::rand() % 12, 0); - this->unknown_5338 = std::max(std::rand() % 12, 0); - this->unknown_5330 = std::max(std::rand() % 12, 0); - this->unknown_533C = std::max(std::rand() % 12, 0); - for (int& value : this->unknown_5340) { + const int bound70 = reinterpret_cast(this->spAndHomunculusStats[0]); + const int bound74 = reinterpret_cast(this->spAndHomunculusStats[4]); + const int bound68 = this->hp; + const int bound6C = this->maxHp; + this->randomStatIndexC = std::max(std::rand() % 12, 0); + this->randomStatIndexA = std::max(std::rand() % 12, 0); + this->randomStatIndexD = std::max(std::rand() % 12, 0); + this->randomStatIndexB = std::max(std::rand() % 12, 0); + this->randomStatIndexE = std::max(std::rand() % 12, 0); + for (int& value : this->randomStatValues) { value = std::max(std::abs(std::rand()) % 1, 0); } - if (this->unknown_5568 != bound68) { - this->unknown_5568 = bound68; + if (this->hp != bound68) { + this->hp = bound68; this->RefreshHpSpWindows(); } - if (this->unknown_556C != bound6C) { - this->unknown_556C = bound6C; + if (this->maxHp != bound6C) { + this->maxHp = bound6C; this->RefreshHpSpWindows(); } - if (reinterpret_cast(this->unknown_5570[0]) != bound70) { - reinterpret_cast(this->unknown_5570[0]) = bound70; + if (reinterpret_cast(this->spAndHomunculusStats[0]) != bound70) { + reinterpret_cast(this->spAndHomunculusStats[0]) = bound70; this->RefreshHpSpWindows(); } - if (reinterpret_cast(this->unknown_5570[4]) != bound74) { - reinterpret_cast(this->unknown_5570[4]) = bound74; + if (reinterpret_cast(this->spAndHomunculusStats[4]) != bound74) { + reinterpret_cast(this->spAndHomunculusStats[4]) = bound74; this->RefreshHpSpWindows(); } } @@ -5578,7 +5579,7 @@ void ClearMemberFlags(std::uint32_t* flags) { // FUNCTION: fn_23309 void CSession::ResetEquipment() { for (int index = 0; index < 10; ++index) { - this->unknown_17F0[index].Reset(); + this->equippedItems[index].Reset(); } RequestBasicInfoRefresh(); EquipmentProperties::CEquipmentPropertiesMgr::GetInstance()->Clear(); @@ -5588,7 +5589,7 @@ void CSession::ResetEquipment() { // OFFSET: 0x00DD8750 // FUNCTION: fn_23311 void CSession::ResetSlots() { - this->unknown_5210 = 0; + this->exchangeMoney = 0; this->m_exchangeItems[0].quantity = 0; this->m_exchangeItems[1].quantity = 0; this->m_exchangeItems[2].quantity = 0; @@ -5610,37 +5611,37 @@ int CSession::GetList0Size() const { // OFFSET: 0x00DDF8C0 // FUNCTION: fn_23429 int CSession::GetList11Size() const { - return static_cast(this->unknown_1768.size()); + return static_cast(this->merchantPurchaseSavedItems.size()); } // OFFSET: 0x00DDF8D0 // FUNCTION: fn_23430 int CSession::GetList6Size() const { - return static_cast(this->unknown_1740.size()); + return static_cast(this->merchantShopItems.size()); } // OFFSET: 0x00DDF8E0 // FUNCTION: fn_23431 int CSession::GetList8Size() const { - return static_cast(this->unknown_1750.size()); + return static_cast(this->merchantMyShopItems.size()); } // OFFSET: 0x00DDF8F0 // FUNCTION: fn_23432 int CSession::GetList9Size() const { - return static_cast(this->unknown_1758.size()); + return static_cast(this->merchantPurchaseItems.size()); } // OFFSET: 0x00DDF900 // FUNCTION: fn_23433 int CSession::GetList10Size() const { - return static_cast(this->unknown_1760.size()); + return static_cast(this->merchantHopeToSellItems.size()); } // OFFSET: 0x00DDF910 // FUNCTION: fn_23434 int CSession::GetList7Size() const { - return static_cast(this->unknown_1748.size()); + return static_cast(this->merchantMirrorItems.size()); } // OFFSET: 0x00DDF920 @@ -5649,41 +5650,41 @@ int CSession::GetList1788(int index) const { if (index < 0) { return 0; } - if (index >= std::size(this->unknown_1784)) { + if (index >= std::size(this->inventoryCategories)) { return 0; } - return static_cast(this->unknown_1784[index].size()); + return static_cast(this->inventoryCategories[index].size()); } // OFFSET: 0x00DDF9E0 // FUNCTION: fn_23437 int CSession::GetList2Size() const { - return static_cast(this->unknown_1720.size()); + return static_cast(this->purchaseItems.size()); } // OFFSET: 0x00DDF9F0 // FUNCTION: fn_23438 int CSession::GetList4Size() const { - return static_cast(this->unknown_1730.size()); + return static_cast(this->storageItems.size()); } // OFFSET: 0x00DDFA00 // FUNCTION: fn_23439 int CSession::GetList1Size() const { - return static_cast(this->unknown_1718.size()); + return static_cast(this->shopItems.size()); } // OFFSET: 0x00DDFA10 // FUNCTION: fn_23440 int CSession::GetList5Size() const { - return static_cast(this->unknown_1738.size()); + return static_cast(this->cartItems.size()); } // OFFSET: 0x00DD8380 // FUNCTION: fn_23305 void CSession::ClearAllItems1784() { for (int index = 0; index < 11; ++index) { - std::list& items = this->unknown_1784[index]; + std::list& items = this->inventoryCategories[index]; items.erase(items.begin(), items.end()); } } @@ -5692,7 +5693,7 @@ void CSession::ClearAllItems1784() { // FUNCTION: fn_23306 void CSession::KeepEquipment() { for (auto entry = this->m_inventoryItems.begin(); entry != this->m_inventoryItems.end();) { - switch (entry->unknown_0000[0]) { + switch (entry->identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -5716,16 +5717,16 @@ void CSession::KeepEquipment() { // OFFSET: 0x00DD8540 // FUNCTION: fn_23307 void CSession::ClearTradeItems() { - this->unknown_1720.erase(this->unknown_1720.begin(), this->unknown_1720.end()); - this->unknown_1730.erase(this->unknown_1730.begin(), this->unknown_1730.end()); - this->unknown_1718.erase(this->unknown_1718.begin(), this->unknown_1718.end()); + this->purchaseItems.erase(this->purchaseItems.begin(), this->purchaseItems.end()); + this->storageItems.erase(this->storageItems.begin(), this->storageItems.end()); + this->shopItems.erase(this->shopItems.begin(), this->shopItems.end()); } // OFFSET: 0x00DD8660 // FUNCTION: fn_23310 void CSession::RemoveEquipment() { for (auto entry = this->m_inventoryItems.begin(); entry != this->m_inventoryItems.end();) { - switch (entry->unknown_0000[0]) { + switch (entry->identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -5758,7 +5759,7 @@ EquipmentProperties::CEquipmentProperties* EquipmentProperties::CEquipmentProper return this; } - if (this->m_definition->unknown_007C != 0) { + if (this->m_definition->uniqueKeyMode != 0) { if (source->m_keys.size() != 1) { return this; } @@ -5996,8 +5997,8 @@ int GetEquipGrade(lua_State* state) { const int mask = GetEquipLocationMask(args[0]); const EquipSlots slots = g_session.GetEquipSlots(mask); const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); - if (item.unknown_0000[1] > 0) { - grade = item.unknown_0088; + if (item.identity[1] > 0) { + grade = item.grade; } } @@ -6024,7 +6025,7 @@ int GetEquipItemId(lua_State* state) { const EquipSlots slots = g_session.GetEquipSlots(mask); const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); int itemId = 0; - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { itemId = std::atoi(item.itemId.c_str()); } @@ -6051,8 +6052,8 @@ int GetEquipRefine(lua_State* state) { const EquipSlots slots = g_session.GetEquipSlots(mask); const ITEM_INFO item = g_session.IsCostumeLocation(mask) ? g_session.GetItem2B50(slots.values[2]) : g_session.GetItem17F0(slots.values[2]); int refine = 0; - if (item.unknown_0000[1] > 0) { - refine = item.unknown_0060; + if (item.identity[1] > 0) { + refine = item.refiningLevel; } lua_pushnumber(state, refine); @@ -6100,8 +6101,8 @@ void CGameMode::ReceiveShopItemList(const unsigned char* data) { // OFFSET: 0x006AC320 // FUNCTION: fn_06173 int EquipmentProperties::CEquipmentPropertiesMgr::GetUnknown01DC(const int& first, const int& second, const int& third) { - auto outer = this->unknown_01DC.find(first); - if (this->unknown_01DC.end() != outer) { + auto outer = this->categoryValues.find(first); + if (this->categoryValues.end() != outer) { auto middle = outer->second.find(second); if (outer->second.end() != middle) { auto inner = middle->second.find(third); @@ -6181,8 +6182,8 @@ void CGameMode::Zc_Mer_Init(const unsigned char* data) { const MercenaryInitPacket* packet = reinterpret_cast(data); g_session.m_mercSkills.clear(); CRenderObject* actor = this->scene->GetGameActorByAID(packet->aid); - *reinterpret_cast(&g_session.unknown_5620[8]) = packet->aid; - g_session.unknown_56B0 = 1; + *reinterpret_cast(&g_session.companionTargetState[8]) = packet->aid; + g_session.mercenaryAlive = 1; if (actor != nullptr) { g_session.m_mercenaryClass = static_cast(actor)->GetEffectiveJob(-1); } @@ -6207,7 +6208,7 @@ void CGameMode::Zc_Mer_Init(const unsigned char* data) { g_session.m_mercenaryLoyalty = packet->loyalty; g_session.m_mercenarySummons = packet->summons; g_session.m_mercenaryKills = packet->kills; - *reinterpret_cast(&g_session.unknown_5690[0]) = packet->attackRange; + *reinterpret_cast(&g_session.mercenaryAttackRange[0]) = packet->attackRange; g_session.m_mercenaryExpiration = packet->expiration; } @@ -6222,7 +6223,7 @@ struct MercenaryParChangePacket { // OFFSET: 0x00D323D0 // FUNCTION: fn_21742 void CGameMode::Zc_Mer_Par_Change(const unsigned char* data) { - if (g_session.unknown_56B0 == 0) { + if (g_session.mercenaryAlive == 0) { return; } @@ -6355,8 +6356,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::UnequipWearable(const int& ma delete found->second; this->properties1.erase(found); } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -6378,15 +6379,15 @@ void EquipmentProperties::CEquipmentPropertiesMgr::RefreshWearable(const int& ke } } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } // OFFSET: 0x006B1000 // FUNCTION: fn_06194 void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder() { - if (!this->unknown_000C) { + if (!this->loadValid) { return; } lua_State* state = this->script.GetState(); @@ -6407,21 +6408,21 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid entry key({1})", name, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { std::string categoryName; result = this->script.GetFieldString(categoryName, "name"); - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Category[{0}] has invalid 'name' field({1})", category, result), 0); } - if (this->unknown_000C) { + if (this->loadValid) { categoryName = FromUtf8(categoryName, g_textCodePage); std::map& definitions = - this->unknown_008C.try_emplace(category, EquipmentPropertyGroup(categoryName.c_str())).first->second.GetDefinitions(); + this->propertyGroups.try_emplace(category, EquipmentPropertyGroup(categoryName.c_str())).first->second.GetDefinitions(); lua_pushstring(state, "order"); lua_gettable(state, -2); if (lua_type(state, -1) == LUA_TTABLE) { @@ -6435,11 +6436,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Category table has invalid entry key({0})", result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -6450,80 +6451,80 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( std::string orderName; result = this->script.GetFieldString(orderName, "name"); - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'name' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } orderName = FromUtf8(orderName, g_textCodePage); - definition->unknown_0008 = orderName; - const bool hasSeparator = ContainsText(definition->unknown_0008, "{sep}"); - const bool hasValue = ContainsText(definition->unknown_0008, "{val}"); + definition->formatText = orderName; + const bool hasSeparator = ContainsText(definition->formatText, "{sep}"); + const bool hasValue = ContainsText(definition->formatText, "{val}"); std::string_view symbol; if (hasValue == true) { - ReplaceAll(definition->unknown_0008, "{val}", "{0}"); - ReplaceAll(definition->unknown_0008, "{sep}", "{1}"); + ReplaceAll(definition->formatText, "{val}", "{0}"); + ReplaceAll(definition->formatText, "{sep}", "{1}"); symbol = hasSeparator ? "{2}" : "{1}"; } else { symbol = "{0}"; } - ReplaceAll(definition->unknown_0008, "{sym}", symbol); + ReplaceAll(definition->formatText, "{sym}", symbol); - result = this->script.GetFieldStringArray(definition->unknown_0020, "func"); - this->unknown_000C &= result == 0; + result = this->script.GetFieldStringArray(definition->functions, "func"); + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'func' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_000C &= definition->unknown_0020.size() != 0; - if (definition->unknown_0020.size() == 0) { + this->loadValid &= definition->functions.size() != 0; + if (definition->functions.size() == 0) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'func' table has 0 value", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_000C &= definition->unknown_0020.size() <= 2; - if (definition->unknown_0020.size() > 2) { + this->loadValid &= definition->functions.size() <= 2; + if (definition->functions.size() > 2) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'func' table has more than 2 values", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } std::map values; result = this->script.GetFieldUIntMap(values, "val"); - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s has invalid 'val' table({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_000C &= values.size() == 1; + this->loadValid &= values.size() == 1; if (values.size() != 1) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'val' table has too many key-value pair", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } for (const auto& value : values) { - definition->unknown_002C = value.first; + definition->functionMode = value.first; definition->mode = value.second; if (!hasValue) { - this->unknown_000C &= value.second == 1; + this->loadValid &= value.second == 1; if (definition->mode != 1) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'val' table must have 'ONE' type", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } } @@ -6532,15 +6533,15 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( std::map conditions; result = this->script.GetFieldUIntMap(conditions, "cond"); bool valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s has invalid 'cond' table({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - for (const std::string& function : definition->unknown_0020) { + for (const std::string& function : definition->functions) { std::string text = std::format("{0}", function); for (const auto& condition : conditions) { text = std::format("{0} arg{1}:{2}", text, condition.first, condition.second); @@ -6551,106 +6552,106 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( } const std::uint64_t nameKey = hash; valid = this->m_definitionsByName.find(nameKey) == this->m_definitionsByName.end(); - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("string:{0} cause hash collision", text), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } this->m_definitionsByName.insert({nameKey, definition}); } - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'cond' table has some error", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - result = this->script.GetFieldStringArray(definition->unknown_0034, "sym"); + result = this->script.GetFieldStringArray(definition->signLabels, "sym"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s value table has invaild 'sym' field", categoryName, order), 0); } - valid = definition->unknown_0034.size() == 0 || definition->unknown_0034.size() == 2; - this->unknown_000C &= valid; + valid = definition->signLabels.size() == 0 || definition->signLabels.size() == 2; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s value table has invaild 'sym' field", categoryName, order), 0); } - for (std::string& symbolText : definition->unknown_0034) { + for (std::string& symbolText : definition->signLabels) { symbolText = FromUtf8(symbolText, g_textCodePage); } std::map separators; result = this->script.GetFieldStringMap(separators, "sep"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s has invalid 'sep' table({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } if (result == 0) { - this->unknown_000C &= separators.size() == 1; + this->loadValid &= separators.size() == 1; if (separators.size() != 1) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s 'sep' table has too many key-value pair", categoryName, order), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } for (const auto& separator : separators) { - definition->unknown_0040 = separator.first; - definition->unknown_0044 = separator.second; + definition->separatorMode = separator.first; + definition->separator = separator.second; } } int randomOption; result = this->script.GetFieldInt(randomOption, "rndOpt"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'rndOpt' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } if (result == 0) { - valid = this->unknown_0174.find(randomOption) == this->unknown_0174.end(); - this->unknown_000C &= valid; + valid = this->randomOptionDefinitions.find(randomOption) == this->randomOptionDefinitions.end(); + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}]'s rndOpt value is already defined: {2}", category, order, static_cast(randomOption)), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - this->unknown_0174[randomOption] = definition; + this->randomOptionDefinitions[randomOption] = definition; } - result = this->script.GetFieldString(definition->unknown_0064, "uniq1"); + result = this->script.GetFieldString(definition->uniqueGroup, "uniq1"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'uniq1' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } - result = this->script.GetFieldInt(definition->unknown_007C, "uniq2"); + result = this->script.GetFieldInt(definition->uniqueKeyMode, "uniq2"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'uniq2' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -6671,7 +6672,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( if (result != 0) { break; } - definition->unknown_005C[optionKey] = optionValue; + definition->formatOptions[optionKey] = optionValue; lua_settop(this->script.GetState(), -2); } } else { @@ -6679,11 +6680,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( } lua_settop(this->script.GetState(), -2); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Category({0})'s order[{1}] has invaild 'rndOpt' field({2})", categoryName, order, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } lua_settop(state, -2); @@ -6700,7 +6701,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadEquipmentPropertiesOrder( ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } @@ -6719,13 +6720,13 @@ static_assert(sizeof(EquipmentItemOption) == 5); // FUNCTION: fn_05604 EquipmentProperties::CEquipmentWearable::CEquipmentWearable(const ITEM_INFO* item) : CEquipment(), m_active(true) { this->m_id = std::atoi(item->itemId.c_str()); - this->m_type = item->unknown_0000[3]; + this->m_type = item->identity[3]; this->m_info = CEquipmentPropertiesMgr::GetInstance()->FindUnknown0094(this->m_id); - this->unknown_0040 = g_session.GetEquipSlots(this->m_type).values[2]; + this->inventoryIndex = g_session.GetEquipSlots(this->m_type).values[2]; for (int index = 0; index < 4; ++index) { int card; - std::memcpy(&card, item->unknown_001C + index * sizeof(card), sizeof(card)); + std::memcpy(&card, item->cards + index * sizeof(card), sizeof(card)); if (card != 0) { const CEquipmentAttachable attachable(card, index, this); this->m_attachables.push_back(attachable); @@ -6734,16 +6735,16 @@ EquipmentProperties::CEquipmentWearable::CEquipmentWearable(const ITEM_INFO* ite for (int index = 0; index < 5; ++index) { EquipmentItemOption option; - std::memcpy(&option, item->unknown_009C + index * sizeof(option), sizeof(option)); + std::memcpy(&option, item->options + index * sizeof(option), sizeof(option)); const int optionId = option.id; EquipmentPropertyDefinition* definition = CEquipmentPropertiesMgr::GetInstance()->GetUnknown0174(optionId); - if (definition == nullptr || definition->unknown_0020.front() == "SetWeaponAttr") { + if (definition == nullptr || definition->functions.front() == "SetWeaponAttr") { continue; } int multiplier = 1; - const auto found = definition->unknown_005C.find(2); - if (found != definition->unknown_005C.end()) { + const auto found = definition->formatOptions.find(2); + if (found != definition->formatOptions.end()) { multiplier = found->second; } if (definition->IsTwoDimensional() == true) { @@ -6783,7 +6784,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::EquipWearable(const ITEM_INFO } this->m_dirty = true; - const int key = GetEquipLocationIndex(item->unknown_0000[3]); + const int key = GetEquipLocationIndex(item->identity[3]); const auto found = this->properties1.find(key); if (found != this->properties1.end()) { delete found->second; @@ -6801,8 +6802,8 @@ void EquipmentProperties::CEquipmentPropertiesMgr::EquipWearable(const ITEM_INFO this->EquipItem(attachable.GetId(), notify); } } - if (this->unknown_0020 != nullptr) { - this->unknown_0020->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->notifyWindow != nullptr) { + this->notifyWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -6959,7 +6960,7 @@ bool EquipmentProperties::CEquipmentPropertiesMgr::InitializeLua() { this->LoadRefiningBonus(); this->LoadEquipmentPropertiesOrder(); this->LoadIgnoreEquipmentProperties(); - return this->unknown_000C; + return this->loadValid; } // OFFSET: 0x006B4600 @@ -6987,11 +6988,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { } else { result = (type != LUA_TNIL) + 1; } - this->unknown_000C &= result == 0; + this->loadValid &= result == 0; if (result != 0) { ShowErrorDialog(std::format("{0} table has invalid entry key({1})", name, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -7018,22 +7019,22 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { result = 3; } bool valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Item[{0}] has invalid 'Stat' table({1})", key, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } std::string itemType; result = this->script.GetFieldString(itemType, "Type"); const bool hasType = result == 0; - this->unknown_000C &= hasType; + this->loadValid &= hasType; if (result != 0) { ShowErrorDialog(std::format("Item[{0}] has invalid 'Type' field({1})", key, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -7045,32 +7046,32 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { } switch (hash) { case 0x0F1AAAA6: - info.unknown_0000 = 1; + info.kind = 1; count = 17; break; case 0x47F48D1C: - info.unknown_0000 = 2; + info.kind = 2; count = 17; break; case 0xC8D7BCE1: - info.unknown_0000 = 3; + info.kind = 3; count = 15; break; case 0x7C941E6F: - info.unknown_0000 = 4; + info.kind = 4; count = 2; break; case 0xA4C66E86: - info.unknown_0000 = 5; + info.kind = 5; break; } } valid = count == stats.size(); - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Item[{0}] has invalid 'Stat' table(count: {1})", key, count), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } @@ -7140,11 +7141,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { default: continue; } - auto found = this->unknown_00B4.find(variable); - if (found == this->unknown_00B4.end()) { + auto found = this->statVariables.find(variable); + if (found == this->statVariables.end()) { ShowErrorDialog(std::format("Not available stat type: {0}", variable), 0); } else { - info.unknown_0024.try_emplace(found->second.value, stats[index]); + info.statProperties.try_emplace(found->second.value, stats[index]); } } break; @@ -7209,11 +7210,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { default: continue; } - auto found = this->unknown_00B4.find(variable); - if (found == this->unknown_00B4.end()) { + auto found = this->statVariables.find(variable); + if (found == this->statVariables.end()) { ShowErrorDialog(std::format("Not available stat type: {0}", variable), 0); } else { - info.unknown_0024.try_emplace(found->second.value, stats[index]); + info.statProperties.try_emplace(found->second.value, stats[index]); } } break; @@ -7226,11 +7227,11 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { info.values.try_emplace(0, stats[index]); } else if (index == 1) { const int variable = 41; - auto found = this->unknown_00B4.find(variable); - if (found == this->unknown_00B4.end()) { + auto found = this->statVariables.find(variable); + if (found == this->statVariables.end()) { ShowErrorDialog(std::format("Not available stat type: {0}", variable), 0); } else { - info.unknown_0024.try_emplace(found->second.value, stats[index]); + info.statProperties.try_emplace(found->second.value, stats[index]); } } } @@ -7290,28 +7291,28 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { default: continue; } - auto found = this->unknown_00B4.find(variable); - if (found == this->unknown_00B4.end()) { + auto found = this->statVariables.find(variable); + if (found == this->statVariables.end()) { ShowErrorDialog(std::format("Not available stat type: {0}", variable), 0); } else { - info.unknown_0024.try_emplace(found->second.value, stats[index]); + info.statProperties.try_emplace(found->second.value, stats[index]); } } break; } - if (info.unknown_0000 != 0) { - this->unknown_0094.try_emplace(key, std::move(info)); + if (info.kind != 0) { + this->equipmentInfo.try_emplace(key, std::move(info)); } std::vector combinations; result = this->script.GetFieldUIntArray(combinations, "Combiitem"); valid = result == 0 || result == 1; - this->unknown_000C &= valid; + this->loadValid &= valid; if (!valid) { ShowErrorDialog(std::format("Item[{0}] has invalid 'Combiitem' table({1})", key, result), 0); } - if (!this->unknown_000C) { + if (!this->loadValid) { break; } if (result == 0) { @@ -7327,7 +7328,7 @@ void EquipmentProperties::CEquipmentPropertiesMgr::LoadItems() { ShowErrorDialog(std::format("Can't find global table '{0}'", name), 0); } lua_settop(state, -2); - if (!this->unknown_000C) { + if (!this->loadValid) { ShowErrorDialog(std::format("Check error in '{0}' table and restart game ", name), 0); } } diff --git a/Source/Contents/Messenger/MessengerMember.cpp b/Source/Contents/Messenger/MessengerMember.cpp index f50ee70cd..645ed1bff 100644 --- a/Source/Contents/Messenger/MessengerMember.cpp +++ b/Source/Contents/Messenger/MessengerMember.cpp @@ -101,9 +101,9 @@ public: /* 00B4 */ MessengerMember member; /* 0104 */ UIPcGage* gauge; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ int unknown_0110; + /* 0108 */ int memberIndex; + /* 010C */ int dragStartX; + /* 0110 */ int dragStartY; /* 0114 */ int iconIndex; /* 0118 */ std::vector iconPositions; }; @@ -133,7 +133,7 @@ public: void OnLBtnUp(int x, int y) override; void OnRBtnUp(int x, int y) override; - /* 0120 */ int unknown_0120; + /* 0120 */ int offline; }; class UIMessengerGroupWnd : public UIFrameWnd { @@ -162,11 +162,11 @@ public: // INLINED UIWindow* CompanionWindow() const { if (this->mode == 0) { - return reinterpret_cast(g_windowMgr.unknown_033C); + return reinterpret_cast(g_windowMgr.friendOptionWnd); } - UIWindow* window = reinterpret_cast(g_windowMgr.unknown_042C); - if (g_windowMgr.unknown_030C) { - window = reinterpret_cast(g_windowMgr.unknown_030C); + UIWindow* window = reinterpret_cast(g_windowMgr.partyInvitationToWnd); + if (g_windowMgr.partySettingWnd) { + window = reinterpret_cast(g_windowMgr.partySettingWnd); } return window; } @@ -212,7 +212,7 @@ MessengerMember::MessengerMember() : valid(1), dead(0) { // FUNCTION: fn_07664 UIDragMiniPartyWnd::UIDragMiniPartyWnd(MessengerMember member) : UIFrameWnd(0), member(member), gauge(nullptr), iconIndex(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } // OFFSET: 0x007384A0 @@ -344,7 +344,7 @@ void UIDragMiniPartyWnd::Paint() { if (this->member.dead == 1) { dead = true; } else if (this->member.accountId == g_session.m_aid) { - dead = static_cast(g_modeMgr.GetGameMode())->unknown_0250 == 1; + dead = static_cast(g_modeMgr.GetGameMode())->isPlayerDead == 1; } int yOffset = this->member.leader ? 0 : 2; @@ -437,7 +437,7 @@ __declspec(noinline) void UIDragMiniPartyWnd::MoveGauge(int x, int y) { void UIDragMiniPartyWnd::OnLBtnUp(int argument1, int argument2) { auto* window = static_cast(g_windowMgr.LookupWindow(WID_MESSENGERGROUPWND)); if (window) { - window->DropMember(argument1 + this->geometry.x, argument2 + this->geometry.y, this->unknown_0108); + window->DropMember(argument1 + this->geometry.x, argument2 + this->geometry.y, this->memberIndex); } } @@ -451,8 +451,8 @@ __declspec(noinline) void UIDragMiniPartyWnd::RemoveGauge() { // OFFSET: 0x00738D50 // FUNCTION: fn_07674 __declspec(noinline) void UIDragMiniPartyWnd::SetUnknown010C(int first, int second) { - this->unknown_010C = first; - this->unknown_0110 = second; + this->dragStartX = first; + this->dragStartY = second; } // OFFSET: 0x00738D40 @@ -472,8 +472,8 @@ void UIPcGage::SetValues(int current, int maximum) { // OFFSET: 0x0089C360 // FUNCTION: fn_11586 void UIPcGage::SetLimits(int first, int second) { - this->unknown_00A8 = first; - this->unknown_00AC = second; + this->secondaryValue = first; + this->secondaryMaximum = second; this->Invalidate(); } @@ -584,7 +584,7 @@ void UIFriendOptionWnd::StoreInfo() { // OFFSET: 0x00739330 // FUNCTION: fn_07685 UIJobIconButton::UIJobIconButton() : UIBitmapButton() { - this->unknown_0120 = 0; + this->offline = 0; } // OFFSET: 0x007393E0 @@ -598,7 +598,7 @@ void UIJobIconButton::Paint() { if (this->m_disabled == 1) { name = this->m_names[3]; } else { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: name = this->m_names[0]; break; @@ -614,7 +614,7 @@ void UIJobIconButton::Paint() { if (!name.empty()) { auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(name.c_str()))); if (bitmap) { - if (this->unknown_0120 == 1) { + if (this->offline == 1) { this->DrawAuxiliary(1, 0, 0, &bitmap->image, true, false); } else { this->DrawBitmap(0, 0, bitmap, true); @@ -689,15 +689,15 @@ __declspec(noinline) void UIMessengerGroupWnd::DropMember(int x, int y, int inde MessengerMember member = this->MemberAtIndex(index); SessionRecord0734 record = g_session.FindRecord0734(member.accountId); UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND); - if (record.unknown_0000 != 1) { + if (record.active != 1) { int top = static_cast(static_cast(g_renderer->viewport.height) * 0.3f); if (window) { top = window->geometry.y + window->geometry.height; } int cell; - if (x < g_windowMgr.unknown_4F238 + 23 && y > top) { - int row = (y - top) / (g_windowMgr.unknown_4F23C + 3); + if (x < g_windowMgr.miniPartyWidth + 23 && y > top) { + int row = (y - top) / (g_windowMgr.miniPartyHeight + 3); cell = row; if (g_windowMgr.FindSnapExcludedWindow(row)) { cell = g_windowMgr.FindMiniPartyCell(); @@ -706,7 +706,7 @@ __declspec(noinline) void UIMessengerGroupWnd::DropMember(int x, int y, int inde cell = g_windowMgr.FindMiniPartyCell(); } - if (x < 0 || x < g_windowMgr.unknown_047C || y < 0 || y < g_windowMgr.unknown_0480) { + if (x < 0 || x < g_windowMgr.screenWidth || y < 0 || y < g_windowMgr.screenHeight) { cell = g_windowMgr.FindMiniPartyCell(); } @@ -818,8 +818,8 @@ void UIMessengerGroupWnd::OnCreate(int, int) { char title[64]; const char* titles[2] = {LookupMessage(MSI_FRIEND), LookupMessage(MSI_PARTY)}; if (this->mode == 1) { - if (g_session.unknown_54C4.size()) { - sprintf(title, "%s(%s)", titles[1], g_session.unknown_54C4.c_str()); + if (g_session.partyName.size()) { + sprintf(title, "%s(%s)", titles[1], g_session.partyName.c_str()); } else { sprintf(title, "%s", titles[1]); } @@ -965,7 +965,7 @@ void UIMessengerGroupWnd::Paint() { if (this->mode == 1) { MessengerMember entry = this->MemberAtIndex(index); SessionRecord0734 record = g_session.FindRecord0734(entry.accountId); - if (record.unknown_0000 == 1) { + if (record.active == 1) { this->FillRegion(0, top + 2, this->geometry.width, this->rowHeight, 0xFFE8DD); } if (this->selected == index) { @@ -1160,7 +1160,7 @@ void UIMessengerGroupWnd::OnLBtnDown(int x, int y) { window->SetSize(this->geometry.width, this->rowHeight); window->Move(-1000, -1000); g_windowMgr.ShowTransient(window); - window->unknown_0108 = this->selected; + window->memberIndex = this->selected; window->iconIndex = this->iconIndex; window->MoveGauge(47, static_cast(this->rowHeight * 0.76f)); const int itemY = ((this->selected - this->scrollTop * this->columns) / this->columns) * this->rowHeight + 17; @@ -1402,7 +1402,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, if (!this->saved->IsValid()) { this->saved->Reset(); } - this->iconIndex = this->saved->unknown_0018; + this->iconIndex = this->saved->iconIndex; this->SendMsg(nullptr, UM_RESIZE, 7, this->saved->width, this->saved->height, 0); this->Move(this->saved->x, this->saved->y); return 0; @@ -1443,10 +1443,10 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, if (it->valid && !it->offline) { if (it->accountId == g_session.m_aid) { if (gameMode->scene->player) { - this->gauges[index]->SetValues(g_session.unknown_5568, g_session.unknown_556C); + this->gauges[index]->SetValues(g_session.hp, g_session.maxHp); } } else if (CRenderObject* actor = gameMode->scene->GetGameActorByAID(it->accountId)) { - UIPcGage* gauge = static_cast(static_cast(static_cast(actor))->unknown_0490); + UIPcGage* gauge = static_cast(static_cast(static_cast(actor))->gaugeWindow); int current; int maximum; if (gauge) { @@ -1458,9 +1458,9 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, } this->gauges[index]->SetValues(current, maximum); } - this->jobIcons[index]->unknown_0120 = 0; + this->jobIcons[index]->offline = 0; } else { - this->jobIcons[index]->unknown_0120 = 1; + this->jobIcons[index]->offline = 1; } char path[256]; @@ -1469,7 +1469,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, if (it->dead == 1) { dead = true; } else if (g_session.m_aid == it->accountId) { - dead = gameMode->unknown_0250 == 1; + dead = gameMode->isPlayerDead == 1; } std::string prefix = "유저인터페이스\\renewalparty\\"; sprintf(path, dead ? "%sicon_jobs_%d_die.bmp" : "%sicon_jobs_%d.bmp", prefix.c_str(), it->job); @@ -1485,8 +1485,8 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, char title[64]; const char* titles[2] = {LookupMessage(MSI_FRIEND), LookupMessage(MSI_PARTY)}; if (this->mode == 1) { - if (g_session.unknown_54C4.size()) { - sprintf(title, "%s(%s)", titles[1], g_session.unknown_54C4.c_str()); + if (g_session.partyName.size()) { + sprintf(title, "%s(%s)", titles[1], g_session.partyName.c_str()); } else { sprintf(title, "%s", titles[1]); } @@ -1522,7 +1522,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, } case UM_MAKEMENU: this->menuItems.clear(); - if (g_windowMgr.unknown_0210) { + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->selected != -1) { @@ -1531,7 +1531,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_USA_PERSONALINFO_DEATH)).c_str(), 0x3A)); this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_DELETE)).c_str(), 0x13)); MessengerMember member = this->MemberAtIndex(this->selected); - if (member.valid && !member.offline && g_session.unknown_5464 + if (member.valid && !member.offline && g_session.partyLeader && !g_session.PartyByName(member.name.c_str()).valid) { char text[200]; sprintf(text, LookupMessage(MSI_REQ_JOIN_PARTY3), member.name.c_str()); @@ -1545,7 +1545,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_LEAVE_PARTY)).c_str(), 9)); } else { this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_OPEN_1ON1_WINDOW)).c_str(), 7)); - if (g_session.unknown_5464) { + if (g_session.partyLeader) { this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_EXPEL)).c_str(), 0)); this->menuItems.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_YIELD_PARTYMASTER)).c_str(), 0x2B)); } @@ -1632,7 +1632,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, } case 0x3C: { MessengerMember target = this->MemberAtIndex(this->selected); - if (target.valid && g_session.FindRecord0734(target.accountId).unknown_0000 != 1) { + if (target.valid && g_session.FindRecord0734(target.accountId).active != 1) { this->OpenMiniPartyWnd(g_windowMgr.FindMiniPartyCell(), target); } return 0; @@ -1681,7 +1681,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return 0; case ID_PARTY_SETTING: if (!g_session.m_lockMouse) { - if (g_windowMgr.unknown_042C) { + if (g_windowMgr.partyInvitationToWnd) { g_windowMgr.CloseWindow(WID_PARTYINVITATIONTOWND); } if (this->mode == 0) { @@ -1695,10 +1695,10 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, UIWindow* window; if (this->mode == 0) { g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); - window = g_windowMgr.unknown_033C; + window = g_windowMgr.friendOptionWnd; } else { g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); - window = g_windowMgr.unknown_030C; + window = g_windowMgr.partySettingWnd; } if (window) { int x = 0; @@ -1780,8 +1780,8 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, CRenderObject* actor; if (it->accountId == g_session.m_aid) { actor = gameMode->scene->player; - c = g_session.unknown_5568; - d = g_session.unknown_556C; + c = g_session.hp; + d = g_session.maxHp; } else { actor = gameMode->scene->GetGameActorByAID(it->accountId); } @@ -1825,7 +1825,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return 0; case ID_OPEN_PARTY_SETTINGS: if (!g_session.m_lockMouse) { - if (g_windowMgr.unknown_033C) { + if (g_windowMgr.friendOptionWnd) { g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); } if (!g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT) && !g_session.PartyCount()) { @@ -1835,7 +1835,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, g_windowMgr.EnsureWindow(WID_PARTYSETTINGWND_HEIGHT_220); } if (this->mode == 1) { - if (UIWindow* window = g_windowMgr.unknown_030C) { + if (UIWindow* window = g_windowMgr.partySettingWnd) { int x = 0; int y = 0; this->ToScreen(x, y); @@ -1848,7 +1848,7 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, if (!g_session.m_lockMouse) { if (g_windowMgr.Confirm(LookupMessage(MSI_DO_YOU_REALLY_WANT_LEAVE), 2, false, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { g_modeMgr.gameMode->SendMsg(MM_REQ_LEAVE_GROUP, 0, 0, 0, 0); - if (g_windowMgr.unknown_042C) { + if (g_windowMgr.partyInvitationToWnd) { g_windowMgr.CloseWindow(WID_PARTYINVITATIONTOWND); } } @@ -1856,21 +1856,21 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return 0; case ID_OPEN_PARTY_INVITATION: if (!g_session.m_lockMouse) { - if (g_windowMgr.unknown_033C) { + if (g_windowMgr.friendOptionWnd) { g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); } - if (g_windowMgr.unknown_030C) { + if (g_windowMgr.partySettingWnd) { g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); } if (!g_windowMgr.CloseWindow(WID_PARTYINVITATIONTOWND)) { - if (g_session.unknown_5464) { + if (g_session.partyLeader) { g_windowMgr.EnsureWindow(WID_PARTYINVITATIONTOWND); } else { g_windowMgr.Confirm(LookupMessage(MSI_YOU_ARE_NOT_PARTYMASTER), 4, true, false, 0, "Message", 0x118, 0x78, 0); } } if (this->mode == 1) { - if (UIWindow* window = g_windowMgr.unknown_042C) { + if (UIWindow* window = g_windowMgr.partyInvitationToWnd) { int x = 0; int y = 0; this->ToScreen(x, y); @@ -1964,8 +1964,8 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, memset(title, 0, sizeof(title)); const char* titles[2] = {LookupMessage(MSI_FRIEND), LookupMessage(MSI_PARTY)}; if (this->mode == 1) { - if (g_session.unknown_54C4.size()) { - sprintf(title, "%s(%s)", titles[1], g_session.unknown_54C4.c_str()); + if (g_session.partyName.size()) { + sprintf(title, "%s(%s)", titles[1], g_session.partyName.c_str()); } else { sprintf(title, "%s", titles[1]); } @@ -1976,9 +1976,9 @@ int UIMessengerGroupWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->titleText->SetTextFitted(title); this->titleText->Move(16, 3); this->UpdateScroll(); - UIWindow* window = g_windowMgr.unknown_030C; + UIWindow* window = g_windowMgr.partySettingWnd; if (this->mode == 0) { - window = g_windowMgr.unknown_033C; + window = g_windowMgr.friendOptionWnd; } if (window) { int x = 0; @@ -2007,8 +2007,8 @@ void UIMessengerGroupWnd::StoreInfo() { this->saved->height = this->geometry.height; this->saved->x = this->geometry.x; this->saved->y = this->geometry.y; - this->saved->unknown_0014 = this->mode; - this->saved->unknown_0018 = this->iconIndex; + this->saved->mode = this->mode; + this->saved->iconIndex = this->iconIndex; } } @@ -2042,7 +2042,7 @@ void UIMiniPartyInfoWnd::OnCreate(int width, int) { void UIWindowMgr::MoveTransient(int x, int y) { UIDragMiniPartyWnd* transient = static_cast(this->window_4F250); if (transient && transient->member.valid) { - transient->Move(x - transient->unknown_010C, y - transient->unknown_0110); + transient->Move(x - transient->dragStartX, y - transient->dragStartY); } } @@ -2051,7 +2051,7 @@ void UIWindowMgr::MoveTransient(int x, int y) { __declspec(noinline) void UIWindowMgr::RetireTransientWindow() { UIDragMiniPartyWnd* transient = static_cast(this->window_4F250); if (transient && transient->member.valid) { - transient->geometry.unknown_0030 = 1; + transient->geometry.state = 1; this->Schedule(this->window_4F250); this->window_4F250 = nullptr; } diff --git a/Source/Contents/Messenger/MessengerWindows.h b/Source/Contents/Messenger/MessengerWindows.h index e017af2a4..39ea744a9 100644 --- a/Source/Contents/Messenger/MessengerWindows.h +++ b/Source/Contents/Messenger/MessengerWindows.h @@ -40,9 +40,9 @@ public: /* 00B4 */ MessengerMember member; /* 0104 */ UIPcGage* gauge; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ int unknown_0110; + /* 0108 */ int memberIndex; + /* 010C */ int dragStartX; + /* 0110 */ int dragStartY; /* 0114 */ int iconIndex; /* 0118 */ std::vector iconPositions; }; diff --git a/Source/Contents/Models/ModelLighting.cpp b/Source/Contents/Models/ModelLighting.cpp index 9dca6bbdf..691000281 100644 --- a/Source/Contents/Models/ModelLighting.cpp +++ b/Source/Contents/Models/ModelLighting.cpp @@ -83,7 +83,7 @@ C3dNode* C3dNode::Find(const char* selected) { // OFFSET: 0x00AB94A0 // FUNCTION: fn_17509 void C3dNode::OverrideColors() { - this->unknown_0088 = 1; + this->overrideColors = 1; for (std::list::iterator it = this->children.begin(); it != this->children.end(); ++it) { (*it)->OverrideColors(); diff --git a/Source/Contents/Models/ModelNode.cpp b/Source/Contents/Models/ModelNode.cpp index ff3bec59c..c86691b48 100644 --- a/Source/Contents/Models/ModelNode.cpp +++ b/Source/Contents/Models/ModelNode.cpp @@ -5,7 +5,7 @@ // OFFSET: 0x00AB5CE0 // FUNCTION: fn_17464 -C3dNode::C3dNode() : model(nullptr), parent(nullptr), mesh(nullptr), alpha(1.0f), unknown_0088(0) { +C3dNode::C3dNode() : model(nullptr), parent(nullptr), mesh(nullptr), alpha(1.0f), overrideColors(0) { } // OFFSET: 0x00AB66A0 diff --git a/Source/Contents/Models/ModelNode.h b/Source/Contents/Models/ModelNode.h index 0b5d44dba..0f81720a3 100644 --- a/Source/Contents/Models/ModelNode.h +++ b/Source/Contents/Models/ModelNode.h @@ -40,7 +40,7 @@ public: /* 006C */ float alpha; /* 0070 */ std::vector faceState; /* 007C */ std::vector faceValues; - /* 0088 */ unsigned char unknown_0088; + /* 0088 */ unsigned char overrideColors; }; class C3dNodeV1 : public C3dNode { diff --git a/Source/Contents/Models/ModelRendering.cpp b/Source/Contents/Models/ModelRendering.cpp index 7fd406770..736075837 100644 --- a/Source/Contents/Models/ModelRendering.cpp +++ b/Source/Contents/Models/ModelRendering.cpp @@ -71,7 +71,7 @@ void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, uns const int vertexCount = this->mesh->vertexCount; const std::array* meshVertices = this->mesh->vertices; - if (g_weatherEffect.unknown_0001) { + if (g_weatherEffect.enabled) { g_modeMgr.GetGameMode(); } @@ -118,13 +118,13 @@ void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, uns color.blue = static_cast(color.blue * ambient[2]); output[corner].diffuse = std::bit_cast(color); } - } else if (this->unknown_0088) { + } else if (this->overrideColors) { for (int corner = 0; corner < 3; ++corner) { SpriteColor color = std::bit_cast(state->colors[corner]); color.alpha = 0x80; output[corner].diffuse = std::bit_cast(color); } - } else if (g_weatherEffect.unknown_0001) { + } else if (g_weatherEffect.enabled) { const int faceIndex = static_cast(state - (this->faceState.empty() ? nullptr : &this->faceState[0])); for (int corner = 0; corner < 3; ++corner) { @@ -162,7 +162,7 @@ void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, uns command->vertices = vertices; command->vertexCount = count; command->texture = this->textures[texture % this->textures.size()]; - command->unknown_0014 = static_cast((command->unknown_0014 & 0x00FFu) | (static_cast(commandMode) << 8)); + command->depthFlags = static_cast((command->depthFlags & 0x00FFu) | (static_cast(commandMode) << 8)); if (alpha < 255 || command->texture->Format() == TextureFormat::A4R4G4B4) { flags |= 1; @@ -173,7 +173,7 @@ void C3dNodeV1::Draw(const float* matrix, unsigned char reversed, bool clip, uns } } - this->unknown_0088 = 0; + this->overrideColors = 0; for (std::list::iterator it = this->children.begin(); it != this->children.end(); ++it) { (*it)->Draw(combined.values, reversed, clip, commandMode); @@ -196,7 +196,7 @@ void C3dNodeV2::Draw(const float* matrix, unsigned char reversed, bool clip, uns const int vertexCount = this->mesh->vertexCount; const std::array* meshVertices = this->mesh->vertices; - if (g_weatherEffect.unknown_0001) { + if (g_weatherEffect.enabled) { g_modeMgr.GetGameMode(); } @@ -252,13 +252,13 @@ void C3dNodeV2::Draw(const float* matrix, unsigned char reversed, bool clip, uns color.blue = static_cast(color.blue * ambient[2]); output[corner].diffuse = std::bit_cast(color); } - } else if (this->unknown_0088) { + } else if (this->overrideColors) { for (int corner = 0; corner < 3; ++corner) { SpriteColor color = std::bit_cast(state->colors[corner]); color.alpha = 0x80; output[corner].diffuse = std::bit_cast(color); } - } else if (g_weatherEffect.unknown_0001) { + } else if (g_weatherEffect.enabled) { const int faceIndex = static_cast(state - (this->faceState.empty() ? nullptr : &this->faceState[0])); for (int corner = 0; corner < 3; ++corner) { @@ -296,7 +296,7 @@ void C3dNodeV2::Draw(const float* matrix, unsigned char reversed, bool clip, uns command->vertices = vertices; command->vertexCount = count; command->texture = this->textures[texture % this->textures.size()]; - command->unknown_0014 = static_cast((command->unknown_0014 & 0x00FFu) | (static_cast(commandMode) << 8)); + command->depthFlags = static_cast((command->depthFlags & 0x00FFu) | (static_cast(commandMode) << 8)); if (alpha < 255 || command->texture->Format() == TextureFormat::A4R4G4B4) { flags |= 1; @@ -307,7 +307,7 @@ void C3dNodeV2::Draw(const float* matrix, unsigned char reversed, bool clip, uns } } - this->unknown_0088 = 0; + this->overrideColors = 0; for (std::list::iterator it = this->children.begin(); it != this->children.end(); ++it) { (*it)->Draw(combined.values, reversed, clip, commandMode); diff --git a/Source/Contents/MonsterSpeech.cpp b/Source/Contents/MonsterSpeech.cpp index 8fa8fab65..84891bbff 100644 --- a/Source/Contents/MonsterSpeech.cpp +++ b/Source/Contents/MonsterSpeech.cpp @@ -104,8 +104,8 @@ void CSession::FormatMonsterSpeech(char* text, char* output, std::uint32_t aid, const char* speaker; if (!name.empty()) { speaker = name.c_str(); - } else if (aid == g_session.unknown_1010) { - speaker = g_session.unknown_1018; + } else if (aid == g_session.petGid) { + speaker = g_session.petName; } else { *output = '\0'; return; diff --git a/Source/Contents/NavigationLink.cpp b/Source/Contents/NavigationLink.cpp index 1fa0d36ab..fbf937fdd 100644 --- a/Source/Contents/NavigationLink.cpp +++ b/Source/Contents/NavigationLink.cpp @@ -181,7 +181,7 @@ CNavi_Link* CNavi_Object::FindLinkAt(int x, int y) { CNavi_Link* CNavi_Link::FindLinkTo(int x, int y) { for (std::vector::iterator it = this->links.begin(); it != this->links.end(); ++it) { CNavi_Link* link = it->link; - if (link->unknown_0080 == x && link->unknown_0084 == y) { + if (link->linkedCellX == x && link->linkedCellY == y) { return link; } } @@ -194,7 +194,7 @@ CNavi_Link* CNavi_Link::FindLinkTo(int x, int y) { CNavi_Link* CNavi_Object::FindLinkTo(int x, int y) { for (std::vector::iterator it = this->links.begin(); it != this->links.end(); ++it) { CNavi_Link* link = it->link; - if (link->unknown_0080 == x && link->unknown_0084 == y) { + if (link->linkedCellX == x && link->linkedCellY == y) { return link; } } @@ -254,8 +254,8 @@ const char* CNavi_Link::GetLinkedName() const { // FUNCTION: fn_19491 NaviCell CNavi_Link::GetLinkedCell() const { NaviCell cell; - cell.x = this->unknown_0080; - cell.y = this->unknown_0084; + cell.x = this->linkedCellX; + cell.y = this->linkedCellY; return cell; } diff --git a/Source/Contents/NavigationManager.h b/Source/Contents/NavigationManager.h index 88c2a55ad..e4371cf50 100644 --- a/Source/Contents/NavigationManager.h +++ b/Source/Contents/NavigationManager.h @@ -83,15 +83,15 @@ public: /* 0044 */ int cellX; /* 0048 */ int cellY; /* 004C */ std::vector links; - /* 0058 */ int unknown_0058; - /* 005C */ int unknown_005C; - /* 0060 */ int unknown_0060; - /* 0064 */ int unknown_0064; - /* 0068 */ int unknown_0068; - /* 006C */ int unknown_006C; - /* 0070 */ int unknown_0070; - /* 0074 */ int unknown_0074; - /* 0078 */ int unknown_0078; + /* 0058 */ int job; + /* 005C */ int sex; + /* 0060 */ int bodyPalette; + /* 0064 */ int head; + /* 0068 */ int headPalette; + /* 006C */ int accessory0; + /* 0070 */ int accessory1; + /* 0074 */ int accessory2; + /* 0078 */ int robe; __declspec(noinline) CNavi_Object(); CNavi_Object(int type, int index, const char* name, const char* title, int cellX, int cellY, CNaviInfo* info); @@ -124,8 +124,8 @@ public: class CNavi_Link : public CNavi_Object { public: /* 007C */ CNaviInfo* linkedInfo; - /* 0080 */ int unknown_0080; - /* 0084 */ int unknown_0084; + /* 0080 */ int linkedCellX; + /* 0084 */ int linkedCellY; /* 0088 */ int depth; /* 008C */ std::vector linkedLinks; @@ -382,37 +382,37 @@ public: /* 1124 */ NavigationTarget savedTarget; /* 114C */ int routeResult; /* 1150 */ std::vector nodes; - /* 115C */ bool unknown_115C; + /* 115C */ bool routeFlag; /* 1160 */ int selectedNode; /* 1164 */ MovementRouteInterpolation movementRoute; - /* 117C */ bool unknown_117C; + /* 117C */ bool drawRoute; /* 1180 */ std::string labels[8]; /* 1240 */ GroundGeometry* ground; - /* 1244 */ CNaviInfo* unknown_1244; - /* 1248 */ bool unknown_1248; - /* 124C */ int unknown_124C; - /* 1250 */ int unknown_1250; - /* 1254 */ bool unknown_1254; - /* 1258 */ int unknown_1258; - /* 125C */ int unknown_125C; - /* 1260 */ int unknown_1260; - /* 1264 */ std::string unknown_1264; - /* 127C */ bool unknown_127C; - /* 127D */ bool unknown_127D; - /* 127E */ bool unknown_127E; - /* 1280 */ int unknown_1280; - /* 1284 */ int unknown_1284; - /* 1288 */ CTexture* unknown_1288; - /* 128C */ int unknown_128C; - /* 1290 */ int unknown_1290; + /* 1244 */ CNaviInfo* playerMapInfo; + /* 1248 */ bool hideWindow; + /* 124C */ int savedCellX; + /* 1250 */ int savedCellY; + /* 1254 */ bool expandedMap; + /* 1258 */ int viewMode; + /* 125C */ int displayMode; + /* 1260 */ int searchType; + /* 1264 */ std::string searchText; + /* 127C */ bool allowGates; + /* 127D */ bool includeObjects; + /* 127E */ bool allowWarps; + /* 1280 */ int routeSide; + /* 1284 */ int previewType; + /* 1288 */ CTexture* previewTexture; + /* 128C */ int previewX; + /* 1290 */ int previewY; /* 1294 */ std::vector cells; - /* 12A0 */ CActRes* unknown_12A0; - /* 12A4 */ CSprRes* unknown_12A4; + /* 12A0 */ CActRes* previewAction; + /* 12A4 */ CSprRes* previewSprite; /* 12A8 */ std::vector routeLines; - /* 12B4 */ bool unknown_12B4; + /* 12B4 */ bool drawDestination; /* 12B8 */ std::vector> nodePaths; - /* 12C4 */ int unknown_12C4; - /* 12C8 */ int unknown_12C8; + /* 12C4 */ int selectedPath; + /* 12C8 */ int selectedPathNode; /* 12CC */ std::string destinationTitle; /* 12E4 */ std::string destinationText; /* 12FC */ std::string routeText; @@ -464,26 +464,26 @@ static_assert(offsetof(CNavigationManager, currentTarget) == 0x10FC); static_assert(offsetof(CNavigationManager, savedTarget) == 0x1124); static_assert(offsetof(CNavigationManager, routeResult) == 0x114C); static_assert(offsetof(CNavigationManager, nodes) == 0x1150); -static_assert(offsetof(CNavigationManager, unknown_115C) == 0x115C); +static_assert(offsetof(CNavigationManager, routeFlag) == 0x115C); static_assert(offsetof(CNavigationManager, selectedNode) == 0x1160); static_assert(offsetof(CNavigationManager, movementRoute) == 0x1164); -static_assert(offsetof(CNavigationManager, unknown_117C) == 0x117C); +static_assert(offsetof(CNavigationManager, drawRoute) == 0x117C); static_assert(offsetof(CNavigationManager, labels) == 0x1180); static_assert(offsetof(CNavigationManager, ground) == 0x1240); -static_assert(offsetof(CNavigationManager, unknown_1244) == 0x1244); -static_assert(offsetof(CNavigationManager, unknown_1248) == 0x1248); -static_assert(offsetof(CNavigationManager, unknown_1258) == 0x1258); -static_assert(offsetof(CNavigationManager, unknown_1260) == 0x1260); -static_assert(offsetof(CNavigationManager, unknown_1264) == 0x1264); -static_assert(offsetof(CNavigationManager, unknown_127C) == 0x127C); -static_assert(offsetof(CNavigationManager, unknown_1280) == 0x1280); -static_assert(offsetof(CNavigationManager, unknown_1288) == 0x1288); +static_assert(offsetof(CNavigationManager, playerMapInfo) == 0x1244); +static_assert(offsetof(CNavigationManager, hideWindow) == 0x1248); +static_assert(offsetof(CNavigationManager, viewMode) == 0x1258); +static_assert(offsetof(CNavigationManager, searchType) == 0x1260); +static_assert(offsetof(CNavigationManager, searchText) == 0x1264); +static_assert(offsetof(CNavigationManager, allowGates) == 0x127C); +static_assert(offsetof(CNavigationManager, routeSide) == 0x1280); +static_assert(offsetof(CNavigationManager, previewTexture) == 0x1288); static_assert(offsetof(CNavigationManager, cells) == 0x1294); -static_assert(offsetof(CNavigationManager, unknown_12A0) == 0x12A0); +static_assert(offsetof(CNavigationManager, previewAction) == 0x12A0); static_assert(offsetof(CNavigationManager, routeLines) == 0x12A8); -static_assert(offsetof(CNavigationManager, unknown_12B4) == 0x12B4); +static_assert(offsetof(CNavigationManager, drawDestination) == 0x12B4); static_assert(offsetof(CNavigationManager, nodePaths) == 0x12B8); -static_assert(offsetof(CNavigationManager, unknown_12C4) == 0x12C4); +static_assert(offsetof(CNavigationManager, selectedPath) == 0x12C4); static_assert(offsetof(CNavigationManager, destinationTitle) == 0x12CC); static_assert(offsetof(CNavigationManager, destinationText) == 0x12E4); static_assert(offsetof(CNavigationManager, routeText) == 0x12FC); diff --git a/Source/Contents/NavigationRequest.cpp b/Source/Contents/NavigationRequest.cpp index 88ab210f3..576c5cc02 100644 --- a/Source/Contents/NavigationRequest.cpp +++ b/Source/Contents/NavigationRequest.cpp @@ -151,7 +151,7 @@ bool CNavigationManager::SetViewMode(int mode) { return false; } - this->unknown_1258 = mode; + this->viewMode = mode; return true; } @@ -224,10 +224,10 @@ int CNavigationManager::RequestRoute(int cellX, int cellY) { return -99; } this->data.SetDestination(target, destX, destY); - this->unknown_117C = true; - this->unknown_115C = true; - this->unknown_12B4 = true; - this->unknown_1258 = 2; + this->drawRoute = true; + this->routeFlag = true; + this->drawDestination = true; + this->viewMode = 2; return 9; } @@ -325,8 +325,8 @@ std::vector* CNaviInfo::Npcs() { CNavi_Link* CNaviInfo::FindMatchingLink(CNavi_Link link) { const CNavi_Link target = link; for (CNavi_Link* candidate : this->links) { - if (candidate->cellX == target.cellX && candidate->cellY == target.cellY && candidate->unknown_0080 == target.unknown_0080 && - candidate->unknown_0084 == target.unknown_0084 && candidate->info != nullptr && + if (candidate->cellX == target.cellX && candidate->cellY == target.cellY && candidate->linkedCellX == target.linkedCellX && + candidate->linkedCellY == target.linkedCellY && candidate->info != nullptr && std::strcmp(candidate->info->name.c_str(), target.info->name.c_str()) == 0 && candidate->linkedInfo != nullptr && std::strcmp(candidate->linkedInfo->name.c_str(), target.linkedInfo->name.c_str()) == 0) { return candidate; diff --git a/Source/Contents/NavigationRoute.cpp b/Source/Contents/NavigationRoute.cpp index 1e3cb37b7..0ae4532d2 100644 --- a/Source/Contents/NavigationRoute.cpp +++ b/Source/Contents/NavigationRoute.cpp @@ -47,7 +47,7 @@ namespace { // OFFSET: 0x00B99890 // FUNCTION: fn_19614 void CNavigationManager::DrawRoute(const float* matrix) { - if (!this->unknown_117C || this->movementRoute.points.empty() || this->ground == nullptr) { + if (!this->drawRoute || this->movementRoute.points.empty() || this->ground == nullptr) { return; } @@ -70,7 +70,7 @@ void CNavigationManager::DrawRoute(const float* matrix) { if (minX < lastX && lastX < maxX && minY < lastY && lastY < maxY) { visible = 1; std::uint32_t color; - if (this->unknown_12B4 && std::strcmp(g_session.m_navigationPlayerMap, this->data.GetInfo()->GetName()) == 0) { + if (this->drawDestination && std::strcmp(g_session.m_navigationPlayerMap, this->data.GetInfo()->GetName()) == 0) { color = 0xEEFFFFFF; } else { color = 0xEE64AAFF; @@ -477,7 +477,7 @@ std::string CNavigationManager::SelectedNodeText() { return this->selectedNodeText; } - if (this->unknown_1258 == 2) { + if (this->viewMode == 2) { CNaviInfo* info = this->data.GetInfo(); if (info != nullptr) { NaviCell cellY; @@ -538,7 +538,7 @@ std::string CNavigationManager::DestinationText() { return this->destinationText; } - if (this->unknown_1258 == 2) { + if (this->viewMode == 2) { CNaviInfo* info = this->data.GetInfo(); if (info != nullptr) { NaviCell cellY; @@ -569,7 +569,7 @@ std::string CNavigationManager::DestinationTitle() { return this->destinationTitle; } - if (this->unknown_1258 == 2) { + if (this->viewMode == 2) { NaviCell cell; this->data.GetCell(&cell); CNaviInfo* info = this->data.GetInfo(); @@ -665,14 +665,14 @@ bool CNavigationManager::StartNavigation(std::string name, int type, unsigned ch target.object = object; this->currentTarget = this->savedTarget = target; - this->unknown_1264 = text; - this->unknown_1248 = flag; - this->unknown_127E = (mode >> 2) & 1; - this->unknown_127C = mode & 1; - this->unknown_127D = (mode >> 1) & 1; + this->searchText = text; + this->hideWindow = flag; + this->allowWarps = (mode >> 2) & 1; + this->allowGates = mode & 1; + this->includeObjects = (mode >> 1) & 1; if (this->UpdateSearchResults()) { - this->unknown_12C4 = 0; - this->unknown_12C8 = 0; + this->selectedPath = 0; + this->selectedPathNode = 0; } const int result = this->Navigate(x, y); @@ -687,13 +687,13 @@ bool CNavigationManager::StartNavigation(std::string name, int type, unsigned ch reinterpret_cast(g_windowMgr.modal)->RefreshWorldMapMarks(); } - this->unknown_125C = 1; + this->displayMode = 1; if (g_windowMgr.window_4F174) { - this->unknown_1248 = false; + this->hideWindow = false; } if (g_windowMgr.window_4F174) { static_cast(g_windowMgr.window_4F174)->RefreshLayout(); - } else if (!this->unknown_1248) { + } else if (!this->hideWindow) { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } @@ -724,12 +724,12 @@ bool CNavigationManager::StartNavigation(std::string name, int type, unsigned ch // FUNCTION: fn_19612 bool CNavigationManager::SearchNavigation(std::string name, int type, bool flag) { if (static_cast(type) <= 4) { - this->unknown_1264 = name; - this->unknown_1248 = flag; - this->unknown_1260 = type; + this->searchText = name; + this->hideWindow = flag; + this->searchType = type; g_navigationManager.UpdateSearchResults(); - if (!this->unknown_1248) { + if (!this->hideWindow) { if (g_windowMgr.window_4F174 == nullptr) { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } else { @@ -781,10 +781,10 @@ std::vector CNavigationManager::WriteReplayState() { const auto append = [&output](const std::vector& record) { output.insert(output.end(), record.begin(), record.end()); }; append(BuildReplayTaggedRecord(8000, nullptr, 0)); - append(BuildReplayTaggedRecord(8002, &this->unknown_127C, 1)); - append(BuildReplayTaggedRecord(8003, &this->unknown_127D, 1)); - append(BuildReplayTaggedRecord(8004, &this->unknown_127E, 1)); - append(BuildReplayTaggedRecord(8005, &this->unknown_1280, 4)); + append(BuildReplayTaggedRecord(8002, &this->allowGates, 1)); + append(BuildReplayTaggedRecord(8003, &this->includeObjects, 1)); + append(BuildReplayTaggedRecord(8004, &this->allowWarps, 1)); + append(BuildReplayTaggedRecord(8005, &this->routeSide, 4)); for (std::size_t i = 0; i < this->nodes.size(); ++i) { CNavi_Link* node = this->nodes[i]; @@ -834,20 +834,20 @@ std::vector CNavigationManager::WriteReplayState() { append(BuildReplayTaggedRecord(8022, buffer.data(), static_cast(buffer.size()))); } - append(BuildReplayTaggedRecord(8009, &this->unknown_124C, 4)); - append(BuildReplayTaggedRecord(8010, &this->unknown_1250, 4)); - append(BuildReplayTaggedRecord(8011, &this->unknown_1254, 1)); - append(BuildReplayTaggedRecord(8013, &this->unknown_125C, 4)); - append(BuildReplayTaggedRecord(8014, &this->unknown_1260, 4)); - append(BuildReplayTaggedRecord(8016, &this->unknown_1284, 4)); - append(BuildReplayTaggedRecord(8017, &this->unknown_117C, 1)); + append(BuildReplayTaggedRecord(8009, &this->savedCellX, 4)); + append(BuildReplayTaggedRecord(8010, &this->savedCellY, 4)); + append(BuildReplayTaggedRecord(8011, &this->expandedMap, 1)); + append(BuildReplayTaggedRecord(8013, &this->displayMode, 4)); + append(BuildReplayTaggedRecord(8014, &this->searchType, 4)); + append(BuildReplayTaggedRecord(8016, &this->previewType, 4)); + append(BuildReplayTaggedRecord(8017, &this->drawRoute, 1)); append(BuildReplayTaggedRecord(8018, &this->routeResult, 4)); - append(BuildReplayTaggedRecord(8019, &this->unknown_115C, 1)); + append(BuildReplayTaggedRecord(8019, &this->routeFlag, 1)); append(BuildReplayTaggedRecord(8020, &this->selectedNode, 4)); - append(BuildReplayTaggedRecord(8023, &this->unknown_1248, 1)); - append(BuildReplayTaggedRecord(8012, &this->unknown_1258, 4)); - if (!this->unknown_1264.empty()) { - append(BuildReplayTaggedRecord(8015, this->unknown_1264.c_str(), static_cast(this->unknown_1264.size()))); + append(BuildReplayTaggedRecord(8023, &this->hideWindow, 1)); + append(BuildReplayTaggedRecord(8012, &this->viewMode, 4)); + if (!this->searchText.empty()) { + append(BuildReplayTaggedRecord(8015, this->searchText.c_str(), static_cast(this->searchText.size()))); } std::vector target; @@ -1179,7 +1179,7 @@ CNavi_Object* CNaviData::FindMobByTitle(std::string title) { // OFFSET: 0x00B9C6B0 // FUNCTION: fn_19621 void CNavigationManager::RefreshSearch() { - if (this->data.Search(this->unknown_1264, this->unknown_1260, this->states) && g_windowMgr.window_4F174) { + if (this->data.Search(this->searchText, this->searchType, this->states) && g_windowMgr.window_4F174) { static_cast(g_windowMgr.window_4F174)->FillRouteGroups(); } } @@ -1187,14 +1187,14 @@ void CNavigationManager::RefreshSearch() { // OFFSET: 0x00B9C5C0 // FUNCTION: fn_19620 __declspec(noinline) bool CNavigationManager::UpdateSearchResults() { - this->unknown_125C = 0; - if (!this->data.Search(this->unknown_1264, 0, this->states)) { + this->displayMode = 0; + if (!this->data.Search(this->searchText, 0, this->states)) { return false; } std::sort(this->states.begin(), this->states.end(), [](const NavigationTarget& left, const NavigationTarget& right) { return left > right; }); this->BuildNodePaths(); - this->SelectNodePath(this->unknown_1264); + this->SelectNodePath(this->searchText); return true; } @@ -1238,8 +1238,8 @@ bool CNavigationManager::SelectState(int index) { // OFFSET: 0x00B9DBD0 // FUNCTION: fn_19625 bool CNavigationManager::SelectNodeState() { - const int path = this->unknown_12C4; - const int node = this->unknown_12C8; + const int path = this->selectedPath; + const int node = this->selectedPathNode; if (path >= 0 && static_cast(path) < this->nodePaths.size() && node >= 0 && static_cast(node) < this->nodePaths[path].size() && this->nodePaths[path][node] != -1) { return this->SelectState(this->nodePaths[path][node]); @@ -1307,11 +1307,11 @@ bool CNavigationManager::SetDestinationMap(std::string mapName, int x, int y) { } this->currentTarget.name = text; - this->unknown_125C = 0; - this->unknown_1254 = false; - this->unknown_1248 = false; - if (this->unknown_1258 != 2) { - this->unknown_1258 = 1; + this->displayMode = 0; + this->expandedMap = false; + this->hideWindow = false; + if (this->viewMode != 2) { + this->viewMode = 1; } this->LoadTargetPreview(); @@ -1335,18 +1335,18 @@ bool CNavigationManager::SetDestinationMap(std::string mapName, int x, int y) { // OFFSET: 0x00B9FBB0 // FUNCTION: fn_19632 bool CNavigationManager::LoadTargetPreview() { - this->unknown_128C = -1; - this->unknown_1290 = -1; - this->unknown_12A4 = nullptr; - this->unknown_12A0 = nullptr; - this->unknown_1288 = nullptr; + this->previewX = -1; + this->previewY = -1; + this->previewSprite = nullptr; + this->previewAction = nullptr; + this->previewTexture = nullptr; if (!this->currentTarget.object || !this->BuildTargetRouteLines()) { return false; } const int type = this->currentTarget.type; void* object = this->currentTarget.object; - this->unknown_1284 = 1; + this->previewType = 1; int mapType; const char* mapName; @@ -1370,8 +1370,8 @@ bool CNavigationManager::LoadTargetPreview() { mapName = target->GetInfo()->GetName(); } } else { - this->unknown_12A4 = nullptr; - this->unknown_12A0 = nullptr; + this->previewSprite = nullptr; + this->previewAction = nullptr; if (!object) { return false; } @@ -1406,24 +1406,24 @@ bool CNavigationManager::LoadTargetPreview() { } } if (found) { - this->unknown_12A4 = dynamic_cast(ResourceMgr::Instance().Load(spriteName)); - this->unknown_12A0 = dynamic_cast(ResourceMgr::Instance().Load(actionName)); + this->previewSprite = dynamic_cast(ResourceMgr::Instance().Load(spriteName)); + this->previewAction = dynamic_cast(ResourceMgr::Instance().Load(actionName)); } } - this->unknown_1284 = 2; + this->previewType = 2; } - this->unknown_1288 = nullptr; + this->previewTexture = nullptr; if (mapType == 5004) { - this->unknown_1288 = g_texMgr.Load("유저인터페이스\\collection\\불의주문서.bmp", 0, false, true, false); + this->previewTexture = g_texMgr.Load("유저인터페이스\\collection\\불의주문서.bmp", 0, false, true, false); } else if (mapType != 5001 && mapType != 5005) { - this->unknown_1288 = g_texMgr.Load("유저인터페이스\\navigation_interface\\Interior.bmp", 0, false, true, false); + this->previewTexture = g_texMgr.Load("유저인터페이스\\navigation_interface\\Interior.bmp", 0, false, true, false); } else { char path[60]; std::memset(path, 0, sizeof(path)); std::sprintf(path, "유저인터페이스\\map\\%s.bmp", mapName); - this->unknown_1288 = g_texMgr.Load(path, 0, false, true, false); - if (this->unknown_1288) { + this->previewTexture = g_texMgr.Load(path, 0, false, true, false); + if (this->previewTexture) { const int targetType = this->currentTarget.type; if (targetType == 2 || targetType == 6) { CNavi_Object* target = static_cast(this->currentTarget.object); @@ -1441,8 +1441,8 @@ bool CNavigationManager::LoadTargetPreview() { viewX = static_cast(cellColumn * scale + offsetX); viewY = static_cast(126.0f - (cellRow * scale + offsetY)); } - this->unknown_1290 = viewY; - this->unknown_128C = viewX; + this->previewY = viewY; + this->previewX = viewX; } else if (targetType == 0) { int cellColumn = this->currentTarget.x; int cellRow; @@ -1466,14 +1466,14 @@ bool CNavigationManager::LoadTargetPreview() { viewX = static_cast(cellColumn * scale + offsetX); viewY = static_cast(126.0f - (cellRow * scale + offsetY)); } - this->unknown_1290 = viewY; - this->unknown_128C = viewX; + this->previewY = viewY; + this->previewX = viewX; } } } - if (!this->unknown_1288 || this->unknown_1288->Width() == 1) { - this->unknown_1288 = g_texMgr.Load("유저인터페이스\\navigation_interface\\NoImage.bmp", 0, false, true, false); + if (!this->previewTexture || this->previewTexture->Width() == 1) { + this->previewTexture = g_texMgr.Load("유저인터페이스\\navigation_interface\\NoImage.bmp", 0, false, true, false); } return true; } @@ -1665,9 +1665,9 @@ bool CNavigationManager::SelectTarget(int nodeIndex) { // FUNCTION: fn_19641 void CNavigationManager::CancelRoute() { this->Reset(false); - this->unknown_125C = 0; - if (!this->unknown_1248) { - this->unknown_1258 = 1; + this->displayMode = 0; + if (!this->hideWindow) { + this->viewMode = 1; if (g_windowMgr.window_4F174 != nullptr) { static_cast(g_windowMgr.window_4F174)->RefreshLayout(); } @@ -1724,7 +1724,7 @@ request: } const int type = this->savedTarget.type; this->routeResult = - this->data.FindRoute(&this->nodes, type != 2 && type != 0, this->unknown_127C, this->unknown_127D, this->unknown_127E, this->unknown_1280); + this->data.FindRoute(&this->nodes, type != 2 && type != 0, this->allowGates, this->includeObjects, this->allowWarps, this->routeSide); if (this->routeResult == 0) { return -96; } @@ -1781,19 +1781,19 @@ int CNavigationManager::LoadReplayState(const std::vector& data) this->ResumeRoute(); return static_cast(offset); case 8002: - std::memcpy(&this->unknown_127D, data.data() + offset, header.size); + std::memcpy(&this->includeObjects, data.data() + offset, header.size); offset += header.size; break; case 8003: - std::memcpy(&this->unknown_127E, data.data() + offset, header.size); + std::memcpy(&this->allowWarps, data.data() + offset, header.size); offset += header.size; break; case 8004: - std::memcpy(&this->unknown_127C, data.data() + offset, header.size); + std::memcpy(&this->allowGates, data.data() + offset, header.size); offset += header.size; break; case 8005: - std::memcpy(&this->unknown_1280, data.data() + offset, header.size); + std::memcpy(&this->routeSide, data.data() + offset, header.size); offset += header.size; break; case 8006: { @@ -1819,41 +1819,41 @@ int CNavigationManager::LoadReplayState(const std::vector& data) this->savedTarget = this->ReadTarget(buffer.data(), header.size); break; case 8009: - std::memcpy(&this->unknown_124C, data.data() + offset, header.size); + std::memcpy(&this->savedCellX, data.data() + offset, header.size); offset += header.size; break; case 8010: - std::memcpy(&this->unknown_1250, data.data() + offset, header.size); + std::memcpy(&this->savedCellY, data.data() + offset, header.size); offset += header.size; break; case 8011: - std::memcpy(&this->unknown_1254, data.data() + offset, header.size); + std::memcpy(&this->expandedMap, data.data() + offset, header.size); offset += header.size; break; case 8012: - std::memcpy(&this->unknown_1258, data.data() + offset, header.size); + std::memcpy(&this->viewMode, data.data() + offset, header.size); offset += header.size; break; case 8013: - std::memcpy(&this->unknown_125C, data.data() + offset, header.size); + std::memcpy(&this->displayMode, data.data() + offset, header.size); offset += header.size; break; case 8014: - std::memcpy(&this->unknown_1260, data.data() + offset, header.size); + std::memcpy(&this->searchType, data.data() + offset, header.size); offset += header.size; break; case 8015: buffer.resize(header.size + 1, 0); std::memcpy(buffer.data(), data.data() + offset, header.size); offset += header.size; - this->unknown_1264 = buffer.data(); + this->searchText = buffer.data(); break; case 8016: - std::memcpy(&this->unknown_1284, data.data() + offset, header.size); + std::memcpy(&this->previewType, data.data() + offset, header.size); offset += header.size; break; case 8017: - std::memcpy(&this->unknown_117C, data.data() + offset, header.size); + std::memcpy(&this->drawRoute, data.data() + offset, header.size); offset += header.size; break; case 8018: @@ -1861,7 +1861,7 @@ int CNavigationManager::LoadReplayState(const std::vector& data) offset += header.size; break; case 8019: - std::memcpy(&this->unknown_115C, data.data() + offset, header.size); + std::memcpy(&this->routeFlag, data.data() + offset, header.size); offset += header.size; break; case 8020: @@ -1922,7 +1922,7 @@ int CNavigationManager::LoadReplayState(const std::vector& data) break; } case 8023: - std::memcpy(&this->unknown_1248, data.data() + offset, header.size); + std::memcpy(&this->hideWindow, data.data() + offset, header.size); offset += header.size; break; default: @@ -1937,12 +1937,12 @@ int CNavigationManager::LoadReplayState(const std::vector& data) // OFFSET: 0x00B9BFC0 // FUNCTION: fn_19617 void CNavigationManager::ResumeRoute() { - if (this->unknown_1258 == 1) { + if (this->viewMode == 1) { this->LoadTargetPreview(); g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); - } else if (this->unknown_1258 == 2) { + } else if (this->viewMode == 2) { this->ShowRouteResult(this->RouteFromPlayer(), 1); - if (!this->unknown_1248) { + if (!this->hideWindow) { g_windowMgr.EnsureWindow(WID_NAVIGATIONV4WND); } } diff --git a/Source/Contents/NavigationSource.cpp b/Source/Contents/NavigationSource.cpp index ff76222e3..a18decdb5 100644 --- a/Source/Contents/NavigationSource.cpp +++ b/Source/Contents/NavigationSource.cpp @@ -57,7 +57,7 @@ NaviCell* CNavigationManager::GetDestinationCell(NaviCell* out) { // OFFSET: 0x00B96F10 // FUNCTION: fn_19594 void CNavigationManager::ClearData() { - this->unknown_12B4 = false; + this->drawDestination = false; this->data.Clear(); } @@ -203,16 +203,16 @@ NavigationTarget::~NavigationTarget() { // FUNCTION: fn_19551 CNavigationManager::CNavigationManager() { this->viewIcon = 1; - this->unknown_127C = false; - this->unknown_127D = false; - this->unknown_127E = false; - this->unknown_1250 = -1; - this->unknown_124C = -1; - this->unknown_1248 = false; - this->unknown_1254 = false; + this->allowGates = false; + this->includeObjects = false; + this->allowWarps = false; + this->savedCellY = -1; + this->savedCellX = -1; + this->hideWindow = false; + this->expandedMap = false; this->Reset(true); this->pathFinder.useNodePool = true; - this->unknown_1244 = nullptr; + this->playerMapInfo = nullptr; char buffer[0x104]; for (int i = 0; i < 8; ++i) { @@ -221,7 +221,7 @@ CNavigationManager::CNavigationManager() { this->labels[i].assign(buffer, std::strlen(buffer)); } - this->unknown_12B4 = false; + this->drawDestination = false; } // OFFSET: 0x00B92950 @@ -239,7 +239,7 @@ NaviRouteLine::NaviRouteLine(int kind, int x, int y, const char* text, int color // FUNCTION: fn_45448 CNavigationManager::~CNavigationManager() { this->Reset(true); - this->unknown_1244 = nullptr; + this->playerMapInfo = nullptr; } // OFFSET: 0x00B959D0 @@ -263,10 +263,10 @@ void CNavigationManager::ClearNodePaths() { // OFFSET: 0x00B961A0 // FUNCTION: fn_45452 CNaviInfo* CNavigationManager::GetLinkedPlayerInfo() { - if (!this->unknown_1244->HasName(g_session.m_navigationPlayerMap)) { - this->unknown_1244 = this->FindObject(g_session.m_navigationPlayerMap); + if (!this->playerMapInfo->HasName(g_session.m_navigationPlayerMap)) { + this->playerMapInfo = this->FindObject(g_session.m_navigationPlayerMap); } - return this->unknown_1244; + return this->playerMapInfo; } // OFFSET: 0x00B96BA0 @@ -274,8 +274,8 @@ CNaviInfo* CNavigationManager::GetLinkedPlayerInfo() { void CNavigationManager::Reset(bool clearAll) { if (clearAll) { this->ClearNodePaths(); - this->unknown_12C4 = -1; - this->unknown_12C8 = -1; + this->selectedPath = -1; + this->selectedPathNode = -1; this->states.clear(); } @@ -283,22 +283,22 @@ void CNavigationManager::Reset(bool clearAll) { this->currentTarget = NavigationTarget(); this->routeResult = 0; this->nodes.clear(); - this->unknown_115C = false; + this->routeFlag = false; this->selectedNode = -1; this->movementRoute.segment = 0; - this->unknown_117C = false; + this->drawRoute = false; this->ground = nullptr; - this->unknown_1258 = 0; - this->unknown_1260 = 0; - this->unknown_1264.clear(); - this->unknown_1280 = 0; - this->unknown_1284 = 0; - this->unknown_1288 = nullptr; - this->unknown_128C = -1; - this->unknown_1290 = -1; + this->viewMode = 0; + this->searchType = 0; + this->searchText.clear(); + this->routeSide = 0; + this->previewType = 0; + this->previewTexture = nullptr; + this->previewX = -1; + this->previewY = -1; this->cells.clear(); - this->unknown_12A0 = nullptr; - this->unknown_12A4 = nullptr; + this->previewAction = nullptr; + this->previewSprite = nullptr; this->ClearRouteNodes(); } @@ -596,15 +596,15 @@ CNavi_Link* CNavigationManager::ReadObject(const char* record) { // FUNCTION: fn_19571 void CNavigationManager::ClearSavedTarget() { this->savedTarget = NavigationTarget(); - this->unknown_115C = false; + this->routeFlag = false; this->routeResult = 0; this->nodes.clear(); this->selectedNode = -1; this->movementRoute.segment = 0; - this->unknown_117C = false; + this->drawRoute = false; this->ground = nullptr; this->cells.clear(); - this->unknown_1258 = 1; + this->viewMode = 1; } // OFFSET: 0x00B95260 @@ -622,17 +622,17 @@ int CNavigationManager::RouteFromPlayer() { const std::string resolved = ResourceMgr::Instance().aliases.ResolveMapName(g_session.m_navigationPlayerMap); info = this->FindObject(resolved.c_str()); if (info == nullptr) { - this->unknown_117C = false; - this->unknown_115C = false; - this->unknown_12B4 = false; + this->drawRoute = false; + this->routeFlag = false; + this->drawDestination = false; return -93; } } int result = -96; - this->unknown_117C = false; - this->unknown_115C = false; - this->unknown_12B4 = false; + this->drawRoute = false; + this->routeFlag = false; + this->drawDestination = false; NaviCell player; player.x = 0; player.y = 0; @@ -669,16 +669,16 @@ int CNavigationManager::RouteFromPlayer() { this->LoadTargetPreview(); const int targetType = this->savedTarget.type; result = targetType == 2 ? 7 : -96; - this->unknown_117C = true; - this->unknown_115C = true; - this->unknown_12B4 = true; + this->drawRoute = true; + this->routeFlag = true; + this->drawDestination = true; if (targetType == 0) { result = 9; - this->unknown_1258 = 2; + this->viewMode = 2; return result; } if (targetType == 2) { - this->unknown_1258 = 2; + this->viewMode = 2; return result; } } @@ -709,7 +709,7 @@ int CNavigationManager::RouteFromPlayer() { if (this->BuildRoute(start.x, start.y, this->nodes[index]->GetCell(&cellX)->x, this->nodes[index]->GetCell(&cellY)->y, true)) { this->selectedNode = index; this->SelectTarget(index); - this->unknown_117C = true; + this->drawRoute = true; goto selected; } } else { @@ -729,7 +729,7 @@ int CNavigationManager::RouteFromPlayer() { } this->selectedNode = 0; this->SelectTarget(0); - this->unknown_117C = true; + this->drawRoute = true; goto selected; } @@ -740,12 +740,12 @@ int CNavigationManager::RouteFromPlayer() { if (this->BuildRoute(start.x, start.y, this->nodes[candidates[index]]->GetCell(&cellX)->x, this->nodes[candidates[index]]->GetCell(&cellY)->y, true)) { this->selectedNode = candidates[index]; this->SelectTarget(candidates[index]); - this->unknown_117C = true; + this->drawRoute = true; goto selected; } } - this->unknown_117C = false; + this->drawRoute = false; if (this->nodes[0]->GetType() != 400) { return result; } @@ -759,7 +759,7 @@ selected: } else { result = 5; } - this->unknown_1258 = 2; + this->viewMode = 2; return result; } @@ -933,7 +933,7 @@ std::string CNavigationManager::StateMapName(int index, int* distance) { // OFFSET: 0x00B96520 // FUNCTION: fn_19585 bool CNavigationManager::GetRouteFlag() const { - return this->unknown_115C; + return this->routeFlag; } // OFFSET: 0x00B96910 @@ -962,11 +962,11 @@ void CNavigationManager::ResetCurrentTarget() { // OFFSET: 0x00B94E90 // FUNCTION: fn_19570 void CNavigationManager::CheckArrival(int cellX, int cellY) { - if (this->unknown_1258 == 2) { + if (this->viewMode == 2) { if (g_windowMgr.window_4F174 != nullptr) { g_windowMgr.window_4F174->Invalidate(); } - if (this->unknown_115C) { + if (this->routeFlag) { NaviCell cell; this->data.GetCell(&cell); if (std::abs(cell.x - cellX) <= 5 && std::abs(cell.y - cellY) <= 5) { @@ -981,7 +981,7 @@ void CNavigationManager::CheckArrival(int cellX, int cellY) { void CNavigationManager::BuildNodePaths() { this->ClearNodePaths(); - if (this->unknown_1260 == 0 || this->unknown_1260 == 1) { + if (this->searchType == 0 || this->searchType == 1) { for (int index = 0; index < this->states.size(); ++index) { if (this->states[index].type == 1) { std::vector path; @@ -992,7 +992,7 @@ void CNavigationManager::BuildNodePaths() { } for (int index = 0; index < this->states.size(); ++index) { - if (this->unknown_1260 != 0 && this->states[index].type != this->unknown_1260) { + if (this->searchType != 0 && this->states[index].type != this->searchType) { continue; } if (this->states[index].type == 1) { diff --git a/Source/Contents/Party/AdventurerAgencyMgr.cpp b/Source/Contents/Party/AdventurerAgencyMgr.cpp index 262086684..b26cc5eb3 100644 --- a/Source/Contents/Party/AdventurerAgencyMgr.cpp +++ b/Source/Contents/Party/AdventurerAgencyMgr.cpp @@ -22,7 +22,7 @@ CAdventurerAgencyMgr* g_adventurerAgencyMgr; // OFFSET: 0x005CA710 // FUNCTION: fn_03648 -CAdventurerAgencyMgr::CAdventurerAgencyMgr() : enabled(true), registered(false), unknown_0008(0), pending(0) { +CAdventurerAgencyMgr::CAdventurerAgencyMgr() : enabled(true), registered(false), masterAccountId(0), pending(0) { } // OFFSET: 0x005CA880 diff --git a/Source/Contents/Party/AdventurerAgencyMgr.h b/Source/Contents/Party/AdventurerAgencyMgr.h index 750aae18b..1a2f7f75b 100644 --- a/Source/Contents/Party/AdventurerAgencyMgr.h +++ b/Source/Contents/Party/AdventurerAgencyMgr.h @@ -34,7 +34,7 @@ public: /* 0004 */ bool enabled; /* 0005 */ bool registered; - /* 0008 */ std::uint32_t unknown_0008; + /* 0008 */ std::uint32_t masterAccountId; /* 000C */ std::vector entries; /* 0018 */ std::uint32_t pending; diff --git a/Source/Contents/Party/AgencyRequests.cpp b/Source/Contents/Party/AgencyRequests.cpp index 23489d749..536175105 100644 --- a/Source/Contents/Party/AgencyRequests.cpp +++ b/Source/Contents/Party/AgencyRequests.cpp @@ -10,7 +10,7 @@ void CAdventurerAgencyMgr::RequestChangeMaster(std::uint32_t targetAccountId, st const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->ChangePartyMaster( account, character, std::string(g_session.DecodePlayerName()), targetAccountId, targetCharacterId, targetName, std::string(g_session.m_accountName.c_str()), - this->ServiceUrl(6), std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), g_windowMgr + this->ServiceUrl(6), std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), g_windowMgr ); ++this->pending; } @@ -22,7 +22,7 @@ void CAdventurerAgencyMgr::RequestMyParty() { const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->LoadMyParty( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(5), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), g_windowMgr + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), g_windowMgr ); ++this->pending; } @@ -34,7 +34,7 @@ void CAdventurerAgencyMgr::RequestList(int page) { const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->LoadPartyList( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(1), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), 0, CAdvenPartyInfo(), page, g_windowMgr + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), 0, CAdvenPartyInfo(), page, g_windowMgr ); ++this->pending; } @@ -46,7 +46,7 @@ void CAdventurerAgencyMgr::RequestInfo(std::uint32_t queryAccountId) { const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->LoadPartyInfo( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(7), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), queryAccountId + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), queryAccountId ); ++this->pending; } @@ -58,7 +58,7 @@ void CAdventurerAgencyMgr::RequestRegistration(const CAdvenPartyInfo& info) { const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->RegisterParty( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(0), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), info + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), info ); ++this->pending; } @@ -70,7 +70,7 @@ void CAdventurerAgencyMgr::RequestSearch(const CAdvenPartyInfo& filter, int page const std::uint32_t character = g_session.m_gid; g_asyncWorkMgr->LoadPartyList( account, character, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(3), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), 1, filter, page, g_windowMgr + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), 1, filter, page, g_windowMgr ); ++this->pending; } @@ -78,11 +78,11 @@ void CAdventurerAgencyMgr::RequestSearch(const CAdvenPartyInfo& filter, int page // OFFSET: 0x005CD340 // FUNCTION: fn_03669 void CAdventurerAgencyMgr::RequestStop(std::uint32_t masterAccountId) { - this->unknown_0008 = masterAccountId; + this->masterAccountId = masterAccountId; const std::uint32_t account = g_session.m_aid; g_asyncWorkMgr->StopRecruiting( account, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(4), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), masterAccountId + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), masterAccountId ); ++this->pending; } @@ -94,11 +94,11 @@ void CAdventurerAgencyMgr::RequestStop() { return; } - this->unknown_0008 = g_session.m_aid; + this->masterAccountId = g_session.m_aid; const std::uint32_t account = g_session.m_aid; g_asyncWorkMgr->StopRecruiting( account, std::string(g_session.m_accountName.c_str()), this->ServiceUrl(4), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), account + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), account ); ++this->pending; } diff --git a/Source/Contents/Party/PartyJoinResult.cpp b/Source/Contents/Party/PartyJoinResult.cpp index 17240d6d8..1c4c4c170 100644 --- a/Source/Contents/Party/PartyJoinResult.cpp +++ b/Source/Contents/Party/PartyJoinResult.cpp @@ -53,7 +53,7 @@ void ReceivePartyJoinResult(const void* packet) { case 0: { char text[500] = {}; - if (g_session.unknown_5464 == 1) { + if (g_session.partyLeader == 1) { StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_ADVENTURER_AGENCY_LIST), reinterpret_cast(bytes + 2)); } else { StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_JOIN_ACCEPT_REQUEST_USER), reinterpret_cast(bytes + 26)); @@ -65,7 +65,7 @@ void ReceivePartyJoinResult(const void* packet) { case 1: { char text[500] = {}; - if (g_session.unknown_5464 == 1) { + if (g_session.partyLeader == 1) { StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_REQUEST_JOIN_PARTY), reinterpret_cast(bytes + 2)); } else { StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_JOIN_REFUSE_REQUEST_USER), reinterpret_cast(bytes + 26)); diff --git a/Source/Contents/Party/StopRecruitingCompletion.cpp b/Source/Contents/Party/StopRecruitingCompletion.cpp index e23afd0ed..c71fb8ae1 100644 --- a/Source/Contents/Party/StopRecruitingCompletion.cpp +++ b/Source/Contents/Party/StopRecruitingCompletion.cpp @@ -18,7 +18,7 @@ void CAdventurerAgencyMgr::CompleteStopRecruiting(AsyncDiagnostic diagnostic, st --this->pending; if (!diagnostic.success) { - if (this->unknown_0008 == g_session.m_aid) { + if (this->masterAccountId == g_session.m_aid) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_EXPAND_SIGHT_HELP)), 0xFF, 0, 0, 0); } @@ -35,14 +35,14 @@ void CAdventurerAgencyMgr::CompleteStopRecruiting(AsyncDiagnostic diagnostic, st switch (root["Type"].asInt()) { case 2: case 3: - if (this->unknown_0008 == g_session.m_aid) { + if (this->masterAccountId == g_session.m_aid) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_EXPAND_SIGHT_HELP)), 0xFF, 0, 0, 0); } return; } - if (this->unknown_0008 == g_session.m_aid) { + if (this->masterAccountId == g_session.m_aid) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FORCED_WEB_LOGIN)), 0xFFFF64, 0, 0, 0); } diff --git a/Source/Contents/PetStatus.cpp b/Source/Contents/PetStatus.cpp index deb0d8480..510dbd730 100644 --- a/Source/Contents/PetStatus.cpp +++ b/Source/Contents/PetStatus.cpp @@ -112,11 +112,11 @@ void CSession::GetPetHungryStateString(int hunger, char* buffer) { // OFFSET: 0x00E12830 // FUNCTION: fn_23817 int CSession::GetPetEmotionNumber(int job, int action, int hungerLevel) { - if (g_session.unknown_0E98 != g_session.unknown_5558) { - g_session.unknown_0E98 = g_session.unknown_5558; + if (g_session.cachedSex != g_session.currentSex) { + g_session.cachedSex = g_session.currentSex; } - return g_session.unknown_0E98 + ((job * 10 + action) * 10 + hungerLevel) * 10; + return g_session.cachedSex + ((job * 10 + action) * 10 + hungerLevel) * 10; } // OFFSET: 0x00E1DF60 diff --git a/Source/Contents/RDamageVar.h b/Source/Contents/RDamageVar.h index 67c95ce9b..80e0b32e2 100644 --- a/Source/Contents/RDamageVar.h +++ b/Source/Contents/RDamageVar.h @@ -3,10 +3,10 @@ class RDamageVar { public: - RDamageVar() : unknown_0004(0) {} + RDamageVar() : damageValue(0) {} virtual ~RDamageVar(); - /* 0004 */ int unknown_0004; + /* 0004 */ int damageValue; }; #endif diff --git a/Source/Contents/RenewQuestMgr.cpp b/Source/Contents/RenewQuestMgr.cpp index 46e3c0223..a9011da73 100644 --- a/Source/Contents/RenewQuestMgr.cpp +++ b/Source/Contents/RenewQuestMgr.cpp @@ -45,23 +45,23 @@ struct RenewQuestOngoingRecord { struct RenewQuestHuntRecord { /* 0000 */ int huntId; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ short unknown_000C; - /* 000E */ short unknown_000E; - /* 0010 */ short unknown_0010; - /* 0012 */ short unknown_0012; + /* 0004 */ int monsterCondition; + /* 0008 */ int monsterId; + /* 000C */ short minLevel; + /* 000E */ short maxLevel; + /* 0010 */ short killCount; + /* 0012 */ short killGoal; /* 0014 */ char name[0x33]; }; struct RenewQuestShortHuntRecord { /* 0000 */ int huntId; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ short unknown_000C; - /* 000E */ short unknown_000E; - /* 0010 */ short unknown_0010; - /* 0012 */ short unknown_0012; + /* 0004 */ int monsterCondition; + /* 0008 */ int monsterId; + /* 000C */ short minLevel; + /* 000E */ short maxLevel; + /* 0010 */ short killCount; + /* 0012 */ short killGoal; /* 0014 */ char name[0x18]; }; @@ -88,7 +88,7 @@ CRenewQuestMgr* g_renewQuestMgr; // OFFSET: 0x00676110 // FUNCTION: fn_05417 -RenewQuestOngoingInfo::RenewQuestOngoingInfo() : m_simpleView(true), unknown_01B8(""), unknown_01D0("") { +RenewQuestOngoingInfo::RenewQuestOngoingInfo() : m_simpleView(true), baseExpReward(""), jobExpReward("") { this->m_descriptions.clear(); this->m_rewards.clear(); for (int index = 0; index < 3; ++index) { @@ -107,12 +107,12 @@ RenewQuestOngoingInfo::RenewQuestOngoingInfo() : m_simpleView(true), unknown_01B // OFFSET: 0x006765C0 // FUNCTION: fn_05420 RenewQuestInfo::RenewQuestInfo() - : m_state(1), m_title(""), m_icon(""), m_iconTooltip(""), unknown_004C(""), unknown_0064(""), unknown_007C(""), unknown_0094(""), - unknown_00AC(0), unknown_00B0(0) {} + : m_state(1), m_title(""), m_icon(""), m_iconTooltip(""), summary(""), unknown_0064(""), npcSprite(""), destinationMap(""), + destinationX(0), destinationY(0) {} // OFFSET: 0x00676770 // FUNCTION: fn_05421 -RenewQuestRecommendedInfo::RenewQuestRecommendedInfo() : unknown_00B4("") { +RenewQuestRecommendedInfo::RenewQuestRecommendedInfo() : backgroundImage("") { for (int index = 0; index < 3; ++index) { this->m_descriptions[index].clear(); } @@ -452,12 +452,12 @@ void CRenewQuestMgr::WriteOngoingQuests(char* buffer) { for (int index = 0; index < huntCount; ++index) { RenewQuestHuntRecord hunt = {}; hunt.huntId = static_cast(info.m_huntId[index]); - hunt.unknown_0004 = info.m_huntUnknown01A0[index]; - hunt.unknown_0008 = info.m_huntUnknown00D4[index]; - hunt.unknown_000C = info.m_huntUnknown01AC[index]; - hunt.unknown_000E = info.m_huntUnknown01B2[index]; - hunt.unknown_0010 = info.m_huntUnknown00E0[index]; - hunt.unknown_0012 = info.m_huntUnknown0180[index]; + hunt.monsterCondition = info.m_huntUnknown01A0[index]; + hunt.monsterId = info.m_huntUnknown00D4[index]; + hunt.minLevel = info.m_huntUnknown01AC[index]; + hunt.maxLevel = info.m_huntUnknown01B2[index]; + hunt.killCount = info.m_huntUnknown00E0[index]; + hunt.killGoal = info.m_huntUnknown0180[index]; strncpy_s(hunt.name, sizeof(hunt.name), info.m_huntName[index], _TRUNCATE); *reinterpret_cast(buffer + offset) = hunt; offset += sizeof(RenewQuestHuntRecord); @@ -539,15 +539,15 @@ void CRenewQuestMgr::AddOngoingQuest(unsigned int id, RenewQuestOngoingInfo& inf &text7, &unknown1, &unknown2, &type)) { info.m_title = title ? title : ""; info.m_icon = icon ? icon : ""; - info.unknown_004C = text3 ? text3 : ""; - info.unknown_007C = text4 ? text4 : ""; - info.unknown_0094 = text5 ? text5 : ""; - info.unknown_01B8 = text6 ? text6 : ""; - info.unknown_01D0 = text7 ? text7 : ""; - info.unknown_00AC = unknown1; - info.unknown_00B0 = unknown2; + info.summary = text3 ? text3 : ""; + info.npcSprite = text4 ? text4 : ""; + info.destinationMap = text5 ? text5 : ""; + info.baseExpReward = text6 ? text6 : ""; + info.jobExpReward = text7 ? text7 : ""; + info.destinationX = unknown1; + info.destinationY = unknown2; info.m_simpleView = simpleView; - info.unknown_01F8 = type; + info.questType = type; if (type == 1) { info.m_simpleView = false; } @@ -555,10 +555,10 @@ void CRenewQuestMgr::AddOngoingQuest(unsigned int id, RenewQuestOngoingInfo& inf info.m_iconTooltip = this->GetIconTooltip(info.m_icon); } - UIWindow* window = reinterpret_cast(g_windowMgr.unknown_01DC); + UIWindow* window = reinterpret_cast(g_windowMgr.basicInfoWnd); if (window != nullptr) { info.m_title = window->FitDisplayText(250, info.m_title.c_str(), 0, 12, 1); - info.unknown_004C = window->FitDisplayText(250, info.unknown_004C.c_str(), 0, 12, 0); + info.summary = window->FitDisplayText(250, info.summary.c_str(), 0, 12, 0); } this->m_ongoingQuests.erase(id); @@ -755,24 +755,24 @@ void CRenewQuestMgr::ReadOngoingQuests(const char* buffer, unsigned int) { RenewQuestHuntRecord huntRecord; memcpy_s(&huntRecord, sizeof(huntRecord), buffer + offset, sizeof(huntRecord)); info.m_huntId[hunt] = huntRecord.huntId; - info.m_huntUnknown01A0[hunt] = huntRecord.unknown_0004; - info.m_huntUnknown00D4[hunt] = huntRecord.unknown_0008; - info.m_huntUnknown00E0[hunt] = huntRecord.unknown_0010; - info.m_huntUnknown0180[hunt] = huntRecord.unknown_0012; - info.m_huntUnknown01AC[hunt] = huntRecord.unknown_000C; - info.m_huntUnknown01B2[hunt] = huntRecord.unknown_000E; + info.m_huntUnknown01A0[hunt] = huntRecord.monsterCondition; + info.m_huntUnknown00D4[hunt] = huntRecord.monsterId; + info.m_huntUnknown00E0[hunt] = huntRecord.killCount; + info.m_huntUnknown0180[hunt] = huntRecord.killGoal; + info.m_huntUnknown01AC[hunt] = huntRecord.minLevel; + info.m_huntUnknown01B2[hunt] = huntRecord.maxLevel; strncpy_s(info.m_huntName[hunt], sizeof(info.m_huntName[hunt]), huntRecord.name, _TRUNCATE); offset += sizeof(RenewQuestHuntRecord); } else { RenewQuestShortHuntRecord huntRecord; memcpy_s(&huntRecord, sizeof(huntRecord), buffer + offset, sizeof(huntRecord)); info.m_huntId[hunt] = huntRecord.huntId; - info.m_huntUnknown01A0[hunt] = huntRecord.unknown_0004; - info.m_huntUnknown00D4[hunt] = huntRecord.unknown_0008; - info.m_huntUnknown00E0[hunt] = huntRecord.unknown_0010; - info.m_huntUnknown0180[hunt] = huntRecord.unknown_0012; - info.m_huntUnknown01AC[hunt] = huntRecord.unknown_000C; - info.m_huntUnknown01B2[hunt] = huntRecord.unknown_000E; + info.m_huntUnknown01A0[hunt] = huntRecord.monsterCondition; + info.m_huntUnknown00D4[hunt] = huntRecord.monsterId; + info.m_huntUnknown00E0[hunt] = huntRecord.killCount; + info.m_huntUnknown0180[hunt] = huntRecord.killGoal; + info.m_huntUnknown01AC[hunt] = huntRecord.minLevel; + info.m_huntUnknown01B2[hunt] = huntRecord.maxLevel; strncpy_s(info.m_huntName[hunt], sizeof(info.m_huntName[hunt]), huntRecord.name, sizeof(huntRecord.name)); offset += sizeof(RenewQuestShortHuntRecord); } @@ -885,12 +885,12 @@ int CRenewQuestMgr::L_InsertRecommendedQuestInfo(lua_State* state) { info.m_active = true; info.m_title = luaL_checkstring(state, 2); info.m_icon = luaL_checkstring(state, 3); - info.unknown_004C = luaL_checkstring(state, 4); - info.unknown_00B4 = luaL_checkstring(state, 5); - info.unknown_007C = luaL_checkstring(state, 6); - info.unknown_0094 = luaL_checkstring(state, 7); - info.unknown_00AC = static_cast(luaL_checknumber(state, 8)); - info.unknown_00B0 = static_cast(luaL_checknumber(state, 9)); + info.summary = luaL_checkstring(state, 4); + info.backgroundImage = luaL_checkstring(state, 5); + info.npcSprite = luaL_checkstring(state, 6); + info.destinationMap = luaL_checkstring(state, 7); + info.destinationX = static_cast(luaL_checknumber(state, 8)); + info.destinationY = static_cast(luaL_checknumber(state, 9)); info.m_iconTooltip = g_renewQuestMgr->GetIconTooltip(info.m_icon); g_renewQuestMgr->AddRecommendedQuest(id, info); return 0; diff --git a/Source/Contents/RenewQuestMgr.h b/Source/Contents/RenewQuestMgr.h index b620ba3fd..e95eb0782 100644 --- a/Source/Contents/RenewQuestMgr.h +++ b/Source/Contents/RenewQuestMgr.h @@ -19,12 +19,12 @@ struct RenewQuestInfo { /* 0004 */ std::string m_title; /* 001C */ std::string m_icon; /* 0034 */ std::string m_iconTooltip; - /* 004C */ std::string unknown_004C; + /* 004C */ std::string summary; /* 0064 */ std::string unknown_0064; - /* 007C */ std::string unknown_007C; - /* 0094 */ std::string unknown_0094; - /* 00AC */ int unknown_00AC; - /* 00B0 */ int unknown_00B0; + /* 007C */ std::string npcSprite; + /* 0094 */ std::string destinationMap; + /* 00AC */ int destinationX; + /* 00B0 */ int destinationY; RenewQuestInfo(); }; @@ -48,10 +48,10 @@ struct RenewQuestOngoingInfo : RenewQuestInfo { /* 01A0 */ int m_huntUnknown01A0[3]; /* 01AC */ short m_huntUnknown01AC[3]; /* 01B2 */ short m_huntUnknown01B2[3]; - /* 01B8 */ std::string unknown_01B8; - /* 01D0 */ std::string unknown_01D0; + /* 01B8 */ std::string baseExpReward; + /* 01D0 */ std::string jobExpReward; /* 01E8 */ std::vector> m_rewards; - /* 01F8 */ __int64 unknown_01F8; + /* 01F8 */ __int64 questType; RenewQuestOngoingInfo(); std::string GetDateString() const; @@ -59,7 +59,7 @@ struct RenewQuestOngoingInfo : RenewQuestInfo { }; struct RenewQuestRecommendedInfo : RenewQuestInfo { - /* 00B4 */ std::string unknown_00B4; + /* 00B4 */ std::string backgroundImage; /* 00CC */ std::vector m_descriptions[3]; RenewQuestRecommendedInfo(); diff --git a/Source/Contents/ReputeMgr.cpp b/Source/Contents/ReputeMgr.cpp index c16241796..c0d44f1d7 100644 --- a/Source/Contents/ReputeMgr.cpp +++ b/Source/Contents/ReputeMgr.cpp @@ -308,8 +308,8 @@ void CReputeMgr::SetPointsReceived(bool received) { void CReputeMgr::InfoInserter::operator()(const std::pair& entry) const { ReputeInfo info; info.name = FromUtf8(entry.second.name, g_textCodePage); - info.unknown_0018 = entry.second.maxPointPositive; - info.unknown_0020 = entry.second.maxPointNegative; + info.maxPointPositive = entry.second.maxPointPositive; + info.maxPointNegative = entry.second.maxPointNegative; const std::string invisible = FromUtf8(entry.second.invisible, g_textCodePage); const char* text = invisible.c_str(); if (invisible.size() == 12 && text[0] == 'V' && text[1] == 'I' && text[2] == 'S' && text[3] == 'I' && diff --git a/Source/Contents/ReputeMgr.h b/Source/Contents/ReputeMgr.h index 96aa9d5ee..36e3ec01d 100644 --- a/Source/Contents/ReputeMgr.h +++ b/Source/Contents/ReputeMgr.h @@ -20,8 +20,8 @@ enum ReputeVisibility : std::int64_t { struct ReputeInfo { /* 0000 */ std::string name; - /* 0018 */ std::uint64_t unknown_0018; - /* 0020 */ std::uint64_t unknown_0020; + /* 0018 */ std::uint64_t maxPointPositive; + /* 0020 */ std::uint64_t maxPointNegative; /* 0028 */ ReputeVisibility visibility; /* 0030 */ std::int64_t point = 0; /* 0038 */ bool updated; diff --git a/Source/Contents/RobeTopLayer.cpp b/Source/Contents/RobeTopLayer.cpp index 46d7ebc66..607e9120e 100644 --- a/Source/Contents/RobeTopLayer.cpp +++ b/Source/Contents/RobeTopLayer.cpp @@ -25,9 +25,9 @@ bool CSession::IsRobeDrawOnTop(int action, int frame, bool riding) { } int layer = 1; - this->m_hotkeyScript->Call("_New_DrawOnTop", "ddddd>bd", this->m_robe, this->unknown_0E98, job, action, frame, &drawOnTop, &layer); + this->m_hotkeyScript->Call("_New_DrawOnTop", "ddddd>bd", this->m_robe, this->cachedSex, job, action, frame, &drawOnTop, &layer); } else { - this->m_hotkeyScript->Call("DrawOnTop", "ddddd>b", this->m_robe, this->unknown_0E98, job, action, frame, &drawOnTop); + this->m_hotkeyScript->Call("DrawOnTop", "ddddd>b", this->m_robe, this->cachedSex, job, action, frame, &drawOnTop); } return drawOnTop; diff --git a/Source/Contents/RodexMailStore.cpp b/Source/Contents/RodexMailStore.cpp index 12707790b..5a62beadd 100644 --- a/Source/Contents/RodexMailStore.cpp +++ b/Source/Contents/RodexMailStore.cpp @@ -41,17 +41,17 @@ void RodexMailStore::Clear() { this->m_mails0.clear(); this->m_mails1.clear(); this->m_mails2.clear(); - this->unknown_0008 = 0; - this->unknown_000C = 0; - this->unknown_0010 = false; - this->unknown_0018 = 0; + this->currentMailIdLow = 0; + this->currentMailIdHigh = 0; + this->inboxType = false; + this->unreadCount = 0; } // OFFSET: 0x007FE850 // FUNCTION: fn_09988 void RodexMailStore::PurgeFlagged() { for (auto mail = this->m_mails0.begin(); mail != this->m_mails0.end();) { - if (mail->second.unknown_0190 == 1) { + if (mail->second.isReturned == 1) { mail = this->m_mails0.erase(mail); } else { ++mail; @@ -59,7 +59,7 @@ void RodexMailStore::PurgeFlagged() { } for (auto mail = this->m_mails1.begin(); mail != this->m_mails1.end();) { - if (mail->second.unknown_0190 == 1) { + if (mail->second.isReturned == 1) { mail = this->m_mails1.erase(mail); } else { ++mail; @@ -67,7 +67,7 @@ void RodexMailStore::PurgeFlagged() { } for (auto mail = this->m_mails2.begin(); mail != this->m_mails2.end();) { - if (mail->second.unknown_0190 == 1) { + if (mail->second.isReturned == 1) { mail = this->m_mails2.erase(mail); } else { ++mail; diff --git a/Source/Contents/RodexMailStore.h b/Source/Contents/RodexMailStore.h index 95357b533..5b73a7dcc 100644 --- a/Source/Contents/RodexMailStore.h +++ b/Source/Contents/RodexMailStore.h @@ -9,19 +9,19 @@ struct RodexMail { /* 0000 */ unsigned char isRead; - /* 0001 */ unsigned char unknown_0001; + /* 0001 */ unsigned char type; /* 0002 */ std::array unknown_0002; - /* 0004 */ std::string unknown_0004; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ std::string unknown_0024; - /* 003C */ std::string unknown_003C; + /* 0004 */ std::string sender; + /* 001C */ int sentAt; + /* 0020 */ int expiresAt; + /* 0024 */ std::string title; + /* 003C */ std::string body; /* 0054 */ unsigned char hasItem; - /* 0055 */ std::array unknown_0055; + /* 0055 */ std::array attachments; /* 0188 */ std::int64_t zeny; - /* 0190 */ std::uint8_t unknown_0190 = 0; + /* 0190 */ std::uint8_t isReturned = 0; /* 0191 */ std::array unknown_0191; - /* 0194 */ int unknown_0194 = -1; + /* 0194 */ int isKnownSender = -1; }; class RodexMailStore { @@ -32,12 +32,12 @@ public: this->m_mails0.clear(); this->m_mails1.clear(); this->m_mails2.clear(); - this->unknown_0008 = 0; - this->unknown_000C = 0; - this->unknown_0010 = false; - this->unknown_0014 = 0; - this->unknown_0018 = 0; - this->unknown_001C = false; + this->currentMailIdLow = 0; + this->currentMailIdHigh = 0; + this->inboxType = false; + this->dailySendCount = 0; + this->unreadCount = 0; + this->isPageComplete = false; this->m_isValid = true; } @@ -51,15 +51,15 @@ public: /* 0004 */ int unknown_0004; union { struct { - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; + /* 0008 */ int currentMailIdLow; + /* 000C */ int currentMailIdHigh; }; /* 0008 */ std::int64_t currentMailId; }; - /* 0010 */ unsigned char unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ bool unknown_001C; + /* 0010 */ unsigned char inboxType; + /* 0014 */ int dailySendCount; + /* 0018 */ int unreadCount; + /* 001C */ bool isPageComplete; /* 0020 */ std::map m_mails0; /* 0028 */ std::map m_mails1; /* 0030 */ std::map m_mails2; @@ -67,10 +67,10 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(RodexMail) == 0x198); -static_assert(offsetof(RodexMail, unknown_0024) == 0x24); +static_assert(offsetof(RodexMail, title) == 0x24); static_assert(offsetof(RodexMail, zeny) == 0x188); -static_assert(offsetof(RodexMail, unknown_0190) == 0x190); -static_assert(offsetof(RodexMail, unknown_0194) == 0x194); +static_assert(offsetof(RodexMail, isReturned) == 0x190); +static_assert(offsetof(RodexMail, isKnownSender) == 0x194); static_assert(sizeof(RodexMailStore) == 0x38); static_assert(offsetof(RodexMailStore, m_mails0) == 0x20); #endif diff --git a/Source/Contents/RouletteMgr.cpp b/Source/Contents/RouletteMgr.cpp index d006b5286..11880e3ca 100644 --- a/Source/Contents/RouletteMgr.cpp +++ b/Source/Contents/RouletteMgr.cpp @@ -22,12 +22,12 @@ RouletteMgr::RouletteMgr() { std::memset(&this->m_quads.current, 0, sizeof(this->m_quads.current)); std::memset(&this->m_quads.start, 0, sizeof(this->m_quads.start)); std::memset(&this->m_quads.target, 0, sizeof(this->m_quads.target)); - this->unknown_0004 = 0; + this->m_serial = 0; this->m_frame = 0; this->m_cycle = 0; this->m_spinning = 0; this->m_stage = 0; - this->unknown_0018 = 0; + this->resetState = 0; this->m_lastTick = 0; this->m_interval = 0; this->m_index = 0; @@ -59,7 +59,7 @@ void RouletteMgr::Reset() { this->m_frame = 0; this->m_cycle = 0; this->m_stage = 0; - this->unknown_0018 = 0; + this->resetState = 0; this->m_lastTick = 0; this->m_interval = 0; this->m_spinning = 0; @@ -143,9 +143,9 @@ void RouletteMgr::StartSpin(int x, int y, int originX, int originY) { this->m_spinning = 1; this->m_resultShown = 0; - g_windowMgr.unknown_0464->m_enabled = 0; - if (g_windowMgr.unknown_0464) { - g_windowMgr.unknown_0464->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + g_windowMgr.roulletteWnd->m_enabled = 0; + if (g_windowMgr.roulletteWnd) { + g_windowMgr.roulletteWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -210,8 +210,8 @@ void RouletteMgr::Update() { const int originY = static_cast(g_renderer->viewport.height * 0.5 - 240.0); const int originX = static_cast(g_renderer->viewport.width * 0.5 - 320.0); this->SetQuad((this->m_stage + this->m_index) * 36 + 173, 341 - this->m_stage * 40, originX, originY); - g_windowMgr.unknown_0464->m_enabled = 1; - g_windowMgr.unknown_0464->Invalidate(); + g_windowMgr.roulletteWnd->m_enabled = 1; + g_windowMgr.roulletteWnd->Invalidate(); this->m_spinning = 0; return; } diff --git a/Source/Contents/RouletteMgr.h b/Source/Contents/RouletteMgr.h index 66e0954d7..9c9b4cdaf 100644 --- a/Source/Contents/RouletteMgr.h +++ b/Source/Contents/RouletteMgr.h @@ -56,12 +56,12 @@ public: static void Destroy(); /* 0000 */ unsigned char m_valid; - /* 0004 */ int unknown_0004; + /* 0004 */ int m_serial; /* 0008 */ int m_frame; /* 000C */ int m_cycle; /* 0010 */ unsigned char m_spinning; /* 0014 */ int m_stage; - /* 0018 */ int unknown_0018; + /* 0018 */ int resetState; /* 001C */ RouletteQuads m_quads; /* 025C */ unsigned long m_lastTick; /* 0260 */ unsigned long m_interval; diff --git a/Source/Contents/Schedule/EmotionSchedule.cpp b/Source/Contents/Schedule/EmotionSchedule.cpp index bb41b22e6..34cf910f6 100644 --- a/Source/Contents/Schedule/EmotionSchedule.cpp +++ b/Source/Contents/Schedule/EmotionSchedule.cpp @@ -16,8 +16,8 @@ CEmotionPurchaseExpireSchedule::CEmotionPurchaseExpireSchedule(const std::uint64 void CEmotionPurchaseExpireSchedule::Process(const std::uint64_t& now) { CSchedule::Process(now); if (g_cashEmotionMgr->RemoveExpiredPacks()) { - if (static_cast(g_windowMgr.unknown_0384)) { - static_cast(g_windowMgr.unknown_0384)->RefreshPackLists(); + if (static_cast(g_windowMgr.cashEmotionListWnd)) { + static_cast(g_windowMgr.cashEmotionListWnd)->RefreshPackLists(); } } int earliest = g_cashEmotionMgr->GetEarliestExpiry(); @@ -59,9 +59,9 @@ CEmotionSaleExpireSchedule::CEmotionSaleExpireSchedule(const std::uint64_t& time void CEmotionSaleExpireSchedule::Process(const std::uint64_t& now) { CSchedule::Process(now); CashEmotionPackRefresh refresh = g_cashEmotionMgr->RefreshUnownedPacks(); - if (refresh.changed && static_cast(g_windowMgr.unknown_0384)) { - static_cast(g_windowMgr.unknown_0384)->RefreshPackLists(); - static_cast(g_windowMgr.unknown_0384)->RefreshSelection(); + if (refresh.changed && static_cast(g_windowMgr.cashEmotionListWnd)) { + static_cast(g_windowMgr.cashEmotionListWnd)->RefreshPackLists(); + static_cast(g_windowMgr.cashEmotionListWnd)->RefreshSelection(); } if (refresh.nextTime != 0x7FFFFFFF) { int current = g_cashEmotionMgr->GetServerTime(); diff --git a/Source/Contents/Schedule/Schedule.cpp b/Source/Contents/Schedule/Schedule.cpp index 2f7c2510f..ae62dd8b7 100644 --- a/Source/Contents/Schedule/Schedule.cpp +++ b/Source/Contents/Schedule/Schedule.cpp @@ -13,10 +13,10 @@ CSchedule::CSchedule(const std::uint64_t& timestamp, const std::int64_t& interva this->timestamp = timestamp; this->interval = interval; this->scheduleType = scheduleType; - this->unknown_002C = unknown; + this->userValue = unknown; this->active = true; - this->unknown_0025 = 0; - this->unknown_0028 = 0; + this->pending = 0; + this->processCount = 0; } // OFFSET: 0x00BA8980 diff --git a/Source/Contents/Schedule/Schedule.h b/Source/Contents/Schedule/Schedule.h index ad6bb6304..a8a0205ee 100644 --- a/Source/Contents/Schedule/Schedule.h +++ b/Source/Contents/Schedule/Schedule.h @@ -32,10 +32,10 @@ public: /* 0018 */ std::int64_t interval; /* 0020 */ int scheduleType; /* 0024 */ bool active; - /* 0025 */ std::uint8_t unknown_0025; + /* 0025 */ std::uint8_t pending; /* 0026 */ std::uint8_t unknown_0026[2]; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; + /* 0028 */ int processCount; + /* 002C */ int userValue; }; #pragma pack(pop) @@ -47,7 +47,7 @@ static_assert(offsetof(CSchedule, timestamp) == 0x10); static_assert(offsetof(CSchedule, interval) == 0x18); static_assert(offsetof(CSchedule, scheduleType) == 0x20); static_assert(offsetof(CSchedule, active) == 0x24); -static_assert(offsetof(CSchedule, unknown_002C) == 0x2C); +static_assert(offsetof(CSchedule, userValue) == 0x2C); #endif #endif diff --git a/Source/Contents/Schedule/TimeScheduler.cpp b/Source/Contents/Schedule/TimeScheduler.cpp index af7115d5a..7905a9d46 100644 --- a/Source/Contents/Schedule/TimeScheduler.cpp +++ b/Source/Contents/Schedule/TimeScheduler.cpp @@ -75,7 +75,7 @@ CSchedule* CTimeScheduler::FindSchedule(int serial) { // FUNCTION: fn_45541 CSchedule* CTimeScheduler::FindScheduleByKey(int key) { for (CSchedule* schedule : this->m_schedules) { - if (schedule->unknown_002C == key) { + if (schedule->userValue == key) { return schedule; } } @@ -128,7 +128,7 @@ void CTimeScheduler::Process() { if (schedule != nullptr) { if (schedule->active) { uint64_t now = _Xtime_get_ticks(); - if (!schedule->unknown_0025) { + if (!schedule->pending) { if (schedule->CheckTime(now) == true) { schedule->Process(now); } @@ -147,7 +147,7 @@ void CTimeScheduler::Process() { // FUNCTION: fn_19739 void CTimeScheduler::RemoveSchedulesByKey(int value) { for (CSchedule* schedule : this->m_schedules) { - if (schedule->unknown_002C == value) { + if (schedule->userValue == value) { schedule->active = false; } } diff --git a/Source/Contents/SignBoard/SignBoard.cpp b/Source/Contents/SignBoard/SignBoard.cpp index a3ba71efa..497f9abd1 100644 --- a/Source/Contents/SignBoard/SignBoard.cpp +++ b/Source/Contents/SignBoard/SignBoard.cpp @@ -31,7 +31,7 @@ bool CreateSignBoardMgr() { if (s_signBoardMgr == nullptr) { s_signBoardMgr = new (std::nothrow) CSignBoardMgr(); if (s_signBoardMgr != nullptr) { - if (!s_signBoardMgr->unknown_0000) { + if (!s_signBoardMgr->initialized) { delete s_signBoardMgr; s_signBoardMgr = nullptr; } else { @@ -116,7 +116,7 @@ void CSignBoardMgr::Initialize() { } image += it->image; object->SetWindowImage(image); - object->SetBoard(std::string(it->unknown_0014), std::string(it->unknown_001C)); + object->SetBoard(std::string(it->text), std::string(it->color)); vector3d position = {0.0f, 0.0f, 0.0f}; static_cast(g_modeMgr.GetGameMode())->CellCenter(it->column, it->row, position.x, position.z); @@ -136,7 +136,7 @@ void CSignBoardMgr::LoadList() { SignBoardInfo defaults; g_session.m_hotkeyScript->Call( "GetSignBoardListTable", "d>sddddsss", 1, &defaults.map, &defaults.column, &defaults.row, &defaults.offset, &defaults.type, &defaults.image, - &defaults.unknown_0014, &defaults.unknown_001C + &defaults.text, &defaults.color ); int count = 0; @@ -144,8 +144,8 @@ void CSignBoardMgr::LoadList() { for (int index = 2; index < count + 1; ++index) { SignBoardInfo info; g_session.m_hotkeyScript->Call( - "GetSignBoardListTable", "d>sddddsss", index, &info.map, &info.column, &info.row, &info.offset, &info.type, &info.image, &info.unknown_0014, - &info.unknown_001C + "GetSignBoardListTable", "d>sddddsss", index, &info.map, &info.column, &info.row, &info.offset, &info.type, &info.image, &info.text, + &info.color ); switch (info.type) { case 2: @@ -153,11 +153,11 @@ void CSignBoardMgr::LoadList() { break; case 3: info.type = 3; - if (info.unknown_0014 == nullptr) { - info.unknown_0014 = defaults.unknown_0014; + if (info.text == nullptr) { + info.text = defaults.text; } - if (info.unknown_001C == nullptr) { - info.unknown_001C = defaults.unknown_001C; + if (info.color == nullptr) { + info.color = defaults.color; } break; case 1: @@ -216,12 +216,12 @@ void CSignBoardWnd::ApplyColor() { int red = 0; int green = 0; int blue = 0; - if (this->unknown_00B0.size() != 0) { + if (this->colorText.size() != 0) { int values[3] = {0, 0, 0}; int index = 0; - std::string rest = this->unknown_00B0; - std::string token = this->unknown_00B0; - std::size_t comma = this->unknown_00B0.find(","); + std::string rest = this->colorText; + std::string token = this->colorText; + std::size_t comma = this->colorText.find(","); if (comma != std::string::npos) { while (comma != std::string::npos) { token = rest.substr(0, comma); @@ -235,8 +235,8 @@ void CSignBoardWnd::ApplyColor() { red = values[0]; green = values[1]; blue = values[2]; - if (this->unknown_00B0.find("#") != std::string::npos) { - std::string hex = this->unknown_00B0; + if (this->colorText.find("#") != std::string::npos) { + std::string hex = this->colorText; hex = hex.substr(hex.find("#") + 1); const unsigned long color = std::strtoul(hex.c_str(), nullptr, 16); red = static_cast((color >> 16) & 0xff); @@ -319,7 +319,7 @@ bool C3DCooRendering::OnProcess() { const int lift = g_renderer->viewport.height * 81 / 480; window->Move( this->render.screenX - window->geometry.width / 2, - static_cast(static_cast(this->render.screenY - window->geometry.height / 2) - static_cast(lift) * this->render.unknown_005C) + static_cast(static_cast(this->render.screenY - window->geometry.height / 2) - static_cast(lift) * this->render.distanceScale) ); } return true; @@ -328,7 +328,7 @@ bool C3DCooRendering::OnProcess() { // OFFSET: 0x00821F50 // FUNCTION: fn_10270 bool CIcon::OnProcess() { - const float frame = static_cast(static_cast(timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast(static_cast(timeGetTime() - this->render.motionStartTime) / 24.0); this->render.previousAnimation = this->render.animation; this->render.curMotion = static_cast(frame / this->render.speed) % static_cast(this->GetActRes()->FrameCount(this->render.previousAnimation)); return true; @@ -341,7 +341,7 @@ void C3DCooRendering::Render(int argument) { float y; float reciprocalDepth; g_renderer->ProjectViewport(&this->render.position.x, reinterpret_cast(argument), &x, &y, &reciprocalDepth); - this->render.unknown_005C = g_renderer->ScaleDistance(reciprocalDepth) / g_heightScale; + this->render.distanceScale = g_renderer->ScaleDistance(reciprocalDepth) / g_heightScale; this->SetTlvert(x, y); } @@ -379,11 +379,11 @@ void CIcon::Load(const std::string& name) { // OFFSET: 0x00822310 // FUNCTION: fn_10276 void C3DCooRendering::SetBoard(const std::string& text, const std::string& color) { - static_cast(this->window)->unknown_0080 = text; - static_cast(this->window)->unknown_00B0 = color; + static_cast(this->window)->boardText = text; + static_cast(this->window)->colorText = color; CSignBoardWnd* board = static_cast(this->window); board->ApplyColor(); - board->text->SetTextFitted(board->unknown_0080.c_str()); + board->text->SetTextFitted(board->boardText.c_str()); } // OFFSET: 0x00822390 diff --git a/Source/Contents/SignBoard/SignBoard.h b/Source/Contents/SignBoard/SignBoard.h index ba1d82f59..7df38a520 100644 --- a/Source/Contents/SignBoard/SignBoard.h +++ b/Source/Contents/SignBoard/SignBoard.h @@ -29,9 +29,9 @@ public: void ApplyColor(); /* 007C */ UIStaticText* text; - /* 0080 */ std::string unknown_0080; + /* 0080 */ std::string boardText; /* 0098 */ std::string iconPath; - /* 00B0 */ std::string unknown_00B0; + /* 00B0 */ std::string colorText; }; class CIcon : public CRenderObject { @@ -68,20 +68,20 @@ struct SignBoardInfo { /* 0008 */ int offset; /* 000C */ const char* map; /* 0010 */ int type; - /* 0014 */ const char* unknown_0014; + /* 0014 */ const char* text; /* 0018 */ const char* image; - /* 001C */ const char* unknown_001C; + /* 001C */ const char* color; }; class CSignBoardMgr { public: - CSignBoardMgr() : unknown_0000(true) {} + CSignBoardMgr() : initialized(true) {} ~CSignBoardMgr() { std::vector(this->m_entries).swap(this->m_entries); } void Initialize(); void LoadList(); - /* 0000 */ bool unknown_0000; + /* 0000 */ bool initialized; /* 0004 */ std::vector m_entries; }; diff --git a/Source/Contents/Skills/AutomaticSkills.cpp b/Source/Contents/Skills/AutomaticSkills.cpp index dc9169381..800781709 100644 --- a/Source/Contents/Skills/AutomaticSkills.cpp +++ b/Source/Contents/Skills/AutomaticSkills.cpp @@ -65,7 +65,7 @@ int AutomaticSkills::CancelOption(std::int16_t id) { // OFFSET: 0x007AF2A0 // FUNCTION: fn_09150 void AutomaticSkills::DisableAll() { - g_session.unknown_61A4 = 0; + g_session.automaticSkillHotkey = 0; for (int id : this->m_ids) { const auto skill = static_cast(id); @@ -93,7 +93,7 @@ void AutomaticSkills::Use(std::int16_t id, std::int16_t level, std::uint32_t tar Cancel(id); g_session.SetOption(cancel, 0, 0); } else { - g_session.unknown_61A4 = g_session.m_currentHotkey; + g_session.automaticSkillHotkey = g_session.m_currentHotkey; g_session.SetOption(ActiveOption(id), 1, 0); } } diff --git a/Source/Contents/Skills/ClientSkills.cpp b/Source/Contents/Skills/ClientSkills.cpp index a9301e15e..d99114f02 100644 --- a/Source/Contents/Skills/ClientSkills.cpp +++ b/Source/Contents/Skills/ClientSkills.cpp @@ -218,19 +218,19 @@ bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsign CSkillInfo snapshot(value); const auto update = [](CSkillInfo& target, const CSkillInfo& source, bool copy000C, bool copy0030) { target.level = source.level; - std::memcpy(&target.unknown_0014, &source.unknown_0014, sizeof(target.unknown_0014)); - std::memcpy(&target.unknown_001C, &source.unknown_001C, sizeof(target.unknown_001C)); - std::memcpy(&target.unknown_0018, &source.unknown_0018, sizeof(target.unknown_0018)); + std::memcpy(&target.spCost, &source.spCost, sizeof(target.spCost)); + std::memcpy(&target.range, &source.range, sizeof(target.range)); + std::memcpy(&target.upgradable, &source.upgradable, sizeof(target.upgradable)); if (copy000C) { - std::memcpy(&target.unknown_000C, &source.unknown_000C, sizeof(target.unknown_000C)); + std::memcpy(&target.type, &source.type, sizeof(target.type)); } if (copy0030) { - target.unknown_0030 = source.unknown_0030; + target.learnedLevel = source.learnedLevel; } - target.unknown_0034 = source.unknown_0034; + target.apCost = source.apCost; }; CSkillInfo* grouped = this->m_skillBundle.FindGrouped(snapshot.id); @@ -240,8 +240,8 @@ bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsign if (CSkillInfo* extra = this->m_skillBundle.FindExtra(snapshot.id)) { update(*extra, snapshot, true, false); } else { - snapshot.unknown_0024 = UINT32_MAX; - snapshot.unknown_002C = 0; + snapshot.treePosition = UINT32_MAX; + snapshot.canPlanLevel = 0; this->m_skillBundle.AddExtra(snapshot); } } @@ -258,16 +258,16 @@ bool CSession::UpdateSkill(const CSkillInfo& value, unsigned char notify, unsign if (CSkillInfo* existing = this->m_skillBundle.Find(value.id)) { existing->level = value.level; - std::memcpy(&existing->unknown_0014, &value.unknown_0014, sizeof(existing->unknown_0014)); - std::memcpy(&existing->unknown_001C, &value.unknown_001C, sizeof(existing->unknown_001C)); - std::memcpy(&existing->unknown_0018, &value.unknown_0018, sizeof(existing->unknown_0018)); + std::memcpy(&existing->spCost, &value.spCost, sizeof(existing->spCost)); + std::memcpy(&existing->range, &value.range, sizeof(existing->range)); + std::memcpy(&existing->upgradable, &value.upgradable, sizeof(existing->upgradable)); if (updateUnknown000C == 1) { - std::memcpy(&existing->unknown_000C, &value.unknown_000C, sizeof(existing->unknown_000C)); + std::memcpy(&existing->type, &value.type, sizeof(existing->type)); } - existing->unknown_0030 = value.unknown_0030; - existing->unknown_0034 = value.unknown_0034; + existing->learnedLevel = value.learnedLevel; + existing->apCost = value.apCost; if (notify == 1) { this->NotifySkillWindows(); } @@ -289,10 +289,10 @@ bool CSession::UpdateAdditionalSkill(const CSkillInfo& value, int) { for (CSkillInfo& skill : this->m_additionalSkills) { if (value.id == skill.id) { skill.level = value.level; - std::memcpy(&skill.unknown_0014, &value.unknown_0014, sizeof(skill.unknown_0014)); - std::memcpy(&skill.unknown_001C, &value.unknown_001C, sizeof(skill.unknown_001C)); - std::memcpy(&skill.unknown_0018, &value.unknown_0018, sizeof(skill.unknown_0018)); - skill.unknown_0034 = value.unknown_0034; + std::memcpy(&skill.spCost, &value.spCost, sizeof(skill.spCost)); + std::memcpy(&skill.range, &value.range, sizeof(skill.range)); + std::memcpy(&skill.upgradable, &value.upgradable, sizeof(skill.upgradable)); + skill.apCost = value.apCost; return false; } @@ -308,11 +308,11 @@ bool CSession::UpdateHomunSkill(const CSkillInfo& value, unsigned char notify) { for (CSkillInfo& skill : this->m_homunSkills) { if (value.id == skill.id) { skill.level = value.level; - skill.unknown_0014 = value.unknown_0014; - skill.unknown_001C = value.unknown_001C; - skill.unknown_0018 = value.unknown_0018; - skill.unknown_000C = value.unknown_000C; - skill.unknown_0034 = value.unknown_0034; + skill.spCost = value.spCost; + skill.range = value.range; + skill.upgradable = value.upgradable; + skill.type = value.type; + skill.apCost = value.apCost; if (notify) { this->NotifyHomunSkillWindows(); } @@ -335,11 +335,11 @@ bool CSession::UpdateMercSkill(const CSkillInfo& value, unsigned char notify) { for (CSkillInfo& skill : this->m_mercSkills) { if (value.id == skill.id) { skill.level = value.level; - skill.unknown_0014 = value.unknown_0014; - skill.unknown_001C = value.unknown_001C; - skill.unknown_0018 = value.unknown_0018; - skill.unknown_000C = value.unknown_000C; - skill.unknown_0034 = value.unknown_0034; + skill.spCost = value.spCost; + skill.range = value.range; + skill.upgradable = value.upgradable; + skill.type = value.type; + skill.apCost = value.apCost; if (notify) { this->NotifyMercSkillWindows(); } @@ -359,26 +359,26 @@ bool CSession::UpdateMercSkill(const CSkillInfo& value, unsigned char notify) { // OFFSET: 0x00E07410 // FUNCTION: fn_23743 void CSession::AddUnknownId(int id) { - if (std::find(this->unknown_616C.begin(), this->unknown_616C.end(), id) == this->unknown_616C.end()) { - this->unknown_616C.push_back(id); + if (std::find(this->achievementIds.begin(), this->achievementIds.end(), id) == this->achievementIds.end()) { + this->achievementIds.push_back(id); } } // OFFSET: 0x00E07470 // FUNCTION: fn_23744 bool CSession::EquipItem3500(const ITEM_INFO& item) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1) { - ITEM_INFO& equipped = this->unknown_3500[slot]; + ITEM_INFO& equipped = this->alternateCostumeItems[slot]; equipped = item; equipped.quantity = 1; - equipped.unknown_0068 = item.unknown_0068; - equipped.unknown_0064 = item.unknown_0064; - equipped.unknown_0070 = item.unknown_0070; + equipped.expireTime = item.expireTime; + equipped.bindOnEquip = item.bindOnEquip; + equipped.sprite = item.sprite; } } @@ -390,23 +390,23 @@ bool CSession::EquipItem3500(const ITEM_INFO& item) { void CSession::AddStackedItem(ITEM_INFO item) { int index; for (index = 0; index < 5; ++index) { - if (this->unknown_5C68[index].quantity != 0 && this->unknown_5C68[index].unknown_0000[1] == item.unknown_0000[1]) { + if (this->selectionItems[index].quantity != 0 && this->selectionItems[index].identity[1] == item.identity[1]) { break; } } if (index < 5) { - this->unknown_5C68[index].quantity += item.quantity; + this->selectionItems[index].quantity += item.quantity; } else { for (index = 0; index < 5; ++index) { - if (this->unknown_5C68[index].quantity == 0) { - this->unknown_5C68[index] = item; + if (this->selectionItems[index].quantity == 0) { + this->selectionItems[index] = item; break; } } } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0458)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.rodexComposeWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -415,8 +415,8 @@ void CSession::AddStackedItem(ITEM_INFO item) { // FUNCTION: fn_23748 void CSession::AddItemToFreeSlot(ITEM_INFO item) { for (int index = 0; index < 5; ++index) { - if (this->unknown_5C68[index].quantity == 0) { - this->unknown_5C68[index] = item; + if (this->selectionItems[index].quantity == 0) { + this->selectionItems[index] = item; break; } } @@ -440,38 +440,38 @@ bool CSession::IsListedId(int id, int variant) const { // FUNCTION: fn_23754 void CSession::ClearItemQuantities() { for (int index = 0; index < 5; ++index) { - this->unknown_5C68[index].quantity = 0; + this->selectionItems[index].quantity = 0; } - this->unknown_6140 = 0; + this->achievementResult = 0; } // OFFSET: 0x00E082D0 // FUNCTION: fn_23755 void CSession::ResetItems3500() { for (int index = 0; index < 10; ++index) { - this->unknown_3500[index].Reset(); + this->alternateCostumeItems[index].Reset(); } } // OFFSET: 0x00E08300 // FUNCTION: fn_23756 void CSession::ClearSlots06EB() { - this->unknown_06EB.unknown_0000 = 0; - this->unknown_06EB.itemId = 0; - this->unknown_06EB.unknown_0005 = 0; - this->unknown_06F2.unknown_0000 = 0; - this->unknown_06F2.itemId = 0; - this->unknown_06F2.unknown_0005 = 0; + this->quickSlot.enabled = 0; + this->quickSlot.itemId = 0; + this->quickSlot.value = 0; + this->alternateQuickSlot.enabled = 0; + this->alternateQuickSlot.itemId = 0; + this->alternateQuickSlot.value = 0; } // OFFSET: 0x00E08330 // FUNCTION: fn_23757 void CSession::ClearShortcutSlots() { for (int index = 0; index < 36; ++index) { - this->m_shortcutSlots[index].unknown_0000 = 0; + this->m_shortcutSlots[index].enabled = 0; this->m_shortcutSlots[index].itemId = 0; - this->m_shortcutSlots[index].unknown_0005 = 0; + this->m_shortcutSlots[index].value = 0; } } @@ -485,21 +485,21 @@ void CSession::ClearSecondaryShortcutSlots() { // FUNCTION: fn_23759 void CSession::ClearUnknown0420() { for (int index = 0; index < 36; ++index) { - this->unknown_0420[index] = 0; + this->hotkeySkillLevels[index] = 0; } } // OFFSET: 0x00E083D0 // FUNCTION: fn_23760 void CSession::EraseUnknownKey(std::int64_t key) { - auto first = this->unknown_0784.find(key); - if (first != this->unknown_0784.end()) { - this->unknown_0784.erase(first); + auto first = this->summonHp.find(key); + if (first != this->summonHp.end()) { + this->summonHp.erase(first); } - auto second = this->unknown_078C.find(key); - if (second != this->unknown_078C.end()) { - this->unknown_078C.erase(second); + auto second = this->summonMaxHp.find(key); + if (second != this->summonMaxHp.end()) { + this->summonMaxHp.erase(second); } } @@ -551,8 +551,8 @@ void CSession::DeleteProhibitionLog(std::uint32_t aid, std::uint32_t minutes) { // OFFSET: 0x00E08690 // FUNCTION: fn_23764 std::int64_t CSession::FindUnknown0784(std::int64_t key) const { - auto found = this->unknown_0784.lower_bound(key); - if (found == this->unknown_0784.end() || key < found->first) { + auto found = this->summonHp.lower_bound(key); + if (found == this->summonHp.end() || key < found->first) { return -1; } @@ -562,8 +562,8 @@ std::int64_t CSession::FindUnknown0784(std::int64_t key) const { // OFFSET: 0x00E086F0 // FUNCTION: fn_23765 std::int64_t CSession::FindUnknown078C(std::int64_t key) const { - auto found = this->unknown_078C.lower_bound(key); - if (found == this->unknown_078C.end() || key < found->first) { + auto found = this->summonMaxHp.lower_bound(key); + if (found == this->summonMaxHp.end() || key < found->first) { return -1; } @@ -573,8 +573,8 @@ std::int64_t CSession::FindUnknown078C(std::int64_t key) const { // OFFSET: 0x00E08750 // FUNCTION: fn_23766 SessionRecord6144 CSession::FindRecord6144(int key) const { - auto found = this->unknown_6144.find(key); - if (found != this->unknown_6144.end()) { + auto found = this->achievements.find(key); + if (found != this->achievements.end()) { return found->second; } @@ -584,24 +584,24 @@ SessionRecord6144 CSession::FindRecord6144(int key) const { // OFFSET: 0x00E06FD0 // FUNCTION: fn_23738 void CSession::UpdateRecord6144(const AchievementRecordPacket& packet) { - auto found = this->unknown_6144.find(packet.id); - if (found != this->unknown_6144.end()) { + auto found = this->achievements.find(packet.id); + if (found != this->achievements.end()) { SessionRecord6144& record = found->second; - reinterpret_cast(&record.unknown_0000)[1] = packet.completed; - std::memcpy(record.unknown_0004, packet.objectives, sizeof(record.unknown_0004)); - record.unknown_002C = packet.completedAt; - record.unknown_0030 = packet.rewarded; + reinterpret_cast(&record.completionFlags)[1] = packet.completed; + std::memcpy(record.objectives, packet.objectives, sizeof(record.objectives)); + record.completedAt = packet.completedAt; + record.rewarded = packet.rewarded; this->SplitDate(packet.completedAt, reinterpret_cast(record.year), reinterpret_cast(record.month), reinterpret_cast(record.day)); return; } SessionRecord6144 record; - record.unknown_0000 = static_cast(1 | packet.completed << 8); - std::memcpy(record.unknown_0004, packet.objectives, sizeof(record.unknown_0004)); - record.unknown_002C = packet.completedAt; - record.unknown_0030 = packet.rewarded; + record.completionFlags = static_cast(1 | packet.completed << 8); + std::memcpy(record.objectives, packet.objectives, sizeof(record.objectives)); + record.completedAt = packet.completedAt; + record.rewarded = packet.rewarded; this->SplitDate(packet.completedAt, reinterpret_cast(record.year), reinterpret_cast(record.month), reinterpret_cast(record.day)); - this->unknown_6144.insert({packet.id, record}); + this->achievements.insert({packet.id, record}); } // OFFSET: 0x00E08A00 @@ -635,7 +635,7 @@ ITEM_INFO CSession::GetItem2B50(int index) const { } if (index >= 0 && index < 10) { - return this->unknown_2B50[index]; + return this->costumeItems[index]; } return ITEM_INFO(0); @@ -646,7 +646,7 @@ ITEM_INFO CSession::GetItem2B50(int index) const { int CSession::CountItems5C68() const { int count = 0; for (int index = 0; index < 5; ++index) { - if (this->unknown_5C68[index].quantity != 0) { + if (this->selectionItems[index].quantity != 0) { ++count; } } @@ -676,7 +676,7 @@ int CSession::GetDefaultOptionValue(const char* name, int fallback) const { // OFFSET: 0x00E094B0 // FUNCTION: fn_23777 int CSession::FindUnknown0778(int key) const { - for (const std::pair& entry : this->unknown_0778) { + for (const std::pair& entry : this->keyValues) { if (key == entry.first) { return entry.second; } @@ -751,7 +751,7 @@ __declspec(noinline) void CSession::NotifyMercSkillWindows() { // FUNCTION: fn_23753 void CSession::ResetItems2B50() { for (int index = 0; index < 10; ++index) { - this->unknown_2B50[index].Reset(); + this->costumeItems[index].Reset(); } RequestBasicInfoRefresh(); @@ -785,14 +785,14 @@ float GetSkillFactor(int job) { void CSession::ClearAdditionalShortcutSkills() { for (int slot = 0; slot < 36; ++slot) { const NormalItemSlot& value = this->m_shortcutSlots[slot]; - if (value.itemId != 0 && value.unknown_0000 != 0 && value.itemId >= 10000 && value.itemId < 10020) { + if (value.itemId != 0 && value.enabled != 0 && value.itemId >= 10000 && value.itemId < 10020) { this->AssignShortcut(1, 0, 0, slot, 0); } } for (int slot = 0; slot < 36; ++slot) { const NormalItemSlot& value = this->m_secondaryShortcutSlots[slot]; - if (value.itemId != 0 && value.unknown_0000 != 0 && value.itemId >= 10000 && value.itemId < 10020) { + if (value.itemId != 0 && value.enabled != 0 && value.itemId >= 10000 && value.itemId < 10020) { this->AssignShortcut(1, 0, 0, slot, 1); } } @@ -914,9 +914,9 @@ int CSession::ProcessEmotionShortcut(const char* text) { void CSession::RestoreItems5C68() { bool restored = false; for (int index = 0; index < 5; ++index) { - if (this->unknown_5C68[index].quantity != 0) { + if (this->selectionItems[index].quantity != 0) { restored = true; - g_session.AddItem1710(this->unknown_5C68[index], 0); + g_session.AddItem1710(this->selectionItems[index], 0); } } @@ -929,17 +929,17 @@ void CSession::RestoreItems5C68() { // FUNCTION: fn_23905 void CSession::ReturnStackedItem(int index, int count) { for (int slot = 0; slot < 5; ++slot) { - const int quantity = this->unknown_5C68[slot].quantity; - if (quantity != 0 && this->unknown_5C68[slot].unknown_0000[1] == index) { - this->unknown_5C68[slot].quantity = count; - g_session.AddItem1710(this->unknown_5C68[slot], 0); - this->unknown_5C68[slot].quantity = quantity - count; + const int quantity = this->selectionItems[slot].quantity; + if (quantity != 0 && this->selectionItems[slot].identity[1] == index) { + this->selectionItems[slot].quantity = count; + g_session.AddItem1710(this->selectionItems[slot], 0); + this->selectionItems[slot].quantity = quantity - count; RefreshItemWindows(&g_windowMgr); break; } } - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0458)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.rodexComposeWnd)) { window->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } @@ -958,18 +958,18 @@ public: // OFFSET: 0x00E07150 // FUNCTION: fn_23739 bool CSession::EquipItem2B50(const ITEM_INFO& item, const char* name) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); const int order[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int index = 0; index < 3; ++index) { const int slot = order[index]; if (slot != -1) { - ITEM_INFO& equipped = this->unknown_2B50[slot]; + ITEM_INFO& equipped = this->costumeItems[slot]; equipped = item; equipped.quantity = 1; - equipped.unknown_0068 = item.unknown_0068; - equipped.unknown_0064 = item.unknown_0064; - equipped.unknown_0070 = item.unknown_0070; + equipped.expireTime = item.expireTime; + equipped.bindOnEquip = item.bindOnEquip; + equipped.sprite = item.sprite; } } @@ -985,7 +985,7 @@ bool CSession::EquipItem2B50(const ITEM_INFO& item, const char* name) { // OFFSET: 0x00E09900 // FUNCTION: fn_23785 ITEM_INFO CSession::GetItem5C68(int index) const { - return this->unknown_5C68[index]; + return this->selectionItems[index]; } // OFFSET: 0x00E09970 @@ -1015,7 +1015,7 @@ ITEM_INFO CSession::GetItem3500(int index) const { } if (index >= 0 && index < 10) { - return this->unknown_3500[index]; + return this->alternateCostumeItems[index]; } return ITEM_INFO(0); @@ -1026,9 +1026,9 @@ ITEM_INFO CSession::GetItem3500(int index) const { void CSession::FindTopRecords6144(int* second, int* first) { int bestValue = -1; int secondValue; - for (auto it = this->unknown_6144.begin(); it != this->unknown_6144.end(); ++it) { - if (reinterpret_cast(&it->second.unknown_0000)[1]) { - const int value = it->second.unknown_002C; + for (auto it = this->achievements.begin(); it != this->achievements.end(); ++it) { + if (reinterpret_cast(&it->second.completionFlags)[1]) { + const int value = it->second.completedAt; if (bestValue < value) { secondValue = bestValue; bestValue = value; @@ -1092,6 +1092,6 @@ void CSession::ClearPairValues(unsigned char clearThird, unsigned char clearSeco // OFFSET: 0x00E19B90 // FUNCTION: fn_23846 void CSession::ResetUnknown1050() { - g_session.unknown_1050 = -1; - g_session.unknown_103C = -1; + g_session.petEggIndex = -1; + g_session.petJob = -1; } diff --git a/Source/Contents/Skills/ClientSkills.h b/Source/Contents/Skills/ClientSkills.h index 93e927128..425be4485 100644 --- a/Source/Contents/Skills/ClientSkills.h +++ b/Source/Contents/Skills/ClientSkills.h @@ -5,19 +5,19 @@ struct ActiveSkillEffect { /* 0000 */ std::uint32_t id; - /* 0004 */ std::uint32_t unknown_0004; - /* 0008 */ std::uint32_t unknown_0008; - /* 000C */ std::uint32_t unknown_000C; - /* 0010 */ std::uint32_t unknown_0010; - /* 0014 */ std::uint32_t unknown_0014; - /* 0018 */ std::uint32_t unknown_0018; + /* 0004 */ std::uint32_t expiration; + /* 0008 */ std::uint32_t value1; + /* 000C */ std::uint32_t value2; + /* 0010 */ std::uint32_t value3; + /* 0014 */ std::uint32_t totalDuration; + /* 0018 */ std::uint32_t remainingDuration; }; extern std::vector g_activeSkillEffects; static_assert(sizeof(ActiveSkillEffect) == 28); #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(ActiveSkillEffect, unknown_0018) == 0x18); +static_assert(offsetof(ActiveSkillEffect, remainingDuration) == 0x18); #endif float GetSkillFactor(int job); diff --git a/Source/Contents/Skills/PlayerSkillBundle.cpp b/Source/Contents/Skills/PlayerSkillBundle.cpp index 0c71cb18c..01ac2b750 100644 --- a/Source/Contents/Skills/PlayerSkillBundle.cpp +++ b/Source/Contents/Skills/PlayerSkillBundle.cpp @@ -128,9 +128,9 @@ bool CPlayerSkillBundle::UpdatePending(const CSkillInfo& value) { if (value.id == entry.id) { entry.level = value.level; entry.id = value.id; - entry.unknown_0014 = value.unknown_0014; - entry.unknown_0018 = value.unknown_0018; - entry.unknown_0034 = value.unknown_0034; + entry.spCost = value.spCost; + entry.upgradable = value.upgradable; + entry.apCost = value.apCost; return false; } @@ -211,7 +211,7 @@ void CPlayerSkillBundle::NumberExtra() { unsigned number = 0; for (auto entry = this->extra.begin(); entry != this->extra.end(); ++entry, ++number) { - entry->unknown_0024 = number; + entry->treePosition = number; } } @@ -267,7 +267,7 @@ int CPlayerSkillBundle::GroupedLevel(std::uint32_t id) { // FUNCTION: fn_08284 bool CPlayerSkillBundle::HasHigherLevel(std::uint32_t id) { const CSkillInfo* value = this->FindGrouped(id); - return value ? value->level > value->unknown_0030 : false; + return value ? value->level > value->learnedLevel : false; } // OFFSET: 0x00770F20 @@ -355,7 +355,7 @@ void CPlayerSkillBundle::ResetFirstLevelChange() { // FUNCTION: fn_08294 void CPlayerSkillBundle::SetUnknownValue(int id, int value) { if (static_cast(id) - 1u <= 0x1F3D) { - this->unknown_0064[id] = value; + this->skillValues[id] = value; } } diff --git a/Source/Contents/Skills/PlayerSkillBundle.h b/Source/Contents/Skills/PlayerSkillBundle.h index e6f820d9d..cf16dade2 100644 --- a/Source/Contents/Skills/PlayerSkillBundle.h +++ b/Source/Contents/Skills/PlayerSkillBundle.h @@ -62,7 +62,7 @@ public: /* 0048 */ std::map levelChanges; /* 0050 */ std::map changed; /* 0058 */ std::vector removals; - /* 0064 */ std::vector unknown_0064; + /* 0064 */ std::vector skillValues; /* 0070 */ std::list pending; private: diff --git a/Source/Contents/Skills/SkillActionAlitea.cpp b/Source/Contents/Skills/SkillActionAlitea.cpp index 70175e4af..cfc3658b5 100644 --- a/Source/Contents/Skills/SkillActionAlitea.cpp +++ b/Source/Contents/Skills/SkillActionAlitea.cpp @@ -1784,7 +1784,7 @@ void CEfstAction_INSANE::OnEfstBegin(int efstId, int value, int argument3, int a thread_local EncryptedName name(bytes); return name.Text(); }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); - static_cast(actor)->unknown_04F4 = static_cast(0xFFFFF200); + static_cast(actor)->outlineColor = static_cast(0xFFFFF200); } } @@ -1792,7 +1792,7 @@ void CEfstAction_INSANE::OnEfstBegin(int efstId, int value, int argument3, int a // FUNCTION: fn_03278 void CEfstAction_INSANE::OnEfstEnd(int efstId, int argument2, int argument3, int argument4, CRenderObject* actor) { if (actor) { - static_cast(actor)->unknown_04F4 = 0; + static_cast(actor)->outlineColor = 0; } } @@ -1822,7 +1822,7 @@ void CEfstAction_INSANE2::OnEfstBegin(int efstId, int value, int argument3, int thread_local EncryptedName name(bytes); return name.Text(); }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); - static_cast(actor)->unknown_04F4 = static_cast(0xFFFF7F27); + static_cast(actor)->outlineColor = static_cast(0xFFFF7F27); } } @@ -1844,7 +1844,7 @@ void CEfstAction_INSANE3::OnEfstBegin(int efstId, int value, int argument3, int thread_local EncryptedName name(bytes); return name.Text(); }()), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0); - static_cast(actor)->unknown_04F4 = static_cast(0xFFED1C24); + static_cast(actor)->outlineColor = static_cast(0xFFED1C24); } } diff --git a/Source/Contents/Skills/SkillActionDruid.cpp b/Source/Contents/Skills/SkillActionDruid.cpp index 028bdd662..3f89299ee 100644 --- a/Source/Contents/Skills/SkillActionDruid.cpp +++ b/Source/Contents/Skills/SkillActionDruid.cpp @@ -613,7 +613,7 @@ void CSkillAction_DR_LOW_FLIGHT::OnSkillEffect(int level, CGameActor* source, CG return; } - const float scale = source->unknown_0378 * source->render.speed * 16.0f; + const float scale = source->attackMotion * source->render.speed * 16.0f; const bool flag = direction != 1 && direction != 2; const std::string effectName( diff --git a/Source/Contents/Skills/SkillActionInfo.cpp b/Source/Contents/Skills/SkillActionInfo.cpp index 4e097bcd9..91cf946fb 100644 --- a/Source/Contents/Skills/SkillActionInfo.cpp +++ b/Source/Contents/Skills/SkillActionInfo.cpp @@ -35,13 +35,13 @@ std::string CSession::GetRobeName(unsigned int robe) { // OFFSET: 0x00E13BF0 // FUNCTION: fn_23828 int CSession::GetItemDescription40(int id) { - return FindItemDescription(id).unknown_0040; + return FindItemDescription(id).viewId; } // OFFSET: 0x00E13C10 // FUNCTION: fn_23829 std::uint32_t CSession::GetUnknown0420(int index) { - return this->unknown_0420[index]; + return this->hotkeySkillLevels[index]; } // OFFSET: 0x00E13C30 diff --git a/Source/Contents/Skills/SkillActionKarnos.cpp b/Source/Contents/Skills/SkillActionKarnos.cpp index 58ebb893a..aeaba2cd3 100644 --- a/Source/Contents/Skills/SkillActionKarnos.cpp +++ b/Source/Contents/Skills/SkillActionKarnos.cpp @@ -1099,7 +1099,7 @@ void CSkillAction_SKID_KR_CHOP_CHOP::OnSkillEffect(int level, CGameActor* source } if (CEffect* effect = g_effectMgr->Spawn(source->render.accountId, 2466, 0.0f, 0.0f, 0.0f, 0, -1, 0, 0)) { - effect->unknown_002C = 1; + effect->effectLifetime = 1; } const std::uint8_t effectSource[] = {0x92, 0xAB, 0x86, 0xCD, 0xF2, 0x6E, 0x1D, 0x12, 0x81, 0x9C, 0x9A, 0xC8, 0xCF, 0x0D}; diff --git a/Source/Contents/Skills/SkillActionSkyEmperor.cpp b/Source/Contents/Skills/SkillActionSkyEmperor.cpp index 61e34006b..4ec904d25 100644 --- a/Source/Contents/Skills/SkillActionSkyEmperor.cpp +++ b/Source/Contents/Skills/SkillActionSkyEmperor.cpp @@ -288,7 +288,7 @@ void CSkillAction_SKE_SKY_MOON::OnSkillEffect(int level, CGameActor* source, CGa return; } - const float scale = source->unknown_0378 * source->render.speed * 16.0f; + const float scale = source->attackMotion * source->render.speed * 16.0f; EffectLists* effects = g_effectMgr; if (CEffect* effect = effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("sky_moon"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0)) { effect->SetDelay(static_cast(scale)); diff --git a/Source/Contents/Skills/SkillActionSpiritHandler.cpp b/Source/Contents/Skills/SkillActionSpiritHandler.cpp index be73b8775..d31dc18dc 100644 --- a/Source/Contents/Skills/SkillActionSpiritHandler.cpp +++ b/Source/Contents/Skills/SkillActionSpiritHandler.cpp @@ -518,7 +518,7 @@ void CSkillAction_SH_CHUL_HO_BATTERING::OnSkillEffect(int level, CGameActor* sou return; } - const float scale = source->unknown_0378 * source->render.speed * 16.0f; + const float scale = source->attackMotion * source->render.speed * 16.0f; EffectLists* effects = g_effectMgr; if (CEffect* effect = effects->Spawn( target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("chul_ho_battering"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0 diff --git a/Source/Contents/Skills/SkillActionWindHawk.cpp b/Source/Contents/Skills/SkillActionWindHawk.cpp index ed6845458..252c704e4 100644 --- a/Source/Contents/Skills/SkillActionWindHawk.cpp +++ b/Source/Contents/Skills/SkillActionWindHawk.cpp @@ -172,7 +172,7 @@ void CSkillAction_WH_CRESCIVE_BOLT::OnSkillHit(int sourceActor, CGameActor* targ effect->SetAngle( ScreenAngle(&source->render.position.x, &target->render.position.x, static_cast(g_modeMgr.GetGameMode())->camera->frame.view.values) + 180.0f ); - effect->SetDelay(static_cast(source->unknown_0378 * source->render.speed * 16.0f)); + effect->SetDelay(static_cast(source->attackMotion * source->render.speed * 16.0f)); } } } diff --git a/Source/Contents/Skills/SkillInfo.cpp b/Source/Contents/Skills/SkillInfo.cpp index 2da4beea5..9a7326477 100644 --- a/Source/Contents/Skills/SkillInfo.cpp +++ b/Source/Contents/Skills/SkillInfo.cpp @@ -368,20 +368,20 @@ __forceinline CSkillActionMgr* CSkillActionMgr::GetInstance() { // OFFSET: 0x00773480 // FUNCTION: fn_08311 -CSkillInfo::CSkillInfo() : available(1), id(0), level(0), name(nullptr), unknown_0028(0), unknown_0030(0), unknown_0034(0) { +CSkillInfo::CSkillInfo() : available(1), id(0), level(0), name(nullptr), maxLevel(0), learnedLevel(0), apCost(0) { } // OFFSET: 0x00773400 // FUNCTION: fn_08310 -CSkillInfo::CSkillInfo(int) : available(0), id(0), level(0), name("Unknown-Skill"), unknown_0028(0), unknown_0030(0), unknown_0034(0) { +CSkillInfo::CSkillInfo(int) : available(0), id(0), level(0), name("Unknown-Skill"), maxLevel(0), learnedLevel(0), apCost(0) { } // OFFSET: 0x0076FD70 // FUNCTION: fn_08254 CSkillInfo::CSkillInfo(const CSkillInfo& other) - : available(other.available), id(other.id), unknown_000C(other.unknown_000C), level(other.level), unknown_0014(other.unknown_0014), - unknown_0018(other.unknown_0018), unknown_001C(other.unknown_001C), name(other.name), unknown_0024(other.unknown_0024), - unknown_0028(other.unknown_0028), unknown_002C(other.unknown_002C), unknown_0030(other.unknown_0030), unknown_0034(other.unknown_0034), + : available(other.available), id(other.id), type(other.type), level(other.level), spCost(other.spCost), + upgradable(other.upgradable), range(other.range), name(other.name), treePosition(other.treePosition), + maxLevel(other.maxLevel), canPlanLevel(other.canPlanLevel), learnedLevel(other.learnedLevel), apCost(other.apCost), entries(other.entries) { } @@ -390,17 +390,17 @@ CSkillInfo::CSkillInfo(const CSkillInfo& other) CSkillInfo& CSkillInfo::operator=(const CSkillInfo& other) { this->available = other.available; this->id = other.id; - this->unknown_000C = other.unknown_000C; + this->type = other.type; this->level = other.level; - this->unknown_0014 = other.unknown_0014; - this->unknown_0018 = other.unknown_0018; - this->unknown_001C = other.unknown_001C; + this->spCost = other.spCost; + this->upgradable = other.upgradable; + this->range = other.range; this->name = other.name; - this->unknown_0024 = other.unknown_0024; - this->unknown_0028 = other.unknown_0028; - this->unknown_002C = other.unknown_002C; - this->unknown_0030 = other.unknown_0030; - this->unknown_0034 = other.unknown_0034; + this->treePosition = other.treePosition; + this->maxLevel = other.maxLevel; + this->canPlanLevel = other.canPlanLevel; + this->learnedLevel = other.learnedLevel; + this->apCost = other.apCost; this->entries = other.entries; @@ -424,7 +424,7 @@ bool CSkillInfo::MatchesShortcut(const NormalItemSlot* slot) const { return false; } - const auto requested = slot->unknown_0005; + const auto requested = slot->value; return requested != 0 && (this->id != slot->itemId || this->level >= requested); } @@ -785,7 +785,7 @@ void CEfstAction_ChangeSize::OnEfstBegin(int, int value, int, int, CRenderObject } } - *reinterpret_cast(&effect->unknown_0048) = static_cast(value) * 0.01f; + *reinterpret_cast(&effect->scaleParameter) = static_cast(value) * 0.01f; } // OFFSET: 0x007760D0 @@ -1524,7 +1524,7 @@ void CSkillAction_IQ_BLAZING_FLAME_BLAST::OnSkillEffect(int level, CGameActor* s return; } - const float scale = source->unknown_0378 * source->render.speed * 16.0f; + const float scale = source->attackMotion * source->render.speed * 16.0f; EffectLists* effects = g_effectMgr; if (CEffect* effect = effects->Spawn(target->render.accountId, CEZ2STREffectMgr::GetInstance()->EffectId("blazing_flame_blast"), 0.0f, 0.0f, 0.0f, 0, -1, 0, 0)) { effect->SetDelay(static_cast(scale)); @@ -2170,7 +2170,7 @@ void CSkillAction_DK_DRAGONIC_PIERCE::OnSkillEffect(int level, CGameActor* sourc return; } - const float scale = source->unknown_0378 * source->render.speed * 16.0f; + const float scale = source->attackMotion * source->render.speed * 16.0f; const bool flip = direction != 1 && direction != 2; const bool horizontal = (direction & 1) != 0; std::string name = horizontal ? "dragonic_pierce_horizon" : "dragonic_pierce_vertical"; diff --git a/Source/Contents/Skills/SkillInfo.h b/Source/Contents/Skills/SkillInfo.h index 9fb0eae50..2e601f584 100644 --- a/Source/Contents/Skills/SkillInfo.h +++ b/Source/Contents/Skills/SkillInfo.h @@ -96,13 +96,13 @@ public: struct SkillInfoEntry { // INLINED SkillInfoEntry& operator=(const SkillInfoEntry& other) { - this->unknown_0000 = other.unknown_0000; - this->unknown_0004 = other.unknown_0004; + this->skillId = other.skillId; + this->requiredLevel = other.requiredLevel; return *this; } - /* 0000 */ std::uint32_t unknown_0000; - /* 0004 */ std::uint32_t unknown_0004; + /* 0000 */ std::uint32_t skillId; + /* 0004 */ std::uint32_t requiredLevel; }; class CSkillInfo { @@ -124,17 +124,17 @@ public: /* 0004 */ std::int32_t available; /* 0008 */ std::uint32_t id; - /* 000C */ std::uint32_t unknown_000C; + /* 000C */ std::uint32_t type; /* 0010 */ std::int32_t level; - /* 0014 */ std::uint32_t unknown_0014; - /* 0018 */ std::uint32_t unknown_0018; - /* 001C */ std::uint32_t unknown_001C; + /* 0014 */ std::uint32_t spCost; + /* 0018 */ std::uint32_t upgradable; + /* 001C */ std::uint32_t range; /* 0020 */ const char* name; - /* 0024 */ std::uint32_t unknown_0024; - /* 0028 */ std::uint32_t unknown_0028; - /* 002C */ std::uint32_t unknown_002C; - /* 0030 */ std::int16_t unknown_0030; - /* 0034 */ std::uint32_t unknown_0034; + /* 0024 */ std::uint32_t treePosition; + /* 0028 */ std::uint32_t maxLevel; + /* 002C */ std::uint32_t canPlanLevel; + /* 0030 */ std::int16_t learnedLevel; + /* 0034 */ std::uint32_t apCost; /* 0038 */ std::vector entries; }; @@ -191,7 +191,7 @@ bool ShowsCastEffect(int skillId); vector3d CellWorldPosition(int column, int row); static_assert(sizeof(SkillInfoEntry) == 8); #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(SkillInfoEntry, unknown_0004) == 0x4); +static_assert(offsetof(SkillInfoEntry, requiredLevel) == 0x4); static_assert(sizeof(CSkillInfo) == 68); static_assert(offsetof(CSkillActionMgr, m_efstActions) == 0x0C); static_assert(offsetof(CSkillActionMgr, m_skillObjectActions) == 0x14); diff --git a/Source/Contents/Skills/SkillLevelRegistry.cpp b/Source/Contents/Skills/SkillLevelRegistry.cpp index 1dd53f13c..e21ba8025 100644 --- a/Source/Contents/Skills/SkillLevelRegistry.cpp +++ b/Source/Contents/Skills/SkillLevelRegistry.cpp @@ -32,7 +32,7 @@ void LoadSkillUseLevelRegistry() { DWORD size = sizeof(int); int value; char name[100] = {}; - const int character = g_session.unknown_0F50; + const int character = g_session.selectedCharacterSlot; const char* skill = CSkillInfo::IdName(*g_session.m_hotkeyScript, id); std::sprintf(name, "%s%d", skill, character); diff --git a/Source/Contents/Skills/SkillTreeScript.cpp b/Source/Contents/Skills/SkillTreeScript.cpp index ab51c8b92..f738cd2a4 100644 --- a/Source/Contents/Skills/SkillTreeScript.cpp +++ b/Source/Contents/Skills/SkillTreeScript.cpp @@ -22,16 +22,16 @@ int AddSkill(lua_State* state) { if (std::strcmp(name, "") != 0 && position != -1 && value != -1) { skill.level = 0; - skill.unknown_0014 = 0; - skill.unknown_001C = 0; - skill.unknown_0018 = 0; + skill.spCost = 0; + skill.range = 0; + skill.upgradable = 0; skill.available = 1; skill.name = name; - skill.unknown_0024 = position; - skill.unknown_0028 = value; + skill.treePosition = position; + skill.maxLevel = value; skill.id = static_cast(static_cast(id)); - skill.unknown_0034 = 0; - skill.unknown_002C = static_cast(last); + skill.apCost = 0; + skill.canPlanLevel = static_cast(last); g_session.m_skillBundle.AddGrouped(static_cast(group), skill); } diff --git a/Source/Contents/Sound/SoundMaker.cpp b/Source/Contents/Sound/SoundMaker.cpp index 51714c95a..c5776215b 100644 --- a/Source/Contents/Sound/SoundMaker.cpp +++ b/Source/Contents/Sound/SoundMaker.cpp @@ -50,7 +50,7 @@ CCorpse::CCorpse() { this->render.visible = 1; this->render.isLieOnGround = true; this->spriteOffset = 0.0f; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); } // OFFSET: 0x00DA0DE0 @@ -70,86 +70,86 @@ CGndRiser::CGndRiser() { // FUNCTION: fn_22356 CHalluNPC::CHalluNPC(CGameActor* source) { this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 0; - this->render.unknown_008C = timeGetTime(); - this->SetUnknown0260(source->unknown_0260); + this->render.visibilityOptions[0] = 0; + this->render.motionStartTime = timeGetTime(); + this->SetUnknown0260(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); - this->unknown_02CC = source->unknown_02CC; + this->isRiding = source->isRiding; this->SetUnknown03C4(source->GetMonsterTransformJob()); this->render.position = source->render.position; - this->render.unknown_005C = source->render.unknown_005C; - this->render.unknown_0078 = source->render.unknown_0078; + this->render.distanceScale = source->render.distanceScale; + this->render.spriteOffsetX = source->render.spriteOffsetX; this->render.scale = source->render.scale; this->render.animation = source->render.animation; this->render.previousAnimation = source->render.previousAnimation; this->render.curMotion = source->render.curMotion; this->SetActionName(ResourceMgr::Instance(), source->GetActName()); - this->render.unknown_00A2 = source->render.unknown_00A2; - this->render.unknown_0080 = source->render.unknown_0080; + this->render.flatDepth = source->render.flatDepth; + this->render.depthLayer = source->render.depthLayer; this->render.isLieOnGround = source->render.isLieOnGround; this->render.isSingleColor = source->render.isSingleColor; - this->render.unknown_007C = source->render.unknown_007C; - this->render.unknown_0048 = 0; + this->render.spriteAngle = source->render.spriteAngle; + this->render.bodyPalette = 0; this->stateFlags = source->GetStateFlags(); - this->SetSprAct(source->GetEffectiveJob(-1), source->unknown_0260, 0); + this->SetSprAct(source->GetEffectiveJob(-1), source->sex, 0); this->guildId = source->GetGdid(); this->render.accountId = 0; - this->unknown_0440 = 0.0f; - this->unknown_0454 = 0; - this->unknown_0444 = 0x10000000; - this->unknown_03E1 = true; + this->hallucinationOffset = 0.0f; + this->processCount = 0; + this->fadeStep = 0x10000000; + this->modelReady = true; } // OFFSET: 0x00DA1AF0 // FUNCTION: fn_22359 CHalluPlant::CHalluPlant() { this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 0; - this->render.unknown_008C = timeGetTime(); + this->render.visibilityOptions[0] = 0; + this->render.motionStartTime = timeGetTime(); this->SetUnknown0260(0); this->SetActorJob(1079); - this->unknown_02CC = 0; + this->isRiding = 0; this->SetUnknown03C4(-1); this->render.position.x = 0.0f; this->render.position.y = 0.0f; this->render.position.z = 0.0f; - this->render.unknown_005C = 1.0f; - this->render.unknown_0078 = 0; + this->render.distanceScale = 1.0f; + this->render.spriteOffsetX = 0; this->render.scale = 1.0f; this->render.animation = 0; this->render.previousAnimation = 4; this->render.curMotion = 0; this->SetActionName("sprite\\몬스터\\blue_plant.act"); - this->render.unknown_00A2 = 0; - this->render.unknown_0080 = 0; + this->render.flatDepth = 0; + this->render.depthLayer = 0; this->render.isLieOnGround = false; this->render.isSingleColor = false; - this->render.unknown_007C = 0; - this->render.unknown_0048 = 0; + this->render.spriteAngle = 0; + this->render.bodyPalette = 0; this->stateFlags = 0; - this->SetSprAct(this->GetEffectiveJob(-1), this->unknown_0260, 0); + this->SetSprAct(this->GetEffectiveJob(-1), this->sex, 0); this->guildId = 0; this->render.accountId = 0; - this->unknown_0440 = 0; - this->unknown_03E1 = true; + this->processCount = 0; + this->modelReady = true; } // OFFSET: 0x00DA1CB0 // FUNCTION: fn_22360 CMasterChaser::CMasterChaser() { - this->unknown_0138 = 0; + this->chaseState = 0; } // OFFSET: 0x00DA1D10 // FUNCTION: fn_22361 CNpc::CNpc() { - this->unknown_042C = nullptr; - this->unknown_0430 = nullptr; - this->unknown_0420 = 0; - this->unknown_0424 = timeGetTime(); - this->unknown_0428 = 0; - this->unknown_0434 = nullptr; - this->unknown_0438 = 9999; + this->playerGaugeWindow = nullptr; + this->pcGaugeWindow = nullptr; + this->npcState = 0; + this->effectTick = timeGetTime(); + this->appearanceInitialized = 0; + this->attachedEffect = nullptr; + this->attachedEffectId = 9999; } // OFFSET: 0x00DA1DB0 @@ -158,7 +158,7 @@ CNumEffect::CNumEffect() { this->SetSpriteName("이팩트\\숫자.spr"); this->SetActionName("이팩트\\숫자.act"); this->render.animation = 0; - this->render.unknown_00A2 = 1; + this->render.flatDepth = 1; } // OFFSET: 0x00DA1E30 @@ -176,14 +176,14 @@ CSoundMaker::CSoundMaker() { // OFFSET: 0x00DA2220 // FUNCTION: fn_22364 CNpc::~CNpc() { - if (this->unknown_042C) { - g_windowMgr.Schedule(this->unknown_042C); - this->unknown_042C = nullptr; + if (this->playerGaugeWindow) { + g_windowMgr.Schedule(this->playerGaugeWindow); + this->playerGaugeWindow = nullptr; } - if (this->unknown_0430) { - g_windowMgr.Schedule(this->unknown_0430); - this->unknown_0430 = nullptr; + if (this->pcGaugeWindow) { + g_windowMgr.Schedule(this->pcGaugeWindow); + this->pcGaugeWindow = nullptr; } } @@ -210,13 +210,13 @@ CNumEffect::~CNumEffect() = default; // OFFSET: 0x00DA3340 // FUNCTION: fn_22403 bool CHalluPlant::OnProcess() { - return ++this->unknown_0440 <= 60; + return ++this->processCount <= 60; } // OFFSET: 0x00DA3980 // FUNCTION: fn_22405 bool CNumEffect::OnProcess() { - const float elapsed = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + const float elapsed = static_cast((timeGetTime() - this->render.motionStartTime) / 24.0); this->render.previousAnimation = this->render.animation; this->render.position.y = this->baseHeight - elapsed * 0.18f; this->SetColor(static_cast(255.0f - (elapsed + elapsed)), -1, -1, -1); @@ -290,14 +290,14 @@ bool CSoundMaker::OnProcess() { // OFFSET: 0x00DA2AF0 // FUNCTION: fn_22378 int CPc::GetBodyCostume() { - return this->unknown_04D0; + return this->bodyStyle; } // OFFSET: 0x00DA2B00 // FUNCTION: fn_22379 float* CPc::GetExtent(float* extent) const { - extent[0] = this->unknown_04EC - this->unknown_04E4; - extent[1] = this->unknown_04F0 - this->unknown_04E8; + extent[0] = this->extentRight - this->extentLeft; + extent[1] = this->extentBottom - this->extentTop; return extent; } @@ -313,8 +313,8 @@ bool CBlurPC::OnProcess() { } } - if (this->render.color >= static_cast(this->unknown_04FC)) { - this->render.color -= this->unknown_04FC; + if (this->render.color >= static_cast(this->destCellZ)) { + this->render.color -= this->destCellZ; return true; } @@ -333,9 +333,9 @@ bool CHalluPC2::OnProcess() { } } - ++this->unknown_050C; - if (this->render.color >= static_cast(this->unknown_04FC)) { - this->render.color -= this->unknown_04FC; + ++this->preMoveOn; + if (this->render.color >= static_cast(this->destCellZ)) { + this->render.color -= this->destCellZ; return true; } @@ -360,19 +360,19 @@ void CHalluPlant::Render(int argument) { // OFFSET: 0x00DA2B40 // FUNCTION: fn_22380 bool CPc::IsArrowEffectSuppressed() { - return this->unknown_04E0; + return this->arrowEffectSuppressed; } // OFFSET: 0x00DA2B50 // FUNCTION: fn_22381 int CPc::GetMadogearType() { - return this->unknown_04DC; + return this->madogearType; } // OFFSET: 0x00DA2B60 // FUNCTION: fn_22382 int CPc::GetPkState() { - return this->unknown_04CC; + return this->pkState; } // OFFSET: 0x00DA2B70 @@ -439,7 +439,7 @@ void Nullsub502() { // OFFSET: 0x00DA2E00 // FUNCTION: fn_22395 void CMasterChaser::ClearUnknown0138() { - this->unknown_0138 = 0; + this->chaseState = 0; } // OFFSET: 0x00DA3F50 @@ -479,13 +479,13 @@ void CNpc::UnRegisterPos() { // OFFSET: 0x00DA5800 // FUNCTION: fn_22429 void CPc::SetArrowEffectSuppressed(bool value) { - this->unknown_04E0 = value; + this->arrowEffectSuppressed = value; } // OFFSET: 0x00DA5810 // FUNCTION: fn_22430 void CPc::SetMadogearType(int value) { - this->unknown_04DC = value; + this->madogearType = value; } // OFFSET: 0x00DA4150 @@ -496,7 +496,7 @@ void CGndRiser::Render(int) { // OFFSET: 0x00DA30B0 // FUNCTION: fn_22399 bool CGndRiser::OnProcess() { - const float frame = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast((timeGetTime() - this->render.motionStartTime) / 24.0); if (frame > static_cast(this->lifetime)) { return false; } @@ -540,7 +540,7 @@ void CBlowEffect::SendMsg( this->render.position.z = position[2]; this->render.visible = 1; this->render.color = (d | e) ? 0xFFFF0000u : 0xFFFFFFFFu; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); } // OFFSET: 0x00DA4A00 @@ -552,14 +552,14 @@ void CBlurPC::SendMsg( switch (message) { case BM_RGB: this->SetColor(180, b, d, f); - this->unknown_04FC = 0x8000000; + this->destCellZ = 0x8000000; return; case BM_ALPHA: this->render.color &= (b << 24) + 0xFFFFFF; - this->unknown_04FC = d << 24; + this->destCellZ = d << 24; return; case BM_MOTIONY: - this->unknown_04F8 = *reinterpret_cast(&b); + this->destCellX = *reinterpret_cast(&b); return; case BM_MOTION_FREEZE: this->render.isMotionFreezed = 1; @@ -589,7 +589,7 @@ void CGndRiser::SendMsg( this->render.position.y = position[1]; this->render.position.z = position[2]; this->render.visible = 0; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); this->lifetime = 30; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -613,14 +613,14 @@ void CHalluNPC::SendMsg( switch (message) { case BM_RGB: this->SetColor(180, b, d, f); - this->unknown_0444 = 0x8000000; + this->fadeStep = 0x8000000; return; case BM_ALPHA: this->render.color &= (b << 24) + 0xFFFFFF; - this->unknown_0444 = d << 24; + this->fadeStep = d << 24; return; case BM_MOTIONY: - this->unknown_0440 = *reinterpret_cast(&b); + this->hallucinationOffset = *reinterpret_cast(&b); return; case BM_MOTION_FREEZE: this->render.isMotionFreezed = 1; @@ -640,14 +640,14 @@ void CHalluPC2::SendMsg( switch (message) { case BM_RGB: this->SetColor(180, 255, 55, 55); - this->unknown_04FC = 0x8000000; + this->destCellZ = 0x8000000; return; case BM_ALPHA: this->render.color &= (b << 24) + 0xFFFFFF; - this->unknown_04FC = d << 24; + this->destCellZ = d << 24; return; case BM_MOTIONY: - this->unknown_04F8 = *reinterpret_cast(&b); + this->destCellX = *reinterpret_cast(&b); return; case BM_MOTION_FREEZE: this->render.isMotionFreezed = 1; @@ -667,14 +667,14 @@ void CHalluPC::SendMsg( switch (message) { case BM_RGB: this->SetColor(180, b, d, f); - this->unknown_04FC = 0x8000000; + this->destCellZ = 0x8000000; return; case BM_ALPHA: this->render.color &= (b << 24) + 0xFFFFFF; - this->unknown_04FC = d << 24; + this->destCellZ = d << 24; return; case BM_MOTIONY: - this->unknown_04F8 = *reinterpret_cast(&b); + this->destCellX = *reinterpret_cast(&b); return; case BM_MOTION_FREEZE: this->render.isMotionFreezed = 1; @@ -715,7 +715,7 @@ struct NpcAppearInfo { /* 0060 */ int guildId; /* 0064 */ int guildVersion; /* 0068 */ int unknown_0068[3]; - /* 0074 */ int unknown_0074; + /* 0074 */ int ownerId; }; // OFFSET: 0x00DA4EF0 @@ -726,13 +726,13 @@ void CNpc::SendMsg( if (message == 4 && a == 0) { CGameActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); const NpcAppearInfo* info = reinterpret_cast(b); - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 9: case 10: case 13: case 14: - this->unknown_02EC = info->unknown_0074; + this->emblemVersion = info->ownerId; break; } this->render.visible = IsVisibleJob(info->job); @@ -742,105 +742,105 @@ void CNpc::SendMsg( if (message == AM_UPDATEGAGE && a == 0) { if (g_session.IsCompanionAid(this->render.accountId)) { - if (this->unknown_042C == nullptr) { - this->unknown_042C = new UIPlayerGage(); - switch (this->unknown_0314) { + if (this->playerGaugeWindow == nullptr) { + this->playerGaugeWindow = new UIPlayerGage(); + switch (this->objectType) { case 8: { - static_cast(this->unknown_042C)->SetFirstValues( + static_cast(this->playerGaugeWindow)->SetFirstValues( [] { return static_cast(g_session.m_homunHp); }, - [] { return static_cast(*reinterpret_cast(g_session.unknown_55C8)); } + [] { return static_cast(*reinterpret_cast(g_session.homunMaxHp)); } ); - static_cast(this->unknown_042C)->SetSecondValues( + static_cast(this->playerGaugeWindow)->SetSecondValues( [] { return static_cast(g_session.m_homunSp); }, - [] { return static_cast(g_session.unknown_55D0); } + [] { return static_cast(g_session.homunMaxSp); } ); - static_cast(this->unknown_042C)->SetThirdValues( - [] { return static_cast(g_session.unknown_55F0); }, - [] { return static_cast(g_session.unknown_55F4); } + static_cast(this->playerGaugeWindow)->SetThirdValues( + [] { return static_cast(g_session.homunHunger); }, + [] { return static_cast(g_session.homunMaxHunger); } ); - this->unknown_042C->SetSize(60, 13); - static_cast(this->unknown_042C)->unknown_009C = 8; + this->playerGaugeWindow->SetSize(60, 13); + static_cast(this->playerGaugeWindow)->actorKind = 8; break; } case 7: { - static_cast(this->unknown_042C)->SetThirdValues( - [] { return static_cast(g_session.unknown_1044); }, - [] { return static_cast(*reinterpret_cast(g_session.unknown_1048)); } + static_cast(this->playerGaugeWindow)->SetThirdValues( + [] { return static_cast(g_session.petHunger); }, + [] { return static_cast(*reinterpret_cast(g_session.petMaxHunger)); } ); - this->unknown_042C->SetSize(60, 5); - static_cast(this->unknown_042C)->unknown_009C = 7; + this->playerGaugeWindow->SetSize(60, 5); + static_cast(this->playerGaugeWindow)->actorKind = 7; break; } case 9: { - static_cast(this->unknown_042C)->SetFirstValues( + static_cast(this->playerGaugeWindow)->SetFirstValues( [] { return static_cast(g_session.m_mercenaryHp); }, [] { return static_cast(g_session.m_mercenaryMaxHp); } ); - static_cast(this->unknown_042C)->SetSecondValues( + static_cast(this->playerGaugeWindow)->SetSecondValues( [] { return static_cast(g_session.m_mercenarySp); }, [] { return static_cast(g_session.m_mercenaryMaxSp); } ); - this->unknown_042C->SetSize(60, 9); + this->playerGaugeWindow->SetSize(60, 9); break; } case 10: { - static_cast(this->unknown_042C)->SetFirstValues( - [] { return static_cast(g_session.unknown_5BC4); }, - [] { return static_cast(g_session.unknown_5BCC); } + static_cast(this->playerGaugeWindow)->SetFirstValues( + [] { return static_cast(g_session.elementalHp); }, + [] { return static_cast(g_session.elementalMaxHp); } ); - static_cast(this->unknown_042C)->SetSecondValues( - [] { return static_cast(g_session.unknown_5BC8); }, - [] { return static_cast(g_session.unknown_5BD0); } + static_cast(this->playerGaugeWindow)->SetSecondValues( + [] { return static_cast(g_session.elementalSp); }, + [] { return static_cast(g_session.elementalMaxSp); } ); - this->unknown_042C->SetSize(60, 9); + this->playerGaugeWindow->SetSize(60, 9); break; } case 13: { - static_cast(this->unknown_042C)->SetFirstValues( + static_cast(this->playerGaugeWindow)->SetFirstValues( [this] { return g_session.FindUnknown0784(this->render.accountId); }, [this] { return g_session.FindUnknown078C(this->render.accountId); } ); - this->unknown_042C->SetSize(60, 5); - static_cast(this->unknown_042C)->unknown_009C = 13; + this->playerGaugeWindow->SetSize(60, 5); + static_cast(this->playerGaugeWindow)->actorKind = 13; break; } case 14: { - static_cast(this->unknown_042C)->SetFirstValues( + static_cast(this->playerGaugeWindow)->SetFirstValues( [this] { return g_session.FindUnknown0784(this->render.accountId); }, [this] { return g_session.FindUnknown078C(this->render.accountId); } ); - this->unknown_042C->SetSize(60, 5); - static_cast(this->unknown_042C)->unknown_009C = 14; + this->playerGaugeWindow->SetSize(60, 5); + static_cast(this->playerGaugeWindow)->actorKind = 14; break; } } - g_windowMgr.AddRenderedFront(this->unknown_042C); - if (this->unknown_042C == nullptr) { + g_windowMgr.AddRenderedFront(this->playerGaugeWindow); + if (this->playerGaugeWindow == nullptr) { return; } } - this->unknown_042C->Move( + this->playerGaugeWindow->Move( this->render.screenX - 30, this->render.screenY + g_renderer->viewport.height * 12 / 480 ); return; } - if (this->unknown_0314 == 13 || this->unknown_0314 == 14) { + if (this->objectType == 13 || this->objectType == 14) { return; } - if (this->unknown_0430 == nullptr) { - this->unknown_0430 = new UIPcGage(); - this->unknown_0430->SetSize(60, 5); - g_windowMgr.AddRenderedFront(this->unknown_0430); - if (this->unknown_0430 == nullptr) { + if (this->pcGaugeWindow == nullptr) { + this->pcGaugeWindow = new UIPcGage(); + this->pcGaugeWindow->SetSize(60, 5); + g_windowMgr.AddRenderedFront(this->pcGaugeWindow); + if (this->pcGaugeWindow == nullptr) { return; } } - static_cast(this->unknown_0430)->SetValues(b, d); - static_cast(this->unknown_0430)->SetLimits(0, 0); + static_cast(this->pcGaugeWindow)->SetValues(b, d); + static_cast(this->pcGaugeWindow)->SetLimits(0, 0); const int y = this->render.screenY + ScaleByScreenHeight(12); - this->unknown_0430->Move(this->render.screenX - 30, y); + this->pcGaugeWindow->Move(this->render.screenX - 30, y); return; } CGameActor::SendMsg(sender, message, a, b, c, d, e, f, g, h, i, 0, 0, 0, 0); @@ -865,10 +865,10 @@ void CNumEffect::SendMsg( this->render.curMotion = 0; } - this->render.unknown_0078 = f; + this->render.spriteOffsetX = f; this->render.scale = 5.0f; this->baseScale = 5.0f; - this->render.unknown_008C = timeGetTime(); + this->render.motionStartTime = timeGetTime(); return; } @@ -909,9 +909,9 @@ void CNpc::SetSprAct(int job, int value, int) { char name[64]; this->SetActorJob(job); this->SetUnknown0260(value); - this->render.unknown_0048 = 0; + this->render.bodyPalette = 0; if (g_session.IsGuildMemberCharacter(this->GetEffectiveJob(-1), name)) { - this->render.unknown_0048 = 1; + this->render.bodyPalette = 1; this->render.name = name; } } @@ -924,10 +924,10 @@ void CNpc::SetSprJob(int job) { const char* spriteFormat; const char* actionFormat; - this->render.unknown_010C = 0; - this->render.unknown_0054 = g_session.GetNpcLocationRadius(job, false); + this->render.spriteJob = 0; + this->render.shadowScale = g_session.GetNpcLocationRadius(job, false); if (g_session.IsNpcJob(job) == true) { - this->render.unknown_010C = job; + this->render.spriteJob = job; actionFormat = "NPC\\%s.act"; spriteFormat = "NPC\\%s.spr"; } else if (job >= 6017 && job <= 6046) { @@ -937,7 +937,7 @@ void CNpc::SetSprJob(int job) { actionFormat = "homun\\%s.act"; spriteFormat = "homun\\%s.spr"; } else { - this->render.unknown_010C = job; + this->render.spriteJob = job; actionFormat = "몬스터\\%s.act"; spriteFormat = "몬스터\\%s.spr"; } @@ -951,13 +951,13 @@ void CNpc::SetSprJob(int job) { // OFFSET: 0x00DA31B0 // FUNCTION: fn_22400 bool CHalluNPC::OnProcess() { - ++this->unknown_0454; - if (this->render.color >= static_cast(this->unknown_0444)) { - if (this->unknown_0454 == 110) { + ++this->processCount; + if (this->render.color >= static_cast(this->fadeStep)) { + if (this->processCount == 110) { static_cast(static_cast(this))->LaunchEffect(793, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (static_cast(this->unknown_0454) > 105 && (this->unknown_0454 & 3) == 0) { - this->render.color -= this->unknown_0444; + if (static_cast(this->processCount) > 105 && (this->processCount & 3) == 0) { + this->render.color -= this->fadeStep; } return true; } @@ -968,13 +968,13 @@ bool CHalluNPC::OnProcess() { // OFFSET: 0x00DA32B0 // FUNCTION: fn_22402 bool CHalluPC::OnProcess() { - ++this->unknown_050C; - if (this->render.color >= static_cast(this->unknown_04FC)) { - if (this->unknown_050C == 110) { + ++this->preMoveOn; + if (this->render.color >= static_cast(this->destCellZ)) { + if (this->preMoveOn == 110) { static_cast(static_cast(this))->LaunchEffect(793, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } - if (static_cast(this->unknown_050C) > 105 && (this->unknown_050C & 3) == 0) { - this->render.color -= this->unknown_04FC; + if (static_cast(this->preMoveOn) > 105 && (this->preMoveOn & 3) == 0) { + this->render.color -= this->destCellZ; } return true; } @@ -985,7 +985,7 @@ bool CHalluPC::OnProcess() { // OFFSET: 0x00DA3010 // FUNCTION: fn_22398 bool CCorpse::OnProcess() { - const float elapsed = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + const float elapsed = static_cast((timeGetTime() - this->render.motionStartTime) / 24.0); this->render.previousAnimation = this->Get8Dir(this->render.angle) + this->render.animation; this->render.curMotion = this->GetActRes()->FrameCount(this->render.previousAnimation) - 1; this->SetColor(static_cast(255.0f - elapsed), -1, -1, -1); @@ -1027,7 +1027,7 @@ void CHalluNPC::Render(int argument) { return; } - if (this->render.unknown_0070 != 6 && this->render.unknown_0070 != 3) { + if (this->render.state != 6 && this->render.state != 3) { this->DrawShadow(argument, this->render.scale); } if (this->render.enabled) { @@ -1053,7 +1053,7 @@ void CNpc::Render(int argument) { float reciprocalDepth; g_renderer->ProjectViewport(&this->render.position.x, matrix, &x, &y, &reciprocalDepth); const float scale = g_renderer->ScaleDistance(reciprocalDepth) / g_heightScale; - this->render.unknown_005C = scale; + this->render.distanceScale = scale; float bounds[5]; bounds[0] = x - g_renderer->viewport.uiScaleX * 50.0f * scale; @@ -1077,10 +1077,10 @@ void CNpc::Render(int argument) { float reciprocalDepth; g_renderer->ProjectViewport(&this->render.position.x, matrix, &x, &y, &reciprocalDepth); const float scale = g_renderer->ScaleDistance(reciprocalDepth) / g_heightScale; - this->render.unknown_005C = scale; + this->render.distanceScale = scale; - const float halfWidth = static_cast(this->unknown_0294 / 2); - const float halfHeight = static_cast(this->unknown_0298 / 2); + const float halfWidth = static_cast(this->xSize / 2); + const float halfHeight = static_cast(this->ySize / 2); float bounds[5]; bounds[0] = x - halfWidth * g_renderer->viewport.uiScaleX * scale; bounds[1] = y - halfHeight * g_renderer->viewport.uiScaleY * scale; @@ -1116,7 +1116,7 @@ void CNpc::Render(int argument) { } } - if (hidden && this->unknown_0314 == 5 && (!this->render.visible || !this->render.enabled)) { + if (hidden && this->objectType == 5 && (!this->render.visible || !this->render.enabled)) { this->SetColor(-1, 0, 0, 0); this->DrawSprite(argument, g_session.IsMonsterClass(this->GetEffectiveJob(-1)), 0.0f); return; @@ -1139,7 +1139,7 @@ void CNpc::Render(int argument) { // OFFSET: 0x00DA2F00 // FUNCTION: fn_22396 bool CBlowEffect::OnProcess() { - const float frame = static_cast((timeGetTime() - this->render.unknown_008C) / 24.0); + const float frame = static_cast((timeGetTime() - this->render.motionStartTime) / 24.0); this->render.previousAnimation = this->render.animation; const int frameCount = static_cast(this->GetActRes()->FrameCount(this->render.previousAnimation)); this->render.curMotion = static_cast(frame / this->render.speed) % frameCount; @@ -1150,24 +1150,24 @@ bool CBlowEffect::OnProcess() { // OFFSET: 0x00DA3DF0 // FUNCTION: fn_22407 void CNpc::UpdateBubblePositions() { - if (this->unknown_042C) { - this->unknown_042C->Move( + if (this->playerGaugeWindow) { + this->playerGaugeWindow->Move( this->render.screenX - 30, static_cast( - static_cast(g_renderer->viewport.height * 12 / 480) * this->render.unknown_005C + static_cast(this->render.screenY) + static_cast(g_renderer->viewport.height * 12 / 480) * this->render.distanceScale + static_cast(this->render.screenY) ) ); - this->unknown_042C->Invalidate(); + this->playerGaugeWindow->Invalidate(); } - if (this->unknown_0430) { - this->unknown_0430->Move( + if (this->pcGaugeWindow) { + this->pcGaugeWindow->Move( this->render.screenX - 30, static_cast( - static_cast(g_renderer->viewport.height * 12 / 480) * this->render.unknown_005C + static_cast(this->render.screenY) + static_cast(g_renderer->viewport.height * 12 / 480) * this->render.distanceScale + static_cast(this->render.screenY) ) ); - this->unknown_0430->Invalidate(); + this->pcGaugeWindow->Invalidate(); } this->UpdateHpGauge(); @@ -1176,46 +1176,46 @@ void CNpc::UpdateBubblePositions() { // OFFSET: 0x00DA1470 // FUNCTION: fn_22357 CHalluPC2::CHalluPC2(CPc* source) { - this->unknown_0510 = source; + this->sourcePc = source; this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 0; - this->render.unknown_008C = timeGetTime(); - this->SetUnknown0260(source->unknown_0260); + this->render.visibilityOptions[0] = 0; + this->render.motionStartTime = timeGetTime(); + this->SetUnknown0260(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); this->SetUnknown0404(source->GetUnknown0404()); - this->SetRiding(source->unknown_02CC); + this->SetRiding(source->isRiding); this->SetUnknown03C4(source->GetMonsterTransformJob()); this->render.position = source->render.position; - this->render.unknown_005C = source->render.unknown_005C; - this->render.unknown_0078 = source->render.unknown_0078; + this->render.distanceScale = source->render.distanceScale; + this->render.spriteOffsetX = source->render.spriteOffsetX; this->render.scale = source->render.scale; this->render.animation = source->render.animation; this->render.previousAnimation = source->render.previousAnimation; this->render.curMotion = source->render.curMotion; this->SetActionName(source->GetActName()); - this->render.unknown_00A2 = source->render.unknown_00A2; - this->render.unknown_0080 = source->render.unknown_0080; + this->render.flatDepth = source->render.flatDepth; + this->render.depthLayer = source->render.depthLayer; this->render.isLieOnGround = source->render.isLieOnGround; this->render.isSingleColor = source->render.isSingleColor; - this->render.unknown_007C = source->render.unknown_007C; - this->render.unknown_0048 = 0; - this->unknown_0444 = source->unknown_0444; + this->render.spriteAngle = source->render.spriteAngle; + this->render.bodyPalette = 0; + this->headPalette = source->headPalette; this->stateFlags = source->GetStateFlags(); - this->unknown_0478 = source->unknown_0478; + this->headPaletteName = source->headPaletteName; this->LoadEquipSprites(source->GetEquipSpriteNames()); this->LoadEquipActions(source->GetEquipActionNames()); - this->unknown_0418 = source->unknown_0418; + this->imfName = source->imfName; this->guildId = source->GetGdid(); this->render.accountId = source->render.accountId; - this->unknown_04F8 = 0.0f; - this->unknown_050C = 0; - this->unknown_04FC = 0x10000000; - this->render.unknown_0048 = source->render.unknown_0048; + this->destCellX = 0.0f; + this->preMoveOn = 0; + this->destCellZ = 0x10000000; + this->render.bodyPalette = source->render.bodyPalette; this->render.name = source->render.name; - this->unknown_049C = 0; - this->unknown_0450 = 0; - this->unknown_0454 = 0; - this->unknown_0458 = 0; + this->robe = 0; + this->accessory = 0; + this->accessory2 = 0; + this->accessory3 = 0; } // OFFSET: 0x00DA0E60 @@ -1223,90 +1223,90 @@ CHalluPC2::CHalluPC2(CPc* source) { CBlurPC::CBlurPC(CPc* source) { this->blurSource = source; this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 0; - this->render.unknown_008C = timeGetTime(); - this->SetUnknown0260(source->unknown_0260); + this->render.visibilityOptions[0] = 0; + this->render.motionStartTime = timeGetTime(); + this->SetUnknown0260(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); this->SetUnknown0404(source->GetUnknown0404()); - this->SetRiding(source->unknown_02CC); + this->SetRiding(source->isRiding); this->SetUnknown03C4(source->GetMonsterTransformJob()); this->render.position = source->render.position; - this->render.unknown_005C = source->render.unknown_005C; - this->render.unknown_0078 = source->render.unknown_0078; + this->render.distanceScale = source->render.distanceScale; + this->render.spriteOffsetX = source->render.spriteOffsetX; this->render.scale = source->render.scale; this->render.animation = source->render.animation; this->render.previousAnimation = source->render.previousAnimation; this->render.curMotion = source->render.curMotion; this->SetActionName(source->GetActName()); - this->render.unknown_00A2 = source->render.unknown_00A2; - this->render.unknown_0080 = source->render.unknown_0080; + this->render.flatDepth = source->render.flatDepth; + this->render.depthLayer = source->render.depthLayer; this->render.isLieOnGround = source->render.isLieOnGround; this->render.isSingleColor = source->render.isSingleColor; - this->render.unknown_007C = source->render.unknown_007C; - this->render.unknown_0048 = 0; - this->unknown_0444 = source->unknown_0444; + this->render.spriteAngle = source->render.spriteAngle; + this->render.bodyPalette = 0; + this->headPalette = source->headPalette; this->stateFlags = source->GetStateFlags(); - this->unknown_0478 = source->unknown_0478; + this->headPaletteName = source->headPaletteName; this->LoadEquipSprites(source->GetEquipSpriteNames()); this->LoadEquipActions(source->GetEquipActionNames()); - this->unknown_0418 = source->unknown_0418; + this->imfName = source->imfName; this->guildId = source->GetGdid(); this->render.accountId = source->render.accountId; - this->unknown_04F8 = 0.0f; - this->unknown_04FC = 0x10000000; - this->render.unknown_0048 = source->render.unknown_0048; + this->destCellX = 0.0f; + this->destCellZ = 0x10000000; + this->render.bodyPalette = source->render.bodyPalette; this->render.name = source->render.name; - this->unknown_049C = 0; - this->unknown_0450 = 0; - this->unknown_0454 = 0; - this->unknown_0458 = 0; + this->robe = 0; + this->accessory = 0; + this->accessory2 = 0; + this->accessory3 = 0; } // OFFSET: 0x00DA17A0 // FUNCTION: fn_22358 CHalluPC::CHalluPC(CPc* source) { - this->unknown_0510 = source; + this->sourcePc = source; this->render.visible = 1; - this->render.unknown_00A4Bytes[0] = 0; - this->render.unknown_008C = timeGetTime(); - this->SetUnknown0260(source->unknown_0260); + this->render.visibilityOptions[0] = 0; + this->render.motionStartTime = timeGetTime(); + this->SetUnknown0260(source->sex); this->SetActorJob(source->GetEffectiveJob(-1)); this->SetUnknown0404(source->GetUnknown0404()); - this->SetRiding(source->unknown_02CC); + this->SetRiding(source->isRiding); this->SetUnknown03C4(source->GetMonsterTransformJob()); this->render.position = source->render.position; - this->render.unknown_005C = source->render.unknown_005C; - this->render.unknown_0078 = source->render.unknown_0078; + this->render.distanceScale = source->render.distanceScale; + this->render.spriteOffsetX = source->render.spriteOffsetX; this->render.scale = source->render.scale; this->render.animation = source->render.animation; this->render.previousAnimation = source->render.previousAnimation; this->render.curMotion = source->render.curMotion; this->SetActionName(source->GetActName()); - this->render.unknown_00A2 = source->render.unknown_00A2; - this->render.unknown_0080 = source->render.unknown_0080; + this->render.flatDepth = source->render.flatDepth; + this->render.depthLayer = source->render.depthLayer; this->render.isLieOnGround = source->render.isLieOnGround; this->render.isSingleColor = source->render.isSingleColor; - this->render.unknown_007C = source->render.unknown_007C; - this->render.unknown_0048 = 0; - this->unknown_0444 = source->unknown_0444; + this->render.spriteAngle = source->render.spriteAngle; + this->render.bodyPalette = 0; + this->headPalette = source->headPalette; this->stateFlags = source->GetStateFlags(); - this->unknown_0478 = source->unknown_0478; + this->headPaletteName = source->headPaletteName; this->LoadEquipSprites(source->GetEquipSpriteNames()); this->LoadEquipActions(source->GetEquipActionNames()); - this->unknown_0418 = source->unknown_0418; + this->imfName = source->imfName; this->guildId = source->GetGdid(); this->render.accountId = source->render.accountId; - this->unknown_04F8 = 0.0f; - this->unknown_050C = 0; - this->unknown_04FC = 0x10000000; - this->render.unknown_0048 = source->render.unknown_0048; + this->destCellX = 0.0f; + this->preMoveOn = 0; + this->destCellZ = 0x10000000; + this->render.bodyPalette = source->render.bodyPalette; this->render.name = source->render.name; - this->unknown_03E1 = true; + this->modelReady = true; this->SetBodyCostume(source->GetBodyCostume(), 1); - this->unknown_049C = 0; - this->unknown_0450 = 0; - this->unknown_0454 = 0; - this->unknown_0458 = 0; + this->robe = 0; + this->accessory = 0; + this->accessory2 = 0; + this->accessory3 = 0; } // OFFSET: 0x00DA28B0 @@ -1318,32 +1318,32 @@ void CNpc::UpdateMinimapMarker() { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); MinimapMarker* marker = mode->FindMinimapMarker(this->render.accountId); - if (marker && marker->unknown_0004 != 9999) { - if (this->unknown_0434) { - if (marker->unknown_0004 == this->minimapMarkerCell[0] && marker->unknown_0006 == this->minimapMarkerCell[1]) { + if (marker && marker->effectType != 9999) { + if (this->attachedEffect) { + if (marker->effectType == this->minimapMarkerCell[0] && marker->questIconId == this->minimapMarkerCell[1]) { return; } - if (this->unknown_0434) { - this->unknown_0434->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0434 = nullptr; - this->unknown_0438 = 9999; + if (this->attachedEffect) { + this->attachedEffect->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->attachedEffect = nullptr; + this->attachedEffectId = 9999; } } - const int base = marker->unknown_0004 < 6 ? 0x24 : 0x36; - CMsgEffect* effect = mode->SpawnMsgEffect(base + marker->unknown_0004, &this->render.position, this->render.accountId, true); - this->unknown_03B0.push_back(effect); + const int base = marker->effectType < 6 ? 0x24 : 0x36; + CMsgEffect* effect = mode->SpawnMsgEffect(base + marker->effectType, &this->render.position, this->render.accountId, true); + this->msgEffectList.push_back(effect); effect->SendMsg(this, AM_SET_MASTER_POINTER, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0434 = effect; - this->minimapMarkerCell[0] = marker->unknown_0004; - this->minimapMarkerCell[1] = marker->unknown_0006; + this->attachedEffect = effect; + this->minimapMarkerCell[0] = marker->effectType; + this->minimapMarkerCell[1] = marker->questIconId; return; } - if (this->unknown_0434) { - this->unknown_0434->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0434 = nullptr; - this->unknown_0438 = 9999; + if (this->attachedEffect) { + this->attachedEffect->SendMsg(nullptr, AM_DISAPPEAR, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + this->attachedEffect = nullptr; + this->attachedEffectId = 9999; } } @@ -1365,9 +1365,9 @@ bool CNpc::OnProcess() { case JT_HIDDEN_WARP_NPC: break; case JT_EFFECTLAUNCHER: - if (timeGetTime() > this->unknown_0424 + this->unknown_0294 * 1000) { - this->unknown_0424 = timeGetTime(); - this->LaunchEffect(*reinterpret_cast(&this->unknown_0170[4]), vector3d{0.0f, 0.0f, 0.0f}, 0.0f); + if (timeGetTime() > this->effectTick + this->xSize * 1000) { + this->effectTick = timeGetTime(); + this->LaunchEffect(*reinterpret_cast(&this->destinationAndSpeed[4]), vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } break; case JT_HIDDEN_NPC: @@ -1387,16 +1387,16 @@ bool CNpc::OnProcess() { break; } - if (this->unknown_0314 != 7) { + if (this->objectType != 7) { this->PlayFrameSounds(); } WIN32_FIND_DATAA findData; if (g_session.IsHomunAid(this->render.accountId)) { - if (!this->unknown_030C) { - this->unknown_030C = reinterpret_cast(new CMercenaryAI(0)); - } else if (reinterpret_cast(this->unknown_030C)->state) { - reinterpret_cast(this->unknown_030C)->Process(this->render.accountId); + if (!this->homunAI) { + this->homunAI = reinterpret_cast(new CMercenaryAI(0)); + } else if (reinterpret_cast(this->homunAI)->state) { + reinterpret_cast(this->homunAI)->Process(this->render.accountId); } else { if (g_serviceOptions.Get(0xA4)) { HANDLE find = FindFirstFileA(".\\AI\\USER_AI", &findData); @@ -1405,19 +1405,19 @@ bool CNpc::OnProcess() { } FindClose(find); CopyFileA(".\\AI\\AI.lua", ".\\AI\\USER_AI\\AI.lua", TRUE); - reinterpret_cast(this->unknown_030C)->Load(".\\AI\\USER_AI\\AI.lua"); + reinterpret_cast(this->homunAI)->Load(".\\AI\\USER_AI\\AI.lua"); } else { - reinterpret_cast(this->unknown_030C)->Load(".\\AI\\AI.lua"); + reinterpret_cast(this->homunAI)->Load(".\\AI\\AI.lua"); } this->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } if (g_session.IsMercenaryAid(this->render.accountId)) { - if (!this->unknown_0310) { - this->unknown_0310 = reinterpret_cast(new CMercenaryAI(1)); - } else if (reinterpret_cast(this->unknown_0310)->state) { - reinterpret_cast(this->unknown_0310)->Process(this->render.accountId); + if (!this->merAI) { + this->merAI = reinterpret_cast(new CMercenaryAI(1)); + } else if (reinterpret_cast(this->merAI)->state) { + reinterpret_cast(this->merAI)->Process(this->render.accountId); } else { const char* path; if (g_serviceOptions.Get(0xAE)) { @@ -1431,7 +1431,7 @@ bool CNpc::OnProcess() { } else { path = ".\\AI\\AI_M.lua"; } - reinterpret_cast(this->unknown_0310)->Load(path); + reinterpret_cast(this->merAI)->Load(path); this->SendMsg(nullptr, AM_UPDATEGAGE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } } @@ -1442,9 +1442,9 @@ bool CNpc::OnProcess() { this->UpdateBubblePositions(); - if (g_session.unknown_5614 && g_groundMarkAid == this->render.accountId) { + if (g_session.homunAlive && g_groundMarkAid == this->render.accountId) { this->SendMsg(nullptr, 0x86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - } else if (g_session.unknown_56B0 && g_groundMarkAltAid == this->render.accountId) { + } else if (g_session.mercenaryAlive && g_groundMarkAltAid == this->render.accountId) { this->SendMsg(nullptr, 0x86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } else { this->SendMsg(nullptr, 0x87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -1452,7 +1452,7 @@ bool CNpc::OnProcess() { this->UpdateMinimapMarker(); - switch (this->unknown_0314) { + switch (this->objectType) { case 7: case 8: case 9: @@ -1491,7 +1491,7 @@ void CBlurPC::Render(int argument) { return; } - if (this->render.unknown_0070 != 6 && this->render.unknown_0070 != 3) { + if (this->render.state != 6 && this->render.state != 3) { this->DrawShadow(argument, this->render.scale); } if (!this->render.enabled) { @@ -1504,7 +1504,7 @@ void CBlurPC::Render(int argument) { return; } - if (this->unknown_0474 != 0) { + if (this->renderWithoutLayer != 0) { this->DrawSprite(argument, false, 0.0f); return; } @@ -1564,7 +1564,7 @@ void CHalluPC::Render(int argument) { return; } - if (this->render.unknown_0070 != 6 && this->render.unknown_0070 != 3) { + if (this->render.state != 6 && this->render.state != 3) { this->DrawShadow(argument, this->render.scale); } if (!this->render.enabled) { @@ -1577,7 +1577,7 @@ void CHalluPC::Render(int argument) { return; } - if (this->unknown_0474 != 0) { + if (this->renderWithoutLayer != 0) { this->DrawSprite(argument, false, 0.0f); return; } @@ -1596,39 +1596,39 @@ void CNpc::SetState(int state, int) { switch (this->GetEffectiveJob(-1)) { case JT_WARPNPC: { - int height = this->unknown_0298; + int height = this->ySize; if (height <= 10) { - this->unknown_0298 = 10; + this->ySize = 10; height = 10; } - int width = this->unknown_0294; + int width = this->xSize; if (width <= 10) { - this->unknown_0294 = 10; + this->xSize = 10; width = 10; } this->boundsLeft = this->render.position.x - static_cast(width / 2); this->boundsRight = static_cast(width / 2) + this->render.position.x; this->boundsTop = this->render.position.z - static_cast(height / 2); this->boundsBottom = static_cast(height / 2) + this->render.position.z; - if (this->unknown_0428 == 0 && this->render.enabled) { - this->unknown_0428 = 1; + if (this->appearanceInitialized == 0 && this->render.enabled) { + this->appearanceInitialized = 1; this->LaunchEffect(321, vector3d{0.0f, 0.0f, 0.0f}, 0.0f); } break; } case JT_EFFECTLAUNCHER: - this->render.position.y -= static_cast(this->unknown_0298 * 5); + this->render.position.y -= static_cast(this->ySize * 5); break; case JT_HIDDEN_NPC: - this->unknown_0294 *= 2; - this->unknown_0298 *= 2; + this->xSize *= 2; + this->ySize *= 2; break; case JT_HIDDEN_WARP_NPC: break; default: { CGameActor* actor = static_cast(g_session.FindGameActor(this->render.accountId)); bool isDisguised = false; - if (actor && actor->unknown_0314 == 12) { + if (actor && actor->objectType == 12) { isDisguised = true; } if (g_session.IsAllyActor(this->render.accountId, this->GetEffectiveJob(-1)) == 1 && this->GetEffectiveJob(-1) != JT_MOB_TOMB && @@ -1638,20 +1638,20 @@ void CNpc::SetState(int state, int) { break; } - if (this->render.unknown_0070 == 4) { - this->render.position.x = this->unknown_02D0; - this->render.position.z = this->unknown_02D4; + if (this->render.state == 4) { + this->render.position.x = this->damageDestX; + this->render.position.z = this->damageDestZ; } switch (state) { case ST_STAND: this->render.isLieOnGround = false; - this->render.unknown_00A4Bytes[1] = 1; + this->render.visibilityOptions[1] = 1; this->SetAction(0, 4, 0); - if (this->unknown_02C8 != 0) { - int hungerLevel = g_session.GetPetHungryState(g_session.unknown_1044); + if (this->healthState != 0) { + int hungerLevel = g_session.GetPetHungryState(g_session.petHunger); int emotion = state; - switch (this->unknown_02C8) { + switch (this->healthState) { case 1: emotion = g_session.GetPetEmotionNumber(this->GetEffectiveJob(-1), 7, hungerLevel); this->SetAction(40, 4, 1); @@ -1672,25 +1672,25 @@ void CNpc::SetState(int state, int) { this->SetAction(40, 4, 1); break; } - if (this->render.accountId == g_session.unknown_1010) { + if (this->render.accountId == g_session.petGid) { g_modeMgr.GetGameMode()->SendMsg(MM_PET_ACT, emotion, 0, 0, 0); } - this->unknown_02C8 = 0; + this->healthState = 0; this->render.isMotionFinished = false; this->RegisterPos(); } else { - if (this->render.unknown_0070 != 0) { - this->unknown_027C = timeGetTime(); + if (this->render.state != 0) { + this->petEmotionStartTick = timeGetTime(); } - if (g_session.unknown_5608) { - g_session.unknown_5600 = 0; - g_session.unknown_5604 = 0; - g_session.unknown_5608 = 0; + if (g_session.moveHomunEnemy) { + g_session.homunEnemyX = 0; + g_session.homunEnemyY = 0; + g_session.moveHomunEnemy = 0; } - if (g_session.unknown_56A4) { - g_session.unknown_569C = 0; - g_session.unknown_56A0 = 0; - g_session.unknown_56A4 = 0; + if (g_session.moveMercenaryEnemy) { + g_session.mercenaryEnemyX = 0; + g_session.mercenaryEnemyY = 0; + g_session.moveMercenaryEnemy = 0; } this->RegisterPos(); } @@ -1710,7 +1710,7 @@ void CNpc::SetState(int state, int) { if (this->bodyState != 1 && this->bodyState != 2) { this->render.isMotionFreezed = false; } - if (this->unknown_0314 == 8) { + if (this->objectType == 8) { if (this->GetEffectiveJob(-1) == JT_MER_ELEANOR) { this->SetAction(16, 4, 1); } else if (std::rand() % 2) { @@ -1723,14 +1723,14 @@ void CNpc::SetState(int state, int) { } else { this->SetAction(16, 4, 1); } - this->unknown_0378 = static_cast(this->GetAttackMotion()); + this->attackMotion = static_cast(this->GetAttackMotion()); this->RegisterPos(); - this->LaunchAttackProjectile(this->hitTargetAid, this->render.speed * this->unknown_0378); + this->LaunchAttackProjectile(this->hitTargetAid, this->render.speed * this->attackMotion); break; case ST_DEAD: - this->render.unknown_00C8 = 0; - this->render.unknown_00D8 = 0; - this->render.unknown_00DC = 0; + this->render.frameSequenceActive = 0; + this->render.animationSequenceActive = 0; + this->render.timedSequenceActive = 0; this->render.isMotionFreezed = false; if (this->bodyState == 2) { this->SendMsg(nullptr, AM_DELETE_ICEEFFECT, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); @@ -1738,7 +1738,7 @@ void CNpc::SetState(int state, int) { } this->render.isLieOnGround = true; this->render.isMotionFreezed = false; - this->render.unknown_00A4Bytes[1] = 0; + this->render.visibilityOptions[1] = 0; if (this->GetEffectiveJob(-1) >= 6017 && this->GetEffectiveJob(-1) <= 6046) { this->SetAction(64, 4, 1); this->UnRegisterPos(); @@ -1748,7 +1748,7 @@ void CNpc::SetState(int state, int) { } break; case ST_DAMAGE: - if (this->render.unknown_00C8 != 0 || this->render.unknown_00D8 != 0 || this->render.unknown_00DC != 0) { + if (this->render.frameSequenceActive != 0 || this->render.animationSequenceActive != 0 || this->render.timedSequenceActive != 0) { return; } if (this->GetEffectiveJob(-1) >= 6017 && this->GetEffectiveJob(-1) <= 6046) { @@ -1763,7 +1763,7 @@ void CNpc::SetState(int state, int) { this->RegisterPos(); break; case ST_SKILL: - switch (this->unknown_0314) { + switch (this->objectType) { case 8: case 10: case 13: @@ -1794,6 +1794,6 @@ void CNpc::SetState(int state, int) { } this->render.previousAnimation = this->render.animation + this->Get8Dir(this->render.angle); - this->render.unknown_0070 = state; - this->render.unknown_008C = timeGetTime(); + this->render.state = state; + this->render.motionStartTime = timeGetTime(); } diff --git a/Source/Contents/SpriteLayerDepth.cpp b/Source/Contents/SpriteLayerDepth.cpp index c6c2dc4c4..0ada80786 100644 --- a/Source/Contents/SpriteLayerDepth.cpp +++ b/Source/Contents/SpriteLayerDepth.cpp @@ -50,7 +50,7 @@ void CCharacterRender::OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad switch (layer) { case 1: - if (this->unknown_002C == 1095) { + if (this->upperHeadgear == 1095) { if (g_cameraDistance < 32.0f) { bottom = bottomDepth - 0.000008f; top = topDepth - 0.000008f; @@ -64,7 +64,7 @@ void CCharacterRender::OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad } break; case 2: - switch (this->unknown_0028) { + switch (this->lowerHeadgear) { case 1041: case 1358: case 1478: @@ -112,7 +112,7 @@ void CCharacterRender::OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad } break; case 4: - if (this->unknown_002C == 1485) { + if (this->upperHeadgear == 1485) { if (g_cameraDistance < robeTopLayerThreshold) { bottom = 0.00035f + bottomDepth; top = 0.0006f + topDepth; @@ -121,7 +121,7 @@ void CCharacterRender::OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad top = 0.00015f + topDepth; } } else { - switch (this->unknown_0030) { + switch (this->middleHeadgear) { case 1318: if (g_cameraDistance < robeTopLayerThreshold) { bottom = 0.00025f + bottomDepth; @@ -172,7 +172,7 @@ void CCharacterRender::OffsetAccessoryLayerDepth(int layer, SpriteCellQuad& quad bool enabled = false; double nearOffset = 0.0; double farOffset = 0.0; - g_session.m_hotkeyScript->Call("OffsetItemPos_GetUppingBottomItem", "d>bll", this->unknown_0028, &enabled, &nearOffset, &farOffset); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetUppingBottomItem", "d>bll", this->lowerHeadgear, &enabled, &nearOffset, &farOffset); if (layer == 2 && enabled) { if (nearOffset == 0.0) { diff --git a/Source/Contents/SpriteLayerDrawing.cpp b/Source/Contents/SpriteLayerDrawing.cpp index 04fc2e6e8..aaca89bcc 100644 --- a/Source/Contents/SpriteLayerDrawing.cpp +++ b/Source/Contents/SpriteLayerDrawing.cpp @@ -31,23 +31,23 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn } std::memcpy(this->matrix, matrix, sizeof(this->matrix)); - this->unknown_0030 = unknown0030; - this->unknown_0034 = unknown0034; - this->unknown_0060 = 0; + this->blendMode = unknown0030; + this->blendVariant = unknown0034; + this->layerShift = 0; this->swingX = 0; this->swingY = 0; - this->unknown_006C = false; - this->unknown_006D = false; - this->unknown_0094 = false; + this->hideHeadLayer = false; + this->hideAccessories = false; + this->alternateLayerRendering = false; int slot = 2; - this->layerViews[slot] = this->pc->unknown_0450; + this->layerViews[slot] = this->pc->accessory; slot = 3; - this->layerViews[slot] = this->pc->unknown_0454; + this->layerViews[slot] = this->pc->accessory2; slot = 4; - this->layerViews[slot] = this->pc->unknown_0458; + this->layerViews[slot] = this->pc->accessory3; slot = 8; - this->layerViews[slot] = this->pc->unknown_049C; + this->layerViews[slot] = this->pc->robe; this->LoadLayers(); const vector3d& origin = this->pc->render.position; @@ -56,11 +56,11 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn this->position.z = origin.x * matrix[2] + origin.y * matrix[5] + origin.z * matrix[8] + matrix[11]; g_renderer->ProjectViewport(&this->pc->render.position.x, matrix, &this->x, &this->y, &this->rhw); this->distanceScale = g_renderer->ScaleDistance(this->rhw); - this->pc->render.unknown_005C = this->distanceScale / g_heightScale; + this->pc->render.distanceScale = this->distanceScale / g_heightScale; this->pc->ScaleByPulse(this->distanceScale); this->distanceScale *= GetSkillFactor(this->pc->GetEffectiveJob(-1)); - this->scale = g_renderer->UiScaleX() * (static_cast(static_cast(this->pc->render.unknown_0078)) * this->pc->render.scale) * - this->pc->render.unknown_005C; + this->scale = g_renderer->UiScaleX() * (static_cast(static_cast(this->pc->render.spriteOffsetX)) * this->pc->render.scale) * + this->pc->render.distanceScale; if (this->pc->HasAppearanceOverride()) { const int layer = this->DrawBodyOutline(0); @@ -71,13 +71,13 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn } this->DrawRobe(false); - this->imf = static_cast(ResourceMgr::Instance().Load(this->pc->unknown_0418)); + this->imf = static_cast(ResourceMgr::Instance().Load(this->pc->imfName)); this->bounds.Set(static_cast(g_renderer->viewport.width), static_cast(g_renderer->viewport.height), 0.0f, 0.0f, this->rhw); bool bodyDrawn = false; bool swapped = false; - if (this->pc->unknown_04F4) { - this->DrawLayerOutlines(this->pc->unknown_04F4); + if (this->pc->outlineColor) { + this->DrawLayerOutlines(this->pc->outlineColor); } for (int index = 8; index >= 0; --index) { @@ -109,16 +109,16 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn if (job == 0xFF6 || job == 0xFF7 || job == 0x1010) { continue; } - } else if (this->pc->unknown_02CC == 1) { + } else if (this->pc->isRiding == 1) { continue; } } - if ((layer == 2 || layer == 3 || layer == 4) && this->unknown_006D == true) { + if ((layer == 2 || layer == 3 || layer == 4) && this->hideAccessories == true) { continue; } - if (layer == 8 && this->pc->unknown_04D9 == false) { + if (layer == 8 && this->pc->isHelmRobe == false) { continue; } @@ -143,9 +143,9 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn const ActionFrame& frame = this->pc->SelectStanceFrame(layer, action, &stanceAnimation, &frameIndex, &replaced); std::pair sound = this->GetLayerSound(layer, action, frame.sound); if (sound.first == true) { - this->pc->unknown_0180 = 1; + this->pc->isPlayHitWave = 1; std::string name = sound.second; - char* buffer = reinterpret_cast(this->pc->unknown_0190); + char* buffer = reinterpret_cast(this->pc->hitWaveName); StringFormat(buffer, 0x80, static_cast(-1), "%s", name.size() == 0 ? buffer : name.c_str()); } @@ -181,13 +181,13 @@ void SpriteLayerRenderer::Render(const float* matrix, int unknown0030, char unkn } } - if (this->unknown_0094 == true) { + if (this->alternateLayerRendering == true) { this->pc->SetRenderInfo(&this->bounds.left, this->x, this->y); } else { this->pc->SetTlvert(this->x, this->y); } - this->pc->render.unknown_00ECBytes[0] = 1; + this->pc->render.effectPhaseBytes[0] = 1; } // OFFSET: 0x0063FC90 @@ -262,7 +262,7 @@ void SpriteLayerRenderer::DrawLayerOutlines(std::uint32_t color) { int box[4]; std::uint32_t quadColor; if (!this->pc->PrepareSprite( - layer, this->unknown_0060, this->distanceScale, *resolved.cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, + layer, this->layerShift, this->distanceScale, *resolved.cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, &topRhw, resolved.image, &quad, box, &quadColor, itemOffset.first, itemOffset.second, 0 )) { continue; @@ -321,8 +321,8 @@ void SpriteLayerRenderer::DrawLayerOutlines(std::uint32_t color) { // OFFSET: 0x00640510 // FUNCTION: fn_04810 void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { - if (this->pc->unknown_049C <= 0 || this->pc->unknown_04D9 == true || this->pc->render.unknown_0070 == 3 || - (this->pc->blend == -1 && this->pc->unknown_04A4 == -1 && this->pc->unknown_04A8 == -1)) { + if (this->pc->robe <= 0 || this->pc->isHelmRobe == true || this->pc->render.state == 3 || + (this->pc->blend == -1 && this->pc->layerCellX == -1 && this->pc->layerCellY == -1)) { return; } @@ -330,7 +330,7 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { return; } - if (this->pc->unknown_0260 == 0) { + if (this->pc->sex == 0) { const int job = this->pc->GetEffectiveJob(-1); if (job == 0xFF6 || job == 0xFF7 || job == 0x1010) { return; @@ -338,10 +338,10 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { } std::string sprName = g_session.GetRobeSprName( - this->pc->GetEffectiveJob(-1), this->pc->unknown_04D4, this->pc->unknown_0260, this->pc->unknown_049C, this->pc->unknown_02CC, this->pc->GetBodyCostume() + this->pc->GetEffectiveJob(-1), this->pc->appearanceJob, this->pc->sex, this->pc->robe, this->pc->isRiding, this->pc->GetBodyCostume() ); std::string actName = g_session.GetRobeActName( - this->pc->GetEffectiveJob(-1), this->pc->unknown_04D4, this->pc->unknown_0260, this->pc->unknown_049C, this->pc->unknown_02CC, this->pc->GetBodyCostume() + this->pc->GetEffectiveJob(-1), this->pc->appearanceJob, this->pc->sex, this->pc->robe, this->pc->isRiding, this->pc->GetBodyCostume() ); if (!ResourceMgr::Instance().Exists(sprName.c_str()) || !ResourceMgr::Instance().Exists(actName.c_str())) { return; @@ -361,7 +361,7 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { } g_session.GetSyncedFrame( - static_cast(this->pc->GetEquipAction(1)), action, animation, baseFrame, this->pc->render.unknown_008C, &frameIndex + static_cast(this->pc->GetEquipAction(1)), action, animation, baseFrame, this->pc->render.motionStartTime, &frameIndex ); const ActionFrame& frame = action->Frame(this->pc->render.previousAnimation, frameIndex); for (int index = 0; index < frame.cellCount; ++index) { @@ -371,7 +371,7 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { } reinterpret_cast(&const_cast(cell).color)[3] = - static_cast(g_session.GetRobeAlpha(this->pc->unknown_049C)); + static_cast(g_session.GetRobeAlpha(this->pc->robe)); const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; float bottomRhw = 0.0f; @@ -380,7 +380,7 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { int box[4]; std::uint32_t quadColor; this->pc->PrepareSprite( - this->unknown_0060, this->unknown_0060, this->distanceScale, cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, &topRhw, + this->layerShift, this->layerShift, this->distanceScale, cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, &topRhw, image, &quad, box, &quadColor, 0, 0, !drawOnTop ); if (this->pc->render.unknown_0130[0] == 1) { @@ -393,7 +393,7 @@ void SpriteLayerRenderer::DrawRobe(bool drawOnTop) { this->pc->ApplyLayerEffects( &quad, &cell, 0, box, this->scale, bottomRhw, bottomRhw, topRhw, this->x, this->y, sprite->palette, image, &blend, 0, 0 ); - if (drawOnTop && g_session.IsTopLayerRobe(this->pc->unknown_049C)) { + if (drawOnTop && g_session.IsTopLayerRobe(this->pc->robe)) { SpriteLayerQuad entry; entry.quad = quad; entry.palette = sprite->palette; @@ -412,7 +412,7 @@ int SpriteLayerRenderer::DrawBodyOutline(int layer) { return layer; } - std::uint32_t color = this->pc->unknown_04F4; + std::uint32_t color = this->pc->outlineColor; if (!color) { return layer; } @@ -445,7 +445,7 @@ SpriteLayerCell SpriteLayerRenderer::ResolveCell( case 1: { const ActionFrame& body = static_cast(this->pc->GetEquipAction(0))->Frame(this->pc->render.previousAnimation, this->pc->render.curMotion); if (frame->anchorCount > 0 && body.anchorCount > 0) { - if (frame->anchors[0].unknown_0008 == body.anchors[0].unknown_0008) { + if (frame->anchors[0].attachmentId == body.anchors[0].attachmentId) { offsetX = body.anchors[0].x - frame->anchors[0].x; offsetY = body.anchors[0].y - frame->anchors[0].y; this->swingX = offsetX; @@ -461,7 +461,7 @@ SpriteLayerCell SpriteLayerRenderer::ResolveCell( int syncedFrame = 0; const ActionFrame* synced = g_session.GetSyncedFrame( static_cast(this->pc->GetEquipAction(1)), static_cast(this->pc->GetEquipAction(layer)), - this->pc->render.previousAnimation, this->pc->render.curMotion, this->pc->render.unknown_008C, &syncedFrame + this->pc->render.previousAnimation, this->pc->render.curMotion, this->pc->render.motionStartTime, &syncedFrame ); if (synced && syncedFrame != this->pc->render.curMotion) { frame = synced; @@ -480,16 +480,16 @@ SpriteLayerCell SpriteLayerRenderer::ResolveCell( } if (frame->anchorCount > 0 && bodyFrame->anchorCount > 0) { - if (frame->anchors[0].unknown_0008 == bodyFrame->anchors[0].unknown_0008) { + if (frame->anchors[0].attachmentId == bodyFrame->anchors[0].attachmentId) { offsetX = bodyFrame->anchors[0].x - frame->anchors[0].x; anchorY = bodyFrame->anchors[0].y - frame->anchors[0].y; } } offsetX += this->swingX; - if (IsIgnoredRidingState(this->layerViews[layer], this->pc->GetEffectiveJob(-1), this->pc->render.animation, this->pc->unknown_02CC) == true) { + if (IsIgnoredRidingState(this->layerViews[layer], this->pc->GetEffectiveJob(-1), this->pc->render.animation, this->pc->isRiding) == true) { offsetY = SpriteRidingOffset( - bodyFrame, this->pc->render.previousAnimation, this->pc->render.curMotion, this->pc->GetEffectiveJob(-1), this->pc->unknown_0260, + bodyFrame, this->pc->render.previousAnimation, this->pc->render.curMotion, this->pc->GetEffectiveJob(-1), this->pc->sex, this->pc->GetBodyCostume() ) + anchorY; @@ -518,12 +518,12 @@ SpriteLayerCell SpriteLayerRenderer::ResolveCell( // OFFSET: 0x00641130 // FUNCTION: fn_04813 std::pair SpriteLayerRenderer::GetItemOffset(int layer) { - if (g_session.IsDoramJob(this->pc->unknown_025C) == true) { + if (g_session.IsDoramJob(this->pc->job) == true) { CPc* pc = this->pc; int turn = 0; - if (pc->unknown_043C == 2) { + if (pc->headDir == 2) { turn = -1; - } else if (pc->unknown_043C == 1) { + } else if (pc->headDir == 1) { turn = 1; } @@ -537,7 +537,7 @@ std::pair SpriteLayerRenderer::GetItemOffset(int layer) { int x = 0; int y = 0; - g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", this->layerViews[layer], direction, pc->unknown_0260, &x, &y); + g_session.m_hotkeyScript->Call("OffsetItemPos_GetOffsetForDoram", "ddd>dd", this->layerViews[layer], direction, pc->sex, &x, &y); return std::make_pair(x, y); } @@ -549,13 +549,13 @@ std::pair SpriteLayerRenderer::GetItemOffset(int layer) { const std::uint32_t* SpriteLayerRenderer::GetPalette(int layer, CSprRes* sprite, CActRes*) { switch (layer) { case 0: - if (static_cast(this->pc->render.unknown_0048) > 0) { + if (static_cast(this->pc->render.bodyPalette) > 0) { return static_cast(ResourceMgr::Instance().Load(this->pc->render.name))->palette; } break; case 1: - if (this->pc->unknown_0444 > 0) { - return static_cast(ResourceMgr::Instance().Load(this->pc->unknown_0478))->palette; + if (this->pc->headPalette > 0) { + return static_cast(ResourceMgr::Instance().Load(this->pc->headPaletteName))->palette; } break; } @@ -628,7 +628,7 @@ void SpriteLayerRenderer::DrawLayer( int box[4]; std::uint32_t quadColor; if (!this->pc->PrepareSprite( - index, this->unknown_0060, this->distanceScale, *resolved.cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, &topRhw, + index, this->layerShift, this->distanceScale, *resolved.cell, this->x, this->y, &this->position.x, this->scale, &bottomRhw, &topRhw, resolved.image, &quad, box, &quadColor, offsetX, offsetY, 0 )) { continue; @@ -646,9 +646,9 @@ void SpriteLayerRenderer::DrawLayer( } if (layer == 1) { - this->pc->unknown_04EC = static_cast(resolved.cell->x + this->swingX); - this->pc->unknown_04F0 = static_cast(resolved.cell->y + this->swingY); - if (this->unknown_006C == true) { + this->pc->extentRight = static_cast(resolved.cell->x + this->swingX); + this->pc->extentBottom = static_cast(resolved.cell->y + this->swingY); + if (this->hideHeadLayer == true) { continue; } } @@ -666,12 +666,12 @@ void SpriteLayerRenderer::DrawLayer( blend = 1; break; case 4: - blend = this->pc->unknown_0458 == 0xB9 ? 0x11 : 1; + blend = this->pc->accessory3 == 0xB9 ? 0x11 : 1; break; default: blend = 0x101; - if (quad.color >= 0xFF000000 && this->unknown_0030 == 1) { - switch (this->unknown_0034) { + if (quad.color >= 0xFF000000 && this->blendMode == 1) { + switch (this->blendVariant) { case 1: if (layer == 5) { blend = layer; @@ -687,11 +687,11 @@ void SpriteLayerRenderer::DrawLayer( break; } - if ((layer == 0 || layer == 1) && this->pc->render.unknown_00A4Bytes[1] == 1) { + if ((layer == 0 || layer == 1) && this->pc->render.visibilityOptions[1] == 1) { this->bounds.Include(&quad.top); } - this->unknown_0094 = true; + this->alternateLayerRendering = true; this->pc->ApplyLayerEffects( &quad, resolved.cell, layer, box, this->scale, this->rhw, bottomRhw, topRhw, this->x, this->y, palette, resolved.image, &blend, offsetX, offsetY @@ -700,8 +700,8 @@ void SpriteLayerRenderer::DrawLayer( this->pc->DrawStatusOverlays(quad, palette); if (layer == 0) { this->pc->blend = blend; - this->pc->unknown_04A4 = resolved.cell->x; - this->pc->unknown_04A8 = resolved.cell->y; + this->pc->layerCellX = resolved.cell->x; + this->pc->layerCellY = resolved.cell->y; this->DrawRobe(true); } } @@ -720,11 +720,11 @@ void SpriteLayerRenderer::LoadLayers() { if (layer == 1) { const ActionFrame& frame = static_cast(action)->Frame(this->pc->render.previousAnimation, this->pc->render.curMotion); if (frame.Cell(GetSlotLayer(1)).image == -1) { - this->unknown_006D = true; + this->hideAccessories = true; } if (StateFlag11(this->pc->stateFlags) == true) { - if (g_session.IsDoramJob(this->pc->unknown_025C) == true) { + if (g_session.IsDoramJob(this->pc->job) == true) { sprite = ResourceMgr::Instance().Load("이팩트\\orcface_doram.spr"); action = ResourceMgr::Instance().Load("이팩트\\orcface_doram.act"); } else { @@ -741,7 +741,7 @@ void SpriteLayerRenderer::LoadLayers() { for (int layer = 2; layer <= 4; ++layer) { if (g_session.IsSpecialMonsterJob(this->layerViews[layer]) == true) { - this->unknown_006C = true; + this->hideHeadLayer = true; return; } } diff --git a/Source/Contents/SpriteLayerDrawing.h b/Source/Contents/SpriteLayerDrawing.h index 436d39c2a..e57edcf3e 100644 --- a/Source/Contents/SpriteLayerDrawing.h +++ b/Source/Contents/SpriteLayerDrawing.h @@ -62,8 +62,8 @@ public: void LoadLayers(); /* 0000 */ float matrix[12]; - /* 0030 */ int unknown_0030; - /* 0034 */ char unknown_0034; + /* 0030 */ int blendMode; + /* 0034 */ char blendVariant; /* 0038 */ CPc* pc; /* 003C */ vector3d position; /* 0048 */ float x; @@ -72,15 +72,15 @@ public: /* 0054 */ float distanceScale; /* 0058 */ float scale; /* 005C */ CImfRes* imf; - /* 0060 */ int unknown_0060; + /* 0060 */ int layerShift; /* 0064 */ int swingX; /* 0068 */ int swingY; - /* 006C */ bool unknown_006C; - /* 006D */ bool unknown_006D; + /* 006C */ bool hideHeadLayer; + /* 006D */ bool hideAccessories; /* 0070 */ std::map layers; /* 0078 */ std::map layerViews; /* 0080 */ RenderBounds bounds; - /* 0094 */ bool unknown_0094; + /* 0094 */ bool alternateLayerRendering; /* 0098 */ std::map quads; /* 00A0 */ float depthScale; /* 00A4 */ float depthBias; diff --git a/Source/Contents/SpriteRidingOffset.cpp b/Source/Contents/SpriteRidingOffset.cpp index 77b23d103..abce2332c 100644 --- a/Source/Contents/SpriteRidingOffset.cpp +++ b/Source/Contents/SpriteRidingOffset.cpp @@ -31,7 +31,7 @@ int SpriteRidingOffset(const ActionFrame* frame, unsigned animation, unsigned mo const ActionAnchor& base = baseFrame->anchors.front(); const ActionAnchor& riding = frame->anchors.front(); - if (base.unknown_0008 != riding.unknown_0008) { + if (base.attachmentId != riding.attachmentId) { return 0; } diff --git a/Source/Contents/SpriteRobe.cpp b/Source/Contents/SpriteRobe.cpp index 2cdcc64b9..eb096aa47 100644 --- a/Source/Contents/SpriteRobe.cpp +++ b/Source/Contents/SpriteRobe.cpp @@ -21,17 +21,17 @@ void CCharacterRender::RenderRobe( std::list& primitives, bool drawOnTop, const void*, int& layer, const float* position, float x, float y, float scale, float shift, float, CActRes* baseAct ) { - if (this->unknown_00BC < 1 || this->unknown_00C0 == 1 || (this->unknown_0040 >= 64 && this->unknown_0040 <= 71) - || (this->unknown_005C == -1 && this->unknown_0060 == -1 && this->unknown_0064 == -1)) { + if (this->robe < 1 || this->isHelmRobe == 1 || (this->actionIndex >= 64 && this->actionIndex <= 71) + || (this->bodyBlend == -1 && this->bodyCellX == -1 && this->bodyCellY == -1)) { return; } if (this->DrawOnTop() == drawOnTop) { std::string sprName = g_session.GetRobeSprName( - this->unknown_0010, this->unknown_0014, this->unknown_0018[0], this->unknown_00BC, this->unknown_004C, this->unknown_0050 + this->job, this->headJob, this->appearance[0], this->robe, this->riding, this->bodyCostume ); std::string actName = g_session.GetRobeActName( - this->unknown_0010, this->unknown_0014, this->unknown_0018[0], this->unknown_00BC, this->unknown_004C, this->unknown_0050 + this->job, this->headJob, this->appearance[0], this->robe, this->riding, this->bodyCostume ); if (!ResourceMgr::Instance().Exists(sprName) || !ResourceMgr::Instance().Exists(actName)) { return; @@ -39,16 +39,16 @@ void CCharacterRender::RenderRobe( CSprRes* sprite = static_cast(ResourceMgr::Instance().Load(sprName)); CActRes* act = static_cast(ResourceMgr::Instance().Load(actName)); - int frame = this->unknown_0044; + int frame = this->frameIndex; if (baseAct) { int baseFrame = frame; - if ((this->unknown_0040 >= 0 && this->unknown_0040 < 8) || (this->unknown_0040 >= 16 && this->unknown_0040 <= 22)) { + if ((this->actionIndex >= 0 && this->actionIndex < 8) || (this->actionIndex >= 16 && this->actionIndex <= 22)) { baseFrame = 0; } - g_session.GetSyncedFrame(baseAct, act, this->unknown_0040, baseFrame, 0, &frame); + g_session.GetSyncedFrame(baseAct, act, this->actionIndex, baseFrame, 0, &frame); } - const ActionFrame& actionFrame = act->Frame(this->unknown_0040, frame); + const ActionFrame& actionFrame = act->Frame(this->actionIndex, frame); for (int index = 0; index < actionFrame.cellCount; ++index) { const SpriteFrameCell& cell = actionFrame.Cell(index); if (cell.image == -1) { @@ -56,7 +56,7 @@ void CCharacterRender::RenderRobe( } reinterpret_cast(&const_cast(cell).color)[3] = - static_cast(g_session.GetRobeAlpha(this->unknown_00BC)); + static_cast(g_session.GetRobeAlpha(this->robe)); const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; SpriteQuad quad; @@ -73,13 +73,13 @@ void CCharacterRender::RenderRobe( quad.bottomRhw = bottomDepth - 0.0000065f; quad.topRhw = topDepth - 0.0000065f; } - if (this->unknown_0040 >= 58 && this->unknown_0040 <= 61) { + if (this->actionIndex >= 58 && this->actionIndex <= 61) { quad.bottomRhw = quad.bottomRhw + 0.0000065f; quad.topRhw = quad.topRhw + 0.0000065f; } quad.image = image; - RenderPrimitive* primitive = BuildSpriteQuad(*GetRenderSystemHolder()->system, quad, sprite->palette, this->unknown_005C, 0.0f, 0.0f); + RenderPrimitive* primitive = BuildSpriteQuad(*GetRenderSystemHolder()->system, quad, sprite->palette, this->bodyBlend, 0.0f, 0.0f); primitives.push_back(primitive); } } diff --git a/Source/Contents/SpriteRobeCommands.cpp b/Source/Contents/SpriteRobeCommands.cpp index 421fa5869..60bea5840 100644 --- a/Source/Contents/SpriteRobeCommands.cpp +++ b/Source/Contents/SpriteRobeCommands.cpp @@ -27,17 +27,17 @@ void CCharacterRender::RenderRobeCommands( std::list& commands, bool drawOnTop, const void*, int& layer, const float* position, float x, float y, float scale, float shift, float ) { - if (this->unknown_00BC < 1 || this->unknown_00C0 == 1 || (this->unknown_0040 >= 64 && this->unknown_0040 <= 71) - || (this->unknown_005C == -1 && this->unknown_0060 == -1 && this->unknown_0064 == -1)) { + if (this->robe < 1 || this->isHelmRobe == 1 || (this->actionIndex >= 64 && this->actionIndex <= 71) + || (this->bodyBlend == -1 && this->bodyCellX == -1 && this->bodyCellY == -1)) { return; } if (this->DrawOnTop() == drawOnTop) { std::string sprName = g_session.GetRobeSprName( - this->unknown_0010, this->unknown_0014, this->unknown_0018[0], this->unknown_00BC, this->unknown_004C, this->unknown_0050 + this->job, this->headJob, this->appearance[0], this->robe, this->riding, this->bodyCostume ); std::string actName = g_session.GetRobeActName( - this->unknown_0010, this->unknown_0014, this->unknown_0018[0], this->unknown_00BC, this->unknown_004C, this->unknown_0050 + this->job, this->headJob, this->appearance[0], this->robe, this->riding, this->bodyCostume ); if (!ResourceMgr::Instance().Exists(sprName) || !ResourceMgr::Instance().Exists(actName)) { return; @@ -45,15 +45,15 @@ void CCharacterRender::RenderRobeCommands( CSprRes* sprite = static_cast(ResourceMgr::Instance().Load(sprName)); CActRes* act = static_cast(ResourceMgr::Instance().Load(actName)); - const ActionFrame& actionFrame = act->Frame(this->unknown_0040, this->unknown_0044); + const ActionFrame& actionFrame = act->Frame(this->actionIndex, this->frameIndex); for (int index = 0; index < actionFrame.cellCount; ++index) { - const SpriteFrameCell& cell = act->Frame(this->unknown_0040, this->unknown_0044).Cell(index); + const SpriteFrameCell& cell = act->Frame(this->actionIndex, this->frameIndex).Cell(index); if (cell.image == -1) { continue; } reinterpret_cast(&const_cast(cell).color)[3] = - static_cast(g_session.GetRobeAlpha(this->unknown_00BC)); + static_cast(g_session.GetRobeAlpha(this->robe)); const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; SpriteQuad quad; @@ -72,11 +72,11 @@ void CCharacterRender::RenderRobeCommands( quad.bottomRhw = bottom - 0.0000065f; quad.topRhw = top - 0.0000065f; } - if (this->unknown_0040 >= 58 && this->unknown_0040 <= 61) { + if (this->actionIndex >= 58 && this->actionIndex <= 61) { quad.bottomRhw = quad.bottomRhw + 0.0000065f; quad.topRhw = quad.topRhw + 0.0000065f; } - if (drawOnTop && g_session.IsTopLayerRobe(this->unknown_00BC)) { + if (drawOnTop && g_session.IsTopLayerRobe(this->robe)) { const float bias = g_cameraDistance < 320.0f ? 0.000251f : 0.00011f; quad.bottomRhw = bottom + bias; quad.topRhw = top + bias; diff --git a/Source/Contents/SpriteShadow.cpp b/Source/Contents/SpriteShadow.cpp index d974a90e5..ea02f662e 100644 --- a/Source/Contents/SpriteShadow.cpp +++ b/Source/Contents/SpriteShadow.cpp @@ -22,7 +22,7 @@ __declspec(safebuffers) RenderPrimitive* CCharacterRender::DrawShadow(const floa } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const float* origin = reinterpret_cast(&this->unknown_0004); + const float* origin = reinterpret_cast(&this->positionX); float position[3]; position[0] = origin[0]; position[1] = mode->scene->terrain->Height(origin[0], origin[2]); @@ -32,11 +32,11 @@ __declspec(safebuffers) RenderPrimitive* CCharacterRender::DrawShadow(const floa float screenX; float screenY; float reciprocalDepth; - if (this->unknown_0068 == 0 && this->unknown_006C == 0) { + if (this->viewportWidth == 0 && this->viewportHeight == 0) { g_renderer->ProjectViewport(position, matrix, &screenX, &screenY, &reciprocalDepth); } else { g_renderer->ProjectViewportCentered( - position, matrix, &screenX, &screenY, &reciprocalDepth, static_cast(this->unknown_0068) + this->unknown_0054, static_cast(this->unknown_006C) + this->unknown_0058 + position, matrix, &screenX, &screenY, &reciprocalDepth, static_cast(this->viewportWidth) + this->viewportOffsetX, static_cast(this->viewportHeight) + this->viewportOffsetY ); } const float distanceScale = g_renderer->ScaleDistance(reciprocalDepth); @@ -49,14 +49,14 @@ __declspec(safebuffers) RenderPrimitive* CCharacterRender::DrawShadow(const floa } const SpriteRleImage* image = sprite->images[cell.imageType][0]; - const float size = g_session.GetNpcLocationRadius(this->unknown_0010, this->unknown_004C) * scale; + const float size = g_session.GetNpcLocationRadius(this->job, this->riding) * scale; const double factor = distanceScale; SpriteQuad quad; quad.top = static_cast(cell.y * factor * cell.scaleY * size + screenY); - quad.bottom = static_cast(((image->unknown_0006 + 1) * image->height + cell.y) * factor * cell.scaleY * size + screenY + 1.0); + quad.bottom = static_cast(((image->doubleHeight + 1) * image->height + cell.y) * factor * cell.scaleY * size + screenY + 1.0); quad.left = static_cast(cell.x * factor * cell.scaleX * size + screenX); - quad.right = static_cast(((image->unknown_0004 + 1) * image->width + cell.x) * factor * cell.scaleX * size + screenX + 1.0); + quad.right = static_cast(((image->doubleWidth + 1) * image->width + cell.x) * factor * cell.scaleX * size + screenX + 1.0); if (quad.top >= static_cast(g_renderer->viewport.height) || quad.bottom <= 0.0f || quad.left >= static_cast(g_renderer->viewport.width) || quad.right <= 0.0f) { return nullptr; @@ -66,7 +66,7 @@ __declspec(safebuffers) RenderPrimitive* CCharacterRender::DrawShadow(const floa (cell.color >> 16 & 0xFF); quad.bottomRhw = 1.0f / (depth - (quad.bottom - screenY) * g_cotangent) + 0.00001f; quad.topRhw = 1.0f / (depth - (quad.top - screenY) * g_cotangent) + 0.00001f; - quad.angle = static_cast(cell.unknown_001C); + quad.angle = static_cast(cell.rotation); quad.image = image; return BuildSpriteQuad(*GetRenderSystemHolder()->system, quad, sprite->palette, 257, 0.0f, 0.0f); diff --git a/Source/Contents/Store/MCStoreInfoBackup.cpp b/Source/Contents/Store/MCStoreInfoBackup.cpp index a73bec9dd..60112def1 100644 --- a/Source/Contents/Store/MCStoreInfoBackup.cpp +++ b/Source/Contents/Store/MCStoreInfoBackup.cpp @@ -46,7 +46,7 @@ int CMCStoreInfoBackup::Restore(unsigned char wholeItem, int maximum) { found.second.quantity = std::min(found.second.quantity, saved->quantity); } - if (found.second.unknown_0000[1] != 0) { + if (found.second.identity[1] != 0) { lists.AddItem1768(found.second, wholeItem, 0); lists.RemoveItem1750(found.second, wholeItem, 0); } @@ -152,7 +152,7 @@ void CMCStoreInfoBackup::Load( } g_asyncWorkMgr->LoadStore(accountId, characterId, accountName, this->LoadUrl(), - std::string(reinterpret_cast(&g_session.unknown_807C[0x08]), 16), type); + std::string(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16), type); } // OFFSET: 0x00606EB0 @@ -168,7 +168,7 @@ void CMCStoreInfoBackup::Save(int type) { Json::StyledWriter writer; const std::string response = writer.write(root); g_asyncWorkMgr->SaveStore(g_session.m_aid, g_session.m_gid, std::string(g_session.m_accountName.c_str()), this->SaveUrl(), - std::string(reinterpret_cast(&g_session.unknown_807C[8]), 16), response, this->type); + std::string(reinterpret_cast(&g_session.webServiceLoginData[8]), 16), response, this->type); ++this->pendingSaves; } diff --git a/Source/Contents/Store/StoreBackupData.cpp b/Source/Contents/Store/StoreBackupData.cpp index 208408e85..e587cac46 100644 --- a/Source/Contents/Store/StoreBackupData.cpp +++ b/Source/Contents/Store/StoreBackupData.cpp @@ -46,17 +46,17 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) { item.SetItemId(value.get("ID", 0).asInt()); item.quantity = value.get("Count", 0).asInt(); item.identified = value.get("Identified", 0).asBool(); - item.unknown_0060 = value.get("RefiningLevel", 0).asInt(); - item.unknown_0088 = static_cast(value.get("GradeLevel", 0).asInt()); + item.refiningLevel = value.get("RefiningLevel", 0).asInt(); + item.grade = static_cast(value.get("GradeLevel", 0).asInt()); - StoreField(item.unknown_001C + 0, value.get("Slot_1", 0).asInt()); - StoreField(item.unknown_001C + 4, value.get("Slot_2", 0).asInt()); - StoreField(item.unknown_001C + 8, value.get("Slot_3", 0).asInt()); - StoreField(item.unknown_001C + 12, value.get("Slot_4", 0).asInt()); - item.unknown_0098 = value.get("RandomOptionCount", 0).asInt(); + StoreField(item.cards + 0, value.get("Slot_1", 0).asInt()); + StoreField(item.cards + 4, value.get("Slot_2", 0).asInt()); + StoreField(item.cards + 8, value.get("Slot_3", 0).asInt()); + StoreField(item.cards + 12, value.get("Slot_4", 0).asInt()); + item.optionCount = value.get("RandomOptionCount", 0).asInt(); Json::Value options = value["RandomOptionList"]; int index = 0; - unsigned char* record = item.unknown_009C; + unsigned char* record = item.options; for (auto option = options.begin(); option != options.end() && index <= 5; ++option, ++index, record += 5) { StoreField(record, (*option).get("OptIndex", 0).asInt()); @@ -64,11 +64,11 @@ void CMCStoreInfoBackup::ImportData(Json::Value& data) { record[4] = static_cast((*option).get("Parm1", 0).asInt()); } - item.unknown_0014[0] = static_cast(value.get("Price", 0).asInt()); + item.prices[0] = static_cast(value.get("Price", 0).asInt()); this->items.push_back(item); } - UIWindow* window = g_windowMgr.unknown_02FC ? g_windowMgr.unknown_02FC : g_windowMgr.unknown_040C; + UIWindow* window = g_windowMgr.merchantShopMakeWnd ? g_windowMgr.merchantShopMakeWnd : g_windowMgr.buyingShopMakeWnd; if (window) { static_cast(window)->Refresh(); @@ -88,22 +88,22 @@ void CMCStoreInfoBackup::ExportData(Json::Value& data) const { value["ID"] = std::atoi(item.itemId.c_str()); value["Count"] = item.quantity; value["Identified"] = item.identified != 0; - value["RefiningLevel"] = item.unknown_0060; - value["GradeLevel"] = item.unknown_0088; + value["RefiningLevel"] = item.refiningLevel; + value["GradeLevel"] = item.grade; const char* slotKeys[] = {"Slot_1", "Slot_2", "Slot_3", "Slot_4"}; for (unsigned index = 0; index < 4; ++index) { std::int32_t slot; - std::memcpy(&slot, item.unknown_001C + 4 * index, sizeof(slot)); + std::memcpy(&slot, item.cards + 4 * index, sizeof(slot)); value[slotKeys[index]] = slot; } - const int count = item.unknown_0098; + const int count = item.optionCount; value["RandomOptionCount"] = count; Json::Value options; for (int index = 0; index < count; ++index) { - const auto* record = reinterpret_cast(&item) + offsetof(ITEM_INFO, unknown_009C) + index * 5; + const auto* record = reinterpret_cast(&item) + offsetof(ITEM_INFO, options) + index * 5; std::int16_t id, amount; std::memcpy(&id, record, sizeof(id)); std::memcpy(&amount, record + 2, sizeof(amount)); @@ -115,7 +115,7 @@ void CMCStoreInfoBackup::ExportData(Json::Value& data) const { } value["RandomOptionList"] = options; - value["Price"] = static_cast(item.unknown_0014[0]); + value["Price"] = static_cast(item.prices[0]); values.append(value); } diff --git a/Source/Contents/TipBoxTitles.cpp b/Source/Contents/TipBoxTitles.cpp index 7730a1239..39621a357 100644 --- a/Source/Contents/TipBoxTitles.cpp +++ b/Source/Contents/TipBoxTitles.cpp @@ -99,11 +99,11 @@ CTipBoxMgr::CTipBoxMgr() m_currentEntry{}, m_image{}, m_imagePath{}, - unknown_00B4(0), + paragraphIndex(0), m_initialized(true), m_missing{}, - unknown_0114(0), - unknown_0118(0) { + currentTipId(0), + maxTipId(0) { } // INLINED @@ -164,7 +164,7 @@ TipBoxEntry& CTipBoxMgr::SelectRandomTip() { this->m_randomList.clear(); for (auto it = this->m_entries.begin(); it != this->m_entries.end(); ++it) { - if (it->first < 1000 && it->second.unknown_0018 == 1) { + if (it->first < 1000 && it->second.randomEligible == 1) { this->m_randomList.push_back(it->first); } } @@ -217,30 +217,30 @@ std::string CTipBoxMgr::Title(int id, std::string* abbreviated, int width) const void CTipBoxMgr::Sub7ACF50() { const TipBoxEntry& entry = this->m_currentEntry; - if (entry.unknown_001C.size() == 0) { + if (entry.bitmapName.size() == 0) { this->m_image.kind = 2; return; } - const int cell = entry.unknown_0044 - 1; + const int cell = entry.imageCell - 1; const float cellWidth = static_cast(this->m_width) / 3.0f; const int row = cell / 3; const int column = cell % 3; const float cellHeight = static_cast(this->m_height) / 3.0f; - const std::size_t found = entry.unknown_001C.find("유저인터페이스\\"); + const std::size_t found = entry.bitmapName.find("유저인터페이스\\"); this->m_image.x = static_cast(column) * cellWidth + cellWidth * 0.5f; this->m_image.y = static_cast(this->m_maximumId) + cellHeight * 0.5f + static_cast(row) * cellHeight; if (found != std::string::npos) { - this->m_imagePath = entry.unknown_001C + ".bmp"; + this->m_imagePath = entry.bitmapName + ".bmp"; const auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_imagePath.c_str()))); if (!bitmap) { return; } - const float scale = static_cast(entry.unknown_0048) * 0.01f; + const float scale = static_cast(entry.imageScalePercent) * 0.01f; this->m_image.x -= static_cast(bitmap->image.width) * 0.5f * scale; this->m_image.y -= static_cast(bitmap->image.height) * 0.5f * scale; @@ -264,7 +264,7 @@ void CTipBoxMgr::Sub7ACF50() { this->m_image.scale = scale; this->m_image.height = static_cast(bitmap->image.height) * scale; } else { - this->m_imagePath = "sprite\\" + entry.unknown_001C; + this->m_imagePath = "sprite\\" + entry.bitmapName; const auto* sprite = static_cast(ResourceMgr::Instance().Load(this->m_imagePath + ".spr")); if (!sprite) { @@ -276,8 +276,8 @@ void CTipBoxMgr::Sub7ACF50() { return; } - const float scale = static_cast(entry.unknown_0048) * 0.01f; - const float ratio = static_cast(entry.unknown_0048) / 100.0f; + const float scale = static_cast(entry.imageScalePercent) * 0.01f; + const float ratio = static_cast(entry.imageScalePercent) / 100.0f; this->m_image.x -= static_cast(image->width) * 0.5f * scale; this->m_image.y -= static_cast(image->height) * 0.5f * scale; @@ -300,12 +300,12 @@ void CTipBoxMgr::Sub7ACF50() { // INLINED inline void CTipBoxMgr::AddTip(int id, std::string title, double flag, std::string text) { - if (this->unknown_0118 < id) { - this->unknown_0118 = id; + if (this->maxTipId < id) { + this->maxTipId = id; } this->m_entries[id].title = title; - this->m_entries[id].unknown_0018 = static_cast(flag) == 1; - this->m_entries[id].unknown_001C = text; + this->m_entries[id].randomEligible = static_cast(flag) == 1; + this->m_entries[id].bitmapName = text; } int AddTip(lua_State* state); @@ -368,7 +368,7 @@ bool CTipBoxMgr::RegisterLuaFunctions() { // OFFSET: 0x007AD890 // FUNCTION: fn_09130 bool CTipBoxMgr::IsLastTip() const { - return this->unknown_00B4 == static_cast(this->m_currentEntry.paragraphs.size()) - 1; + return this->paragraphIndex == static_cast(this->m_currentEntry.paragraphs.size()) - 1; } // OFFSET: 0x007AD8C0 @@ -391,7 +391,7 @@ std::vector& CTipBoxMgr::Search(std::string& keyword) { for (auto it = this->m_entries.begin(); it != this->m_entries.end(); ++it) { const TipBoxEntry entry = it->second; - if (!entry.unknown_0018) { + if (!entry.randomEligible) { continue; } @@ -410,11 +410,11 @@ std::vector& CTipBoxMgr::Search(std::string& keyword) { // OFFSET: 0x007AE050 // FUNCTION: fn_09134 void CTipBoxMgr::SelectTip(int id) { - this->unknown_00B4 = 0; + this->paragraphIndex = 0; const auto it = this->m_entries.find(id); if (it != this->m_entries.end()) { - this->unknown_0114 = id; + this->currentTipId = id; this->m_currentEntry = it->second; } @@ -561,13 +561,13 @@ int AddPageEx(lua_State* state) { const float scale = static_cast(lua_tonumber(state, -1)); if (kind != -1 && id > 0) { TipBoxImage image; - image.unknown_0000 = kind; - image.unknown_0004 = static_cast(x); - image.unknown_0008 = static_cast(y); - image.unknown_000C = static_cast(width); - image.unknown_0010 = static_cast(height); - image.unknown_0014 = static_cast(clipX); - image.unknown_0018 = scale; + image.kind = kind; + image.blink = static_cast(x); + image.fromX = static_cast(y); + image.fromY = static_cast(width); + image.toX = static_cast(height); + image.toY = static_cast(clipX); + image.duration = scale; g_itemTagOwner->AddImage(id, image); } diff --git a/Source/Contents/TipBoxTitles.h b/Source/Contents/TipBoxTitles.h index 02a2efa82..f70606dab 100644 --- a/Source/Contents/TipBoxTitles.h +++ b/Source/Contents/TipBoxTitles.h @@ -8,24 +8,24 @@ #include struct TipBoxImage { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ float unknown_0018; + /* 0000 */ int kind; + /* 0004 */ int blink; + /* 0008 */ int fromX; + /* 000C */ int fromY; + /* 0010 */ int toX; + /* 0014 */ int toY; + /* 0018 */ float duration; }; struct TipBoxEntry { TipBoxEntry(); /* 0000 */ std::string title; - /* 0018 */ unsigned char unknown_0018; - /* 001C */ std::string unknown_001C; + /* 0018 */ unsigned char randomEligible; + /* 001C */ std::string bitmapName; /* 0034 */ unsigned char searchable; /* 0038 */ std::vector paragraphs; - /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; + /* 0044 */ int imageCell; + /* 0048 */ int imageScalePercent; /* 004C */ std::vector images; }; @@ -61,8 +61,8 @@ public: void AddTip(int id, std::string title, double flag, std::string text); // INLINED void SetImageCoord(int id, int x, int y) { - this->m_entries[id].unknown_0044 = x; - this->m_entries[id].unknown_0048 = y; + this->m_entries[id].imageCell = x; + this->m_entries[id].imageScalePercent = y; } // INLINED void SetSearchable(int id, bool searchable) { @@ -81,11 +81,11 @@ public: TipBoxEntry m_currentEntry; TipBoxLayout m_image; std::string m_imagePath; - int unknown_00B4; + int paragraphIndex; bool m_initialized; TipBoxEntry m_missing; - int unknown_0114; - int unknown_0118; + int currentTipId; + int maxTipId; }; extern CTipBoxMgr* g_itemTagOwner; @@ -98,10 +98,10 @@ static_assert(offsetof(TipBoxEntry, images) == 0x4C); static_assert(sizeof(CTipBoxMgr) == 284); static_assert(offsetof(CTipBoxMgr, m_randomList) == 0x18); static_assert(offsetof(CTipBoxMgr, m_currentEntry) == 0x24); -static_assert(offsetof(CTipBoxMgr, unknown_00B4) == 0xB4); +static_assert(offsetof(CTipBoxMgr, paragraphIndex) == 0xB4); static_assert(offsetof(CTipBoxMgr, m_image) == 0x7C); static_assert(offsetof(CTipBoxMgr, m_imagePath) == 0x9C); -static_assert(offsetof(CTipBoxMgr, unknown_0114) == 0x114); +static_assert(offsetof(CTipBoxMgr, currentTipId) == 0x114); #endif #endif diff --git a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp index 87d397073..bff4761b4 100644 --- a/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp +++ b/Source/Contents/UserData/AccountLinkedUserDataMgr.cpp @@ -69,7 +69,7 @@ CAccountLinkedUserDataMgr* g_accountLinkedUserDataMgr; // INLINED CAccountLinkedUserDataMgr::CAccountLinkedUserDataMgr() - : m_accountId(0), m_accountName(UnknownAccountName()), m_loaded(false), unknown_0028(0), m_saveUrl(""), m_loadUrl("") { + : m_accountId(0), m_accountName(UnknownAccountName()), m_loaded(false), m_pendingLoads(0), m_saveUrl(""), m_loadUrl("") { this->m_enabled = true; } @@ -178,7 +178,7 @@ void CAccountLinkedUserDataMgr::Reset(LuaScript& script, const char* host, const // OFFSET: 0x005BD650 // FUNCTION: fn_03472 void CAccountLinkedUserDataMgr::CompleteSave() { - --this->unknown_0028; + --this->m_pendingLoads; } // OFFSET: 0x005BCE50 @@ -210,8 +210,8 @@ void CAccountLinkedUserDataMgr::Save() { root["data"] = data; Json::StyledWriter writer; const std::string response = writer.write(root); - g_asyncWorkMgr->SaveAccount(this->m_accountId, this->m_accountName, this->SaveUrl(), std::string(reinterpret_cast(&g_session.unknown_807C[0x08]), 16), response); - ++this->unknown_0028; + g_asyncWorkMgr->SaveAccount(this->m_accountId, this->m_accountName, this->SaveUrl(), std::string(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16), response); + ++this->m_pendingLoads; } } diff --git a/Source/Contents/UserData/AccountLinkedUserDataMgr.h b/Source/Contents/UserData/AccountLinkedUserDataMgr.h index cfb952037..3afc73ee1 100644 --- a/Source/Contents/UserData/AccountLinkedUserDataMgr.h +++ b/Source/Contents/UserData/AccountLinkedUserDataMgr.h @@ -35,7 +35,7 @@ protected: /* 0008 */ std::uint32_t m_accountId; /* 000C */ std::string m_accountName; /* 0024 */ bool m_loaded; - /* 0028 */ std::uint32_t unknown_0028; + /* 0028 */ std::uint32_t m_pendingLoads; /* 002C */ std::string m_saveUrl; /* 0044 */ std::string m_loadUrl; }; diff --git a/Source/Contents/UserData/CharacterConfigLoad.cpp b/Source/Contents/UserData/CharacterConfigLoad.cpp index 7f65f997d..27e6bf1fc 100644 --- a/Source/Contents/UserData/CharacterConfigLoad.cpp +++ b/Source/Contents/UserData/CharacterConfigLoad.cpp @@ -60,6 +60,6 @@ void CCharacterLinkedUserDataMgr::Load(std::uint32_t accountId, std::uint32_t ch } g_asyncWorkMgr->LoadCharacter( - accountId, characterId, accountName, this->LoadUrl(), std::string(reinterpret_cast(&g_session.unknown_807C[0x08]), 16) + accountId, characterId, accountName, this->LoadUrl(), std::string(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16) ); } diff --git a/Source/Contents/UserData/CharacterConfigSave.cpp b/Source/Contents/UserData/CharacterConfigSave.cpp index b11065c34..f94ef3af7 100644 --- a/Source/Contents/UserData/CharacterConfigSave.cpp +++ b/Source/Contents/UserData/CharacterConfigSave.cpp @@ -15,11 +15,11 @@ int CSession::UseLevel(int id) const { const auto key = static_cast(id); if (key - 1u <= 0x1F3D) { - return this->m_skillBundle.unknown_0064[key]; + return this->m_skillBundle.skillValues[key]; } if (id > 10000) { - return this->unknown_0710[key - 10000u]; + return this->extendedSkillLevels[key - 10000u]; } if (this->IsHomunculusSkill(key)) { @@ -96,7 +96,7 @@ void CCharacterLinkedUserDataMgr::Save() { Json::StyledWriter writer; const std::string response = writer.write(root); g_asyncWorkMgr->SaveCharacter(this->m_accountId, this->m_characterId, this->m_accountName, this->SaveUrl(), - std::string(reinterpret_cast(&g_session.unknown_807C[0x08]), 16), response); + std::string(reinterpret_cast(&g_session.webServiceLoginData[0x08]), 16), response); ++this->m_pendingSaves; } diff --git a/Source/Contents/UserData/NormalItemSlots.cpp b/Source/Contents/UserData/NormalItemSlots.cpp index fe3bbe77a..08bd34eb0 100644 --- a/Source/Contents/UserData/NormalItemSlots.cpp +++ b/Source/Contents/UserData/NormalItemSlots.cpp @@ -75,9 +75,9 @@ int BasicInfoWndInfo::IsValid() { } if (this->height == 55 || this->height == 71) { - this->unknown_0012 = 0; + this->expanded = 0; } else if (this->height == 134 || this->height == 149) { - this->unknown_0012 = 1; + this->expanded = 1; } else { return 0; } @@ -144,7 +144,7 @@ int EquipWndInfo::IsValid() const { if (this->height != 167 && this->height != 17 && this->height != 187 && this->height != 187 + extraHeight) { return 0; } - if (this->unknown_0010 != 167 && this->unknown_0010 != 187) { + if (this->contentHeight != 167 && this->contentHeight != 187) { return 0; } @@ -168,8 +168,8 @@ int GuildHelperWndInfo::IsValid() const { // FUNCTION: fn_13632 int GuildWndInfo::IsValid() const { return this->width == g_defaultPlacementWidth && this->height == g_defaultPlacementHeight && this->x >= 0 && - this->x <= g_renderer->viewport.width - this->width && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height && this->unknown_0010 >= 0 && - this->unknown_0010 <= 6; + this->x <= g_renderer->viewport.width - this->width && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height && this->tab >= 0 && + this->tab <= 6; } // OFFSET: 0x009A5590 @@ -250,8 +250,8 @@ int ItemStoreFindSlotInfo::IsValid() const { // FUNCTION: fn_13644 int ItemWndInfo::IsValid() const { return this->x >= 0 && this->x <= g_renderer->viewport.width - this->width && this->y >= 0 && this->y <= g_renderer->viewport.height - this->height && - this->unknown_0014 >= 0 && this->unknown_0014 <= 3 && this->unknown_0018 >= 0 && this->unknown_0018 <= 3 && - this->unknown_001C >= 0 && this->unknown_001C <= 3 && this->unknown_0020 >= 0 && this->unknown_0020 <= 4; + this->selectedTab >= 0 && this->selectedTab <= 3 && this->usableRows >= 0 && this->usableRows <= 3 && + this->equipmentRows >= 0 && this->equipmentRows <= 3 && this->etcRows >= 0 && this->etcRows <= 4; } // OFFSET: 0x009A5940 @@ -264,8 +264,8 @@ int EntryQueueWndInfo::IsValid() const { // OFFSET: 0x009A5980 // FUNCTION: fn_13646 int MiniMapWndInfo::IsValid() const { - return this->unknown_0010 > 0 && this->unknown_0014 > 0 && this->width >= 0 && this->width <= g_renderer->viewport.width - this->unknown_0010 && - this->height >= 0 && this->height <= g_renderer->viewport.height - this->unknown_0014; + return this->expandedWidth > 0 && this->expandedHeight > 0 && this->width >= 0 && this->width <= g_renderer->viewport.width - this->expandedWidth && + this->height >= 0 && this->height <= g_renderer->viewport.height - this->expandedHeight; } // OFFSET: 0x009A59C0 @@ -326,8 +326,8 @@ int MerchantShopMakeWndInfo::IsValid() const { // OFFSET: 0x009A5BF0 // FUNCTION: fn_13654 int MessengerGroupWndInfo::IsValid() const { - return this->unknown_0018 <= 2 && this->width >= 243 && this->height >= 166 && this->x >= 0 && this->x <= g_renderer->viewport.width - this->width && - this->y >= 0 && this->y <= g_renderer->viewport.height - this->height && (this->unknown_0014 == 0 || this->unknown_0014 == 1); + return this->iconIndex <= 2 && this->width >= 243 && this->height >= 166 && this->x >= 0 && this->x <= g_renderer->viewport.width - this->width && + this->y >= 0 && this->y <= g_renderer->viewport.height - this->height && (this->mode == 0 || this->mode == 1); } // OFFSET: 0x009A5C50 @@ -487,15 +487,15 @@ void BasicInfoWndInfo::Reset() { this->width = 220; this->height = 134; if (g_session.IsTreeGroupThree(g_session.GetDisplayJob()) == true) { - if (this->unknown_0012 == 1) { + if (this->expanded == 1) { this->height = 149; } else { this->height = 71; } - this->unknown_0010 = 0; + this->mode = 0; } else { - this->height = this->unknown_0012 == 1 ? 134 : 55; - this->unknown_0010 = 0; + this->height = this->expanded == 1 ? 134 : 55; + this->mode = 0; } } @@ -569,8 +569,8 @@ void EquipWndInfo::Reset() { this->y = 300; this->width = 280; this->height = 167; - this->unknown_0010 = 167; - this->unknown_0014 = 0; + this->contentHeight = 167; + this->resetState = 0; } // OFFSET: 0x009A6540 @@ -607,7 +607,7 @@ void GuildWndInfo::Reset() { this->y = 34; this->width = g_defaultPlacementWidth; this->height = g_defaultPlacementHeight; - this->unknown_0010 = 0; + this->tab = 0; } // OFFSET: 0x009A65D0 @@ -698,7 +698,7 @@ void ItemStoreFindListInfo::Reset() { this->y = 200; this->width = 280; this->height = 458; - this->unknown_0010 = 0; + this->openTabs = 0; } // OFFSET: 0x009A6780 @@ -719,12 +719,12 @@ void ItemWndInfo::Reset() { this->y = 120; this->width = 280; this->height = 120; - this->unknown_0010 = 120; - this->unknown_0014 = 0; - this->unknown_0018 = 3; - this->unknown_001C = 3; - this->unknown_0020 = 4; - this->unknown_0024 = 0; + this->expandedHeight = 120; + this->selectedTab = 0; + this->usableRows = 3; + this->equipmentRows = 3; + this->etcRows = 4; + this->resetState = 0; } // OFFSET: 0x009A6850 @@ -745,11 +745,11 @@ void MiniMapWndInfo::Reset() { this->width = x; this->x = x; this->y = 190; - this->unknown_0010 = 516; - this->unknown_0014 = 559; - this->unknown_0020 = 1; - this->unknown_0018 = 1; - this->unknown_001C = 1; + this->expandedWidth = 516; + this->expandedHeight = 559; + this->showMembers = 1; + this->showQuests = 1; + this->showTowns = 1; } // OFFSET: 0x009A68C0 @@ -820,11 +820,11 @@ void MerchantShopMakeWndInfo::Reset() { void MessengerGroupWndInfo::Reset() { this->width = 273; this->height = 326; - this->unknown_0018 = 0; + this->iconIndex = 0; this->x = 300; this->y = 200; - this->unknown_0010 = 0; - this->unknown_0014 = 1; + this->resetState = 0; + this->mode = 1; } // OFFSET: 0x009A69F0 @@ -843,8 +843,8 @@ void UnusedWndInfoB::Reset() { this->y = 300; this->width = 250; this->height = 60; - this->unknown_0010 = 60; - this->unknown_0014 = 0; + this->defaultHeight = 60; + this->resetState = 0; } // OFFSET: 0x009A6AA0 @@ -904,7 +904,7 @@ void PetInfoWndInfo::Reset() { // OFFSET: 0x009A6B60 // FUNCTION: fn_13721 void QuestDisplayInfo::Reset() { - this->unknown_0000 = 1; + this->visible = 1; } // OFFSET: 0x009A6BB0 @@ -941,7 +941,7 @@ void UnusedWndInfoC::Reset() { this->y = 300; this->width = 140; this->height = 30; - this->unknown_0010 = 0; + this->resetState = 0; } // OFFSET: 0x009A6C80 @@ -968,10 +968,10 @@ void StatusWndInfo::Reset() { this->x = 185; this->y = 300; this->width = 280; - this->unknown_0014 = 0; + this->resetState = 0; this->height = 141; - this->unknown_0010 = 141; - this->unknown_0018 = 1; + this->expandedHeight = 141; + this->extended = 1; } // OFFSET: 0x009A6D00 @@ -1080,7 +1080,7 @@ void UIWindowMgr::ResetUIRectInfo() { for (int index = 0; index < 8; ++index) { storeSlots[index].Reset(index); } - this->unknown_0058 = 8; + this->itemStoreWindowCount = 8; reinterpret_cast(base + 0x6AC)->Reset(); reinterpret_cast(base + 0x6BC)->Reset(); diff --git a/Source/Contents/UserData/NormalItemSlots.h b/Source/Contents/UserData/NormalItemSlots.h index dad8817ce..6f3523e2c 100644 --- a/Source/Contents/UserData/NormalItemSlots.h +++ b/Source/Contents/UserData/NormalItemSlots.h @@ -10,14 +10,14 @@ namespace Json { #pragma pack(push, 1) struct NormalItemSlot { - /* 0000 */ std::uint8_t unknown_0000; + /* 0000 */ std::uint8_t enabled; /* 0001 */ std::uint32_t itemId; - /* 0005 */ std::int16_t unknown_0005; + /* 0005 */ std::int16_t value; }; #pragma pack(pop) static_assert(sizeof(NormalItemSlot) == 7); static_assert(offsetof(NormalItemSlot, itemId) == 1); -static_assert(offsetof(NormalItemSlot, unknown_0005) == 5); +static_assert(offsetof(NormalItemSlot, value) == 5); struct NormalItemSlotWindow { /* 0000 */ int x; @@ -50,9 +50,9 @@ struct SkillListWndInfo : WindowPlacement { }; struct StatusWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; + /* 0010 */ int expandedHeight; + /* 0014 */ int resetState; + /* 0018 */ int extended; void Reset(); int IsValid() const; @@ -94,7 +94,7 @@ struct PreviewEquipWndInfo : WindowPlacement { }; struct UnusedWndInfoC : WindowPlacement { - /* 0010 */ int unknown_0010; + /* 0010 */ int resetState; void Reset(); }; @@ -109,9 +109,9 @@ struct AchTracingWndInfo : WindowPlacement { }; struct BasicInfoWndInfo : WindowPlacement { - /* 0010 */ unsigned char unknown_0010; + /* 0010 */ unsigned char mode; /* 0011 */ unsigned char unknown_0011; - /* 0012 */ unsigned char unknown_0012; + /* 0012 */ unsigned char expanded; /* 0013 */ unsigned char unknown_0013; void Reset(); @@ -153,8 +153,8 @@ struct EmotionWndInfo : WindowPlacement { }; struct EquipWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; + /* 0010 */ int contentHeight; + /* 0014 */ int resetState; void Reset(); int IsValid() const; @@ -176,7 +176,7 @@ struct GuildHelperWndInfo : WindowPlacement { }; struct GuildWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; + /* 0010 */ int tab; void Reset(); int IsValid() const; @@ -228,7 +228,7 @@ struct ItemShopWndInfo : WindowPlacement { }; struct ItemStoreFindListInfo : WindowPlacement { - /* 0010 */ int unknown_0010; + /* 0010 */ int openTabs; void Reset(); int IsValid() const; @@ -245,12 +245,12 @@ struct ItemStoreFindSlotInfo : WindowPlacement { }; struct ItemWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; + /* 0010 */ int expandedHeight; + /* 0014 */ int selectedTab; + /* 0018 */ int usableRows; + /* 001C */ int equipmentRows; + /* 0020 */ int etcRows; + /* 0024 */ int resetState; void Reset(); int IsValid() const; @@ -262,11 +262,11 @@ struct EntryQueueWndInfo : WindowPlacement { }; struct MiniMapWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; + /* 0010 */ int expandedWidth; + /* 0014 */ int expandedHeight; + /* 0018 */ int showQuests; + /* 001C */ int showTowns; + /* 0020 */ int showMembers; void Reset(); int IsValid() const; @@ -308,9 +308,9 @@ struct MerchantShopMakeWndInfo : WindowPlacement { }; struct MessengerGroupWndInfo : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; + /* 0010 */ int resetState; + /* 0014 */ int mode; + /* 0018 */ int iconIndex; void Reset(); int IsValid() const; @@ -322,8 +322,8 @@ struct NCashWndInfo : WindowPlacement { }; struct UnusedWndInfoB : WindowPlacement { - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; + /* 0010 */ int defaultHeight; + /* 0014 */ int resetState; void Reset(); int IsValid() const; @@ -360,7 +360,7 @@ struct PetInfoWndInfo : WindowPlacement { }; struct QuestDisplayInfo { - /* 0000 */ int unknown_0000; + /* 0000 */ int visible; void Reset(); int IsValid() const; diff --git a/Source/Contents/World/SkyBox.cpp b/Source/Contents/World/SkyBox.cpp index 823133876..25f14efd1 100644 --- a/Source/Contents/World/SkyBox.cpp +++ b/Source/Contents/World/SkyBox.cpp @@ -196,8 +196,8 @@ void CLensFlare::Render(const float* matrix, vector3d eye, vector3d target) { primitive->vertices[2].v = 1.0f; primitive->vertices[3].u = 1.0f; primitive->vertices[3].v = 1.0f; - primitive->unknown_0018 = 2; - primitive->unknown_001C = 2; + primitive->sourceBlend = 2; + primitive->destinationBlend = 2; primitive->texture = g_texMgr.Load(this->m_textureName, 0, false, true, false); primitive->vertices[0].diffuse = this->m_colors[i]; primitive->vertices[1].diffuse = this->m_colors[i]; diff --git a/Source/Contents/World/World.h b/Source/Contents/World/World.h index c91ef20d5..b5d73b78c 100644 --- a/Source/Contents/World/World.h +++ b/Source/Contents/World/World.h @@ -65,28 +65,28 @@ public: /* 0004 */ CGameMode* gameMode; /* 0008 */ std::list objects; /* 0010 */ std::list actors; - /* 0018 */ std::list unknown_0018; - /* 0020 */ std::list unknown_0020; + /* 0018 */ std::list items; + /* 0020 */ std::list skills; /* 0028 */ GroundGeometry* ground; /* 002C */ CPlayer* player; /* 0030 */ C3dAttr* terrain; /* 0034 */ std::vector models; /* 0040 */ int published; /* 0044 */ int pending; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ int unknown_0050; - /* 0054 */ int unknown_0054; + /* 0048 */ int isPKZone; + /* 004C */ int isSiegeMode; + /* 0050 */ int isBattleFieldMode; + /* 0054 */ int isEventPVPMode; /* 0058 */ WorldSpatialTree spatial; /* 00D4 */ const WorldSpatialTree* serializedSpatial; /* 00D8 */ std::list pendingActorIds; /* 00E0 */ BinkMovies* movies; /* 00E4 */ std::map> actorCells; /* 00EC */ std::list unindexedActorIds; - /* 00F4 */ bool unknown_00F4; + /* 00F4 */ bool guildMasterNearby; /* 00F8 */ int nearbyRange; - /* 00FC */ bool unknown_00FC; - /* 00FD */ bool unknown_00FD; + /* 00FC */ bool backgroundFog; + /* 00FD */ bool partyRestricted; }; CRenderObject* FindRenderObject(std::uint32_t aid); @@ -95,8 +95,8 @@ CRenderObject* FindRenderObject(std::uint32_t aid); static_assert(offsetof(CWorld, gameMode) == 0x04); static_assert(offsetof(CWorld, objects) == 0x08); static_assert(offsetof(CWorld, actors) == 0x10); -static_assert(offsetof(CWorld, unknown_0018) == 0x18); -static_assert(offsetof(CWorld, unknown_0020) == 0x20); +static_assert(offsetof(CWorld, items) == 0x18); +static_assert(offsetof(CWorld, skills) == 0x20); static_assert(offsetof(CWorld, ground) == 0x28); static_assert(offsetof(CWorld, player) == 0x2C); static_assert(offsetof(CWorld, terrain) == 0x30); @@ -109,10 +109,10 @@ static_assert(offsetof(CWorld, pendingActorIds) == 0xD8); static_assert(offsetof(CWorld, movies) == 0xE0); static_assert(offsetof(CWorld, actorCells) == 0xE4); static_assert(offsetof(CWorld, unindexedActorIds) == 0xEC); -static_assert(offsetof(CWorld, unknown_00F4) == 0xF4); +static_assert(offsetof(CWorld, guildMasterNearby) == 0xF4); static_assert(offsetof(CWorld, nearbyRange) == 0xF8); -static_assert(offsetof(CWorld, unknown_00FC) == 0xFC); -static_assert(offsetof(CWorld, unknown_00FD) == 0xFD); +static_assert(offsetof(CWorld, backgroundFog) == 0xFC); +static_assert(offsetof(CWorld, partyRestricted) == 0xFD); static_assert(sizeof(CWorld) == 0x100); #endif diff --git a/Source/Contents/World/WorldModelLoading.cpp b/Source/Contents/World/WorldModelLoading.cpp index cdd1c5c1e..360244b09 100644 --- a/Source/Contents/World/WorldModelLoading.cpp +++ b/Source/Contents/World/WorldModelLoading.cpp @@ -157,7 +157,7 @@ void CWorld::InitWorld() { this->movies = new BinkMovies(); this->serializedSpatial = worldRes->spatial; - int* modeBounds = reinterpret_cast(this->gameMode->unknown_0058); + int* modeBounds = reinterpret_cast(this->gameMode->areaBounds); modeBounds[0] = worldRes->bounds[2]; modeBounds[1] = worldRes->bounds[3]; modeBounds[2] = worldRes->bounds[0]; diff --git a/Source/Contents/World/WorldModelView.cpp b/Source/Contents/World/WorldModelView.cpp index eaf9dd790..53a5d6cae 100644 --- a/Source/Contents/World/WorldModelView.cpp +++ b/Source/Contents/World/WorldModelView.cpp @@ -252,8 +252,8 @@ void CView::Render() { this->scene->ground->DrawGrid(matrix, g_groundOverlayA, g_groundOverlayB, g_groundOverlayC); } - if (g_session.unknown_5614 != 0 && g_session.unknown_5600 != 0 && g_session.unknown_5604 != 0) { - this->scene->ground->DrawGrid(matrix, g_session.unknown_5600, g_session.unknown_5604, 0xfeff0000); + if (g_session.homunAlive != 0 && g_session.homunEnemyX != 0 && g_session.homunEnemyY != 0) { + this->scene->ground->DrawGrid(matrix, g_session.homunEnemyX, g_session.homunEnemyY, 0xfeff0000); } for (auto it = this->scene->objects.begin(); it != this->scene->objects.end(); ++it) { @@ -265,13 +265,13 @@ void CView::Render() { const float x = this->camera.target[0] - this->frame.eye[0]; const float y = this->camera.target[1] - this->frame.eye[1]; const float z = this->camera.target[2] - this->frame.eye[2]; - *reinterpret_cast(&g_renderer->unknown_003C) = x; - *reinterpret_cast(&g_renderer->unknown_0040) = y; - *reinterpret_cast(&g_renderer->unknown_0044) = z; + *reinterpret_cast(&g_renderer->viewDirectionX) = x; + *reinterpret_cast(&g_renderer->viewDirectionY) = y; + *reinterpret_cast(&g_renderer->viewDirectionZ) = z; const float inverseLength = 1.0f / SquareRoot(x * x + y * y + z * z); - *reinterpret_cast(&g_renderer->unknown_003C) *= inverseLength; - *reinterpret_cast(&g_renderer->unknown_0040) *= inverseLength; - *reinterpret_cast(&g_renderer->unknown_0044) *= inverseLength; + *reinterpret_cast(&g_renderer->viewDirectionX) *= inverseLength; + *reinterpret_cast(&g_renderer->viewDirectionY) *= inverseLength; + *reinterpret_cast(&g_renderer->viewDirectionZ) *= inverseLength; this->spatial.inside.clear(); this->spatial.clipped.clear(); diff --git a/Source/Contents/World/WorldObjects.cpp b/Source/Contents/World/WorldObjects.cpp index 73e97f0f6..240a2c07f 100644 --- a/Source/Contents/World/WorldObjects.cpp +++ b/Source/Contents/World/WorldObjects.cpp @@ -173,8 +173,8 @@ void CWorld::OnProcess() { } for (const std::uint32_t aid : this->pendingActorIds) { - auto skillEntry = this->unknown_0020.begin(); - for (; skillEntry != this->unknown_0020.end(); ++skillEntry) { + auto skillEntry = this->skills.begin(); + for (; skillEntry != this->skills.end(); ++skillEntry) { CSkill* skill = static_cast(*skillEntry); if (skill->skillAid != aid) { continue; @@ -204,7 +204,7 @@ void CWorld::OnProcess() { break; } } - this->unknown_0020.erase(skillEntry); + this->skills.erase(skillEntry); } break; } @@ -255,8 +255,8 @@ void CWorld::Clear() { this->player = nullptr; this->actors.clear(); - this->unknown_0018.clear(); - this->unknown_0020.clear(); + this->items.clear(); + this->skills.clear(); g_effectMgr->Clear(); this->pendingActorIds.clear(); this->actorCells.clear(); @@ -338,7 +338,7 @@ CCorpse* CGameMode::SpawnCorpse(float x, float y, float z, const char* action, c // OFFSET: 0x00AC8350 // FUNCTION: fn_17669 CItem* CWorld::GetItemByAID(std::uint32_t aid) const { - for (CRenderObject* object : this->unknown_0018) { + for (CRenderObject* object : this->items) { CItem* item = static_cast(object); if (item->itemAid == aid) { @@ -354,7 +354,7 @@ CItem* CWorld::GetItemByAID(std::uint32_t aid) const { CRenderObject* CWorld::GetActorByGID(int gid) const { auto it = std::find_if(this->actors.begin(), this->actors.end(), [gid](CRenderObject* object) { CGameActor* actor = static_cast(object); - return !actor->unknown_0314 && gid == actor->GetPkState(); + return !actor->objectType && gid == actor->GetPkState(); }); if (it != this->actors.end()) { @@ -367,7 +367,7 @@ CRenderObject* CWorld::GetActorByGID(int gid) const { // OFFSET: 0x00AC8440 // FUNCTION: fn_17671 CRenderObject* CWorld::GetSkillByAID(std::uint32_t aid) const { - for (CRenderObject* object : this->unknown_0020) { + for (CRenderObject* object : this->skills) { CSkill* skill = static_cast(object); if (skill->skillAid == aid) { @@ -411,7 +411,7 @@ bool CGameMode::LaunchTargetEffect(int effectId, CGameActor* source, CGameActor* } if (argument != -1) { - effect->unknown_0030 = argument; + effect->effectArgument = argument; } if (effectId == 539) { @@ -447,7 +447,7 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { return; } - if (actor->unknown_02F8 == 1 && (this->scene->unknown_0048 == 1 || this->scene->unknown_004C == 1)) { + if (actor->hasHp == 1 && (this->scene->isPKZone == 1 || this->scene->isSiegeMode == 1)) { card.name = "??????"; } else { const std::string name = this->nameCard.Name(actor->render.accountId); @@ -460,10 +460,10 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { if (actor->GetEffectiveJob(-1) == 20269) { monsterType = 0; } else { - monsterType = actor->unknown_0304; + monsterType = actor->hpGaugeFlags; } balloon->SetName(card, actor->IsPlayerClass(actor->GetEffectiveJob(-1)) == 0, monsterType); - } else if (actor->unknown_0314 == 7 || actor->unknown_0314 == 8) { + } else if (actor->objectType == 7 || actor->objectType == 8) { CActorNameCard masked = card; char name[24] = {}; strncpy_s(name, sizeof(name), masked.name.c_str(), masked.name.size()); @@ -482,13 +482,13 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { } const unsigned char showEmblem = g_serviceOptions.Get(0x40); - if (((g_session.IsNpcJob(actor->GetEffectiveJob(-1)) || g_session.IsMonsterActor(actor)) && card.unknown_0094) || - (g_session.IsAllyActor(actor->render.accountId, actor->GetEffectiveJob(-1)) && card.unknown_0094)) { - this->nameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.unknown_0094).c_str(), 0); + if (((g_session.IsNpcJob(actor->GetEffectiveJob(-1)) || g_session.IsMonsterActor(actor)) && card.groupIconId) || + (g_session.IsAllyActor(actor->render.accountId, actor->GetEffectiveJob(-1)) && card.groupIconId)) { + this->nameBalloon->SetIcon(FormatOwnedString("유저인터페이스\\group\\group_%d.bmp", card.groupIconId).c_str(), 0); } else if (actor->GetGdid() && showEmblem) { const unsigned char framedEmblem = g_serviceOptions.Get(0xF3); std::string emblem = g_guildMgr->GetEmblemFilename(actor->GetGdid()); - this->nameBalloon->SetIcon(emblem.c_str(), static_cast(g_modeMgr.GetGameMode())->scene->unknown_004C == 1 && framedEmblem ? 1 : 0); + this->nameBalloon->SetIcon(emblem.c_str(), static_cast(g_modeMgr.GetGameMode())->scene->isSiegeMode == 1 && framedEmblem ? 1 : 0); } else if (reinterpret_cast(this->scene->player) == actor) { char path[256]; std::memset(path, 0, sizeof(path)); @@ -496,18 +496,18 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { StringFormat(path, sizeof(path), static_cast(-1), "유저인터페이스\\clan_system\\clan_emblem%02d.bmp", g_clanInfo->m_clanId); } this->nameBalloon->SetIcon(path, 0); - } else if (actor->unknown_0305) { + } else if (actor->hasSp) { char path[256]; std::memset(path, 0, sizeof(path)); - std::sprintf(path, "유저인터페이스\\clan_system\\clan_emblem%02d.bmp", actor->unknown_0308); + std::sprintf(path, "유저인터페이스\\clan_system\\clan_emblem%02d.bmp", actor->spGaugeValue); this->nameBalloon->SetIcon(path, 0); } else { this->nameBalloon->SetIcon("", 0); } UINameBalloonText* balloon = this->nameBalloon; - *reinterpret_cast(this->unknown_02E4) = balloon->geometry.width; - *reinterpret_cast(&this->unknown_02E4[4]) = balloon->geometry.height; + *reinterpret_cast(this->nameBalloonSize) = balloon->geometry.width; + *reinterpret_cast(&this->nameBalloonSize[4]) = balloon->geometry.height; if (balloon) { const int aid = actor->render.accountId; if (g_serviceType == 12) { @@ -533,8 +533,8 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { balloon->m_outlineColor = 0; } - if (!actor->IsPlayerClass(actor->GetEffectiveJob(-1)) && static_cast(actor->unknown_0210) > 0 && g_session.IsMonsterActor(actor)) { - const short difference = static_cast(g_session.m_level - actor->unknown_0210); + if (!actor->IsPlayerClass(actor->GetEffectiveJob(-1)) && static_cast(actor->characterLevel) > 0 && g_session.IsMonsterActor(actor)) { + const short difference = static_cast(g_session.m_level - actor->characterLevel); if (difference < -10) { balloon->m_textColor = 0xFF; balloon->m_outlineColor = 0; @@ -544,7 +544,7 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { } } - if (g_session.m_aid == actor->unknown_02EC) { + if (g_session.m_aid == actor->emblemVersion) { balloon->m_textColor = 0xC8C8C8; balloon->m_outlineColor = 0; } @@ -556,7 +556,7 @@ void CGameMode::UpdateNameBalloon(CGameActor* actor) { // OFFSET: 0x00CD8820 // FUNCTION: fn_21302 void CGameMode::ShowGuildEmblem(CGameActor* actor, int guildId, int unused) { - if (!actor || !guildId || actor->unknown_0188 != 0) { + if (!actor || !guildId || actor->sceneNameWindow != 0) { return; } @@ -573,7 +573,7 @@ void CGameMode::ShowGuildEmblem(CGameActor* actor, int guildId, int unused) { UIEmblemWnd* window = new UIEmblemWnd; window->SendMsg(nullptr, UM_SETINFO, actor->render.accountId, guildId, 0, 0); g_windowMgr.AddRenderedFront(window); - actor->unknown_0188 = reinterpret_cast(window); + actor->sceneNameWindow = reinterpret_cast(window); this->AddUnknown0604(window); } @@ -598,8 +598,8 @@ CMsgEffect* CGameMode::SpawnCashEmotion(int aid, int packId, int emotionId, std: } effect->SendMsg(nullptr, AM_SETMASTERGID, 0, duration, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0); - effect->SendMsg(nullptr, AM_SETPOS, 0, aid, aid >> 31, reinterpret_cast(&names), reinterpret_cast(&names) >> 31, data->unknown_0020, - data->unknown_0020 >> 31, 0, 0, 0, 0, 0, 0); + effect->SendMsg(nullptr, AM_SETPOS, 0, aid, aid >> 31, reinterpret_cast(&names), reinterpret_cast(&names) >> 31, data->actionIndex, + data->actionIndex >> 31, 0, 0, 0, 0, 0, 0); } } @@ -659,12 +659,12 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { } if (actor != nullptr && g_session.IsHomunAid(actor->render.accountId)) { - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->actorMenuIds.erase(this->actorMenuIds.begin(), this->actorMenuIds.end()); menu = g_windowMgr.EnsureWindow(WID_MENUWND); - this->unknown_02E0 = pick->accountId; + this->menuTargetAid = pick->accountId; this->actorMenuIds.push_back(0x25); sprintf(text, LookupMessage(MSI_HOMUN_SHOWINFO)); @@ -676,12 +676,12 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { sprintf(text, LookupMessage(MSI_HOMUN_WAITING)); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(text), 0, 0, 0); } else if (actor != nullptr && g_session.IsMercenaryAid(pick->accountId)) { - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->actorMenuIds.erase(this->actorMenuIds.begin(), this->actorMenuIds.end()); menu = g_windowMgr.EnsureWindow(WID_MENUWND); - this->unknown_02E0 = pick->accountId; + this->menuTargetAid = pick->accountId; this->actorMenuIds.push_back(0x28); sprintf(text, LookupMessage(MSI_HOMUN_SHOWINFO)); @@ -689,13 +689,13 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { this->actorMenuIds.push_back(0x29); sprintf(text, LookupMessage(MSI_HOMUN_WAITING)); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(text), 0, 0, 0); - } else if (actor != nullptr && pick->accountId == g_session.unknown_1010 && actor->unknown_0314 == 7) { - if (g_windowMgr.unknown_0210 != nullptr) { + } else if (actor != nullptr && pick->accountId == g_session.petGid && actor->objectType == 7) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->actorMenuIds.erase(this->actorMenuIds.begin(), this->actorMenuIds.end()); menu = g_windowMgr.EnsureWindow(WID_MENUWND); - this->unknown_02E0 = pick->accountId; + this->menuTargetAid = pick->accountId; this->actorMenuIds.push_back(0x21); sprintf(text, LookupMessage(MSI_PET_SHOWINFO)); @@ -728,7 +728,7 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { if (this->ActorName(pick->accountId).empty() && !isAdmin) { return; } - if (this->unknown_00E4 != g_mouse.x || this->unknown_00E8 != g_mouse.y || !IsPlayerJob(pick->job)) { + if (this->rBtnClickX != g_mouse.x || this->rBtnClickY != g_mouse.y || !IsPlayerJob(pick->job)) { return; } @@ -737,34 +737,34 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { return; } - if (target->unknown_03E0Low == 1) { + if (target->storedActorEntry == 1) { if (isAdmin != true) { return; } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->actorMenuIds.erase(this->actorMenuIds.begin(), this->actorMenuIds.end()); menu = g_windowMgr.EnsureWindow(WID_MENUWND); - this->unknown_02E0 = pick->accountId; + this->menuTargetAid = pick->accountId; this->actorMenuIds.push_back(0x41); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_INVALID_MAPPROPERTY_REQUEST_USER)), 0, 0, 0); } else { std::string name; - if (target->unknown_02F8 == 1 && (this->scene->unknown_0048 == 1 || this->scene->unknown_004C == 1)) { + if (target->hasHp == 1 && (this->scene->isPKZone == 1 || this->scene->isSiegeMode == 1)) { name = "??????"; } else { name = this->ActorName(pick->accountId); } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } this->actorMenuIds.erase(this->actorMenuIds.begin(), this->actorMenuIds.end()); menu = g_windowMgr.EnsureWindow(WID_MENUWND); - this->unknown_02E0 = pick->accountId; + this->menuTargetAid = pick->accountId; char line[128]; std::memset(line, 0, sizeof(line)); @@ -787,7 +787,7 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { } const bool canInviteParty = - g_session.unknown_5464 != 0 && g_session.PartyByName(name.c_str()).valid == 0; + g_session.partyLeader != 0 && g_session.PartyByName(name.c_str()).valid == 0; if (canInviteParty) { this->actorMenuIds.push_back(5); sprintf(line, LookupMessage(MSI_REQ_JOIN_PARTY2), name.c_str()); @@ -803,12 +803,12 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { if (g_guildInfo.m_guildId != 0) { CGameActor* member = static_cast(this->scene->GetGameActorByAID(pick->accountId)); const std::uint32_t guildId = member != nullptr ? member->GetGdid() : 0; - if (g_guildInfo.unknown_00AC != 0 && guildId == 0) { + if (g_guildInfo.canInvite != 0 && guildId == 0) { this->actorMenuIds.push_back(0x16); sprintf(line, LookupMessage(MSI_REQ_JOIN_GUILD), name.c_str()); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(line), 0, 0, 0); } - if (g_guildInfo.unknown_00B4 != 0 && guildId != g_guildInfo.m_guildId) { + if (g_guildInfo.isMaster != 0 && guildId != g_guildInfo.m_guildId) { menu->SendMsg(nullptr, UM_ADDBOUNDARY, 0, 0, 0, 0); this->actorMenuIds.push_back(0x19); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_REQ_ALLY_GUILD)), 0, 0, 0); @@ -845,16 +845,16 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_GIVE_PLUS_MANNER_POINT)), 0, 0, 0); this->actorMenuIds.push_back(0x18); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_GIVE_MINUS_MANNER_POINT)), 0, 0, 0); - sprintf(line, LookupMessage(MSI_PROHIBIT_LOG), g_session.CountProhibitionLog(this->unknown_02E0)); + sprintf(line, LookupMessage(MSI_PROHIBIT_LOG), g_session.CountProhibitionLog(this->menuTargetAid)); this->actorMenuIds.push_back(0x23); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(line), 0, 0, 0); } - sprintf(line, "%s : %d (GID) : %s", g_session.m_serverName.c_str(), this->unknown_02E0, name.c_str()); + sprintf(line, "%s : %d (GID) : %s", g_session.m_serverName.c_str(), this->menuTargetAid, name.c_str()); this->actorMenuIds.push_back(0x22); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(line), 0, 0, 0); } - this->unknown_02EC = name; + this->menuTargetName = name; menu->SendMsg(nullptr, UM_ADDBOUNDARY, 0, 0, 0, 0); this->actorMenuIds.push_back(0x3F); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_MACRO_USER_REPORT_COOLTIME)), 0xFF, 0, 0); @@ -879,7 +879,7 @@ void CGameMode::OpenActorMenu(const ActorPickInfo* pick, int handled) { // OFFSET: 0x00ACA540 // FUNCTION: fn_17693 bool CWorld::RemoveGroundItem(std::uint32_t aid) { - for (auto item = this->unknown_0018.begin(); item != this->unknown_0018.end(); ++item) { + for (auto item = this->items.begin(); item != this->items.end(); ++item) { if (static_cast(*item)->itemAid == aid) { CRenderObject* object = *item; @@ -891,7 +891,7 @@ bool CWorld::RemoveGroundItem(std::uint32_t aid) { } } - this->unknown_0018.erase(item); + this->items.erase(item); return true; } } @@ -902,7 +902,7 @@ bool CWorld::RemoveGroundItem(std::uint32_t aid) { // OFFSET: 0x00ACA8A0 // FUNCTION: fn_17697 bool CWorld::RemoveSkill(std::uint32_t aid) { - for (auto entry = this->unknown_0020.begin(); entry != this->unknown_0020.end(); ++entry) { + for (auto entry = this->skills.begin(); entry != this->skills.end(); ++entry) { if (static_cast(*entry)->skillAid == aid) { CSkill* skill = static_cast(*entry); @@ -924,7 +924,7 @@ bool CWorld::RemoveSkill(std::uint32_t aid) { } this->RemoveObject(skill); - this->unknown_0020.erase(entry); + this->skills.erase(entry); return true; } } @@ -939,8 +939,8 @@ CMsgEffect* CGameMode::SpawnDamageMsgEffect(const vector3d* position, std::uint3 std::string sprite; std::string action; } names; - names.sprite = static_cast(FormatOwnedString("%s.spr", g_session.unknown_80EC.c_str())); - names.action = static_cast(FormatOwnedString("%s.act", g_session.unknown_80EC.c_str())); + names.sprite = static_cast(FormatOwnedString("%s.spr", g_session.damageSpriteName.c_str())); + names.action = static_cast(FormatOwnedString("%s.act", g_session.damageSpriteName.c_str())); CMsgEffect* effect = new CMsgEffect; if (effect) { @@ -949,7 +949,7 @@ CMsgEffect* CGameMode::SpawnDamageMsgEffect(const vector3d* position, std::uint3 effect->SendMsg(nullptr, AM_SETPOS, 0, reinterpret_cast(position), reinterpret_cast(position) >> 31, reinterpret_cast(&names), reinterpret_cast(&names) >> 31, 0, 0, 0, 0, 0, 0, 0, 0); effect->render.color = color; - effect->render.unknown_00B4 = 0; + effect->render.useGroundLighting = 0; } return effect; diff --git a/Source/Contents/World/WorldProximity.cpp b/Source/Contents/World/WorldProximity.cpp index 3c2fc4305..120a009f6 100644 --- a/Source/Contents/World/WorldProximity.cpp +++ b/Source/Contents/World/WorldProximity.cpp @@ -21,15 +21,15 @@ struct PACKET_CZ_APPROXIMATE_ACTOR { /* 0000 */ std::int16_t packetType; /* 0002 */ std::uint32_t accountId; - /* 0006 */ std::uint16_t unknown_0006; - /* 0008 */ std::uint8_t unknown_0008; + /* 0006 */ std::uint16_t range; + /* 0008 */ std::uint8_t enabled; }; #pragma pack(pop) #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(PACKET_CZ_APPROXIMATE_ACTOR) == 9); static_assert(offsetof(PACKET_CZ_APPROXIMATE_ACTOR, accountId) == 2); -static_assert(offsetof(PACKET_CZ_APPROXIMATE_ACTOR, unknown_0006) == 6); +static_assert(offsetof(PACKET_CZ_APPROXIMATE_ACTOR, range) == 6); #endif // INLINED @@ -60,9 +60,9 @@ void UpdateWorldProximityNotification( // OFFSET: 0x00AC93C0 // FUNCTION: fn_17683 void CWorld::UpdateGuildMasterApproach(std::function isNearby) { - if (this->unknown_00F4 == true) { + if (this->guildMasterNearby == true) { if (!isNearby()) { - this->unknown_00F4 = false; + this->guildMasterNearby = false; } return; @@ -71,11 +71,11 @@ void CWorld::UpdateGuildMasterApproach(std::function isNearby) { if (isNearby() == true) { PACKET_CZ_APPROXIMATE_ACTOR packet; packet.packetType = ID_CZ_APPROXIMATE_ACTOR; - packet.accountId = g_guildInfo.unknown_00D0; - packet.unknown_0006 = 1; - packet.unknown_0008 = 1; + packet.accountId = g_guildInfo.masterCharacterId; + packet.range = 1; + packet.enabled = 1; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); - this->unknown_00F4 = true; + this->guildMasterNearby = true; } } @@ -103,7 +103,7 @@ bool CWorld::IsGuildMaster(std::uint32_t aid) { return false; } - return gameActor->GetPkState() == static_cast(g_guildInfo.unknown_00D0); + return gameActor->GetPkState() == static_cast(g_guildInfo.masterCharacterId); } } @@ -134,7 +134,7 @@ bool CWorld::IsExistGuildMasterNearby(const float& x, const float& z) { } CRenderObject* actor = g_session.FindGameActor(aid); - if (actor->render.unknown_0070 == 1) { + if (actor->render.state == 1) { float centerX = 0.0f; float centerZ = 0.0f; int column = 0; @@ -171,7 +171,7 @@ void CWorld::RemovePcPos(std::uint32_t aid, bool notify) { continue; } - if (notify && this->unknown_00F4) { + if (notify && this->guildMasterNearby) { if (this->IsGuildMaster(aid)) { this->UpdateGuildMasterApproach([this]() { return false; }); } @@ -191,7 +191,7 @@ void CWorld::RemovePcPosForMove(std::uint32_t aid, bool notify) { continue; } - if (notify && this->unknown_00F4) { + if (notify && this->guildMasterNearby) { if (this->IsGuildMaster(aid)) { this->UpdateGuildMasterApproach([this]() { return false; }); } @@ -237,7 +237,7 @@ bool WorldProximityGuildMasterCallback::Invoke(const std::uint32_t& aidRef) { return false; } - if (static_cast(g_guildInfo.unknown_00D0) != gameActor->GetPkState()) { + if (static_cast(g_guildInfo.masterCharacterId) != gameActor->GetPkState()) { return false; } diff --git a/Source/Contents/World/WorldSpatialTree.cpp b/Source/Contents/World/WorldSpatialTree.cpp index 1f97641b9..7f10fd1aa 100644 --- a/Source/Contents/World/WorldSpatialTree.cpp +++ b/Source/Contents/World/WorldSpatialTree.cpp @@ -12,20 +12,20 @@ // OFFSET: 0x00AC64F0 // FUNCTION: fn_17651 CWorld::CWorld() { - this->unknown_00FD = false; + this->partyRestricted = false; this->serializedSpatial = nullptr; this->pending = 0; this->ground = nullptr; this->player = nullptr; - this->unknown_0048 = 0; - this->unknown_004C = 0; - this->unknown_0050 = 0; + this->isPKZone = 0; + this->isSiegeMode = 0; + this->isBattleFieldMode = 0; g_session.m_score1 = -1; g_session.m_score2 = -1; - this->unknown_0054 = 0; - this->unknown_00F4 = false; + this->isEventPVPMode = 0; + this->guildMasterNearby = false; this->nearbyRange = 2; - this->unknown_00FC = false; + this->backgroundFog = false; } // OFFSET: 0x00AC6FB0 diff --git a/Source/Contents/WorldView/WorldViewData.cpp b/Source/Contents/WorldView/WorldViewData.cpp index be3562911..5515d3978 100644 --- a/Source/Contents/WorldView/WorldViewData.cpp +++ b/Source/Contents/WorldView/WorldViewData.cpp @@ -46,15 +46,15 @@ __declspec(noinline) CWorldViewField::CWorldViewField(WorldViewArea area, const this->top = area.top; this->right = area.right; this->bottom = area.bottom; - this->unknown_0010 = area.unknown_0010; + this->areaFlags = area.areaFlags; if (name) { this->name = name; } if (unknown2) { - this->unknown_002C = unknown2; + this->fieldName = unknown2; } if (unknown3) { - this->unknown_0044 = unknown3; + this->description = unknown3; } } @@ -89,7 +89,7 @@ void CWorldViewWorld::AddField(int mapId, const char* name, CWorldViewField* fie map->top = field->top; map->right = field->right; map->bottom = field->bottom; - map->unknown_0044 = field->unknown_0010; + map->areaFlags = field->areaFlags; this->maps.push_back(map); } @@ -245,11 +245,11 @@ __declspec(noinline) void CWorldViewWorld::Draw(int, int x, int y, int width, in CWorldViewMgr::CWorldViewMgr() { this->screenScale = 0; this->dungeonColor = 0; - this->unknown_0084 = 0; + this->dungeonOverlayColor = 0; this->dungeonFontColor = 0xFFFFFFFF; this->dungeonFontOutline = 0xFF000000; this->dungeonSelectColor = 0xFFFFFFFF; - this->unknown_00A4 = 0xFFFFFFFF; + this->dungeonSelectTextColor = 0xFFFFFFFF; this->mobLevelColor = 0xFFFFFFFF; this->mobLevelOutline = 0xFF000000; this->mobColor = 0xFFFFFFFF; @@ -342,8 +342,8 @@ void CWorldViewMgr::LoadTextures() { (*it)->LoadTexture(); } - if (g_session.unknown_5324 == 0) { - g_session.unknown_5324 = this->ScaleToScreen(); + if (g_session.mapPositionsScaled == 0) { + g_session.mapPositionsScaled = this->ScaleToScreen(); g_session.ScaleMapPositions(); } } @@ -380,7 +380,7 @@ __declspec(noinline) void CWorldViewMgr::ResetSelection() { this->selection.top = 0; this->selection.right = 0; this->selection.bottom = 0; - this->selection.unknown_004C.clear(); + this->selection.relatedNames.clear(); } // OFFSET: 0x00616CC0 @@ -402,7 +402,7 @@ bool CWorldViewMgr::SelectField(const char* name) { this->selection.top = field->top; this->selection.right = field->right; this->selection.bottom = field->bottom; - this->selection.unknown_0048 = field->unknown_0010; + this->selection.areaFlags = field->areaFlags; return true; } } @@ -445,7 +445,7 @@ bool CWorldViewMgr::AddMark(const char* name) { mark.level = 0; mark.worldIndex = index; mark.name = field->name; - mark.unknown_0048 = field->unknown_0010; + mark.areaFlags = field->areaFlags; mark.left = field->left; mark.top = field->top; mark.right = field->right; @@ -535,7 +535,7 @@ bool CWorldViewMgr::AddLevel(const char* name, int level) { record.mapIndex = mapIndex; record.worldIndex = index; record.name = field->name; - record.unknown_0048 = field->unknown_0010; + record.areaFlags = field->areaFlags; record.left = field->left; record.top = field->top; record.right = field->right; @@ -696,7 +696,7 @@ void CWorldViewMgr::Load(LuaScript& script) { map->top = area.top; map->right = area.right; map->bottom = area.bottom; - map->unknown_0044 = area.unknown_0010; + map->areaFlags = area.areaFlags; } } } @@ -710,10 +710,10 @@ void CWorldViewMgr::Load(LuaScript& script) { int fifth = 0; int sixth = 0; int alpha = 0; - if (script.Call("Get_Worldview_info_Dungeon", ">dddd", &red, &green, &blue, &this->unknown_0084)) { - const std::uint32_t opacity = g_worldViewMgr.unknown_0084 << 24; + if (script.Call("Get_Worldview_info_Dungeon", ">dddd", &red, &green, &blue, &this->dungeonOverlayColor)) { + const std::uint32_t opacity = g_worldViewMgr.dungeonOverlayColor << 24; this->dungeonColor = opacity + RGB(blue, green, red); - this->unknown_0084 = opacity + 0xFFFFFF; + this->dungeonOverlayColor = opacity + 0xFFFFFF; } if (script.Call("Get_Worldview_info_Dungeon_FontColor", ">dddddd", &red, &green, &blue, &fourth, &fifth, &sixth)) { this->dungeonFontColor = RGB(red, green, blue); @@ -726,7 +726,7 @@ void CWorldViewMgr::Load(LuaScript& script) { this->dungeonFontSize[3] = fourth; } if (script.Call("Get_Worldview_info_Dungeon_SelectColor", ">ddd", &red, &green, &blue)) { - this->unknown_00A4 = RGB(red, green, blue); + this->dungeonSelectTextColor = RGB(red, green, blue); this->dungeonSelectColor = RGB(blue, green, red); } if (script.Call("Get_Worldview_info_Mob_Color", ">dddddd", &red, &green, &blue, &fourth, &fifth, &sixth)) { diff --git a/Source/Contents/WorldView/WorldViewData.h b/Source/Contents/WorldView/WorldViewData.h index a8affa134..febda24a4 100644 --- a/Source/Contents/WorldView/WorldViewData.h +++ b/Source/Contents/WorldView/WorldViewData.h @@ -15,7 +15,7 @@ struct WorldViewArea { /* 0004 */ int top; /* 0008 */ int right; /* 000C */ int bottom; - /* 0010 */ int unknown_0010; + /* 0010 */ int areaFlags; }; class CWorldViewField { @@ -26,10 +26,10 @@ public: /* 0004 */ int top = 0; /* 0008 */ int right = 0; /* 000C */ int bottom = 0; - /* 0010 */ int unknown_0010 = 0; + /* 0010 */ int areaFlags = 0; /* 0014 */ std::string name; - /* 002C */ std::string unknown_002C; - /* 0044 */ std::string unknown_0044; + /* 002C */ std::string fieldName; + /* 0044 */ std::string description; }; class CWorldViewMap { @@ -51,7 +51,7 @@ public: /* 0038 */ int top = 0; /* 003C */ int right = 0; /* 0040 */ int bottom = 0; - /* 0044 */ int unknown_0044 = 0; + /* 0044 */ int areaFlags = 0; /* 0048 */ std::vector fields; }; @@ -79,18 +79,18 @@ struct WorldViewRecord { /* 0000 */ int worldIndex; /* 0004 */ int mapIndex; /* 0008 */ int level; - /* 000C */ int unknown_000C = 0; - /* 0010 */ int unknown_0010 = 0; - /* 0014 */ int unknown_0014 = 0; - /* 0018 */ int unknown_0018 = 0; + /* 000C */ int screenLeft = 0; + /* 0010 */ int screenTop = 0; + /* 0014 */ int screenRight = 0; + /* 0018 */ int screenBottom = 0; /* 001C */ int unknown_001C = 0; /* 0020 */ std::string name; /* 0038 */ int left = 0; /* 003C */ int top = 0; /* 0040 */ int right = 0; /* 0044 */ int bottom = 0; - /* 0048 */ int unknown_0048 = 0; - /* 004C */ std::list unknown_004C; + /* 0048 */ int areaFlags = 0; + /* 004C */ std::list relatedNames; }; class CWorldViewMgr { @@ -123,12 +123,12 @@ public: /* 0070 */ int screenScale; /* 0074 */ std::vector worlds; /* 0080 */ std::uint32_t dungeonColor; - /* 0084 */ std::uint32_t unknown_0084; + /* 0084 */ std::uint32_t dungeonOverlayColor; /* 0088 */ std::uint32_t dungeonFontColor; /* 008C */ std::uint32_t dungeonFontOutline; /* 0090 */ int dungeonFontSize[4]; /* 00A0 */ std::uint32_t dungeonSelectColor; - /* 00A4 */ std::uint32_t unknown_00A4; + /* 00A4 */ std::uint32_t dungeonSelectTextColor; /* 00A8 */ std::uint32_t mobColor; /* 00AC */ std::uint32_t mobOutline; /* 00B0 */ int mobFont[4]; @@ -149,7 +149,7 @@ public: static_assert(sizeof(WorldViewRecord) == 0x54); static_assert(offsetof(WorldViewRecord, name) == 0x20); static_assert(offsetof(WorldViewRecord, left) == 0x38); -static_assert(offsetof(WorldViewRecord, unknown_004C) == 0x4C); +static_assert(offsetof(WorldViewRecord, relatedNames) == 0x4C); static_assert(offsetof(CWorldViewMgr, selection) == 0x18); static_assert(offsetof(CWorldViewMgr, currentWorld) == 0x6C); static_assert(offsetof(CWorldViewMgr, worlds) == 0x74); @@ -161,7 +161,7 @@ static_assert(offsetof(CWorldViewMgr, selectBoxColor) == 0x2B8); static_assert(sizeof(WorldViewArea) == 0x14); static_assert(sizeof(CWorldViewField) == 0x5C); static_assert(offsetof(CWorldViewField, name) == 0x14); -static_assert(offsetof(CWorldViewField, unknown_0044) == 0x44); +static_assert(offsetof(CWorldViewField, description) == 0x44); static_assert(sizeof(CWorldViewMap) == 0x54); static_assert(offsetof(CWorldViewMap, id) == 0x30); static_assert(offsetof(CWorldViewMap, fields) == 0x48); diff --git a/Source/EntityInit.cpp b/Source/EntityInit.cpp index ff10bf064..0142d6468 100644 --- a/Source/EntityInit.cpp +++ b/Source/EntityInit.cpp @@ -98,12 +98,12 @@ std::vector CGameMode::BuildActorEntryPacket(CGameActor* actor, std::uint1 std::vector packet; std::string name = this->nameCard.Name(actor->render.accountId); - if (actor->render.unknown_0070 == 1) { + if (actor->render.state == 1) { packet.resize(sizeof(ActorMoveEntryPacket)); ActorMoveEntryPacket* entry = reinterpret_cast(packet.data()); entry->hp = actor->GetGaugeCurrent(); entry->maxHp = actor->GetGaugeMaximum(); - entry->isBoss = actor->unknown_0304; + entry->isBoss = actor->hpGaugeFlags; entry->moveStartTime = actor->routeStartTick; int metadata = 0; @@ -133,8 +133,8 @@ std::vector CGameMode::BuildActorEntryPacket(CGameActor* actor, std::uint1 subY = 0; } - const int destinationX = actor->unknown_0158[5]; - const int destinationY = *reinterpret_cast(actor->unknown_0170); + const int destinationX = actor->movementState[5]; + const int destinationY = *reinterpret_cast(actor->destinationAndSpeed); entry->moveData[0] = static_cast(cellX >> 2); entry->moveData[1] = static_cast((cellX << 6) | ((cellY >> 4) & 0x3F)); entry->moveData[2] = static_cast((cellY << 4) | ((destinationX >> 6) & 0x0F)); @@ -144,35 +144,35 @@ std::vector CGameMode::BuildActorEntryPacket(CGameActor* actor, std::uint1 entry->packetType = packetType; entry->packetLength = static_cast(name.size() + packet.size()); - entry->objectType = actor->unknown_0314; + entry->objectType = actor->objectType; entry->accountId = actor->render.accountId; - entry->speed = *reinterpret_cast(actor->unknown_0170 + 4); + entry->speed = *reinterpret_cast(actor->destinationAndSpeed + 4); entry->bodyState = static_cast(actor->bodyState); - entry->healthState = static_cast(actor->unknown_02C4); + entry->healthState = static_cast(actor->effectState); entry->effectState = actor->GetStateFlags(); entry->job = static_cast(actor->GetEffectiveJob(-1)); - entry->head = *reinterpret_cast(actor->unknown_029C); + entry->head = *reinterpret_cast(actor->headType); entry->guildId = actor->GetGdid(); entry->emblemVersion = static_cast(g_guildMgr->GetEmblemVersion(actor->GetGdid())); - entry->isPkModeOn = actor->unknown_02C8 != 0; - entry->sex = static_cast(actor->unknown_0260); - entry->xSize = static_cast(actor->unknown_0294); - entry->ySize = static_cast(actor->unknown_0298); - entry->level = actor->unknown_0210; - entry->font = static_cast(actor->render.unknown_00FC); - entry->bodyPalette = static_cast(actor->render.unknown_0048); + entry->isPkModeOn = actor->healthState != 0; + entry->sex = static_cast(actor->sex); + entry->xSize = static_cast(actor->xSize); + entry->ySize = static_cast(actor->ySize); + entry->level = actor->characterLevel; + entry->font = static_cast(actor->render.fontSequenceState); + entry->bodyPalette = static_cast(actor->render.bodyPalette); - if (actor->unknown_0314 == 0) { + if (actor->objectType == 0) { CPc* pc = static_cast(actor); - entry->honor = static_cast(pc->unknown_0430); - entry->virtue = pc->unknown_0434; - entry->headDirection = static_cast(pc->unknown_043C); - entry->weapon = pc->unknown_0434; - entry->accessory = static_cast(pc->unknown_0450); - entry->accessory2 = static_cast(pc->unknown_0454); - entry->accessory3 = static_cast(pc->unknown_0458); - entry->headPalette = static_cast(pc->unknown_0444); - entry->robe = static_cast(pc->unknown_049C); + entry->honor = static_cast(pc->honor); + entry->virtue = pc->virtue; + entry->headDirection = static_cast(pc->headDir); + entry->weapon = pc->virtue; + entry->accessory = static_cast(pc->accessory); + entry->accessory2 = static_cast(pc->accessory2); + entry->accessory3 = static_cast(pc->accessory3); + entry->headPalette = static_cast(pc->headPalette); + entry->robe = static_cast(pc->robe); entry->characterId = pc->GetPkState(); entry->body = static_cast(pc->GetBodyCostume()); } @@ -181,53 +181,53 @@ std::vector CGameMode::BuildActorEntryPacket(CGameActor* actor, std::uint1 ActorStandEntryPacket* entry = reinterpret_cast(packet.data()); entry->hp = actor->GetGaugeCurrent(); entry->maxHp = actor->GetGaugeMaximum(); - entry->isBoss = actor->unknown_0304; + entry->isBoss = actor->hpGaugeFlags; const int direction = (static_cast(actor->render.angle) + 180) / 45 % 8; - const int cellX = actor->unknown_0158[5]; - const int cellY = *reinterpret_cast(actor->unknown_0170); + const int cellX = actor->movementState[5]; + const int cellY = *reinterpret_cast(actor->destinationAndSpeed); entry->posDir[0] = static_cast(cellX >> 2); entry->posDir[1] = static_cast((cellX << 6) | ((cellY >> 4) & 0x3F)); entry->posDir[2] = static_cast((cellY << 4) | (direction & 0x0F)); - if (actor->render.unknown_0070 == 3) { + if (actor->render.state == 3) { entry->state = 1; } else { - entry->state = actor->render.unknown_0070 == 6 ? 2 : 0; + entry->state = actor->render.state == 6 ? 2 : 0; } entry->packetType = packetType; entry->packetLength = static_cast(name.size() + packet.size()); - entry->objectType = actor->unknown_0314; + entry->objectType = actor->objectType; entry->accountId = actor->render.accountId; - entry->speed = *reinterpret_cast(actor->unknown_0170 + 4); + entry->speed = *reinterpret_cast(actor->destinationAndSpeed + 4); entry->bodyState = static_cast(actor->bodyState); - entry->healthState = static_cast(actor->unknown_02C4); + entry->healthState = static_cast(actor->effectState); entry->effectState = actor->GetStateFlags(); entry->job = static_cast(actor->GetEffectiveJob(-1)); - entry->head = *reinterpret_cast(actor->unknown_029C); + entry->head = *reinterpret_cast(actor->headType); entry->guildId = actor->GetGdid(); entry->emblemVersion = static_cast(g_guildMgr->GetEmblemVersion(actor->GetGdid())); - entry->isPkModeOn = actor->unknown_02C8 != 0; - entry->sex = static_cast(actor->unknown_0260); - entry->xSize = static_cast(actor->unknown_0294); - entry->ySize = static_cast(actor->unknown_0298); - entry->level = actor->unknown_0210; - entry->font = static_cast(actor->render.unknown_00FC); - entry->bodyPalette = static_cast(actor->render.unknown_0048); + entry->isPkModeOn = actor->healthState != 0; + entry->sex = static_cast(actor->sex); + entry->xSize = static_cast(actor->xSize); + entry->ySize = static_cast(actor->ySize); + entry->level = actor->characterLevel; + entry->font = static_cast(actor->render.fontSequenceState); + entry->bodyPalette = static_cast(actor->render.bodyPalette); entry->emblemVersion = static_cast(g_guildMgr->GetEmblemVersion(actor->GetGdid())); - if (actor->unknown_0314 == 0) { + if (actor->objectType == 0) { CPc* pc = static_cast(actor); - entry->honor = static_cast(pc->unknown_0430); - entry->virtue = pc->unknown_0434; - entry->headDirection = static_cast(pc->unknown_043C); - entry->weapon = pc->unknown_0434; - entry->accessory = static_cast(pc->unknown_0450); - entry->accessory2 = static_cast(pc->unknown_0454); - entry->accessory3 = static_cast(pc->unknown_0458); - entry->headPalette = static_cast(pc->unknown_0444); - entry->robe = static_cast(pc->unknown_049C); + entry->honor = static_cast(pc->honor); + entry->virtue = pc->virtue; + entry->headDirection = static_cast(pc->headDir); + entry->weapon = pc->virtue; + entry->accessory = static_cast(pc->accessory); + entry->accessory2 = static_cast(pc->accessory2); + entry->accessory3 = static_cast(pc->accessory3); + entry->headPalette = static_cast(pc->headPalette); + entry->robe = static_cast(pc->robe); entry->characterId = pc->GetPkState(); entry->body = static_cast(pc->GetBodyCostume()); } diff --git a/Source/File/FileCreation.cpp b/Source/File/FileCreation.cpp index f178035b8..190200fc1 100644 --- a/Source/File/FileCreation.cpp +++ b/Source/File/FileCreation.cpp @@ -101,14 +101,14 @@ bool JsonCppLoader::GetEZ2STREffect(std::map* o record.offsetY = y.AsDouble(); } - this->GetBoolValue(node, "IsInfinite", &record.unknown_0028); - this->GetBoolValue(node, "IsFloor", &record.unknown_0029); - this->GetBoolValue(node, "IsAboveUI", &record.unknown_002A); - this->GetStringValue(node, "SoundPath", &record.unknown_002C); - this->GetBoolValue(node, "IsSoundLoop", &record.unknown_0044); - this->GetIntValue(node, "QuakeDelay", &record.unknown_0048[0]); - this->GetIntValue(node, "StartDelayTime", &record.unknown_0048[1]); - this->GetBoolValue(node, "IsToGround", &record.unknown_0050); + this->GetBoolValue(node, "IsInfinite", &record.infinite); + this->GetBoolValue(node, "IsFloor", &record.floor); + this->GetBoolValue(node, "IsAboveUI", &record.aboveUi); + this->GetStringValue(node, "SoundPath", &record.soundPath); + this->GetBoolValue(node, "IsSoundLoop", &record.soundLoop); + this->GetIntValue(node, "QuakeDelay", &record.delays[0]); + this->GetIntValue(node, "StartDelayTime", &record.delays[1]); + this->GetBoolValue(node, "IsToGround", &record.toGround); if (!out->insert(std::make_pair(name, record)).second) { this->Fail("중복키가 입력되었습니다. (key : %s)", name.c_str()); diff --git a/Source/Network/ActorNamePacket.cpp b/Source/Network/ActorNamePacket.cpp index b9e097efc..066e36dc1 100644 --- a/Source/Network/ActorNamePacket.cpp +++ b/Source/Network/ActorNamePacket.cpp @@ -25,8 +25,8 @@ void CGameMode::ReceiveActorNameTitle(const ActorNameTitlePacket* packet) { this->nameCard.Set(packet->actorId, std::string(packet->name, packet->name + sizeof(packet->name)).c_str(), std::string(), std::string(), std::string(), std::string(), packet->title, packet->groupId); - if (packet->actorId == g_session.unknown_1010) { - std::sprintf(g_session.unknown_1018, packet->name); + if (packet->actorId == g_session.petGid) { + std::sprintf(g_session.petName, packet->name); if (UIPetInfoWnd* window = static_cast(g_windowMgr.window_038C)) { window->nameEdit->SetText(packet->name); } diff --git a/Source/Network/ClientKeepalive.cpp b/Source/Network/ClientKeepalive.cpp index d30a4a4a7..5ab0a3d24 100644 --- a/Source/Network/ClientKeepalive.cpp +++ b/Source/Network/ClientKeepalive.cpp @@ -22,8 +22,8 @@ void CLoginMode::SendKeepalive() { return; } - if (timeGetTime() > this->unknown_6F10) { - this->unknown_6F10 = timeGetTime() + 12000; + if (timeGetTime() > this->nextKeepaliveTime) { + this->nextKeepaliveTime = timeGetTime() + 12000; KeepalivePacket packet; packet.id = 0x0187; diff --git a/Source/Network/Packets/SkillUpdatePacket.cpp b/Source/Network/Packets/SkillUpdatePacket.cpp index f94273b2c..2382c1fa6 100644 --- a/Source/Network/Packets/SkillUpdatePacket.cpp +++ b/Source/Network/Packets/SkillUpdatePacket.cpp @@ -19,7 +19,7 @@ namespace { // OFFSET: 0x00D42AA0 // FUNCTION: fn_21829 void CGameMode::ApplySkillUpdatePacket(const void* packet) { - *reinterpret_cast(&this->unknown_0100[0x0C]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x0C]) = 0; const auto* bytes = static_cast(packet); const auto opcode = Read(bytes); @@ -40,10 +40,10 @@ void CGameMode::ApplySkillUpdatePacket(const void* packet) { value.id = id; value.level = Read(bytes + 4); - value.unknown_0014 = static_cast(Read(bytes + 6)); - value.unknown_0018 = bytes[10]; - value.unknown_001C = static_cast(Read(bytes + 8)); - value.unknown_0034 = value.UseApAmount(*g_session.m_hotkeyScript, value.level); + value.spCost = static_cast(Read(bytes + 6)); + value.upgradable = bytes[10]; + value.range = static_cast(Read(bytes + 8)); + value.apCost = value.UseApAmount(*g_session.m_hotkeyScript, value.level); g_session.m_skillBundle.ApplyLevelChange(value); switch (opcode) { @@ -65,19 +65,19 @@ void CGameMode::ReceiveLearnedSkill( std::uint16_t id, std::int16_t level, int unknown000C, std::uint8_t unknown0018, std::int16_t unknown0014, std::int16_t unknown001C, std::int16_t unknown0030 ) { CSkillInfo value; - value.unknown_000C = unknown000C; + value.type = unknown000C; value.id = id; value.level = level; - value.unknown_0018 = unknown0018; + value.upgradable = unknown0018; value.name = value.IdName(*g_session.m_hotkeyScript); - value.unknown_0014 = unknown0014; - value.unknown_001C = unknown001C; - value.unknown_0030 = unknown0030; - value.unknown_0034 = value.UseApAmount(*g_session.m_hotkeyScript, level); + value.spCost = unknown0014; + value.range = unknown001C; + value.learnedLevel = unknown0030; + value.apCost = value.UseApAmount(*g_session.m_hotkeyScript, level); g_session.m_skillBundle.RecordLevelChange(value); if (value.id == 336) { - g_session.unknown_5468 = 1; + g_session.adoptionSkillAvailable = 1; } g_session.UpdateSkill(value, 1, 0); @@ -86,7 +86,7 @@ void CGameMode::ReceiveLearnedSkill( // OFFSET: 0x00D2B5C0 // FUNCTION: fn_45442 void CGameMode::ApplyAdditionalSkillPacket(const void* packet) { - *reinterpret_cast(&this->unknown_0100[0x0C]) = 0; + *reinterpret_cast(&this->equipmentRequestState[0x0C]) = 0; g_session.m_additionalSkills.clear(); const auto* bytes = static_cast(packet); @@ -99,11 +99,11 @@ void CGameMode::ApplyAdditionalSkillPacket(const void* packet) { CSkillInfo value; value.level = Read(record + 6); value.id = Read(record); - value.unknown_0014 = static_cast(Read(record + 8)); - value.unknown_000C = Read(record + 2); - value.unknown_0018 = record[36]; + value.spCost = static_cast(Read(record + 8)); + value.type = Read(record + 2); + value.upgradable = record[36]; value.name = value.IdName(*g_session.m_hotkeyScript); - value.unknown_0034 = value.UseApAmount(*g_session.m_hotkeyScript, value.level); + value.apCost = value.UseApAmount(*g_session.m_hotkeyScript, value.level); if (value.id - 10000u <= 19u) { g_session.UpdateAdditionalSkill(value, 1); diff --git a/Source/Render/ActionSpriteDrawing.cpp b/Source/Render/ActionSpriteDrawing.cpp index 3c3fc2ef7..d4528ac1d 100644 --- a/Source/Render/ActionSpriteDrawing.cpp +++ b/Source/Render/ActionSpriteDrawing.cpp @@ -32,10 +32,10 @@ void DrawActionSprite( const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; const float left = static_cast(cell.x) * scale; const float scaledLeft = left * scaleX; - const float right = static_cast(image->width * (image->unknown_0004 + 1) - 1 + cell.x) * scale; + const float right = static_cast(image->width * (image->doubleWidth + 1) - 1 + cell.x) * scale; const float top = static_cast(cell.y) * scale * cell.scaleY; const float scaledRight = right * scaleX; - const float bottom = static_cast(image->height * (image->unknown_0006 + 1) - 1 + cell.y) * scale * cell.scaleY; + const float bottom = static_cast(image->height * (image->doubleHeight + 1) - 1 + cell.y) * scale * cell.scaleY; CTexture* texture; if (cell.imageType == 0) { @@ -44,7 +44,7 @@ void DrawActionSprite( texture = g_renderer->atlas.Insert(system, image, sprite->palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } primitive->texture = texture; diff --git a/Source/Render/AlphaQueuesDX7.cpp b/Source/Render/AlphaQueuesDX7.cpp index 633b7a4e7..56d69c66e 100644 --- a/Source/Render/AlphaQueuesDX7.cpp +++ b/Source/Render/AlphaQueuesDX7.cpp @@ -19,7 +19,7 @@ namespace { // INLINED bool WritesDepth(const RenderCommand& command) { - return (command.unknown_0014 & 0xFFu) != 0 && (command.unknown_0014 & 0xFF00u) != 0; + return (command.depthFlags & 0xFFu) != 0 && (command.depthFlags & 0xFF00u) != 0; } } diff --git a/Source/Render/DX7/RendererDX7Operations.cpp b/Source/Render/DX7/RendererDX7Operations.cpp index 58eb258d3..7eeb8c93d 100644 --- a/Source/Render/DX7/RendererDX7Operations.cpp +++ b/Source/Render/DX7/RendererDX7Operations.cpp @@ -51,7 +51,7 @@ void CRendererDX7::ClearDepth(int clearColor) { // FUNCTION: fn_02078 void CRendererDX7::ClearWorld() { unsigned color = this->clearColor; - if (this->fog.enabled != 0 && static_cast(g_modeMgr.GetGameMode())->scene->unknown_00FC == 1) { + if (this->fog.enabled != 0 && static_cast(g_modeMgr.GetGameMode())->scene->backgroundFog == 1) { color = this->BlendColor(this->clearColor, g_worldOverlayColor); } @@ -160,9 +160,9 @@ void CRendererDX7::DrawBlendedQueue() { for (auto it = this->queues.queue_0210.begin(); it != this->queues.queue_0210.end(); ++it) { if (RenderCommand* command = *it) { this->BindTexture(static_cast(command->texture)); - this->SetTextureMode(command->unknown_0020); - this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->unknown_0018); - this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->unknown_001C); + this->SetTextureMode(command->textureMode); + this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->sourceBlend); + this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->destinationBlend); command->Draw(reinterpret_cast(this->device)); } } @@ -349,9 +349,9 @@ void CRendererDX7::FlushRenderList() { for (auto it = this->queues.queue_01EC.begin(); it != this->queues.queue_01EC.end(); ++it) { if (RenderCommand* command = *it) { this->BindTexture(static_cast(command->texture)); - this->SetTextureMode(command->unknown_0020); - this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->unknown_0018); - this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->unknown_001C); + this->SetTextureMode(command->textureMode); + this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->sourceBlend); + this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->destinationBlend); command->Draw(reinterpret_cast(this->device)); } } @@ -381,14 +381,14 @@ void CRendererDX7::FlushRenderList() { for (auto it = this->queues.queue_0234.begin(); it != this->queues.queue_0234.end(); ++it) { if (RenderCommand* command = it->primitive) { this->BindTexture(static_cast(command->texture)); - this->SetTextureMode(command->unknown_0020); + this->SetTextureMode(command->textureMode); if (it->depth >= 0.99f) { this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); } else { - this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->unknown_0018); - this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->unknown_001C); + this->device->SetRenderState(D3DRENDERSTATE_SRCBLEND, command->sourceBlend); + this->device->SetRenderState(D3DRENDERSTATE_DESTBLEND, command->destinationBlend); } command->Draw(reinterpret_cast(this->device)); diff --git a/Source/Render/DX7/TextureDX7.cpp b/Source/Render/DX7/TextureDX7.cpp index 9968a4c51..7ba7a344a 100644 --- a/Source/Render/DX7/TextureDX7.cpp +++ b/Source/Render/DX7/TextureDX7.cpp @@ -241,7 +241,7 @@ void CTextureDX7::ReleaseDC(HDC dc) { // FUNCTION: fn_01826 void CTextureDX7::Upload(int x, int y, int width, int height, const std::uint32_t* pixels, int option, int sourceWidth) { this->SetImageSize(width, height); - this->unknown_0008 = (this->unknown_0008 & 255) | (static_cast(option) << 8); + this->textureFlags = (this->textureFlags & 255) | (static_cast(option) << 8); if (!this->m_surface || !pixels) { return; diff --git a/Source/Render/DX9/AlphaQueuesDX9.cpp b/Source/Render/DX9/AlphaQueuesDX9.cpp index 2697069ff..176a47467 100644 --- a/Source/Render/DX9/AlphaQueuesDX9.cpp +++ b/Source/Render/DX9/AlphaQueuesDX9.cpp @@ -23,7 +23,7 @@ namespace { // INLINED bool WritesDepth(const RenderCommand& command) { - return (command.unknown_0014 & 0xFFu) != 0 && (command.unknown_0014 & 0xFF00u) != 0; + return (command.depthFlags & 0xFFu) != 0 && (command.depthFlags & 0xFF00u) != 0; } } diff --git a/Source/Render/DX9/QueuedDrawingDX9.cpp b/Source/Render/DX9/QueuedDrawingDX9.cpp index 8c0fc43b0..412aa3c96 100644 --- a/Source/Render/DX9/QueuedDrawingDX9.cpp +++ b/Source/Render/DX9/QueuedDrawingDX9.cpp @@ -74,9 +74,9 @@ void CRendererDX9::DrawQueues( const auto drawCommand = [&](RenderCommand& command) { this->device->state.SetTexture(0, command.texture ? static_cast(command.texture)->NativeTexture() : nullptr); - this->SetTextureMode(command.unknown_0020); - this->device->state.SetRenderState(D3DRS_SRCBLEND, command.unknown_0018); - this->device->state.SetRenderState(D3DRS_DESTBLEND, command.unknown_001C); + this->SetTextureMode(command.textureMode); + this->device->state.SetRenderState(D3DRS_SRCBLEND, command.sourceBlend); + this->device->state.SetRenderState(D3DRS_DESTBLEND, command.destinationBlend); this->DrawPrimitive(&command); }; @@ -181,11 +181,11 @@ void CRendererDX9::DrawQueues( for (const DepthPrimitive& entry : queues.queue_0234) { RenderCommand& command = *entry.primitive; this->device->state.SetTexture(0, command.texture ? static_cast(command.texture)->NativeTexture() : nullptr); - this->SetTextureMode(command.unknown_0020); + this->SetTextureMode(command.textureMode); const bool selected = !(entry.depth >= 0.99f); - this->device->state.SetRenderState(D3DRS_SRCBLEND, selected ? command.unknown_0018 : D3DBLEND_SRCALPHA); - this->device->state.SetRenderState(D3DRS_DESTBLEND, selected ? command.unknown_001C : D3DBLEND_INVSRCALPHA); + this->device->state.SetRenderState(D3DRS_SRCBLEND, selected ? command.sourceBlend : D3DBLEND_SRCALPHA); + this->device->state.SetRenderState(D3DRS_DESTBLEND, selected ? command.destinationBlend : D3DBLEND_INVSRCALPHA); this->DrawPrimitive(&command); } } diff --git a/Source/Render/DX9/RendererDX9Operations.cpp b/Source/Render/DX9/RendererDX9Operations.cpp index b7d5c1302..e826742e5 100644 --- a/Source/Render/DX9/RendererDX9Operations.cpp +++ b/Source/Render/DX9/RendererDX9Operations.cpp @@ -56,7 +56,7 @@ void CRendererDX9::ClearDepth(int clearColor) { // FUNCTION: fn_02215 void CRendererDX9::ClearWorld() { unsigned color = this->clearColor; - if (this->fog.enabled == 1 && static_cast(g_modeMgr.GetGameMode())->scene->unknown_00FC == 1) { + if (this->fog.enabled == 1 && static_cast(g_modeMgr.GetGameMode())->scene->backgroundFog == 1) { color = this->BlendColor(this->clearColor, g_worldOverlayColor); } diff --git a/Source/Render/DX9/TextureDX9.cpp b/Source/Render/DX9/TextureDX9.cpp index e9bcf3314..1cc06a74d 100644 --- a/Source/Render/DX9/TextureDX9.cpp +++ b/Source/Render/DX9/TextureDX9.cpp @@ -393,7 +393,7 @@ bool CTextureDX9::UploadSurface( // FUNCTION: fn_02491 void CTextureDX9::Upload(int x, int y, int width, int height, const std::uint32_t* pixels, int option, int sourceWidth) { this->SetImageSize(width, height); - this->unknown_0008 = (this->unknown_0008 & 255) | (static_cast(option) << 8); + this->textureFlags = (this->textureFlags & 255) | (static_cast(option) << 8); if (!pixels) { return; } diff --git a/Source/Render/Primitives/LightmappedPrimitive.cpp b/Source/Render/Primitives/LightmappedPrimitive.cpp index e2dac1f12..d788641e7 100644 --- a/Source/Render/Primitives/LightmappedPrimitive.cpp +++ b/Source/Render/Primitives/LightmappedPrimitive.cpp @@ -17,7 +17,7 @@ LightmappedCommand::LightmappedCommand() // OFFSET: 0x00569090 // FUNCTION: fn_02247 ModelRenderCommand::ModelRenderCommand() - : vertices(nullptr), vertexCount(0), texture(nullptr), indices(nullptr), indexCount(0), unknown_0014(1), unknown_0018(0), unknown_001C(0), unknown_0020(0), + : vertices(nullptr), vertexCount(0), texture(nullptr), indices(nullptr), indexCount(0), renderEnabled(1), renderStateA(0), renderStateB(0), renderStateC(0), primitiveType(D3DPT_TRIANGLELIST) { } diff --git a/Source/Render/Primitives/LightmappedPrimitive.h b/Source/Render/Primitives/LightmappedPrimitive.h index 8cb950eee..71316456e 100644 --- a/Source/Render/Primitives/LightmappedPrimitive.h +++ b/Source/Render/Primitives/LightmappedPrimitive.h @@ -44,11 +44,11 @@ struct ModelRenderCommand { /* 0008 */ CTexture* texture; /* 000C */ std::uint16_t* indices; /* 0010 */ std::uint32_t indexCount; - /* 0014 */ std::uint16_t unknown_0014; + /* 0014 */ std::uint16_t renderEnabled; /* 0016 */ std::uint16_t unknown_0016; - /* 0018 */ std::uint32_t unknown_0018; - /* 001C */ std::uint32_t unknown_001C; - /* 0020 */ std::uint32_t unknown_0020; + /* 0018 */ std::uint32_t renderStateA; + /* 001C */ std::uint32_t renderStateB; + /* 0020 */ std::uint32_t renderStateC; /* 0024 */ std::uint32_t primitiveType; }; diff --git a/Source/Render/Primitives/RenderPrimitive.cpp b/Source/Render/Primitives/RenderPrimitive.cpp index ad11dc13d..8556c25d5 100644 --- a/Source/Render/Primitives/RenderPrimitive.cpp +++ b/Source/Render/Primitives/RenderPrimitive.cpp @@ -38,7 +38,7 @@ bool RenderTriangle::Visible() const { // OFFSET: 0x00568F40 // FUNCTION: fn_02244 RenderCommand::RenderCommand() - : vertices(nullptr), vertexCount(0), texture(nullptr), indices(nullptr), indexCount(0), unknown_0014(1), unknown_0018(0), unknown_001C(0), unknown_0020(0), + : vertices(nullptr), vertexCount(0), texture(nullptr), indices(nullptr), indexCount(0), depthFlags(1), sourceBlend(0), destinationBlend(0), textureMode(0), primitiveType(D3DPT_TRIANGLELIST) { } diff --git a/Source/Render/Primitives/RenderPrimitive.h b/Source/Render/Primitives/RenderPrimitive.h index 1fb844fe8..1acbfbfa4 100644 --- a/Source/Render/Primitives/RenderPrimitive.h +++ b/Source/Render/Primitives/RenderPrimitive.h @@ -22,8 +22,8 @@ struct RenderVertex { struct RenderTriangle { /* 0000 */ RenderVertex vertices[3]; /* 0060 */ CTexture* texture; - /* 0064 */ std::uint32_t unknown_0064; - /* 0068 */ std::uint32_t unknown_0068; + /* 0064 */ std::uint32_t sourceBlend; + /* 0068 */ std::uint32_t destinationBlend; bool Visible() const; }; @@ -34,11 +34,11 @@ struct RenderCommand { /* 0008 */ CTexture* texture; /* 000C */ std::uint16_t* indices; /* 0010 */ std::uint32_t indexCount; - /* 0014 */ std::uint16_t unknown_0014; + /* 0014 */ std::uint16_t depthFlags; /* 0016 */ std::uint16_t unknown_0016; - /* 0018 */ std::uint32_t unknown_0018; - /* 001C */ std::uint32_t unknown_001C; - /* 0020 */ std::uint32_t unknown_0020; + /* 0018 */ std::uint32_t sourceBlend; + /* 001C */ std::uint32_t destinationBlend; + /* 0020 */ std::uint32_t textureMode; /* 0024 */ std::uint32_t primitiveType; RenderCommand(); @@ -69,7 +69,7 @@ static_assert(offsetof(RenderVertex, specular) == 0x0014); static_assert(offsetof(RenderVertex, u) == 0x0018); static_assert(offsetof(RenderVertex, v) == 0x001C); static_assert(offsetof(RenderTriangle, texture) == 0x0060); -static_assert(offsetof(RenderTriangle, unknown_0068) == 0x0068); +static_assert(offsetof(RenderTriangle, destinationBlend) == 0x0068); static_assert(offsetof(RenderCommand, unknown_0016) == 0x0016); static_assert(offsetof(RenderCommand, primitiveType) == 0x0024); static_assert(offsetof(RenderPrimitive, quad) == 0x0028); diff --git a/Source/Render/Primitives/RenderQueues.cpp b/Source/Render/Primitives/RenderQueues.cpp index e37318543..f4416abf9 100644 --- a/Source/Render/Primitives/RenderQueues.cpp +++ b/Source/Render/Primitives/RenderQueues.cpp @@ -45,7 +45,7 @@ void RenderQueues::Submit(RenderCommand* primitive, std::uint16_t flags, bool de } } else if (flags & 0x20) { this->queue_01BC.push_back({first(), primitive}); - } else if (static_cast(primitive->unknown_0014) == 1) { + } else if (static_cast(primitive->depthFlags) == 1) { this->queue_018C.push_back({first(), primitive}); } else { this->queue_01A4.push_back({first(), primitive}); @@ -68,8 +68,8 @@ void RenderQueues::SubmitTriangle(RenderTriangle& triangle, std::uint16_t flags, command->vertices = triangle.vertices; command->vertexCount = 3; command->texture = triangle.texture; - command->unknown_0020 = 0; - command->unknown_0018 = triangle.unknown_0064; - command->unknown_001C = triangle.unknown_0068; + command->textureMode = 0; + command->sourceBlend = triangle.sourceBlend; + command->destinationBlend = triangle.destinationBlend; this->Submit(command, flags, depthAlpha, depthStart, depthEnd); } diff --git a/Source/Render/Primitives/ScreenLine.cpp b/Source/Render/Primitives/ScreenLine.cpp index c3a115964..4082709c1 100644 --- a/Source/Render/Primitives/ScreenLine.cpp +++ b/Source/Render/Primitives/ScreenLine.cpp @@ -144,7 +144,7 @@ void UINewChatWnd::DrawTransBox() { int x = 3; int y = 0; this->ToScreen(x, y); - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { return; } @@ -162,7 +162,7 @@ void UISubChatHisWnd::DrawTransBox() { int y = 0; this->ToScreen(x, y); DrawAlphaRectangle(x + 1, y + 1, this->m_inputWidth - 2, this->m_inputHeight, 0x66000000); - DrawAlphaRectangle(this->m_state.unknown_0000 + 1, this->m_state.unknown_0004 + 1, this->m_state.unknown_0008 - 2, this->m_state.unknown_000C - 2, this->m_state.unknown_0014); + DrawAlphaRectangle(this->m_state.x + 1, this->m_state.y + 1, this->m_state.width - 2, this->m_state.height - 2, this->m_state.backgroundColor); } // OFFSET: 0x009189C0 @@ -219,7 +219,7 @@ void UIRoMapWnd::DrawKafraIcon(float x, float y) { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } const int height = static_cast(static_cast(image->height) * scale); @@ -259,8 +259,8 @@ void UIRoMapWnd::DrawKafraIcon(float x, float y) { vertices[3].u = record.u1; vertices[3].v = record.v1; primitive->texture = texture; - primitive->unknown_0018 = 2; - primitive->unknown_001C = 4; + primitive->sourceBlend = 2; + primitive->destinationBlend = 4; g_renderer->queues.Submit(primitive, 513, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); this->m_kafraTop = static_cast(vertices[0].y); this->m_kafraBottom = static_cast(vertices[3].y); @@ -343,32 +343,32 @@ std::uint32_t g_worldMapNameColor; // OFFSET: 0x00918D70 // FUNCTION: fn_12596 void UIRoMapWnd::DrawSelectedMapPreview() { - if (this->unknown_00C0 == nullptr) { + if (this->selectedRecord == nullptr) { return; } - if (this->unknown_00C0->mapIndex < 100) { - const WorldViewRecord* record = this->unknown_00C0; + if (this->selectedRecord->mapIndex < 100) { + const WorldViewRecord* record = this->selectedRecord; DrawRoundedBorder( - *this, record->unknown_000C, record->unknown_0010, record->unknown_0014 - record->unknown_000C, record->unknown_0018 - record->unknown_0010, + *this, record->screenLeft, record->screenTop, record->screenRight - record->screenLeft, record->screenBottom - record->screenTop, g_worldMapNameColor ); } { - const WorldViewRecord* record = this->unknown_00C0; + const WorldViewRecord* record = this->selectedRecord; DrawRoundedBorder(*this, record->left, record->top, record->right - record->left, record->bottom - record->top, g_worldMapNameColor); } - WorldViewRecord* record = this->unknown_00C0; + WorldViewRecord* record = this->selectedRecord; const int savedLeft = record->left; const int savedTop = record->top; const int savedRight = record->right; const int savedBottom = record->bottom; - const int savedUnknown = record->unknown_0048; + const int savedUnknown = record->areaFlags; if (g_kafraServiceMapList.find(std::string(record->name)) != g_kafraServiceMapList.end()) { - WorldViewRecord* current = this->unknown_00C0; + WorldViewRecord* current = this->selectedRecord; if (g_exceptionMiniMapPosList.find(current->name) != g_exceptionMiniMapPosList.end()) { const MiniMapPosition& offset = g_exceptionMiniMapPosList[current->name]; current->left = static_cast(static_cast(current->left) + offset.x); @@ -378,14 +378,14 @@ void UIRoMapWnd::DrawSelectedMapPreview() { } } - record = this->unknown_00C0; + record = this->selectedRecord; record->left = savedLeft; record->top = savedTop; record->right = savedRight; record->bottom = savedBottom; - record->unknown_0048 = savedUnknown; + record->areaFlags = savedUnknown; - record = this->unknown_00C0; + record = this->selectedRecord; int x = record->right + 10; if (x + 130 > g_renderer->viewport.width) { x = record->left - 140; @@ -393,14 +393,14 @@ void UIRoMapWnd::DrawSelectedMapPreview() { const int y = record->top + 140 <= g_renderer->viewport.height ? record->top + 10 : g_renderer->viewport.height - 130; - WorldViewArea* previous = reinterpret_cast(this->unknown_00C8); - this->unknown_00C8 = reinterpret_cast(new WorldViewArea{x, y, x + 130, y + 130, 1}); + WorldViewArea* previous = reinterpret_cast(this->previewArea); + this->previewArea = reinterpret_cast(new WorldViewArea{x, y, x + 130, y + 130, 1}); delete previous; tagRECT area = {x, y, x + 130, y + 130}; this->FillSurface(0xFFFF00FF, &area); - std::string name = this->unknown_00C0->name; + std::string name = this->selectedRecord->name; if (name.size() > 4) { name.resize(name.size() - 4); } @@ -411,9 +411,9 @@ void UIRoMapWnd::DrawSelectedMapPreview() { std::string path = "유저인터페이스\\map\\"; path += name; path += ".bmp"; - this->unknown_00D0 = reinterpret_cast(g_texMgr.Load(path.c_str(), 0, true, true, false)); + this->previewTexture = reinterpret_cast(g_texMgr.Load(path.c_str(), 0, true, true, false)); } - name = g_session.GetMapDisplayName(this->unknown_00C0->name.c_str()); + name = g_session.GetMapDisplayName(this->selectedRecord->name.c_str()); DrawOutlinedText(*this, x + 3, y + 3, name.c_str(), 0, 0xD2FF, 0, 0, 12, 1, 0); } diff --git a/Source/Render/Renderer.cpp b/Source/Render/Renderer.cpp index 8c50fd93f..1c301a7b8 100644 --- a/Source/Render/Renderer.cpp +++ b/Source/Render/Renderer.cpp @@ -20,7 +20,7 @@ // OFFSET: 0x00544A60 // FUNCTION: fn_01820 std::uint32_t __fastcall sub_544A60(const CRenderer* renderer) { - return renderer->unknown_0044; + return renderer->viewDirectionZ; } // OFFSET: 0x0055D150 @@ -158,7 +158,7 @@ void CRenderer::DrawOverlays(CRenderSystemBase& system) { } timer: - if (g_session.unknown_5448 != 0) { + if (g_session.showTimer != 0) { const int scale = this->viewport.height / 700; CActRes* action = static_cast(ResourceMgr::Instance().Load("이팩트\\TimeFont.act")); CSprRes* sprite = static_cast(ResourceMgr::Instance().Load("이팩트\\TimeFont.spr")); @@ -214,7 +214,7 @@ timer: // OFFSET: 0x00560A40 // FUNCTION: fn_02161 -CRenderer::CRenderer() : frame(0), unknown_003C(0), unknown_0040(0), unknown_0044(0), twoPass(0), unknown_004C(0) { +CRenderer::CRenderer() : frame(0), viewDirectionX(0), viewDirectionY(0), viewDirectionZ(0), twoPass(0), unknown_004C(0) { this->atlas.Initialize(50); this->fog.enabled = 0; this->fog.dirty = 1; diff --git a/Source/Render/Renderer.h b/Source/Render/Renderer.h index 7d8a9efc2..bcb4d39b3 100644 --- a/Source/Render/Renderer.h +++ b/Source/Render/Renderer.h @@ -56,9 +56,9 @@ public: /* 0004 */ RendererViewport viewport; /* 0038 */ unsigned frame; - /* 003C */ int unknown_003C; - /* 0040 */ int unknown_0040; - /* 0044 */ int unknown_0044; + /* 003C */ int viewDirectionX; + /* 0040 */ int viewDirectionY; + /* 0044 */ int viewDirectionZ; /* 0048 */ unsigned char twoPass; /* 0049 */ unsigned char unknown_0049[3]; /* 004C */ int unknown_004C; diff --git a/Source/Render/ScreenGeometry.cpp b/Source/Render/ScreenGeometry.cpp index 0b9851efc..cb041678d 100644 --- a/Source/Render/ScreenGeometry.cpp +++ b/Source/Render/ScreenGeometry.cpp @@ -72,8 +72,8 @@ void DrawScreenQuad( vertices[3].u = 1.0f; vertices[3].v = 1.0f; primitive->texture = texture; - primitive->unknown_0018 = 2; - primitive->unknown_001C = 4; + primitive->sourceBlend = 2; + primitive->destinationBlend = 4; queues.Submit(primitive, 513, depthAlpha, depthStart, depthEnd); } @@ -111,7 +111,7 @@ void DrawScreenQuad(ScreenPoint p0, ScreenPoint p1, ScreenPoint p2, ScreenPoint vertices[3].u = 1.0f; vertices[3].v = 1.0f; primitive->texture = texture; - primitive->unknown_0018 = 2; - primitive->unknown_001C = 4; + primitive->sourceBlend = 2; + primitive->destinationBlend = 4; g_renderer->queues.Submit(primitive, 513, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } diff --git a/Source/Render/ScreenRectangle.cpp b/Source/Render/ScreenRectangle.cpp index f9ba32799..effde7ee5 100644 --- a/Source/Render/ScreenRectangle.cpp +++ b/Source/Render/ScreenRectangle.cpp @@ -34,8 +34,8 @@ void DrawBlendedRectangle(int x, int y, int width, int height, std::uint32_t col vertex.u = 0.0f; vertex.v = 0.0f; } - primitive->unknown_0018 = 5; - primitive->unknown_001C = 6; + primitive->sourceBlend = 5; + primitive->destinationBlend = 6; g_renderer->queues.Submit(primitive, 517, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); } diff --git a/Source/Render/SpriteGeometry.cpp b/Source/Render/SpriteGeometry.cpp index 27c031275..96147d668 100644 --- a/Source/Render/SpriteGeometry.cpp +++ b/Source/Render/SpriteGeometry.cpp @@ -24,12 +24,12 @@ bool CCharacterRender::ProjectCell( const double scaleY = scale * cell.scaleY; const double scaleX = scale * cell.scaleX; const float top = (cell.y + offsetY) * scaleY + y; - const float bottom = ((image.unknown_0006 + 1) * image.height + cell.y + offsetY) * scaleY + y + 1.0; + const float bottom = ((image.doubleHeight + 1) * image.height + cell.y + offsetY) * scaleY + y + 1.0; float left; float right; if (cell.mirrored & 1) { - left = ((image.unknown_0004 + 1) * image.width + cell.x + offsetX) * scaleX + x; + left = ((image.doubleWidth + 1) * image.width + cell.x + offsetX) * scaleX + x; right = (offsetX + cell.x) * scaleX + x + 1.0; if (top >= g_renderer->viewport.height || bottom <= 0.0f || right >= g_renderer->viewport.width || left <= 0.0f) { @@ -37,7 +37,7 @@ bool CCharacterRender::ProjectCell( } } else { left = (cell.x + offsetX) * scaleX + x; - right = ((image.unknown_0004 + 1) * image.width + cell.x + offsetX) * scaleX + x + 1.0; + right = ((image.doubleWidth + 1) * image.width + cell.x + offsetX) * scaleX + x + 1.0; if (top >= g_renderer->viewport.height || bottom <= 0.0f || left >= g_renderer->viewport.width || right <= 0.0f) { return false; @@ -52,7 +52,7 @@ bool CCharacterRender::ProjectCell( quad.right = right + shift; quad.bottomDepth = bottomDepth; quad.topDepth = topDepth; - quad.angle = static_cast(cell.unknown_001C); + quad.angle = static_cast(cell.rotation); bounds.left = static_cast(left); bounds.top = static_cast(top); bounds.right = static_cast(right); diff --git a/Source/Render/SpriteQuad.cpp b/Source/Render/SpriteQuad.cpp index 0fd50c713..46c14d53a 100644 --- a/Source/Render/SpriteQuad.cpp +++ b/Source/Render/SpriteQuad.cpp @@ -12,7 +12,7 @@ RenderPrimitive* BuildSpriteQuad(CRenderSystemBase& system, const SpriteQuad& quad, const std::uint32_t* palette, int blend, float offsetX, float offsetY) { SpriteAtlasRecord record{}; const SpriteRleImage* image = quad.image; - CTexture* texture = static_cast(const_cast(image->unknown_0008)); + CTexture* texture = static_cast(const_cast(image->surface)); if (!texture) { texture = g_renderer->atlas.Find(image, palette, record); if (!texture) { @@ -81,8 +81,8 @@ RenderPrimitive* BuildSpriteQuad(CRenderSystemBase& system, const SpriteQuad& qu vertices[3].v = record.v1; vertices[3].diffuse = quad.color; - primitive->unknown_0018 = 5; - primitive->unknown_001C = blend != 5 ? 6 : 2; + primitive->sourceBlend = 5; + primitive->destinationBlend = blend != 5 ? 6 : 2; return primitive; } diff --git a/Source/Render/Textures/BitmapPixels.cpp b/Source/Render/Textures/BitmapPixels.cpp index 20532f22b..908a19caf 100644 --- a/Source/Render/Textures/BitmapPixels.cpp +++ b/Source/Render/Textures/BitmapPixels.cpp @@ -773,7 +773,7 @@ void CDCBitmap::DrawScaledSprite( surface = atlas.Insert(system, image, palette, record, serviceType, reuseDelay); } } else { - surface = static_cast(const_cast(image->unknown_0008)); + surface = static_cast(const_cast(image->surface)); } if (!surface) { diff --git a/Source/Render/Textures/SpriteAtlas.cpp b/Source/Render/Textures/SpriteAtlas.cpp index 8fde5a3fc..fc2392577 100644 --- a/Source/Render/Textures/SpriteAtlas.cpp +++ b/Source/Render/Textures/SpriteAtlas.cpp @@ -76,7 +76,7 @@ void SpriteAtlas::Clear() { std::forward_list& pages = this->m_classes[i]; for (SpriteAtlasPage& page : pages) { CTexture* texture = page.texture; - if (texture->unknown_001C == 0) { + if (texture->refCount == 0) { delete texture; } else { this->m_spare.push_back(texture); @@ -225,7 +225,7 @@ void SpriteAtlas::ClearExpired(std::uint32_t reuseDelay) { } CTexture* texture = it->texture; - if (texture->unknown_001C) { + if (texture->refCount) { this->m_spare.push_back(texture); } else { delete texture; diff --git a/Source/Render/Textures/SpritePixels.h b/Source/Render/Textures/SpritePixels.h index 036c1b339..19da65ec8 100644 --- a/Source/Render/Textures/SpritePixels.h +++ b/Source/Render/Textures/SpritePixels.h @@ -13,7 +13,7 @@ struct SpriteFrameCell { /* 0010 */ std::uint32_t color; /* 0014 */ float scaleX; /* 0018 */ float scaleY; - /* 001C */ std::int32_t unknown_001C; + /* 001C */ std::int32_t rotation; /* 0020 */ std::int32_t imageType; }; static_assert(sizeof(SpriteFrameCell) == 36); @@ -21,18 +21,18 @@ static_assert(sizeof(SpriteFrameCell) == 36); struct SpriteRleImage { /* 0000 */ std::int16_t width; /* 0002 */ std::int16_t height; - /* 0004 */ std::uint16_t unknown_0004; - /* 0006 */ std::uint16_t unknown_0006; - /* 0008 */ const void* unknown_0008; + /* 0004 */ std::uint16_t doubleWidth; + /* 0006 */ std::uint16_t doubleHeight; + /* 0008 */ const void* surface; /* 000C */ const std::uint8_t* runs; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(SpriteFrameCell, imageType) == 0x20); static_assert(sizeof(SpriteRleImage) == 0x10); -static_assert(offsetof(SpriteRleImage, unknown_0004) == 0x04); -static_assert(offsetof(SpriteRleImage, unknown_0006) == 0x06); -static_assert(offsetof(SpriteRleImage, unknown_0008) == 0x08); +static_assert(offsetof(SpriteRleImage, doubleWidth) == 0x04); +static_assert(offsetof(SpriteRleImage, doubleHeight) == 0x06); +static_assert(offsetof(SpriteRleImage, surface) == 0x08); static_assert(offsetof(SpriteRleImage, runs) == 0x0C); #endif diff --git a/Source/Render/Textures/Texture.cpp b/Source/Render/Textures/Texture.cpp index 93463c836..e2e146582 100644 --- a/Source/Render/Textures/Texture.cpp +++ b/Source/Render/Textures/Texture.cpp @@ -17,8 +17,8 @@ float g_textureOffsetY = 0.5f; // OFFSET: 0x005722E0 // FUNCTION: fn_02463 CTexture::CTexture() - : m_format(TextureFormat::UnknownTextureFormat), unknown_0008(1), m_textureWidth(0), m_textureHeight(0), m_width(0), m_height(0), unknown_001C(0), - unknown_0020(0) { + : m_format(TextureFormat::UnknownTextureFormat), textureFlags(1), m_textureWidth(0), m_textureHeight(0), m_width(0), m_height(0), refCount(0), + lastUsedTick(0) { this->m_name[0] = '\0'; } @@ -29,21 +29,21 @@ CTexture::~CTexture() = default; // OFFSET: 0x00572460 // FUNCTION: fn_02469 std::uint32_t CTexture::Retain() { - this->unknown_0020 = timeGetTime(); - return ++this->unknown_001C; + this->lastUsedTick = timeGetTime(); + return ++this->refCount; } // OFFSET: 0x005724F0 // FUNCTION: fn_02473 std::uint32_t CTexture::Touch() { - this->unknown_0020 = timeGetTime(); - return this->unknown_0020; + this->lastUsedTick = timeGetTime(); + return this->lastUsedTick; } // OFFSET: 0x005724E0 // FUNCTION: fn_02472 std::uint32_t CTexture::Release() { - return --this->unknown_001C; + return --this->refCount; } // OFFSET: 0x00572450 diff --git a/Source/Render/Textures/Texture.h b/Source/Render/Textures/Texture.h index d05a1b7d2..9fe46bd35 100644 --- a/Source/Render/Textures/Texture.h +++ b/Source/Render/Textures/Texture.h @@ -61,14 +61,14 @@ protected: friend class SpriteAtlas; friend class TextureCache; /* 0004 */ std::int32_t m_format; - /* 0008 */ std::uint16_t unknown_0008; + /* 0008 */ std::uint16_t textureFlags; /* 000A */ std::uint8_t unknown_000A[2]; /* 000C */ std::uint32_t m_textureWidth; /* 0010 */ std::uint32_t m_textureHeight; /* 0014 */ std::uint32_t m_width; /* 0018 */ std::uint32_t m_height; - /* 001C */ std::uint32_t unknown_001C; - /* 0020 */ std::uint32_t unknown_0020; + /* 001C */ std::uint32_t refCount; + /* 0020 */ std::uint32_t lastUsedTick; /* 0024 */ char m_name[256]; }; diff --git a/Source/Render/Textures/TextureCache.cpp b/Source/Render/Textures/TextureCache.cpp index f953d4114..c8530d17a 100644 --- a/Source/Render/Textures/TextureCache.cpp +++ b/Source/Render/Textures/TextureCache.cpp @@ -61,7 +61,7 @@ CTexture* TextureCache::Upload(int width, int height, const std::uint32_t* pixel if (texture) { texture->Upload(0, 0, width, height, pixels, option, 0); - texture->unknown_0008 = (texture->unknown_0008 & 0xFF00u) | fullSize; + texture->textureFlags = (texture->textureFlags & 0xFF00u) | fullSize; } return texture; @@ -126,7 +126,7 @@ CTexture* TextureCache::Create(const char* name, int option, bool fullSize, bool } if (texture) { - texture->unknown_0008 &= 0xFF00u; + texture->textureFlags &= 0xFF00u; } return texture; @@ -159,7 +159,7 @@ CTexture* TextureCache::Load(const char* name, int option, bool fullSize, bool d // OFFSET: 0x005716F0 // FUNCTION: fn_02452 void TextureCache::Remove(CTexture* texture) { - if (texture->unknown_001C == 0 && texture != this->Default()) { + if (texture->refCount == 0 && texture != this->Default()) { const auto found = this->m_textures.find(texture->m_name); if (found != this->m_textures.end()) { @@ -195,7 +195,7 @@ void TextureCache::Reload() { const int width = bitmap->image.width; if (texture) { - if ((texture->unknown_0008 & 0xFF) == 1) { + if ((texture->textureFlags & 0xFF) == 1) { texture->Create(width, height, texture->m_format); } else { texture->Create(width / g_textureReduction, height / g_textureReduction, texture->m_format); @@ -216,7 +216,7 @@ void TextureCache::ClearUnused() { for (auto entry = this->m_textures.begin(); entry != this->m_textures.end();) { CTexture* texture = entry->second; - if (texture->unknown_001C != 0 || texture->unknown_0020 >= threshold) { + if (texture->refCount != 0 || texture->lastUsedTick >= threshold) { ++entry; } else { delete texture; diff --git a/Source/Resource/EZeffectResource.cpp b/Source/Resource/EZeffectResource.cpp index 7688cb25e..57debe72d 100644 --- a/Source/Resource/EZeffectResource.cpp +++ b/Source/Resource/EZeffectResource.cpp @@ -12,7 +12,7 @@ // OFFSET: 0x0074D640 // FUNCTION: fn_07894 -EZeffectClip::EZeffectClip() : textureCount(0), unknown_0004(0), frameCount(0), frames(nullptr) { +EZeffectClip::EZeffectClip() : textureCount(0), textureState(0), frameCount(0), frames(nullptr) { const char* const defaultName = "1.bmp"; std::fill_n(this->names, std::size(this->names), defaultName); std::fill_n(this->textures, std::size(this->textures), nullptr); @@ -31,7 +31,7 @@ EZeffectClip::~EZeffectClip() { // OFFSET: 0x0074D570 // FUNCTION: fn_07893 CEZeffectRes::CEZeffectRes() { - this->unknown_D320 = 0; + this->loadState = 0; } // OFFSET: 0x0074D6F0 diff --git a/Source/Resource/EZeffectResource.h b/Source/Resource/EZeffectResource.h index 985d10e4e..1f580841e 100644 --- a/Source/Resource/EZeffectResource.h +++ b/Source/Resource/EZeffectResource.h @@ -48,7 +48,7 @@ struct EZeffectClip { CTexture* Texture(int index, const char* prefix); /* 0000 */ int textureCount; - /* 0004 */ int unknown_0004; + /* 0004 */ int textureState; /* 0008 */ int frameCount; /* 000C */ const EZeffectKeyFrame* frames; /* 0010 */ const char* names[110]; @@ -71,7 +71,7 @@ public: /* 0120 */ EZeffectClip clips[60]; private: - /* D320 */ std::uint32_t unknown_D320; + /* D320 */ std::uint32_t loadState; /* D324 */ CFile m_file; }; diff --git a/Source/Resource/Models/AnimatedModelResource.cpp b/Source/Resource/Models/AnimatedModelResource.cpp index 5f5c2cc7c..73e064ac1 100644 --- a/Source/Resource/Models/AnimatedModelResource.cpp +++ b/Source/Resource/Models/AnimatedModelResource.cpp @@ -68,7 +68,7 @@ AnimatedModelNode::~AnimatedModelNode() { // OFFSET: 0x007550E0 // FUNCTION: fn_07979 C3dAnimModelRes::C3dAnimModelRes() - : unknown_0110(0), unknown_0114(nullptr), shade(2), frameCount(0), animationLength(0), speed(1.0f), unknown_0150(0), unknown_0154(0.0f), unknown_0158(0.0f), + : recordCount(0), records(nullptr), shade(2), frameCount(0), animationLength(0), speed(1.0f), unknown_0150(0), originX(0.0f), unknown_0158(0.0f), unknown_015C(0.0f), alpha(255) { } @@ -87,10 +87,10 @@ C3dAnimModelRes* C3dAnimModelRes::Create() { // OFFSET: 0x0075C710 // FUNCTION: fn_08023 void C3dAnimModelRes::Unload() { - if (this->unknown_0114) { - delete[] this->unknown_0114; - this->unknown_0114 = nullptr; - this->unknown_0110 = 0; + if (this->records) { + delete[] this->records; + this->records = nullptr; + this->recordCount = 0; } for (std::list::iterator it = this->nodes.begin(); it != this->nodes.end(); ++it) { @@ -120,7 +120,7 @@ bool C3dAnimModelRes::Load(const char* name) { if (major == 1 && minor >= 2) { file.Read(&this->speed, 4); - file.Read(&this->unknown_0154, 12); + file.Read(&this->originX, 12); } if (major == 1 && minor == 3) { @@ -258,7 +258,7 @@ C3dGrannyModelRes::C3dGrannyModelRes() { this->instance = nullptr; this->model = nullptr; this->job = 0; - this->unknown_03B0 = 0; + this->hairPivot = 0; } // OFFSET: 0x00753540 @@ -287,7 +287,7 @@ bool C3dGrannyModelRes::Load(const char* name) { this->modelCount = 0; this->maxBoneCount = 0; this->textureCount = 0; - this->unknown_0280 = 0; + this->animationMode = 0; const char* cursor = std::strchr(name, '_'); if (!cursor) { @@ -350,7 +350,7 @@ bool C3dGrannyModelRes::Load(const char* name) { this->localPose = GrannyNewLocalPose(this->maxBoneCount); if (this->deformBufferSize) { - this->unknown_0280 = 4; + this->animationMode = 4; } result = true; @@ -366,7 +366,7 @@ bool C3dGrannyModelRes::Load(const char* name) { ShowErrorDialog("Unable to load file .gr2 (C3dGrannyModelRes :: Load)", 0); } - this->unknown_0110 = 1920.0f; + this->animationDuration = 1920.0f; for (int index = 0; index < this->instance->meshCount; ++index) { if (GrannyGetMeshIndexCount(this->instance->meshes[index].mesh) / 3 > 10000) { @@ -377,8 +377,8 @@ bool C3dGrannyModelRes::Load(const char* name) { this->position[0] = 0.0f; this->position[1] = 0.0f; this->position[2] = 0.0f; - this->unknown_03A0 = 10.0f; - this->unknown_03A4 = 10.0f; + this->baseHeight = 10.0f; + this->topHeight = 10.0f; return result; } diff --git a/Source/Resource/Models/AnimatedModelResource.h b/Source/Resource/Models/AnimatedModelResource.h index b22310d26..d49f83275 100644 --- a/Source/Resource/Models/AnimatedModelResource.h +++ b/Source/Resource/Models/AnimatedModelResource.h @@ -25,7 +25,7 @@ struct AnimatedModelRecord { ~AnimatedModelRecord(); /* 0000 */ unsigned char unknown_0000[0x84]; - /* 0084 */ std::string* unknown_0084; + /* 0084 */ std::string* names; }; class C3dAnimModelRes; @@ -64,8 +64,8 @@ public: bool Load(const char* name) override; void Unload() override; - /* 0110 */ int unknown_0110; - /* 0114 */ AnimatedModelRecord* unknown_0114; + /* 0110 */ int recordCount; + /* 0114 */ AnimatedModelRecord* records; /* 0118 */ std::list nodes; /* 0120 */ std::list rootNames; /* 0128 */ std::string sourceName; @@ -74,7 +74,7 @@ public: /* 0148 */ int animationLength; /* 014C */ float speed; /* 0150 */ std::uint32_t unknown_0150; - /* 0154 */ float unknown_0154; + /* 0154 */ float originX; /* 0158 */ float unknown_0158; /* 015C */ float unknown_015C; /* 0160 */ std::uint32_t alpha; diff --git a/Source/Resource/Models/GrannyModelResource.h b/Source/Resource/Models/GrannyModelResource.h index 155bc280d..a5b5a3008 100644 --- a/Source/Resource/Models/GrannyModelResource.h +++ b/Source/Resource/Models/GrannyModelResource.h @@ -196,7 +196,7 @@ public: void FreeInstance(); granny_file* ReadAnimationFile(const char* name, const char* suffix); - /* 0000 */ float unknown_0000; + /* 0000 */ float animationDuration; /* 0004 */ unsigned char unknown_0004[0x14C]; /* 0150 */ granny_file* file; /* 0154 */ int textureCount; @@ -206,7 +206,7 @@ public: /* 0164 */ int maxBoneCount; /* 0168 */ granny_local_pose* localPose; /* 016C */ int deformBufferSize; - /* 0170 */ int unknown_0170; + /* 0170 */ int animationMode; /* 0174 */ unsigned char unknown_0174[8]; /* 017C */ char fileName[MAX_PATH]; /* 0280 */ granny_animation* animations[100][20]; @@ -244,7 +244,7 @@ public: void Release(); granny_world_pose* Animate(float seconds, granny_model_instance* instance); - /* 0110 */ float unknown_0110; + /* 0110 */ float animationDuration; /* 0114 */ unsigned char unknown_0114[0x14C]; /* 0260 */ granny_file* file; /* 0264 */ int textureCount; @@ -254,17 +254,17 @@ public: /* 0274 */ int maxBoneCount; /* 0278 */ void* localPose; /* 027C */ int deformBufferSize; - /* 0280 */ int unknown_0280; + /* 0280 */ int animationMode; /* 0284 */ int unknown_0284; /* 0288 */ void* deformBuffer; /* 028C */ char fileName[MAX_PATH]; /* 0390 */ const granny_model* model; /* 0394 */ float position[3]; - /* 03A0 */ float unknown_03A0; - /* 03A4 */ float unknown_03A4; + /* 03A0 */ float baseHeight; + /* 03A4 */ float topHeight; /* 03A8 */ GrannyAnimationLibrary* animations; /* 03AC */ unsigned job; - /* 03B0 */ GrannyHairPivot* unknown_03B0; + /* 03B0 */ GrannyHairPivot* hairPivot; /* 03B4 */ granny_skeleton* skeleton; }; @@ -283,7 +283,7 @@ static_assert(offsetof(C3dGrannyModelRes, fileName) == 0x28C); static_assert(offsetof(C3dGrannyModelRes, model) == 0x390); static_assert(offsetof(C3dGrannyModelRes, skeleton) == 0x3B4); static_assert(offsetof(C3dGrannyModelRes, deformBuffer) == 0x288); -static_assert(offsetof(C3dGrannyModelRes, unknown_03B0) == 0x3B0); +static_assert(offsetof(C3dGrannyModelRes, hairPivot) == 0x3B0); static_assert(offsetof(granny_file_info, models) == 0x44); static_assert(offsetof(granny_file_info, animations) == 0x54); static_assert(offsetof(GrannyAnimationLibrary, file) == 0x150); diff --git a/Source/Resource/Models/ModelResource.cpp b/Source/Resource/Models/ModelResource.cpp index 0fedfe8d5..f50c72066 100644 --- a/Source/Resource/Models/ModelResource.cpp +++ b/Source/Resource/Models/ModelResource.cpp @@ -43,7 +43,7 @@ static_assert(sizeof(ShadeVector) == 12); // OFFSET: 0x00756D60 // FUNCTION: fn_07997 AnimatedModelRecord::~AnimatedModelRecord() { - delete[] this->unknown_0084; + delete[] this->names; } // OFFSET: 0x00755630 @@ -577,7 +577,7 @@ bool GrannyAnimationLibrary::Load(const char* name, int job, int action) { this->modelCount = 0; this->maxBoneCount = 0; this->textureCount = 0; - this->unknown_0170 = 0; + this->animationMode = 0; CFile file; if (!file.Open(name, 0, true, false)) { @@ -673,7 +673,7 @@ bool GrannyAnimationLibrary::Load(const char* name, int job, int action) { this->localPose = GrannyNewLocalPose(this->maxBoneCount); if (this->deformBufferSize != 0) { - this->unknown_0170 = 4; + this->animationMode = 4; } result = true; @@ -685,7 +685,7 @@ bool GrannyAnimationLibrary::Load(const char* name, int job, int action) { GrannyFreeFileSection(this->file, 2); GrannyFreeFileSection(this->file, 4); GrannyFreeFileSection(this->file, 5); - this->unknown_0000 = 1920.0f; + this->animationDuration = 1920.0f; return result; } @@ -755,8 +755,8 @@ bool C3dGrannyModelRes::ProjectBounds(float* rect, const matrix& view, const mat const float deltaZ = eye[2] - z; const float distance = SquareRoot(deltaY * deltaY + deltaX * deltaX + deltaZ * deltaZ); const float slope = std::min(std::fabs(1.0f / distance * deltaY), 1.0f); - const float height = this->unknown_03A4 - (this->unknown_03A4 - this->unknown_03A0) * slope; - const float halfWidth = SquareRoot(this->unknown_03A0 * this->unknown_03A0 * 0.5f); + const float height = this->topHeight - (this->topHeight - this->baseHeight) * slope; + const float halfWidth = SquareRoot(this->baseHeight * this->baseHeight * 0.5f); const float halfHeight = SquareRoot(height * height * 0.5f); const float inverseDepth = 1.0f / depth; @@ -959,8 +959,8 @@ const void* C3dGrannyModelRes::GetMeshRenderData( const void* vertices = meshes[mesh].vertices; *indices = meshes[mesh].indices; *triangleCount = GrannyGetMeshIndexCount(meshes[mesh].mesh) / 3; - if (std::strstr(meshes[mesh].mesh->name, "hair_pivot") != nullptr && this->unknown_03B0 != nullptr) { - this->unknown_03B0->transform = *transform; + if (std::strstr(meshes[mesh].mesh->name, "hair_pivot") != nullptr && this->hairPivot != nullptr) { + this->hairPivot->transform = *transform; } return vertices; @@ -983,13 +983,13 @@ const void* C3dGrannyModelRes::GetMeshRenderData( // OFFSET: 0x0075CD90 // FUNCTION: fn_08027 bool C3dGrannyModelRes::FindHairPivot() { - if (this->unknown_03B0 == nullptr) { + if (this->hairPivot == nullptr) { return false; } for (int mesh = 0; mesh < this->instance->meshCount; ++mesh) { if (std::strstr(this->instance->meshes[mesh].mesh->name, "hair_pivot") != nullptr) { - this->unknown_03B0->mesh = mesh; + this->hairPivot->mesh = mesh; return true; } } diff --git a/Source/Resource/Sprites/ActionResource.cpp b/Source/Resource/Sprites/ActionResource.cpp index 6866fcc3c..3fac114ec 100644 --- a/Source/Resource/Sprites/ActionResource.cpp +++ b/Source/Resource/Sprites/ActionResource.cpp @@ -95,8 +95,8 @@ bool CActRes::Load(const char* name) { frame.cells.resize(std::min(static_cast(cellCount), 1000u)); frame.anchors.clear(); frame.anchorCount = 0; - std::memcpy(frame.unknown_0000, range1, sizeof(range1)); - std::memcpy(frame.unknown_0000 + 4, range2, sizeof(range2)); + std::memcpy(frame.rangeBounds, range1, sizeof(range1)); + std::memcpy(frame.rangeBounds + 4, range2, sizeof(range2)); if (this->maximumCells < cellCount) { this->maximumCells = cellCount; } @@ -109,7 +109,7 @@ bool CActRes::Load(const char* name) { cell.color = 0xFFFFFFFFu; cell.scaleX = 1.0f; cell.scaleY = 1.0f; - cell.unknown_001C = 0; + cell.rotation = 0; cell.imageType = 0; continue; } @@ -148,8 +148,8 @@ bool CActRes::Load(const char* name) { const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; if (image) { - const int width = image->width * (image->unknown_0004 != 0 ? 2 : 1); - const int height = image->height * (image->unknown_0006 != 0 ? 2 : 1); + const int width = image->width * (image->doubleWidth != 0 ? 2 : 1); + const int height = image->height * (image->doubleHeight != 0 ? 2 : 1); cell.x = RelativeCoordinate(cell.x, width, cell.scaleX); cell.y = RelativeCoordinate(cell.y, height, cell.scaleY); } diff --git a/Source/Resource/Sprites/ActionResource.h b/Source/Resource/Sprites/ActionResource.h index 21913d9fd..8efa25f30 100644 --- a/Source/Resource/Sprites/ActionResource.h +++ b/Source/Resource/Sprites/ActionResource.h @@ -14,11 +14,11 @@ class ResourceMgr; struct ActionAnchor { /* 0000 */ std::int32_t x; /* 0004 */ std::int32_t y; - /* 0008 */ std::int32_t unknown_0008; + /* 0008 */ std::int32_t attachmentId; }; struct ActionFrame { - /* 0000 */ std::int32_t unknown_0000[8]; + /* 0000 */ std::int32_t rangeBounds[8]; /* 0020 */ std::vector cells; /* 002C */ int cellCount; /* 0030 */ int sound; @@ -56,7 +56,7 @@ static_assert(sizeof(ActionAnchor) == 12); static_assert(sizeof(ActionFrame) == 68); static_assert(sizeof(CActRes) == 312); static_assert(offsetof(ActionAnchor, y) == 0x0004); -static_assert(offsetof(ActionAnchor, unknown_0008) == 0x0008); +static_assert(offsetof(ActionAnchor, attachmentId) == 0x0008); static_assert(offsetof(ActionFrame, cells) == 0x0020); static_assert(offsetof(ActionFrame, cellCount) == 0x002C); static_assert(offsetof(ActionFrame, sound) == 0x0030); diff --git a/Source/Resource/Sprites/SpriteResource.cpp b/Source/Resource/Sprites/SpriteResource.cpp index dbe14b69e..7ed6eb04c 100644 --- a/Source/Resource/Sprites/SpriteResource.cpp +++ b/Source/Resource/Sprites/SpriteResource.cpp @@ -75,11 +75,11 @@ bool CSprRes::Load(const char* name) { std::uint16_t dimensions[2]; file.Read(dimensions, sizeof(dimensions)); auto* image = new SpriteRleImage{}; - image->unknown_0008 = nullptr; + image->surface = nullptr; image->width = static_cast(dimensions[0]); image->height = static_cast(dimensions[1]); - image->unknown_0004 = 0; - image->unknown_0006 = 0; + image->doubleWidth = 0; + image->doubleHeight = 0; std::uint16_t encodedBytes; if (g_spriteHalfWidth == 0 && g_spriteHalfHeight == 0) { @@ -137,12 +137,12 @@ bool CSprRes::Load(const char* name) { if (g_spriteHalfWidth != 0) { image->width /= 2; - image->unknown_0004 = 1; + image->doubleWidth = 1; } if (g_spriteHalfHeight != 0) { image->height /= 2; - image->unknown_0006 = 1; + image->doubleHeight = 1; } } @@ -169,18 +169,18 @@ bool CSprRes::Load(const char* name) { const int width = g_spriteHalfWidth != 0 ? image->width / 2 : image->width; const int height = g_spriteHalfHeight != 0 ? image->height / 2 : image->height; CTexture* texture = CreateTexture(width, height, TextureFormat::A4R4G4B4, false, false); - image->unknown_0008 = texture; + image->surface = texture; texture->Upload(0, 0, image->width, image->height, pixels, 0, 0); delete[] pixels; if (g_spriteHalfWidth != 0) { image->width /= 2; - image->unknown_0004 = 1; + image->doubleWidth = 1; } if (g_spriteHalfHeight != 0) { image->height /= 2; - image->unknown_0006 = 1; + image->doubleHeight = 1; } this->images[1].push_back(image); @@ -198,9 +198,9 @@ void CSprRes::Unload() { for (auto image = this->images[type].begin(); image != this->images[type].end(); ++image) { if (type == 0) { delete[] (*image)->runs; - } else if ((*image)->unknown_0008) { - delete static_cast((*image)->unknown_0008); - (*image)->unknown_0008 = nullptr; + } else if ((*image)->surface) { + delete static_cast((*image)->surface); + (*image)->surface = nullptr; } delete *image; diff --git a/Source/Resource/World/GroundResource.cpp b/Source/Resource/World/GroundResource.cpp index a7b5780de..89c1b3a22 100644 --- a/Source/Resource/World/GroundResource.cpp +++ b/Source/Resource/World/GroundResource.cpp @@ -106,13 +106,13 @@ void CGndRes::ReadWater() { this->m_file.Read(&level, sizeof(level)); this->waterHeights.push_back(level); record.parameters.level = level; - std::memset(record.unknown_0018, 0, sizeof(record.unknown_0018)); + std::memset(record.reserved, 0, sizeof(record.reserved)); this->water.push_back(record); } } else if (this->minor == 9) { for (int index = 0; static_cast(index) < count; ++index) { this->m_file.Read(&record.parameters, sizeof(record.parameters)); - std::memset(record.unknown_0018, 0, sizeof(record.unknown_0018)); + std::memset(record.reserved, 0, sizeof(record.reserved)); this->water.push_back(record); this->waterHeights.push_back(record.parameters.level); } diff --git a/Source/Resource/World/GroundResource.h b/Source/Resource/World/GroundResource.h index 40471a7e2..e1831f75d 100644 --- a/Source/Resource/World/GroundResource.h +++ b/Source/Resource/World/GroundResource.h @@ -17,7 +17,7 @@ struct GroundWaterParameters { struct GroundWater { /* 0000 */ GroundWaterParameters parameters; - /* 0018 */ std::uint32_t unknown_0018[3]; + /* 0018 */ std::uint32_t reserved[3]; }; struct GroundLegacyLightmap { diff --git a/Source/Resource/World/WorldResource.cpp b/Source/Resource/World/WorldResource.cpp index 90f0473e2..22dbb2604 100644 --- a/Source/Resource/World/WorldResource.cpp +++ b/Source/Resource/World/WorldResource.cpp @@ -308,7 +308,7 @@ bool C3dWorldRes::Load(const char* name) { std::strcpy(record->node, wire.node); record->animationSpeed = speed; record->animation = animation; - record->unknown_00F0 = unknown; + record->animationType = unknown; std::memcpy(record->position, wire.position, sizeof(record->position)); std::memcpy(record->rotation, wire.rotation, sizeof(record->rotation)); std::memcpy(record->scale, wire.scale, sizeof(record->scale)); diff --git a/Source/Resource/World/WorldResource.h b/Source/Resource/World/WorldResource.h index c52229649..2f9de5527 100644 --- a/Source/Resource/World/WorldResource.h +++ b/Source/Resource/World/WorldResource.h @@ -18,7 +18,7 @@ struct WorldModelRecord { /* 00D4 */ float rotation[3]{}; /* 00E0 */ float scale[3]{}; /* 00EC */ int animation; - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int animationType; /* 00F4 */ float animationSpeed; /* 00F8 */ unsigned char unknown_00F8[12]; /* 0104 */ unsigned char flag; diff --git a/Source/Resource/XmlNode.cpp b/Source/Resource/XmlNode.cpp index cfa69f29b..6da84a1c7 100644 --- a/Source/Resource/XmlNode.cpp +++ b/Source/Resource/XmlNode.cpp @@ -5,7 +5,7 @@ // OFFSET: 0x00AFA470 // FUNCTION: fn_18291 -XmlNode::XmlNode(const char* name) : name(name), unknown_0004(0), unknown_0008(0), sibling(nullptr), child(nullptr) { +XmlNode::XmlNode(const char* name) : name(name), sourceBegin(0), sourceEnd(0), sibling(nullptr), child(nullptr) { } // OFFSET: 0x00AFA500 @@ -49,8 +49,8 @@ void XmlNode::Clear() { this->child = nullptr; } - this->unknown_0004 = 0; - this->unknown_0008 = 0; + this->sourceBegin = 0; + this->sourceEnd = 0; } // OFFSET: 0x00AFA6B0 diff --git a/Source/Resource/XmlNode.h b/Source/Resource/XmlNode.h index 73ad0be0a..e4b817a88 100644 --- a/Source/Resource/XmlNode.h +++ b/Source/Resource/XmlNode.h @@ -15,8 +15,8 @@ struct XmlNode { std::string DecodeEntity(const char* begin, const char* end); /* 0000 */ const char* name; - /* 0004 */ char* unknown_0004; - /* 0008 */ char* unknown_0008; + /* 0004 */ char* sourceBegin; + /* 0008 */ char* sourceEnd; /* 000C */ std::string text; /* 0024 */ XmlNode* sibling; /* 0028 */ XmlNode* child; diff --git a/Source/Resource/XmlParsing.cpp b/Source/Resource/XmlParsing.cpp index 5f2d1cd26..3014be04d 100644 --- a/Source/Resource/XmlParsing.cpp +++ b/Source/Resource/XmlParsing.cpp @@ -7,21 +7,21 @@ // FUNCTION: fn_18298 const std::string& XmlNode::Text() { if (this->text.size() == 0) { - char* cursor = this->unknown_0004; + char* cursor = this->sourceBegin; while (*cursor != '>' && *cursor != '\0') { ++cursor; } - char* end = this->unknown_0008; + char* end = this->sourceEnd; for (++cursor; cursor != end; ++cursor) { for (XmlNode* node = this->child; node != nullptr; node = node->child) { - if (cursor == node->unknown_0004) { - cursor = node->unknown_0008; + if (cursor == node->sourceBegin) { + cursor = node->sourceEnd; } for (XmlNode* sibling = node->sibling; sibling != nullptr; sibling = sibling->sibling) { - if (cursor == sibling->unknown_0004) { - cursor = sibling->unknown_0008; + if (cursor == sibling->sourceBegin) { + cursor = sibling->sourceEnd; } } } @@ -94,7 +94,7 @@ char* XmlDocument::ParseElements(XmlNode* parent, char* cursor, char* end) { char* next = close + 1; if (std::strcmp(this->TerminateName(cursor + 2, end), parent->name) == 0) { - parent->unknown_0008 = next; + parent->sourceEnd = next; return next; } @@ -129,7 +129,7 @@ char* XmlDocument::ParseElements(XmlNode* parent, char* cursor, char* end) { continue; } - node->unknown_0004 = cursor; + node->sourceBegin = cursor; cursor = this->ParseElements(node, next, end); } else { if (value == '&' && std::strcmp(parent->name, "registrationweb") != 0) { @@ -161,8 +161,8 @@ bool XmlDocument::Parse(const char* begin, const char* end) { this->buffer = buffer; std::memcpy(buffer, begin, length); buffer[length] = '\0'; - this->unknown_0004 = buffer; - this->unknown_0008 = buffer + length; + this->sourceBegin = buffer; + this->sourceEnd = buffer + length; this->ParseElements(this, buffer, buffer + length); return this->child != nullptr; } diff --git a/Source/Script/LuaScript.cpp b/Source/Script/LuaScript.cpp index 7e0047fc8..c81c92685 100644 --- a/Source/Script/LuaScript.cpp +++ b/Source/Script/LuaScript.cpp @@ -173,7 +173,7 @@ int SetCmdOnOffList(lua_State* state) { if (optionId != 3) { if (optionId == 229) { const int value = enabled; - std::memcpy(g_session.unknown_5454, &value, sizeof(value)); + std::memcpy(g_session.interactionFlags, &value, sizeof(value)); } g_session.m_commandOptions.emplace_back(name, optionId); } @@ -337,22 +337,22 @@ int SetMagicFloorInfo(lua_State* state) { effect->ResetParticles(); break; case MSG_SET_AREA: - *reinterpret_cast(&effect->unknown_003C[8]) = static_cast(luaL_checknumber(state, 3)); + *reinterpret_cast(&effect->areaParameters[8]) = static_cast(luaL_checknumber(state, 3)); break; case MSG_SET_SIZE2: - reinterpret_cast(effect->unknown_0048) = static_cast(luaL_checknumber(state, 3)); + reinterpret_cast(effect->scaleParameter) = static_cast(luaL_checknumber(state, 3)); break; case MSG_SET_ANGLE: - *reinterpret_cast(effect->unknown_004C) = luaL_checknumber(state, 3); + *reinterpret_cast(effect->angleParameter) = luaL_checknumber(state, 3); break; case MSG_SET_RISEANGLE: - reinterpret_cast(effect->unknown_0050) = static_cast(static_cast(luaL_checknumber(state, 3))); + reinterpret_cast(effect->rotationParameter) = static_cast(static_cast(luaL_checknumber(state, 3))); break; case MSG_SET_ALPHA: - *reinterpret_cast(&effect->unknown_0054[0]) = luaL_checknumber(state, 3); + *reinterpret_cast(&effect->alphaParameters[0]) = luaL_checknumber(state, 3); break; case MSG_SET_FDA: - *reinterpret_cast(&effect->unknown_0054[4]) = luaL_checknumber(state, 3); + *reinterpret_cast(&effect->alphaParameters[4]) = luaL_checknumber(state, 3); break; case MSG_SET_HEIGHT0: case MSG_SET_HEIGHT1: @@ -375,7 +375,7 @@ int SetMagicFloorInfo(lua_State* state) { case MSG_SET_HEIGHT18: case MSG_SET_HEIGHT19: case MSG_SET_HEIGHT20: - reinterpret_cast(&effect->unknown_0054[8])[key - 21] = static_cast(static_cast(luaL_checknumber(state, 3))); + reinterpret_cast(&effect->alphaParameters[8])[key - 21] = static_cast(static_cast(luaL_checknumber(state, 3))); break; } @@ -434,22 +434,22 @@ int SetOtherEffectInfo(lua_State* state) { effect->ResetParticles(); break; case MSG_SET_AREA: - *reinterpret_cast(&effect->unknown_003C[8]) = static_cast(luaL_checknumber(state, 4)); + *reinterpret_cast(&effect->areaParameters[8]) = static_cast(luaL_checknumber(state, 4)); break; case MSG_SET_SIZE2: - reinterpret_cast(effect->unknown_0048) = static_cast(luaL_checknumber(state, 4)); + reinterpret_cast(effect->scaleParameter) = static_cast(luaL_checknumber(state, 4)); break; case MSG_SET_ANGLE: - *reinterpret_cast(effect->unknown_004C) = luaL_checknumber(state, 4); + *reinterpret_cast(effect->angleParameter) = luaL_checknumber(state, 4); break; case MSG_SET_RISEANGLE: - reinterpret_cast(effect->unknown_0050) = static_cast(static_cast(luaL_checknumber(state, 4))); + reinterpret_cast(effect->rotationParameter) = static_cast(static_cast(luaL_checknumber(state, 4))); break; case MSG_SET_ALPHA: - *reinterpret_cast(&effect->unknown_0054[0]) = luaL_checknumber(state, 4); + *reinterpret_cast(&effect->alphaParameters[0]) = luaL_checknumber(state, 4); break; case MSG_SET_FDA: - *reinterpret_cast(&effect->unknown_0054[4]) = luaL_checknumber(state, 4); + *reinterpret_cast(&effect->alphaParameters[4]) = luaL_checknumber(state, 4); break; case MSG_SET_HEIGHT0: case MSG_SET_HEIGHT1: @@ -472,7 +472,7 @@ int SetOtherEffectInfo(lua_State* state) { case MSG_SET_HEIGHT18: case MSG_SET_HEIGHT19: case MSG_SET_HEIGHT20: - reinterpret_cast(&effect->unknown_0054[8])[key - 21] = static_cast(static_cast(luaL_checknumber(state, 4))); + reinterpret_cast(&effect->alphaParameters[8])[key - 21] = static_cast(static_cast(luaL_checknumber(state, 4))); break; } @@ -713,20 +713,20 @@ int AddEntryQueue(lua_State* state) { info->id = id; strcpy_s(info->name, sizeof(info->name), name.c_str()); strcpy_s(info->displayName, sizeof(info->displayName), displayName.c_str()); - info->unknown_020C = value020C; - info->unknown_0210 = value0210; - info->unknown_0214 = static_cast(value0214); - info->unknown_0215 = static_cast(value0215); - info->unknown_0216 = static_cast(value0216); - info->unknown_0217 = static_cast(value0217); - info->unknown_0218 = static_cast(value0218); - info->unknown_021C = value021C; - info->unknown_0220 = value0220; - strcpy_s(info->unknown_0224, sizeof(info->unknown_0224), text0224.c_str()); - strcpy_s(info->unknown_0328, sizeof(info->unknown_0328), text0328.c_str()); - strcpy_s(info->unknown_042C, sizeof(info->unknown_042C), text042C.c_str()); - strcpy_s(info->unknown_0530, sizeof(info->unknown_0530), text0530.c_str()); - strcpy_s(info->unknown_0634, sizeof(info->unknown_0634), text0634.c_str()); + info->minLevel = value020C; + info->maxLevel = value0210; + info->queueFlagA = static_cast(value0214); + info->queueFlagB = static_cast(value0215); + info->queueFlagC = static_cast(value0216); + info->queueFlagD = static_cast(value0217); + info->limitType = static_cast(value0218); + info->limitValue = value021C; + info->limitValueEnd = value0220; + strcpy_s(info->description, sizeof(info->description), text0224.c_str()); + strcpy_s(info->rulesText, sizeof(info->rulesText), text0328.c_str()); + strcpy_s(info->rewardText, sizeof(info->rewardText), text042C.c_str()); + strcpy_s(info->extraText, sizeof(info->extraText), text0530.c_str()); + strcpy_s(info->bitmapName, sizeof(info->bitmapName), text0634.c_str()); g_entryQueueList.insert(std::make_pair(id, info)); return 0; @@ -1303,7 +1303,7 @@ int UIWindowMgr::GetHotkeyBehavior() { const int count = HotkeyCount(*g_session.m_hotkeyScript, 0); for (int index = 0; index < count; ++index) { const HotkeyInfo hotkey = GetHotkeyInfo(*g_session.m_hotkeyScript, 0, index); - if (hotkey.key1 == this->keyCode && g_session.m_shortcutSlots[index].unknown_0000 != 0) { + if (hotkey.key1 == this->keyCode && g_session.m_shortcutSlots[index].enabled != 0) { return index; } } diff --git a/Source/Security/NProtectGameGuardMgr.cpp b/Source/Security/NProtectGameGuardMgr.cpp index f471909fd..b4bc4ac44 100644 --- a/Source/Security/NProtectGameGuardMgr.cpp +++ b/Source/Security/NProtectGameGuardMgr.cpp @@ -134,7 +134,7 @@ const char* CNProtectGameGuardMgr::GameName() { return DecryptName<0x7321C3814F8799E1ULL>(source); } case 0: - if (std::strstr(g_session.unknown_58FA, g_devClientTag) != nullptr) { + if (std::strstr(g_session.clientVersion, g_devClientTag) != nullptr) { const char source[] = {'\x1D', '\xC0', '\xA8', '\x5B', '\x02', '\xA5', '\x2E', '\x12', '\x04', '\xF3', '\xCF'}; return DecryptName<0x7941D76335CFA14FULL>(source); } else { diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index e649da7c6..1b889290e 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -246,37 +246,37 @@ UIBookWnd::UIBookWnd() this->m_autoTick = 0; this->m_autoLine = -1; this->m_autoRead = 0; - this->unknown_00B8 = nullptr; + this->m_balloon = nullptr; this->m_bookName[0] = 0; } // OFFSET: 0x008C7860 // FUNCTION: fn_11940 UIEquipWnd::UIEquipWnd() : UIFrameWnd(0) { - this->unknown_0124 = nullptr; - this->unknown_0128 = 0; - this->unknown_012C = 0; - this->unknown_0130 = 0; - this->unknown_0178 = 0; + this->swapWindow = nullptr; + this->swapState = 0; + this->swapButton = 0; + this->unequipButton = 0; + this->abilityButton = 0; this->m_placement = nullptr; this->m_updateTick = timeGetTime(); - this->unknown_00D8 = 0; + this->contentOffset = 0; this->m_page = 0; this->m_contentTop = 20; - for (int& value : this->unknown_00F8) { + for (int& value : this->appearance) { value = 0; } - this->unknown_011C = 0; - this->unknown_012C = 0; + this->costumeJob = 0; + this->swapButton = 0; this->m_scrollBar = nullptr; - for (UIWindow*& value : this->unknown_0138) { + for (UIWindow*& value : this->damageSkinButtons) { value = nullptr; } this->m_firstSlot = 0; - this->unknown_015C = g_session.m_damageSkinMode; + this->damageSkinMode = g_session.m_damageSkinMode; this->m_hoverSlot = g_session.m_damageSkinIndex; - this->m_damageSkinNames.reserve(g_session.unknown_80C8); - this->m_damageSkinIcons.reserve(g_session.unknown_80C8); + this->m_damageSkinNames.reserve(g_session.damageSkinCount); + this->m_damageSkinIcons.reserve(g_session.damageSkinCount); } // OFFSET: 0x008CAC40 @@ -319,7 +319,7 @@ void UIChooseSellBuyWnd::CreateViewer(int width, int height) { // OFFSET: 0x008C7420 // FUNCTION: fn_11931 UIChooseWarpWnd::UIChooseWarpWnd() - : UIFrameWnd(0), m_list(nullptr), unknown_00B8(0), m_choices() { + : UIFrameWnd(0), m_list(nullptr), skillId(0), m_choices() { this->m_choices.reserve(6); } @@ -552,7 +552,7 @@ void UIEquipWnd::Paint() { if (this->m_viewOther == 1) { char title[100]; - std::sprintf(title, LookupMessage(MSI_OTHERUSER_EQUIPED_ITEM), reinterpret_cast(&g_session.unknown_5974[0x2C])); + std::sprintf(title, LookupMessage(MSI_OTHERUSER_EQUIPED_ITEM), reinterpret_cast(&g_session.equipmentViewState[0x2C])); this->DrawTextAt(17, 4, title, 0, 0, 12, 0xFFFFFF, 0, 0); this->DrawTextAt(16, 3, title, 0, 0, 12, 0, 0, 0); } else { @@ -572,7 +572,7 @@ void UIEquipWnd::Paint() { if (this->m_page == 2) { this->FillRegion(1, this->m_contentTop + 15, this->geometry.width - 2, 131, 0xFFFFFF); DrawRectangleBorder(*this, 2, this->m_contentTop + 38, this->geometry.width - 4, 107, 0x646464); - const std::string jobTitle = GetJobTitleString(g_session.unknown_615C); + const std::string jobTitle = GetJobTitleString(g_session.jobTitle); this->DrawCenteredText(1, this->m_contentTop + 20, jobTitle.c_str(), this->geometry.width - 2, 0, 13, 0, 1); } if (this->m_page == 3) { @@ -598,19 +598,19 @@ void UIEquipWnd::Paint() { this, this->geometry.width / 2 + 1, 149, - static_cast(this->unknown_00F8[1]), - static_cast(this->unknown_00F8[0]), - this->unknown_00F8[0], - static_cast(this->unknown_011C), - static_cast(this->unknown_00F8[2]), - static_cast(this->unknown_00F8[3]), - static_cast(this->unknown_00F8[4]), - static_cast(this->unknown_00F8[5]), - this->unknown_0118, + static_cast(this->appearance[1]), + static_cast(this->appearance[0]), + this->appearance[0], + static_cast(this->costumeJob), + static_cast(this->appearance[2]), + static_cast(this->appearance[3]), + static_cast(this->appearance[4]), + static_cast(this->appearance[5]), + this->robeId, 0, - g_session.unknown_8074, - this->unknown_00F8[6], - this->unknown_00F8[7], + g_session.madogearType, + this->appearance[6], + this->appearance[7], 0, 0, this->m_updateTick @@ -619,8 +619,8 @@ void UIEquipWnd::Paint() { if (this->m_viewOther == 0) { if (this->m_page == 0) { - ITEM_INFO dragItem = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_16EC); - if (dragItem.unknown_0000[1] != 0) { + ITEM_INFO dragItem = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.equippedArrowIndex); + if (dragItem.identity[1] != 0) { DrawItemIcon(*this, ResourceMgr::Instance(), this->geometry.width / 2 - 25, this->m_contentTop + 44, dragItem, 0); this->DrawItemName(this->geometry.width / 2 - 25, this->m_contentTop + 68, 40, &dragItem, 0, 0, 12); } @@ -633,8 +633,8 @@ void UIEquipWnd::Paint() { } } - if (this->unknown_0124) { - this->unknown_0124->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->swapWindow) { + this->swapWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -771,7 +771,7 @@ void UIMinimapZoomWnd::OnCreate(int, int) { const char* names[5] = {"object", "plus", "minus", "mini", "viewon"}; const std::string prefix("minimap\\i_"); - auto& buttons = *reinterpret_cast*>(&this->unknown_00BC); + auto& buttons = *reinterpret_cast*>(&this->townButtonsStorage); buttons.clear(); for (int i = 0; i < 5; ++i) { const std::string name = prefix + names[i]; @@ -806,21 +806,21 @@ int UIMinimapZoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum } return 0; case ID_PLUS: - g_windowMgr.unknown_0050 += (g_windowMgr.unknown_0050 / 3.0f + g_windowMgr.unknown_0050) * 0.25f; - if (g_windowMgr.unknown_0050 > 4.0f) { - g_windowMgr.unknown_0050 = 4.0f; + g_windowMgr.minimapZoom += (g_windowMgr.minimapZoom / 3.0f + g_windowMgr.minimapZoom) * 0.25f; + if (g_windowMgr.minimapZoom > 4.0f) { + g_windowMgr.minimapZoom = 4.0f; } return 0; case ID_MINUS: - g_windowMgr.unknown_0050 -= g_windowMgr.unknown_0050 * 0.25f; - if (g_windowMgr.unknown_0050 < 1.0f) { - g_windowMgr.unknown_0050 = 1.0f; + g_windowMgr.minimapZoom -= g_windowMgr.minimapZoom * 0.25f; + if (g_windowMgr.minimapZoom < 1.0f) { + g_windowMgr.minimapZoom = 1.0f; } return 0; case 452: - g_windowMgr.unknown_0054 = g_windowMgr.unknown_0054 == 0; + g_windowMgr.minimapMarkersVisible = g_windowMgr.minimapMarkersVisible == 0; for (auto it = this->m_zoom.begin(); it != this->m_zoom.end(); ++it) { - static_cast(it->second)->Enable(g_windowMgr.unknown_0054); + static_cast(it->second)->Enable(g_windowMgr.minimapMarkersVisible); } this->Invalidate(); return 0; @@ -848,7 +848,7 @@ int UIMinimapZoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum } case 502: { const unsigned char enabled = g_serviceOptions.Get(223); - const auto& buttons = *reinterpret_cast*>(&this->unknown_00BC); + const auto& buttons = *reinterpret_cast*>(&this->townButtonsStorage); for (auto it = buttons.begin(); it != buttons.end(); ++it) { static_cast(*it)->Enable(enabled); } @@ -946,7 +946,7 @@ void UIMonsterDisplayWnd::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, sprite->palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } int x = cell.x + offsetX + left; @@ -960,8 +960,8 @@ void UIMonsterDisplayWnd::Paint() { const int width = x + image->width > 75 ? 75 - x : image->width; const int height = y + image->height > 125 ? 125 - y : image->height; this->geometry.surface->DrawSurface( - x, y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), width, height, cell.mirrored != 0, image->unknown_0004 + 1, - image->unknown_0006 + 1, 0, 0 + x, y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), width, height, cell.mirrored != 0, image->doubleWidth + 1, + image->doubleHeight + 1, 0, 0 ); } } @@ -1000,7 +1000,7 @@ void UINpcTextEditDialogWnd::Paint() { this->m_tagCtrl->SetTaggedText(std::string(this->edit->Text()), this->edit->geometry.width); this->m_tagCtrl->UpdateItemTags(); - if (this->m_tagCtrl->unknown_011C == 0) { + if (this->m_tagCtrl->previousTagCount == 0) { delete this->m_tagCtrl; this->m_tagCtrl = nullptr; } @@ -1009,7 +1009,7 @@ void UINpcTextEditDialogWnd::Paint() { // OFFSET: 0x008FFC90 // FUNCTION: fn_12365 int UINpcEditDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_UNEQUIP_ARROW2)), 0x64FFFF, 0, 0, 0); return 0; } @@ -1018,13 +1018,13 @@ int UINpcEditDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg case UM_COMMAND: { this->RecordResponse(static_cast(argument1), argument2, argument3, argument4); if (argument1 == ID_OK && this->edit->Length()) { - g_modeMgr.gameMode->SendMsg(MM_SEND_NUMBER_TO_NPC, this->unknown_00B8, std::atoi(this->edit->Text()), 0, 0); + g_modeMgr.gameMode->SendMsg(MM_SEND_NUMBER_TO_NPC, this->npcId, std::atoi(this->edit->Text()), 0, 0); g_windowMgr.CloseWindow(WID_NPCEDITDIALOGWND); } return 0; } case UM_SETNAID: { - this->unknown_00B8 = static_cast(argument1); + this->npcId = static_cast(argument1); return 0; } } @@ -1036,13 +1036,13 @@ int UINpcEditDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg // FUNCTION: fn_12366 int UINpcTextEditDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { if (message != UM_COMMAND) { - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_UNEQUIP_ARROW2)), 0x64FFFF, 0, 0, 0); return 0; } if (message == UM_SETNAID) { - this->unknown_00B8 = static_cast(argument1); + this->npcId = static_cast(argument1); return 0; } @@ -1073,22 +1073,22 @@ int UINpcTextEditDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t CMode* mode = g_modeMgr.gameMode; if (g_navigationLinkParser->HasLink(std::string(this->edit->Text())) - || (!this->edit->LinkedText().empty() && this->m_tagCtrl && !this->m_tagCtrl->unknown_0140.empty())) { + || (!this->edit->LinkedText().empty() && this->m_tagCtrl && !this->m_tagCtrl->linkedText.empty())) { this->edit->SetText(""); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CLOSE)), 0xFF, 0, 0, 0); return 0; } if (!this->edit->LinkedText().empty()) { - mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->unknown_00B8, reinterpret_cast(this->edit->Text()), reinterpret_cast(this->edit->LinkedText().c_str()), 0); - } else if (this->m_tagCtrl && !this->m_tagCtrl->unknown_0140.empty()) { - if (g_navigationLinkParser->HasUnownedItemLink(std::string(this->m_tagCtrl->unknown_0140.c_str())) == true) { + mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->npcId, reinterpret_cast(this->edit->Text()), reinterpret_cast(this->edit->LinkedText().c_str()), 0); + } else if (this->m_tagCtrl && !this->m_tagCtrl->linkedText.empty()) { + if (g_navigationLinkParser->HasUnownedItemLink(std::string(this->m_tagCtrl->linkedText.c_str())) == true) { this->edit->SetText(""); return 0; } - mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->unknown_00B8, reinterpret_cast(this->edit->Text()), reinterpret_cast(this->m_tagCtrl->unknown_0140.c_str()), 0); + mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->npcId, reinterpret_cast(this->edit->Text()), reinterpret_cast(this->m_tagCtrl->linkedText.c_str()), 0); } else { - mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->unknown_00B8, reinterpret_cast(this->edit->Text()), 0, 0); + mode->SendMsg(MM_SEND_TEXT_TO_NPC, this->npcId, reinterpret_cast(this->edit->Text()), 0, 0); } g_windowMgr.CloseWindow(WID_NPCTEXTEDITDIALOGWND); @@ -1163,9 +1163,9 @@ int UIPartySettingWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s } CMode* mode = g_modeMgr.GetGameMode(); if (g_session.PartyCount() != 0) { - if (g_session.unknown_5464 != 0) { - if (this->m_expShare != g_session.unknown_54A0 || this->m_itemShare != g_session.unknown_54A4 || - this->m_itemDistribute != g_session.unknown_54A8) { + if (g_session.partyLeader != 0) { + if (this->m_expShare != g_session.partyExpShare || this->m_itemShare != g_session.partyItemCollect || + this->m_itemDistribute != g_session.partyItemDistribute) { mode->SendMsg(MM_GROUPINFO_CHANGE_V2, this->m_expShare, this->m_itemShare, this->m_itemDistribute, 0); } } @@ -1197,7 +1197,7 @@ int UIPartySettingWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_HEIGHT_220); return 0; case ID_RADIOBTN: - if (g_session.PartyCount() == 0 || g_session.unknown_5464 != 0) { + if (g_session.PartyCount() == 0 || g_session.partyLeader != 0) { if (sender == this->m_expShareButtons[0] || sender == this->m_expShareButtons[1]) { for (int i = 0; i < 2; ++i) { if (sender == this->m_expShareButtons[i]) { @@ -1238,9 +1238,9 @@ int UIPartySettingWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); } else { this->Invalidate(); - this->m_expShare = g_session.unknown_54A0; - this->m_itemShare = g_session.unknown_54A4; - this->m_itemDistribute = g_session.unknown_54A8; + this->m_expShare = g_session.partyExpShare; + this->m_itemShare = g_session.partyItemCollect; + this->m_itemDistribute = g_session.partyItemDistribute; for (int i = 0; i < 2; ++i) { this->m_expShareButtons[i]->SendMsg(this, UM_SETSTATE, this->m_expShare == i, 0, 0, 0); if (this->m_itemShareButtons[i]) { @@ -1265,12 +1265,12 @@ int UIPasswordWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: case UM_COMMAND: if (a == ID_OK) { CMode* mode = g_modeMgr.gameMode; - mode->SendMsg(MM_REQ_ENTER_ROOM, this->unknown_00BC, reinterpret_cast(this->m_edit->Text()), 0, 0); + mode->SendMsg(MM_REQ_ENTER_ROOM, this->roomId, reinterpret_cast(this->m_edit->Text()), 0, 0); g_windowMgr.CloseWindow(WID_PASSWORDWND); } return 0; case UM_SETROOMID: - this->unknown_00BC = static_cast(a); + this->roomId = static_cast(a); return 0; default: return this->UIFrameWnd::SendMsg(sender, message, a, b, c, d); @@ -1565,7 +1565,7 @@ void UIItemIdentifyWnd::OnLBtnDblClk(int x, int y) { // FUNCTION: fn_12253 void UIStatusWnd::Paint() { this->DrawTitleBar(true, LookupMessage(MSI_STATUS), 0); - if (this->geometry.height == this->m_titleHeight || this->geometry.unknown_0030 != 0) { + if (this->geometry.height == this->m_titleHeight || this->geometry.state != 0) { return; } @@ -1575,12 +1575,12 @@ void UIStatusWnd::Paint() { } const int stats[6][2] = { - {g_session.m_standardStats[0], g_session.unknown_166C}, - {g_session.m_standardStats[1], g_session.unknown_1670}, - {g_session.m_standardStats[2], g_session.unknown_1674}, - {g_session.m_standardStats[3], g_session.unknown_1678}, - {g_session.m_standardStats[4], g_session.unknown_167C}, - {g_session.m_standardStats[5], g_session.unknown_1680}, + {g_session.m_standardStats[0], g_session.strengthBonus}, + {g_session.m_standardStats[1], g_session.agilityBonus}, + {g_session.m_standardStats[2], g_session.vitalityBonus}, + {g_session.m_standardStats[3], g_session.intelligenceBonus}, + {g_session.m_standardStats[4], g_session.dexterityBonus}, + {g_session.m_standardStats[5], g_session.luckBonus}, }; const int* entry = stats[0]; for (int y = 23; y < 119; y += 16, entry += 2) { @@ -1602,7 +1602,7 @@ void UIStatusWnd::Paint() { } } - const int* derived = reinterpret_cast(g_session.unknown_169C); + const int* derived = reinterpret_cast(g_session.combatStats); const int required[6] = {derived[0], derived[1], derived[2], derived[3], derived[4], derived[5]}; const int* cost = required; for (int y = 23; y < 119; y += 16, ++cost) { @@ -1617,9 +1617,9 @@ void UIStatusWnd::Paint() { this->DrawRightAlignedText(275, 38, FormatOwnedString("%d + %d", derived[8], derived[15]).c_str(), 0, 1, 14, 0, 0); this->DrawRightAlignedText(275, 54, FormatOwnedString("%d + %d", derived[17], derived[19]).c_str(), 0, 1, 14, 0, 0); this->DrawRightAlignedText(275, 70, FormatOwnedString("%d", (2000 - derived[6]) / 10).c_str(), 0, 1, 14, 0, 0); - this->DrawRightAlignedText(275, 86, FormatOwnedString("%d", *reinterpret_cast(g_session.unknown_1654)).c_str(), 0, 1, 14, 0, 0); - if (g_guildInfo.unknown_0000.size() != 0) { - this->DrawRightAlignedText(275, 102, g_guildInfo.unknown_0000.c_str(), 0, 0, 12, 0, 0); + this->DrawRightAlignedText(275, 86, FormatOwnedString("%d", *reinterpret_cast(g_session.statusPoints)).c_str(), 0, 1, 14, 0, 0); + if (g_guildInfo.guildName.size() != 0) { + this->DrawRightAlignedText(275, 102, g_guildInfo.guildName.c_str(), 0, 0, 12, 0, 0); } if (this->m_extended != 1) { @@ -1796,7 +1796,7 @@ void UIPetTamingDeceiveWnd::Paint() { } this->geometry.surface->DrawSurface( this->geometry.width / 2 + cell.x, this->geometry.height / 2 + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } @@ -1862,8 +1862,8 @@ void UISelectCartWnd::AddCart(int index, int type) { button->SetActName((std::string("이팩트\\") + name + std::string(".act")).c_str()); button->SetSize(100, 100); button->Move(x, y); - button->unknown_00BC = 0; - button->unknown_00C0 = 0; + button->animationIndex = 0; + button->frameIndex = 0; button->SetId(type + 9000); this->AddChild(button); } @@ -1877,7 +1877,7 @@ void UIItemCollectionWnd::OnLBtnDown(int x, int y) { this->UIFrameWnd::OnLBtnDown(x, y); if (this->m_kind == 12) { - UIWindow* comparison = g_windowMgr.unknown_0220; + UIWindow* comparison = g_windowMgr.itemCollectionComparisonWnd; if (!comparison) { return; } @@ -1888,7 +1888,7 @@ void UIItemCollectionWnd::OnLBtnDown(int x, int y) { } if (this->m_kind == 82) { - UIWindow* comparison = g_windowMgr.unknown_0224; + UIWindow* comparison = g_windowMgr.combinedCardItemCollectionComparisonWnd; if (comparison) { const int targetAlpha = this->geometry.targetAlpha; const int alphaStart = this->geometry.alphaStart; @@ -1915,7 +1915,7 @@ void UICombinedCardItemCollection_ComparisonWnd::OnLBtnUp(int, int) { // FUNCTION: fn_12280 void UICombinedCardItemCollectionWnd::OnLBtnUp(int x, int y) { this->UIFrameWnd::OnLBtnUp(x, y); - if (UIWindow* comparison = g_windowMgr.unknown_0224) { + if (UIWindow* comparison = g_windowMgr.combinedCardItemCollectionComparisonWnd) { const int targetAlpha = this->geometry.targetAlpha; const int alphaStart = this->geometry.alphaStart; comparison->geometry.targetAlpha = targetAlpha; @@ -1948,7 +1948,7 @@ void UIEquipWnd::OnLBtnUp(int x, int y) { // FUNCTION: fn_12283 void UIItemCollectionWnd::OnLBtnUp(int x, int y) { this->UIFrameWnd::OnLBtnUp(x, y); - if (UIWindow* comparison = g_windowMgr.unknown_0220) { + if (UIWindow* comparison = g_windowMgr.itemCollectionComparisonWnd) { const int targetAlpha = this->geometry.targetAlpha; const int alphaStart = this->geometry.alphaStart; comparison->geometry.targetAlpha = targetAlpha; @@ -1982,7 +1982,7 @@ void UIMenuWnd::OnLBtnUp(int x, int y) { } const int choice = (index - separators) / 2; - UIWindow* target = this->m_menuId == 301 ? g_windowMgr.FindSnapExcludedWindow(static_cast(this->unknown_00CC)) + UIWindow* target = this->m_menuId == 301 ? g_windowMgr.FindSnapExcludedWindow(static_cast(this->m_targetWindowId)) : g_windowMgr.LookupWindow(this->m_menuId); if (target) { target->SendMsg(nullptr, UM_MENU_SELECTED, choice, 0, 0, 0); @@ -2004,10 +2004,10 @@ void UIItemCollectionWnd::OnMouseHover(int x, int y) { ITEM_INFO card; int cardId; - std::memcpy(&cardId, this->m_item.unknown_001C + index * sizeof(cardId), sizeof(cardId)); + std::memcpy(&cardId, this->m_item.cards + index * sizeof(cardId), sizeof(cardId)); card.identified = 1; - card.unknown_0000[0] = 6; - card.unknown_0060 = 0; + card.identity[0] = 6; + card.refiningLevel = 0; card.SetItemId(cardId); CMode* tooltip = g_modeMgr.gameMode; @@ -2022,7 +2022,7 @@ void UIItemCollectionWnd::OnMouseHover(int x, int y) { // OFFSET: 0x008F46C0 // FUNCTION: fn_12290 void UIStatusWnd::OnMouseHover(int x, int y) { - if (this->geometry.unknown_0030 != 0) { + if (this->geometry.state != 0) { return; } @@ -2119,7 +2119,7 @@ ITEM_INFO UIItemParamChangeDisplayWnd::FindEquippedItem(int location) { for (int index = 0; index < 8; ++index) { ITEM_INFO item = g_session.GetItem17F0(index); - if (item.unknown_0000[1] > 0 && item.quantity == 1 && (item.unknown_0000[2] & location) != 0) { + if (item.identity[1] > 0 && item.quantity == 1 && (item.identity[2] & location) != 0) { return item; } } @@ -2153,7 +2153,7 @@ int UIMenuWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp } case UM_SET_CALLER_WID: this->m_menuId = static_cast(a); - this->unknown_00CC = static_cast(b); + this->m_targetWindowId = static_cast(b); return 0; case UM_ADJUSTSIZE: { int width = 20; @@ -2188,7 +2188,7 @@ void UITipboxWnd::ShowTip(int id) { // OFFSET: 0x008F5AF0 // FUNCTION: fn_12313 void UITipboxWnd::UpdatePageText() { - this->m_pageText->SetText(IntToString((std::max)(0, g_itemTagOwner->unknown_00B4) + 1, 0).c_str(), 0); + this->m_pageText->SetText(IntToString((std::max)(0, g_itemTagOwner->paragraphIndex) + 1, 0).c_str(), 0); this->m_pageText->SetFont(0, 12, 1, 0); const std::string separator = "/"; @@ -2196,8 +2196,8 @@ void UITipboxWnd::UpdatePageText() { this->m_pageTotalText->SetText((separator + IntToString(pages, 0)).c_str(), 0); const int pageWidth = this->ColoredTextWidth( - IntToString((std::max)(0, g_itemTagOwner->unknown_00B4) + 1, 0).c_str(), - std::strlen(IntToString((std::max)(0, g_itemTagOwner->unknown_00B4) + 1, 0).c_str()), 0, 12, 1 + IntToString((std::max)(0, g_itemTagOwner->paragraphIndex) + 1, 0).c_str(), + std::strlen(IntToString((std::max)(0, g_itemTagOwner->paragraphIndex) + 1, 0).c_str()), 0, 12, 1 ); const int totalWidth = this->ColoredTextWidth( (separator + IntToString(pages, 0)).c_str(), std::strlen((separator + IntToString(pages, 0)).c_str()), 0, 12, 0 @@ -2212,7 +2212,7 @@ void UITipboxWnd::UpdatePageText() { // FUNCTION: fn_12083 void UIExchangeWnd::DragAndDrop(int x, int y, std::intptr_t value) { CMode* mode = g_modeMgr.GetGameMode(); - if (this->unknown_00CC != 0) { + if (this->isLocalTrader != 0) { mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return; } @@ -2262,19 +2262,19 @@ void UIEquipWnd::DragAndDrop(int x, int y, std::intptr_t value) { break; } - if (item.unknown_0000[1] != 0) { - switch (item.unknown_0000[0]) { + if (item.identity[1] != 0) { + switch (item.identity[0]) { case 10: case 16: case 17: case 19: - mode->SendMsg(MM_WEAR_EQUIP_ARROW, drag->id, item.unknown_0000[2], 0, 0); + mode->SendMsg(MM_WEAR_EQUIP_ARROW, drag->id, item.identity[2], 0, 0); break; default: if (fromStorage) { mode->SendMsg(MM_SWAP_EQUIPMENT_BY_INDEX, reinterpret_cast(&item), 0, 0, 0); - } else if (item.identified && item.unknown_0000[2] != 0 && item.unknown_0000[3] == 0) { - mode->SendMsg(MM_WEAR_EQUIP, drag->id, item.unknown_0000[2], 0, 0); + } else if (item.identified && item.identity[2] != 0 && item.identity[3] == 0) { + mode->SendMsg(MM_WEAR_EQUIP, drag->id, item.identity[2], 0, 0); } break; } @@ -2335,7 +2335,7 @@ bool UIWhisperWnd::GetCustomTransBoxInfo(void*) { // FUNCTION: fn_12141 void UIExchangeWnd::LayoutButtons() { const int x[3] = {3, 260, 510}; - const int y[3] = {this->unknown_00CC * 120, this->unknown_00CC != 0 && this->unknown_00D0 != 0 && this->unknown_00D8 == 0 ? 0 : 120, 0}; + const int y[3] = {this->isLocalTrader * 120, this->isLocalTrader != 0 && this->localConfirmed != 0 && this->localAccepted == 0 ? 0 : 120, 0}; for (int index = 0; index < 3; ++index) { this->m_buttons[index]->Move(x[index], this->geometry.height - 23 + y[index]); @@ -2346,8 +2346,8 @@ void UIExchangeWnd::LayoutButtons() { // OFFSET: 0x008DA2E0 // FUNCTION: fn_12142 void UIEquipWnd::NotifyEquipmentChanged() { - if (this->unknown_0124) { - this->unknown_0124->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->swapWindow) { + this->swapWindow->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } @@ -2406,7 +2406,7 @@ void UINpcTextEditDialogWnd::InsertSkillTag(int tagId) { return; } - if (this->edit->Length() + this->edit->unknown_00F0 > this->edit->maximum) { + if (this->edit->Length() + this->edit->tagTextLength > this->edit->maximum) { return; } @@ -2424,7 +2424,7 @@ void UINpcTextEditDialogWnd::InsertSkillTag(int tagId) { // FUNCTION: fn_12150 void UICombinedCardItemCollectionWnd::Move(int x, int y) { UIFrameWnd::Move(x, y); - if (UIWindow* comparison = g_windowMgr.unknown_0224) { + if (UIWindow* comparison = g_windowMgr.combinedCardItemCollectionComparisonWnd) { if (UIWindow* window = g_windowMgr.LookupWindow(WID_COMBINEDCARDITEMCOLLECTIONWND)) { static_cast(comparison)->UIFrameWnd::Move(window->geometry.x - window->geometry.width, window->geometry.y); } @@ -2441,7 +2441,7 @@ void UIEquipWnd::Move(int x, int y) { // FUNCTION: fn_12152 void UIItemCollectionWnd::Move(int x, int y) { UIFrameWnd::Move(x, y); - if (UIWindow* comparison = g_windowMgr.unknown_0220) { + if (UIWindow* comparison = g_windowMgr.itemCollectionComparisonWnd) { if (UIWindow* window = g_windowMgr.LookupWindow(WID_ITEMCOLLECTIONWND)) { static_cast(comparison)->UIFrameWnd::Move(window->geometry.x - window->geometry.width, window->geometry.y); } @@ -2550,7 +2550,7 @@ void UIExchangeWnd::OnWheel(int delta) { // OFFSET: 0x008F59C0 // FUNCTION: fn_12309 void UIEquipWnd::OnWheel(int delta) { - if (g_session.unknown_80C8 > 4 && this->m_page == 3) { + if (g_session.damageSkinCount > 4 && this->m_page == 3) { if (delta < 0) { this->SendMsg(this->m_scrollBar, UM_SCROLLHORZ, 1, 0, 0, 0); } else { @@ -2582,17 +2582,17 @@ void UIItemParamChangeDisplayWnd::SumEquippedStats() { int locations = 0; for (int index = 0; index < 8; ++index) { ITEM_INFO item = g_session.GetItem17F0(index); - if (item.unknown_0000[1] > 0 && item.quantity == 1) { + if (item.identity[1] > 0 && item.quantity == 1) { const ITEM_DESC& description = FindItemDescription(std::atoi(item.itemId.c_str())); - const bool duplicate = (description.unknown_002C & locations) != 0; - locations |= description.unknown_002C; + const bool duplicate = (description.descriptionFlags & locations) != 0; + locations |= description.descriptionFlags; if (duplicate) { continue; } - if (description.unknown_0034.size() == 2) { - this->m_before += description.unknown_0034[0]; - this->m_beforeSecond += description.unknown_0034[1]; + if (description.descriptionValues.size() == 2) { + this->m_before += description.descriptionValues[0]; + this->m_beforeSecond += description.descriptionValues[1]; } } } @@ -2637,14 +2637,14 @@ int UIBookWnd::LoadBookmark(const char* name) { // OFFSET: 0x008F6640 // FUNCTION: fn_12319 void UIExchangeWnd::CancelInput() { - if (this->unknown_00CC == 0) { + if (this->isLocalTrader == 0) { return; } - if (this->unknown_00C0) { + if (this->zenyEdit) { g_windowMgr.SetFocus(nullptr); - this->unknown_00C0->Move(129, 500); - this->unknown_00C0 = nullptr; + this->zenyEdit->Move(129, 500); + this->zenyEdit = nullptr; if (g_windowMgr.window_01C8) { g_windowMgr.window_01C8->SendMsg(nullptr, UM_GET_EDIT_FOCUS, 0, 0, 0, 0); } @@ -2718,7 +2718,7 @@ int UIItemCompositionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a this->m_compositionState = static_cast(a); if (a != 0) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, static_cast(a)); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { const std::string name = item.DisplayName(0); this->m_title = FormatOwnedString("%s (%s)", LookupMessage(MSI_ITEM_COMPOUNDING), name.c_str()); } @@ -2735,7 +2735,7 @@ int UIItemCompositionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a int found; ITEM_INFO item = this->GetItem(this->m_selected, &found); if (found != 0) { - g_modeMgr.gameMode->SendMsg(MM_REQ_ITEMCOMPOSITION, item.unknown_0000[1], this->m_compositionState, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_REQ_ITEMCOMPOSITION, item.identity[1], this->m_compositionState, 0, 0); } else { g_modeMgr.gameMode->SendMsg(MM_REQ_ITEMCOMPOSITION, -1, -1, 0, 0); } @@ -2818,7 +2818,7 @@ int UIItemIdentifyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s int found; ITEM_INFO item = this->GetItem(this->m_selected, &found); if (found != 0) { - g_modeMgr.gameMode->SendMsg(MM_REQ_ITEMIDENTIFY, item.unknown_0000[1], 0, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_REQ_ITEMIDENTIFY, item.identity[1], 0, 0, 0); } g_windowMgr.CloseWindow(WID_ITEMIDENTIFYWND); } @@ -2954,78 +2954,78 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int if (this->m_viewOther == 0) { if (this->m_page == 3) { - static_cast(this->unknown_0138[0])->Enable(1); - static_cast(this->unknown_0138[1])->Enable(1); - if (g_session.unknown_80C8 > 4) { + static_cast(this->damageSkinButtons[0])->Enable(1); + static_cast(this->damageSkinButtons[1])->Enable(1); + if (g_session.damageSkinCount > 4) { this->m_scrollBar->Show(1); } for (int index = 2; index < 6; ++index) { - this->unknown_0138[index]->Show(1); + this->damageSkinButtons[index]->Show(1); } - this->unknown_00DC->Show(0); - this->unknown_0130->Enable(0); + this->allowViewCheck->Show(0); + this->unequipButton->Enable(0); this->m_viewButton->Enable(0); this->m_otherButton->Enable(0); } else { - static_cast(this->unknown_0138[0])->Enable(0); - static_cast(this->unknown_0138[1])->Enable(0); + static_cast(this->damageSkinButtons[0])->Enable(0); + static_cast(this->damageSkinButtons[1])->Enable(0); this->m_scrollBar->Show(0); for (int index = 2; index < 6; ++index) { - this->unknown_0138[index]->Show(0); + this->damageSkinButtons[index]->Show(0); } - this->unknown_0130->Enable(1); - this->unknown_00DC->Show(1); + this->unequipButton->Enable(1); + this->allowViewCheck->Show(1); } if (this->m_page == 1) { - this->unknown_00E0->Show(1); - this->unknown_00DC->Show(0); + this->swapModeCheck->Show(1); + this->allowViewCheck->Show(0); } else { - this->unknown_00E0->Show(0); - this->unknown_00DC->Show(1); + this->swapModeCheck->Show(0); + this->allowViewCheck->Show(1); } } if (this->m_page == 2 || this->m_page == 3) { - if (this->unknown_0124 && this->unknown_0124->geometry.unknown_0030 != 0) { + if (this->swapWindow && this->swapWindow->geometry.state != 0) { this->SendMsg(nullptr, UM_COMMAND, 508, 0, 0, 0); } - if (this->unknown_012C) { - this->unknown_012C->SetState(0); - this->unknown_012C->Enable(0); + if (this->swapButton) { + this->swapButton->SetState(0); + this->swapButton->Enable(0); } - } else if (this->unknown_012C) { - this->unknown_012C->Enable(1); - if (this->unknown_0124) { + } else if (this->swapButton) { + this->swapButton->Enable(1); + if (this->swapWindow) { if (g_session.m_swapEquipmentMode == 1) { - this->unknown_0124->geometry.unknown_0030 = 0; + this->swapWindow->geometry.state = 0; this->SendMsg(nullptr, UM_COMMAND, 508, 0, 0, 0); } - static_cast(this->unknown_0124)->unknown_00BC = this->m_page + 1; - this->unknown_0124->Invalidate(); + static_cast(this->swapWindow)->equipmentPage = this->m_page + 1; + this->swapWindow->Invalidate(); } } if (this->m_viewOther == 0) { switch (this->m_page) { case 0: - this->unknown_00DC->Show(1); - this->unknown_00E0->Show(0); - this->unknown_012C->Enable(1); - this->unknown_0130->Enable(1); + this->allowViewCheck->Show(1); + this->swapModeCheck->Show(0); + this->swapButton->Enable(1); + this->unequipButton->Enable(1); break; case 1: - this->unknown_00DC->Show(0); - this->unknown_00E0->Show(1); - this->unknown_012C->Enable(1); - this->unknown_0130->Enable(1); + this->allowViewCheck->Show(0); + this->swapModeCheck->Show(1); + this->swapButton->Enable(1); + this->unequipButton->Enable(1); break; case 2: case 3: - this->unknown_00DC->Show(0); - this->unknown_00E0->Show(0); - this->unknown_012C->Enable(0); - this->unknown_0130->Enable(0); + this->allowViewCheck->Show(0); + this->swapModeCheck->Show(0); + this->swapButton->Enable(0); + this->unequipButton->Enable(0); break; } } @@ -3034,11 +3034,11 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int switch (this->m_page) { case 0: case 1: - this->unknown_0178->Enable(1); + this->abilityButton->Enable(1); break; case 2: case 3: - this->unknown_0178->Enable(0); + this->abilityButton->Enable(0); break; } } @@ -3068,14 +3068,14 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } if (this->m_viewOther == 0) { - UICheckBox* check = this->unknown_00DC; - check->geometry.unknown_0030 = *reinterpret_cast(g_session.unknown_5974); + UICheckBox* check = this->allowViewCheck; + check->geometry.state = *reinterpret_cast(g_session.equipmentViewState); check->Invalidate(); } - const int height = this->unknown_00D8 + 167; - this->m_viewButton->Move(this->geometry.width / 2 - 18, IsEquipViewHidden() * 230 + height - this->unknown_00D8 - 40); - this->m_otherButton->Move(this->geometry.width / 2 - 14, height - this->unknown_00D8 + (g_session.unknown_5C1C > 0 ? -60 : 170)); + const int height = this->contentOffset + 167; + this->m_viewButton->Move(this->geometry.width / 2 - 18, IsEquipViewHidden() * 230 + height - this->contentOffset - 40); + this->m_otherButton->Move(this->geometry.width / 2 - 14, height - this->contentOffset + (g_session.replayPacketMode > 0 ? -60 : 170)); this->Invalidate(); return 0; } @@ -3112,24 +3112,24 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int return 0; case ID_RADIOBTN: for (int index = 0; index < 4; ++index) { - this->unknown_0138[index + 2]->Invalidate(); - if (sender == this->unknown_0138[index + 2]) { - this->unknown_015C = index; - this->unknown_0138[index + 2]->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); + this->damageSkinButtons[index + 2]->Invalidate(); + if (sender == this->damageSkinButtons[index + 2]) { + this->damageSkinMode = index; + this->damageSkinButtons[index + 2]->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); } else { - this->unknown_0138[index + 2]->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->damageSkinButtons[index + 2]->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); } } return 0; case ID_EQUIP_OPTION_OFF: { - if (g_windowMgr.unknown_0304 != nullptr) { + if (g_windowMgr.merchantItemMyShopWnd != nullptr) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PLEASE_CLOSE_STORE)), 255, 0, 0, 0); return 0; } std::string notice; - const bool enabled = g_session.unknown_5C1C > 0; + const bool enabled = g_session.replayPacketMode > 0; if (StateFlag05(g_session.m_jobFlags)) { const int job = g_session.GetDisplayJob(); notice = LookupMessage(job == 4082 || job == 4083 || job == 4110 ? 2096 : 442); @@ -3143,7 +3143,7 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } if (enabled && notice.size() != 0) { - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } UIWindow* menu = g_windowMgr.EnsureWindow(WID_MENUWND); @@ -3155,7 +3155,7 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(notice.c_str()), 0, 0, 0); menu->SendMsg(nullptr, UM_SET_CALLER_WID, 10, 0, 0, 0); menu->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); - static_cast(menu)->unknown_00DC = 1; + static_cast(menu)->m_menuFlags = 1; int x = g_mouse.x + 1; int y = g_mouse.y + 1; if (x < 1) { @@ -3177,16 +3177,16 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int this->UpdateCharacterView(0); } - const int bottom = this->geometry.height - this->unknown_00D8; + const int bottom = this->geometry.height - this->contentOffset; const int half = this->geometry.width / 2; this->m_viewButton->Move(half - 18, IsEquipViewHidden() * 230 + bottom - 40); - this->m_otherButton->Move(half - 14, bottom + (g_session.unknown_5C1C > 0 ? -60 : 170)); + this->m_otherButton->Move(half - 14, bottom + (g_session.replayPacketMode > 0 ? -60 : 170)); this->Invalidate(); return 0; } case ID_EQUIP_OPTION_OPEN: if ((g_replayAnimationScaling == 0 || Replay::Instance().header.options.Get(ReplayRecordOption::Item) != 0) && !g_windowMgr.LookupWindow(WID_MERGEITEMWND) && - !g_windowMgr.CloseWindow(WID_MERCHANTITEMWND) && g_session.unknown_5C1C > 0) { + !g_windowMgr.CloseWindow(WID_MERCHANTITEMWND) && g_session.replayPacketMode > 0) { g_windowMgr.EnsureWindow(WID_MERCHANTITEMWND); } return 0; @@ -3194,14 +3194,14 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int if (this->m_hoverSlot >= 0) { g_session.m_damageSkinIndex = this->m_hoverSlot; } - g_session.m_damageSkinMode = this->unknown_015C; + g_session.m_damageSkinMode = this->damageSkinMode; const char* resourceName = nullptr; const char* name80EC = nullptr; const char* name8104 = nullptr; g_session.m_hotkeyScript->Call("GetDamageResourceName", "d>sss", this->m_hoverSlot, &resourceName, &name80EC, &name8104); g_session.m_damageResourceName = resourceName; - g_session.unknown_80EC = name80EC; - g_session.unknown_8104 = name8104; + g_session.damageSpriteName = name80EC; + g_session.damageSkinAuxiliaryName = name8104; int millionUnit = 0; g_session.m_hotkeyScript->Call("GetDamageMillionUnit", "d>d", this->m_hoverSlot, &millionUnit); g_session.m_damageMillionUnit = millionUnit; @@ -3215,30 +3215,30 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int return 0; } case 508: { - const int height = this->unknown_00D8 + 167; + const int height = this->contentOffset + 167; this->Resize(this->geometry.width, height + 158); - if (!this->unknown_0124) { + if (!this->swapWindow) { UISwapEquipmentWnd* created = new (std::nothrow) UISwapEquipmentWnd(); - this->unknown_0124 = created; + this->swapWindow = created; created->SetSize(280, 179); if (this->m_page == 0) { - static_cast(this->unknown_0124)->unknown_00BC = 1; + static_cast(this->swapWindow)->equipmentPage = 1; } else if (this->m_page == 1) { - static_cast(this->unknown_0124)->unknown_00BC = 2; + static_cast(this->swapWindow)->equipmentPage = 2; } - this->AddChild(this->unknown_0124); + this->AddChild(this->swapWindow); } - UIWindow* swap = this->unknown_0124; - if (swap->geometry.unknown_0030 == 0) { + UIWindow* swap = this->swapWindow; + if (swap->geometry.state == 0) { swap->Move(0, 167); - this->unknown_0124->geometry.unknown_0030 = 1; - if (sender == this->unknown_012C) { + this->swapWindow->geometry.state = 1; + if (sender == this->swapButton) { g_session.m_swapEquipmentMode = 1; } return 0; } swap->Move(-1000, -1000); - this->unknown_0124->geometry.unknown_0030 = 0; + this->swapWindow->geometry.state = 0; this->Resize(this->geometry.width, height); return 0; } @@ -3253,8 +3253,8 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } packet.packetType = ID_CZ_REQ_TAKEOFF_EQUIP_ALL; GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); - this->unknown_0130->SetDisabled(1); - this->unknown_0130->Invalidate(); + this->unequipButton->SetDisabled(1); + this->unequipButton->Invalidate(); return 0; } case 582: @@ -3267,13 +3267,13 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int case UM_SET_DISABLE: if (a == 575) { if (this->m_page == 1) { - UIBitmapButton* button = this->unknown_0130; + UIBitmapButton* button = this->unequipButton; button->SetDisabled(g_session.CountItems2B50() == 0); button->Invalidate(); return 0; } if (this->m_page == 0) { - UIBitmapButton* button = this->unknown_0130; + UIBitmapButton* button = this->unequipButton; button->SetDisabled(g_session.CountItems17F0() == 0); button->Invalidate(); return 0; @@ -3288,7 +3288,7 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int if (a != 0) { this->m_firstSlot = previous + a; } - const int last = g_session.unknown_80C8 - 4; + const int last = g_session.damageSkinCount - 4; if (this->m_firstSlot < 0) { this->m_firstSlot = 0; } @@ -3309,26 +3309,26 @@ int UIEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int // FUNCTION: fn_12171 void UIEquipWnd::OnCreate(int width, int height) { const int top = this->m_viewOther != 0 ? 0 : 20; - this->unknown_00D8 = top; + this->contentOffset = top; if (height != top + this->geometry.height) { this->Resize(this->geometry.width, top + this->geometry.height); } if (this->m_viewOther == 0) { - this->unknown_00DC = new UICheckBox(); - this->unknown_00DC->SetSize(80, 12); - this->unknown_00DC->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_OPEN_EQUIPED_ITEM)); - this->unknown_00DC->Move(10, this->geometry.height - 15); - this->unknown_00DC->SetChecked(*reinterpret_cast(g_session.unknown_5974)); - this->AddChild(this->unknown_00DC); + this->allowViewCheck = new UICheckBox(); + this->allowViewCheck->SetSize(80, 12); + this->allowViewCheck->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_OPEN_EQUIPED_ITEM)); + this->allowViewCheck->Move(10, this->geometry.height - 15); + this->allowViewCheck->SetChecked(*reinterpret_cast(g_session.equipmentViewState)); + this->AddChild(this->allowViewCheck); - this->unknown_00E0 = new UICheckBox(); - this->unknown_00E0->SetSize(80, 12); - this->unknown_00E0->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_SHORTCUT_SKILL_TOOLTIP_SP_PERCENT_AP_VALUE)); - this->unknown_00E0->SetChecked(*reinterpret_cast(g_session.unknown_8128) == 0); - this->unknown_00E0->Show(0); - this->unknown_00E0->Move(10, this->geometry.height - 15); - this->AddChild(this->unknown_00E0); + this->swapModeCheck = new UICheckBox(); + this->swapModeCheck->SetSize(80, 12); + this->swapModeCheck->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_SHORTCUT_SKILL_TOOLTIP_SP_PERCENT_AP_VALUE)); + this->swapModeCheck->SetChecked(*reinterpret_cast(g_session.feedOptions) == 0); + this->swapModeCheck->Show(0); + this->swapModeCheck->Move(10, this->geometry.height - 15); + this->AddChild(this->swapModeCheck); } const std::string closeTooltip("Alt+Q"); @@ -3341,7 +3341,7 @@ void UIEquipWnd::OnCreate(int width, int height) { { std::string prefix("유저인터페이스\\basic_interface\\"); const int x = this->geometry.width / 2 - 18; - const int bottom = this->geometry.height - this->unknown_00D8; + const int bottom = this->geometry.height - this->contentOffset; this->m_viewButton = new UIBitmapButton(); this->m_viewButton->SetBitmap((prefix + "btn_off" + ".bmp").c_str(), 0, 0); this->m_viewButton->SetBitmap((prefix + "btn_off" + ".bmp").c_str(), 1, 0); @@ -3371,7 +3371,7 @@ void UIEquipWnd::OnCreate(int width, int height) { } else if (StateFlag19(flags) || StateFlag23(flags) || StateFlag24(flags) || StateFlag25(flags) || StateFlag26(flags)) { tooltip = LookupMessage(MSI_DRAGONOFF); } - if (g_session.unknown_5C1C > 0) { + if (g_session.replayPacketMode > 0) { tooltip = LookupMessage(tooltip ? 0xE34 : 0xDF); } this->m_viewButton->SetTooltip(tooltip); @@ -3381,15 +3381,15 @@ void UIEquipWnd::OnCreate(int width, int height) { if (this->m_viewOther == 0) { std::string prefix("유저인터페이스\\basic_interface\\"); const int x = this->geometry.width / 2 - 14; - const int bottom = this->geometry.height - this->unknown_00D8; + const int bottom = this->geometry.height - this->contentOffset; this->m_otherButton = new UIBitmapButton(); this->m_otherButton->SetBitmap((prefix + "btn_items_off" + ".bmp").c_str(), 0, 0); this->m_otherButton->SetBitmap((prefix + "btn_items_on" + ".bmp").c_str(), 1, 0); this->m_otherButton->SetBitmap((prefix + "btn_items_on" + ".bmp").c_str(), 2, 0); this->m_otherButton->SetSize(this->m_otherButton->BitmapWidth(), this->m_otherButton->BitmapHeight()); - this->m_otherButton->Move(x, bottom + (g_session.unknown_5C1C > 0 ? -60 : 170)); + this->m_otherButton->Move(x, bottom + (g_session.replayPacketMode > 0 ? -60 : 170)); this->m_otherButton->SetId(249); - this->m_otherButton->SetTooltip(g_session.unknown_5C1C > 0 ? LookupMessage(MSI_OPENCARTWINDOW) : ""); + this->m_otherButton->SetTooltip(g_session.replayPacketMode > 0 ? LookupMessage(MSI_OPENCARTWINDOW) : ""); this->AddChild(this->m_otherButton); } } @@ -3411,42 +3411,42 @@ void UIEquipWnd::OnCreate(int width, int height) { this->m_titleList = new UIListBoxTitle(); this->m_titleList->Configure(3, this->m_contentTop + 39, this->geometry.width - 6, 105, 0); - reinterpret_cast(this->m_titleList->unknown_007C)[0] = 225; - reinterpret_cast(this->m_titleList->unknown_007C)[1] = 225; - reinterpret_cast(this->m_titleList->unknown_007C)[2] = 225; + reinterpret_cast(this->m_titleList->backgroundChannels)[0] = 225; + reinterpret_cast(this->m_titleList->backgroundChannels)[1] = 225; + reinterpret_cast(this->m_titleList->backgroundChannels)[2] = 225; this->m_titleList->SetId(480); this->m_titleList->Show(0); this->AddChild(this->m_titleList); - if (this->m_viewOther == 0 && this->unknown_012C == nullptr) { - this->unknown_012C = new UIBitmapButton(); - this->unknown_012C->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_a.bmp", 0, 0); - this->unknown_012C->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_b.bmp", 1, 0); - this->unknown_012C->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_b.bmp", 2, 0); - this->unknown_012C->SetSize(this->unknown_012C->BitmapWidth(), this->unknown_012C->BitmapHeight()); - this->unknown_012C->Move(193, 167); - this->unknown_012C->SetId(508); - this->unknown_012C->SetTooltip(LookupMessage(MSI_REFINING_FAIL_ITEM_DOWMGRADE)); - this->AddChild(this->unknown_012C); + if (this->m_viewOther == 0 && this->swapButton == nullptr) { + this->swapButton = new UIBitmapButton(); + this->swapButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_a.bmp", 0, 0); + this->swapButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_b.bmp", 1, 0); + this->swapButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_change_b.bmp", 2, 0); + this->swapButton->SetSize(this->swapButton->BitmapWidth(), this->swapButton->BitmapHeight()); + this->swapButton->Move(193, 167); + this->swapButton->SetId(508); + this->swapButton->SetTooltip(LookupMessage(MSI_REFINING_FAIL_ITEM_DOWMGRADE)); + this->AddChild(this->swapButton); } - this->unknown_0130 = new UIBitmapButton(); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_a.bmp", 0, 0); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_b.bmp", 1, 0); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_b.bmp", 2, 0); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_c.bmp", 3, 0); - this->unknown_0130->SetSize(this->unknown_0130->BitmapWidth(), this->unknown_0130->BitmapHeight()); - this->unknown_0130->Move(235, 167); - this->unknown_0130->SetId(575); - this->unknown_0130->SetTooltip(LookupMessage(MSI_USESKILL_FAIL_NEED_SOULCOLLECT)); - this->AddChild(this->unknown_0130); + this->unequipButton = new UIBitmapButton(); + this->unequipButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_a.bmp", 0, 0); + this->unequipButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_b.bmp", 1, 0); + this->unequipButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_b.bmp", 2, 0); + this->unequipButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_off_c.bmp", 3, 0); + this->unequipButton->SetSize(this->unequipButton->BitmapWidth(), this->unequipButton->BitmapHeight()); + this->unequipButton->Move(235, 167); + this->unequipButton->SetId(575); + this->unequipButton->SetTooltip(LookupMessage(MSI_USESKILL_FAIL_NEED_SOULCOLLECT)); + this->AddChild(this->unequipButton); this->SendMsg(this, UM_SET_DISABLE, 575, 0, 0, 0); if (this->m_viewOther == 0) { this->m_tabs->AddTab(LookupMessage(MSI_DAMAGE_DIR_CENTER), LookupMessage(MSI_DAMAGE_DIR_RIGHT)); UIBitmapButton* apply = new UIBitmapButton(); - this->unknown_0138[0] = apply; + this->damageSkinButtons[0] = apply; apply->SetBitmap("유저인터페이스\\btn_apply.bmp", 0, 0); apply->SetBitmap("유저인터페이스\\btn_apply_a.bmp", 1, 0); apply->SetBitmap("유저인터페이스\\btn_apply_b.bmp", 2, 0); @@ -3457,7 +3457,7 @@ void UIEquipWnd::OnCreate(int width, int height) { this->AddChild(apply); UIBitmapButton* close = new UIBitmapButton(); - this->unknown_0138[1] = close; + this->damageSkinButtons[1] = close; close->SetBitmap("유저인터페이스\\btn_close.bmp", 0, 0); close->SetBitmap("유저인터페이스\\btn_close_a.bmp", 1, 0); close->SetBitmap("유저인터페이스\\btn_close_b.bmp", 2, 0); @@ -3467,7 +3467,7 @@ void UIEquipWnd::OnCreate(int width, int height) { close->Enable(0); this->AddChild(close); - const int count = g_session.unknown_80C8; + const int count = g_session.damageSkinCount; for (int index = 0; index < count; ++index) { const char* name = nullptr; const char* icon = nullptr; @@ -3490,14 +3490,14 @@ void UIEquipWnd::OnCreate(int width, int height) { const char* labels[4] = {LookupMessage(MSI_MACRO_CHECK_REMOVE_NOT_EXISTS), LookupMessage(MSI_MACRO_CHECK_REMOVE_SUCCESS), LookupMessage(MSI_MACRO_CHECK_REMOVE_RUNNING), LookupMessage(MSI_DAMAGE_DIR_DEFAULT)}; for (int index = 0; index < 4; ++index) { UIRadioBtn* radio = new UIRadioBtn(); - this->unknown_0138[index + 2] = radio; + this->damageSkinButtons[index + 2] = radio; radio->SetSize(60, 12); if (index == 0) { radio->Move(8, this->m_contentTop + 20); } else { radio->Move(index * 60 + 28, this->m_contentTop + 20); } - radio->SendMsg(this, UM_SETSTATE, index == this->unknown_015C, 0, 0, 0); + radio->SendMsg(this, UM_SETSTATE, index == this->damageSkinMode, 0, 0, 0); radio->SetText(labels[index]); const std::string unchecked("유저인터페이스\\tipbox\\checkBox.bmp"); const std::string checked("유저인터페이스\\tipbox\\checkBox_check.bmp"); @@ -3509,15 +3509,15 @@ void UIEquipWnd::OnCreate(int width, int height) { } if (this->m_viewOther == 0) { - this->unknown_0178 = new UIBitmapButton(); - this->unknown_0178->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_a.bmp", 0, 0); - this->unknown_0178->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_b.bmp", 1, 0); - this->unknown_0178->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_b.bmp", 2, 0); - this->unknown_0178->SetSize(this->unknown_0178->BitmapWidth(), this->unknown_0178->BitmapHeight()); - this->unknown_0178->Move(g_equipAbilityButtonPosition[0], g_equipAbilityButtonPosition[1]); - this->unknown_0178->SetId(582); - this->unknown_0178->SetTooltip(LookupMessage(MSI_SEND_TO_ALLY)); - this->AddChild(this->unknown_0178); + this->abilityButton = new UIBitmapButton(); + this->abilityButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_a.bmp", 0, 0); + this->abilityButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_b.bmp", 1, 0); + this->abilityButton->SetBitmap("유저인터페이스\\basic_interface\\btn_e_ability_b.bmp", 2, 0); + this->abilityButton->SetSize(this->abilityButton->BitmapWidth(), this->abilityButton->BitmapHeight()); + this->abilityButton->Move(g_equipAbilityButtonPosition[0], g_equipAbilityButtonPosition[1]); + this->abilityButton->SetId(582); + this->abilityButton->SetTooltip(LookupMessage(MSI_SEND_TO_ALLY)); + this->AddChild(this->abilityButton); } } @@ -3767,9 +3767,9 @@ int UIBookWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp case UM_READBOOK: { this->m_autoRead = 0; this->Show(1); - if (this->unknown_00B8) { - g_windowMgr.Schedule(this->unknown_00B8); - this->unknown_00B8 = nullptr; + if (this->m_balloon) { + g_windowMgr.Schedule(this->m_balloon); + this->m_balloon = nullptr; } int page = static_cast(a); @@ -3823,9 +3823,9 @@ int UIBookWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp } case UM_ENDPUSH: - if (this->unknown_00B8) { - g_windowMgr.Schedule(this->unknown_00B8); - this->unknown_00B8 = nullptr; + if (this->m_balloon) { + g_windowMgr.Schedule(this->m_balloon); + this->m_balloon = nullptr; } g_windowMgr.CloseWindow(WID_BOOKWND); break; @@ -3882,7 +3882,7 @@ int UIChooseSellBuyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, offset += 6; if (header.type == 20851) { - static_cast(g_modeMgr.GetGameMode())->unknown_024C = 1; + static_cast(g_modeMgr.GetGameMode())->isOnQuest = 1; this->SendMsg(nullptr, UM_SETNAID, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_ITEMSHOPWND); g_windowMgr.CloseWindow(WID_ITEMPURCHASEWND); @@ -4044,7 +4044,7 @@ void UIItemCollection_ComparisonWnd::OnCreate(int width, int height) { // OFFSET: 0x008DBD00 // FUNCTION: fn_12160 void UICardItemIllustWnd::OnCreate(int, int) { - this->unknown_00E4 = 0; + this->identified = 0; this->m_name = LookupMessage(MSI_ITEM_NAME); this->AddCloseButton("", 0); } @@ -4121,7 +4121,7 @@ void UIComboBoxWnd::OnCreate(int width, int height) { // OFFSET: 0x008E85C0 // FUNCTION: fn_12199 void UISkillDescribeWnd::OnCreate(int width, int height) { - this->unknown_00D4 = LookupMessage(MSI_SKILL_NAME); + this->skillName = LookupMessage(MSI_SKILL_NAME); this->m_skillId = -1; this->m_viewer = new UITextViewer(); this->m_viewer->Configure(3, 3, width - 6, height - 6, 0); @@ -4319,11 +4319,11 @@ void UIItemIdentifyWnd::Paint() { DrawItemIcon(*this, ResourceMgr::Instance(), 8, y, *it, 0); this->DrawFittedItemName(40, y, &*it, 0, 0, 12, 0); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( 8, y + 12, static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) ), true ); @@ -4378,7 +4378,7 @@ void UInCashWnd::DrawItems() { this->DrawWrappedItemName(x - width / 2 + 90, y + 4, width, &*it, 0, 0, 12); int length = std::sprintf(text, LookupMessage(MSI_NC_COST)); this->DrawTextAt(x + 112, y + 64, text, length, 0, 12, 0, 0, 0); - length = std::sprintf(text, " %s C", FormatGroupedInteger(static_cast(it->unknown_0014[0]), number, 64)); + length = std::sprintf(text, " %s C", FormatGroupedInteger(static_cast(it->prices[0]), number, 64)); this->DrawRightAlignedText(x + 152, y + 84, text, length, 0, 12, 0, 0); ++row; @@ -4408,7 +4408,7 @@ void UInCashWnd::DrawItems() { this->DrawWrappedItemName(535 - width / 2, y + 4, width, &*it, 0, 0, 12); int length = std::sprintf(text, LookupMessage(MSI_NC_COST)); this->DrawTextAt(565, y + 24, text, length, 0, 12, 0, 0, 0); - length = std::sprintf(text, " %s C", FormatGroupedInteger(static_cast(it->unknown_0014[0]), number, 64)); + length = std::sprintf(text, " %s C", FormatGroupedInteger(static_cast(it->prices[0]), number, 64)); this->DrawTextAt(550, y + 42, text, length, 0, 12, 0, 0, 0); length = std::sprintf(text, LookupMessage(MSI_NC_NUM)); this->DrawTextAt(565, y + 66, text, length, 0, 12, 0, 0, 0); @@ -4426,7 +4426,7 @@ void UInCashWnd::DrawItems() { // FUNCTION: fn_12183 void UIMonsterDisplayWnd::OnCreate(int, int) { this->unknown_00E4 = 0; - this->unknown_00CC = LookupMessage(MSI_ITEM_NAME); + this->titleText = LookupMessage(MSI_ITEM_NAME); this->AddCloseButton("", 0); } @@ -4601,12 +4601,12 @@ int UIWhisperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; case UM_SETINFO: { WhisperWndInfo* info = reinterpret_cast(a); - this->unknown_0100 = info; + this->placement = info; if (info->IsValid() == 0) { - static_cast(this->unknown_0100)->Reset(); + static_cast(this->placement)->Reset(); } - this->SendMsg(nullptr, UM_RESIZE, 7, this->unknown_0100->width, this->unknown_0100->height, 0); - this->Move(this->unknown_0100->x, this->unknown_0100->y); + this->SendMsg(nullptr, UM_RESIZE, 7, this->placement->width, this->placement->height, 0); + this->Move(this->placement->x, this->placement->y); return 0; } case UM_COMMAND: { @@ -4660,23 +4660,23 @@ int UIWhisperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i if (this->m_edit->links.size() != 0) { g_windowMgr.SetUnknown04DC(this->m_edit->LinkedText().c_str()); - } else if (this->m_edit->unknown_0144 != nullptr) { - g_windowMgr.SetUnknown04DC(this->m_edit->unknown_0144->unknown_0140.c_str()); + } else if (this->m_edit->itemTags != nullptr) { + g_windowMgr.SetUnknown04DC(this->m_edit->itemTags->linkedText.c_str()); } else { - g_windowMgr.unknown_04DC.assign(text, std::strlen(text)); + g_windowMgr.chatInputText.assign(text, std::strlen(text)); } g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(this->m_target.c_str()), 0, 0, 0); return 0; } case UM_MENU_SELECTED: - if (this->m_log[a].unknown_0018 == 11) { + if (this->m_log[a].commandId == 11) { this->SaveChatLog(); } return 0; case UM_MAKEMENU: { this->m_log.clear(); - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } @@ -4804,12 +4804,12 @@ int UISecondPasswordInputWnd::FindKeypadDigit(unsigned int target) { // FUNCTION: fn_12444 void UISecondPasswordInputWnd::DisableButtons() { for (int i = 0; i < 11; ++i) { - UIButton* button = this->unknown_0124[i]; + UIButton* button = this->keypadButtons[i]; button->SetDisabled(1); button->Invalidate(); } for (int i = 0; i < 5; ++i) { - UIButton* button = this->unknown_0150[i]; + UIButton* button = this->actionButtons[i]; button->SetDisabled(1); button->Invalidate(); } @@ -4890,7 +4890,7 @@ int UInCash_CallWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std } if (a == ID_STATUS) { - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { g_modeMgr.GetGameMode()->SendMsg(MM_STOVE_AUTHENTICATION, 2, 0, 0, 0); return 0; } @@ -4903,7 +4903,7 @@ int UInCash_CallWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std // FUNCTION: fn_12393 void UIEquipWnd::UpdateCharacterView(int reset) { CMode* mode = g_modeMgr.gameMode; - if (!reset && g_session.unknown_5C1C > 0) { + if (!reset && g_session.replayPacketMode > 0) { mode->SendMsg(MM_REQ_CARTOFF, 6, 0, 0, 0); return; } @@ -5071,14 +5071,14 @@ void UInCashWnd::StoreInfo() { // OFFSET: 0x00901520 // FUNCTION: fn_12375 int UISayDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_UNEQUIP_ARROW2)), 0x64FFFF, 0, 0, 0); return 0; } switch (message) { case UM_SET_TARGET: - this->unknown_00C8 = static_cast(a); + this->m_responseMessage = static_cast(a); return 0; case UM_SETINFO: this->m_placement = reinterpret_cast(a); @@ -5092,49 +5092,49 @@ int UISayDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: this->m_viewer->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0); return 0; case UM_COMMAND: { - this->RecordResponse(static_cast(a), b, c, this->unknown_00C8); + this->RecordResponse(static_cast(a), b, c, this->m_responseMessage); if (g_replayAnimationScaling != 0) { - this->unknown_00C8 = static_cast(d); + this->m_responseMessage = static_cast(d); } switch (a) { case ID_NEXT: { const DWORD tick = GetTickCount(); - if (tick - *reinterpret_cast(&g_session.unknown_5490[0x04]) < 300) { + if (tick - *reinterpret_cast(&g_session.itemSendState[0x04]) < 300) { return 0; } - *reinterpret_cast(&g_session.unknown_5490[0x04]) = tick; - g_modeMgr.gameMode->SendMsg(this->unknown_00C8, this->unknown_00CC, 218, 0, 0); - this->unknown_00D4 = 1; + *reinterpret_cast(&g_session.itemSendState[0x04]) = tick; + g_modeMgr.gameMode->SendMsg(this->m_responseMessage, this->m_responseId, 218, 0, 0); + this->m_responsePending = 1; this->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); break; } case 600: break; default: - g_modeMgr.gameMode->SendMsg(this->unknown_00C8, this->unknown_00CC, static_cast(a), 0, 0); + g_modeMgr.gameMode->SendMsg(this->m_responseMessage, this->m_responseId, static_cast(a), 0, 0); break; } return 0; } case UM_SETSAYDIALOG: if (a != 0) { - if (this->unknown_00D4 != 0) { + if (this->m_responsePending != 0) { static_cast(this->m_viewer)->Clear(); - this->unknown_00D4 = 0; + this->m_responsePending = 0; } this->m_viewer->SendMsg(nullptr, UM_SETTEXT, a, c, 1, 0); } - this->unknown_00CC = static_cast(b); + this->m_responseId = static_cast(b); return 0; case UM_ENABLENEXTBUTTON: this->m_message0 = 218; - this->unknown_00C8 = 22; + this->m_responseMessage = 22; this->SendMsg(nullptr, UM_ADD_BUTTON, 218, reinterpret_cast("btn_next"), 0, 0); this->Invalidate(); return 0; case UM_ENABLECLOSEBUTTON: this->m_message0 = 201; - this->unknown_00C8 = 89; + this->m_responseMessage = 89; this->SendMsg(nullptr, UM_ADD_BUTTON, 218, reinterpret_cast("btn_close"), 0, 0); this->Invalidate(); return 0; @@ -5188,7 +5188,7 @@ int UISayDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: break; } case 22504: - std::memcpy(&this->unknown_00D4, records + position, header.length); + std::memcpy(&this->m_responsePending, records + position, header.length); position += header.length; break; default: @@ -5212,17 +5212,17 @@ int UISayDialogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: int UIExchangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { switch (message) { case UM_SET_EXCHANGE_CHAR_NAME: - this->unknown_00F0 = reinterpret_cast(a); - this->unknown_0108 = static_cast(b); - this->unknown_010C = static_cast(c); + this->partnerName = reinterpret_cast(a); + this->partnerId = static_cast(b); + this->partnerLevel = static_cast(c); return 0; case UM_MYDRAGCLOSED: - this->unknown_00CC = 1; + this->isLocalTrader = 1; this->CancelInput(); this->LayoutButtons(); return 0; case UM_OTHERDRAGCLOSED: - this->unknown_00D0 = 1; + this->localConfirmed = 1; this->CancelInput(); this->LayoutButtons(); return 0; @@ -5230,15 +5230,15 @@ int UIExchangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: CMode* mode = g_modeMgr.GetGameMode(); switch (a) { case ID_CHECK: - this->unknown_011C = b != 0; + this->takeScreenshot = b != 0; return 0; case ID_OK: - if (this->unknown_00D4 != 0) { + if (this->remoteConfirmed != 0) { return 0; } - if (this->unknown_00C0) { + if (this->zenyEdit) { char text[24]; - std::sprintf(text, "%s ", this->unknown_00C0->Text()); + std::sprintf(text, "%s ", this->zenyEdit->Text()); if (!g_session.IsNumberWithCommas(text)) { g_windowMgr.Confirm(LookupMessage(MSI_CAN_INPUT_NUMBER_ONLY), 0, true, false, 0, "Message", 280, 120, 0); return 0; @@ -5255,43 +5255,43 @@ int UIExchangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: if (amount > g_session.m_zeny) { amount = g_session.m_zeny; } - mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.unknown_5210 + amount, 0, 0); + mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.exchangeMoney + amount, 0, 0); this->CancelInput(); } mode->SendMsg(MM_CONCLUDE_EXCHANGE_ITEM, 0, 0, 0, 0); - this->unknown_00D4 = 1; + this->remoteConfirmed = 1; return 0; case ID_EXCHANGE: - if (this->unknown_00D8 != 0) { + if (this->localAccepted != 0) { return 0; } - if (this->unknown_011C) { - const std::string text = FormatOwnedString(LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE_CHARNAME), this->unknown_00F0.c_str()); + if (this->takeScreenshot) { + const std::string text = FormatOwnedString(LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE_CHARNAME), this->partnerName.c_str()); g_modeMgr.gameMode->SendMsg(MM_SCREENSHOT, reinterpret_cast(text.c_str()), 0, 0, 0); } mode->SendMsg(MM_EXEC_EXCHANGE_ITEM, 0, 0, 0, 0); - this->unknown_00D8 = 1; + this->localAccepted = 1; this->LayoutButtons(); return 0; case ID_CANCEL: - if (this->unknown_00DC != 0) { + if (this->remoteAccepted != 0) { return 0; } mode->SendMsg(MM_CANCEL_EXCHANGE_ITEM, 0, 0, 0, 0); - this->unknown_00DC = 1; + this->remoteAccepted = 1; return 0; case ID_RIGHT: { - if (!this->unknown_00C0) { + if (!this->zenyEdit) { return 0; } - int amount = std::atoi(this->unknown_00C0->Text()); + int amount = std::atoi(this->zenyEdit->Text()); if (amount < 0) { amount = 0; } if (amount > g_session.m_zeny) { amount = g_session.m_zeny; } - mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.unknown_5210 + amount, 0, 0); + mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.exchangeMoney + amount, 0, 0); this->CancelInput(); return 0; } @@ -5348,37 +5348,37 @@ int UIExchangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: break; } case 20605: - std::memcpy(&this->unknown_00CC, records + position, header.length); + std::memcpy(&this->isLocalTrader, records + position, header.length); position += header.length; - if (this->unknown_00CC != 0) { + if (this->isLocalTrader != 0) { this->SendMsg(nullptr, UM_MYDRAGCLOSED, 0, 0, 0, 0); } break; case 20606: - std::memcpy(&this->unknown_00D0, records + position, header.length); + std::memcpy(&this->localConfirmed, records + position, header.length); position += header.length; - if (this->unknown_00D0 != 0) { + if (this->localConfirmed != 0) { this->SendMsg(nullptr, UM_OTHERDRAGCLOSED, 0, 0, 0, 0); } break; case 20607: - std::memcpy(&this->unknown_00D4, records + position, header.length); + std::memcpy(&this->remoteConfirmed, records + position, header.length); position += header.length; - if (this->unknown_00D4 != 0) { + if (this->remoteConfirmed != 0) { this->SendMsg(nullptr, UM_COMMAND, ID_OK, 0, 0, 0); } break; case 20608: - std::memcpy(&this->unknown_00D8, records + position, header.length); + std::memcpy(&this->localAccepted, records + position, header.length); position += header.length; - if (this->unknown_00D8 != 0) { + if (this->localAccepted != 0) { this->SendMsg(nullptr, UM_COMMAND, ID_EXCHANGE, 0, 0, 0); } break; case 20609: - std::memcpy(&this->unknown_00DC, records + position, header.length); + std::memcpy(&this->remoteAccepted, records + position, header.length); position += header.length; - if (this->unknown_00DC != 0) { + if (this->remoteAccepted != 0) { this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); } break; @@ -5490,35 +5490,35 @@ bool UITipboxWnd::BuildAnimations() { } for (unsigned int i = 0; i < manager->m_currentEntry.images.size(); ++i) { - if (manager->m_currentEntry.images[i].unknown_0000 == 6) { + if (manager->m_currentEntry.images[i].kind == 6) { const TipBoxImage& image = manager->m_currentEntry.images[i]; - const float dx = static_cast(image.unknown_0010 - image.unknown_0008); - const float dy = static_cast(image.unknown_0014 - image.unknown_000C); + const float dx = static_cast(image.toX - image.fromX); + const float dy = static_cast(image.toY - image.fromY); int count = 5; - if (image.unknown_0018 != 0.0f) { - count = static_cast(image.unknown_0018); + if (image.duration != 0.0f) { + count = static_cast(image.duration); } for (int step = 0; step < count; ++step) { TipBoxDot dot; - dot.x = static_cast(step) * dx / static_cast(count) + static_cast(manager->m_currentEntry.images[i].unknown_0008); - dot.y = static_cast(step) * dy / static_cast(count) + static_cast(manager->m_currentEntry.images[i].unknown_000C); + dot.x = static_cast(step) * dx / static_cast(count) + static_cast(manager->m_currentEntry.images[i].fromX); + dot.y = static_cast(step) * dy / static_cast(count) + static_cast(manager->m_currentEntry.images[i].fromY); dot.visible = false; this->m_dots.push_back(dot); } } else { TipBoxAnimation animation; - animation.kind = manager->m_currentEntry.images[i].unknown_0000; - animation.x = static_cast(manager->m_currentEntry.images[i].unknown_0008); - animation.y = static_cast(manager->m_currentEntry.images[i].unknown_000C); + animation.kind = manager->m_currentEntry.images[i].kind; + animation.x = static_cast(manager->m_currentEntry.images[i].fromX); + animation.y = static_cast(manager->m_currentEntry.images[i].fromY); animation.moveStart = timeGetTime(); - animation.blink = manager->m_currentEntry.images[i].unknown_0004; + animation.blink = manager->m_currentEntry.images[i].blink; animation.blinkStart = timeGetTime(); - animation.fromX = manager->m_currentEntry.images[i].unknown_0008; - animation.fromY = manager->m_currentEntry.images[i].unknown_000C; - animation.toX = manager->m_currentEntry.images[i].unknown_0010; - animation.toY = manager->m_currentEntry.images[i].unknown_0014; - animation.duration = manager->m_currentEntry.images[i].unknown_0018; + animation.fromX = manager->m_currentEntry.images[i].fromX; + animation.fromY = manager->m_currentEntry.images[i].fromY; + animation.toX = manager->m_currentEntry.images[i].toX; + animation.toY = manager->m_currentEntry.images[i].toY; + animation.duration = manager->m_currentEntry.images[i].duration; animation.visible = true; this->m_animations.push_back(animation); } @@ -5533,7 +5533,7 @@ bool UITipboxWnd::BuildAnimations() { void UIStatusWnd::ValidatePlacement() { if (!this->m_info->IsValid()) { this->m_info->Reset(); - this->m_expandedHeight = this->m_info->unknown_0010; + this->m_expandedHeight = this->m_info->expandedHeight; if (this->geometry.height != 17) { this->Resize(this->geometry.width, this->m_expandedHeight); } @@ -5571,8 +5571,8 @@ void UISayDialogWnd::OnCreate(int width, int height) { viewer->Move(10, 10); this->AddChild(viewer); this->m_message0 = 600; - this->unknown_00CC = 0; - this->unknown_00D4 = 0; + this->m_responseId = 0; + this->m_responsePending = 0; } // OFFSET: 0x008FF810 @@ -5612,18 +5612,18 @@ int UINotifyJobLevelUpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t // FUNCTION: fn_12173 void UIExchangeWnd::OnCreate(int, int) { this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); - this->unknown_00CC = 0; - this->unknown_00D0 = 0; - this->unknown_00D4 = 0; - this->unknown_00D8 = 0; - this->unknown_00DC = 0; + this->isLocalTrader = 0; + this->localConfirmed = 0; + this->remoteConfirmed = 0; + this->localAccepted = 0; + this->remoteAccepted = 0; const std::string path("유저인터페이스\\btn_"); const char* const names[3] = {"ok", "exchange", "cancel"}; const int ids[3] = {0xB8, 0xE6, 0xB9}; const int x[3] = {3, 260, 510}; const int y[3] = { - this->unknown_00CC * 120, this->unknown_00CC != 0 && this->unknown_00D0 != 0 && this->unknown_00D8 == 0 ? 0 : 120, 0 + this->isLocalTrader * 120, this->isLocalTrader != 0 && this->localConfirmed != 0 && this->localAccepted == 0 ? 0 : 120, 0 }; for (int index = 0; index < 3; ++index) { @@ -5639,7 +5639,7 @@ void UIExchangeWnd::OnCreate(int, int) { } UIEditCtrl* edit = new UIEditCtrl(); - this->unknown_00C0 = edit; + this->zenyEdit = edit; edit->SetSize(0x58, 0x10); edit->Move(0x91, 0x14A); edit->maximum = 0xD; @@ -5650,11 +5650,11 @@ void UIExchangeWnd::OnCreate(int, int) { edit->SelectAll(); UICheckBox* checkBox = new UICheckBox(); - this->unknown_0118 = checkBox; + this->screenshotCheckBox = checkBox; checkBox->SetSize(0x30, 0xC); checkBox->SetBitmaps("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp"); checkBox->Move(0x69, this->geometry.height - 0x13); - checkBox->SetChecked(this->unknown_011C); + checkBox->SetChecked(this->takeScreenshot); this->AddChild(checkBox); this->m_message0 = 600; @@ -5672,7 +5672,7 @@ void UIComboBoxIDWnd::OnCreate(int width, int height) { // OFFSET: 0x008D9F20 // FUNCTION: fn_12139 bool IsEquipViewHidden() { - if (g_session.unknown_5C1C > 0) { + if (g_session.replayPacketMode > 0) { return false; } @@ -5850,7 +5850,7 @@ int UIChatRoomMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s } else { ChatRoomSetting setting; setting.limit = this->m_limit; - setting.unknown_0034 = 0; + setting.memberCount = 0; setting.isPublic = this->m_public != 1; setting.roomId = -1; setting.title = this->m_titleEdit->Text(); @@ -5879,7 +5879,7 @@ int UIChatRoomMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s break; case ID_NUMCOMBO: case ID_CLASSCOMBO: { - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } UIWindow* list = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); @@ -5944,7 +5944,7 @@ int UIChatRoomChangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, } else { ChatRoomSetting setting; setting.limit = this->m_limit; - setting.unknown_0034 = 0; + setting.memberCount = 0; setting.isPublic = this->m_public != 1; setting.roomId = -1; setting.title = this->m_titleEdit->Text(); @@ -5962,7 +5962,7 @@ int UIChatRoomChangeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return 0; case ID_NUMCOMBO: case ID_CLASSCOMBO: { - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } UIWindow* list = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); @@ -6103,8 +6103,8 @@ void UIStatusWnd::StoreInfo() { this->m_info->height = this->geometry.height; this->m_info->x = this->geometry.x; this->m_info->y = this->geometry.y; - this->m_info->unknown_0010 = this->m_expandedHeight; - this->m_info->unknown_0018 = this->m_extended == 1; + this->m_info->expandedHeight = this->m_expandedHeight; + this->m_info->extended = this->m_extended == 1; } // OFFSET: 0x00907650 @@ -6499,7 +6499,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, const int count = g_session.GetList1788(this->m_tab); for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1784At(this->m_tab, index); - if (item.unknown_0000[1] != 0 && (this->m_tab != 8 || item.unknown_0064 != 0xFFFF)) { + if (item.identity[1] != 0 && (this->m_tab != 8 || item.bindOnEquip != 0xFFFF)) { this->items.push_back(item); } } @@ -6560,7 +6560,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, NCashBuyItem entry; entry.itemId = std::atoi(item.itemId.c_str()); entry.quantity = item.quantity; - entry.tab = item.unknown_0064; + entry.tab = item.bindOnEquip; std::memcpy(buffer + sizeof(header) + index * sizeof(entry), &entry, sizeof(entry)); } GetRagConnection().Send(static_cast(length), buffer); @@ -6588,9 +6588,9 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, const int count = g_session.GetList1788(list); for (int index = 0; index < count; ++index) { ITEM_INFO item = g_session.GetItem1784At(list, index); - std::string name(item.unknown_0044); + std::string name(item.displayName); if (name.find(query) != std::string::npos && !g_session.HasItem17D4(std::atoi(item.itemId.c_str()))) { - g_session.unknown_1784[10].push_back(item); + g_session.inventoryCategories[10].push_back(item); } } } @@ -6683,7 +6683,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); g_session.RemoveItem1720ByName(item); - this->m_totalPrice -= item.quantity * item.unknown_0014[1]; + this->m_totalPrice -= item.quantity * item.prices[1]; if (g_session.GetList2Size() == 3) { this->m_firstOther = 0; this->m_otherScroll->SetPosition(0); @@ -6724,9 +6724,9 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, } ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); - item.unknown_0064 = static_cast(this->m_selectedIndex); + item.bindOnEquip = static_cast(this->m_selectedIndex); g_session.MergeItem1720ByName(item); - this->m_totalPrice += item.quantity * item.unknown_0014[1]; + this->m_totalPrice += item.quantity * item.prices[1]; if (g_session.GetList2Size() >= 4 && g_session.GetList2Size() < 8) { int total; if (g_session.GetList2Size() == 4) { @@ -6747,7 +6747,7 @@ int UInCashWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, const int count = g_session.GetList2Size(); for (int index = 0; index < count; ++index) { ITEM_INFO other = g_session.GetItem1720At(index); - if (other.unknown_0000[1] != 0) { + if (other.identity[1] != 0) { this->m_otherItems.push_back(other); } } @@ -6800,7 +6800,7 @@ __declspec(noinline) int UIItemCollectionWnd::CardSlotAt(int x, int y, int* slot int left = 0; int slots = ItemSlotsCount(this->m_item); bool equipment; - switch (this->m_item.unknown_0000[0]) { + switch (this->m_item.identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -6826,7 +6826,7 @@ __declspec(noinline) int UIItemCollectionWnd::CardSlotAt(int x, int y, int* slot for (int index = 0; index < slots; ++index, left += 25) { if (left < localX && localX < left + 25) { int cardId; - std::memcpy(&cardId, this->m_item.unknown_001C + index * sizeof(cardId), sizeof(cardId)); + std::memcpy(&cardId, this->m_item.cards + index * sizeof(cardId), sizeof(cardId)); if (cardId == 0) { return -1; } @@ -6938,8 +6938,8 @@ void UIEquipWnd::OnLBtnDblClk(int x, int y) { } ITEM_INFO item = this->ItemIconAt(x, y); - if (item.unknown_0000[1] != 0 && item.quantity > 0) { - const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.unknown_0000[3])); + if (item.identity[1] != 0 && item.quantity > 0) { + const EquipSlots slots = g_session.GetEquipSlots(static_cast(item.identity[3])); g_modeMgr.gameMode->SendMsg(MM_TAKE_OFF_EQUIP, slots.values[2], this->m_page == 1, 0, 0); } } @@ -6948,7 +6948,7 @@ void UIEquipWnd::OnLBtnDblClk(int x, int y) { // FUNCTION: fn_12286 void UIEquipWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->ItemEntryAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { item.identified = 1; int tooltipX = 6; int tooltipY = (y - this->m_contentTop - 17) / 24 * 26 - 3 + this->m_contentTop; @@ -6961,14 +6961,14 @@ void UIEquipWnd::OnMouseHover(int x, int y) { CMode* tooltip = g_modeMgr.gameMode; if (item.quantity < 2) { - if (item.identified == 1 && item.unknown_0098 != 0) { - tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + if (item.identified == 1 && item.optionCount != 0) { + tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { tooltip->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } - } else if (item.identified == 1 && item.unknown_0098 != 0) { - tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity).c_str(), tooltipX, + } else if (item.identified == 1 && item.optionCount != 0) { + tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.optionCount, item.quantity).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_EA2), item.DisplayName(0).c_str(), item.quantity).c_str(), tooltipX, tooltipY, @@ -6986,8 +6986,8 @@ void UIEquipWnd::OnMouseHover(int x, int y) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode->drag.source == 1 && x >= 0 && y >= 0 && x < this->geometry.width && y < this->geometry.height) { ITEM_INFO dragged = LookupClientItemByIdentity(g_session.m_inventoryItems, mode->drag.id); - if (dragged.unknown_0000[1] != 0 && dragged.unknown_0000[2] != 0) { - const EquipSlots slots = g_session.GetEquipSlots(static_cast(dragged.unknown_0000[2])); + if (dragged.identity[1] != 0 && dragged.identity[2] != 0) { + const EquipSlots slots = g_session.GetEquipSlots(static_cast(dragged.identity[2])); this->m_highlight[0] = slots.values[2]; if (slots.values[1] != -1) { this->m_highlight[1] = slots.values[1]; @@ -7007,7 +7007,7 @@ void UIEquipWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_12302 void UIEquipWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->ItemEntryAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -7041,7 +7041,7 @@ void UIExchangeWnd::OnMouseHover(int x, int y) { int tooltipY = y; ITEM_INFO item = this->ItemAt(x, y); this->m_hoverX = static_cast(x); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } @@ -7050,9 +7050,9 @@ void UIExchangeWnd::OnMouseHover(int x, int y) { this->ToScreen(tooltipX, tooltipY); CMode* tooltip = g_modeMgr.gameMode; - item.unknown_0000[0] = 21; - if (item.identified == 1 && item.unknown_0098 != 0) { - tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + item.identity[0] = 21; + if (item.identified == 1 && item.optionCount != 0) { + tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { tooltip->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7063,7 +7063,7 @@ void UIExchangeWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_12303 void UIExchangeWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->ItemAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -7095,11 +7095,11 @@ ITEM_INFO UIItemIdentifyWnd::GetSelectedItem(int* found) { // OFFSET: 0x0090A0E0 // FUNCTION: fn_12413 void UIWhisperWnd::StoreInfo() { - if (this->unknown_0100) { - this->unknown_0100->width = this->geometry.width; - this->unknown_0100->height = this->geometry.height; - this->unknown_0100->x = this->geometry.x; - this->unknown_0100->y = this->geometry.y; + if (this->placement) { + this->placement->width = this->geometry.width; + this->placement->height = this->geometry.height; + this->placement->x = this->geometry.x; + this->placement->y = this->geometry.y; } g_windowMgr.UnregisterNamedWindow(std::string(this->m_target.c_str(), this->m_target.size())); } @@ -7193,14 +7193,14 @@ void UInCashWnd::OnLBtnDown(int x, int y) { } ITEM_INFO item = this->ItemAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); int source; if (this->m_selected < 0) { this->m_selected = ~this->m_selected; source = 4; } else { - this->m_selectedIndex = item.unknown_0064; + this->m_selectedIndex = item.bindOnEquip; source = 6; } mode->drag.BeginItem(g_windowMgr, source, item, 1, -1); @@ -7211,7 +7211,7 @@ void UInCashWnd::OnLBtnDown(int x, int y) { // FUNCTION: fn_12306 void UInCashWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->ItemAt(x, y); - if (item.unknown_0000[1] != 0 && this->m_selected >= 0) { + if (item.identity[1] != 0 && this->m_selected >= 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -7333,42 +7333,42 @@ UInCash_CallWnd::UInCash_CallWnd() // OFFSET: 0x008C8F00 // FUNCTION: fn_11973 UISelectCartWnd::UISelectCartWnd() - : UIFrameWnd(0), unknown_00B4(0), unknown_00B8(0), unknown_00BC(0), unknown_00C0(0) { + : UIFrameWnd(0), selectionContext(0), cartTypesBegin(0), cartTypesEnd(0), cartTypesCapacity(0) { } // OFFSET: 0x008C9280 // FUNCTION: fn_11979 UIStorePasswordInputWnd::UIStorePasswordInputWnd() : UIFrameWnd(0), unknown_00BC(-1), unknown_00C0(2) { - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_00F0 = 0; - this->unknown_0108 = 0; - this->unknown_00F4 = 0; - this->unknown_00EC = 0; - this->unknown_00F8 = 40; - this->unknown_00FC = 40; - this->unknown_0100 = 80; - this->unknown_0104 = 119; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->maskTextX = 0; + this->isChangingPassword = 0; + this->passwordStage = 0; + this->inputDigitCount = 0; + this->activeInputY = 40; + this->currentPasswordY = 40; + this->newPasswordY = 80; + this->confirmPasswordY = 119; if (g_session.m_passwordInputAlternate) { - this->unknown_00F4 = 2; - this->unknown_00F8 = 80; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = 80; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); } } // OFFSET: 0x008C8D40 // FUNCTION: fn_11972 UISecondPasswordInputWnd::UISecondPasswordInputWnd() - : UIStorePasswordInputWnd(), unknown_010C(4), unknown_011C(0), unknown_0120(0), unknown_0124(), unknown_0164(nullptr) { - this->unknown_0150[0] = nullptr; - this->unknown_0150[1] = nullptr; - this->unknown_0150[2] = nullptr; + : UIStorePasswordInputWnd(), passwordLength(4), inputMode(0), unknown_0120(0), keypadButtons(), instructionText(nullptr) { + this->actionButtons[0] = nullptr; + this->actionButtons[1] = nullptr; + this->actionButtons[2] = nullptr; } // OFFSET: 0x008C8F80 @@ -7380,11 +7380,11 @@ UISkillDescribeWnd::UISkillDescribeWnd() // OFFSET: 0x008C9430 // FUNCTION: fn_11981 UITipboxWnd::UITipboxWnd() - : UIFrameWnd(0), unknown_00B4(0), unknown_00B8(0), - unknown_00BC(0), m_pageText(nullptr), m_pageTotalText(nullptr), unknown_00D0(0), unknown_00D4(0), unknown_00D8(0), m_buildTime(0), m_frameTime(0), - unknown_00FC(false), unknown_0100(0) { - this->unknown_00C0 = 0; - this->unknown_00C4 = 0; + : UIFrameWnd(0), searchEdit(0), searchResults(0), + tipViewer(0), m_pageText(nullptr), m_pageTotalText(nullptr), previousButton(0), nextButton(0), tagButton(0), m_buildTime(0), m_frameTime(0), + refreshPending(false), showAtStartup(0) { + this->titleText = 0; + this->subtitleText = 0; } // OFFSET: 0x008C86B0 @@ -7399,17 +7399,17 @@ UIItemCollectionWnd::UIItemCollectionWnd() : UIFrameWnd(0), m_helpButton(nullptr) { this->m_placement = nullptr; this->m_item.Reset(); - this->unknown_0238 = 0; - this->unknown_0218 = -1; - this->unknown_021A = -1; - this->unknown_021C = -1; - this->unknown_0236 = 0xFFFF; + this->m_petRenamed = 0; + this->m_petLevel = -1; + this->m_petHunger = -1; + this->m_petFriendly = -1; + this->m_petAccessory = 0xFFFF; this->m_previewTick = 0; this->m_closeButton = nullptr; this->m_compare = 0; - this->unknown_01FC = 0; + this->m_optionCount = 0; this->m_moveInfo = nullptr; - this->unknown_023C = 0; + this->m_withdrawButton = 0; this->m_extraHeight = 0; } @@ -7440,7 +7440,7 @@ UICardItemIllustWnd::UICardItemIllustWnd() // OFFSET: 0x008C8390 // FUNCTION: fn_11953 UIMenuWnd::UIMenuWnd() - : UIFrameWnd(0), m_menuId(10041), m_selected(-1), m_itemHeight(14), unknown_00CC(0), unknown_00DC(0) { + : UIFrameWnd(0), m_menuId(10041), m_selected(-1), m_itemHeight(14), m_targetWindowId(0), m_menuFlags(0) { } // OFFSET: 0x008C85A0 @@ -7458,10 +7458,10 @@ UIPartyInvitationToWnd::UIPartyInvitationToWnd() // OFFSET: 0x008E60A0 // FUNCTION: fn_12191 void UIPartySettingWnd::OnCreate(int width, int height) { - this->m_expShare = g_session.unknown_54A0 == 2 ? 0 : g_session.unknown_54A0; - this->m_itemShare = g_session.unknown_54A4; + this->m_expShare = g_session.partyExpShare == 2 ? 0 : g_session.partyExpShare; + this->m_itemShare = g_session.partyItemCollect; this->m_itemDistribute = 0; - g_session.unknown_54A8 = 0; + g_session.partyItemDistribute = 0; if (height == 245) { this->m_mode = 70; @@ -7480,7 +7480,7 @@ void UIPartySettingWnd::OnCreate(int width, int height) { this->m_expShareButtons[i]->SetText(texts[i]); this->m_expShareButtons[i]->SendMsg(this, UM_SETSTATE, this->m_expShare == i, 0, 0, 0); this->AddChild(this->m_expShareButtons[i]); - if (g_session.unknown_5464 == 0) { + if (g_session.partyLeader == 0) { this->m_expShareButtons[i]->enabled = 0; } } @@ -7502,7 +7502,7 @@ void UIPartySettingWnd::OnCreate(int width, int height) { this->m_itemShareButtons[i]->Move(20, this->m_mode + offset + 37); this->m_itemShareButtons[i]->SendMsg(this, UM_SETSTATE, this->m_itemShare == i, 0, 0, 0); this->m_itemShareButtons[i]->enabled = g_session.PartyCount() == 0; - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { this->m_itemShareButtons[i]->enabled = 1; } this->AddChild(this->m_itemShareButtons[i]); @@ -7515,7 +7515,7 @@ void UIPartySettingWnd::OnCreate(int width, int height) { this->m_itemDistributeButton->SetText(LookupMessage(MSI_ITEMDIV1)); this->m_itemDistributeButton->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); this->m_itemDistributeButton->enabled = g_session.PartyCount() == 0; - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { this->m_itemDistributeButton->enabled = 1; } this->AddChild(this->m_itemDistributeButton); @@ -7775,7 +7775,7 @@ void UINpcEditDialogWnd::OnCreate(int, int) { button->Move(x, y); button->SetId(184); this->AddChild(button); - this->unknown_00B8 = -1; + this->npcId = -1; this->m_message0 = 184; } @@ -7804,7 +7804,7 @@ void UINpcTextEditDialogWnd::OnCreate(int, int) { button->Move(x, y); button->SetId(184); this->AddChild(button); - this->unknown_00B8 = -1; + this->npcId = -1; this->m_message0 = 184; } // OFFSET: 0x008E7660 @@ -7963,15 +7963,15 @@ int UIItemParamChangeDisplayWnd::SendMsg(UIWindow* sender, int message, std::int } case UM_REFRESH: { this->SumEquippedStats(); - this->unknown_00CC = 0; - this->unknown_00D0 = 0; + this->equippedParam = 0; + this->equippedSecondParam = 0; const ITEM_DESC& description = FindItemDescription(std::atoi(this->m_label.c_str())); - ITEM_INFO equipped = this->FindEquippedItem(description.unknown_002C); - if (equipped.unknown_0000[1] != 0) { + ITEM_INFO equipped = this->FindEquippedItem(description.descriptionFlags); + if (equipped.identity[1] != 0) { const ITEM_DESC& equippedDescription = FindItemDescription(std::atoi(equipped.itemId.c_str())); - if (equippedDescription.unknown_0034.size() == 2) { - this->unknown_00CC = equippedDescription.unknown_0034[0]; - this->unknown_00D0 = equippedDescription.unknown_0034[1]; + if (equippedDescription.descriptionValues.size() == 2) { + this->equippedParam = equippedDescription.descriptionValues[0]; + this->equippedSecondParam = equippedDescription.descriptionValues[1]; } } break; @@ -7979,21 +7979,21 @@ int UIItemParamChangeDisplayWnd::SendMsg(UIWindow* sender, int message, std::int case UM_PARAM: { this->SumEquippedStats(); this->m_label = reinterpret_cast(a); - this->unknown_00EC = static_cast(b); + this->itemIndex = static_cast(b); const ITEM_DESC& description = FindItemDescription(std::atoi(this->m_label.c_str())); - if (description.unknown_0034.size() == 2) { - this->unknown_00C4 = description.unknown_0034[0]; - this->unknown_00C8 = description.unknown_0034[1]; + if (description.descriptionValues.size() == 2) { + this->itemParam = description.descriptionValues[0]; + this->itemSecondParam = description.descriptionValues[1]; } - this->unknown_00CC = 0; - this->unknown_00D0 = 0; + this->equippedParam = 0; + this->equippedSecondParam = 0; const ITEM_DESC& slot = FindItemDescription(std::atoi(this->m_label.c_str())); - ITEM_INFO equipped = this->FindEquippedItem(slot.unknown_002C); - if (equipped.unknown_0000[1] != 0) { + ITEM_INFO equipped = this->FindEquippedItem(slot.descriptionFlags); + if (equipped.identity[1] != 0) { const ITEM_DESC& equippedDescription = FindItemDescription(std::atoi(equipped.itemId.c_str())); - if (equippedDescription.unknown_0034.size() == 2) { - this->unknown_00CC = equippedDescription.unknown_0034[0]; - this->unknown_00D0 = equippedDescription.unknown_0034[1]; + if (equippedDescription.descriptionValues.size() == 2) { + this->equippedParam = equippedDescription.descriptionValues[0]; + this->equippedSecondParam = equippedDescription.descriptionValues[1]; } } break; @@ -8002,8 +8002,8 @@ int UIItemParamChangeDisplayWnd::SendMsg(UIWindow* sender, int message, std::int return UIFrameWnd::SendMsg(sender, message, a, b, c, d); } - this->m_after = this->unknown_00C4 + this->m_before - this->unknown_00CC; - this->m_afterSecond = this->unknown_00C8 + this->m_beforeSecond - this->unknown_00D0; + this->m_after = this->itemParam + this->m_before - this->equippedParam; + this->m_afterSecond = this->itemSecondParam + this->m_beforeSecond - this->equippedSecondParam; this->Invalidate(); return 0; } @@ -8120,7 +8120,7 @@ int UINotifyItemObtainWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ITEM_INFO item; item.itemId = reinterpret_cast(c); item.identified = this->m_identified; - item.unknown_0060 = 0; + item.refiningLevel = 0; std::sprintf(text, LookupMessage(MSI_GET_ITEM), item.DisplayName(0).c_str(), static_cast(b)); this->m_message = text; } @@ -8181,18 +8181,18 @@ int UISkillDescribeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, g_windowMgr.CloseWindow(WID_SKILLDELAYINFO); } - this->unknown_00EC = this->unknown_00D4 = skill.DisplayName(*g_session.m_hotkeyScript); + this->descriptionText = this->skillName = skill.DisplayName(*g_session.m_hotkeyScript); this->m_skillId = static_cast(skill.id); { CSkillInfo owned = g_session.LookupSkill(static_cast(a)); - if (owned.available != 0 && owned.unknown_0014 != 0 && owned.level != 0) { + if (owned.available != 0 && owned.spCost != 0 && owned.level != 0) { char cost[64]; if (skill.UseApAmount(*g_session.m_hotkeyScript, owned.level) != 0) { - std::sprintf(cost, " (Sp : %d, Ap : %d)", owned.unknown_0014, owned.unknown_0034); + std::sprintf(cost, " (Sp : %d, Ap : %d)", owned.spCost, owned.apCost); } else { - std::sprintf(cost, " (Sp : %d)", owned.unknown_0014); + std::sprintf(cost, " (Sp : %d)", owned.spCost); } - this->unknown_00EC.append(cost, std::strlen(cost)); + this->descriptionText.append(cost, std::strlen(cost)); } bool passive = false; g_session.m_hotkeyScript->Call("IsPassiveSkill", "d>b", static_cast(a), &passive); @@ -8200,7 +8200,7 @@ int UISkillDescribeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->m_text->Clear(); } - this->unknown_00BC = "유저인터페이스\\item\\" + std::string(skill.IdName(*g_session.m_hotkeyScript)) + ".bmp"; + this->iconName = "유저인터페이스\\item\\" + std::string(skill.IdName(*g_session.m_hotkeyScript)) + ".bmp"; this->m_viewer->Clear(); const char* description = nullptr; @@ -8382,7 +8382,7 @@ void UIPasswordWnd::OnCreate(int, int) { g_windowMgr.SetFocus(this->m_edit); auto* title = new UIStaticText(); - this->unknown_00B8 = reinterpret_cast(title); + this->itemTitle = reinterpret_cast(title); title->SetSize(this->geometry.width - 30, 15); title->Move(15, 6); title->SetText(LookupMessage(MSI_ENTER_PASSWORD), 0); @@ -8400,14 +8400,14 @@ void UIPasswordWnd::OnCreate(int, int) { button->SetId(184); this->AddChild(button); this->m_message0 = 184; - this->geometry.unknown_0030 = 0; - this->unknown_00BC = 0; + this->geometry.state = 0; + this->roomId = 0; } // OFFSET: 0x008C91F0 // FUNCTION: fn_11978 UIStatusWnd::UIStatusWnd() : UIFrameWnd(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->m_info = nullptr; this->m_titleHeight = 17; this->m_offsetY = 11; @@ -8488,8 +8488,8 @@ static __forceinline void RequestTraitPointUp(CMode* mode, int index) { // FUNCTION: fn_12383 int UIStatusWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { CMode* mode = g_modeMgr.gameMode; - const int* statCosts = reinterpret_cast(g_session.unknown_169C); - const int statusPoint = *reinterpret_cast(g_session.unknown_1654); + const int* statCosts = reinterpret_cast(g_session.combatStats); + const int statusPoint = *reinterpret_cast(g_session.statusPoints); switch (message) { case UM_COMMAND: switch (a) { @@ -8577,17 +8577,17 @@ int UIStatusWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in if (!this->m_info->IsValid()) { this->m_info->Reset(); } - this->SendMsg(nullptr, UM_RESIZE, 7, this->m_info->width, this->m_info->unknown_0010, 0); - if (this->m_info->height != this->m_info->unknown_0010) { + this->SendMsg(nullptr, UM_RESIZE, 7, this->m_info->width, this->m_info->expandedHeight, 0); + if (this->m_info->height != this->m_info->expandedHeight) { this->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); this->Move(this->m_info->x, this->m_info->y); - this->m_extended = this->m_info->unknown_0018 != 1; + this->m_extended = this->m_info->extended != 1; this->SendMsg(nullptr, UM_COMMAND, 550, 0, 0, 0); break; case UM_REFRESHBUTTON: - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { int costs[6]; std::memcpy(costs, statCosts, sizeof(costs)); int y = 24; @@ -8638,11 +8638,11 @@ int UIStorePasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_ break; case ID_OK: - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: - if (std::strlen(this->unknown_00D0) < 9 && std::strlen(this->unknown_00D0) > 3) { - int password = std::atoi(this->unknown_00D0); - for (unsigned i = 0; i < std::strlen(this->unknown_00D0); ++i) { + if (std::strlen(this->currentPassword) < 9 && std::strlen(this->currentPassword) > 3) { + int password = std::atoi(this->currentPassword); + for (unsigned i = 0; i < std::strlen(this->currentPassword); ++i) { password += 100000000; } mode->SendMsg(188, password, g_session.m_storePasswordMode, 0, 0); @@ -8650,93 +8650,93 @@ int UIStorePasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_ break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->Paint(); break; case 1: - if (std::strlen(this->unknown_00D0) < 9 && std::strlen(this->unknown_00D0) > 3) { - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + if (std::strlen(this->currentPassword) < 9 && std::strlen(this->currentPassword) > 3) { + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(111, 79, 98, 14, 0xFFFFFF); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->Paint(); break; case 2: - if (std::strlen(this->unknown_00D9) < 9 && std::strlen(this->unknown_00D9) > 3) { - this->unknown_00F8 = this->unknown_0104; - this->unknown_00F4 = 3; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + if (std::strlen(this->newPassword) < 9 && std::strlen(this->newPassword) > 3) { + this->activeInputY = this->confirmPasswordY; + this->passwordStage = 3; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(111, 118, 98, 14, 0xFFFFFF); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F8 = this->unknown_0100; - this->unknown_00F4 = 2; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->activeInputY = this->newPasswordY; + this->passwordStage = 2; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(111, 79, 98, 14, 0xFFFFFF); break; case 3: - if (std::strlen(this->unknown_00E2) < 9 && std::strlen(this->unknown_00E2) > 3) { - if (std::strcmp(this->unknown_00D9, this->unknown_00E2) == 0) { - int password = std::atoi(this->unknown_00D0); - int newPassword = std::atoi(this->unknown_00E2); - for (unsigned i = 0; i < std::strlen(this->unknown_00D0); ++i) { + if (std::strlen(this->confirmPassword) < 9 && std::strlen(this->confirmPassword) > 3) { + if (std::strcmp(this->newPassword, this->confirmPassword) == 0) { + int password = std::atoi(this->currentPassword); + int newPassword = std::atoi(this->confirmPassword); + for (unsigned i = 0; i < std::strlen(this->currentPassword); ++i) { password += 100000000; } - for (unsigned i = 0; i < std::strlen(this->unknown_00E2); ++i) { + for (unsigned i = 0; i < std::strlen(this->confirmPassword); ++i) { newPassword += 100000000; } mode->SendMsg(188, password, g_session.m_storePasswordMode, newPassword, 0); g_windowMgr.CloseWindow(115); } else { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_MISMATCH), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(111, 79, 98, 14, 0xFFFFFF); this->FillRegion(110, 117, 100, 16, 0xFAE6C8); } break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 3; - this->unknown_00F8 = this->unknown_0104; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 3; + this->activeInputY = this->confirmPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(111, 118, 98, 14, 0xFFFFFF); break; } @@ -8744,246 +8744,246 @@ int UIStorePasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_ case ID_CHANGE_STORE_PASSWORD: g_session.m_storePasswordMode = 2; - this->unknown_0108 = 1; - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->isChangingPassword = 1; + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->Paint(); break; case ID_STORE_PASSWORD_NUM1: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "1"); + std::strcat(this->currentPassword, "1"); break; case 2: - std::strcat(this->unknown_00D9, "1"); + std::strcat(this->newPassword, "1"); break; case 3: - std::strcat(this->unknown_00E2, "1"); + std::strcat(this->confirmPassword, "1"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_RETURN: this->SendMsg(this, UM_COMMAND, ID_OK, 0, 0, 0); break; case ID_STORE_PASSWORD_NUM0: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "0"); + std::strcat(this->currentPassword, "0"); break; case 2: - std::strcat(this->unknown_00D9, "0"); + std::strcat(this->newPassword, "0"); break; case 3: - std::strcat(this->unknown_00E2, "0"); + std::strcat(this->confirmPassword, "0"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM2: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "2"); + std::strcat(this->currentPassword, "2"); break; case 2: - std::strcat(this->unknown_00D9, "2"); + std::strcat(this->newPassword, "2"); break; case 3: - std::strcat(this->unknown_00E2, "2"); + std::strcat(this->confirmPassword, "2"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM3: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "3"); + std::strcat(this->currentPassword, "3"); break; case 2: - std::strcat(this->unknown_00D9, "3"); + std::strcat(this->newPassword, "3"); break; case 3: - std::strcat(this->unknown_00E2, "3"); + std::strcat(this->confirmPassword, "3"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM4: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "4"); + std::strcat(this->currentPassword, "4"); break; case 2: - std::strcat(this->unknown_00D9, "4"); + std::strcat(this->newPassword, "4"); break; case 3: - std::strcat(this->unknown_00E2, "4"); + std::strcat(this->confirmPassword, "4"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM5: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "5"); + std::strcat(this->currentPassword, "5"); break; case 2: - std::strcat(this->unknown_00D9, "5"); + std::strcat(this->newPassword, "5"); break; case 3: - std::strcat(this->unknown_00E2, "5"); + std::strcat(this->confirmPassword, "5"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM6: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "6"); + std::strcat(this->currentPassword, "6"); break; case 2: - std::strcat(this->unknown_00D9, "6"); + std::strcat(this->newPassword, "6"); break; case 3: - std::strcat(this->unknown_00E2, "6"); + std::strcat(this->confirmPassword, "6"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM7: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "7"); + std::strcat(this->currentPassword, "7"); break; case 2: - std::strcat(this->unknown_00D9, "7"); + std::strcat(this->newPassword, "7"); break; case 3: - std::strcat(this->unknown_00E2, "7"); + std::strcat(this->confirmPassword, "7"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM8: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "8"); + std::strcat(this->currentPassword, "8"); break; case 2: - std::strcat(this->unknown_00D9, "8"); + std::strcat(this->newPassword, "8"); break; case 3: - std::strcat(this->unknown_00E2, "8"); + std::strcat(this->confirmPassword, "8"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM9: - if (++this->unknown_00EC > 8) { + if (++this->inputDigitCount > 8) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_8), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, "9"); + std::strcat(this->currentPassword, "9"); break; case 2: - std::strcat(this->unknown_00D9, "9"); + std::strcat(this->newPassword, "9"); break; case 3: - std::strcat(this->unknown_00E2, "9"); + std::strcat(this->confirmPassword, "9"); break; } - this->DrawTextAt(this->unknown_00F0 + 112, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 112, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM_RESET: - if (this->unknown_00F4 == 0) { - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; + if (this->passwordStage == 0) { + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; } else if (g_session.m_passwordInputAlternate) { - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; } else { - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; } - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->Paint(); break; @@ -9018,8 +9018,8 @@ void UICardItemIllustWnd::Paint() { ITEM_INFO item; item.itemId = this->m_name; - item.identified = this->unknown_00E4; - item.unknown_0060 = 0; + item.identified = this->identified; + item.refiningLevel = 0; this->DrawFittedItemName(10, 3, &item, 0, 0, 12, 0); } @@ -9029,7 +9029,7 @@ void UISelectCartWnd::OnCreate(int, int) { this->AddCloseButton("", 0); const int levels[] = {0, 40, 65, 80, 90, 100, 110, 120, 130}; - std::vector& carts = *reinterpret_cast*>(&this->unknown_00B8); + std::vector& carts = *reinterpret_cast*>(&this->cartTypesBegin); const int level = g_session.m_level; carts.clear(); for (int i = 0; i < 9; ++i) { @@ -9056,13 +9056,13 @@ void UISelectCartWnd::OnCreate(int, int) { // OFFSET: 0x00904810 // FUNCTION: fn_12378 int UISelectCartWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - std::vector& carts = *reinterpret_cast*>(&this->unknown_00B8); + std::vector& carts = *reinterpret_cast*>(&this->cartTypesBegin); switch (message) { case UM_SETINFO: { this->DeleteChildren(); this->AddCloseButton("", 0); carts.clear(); - this->unknown_00B4 = static_cast(c); + this->selectionContext = static_cast(c); const char* types = reinterpret_cast(a); for (int i = 0; i < b; ++i) { carts.push_back(types[i]); @@ -9088,7 +9088,7 @@ int UISelectCartWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std break; } } - g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_CART, type, this->unknown_00B4, 0, 0); + g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_CART, type, this->selectionContext, 0, 0); } g_windowMgr.CloseWindow(WID_SELECTCARTWND); break; @@ -9259,7 +9259,7 @@ static __forceinline std::vector BuildItemListReplayRecords(const fields[1] = static_cast(packet.size()); std::int16_t* index = fields + 2; for (std::list::const_iterator item = items.begin(); item != items.end(); ++item) { - *index++ = static_cast(item->unknown_0000[1]); + *index++ = static_cast(item->identity[1]); } { const auto message = MakeReplayTaggedRecord(id + 3, packet.data(), packet.size()); @@ -9301,7 +9301,7 @@ std::vector UIMakingArrowListWnd::GetReplayData() { } { - const auto record = MakeReplayTaggedRecord(22102, &this->unknown_00F0, sizeof(this->unknown_00F0)); + const auto record = MakeReplayTaggedRecord(22102, &this->listType, sizeof(this->listType)); records.insert(records.end(), record.begin(), record.end()); } { @@ -9383,7 +9383,7 @@ int UIAutoMessageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } if (a == ID_OK) { - reinterpret_cast(g_session.unknown_56B8[4]) = this->m_edit->Text(); + reinterpret_cast(g_session.autoReplyState[4]) = this->m_edit->Text(); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_AUTO_MSG_ON)), 0x64FFFF, 0, 0, 0); g_windowMgr.RestoreInput(); g_windowMgr.CloseWindow(WID_AUTOMESSAGEWND); @@ -9402,7 +9402,7 @@ int UICardItemIllustWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, break; case UM_CARDITEMILLUSTRATE: { const char* id = reinterpret_cast(a); - this->unknown_00E4 = b != 0; + this->identified = b != 0; const char* name = FindItemCardName(std::atoi(id)).name; if (IsItemCard(std::atoi(id)) && this->m_name != id) { this->m_name = id; @@ -9445,7 +9445,7 @@ void UISecondPasswordInputWnd::Paint() { this->FillRegion(414, 89, 100, 16, boxColor); this->FillRegion(415, 90, 98, 14, 0xFFFFFF); - if (!g_session.m_passwordInputAlternate && this->unknown_0108 == 0) { + if (!g_session.m_passwordInputAlternate && this->isChangingPassword == 0) { this->DrawEmboldenedText(414, 112, LookupMessage(MSI_STORE_NEW_PASSWORD), 0xF0F0F0, 0xE6E6E6, 0, 0, 12); this->FillRegion(414, 127, 100, 16, 0xE6E6E6); this->DrawEmboldenedText(414, 152, LookupMessage(MSI_STORE_RENEW_PASSWORD), 0xF0F0F0, 0xE6E6E6, 0, 0, 12); @@ -9460,21 +9460,21 @@ void UISecondPasswordInputWnd::Paint() { } } - if (this->unknown_00F4 == 2 || this->unknown_00F4 == 3) { - if (this->unknown_00F4 == 3) { + if (this->passwordStage == 2 || this->passwordStage == 3) { + if (this->passwordStage == 3) { this->FillRegion(415, 167, 98, 14, 0xFFFFFF); } this->FillRegion(415, 128, 98, 14, 0xFFFFFF); } - for (std::size_t index = 0, x = 416; index < std::strlen(this->unknown_00D0); ++index, x += 5) { - this->DrawTextAt(static_cast(x), this->unknown_00FC, "*", 0, 0, 12, 0, 0, 0); + for (std::size_t index = 0, x = 416; index < std::strlen(this->currentPassword); ++index, x += 5) { + this->DrawTextAt(static_cast(x), this->currentPasswordY, "*", 0, 0, 12, 0, 0, 0); } - for (std::size_t index = 0, x = 416; index < std::strlen(this->unknown_00D9); ++index, x += 5) { - this->DrawTextAt(static_cast(x), this->unknown_0100, "*", 0, 0, 12, 0, 0, 0); + for (std::size_t index = 0, x = 416; index < std::strlen(this->newPassword); ++index, x += 5) { + this->DrawTextAt(static_cast(x), this->newPasswordY, "*", 0, 0, 12, 0, 0, 0); } - for (std::size_t index = 0, x = 416; index < std::strlen(this->unknown_00E2); ++index, x += 5) { - this->DrawTextAt(static_cast(x), this->unknown_0104, "*", 0, 0, 12, 0, 0, 0); + for (std::size_t index = 0, x = 416; index < std::strlen(this->confirmPassword); ++index, x += 5) { + this->DrawTextAt(static_cast(x), this->confirmPasswordY, "*", 0, 0, 12, 0, 0, 0); } } @@ -9511,7 +9511,7 @@ void UInCashWnd::Paint() { // OFFSET: 0x008F4D50 // FUNCTION: fn_12295 void UIExchangeWnd::OnProcess() { - UIEditCtrl* edit = this->unknown_00C0; + UIEditCtrl* edit = this->zenyEdit; if (edit == nullptr) { return; } @@ -9559,7 +9559,7 @@ void UIExchangeWnd::OnProcess() { // FUNCTION: fn_12224 void UIItemCollectionWnd::Paint() { int height = this->geometry.height; - if (this->m_item.identified == 1 && this->unknown_01FC != 0) { + if (this->m_item.identified == 1 && this->m_optionCount != 0) { height -= this->m_extraHeight; } const int bottom = this->m_compare == 1 ? height - 29 : height; @@ -9568,13 +9568,13 @@ void UIItemCollectionWnd::Paint() { if (this->m_kind == 234 || this->m_kind == 250) { this->DrawSkinBox("유저인터페이스\\basic_interface\\sysbox_comparison_", 0, 0, this->geometry.width, bottom, true); background = "유저인터페이스\\basic_interface\\collection_Comparison_bg.bmp"; - } else if (this->m_item.unknown_0088 > 0) { + } else if (this->m_item.grade > 0) { const int width = this->geometry.width; - this->DrawSkinBox(FormatOwnedString("유저인터페이스\\sysbox_g%d_", this->m_item.unknown_0088).c_str(), 0, 0, width, bottom, false); + this->DrawSkinBox(FormatOwnedString("유저인터페이스\\sysbox_g%d_", this->m_item.grade).c_str(), 0, 0, width, bottom, false); this->DrawBitmap( 0, 0, static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\basic_interface\\collection_bg_g%d.bmp", this->m_item.unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\basic_interface\\collection_bg_g%d.bmp", this->m_item.grade).c_str())) ), true ); @@ -9587,14 +9587,14 @@ void UIItemCollectionWnd::Paint() { this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve(background))), true); } - if (this->unknown_01C4.size() != 0) { - this->DrawBitmap(10, 11, static_cast(ResourceMgr::Instance().Load(Resolve(this->unknown_01C4.c_str()))), true); + if (this->m_bitmapName.size() != 0) { + this->DrawBitmap(10, 11, static_cast(ResourceMgr::Instance().Load(Resolve(this->m_bitmapName.c_str()))), true); } this->DrawFittedItemName(90, 10, &this->m_item, this->m_item.identified ? 0 : 0x808080, 0, 12, 0); if (this->m_compare == 1) { int offset = 0; - if (this->m_item.identified == 1 && this->unknown_01FC > 0) { + if (this->m_item.identified == 1 && this->m_optionCount > 0) { for (std::map>::iterator card = this->m_cardTexts.begin(); card != this->m_cardTexts.end(); ++card) { const char* box = this->m_kind == 234 ? "유저인터페이스\\basic_interface\\sysbox_comparison_" : "유저인터페이스\\sysbox_"; this->DrawSkinBox(box, 0, bottom + offset, this->geometry.width, static_cast(card->second.size()) * 15 + 14, true); @@ -9622,7 +9622,7 @@ void UIItemCollectionWnd::Paint() { const int y = top + 2; int slot = 0; for (int x = 4; x < 104; x += 25, ++slot) { - const int card = reinterpret_cast(this->m_item.unknown_001C)[slot]; + const int card = reinterpret_cast(this->m_item.cards)[slot]; if (card < 1) { CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\empty_card_slot.bmp"))); if (this->m_kind == 234) { @@ -9655,7 +9655,7 @@ void UIAutoMessageWnd::OnCreate(int, int) { this->m_edit->Move(15, 22); this->m_edit->maximum = 100; this->m_edit->Background(232, 232, 232); - this->m_edit->SetText(reinterpret_cast(g_session.unknown_56B8[4]).c_str()); + this->m_edit->SetText(reinterpret_cast(g_session.autoReplyState[4]).c_str()); this->m_edit->SelectAll(); this->AddChild(this->m_edit); @@ -9778,7 +9778,7 @@ int UIPetEggListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume int found = 0; ITEM_INFO item = this->GetItem(this->m_selected, &found); if (found) { - g_modeMgr.gameMode->SendMsg(MM_PETEGG_SELECT_FROM_LIST, item.unknown_0000[1], 0, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_PETEGG_SELECT_FROM_LIST, item.identity[1], 0, 0, 0); } break; } @@ -9827,35 +9827,35 @@ std::vector UIExchangeWnd::GetReplayData() { records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20603, &this->unknown_0108, sizeof(this->unknown_0108)); + const auto record = MakeReplayTaggedRecord(20603, &this->partnerId, sizeof(this->partnerId)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20604, &this->unknown_010C, sizeof(this->unknown_010C)); + const auto record = MakeReplayTaggedRecord(20604, &this->partnerLevel, sizeof(this->partnerLevel)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20602, this->unknown_00F0.c_str(), this->unknown_00F0.size()); + const auto record = MakeReplayTaggedRecord(20602, this->partnerName.c_str(), this->partnerName.size()); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20605, &this->unknown_00CC, sizeof(this->unknown_00CC)); + const auto record = MakeReplayTaggedRecord(20605, &this->isLocalTrader, sizeof(this->isLocalTrader)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20606, &this->unknown_00D0, sizeof(this->unknown_00D0)); + const auto record = MakeReplayTaggedRecord(20606, &this->localConfirmed, sizeof(this->localConfirmed)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20607, &this->unknown_00D4, sizeof(this->unknown_00D4)); + const auto record = MakeReplayTaggedRecord(20607, &this->remoteConfirmed, sizeof(this->remoteConfirmed)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20608, &this->unknown_00D8, sizeof(this->unknown_00D8)); + const auto record = MakeReplayTaggedRecord(20608, &this->localAccepted, sizeof(this->localAccepted)); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(20609, &this->unknown_00DC, sizeof(this->unknown_00DC)); + const auto record = MakeReplayTaggedRecord(20609, &this->remoteAccepted, sizeof(this->remoteAccepted)); records.insert(records.end(), record.begin(), record.end()); } { @@ -9879,7 +9879,7 @@ std::vector UISayDialogWnd::GetReplayData() { records.insert(records.end(), record.begin(), record.end()); } { - const auto record = MakeReplayTaggedRecord(22504, &this->unknown_00D4, sizeof(this->unknown_00D4)); + const auto record = MakeReplayTaggedRecord(22504, &this->m_responsePending, sizeof(this->m_responsePending)); records.insert(records.end(), record.begin(), record.end()); } { @@ -9964,7 +9964,7 @@ void UIEquipWnd::DrawEquipSlots() { item = g_session.GetItem21A0(slot); } - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } @@ -9979,15 +9979,15 @@ void UIEquipWnd::DrawEquipSlots() { } } - if (item.unknown_0088 > 0) { + if (item.grade > 0) { if (slot < 8) { auto* grade = static_cast(ResourceMgr::Instance().Load( - Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088).c_str()) + Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade).c_str()) )); this->DrawBitmap(iconX[slot / 4], this->m_contentTop + 56 + (slot & 3) * 26, grade, true); } else { auto* grade = static_cast(ResourceMgr::Instance().Load( - Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088).c_str()) + Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade).c_str()) )); this->DrawBitmap(iconX[slot & 3], this->m_contentTop + 30, grade, true); } @@ -10008,7 +10008,7 @@ void UIEquipWnd::DrawEquipSlots() { void UIEquipWnd::RefreshTitleList() { this->m_titleList->Clear(); this->m_titleList->AddLine(LookupMessage(MSI_GUILD_JOIN_GUILD_NOT_PERMITTED_MAP), 0); - for (std::vector::iterator it = g_session.unknown_6160.begin(); it != g_session.unknown_6160.end(); ++it) { + for (std::vector::iterator it = g_session.jobTitles.begin(); it != g_session.jobTitles.end(); ++it) { const std::string title = GetJobTitleString(*it); this->m_titleList->AddLine(title.c_str(), *it); } @@ -10026,23 +10026,23 @@ void UIItemCollectionWnd::OnRBtnDown(int x, int y) { ITEM_INFO card; int cardId; - std::memcpy(&cardId, this->m_item.unknown_001C + index * sizeof(cardId), sizeof(cardId)); + std::memcpy(&cardId, this->m_item.cards + index * sizeof(cardId), sizeof(cardId)); card.identified = 1; - card.unknown_0000[0] = 6; - card.unknown_0060 = 0; + card.identity[0] = 6; + card.refiningLevel = 0; card.SetItemId(cardId); UIWindow* window = g_windowMgr.EnsureWindow(WID_COMBINEDCARDITEMCOLLECTIONWND); window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, card.identified, 0, 0, 0); window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&card), index >= ItemSlotsCount(this->m_item), 0, 0); - if (UIItemCollectionWnd* comparison = static_cast(g_windowMgr.unknown_0220)) { + if (UIItemCollectionWnd* comparison = static_cast(g_windowMgr.itemCollectionComparisonWnd)) { int compareId; - std::memcpy(&compareId, comparison->m_item.unknown_001C + index * sizeof(compareId), sizeof(compareId)); + std::memcpy(&compareId, comparison->m_item.cards + index * sizeof(compareId), sizeof(compareId)); if (compareId != 0 && compareId != 254 && compareId != 255) { ITEM_INFO compareCard; compareCard.identified = 1; - compareCard.unknown_0000[0] = 6; - compareCard.unknown_0060 = 0; + compareCard.identity[0] = 6; + compareCard.refiningLevel = 0; compareCard.SetItemId(compareId); UIWindow* compareWindow = g_windowMgr.EnsureWindow(WID_COMBINEDCARDITEMCOLLECTION_COMPARISONWND); compareWindow->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, compareCard.identified, 0, 0, 0); @@ -10063,10 +10063,10 @@ void UIItemCollection_ComparisonWnd::OnRBtnDown(int x, int y) { ITEM_INFO card; int cardId; - std::memcpy(&cardId, this->m_item.unknown_001C + index * sizeof(cardId), sizeof(cardId)); + std::memcpy(&cardId, this->m_item.cards + index * sizeof(cardId), sizeof(cardId)); card.identified = 1; - card.unknown_0000[0] = 6; - card.unknown_0060 = 0; + card.identity[0] = 6; + card.refiningLevel = 0; card.SetItemId(cardId); UIWindow* window = g_windowMgr.EnsureWindow(WID_COMBINEDCARDITEMCOLLECTIONWND); window->SendMsg(nullptr, UM_SET_IDENTIFIY_INFO, card.identified, 0, 0, 0); @@ -10085,26 +10085,26 @@ void UIEquipWnd::OnLBtnDown(int x, int y) { } ITEM_INFO item = this->ItemIconAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } if (item.quantity > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); mode->drag.BeginItem(g_windowMgr, this->m_page == 1 ? 24 : 2, item, item.quantity, slots.values[2]); } if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { if (g_windowMgr.GetHoverWindow() && item.identified != 0) { if (g_windowMgr.GetHoverWindow()->geometry.id == 492) { - reinterpret_cast(g_windowMgr.unknown_0318)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 490) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.rodexComposeWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -10134,21 +10134,21 @@ UInCashWnd::UInCashWnd() : UIItemBaseWnd() { // FUNCTION: fn_12267 void UInCashWnd::OnLBtnDblClk(int x, int y) { ITEM_INFO item = this->ItemAt(x, y); - if (item.unknown_0000[1] == 0 || this->m_selected >= 0) { + if (item.identity[1] == 0 || this->m_selected >= 0) { return; } g_modeMgr.GetGameMode(); this->m_selected = ~this->m_selected; g_session.RemoveItem1720ByName(item); - this->m_totalPrice -= item.quantity * item.unknown_0014[1]; + this->m_totalPrice -= item.quantity * item.prices[1]; this->m_otherItems.erase(this->m_otherItems.begin(), this->m_otherItems.end()); const CSession& lists = g_session; const int count = lists.GetList2Size(); for (int index = 0; index < count; ++index) { ITEM_INFO other = g_session.GetItem1720At(index); - if (other.unknown_0000[1] != 0) { + if (other.identity[1] != 0) { this->m_otherItems.push_back(other); } } @@ -10189,7 +10189,7 @@ int UIMakingArrowListWnd::SendMsg(UIWindow*, int message, std::intptr_t a, std:: this->Invalidate(); break; case UM_SETINFO: - this->unknown_00F0 = static_cast(a); + this->listType = static_cast(a); break; case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: @@ -10219,20 +10219,20 @@ int UIMakingArrowListWnd::SendMsg(UIWindow*, int message, std::intptr_t a, std:: int found; ITEM_INFO item = this->GetItem(this->m_selected, &found); if (found != 0) { - if (this->unknown_00F0 == 2) { + if (this->listType == 2) { g_modeMgr.gameMode->SendMsg(MM_ARROW_FROM_LIST, item.GetItemId(), 0, 0, 0); } else { - g_modeMgr.gameMode->SendMsg(MM_ITEM_FROM_LIST, item.GetItemId(), this->unknown_00F0, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_ITEM_FROM_LIST, item.GetItemId(), this->listType, 0, 0); } g_windowMgr.CloseWindow(WID_MAKINGARROWLISTWND); } break; } case ID_CANCEL: - if (this->unknown_00F0 == 2) { + if (this->listType == 2) { g_modeMgr.gameMode->SendMsg(MM_ARROW_FROM_LIST, -1, 0, 0, 0); } else { - g_modeMgr.gameMode->SendMsg(MM_ITEM_FROM_LIST, -1, this->unknown_00F0, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_ITEM_FROM_LIST, -1, this->listType, 0, 0); } g_windowMgr.CloseWindow(WID_MAKINGARROWLISTWND); break; @@ -10280,15 +10280,15 @@ int UIMakingArrowListWnd::SendMsg(UIWindow*, int message, std::intptr_t a, std:: // OFFSET: 0x008F50E0 // FUNCTION: fn_12301 void UITipboxWnd::OnProcess() { - if (this->unknown_00FC == true) { - this->unknown_00FC = false; - const int index = (std::max)(0, g_itemTagOwner->unknown_00B4); + if (this->refreshPending == true) { + this->refreshPending = false; + const int index = (std::max)(0, g_itemTagOwner->paragraphIndex); const std::string text = g_itemTagOwner->m_currentEntry.paragraphs[index]; std::vector lines; WrapPlainText(text.c_str(), lines, 1000); - this->unknown_00BC->Clear(); + this->tipViewer->Clear(); for (const std::string& line : lines) { - this->unknown_00BC->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(line.c_str()), 32, 0, 0); + this->tipViewer->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(line.c_str()), 32, 0, 0); } this->Invalidate(); } @@ -10329,20 +10329,20 @@ int UIChooseWarpWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std case ID_OK: { const int selected = this->m_list->selected; if (selected != -1) { - g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_WARPPOINT, reinterpret_cast(this->m_choices[selected].c_str()), this->unknown_00B8, 0, 0); + g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_WARPPOINT, reinterpret_cast(this->m_choices[selected].c_str()), this->skillId, 0, 0); g_windowMgr.CloseWindow(WID_CHOOSEWARPWND); } break; } case ID_CANCEL: - g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_WARPPOINT, reinterpret_cast("cancel"), this->unknown_00B8, 0, 0); + g_modeMgr.GetGameMode()->SendMsg(MM_SELECT_WARPPOINT, reinterpret_cast("cancel"), this->skillId, 0, 0); g_windowMgr.CloseWindow(WID_CHOOSEWARPWND); break; } return 0; } case UM_SETSKID: - this->unknown_00B8 = static_cast(a); + this->skillId = static_cast(a); return 0; case UM_SETCHOOSE: if (a != 0) { @@ -10399,7 +10399,7 @@ void UITipboxWnd::Paint() { auto* background = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\tipbox\\TipboxBG.bmp"))); this->DrawBitmap(0, 17, background, false); - if (this->unknown_00B8->geometry.visible == 1) { + if (this->searchResults->geometry.visible == 1) { const char* path = g_itemTagOwner->HasSearchResults() ? "유저인터페이스\\tipbox\\img_loading.bmp" : "유저인터페이스\\tipbox\\img_NoSearchResults.bmp"; auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path))); @@ -10408,8 +10408,8 @@ void UITipboxWnd::Paint() { CTipBoxMgr* manager = g_itemTagOwner; switch (manager->m_image.kind) { case 0: - if (manager->m_currentEntry.unknown_0044 == 5 && manager->m_currentEntry.unknown_0048 == 100) { - const std::string path = manager->m_currentEntry.unknown_001C + ".bmp"; + if (manager->m_currentEntry.imageCell == 5 && manager->m_currentEntry.imageScalePercent == 100) { + const std::string path = manager->m_currentEntry.bitmapName + ".bmp"; auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); this->DrawBitmap(1, 17, bitmap, false); } else { @@ -10510,22 +10510,22 @@ void UITipOfTheDayWnd::OnCreate(int width, int height) { // OFFSET: 0x008E9C90 // FUNCTION: fn_12204 void UITipboxWnd::OnCreate(int width, int) { - this->unknown_0100 = g_window315Enabled; + this->showAtStartup = g_window315Enabled; this->m_message0 = 365; unsigned red, green, blue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - this->unknown_00BC = new UITagTextViewer(); - this->unknown_00BC->SetSize(226, 245); - this->unknown_00BC->m_backgroundColor = 0xFF000000u | RGB(red, green, blue); - this->unknown_00BC->Invalidate(); - this->unknown_00BC->m_textWidth = 188; - this->unknown_00BC->Move(250, 70); - this->AddChild(this->unknown_00BC); - this->unknown_00BC->Show(1); + this->tipViewer = new UITagTextViewer(); + this->tipViewer->SetSize(226, 245); + this->tipViewer->m_backgroundColor = 0xFF000000u | RGB(red, green, blue); + this->tipViewer->Invalidate(); + this->tipViewer->m_textWidth = 188; + this->tipViewer->Move(250, 70); + this->AddChild(this->tipViewer); + this->tipViewer->Show(1); - UIStaticText** titles = &this->unknown_00C0; + UIStaticText** titles = &this->titleText; for (int y = 50; y < 90; y += 20) { *titles = new UIStaticText(); (*titles)->SetSize(220, 18); @@ -10567,7 +10567,7 @@ void UITipboxWnd::OnCreate(int width, int) { checkBox->SetSize(this->TextWidth(LookupMessage(MSI_ZEROCHATWND_RESIZE), 0, 0, 12, 0, 0) + 12, 14); checkBox->SetImages("유저인터페이스\\tipbox\\checkBox_check.bmp", "유저인터페이스\\tipbox\\checkBox.bmp", LookupMessage(MSI_ZEROCHATWND_RESIZE)); checkBox->Move(9, 347); - checkBox->SetChecked(this->unknown_0100); + checkBox->SetChecked(this->showAtStartup); checkBox->SetId(213); this->AddChild(checkBox); @@ -10582,7 +10582,7 @@ void UITipboxWnd::OnCreate(int width, int) { this->AddChild(closeButton); UIEditCtrl4* search = new UIEditCtrl4(); - this->unknown_00B4 = search; + this->searchEdit = search; search->SetSize(193, 15); search->maximum = 150; search->TextColor(RGB(0, 0, 0), 0xFFFFFFFF); @@ -10591,59 +10591,59 @@ void UITipboxWnd::OnCreate(int width, int) { search->SetPlaceholderColor(0xB1B1B1); search->Move(253, 22); search->Background(255, 255, 255); - this->AddChild(this->unknown_00B4); + this->AddChild(this->searchEdit); - this->unknown_00D0 = new UIBitmapButton(); - this->unknown_00D0->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 0, 0); - this->unknown_00D0->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 1, 0); - this->unknown_00D0->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 2, 0); - this->unknown_00D0->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_off.bmp", 3, 0); - this->unknown_00D0->SetSize(this->unknown_00D0->BitmapWidth(), this->unknown_00D0->BitmapHeight()); - this->unknown_00D0->Move(415, 319); - this->unknown_00D0->SetId(246); - this->AddChild(this->unknown_00D0); + this->previousButton = new UIBitmapButton(); + this->previousButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 0, 0); + this->previousButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 1, 0); + this->previousButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_on.bmp", 2, 0); + this->previousButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowL_off.bmp", 3, 0); + this->previousButton->SetSize(this->previousButton->BitmapWidth(), this->previousButton->BitmapHeight()); + this->previousButton->Move(415, 319); + this->previousButton->SetId(246); + this->AddChild(this->previousButton); - this->unknown_00D4 = new UIBitmapButton(); - this->unknown_00D4->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 0, 0); - this->unknown_00D4->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 1, 0); - this->unknown_00D4->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 2, 0); - this->unknown_00D4->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_off.bmp", 3, 0); - this->unknown_00D4->SetSize(this->unknown_00D4->BitmapWidth(), this->unknown_00D4->BitmapHeight()); - this->unknown_00D4->Move(462, 319); - this->unknown_00D4->SetId(218); - this->AddChild(this->unknown_00D4); + this->nextButton = new UIBitmapButton(); + this->nextButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 0, 0); + this->nextButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 1, 0); + this->nextButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_on.bmp", 2, 0); + this->nextButton->SetBitmap("유저인터페이스\\tipbox\\bt_arrowR_off.bmp", 3, 0); + this->nextButton->SetSize(this->nextButton->BitmapWidth(), this->nextButton->BitmapHeight()); + this->nextButton->Move(462, 319); + this->nextButton->SetId(218); + this->AddChild(this->nextButton); - this->unknown_00B8 = new UIListBoxID(); - this->unknown_00B8->Configure(250, 50, 216, 266, 0); - int* background = reinterpret_cast(this->unknown_00B8->unknown_007C); + this->searchResults = new UIListBoxID(); + this->searchResults->Configure(250, 50, 216, 266, 0); + int* background = reinterpret_cast(this->searchResults->backgroundChannels); background[0] = 240; background[1] = 240; background[2] = 240; - this->unknown_00B8->SetId(184); - this->AddChild(this->unknown_00B8); - this->unknown_00B8->Show(0); + this->searchResults->SetId(184); + this->AddChild(this->searchResults); + this->searchResults->Show(0); - this->unknown_00D8 = new UIBitmapButton(); - this->unknown_00D8->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_normal.bmp", 0, 0); - this->unknown_00D8->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_mouseon.bmp", 1, 0); - this->unknown_00D8->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_pressed.bmp", 2, 0); - this->unknown_00D8->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_disabled.bmp", 3, 0); - this->unknown_00D8->SetSize(this->unknown_00D8->BitmapWidth(), this->unknown_00D8->BitmapHeight()); - this->unknown_00D8->Move(450, 47); - this->unknown_00D8->SetId(517); - this->AddChild(this->unknown_00D8); + this->tagButton = new UIBitmapButton(); + this->tagButton->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_normal.bmp", 0, 0); + this->tagButton->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_mouseon.bmp", 1, 0); + this->tagButton->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_pressed.bmp", 2, 0); + this->tagButton->SetBitmap("유저인터페이스\\tipbox\\bt_tagcatch_disabled.bmp", 3, 0); + this->tagButton->SetSize(this->tagButton->BitmapWidth(), this->tagButton->BitmapHeight()); + this->tagButton->Move(450, 47); + this->tagButton->SetId(517); + this->AddChild(this->tagButton); this->AddCloseButton("", 0)->Move(width - 15, 3); this->RefreshTip(); if (entry.paragraphs.size() == 1) { - this->unknown_00D4->SetDisabled(1); - this->unknown_00D4->Invalidate(); - this->unknown_00D4->Invalidate(); + this->nextButton->SetDisabled(1); + this->nextButton->Invalidate(); + this->nextButton->Invalidate(); } - this->unknown_00D0->SetDisabled(1); - this->unknown_00D0->Invalidate(); - this->unknown_00D0->Invalidate(); + this->previousButton->SetDisabled(1); + this->previousButton->Invalidate(); + this->previousButton->Invalidate(); } // OFFSET: 0x008F1430 @@ -10725,7 +10725,7 @@ void UIStorePasswordInputWnd::Paint() { this->DrawEmboldenedText(110, 27, LookupMessage(MSI_STORE_PASSWORD), textColor, shadowColor, 0, 0, 12); this->FillRegion(110, 40, 100, 16, boxColor); this->FillRegion(111, 41, 98, 14, 0xFFFFFF); - if (!g_session.m_passwordInputAlternate && this->unknown_0108 == 0) { + if (!g_session.m_passwordInputAlternate && this->isChangingPassword == 0) { this->DrawEmboldenedText(110, 63, LookupMessage(MSI_STORE_NEW_PASSWORD), 0xF0F0F0, 0xE6E6E6, 0, 0, 12); this->FillRegion(110, 78, 100, 16, 0xE6E6E6); this->DrawEmboldenedText(110, 103, LookupMessage(MSI_STORE_RENEW_PASSWORD), 0xF0F0F0, 0xE6E6E6, 0, 0, 12); @@ -10755,7 +10755,7 @@ void UISecondPasswordInputWnd::ShuffleKeypad() {219, 198}, {279, 198}, {339, 198}, {219, 258}, {279, 258} }; for (int index = 0; index < 10; ++index) - unknown_0124[index]->Move(positions[digits[index]][0], positions[digits[index]][1]); + keypadButtons[index]->Move(positions[digits[index]][0], positions[digits[index]][1]); Invalidate(); } @@ -10787,24 +10787,24 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr if (message == UM_COMMAND) { switch (a) { case 419: - if (std::strlen(this->unknown_00D0) == static_cast(this->unknown_010C)) { - std::atoi(this->unknown_00D0); + if (std::strlen(this->currentPassword) == static_cast(this->passwordLength)) { + std::atoi(this->currentPassword); SecondPasswordPacket packet; packet.packetType = 0x8C3; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); + std::memcpy(packet.password, this->currentPassword, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); break; case ID_CANCEL: if (g_windowMgr.Confirm(LookupMessage(MSI_DO_YOU_REALLY_WANT_TO_QUIT), 2, true, false, 0, "Message", 280, 120, 0) == 187) { @@ -10815,109 +10815,109 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr case ID_OK: case ID_NEXT: - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: - if (std::strlen(this->unknown_00D0) == static_cast(this->unknown_010C)) { - std::atoi(this->unknown_00D0); + if (std::strlen(this->currentPassword) == static_cast(this->passwordLength)) { + std::atoi(this->currentPassword); SecondPasswordPacket packet; packet.packetType = 0x8B8; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); + std::memcpy(packet.password, this->currentPassword, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); this->Invalidate(); break; case 1: - if (std::strlen(this->unknown_00D0) == static_cast(this->unknown_010C)) { - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + if (std::strlen(this->currentPassword) == static_cast(this->passwordLength)) { + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00F4 = 1; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->activeInputY = this->currentPasswordY; + this->passwordStage = 1; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->Invalidate(); break; case 2: - if (std::strlen(this->unknown_00D9) == static_cast(this->unknown_010C)) { - this->unknown_00F4 = 3; - this->unknown_00F8 = this->unknown_0104; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + if (std::strlen(this->newPassword) == static_cast(this->passwordLength)) { + this->passwordStage = 3; + this->activeInputY = this->confirmPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 167, 98, 14, 0xFFFFFF); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); this->Invalidate(); break; case 3: - if (std::strlen(this->unknown_00E2) == static_cast(this->unknown_010C)) { - if (std::strcmp(this->unknown_00D9, this->unknown_00E2) == 0) { - std::atoi(this->unknown_00D0); - std::atoi(this->unknown_00E2); + if (std::strlen(this->confirmPassword) == static_cast(this->passwordLength)) { + if (std::strcmp(this->newPassword, this->confirmPassword) == 0) { + std::atoi(this->currentPassword); + std::atoi(this->confirmPassword); SecondPasswordChangePacket packet; packet.packetType = 0x8BE; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); - std::memcpy(packet.newPassword, this->unknown_00E2, sizeof(packet.newPassword)); + std::memcpy(packet.password, this->currentPassword, sizeof(packet.password)); + std::memcpy(packet.newPassword, this->confirmPassword, sizeof(packet.newPassword)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); } else { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_MISMATCH), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); this->FillRegion(414, 166, 100, 16, 0xFAE6C8); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); } break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 3; - this->unknown_00F8 = this->unknown_0104; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 3; + this->activeInputY = this->confirmPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 167, 98, 14, 0xFFFFFF); this->Invalidate(); break; @@ -10926,258 +10926,258 @@ int UISecondPasswordInputWnd::SendMsg(UIWindow* sender, int message, std::intptr case ID_CHANGE_STORE_PASSWORD: g_session.m_storePasswordMode = 2; - this->unknown_0108 = 1; - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); - this->unknown_0150[1]->SetDisabled(1); - this->unknown_0150[1]->Invalidate(); - this->unknown_0150[2]->SetDisabled(1); - this->unknown_0150[2]->Invalidate(); + this->isChangingPassword = 1; + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); + this->actionButtons[1]->SetDisabled(1); + this->actionButtons[1]->Invalidate(); + this->actionButtons[2]->SetDisabled(1); + this->actionButtons[2]->Invalidate(); this->Invalidate(); break; case ID_STORE_PASSWORD_NUM1: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_RETURN: this->SendMsg(this, UM_COMMAND, ID_OK, 0, 0, 0); break; case ID_STORE_PASSWORD_NUM0: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM2: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM3: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM4: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM5: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM6: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM7: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM8: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM9: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM_RESET: - if (this->unknown_00F4 == 0) { - this->unknown_00F4 = 0; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - this->unknown_00F8 = this->unknown_00FC; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + if (this->passwordStage == 0) { + this->passwordStage = 0; + this->inputDigitCount = 0; + this->maskTextX = 0; + this->activeInputY = this->currentPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); } else { - this->unknown_00EC = 0; - this->unknown_00F0 = 0; + this->inputDigitCount = 0; + this->maskTextX = 0; if (g_session.m_passwordInputAlternate) { - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); } else { - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); } } this->ShuffleKeypad(); @@ -11195,24 +11195,24 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ if (message == UM_COMMAND) { switch (a) { case 419: - if (std::strlen(this->unknown_00D0) == static_cast(this->unknown_010C)) { - std::atoi(this->unknown_00D0); + if (std::strlen(this->currentPassword) == static_cast(this->passwordLength)) { + std::atoi(this->currentPassword); SecondPasswordPacket packet; packet.packetType = 0x8C3; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); + std::memcpy(packet.password, this->currentPassword, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); break; case ID_CANCEL: if (g_windowMgr.Confirm(LookupMessage(MSI_DO_YOU_REALLY_WANT_TO_QUIT), 2, true, false, 0, "Message", 280, 120, 0) == 187) { @@ -11223,353 +11223,353 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ case ID_OK: case ID_NEXT: - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: - if (std::strlen(this->unknown_00D0) == static_cast(this->unknown_010C)) { - std::atoi(this->unknown_00D0); + if (std::strlen(this->currentPassword) == static_cast(this->passwordLength)) { + std::atoi(this->currentPassword); SecondPasswordPacket packet; packet.packetType = 0x8BC; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00D0, sizeof(packet.password)); + std::memcpy(packet.password, this->currentPassword, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 0; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->passwordStage = 0; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); break; case 1: - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); break; case 2: - if (std::strlen(this->unknown_00D9) == static_cast(this->unknown_010C)) { - this->unknown_00F4 = 3; - this->unknown_00F8 = this->unknown_0104; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + if (std::strlen(this->newPassword) == static_cast(this->passwordLength)) { + this->passwordStage = 3; + this->activeInputY = this->confirmPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 167, 98, 14, 0xFFFFFF); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); break; case 3: - if (std::strlen(this->unknown_00E2) != static_cast(this->unknown_010C)) { + if (std::strlen(this->confirmPassword) != static_cast(this->passwordLength)) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 3; - this->unknown_00F8 = this->unknown_0104; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 3; + this->activeInputY = this->confirmPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 167, 98, 14, 0xFFFFFF); break; } - if (std::strcmp(this->unknown_00D9, this->unknown_00E2) == 0) { - std::atoi(this->unknown_00D0); - std::atoi(this->unknown_00E2); + if (std::strcmp(this->newPassword, this->confirmPassword) == 0) { + std::atoi(this->currentPassword); + std::atoi(this->confirmPassword); SecondPasswordPacket packet; packet.packetType = 0x8BA; packet.accountId = g_session.m_passwordWndAccountId; - std::memcpy(packet.password, this->unknown_00E2, sizeof(packet.password)); + std::memcpy(packet.password, this->confirmPassword, sizeof(packet.password)); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); this->DisableButtons(); break; } g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_MISMATCH), 0, true, false, 0, "Message", 280, 120, 0); - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); this->FillRegion(415, 128, 98, 14, 0xFFFFFF); this->FillRegion(414, 166, 100, 16, 0xFAE6C8); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); break; } break; case ID_CHANGE_STORE_PASSWORD: g_session.m_storePasswordMode = 2; - this->unknown_0108 = 1; - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); - this->unknown_0150[1]->SetDisabled(1); - this->unknown_0150[1]->Invalidate(); - this->unknown_0150[2]->SetDisabled(1); - this->unknown_0150[2]->Invalidate(); + this->isChangingPassword = 1; + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + this->inputDigitCount = 0; + this->maskTextX = 0; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); + this->actionButtons[1]->SetDisabled(1); + this->actionButtons[1]->Invalidate(); + this->actionButtons[2]->SetDisabled(1); + this->actionButtons[2]->Invalidate(); this->Invalidate(); break; case ID_STORE_PASSWORD_NUM1: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(1), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(1), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_RETURN: this->SendMsg(this, UM_COMMAND, ID_OK, 0, 0, 0); break; case ID_STORE_PASSWORD_NUM0: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(0), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(0), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM2: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(2), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(2), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM3: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(3), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(3), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM4: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(4), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(4), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM5: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(5), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(5), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM6: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(6), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(6), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM7: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(7), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(7), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM8: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(8), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(8), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM9: - if (++this->unknown_00EC > this->unknown_010C) { + if (++this->inputDigitCount > this->passwordLength) { g_windowMgr.Confirm(LookupMessage(MSI_STORE_PASSWORD_4_6), 0, true, false, 0, "Message", 280, 120, 0); break; } - switch (this->unknown_00F4) { + switch (this->passwordStage) { case 0: case 1: - std::strcat(this->unknown_00D0, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->currentPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 2: - std::strcat(this->unknown_00D9, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->newPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; case 3: - std::strcat(this->unknown_00E2, IntToString(this->FindKeypadDigit(9), 0).c_str()); + std::strcat(this->confirmPassword, IntToString(this->FindKeypadDigit(9), 0).c_str()); break; } - this->DrawTextAt(this->unknown_00F0 + 416, this->unknown_00F8, "*", 0, 0, 12, 0, 0, 0); - this->unknown_00F0 += 5; + this->DrawTextAt(this->maskTextX + 416, this->activeInputY, "*", 0, 0, 12, 0, 0, 0); + this->maskTextX += 5; break; case ID_STORE_PASSWORD_NUM_RESET: - if (this->unknown_00F4 == 0) { - this->unknown_00F4 = 0; - this->unknown_00EC = 0; - this->unknown_00F0 = 0; - this->unknown_00F8 = this->unknown_00FC; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + if (this->passwordStage == 0) { + this->passwordStage = 0; + this->inputDigitCount = 0; + this->maskTextX = 0; + this->activeInputY = this->currentPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); } else { - this->unknown_00EC = 0; - this->unknown_00F0 = 0; + this->inputDigitCount = 0; + this->maskTextX = 0; if (g_session.m_passwordInputAlternate) { - this->unknown_00F4 = 2; - this->unknown_00F8 = this->unknown_0100; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + this->passwordStage = 2; + this->activeInputY = this->newPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); } else { - this->unknown_00F4 = 1; - this->unknown_00F8 = this->unknown_00FC; - std::memset(this->unknown_00D0, 0, sizeof(this->unknown_00D0)); - std::memset(this->unknown_00D9, 0, sizeof(this->unknown_00D9)); - std::memset(this->unknown_00E2, 0, sizeof(this->unknown_00E2)); - this->unknown_0150[0]->Enable(0); - this->unknown_0150[3]->Enable(1); + this->passwordStage = 1; + this->activeInputY = this->currentPasswordY; + std::memset(this->currentPassword, 0, sizeof(this->currentPassword)); + std::memset(this->newPassword, 0, sizeof(this->newPassword)); + std::memset(this->confirmPassword, 0, sizeof(this->confirmPassword)); + this->actionButtons[0]->Enable(0); + this->actionButtons[3]->Enable(1); } } this->ShuffleKeypad(); @@ -11586,39 +11586,39 @@ int UISecondPasswordEditWnd::SendMsg(UIWindow* sender, int message, std::intptr_ void UIEquipWnd::RefreshLook() { if (m_viewOther == 0) { - unknown_00F8[0] = g_session.GetDisplayJob(); - unknown_00F8[1] = g_session.SyncUnknown0E98(); - unknown_00F8[2] = g_session.m_head; - unknown_00F8[6] = g_session.m_bodyStyle; - unknown_00F8[7] = g_session.m_headPalette; + appearance[0] = g_session.GetDisplayJob(); + appearance[1] = g_session.SyncUnknown0E98(); + appearance[2] = g_session.m_head; + appearance[6] = g_session.m_bodyStyle; + appearance[7] = g_session.m_headPalette; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode->scene && mode->scene->player) - unknown_011C = mode->scene->player->GetBodyCostume(); + costumeJob = mode->scene->player->GetBodyCostume(); } else { - unknown_00F8[0] = g_equipWindowLook.job; - unknown_00F8[1] = g_equipWindowLook.sex; - unknown_00F8[2] = g_equipWindowLook.head; - unknown_00F8[6] = g_equipWindowLook.bodyPalette; - unknown_00F8[7] = g_equipWindowLook.headPalette; - unknown_011C = g_equipWindowLook.unknown_0024; + appearance[0] = g_equipWindowLook.job; + appearance[1] = g_equipWindowLook.sex; + appearance[2] = g_equipWindowLook.head; + appearance[6] = g_equipWindowLook.bodyPalette; + appearance[7] = g_equipWindowLook.headPalette; + costumeJob = g_equipWindowLook.unknown_0024; } - unknown_00F8[3] = 0; - unknown_00F8[4] = 0; - unknown_00F8[5] = 0; - unknown_0118 = 0; + appearance[3] = 0; + appearance[4] = 0; + appearance[5] = 0; + robeId = 0; ITEM_INFO middle = GetSlotItem(8); - if (middle.unknown_0000[1] != 0) - unknown_00F8[4] = middle.unknown_0070; + if (middle.identity[1] != 0) + appearance[4] = middle.sprite; ITEM_INFO lower = GetSlotItem(9); - if (lower.unknown_0000[1] != 0 && middle.unknown_0000[1] != lower.unknown_0000[1]) - unknown_00F8[5] = lower.unknown_0070; + if (lower.identity[1] != 0 && middle.identity[1] != lower.identity[1]) + appearance[5] = lower.sprite; ITEM_INFO upper = GetSlotItem(0); - if (upper.unknown_0000[1] != 0 && middle.unknown_0000[1] != upper.unknown_0000[1] && lower.unknown_0000[1] != upper.unknown_0000[1]) - unknown_00F8[3] = upper.unknown_0070; + if (upper.identity[1] != 0 && middle.identity[1] != upper.identity[1] && lower.identity[1] != upper.identity[1]) + appearance[3] = upper.sprite; ITEM_INFO robe(0); robe = GetSlotItem(2); - if (robe.unknown_0000[1] != 0) - unknown_0118 = robe.unknown_0070; + if (robe.identity[1] != 0) + robeId = robe.sprite; } // OFFSET: 0x008D7CC0 @@ -11659,9 +11659,9 @@ void UIBookWnd::OnProcess() { int line = this->m_autoLine; if (line >= this->m_lineCount) { this->m_autoTick = 0; - if (this->unknown_00B8 != nullptr) { - g_windowMgr.Schedule(this->unknown_00B8); - this->unknown_00B8 = nullptr; + if (this->m_balloon != nullptr) { + g_windowMgr.Schedule(this->m_balloon); + this->m_balloon = nullptr; } g_windowMgr.CloseWindow(WID_BOOKWND); return; @@ -11672,18 +11672,18 @@ void UIBookWnd::OnProcess() { } g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(this->StripColorCodes(this->m_lines[this->m_autoLine].c_str())), 0xE1E4FF, 0, 0, 0); - UIWindow* balloon = this->unknown_00B8; + UIWindow* balloon = this->m_balloon; if (balloon == nullptr) { balloon = new UITransBalloonText(); - this->unknown_00B8 = balloon; + this->m_balloon = balloon; balloon->SetSize(8, 8); - g_windowMgr.AddRenderedFront(this->unknown_00B8); - balloon = this->unknown_00B8; + g_windowMgr.AddRenderedFront(this->m_balloon); + balloon = this->m_balloon; } static_cast(balloon)->SetText(this->StripColorCodes(this->m_lines[this->m_autoLine].c_str()), 100); - this->unknown_00B8->Move((g_renderer->viewport.width - 640) / 2 - this->unknown_00B8->geometry.width / 2 + 320, 81); - static_cast(this->unknown_00B8)->m_textColor = 0xE1E4FF; - static_cast(this->unknown_00B8)->m_outlineColor = 0; + this->m_balloon->Move((g_renderer->viewport.width - 640) / 2 - this->m_balloon->geometry.width / 2 + 320, 81); + static_cast(this->m_balloon)->m_textColor = 0xE1E4FF; + static_cast(this->m_balloon)->m_outlineColor = 0; ++this->m_autoLine; this->m_autoTick = timeGetTime(); } @@ -11734,7 +11734,7 @@ int UIFrameWnd::BuildItemName( } }; const auto isEquipment = [&]() { - switch (item->unknown_0000[0]) { + switch (item->identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -11758,18 +11758,18 @@ int UIFrameWnd::BuildItemName( } int cards[4]; - std::memcpy(cards, item->unknown_001C, sizeof(cards)); - if (item->unknown_0000[0] == 4 && item->IsApprenticeItem() == true && cards[3] == 1) { + std::memcpy(cards, item->cards, sizeof(cards)); + if (item->identity[0] == 4 && item->IsApprenticeItem() == true && cards[3] == 1) { *cursor += item->Apprentice(*cursor, capacity, 1); breaks->push_back(*cursor); } if (cards[0] == 254 && cards[1] == 0) { - if (item->unknown_0060 > 0) { + if (item->refiningLevel > 0) { *cursor += item->Refine(*cursor, capacity, 1); breaks->push_back(*cursor); } - if (item->unknown_0088 > 0) { + if (item->grade > 0) { *cursor += item->Grade(*cursor, capacity, 1); breaks->push_back(*cursor); } @@ -11812,11 +11812,11 @@ int UIFrameWnd::BuildItemName( return 1; } - if (item->unknown_0060 > 0) { + if (item->refiningLevel > 0) { *cursor += item->Refine(*cursor, capacity, 1); breaks->push_back(*cursor); } - if (item->unknown_0088 > 0) { + if (item->grade > 0) { *cursor += item->Grade(*cursor, capacity, 1); breaks->push_back(*cursor); } @@ -11948,7 +11948,7 @@ bool UIItemCollectionWnd::WrapText(std::string text, int width, std::list(LookupMessage(MSI_UNEQUIP_ARROW2)), 0x64FFFF, 0, 0, 0); return 0; } @@ -11972,8 +11972,8 @@ int UIChooseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in switch (a) { case ID_OK: { const std::uint32_t tick = GetTickCount(); - if (tick - *reinterpret_cast(&g_session.unknown_5490[0x04]) >= 300) { - *reinterpret_cast(&g_session.unknown_5490[0x04]) = tick; + if (tick - *reinterpret_cast(&g_session.itemSendState[0x04]) >= 300) { + *reinterpret_cast(&g_session.itemSendState[0x04]) = tick; if (this->m_items.empty()) { this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); return 0; @@ -12044,8 +12044,8 @@ int UIChooseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in break; } } - if (g_windowMgr.unknown_01F0 != nullptr) { - g_windowMgr.unknown_01F0->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); + if (g_windowMgr.sayDialogWnd != nullptr) { + g_windowMgr.sayDialogWnd->SendMsg(nullptr, UM_DISABLENEXTBUTTON, 0, 0, 0, 0); } } return 0; @@ -12100,7 +12100,7 @@ int UIChoose3Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i // FUNCTION: fn_12103 void UITipboxWnd::Search(std::string& keyword) { const std::vector& results = g_itemTagOwner->Search(keyword); - this->unknown_00B8->Clear(); + this->searchResults->Clear(); for (const int id : results) { const std::string& source = g_itemTagOwner->GetTip(id).title; std::string title(source.c_str(), source.size()); @@ -12109,10 +12109,10 @@ void UITipboxWnd::Search(std::string& keyword) { title = title.substr(0, separator); } if (title.size() != 0) { - this->unknown_00B8->AddLine(title.c_str(), id); + this->searchResults->AddLine(title.c_str(), id); } } - this->unknown_00B8->Invalidate(); + this->searchResults->Invalidate(); } // OFFSET: 0x008D9FE0 @@ -12120,16 +12120,16 @@ void UITipboxWnd::Search(std::string& keyword) { void UITipboxWnd::RefreshTip() { this->UpdatePageText(); this->BuildAnimations(); - this->unknown_00B8->Show(0); + this->searchResults->Show(0); std::string title(g_itemTagOwner->m_currentEntry.title.c_str(), g_itemTagOwner->m_currentEntry.title.size()); this->TrimAt(title, "#"); - this->unknown_00D8->Enable(g_itemTagOwner->m_currentEntry.searchable); + this->tagButton->Enable(g_itemTagOwner->m_currentEntry.searchable); std::vector lines; WrapPlainText(title.c_str(), lines, 30); - UIStaticText* const texts[2] = {this->unknown_00C0, this->unknown_00C4}; + UIStaticText* const texts[2] = {this->titleText, this->subtitleText}; for (int index = 0; index < 2; ++index) { texts[index]->SetText("", 0); texts[index]->Show(0); @@ -12145,14 +12145,14 @@ void UITipboxWnd::RefreshTip() { int height; if (count < 2) { - this->unknown_00BC->Move(250, 70); + this->tipViewer->Move(250, 70); height = 245; } else { - this->unknown_00BC->Move(250, 90); + this->tipViewer->Move(250, 90); height = 225; } - this->unknown_00BC->Resize(226, height); - this->unknown_00FC = true; + this->tipViewer->Resize(226, height); + this->refreshPending = true; } } @@ -12166,39 +12166,39 @@ int UITipboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in switch (a) { case ID_CHECK: { DWORD disposition = 0; - this->unknown_0100 = static_cast(b); + this->showAtStartup = static_cast(b); g_window315Enabled = static_cast(b); HKEY key; if (RegCreateKeyExA(HKEY_LOCAL_MACHINE, g_subKey, 0, nullptr, 0, KEY_ALL_ACCESS, nullptr, &key, &disposition) == ERROR_SUCCESS) { - RegSetValueExA(key, "SHOWTIPSATSTARTUP", 0, REG_DWORD, reinterpret_cast(&this->unknown_0100), 4); + RegSetValueExA(key, "SHOWTIPSATSTARTUP", 0, REG_DWORD, reinterpret_cast(&this->showAtStartup), 4); RegCloseKey(key); } break; } case ID_NEXT: { - const int page = (std::max)(0, g_itemTagOwner->unknown_00B4); - g_itemTagOwner->unknown_00B4 = page + 1; + const int page = (std::max)(0, g_itemTagOwner->paragraphIndex); + g_itemTagOwner->paragraphIndex = page + 1; if (g_itemTagOwner->IsLastTip() == true) { - this->unknown_00D4->SetDisabled(1); - this->unknown_00D4->Invalidate(); - this->unknown_00D4->Invalidate(); + this->nextButton->SetDisabled(1); + this->nextButton->Invalidate(); + this->nextButton->Invalidate(); } - this->unknown_00D0->SetDisabled(0); - this->unknown_00D0->Invalidate(); - this->unknown_00D0->Invalidate(); + this->previousButton->SetDisabled(0); + this->previousButton->Invalidate(); + this->previousButton->Invalidate(); this->RefreshTip(); break; } case ID_OK: - this->unknown_00D0->Enable(1); - this->unknown_00D4->Enable(1); - g_itemTagOwner->SelectTip(this->unknown_00B8->lines[this->unknown_00B8->selected].id); - this->unknown_00D4->SetDisabled(g_itemTagOwner->IsLastTip() == true ? 1 : 0); - this->unknown_00D4->Invalidate(); - this->unknown_00D4->Invalidate(); - this->unknown_00D0->SetDisabled(1); - this->unknown_00D0->Invalidate(); - this->unknown_00D0->Invalidate(); + this->previousButton->Enable(1); + this->nextButton->Enable(1); + g_itemTagOwner->SelectTip(this->searchResults->lines[this->searchResults->selected].id); + this->nextButton->SetDisabled(g_itemTagOwner->IsLastTip() == true ? 1 : 0); + this->nextButton->Invalidate(); + this->nextButton->Invalidate(); + this->previousButton->SetDisabled(1); + this->previousButton->Invalidate(); + this->previousButton->Invalidate(); this->RefreshTip(); this->BuildAnimations(); break; @@ -12206,15 +12206,15 @@ int UITipboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in g_windowMgr.CloseWindow(WID_TIPBOXWND); break; case ID_PREV: { - const int page = (std::max)(0, g_itemTagOwner->unknown_00B4); - g_itemTagOwner->unknown_00B4 = page - 1; - this->unknown_00D4->SetDisabled(0); - this->unknown_00D4->Invalidate(); - this->unknown_00D4->Invalidate(); + const int page = (std::max)(0, g_itemTagOwner->paragraphIndex); + g_itemTagOwner->paragraphIndex = page - 1; + this->nextButton->SetDisabled(0); + this->nextButton->Invalidate(); + this->nextButton->Invalidate(); if (page == 1) { - this->unknown_00D0->SetDisabled(1); - this->unknown_00D0->Invalidate(); - this->unknown_00D0->Invalidate(); + this->previousButton->SetDisabled(1); + this->previousButton->Invalidate(); + this->previousButton->Invalidate(); } this->RefreshTip(); break; @@ -12223,13 +12223,13 @@ int UITipboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in if (!g_windowMgr.GetHoverWindow()) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NAVIGATION_RS_REFAILTARGETROUTE)), 0xFF, 0, 0, 0); } else { - const int id = g_itemTagOwner->unknown_0114; + const int id = g_itemTagOwner->currentTipId; switch (g_windowMgr.GetHoverWindow()->geometry.id) { case 0x1EC: - static_cast(g_windowMgr.unknown_0318)->InsertSkillTag(id); + static_cast(g_windowMgr.npcTextEditDialogWnd)->InsertSkillTag(id); break; case 0x1EB: - static_cast(g_windowMgr.unknown_0458)->InsertSkillTag(id); + static_cast(g_windowMgr.rodexComposeWnd)->InsertSkillTag(id); break; case 0x1EA: case 0x1ED: @@ -12240,34 +12240,34 @@ int UITipboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } break; case 0x16D: { - std::string keyword(this->unknown_00B4->Text()); + std::string keyword(this->searchEdit->Text()); if (keyword.size() != 0) { - this->unknown_00B8->Show(1); - this->unknown_00B8->Clear(); - this->unknown_00BC->Clear(); - UIStaticText* const texts[2] = {this->unknown_00C0, this->unknown_00C4}; + this->searchResults->Show(1); + this->searchResults->Clear(); + this->tipViewer->Clear(); + UIStaticText* const texts[2] = {this->titleText, this->subtitleText}; for (int index = 0; index < 2; ++index) { texts[index]->SetText("", 0); } this->m_pageText->SetText("", 0); this->m_pageTotalText->SetText("", 0); - this->unknown_00D0->Enable(0); - this->unknown_00D4->Enable(0); - this->unknown_00B4->SetText(""); + this->previousButton->Enable(0); + this->nextButton->Enable(0); + this->searchEdit->SetText(""); this->m_animations.clear(); this->m_dots.clear(); this->Search(keyword); - this->unknown_00D8->Enable(0); + this->tagButton->Enable(0); } break; } case 0x21F: - this->unknown_00D4->SetDisabled(g_itemTagOwner->IsLastTip() == true ? 1 : 0); - this->unknown_00D4->Invalidate(); - this->unknown_00D4->Invalidate(); - this->unknown_00D0->SetDisabled(1); - this->unknown_00D0->Invalidate(); - this->unknown_00D0->Invalidate(); + this->nextButton->SetDisabled(g_itemTagOwner->IsLastTip() == true ? 1 : 0); + this->nextButton->Invalidate(); + this->nextButton->Invalidate(); + this->previousButton->SetDisabled(1); + this->previousButton->Invalidate(); + this->previousButton->Invalidate(); this->RefreshTip(); this->BuildAnimations(); break; @@ -12437,13 +12437,13 @@ void UIExchangeWnd::Paint() { this->DrawTextAt(13, 4, title, 0, 0, 12, 0xFFFFFF, 0, 0); this->DrawTextAt(12, 3, title, 0, 0, 12, 0, 0, 0); char partner[128]; - if (this->unknown_0108 < 1) { - std::sprintf(partner, "%s", this->unknown_00F0.c_str()); + if (this->partnerId < 1) { + std::sprintf(partner, "%s", this->partnerName.c_str()); } else if (g_serviceType == 6) { - std::sprintf(partner, "%s Lv%d", this->unknown_00F0.c_str(), this->unknown_010C); + std::sprintf(partner, "%s Lv%d", this->partnerName.c_str(), this->partnerLevel); } else { - const std::string identifier = ShortcutFilename(this->unknown_0108); - std::sprintf(partner, "%s Lv%d (%s)", this->unknown_00F0.c_str(), this->unknown_010C, identifier.c_str()); + const std::string identifier = ShortcutFilename(this->partnerId); + std::sprintf(partner, "%s Lv%d (%s)", this->partnerName.c_str(), this->partnerLevel, identifier.c_str()); } this->DrawTextAt(63, 4, partner, 0, 0, 12, 0xB4B4B4, 0, 0); this->DrawTextAt(62, 3, partner, 0, 0, 12, 0, 0, 0); @@ -12463,24 +12463,24 @@ void UIExchangeWnd::Paint() { unsigned red; unsigned green; unsigned blue; - if (this->unknown_00CC != 0) { + if (this->isLocalTrader != 0) { SkinPaletteChannels(ResourceMgr::Instance(), 10, 6, red, green, blue); this->FillRegion(4, 21, 272, 310, RGB(red, green, blue)); } - if (this->unknown_00D0 != 0) { + if (this->localConfirmed != 0) { SkinPaletteChannels(ResourceMgr::Instance(), 10, 6, red, green, blue); this->FillRegion(283, 21, 272, 310, RGB(red, green, blue)); } int row = 0; for (const ITEM_INFO& item : this->m_myItems) { - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) != 0 && item.unknown_005D != 0) { + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) != 0 && item.damaged != 0) { continue; } const int y = this->m_rowHeight * row; DrawItemWithQuantity(*this, ResourceMgr::Instance(), 16, y + 21, item, 0, 0); this->DrawFittedItemName(48, y + 29, &item, 0, 0, 12, 1); - if (item.unknown_0088 > 0) { - const std::string path = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088); + if (item.grade > 0) { + const std::string path = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade); bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); this->DrawBitmap(16, y + 33, bitmap, true); } @@ -12491,14 +12491,14 @@ void UIExchangeWnd::Paint() { } row = 0; for (const ITEM_INFO& item : this->m_otherItems) { - if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) != 0 && item.unknown_005D != 0) { + if (g_session.IsPetEgg(std::atoi(item.itemId.c_str())) != 0 && item.damaged != 0) { continue; } const int y = this->m_rowHeight * row; DrawItemWithQuantity(*this, ResourceMgr::Instance(), 295, y + 21, item, 0, 0); this->DrawFittedItemName(327, y + 29, &item, 0, 0, 12, 1); - if (item.unknown_0088 > 0) { - const std::string path = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088); + if (item.grade > 0) { + const std::string path = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade); bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); this->DrawBitmap(295, y + 33, bitmap, true); } @@ -12509,13 +12509,13 @@ void UIExchangeWnd::Paint() { } char grouped[32]; char amount[128]; - int length = std::sprintf(amount, "%s", FormatGroupedInteger(g_session.unknown_5210, grouped, sizeof(grouped))); - PriceColors colors = PriceColor(g_session.unknown_5210); + int length = std::sprintf(amount, "%s", FormatGroupedInteger(g_session.exchangeMoney, grouped, sizeof(grouped))); + PriceColors colors = PriceColor(g_session.exchangeMoney); this->DrawRightAlignedText(219, 331, amount, length, 1, 16, colors.primary & 0xFFFFFF, 0); this->DrawRightAlignedText(220, 331, amount, length, 1, 16, colors.primary & 0xFFFFFF, 0); this->DrawRightAlignedText(220, 332, amount, length, 1, 16, 0x323232, 0); - length = std::sprintf(amount, "%s", FormatGroupedInteger(g_session.unknown_5214, grouped, sizeof(grouped))); - colors = PriceColor(g_session.unknown_5214); + length = std::sprintf(amount, "%s", FormatGroupedInteger(g_session.otherExchangeMoney, grouped, sizeof(grouped))); + colors = PriceColor(g_session.otherExchangeMoney); this->DrawRightAlignedText(499, 331, amount, length, 1, 16, colors.primary & 0xFFFFFF, 0); this->DrawRightAlignedText(500, 331, amount, length, 1, 16, colors.primary & 0xFFFFFF, 0); this->DrawRightAlignedText(500, 332, amount, length, 1, 16, 0x323232, 0); @@ -12586,12 +12586,12 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar return 0; case UM_ITEMEXPLANATION: { const ITEM_INFO* item = reinterpret_cast(argument1); - if (item->itemId == this->m_item.itemId && item->unknown_0060 == this->m_item.unknown_0060 && - std::memcmp(item->unknown_001C, this->m_item.unknown_001C, sizeof(item->unknown_001C)) == 0 && argument2 == 0) { + if (item->itemId == this->m_item.itemId && item->refiningLevel == this->m_item.refiningLevel && + std::memcmp(item->cards, this->m_item.cards, sizeof(item->cards)) == 0 && argument2 == 0) { g_windowMgr.CloseWindow(this->m_kind); return 0; } - this->unknown_0218 = -1; + this->m_petLevel = -1; g_session.IsPetEgg(std::atoi(item->itemId.c_str())); this->m_item = *item; this->m_helpButton->Enable(NEO_PACKAGEITEM::CPaidPackageItemMgr::GetInstance()->IsPaidItem(std::atoi(this->m_item.itemId.c_str()))); @@ -12602,8 +12602,8 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar this->m_cardTexts.clear(); this->m_extraHeight = 0; if (this->m_item.identified == 1) { - const PackedItemOption* options = reinterpret_cast(this->m_item.unknown_009C); - for (int index = 0; index < this->m_item.unknown_0098; ++index) { + const PackedItemOption* options = reinterpret_cast(this->m_item.options); + for (int index = 0; index < this->m_item.optionCount; ++index) { const PackedItemOption& option = options[index]; if (option.id == 0) { continue; @@ -12625,9 +12625,9 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar this->m_extraHeight += static_cast(card->second.size()) * 15 + 14; } } - this->m_item.unknown_0068 = item->unknown_0068; + this->m_item.expireTime = item->expireTime; this->m_compare = this->m_item.identified == 1 && !this->m_item.IsApprenticeItem() && Equipment(this->m_item); - this->unknown_01FC = this->m_item.unknown_0098; + this->m_optionCount = this->m_item.optionCount; if (this->m_compare) { if (this->geometry.height != 144) { this->SetHeight(this->m_extraHeight + 149); @@ -12637,7 +12637,7 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar this->SetHeight(this->m_extraHeight + 120); this->RefreshSnap(); } - this->unknown_01C4 = "유저인터페이스\\collection\\" + std::string(ItemResourcePath(this->m_item)) + ".bmp"; + this->m_bitmapName = "유저인터페이스\\collection\\" + std::string(ItemResourcePath(this->m_item)) + ".bmp"; const std::vector& descriptions = this->m_item.Description(); this->m_viewButton->Move(6, argument2 != 0 ? -100 : IsItemCard(std::atoi(this->m_item.itemId.c_str())) * 100 - 94); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -12647,18 +12647,18 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar this->m_readButtons[index]->Move(this->m_readButtons[index]->FrameWidth(0, 0) * index + 6, y); } if (IsBookItem(std::atoi(this->m_item.itemId.c_str()))) { - this->m_readButtons[1]->unknown_00C4 = 1; + this->m_readButtons[1]->animate = 1; this->m_previewTick = timeGetTime(); } else { - this->m_readButtons[1]->unknown_00C4 = 0; + this->m_readButtons[1]->animate = 0; this->m_previewTick = 0; } } this->m_viewer->Clear(); char text[260]; - if (this->m_item.unknown_0068 != 0) { + if (this->m_item.expireTime != 0) { char date[128]; - std::strftime(date, sizeof(date), LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&this->m_item.unknown_0068))); + std::strftime(date, sizeof(date), LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&this->m_item.expireTime))); int color = 32; std::memset(text, 0, sizeof(text)); if (g_inlineCharset) { @@ -12670,8 +12670,8 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar color = 24; } } - if (this->m_item.unknown_0066) { - const int hours = static_cast(this->m_item.unknown_0068); + if (this->m_item.durationInHours) { + const int hours = static_cast(this->m_item.expireTime); StringFormat(text, sizeof(text), static_cast(-1), LookupMessage(MSI_JOB_IMPERIAL_GUARD), hours / 24, hours % 24); } this->m_viewer->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(text), color, 0, 0); @@ -12686,7 +12686,7 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar } if (g_session.IsPetEgg(std::atoi(item->itemId.c_str())) == 1) { std::string state; - const int* cards = reinterpret_cast(item->unknown_001C); + const int* cards = reinterpret_cast(item->cards); switch (cards[2]) { case 1: state = FormatOwnedString(LookupMessage(MSI_PARTYMASTER), LookupMessage(MSI_VERY_AWKWARD)); @@ -12717,8 +12717,8 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar } this->Invalidate(); g_windowMgr.Promote(this); - if (argument2 != 0 && g_windowMgr.unknown_022C) { - g_windowMgr.unknown_022C->SendMsg(nullptr, UM_PARAM, reinterpret_cast(this->m_item.itemId.c_str()), this->m_item.identified, 0, 0); + if (argument2 != 0 && g_windowMgr.itemParamChangeDisplayWnd) { + g_windowMgr.itemParamChangeDisplayWnd->SendMsg(nullptr, UM_PARAM, reinterpret_cast(this->m_item.itemId.c_str()), this->m_item.identified, 0, 0); } if (this->m_kind == 12) { ITEM_INFO* equipped = g_session.GetEquippedItem(&this->m_item); @@ -12749,11 +12749,11 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar this->SetHeight(this->geometry.height + (lineCount * 9 - 36) * 2); } } - if (this->unknown_023C) { - this->RemoveChild(this->unknown_023C, 1); - this->unknown_023C = nullptr; + if (this->m_withdrawButton) { + this->RemoveChild(this->m_withdrawButton, 1); + this->m_withdrawButton = nullptr; } - switch (item->unknown_0000[2]) { + switch (item->identity[2]) { case EQP_HEAD_LOW: case EQP_GARMENT: case EQP_HEAD_TOP: @@ -12774,7 +12774,7 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar default: return 0; } - if (item->identified == 0 || item->unknown_0070 == 0) { + if (item->identified == 0 || item->sprite == 0) { return 0; } bool effectHat = false; @@ -12782,12 +12782,12 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar if (effectHat == true) { return 0; } - this->unknown_023C = new UIBasicButton(); - this->unknown_023C->Configure(77, LookupMessage(MSI_WITHDRAWAL)); - this->unknown_023C->Move(9, 117); - this->unknown_023C->SetId(354); - this->unknown_023C->invalidateParent = 1; - this->AddChild(this->unknown_023C); + this->m_withdrawButton = new UIBasicButton(); + this->m_withdrawButton->Configure(77, LookupMessage(MSI_WITHDRAWAL)); + this->m_withdrawButton->Move(9, 117); + this->m_withdrawButton->SetId(354); + this->m_withdrawButton->invalidateParent = 1; + this->AddChild(this->m_withdrawButton); if (this->geometry.height < 172) { this->SetHeight(172); } @@ -12798,25 +12798,25 @@ int UIItemCollectionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ar const std::vector& descriptions = this->m_item.Description(); std::vector lines; std::string text; - if (this->unknown_0218 != -1) { - text = reinterpret_cast(this->unknown_021E); + if (this->m_petLevel != -1) { + text = reinterpret_cast(this->m_petName); lines.push_back(text); - text = this->unknown_0238 != 0 ? "이름 변경됨" : "이름 변경되지않음"; + text = this->m_petRenamed != 0 ? "이름 변경됨" : "이름 변경되지않음"; lines.push_back(text); char buffer[64]; - _itoa(this->unknown_0218, buffer, 10); + _itoa(this->m_petLevel, buffer, 10); text = "레벨 : "; text += buffer; lines.push_back(text); - g_session.GetPetHungryStateString(this->unknown_021A, buffer); + g_session.GetPetHungryStateString(this->m_petHunger, buffer); text = "만복도 : "; text += buffer; lines.push_back(text); - g_session.GetPetFriendlyStateString(this->unknown_021C, buffer); + g_session.GetPetFriendlyStateString(this->m_petFriendly, buffer); text = "친밀도 : "; text += buffer; lines.push_back(text); - text = this->unknown_0236 != 0 ? "악세사리 : 장착됨" : "악세사리 : 장착안됨"; + text = this->m_petAccessory != 0 ? "악세사리 : 장착됨" : "악세사리 : 장착안됨"; lines.push_back(text); } for (unsigned index = 0; index < descriptions.size(); ++index) { diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.cpp b/Source/UI/AdventureGuide/UIAdventureGuide.cpp index f9c31c2cf..803999844 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.cpp +++ b/Source/UI/AdventureGuide/UIAdventureGuide.cpp @@ -516,7 +516,7 @@ void CUIAdventureGuide::OnClose() { // OFFSET: 0x009C14F0 // FUNCTION: fn_13991 void CUIAdventureGuide::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->Resize(750, 468); this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); this->OnCreate(this->geometry.width, this->geometry.height); @@ -553,31 +553,31 @@ void CUIIntro::OnSelectContents(CUITabInfo*, const Guide_Intro::Contents&) { // FUNCTION: fn_14318 void CUIItem::OnSelectItem(CUIItemInfo* item, const CItemData&) { if (item) { - this->unknown_008C = item->unknown_0108; + this->navigationTarget = item->description; } - const bool selected = !this->unknown_008C.empty(); - this->unknown_0084->Show(selected); - this->unknown_0088->Show(selected); + const bool selected = !this->navigationTarget.empty(); + this->findButton->Show(selected); + this->navigationButton->Show(selected); } // OFFSET: 0x009DC270 // FUNCTION: fn_14319 void CUIMonster::OnSelectMonster(CUIMonsterInfo* item, const CMonsterData&) { if (item) { - this->unknown_0088 = item->unknown_00E8->unknown_0098; + this->navigationTarget = item->nameText->displayText; } - this->unknown_0084->Show(!this->unknown_0088.empty()); + this->navigationButton->Show(!this->navigationTarget.empty()); } // OFFSET: 0x009DC2C0 // FUNCTION: fn_14320 void CUIQuest::OnSelectQuest(CUIQuestInfo* item, const CQuestInfo&) { if (item) { - this->unknown_008C = item->unknown_00F8; + this->navigationTarget = item->title; } - const bool selected = !this->unknown_008C.empty(); - this->unknown_0084->Show(selected); - this->unknown_0088->Show(selected); + const bool selected = !this->navigationTarget.empty(); + this->findButton->Show(selected); + this->navigationButton->Show(selected); } // OFFSET: 0x009DC320 @@ -594,11 +594,11 @@ void CUIItem::BindItem(CUIItemInfo* item, const CItemData& data) { item->image->SetImage(image); reinterpret_cast(item)->SetStatusLines(data.first, data.second, data.third); item->SetDescription(data.type, info.Description()); - reinterpret_cast(item->unknown_00F8)->Clear(); + reinterpret_cast(item->sourcesViewer)->Clear(); for (const std::string& value : data.values) { - reinterpret_cast(item->unknown_00F8)->AddLine(value); + reinterpret_cast(item->sourcesViewer)->AddLine(value); } - item->unknown_0108 = data.text; + item->description = data.text; } // OFFSET: 0x009DC770 @@ -608,27 +608,27 @@ void __stdcall BindQuestInfo(CUIQuestInfo* owner, const CQuestInfo& data) { case 1: owner->SetTitle(data.id); owner->SetViewerLines(data.rewards); - owner->unknown_00F8 = data.title; - reinterpret_cast(owner->unknown_00F4)->Clear(); - reinterpret_cast(owner->unknown_00F4)->AddLine(data.text); + owner->title = data.title; + reinterpret_cast(owner->statusViewer)->Clear(); + reinterpret_cast(owner->statusViewer)->AddLine(data.text); owner->questId = data.questId; - owner->unknown_00E8->Show(g_renewQuestMgr->IsNewQuest(data.questId)); + owner->stampImage->Show(g_renewQuestMgr->IsNewQuest(data.questId)); break; case 3: owner->SetTitle(data.id); owner->SetViewerLines(data.rewards); - owner->unknown_00F8 = data.title; - reinterpret_cast(owner->unknown_00F4)->Clear(); - reinterpret_cast(owner->unknown_00F4)->AddLine(data.text); - owner->unknown_00E8->Show(0); + owner->title = data.title; + reinterpret_cast(owner->statusViewer)->Clear(); + reinterpret_cast(owner->statusViewer)->AddLine(data.text); + owner->stampImage->Show(0); return; case 4: owner->SetTip(data.id); owner->SetViewerLines(data.rewards); - owner->unknown_00F8 = data.title; - reinterpret_cast(owner->unknown_00F4)->Clear(); - reinterpret_cast(owner->unknown_00F4)->AddLine(data.text); - owner->unknown_00E8->Show(0); + owner->title = data.title; + reinterpret_cast(owner->statusViewer)->Clear(); + reinterpret_cast(owner->statusViewer)->AddLine(data.text); + owner->stampImage->Show(0); return; } } @@ -660,8 +660,8 @@ void CUIQuest::Paint() { // OFFSET: 0x009DCFF0 // FUNCTION: fn_14331 void CUIIntro::OnInit() { - const std::string& title = g_adventureGuideMgr->unknown_0014; - const std::map& texts = g_adventureGuideMgr->unknown_002C; + const std::string& title = g_adventureGuideMgr->introTitle; + const std::map& texts = g_adventureGuideMgr->introTexts; if (texts.empty()) { return; } @@ -688,15 +688,15 @@ void CUIQuest::OnInit() { // OFFSET: 0x009DD1D0 // FUNCTION: fn_14334 void CUIItemInfo::OnInit() { - this->unknown_00F0->scrollBar->SetHidden(1); - this->unknown_00F4->scrollBar->SetHidden(1); - this->unknown_00F8->scrollBar->SetHidden(1); + this->descriptionViewer->scrollBar->SetHidden(1); + this->optionsViewer->scrollBar->SetHidden(1); + this->sourcesViewer->scrollBar->SetHidden(1); } // OFFSET: 0x009DEF40 // FUNCTION: fn_14358 void CUIItemInfo::SetDescription(int type, const std::vector& description) { - reinterpret_cast(this->unknown_00F0)->Clear(); + reinterpret_cast(this->descriptionViewer)->Clear(); if (type == 5) { this->type = 5; @@ -721,7 +721,7 @@ void CUIItemInfo::SetDescription(int type, const std::vector& descr std::regex_search(text.c_str(), text.c_str() + text.size(), match, pattern); while (!match.empty()) { std::string line = match.prefix().str() + match[0].str(); - reinterpret_cast(this->unknown_00F0)->AddLine(line); + reinterpret_cast(this->descriptionViewer)->AddLine(line); ++lines; text = match.suffix().str(); text.erase(0, text.find_first_not_of(" \r\n\t\v\f")); @@ -747,19 +747,19 @@ void CUIMonster::OnInit() { // OFFSET: 0x009DD680 // FUNCTION: fn_14337 void CUIMonsterInfo::OnInit() { - this->unknown_00EC->scrollBar->SetHidden(1); - this->unknown_00F0->scrollBar->SetHidden(1); + this->detailsViewer->scrollBar->SetHidden(1); + this->valuesViewer->scrollBar->SetHidden(1); } // OFFSET: 0x009DD6C0 // FUNCTION: fn_14339 void CUIQuestInfo::OnInit() { - this->unknown_00EC->scrollBar->SetHidden(1); - CUIVScrollBar* first = this->unknown_00EC->scrollBar; + this->titleViewer->scrollBar->SetHidden(1); + CUIVScrollBar* first = this->titleViewer->scrollBar; first->dragging = 0; first->Invalidate(); - this->unknown_00F0->scrollBar->SetHidden(1); - CUIVScrollBar* last = this->unknown_00F4->scrollBar; + this->linesViewer->scrollBar->SetHidden(1); + CUIVScrollBar* last = this->statusViewer->scrollBar; last->dragging = 1; last->Invalidate(); } @@ -767,7 +767,7 @@ void CUIQuestInfo::OnInit() { // OFFSET: 0x009DD720 // FUNCTION: fn_14340 void CUISubTab::OnInit() { - this->unknown_00EC->Show(0); + this->stampImage->Show(0); } // OFFSET: 0x009DD730 @@ -783,18 +783,18 @@ void CUITabInfo::OnInit() { // OFFSET: 0x009DC0F0 // FUNCTION: fn_14316 void CUIIntro::BindContents(CUITabInfo* item, const Guide_Intro::Contents& contents) { - item->unknown_00E8->SetText(contents.first); - item->unknown_00EC->SetText(contents.second); + item->titleText->SetText(contents.first); + item->descriptionText->SetText(contents.second); } // OFFSET: 0x009E0350 // FUNCTION: fn_14361 void CUIQuestInfo::SetTitle(int id) { - reinterpret_cast(this->unknown_00EC)->Clear(); + reinterpret_cast(this->titleViewer)->Clear(); const TipBoxEntry& entry = g_itemTagOwner->GetTip(id); if (entry.title.empty() || entry.paragraphs.empty()) { - reinterpret_cast(this->unknown_00EC)->AddLine(std::to_string(id)); + reinterpret_cast(this->titleViewer)->AddLine(std::to_string(id)); return; } @@ -808,8 +808,8 @@ void CUIQuestInfo::SetTitle(int id) { text.erase(0, text.find_first_not_of(whitespace)); text.erase(text.find_last_not_of(whitespace) + 1); - reinterpret_cast(this->unknown_00EC)->SetBold(1); - reinterpret_cast(this->unknown_00EC)->AddLine(text); + reinterpret_cast(this->titleViewer)->SetBold(1); + reinterpret_cast(this->titleViewer)->AddLine(text); text = entry.paragraphs[0]; std::regex_search(text.c_str(), text.c_str() + text.size(), match, std::regex("\n")); @@ -819,43 +819,43 @@ void CUIQuestInfo::SetTitle(int id) { text.erase(0, text.find_first_not_of(whitespace)); text.erase(text.find_last_not_of(whitespace) + 1); - reinterpret_cast(this->unknown_00EC)->SetBold(0); - reinterpret_cast(this->unknown_00EC)->AddLine(text); + reinterpret_cast(this->titleViewer)->SetBold(0); + reinterpret_cast(this->titleViewer)->AddLine(text); } // OFFSET: 0x009DFAD0 // FUNCTION: fn_14359 void CUIQuestInfo::SetStatusLines(bool first, bool second, bool third) { - reinterpret_cast(this->unknown_00F4)->Clear(); + reinterpret_cast(this->statusViewer)->Clear(); if (first == true) { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0xC86464u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_ENCHANT_IMPOSSIBLE))); + reinterpret_cast(this->statusViewer)->SetTextColor(0xC86464u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_ENCHANT_IMPOSSIBLE))); } else { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0x6464C8u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_GRADE_ENCHANT_POSSIBLE))); + reinterpret_cast(this->statusViewer)->SetTextColor(0x6464C8u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_GRADE_ENCHANT_POSSIBLE))); } if (second == true) { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0xC86464u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_GRADE_ENCHANT_IMPOSSIBLE))); + reinterpret_cast(this->statusViewer)->SetTextColor(0xC86464u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_GRADE_ENCHANT_IMPOSSIBLE))); } else { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0x6464C8u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_EQUIP_OUT))); + reinterpret_cast(this->statusViewer)->SetTextColor(0x6464C8u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_EQUIP_OUT))); } if (third == true) { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0xC86464u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_EQUIP_NOTPUT))); + reinterpret_cast(this->statusViewer)->SetTextColor(0xC86464u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_EQUIP_NOTPUT))); } else { - reinterpret_cast(this->unknown_00F4)->SetTextColor(0x6464C8u); - reinterpret_cast(this->unknown_00F4)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_RUNESET_TITLE))); + reinterpret_cast(this->statusViewer)->SetTextColor(0x6464C8u); + reinterpret_cast(this->statusViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_RUNESYSTEM_RUNESET_TITLE))); } } // OFFSET: 0x009E07B0 // FUNCTION: fn_14362 void CUIQuestInfo::SetViewerLines(const std::vector& lines) { - reinterpret_cast(this->unknown_00F0)->Clear(); + reinterpret_cast(this->linesViewer)->Clear(); for (const std::string& line : lines) { - reinterpret_cast(this->unknown_00F0)->AddLine(line); + reinterpret_cast(this->linesViewer)->AddLine(line); } } @@ -874,25 +874,25 @@ void CUIItem::LoadPage(int type, int id) { for (const auto& [key, entry] : entries) { CItemData data; data.id = key; - data.first = entry.unknown_0000; - data.second = entry.unknown_0001; - data.third = entry.unknown_0002; - data.unknown_0008 = entry.unknown_0004; - data.unknown_000C = entry.unknown_0008; + data.first = entry.firstFlag; + data.second = entry.secondFlag; + data.third = entry.thirdFlag; + data.categoryId = entry.minLevel; + data.categoryIndex = entry.maxLevel; data.text = entry.text; data.values = entry.values; data.type = type; this->itemList->data.push_back(data); } this->itemList->UpdateScrollBar(); - this->unknown_0084->Show(0); - this->unknown_0088->Show(0); + this->findButton->Show(0); + this->navigationButton->Show(0); } // OFFSET: 0x009DDE50 // FUNCTION: fn_14350 void CUIMonster::LoadPage(int, int) { - this->unknown_0084->Show(0); + this->navigationButton->Show(0); } // OFFSET: 0x009DDE60 @@ -904,25 +904,25 @@ void CUIQuest::LoadPage(int type, int id) { for (const auto& [key, content] : contents) { CQuestInfo data; data.id = key; - data.unknown_0004 = content.unknown_0000; - data.unknown_0008 = content.unknown_0004; - data.unknown_000C = content.unknown_0008; - data.questId = content.unknown_000C; + data.categoryType = content.flag; + data.categoryId = content.minLevel; + data.categoryIndex = content.maxLevel; + data.questId = content.questId; data.title = content.first; data.text = content.second; data.rewards = content.values; data.type = type; this->questList->data.push_back(data); - if (type == 1 && !g_renewQuestMgr->IsNewQuest(content.unknown_000C)) { - g_renewQuestMgr->AddStatusRequest(content.unknown_000C); + if (type == 1 && !g_renewQuestMgr->IsNewQuest(content.questId)) { + g_renewQuestMgr->AddStatusRequest(content.questId); } } this->questList->UpdateScrollBar(); if (type == 1) { g_renewQuestMgr->SendQuestStatusRequest(); } - this->unknown_0084->Show(0); - this->unknown_0088->Show(0); + this->findButton->Show(0); + this->navigationButton->Show(0); } // OFFSET: 0x009DE410 @@ -933,7 +933,7 @@ void CUITab::SetSelected(bool selected) { if (this->subTabs) { this->subTabs->Show(expand); } - this->Resize(this->geometry.width, this->unknown_0110 + (expand ? this->subTabs->geometry.height : 0)); + this->Resize(this->geometry.width, this->collapsedHeight + (expand ? this->subTabs->geometry.height : 0)); CUIListBox* list = dynamic_cast*>(this->parent); if (list) { list->UpdateScrollBar(); @@ -1017,9 +1017,9 @@ void CUIAdventureGuide::OnInit() { for (const auto& [type, intro] : g_adventureGuideMgr->m_intros) { AdventureGuide::CUITab* tab = this->tabs->CreateItem(); tab->type = type; - tab->unknown_00E8->SetText(intro.text); - tab->unknown_00F0 = intro.title; - tab->unknown_0110 = this->tabs->rowHeight; + tab->labelText->SetText(intro.text); + tab->title = intro.title; + tab->collapsedHeight = this->tabs->rowHeight; auto page = pages.find(tab->type); if (page != pages.end() && page->first == tab->type) { @@ -1037,14 +1037,14 @@ void CUIAdventureGuide::OnInit() { subTabs->Resize(subTabs->geometry.width, subTabs->rowHeight * static_cast(details.size())); for (const auto& [id, detail] : details) { AdventureGuide::CUISubTab* subTab = subTabs->CreateItem(); - subTab->unknown_00E8->SetText(detail.text); + subTab->labelText->SetText(detail.text); subTab->id = id; - subTab->unknown_00F4 = detail.unknown_0008; + subTab->questId = detail.questId; if (tab->type == 1) { - const bool isNew = g_renewQuestMgr->IsNewQuest(detail.unknown_0008); - subTab->unknown_00EC->Show(isNew); + const bool isNew = g_renewQuestMgr->IsNewQuest(detail.questId); + subTab->stampImage->Show(isNew); if (!isNew) { - g_renewQuestMgr->AddStatusRequest(detail.unknown_0008); + g_renewQuestMgr->AddStatusRequest(detail.questId); } } } @@ -1065,11 +1065,11 @@ void CUIAdventureGuide::OnInit() { // OFFSET: 0x009DE7D0 // FUNCTION: fn_14356 void AdventureGuide::CUIQuestInfo::SetTip(int id) { - reinterpret_cast(this->unknown_00EC)->Clear(); + reinterpret_cast(this->titleViewer)->Clear(); const TipBoxEntry& tip = g_itemTagOwner->GetTip(id); if (tip.title.empty() || tip.paragraphs.empty()) { - reinterpret_cast(this->unknown_00EC)->AddLine(std::to_string(id)); + reinterpret_cast(this->titleViewer)->AddLine(std::to_string(id)); return; } @@ -1083,8 +1083,8 @@ void AdventureGuide::CUIQuestInfo::SetTip(int id) { title.erase(0, title.find_first_not_of(whitespace)); title.erase(title.find_last_not_of(whitespace) + 1); - reinterpret_cast(this->unknown_00EC)->SetBold(true); - reinterpret_cast(this->unknown_00EC)->AddLine(title); + reinterpret_cast(this->titleViewer)->SetBold(true); + reinterpret_cast(this->titleViewer)->AddLine(title); title = tip.paragraphs.front(); std::regex_search(title.c_str(), title.c_str() + title.size(), match, std::regex("\n")); @@ -1093,8 +1093,8 @@ void AdventureGuide::CUIQuestInfo::SetTip(int id) { } title.erase(0, title.find_first_not_of(whitespace)); title.erase(title.find_last_not_of(whitespace) + 1); - reinterpret_cast(this->unknown_00EC)->SetBold(false); - reinterpret_cast(this->unknown_00EC)->AddLine(title); + reinterpret_cast(this->titleViewer)->SetBold(false); + reinterpret_cast(this->titleViewer)->AddLine(title); } // OFFSET: 0x009DEBF0 @@ -1108,10 +1108,10 @@ void CUIAdventureGuide::MarkQuest(int questId) { if (tab->subTabs) { std::list subTabs = tab->subTabs->items; auto found = std::find_if(subTabs.begin(), subTabs.end(), [questId](AdventureGuide::CUISubTab* subTab) { - return subTab->unknown_00F4 == static_cast(questId); + return subTab->questId == static_cast(questId); }); if (found != subTabs.end()) { - (*found)->unknown_00EC->Show(1); + (*found)->stampImage->Show(1); } } @@ -1122,7 +1122,7 @@ void CUIAdventureGuide::MarkQuest(int questId) { return item->questId == questId; }); if (found != items.end()) { - (*found)->unknown_00E8->Show(1); + (*found)->stampImage->Show(1); } } } @@ -1131,7 +1131,7 @@ void CUIAdventureGuide::MarkQuest(int questId) { // OFFSET: 0x009DC140 // FUNCTION: fn_14317 void CUIAdventureGuide::OnSelectTab(AdventureGuide::CUITab* tab) { - this->titleText->SetText(tab->unknown_00F0); + this->titleText->SetText(tab->title); AdventureGuide::CUIPage* page = tab->page; if (!page) { return; @@ -1255,7 +1255,7 @@ void CUIItemInfo::OnCreate(int width, int height) { this->AddChild(this->nameText); CUITextViewer* description = new CUITextViewer(); - this->unknown_00F0 = reinterpret_cast(description); + this->descriptionViewer = reinterpret_cast(description); description->SetSize(173, 97); description->Move(165, 26); description->SetTextOffset(0, 6); @@ -1336,7 +1336,7 @@ void CUIItemInfo::OnCreate(int width, int height) { this->AddChild(description); CUITextViewer* options = new CUITextViewer(); - this->unknown_00F4 = reinterpret_cast(options); + this->optionsViewer = reinterpret_cast(options); options->SetSize(115, 90); options->Move(338, 26); options->SetTextOffset(0, 8); @@ -1417,7 +1417,7 @@ void CUIItemInfo::OnCreate(int width, int height) { this->AddChild(options); CUITextViewer* sources = new CUITextViewer(); - this->unknown_00F8 = reinterpret_cast(sources); + this->sourcesViewer = reinterpret_cast(sources); sources->SetSize(108, 118); sources->Move(480, 5); sources->SetTextOffset(0, 6); @@ -1501,14 +1501,14 @@ void CUIItemInfo::OnCreate(int width, int height) { // OFFSET: 0x009CC580 // FUNCTION: fn_14005 void CUIMonsterInfo::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(280, 12); - this->unknown_00E8->Move(165, 19); - this->unknown_00E8->SetText(""); - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(0, 0); + this->nameText = new CUIStaticText(); + this->nameText->SetSize(280, 12); + this->nameText->Move(165, 19); + this->nameText->SetText(""); + this->nameText->SetFitText(0); + this->nameText->SetAlign(0, 0); { - CUIStaticText* name = this->unknown_00E8; + CUIStaticText* name = this->nameText; name->SetFont(std::string([]() { constexpr char bytes[] = {'\x82', '\x58', '\x47', '\x56', '\xE4', '\x1D'}; constexpr EncryptedSource<6> source(bytes); @@ -1516,19 +1516,19 @@ void CUIMonsterInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(0); - this->unknown_00E8->SetColor(0xCE6B52); - this->unknown_00E8->SetShadow(1, 0xDEDEDE); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->nameText->SetFontHeight(12); + this->nameText->SetBold(0); + this->nameText->SetColor(0xCE6B52); + this->nameText->SetShadow(1, 0xDEDEDE); + this->nameText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->nameText); - this->unknown_00EC = reinterpret_cast(new CUITextViewer()); - reinterpret_cast(this->unknown_00EC)->SetSize(288, 84); - reinterpret_cast(this->unknown_00EC)->Move(165, 39); - reinterpret_cast(this->unknown_00EC)->SetTextOffset(0, 6); + this->detailsViewer = reinterpret_cast(new CUITextViewer()); + reinterpret_cast(this->detailsViewer)->SetSize(288, 84); + reinterpret_cast(this->detailsViewer)->Move(165, 39); + reinterpret_cast(this->detailsViewer)->SetTextOffset(0, 6); { - CUITextViewer* details = reinterpret_cast(this->unknown_00EC); + CUITextViewer* details = reinterpret_cast(this->detailsViewer); details->SetFont(std::string([]() { constexpr char bytes[] = {'\x1C', '\x26', '\x33', '\xB4', '\xEA', '\x9F'}; constexpr EncryptedSource<6> source(bytes); @@ -1536,17 +1536,17 @@ void CUIMonsterInfo::OnCreate(int width, int height) { return name.Text(); }())); } - reinterpret_cast(this->unknown_00EC)->SetFontHeight(12); - reinterpret_cast(this->unknown_00EC)->SetBold(0); - reinterpret_cast(this->unknown_00EC)->SetTextColor(0); - reinterpret_cast(this->unknown_00EC)->SetOutline(0, 0xFFFF00FF); - reinterpret_cast(this->unknown_00EC)->SetLineSpacing(6); - reinterpret_cast(this->unknown_00EC)->SetBackgroundColor(0xFFFF00FF); - reinterpret_cast(this->unknown_00EC)->SetPadding(0, 0, 0, 0); - reinterpret_cast(this->unknown_00EC)->SetScrollBarSize(8, 84); - reinterpret_cast(this->unknown_00EC)->SetScrollStep(20); + reinterpret_cast(this->detailsViewer)->SetFontHeight(12); + reinterpret_cast(this->detailsViewer)->SetBold(0); + reinterpret_cast(this->detailsViewer)->SetTextColor(0); + reinterpret_cast(this->detailsViewer)->SetOutline(0, 0xFFFF00FF); + reinterpret_cast(this->detailsViewer)->SetLineSpacing(6); + reinterpret_cast(this->detailsViewer)->SetBackgroundColor(0xFFFF00FF); + reinterpret_cast(this->detailsViewer)->SetPadding(0, 0, 0, 0); + reinterpret_cast(this->detailsViewer)->SetScrollBarSize(8, 84); + reinterpret_cast(this->detailsViewer)->SetScrollStep(20); { - CUITextViewer* details = reinterpret_cast(this->unknown_00EC); + CUITextViewer* details = reinterpret_cast(this->detailsViewer); details->SetScrollBarButtonImages(std::string([]() { constexpr char bytes[] = { '\xB7', '\x38', '\x47', '\xE7', '\xE3', '\x9D', '\x24', '\xA2', '\xB1', '\x73', '\x47', '\xD1', '\x9E', '\xE9', '\xBD', '\x2E', '\x13', '\xE1', '\xE2', @@ -1566,7 +1566,7 @@ void CUIMonsterInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* details = reinterpret_cast(this->unknown_00EC); + CUITextViewer* details = reinterpret_cast(this->detailsViewer); details->SetScrollBarBackground(std::string([]() { constexpr char bytes[] = { '\x11', '\xF4', '\x57', '\x1F', '\xF9', '\x49', '\x2E', '\xE2', '\x17', '\xBF', '\x57', '\x29', '\x84', '\x3D', '\xB7', '\x6E', '\xB5', '\x2D', '\xF2', @@ -1578,7 +1578,7 @@ void CUIMonsterInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* details = reinterpret_cast(this->unknown_00EC); + CUITextViewer* details = reinterpret_cast(this->detailsViewer); details->SetScrollBarThumbImages(std::string([]() { constexpr char bytes[] = { '\xB5', '\x94', '\xC3', '\xD5', '\xD3', '\x0F', '\x64', '\xA6', '\xB3', '\xDF', '\xC3', '\xE3', '\xAE', '\x7B', '\xFD', '\x2A', '\x11', '\x4D', '\x66', @@ -1605,14 +1605,14 @@ void CUIMonsterInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00EC); + this->AddChild(this->detailsViewer); - this->unknown_00F0 = reinterpret_cast(new CUITextViewer()); - reinterpret_cast(this->unknown_00F0)->SetSize(108, 118); - reinterpret_cast(this->unknown_00F0)->Move(480, 5); - reinterpret_cast(this->unknown_00F0)->SetTextOffset(0, 6); + this->valuesViewer = reinterpret_cast(new CUITextViewer()); + reinterpret_cast(this->valuesViewer)->SetSize(108, 118); + reinterpret_cast(this->valuesViewer)->Move(480, 5); + reinterpret_cast(this->valuesViewer)->SetTextOffset(0, 6); { - CUITextViewer* values = reinterpret_cast(this->unknown_00F0); + CUITextViewer* values = reinterpret_cast(this->valuesViewer); values->SetFont(std::string([]() { constexpr char bytes[] = {'\xD8', '\xA8', '\xEF', '\x76', '\x1A', '\x45'}; constexpr EncryptedSource<6> source(bytes); @@ -1620,17 +1620,17 @@ void CUIMonsterInfo::OnCreate(int width, int height) { return name.Text(); }())); } - reinterpret_cast(this->unknown_00F0)->SetFontHeight(12); - reinterpret_cast(this->unknown_00F0)->SetBold(0); - reinterpret_cast(this->unknown_00F0)->SetTextColor(0); - reinterpret_cast(this->unknown_00F0)->SetOutline(0, 0xFFFF00FF); - reinterpret_cast(this->unknown_00F0)->SetLineSpacing(6); - reinterpret_cast(this->unknown_00F0)->SetBackgroundColor(0xFFFF00FF); - reinterpret_cast(this->unknown_00F0)->SetPadding(0, 0, 0, 0); - reinterpret_cast(this->unknown_00F0)->SetScrollBarSize(8, 118); - reinterpret_cast(this->unknown_00F0)->SetScrollStep(20); + reinterpret_cast(this->valuesViewer)->SetFontHeight(12); + reinterpret_cast(this->valuesViewer)->SetBold(0); + reinterpret_cast(this->valuesViewer)->SetTextColor(0); + reinterpret_cast(this->valuesViewer)->SetOutline(0, 0xFFFF00FF); + reinterpret_cast(this->valuesViewer)->SetLineSpacing(6); + reinterpret_cast(this->valuesViewer)->SetBackgroundColor(0xFFFF00FF); + reinterpret_cast(this->valuesViewer)->SetPadding(0, 0, 0, 0); + reinterpret_cast(this->valuesViewer)->SetScrollBarSize(8, 118); + reinterpret_cast(this->valuesViewer)->SetScrollStep(20); { - CUITextViewer* values = reinterpret_cast(this->unknown_00F0); + CUITextViewer* values = reinterpret_cast(this->valuesViewer); values->SetScrollBarButtonImages(std::string([]() { constexpr char bytes[] = { '\x4F', '\xF6', '\xA1', '\x11', '\x75', '\xD7', '\xC6', '\x0A', '\x49', '\xBD', '\xA1', '\x27', '\x08', '\xA3', '\x5F', '\x86', '\xEB', '\x2F', '\x04', @@ -1650,7 +1650,7 @@ void CUIMonsterInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* values = reinterpret_cast(this->unknown_00F0); + CUITextViewer* values = reinterpret_cast(this->valuesViewer); values->SetScrollBarBackground(std::string([]() { constexpr char bytes[] = { '\x15', '\x96', '\xEB', '\xB3', '\x27', '\x69', '\x52', '\x68', '\x13', '\xDD', '\xEB', '\x85', '\x5A', '\x1D', '\xCB', '\xE4', '\xB1', '\x4F', '\x4E', @@ -1662,7 +1662,7 @@ void CUIMonsterInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* values = reinterpret_cast(this->unknown_00F0); + CUITextViewer* values = reinterpret_cast(this->valuesViewer); values->SetScrollBarThumbImages(std::string([]() { constexpr char bytes[] = { '\xB3', '\x40', '\x7B', '\x2B', '\x15', '\x2D', '\x6E', '\x32', '\xB5', '\x0B', '\x7B', '\x1D', '\x68', '\x59', '\xF7', '\xBE', '\x17', '\x99', '\xDE', @@ -1689,17 +1689,17 @@ void CUIMonsterInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00F0); + this->AddChild(this->valuesViewer); } // OFFSET: 0x009CFAF0 // FUNCTION: fn_14007 void CUIQuestInfo::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticImage(); - this->unknown_00E8->SetSize(85, 70); - this->unknown_00E8->Move(250, 10); + this->stampImage = new CUIStaticImage(); + this->stampImage->SetSize(85, 70); + this->stampImage->Move(250, 10); { - CUIStaticImage* stamp = static_cast(this->unknown_00E8); + CUIStaticImage* stamp = static_cast(this->stampImage); stamp->SetImage(std::string([]() { constexpr char bytes[] = { '\x31', '\x68', '\xF9', '\xF3', '\xD7', '\xB7', '\x8A', '\x3C', '\x37', '\x23', '\xF9', '\xC5', '\xAA', '\xC3', '\x13', '\xB0', '\x95', '\xB1', '\x5C', @@ -1710,14 +1710,14 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00E8); + this->AddChild(this->stampImage); - this->unknown_00EC = reinterpret_cast(new CUITextViewer()); - reinterpret_cast(this->unknown_00EC)->SetSize(360, 57); - reinterpret_cast(this->unknown_00EC)->Move(25, 13); - reinterpret_cast(this->unknown_00EC)->SetTextOffset(0, 0); + this->titleViewer = reinterpret_cast(new CUITextViewer()); + reinterpret_cast(this->titleViewer)->SetSize(360, 57); + reinterpret_cast(this->titleViewer)->Move(25, 13); + reinterpret_cast(this->titleViewer)->SetTextOffset(0, 0); { - CUITextViewer* title = reinterpret_cast(this->unknown_00EC); + CUITextViewer* title = reinterpret_cast(this->titleViewer); title->SetFont(std::string([]() { constexpr char bytes[] = {'\x32', '\xB8', '\x81', '\x34', '\x06', '\x65'}; constexpr EncryptedSource<6> source(bytes); @@ -1725,17 +1725,17 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - reinterpret_cast(this->unknown_00EC)->SetFontHeight(12); - reinterpret_cast(this->unknown_00EC)->SetBold(1); - reinterpret_cast(this->unknown_00EC)->SetTextColor(0); - reinterpret_cast(this->unknown_00EC)->SetOutline(0, 0xFFFF00FF); - reinterpret_cast(this->unknown_00EC)->SetLineSpacing(6); - reinterpret_cast(this->unknown_00EC)->SetBackgroundColor(0xFFFF00FF); - reinterpret_cast(this->unknown_00EC)->SetPadding(15, 5, 5, 5); - reinterpret_cast(this->unknown_00EC)->SetScrollBarSize(8, 87); - reinterpret_cast(this->unknown_00EC)->SetScrollStep(20); + reinterpret_cast(this->titleViewer)->SetFontHeight(12); + reinterpret_cast(this->titleViewer)->SetBold(1); + reinterpret_cast(this->titleViewer)->SetTextColor(0); + reinterpret_cast(this->titleViewer)->SetOutline(0, 0xFFFF00FF); + reinterpret_cast(this->titleViewer)->SetLineSpacing(6); + reinterpret_cast(this->titleViewer)->SetBackgroundColor(0xFFFF00FF); + reinterpret_cast(this->titleViewer)->SetPadding(15, 5, 5, 5); + reinterpret_cast(this->titleViewer)->SetScrollBarSize(8, 87); + reinterpret_cast(this->titleViewer)->SetScrollStep(20); { - CUITextViewer* title = reinterpret_cast(this->unknown_00EC); + CUITextViewer* title = reinterpret_cast(this->titleViewer); title->SetScrollBarButtonImages(std::string([]() { constexpr char bytes[] = { '\x3D', '\x16', '\x7B', '\xDB', '\x5F', '\x33', '\x84', '\x84', '\x3B', '\x5D', '\x7B', '\xED', '\x22', '\x47', '\x1D', '\x08', '\x99', '\xCF', '\xDE', @@ -1755,7 +1755,7 @@ void CUIQuestInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* title = reinterpret_cast(this->unknown_00EC); + CUITextViewer* title = reinterpret_cast(this->titleViewer); title->SetScrollBarBackground(std::string([]() { constexpr char bytes[] = { '\xAB', '\x16', '\x07', '\xF5', '\xA7', '\x41', '\x38', '\x7A', '\xAD', '\x5D', '\x07', '\xC3', '\xDA', '\x35', '\xA1', '\xF6', '\x0F', '\xCF', '\xA2', @@ -1767,7 +1767,7 @@ void CUIQuestInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* title = reinterpret_cast(this->unknown_00EC); + CUITextViewer* title = reinterpret_cast(this->titleViewer); title->SetScrollBarThumbImages(std::string([]() { constexpr char bytes[] = { '\x4F', '\x36', '\x2B', '\xF7', '\x75', '\xB1', '\x3A', '\xF4', '\x49', '\x7D', '\x2B', '\xC1', '\x08', '\xC5', '\xA3', '\x78', '\xEB', '\xEF', '\x8E', @@ -1794,14 +1794,14 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00EC); + this->AddChild(this->titleViewer); - this->unknown_00F0 = reinterpret_cast(new CUITextViewer()); - reinterpret_cast(this->unknown_00F0)->SetSize(200, 87); - reinterpret_cast(this->unknown_00F0)->Move(400, 5); - reinterpret_cast(this->unknown_00F0)->SetTextOffset(0, 6); + this->linesViewer = reinterpret_cast(new CUITextViewer()); + reinterpret_cast(this->linesViewer)->SetSize(200, 87); + reinterpret_cast(this->linesViewer)->Move(400, 5); + reinterpret_cast(this->linesViewer)->SetTextOffset(0, 6); { - CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); + CUITextViewer* lines = reinterpret_cast(this->linesViewer); lines->SetFont(std::string([]() { constexpr char bytes[] = {'\x38', '\x60', '\xE1', '\x78', '\x5A', '\x0F'}; constexpr EncryptedSource<6> source(bytes); @@ -1809,17 +1809,17 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - reinterpret_cast(this->unknown_00F0)->SetFontHeight(12); - reinterpret_cast(this->unknown_00F0)->SetBold(1); - reinterpret_cast(this->unknown_00F0)->SetTextColor(0); - reinterpret_cast(this->unknown_00F0)->SetOutline(0, 0xFFFF00FF); - reinterpret_cast(this->unknown_00F0)->SetLineSpacing(6); - reinterpret_cast(this->unknown_00F0)->SetBackgroundColor(0xFFFF00FF); - reinterpret_cast(this->unknown_00F0)->SetPadding(15, 5, 5, 5); - reinterpret_cast(this->unknown_00F0)->SetScrollBarSize(8, 87); - reinterpret_cast(this->unknown_00F0)->SetScrollStep(20); + reinterpret_cast(this->linesViewer)->SetFontHeight(12); + reinterpret_cast(this->linesViewer)->SetBold(1); + reinterpret_cast(this->linesViewer)->SetTextColor(0); + reinterpret_cast(this->linesViewer)->SetOutline(0, 0xFFFF00FF); + reinterpret_cast(this->linesViewer)->SetLineSpacing(6); + reinterpret_cast(this->linesViewer)->SetBackgroundColor(0xFFFF00FF); + reinterpret_cast(this->linesViewer)->SetPadding(15, 5, 5, 5); + reinterpret_cast(this->linesViewer)->SetScrollBarSize(8, 87); + reinterpret_cast(this->linesViewer)->SetScrollStep(20); { - CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); + CUITextViewer* lines = reinterpret_cast(this->linesViewer); lines->SetScrollBarButtonImages(std::string([]() { constexpr char bytes[] = { '\xBF', '\x7A', '\x6F', '\xA1', '\xAB', '\x7F', '\xD0', '\xC2', '\xB9', '\x31', '\x6F', '\x97', '\xD6', '\x0B', '\x49', '\x4E', '\x1B', '\xA3', '\xCA', @@ -1839,7 +1839,7 @@ void CUIQuestInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); + CUITextViewer* lines = reinterpret_cast(this->linesViewer); lines->SetScrollBarBackground(std::string([]() { constexpr char bytes[] = { '\x21', '\x36', '\x47', '\xB5', '\x41', '\x0D', '\xE4', '\xBE', '\x27', '\x7D', '\x47', '\x83', '\x3C', '\x79', '\x7D', '\x32', '\x85', '\xEF', '\xE2', @@ -1851,7 +1851,7 @@ void CUIQuestInfo::OnCreate(int width, int height) { }())); } { - CUITextViewer* lines = reinterpret_cast(this->unknown_00F0); + CUITextViewer* lines = reinterpret_cast(this->linesViewer); lines->SetScrollBarThumbImages(std::string([]() { constexpr char bytes[] = { '\x8F', '\x0E', '\x0F', '\xCF', '\xA3', '\x19', '\x84', '\xB4', '\x89', '\x45', '\x0F', '\xF9', '\xDE', '\x6D', '\x1D', '\x38', '\x2B', '\xD7', '\xAA', @@ -1878,14 +1878,14 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00F0); + this->AddChild(this->linesViewer); - this->unknown_00F4 = reinterpret_cast(new CUITextViewer()); - reinterpret_cast(this->unknown_00F4)->SetSize(360, 13); - reinterpret_cast(this->unknown_00F4)->Move(25, 73); - reinterpret_cast(this->unknown_00F4)->SetTextOffset(0, 0); + this->statusViewer = reinterpret_cast(new CUITextViewer()); + reinterpret_cast(this->statusViewer)->SetSize(360, 13); + reinterpret_cast(this->statusViewer)->Move(25, 73); + reinterpret_cast(this->statusViewer)->SetTextOffset(0, 0); { - CUITextViewer* status = reinterpret_cast(this->unknown_00F4); + CUITextViewer* status = reinterpret_cast(this->statusViewer); status->SetFont(std::string([]() { constexpr char bytes[] = {'\x5A', '\x70', '\xFF', '\x40', '\x1C', '\x23'}; constexpr EncryptedSource<6> source(bytes); @@ -1893,19 +1893,19 @@ void CUIQuestInfo::OnCreate(int width, int height) { return name.Text(); }())); } - reinterpret_cast(this->unknown_00F4)->SetFontHeight(12); - reinterpret_cast(this->unknown_00F4)->SetBold(0); - reinterpret_cast(this->unknown_00F4)->SetTextColor(0); - reinterpret_cast(this->unknown_00F4)->SetOutline(0, 0xFFFF00FF); - reinterpret_cast(this->unknown_00F4)->SetLineSpacing(6); - reinterpret_cast(this->unknown_00F4)->SetBackgroundColor(0xFFFF00FF); - reinterpret_cast(this->unknown_00F4)->SetPadding(15, 0, 3, 0); - reinterpret_cast(this->unknown_00F4)->SetScrollBarSize(8, 12); - reinterpret_cast(this->unknown_00F4)->SetScrollStep(1); - reinterpret_cast(this->unknown_00F4)->SetScrollBarButtonImages("", ""); - reinterpret_cast(this->unknown_00F4)->SetScrollBarBackground(""); - reinterpret_cast(this->unknown_00F4)->SetScrollBarThumbImages("", "", ""); - this->AddChild(this->unknown_00F4); + reinterpret_cast(this->statusViewer)->SetFontHeight(12); + reinterpret_cast(this->statusViewer)->SetBold(0); + reinterpret_cast(this->statusViewer)->SetTextColor(0); + reinterpret_cast(this->statusViewer)->SetOutline(0, 0xFFFF00FF); + reinterpret_cast(this->statusViewer)->SetLineSpacing(6); + reinterpret_cast(this->statusViewer)->SetBackgroundColor(0xFFFF00FF); + reinterpret_cast(this->statusViewer)->SetPadding(15, 0, 3, 0); + reinterpret_cast(this->statusViewer)->SetScrollBarSize(8, 12); + reinterpret_cast(this->statusViewer)->SetScrollStep(1); + reinterpret_cast(this->statusViewer)->SetScrollBarButtonImages("", ""); + reinterpret_cast(this->statusViewer)->SetScrollBarBackground(""); + reinterpret_cast(this->statusViewer)->SetScrollBarThumbImages("", "", ""); + this->AddChild(this->statusViewer); } // OFFSET: 0x009DCE10 @@ -1924,7 +1924,7 @@ void CUICharacterInfo::OnInit() { void CUIItemInfo::OnRBtnDown(int, int) { ITEM_INFO info; info.SetItemId(this->itemId); - info.unknown_0000[0] = this->type; + info.identity[0] = this->type; info.identified = 1; int location; if (this->type == 5) { @@ -1968,7 +1968,7 @@ void CUIItemInfo::OnRBtnDown(int, int) { } else { location = 0; } - info.unknown_0000[2] = location; + info.identity[2] = location; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { @@ -1980,16 +1980,16 @@ void CUIItemInfo::OnRBtnDown(int, int) { // FUNCTION: fn_14322 void CUIMonster::BindMonster(CUIMonsterInfo* item, const CMonsterData& data) { item->SetMonster(data.name); - reinterpret_cast(item->unknown_00F0)->Clear(); + reinterpret_cast(item->valuesViewer)->Clear(); for (const std::string& value : data.values) { - reinterpret_cast(item->unknown_00F0)->AddLine(value); + reinterpret_cast(item->valuesViewer)->AddLine(value); } } // OFFSET: 0x009DFCB0 // FUNCTION: fn_14360 void CUIMonsterInfo::SetMonster(const std::string& title) { - reinterpret_cast(this->unknown_00EC)->Clear(); + reinterpret_cast(this->detailsViewer)->Clear(); std::string name; std::string spriteName; @@ -2000,69 +2000,69 @@ void CUIMonsterInfo::SetMonster(const std::string& title) { int race = 0; int type = 0; if (!g_navigationManager.GetMobInfo(title, &name, &spriteName, &x, &size, &element, &elementLevel, &race, &type)) { - this->unknown_00E8->SetText(title); + this->nameText->SetText(title); return; } - this->unknown_00E8->SetText(name.c_str(), name.size()); + this->nameText->SetText(name.c_str(), name.size()); this->sprite = static_cast(ResourceMgr::Instance().Load(spriteName + ".spr")); this->action = static_cast(ResourceMgr::Instance().Load(spriteName + ".act")); if (element == 1) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY4), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY4), elementLevel)); } else if (element == 2) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY5), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY5), elementLevel)); } else if (element == 3) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY6), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY6), elementLevel)); } else if (element == 4) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY7), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY7), elementLevel)); } else if (element == 5) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY8), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY8), elementLevel)); } else if (element == 6) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY9), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY9), elementLevel)); } else if (element == 7) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY0), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_PROPERTY0), elementLevel)); } else if (element == 8) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE1), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE1), elementLevel)); } else if (element == 9) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE2), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE2), elementLevel)); } else { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE0), elementLevel)); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_SCALE0), elementLevel)); } if (race == 1) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE4))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE4))); } else if (race == 2) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE5))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE5))); } else if (race == 3) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE6))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE6))); } else if (race == 4) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE7))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE7))); } else if (race == 5) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE8))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE8))); } else if (race == 6) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE9))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE9))); } else if (race == 7) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE0))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE0))); } else if (race == 8) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_MOVECLICK))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_MOVECLICK))); } else if (race == 9) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_NPCMOVE))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_NPCMOVE))); } else { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_NPCCLICK))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_NPCCLICK))); } if (size == 1) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE1))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE1))); } else if (size == 2) { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE2))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE2))); } else { - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE3))); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_RACE3))); } if (type == 0x12D) { - reinterpret_cast(this->unknown_00EC)->SetTextColor(0x6464FFu); - reinterpret_cast(this->unknown_00EC)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_TARGET_D_D))); + reinterpret_cast(this->detailsViewer)->SetTextColor(0x6464FFu); + reinterpret_cast(this->detailsViewer)->AddLine(FormatOwnedString(LookupMessage(MSI_NAVIGATION_TARGET_D_D))); } } @@ -2263,7 +2263,7 @@ void CUIItem::RequestNavigation() { std::string name; int x = -1; int y = -1; - std::vector parts = Split(this->unknown_008C, ","); + std::vector parts = Split(this->navigationTarget, ","); if (parts.size() > 2) { name = parts[0]; x = std::atoi(parts[1].c_str()); @@ -2283,7 +2283,7 @@ void CUIQuest::RequestNavigation() { std::string name; int x = -1; int y = -1; - std::vector parts = Split(this->unknown_008C, ","); + std::vector parts = Split(this->navigationTarget, ","); if (parts.size() > 2) { name = parts[0]; x = std::atoi(parts[1].c_str()); @@ -2300,16 +2300,16 @@ void CUIQuest::RequestNavigation() { // OFFSET: 0x009DBB80 // FUNCTION: fn_14311 void CUIItem::SearchNavigation() { - const std::size_t comma = this->unknown_008C.find(','); + const std::size_t comma = this->navigationTarget.find(','); if (comma == std::string::npos) { return; } - std::string name = this->unknown_008C.substr(0, comma); - g_navigationManager.unknown_1264 = name; + std::string name = this->navigationTarget.substr(0, comma); + g_navigationManager.searchText = name; g_navigationManager.UpdateSearchResults(); - g_navigationManager.unknown_12C4 = 0; - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPath = 0; + g_navigationManager.selectedPathNode = 0; g_navigationManager.SelectNodeState(); UIWindow* window = g_windowMgr.LookupWindow(WID_NAVIGATIONV4WND); @@ -2322,16 +2322,16 @@ void CUIItem::SearchNavigation() { // OFFSET: 0x009DBCB0 // FUNCTION: fn_14312 void CUIQuest::SearchNavigation() { - const std::size_t comma = this->unknown_008C.find(','); + const std::size_t comma = this->navigationTarget.find(','); if (comma == std::string::npos) { return; } - std::string name = this->unknown_008C.substr(0, comma); - g_navigationManager.unknown_1264 = name; + std::string name = this->navigationTarget.substr(0, comma); + g_navigationManager.searchText = name; g_navigationManager.UpdateSearchResults(); - g_navigationManager.unknown_12C4 = 0; - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPath = 0; + g_navigationManager.selectedPathNode = 0; if (!g_navigationManager.SelectNodeState()) { this->RequestNavigation(); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(4241)), 0, 0, 0, 0); @@ -2579,12 +2579,12 @@ void CUIItem::OnCreate(int width, int height) { this->itemList->AddNewItem(); this->AddChild(this->itemList); - this->unknown_0084 = new CUIImageButton(); - this->unknown_0084->SetSize(62, 20); - this->unknown_0084->Move(471, 363); - this->unknown_0084->SetOnClick([this]() { this->RequestNavigation(); }); - this->unknown_0084->disabled = 0; - this->unknown_0084->Invalidate(); + this->findButton = new CUIImageButton(); + this->findButton->SetSize(62, 20); + this->findButton->Move(471, 363); + this->findButton->SetOnClick([this]() { this->RequestNavigation(); }); + this->findButton->disabled = 0; + this->findButton->Invalidate(); { const char findDisableSource[] = { '\xE7', '\x0A', '\x53', '\x65', '\xC1', '\x9D', '\xA4', '\x60', '\xE1', '\x41', '\x53', '\x53', '\xBC', '\xE9', '\x3D', '\xEC', '\x43', '\xD3', '\xF6', @@ -2610,16 +2610,16 @@ void CUIItem::OnCreate(int width, int height) { '\xAA', '\xEF', '\x6E', '\x7F', '\x2A', '\x3C', '\x81', '\xA3', '\x97', '\xEC', '\x71', '\x0D'}; thread_local EncryptedName findNormalName(findNormalSource); const std::string findNormal(findNormalName.Text()); - this->unknown_0084->SetImages(findNormal, findPress, findOver, findDisable); + this->findButton->SetImages(findNormal, findPress, findOver, findDisable); } - this->AddChild(this->unknown_0084); + this->AddChild(this->findButton); - this->unknown_0088 = new CUIImageButton(); - this->unknown_0088->SetSize(62, 20); - this->unknown_0088->Move(540, 363); - this->unknown_0088->SetOnClick([this]() { this->SearchNavigation(); }); - this->unknown_0088->disabled = 0; - this->unknown_0088->Invalidate(); + this->navigationButton = new CUIImageButton(); + this->navigationButton->SetSize(62, 20); + this->navigationButton->Move(540, 363); + this->navigationButton->SetOnClick([this]() { this->SearchNavigation(); }); + this->navigationButton->disabled = 0; + this->navigationButton->Invalidate(); { const char moveDisableSource[] = { '\x09', '\xAE', '\x2D', '\x15', '\x27', '\xA7', '\xDA', '\x6E', '\x0F', '\xE5', '\x2D', '\x23', '\x5A', '\xD3', '\x43', '\xE2', '\xAD', '\x77', '\x88', @@ -2645,9 +2645,9 @@ void CUIItem::OnCreate(int width, int height) { '\xAA', '\xD1', '\x36', '\x0D', '\xCA', '\xC0', '\x7B', '\xEB', '\x97', '\xD2', '\x29', '\x7F'}; thread_local EncryptedName moveNormalName(moveNormalSource); const std::string moveNormal(moveNormalName.Text()); - this->unknown_0088->SetImages(moveNormal, movePress, moveOver, moveDisable); + this->navigationButton->SetImages(moveNormal, movePress, moveOver, moveDisable); } - this->AddChild(this->unknown_0088); + this->AddChild(this->navigationButton); } @@ -2742,12 +2742,12 @@ void CUIQuest::OnCreate(int width, int height) { this->questList->AddNewItem(); this->AddChild(this->questList); - this->unknown_0084 = new CUIImageButton(); - this->unknown_0084->SetSize(62, 20); - this->unknown_0084->Move(471, 363); - this->unknown_0084->SetOnClick([this]() { this->RequestNavigation(); }); - this->unknown_0084->disabled = 0; - this->unknown_0084->Invalidate(); + this->findButton = new CUIImageButton(); + this->findButton->SetSize(62, 20); + this->findButton->Move(471, 363); + this->findButton->SetOnClick([this]() { this->RequestNavigation(); }); + this->findButton->disabled = 0; + this->findButton->Invalidate(); { const char findDisableSource[] = { '\x77', '\x9E', '\x2F', '\x39', '\xC3', '\x11', '\x5C', '\x82', '\x71', '\xD5', '\x2F', '\x0F', '\xBE', '\x65', '\xC5', '\x0E', '\xD3', '\x47', '\x8A', @@ -2773,16 +2773,16 @@ void CUIQuest::OnCreate(int width, int height) { '\x94', '\x43', '\xC4', '\xB3', '\x20', '\x58', '\x0B', '\x5B', '\xA9', '\x40', '\xDB', '\xC1'}; thread_local EncryptedName findNormalName(findNormalSource); const std::string findNormal(findNormalName.Text()); - this->unknown_0084->SetImages(findNormal, findPress, findOver, findDisable); + this->findButton->SetImages(findNormal, findPress, findOver, findDisable); } - this->AddChild(this->unknown_0084); + this->AddChild(this->findButton); - this->unknown_0088 = new CUIImageButton(); - this->unknown_0088->SetSize(62, 20); - this->unknown_0088->Move(540, 363); - this->unknown_0088->SetOnClick([this]() { this->SearchNavigation(); }); - this->unknown_0088->disabled = 0; - this->unknown_0088->Invalidate(); + this->navigationButton = new CUIImageButton(); + this->navigationButton->SetSize(62, 20); + this->navigationButton->Move(540, 363); + this->navigationButton->SetOnClick([this]() { this->SearchNavigation(); }); + this->navigationButton->disabled = 0; + this->navigationButton->Invalidate(); { const char moveDisableSource[] = { '\xDD', '\x68', '\x8B', '\x4F', '\x1D', '\xB9', '\x8C', '\xEE', '\xDB', '\x23', '\x8B', '\x79', '\x60', '\xCD', '\x15', '\x62', '\x79', '\xB1', '\x2E', @@ -2808,9 +2808,9 @@ void CUIQuest::OnCreate(int width, int height) { '\x2E', '\xFF', '\x98', '\xBB', '\x0E', '\x08', '\x11', '\xB7', '\x13', '\xFC', '\x87', '\xC9'}; thread_local EncryptedName moveNormalName(moveNormalSource); const std::string moveNormal(moveNormalName.Text()); - this->unknown_0088->SetImages(moveNormal, movePress, moveOver, moveDisable); + this->navigationButton->SetImages(moveNormal, movePress, moveOver, moveDisable); } - this->AddChild(this->unknown_0088); + this->AddChild(this->navigationButton); } @@ -2928,17 +2928,17 @@ void CUIMonster::OnCreate(int width, int height) { this->monsterList->AddNewItem(); this->AddChild(this->monsterList); - this->unknown_0084 = new CUIImageButton(); - this->unknown_0084->SetSize(62, 20); - this->unknown_0084->Move(540, 363); - this->unknown_0084->SetOnClick([this]() { this->SearchNavigation(); }); + this->navigationButton = new CUIImageButton(); + this->navigationButton->SetSize(62, 20); + this->navigationButton->Move(540, 363); + this->navigationButton->SetOnClick([this]() { this->SearchNavigation(); }); { - CUIImageButton* button = this->unknown_0084; + CUIImageButton* button = this->navigationButton; button->disabled = 0; button->Invalidate(); } { - this->unknown_0084->SetImages(std::string([]() { + this->navigationButton->SetImages(std::string([]() { constexpr char bytes[] = { '\x91', '\x02', '\x3D', '\xD1', '\x8F', '\xFD', '\x1A', '\xA6', '\x97', '\x49', '\x3D', '\xE7', '\xF2', '\x89', '\x83', '\x2A', '\x35', '\xDB', '\x98', '\x45', '\x3B', '\x46', '\xAD', '\x0E', '\x16', '\xD8', '\x94', '\x4F', '\x2A', '\x6F', '\xBD', '\x1F', '\x3F', '\xF2', '\x93', '\x4A', '\x39', '\x5A', @@ -2972,16 +2972,16 @@ void CUIMonster::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_0084); + this->AddChild(this->navigationButton); } // OFFSET: 0x009DBAC0 // FUNCTION: fn_45477 void CUIMonster::SearchNavigation() { - g_navigationManager.unknown_1264 = this->unknown_0088; + g_navigationManager.searchText = this->navigationTarget; g_navigationManager.UpdateSearchResults(); - g_navigationManager.unknown_12C4 = 0; - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPath = 0; + g_navigationManager.selectedPathNode = 0; g_navigationManager.SelectNodeState(); if (g_windowMgr.LookupWindow(WID_NAVIGATIONV4WND)) { g_navigationManager.SetViewMode(1); diff --git a/Source/UI/AdventureGuide/UIAdventureGuide.h b/Source/UI/AdventureGuide/UIAdventureGuide.h index ddaceb94c..e92bd49d5 100644 --- a/Source/UI/AdventureGuide/UIAdventureGuide.h +++ b/Source/UI/AdventureGuide/UIAdventureGuide.h @@ -91,7 +91,7 @@ public: // OFFSET: 0x009D9080 // FUNCTION: fn_14275 __declspec(noinline) explicit CUIItem() - : CUIPage(), itemList(nullptr), unknown_0084(nullptr), unknown_0088(nullptr), unknown_008C(), location(-1) { + : CUIPage(), itemList(nullptr), findButton(nullptr), navigationButton(nullptr), navigationTarget(), location(-1) { } void OnCreate(int width, int height) override; @@ -104,9 +104,9 @@ public: void SearchNavigation(); /* 0080 */ CUIListBoxEx* itemList; - /* 0084 */ CUIImageButton* unknown_0084; - /* 0088 */ CUIImageButton* unknown_0088; - /* 008C */ std::string unknown_008C; + /* 0084 */ CUIImageButton* findButton; + /* 0088 */ CUIImageButton* navigationButton; + /* 008C */ std::string navigationTarget; /* 00A4 */ int location; }; @@ -114,7 +114,7 @@ class CUIMonster : public CUIPage { public: // OFFSET: 0x009D9220 // FUNCTION: fn_14277 - __declspec(noinline) explicit CUIMonster() : CUIPage(), monsterList(nullptr), unknown_0084(nullptr), unknown_0088() { + __declspec(noinline) explicit CUIMonster() : CUIPage(), monsterList(nullptr), navigationButton(nullptr), navigationTarget() { } void OnCreate(int width, int height) override; @@ -127,15 +127,15 @@ public: void SearchNavigation(); /* 0080 */ CUIListBoxEx* monsterList; - /* 0084 */ CUIImageButton* unknown_0084; - /* 0088 */ std::string unknown_0088; + /* 0084 */ CUIImageButton* navigationButton; + /* 0088 */ std::string navigationTarget; }; class CUIQuest : public CUIPage { public: // OFFSET: 0x009D9360 // FUNCTION: fn_14279 - __declspec(noinline) explicit CUIQuest() : CUIPage(), questList(nullptr), unknown_0084(nullptr), unknown_0088(nullptr), unknown_008C() { + __declspec(noinline) explicit CUIQuest() : CUIPage(), questList(nullptr), findButton(nullptr), navigationButton(nullptr), navigationTarget() { } void OnCreate(int width, int height) override; @@ -148,9 +148,9 @@ public: void SearchNavigation(); /* 0080 */ CUIListBoxEx* questList; - /* 0084 */ CUIImageButton* unknown_0084; - /* 0088 */ CUIImageButton* unknown_0088; - /* 008C */ std::string unknown_008C; + /* 0084 */ CUIImageButton* findButton; + /* 0088 */ CUIImageButton* navigationButton; + /* 008C */ std::string navigationTarget; }; } diff --git a/Source/UI/Buttons/UIBasicButton.cpp b/Source/UI/Buttons/UIBasicButton.cpp index 36a8284ba..ef4b049d9 100644 --- a/Source/UI/Buttons/UIBasicButton.cpp +++ b/Source/UI/Buttons/UIBasicButton.cpp @@ -71,7 +71,7 @@ void UIBasicButton::Paint() { this->DrawTextAt(x, y, this->text.c_str(), 0, 0, 12, 0xE2E2E2, 0, 0); this->DrawTextAt(x + 1, y + 1, this->text.c_str(), 0, 0, 12, 0x6F6F6F, 0, 0); } else { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: { DrawButtonSkin(this, "유저인터페이스\\basic_interface\\btn_out_left.bmp", "유저인터페이스\\basic_interface\\btn_out_mid.bmp", "유저인터페이스\\basic_interface\\btn_out_right.bmp"); const int x = static_cast((this->geometry.width - this->TextWidth(this->text.c_str(), 0, 0, 12, 0, 0)) * 0.5); diff --git a/Source/UI/Buttons/UIBitmapButton.cpp b/Source/UI/Buttons/UIBitmapButton.cpp index f03c72dd4..264963e2e 100644 --- a/Source/UI/Buttons/UIBitmapButton.cpp +++ b/Source/UI/Buttons/UIBitmapButton.cpp @@ -49,7 +49,7 @@ bool UIBitmapButton::SetBitmap(const char* name, int state, unsigned char exactS void UIBitmapButton::Paint() { CBitmapRes* bitmap; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[0].c_str()))); break; diff --git a/Source/UI/Buttons/UIBmpRadioBtn.cpp b/Source/UI/Buttons/UIBmpRadioBtn.cpp index 4f43bd2f0..66419bc1d 100644 --- a/Source/UI/Buttons/UIBmpRadioBtn.cpp +++ b/Source/UI/Buttons/UIBmpRadioBtn.cpp @@ -4,7 +4,7 @@ // OFFSET: 0x0086C590 // FUNCTION: fn_11028 UIBmpRadioBtn::UIBmpRadioBtn() : UIWindow(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->geometry.id = 215; this->m_hovered = false; this->m_disabled = false; diff --git a/Source/UI/Buttons/UIBmpRadioBtn.h b/Source/UI/Buttons/UIBmpRadioBtn.h index 0ac9a2e02..d110bef2d 100644 --- a/Source/UI/Buttons/UIBmpRadioBtn.h +++ b/Source/UI/Buttons/UIBmpRadioBtn.h @@ -15,7 +15,7 @@ struct UIBmpRadioBtnText { /* 000C */ int height; /* 0010 */ bool bold; /* 0014 */ std::uint32_t color; - /* 0018 */ bool unknown_0018; + /* 0018 */ bool drawShadow; }; class UIBmpRadioBtn : public UIWindow { diff --git a/Source/UI/Buttons/UIBmpTextButton.cpp b/Source/UI/Buttons/UIBmpTextButton.cpp index 5fa725273..e0e80b194 100644 --- a/Source/UI/Buttons/UIBmpTextButton.cpp +++ b/Source/UI/Buttons/UIBmpTextButton.cpp @@ -30,7 +30,7 @@ void UIBmpTextButton::Paint() { for (; style != this->styles.end(); ++style) { if (this->m_disabled == 0) { - if (this->geometry.unknown_0030 == style->state) { + if (this->geometry.state == style->state) { found = true; break; } @@ -59,7 +59,7 @@ void UIBmpTextButton::Paint() { } } } else { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: { CBitmapRes* bitmap = dynamic_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[0].c_str()))); this->DrawBitmap(0, 0, bitmap, false); diff --git a/Source/UI/Buttons/UIBmpTextButton2.cpp b/Source/UI/Buttons/UIBmpTextButton2.cpp index 0b6387e9c..b624fa20c 100644 --- a/Source/UI/Buttons/UIBmpTextButton2.cpp +++ b/Source/UI/Buttons/UIBmpTextButton2.cpp @@ -14,9 +14,9 @@ void UIBmpTextButton2::Paint() { CBitmapRes* bitmap; if (this->m_disabled != 0) { - this->geometry.unknown_0030 = 3; + this->geometry.state = 3; } else { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[0].c_str()))); break; diff --git a/Source/UI/Buttons/UIButton.cpp b/Source/UI/Buttons/UIButton.cpp index fda8d5f06..e0aa40717 100644 --- a/Source/UI/Buttons/UIButton.cpp +++ b/Source/UI/Buttons/UIButton.cpp @@ -22,7 +22,7 @@ // OFFSET: 0x0084EDD0 // FUNCTION: fn_10653 UIButton::UIButton() : UIWindow(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->m_disabled = 0; this->m_argument = 0; } @@ -44,7 +44,7 @@ void UIButton::Paint() { CBitmapRes* bitmap; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\sml_button_up.bmp"))); break; @@ -68,7 +68,7 @@ void UIButton::OnLBtnDown(int, int) { } g_windowMgr.SetCapture(this); - this->geometry.unknown_0030 = 2; + this->geometry.state = 2; this->Invalidate(); } @@ -103,27 +103,27 @@ void UIButton::OnMouseMove(int x, int y) { if (g_windowMgr.Capture() == this) { if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { - if (this->geometry.unknown_0030 != 2) { - this->geometry.unknown_0030 = 2; + if (this->geometry.state != 2) { + this->geometry.state = 2; this->Invalidate(); } - } else if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + } else if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); } } else if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { - if (this->geometry.unknown_0030 != 1) { - this->geometry.unknown_0030 = 1; + if (this->geometry.state != 1) { + this->geometry.state = 1; this->Invalidate(); } - } else if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + } else if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); } UIWindow* parent = this->parent; - if (parent == g_windowMgr.unknown_01DC) { - parent->SendMsg(this, UM_COMMAND, ID_APPLY, this->geometry.unknown_0030 != 0, 0, 0); + if (parent == g_windowMgr.basicInfoWnd) { + parent->SendMsg(this, UM_COMMAND, ID_APPLY, this->geometry.state != 0, 0, 0); } } @@ -166,8 +166,8 @@ void UIButton::OnMouseHover(int x, int y) { // FUNCTION: fn_10874 void UIButton::OnMouseCheck(int x, int y) { if (x < this->geometry.x || (this->geometry.x + this->geometry.width) < x || y < this->geometry.y || (this->geometry.y + this->geometry.height) < y) { - if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); } } @@ -200,9 +200,9 @@ void UIButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; UIWindow* parent = this->parent; if (parent) { if (g_windowMgr.WindowPolicy(3, parent->geometry.id) != 0) { @@ -250,6 +250,6 @@ void UIButton::SetTooltip(const char* text) { // OFFSET: 0x00867BB0 // FUNCTION: fn_10947 void UIButton::SetState(int state) { - this->geometry.unknown_0030 = state; + this->geometry.state = state; this->Invalidate(); } diff --git a/Source/UI/Buttons/UICheckBox.cpp b/Source/UI/Buttons/UICheckBox.cpp index a385aba84..f3ef7be40 100644 --- a/Source/UI/Buttons/UICheckBox.cpp +++ b/Source/UI/Buttons/UICheckBox.cpp @@ -13,7 +13,7 @@ // FUNCTION: fn_10656 UICheckBox::UICheckBox() : UIWindow(0), m_disabled(0), m_hidden(0), m_color(0), m_fontHeight(12), m_message(-1), m_notify(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->geometry.id = 213; } @@ -38,7 +38,7 @@ void UICheckBox::Paint() { return; } - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: { CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_unchecked.c_str()))); this->DrawBitmap(0, (this->geometry.height - bitmap->image.height) / 2, bitmap, false); @@ -66,7 +66,7 @@ __forceinline void UICheckBox::Notify() { } if (this->parent) { - this->parent->SendMsg(this, UM_COMMAND, this->geometry.id, this->geometry.unknown_0030, 0, 0); + this->parent->SendMsg(this, UM_COMMAND, this->geometry.id, this->geometry.state, 0, 0); } } @@ -77,7 +77,7 @@ void UICheckBox::SetChecked(int value) { return; } - this->geometry.unknown_0030 = value; + this->geometry.state = value; this->Notify(); } @@ -96,7 +96,7 @@ void UICheckBox::OnLBtnDown(int, int) { return; } - this->geometry.unknown_0030 = 1u - this->geometry.unknown_0030; + this->geometry.state = 1u - this->geometry.state; this->Notify(); if (this->m_notify != 0) { this->parent->SendMsg(this, UM_TOGGLEPUSH, this->m_message, 0, 0, 0); @@ -119,7 +119,7 @@ void UICheckBox::OnMouseHover(int x, int y) { int screenY = -20; this->ToScreen(screenX, screenY); - if (this->geometry.unknown_0030 != 0 || this->m_uncheckedTooltip.empty()) { + if (this->geometry.state != 0 || this->m_uncheckedTooltip.empty()) { g_modeMgr.gameMode->ShowTooltip(this->m_tooltip.c_str(), screenX, screenY, -1, false, true); } else { g_modeMgr.gameMode->ShowTooltip(this->m_uncheckedTooltip.c_str(), screenX, screenY, -1, false, true); @@ -145,7 +145,7 @@ void UICheckBox::SetImages(const char* checked, const char* unchecked, const cha if (!this->m_text.empty()) { const int width = this->TextWidth(this->m_text.c_str(), 0, 0, 12, 0, 0); CBitmapRes* bitmap = nullptr; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_unchecked.c_str()))); break; @@ -190,7 +190,7 @@ void UICheckBox::FitToText() { const int width = this->TextWidth(this->m_text.c_str(), 0, 0, 12, 0, 0); CBitmapRes* bitmap = nullptr; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_unchecked.c_str()))); break; diff --git a/Source/UI/Buttons/UIColorButton.cpp b/Source/UI/Buttons/UIColorButton.cpp index f3d13c255..29ec49ca2 100644 --- a/Source/UI/Buttons/UIColorButton.cpp +++ b/Source/UI/Buttons/UIColorButton.cpp @@ -11,7 +11,7 @@ void UIColorButton::Paint() { this->ClearSurface(static_cast(red) | (static_cast(green) << 8) | (static_cast(blue) << 16)); std::uint32_t color; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: color = static_cast(this->normalRed) | (static_cast(this->normalGreen) << 8) | (static_cast(this->normalBlue) << 16); break; diff --git a/Source/UI/Buttons/UIDescriptRace.cpp b/Source/UI/Buttons/UIDescriptRace.cpp index 8c24f838e..af0ccd200 100644 --- a/Source/UI/Buttons/UIDescriptRace.cpp +++ b/Source/UI/Buttons/UIDescriptRace.cpp @@ -9,7 +9,7 @@ unsigned char g_doramCreationEnabled; // OFFSET: 0x0086D060 // FUNCTION: fn_11041 -UIDescriptRace::UIDescriptRace(int race) : m_race(race), unknown_0284(0) { +UIDescriptRace::UIDescriptRace(int race) : m_race(race), m_frameIndex(0) { this->m_createTime = timeGetTime(); this->m_noRace = race == 0; } diff --git a/Source/UI/Buttons/UIDescriptRace.h b/Source/UI/Buttons/UIDescriptRace.h index 6c7412de7..6982396b1 100644 --- a/Source/UI/Buttons/UIDescriptRace.h +++ b/Source/UI/Buttons/UIDescriptRace.h @@ -32,7 +32,7 @@ public: /* 0124 */ UIDescriptRaceText m_text; /* 026C */ unsigned char unknown_026C[0x14]; /* 0280 */ unsigned char m_noRace; - /* 0284 */ int unknown_0284; + /* 0284 */ int m_frameIndex; /* 0288 */ std::uint32_t m_createTime; }; diff --git a/Source/UI/Buttons/UIItemTagButton.h b/Source/UI/Buttons/UIItemTagButton.h index 0ab0557e2..d9b20ec37 100644 --- a/Source/UI/Buttons/UIItemTagButton.h +++ b/Source/UI/Buttons/UIItemTagButton.h @@ -16,11 +16,11 @@ public: void OnLBtnDown(int x, int y) override; void OnMouseHover(int x, int y) override; - /* 00F8 */ unsigned char unknown_00F8[0xF0]; + /* 00F8 */ unsigned char itemPayload[0xF0]; /* 01E8 */ unsigned char unknown_01E8[0x8]; /* 01F0 */ int column; /* 01F4 */ int line; - /* 01F8 */ int unknown_01F8; + /* 01F8 */ int tipId; /* 01FC */ int textY; }; diff --git a/Source/UI/Buttons/UIRadioBtn.cpp b/Source/UI/Buttons/UIRadioBtn.cpp index c302317b9..93271d1cb 100644 --- a/Source/UI/Buttons/UIRadioBtn.cpp +++ b/Source/UI/Buttons/UIRadioBtn.cpp @@ -17,7 +17,7 @@ void UIRadioBtn::Paint() { if (!this->checkedBitmap.empty() && !this->uncheckedBitmap.empty()) { this->ClearSurface(0xFFFF00FF); CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->checkedBitmap.c_str()))); - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->uncheckedBitmap.c_str()))); } @@ -35,7 +35,7 @@ void UIRadioBtn::Paint() { this->ClearSurface(0xFFFF00FF); const char* name; - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { name = "유저인터페이스\\radiobtn_off.bmp"; } else { name = this->highlighted != 0 ? "유저인터페이스\\radiobtn_on1.bmp" : "유저인터페이스\\radiobtn_on.bmp"; @@ -71,7 +71,7 @@ void UIRadioBtn::OnMouseHover(int x, int y) { // FUNCTION: fn_10919 int UIRadioBtn::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { if (message == UM_SETSTATE) { - this->geometry.unknown_0030 = argument1; + this->geometry.state = argument1; this->Invalidate(); } @@ -88,7 +88,7 @@ void UIRadioBtn::SetText(const char* value) { // OFFSET: 0x0084FFE0 // FUNCTION: fn_10670 UIRadioBtn::UIRadioBtn() : UIWindow(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->enabled = 1; this->geometry.id = 215; this->highlighted = 0; diff --git a/Source/UI/Buttons/UISlotBmpButton.cpp b/Source/UI/Buttons/UISlotBmpButton.cpp index 3f3afe664..90a517aaf 100644 --- a/Source/UI/Buttons/UISlotBmpButton.cpp +++ b/Source/UI/Buttons/UISlotBmpButton.cpp @@ -3,6 +3,6 @@ // OFFSET: 0x0086E8D0 // FUNCTION: fn_11078 UISlotBmpButton::UISlotBmpButton(int index, bool) - : UIBitmapButton(), m_index(index), unknown_0124(false), unknown_0128(0), m_slot(-1), icon(nullptr), unknown_0134(0), unknown_0136(5), + : UIBitmapButton(), m_index(index), m_selected(false), m_displayMode(0), m_slot(-1), icon(nullptr), m_animationTick(0), m_frameInterval(5), m_inRange(false) { } diff --git a/Source/UI/Buttons/UISlotBmpButton.h b/Source/UI/Buttons/UISlotBmpButton.h index 6d4447651..489e73d10 100644 --- a/Source/UI/Buttons/UISlotBmpButton.h +++ b/Source/UI/Buttons/UISlotBmpButton.h @@ -21,12 +21,12 @@ public: protected: /* 0120 */ int m_index; - /* 0124 */ bool unknown_0124; - /* 0128 */ int unknown_0128; + /* 0124 */ bool m_selected; + /* 0128 */ int m_displayMode; /* 012C */ int m_slot; /* 0130 */ UIStaticBitmap* icon; - /* 0134 */ short unknown_0134; - /* 0136 */ short unknown_0136; + /* 0134 */ short m_animationTick; + /* 0136 */ short m_frameInterval; /* 0138 */ bool m_inRange; }; diff --git a/Source/UI/Buttons/UISpriteButton.h b/Source/UI/Buttons/UISpriteButton.h index efecac19c..7b027c25c 100644 --- a/Source/UI/Buttons/UISpriteButton.h +++ b/Source/UI/Buttons/UISpriteButton.h @@ -22,19 +22,19 @@ public: void SetPalette(const char* name); public: - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; + /* 00B4 */ int spriteStateA; + /* 00B8 */ int spriteStateB; + /* 00BC */ int animationIndex; + /* 00C0 */ int frameIndex; + /* 00C4 */ int animate; + /* 00C8 */ int spriteMode; public: /* 00CC */ std::string spriteName; /* 00E4 */ std::string actionName; protected: - /* 00FC */ std::string unknown_00FC; + /* 00FC */ std::string paletteName; }; class UIHeadsprButton : public UISpriteButton { diff --git a/Source/UI/Buttons/UITVTextButton.h b/Source/UI/Buttons/UITVTextButton.h index 60fe1657e..72d49dfbd 100644 --- a/Source/UI/Buttons/UITVTextButton.h +++ b/Source/UI/Buttons/UITVTextButton.h @@ -23,9 +23,9 @@ public: void SetLabel(std::string text); protected: - /* 00B4 */ unsigned char unknown_00B4; - /* 00B5 */ unsigned char unknown_00B5; - /* 00B6 */ unsigned char unknown_00B6; + /* 00B4 */ unsigned char drawBackground; + /* 00B5 */ unsigned char highlighted; + /* 00B6 */ unsigned char mousePressed; /* 00B7 */ unsigned char m_border; /* 00B8 */ unsigned char m_fill; /* 00B9 */ unsigned char unknown_00B9[0x3]; @@ -38,7 +38,7 @@ protected: /* 00D1 */ unsigned char unknown_00D1[0x3]; /* 00D4 */ int m_fontHeight; /* 00D8 */ int m_fontFamily; - /* 00DC */ std::string unknown_00DC; + /* 00DC */ std::string displayText; /* 00F4 */ int m_value; }; diff --git a/Source/UI/Buttons/UITagButton.cpp b/Source/UI/Buttons/UITagButton.cpp index d8f10d35e..9d4453b79 100644 --- a/Source/UI/Buttons/UITagButton.cpp +++ b/Source/UI/Buttons/UITagButton.cpp @@ -33,9 +33,9 @@ void UITagButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_TEXT_LBTN_UP, this->geometry.id, this->m_value, 0, 0); diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 0dade1684..be34b8456 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -125,27 +125,27 @@ void UITextButton::OnMouseMove(int x, int y) { if (g_windowMgr.Capture() == this) { if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { this->m_color = this->m_hoverColor; - if (this->geometry.unknown_0030 != 2) { - this->geometry.unknown_0030 = 2; + if (this->geometry.state != 2) { + this->geometry.state = 2; this->Invalidate(); } } else { this->m_color = this->m_normalColor; - if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); } } } else if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { this->m_color = this->m_hoverColor; - if (this->geometry.unknown_0030 != 1) { - this->geometry.unknown_0030 = 1; + if (this->geometry.state != 1) { + this->geometry.state = 1; this->Invalidate(); } } else { this->m_color = this->m_normalColor; - if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); } } @@ -171,9 +171,9 @@ void UITextButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_TEXT_LBTN_UP, this->geometry.id, this->m_value, 0, 0); @@ -207,9 +207,9 @@ void UITextButton::OnRBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_TEXT_RBTN_UP, this->geometry.id, this->m_value, 0, 0); @@ -232,12 +232,12 @@ void UITextButton::OnWheel(int value) { // FUNCTION: fn_11446 void UITreeView::OnLBtnUp(int x, int y) { if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { - this->unknown_0088 = 0; + this->selectedNode = 0; } - this->unknown_008C = 0; - this->unknown_0090 = 0; - this->unknown_00AC = 0; + this->dragNode = 0; + this->dropNode = 0; + this->mouseInside = 0; this->Invalidate(); if (this->parent) { @@ -334,7 +334,7 @@ void UIBmpRadioBtn::AddText(int id, int height, std::uint32_t color, bool bold, text.height = height; text.bold = bold; text.color = color; - text.unknown_0018 = unknown; + text.drawShadow = unknown; if (x == -1000) { const int textWidth = @@ -513,10 +513,10 @@ void UIBasicItemCtrl::OnMouseHover(int, int) { if (std::atoi(this->m_item.itemId.c_str()) < 1) { text = this->m_tooltip; - } else if (this->m_item.unknown_0000[1] == 0) { + } else if (this->m_item.identity[1] == 0) { text = this->m_item.DisplayName(0); - } else if (this->m_item.unknown_0098 != 0) { - text = FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), this->m_item.DisplayName(0).c_str(), this->m_item.unknown_0098, this->m_item.quantity); + } else if (this->m_item.optionCount != 0) { + text = FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), this->m_item.DisplayName(0).c_str(), this->m_item.optionCount, this->m_item.quantity); } else { text = FormatOwnedString(LookupMessage(MSI_EA2), this->m_item.DisplayName(0).c_str(), this->m_item.quantity); } @@ -743,9 +743,9 @@ void UITabControl::RecalculateWidths() { int width; if (this->layout == 0 || this->layout == 2) { - width = this->VerticalTextHeight(this->labels[index].c_str(), 0, 0, this->unknown_00E8, 0); + width = this->VerticalTextHeight(this->labels[index].c_str(), 0, 0, this->fontSize, 0); } else { - width = this->TextWidth(this->labels[index].c_str(), 0, 0, this->unknown_00E8, 0, 0); + width = this->TextWidth(this->labels[index].c_str(), 0, 0, this->fontSize, 0, 0); } widest = std::max(width + this->tabPadding, widest); @@ -787,7 +787,7 @@ void UITVTextButton::ResizeToText() { return; } - this->unknown_00DC = this->label; + this->displayText = this->label; const int width = this->TextWidth(this->label.c_str(), 0, this->m_fontFamily, this->m_fontHeight, this->m_outlined, 0); const int border = this->m_border ? 2 : 0; @@ -852,7 +852,7 @@ int UIComboBoxV2Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume return 0; } - int height = this->unknown_0098->geometry.height; + int height = this->auxiliaryWindow->geometry.height; if (this->geometry.height <= height) { height += this->list->geometry.height; @@ -897,12 +897,12 @@ int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s std::string name(reinterpret_cast(argument3)); this->bitmapName = name + ".bmp"; this->baseName = name; - this->unknown_0090 = new bool[this->count]; - this->unknown_0094 = new bool[this->count]; + this->pressedItems = new bool[this->count]; + this->disabledItems = new bool[this->count]; for (int index = 0; index < this->count; ++index) { - this->unknown_0090[index] = false; - this->unknown_0094[index] = false; + this->pressedItems[index] = false; + this->disabledItems[index] = false; } this->Invalidate(); @@ -914,15 +914,15 @@ int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s return 0; case UM_SET_CALLER_WID: - this->unknown_00C8 = argument1; + this->callerWindowId = argument1; return 0; case 105: - this->unknown_0090[argument1 - 1] = argument2 != 0; + this->pressedItems[argument1 - 1] = argument2 != 0; return 0; case UM_SET_DISABLE: - this->unknown_0094[argument1 - 1] = argument2 != 0; + this->disabledItems[argument1 - 1] = argument2 != 0; return 0; default: @@ -934,7 +934,7 @@ int UIImgMenu::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, s // FUNCTION: fn_11541 int UIBmpRadioBtn::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) { if (message == UM_SETSTATE) { - this->geometry.unknown_0030 = static_cast(argument1); + this->geometry.state = static_cast(argument1); this->Invalidate(); } return 0; @@ -1005,18 +1005,18 @@ void UITVTextButton::OnMouseMove(int x, int y) { } if (x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height) { - if (this->geometry.unknown_0030 != 1) { - this->geometry.unknown_0030 = 1; + if (this->geometry.state != 1) { + this->geometry.state = 1; - if (this->parent && this->unknown_00B6 == 0) { + if (this->parent && this->mousePressed == 0) { this->parent->SendMsg(this, UM_MOUSE_HOVER_BTN, this->m_value, 0, 0, 0); } } - } else if (this->geometry.unknown_0030 != 0) { - this->geometry.unknown_0030 = 0; + } else if (this->geometry.state != 0) { + this->geometry.state = 0; this->Invalidate(); - this->unknown_00B4 = 0; - this->unknown_00B5 = 0; + this->drawBackground = 0; + this->highlighted = 0; } } @@ -1029,7 +1029,7 @@ void UITabControl::OnMouseMove(int x, int y) { if ((this->dragX == 0 && this->dragY == 0) || this->dragX - x > 5 || this->dragY - y > 5) { if (this->parent) { - this->parent->SendMsg(this, 117, this->unknown_007C, 0, 0, 0); + this->parent->SendMsg(this, 117, this->activeTabIndex, 0, 0, 0); } this->dragX = x; @@ -1040,7 +1040,7 @@ void UITabControl::OnMouseMove(int x, int y) { // OFFSET: 0x00892520 // FUNCTION: fn_11472 void UITreeView::OnMouseMove(int x, int y) { - this->unknown_00AC = x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height; + this->mouseInside = x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height; } // OFFSET: 0x00892560 @@ -1052,18 +1052,18 @@ void UIImgMenu::ResetCursor(int, int) { // OFFSET: 0x008925A0 // FUNCTION: fn_11475 void UIString::ResetCursor(int, int) { - if (!this->unknown_0084.empty() || !this->unknown_00AC.empty()) { + if (!this->link.empty() || !this->image.empty()) { g_modeMgr.gameMode->SetCursorAction(2); } } // OFFSET: 0x0086EA50 // FUNCTION: fn_11080 -UIString::UIString() : UIWindow(0), unknown_0080(1), unknown_009C(0), unknown_00A0(0), unknown_00A4(0) { - this->unknown_0084.clear(); - this->unknown_00AC.clear(); - this->unknown_00C4.clear(); - this->unknown_00DC.clear(); +UIString::UIString() : UIWindow(0), enabled(1), red(0), green(0), blue(0) { + this->link.clear(); + this->image.clear(); + this->fontName.clear(); + this->text.clear(); } // OFFSET: 0x008925D0 @@ -1132,10 +1132,10 @@ void UIEditCtrl_Currency::OnProcess() { // OFFSET: 0x00892910 // FUNCTION: fn_11478 void UISlotBmpButton::OnProcess() { - ++this->unknown_0134; + ++this->m_animationTick; - if (this->unknown_0134 / this->unknown_0136 > 7) { - this->unknown_0134 = 0; + if (this->m_animationTick / this->m_frameInterval > 7) { + this->m_animationTick = 0; } } @@ -1212,9 +1212,9 @@ void UIBitmapButton2::OnRBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_BMP_RBTN_UP, this->geometry.id, 0, 0, 0); @@ -1263,9 +1263,9 @@ void UITVBitmapButton::OnRBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_BMP_RBTN_UP, this->m_value, 0, 0, 0); @@ -1480,7 +1480,7 @@ void UITreeView::UpdateScrollBar() { } if (!overflow) { - this->unknown_00A8 = 0; + this->scrollRow = 0; this->itemCount = 0; } @@ -1491,7 +1491,7 @@ void UITreeView::UpdateScrollBar() { // OFFSET: 0x00892F90 // FUNCTION: fn_11502 void UITabControl::FillTab(int index, int x, int y, int width, int height, std::uint32_t color) { - if (this->unknown_00A9 != 0) { + if (this->skipTabFill != 0) { return; } @@ -1541,7 +1541,7 @@ void UITVTextButton::Paint() { const int inset = this->m_border != 0; - if (this->unknown_00B4 != 0) { + if (this->drawBackground != 0) { if (this->m_border != 0) { DrawRoundedBorder(*this, inset - 1, 0, this->geometry.width, this->geometry.height, this->m_borderColor); } @@ -1553,14 +1553,14 @@ void UITVTextButton::Paint() { std::uint32_t color = this->m_textColor; - if (this->unknown_00B5 != 0) { + if (this->highlighted != 0) { color = this->m_highlightColor; } if (this->m_outlined != 0) { - DrawOutlinedText(*this, inset + 1, 2, this->unknown_00DC.c_str(), 0, color, this->m_outlineColor, this->m_fontFamily, this->m_fontHeight, 1, 0); + DrawOutlinedText(*this, inset + 1, 2, this->displayText.c_str(), 0, color, this->m_outlineColor, this->m_fontFamily, this->m_fontHeight, 1, 0); } else { - this->DrawTextAt(inset + 1, 2, this->unknown_00DC.c_str(), 0, this->m_fontFamily, this->m_fontHeight, color, 0, 0); + this->DrawTextAt(inset + 1, 2, this->displayText.c_str(), 0, this->m_fontFamily, this->m_fontHeight, color, 0, 0); } } @@ -1617,7 +1617,7 @@ void UITVTextButton::OnLBtnDblClk(int x, int y) { return; } - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_TEXT_LBTN_DblClk, this->m_value, x, y, 0); @@ -1701,12 +1701,12 @@ void UITVTextButton::OnLBtnDown(int, int) { return; } - this->geometry.unknown_0030 = 2; + this->geometry.state = 2; this->Invalidate(); if (this->parent) { this->parent->SendMsg(this, UM_BEGIN_DRAG_BTN, this->m_value, 0, 0, 0); - this->unknown_00B6 = 1; + this->mousePressed = 1; } } @@ -1719,15 +1719,15 @@ void UITabControl::OnLBtnDown(int x, int y) { return; } - if (index < static_cast(this->labels.size()) && this->unknown_007C != index) { - this->unknown_007C = index; + if (index < static_cast(this->labels.size()) && this->activeTabIndex != index) { + this->activeTabIndex = index; } this->edit->SetText(""); this->edit->Move(-100, -100); if (this->parent) { - this->parent->SendMsg(this, UM_TAB, this->unknown_007C, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->activeTabIndex, 0, 0, 0); this->parent->Invalidate(); } @@ -1751,9 +1751,9 @@ void UIBitmapButton2::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_BMP_LBTN_UP, this->geometry.id, 0, 0, 0); @@ -1797,9 +1797,9 @@ void UITVBitmapButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_BMP_LBTN_UP, this->m_value, 0, 0, 0); @@ -1818,13 +1818,13 @@ void UITVTextButton::OnLBtnUp(int x, int y) { } if (this->parent) { - if (this->unknown_00B6 != 0) { + if (this->mousePressed != 0) { this->parent->SendMsg(this, UM_TEXT_LBTN_UP, this->m_value, x, y, 0); } else { this->parent->SendMsg(this, UM_END_DRAG_BTN, this->m_value, 0, 0, 0); } - this->unknown_00B6 = 0; + this->mousePressed = 0; } this->Invalidate(); @@ -2273,7 +2273,7 @@ void UIMemberListBox::Paint() { this->FillRegion(0, row * this->lineHeight + 1, this->geometry.width, this->lineHeight, 0xC8C832); } - this->DrawTextAt(2, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->unknown_00E4[index], 0, 0 + this->DrawTextAt(2, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->lineColors[index], 0, 0 ); } } @@ -2283,7 +2283,7 @@ void UIMemberListBox::Paint() { void UIBasicItemCtrl::Paint() { this->ClearSurface(0xFFFF00FF); const char* name = "유저인터페이스\\basic_interface\\itemwin_mid.bmp"; - if (std::atoi(this->m_item.itemId.c_str()) > 0 && this->m_item.unknown_0000[1] == 0) { + if (std::atoi(this->m_item.itemId.c_str()) > 0 && this->m_item.identity[1] == 0) { name = "유저인터페이스\\ExMacro\\no_item.bmp"; } @@ -2332,7 +2332,7 @@ void UIBmpRadioBtn::Paint() { CBitmapRes* bitmap; if (this->m_disabled == true) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[3].c_str()))); - } else if (this->geometry.unknown_0030 == 1) { + } else if (this->geometry.state == 1) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[2].c_str()))); } else if (this->m_hovered == true) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[1].c_str()))); @@ -2349,7 +2349,7 @@ void UIBmpRadioBtn::Paint() { if (this->m_disabled == true) { for (auto it = this->m_texts.begin(); it != this->m_texts.end(); ++it) { if (it->id == 3) { - if (it->unknown_0018 == true) { + if (it->drawShadow == true) { this->DrawTextAt(it->x, it->y, this->m_label.c_str(), 0, 0, it->height, 0xE2E2E2, 0, 0); } this->DrawTextAt(it->x + 1, it->y + 1, this->m_label.c_str(), 0, 0, it->height, it->color, it->bold, 0); @@ -2364,10 +2364,10 @@ void UIBmpRadioBtn::Paint() { return; } - if (this->geometry.unknown_0030 == 1) { + if (this->geometry.state == 1) { for (auto it = this->m_texts.begin(); it != this->m_texts.end(); ++it) { if (it->id == 2) { - if (it->unknown_0018 == true) { + if (it->drawShadow == true) { this->DrawTextAt(it->x, it->y, this->m_label.c_str(), 0, 0, it->height, 0xFFFFFF, it->bold, 0); } this->DrawTextAt(it->x + 1, it->y + 1, this->m_label.c_str(), 0, 0, it->height, it->color, it->bold, 0); @@ -2385,7 +2385,7 @@ void UIBmpRadioBtn::Paint() { if (this->m_hovered == true) { for (auto it = this->m_texts.begin(); it != this->m_texts.end(); ++it) { if (it->id == 1) { - if (it->unknown_0018 == true) { + if (it->drawShadow == true) { this->DrawTextAt(it->x + 1, it->y + 1, this->m_label.c_str(), 0, 0, it->height, 0xC7A796, it->bold, 0); } this->DrawTextAt(it->x, it->y, this->m_label.c_str(), 0, 0, it->height, it->color, it->bold, 0); @@ -2402,7 +2402,7 @@ void UIBmpRadioBtn::Paint() { for (auto it = this->m_texts.begin(); it != this->m_texts.end(); ++it) { if (it->id == 0) { - if (it->unknown_0018 == true) { + if (it->drawShadow == true) { this->DrawTextAt(it->x + 1, it->y + 1, this->m_label.c_str(), 0, 0, it->height, 0xD7D7D7, it->bold, 0); } this->DrawTextAt(it->x, it->y, this->m_label.c_str(), 0, 0, it->height, it->color, it->bold, 0); @@ -2726,15 +2726,15 @@ void UIDescriptRace::Paint() { // OFFSET: 0x00890330 // FUNCTION: fn_11410 void UITabControl::OnLBtnDblClk(int, int) { - if (this->layout == 0 || this->layout == 2 || !this->unknown_00A8) { + if (this->layout == 0 || this->layout == 2 || !this->allowTabRename) { return; } - this->edit->SetText(this->labels[this->unknown_007C].c_str()); - this->edit->Resize(this->widths[this->unknown_007C] - 4, this->geometry.height - 2); + this->edit->SetText(this->labels[this->activeTabIndex].c_str()); + this->edit->Resize(this->widths[this->activeTabIndex] - 4, this->geometry.height - 2); int x = 0; - for (int index = 0; index < this->unknown_007C; ++index) { + for (int index = 0; index < this->activeTabIndex; ++index) { x += this->widths[index] - 1; } @@ -2786,11 +2786,11 @@ void UIImgMenu::Paint() { auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); int offset = 3; - if (this->unknown_0090[this->hovered] == 0) { + if (this->pressedItems[this->hovered] == 0) { offset = 0; } - if (this->unknown_0094[this->hovered] == 0) { + if (this->disabledItems[this->hovered] == 0) { int x; int y; if (this->horizontal == 0) { @@ -2853,18 +2853,18 @@ void UIItemTagOnChat::PlaceTagButton(UIWindow* button, const std::string& name, // OFFSET: 0x00884870 // FUNCTION: fn_11311 void UIItemTagOnMail::PlaceTagButton(UIWindow* button, const std::string& name, const int&, int) { - if (!g_windowMgr.unknown_0458) { + if (!g_windowMgr.rodexComposeWnd) { return; } unsigned line = 0; int consumed = 0; - UIRodexComposeWnd* compose = reinterpret_cast(g_windowMgr.unknown_0458); + UIRodexComposeWnd* compose = reinterpret_cast(g_windowMgr.rodexComposeWnd); const int left = compose->m_contents->geometry.x; const int top = compose->m_contents->geometry.y; - const int lineHeight = compose->m_contents->unknown_0138; + const int lineHeight = compose->m_contents->lineHeight; std::string rest(name.c_str(), name.size()); - const int firstLine = compose->m_contents->unknown_0158; + const int firstLine = compose->m_contents->firstVisibleLine; const int visibleLines = compose->m_contents->geometry.height / lineHeight; for (; line < this->m_lines.size(); ++line) { @@ -2891,7 +2891,7 @@ void UIItemTagOnMail::PlaceTagButton(UIWindow* button, const std::string& name, // OFFSET: 0x00884C40 // FUNCTION: fn_11312 void UIItemTagOnMegaPhone::PlaceTagButton(UIWindow* button, const std::string& name, const int& x, int) { - UINpcEditDialogWnd* owner = reinterpret_cast(g_windowMgr.unknown_0318); + UINpcEditDialogWnd* owner = reinterpret_cast(g_windowMgr.npcTextEditDialogWnd); if (!owner || owner->edit->geometry.id != 492) { return; } @@ -2926,17 +2926,17 @@ void UIItemTagButton::OnLBtnDown(int x, int y) { if (this->m_value == 517) { if (UITipboxWnd* tipbox = static_cast(g_windowMgr.EnsureWindow(WID_TIPBOXWND))) { - tipbox->ShowTip(this->unknown_01F8); + tipbox->ShowTip(this->tipId); } return; } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { - this->parent->SendMsg(this, UM_TEXT_LBTN_UP, this->geometry.id, this->m_value, reinterpret_cast(this->unknown_00F8), 0); + this->parent->SendMsg(this, UM_TEXT_LBTN_UP, this->geometry.id, this->m_value, reinterpret_cast(this->itemPayload), 0); this->Invalidate(); return; } @@ -2978,18 +2978,18 @@ void UIComboBoxID::OnLBtnUp(int x, int y) { if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) { int extra = 0; - const auto found = this->unknown_00C4.find(this->selected); + const auto found = this->lineData.find(this->selected); - if (found != this->unknown_00C4.end()) { + if (found != this->lineData.end()) { extra = found->second; } target->SendMsg(nullptr, UM_COMBOBOX_SELECTED, this->lines[this->selected].id, extra, 0, 0); } else if (this->parent) { int extra = 0; - const auto found = this->unknown_00C4.find(this->selected); + const auto found = this->lineData.find(this->selected); - if (found != this->unknown_00C4.end()) { + if (found != this->lineData.end()) { extra = found->second; } @@ -3048,7 +3048,7 @@ void UIListBoxID::Paint() { this->parent->Invalidate(); } } else { - this->ClearSurface(RGB(this->unknown_007C[0], this->unknown_007C[4], this->unknown_007C[8])); + this->ClearSurface(RGB(this->backgroundChannels[0], this->backgroundChannels[4], this->backgroundChannels[8])); } const int first = this->topLine; @@ -3079,7 +3079,7 @@ void UIListBoxTitle::Paint() { this->parent->Invalidate(); } } else { - this->ClearSurface(RGB(this->unknown_007C[0], this->unknown_007C[4], this->unknown_007C[8])); + this->ClearSurface(RGB(this->backgroundChannels[0], this->backgroundChannels[4], this->backgroundChannels[8])); } const int first = this->topLine; @@ -3244,7 +3244,7 @@ void UIMonsterGage::Paint() { // FUNCTION: fn_11374 void UIPcGage::Paint() { this->ClearSurface(this->colors[0]); - if (this->unknown_009C == 0) { + if (this->displayMode == 0) { this->FillRegion(1, 1, this->geometry.width - 2, this->geometry.height - 2, this->colors[1]); if (this->maximum != 0) { const float percent = static_cast(this->current * 100 / this->maximum); @@ -3260,9 +3260,9 @@ void UIPcGage::Paint() { } else { this->FillRegion(1, 1, this->geometry.width - 2, (this->geometry.height - 3) / 2, this->colors[1]); this->FillRegion(1, this->geometry.height / 2 + 1, this->geometry.width - 2, (this->geometry.height - 3) / 2, this->colors[1]); - if (this->maximum != 0 && this->unknown_00AC != 0) { + if (this->maximum != 0 && this->secondaryMaximum != 0) { const float percent = static_cast(this->current * 100 / this->maximum); - const float second = static_cast(this->unknown_00A8 * 100 / this->unknown_00AC); + const float second = static_cast(this->secondaryValue * 100 / this->secondaryMaximum); if (percent != 0.0f) { this->FillRegion( 1, 1, static_cast(static_cast(this->geometry.width) * percent / 100.0f - 2.0f), (this->geometry.height - 3) / 2, @@ -3298,8 +3298,8 @@ void UIRechargeGage::Paint() { // FUNCTION: fn_11438 void UIImgMenu::OnLBtnUp(int x, int y) { this->hovered = this->ItemAt(x, y); - if (this->hovered != -1 && !this->unknown_0094[this->hovered]) { - if (UIWindow* target = g_windowMgr.LookupWindow(this->unknown_00C8)) { + if (this->hovered != -1 && !this->disabledItems[this->hovered]) { + if (UIWindow* target = g_windowMgr.LookupWindow(this->callerWindowId)) { target->SendMsg(nullptr, UM_MENU_SELECTED, this->hovered, this->geometry.id, 0, 0); } g_windowMgr.CloseWindow(0x7A); @@ -3311,17 +3311,17 @@ void UIImgMenu::OnLBtnUp(int x, int y) { // OFFSET: 0x00890EE0 // FUNCTION: fn_11441 void UIString::OnLBtnUp(int, int) { - if (!this->unknown_0084.empty()) { + if (!this->link.empty()) { UIWindow* window = g_windowMgr.EnsureWindow(WID_MONSTERDISPLAYWND); - window->SendMsg(nullptr, UM_CARDITEMILLUSTRATE, reinterpret_cast(this->unknown_0084.c_str()), 1, 0, 0); + window->SendMsg(nullptr, UM_CARDITEMILLUSTRATE, reinterpret_cast(this->link.c_str()), 1, 0, 0); UIWindow* frame = g_windowMgr.LookupWindow(WID_RENEWQUESTUI); UIWindow* parent = this->parent; window->Move( frame->geometry.x + (parent->geometry.x + 100 + this->geometry.x), frame->geometry.y + (parent->geometry.y - 60 + this->geometry.y) ); - } else if (!this->unknown_00AC.empty()) { + } else if (!this->image.empty()) { ITEM_INFO item; - item.itemId = this->unknown_00AC; + item.itemId = this->image; g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -3377,13 +3377,13 @@ void UITextViewEX::Paint() { int x = 0; for (UITextButton* button : buttons) { UIString* text = reinterpret_cast(button); - if (text->unknown_00DC != "\n") { + if (text->text != "\n") { text->Show(1); - x = text->unknown_0080 == 0 ? x : x - 5; + x = text->enabled == 0 ? x : x - 5; if (x < 0) { x = 0; } - text->Move(x, !text->unknown_00AC.empty() ? y - 7 : y); + text->Move(x, !text->image.empty() ? y - 7 : y); x = text->geometry.width + x + 5; } } @@ -3418,9 +3418,9 @@ UITVBitmapButton::UITVBitmapButton() // OFFSET: 0x0086EC10 // FUNCTION: fn_11082 UITVTextButton::UITVTextButton() : UIButton() { - this->unknown_00B4 = 0; - this->unknown_00B5 = 0; - this->unknown_00B6 = 0; + this->drawBackground = 0; + this->highlighted = 0; + this->mousePressed = 0; this->m_border = 0; this->m_value = 0; this->m_fill = 0; @@ -3465,7 +3465,7 @@ void UIChatHisBox2::Paint() { } else { x = 2; } - this->DrawTextAt(x, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->unknown_00E4[index], 0, 0); + this->DrawTextAt(x, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->lineColors[index], 0, 0); this->PlaceNaviLinks(index); this->PlaceItemTags(index); } @@ -3492,7 +3492,7 @@ void UIChatHisBox3::Paint() { FontCache& fonts = g_fontCache; for (int row = 0; top + row < static_cast(end); ++row) { const int index = top + row; - this->DrawTextAt(2, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, this->unknown_0134, this->unknown_00E4[index], 0, 0); + this->DrawTextAt(2, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, this->fontHeight, this->lineColors[index], 0, 0); this->PlaceNaviLinks(index); this->PlaceItemTags(index); } @@ -3515,21 +3515,21 @@ void UITreeView::Paint() { // OFFSET: 0x0088F450 // FUNCTION: fn_11388 void UIString::Paint() { - if (this->unknown_00DC.empty()) { + if (this->text.empty()) { return; } - std::uint32_t color = (static_cast(static_cast(this->unknown_00A4)) << 16) | - (static_cast(static_cast(this->unknown_00A0)) << 8) | - static_cast(static_cast(this->unknown_009C)); + std::uint32_t color = (static_cast(static_cast(this->blue)) << 16) | + (static_cast(static_cast(this->green)) << 8) | + static_cast(static_cast(this->red)); - const char* cur = this->unknown_00DC.c_str(); - const char* end = cur + this->unknown_00DC.size(); + const char* cur = this->text.c_str(); + const char* end = cur + this->text.size(); - if (!this->unknown_00AC.empty()) { + if (!this->image.empty()) { char path[128]; std::memset(path, 0, sizeof(path)); - g_session.IconPath(path, this->unknown_00AC.c_str(), 0); + g_session.IconPath(path, this->image.c_str(), 0); CRes* res = ResourceMgr::Instance().Load(Resolve(path)); if (!res) { return; @@ -3538,9 +3538,9 @@ void UIString::Paint() { while (cur < end) { cur = ParseColorCode(SegmentEnd(cur, end), color); } - DrawColoredText(*this, 24, 7, this->unknown_00DC.c_str(), static_cast(this->unknown_00DC.size()), color, 0, 12, false); + DrawColoredText(*this, 24, 7, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); } else { - DrawColoredText(*this, 0, 0, this->unknown_00DC.c_str(), static_cast(this->unknown_00DC.size()), color, 0, 12, false); + DrawColoredText(*this, 0, 0, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); } } @@ -3548,7 +3548,7 @@ void UIString::Paint() { // FUNCTION: fn_11557 int UISlotBmpButton::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { if (message == UM_SETSTATE) { - this->unknown_0124 = argument1 != 0; + this->m_selected = argument1 != 0; return 0; } @@ -3556,7 +3556,7 @@ int UISlotBmpButton::SendMsg(UIWindow* sender, int message, std::intptr_t argume return UIWindow::SendMsg(sender, message, argument1, argument2, argument3, argument4); } - this->unknown_0128 = static_cast(argument1); + this->m_displayMode = static_cast(argument1); const char* slot = argument1 != 0 ? "slot" : "slot2"; const char* img = this->m_inRange ? "img_buy" : "img_"; const std::string base = std::format("유저인터페이스\\select_character_ver3\\{}{}_", img, slot).c_str(); @@ -3580,8 +3580,8 @@ void UISlotBmpButton::Paint() { this->UIBitmapButton::Paint(); if (this->m_disabled == 0) { - if (this->unknown_0128 == 0) { - if (this->unknown_0124 == 1) { + if (this->m_displayMode == 0) { + if (this->m_selected == 1) { CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\select_character_ver3\\img_slot2_select.bmp"))); if (this->m_inRange) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\select_character_ver3\\img_buyslot2_select.bmp"))); @@ -3590,8 +3590,8 @@ void UISlotBmpButton::Paint() { this->DrawBitmap(0, 0, bitmap, false); } } - } else if (this->unknown_0128 == 1 && this->unknown_0124 == 1) { - const int count = this->unknown_0134 / this->unknown_0136; + } else if (this->m_displayMode == 1 && this->m_selected == 1) { + const int count = this->m_animationTick / this->m_frameInterval; const char* base = this->m_inRange ? "buyslot" : "slot"; const std::string path = std::format("유저인터페이스\\select_character_ver3\\img_{}_select{}.bmp", base, count); CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path.c_str()))); @@ -3601,7 +3601,7 @@ void UISlotBmpButton::Paint() { } } - if (this->m_index == 0 && g_session.unknown_59BC == 0) { + if (this->m_index == 0 && g_session.characterSlotState == 0) { CBitmapRes* balloon = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\select_character_ver3\\balloon.bmp"))); this->DrawBitmap(this->geometry.width / 2 - 0x2e, 0x1a, balloon, false); @@ -3647,7 +3647,7 @@ void UISlotBmpButton::Paint() { UIItemTagButton::UIItemTagButton() { new (reinterpret_cast(reinterpret_cast(this) + 0xF8)) ITEM_INFO(); this->textY = 1; - this->unknown_01F8 = 0; + this->tipId = 0; } diff --git a/Source/UI/Buttons/UITextureButton.cpp b/Source/UI/Buttons/UITextureButton.cpp index dbf8007d0..7c146e865 100644 --- a/Source/UI/Buttons/UITextureButton.cpp +++ b/Source/UI/Buttons/UITextureButton.cpp @@ -28,13 +28,13 @@ void UITextureButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - if (this->unknown_011C == 1) { - this->unknown_011D = this->unknown_011D == 0; + if (this->toggleEnabled == 1) { + this->toggled = this->toggled == 0; } - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; UIWindow* parent = this->parent; if (parent) { if (WindowPolicy(g_windowMgr.policy[0].actions, g_replayAnimationScaling != 0, 3, parent->geometry.id) > 0) { diff --git a/Source/UI/Buttons/UITextureButton.h b/Source/UI/Buttons/UITextureButton.h index 6722b32b7..2a131e628 100644 --- a/Source/UI/Buttons/UITextureButton.h +++ b/Source/UI/Buttons/UITextureButton.h @@ -19,14 +19,14 @@ public: /* 00D4 */ std::string hoverTexture; /* 00EC */ std::string pressedTexture; /* 0104 */ std::string disabledTexture; - /* 011C */ unsigned char unknown_011C; - /* 011D */ unsigned char unknown_011D; + /* 011C */ unsigned char toggleEnabled; + /* 011D */ unsigned char toggled; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(UITextureButton, normalTexture) == 0xBC); static_assert(offsetof(UITextureButton, disabledTexture) == 0x104); -static_assert(offsetof(UITextureButton, unknown_011C) == 0x11C); +static_assert(offsetof(UITextureButton, toggleEnabled) == 0x11C); #endif #endif diff --git a/Source/UI/CashEmotion/UICashEmotionListWnd.h b/Source/UI/CashEmotion/UICashEmotionListWnd.h index 00ad06cc6..0f7db86ad 100644 --- a/Source/UI/CashEmotion/UICashEmotionListWnd.h +++ b/Source/UI/CashEmotion/UICashEmotionListWnd.h @@ -46,11 +46,11 @@ protected: /* 00C4 */ UICashEmotionListChildWnd_Search* m_searchList; /* 00C8 */ std::map m_tabs; /* 00D0 */ char m_tab; - /* 00D4 */ UIBitmapButton* unknown_00D4; + /* 00D4 */ UIBitmapButton* m_backButton; /* 00D8 */ UIEditCtrl* m_searchEdit; - /* 00DC */ UIBitmapButton* unknown_00DC; - /* 00E0 */ UIBitmapButton* unknown_00E0; - /* 00E4 */ UIBitmapButton* unknown_00E4; + /* 00DC */ UIBitmapButton* m_searchButton; + /* 00E0 */ UIBitmapButton* m_shortcutButton; + /* 00E4 */ UIBitmapButton* m_buyButton; /* 00E8 */ UICashEmotionListChildWnd_Abstract* m_currentList; /* 00EC */ UIStaticText* m_period; }; diff --git a/Source/UI/CashEmotion/UICashEmotionPack.h b/Source/UI/CashEmotion/UICashEmotionPack.h index ca81e45aa..26981eb21 100644 --- a/Source/UI/CashEmotion/UICashEmotionPack.h +++ b/Source/UI/CashEmotion/UICashEmotionPack.h @@ -37,10 +37,10 @@ public: protected: /* 007C */ std::vector m_pieces; - /* 0088 */ UIStaticText* unknown_0088; + /* 0088 */ UIStaticText* packTitleText; /* 008C */ UIStaticText* m_titleText; /* 0090 */ std::string m_background; - /* 00A8 */ int unknown_00A8; + /* 00A8 */ int packId; /* 00AC */ std::string m_title; /* 00C4 */ std::string m_saleBadge; /* 00DC */ bool m_limited; diff --git a/Source/UI/CashShop/UICashShopWnd.cpp b/Source/UI/CashShop/UICashShopWnd.cpp index 149a08a78..64a54d605 100644 --- a/Source/UI/CashShop/UICashShopWnd.cpp +++ b/Source/UI/CashShop/UICashShopWnd.cpp @@ -78,7 +78,7 @@ struct CashShopReplaceCartItemText { // FUNCTION: fn_09511 UICashShopWnd::UICashShopWnd() : UIFrameWnd(0), m_banner(nullptr), m_secondBanner(nullptr), m_selectedTab(0), m_itemsPerPage(9), m_columns(3), m_page(0), - m_pageCount(0), unknown_00E0(nullptr), unknown_00E8(0), unknown_00EC(0), unknown_00F0(0), unknown_00F4(nullptr), m_cart(nullptr) { + m_pageCount(0), m_searchEdit(nullptr), m_cashPoints(0), m_secondaryPoints(0), m_totalPrice(0), m_pointsEdit(nullptr), m_cart(nullptr) { } // OFFSET: 0x007CD750 @@ -211,7 +211,7 @@ void UICashShopWnd::OnCreate(int, int) { this->m_banner->SetSize(0x213, 0x33); this->m_banner->Move(3, 0x12); this->AddChild(this->m_banner); - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { this->m_secondBanner = new UICashShopWnd_Banner(); this->m_secondBanner->SetSize(0xB0, 0x38); this->m_secondBanner->Move(0x21A, 0x1A9); @@ -284,23 +284,23 @@ void UICashShopWnd::OnCreate(int, int) { charge->SetId(0x11C); this->AddChild(charge); - this->unknown_00E4 = new UIBmpTextButton(); - this->unknown_00E4->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_normal.bmp", 0, 0); - this->unknown_00E4->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_press.bmp", 1, 0); - this->unknown_00E4->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_press.bmp", 2, 0); - this->unknown_00E4->SetSize(this->unknown_00E4->BitmapWidth(), this->unknown_00E4->BitmapHeight()); - this->unknown_00E4->SetText(LookupMessage(MSI_STAR_EMPEROR_M)); - this->unknown_00E4->Move(0x1C4, 0x204); - this->unknown_00E4->SetId(0x19F); - this->AddChild(this->unknown_00E4); + this->m_refreshButton = new UIBmpTextButton(); + this->m_refreshButton->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_normal.bmp", 0, 0); + this->m_refreshButton->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_press.bmp", 1, 0); + this->m_refreshButton->SetBitmap("유저인터페이스\\cashshop\\btn_refresh_press.bmp", 2, 0); + this->m_refreshButton->SetSize(this->m_refreshButton->BitmapWidth(), this->m_refreshButton->BitmapHeight()); + this->m_refreshButton->SetText(LookupMessage(MSI_STAR_EMPEROR_M)); + this->m_refreshButton->Move(0x1C4, 0x204); + this->m_refreshButton->SetId(0x19F); + this->AddChild(this->m_refreshButton); - this->unknown_00E0 = new UIEditCtrl(); - this->unknown_00E0->SetSize(0x123, 0xE); - this->unknown_00E0->Move(0x5E, 0x206); - this->unknown_00E0->preserveInput = 1; - this->unknown_00E0->SetText(LookupMessage(MSI_CASHSHOP_CASH_POINT)); - this->unknown_00E0->TextColor(0xB1B1B1, 0xFFFFFFFFu); - this->AddChild(this->unknown_00E0); + this->m_searchEdit = new UIEditCtrl(); + this->m_searchEdit->SetSize(0x123, 0xE); + this->m_searchEdit->Move(0x5E, 0x206); + this->m_searchEdit->preserveInput = 1; + this->m_searchEdit->SetText(LookupMessage(MSI_CASHSHOP_CASH_POINT)); + this->m_searchEdit->TextColor(0xB1B1B1, 0xFFFFFFFFu); + this->AddChild(this->m_searchEdit); UIBitmapButton* search = new UIBitmapButton(); search->SetBitmap("유저인터페이스\\cashshop\\btn_searchbar_normal.bmp", 0, 0); @@ -321,14 +321,14 @@ void UICashShopWnd::OnCreate(int, int) { buy->SetId(0xE0); this->AddChild(buy); - this->unknown_00F4 = new UIEditCtrl_Custom(); - this->unknown_00F4->SetSize(0x3E, 0xE); - this->unknown_00F4->Move(0x27C, 0x1C0); - this->unknown_00F4->unknown_0128 = 1; - this->unknown_00F4->Background(0xCE, 0xD6, 0xEB); - this->unknown_00F4->maximum = 10; - this->unknown_00F4->SetText(IntToString(0, 0).c_str()); - this->AddChild(this->unknown_00F4); + this->m_pointsEdit = new UIEditCtrl_Custom(); + this->m_pointsEdit->SetSize(0x3E, 0xE); + this->m_pointsEdit->Move(0x27C, 0x1C0); + this->m_pointsEdit->labelAlignment = 1; + this->m_pointsEdit->Background(0xCE, 0xD6, 0xEB); + this->m_pointsEdit->maximum = 10; + this->m_pointsEdit->SetText(IntToString(0, 0).c_str()); + this->AddChild(this->m_pointsEdit); for (int index = 0; index < this->m_itemsPerPage; ++index) { UICashShopWnd_Item* item = new UICashShopWnd_Item(); @@ -347,9 +347,9 @@ void UICashShopWnd::OnCreate(int, int) { this->SendMsg(this->m_tabButtons[this->m_selectedTab], UM_COMMAND, ID_RADIOBTN, 0, 0, 0); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); g_modeMgr.GetGameMode()->SendMsg(MM_GET_ACCOUNT_LIMITED_SALE_LIST, 0, 0, 0, 0); - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { charge->Enable(0); - this->unknown_00F4->Show(0); + this->m_pointsEdit->Show(0); } } @@ -434,7 +434,7 @@ void UICashShopWnd_Item::OnCreate(int, int) { void UICashShopWnd::Paint() { const char* background = this->m_selectedTab == 9 ? "유저인터페이스\\cashshop\\img_shop_bg2.bmp" : "유저인터페이스\\cashshop\\img_shop_bg.bmp"; this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve(background))), false); - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { this->DrawBitmap( 0x218, 0x11, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_bg3_cover.bmp"))), false ); @@ -447,12 +447,12 @@ void UICashShopWnd::Paint() { this->DrawWrappedFormattedText(0xF7, 0x1EE, FormatOwnedString("^b%d^/b / %d", this->m_page + 1, this->m_pageCount), 0x2B, 0, 6, 0, 0xC, 0x6B2921, 0); } - if (!g_session.unknown_5912) { + if (!g_session.characterRenameEnabled) { this->DrawCenteredText(0x21A, 0x1B, LookupMessage(MSI_CASHSHOP_TAB_LIMITED), 0xB9, 0, 0xE, 0, 1); this->DrawCenteredText(0x219, 0x1A, LookupMessage(MSI_CASHSHOP_TAB_LIMITED), 0xB9, 0, 0xE, 0xFFFFFF, 1); - this->DrawRightAlignedText(0x273, 0x33, IntToString(this->unknown_00E8, 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); + this->DrawRightAlignedText(0x273, 0x33, IntToString(this->m_cashPoints, 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); this->DrawTextAt(0x226, 0x1B2, LookupMessage(MSI_CASHSHOP_REFRESH), 0, 0, 0xC, 0, 0, 0); - this->DrawRightAlignedText(0x2C4, 0x1B2, FormatOwnedString("%d C", this->unknown_00EC).c_str(), 0, 0, 0xC, 0, 0); + this->DrawRightAlignedText(0x2C4, 0x1B2, FormatOwnedString("%d C", this->m_secondaryPoints).c_str(), 0, 0, 0xC, 0, 0); this->DrawTextAt(0x226, 0x1C2, LookupMessage(MSI_STAR_EMPEROR_F), 0, 0, 0xC, 0, 0, 0); this->DrawRightAlignedText(0x2C4, 0x1C2, "C", 0, 0, 0xC, 0, 0); this->DrawTextAt(0x226, 0x1D2, LookupMessage(MSI_SOUL_REAPER_F), 0, 0, 0xC, 0, 0, 0); @@ -470,7 +470,7 @@ void UICashShopWnd::Paint() { } } - this->DrawCenteredText(0x228, 0x1EC, FormatOwnedString("%d C", this->unknown_00F0).c_str(), 0x9A, 0, 0xE, 0xFFFFFF, 1); + this->DrawCenteredText(0x228, 0x1EC, FormatOwnedString("%d C", this->m_totalPrice).c_str(), 0x9A, 0, 0xE, 0xFFFFFF, 1); } // OFFSET: 0x007D04F0 @@ -511,7 +511,7 @@ void UICashShopWnd_CartItem::Paint() { 0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg2.bmp"))), false ); - std::string name = this->FitDisplayText(0x70, this->m_item.unknown_0044.c_str(), 0, 0xB, 0); + std::string name = this->FitDisplayText(0x70, this->m_item.displayName.c_str(), 0, 0xB, 0); this->DrawTextAt(0x30, 0xC, name.c_str(), 0, 0, 0xB, 0x902418, 0, 0); CBitmapRes* icon = static_cast( @@ -521,7 +521,7 @@ void UICashShopWnd_CartItem::Paint() { this->DrawBitmapScaled(4, 0, static_cast(icon->image.width * 0.5), static_cast(icon->image.height * 0.5), &icon->image, 1); } - this->DrawRightAlignedText(0xA0, 0x22, FormatOwnedString("%d C", this->m_item.unknown_0014[0]).c_str(), 0, 0, 0xC, 0, 0); + this->DrawRightAlignedText(0xA0, 0x22, FormatOwnedString("%d C", this->m_item.prices[0]).c_str(), 0, 0, 0xC, 0, 0); this->DrawCenteredText(0x32, 0x21, IntToString(this->m_item.quantity, 0).c_str(), 0x20, 0, 0xB, 0, 0); } @@ -534,15 +534,15 @@ void UICashShopWnd_Item::Paint() { ); std::string stock; - if (this->m_item.unknown_0014[0] == 0) { + if (this->m_item.prices[0] == 0) { stock = FormatOwnedString(LookupMessage(MSI_CASHSHOP_NON_TRADABLE)); } else { stock = FormatOwnedString(LookupMessage(MSI_MAP_PROPERTY_DISABLE_CALLED), this->m_item.quantity); } this->DrawCenteredOutlinedText(6, 0x22, stock.c_str(), 0x49, 0, 0xFFFFFF, 0, 0, 0xB, 1); - if (this->m_item.unknown_0000[1] != 0) { - std::string name = this->FitDisplayText(0xA8, this->m_item.unknown_0044.c_str(), 0, 0xC, 1); + if (this->m_item.identity[1] != 0) { + std::string name = this->FitDisplayText(0xA8, this->m_item.displayName.c_str(), 0, 0xC, 1); this->DrawCenteredText(0, 6, name.c_str(), this->geometry.width, 0, 0xC, 0xA44F3B, 1); this->DrawBitmap( 5, 0x34, @@ -551,24 +551,24 @@ void UICashShopWnd_Item::Paint() { ), true ); - this->DrawRightAlignedText(0xA0, 0x32, IntToString(this->m_item.unknown_0014[0], 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); + this->DrawRightAlignedText(0xA0, 0x32, IntToString(this->m_item.prices[0], 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); } - if (this->m_item.unknown_0014[0] == 0) { + if (this->m_item.prices[0] == 0) { this->DrawTextAt(0x53, 0x4C, LookupMessage(MSI_ZEROQUEST_QUESTVIEW_ON), 0, 0, 0xB, 0xFF, 0, 0); } else { std::string count; - if (static_cast(this->m_item.unknown_0078[3]) < 0) { + if (static_cast(this->m_item.saleData[3]) < 0) { count = FormatOwnedString("%d/%d", 0, this->m_item.quantity); } else { - count = FormatOwnedString("%d/%d", this->m_item.unknown_0078[3], this->m_item.quantity); + count = FormatOwnedString("%d/%d", this->m_item.saleData[3], this->m_item.quantity); } this->DrawTextAt(0x53, 0x4C, LookupMessage(MSI_ACCOUNT_LIMITED_SALE_ITEM_SOLD_OUT), 0, 0, 0xB, 0x6E4B41, 0, 0); this->DrawCenteredOutlinedText(0x53, 0x5B, count.c_str(), 0x51, 0, 0xFFFFFF, 0xD29374, 0, 0x10, 1); } - __time32_t& start = reinterpret_cast<__time32_t&>(this->m_item.unknown_0078[1]); - __time32_t& end = reinterpret_cast<__time32_t&>(this->m_item.unknown_0078[2]); + __time32_t& start = reinterpret_cast<__time32_t&>(this->m_item.saleData[1]); + __time32_t& end = reinterpret_cast<__time32_t&>(this->m_item.saleData[2]); start = start < 0 ? 0 : start; end = end < 0 ? 0 : end; @@ -590,11 +590,11 @@ void UICashShopWnd_Item::Paint() { this->DrawBitmap( 0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\cashshop\\img_shop_itemBg.bmp"))), false ); - if (this->m_item.unknown_0000[1] == 0) { + if (this->m_item.identity[1] == 0) { return; } - std::string name = this->FitDisplayText(0xA8, this->m_item.unknown_0044.c_str(), 0, 0xC, 1); + std::string name = this->FitDisplayText(0xA8, this->m_item.displayName.c_str(), 0, 0xC, 1); this->DrawCenteredText(0, 6, name.c_str(), this->geometry.width, 0, 0xC, 0xA44F3B, 1); this->DrawBitmap( 5, 0x17, @@ -603,7 +603,7 @@ void UICashShopWnd_Item::Paint() { ), true ); - this->DrawRightAlignedText(0xA0, 0x32, IntToString(this->m_item.unknown_0014[0], 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); + this->DrawRightAlignedText(0xA0, 0x32, IntToString(this->m_item.prices[0], 0).c_str(), 0, 0, 0xC, 0xFFFFFF, 1); } } @@ -616,7 +616,7 @@ void UICashShopWnd_CartItem::OnLBtnDblClk(int, int) { // OFFSET: 0x007D1040 // FUNCTION: fn_09545 void UICashShopWnd_CartItem::OnLBtnDown(int, int) { - if (this->m_item.unknown_0000[1] != 0) { + if (this->m_item.identity[1] != 0) { static_cast(g_modeMgr.GetGameMode()) ->drag.BeginItem(g_windowMgr, 4, this->m_item, this->m_item.quantity, -1); } @@ -625,7 +625,7 @@ void UICashShopWnd_CartItem::OnLBtnDown(int, int) { // OFFSET: 0x007D1080 // FUNCTION: fn_09546 void UICashShopWnd_Item::OnLBtnDown(int, int) { - if (this->m_item.unknown_0000[1] != 0) { + if (this->m_item.identity[1] != 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 6, this->m_item, 1, -1); } } @@ -648,7 +648,7 @@ void UICashShopWnd_CartItem::OnMouseHover(int x, int y) { int screenX = 0; int screenY = -10; this->ToScreen(screenX, screenY); - g_modeMgr.gameMode->ShowTooltip(this->m_item.unknown_0044.c_str(), screenX, screenY, 0xFFFFFFFFu, 0, 1); + g_modeMgr.gameMode->ShowTooltip(this->m_item.displayName.c_str(), screenX, screenY, 0xFFFFFFFFu, 0, 1); } } @@ -659,7 +659,7 @@ void UICashShopWnd_Item::OnMouseHover(int x, int y) { int screenX = 0; int screenY = -20; this->ToScreen(screenX, screenY); - g_modeMgr.gameMode->ShowTooltip(this->m_item.unknown_0044.c_str(), screenX, screenY, 0xFFFFFFFFu, 0, 1); + g_modeMgr.gameMode->ShowTooltip(this->m_item.displayName.c_str(), screenX, screenY, 0xFFFFFFFFu, 0, 1); } } @@ -672,23 +672,23 @@ void UICashShopWnd_Banner::ResetCursor(int, int) { // OFFSET: 0x007D1240 // FUNCTION: fn_09551 void UICashShopWnd::OnProcess() { - std::string search(this->unknown_00E0->Text()); + std::string search(this->m_searchEdit->Text()); if (search.compare(LookupMessage(MSI_CASHSHOP_CASH_POINT)) != 0) { if (search.size() == 0) { - this->unknown_00E0->SetText(LookupMessage(MSI_CASHSHOP_CASH_POINT)); - this->unknown_00E0->TextColor(0xB1B1B1, 0xFFFFFFFFu); + this->m_searchEdit->SetText(LookupMessage(MSI_CASHSHOP_CASH_POINT)); + this->m_searchEdit->TextColor(0xB1B1B1, 0xFFFFFFFFu); } else { - this->unknown_00E0->TextColor(0, 0xFFFFFFFFu); + this->m_searchEdit->TextColor(0, 0xFFFFFFFFu); } } - std::string amount(this->unknown_00F4->Text()); + std::string amount(this->m_pointsEdit->Text()); if (amount.size() == 0) { - this->unknown_00F4->SetText(IntToString(0, 0).c_str()); + this->m_pointsEdit->SetText(IntToString(0, 0).c_str()); } this->m_banner->OnProcess(); - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { this->m_secondBanner->OnProcess(); } } @@ -768,7 +768,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument const CSession& lists = g_session; switch (message) { case UM_SETINFO: - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { if (g_session.m_hotkeyScript->Call("set_stoveshop_banner", "") == true) { this->m_banner->CreateButtons(); this->m_secondBanner->CreateButtons(); @@ -792,15 +792,15 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument } RegCloseKey(key); - this->unknown_00E8 = argument1; - this->unknown_00EC = argument2; - this->unknown_00F4->SetText(IntToString(0, 0).c_str()); + this->m_cashPoints = argument1; + this->m_secondaryPoints = argument2; + this->m_pointsEdit->SetText(IntToString(0, 0).c_str()); this->SendMsg(this, UM_COMMAND, 0x182, 0, 0, 0); return 0; } case UM_SET_CASHSHOP_TOTAL_PRICE: - this->unknown_00F0 = argument1; + this->m_totalPrice = argument1; this->Invalidate(); return 0; @@ -808,7 +808,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->m_items.clear(); for (int index = 0; index < lists.GetList1788(this->m_selectedTab); ++index) { ITEM_INFO item = g_session.GetItem1784At(this->m_selectedTab, index); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->m_items.push_back(item); } } @@ -822,7 +822,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument return 0; case UM_DEFPUSH: - if (sender == this->unknown_00E0) { + if (sender == this->m_searchEdit) { this->SendMsg(nullptr, UM_COMMAND, ID_SEARCH, 0, 0, 0); } return 0; @@ -868,7 +868,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument } if (product != this->m_items.end()) { - const int stock = product->unknown_0078[3]; + const int stock = product->saleData[3]; if (stock <= 0) { g_windowMgr.Confirm(LookupMessage(MSI_HAVE_ITEMTAG), 0, true, false, 0, "Message", 0x118, 0x78, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -909,7 +909,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument case UM_COMMAND: switch (argument1) { case ID_CLOSE: - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { g_modeMgr.GetGameMode()->SendMsg(MM_STOVE_AUTHENTICATION, 5, 0, 0, 0); } g_windowMgr.CloseWindow(WID_CASHSHOP_WND); @@ -932,7 +932,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - this->unknown_00E4->Enable(this->m_selectedTab == 9); + this->m_refreshButton->Enable(this->m_selectedTab == 9); HKEY key; DWORD disposition = 0; if (RegCreateKeyExA(HKEY_LOCAL_MACHINE, g_subKey, 0, nullptr, 0, KEY_ALL_ACCESS, nullptr, &key, &disposition) == ERROR_SUCCESS) { @@ -948,9 +948,9 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument return 0; } - if (g_session.unknown_5912) { + if (g_session.characterRenameEnabled) { const int owned = lists.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50(); - if (g_session.m_weight > g_session.m_maxWeight * 0.7f || cartItems.front().quantity + owned > g_session.unknown_7FBC + 100) { + if (g_session.m_weight > g_session.m_maxWeight * 0.7f || cartItems.front().quantity + owned > g_session.extraInventorySlots + 100) { g_windowMgr.Confirm(LookupMessage(MSI_ANOTHER_WORKING), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; } @@ -959,14 +959,14 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument return 0; } - const int points = atoi(this->unknown_00F4->Text()); - const int price = this->unknown_00F0; + const int points = atoi(this->m_pointsEdit->Text()); + const int price = this->m_totalPrice; if (price < points) { g_windowMgr.Confirm(LookupMessage(MSI_BUY_CASH_FAIL2), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; } - const int available = this->unknown_00E8 + points; + const int available = this->m_cashPoints + points; char text[0x800]; if (points > 0) { FormatMessageBuffer(text, LookupMessage(MSI_CHANGE_MATERIAL_INVSORT), price - points, points); @@ -974,7 +974,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument FormatMessageBuffer(text, LookupMessage(MSI_BILLING_INFO_URL), price); } - if (this->unknown_00F0 > available) { + if (this->m_totalPrice > available) { g_windowMgr.Confirm(LookupMessage(MSI_BUY_CASH_FAIL_MONEY), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; } @@ -998,7 +998,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument CashItemPurchase& purchase = packet.items[index]; purchase.itemId = atoi(item.itemId.c_str()); purchase.quantity = item.quantity; - purchase.tab = item.unknown_0064; + purchase.tab = item.bindOnEquip; } GetRagConnection().Send(static_cast(length), &packet); @@ -1016,7 +1016,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->LayoutPage(); return 0; case ID_SEARCH: { - std::string query(this->unknown_00E0->Text()); + std::string query(this->m_searchEdit->Text()); if (query.size() != 0 && strcmp(query.c_str(), LookupMessage(MSI_CASHSHOP_CASH_POINT)) != 0) { itemLists.ClearItems1784(10); for (int list = 0; list < 11; ++list) { @@ -1026,9 +1026,9 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument for (int index = 0; index < lists.GetList1788(list); ++index) { ITEM_INFO item = g_session.GetItem1784At(list, index); - std::string name(item.unknown_0044); + std::string name(item.displayName); if (name.find(query) != std::string::npos && !g_session.HasItem17D4(atoi(item.itemId.c_str()))) { - g_session.unknown_1784[10].push_back(item); + g_session.inventoryCategories[10].push_back(item); } } } @@ -1056,7 +1056,7 @@ int UICashShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument return 0; } case 0x182: - this->unknown_00F0 = 0; + this->m_totalPrice = 0; this->m_cart->m_cartItems.clear(); this->m_cart->SendMsg(this->m_cart, UM_SCROLLVERT, 0, 0, 0, 0); this->m_cart->Invalidate(); @@ -1177,9 +1177,9 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg } if (it == this->m_cartItems.end()) { - if (g_session.unknown_5912 && !this->m_cartItems.empty()) { + if (g_session.characterRenameEnabled && !this->m_cartItems.empty()) { const int result = - g_windowMgr.Confirm(FormatOwnedString(CashShopReplaceCartItemText()().Text(), item.unknown_0044.c_str()).c_str(), 2, true, false, 0, "Message", 0x118, 0x78, 0); + g_windowMgr.Confirm(FormatOwnedString(CashShopReplaceCartItemText()().Text(), item.displayName.c_str()).c_str(), 2, true, false, 0, "Message", 0x118, 0x78, 0); if (result != 0xBB) { break; } @@ -1192,7 +1192,7 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg } ITEM_INFO entry(item); - const int limit = entry.unknown_0078[3]; + const int limit = entry.saleData[3]; if (limit != 0) { if (quantity > limit) { g_windowMgr.Confirm(FormatOwnedString(LookupMessage(MSI_BARGAINSALE_TOOLWND_CALL), limit).c_str(), 0, true, false, 0, "Message", 0x118, 0x78, 0); @@ -1205,10 +1205,10 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg this->m_cartItems.push_back(entry); this->SendMsg(this, UM_SCROLLVERT, 1, 0, 0, 0); } else { - const int limit = it->unknown_0078[3]; + const int limit = it->saleData[3]; if (limit != 0 && it->quantity + quantity > limit) { g_windowMgr.Confirm(FormatOwnedString(LookupMessage(MSI_BARGAINSALE_TOOLWND_CALL), limit).c_str(), 0, true, false, 0, "Message", 0x118, 0x78, 0); - quantity = it->unknown_0078[3] - it->quantity; + quantity = it->saleData[3] - it->quantity; if (quantity == 0) { return -1; } @@ -1227,7 +1227,7 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->parent != nullptr) { int price = 0; for (const ITEM_INFO& entry : this->m_cartItems) { - price += entry.unknown_0014[0] * entry.quantity; + price += entry.prices[0] * entry.quantity; } this->parent->SendMsg(this, UM_SET_CASHSHOP_TOTAL_PRICE, price, 0, 0, 0); } @@ -1253,7 +1253,7 @@ int UICashShopWnd_Cart::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->parent != nullptr) { int price = 0; for (const ITEM_INFO& entry : this->m_cartItems) { - price += entry.unknown_0014[0] * entry.quantity; + price += entry.prices[0] * entry.quantity; } this->parent->SendMsg(this, UM_SET_CASHSHOP_TOTAL_PRICE, price, 0, 0, 0); } @@ -1314,7 +1314,7 @@ int UICashShopWnd_Item::SendMsg(UIWindow* sender, int message, std::intptr_t arg this->m_soldOut->Show(0); this->m_largeLayout = argument2 == 9; if (argument2 == 9) { - if (static_cast(this->m_item.unknown_0078[3]) > 0) { + if (static_cast(this->m_item.saleData[3]) > 0) { this->m_addButton->Move(0x53, 0x78); this->m_addButton->SetText(LookupMessage(MSI_BUY)); this->m_addButton->AddTextStyle(0, 0xC, 0, 0, 1, -1000, -1000); diff --git a/Source/UI/CashShop/UICashShopWnd.h b/Source/UI/CashShop/UICashShopWnd.h index 46aa0a27c..a5489eb30 100644 --- a/Source/UI/CashShop/UICashShopWnd.h +++ b/Source/UI/CashShop/UICashShopWnd.h @@ -115,12 +115,12 @@ public: /* 00D4 */ int m_columns; /* 00D8 */ int m_page; /* 00DC */ int m_pageCount; - /* 00E0 */ UIEditCtrl* unknown_00E0; - /* 00E4 */ UIBmpTextButton* unknown_00E4; - /* 00E8 */ int unknown_00E8; - /* 00EC */ int unknown_00EC; - /* 00F0 */ int unknown_00F0; - /* 00F4 */ UIEditCtrl_Custom* unknown_00F4; + /* 00E0 */ UIEditCtrl* m_searchEdit; + /* 00E4 */ UIBmpTextButton* m_refreshButton; + /* 00E8 */ int m_cashPoints; + /* 00EC */ int m_secondaryPoints; + /* 00F0 */ int m_totalPrice; + /* 00F4 */ UIEditCtrl_Custom* m_pointsEdit; /* 00F8 */ std::vector m_itemWindows; /* 0104 */ UICashShopWnd_Cart* m_cart; }; diff --git a/Source/UI/Chat/ChatSuggestions.cpp b/Source/UI/Chat/ChatSuggestions.cpp index 86a004725..08f12cf43 100644 --- a/Source/UI/Chat/ChatSuggestions.cpp +++ b/Source/UI/Chat/ChatSuggestions.cpp @@ -36,18 +36,18 @@ void UINewChatWnd::ShowSuggestions(std::uint8_t visible) { // FUNCTION: fn_12732 void UINewChatWnd::ApplyInputLayout() { if (g_windowMgr.inputSuggestionsEnabled) { - this->unknown_00C0->Move(6, this->geometry.height - this->m_inputAreaHeight + 4); + this->m_whisperEdit->Move(6, this->geometry.height - this->m_inputAreaHeight + 4); this->m_chatEdit->Move(110, this->geometry.height - this->m_inputAreaHeight + 4); - UIWindow* child = this->unknown_00B8; + UIWindow* child = this->m_inputResizer; child->Move(3, this->geometry.height - child->geometry.height); this->m_inputButtons[0]->Move(97, this->geometry.height - this->m_inputAreaHeight + 3); this->m_inputButtons[1]->Move(586, this->geometry.height - this->m_inputAreaHeight + 7); this->m_inputButtons[2]->Move(572, this->geometry.height - this->m_inputAreaHeight + 7); } else { - this->unknown_00C0->Move(-100, -100); + this->m_whisperEdit->Move(-100, -100); this->m_chatEdit->Move(-100, -100); - this->unknown_00B8->Move(-100, -100); + this->m_inputResizer->Move(-100, -100); for (int index = 0; index < 3; ++index) { this->m_inputButtons[index]->Move(-100, -100); } @@ -59,18 +59,18 @@ void UINewChatWnd::ApplyInputLayout() { // OFFSET: 0x009337F0 // FUNCTION: fn_12730 void UINewChatWnd::ApplyHeaderLayout() { - if (!g_session.m_canDragWnd && this->geometry.unknown_0030 != 0) { + if (!g_session.m_canDragWnd && this->geometry.state != 0) { this->m_headerButtons[1]->Move(-100, -100); this->m_headerButtons[0]->Move(-100, -100); - this->unknown_0128->Move(-100, -100); + this->m_headerButton->Move(-100, -100); this->m_chatModeButton->Move(this->m_lockButtonX - this->m_chatModeButton->geometry.width - 2, 4); return; } - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { this->m_headerButtons[1]->Move(-100, -100); this->m_headerButtons[0]->Move(-100, -100); - this->unknown_0128->Move(-100, -100); + this->m_headerButton->Move(-100, -100); this->m_chatModeButton->Move(-100, -100); return; } @@ -81,7 +81,7 @@ void UINewChatWnd::ApplyHeaderLayout() { button = this->m_headerButtons[0]; x -= (button->geometry.width + 2); button->Move(x, 4); - button = this->unknown_0128; + button = this->m_headerButton; x -= (button->geometry.width + 2); button->Move(x, 4); button = this->m_chatModeButton; @@ -116,7 +116,7 @@ void UISubChatHisWnd::ApplyButtonLayout() { // OFFSET: 0x0093D2C0 // FUNCTION: fn_12768 void UINewChatWnd::ResizeRows(int count) { - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } @@ -126,7 +126,7 @@ void UINewChatWnd::ResizeRows(int count) { } const int rowCount = count > 15 ? 0 : count < 0 ? 15 : count; - chat.geometry.unknown_0030 = static_cast(rowCount); + chat.geometry.state = static_cast(rowCount); chat.Invalidate(); const int previousHeight = chat.geometry.height; const int height = rowCount == 0 ? this->m_inputAreaHeight : this->m_inputAreaHeight + (rowCount + 3) * 14 + this->m_inputOffsetY; @@ -153,17 +153,17 @@ void UINewChatWnd::ResizeRows(int count) { } } - this->unknown_00C0->Move(6, chat.geometry.height - this->m_inputAreaHeight + 4); + this->m_whisperEdit->Move(6, chat.geometry.height - this->m_inputAreaHeight + 4); this->m_chatEdit->Move(110, chat.geometry.height - this->m_inputAreaHeight + 4); - UIWindow* child = this->unknown_00B8; + UIWindow* child = this->m_inputResizer; child->Move(3, chat.geometry.height - child->geometry.height); if (rowCount != 0) { - this->unknown_0128->Move(this->m_tabWidth * 2 + 4, 4); + this->m_headerButton->Move(this->m_tabWidth * 2 + 4, 4); this->m_chatModeButton->Move(this->m_tabWidth * 2 + 19, 4); this->m_tabControl->Move(3, 0); } else { - this->unknown_0128->Move(-100, -100); + this->m_headerButton->Move(-100, -100); this->m_chatModeButton->Move(-100, -100); this->m_tabControl->Move(-100, -100); } @@ -199,13 +199,13 @@ void UINewChatWnd::ToggleInput() { this->m_inputEdit->SetText(""); if (!g_windowMgr.chatModeChanged) { - this->ResizeRows(static_cast(this->geometry.unknown_0030)); + this->ResizeRows(static_cast(this->geometry.state)); } g_windowMgr.SetPressedWindowRoot(this->m_inputEdit); } - if (UIItemTagOnChat* tags = static_cast(this->m_chatEdit)->unknown_0144) { + if (UIItemTagOnChat* tags = static_cast(this->m_chatEdit)->itemTags) { tags->ClearTags(); } } diff --git a/Source/UI/Chat/UIChatRoomMakeWnd.h b/Source/UI/Chat/UIChatRoomMakeWnd.h index bfbe51809..3ed5b397a 100644 --- a/Source/UI/Chat/UIChatRoomMakeWnd.h +++ b/Source/UI/Chat/UIChatRoomMakeWnd.h @@ -17,7 +17,7 @@ struct ChatRoomSetting { /* 0000 */ std::string title; /* 0018 */ std::string password; /* 0030 */ int isPublic; - /* 0034 */ int unknown_0034; + /* 0034 */ int memberCount; /* 0038 */ int limit; /* 003C */ int roomId; }; diff --git a/Source/UI/Chat/UIChatRoomTitle.cpp b/Source/UI/Chat/UIChatRoomTitle.cpp index fab440ca2..422d45687 100644 --- a/Source/UI/Chat/UIChatRoomTitle.cpp +++ b/Source/UI/Chat/UIChatRoomTitle.cpp @@ -106,7 +106,7 @@ int UIChatRoomTitle::SendMsg(UIWindow* sender, int message, std::intptr_t a, std const ChatRoomTitleInfo* info = reinterpret_cast(a); this->title = info->title; - this->unknown_0098 = info->unknown_0018; + this->password = info->password; this->roomType = info->type; this->memberCount = info->memberCount; this->memberLimit = info->memberLimit; @@ -130,7 +130,7 @@ int UIChatRoomTitle::SendMsg(UIWindow* sender, int message, std::intptr_t a, std std::sprintf(text, "%s (%d/%d)", this->title.c_str(), this->memberCount, this->memberLimit); } - this->unknown_00C0 = static_cast(b); + this->roomOption = static_cast(b); switch (static_cast(b)) { case 1: this->label->fontFamily = 21; diff --git a/Source/UI/Chat/UIChatRoomTitle.h b/Source/UI/Chat/UIChatRoomTitle.h index cc16b8945..80f88d3e7 100644 --- a/Source/UI/Chat/UIChatRoomTitle.h +++ b/Source/UI/Chat/UIChatRoomTitle.h @@ -9,7 +9,7 @@ class UIStaticText; struct ChatRoomTitleInfo { /* 0000 */ std::string title; - /* 0018 */ std::string unknown_0018; + /* 0018 */ std::string password; /* 0030 */ int type; /* 0034 */ int memberCount; /* 0038 */ int memberLimit; @@ -30,14 +30,14 @@ public: /* 007C */ UIStaticText* label; /* 0080 */ std::string title; - /* 0098 */ std::string unknown_0098; + /* 0098 */ std::string password; /* 00B0 */ int roomType; /* 00B4 */ int memberCount; /* 00B8 */ int memberLimit; protected: /* 00BC */ int roomId; - /* 00C0 */ short unknown_00C0; + /* 00C0 */ short roomOption; }; #endif diff --git a/Source/UI/Chat/UINewChatWnd.cpp b/Source/UI/Chat/UINewChatWnd.cpp index d8ebcaea7..ade279cf3 100644 --- a/Source/UI/Chat/UINewChatWnd.cpp +++ b/Source/UI/Chat/UINewChatWnd.cpp @@ -99,7 +99,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->FillSurface(0xFFFF00FF, &rectangle); if (this->m_currentTab > 0) { --this->m_currentTab; - this->m_tabControl->unknown_007C = this->m_currentTab; + this->m_tabControl->activeTabIndex = this->m_currentTab; } this->RefreshTabs(true); @@ -176,7 +176,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i rectangle.bottom = this->m_tabControl->geometry.height; this->FillSurface(0xFFFF00FF, &rectangle); this->m_currentTab = count; - this->m_tabControl->unknown_007C = count; + this->m_tabControl->activeTabIndex = count; this->RefreshTabs(true); this->ApplyHeaderLayout(); return 0; @@ -222,16 +222,16 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; case UM_DELETE_WHISPER_NAME: { std::string name(reinterpret_cast(a)); - const int count = static_cast(static_cast(this->unknown_00C0)->history.size()); + const int count = static_cast(static_cast(this->m_whisperEdit)->history.size()); int index = 0; - for (std::vector::iterator it = static_cast(this->unknown_00C0)->history.begin(); it != static_cast(this->unknown_00C0)->history.end(); ++it, ++index) { + for (std::vector::iterator it = static_cast(this->m_whisperEdit)->history.begin(); it != static_cast(this->m_whisperEdit)->history.end(); ++it, ++index) { if (*it == name) { - UIWhisperEditCtrl* whisper = static_cast(this->unknown_00C0); + UIWhisperEditCtrl* whisper = static_cast(this->m_whisperEdit); whisper->history.erase(it); - if (static_cast(this->unknown_00C0)->historyIndex == index) { - static_cast(this->unknown_00C0)->historyIndex = count - 1; - } else if (static_cast(this->unknown_00C0)->historyIndex > index) { - static_cast(this->unknown_00C0)->historyIndex = static_cast(this->unknown_00C0)->historyIndex - 1; + if (static_cast(this->m_whisperEdit)->historyIndex == index) { + static_cast(this->m_whisperEdit)->historyIndex = count - 1; + } else if (static_cast(this->m_whisperEdit)->historyIndex > index) { + static_cast(this->m_whisperEdit)->historyIndex = static_cast(this->m_whisperEdit)->historyIndex - 1; } return 0; } @@ -239,9 +239,9 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; } case UM_COMBOBOX_SELECTED: - switch (this->unknown_00F0) { + switch (this->m_menuMode) { case 1: - *reinterpret_cast(&g_session.unknown_5490[0x8]) = a; + *reinterpret_cast(&g_session.itemSendState[0x8]) = a; switch (a) { case 0: static_cast(this->m_chatEdit)->TextColor(RGB(0, 0, 0), 0xFFFFFFFF); @@ -259,12 +259,12 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->Invalidate(); return 0; case 0: { - const int count = static_cast(static_cast(this->unknown_00C0)->history.size()); + const int count = static_cast(static_cast(this->m_whisperEdit)->history.size()); if (a >= 0 && a <= count) { - static_cast(this->unknown_00C0)->SetText(a == count ? "" : static_cast(this->unknown_00C0)->history[a].c_str()); - static_cast(this->unknown_00C0)->historyIndex = a; + static_cast(this->m_whisperEdit)->SetText(a == count ? "" : static_cast(this->m_whisperEdit)->history[a].c_str()); + static_cast(this->m_whisperEdit)->historyIndex = a; } - g_windowMgr.SetFocus(static_cast(this->unknown_00C0)); + g_windowMgr.SetFocus(static_cast(this->m_whisperEdit)); break; } default: @@ -343,14 +343,14 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i } return 0; case UM_SETINFO: - if (g_windowMgr.unknown_0030 < 0 || g_windowMgr.unknown_0034 < 0 || g_windowMgr.unknown_0030 > g_renderer->viewport.width - this->geometry.width - || g_windowMgr.unknown_0034 > g_renderer->viewport.height - this->geometry.height) { - g_windowMgr.unknown_0030 = 0; - g_windowMgr.unknown_0034 = g_renderer->viewport.height - this->geometry.height; + if (g_windowMgr.chatWndX < 0 || g_windowMgr.chatWndY < 0 || g_windowMgr.chatWndX > g_renderer->viewport.width - this->geometry.width + || g_windowMgr.chatWndY > g_renderer->viewport.height - this->geometry.height) { + g_windowMgr.chatWndX = 0; + g_windowMgr.chatWndY = g_renderer->viewport.height - this->geometry.height; } - this->geometry.x = g_windowMgr.unknown_0030; - this->geometry.y = g_windowMgr.unknown_0034; - this->ResizeRows(g_windowMgr.unknown_004C); + this->geometry.x = g_windowMgr.chatWndX; + this->geometry.y = g_windowMgr.chatWndY; + this->ResizeRows(g_windowMgr.chatWndStatus); this->Move(this->geometry.x, this->geometry.y); return 0; case UM_COMMAND: @@ -364,20 +364,20 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i g_windowMgr.SelectWhisperName(reinterpret_cast(b)); return 0; case ID_STICK_ON: - *reinterpret_cast(&g_windowMgr.unknown_03F4) = 1; + *reinterpret_cast(&g_windowMgr.chatWndStickOn) = 1; this->m_currentTab = 0; - if (this->unknown_0118 == 0) { - this->unknown_0118 = 1; + if (this->m_savedRowCount == 0) { + this->m_savedRowCount = 1; } - this->ResizeRows(this->unknown_0118); + this->ResizeRows(this->m_savedRowCount); this->Invalidate(); return 0; case ID_STICK_OFF: this->SendMsg(this, UM_DETACH_CHAT_TAB, this->m_currentTab, 0, 0, 0); return 0; case ID_TALKTOWHOCOMBO: { - this->unknown_00F0 = 1; - if (g_windowMgr.unknown_0214 != nullptr) { + this->m_menuMode = 1; + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } UIWindow* menu = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); @@ -386,7 +386,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_SEND_TO_GUILD)), 0, 0, 0); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_CLAN_MANAGE_LAND)), 0, 0, 0); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(LookupMessage(MSI_REFINING_IMPOSSIBLE)), 0, 0, 0); - menu->SendMsg(nullptr, UM_SETCURITEM, *reinterpret_cast(&g_session.unknown_5490[0x8]), 0, 0, 0); + menu->SendMsg(nullptr, UM_SETCURITEM, *reinterpret_cast(&g_session.itemSendState[0x8]), 0, 0, 0); menu->Resize(0x70, 0x30); menu->SendMsg(nullptr, UM_SET_CALLER_WID, 1, 0, 0, 0); int x = this->geometry.width - 0x73; @@ -396,11 +396,11 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; } case ID_WHISPERCOMBO: { - this->unknown_00F0 = 0; - if (g_windowMgr.unknown_0214 != nullptr) { + this->m_menuMode = 0; + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } - const int count = static_cast(static_cast(this->unknown_00C0)->history.size()); + const int count = static_cast(static_cast(this->m_whisperEdit)->history.size()); if (count == 0) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOWHISPERLIST)), 0xFF, 0, 0, 0); @@ -409,14 +409,14 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i UIWindow* menu = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); for (int i = 0; i < count; ++i) { - menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(static_cast(this->unknown_00C0)->history[i].c_str()), 0, 0, 0); + menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(static_cast(this->m_whisperEdit)->history[i].c_str()), 0, 0, 0); } menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(""), 0, 0, 0); int height = (count + 1) * 16; if (height > 0x50) { height = 0x50; } - menu->SendMsg(nullptr, UM_SETCURITEM, static_cast(this->unknown_00C0)->historyIndex, 0, 0, 0); + menu->SendMsg(nullptr, UM_SETCURITEM, static_cast(this->m_whisperEdit)->historyIndex, 0, 0, 0); menu->Resize(0x70, height); menu->SendMsg(nullptr, UM_SET_CALLER_WID, 1, 0, 0, 0); int x = 0; @@ -441,11 +441,11 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i UIChatEditCtrl* edit = static_cast(this->m_chatEdit); bool rejected = HasItemLinkTag(std::string(edit->Text())); if (!rejected) { - UIItemTagOnChat* tags = static_cast(this->m_chatEdit)->unknown_0144; - if (tags != nullptr && tags->unknown_0140.size() != 0) { - text = std::string(tags->unknown_0140); - static_cast(this->m_chatEdit)->unknown_0144->unknown_0140.clear(); - static_cast(this->m_chatEdit)->unknown_0144->ClearTags(); + UIItemTagOnChat* tags = static_cast(this->m_chatEdit)->itemTags; + if (tags != nullptr && tags->linkedText.size() != 0) { + text = std::string(tags->linkedText); + static_cast(this->m_chatEdit)->itemTags->linkedText.clear(); + static_cast(this->m_chatEdit)->itemTags->ClearTags(); rejected = static_cast(this->m_chatEdit)->LinkedText().size() != 0; } if (!rejected) { @@ -477,9 +477,9 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; } - if (static_cast(this->unknown_00C0)->Length() != 0 && buffer[0] != '/') { - g_windowMgr.unknown_04DC = buffer; - g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(static_cast(this->unknown_00C0)->Text()), 0, 0, 0); + if (static_cast(this->m_whisperEdit)->Length() != 0 && buffer[0] != '/') { + g_windowMgr.chatInputText = buffer; + g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(static_cast(this->m_whisperEdit)->Text()), 0, 0, 0); return 0; } @@ -510,7 +510,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i int noSubCount = static_cast(g_session.m_noSubChatWnds.size()); int subCount = static_cast(g_session.m_subChatWnds.size()); const int total = noSubCount + subCount; - if (total == this->unknown_0110) { + if (total == this->m_maxTabs) { g_windowMgr.Confirm(LookupMessage(MSI_FAILED_ADD_TAB), 0, true, false, 0, "Message", 0x118, 0x78, 0); return 0; } @@ -539,7 +539,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i rectangle.bottom = this->m_tabControl->geometry.height; this->FillSurface(0xFFFF00FF, &rectangle); this->m_currentTab = noSubCount; - this->m_tabControl->unknown_007C = noSubCount; + this->m_tabControl->activeTabIndex = noSubCount; this->RefreshTabs(true); this->ApplyHeaderLayout(); } @@ -581,7 +581,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->FillSurface(0xFFFF00FF, &rectangle); if (this->m_currentTab > 0) { --this->m_currentTab; - this->m_tabControl->unknown_007C = this->m_currentTab; + this->m_tabControl->activeTabIndex = this->m_currentTab; } this->RefreshTabs(true); this->ApplyHeaderLayout(); @@ -594,10 +594,10 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i return 0; } case UM_RESIZE: - if (a == 2 && static_cast(g_windowMgr.unknown_03F4) != 0) { + if (a == 2 && static_cast(g_windowMgr.chatWndStickOn) != 0) { const int top = this->m_inputOffsetY + 0x38; if (c < top) { - if (this->geometry.unknown_0030 != 0) { + if (this->geometry.state != 0) { this->ResizeRows(0); } } else { @@ -605,23 +605,23 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i if (rows > 15) { rows = 15; } - if (this->geometry.unknown_0030 != rows) { + if (this->geometry.state != rows) { this->ResizeRows(rows); } } } return 0; case UM_TOGGLEPUSH: - if (static_cast(g_windowMgr.unknown_03F4) != 0) { + if (static_cast(g_windowMgr.chatWndStickOn) != 0) { const int step = a == 0 ? 1 : -1; int rows = step; - if (this->geometry.unknown_0030 != 0) { - rows = static_cast(this->geometry.unknown_0030) + step * 3; + if (this->geometry.state != 0) { + rows = static_cast(this->geometry.state) + step * 3; } if (rows > 0) { this->ResizeRows(rows / 3 * 3 + 1); } else { - this->ResizeRows(this->geometry.unknown_0030 != 0 ? 0 : rows); + this->ResizeRows(this->geometry.state != 0 ? 0 : rows); } } return 0; @@ -651,7 +651,7 @@ int UINewChatWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->ResizeRows(a); return 0; case UM_OPENCHATWND: - if (static_cast(g_windowMgr.unknown_03F4) != 0 && this->geometry.unknown_0030 == 0) { + if (static_cast(g_windowMgr.chatWndStickOn) != 0 && this->geometry.state == 0) { this->ResizeRows(1); } return 0; diff --git a/Source/UI/Chat/UINewChatWnd.h b/Source/UI/Chat/UINewChatWnd.h index a6a920afb..f7d1401b0 100644 --- a/Source/UI/Chat/UINewChatWnd.h +++ b/Source/UI/Chat/UINewChatWnd.h @@ -40,30 +40,30 @@ public: void ToggleInput(); /* 00B4 */ UIEditCtrl* m_inputEdit; - /* 00B8 */ UIWindow* unknown_00B8; + /* 00B8 */ UIWindow* m_inputResizer; /* 00BC */ UIEditCtrl* m_chatEdit; - /* 00C0 */ UIWindow* unknown_00C0; + /* 00C0 */ UIWindow* m_whisperEdit; /* 00C4 */ int m_inputX; /* 00C8 */ int m_inputY; /* 00CC */ int m_listWidth; /* 00D0 */ int m_listHeight; - /* 00D4 */ unsigned char unknown_00D4[0x4]; + /* 00D4 */ unsigned char m_primaryStateStorage[0x4]; /* 00D8 */ std::uint32_t m_listColor; - /* 00DC */ unsigned char unknown_00DC[0x4]; + /* 00DC */ unsigned char m_secondaryStateStorage[0x4]; /* 00E0 */ UIWindow* m_inputButtons[3]; /* 00EC */ unsigned char unknown_00EC[0x4]; - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int m_menuMode; /* 00F4 */ std::vector m_tabs; /* 0100 */ UIWindow* m_headerButtons[2]; /* 0108 */ int m_lockButtonX; /* 010C */ int m_chatModeX; - /* 0110 */ int unknown_0110; + /* 0110 */ int m_maxTabs; /* 0114 */ int m_currentTab; - /* 0118 */ int unknown_0118; + /* 0118 */ int m_savedRowCount; /* 011C */ int m_inputOffsetY; /* 0120 */ int m_tabWidth; /* 0124 */ int m_inputAreaHeight; - /* 0128 */ UIWindow* unknown_0128; + /* 0128 */ UIWindow* m_headerButton; /* 012C */ UIWindow* m_chatModeButton; /* 0130 */ unsigned char unknown_0130[0x8]; /* 0138 */ UITabControl* m_tabControl; diff --git a/Source/UI/Chat/UISubChatHisWnd.cpp b/Source/UI/Chat/UISubChatHisWnd.cpp index 788da3ba7..bbb7f8ff7 100644 --- a/Source/UI/Chat/UISubChatHisWnd.cpp +++ b/Source/UI/Chat/UISubChatHisWnd.cpp @@ -76,8 +76,8 @@ void UISubChatHisWnd::Move(int x, int y) { int screenX = 0; int screenY = 0; this->ToScreen(screenX, screenY); - this->m_state.unknown_0000 = screenX; - this->m_state.unknown_0004 = screenY + this->m_inputHeight; + this->m_state.x = screenX; + this->m_state.y = screenY + this->m_inputHeight; g_session.m_subChatWnds[this->m_index].x = screenX; g_session.m_subChatWnds[this->m_index].y = screenY; } @@ -162,7 +162,7 @@ void UISubChatHisWnd::OnCreate(int width, int height) { } this->m_chatBox = new UIChatHisBox(); - this->m_chatBox->Configure(0, 0, this->geometry.width - 8, this->geometry.height - this->unknown_00F0 - this->m_inputHeight - 4, 0); + this->m_chatBox->Configure(0, 0, this->geometry.width - 8, this->geometry.height - this->headerHeight - this->m_inputHeight - 4, 0); this->m_chatBox->Move(5, this->m_inputHeight + 4); this->AddChild(this->m_chatBox); @@ -177,13 +177,13 @@ void UISubChatHisWnd::OnCreate(int width, int height) { int x = 0; int y = 0; this->ToScreen(x, y); - this->m_state.unknown_0000 = x; - this->m_state.unknown_0014 = 0x66000000; - this->m_state.unknown_0004 = y + this->m_inputHeight; - this->m_state.unknown_0008 = this->geometry.width; - this->m_state.unknown_0018 = 0; - this->m_state.unknown_000C = this->geometry.height - this->m_inputHeight; - this->m_state.unknown_0010 = 0; + this->m_state.x = x; + this->m_state.backgroundColor = 0x66000000; + this->m_state.y = y + this->m_inputHeight; + this->m_state.width = this->geometry.width; + this->m_state.flags = 0; + this->m_state.height = this->geometry.height - this->m_inputHeight; + this->m_state.borderStyle = 0; const auto found = g_session.m_subChatWnds.find(this->m_index); if (found != g_session.m_subChatWnds.end()) { @@ -212,7 +212,7 @@ UISubChatHisWnd::UISubChatHisWnd() this->m_chatBox = nullptr; this->m_inputHeight = 16; this->m_inputWidth = 71; - this->unknown_00F0 = 15; + this->headerHeight = 15; switch (g_serviceType) { case 10: this->m_inputWidth = 71; diff --git a/Source/UI/Chat/UISubChatHisWnd.h b/Source/UI/Chat/UISubChatHisWnd.h index 4a5a0bb5f..aa0c27300 100644 --- a/Source/UI/Chat/UISubChatHisWnd.h +++ b/Source/UI/Chat/UISubChatHisWnd.h @@ -14,13 +14,13 @@ class UIWindowMgr; struct SubChatHisWndInfo; struct SubChatHistoryState { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ int unknown_0010; - /* 0014 */ int unknown_0014; - /* 0018 */ int unknown_0018; + /* 0000 */ int x; + /* 0004 */ int y; + /* 0008 */ int width; + /* 000C */ int height; + /* 0010 */ int borderStyle; + /* 0014 */ int backgroundColor; + /* 0018 */ int flags; }; class UISubChatHisWnd : public UIFrameWnd { @@ -55,7 +55,7 @@ private: /* 00E4 */ UIBitmapButton* m_miniButton; /* 00E8 */ int m_inputHeight; /* 00EC */ int m_inputWidth; - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int headerHeight; /* 00F4 */ int m_index; /* 00F8 */ bool m_options[25]; /* 0111 */ unsigned char unknown_0111[3]; diff --git a/Source/UI/Chat/UISubChatMiniWnd.h b/Source/UI/Chat/UISubChatMiniWnd.h index 269cfc987..ace675da4 100644 --- a/Source/UI/Chat/UISubChatMiniWnd.h +++ b/Source/UI/Chat/UISubChatMiniWnd.h @@ -12,7 +12,7 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; private: - /* 00B4 */ int unknown_00B4; + /* 00B4 */ int rowCount; /* 00B8 */ int m_rowHeight; /* 00BC */ int m_offsetY; }; diff --git a/Source/UI/Chat/UIWhisperWnd.cpp b/Source/UI/Chat/UIWhisperWnd.cpp index 504542b7e..ed8ca566f 100644 --- a/Source/UI/Chat/UIWhisperWnd.cpp +++ b/Source/UI/Chat/UIWhisperWnd.cpp @@ -3,6 +3,6 @@ // OFFSET: 0x008C9620 // FUNCTION: fn_11984 UIWhisperWnd::UIWhisperWnd() : UIFrameWnd(0) { - this->unknown_0100 = 0; + this->placement = 0; this->m_code = std::string(""); } diff --git a/Source/UI/Chat/UIWhisperWnd.h b/Source/UI/Chat/UIWhisperWnd.h index d77497e8f..d10a3967e 100644 --- a/Source/UI/Chat/UIWhisperWnd.h +++ b/Source/UI/Chat/UIWhisperWnd.h @@ -14,7 +14,7 @@ class UIResizer; struct WhisperLogLine { /* 0000 */ std::string text; - /* 0018 */ std::uint32_t unknown_0018; + /* 0018 */ std::uint32_t commandId; }; class UIWhisperWnd : public UIFrameWnd { @@ -28,7 +28,7 @@ public: /* 00EC */ UIChatHisBox* m_chatHistory; /* 00F0 */ UIBitmapButton* m_closeButton; /* 00F4 */ std::vector m_log; - /* 0100 */ WindowPlacement* unknown_0100; + /* 0100 */ WindowPlacement* placement; /* 0104 */ std::string m_code; void Move(int x, int y) override; diff --git a/Source/UI/Clan/UIClanWnd.cpp b/Source/UI/Clan/UIClanWnd.cpp index 4a50f9ba4..dba6dbd56 100644 --- a/Source/UI/Clan/UIClanWnd.cpp +++ b/Source/UI/Clan/UIClanWnd.cpp @@ -42,8 +42,8 @@ void UIClanInfoManageWnd::OnCreate(int width, int height) { this->AddCloseButton("Ctrl+G", 0); } - this->unknown_00BC = -1; - this->unknown_00C0 = -1; + this->allyRow = -1; + this->hostileRow = -1; if (g_clanInfo->m_hasClan) { g_clanInfo->unknown_0034 = 1; } @@ -117,7 +117,7 @@ void UIClanInfoManageWnd::Paint() { break; } if (relation->first == 0) { - if (row == this->unknown_00BC) { + if (row == this->allyRow) { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); this->FillRegion(204, y, 80, 16, RGB(red, green, blue)); } @@ -136,7 +136,7 @@ void UIClanInfoManageWnd::Paint() { break; } if (relation->first == 1) { - if (row == this->unknown_00C0) { + if (row == this->hostileRow) { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); this->FillRegion(204, y, 80, 16, RGB(red, green, blue)); } diff --git a/Source/UI/Clan/UIClanWnd.h b/Source/UI/Clan/UIClanWnd.h index 6f5124a55..7693a647c 100644 --- a/Source/UI/Clan/UIClanWnd.h +++ b/Source/UI/Clan/UIClanWnd.h @@ -33,8 +33,8 @@ public: __declspec(noinline) void LoadEmblem(); protected: - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; + /* 00BC */ int allyRow; + /* 00C0 */ int hostileRow; /* 00C4 */ CBitmapRes* m_emblem; }; diff --git a/Source/UI/Dialogs/UIBookWnd.h b/Source/UI/Dialogs/UIBookWnd.h index aa06a5fac..2f68fe96f 100644 --- a/Source/UI/Dialogs/UIBookWnd.h +++ b/Source/UI/Dialogs/UIBookWnd.h @@ -14,7 +14,7 @@ class UIBookWnd : public UIFrameWnd { public: UIBookWnd(); /* 00B4 */ UITextViewer* m_viewer; - /* 00B8 */ UIWindow* unknown_00B8; + /* 00B8 */ UIWindow* m_balloon; /* 00BC */ char m_bookName[100]; /* 0120 */ int m_lineCount; /* 0124 */ int m_pageCount; diff --git a/Source/UI/Dialogs/UIChooseWarpWnd.h b/Source/UI/Dialogs/UIChooseWarpWnd.h index d695194ca..7f56ac293 100644 --- a/Source/UI/Dialogs/UIChooseWarpWnd.h +++ b/Source/UI/Dialogs/UIChooseWarpWnd.h @@ -17,7 +17,7 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; /* 00B4 */ UIListBox* m_list; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int skillId; /* 00BC */ std::vector m_choices; }; diff --git a/Source/UI/Dialogs/UIEditctrlWnd.cpp b/Source/UI/Dialogs/UIEditctrlWnd.cpp index 278bce873..5ea728e7c 100644 --- a/Source/UI/Dialogs/UIEditctrlWnd.cpp +++ b/Source/UI/Dialogs/UIEditctrlWnd.cpp @@ -54,9 +54,9 @@ UIEditctrlWnd::UIEditctrlWnd() UIMiniMapWnd::UIMiniMapWnd() : UIFrameWnd(0) { this->dragging = 0; - this->unknown_0114 = 0; - this->unknown_011C = nullptr; - this->unknown_0120 = nullptr; + this->memoCount = 0; + this->questCheckBox = nullptr; + this->townCheckBox = nullptr; } // OFFSET: 0x0099B540 @@ -189,13 +189,13 @@ void UIMiniMapWnd::OnCreate(int width, int height) { this->originY = 531.0f - margin; } - this->unknown_011C = this->AddCheckBox(361, 100, 12, LookupMessage(MSI_MINIMAP_MSG_05), 20, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_06)); - this->unknown_0120 = this->AddCheckBox(194, 100, 12, LookupMessage(MSI_MINIMAP_MSG_07), 120, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_08)); - this->unknown_0124 = this->AddCheckBox(373, 100, 12, LookupMessage(MSI_MINIMAP_MSG_09), 220, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_10)); + this->questCheckBox = this->AddCheckBox(361, 100, 12, LookupMessage(MSI_MINIMAP_MSG_05), 20, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_06)); + this->townCheckBox = this->AddCheckBox(194, 100, 12, LookupMessage(MSI_MINIMAP_MSG_07), 120, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_08)); + this->guildCheckBox = this->AddCheckBox(373, 100, 12, LookupMessage(MSI_MINIMAP_MSG_09), 220, bottom - 19, 1, LookupMessage(MSI_MINIMAP_MSG_10)); this->AddCloseButton(LookupMessage(MSI_MINIMAP_MSG_04), 0); this->AddNumberedButton(356, this->geometry.width - 120, bottom - 23, "minimap\\memo_ready", LookupMessage(MSI_MINIMAP_MSG_11), true); this->AddTownMarks(); - this->unknown_012C = this->AddNumberedButton(205, -100, -100, "minimap\\boss", LookupMessage(MSI_MINIMAP_MSG_12), true); + this->bossButton = this->AddNumberedButton(205, -100, -100, "minimap\\boss", LookupMessage(MSI_MINIMAP_MSG_12), true); static_cast(g_modeMgr.GetGameMode())->ResendMinimapMarkers(); for (int index = 0; index < 20; ++index) { this->memoButtons[index] = this->AddNumberedButton(index + 601, -100, -100, "minimap\\memopoint", nullptr, true); @@ -205,9 +205,9 @@ void UIMiniMapWnd::OnCreate(int width, int height) { this->m_playerHead = new UIHeadsprButton(); this->UpdatePlayerHead(); this->m_playerHead->Move(-100, -100); - this->m_playerHead->unknown_00BC = 0; - this->m_playerHead->unknown_00C0 = 0; - this->m_playerHead->unknown_00C4 = 0; + this->m_playerHead->animationIndex = 0; + this->m_playerHead->frameIndex = 0; + this->m_playerHead->animate = 0; this->m_playerHead->SetTooltip(LookupMessage(MSI_MINIMAP_MSG_13)); this->m_playerHead->SetId(200); this->AddChild(this->m_playerHead); @@ -313,12 +313,12 @@ void UIMiniMapWnd::StoreInfo() { if (this->m_saved) { this->m_saved->width = this->geometry.x; this->m_saved->height = this->geometry.y; - this->m_saved->unknown_0010 = this->geometry.width; - this->m_saved->unknown_0014 = this->geometry.height; + this->m_saved->expandedWidth = this->geometry.width; + this->m_saved->expandedHeight = this->geometry.height; } - this->m_saved->unknown_0018 = this->unknown_011C->geometry.unknown_0030 != 0; - this->m_saved->unknown_001C = this->unknown_0120->geometry.unknown_0030 != 0; - this->m_saved->unknown_0020 = this->unknown_0124->geometry.unknown_0030 != 0; + this->m_saved->showQuests = this->questCheckBox->geometry.state != 0; + this->m_saved->showTowns = this->townCheckBox->geometry.state != 0; + this->m_saved->showMembers = this->guildCheckBox->geometry.state != 0; } // OFFSET: 0x0099C560 @@ -347,7 +347,7 @@ void UIMiniMapWnd::Paint() { } } - if (this->unknown_0124->geometry.unknown_0030 != 0) { + if (this->guildCheckBox->geometry.state != 0) { auto* guild = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\minimap\\guild.bmp"))); for (unsigned index = 0; index < this->guildMarks.size(); ++index) { const int x = this->guildMarks[index].x; @@ -379,7 +379,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 case UM_COMMAND: switch (argument1) { case ID_ITEMS: { - const bool enabled = this->unknown_0120->geometry.unknown_0030 != 0; + const bool enabled = this->townCheckBox->geometry.state != 0; for (auto it = this->townButtons.begin(); it != this->townButtons.end(); ++it) { it->second->Enable(enabled); } @@ -395,7 +395,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 this->dragging = 1; return 0; case 361: { - const bool enabled = this->unknown_011C->geometry.unknown_0030 != 0; + const bool enabled = this->questCheckBox->geometry.state != 0; for (auto it = this->questButtons.begin(); it != this->questButtons.end(); ++it) { it->second->Enable(enabled); } @@ -424,7 +424,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 std::fclose(file); } - this->unknown_0114 = this->LoadMemos(); + this->memoCount = this->LoadMemos(); this->Invalidate(); } } @@ -461,9 +461,9 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 this->m_saved->Reset(); } this->Move(this->m_saved->width, this->m_saved->height); - this->unknown_011C->SetChecked(this->m_saved->unknown_0018); - this->unknown_0120->SetChecked(this->m_saved->unknown_001C); - this->unknown_0124->SetChecked(this->m_saved->unknown_0020); + this->questCheckBox->SetChecked(this->m_saved->showQuests); + this->townCheckBox->SetChecked(this->m_saved->showTowns); + this->guildCheckBox->SetChecked(this->m_saved->showMembers); return 0; case UM_MINIMAP_SET_PLAYER_POS: @@ -473,7 +473,7 @@ int UIMiniMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 return 0; case UM_MINIMAP_SET_BOSS_POS: - this->unknown_012C->Move(static_cast(static_cast(argument1) * this->scale - 12.0f + this->originX), + this->bossButton->Move(static_cast(static_cast(argument1) * this->scale - 12.0f + this->originX), static_cast(this->originY - (static_cast(argument2) * this->scale + 12.0f))); this->Invalidate(); return 0; diff --git a/Source/UI/Dialogs/UIEmailAddressWnd.cpp b/Source/UI/Dialogs/UIEmailAddressWnd.cpp index f419205d9..4d2ba917e 100644 --- a/Source/UI/Dialogs/UIEmailAddressWnd.cpp +++ b/Source/UI/Dialogs/UIEmailAddressWnd.cpp @@ -9,7 +9,7 @@ // FUNCTION: fn_12341 int UIEmailAddressWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { if (message == UM_COMMAND) { - g_windowMgr.unknown_0474 = static_cast(a); + g_windowMgr.modalResponse = static_cast(a); if (a == 184) { g_modeMgr.gameMode->SendMsg(LMM_SET_EMAIL_ADDRESS, reinterpret_cast(this->m_edit->Text()), 0, 0, 0); } diff --git a/Source/UI/Dialogs/UIMenuWnd.h b/Source/UI/Dialogs/UIMenuWnd.h index 96cd811e0..ac135000e 100644 --- a/Source/UI/Dialogs/UIMenuWnd.h +++ b/Source/UI/Dialogs/UIMenuWnd.h @@ -14,9 +14,9 @@ public: /* 00B8 */ int m_selected; /* 00BC */ int m_itemHeight; /* 00C0 */ std::vector m_items; - /* 00CC */ std::uint32_t unknown_00CC; + /* 00CC */ std::uint32_t m_targetWindowId; /* 00D0 */ std::vector m_colors; - /* 00DC */ unsigned char unknown_00DC; + /* 00DC */ unsigned char m_menuFlags; void Move(int x, int y) override; void OnCreate(int width, int height) override; diff --git a/Source/UI/Dialogs/UIMiniMapWnd.h b/Source/UI/Dialogs/UIMiniMapWnd.h index 26ea2ba30..85391cd64 100644 --- a/Source/UI/Dialogs/UIMiniMapWnd.h +++ b/Source/UI/Dialogs/UIMiniMapWnd.h @@ -35,14 +35,14 @@ public: /* 00BC */ float originX; /* 00C0 */ float originY; /* 00C4 */ UIBitmapButton* memoButtons[20]; - /* 0114 */ int unknown_0114; + /* 0114 */ int memoCount; /* 0118 */ unsigned char dragging; /* 0119 */ unsigned char unknown_0119[0x3]; - /* 011C */ UICheckBox* unknown_011C; - /* 0120 */ UICheckBox* unknown_0120; - /* 0124 */ UICheckBox* unknown_0124; + /* 011C */ UICheckBox* questCheckBox; + /* 0120 */ UICheckBox* townCheckBox; + /* 0124 */ UICheckBox* guildCheckBox; /* 0128 */ UIHeadsprButton* m_playerHead; - /* 012C */ UIWindow* unknown_012C; + /* 012C */ UIWindow* bossButton; /* 0130 */ std::map townButtons; /* 0138 */ std::map questButtons; /* 0140 */ std::map questMarks; diff --git a/Source/UI/Dialogs/UIMinimapZoomWnd.cpp b/Source/UI/Dialogs/UIMinimapZoomWnd.cpp index 3c25fab6b..f6ebcfe4e 100644 --- a/Source/UI/Dialogs/UIMinimapZoomWnd.cpp +++ b/Source/UI/Dialogs/UIMinimapZoomWnd.cpp @@ -5,6 +5,6 @@ UIMinimapZoomWnd::UIMinimapZoomWnd() : UIFrameWnd(0), m_zoom(), - unknown_00BC(0), - unknown_00C0(0), - unknown_00C4(0) {} + townButtonsStorage(0), + townButtonsEnd(0), + townButtonsCapacity(0) {} diff --git a/Source/UI/Dialogs/UIMinimapZoomWnd.h b/Source/UI/Dialogs/UIMinimapZoomWnd.h index 3f97ebe69..6bfdce0e6 100644 --- a/Source/UI/Dialogs/UIMinimapZoomWnd.h +++ b/Source/UI/Dialogs/UIMinimapZoomWnd.h @@ -18,9 +18,9 @@ public: void AddTownButton(int index, TownInfo town); /* 00B4 */ std::map m_zoom; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; + /* 00BC */ int townButtonsStorage; + /* 00C0 */ int townButtonsEnd; + /* 00C4 */ int townButtonsCapacity; }; #endif diff --git a/Source/UI/Dialogs/UINpcEditDialogWnd.h b/Source/UI/Dialogs/UINpcEditDialogWnd.h index 011ceea1c..6c79a0edf 100644 --- a/Source/UI/Dialogs/UINpcEditDialogWnd.h +++ b/Source/UI/Dialogs/UINpcEditDialogWnd.h @@ -18,7 +18,7 @@ protected: public: /* 00B4 */ UIEditCtrl* edit; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int npcId; }; class UINpcTextEditDialogWnd : public UINpcEditDialogWnd { diff --git a/Source/UI/Dialogs/UIPasswordWnd.cpp b/Source/UI/Dialogs/UIPasswordWnd.cpp index 093d7fc21..a0f7c4b26 100644 --- a/Source/UI/Dialogs/UIPasswordWnd.cpp +++ b/Source/UI/Dialogs/UIPasswordWnd.cpp @@ -19,9 +19,9 @@ UIPasswordWnd::UIPasswordWnd() : UIItemDropCntWnd() {} // OFFSET: 0x0090C970 // FUNCTION: fn_12451 void UISecondPasswordInputWnd::SetInputMode(int value) { - this->unknown_011C = value; + this->inputMode = value; if (value == 0) { - this->unknown_0164->SetText(LookupMessage(MSI_PET_EVOLUTION_NEED_ITEM), 0); + this->instructionText->SetText(LookupMessage(MSI_PET_EVOLUTION_NEED_ITEM), 0); } } @@ -32,10 +32,10 @@ void UIPasswordWnd::sub_90C9B0(int) {} // OFFSET: 0x0090C9C0 // FUNCTION: fn_12453 void UISecondPasswordInputWnd::CreateKeypad(unsigned int seed) { - this->unknown_00F8 = 91; - this->unknown_00FC = 91; - this->unknown_0100 = 130; - this->unknown_0104 = 168; + this->activeInputY = 91; + this->currentPasswordY = 91; + this->newPasswordY = 130; + this->confirmPasswordY = 168; for (int i = 0; i < 10; ++i) { this->m_digits[i] = static_cast(i); } @@ -54,15 +54,15 @@ void UISecondPasswordInputWnd::CreateKeypad(unsigned int seed) { const int commandPositions[5][2] = {{414, 192}, {414, 220}, {414, 248}, {414, 192}, {414, 276}}; for (int i = 0; i < 5; ++i) { - this->unknown_0150[i] = new UIBitmapButton(); - this->unknown_0150[i]->SetBitmap((prefix + commandNames[i][0] + ".bmp").c_str(), 0, 0); - this->unknown_0150[i]->SetBitmap((prefix + commandNames[i][1] + ".bmp").c_str(), 1, 0); - this->unknown_0150[i]->SetBitmap((prefix + commandNames[i][2] + ".bmp").c_str(), 2, 0); - this->unknown_0150[i]->SetBitmap((prefix + commandNames[i][3] + ".bmp").c_str(), 3, 0); - this->unknown_0150[i]->SetSize(this->unknown_0150[i]->BitmapWidth(), this->unknown_0150[i]->BitmapHeight()); - this->unknown_0150[i]->Move(commandPositions[i][0], commandPositions[i][1]); - this->unknown_0150[i]->SetId(commandIds[i]); - this->AddChild(this->unknown_0150[i]); + this->actionButtons[i] = new UIBitmapButton(); + this->actionButtons[i]->SetBitmap((prefix + commandNames[i][0] + ".bmp").c_str(), 0, 0); + this->actionButtons[i]->SetBitmap((prefix + commandNames[i][1] + ".bmp").c_str(), 1, 0); + this->actionButtons[i]->SetBitmap((prefix + commandNames[i][2] + ".bmp").c_str(), 2, 0); + this->actionButtons[i]->SetBitmap((prefix + commandNames[i][3] + ".bmp").c_str(), 3, 0); + this->actionButtons[i]->SetSize(this->actionButtons[i]->BitmapWidth(), this->actionButtons[i]->BitmapHeight()); + this->actionButtons[i]->Move(commandPositions[i][0], commandPositions[i][1]); + this->actionButtons[i]->SetId(commandIds[i]); + this->AddChild(this->actionButtons[i]); } prefix = "유저인터페이스\\basic_interface\\"; @@ -78,47 +78,47 @@ void UISecondPasswordInputWnd::CreateKeypad(unsigned int seed) { for (int i = 0; i < 10; ++i) { const int digit = this->m_digits[i]; - this->unknown_0124[i] = new UIBitmapButton(); - this->unknown_0124[i]->SetBitmap((prefix + keyNames[digit][0] + ".bmp").c_str(), 0, 0); - this->unknown_0124[i]->SetBitmap((prefix + keyNames[digit][1] + ".bmp").c_str(), 1, 0); - this->unknown_0124[i]->SetBitmap((prefix + keyNames[digit][2] + ".bmp").c_str(), 2, 0); - this->unknown_0124[i]->SetSize(this->unknown_0124[i]->BitmapWidth(), this->unknown_0124[i]->BitmapHeight()); - this->unknown_0124[i]->Move(keyPositions[i][0], keyPositions[i][1]); - this->unknown_0124[i]->SetId(keyIds[digit]); - this->AddChild(this->unknown_0124[i]); + this->keypadButtons[i] = new UIBitmapButton(); + this->keypadButtons[i]->SetBitmap((prefix + keyNames[digit][0] + ".bmp").c_str(), 0, 0); + this->keypadButtons[i]->SetBitmap((prefix + keyNames[digit][1] + ".bmp").c_str(), 1, 0); + this->keypadButtons[i]->SetBitmap((prefix + keyNames[digit][2] + ".bmp").c_str(), 2, 0); + this->keypadButtons[i]->SetSize(this->keypadButtons[i]->BitmapWidth(), this->keypadButtons[i]->BitmapHeight()); + this->keypadButtons[i]->Move(keyPositions[i][0], keyPositions[i][1]); + this->keypadButtons[i]->SetId(keyIds[digit]); + this->AddChild(this->keypadButtons[i]); } - this->unknown_0124[10] = new UIBitmapButton(); - this->unknown_0124[10]->SetBitmap((prefix + keyNames[10][0] + ".bmp").c_str(), 0, 0); - this->unknown_0124[10]->SetBitmap((prefix + keyNames[10][1] + ".bmp").c_str(), 1, 0); - this->unknown_0124[10]->SetBitmap((prefix + keyNames[10][2] + ".bmp").c_str(), 2, 0); - this->unknown_0124[10]->SetSize(this->unknown_0124[10]->BitmapWidth(), this->unknown_0124[10]->BitmapHeight()); - this->unknown_0124[10]->Move(keyPositions[10][0], keyPositions[10][1]); - this->unknown_0124[10]->SetId(keyIds[10]); - this->AddChild(this->unknown_0124[10]); + this->keypadButtons[10] = new UIBitmapButton(); + this->keypadButtons[10]->SetBitmap((prefix + keyNames[10][0] + ".bmp").c_str(), 0, 0); + this->keypadButtons[10]->SetBitmap((prefix + keyNames[10][1] + ".bmp").c_str(), 1, 0); + this->keypadButtons[10]->SetBitmap((prefix + keyNames[10][2] + ".bmp").c_str(), 2, 0); + this->keypadButtons[10]->SetSize(this->keypadButtons[10]->BitmapWidth(), this->keypadButtons[10]->BitmapHeight()); + this->keypadButtons[10]->Move(keyPositions[10][0], keyPositions[10][1]); + this->keypadButtons[10]->SetId(keyIds[10]); + this->AddChild(this->keypadButtons[10]); - this->unknown_0150[0]->Enable(0); + this->actionButtons[0]->Enable(0); switch (g_session.m_passwordWndMode) { case 2: - this->unknown_0150[0]->Enable(1); - this->unknown_0150[3]->Enable(0); + this->actionButtons[0]->Enable(1); + this->actionButtons[3]->Enable(0); break; case 4: case 5: - this->unknown_0150[1]->SetDisabled(1); - this->unknown_0150[1]->Invalidate(); - this->unknown_0150[2]->SetDisabled(1); - this->unknown_0150[2]->Invalidate(); + this->actionButtons[1]->SetDisabled(1); + this->actionButtons[1]->Invalidate(); + this->actionButtons[2]->SetDisabled(1); + this->actionButtons[2]->Invalidate(); break; } - this->unknown_0150[2]->Enable(0); + this->actionButtons[2]->Enable(0); - this->unknown_0164 = new UIStaticText(); - this->unknown_0164->SetSize(300, 15); - this->unknown_0164->SetText(LookupMessage(MSI_SECOND_PASSWORD_INFO_1), 0); - this->unknown_0164->Move(200, 30); - this->AddChild(this->unknown_0164); + this->instructionText = new UIStaticText(); + this->instructionText->SetSize(300, 15); + this->instructionText->SetText(LookupMessage(MSI_SECOND_PASSWORD_INFO_1), 0); + this->instructionText->Move(200, 30); + this->AddChild(this->instructionText); UIStaticText* notice = new UIStaticText(); notice->SetSize(320, 15); @@ -130,7 +130,7 @@ void UISecondPasswordInputWnd::CreateKeypad(unsigned int seed) { // OFFSET: 0x0090DE10 // FUNCTION: fn_12454 void UISecondPasswordInputWnd::EnableKeypad() { - UIBitmapButton** slot = this->unknown_0124; + UIBitmapButton** slot = this->keypadButtons; for (int remaining = 11; remaining != 0; --remaining) { UIButton* button = *slot; button->SetDisabled(0); @@ -138,7 +138,7 @@ void UISecondPasswordInputWnd::EnableKeypad() { ++slot; } - slot = this->unknown_0150; + slot = this->actionButtons; for (int remaining = 5; remaining != 0; --remaining) { UIButton* button = *slot; button->SetDisabled(0); @@ -147,10 +147,10 @@ void UISecondPasswordInputWnd::EnableKeypad() { } if (g_session.m_passwordWndMode == 4 || g_session.m_passwordWndMode == 5) { - UIButton* button = this->unknown_0150[1]; + UIButton* button = this->actionButtons[1]; button->SetDisabled(1); button->Invalidate(); - button = this->unknown_0150[2]; + button = this->actionButtons[2]; button->SetDisabled(1); button->Invalidate(); } diff --git a/Source/UI/Dialogs/UIPasswordWnd.h b/Source/UI/Dialogs/UIPasswordWnd.h index 278e67fc7..0120ba73f 100644 --- a/Source/UI/Dialogs/UIPasswordWnd.h +++ b/Source/UI/Dialogs/UIPasswordWnd.h @@ -12,7 +12,7 @@ public: UIItemDropCntWnd(); /* 00B4 */ UIEditCtrl* m_edit; - /* 00B8 */ std::uint32_t unknown_00B8; + /* 00B8 */ std::uint32_t itemTitle; void Show(int visible) override; void Paint() override; @@ -24,7 +24,7 @@ class UIPasswordWnd : public UIItemDropCntWnd { public: UIPasswordWnd(); - /* 00BC */ int unknown_00BC; + /* 00BC */ int roomId; void Show(int visible) override; void Paint() override; @@ -43,17 +43,17 @@ public: /* 00BC */ int unknown_00BC; /* 00C0 */ int unknown_00C0; /* 00C4 */ unsigned char unknown_00C4[0xC]; - /* 00D0 */ char unknown_00D0[9]; - /* 00D9 */ char unknown_00D9[9]; - /* 00E2 */ char unknown_00E2[9]; - /* 00EC */ int unknown_00EC; - /* 00F0 */ int unknown_00F0; - /* 00F4 */ int unknown_00F4; - /* 00F8 */ int unknown_00F8; - /* 00FC */ int unknown_00FC; - /* 0100 */ int unknown_0100; - /* 0104 */ int unknown_0104; - /* 0108 */ unsigned char unknown_0108; + /* 00D0 */ char currentPassword[9]; + /* 00D9 */ char newPassword[9]; + /* 00E2 */ char confirmPassword[9]; + /* 00EC */ int inputDigitCount; + /* 00F0 */ int maskTextX; + /* 00F4 */ int passwordStage; + /* 00F8 */ int activeInputY; + /* 00FC */ int currentPasswordY; + /* 0100 */ int newPasswordY; + /* 0104 */ int confirmPasswordY; + /* 0108 */ unsigned char isChangingPassword; }; class UISecondPasswordInputWnd : public UIStorePasswordInputWnd { @@ -68,19 +68,19 @@ public: void CreateKeypad(unsigned int seed); void EnableKeypad(); - /* 010C */ int unknown_010C; + /* 010C */ int passwordLength; /* 0110 */ unsigned char m_digits[10]; - /* 011C */ int unknown_011C; + /* 011C */ int inputMode; /* 0120 */ int unknown_0120; - /* 0124 */ UIBitmapButton* unknown_0124[11]; - /* 0150 */ UIBitmapButton* unknown_0150[5]; - /* 0164 */ UIStaticText* unknown_0164; + /* 0124 */ UIBitmapButton* keypadButtons[11]; + /* 0150 */ UIBitmapButton* actionButtons[5]; + /* 0164 */ UIStaticText* instructionText; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(UIPasswordWnd) == 0xC0); -static_assert(offsetof(UISecondPasswordInputWnd, unknown_0124) == 0x124); -static_assert(offsetof(UISecondPasswordInputWnd, unknown_0164) == 0x164); +static_assert(offsetof(UISecondPasswordInputWnd, keypadButtons) == 0x124); +static_assert(offsetof(UISecondPasswordInputWnd, instructionText) == 0x164); static_assert(sizeof(UISecondPasswordInputWnd) == 0x168); #endif diff --git a/Source/UI/Dialogs/UISayDialogWnd.h b/Source/UI/Dialogs/UISayDialogWnd.h index fc0e511e8..968bd7694 100644 --- a/Source/UI/Dialogs/UISayDialogWnd.h +++ b/Source/UI/Dialogs/UISayDialogWnd.h @@ -13,10 +13,10 @@ public: /* 00B4 */ UIWindow* m_viewer; /* 00B8 */ std::list m_buttons; /* 00C0 */ std::list unknown_00C0; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; + /* 00C8 */ int m_responseMessage; + /* 00CC */ int m_responseId; /* 00D0 */ WindowPlacement* m_placement; - /* 00D4 */ int unknown_00D4; + /* 00D4 */ int m_responsePending; void OnCreate(int width, int height) override; void Resize(int width, int height) override; diff --git a/Source/UI/Dialogs/UISelectCartWnd.h b/Source/UI/Dialogs/UISelectCartWnd.h index 5587494ed..bb491f616 100644 --- a/Source/UI/Dialogs/UISelectCartWnd.h +++ b/Source/UI/Dialogs/UISelectCartWnd.h @@ -15,10 +15,10 @@ public: protected: public: - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; + /* 00B4 */ int selectionContext; + /* 00B8 */ int cartTypesBegin; + /* 00BC */ int cartTypesEnd; + /* 00C0 */ int cartTypesCapacity; }; #endif diff --git a/Source/UI/Dialogs/UITipboxWnd.h b/Source/UI/Dialogs/UITipboxWnd.h index 11d573ad5..5db3cd1b7 100644 --- a/Source/UI/Dialogs/UITipboxWnd.h +++ b/Source/UI/Dialogs/UITipboxWnd.h @@ -50,22 +50,22 @@ public: void OnProcess() override; void Paint() override; - /* 00B4 */ UIEditCtrl* unknown_00B4; - /* 00B8 */ UIListBoxID* unknown_00B8; - /* 00BC */ UITagTextViewer* unknown_00BC; - /* 00C0 */ UIStaticText* unknown_00C0; - /* 00C4 */ UIStaticText* unknown_00C4; + /* 00B4 */ UIEditCtrl* searchEdit; + /* 00B8 */ UIListBoxID* searchResults; + /* 00BC */ UITagTextViewer* tipViewer; + /* 00C0 */ UIStaticText* titleText; + /* 00C4 */ UIStaticText* subtitleText; /* 00C8 */ UIStaticText* m_pageText; /* 00CC */ UIStaticText* m_pageTotalText; - /* 00D0 */ UIBitmapButton* unknown_00D0; - /* 00D4 */ UIBitmapButton* unknown_00D4; - /* 00D8 */ UIBitmapButton* unknown_00D8; + /* 00D0 */ UIBitmapButton* previousButton; + /* 00D4 */ UIBitmapButton* nextButton; + /* 00D8 */ UIBitmapButton* tagButton; /* 00DC */ std::vector m_animations; /* 00E8 */ std::vector m_dots; /* 00F4 */ std::uint32_t m_buildTime; /* 00F8 */ std::uint32_t m_frameTime; - /* 00FC */ bool unknown_00FC; - /* 0100 */ int unknown_0100; + /* 00FC */ bool refreshPending; + /* 0100 */ int showAtStartup; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Edit/ItemTagRetirement.cpp b/Source/UI/Edit/ItemTagRetirement.cpp index 0b90dc2fe..270be6b4d 100644 --- a/Source/UI/Edit/ItemTagRetirement.cpp +++ b/Source/UI/Edit/ItemTagRetirement.cpp @@ -57,9 +57,9 @@ void UIItemTagOnChat::RemoveTagChild(UIWindow* child) { // OFFSET: 0x0086D670 // FUNCTION: fn_11050 -UIItemTagCtrl::UIItemTagCtrl() : unknown_011C(0), tagWidth(0) { +UIItemTagCtrl::UIItemTagCtrl() : previousTagCount(0), tagWidth(0) { this->taggedText.clear(); - this->unknown_0140.clear(); + this->linkedText.clear(); } // OFFSET: 0x0086D780 @@ -119,7 +119,7 @@ bool UIItemTagOnMail::CanInsertTag(const std::string& name, int width) { tag += FitText(*this->geometry.surface, name, width / 2); tag += ">"; - UIRodexEditCtrl3* contents = reinterpret_cast(g_windowMgr.unknown_0458)->m_contents; + UIRodexEditCtrl3* contents = reinterpret_cast(g_windowMgr.rodexComposeWnd)->m_contents; const unsigned int maximum = contents->maximum; this->taggedText = contents->text; std::string text = this->taggedText += tag; @@ -162,16 +162,16 @@ bool UIItemTagCtrl::SyncTagsWithText() { // OFFSET: 0x00896F60 // FUNCTION: fn_11521 void UIItemTagOnMail::RemoveTagChild(UIWindow* child) { - if (g_windowMgr.unknown_0458) { - g_windowMgr.unknown_0458->RemoveChild(child, 1); + if (g_windowMgr.rodexComposeWnd) { + g_windowMgr.rodexComposeWnd->RemoveChild(child, 1); } } // OFFSET: 0x00896F80 // FUNCTION: fn_11522 void UIItemTagOnMegaPhone::RemoveTagChild(UIWindow* child) { - if (g_windowMgr.unknown_0318) { - g_windowMgr.unknown_0318->RemoveChild(child, 1); + if (g_windowMgr.npcTextEditDialogWnd) { + g_windowMgr.npcTextEditDialogWnd->RemoveChild(child, 1); } } @@ -229,34 +229,34 @@ void UIItemTagCtrl::AddItemTag(const ITEM_INFO& item, unsigned int color) { button->SetTooltip(tag.c_str()); button->SetId(0x1D0); button->Move(0, 0); - reinterpret_cast(button->unknown_00F8) = item; + reinterpret_cast(button->itemPayload) = item; this->AddTagButton(button); UITextViewer* links = reinterpret_cast(this); std::string link; char delimiters[] = "!#$%&'()*+,-/"; - if (links->ItemLinkNumberText(item.unknown_0000[2]).size() <= 5) { - for (unsigned int index = 0; index < 5 - links->ItemLinkNumberText(item.unknown_0000[2]).size(); ++index) { + if (links->ItemLinkNumberText(item.identity[2]).size() <= 5) { + for (unsigned int index = 0; index < 5 - links->ItemLinkNumberText(item.identity[2]).size(); ++index) { link += "0"; } } - link += links->ItemLinkNumberText(item.unknown_0000[2]); + link += links->ItemLinkNumberText(item.identity[2]); link += Equipment(item) ? "1" : "0"; link += links->ItemLinkNumberText(std::atoi(item.itemId.c_str())); - if (item.unknown_0060 != 0) { + if (item.refiningLevel != 0) { link += delimiters[3]; - link += links->ItemLinkNumberText(item.unknown_0060); + link += links->ItemLinkNumberText(item.refiningLevel); } link += delimiters[4]; - link += links->ItemLinkNumberText(item.unknown_0070); + link += links->ItemLinkNumberText(item.sprite); link += delimiters[5]; - link += links->ItemLinkNumberText(item.unknown_0088); + link += links->ItemLinkNumberText(item.grade); - const int* cards = reinterpret_cast(item.unknown_001C); + const int* cards = reinterpret_cast(item.cards); int slots = ItemSlotsCount(item); if (slots == 0) { slots = 4; @@ -273,8 +273,8 @@ void UIItemTagCtrl::AddItemTag(const ITEM_INFO& item, unsigned int color) { link += links->ItemLinkNumberText(index < 4 ? cards[index] : 0); } - const ItemLinkOption* options = reinterpret_cast(item.unknown_009C); - for (int index = 0; index < item.unknown_0098; ++index) { + const ItemLinkOption* options = reinterpret_cast(item.options); + for (int index = 0; index < item.optionCount; ++index) { link += delimiters[9]; link += links->ItemLinkNumberText(options[index].id); link += delimiters[10]; @@ -314,9 +314,9 @@ bool UIItemTagOnMegaPhone::CanInsertTag(const std::string& name, int width) { tag += ">"; unsigned bytes = 0; - this->textWidth = reinterpret_cast(g_windowMgr.unknown_0318)->MeasureText(tag, bytes); + this->textWidth = reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->MeasureText(tag, bytes); - UIEditCtrl* edit = reinterpret_cast(g_windowMgr.unknown_0318)->edit; + UIEditCtrl* edit = reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->edit; const unsigned int maximum = edit->maximum; this->taggedText = edit->text; std::string text = this->taggedText += tag; @@ -326,9 +326,9 @@ bool UIItemTagOnMegaPhone::CanInsertTag(const std::string& name, int width) { // OFFSET: 0x008962C0 // FUNCTION: fn_11517 void UIItemTagCtrl::UpdateItemTags() { - this->unknown_0140.clear(); - if (this->unknown_011C != static_cast(this->tags.size()) && this->SyncTagsWithText()) { - this->unknown_011C = static_cast(this->tags.size()); + this->linkedText.clear(); + if (this->previousTagCount != static_cast(this->tags.size()) && this->SyncTagsWithText()) { + this->previousTagCount = static_cast(this->tags.size()); } std::string prefix; @@ -378,7 +378,7 @@ void UIItemTagCtrl::UpdateItemTags() { this->PlaceTagButton(entry->child, visible, x, 0); const int bytes = static_cast(std::strlen(fitted.c_str())); - if (!g_windowMgr.unknown_0458 || static_cast(g_windowMgr.unknown_0458)->m_contents == g_windowMgr.GetHoverWindow()) { + if (!g_windowMgr.rodexComposeWnd || static_cast(g_windowMgr.rodexComposeWnd)->m_contents == g_windowMgr.GetHoverWindow()) { const int cursor = g_serverLanguage->cursor; const int start = static_cast(prefix.size()); const int end = start + bytes + 2; @@ -388,10 +388,10 @@ void UIItemTagCtrl::UpdateItemTags() { } } - this->unknown_0140 += head; - this->unknown_0140 += itemLinkTagOpening; - this->unknown_0140 += entry->link; - this->unknown_0140 += itemLinkTagClosing; + this->linkedText += head; + this->linkedText += itemLinkTagOpening; + this->linkedText += entry->link; + this->linkedText += itemLinkTagClosing; remaining = remaining.substr(found + display.size()); prefix += display; } @@ -400,5 +400,5 @@ void UIItemTagCtrl::UpdateItemTags() { } } - this->unknown_0140 += remaining; + this->linkedText += remaining; } diff --git a/Source/UI/Edit/UIEditBoxEx.cpp b/Source/UI/Edit/UIEditBoxEx.cpp index 1e55789ce..481439f7c 100644 --- a/Source/UI/Edit/UIEditBoxEx.cpp +++ b/Source/UI/Edit/UIEditBoxEx.cpp @@ -41,8 +41,8 @@ void CUIEditCtrlEx::RefreshPlaceholder() { // FUNCTION: fn_14431 void CUIEditBoxEx::ResetSelection() { CUIEditCtrlEx* edit = this->edit; - edit->unknown_0190 = 0; - edit->unknown_018C = 0; + edit->drawOutline = 0; + edit->outlineColor = 0; edit->Invalidate(); } @@ -162,7 +162,7 @@ void CUIEditCtrlEx::Paint() { // FUNCTION: fn_14445 void CUIEditCtrlEx::UpdateScrollBar() { const int total = static_cast(this->lines.size()); - this->visibleLines = std::max(1, (this->geometry.height - this->verticalPadding) / this->unknown_0138); + this->visibleLines = std::max(1, (this->geometry.height - this->verticalPadding) / this->lineHeight); this->scrollMaximum = std::max(0, total - this->visibleLines); this->scrollPosition = std::min(this->scrollPosition, this->line); @@ -171,9 +171,9 @@ void CUIEditCtrlEx::UpdateScrollBar() { } this->scrollPosition = std::clamp(this->scrollPosition, 0, this->scrollMaximum); - static_cast(this->unknown_0130)->SetRange(this->scrollMaximum, this->visibleLines, total); - static_cast(this->unknown_0130)->SetPosition(this->scrollPosition); - this->unknown_0134 = this->scrollMaximum > 0; + static_cast(this->scrollBar)->SetRange(this->scrollMaximum, this->visibleLines, total); + static_cast(this->scrollBar)->SetPosition(this->scrollPosition); + this->scrollEnabled = this->scrollMaximum > 0; } #include "Client/Input/InputCharset.h" @@ -194,8 +194,8 @@ void CUIEditCtrlEx::Synchronize() { const std::string fullText = prefix + this->text; std::vector lines; std::vector breaks; - if (reinterpret_cast(&this->unknown_0184)[1] != 0) { - int wrapWidth = this->geometry.width - this->unknown_0130->geometry.width - this->unknown_01B4; + if (reinterpret_cast(&this->editFlags)[1] != 0) { + int wrapWidth = this->geometry.width - this->scrollBar->geometry.width - this->horizontalPadding; this->WrapTextWithBreaks(fullText.c_str(), &lines, &breaks, wrapWidth); this->WrapLines(lines); } else { @@ -216,7 +216,7 @@ void CUIEditCtrlEx::Synchronize() { for (const std::string& rawLine : lines) { std::size_t crPos = rawLine.find("\r\n"); EditLine line; - line.unknown_0018 = crPos != std::string::npos; + line.hasCarriageReturn = crPos != std::string::npos; line.text = crPos != std::string::npos ? rawLine.substr(0, crPos) : rawLine; int lineLen = static_cast(line.text.size()); @@ -243,7 +243,7 @@ void CUIEditCtrlEx::Synchronize() { this->lines.push_back(line); } - if (this->lines.back().unknown_0018 != 0) { + if (this->lines.back().hasCarriageReturn != 0) { this->lines.emplace_back(); } @@ -251,7 +251,7 @@ void CUIEditCtrlEx::Synchronize() { this->line = 0; this->column = 0; for (std::size_t i = 0; i < this->lines.size(); ++i) { - int fullLen = static_cast(this->lines[i].text.size()) + (this->lines[i].unknown_0018 ? 2 : 0); + int fullLen = static_cast(this->lines[i].text.size()) + (this->lines[i].hasCarriageReturn ? 2 : 0); if (remaining - fullLen <= 0) { this->column = remaining; this->line = static_cast(i); @@ -261,8 +261,8 @@ void CUIEditCtrlEx::Synchronize() { } const EditLine& current = this->lines[this->line]; - if (current.unknown_0018 != 0 || this->unknown_01DC == 0) { - int fullLen = static_cast(current.text.size()) + (current.unknown_0018 ? 2 : 0); + if (current.hasCarriageReturn != 0 || this->wrapPending == 0) { + int fullLen = static_cast(current.text.size()) + (current.hasCarriageReturn ? 2 : 0); if (remaining == fullLen && static_cast(this->line) < this->lines.size() - 1) { this->column = 0; this->line++; @@ -296,9 +296,9 @@ void CUIEditCtrlEx::Synchronize() { // OFFSET: 0x009E5A60 // FUNCTION: fn_14447 void CUIEditCtrlEx::ResetDragState() { - this->unknown_01D4 = -1; - this->unknown_01D8 = 0; - this->unknown_01DC = 0; + this->previousCursorLine = -1; + this->cursorAdvance = 0; + this->wrapPending = 0; } // OFFSET: 0x009E5A80 @@ -409,7 +409,7 @@ void CUIEditCtrlEx::HandleKeyDown(int key, std::intptr_t lparam) { g_serverLanguage->AdvanceCursor(static_cast(this->text.size()) - g_serverLanguage->cursor); } else { g_serverLanguage->AdvanceCursor(static_cast(this->lines[this->line].text.size()) - this->column); - this->unknown_01DC = 1; + this->wrapPending = 1; } return; } @@ -426,13 +426,13 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: position = this->scrollPosition + a; break; case UM_SCROLLVERTPAGEUP: - position = this->unknown_01F0 + this->scrollPosition; + position = this->scrollStep + this->scrollPosition; break; case UM_SCROLLVERTPAGEDOWN: - position = this->scrollPosition - this->unknown_01F0; + position = this->scrollPosition - this->scrollStep; break; case UM_DEFPUSH: - if (reinterpret_cast(&this->unknown_0184)[1] != 0 && HIBYTE(GetKeyState(VK_SHIFT))) { + if (reinterpret_cast(&this->editFlags)[1] != 0 && HIBYTE(GetKeyState(VK_SHIFT))) { g_serverLanguage->Insert("\r\n"); return 0; } @@ -440,8 +440,8 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 0; case UM_UPPUSH: if (this->line > 0) { - if (this->unknown_01D4 == this->line - 1) { - g_serverLanguage->RetreatCursor(this->unknown_01D8); + if (this->previousCursorLine == this->line - 1) { + g_serverLanguage->RetreatCursor(this->cursorAdvance); } else { const EditLine& previous = this->lines[this->line - 1]; int offset; @@ -457,12 +457,12 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } const EditLine& line = this->lines[this->line - 1]; - const int delta = (line.unknown_0018 != 0 ? 2 : 0) + static_cast(line.text.size()) - offset + this->column; + const int delta = (line.hasCarriageReturn != 0 ? 2 : 0) + static_cast(line.text.size()) - offset + this->column; g_serverLanguage->RetreatCursor(delta); - this->unknown_01D8 = delta; + this->cursorAdvance = delta; } - this->unknown_01D4 = this->line; - this->unknown_01DC = 1; + this->previousCursorLine = this->line; + this->wrapPending = 1; } this->selectedAll = 1; return 0; @@ -471,12 +471,12 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: this->selectedAll = 1; return 3; case WM_CHAR: - if (this->unknown_01F8 != 0) { - if (this->unknown_01F8 == 1) { + if (this->textAlignment != 0) { + if (this->textAlignment == 1) { if ((a < '0' || a > '9') && a != VK_BACK) { return 3; } - } else if (this->unknown_01F8 == 2) { + } else if (this->textAlignment == 2) { if ((a < '0' || a > '9') && a != '.' && a != VK_BACK) { return 3; } @@ -489,8 +489,8 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 3; case UM_DOWNPUSH: if (this->lines.size() - 1 > static_cast(this->line)) { - if (this->unknown_01D4 == this->line + 1) { - g_serverLanguage->AdvanceCursor(this->unknown_01D8); + if (this->previousCursorLine == this->line + 1) { + g_serverLanguage->AdvanceCursor(this->cursorAdvance); } else { const EditLine& next = this->lines[this->line + 1]; int offset; @@ -506,12 +506,12 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } const EditLine& line = this->lines[this->line]; - const int delta = (line.unknown_0018 != 0 ? 2 : 0) + static_cast(line.text.size()) - this->column + offset; + const int delta = (line.hasCarriageReturn != 0 ? 2 : 0) + static_cast(line.text.size()) - this->column + offset; g_serverLanguage->AdvanceCursor(delta); - this->unknown_01D8 = delta; + this->cursorAdvance = delta; } - this->unknown_01D4 = this->line; - this->unknown_01DC = 1; + this->previousCursorLine = this->line; + this->wrapPending = 1; } this->selectedAll = 1; return 0; @@ -524,8 +524,8 @@ int CUIEditCtrlEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } this->scrollPosition = std::clamp(position, 0, this->scrollMaximum); - static_cast(this->unknown_0130)->SetPosition(this->scrollPosition); - this->unknown_0134 = this->scrollMaximum > 0; + static_cast(this->scrollBar)->SetPosition(this->scrollPosition); + this->scrollEnabled = this->scrollMaximum > 0; return 0; } @@ -548,8 +548,8 @@ void CUIEditBoxEx::SetTextColor(std::uint32_t color) { // FUNCTION: fn_14455 void CUIEditBoxEx::SetHighlight(int value) { CUIEditCtrlEx* edit = this->edit; - edit->unknown_018C = value; - edit->unknown_0190 = 1; + edit->outlineColor = value; + edit->drawOutline = 1; edit->Invalidate(); } @@ -629,7 +629,7 @@ void CUIEditBoxEx::Create(int width, int height, bool withScrollBar) { this->edit = new CUIEditCtrlEx(); this->edit->SetSize(width, height); if (withScrollBar) { - reinterpret_cast(&this->edit->unknown_0184)[1] = 1; + reinterpret_cast(&this->edit->editFlags)[1] = 1; } this->AddChild(this->edit); this->SetSize(width, height); @@ -646,15 +646,15 @@ void CUIEditCtrlEx::PaintTextLines() { } int width = this->geometry.width; - if (reinterpret_cast(&this->unknown_0184)[1] != 0) { - width -= this->unknown_0130->geometry.width; + if (reinterpret_cast(&this->editFlags)[1] != 0) { + width -= this->scrollBar->geometry.width; } if (this->lines.empty()) { - int x = this->unknown_01B4; + int x = this->horizontalPadding; if (this->alignment == 2) { const int caretWidth = this->TextWidth("|", 0, 0, 12, 0, 0); - x = width - this->unknown_01B4 - caretWidth; + x = width - this->horizontalPadding - caretWidth; } else if (this->alignment == 6) { x = width / 2; } @@ -663,7 +663,7 @@ void CUIEditCtrlEx::PaintTextLines() { } const int lineCount = static_cast(this->lines.size()); - const int visibleLines = std::max(1, (this->geometry.height - this->verticalPadding) / this->unknown_0138); + const int visibleLines = std::max(1, (this->geometry.height - this->verticalPadding) / this->lineHeight); int firstLine = this->scrollPosition; int endLine = std::min(firstLine + visibleLines, lineCount); @@ -671,13 +671,13 @@ void CUIEditCtrlEx::PaintTextLines() { EditLine& line = this->lines[lineIndex]; const int textWidth = this->TextWidth(line.text.c_str(), 0, 0, 12, 0, 0); - int x = this->unknown_01B4; + int x = this->horizontalPadding; if (this->alignment == 2) { x = width - x - textWidth; } else if (this->alignment == 6) { x = (width - textWidth) / 2; } - int y = (lineIndex - firstLine) * this->unknown_0138 + this->verticalPadding; + int y = (lineIndex - firstLine) * this->lineHeight + this->verticalPadding; if (!line.text.empty()) { if (g_windowMgr.GetHoverWindow() == this && line.selectionEnd - line.selectionBegin > 0) { @@ -690,13 +690,13 @@ void CUIEditCtrlEx::PaintTextLines() { this->PlaceLinks(line.text, y, lineIndex, firstLine, endLine); - if (this->unknown_0190) { - this->DrawEmboldenedText(x, this->verticalPadding + y, line.text.c_str(), this->textColor, this->unknown_018C, 0, 0, 12); + if (this->drawOutline) { + this->DrawEmboldenedText(x, this->verticalPadding + y, line.text.c_str(), this->textColor, this->outlineColor, 0, 0, 12); } else { this->DrawTextAt(x, this->verticalPadding + y, line.text.c_str(), 0, 0, 12, this->textColor, 0, 0); } - this->PlaceTags(x, y, firstLine, endLine, lineIndex, this->unknown_013C); + this->PlaceTags(x, y, firstLine, endLine, lineIndex, this->lineCount); } if (g_windowMgr.GetHoverWindow() == this && lineIndex == this->line) { @@ -709,24 +709,24 @@ void CUIEditCtrlEx::PaintTextLines() { CUIEditCtrlEx::CUIEditCtrlEx() : UIEditCtrl3(), normalColor(0), - unknown_018C(0), - unknown_0190(0), + outlineColor(0), + drawOutline(0), placeholderColor(0x808080), alignment(0), - unknown_01B4(3), + horizontalPadding(3), verticalPadding(1), selectedAll(0), column(0), line(0), - unknown_01D4(-1), - unknown_01D8(0), - unknown_01DC(0), + previousCursorLine(-1), + cursorAdvance(0), + wrapPending(0), caretStart(std::chrono::system_clock::now()), scrollMaximum(0), visibleLines(0), - unknown_01F0(1), + scrollStep(1), scrollPosition(0), - unknown_01F8(0) { + textAlignment(0) { } // OFFSET: 0x009E45F0 diff --git a/Source/UI/Edit/UIEditBoxEx.h b/Source/UI/Edit/UIEditBoxEx.h index 42b1ac387..fcfc2d858 100644 --- a/Source/UI/Edit/UIEditBoxEx.h +++ b/Source/UI/Edit/UIEditBoxEx.h @@ -13,7 +13,7 @@ struct EditLine { /* 0000 */ std::string text; - /* 0018 */ unsigned char unknown_0018 = 0; + /* 0018 */ unsigned char hasCarriageReturn = 0; /* 001C */ int selectionBegin = 0; /* 0020 */ int selectionEnd = 0; }; @@ -39,26 +39,26 @@ public: int TrailingOffsetFitting(const std::string& text, int width); /* 0188 */ std::uint32_t normalColor; - /* 018C */ int unknown_018C; - /* 0190 */ unsigned char unknown_0190; + /* 018C */ int outlineColor; + /* 0190 */ unsigned char drawOutline; /* 0194 */ std::string placeholder; /* 01AC */ std::uint32_t placeholderColor; /* 01B0 */ int alignment; - /* 01B4 */ int unknown_01B4; + /* 01B4 */ int horizontalPadding; /* 01B8 */ int verticalPadding; /* 01BC */ std::vector lines; /* 01C8 */ unsigned char selectedAll; /* 01CC */ int column; /* 01D0 */ int line; - /* 01D4 */ int unknown_01D4; - /* 01D8 */ int unknown_01D8; - /* 01DC */ unsigned char unknown_01DC; + /* 01D4 */ int previousCursorLine; + /* 01D8 */ int cursorAdvance; + /* 01DC */ unsigned char wrapPending; /* 01E0 */ std::chrono::system_clock::time_point caretStart; /* 01E8 */ int scrollMaximum; /* 01EC */ int visibleLines; - /* 01F0 */ int unknown_01F0; + /* 01F0 */ int scrollStep; /* 01F4 */ int scrollPosition; - /* 01F8 */ int unknown_01F8; + /* 01F8 */ int textAlignment; }; class CUIEditBoxEx : public CUIControl { diff --git a/Source/UI/Edit/UIEditCtrl.cpp b/Source/UI/Edit/UIEditCtrl.cpp index 76ac230c0..b105a06d7 100644 --- a/Source/UI/Edit/UIEditCtrl.cpp +++ b/Source/UI/Edit/UIEditCtrl.cpp @@ -237,7 +237,7 @@ UIEditCtrl::UIEditCtrl(const UIEditCtrl& other) : UIWindow(0) { this->textY = other.textY; this->invalidatesParent = other.invalidatesParent; this->topPadding = other.topPadding; - this->unknown_00F0 = other.unknown_00F0; + this->tagTextLength = other.tagTextLength; } // OFFSET: 0x0084FAE0 @@ -257,7 +257,7 @@ UIEditCtrl::UIEditCtrl() : UIWindow(0), borderRed(0), borderGreen(0), borderBlue this->textY = 0; this->invalidatesParent = 0; this->topPadding = 0; - this->unknown_00F0 = 0; + this->tagTextLength = 0; } // OFFSET: 0x008517E0 @@ -648,9 +648,9 @@ void UIChatEditCtrl::PushHistory() { return; } - if (this->unknown_0140 == static_cast(this->history.size())) { + if (this->historyIndex == static_cast(this->history.size())) { if (this->history.size() >= static_cast(this->historyLimit)) { - --this->unknown_0140; + --this->historyIndex; std::move(this->history.begin() + 1, this->history.end(), this->history.begin()); this->history.pop_back(); } @@ -659,14 +659,14 @@ void UIChatEditCtrl::PushHistory() { } this->history.push_back(std::string(this->text.c_str())); } else { - this->history[this->unknown_0140] = this->Text(); + this->history[this->historyIndex] = this->Text(); } - ++this->unknown_0140; - if (this->unknown_0140 == static_cast(this->history.size())) { + ++this->historyIndex; + if (this->historyIndex == static_cast(this->history.size())) { this->SetText(""); } else { - this->SetText(this->history[this->unknown_0140].c_str()); + this->SetText(this->history[this->historyIndex].c_str()); } } @@ -798,7 +798,7 @@ void UIBmpTextButton2::DrawLabels() { std::uint32_t color = this->labels[index].color; std::uint32_t shadowColor = 0xE6E6E6; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: shadowX = x + 1; shadowY = y + 1; @@ -837,10 +837,10 @@ void UIBmpTextButton2::DrawLabels() { void UITextureButton::VisitChildren() { CTexture* texture = nullptr; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: texture = g_texMgr.Load( - (this->unknown_011C == 1 && this->unknown_011D == 1 ? this->pressedTexture : this->normalTexture).c_str(), 0, false, true, false + (this->toggleEnabled == 1 && this->toggled == 1 ? this->pressedTexture : this->normalTexture).c_str(), 0, false, true, false ); break; case 1: @@ -935,16 +935,16 @@ void UIEditCtrl_Custom::Synchronize() { int before = 0; if (this->firstVisible != 0) { - before = this->TextWidth(this->text.c_str(), this->firstVisible, 0, 12, this->unknown_011C, 0); + before = this->TextWidth(this->text.c_str(), this->firstVisible, 0, 12, this->labelBold, 0); } - const int position = this->TextWidth(this->text.c_str(), this->cursor, 0, 12, this->unknown_011C, 0); + const int position = this->TextWidth(this->text.c_str(), this->cursor, 0, 12, this->labelBold, 0); if (position + 3 - before > this->geometry.width - 12) { const char* end = this->text.c_str() + this->text.size(); const char* next = CharNextExA(static_cast(g_textCodePage), this->text.c_str(), 0); - while (this->TextWidth(next, 0, 0, 12, this->unknown_011C, 0) + 3 > this->geometry.width - 12 && next < end) { + while (this->TextWidth(next, 0, 0, 12, this->labelBold, 0) + 3 > this->geometry.width - 12 && next < end) { next = CharNextExA(static_cast(g_textCodePage), next, 0); } @@ -953,7 +953,7 @@ void UIEditCtrl_Custom::Synchronize() { this->firstVisible = std::min(this->cursor - tail, scrolled); } } else if (this->cursor < previousCursor) { - if (this->TextWidth(this->text.c_str(), this->cursor, 0, 12, this->unknown_011C, 0) + 3 < this->geometry.width - 12 && this->firstVisible > this->cursor) { + if (this->TextWidth(this->text.c_str(), this->cursor, 0, 12, this->labelBold, 0) + 3 < this->geometry.width - 12 && this->firstVisible > this->cursor) { this->firstVisible += this->cursor - previousCursor; } @@ -1064,7 +1064,7 @@ void UIItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { const ModeDragState* drag = reinterpret_cast(value); switch (drag->source) { case 1: - if (reinterpret_cast(drag->unknown_038C) == this->tabs) { + if (reinterpret_cast(drag->sourceWindow) == this->tabs) { PACKET_CZ_INVENTORY_TAB packet; packet.packetType = ID_CZ_INVENTORY_TAB; packet.index = static_cast(drag->id); @@ -1090,7 +1090,7 @@ void UIItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 6, 0, 0, 0); return; case 14: { - UIWindow* target = reinterpret_cast(g_windowMgr.unknown_0378); + UIWindow* target = reinterpret_cast(g_windowMgr.makeTargetProcessWnd); if (target) { target->SendMsg(nullptr, UM_CLEAR_ITEM, reinterpret_cast(drag->name.c_str()), 0, 0, 0); @@ -1123,22 +1123,22 @@ void UIItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { void UIItemStoreFindWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_01D4) { - if (mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + if (mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.identity[1]), item.quantity, 0, 0); } - } else if (g_windowMgr.unknown_02F4 && mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + } else if (g_windowMgr.merchantItemWnd && mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.identity[1]), item.quantity, 0, 0); } } else if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - if (g_windowMgr.unknown_01D4) { - mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.identity[1]), item.quantity, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1151,22 +1151,22 @@ void UIItemStoreFindWnd::OnRBtnDown(int x, int y) { void UIItemStoreSubWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_01D4) { - if (mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + if (mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.identity[1]), item.quantity, 0, 0); } - } else if (g_windowMgr.unknown_02F4 && mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + } else if (g_windowMgr.merchantItemWnd && mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.identity[1]), item.quantity, 0, 0); } } else if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - if (g_windowMgr.unknown_01D4) { - mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.identity[1]), item.quantity, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1179,21 +1179,21 @@ void UIItemStoreSubWnd::OnRBtnDown(int x, int y) { void UIItemStoreWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_01D4) { - if (mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + if (mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_BODY, static_cast(item.identity[1]), item.quantity, 0, 0); } - } else if (g_windowMgr.unknown_02F4 && mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + } else if (g_windowMgr.merchantItemWnd && mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_STORE_TO_CART, static_cast(item.identity[1]), item.quantity, 0, 0); } } else if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL, static_cast(item.identity[1]), item.quantity, 0, 0); } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -1205,53 +1205,53 @@ void UIItemStoreWnd::OnRBtnDown(int x, int y) { void UIItemWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_01F0 || g_windowMgr.unknown_01F8) { + if (g_windowMgr.sayDialogWnd || g_windowMgr.choose3Wnd) { return; } - item = LookupClientItemByIdentity(g_session.m_inventoryItems, item.unknown_0000[1]); + item = LookupClientItemByIdentity(g_session.m_inventoryItems, item.identity[1]); mode->drag.BeginItem(g_windowMgr, 1, item, item.quantity, -1); if (mode->ConfirmDraggedItemUse()) { return; } if (g_windowMgr.window_0288) { - if (mode->unknown_05CE) { - mode->unknown_05CE = 0; - mode->SendMsg(MM_ADD_ITEM_TO_STORE, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (mode->inventoryChanged) { + mode->inventoryChanged = 0; + mode->SendMsg(MM_ADD_ITEM_TO_STORE, static_cast(item.identity[1]), item.quantity, 0, 0); } } else if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { - if (mode->unknown_05CE) { - mode->unknown_05CE = 0; - mode->SendMsg(MM_ADD_EXCHANGE_ITEM, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (mode->inventoryChanged) { + mode->inventoryChanged = 0; + mode->SendMsg(MM_ADD_EXCHANGE_ITEM, static_cast(item.identity[1]), item.quantity, 0, 0); } - } else if (g_windowMgr.unknown_02F4 && mode->unknown_05CE) { - mode->unknown_05CE = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_BODY_TO_CART, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + } else if (g_windowMgr.merchantItemWnd && mode->inventoryChanged) { + mode->inventoryChanged = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_BODY_TO_CART, static_cast(item.identity[1]), item.quantity, 0, 0); } } else if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { if (this->tabs) { - mode->SendMsg(MM_INVENTORY_TAB, static_cast(item.unknown_0000[1]), this->tabs->unknown_007C == 3, 0, 0); + mode->SendMsg(MM_INVENTORY_TAB, static_cast(item.identity[1]), this->tabs->activeTabIndex == 3, 0, 0); } } else if (HIBYTE(GetAsyncKeyState(VK_CONTROL))) { - if (item.unknown_0000[1] > 0 && !g_session.IsPetEgg(item.GetItemId())) { + if (item.identity[1] > 0 && !g_session.IsPetEgg(item.GetItemId())) { const int magnifiers = LookupClientItem(g_session.m_inventoryItems, 611, 0).quantity + LookupClientItem(g_session.m_inventoryItems, 12325, 0).quantity; if (magnifiers <= 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_UISCRIPT_ERROR_GUIDE)), 255, 0, 0, 0); } - if (this->unknown_010C == 1 && !item.identified) { + if (this->categoryFilter == 1 && !item.identified) { struct { unsigned short packetType; unsigned short index; } packet; packet.packetType = ID_CZ_REQ_ONECLICK_ITEMIDENTIFY; - packet.index = static_cast(item.unknown_0000[1]); + packet.index = static_cast(item.identity[1]); GetRagConnection().Send(g_packetLengths.FixedLength(packet.packetType), &packet); } } @@ -1273,14 +1273,14 @@ void UIMerchantItemPurchaseWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_0300) { + if (g_windowMgr.merchantItemShopWnd) { item = g_session.FindItem1760ByItemId(item.itemId.c_str()); mode->drag.BeginItem(g_windowMgr, 13, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_0300)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + reinterpret_cast(g_windowMgr.merchantItemShopWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1300,13 +1300,13 @@ void UIMerchantItemShopWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_0308) { + if (g_windowMgr.merchantItemPurchaseWnd) { mode->drag.BeginItem(g_windowMgr, 12, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_0308)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + reinterpret_cast(g_windowMgr.merchantItemPurchaseWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1319,24 +1319,24 @@ void UIMerchantItemShopWnd::OnRBtnDown(int x, int y) { void UIMerchantItemWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (!g_windowMgr.LookupWindow(WID_EXCHANGEUI) && !g_windowMgr.unknown_02FC) { + if (!g_windowMgr.LookupWindow(WID_EXCHANGEUI) && !g_windowMgr.merchantShopMakeWnd) { if (g_windowMgr.window_0288) { - if (mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_STORE, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_STORE, static_cast(item.identity[1]), item.quantity, 0, 0); } - } else if (g_windowMgr.unknown_01D4 && mode->unknown_05CC[2]) { - mode->unknown_05CC[2] = 0; - mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_BODY, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + } else if (g_windowMgr.itemWnd && mode->bossAlarmAndCopyNameFlags[2]) { + mode->bossAlarmAndCopyNameFlags[2] = 0; + mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_BODY, static_cast(item.identity[1]), item.quantity, 0, 0); } } } else if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { - if (g_windowMgr.unknown_01D4) { - mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL_FROM_STORAGE, static_cast(item.unknown_0000[1]), item.quantity, 0, 0); + if (g_windowMgr.itemWnd) { + mode->SendMsg(MM_MOVE_ITEM_TO_PERSONAL_FROM_STORAGE, static_cast(item.identity[1]), item.quantity, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1349,18 +1349,18 @@ void UIMerchantItemWnd::OnRBtnDown(int x, int y) { void UIMerchantMirrorItemWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_02FC) { - item = g_session.FindItem1750(item.unknown_0000[1]); + if (g_windowMgr.merchantShopMakeWnd) { + item = g_session.FindItem1750(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 11, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_02FC)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); - } else if (g_windowMgr.unknown_040C) { - item = g_session.FindItem1750(item.unknown_0000[1]); + reinterpret_cast(g_windowMgr.merchantShopMakeWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + } else if (g_windowMgr.buyingShopMakeWnd) { + item = g_session.FindItem1750(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 20, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_040C)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + reinterpret_cast(g_windowMgr.buyingShopMakeWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -1374,23 +1374,23 @@ UIMerchantShopMakeWnd::UIMerchantShopMakeWnd(int mode) : UIFrameWnd(0), mode(mod this->scrollBar = nullptr; this->scroll = 0; this->columns = 1; - this->unknown_0140 = 4; - this->unknown_0144 = 0; + this->minimumRows = 4; + this->scrollable = 0; this->saved = nullptr; this->editIndex = -1; this->notice = nullptr; - this->unknown_0154 = 0; + this->initialHeight = 0; this->visibleRows = 4; - this->unknown_0158 = 4; + this->maxVisibleRows = 4; this->actionButtons[0] = nullptr; this->actionButtons[1] = nullptr; - this->unknown_016C = 0; - this->unknown_0170.clear(); - this->unknown_0188 = 0; + this->previousPriceLength = 0; + this->previousPriceText.clear(); + this->itemsSet = 0; this->suspended = 0; - this->unknown_018A = -1; - this->unknown_018C = -1; - this->unknown_0168 = nullptr; + this->selectedRow = -1; + this->selectedColumn = -1; + this->actionButton = nullptr; } // OFFSET: 0x00990090 @@ -1399,7 +1399,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ switch (message) { case UM_SETTITLE: { char text[40]; - std::sprintf(text, "%s : %s", LookupMessage(this->unknown_0100 != 0 ? 1734 : 226), g_session.unknown_550C.c_str()); + std::sprintf(text, "%s : %s", LookupMessage(this->buyingShop != 0 ? 1734 : 226), g_session.storeTitle.c_str()); this->title->SetTextFitted(text); return 0; } @@ -1427,17 +1427,17 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ const int newHeight = (height - 120) / 32 * 32 + 120; if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); - this->visibleRows = static_cast(newHeight - this->unknown_011C - 17) / 32; + this->visibleRows = static_cast(newHeight - this->footerHeight - 17) / 32; this->columns = (newWidth - 40) / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); - this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->unknown_011C - 17); - this->saleAlarm->Move(12, this->unknown_0100 != 0 ? this->geometry.height - 12 : this->geometry.height - 18); + this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->footerHeight - 17); + this->saleAlarm->Move(12, this->buyingShop != 0 ? this->geometry.height - 12 : this->geometry.height - 18); this->buttons[0]->Move(this->geometry.width - 61, this->geometry.height - 24); if (this->actionButton) { this->actionButton->Move(this->geometry.width - this->actionButton->geometry.width - 66, this->geometry.height - 24); } - if (this->unknown_0100 != 0) { + if (this->buyingShop != 0) { this->notice->Move(12, this->geometry.height - 26); } this->UpdateScrollBar(); @@ -1453,7 +1453,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ if (a == ID_CLOSE) { mode = g_modeMgr.gameMode; int windowId; - if (this->unknown_0100 != 0) { + if (this->buyingShop != 0) { if (this->shopOpen == 1) { g_windowMgr.CloseWindow(WID_MERCHANTITEMMYSHOPWND_MODE_1); mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); @@ -1487,7 +1487,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ closed: if (this->shopOpen == 0) { - g_session.m_storeInfoBackup.Save(this->unknown_0100); + g_session.m_storeInfoBackup.Save(this->buyingShop); } g_session.ClearItems1758(); return 0; @@ -1500,9 +1500,9 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ if (a == ID_CLOSE_OFFLINE_STORE && g_windowMgr.Confirm(LookupMessage(MSI_LIMIT_USER_MSG), 2, true, false, 0, "Message", 280, 120, 0) == 187) { - mode->SendMsg(MM_CLOSE_OFFLINE_STORE, this->unknown_010C, 0, 0, 0); + mode->SendMsg(MM_CLOSE_OFFLINE_STORE, this->offlineStoreId, 0, 0, 0); mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); - if (this->unknown_0100 == 1) { + if (this->buyingShop == 1) { g_windowMgr.CloseWindow(WID_MERCHANTITEMMYSHOPWND_MODE_1); } else { g_windowMgr.CloseWindow(WID_MERCHANTITEMMYSHOPWND); @@ -1516,7 +1516,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ const int size = g_session.GetList9Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1758At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -1531,11 +1531,11 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ std::sprintf(text, LookupMessage(MSI_BUYINGSTORE_MYSHOPWND_LIMITZENY), FormatGroupedInteger(static_cast(a), grouped, 80)); this->notice->SetTextAutoWidth(text); this->notice->Move(12, this->geometry.height - 26); - this->unknown_00F0 = static_cast(a); + this->buyingZeny = static_cast(a); return 0; } case UM_SETNAID: - this->unknown_010C = static_cast(a); + this->offlineStoreId = static_cast(a); return 0; case UM_REPLAY_FRAMED_DATA: { const auto* bytes = reinterpret_cast(a); @@ -1552,9 +1552,9 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ } if (header.type == 21052) { - std::memcpy(&this->unknown_00F0, bytes + offset, header.size); + std::memcpy(&this->buyingZeny, bytes + offset, header.size); offset += header.size; - this->SendMsg(nullptr, UM_SET_BUYING_SHOP_ZENY, this->unknown_00F0, 0, 0, 0); + this->SendMsg(nullptr, UM_SET_BUYING_SHOP_ZENY, this->buyingZeny, 0, 0, 0); } else { offset += header.size; } @@ -1574,7 +1574,7 @@ int UIMerchantItemMyShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { switch (message) { case UM_SETTITLE: { - this->unknown_00FC = a; + this->cashShopMode = a; if (a) { this->quantityEdit->Move(110, this->geometry.height - 50); } else { @@ -1582,7 +1582,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s } const char* format; - if (!this->unknown_00FC) { + if (!this->cashShopMode) { format = "Total : %d Zeny"; } else if (g_serviceType == 6) { format = "Total : %d Koin"; @@ -1632,7 +1632,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s item.Assign(reinterpret_cast(drag)); int total = g_session.GetItem1720Total(); int budget = g_session.m_zeny; - if (this->unknown_00FC) { + if (this->cashShopMode) { if (g_session.GetList2Size() == 10) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast("한 번에 10개 이상 구매 할 수 없습니다."), 0xFF, 0, 0, 0); @@ -1641,7 +1641,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s budget = g_pendingGid + g_pendingAid; } - total += drag.quantity * drag.unknown_0314; + total += drag.quantity * drag.price; int owned = 0; for (std::list::iterator it = this->items.begin(); it != this->items.end(); ++it) { if (it->itemId == item.itemId) { @@ -1664,7 +1664,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } else { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); - g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(this->unknown_00FC ? 1254 : 55)), 0xFF, 0, 0, 0); + g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(this->cashShopMode ? 1254 : 55)), 0xFF, 0, 0, 0); } } @@ -1675,7 +1675,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->RecordResponse(static_cast(a), b, c, d); CMode* mode = g_modeMgr.gameMode; if (a == ID_OK) { - if (!this->unknown_00FC) { + if (!this->cashShopMode) { mode->SendMsg(MM_REQ_PURCHASE, 0, 0, 0, 0); } else { if (!g_session.GetList2Size()) { @@ -1731,7 +1731,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s g_windowMgr.CloseWindow(WID_ITEMSHOPWND); g_windowMgr.CloseWindow(WID_ITEMPURCHASEWND); } else { - if (a == ID_APPLY && this->unknown_00FC) { + if (a == ID_APPLY && this->cashShopMode) { int amount = std::atoi(this->quantityEdit->Text()); if (amount < 0) { amount = 0; @@ -1777,7 +1777,7 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s } this->title->Move(12, this->geometry.height - 20); - if (this->unknown_00FC) { + if (this->cashShopMode) { this->quantityEdit->Move(110, this->geometry.height - 50); } else { this->quantityEdit->Move(-100, -100); @@ -1801,14 +1801,14 @@ int UIItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s const int size = g_session.GetList2Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1720At(i); - if (item.unknown_0000[1] != 0) { - total += item.quantity * item.unknown_0014[1]; + if (item.identity[1] != 0) { + total += item.quantity * item.prices[1]; this->items.push_back(item); } } const char* format; - if (!this->unknown_00FC) { + if (!this->cashShopMode) { format = "Total : %s Zeny"; } else if (g_serviceType == 6) { format = "Total : %s Koin"; @@ -1869,12 +1869,12 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } return 0; case UM_SETSTATE: - this->geometry.unknown_0030 = static_cast(a); + this->geometry.state = static_cast(a); if (a == 20) { char text[24]; std::sprintf(text, "%d", b); this->m_edit->SetText(text); - if (this->geometry.unknown_0030 == 20) { + if (this->geometry.state == 20) { this->m_edit->SetText(IntToString(static_cast(b), 0).c_str()); return 0; } @@ -1882,7 +1882,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st return 0; case UM_SETTEXT: if (b != 0) { - reinterpret_cast(this->unknown_00B8)->SetText(reinterpret_cast(b), 0); + reinterpret_cast(this->itemTitle)->SetText(reinterpret_cast(b), 0); this->Invalidate(); return 0; } @@ -1897,16 +1897,16 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st this->m_edit->Synchronize(); } int quantity = std::atoi(this->m_edit->text.c_str()); - this->RecordResponse(184, 100, quantity, this->geometry.unknown_0030); + this->RecordResponse(184, 100, quantity, this->geometry.state); if (g_replayAnimationScaling != 0 && b == 100) { - this->geometry.unknown_0030 = d; - mode->unknown_05EC[0] = 0; + this->geometry.state = d; + mode->replayDragState[0] = 0; quantity = static_cast(c); } UIWindow* window; int windowId; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: if (quantity <= 0 || quantity > mode->drag.quantity) { goto invalid; @@ -1928,7 +1928,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0xFF, 0, 0, 0); } - window = g_windowMgr.unknown_0258; + window = g_windowMgr.itemPurchaseWnd; goto notify; case 2: case 16: { @@ -1943,10 +1943,10 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = owned; } mode->drag.quantity = quantity; - if (this->geometry.unknown_0030 == 2) { - window = g_windowMgr.unknown_025C; - } else if (this->geometry.unknown_0030 == 16) { - window = g_windowMgr.unknown_0260; + if (this->geometry.state == 2) { + window = g_windowMgr.itemSellWnd; + } else if (this->geometry.state == 16) { + window = g_windowMgr.itemSellWnd2; } else { break; } @@ -1964,7 +1964,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = owned; } mode->drag.quantity = quantity; - window = g_windowMgr.unknown_0250; + window = g_windowMgr.itemShopWnd; goto notify; } case 4: @@ -1980,10 +1980,10 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = owned; } mode->drag.quantity = quantity; - if (this->geometry.unknown_0030 == 4) { - window = g_windowMgr.unknown_0250; - } else if (this->geometry.unknown_0030 == 15) { - window = g_windowMgr.unknown_0254; + if (this->geometry.state == 4) { + window = g_windowMgr.itemShopWnd; + } else if (this->geometry.state == 15) { + window = g_windowMgr.itemShopWnd2; } else { break; } @@ -2021,7 +2021,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } } } else if (mode->drag.source == 9) { - if (g_windowMgr.unknown_02FC) { + if (g_windowMgr.merchantShopMakeWnd) { break; } if (g_session.GetItem1740Quantity(mode->drag.id) != 0) { @@ -2036,13 +2036,13 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st mode->drag.quantity = quantity <= owned ? quantity : owned; } } - window = g_windowMgr.unknown_01D4; + window = g_windowMgr.itemWnd; goto notify; case 7: { int owned = 0; if (mode->drag.source == 9) { const ITEM_INFO item = g_session.FindItem1740(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } } else { @@ -2065,12 +2065,12 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st int owned = 0; if (mode->drag.source == 1) { const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } } else if (mode->drag.source == 6) { const ITEM_INFO item = g_session.FindItem1738(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } } else { @@ -2083,7 +2083,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = g_windowMgr.unknown_02F4; + window = g_windowMgr.merchantItemWnd; goto notify; } case 9: { @@ -2092,7 +2092,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } int owned = 0; const ITEM_INFO item = g_session.FindItem1750(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } if (owned == 0) { @@ -2102,7 +2102,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = g_windowMgr.unknown_02FC; + window = g_windowMgr.merchantShopMakeWnd; goto notify; } case 10: { @@ -2111,7 +2111,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } int owned = 0; const ITEM_INFO item = g_session.FindItem1768(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } if (owned == 0) { @@ -2121,7 +2121,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = reinterpret_cast(g_windowMgr.unknown_02F8); + window = reinterpret_cast(g_windowMgr.merchantMirrorItemWnd); goto notify; } case 11: { @@ -2136,7 +2136,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = g_windowMgr.unknown_0300; + window = g_windowMgr.merchantItemShopWnd; goto notify; } case 12: @@ -2144,7 +2144,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); } mode->drag.quantity = quantity; - window = g_windowMgr.unknown_0308; + window = g_windowMgr.merchantItemPurchaseWnd; goto notify; case 13: { if (!g_session.HasInventoryItem(mode->drag.id)) { @@ -2157,7 +2157,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (owned != 0) { mode->drag.quantity = quantity <= owned ? quantity : owned; } - window = g_windowMgr.unknown_0458; + window = g_windowMgr.rodexComposeWnd; goto notify; } case 17: { @@ -2166,7 +2166,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } int owned = 0; const ITEM_INFO item = g_session.FindItem1750(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } if (owned == 0) { @@ -2176,7 +2176,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = g_windowMgr.unknown_041C; + window = g_windowMgr.buyingShopPurchaseWnd; goto notify; } case 18: { @@ -2185,7 +2185,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st } int owned = 0; const ITEM_INFO item = g_session.FindItem1760(mode->drag.id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { owned = item.quantity; } if (owned == 0) { @@ -2195,7 +2195,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st quantity = 1; } mode->drag.quantity = quantity <= owned ? quantity : owned; - window = reinterpret_cast(g_windowMgr.unknown_0420); + window = reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd); goto notify; } case 19: @@ -2268,7 +2268,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (quantity <= 0) { goto invalid; } - const int owned = g_barterMarketItemMgr->GetAllItemValueById(mode->drag.unknown_03B0); + const int owned = g_barterMarketItemMgr->GetAllItemValueById(mode->drag.barterId); if (owned <= 0) { goto invalid; } @@ -2289,7 +2289,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (quantity > 30000) { goto tooMany; } - int limit = g_barterMarketItemMgr->GetValueById(mode->drag.unknown_03B0); + int limit = g_barterMarketItemMgr->GetValueById(mode->drag.barterId); if (limit == -1) { limit = 30000; } @@ -2303,7 +2303,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (quantity <= 0) { goto invalid; } - const int owned = g_expandedBarterMarketItemMgr->GetValueById(mode->drag.unknown_03B0); + const int owned = g_expandedBarterMarketItemMgr->GetValueById(mode->drag.barterId); if (owned <= 0) { goto invalid; } @@ -2324,7 +2324,7 @@ int UIItemDropCntWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st if (quantity > 30000) { goto tooMany; } - int limit = g_expandedBarterMarketItemMgr->GetItemValueById(mode->drag.unknown_03B0); + int limit = g_expandedBarterMarketItemMgr->GetItemValueById(mode->drag.barterId); if (limit == -1) { limit = 30000; } @@ -2376,39 +2376,39 @@ void UIMerchantShopMakeWnd::OnCreate(int width, int height) { int count; if (this->mode != 0) { count = g_session.m_buyingStoreSlotCount; - this->unknown_00B4 = LookupMessage(MSI_BUYINGSTORE_MAKEWND_TITLE); + this->title = LookupMessage(MSI_BUYINGSTORE_MAKEWND_TITLE); } else { count = g_session.m_vendingSlotCount; - this->unknown_00B4 = LookupMessage(MSI_MERCHANTSHOPMAKER); + this->title = LookupMessage(MSI_MERCHANTSHOPMAKER); } - this->unknown_00CC = new UIEditCtrl(); - this->unknown_00CC->SetSize(this->geometry.width - 66, 16); - this->unknown_00CC->Move(41, 22); - this->unknown_00CC->maximum = 36; - this->unknown_00CC->Background(232, 232, 232); - this->unknown_00CC->SetText(""); - this->AddChild(this->unknown_00CC); - g_windowMgr.SetFocus(this->unknown_00CC); + this->titleEdit = new UIEditCtrl(); + this->titleEdit->SetSize(this->geometry.width - 66, 16); + this->titleEdit->Move(41, 22); + this->titleEdit->maximum = 36; + this->titleEdit->Background(232, 232, 232); + this->titleEdit->SetText(""); + this->AddChild(this->titleEdit); + g_windowMgr.SetFocus(this->titleEdit); UIScrollBar* scrollBar = new UIScrollBar(); this->scrollBar = scrollBar; scrollBar->Configure(this->geometry.width - 15, 17, 1, this->geometry.height - 58); this->AddChild(this->scrollBar); - this->unknown_012C = count; + this->slotCount = count; if (this->mode == 0) { if (count > 13) { - this->unknown_012C = 13; + this->slotCount = 13; } } else if (count > 5) { - this->unknown_012C = 5; + this->slotCount = 5; } this->columns = 1; - this->unknown_0140 = 4; + this->minimumRows = 4; int y = 54; - for (int index = 0; index < this->unknown_012C; ++index, y += 42) { + for (int index = 0; index < this->slotCount; ++index, y += 42) { if (this->mode != 0) { UIEditCtrl* quantity = new UIEditCtrlWheel(); this->quantityEdits[index] = quantity; @@ -2440,13 +2440,13 @@ void UIMerchantShopMakeWnd::OnCreate(int width, int height) { if (this->mode != 0) { const int labelWidth = this->TextWidth(LookupMessage(MSI_BUYINGSTORE_MAKEWND_LIMITZENY), 0, 0, 12, 0, 0); - this->unknown_0128 = new UIEditCtrlWheel(); - this->unknown_0128->Move(labelWidth + 10, this->geometry.height - 17); - this->unknown_0128->SetSize(94, 16); - this->unknown_0128->maximum = 15; - this->unknown_0128->Background(232, 232, 232); - this->unknown_0128->SetText("0"); - this->AddChild(this->unknown_0128); + this->zenyLimitEdit = new UIEditCtrlWheel(); + this->zenyLimitEdit->Move(labelWidth + 10, this->geometry.height - 17); + this->zenyLimitEdit->SetSize(94, 16); + this->zenyLimitEdit->maximum = 15; + this->zenyLimitEdit->Background(232, 232, 232); + this->zenyLimitEdit->SetText("0"); + this->AddChild(this->zenyLimitEdit); } const std::string prefix("유저인터페이스\\"); @@ -2477,11 +2477,11 @@ void UIMerchantShopMakeWnd::OnCreate(int width, int height) { notice->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_QUEST_INFO_01)); notice->FitToText(); notice->Move(12, this->geometry.height - 20); - notice->SetChecked(g_session.unknown_5C00[1]); + notice->SetChecked(g_session.itemDropOptions[1]); this->AddChild(notice); } - this->unknown_0154 = this->geometry.height; + this->initialHeight = this->geometry.height; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); UIBitmapButton* info = new UIBitmapButton(); @@ -2499,19 +2499,19 @@ void UIMerchantShopMakeWnd::OnCreate(int width, int height) { void UIMerchantShopMakeWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); if (HIBYTE(GetAsyncKeyState(VK_MENU))) { - if (g_windowMgr.unknown_02F8) { - item = g_session.FindItem1768(item.unknown_0000[1]); + if (g_windowMgr.merchantMirrorItemWnd) { + item = g_session.FindItem1768(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, 10, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_02F8)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + reinterpret_cast(g_windowMgr.merchantMirrorItemWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); g_windowMgr.SetFocus(nullptr); - } else if (g_windowMgr.unknown_0410) { - item = g_session.FindItem1768(item.unknown_0000[1]); + } else if (g_windowMgr.buyingShopMirrorItemWnd) { + item = g_session.FindItem1768(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, 19, item, item.quantity, -1); - reinterpret_cast(g_windowMgr.unknown_0410)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); + reinterpret_cast(g_windowMgr.buyingShopMirrorItemWnd)->SendMsg(nullptr, UM_DROP, 0, 0, 0, 0); } } else { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -2550,7 +2550,7 @@ void UIItemBaseWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; int slots = (this->geometry.height - 38) / 32; @@ -2568,7 +2568,7 @@ void UIItemBaseWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -2581,11 +2581,11 @@ void UIItemBaseWnd::Paint() { DrawItemIcon(*this, ResourceMgr::Instance(), x, top + 21, *it, 0); } - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -2602,7 +2602,7 @@ void UIItemBaseWnd::Paint() { void UIMerchantItemMyShopWnd::Paint() { UIItemBaseWnd::Paint(); - if (this->unknown_011C == 57) { + if (this->footerHeight == 57) { this->DrawButtonBar(3, 0, 1); } @@ -2615,7 +2615,7 @@ void UIMerchantItemMyShopWnd::Paint() { const int minutes = remaining / 60000 % 60; const int seconds = remaining / 1000 % 60; - if (this->unknown_0100 == 1) { + if (this->buyingShop == 1) { if (remaining <= 60000) { this->DrawTextAt(12, this->geometry.height - 42, FormatOwnedString(LookupMessage(MSI_SELECT_SHOP_POSITION), days, hours, minutes, seconds).c_str(), 0, 0, 11, 0xFF, 1, 0 @@ -2784,7 +2784,7 @@ void UISkillListWnd::Paint() { if (this->skillTab == 0) { this->DrawTextAt(17, 4, LookupMessage(MSI_HOMUN_SKILLLIST), 0, 0, 12, 0xFFFFFF, 0, 0); this->DrawTextAt(16, 3, LookupMessage(MSI_HOMUN_SKILLLIST), 0, 0, 12, 0, 0, 0); - std::sprintf(text, LookupMessage(MSI_SKILLPOINT), *reinterpret_cast(g_session.unknown_1664)); + std::sprintf(text, LookupMessage(MSI_SKILLPOINT), *reinterpret_cast(g_session.companionSkillPoints)); } else if (this->skillTab == 1) { this->DrawTextAt(17, 4, LookupMessage(MSI_MER_SKILLLIST), 0, 0, 12, 0xFFFFFF, 0, 0); this->DrawTextAt(16, 3, LookupMessage(MSI_MER_SKILLLIST), 0, 0, 12, 0, 0, 0); @@ -2811,7 +2811,7 @@ void UISkillListWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, selectRed, selectGreen, selectBlue); if (it->level == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 10, 2, selectRed, selectGreen, selectBlue); - } else if (it->unknown_0014 == 0) { + } else if (it->spCost == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 14, 2, selectRed, selectGreen, selectBlue); } this->FillRegion(x + 104, top + 19, 164, 28, RGB(selectRed, selectGreen, selectBlue)); @@ -2849,10 +2849,10 @@ void UISkillListWnd::Paint() { std::sprintf(text, format, it->level); this->DrawTextAt(levelX + x, top + 34, text, 0, 0, 12, 0, 0, 0); - if (it->unknown_000C == 0) { + if (it->type == 0) { std::sprintf(text, LookupMessage(MSI_PASSIVE)); } else { - int sp = static_cast(it->unknown_0014); + int sp = static_cast(it->spCost); if (CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, static_cast(it->id))) { if (this->skillTab == 0) { spLevel = g_session.HomunSkillLevel(static_cast(it->id)); @@ -2888,11 +2888,11 @@ void UISkillListWnd::Paint() { // OFFSET: 0x00983F80 // FUNCTION: fn_13347 void UIItemSellWnd2::OnLBtnDblClk(int x, int y) { - if (g_windowMgr.unknown_0064 == 0) { + if (g_windowMgr.dragAllItems == 0) { return; } - UIWindow* target = g_windowMgr.unknown_0254; + UIWindow* target = g_windowMgr.itemShopWnd2; if (target) { this->OnLBtnDown(x, y); @@ -2905,11 +2905,11 @@ void UIItemSellWnd2::OnLBtnDblClk(int x, int y) { // OFFSET: 0x00983FF0 // FUNCTION: fn_13348 void UIItemSellWnd::OnLBtnDblClk(int x, int y) { - if (g_windowMgr.unknown_0064 == 0) { + if (g_windowMgr.dragAllItems == 0) { return; } - UIWindow* target = g_windowMgr.unknown_0250; + UIWindow* target = g_windowMgr.itemShopWnd; if (target) { this->OnLBtnDown(x, y); @@ -2944,12 +2944,12 @@ void UIItemWnd::OnLBtnDblClk(int x, int y) { } ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } CMode* mode = g_modeMgr.GetGameMode(); - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case 0: case 1: case 2: @@ -2957,13 +2957,13 @@ void UIItemWnd::OnLBtnDblClk(int x, int y) { g_windowMgr.Confirm(LookupMessage(MSI_COMMAND_SETTING), 2, false, false, 0, "Message", 280, 120, 0) == 188) { break; } - mode->SendMsg(MM_USEITEM, static_cast(item.unknown_0000[1]), 0, 0, 0); + mode->SendMsg(MM_USEITEM, static_cast(item.identity[1]), 0, 0, 0); break; case 18: - if (*reinterpret_cast(&g_session.unknown_16F4[4]) >= 0) { + if (*reinterpret_cast(&g_session.healthPoints[4]) >= 0) { if (g_windowMgr .Confirm(FormatOwnedString(LookupMessage(MSI_CONFIRM_TO_OPEN_CASH_ITEM), item.DisplayName(0).c_str()).c_str(), 2, false, false, 0, "Message", 280, 120, 0) == 187) { - mode->SendMsg(MM_USEITEM, static_cast(item.unknown_0000[1]), 0, 0, 0); + mode->SendMsg(MM_USEITEM, static_cast(item.identity[1]), 0, 0, 0); } } break; @@ -2979,36 +2979,36 @@ void UIItemWnd::OnLBtnDblClk(int x, int y) { if (!item.identified) { break; } - if (item.unknown_0000[1] == 0 || item.unknown_0000[2] == 0 || item.unknown_0000[3] != 0) { + if (item.identity[1] == 0 || item.identity[2] == 0 || item.identity[3] != 0) { if (!g_session.IsPetAccessory(item.GetItemId())) { break; } } if (GetAsyncKeyState(VK_CONTROL) && g_session.m_swapEquipmentMode) { - mode->SendMsg(MM_WEAR_SWAP_EQUIP, static_cast(item.unknown_0000[1]), static_cast(item.unknown_0000[2]), 0, 0); + mode->SendMsg(MM_WEAR_SWAP_EQUIP, static_cast(item.identity[1]), static_cast(item.identity[2]), 0, 0); } else if (g_windowMgr.LookupWindow(WID_REFININGWND)) { - g_windowMgr.LookupWindow(WID_REFININGWND)->SendMsg(this, UM_REFRESHITEM, item.unknown_0000[1], 0, 0, 0); + g_windowMgr.LookupWindow(WID_REFININGWND)->SendMsg(this, UM_REFRESHITEM, item.identity[1], 0, 0, 0); } else if (g_windowMgr.LookupWindow(WID_GRADEENCHANTWND)) { - g_windowMgr.LookupWindow(WID_GRADEENCHANTWND)->SendMsg(this, UM_REFRESHITEM, item.unknown_0000[1], 0, 0, 0); + g_windowMgr.LookupWindow(WID_GRADEENCHANTWND)->SendMsg(this, UM_REFRESHITEM, item.identity[1], 0, 0, 0); } else { - mode->SendMsg(MM_WEAR_EQUIP, static_cast(item.unknown_0000[1]), static_cast(item.unknown_0000[2]), 0, 0); + mode->SendMsg(MM_WEAR_EQUIP, static_cast(item.identity[1]), static_cast(item.identity[2]), 0, 0); } break; case 10: case 16: case 17: case 19: - if (item.unknown_0000[1] == 0 || item.unknown_0000[3] != 0) { + if (item.identity[1] == 0 || item.identity[3] != 0) { break; } if (GetAsyncKeyState(VK_CONTROL) && g_session.m_swapEquipmentMode) { - mode->SendMsg(MM_WEAR_SWAP_EQUIP, static_cast(item.unknown_0000[1]), static_cast(item.unknown_0000[2]), 0, 0); + mode->SendMsg(MM_WEAR_SWAP_EQUIP, static_cast(item.identity[1]), static_cast(item.identity[2]), 0, 0); } else { - mode->SendMsg(MM_WEAR_EQUIP_ARROW, static_cast(item.unknown_0000[1]), static_cast(item.unknown_0000[2]), 0, 0); + mode->SendMsg(MM_WEAR_EQUIP_ARROW, static_cast(item.identity[1]), static_cast(item.identity[2]), 0, 0); } break; case 6: - mode->SendMsg(MM_REQ_ITEMCOMPOSITION_LIST, static_cast(item.unknown_0000[1]), 0, 0, 0); + mode->SendMsg(MM_REQ_ITEMCOMPOSITION_LIST, static_cast(item.identity[1]), 0, 0, 0); break; } } @@ -3024,8 +3024,8 @@ void UIMerchantItemMyShopWnd::OnLBtnDown(int x, int y) { // OFFSET: 0x009886C0 // FUNCTION: fn_13386 void UIItemWnd::OnProcess() { - if (this->unknown_0128) { - this->unknown_0128->OnProcess(); + if (this->filterWindow) { + this->filterWindow->OnProcess(); } } @@ -3033,7 +3033,7 @@ void UIItemWnd::OnProcess() { // FUNCTION: fn_45470 void UIItemWnd::RefreshOptionBox() { UIWindow* optionBox = this->optionBox; - optionBox->geometry.unknown_0030 = g_serviceOptions.Get(0x108); + optionBox->geometry.state = g_serviceOptions.Get(0x108); optionBox->Invalidate(); this->Invalidate(); } @@ -3053,7 +3053,7 @@ void UIMerchantItemShopWnd::OnProcess() { // OFFSET: 0x009886F0 // FUNCTION: fn_13389 void UIMerchantShopMakeWnd::OnProcess() { - if (this->unknown_0128 && this->mode) { + if (this->zenyLimitEdit && this->mode) { std::int64_t total = 0; for (unsigned index = 0; index < this->items.size(); ++index) { char text[24] = {}; @@ -3068,7 +3068,7 @@ void UIMerchantShopMakeWnd::OnProcess() { char buffer[128] = {}; StringFormat(buffer, sizeof(buffer), static_cast(-1), "%lld", total); - this->unknown_0128->SetText(buffer); + this->zenyLimitEdit->SetText(buffer); this->InvalidateChildren(); return; } @@ -3078,7 +3078,7 @@ void UIMerchantShopMakeWnd::OnProcess() { } int index = -1; - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { if (this->priceEdits[i] == g_windowMgr.GetHoverWindow()) { index = i; break; @@ -3087,7 +3087,7 @@ void UIMerchantShopMakeWnd::OnProcess() { if (this->editIndex != index) { if (index != -1) { - this->unknown_0170 = this->priceEdits[index]->Text(); + this->previousPriceText = this->priceEdits[index]->Text(); } this->CommitPrice(index); this->InvalidateChildren(); @@ -3099,10 +3099,10 @@ void UIMerchantShopMakeWnd::OnProcess() { } const int length = this->priceEdits[index]->Length(); - if (length == this->unknown_016C) { + if (length == this->previousPriceLength) { return; } - this->unknown_016C = length; + this->previousPriceLength = length; if (!length) { return; } @@ -3112,7 +3112,7 @@ void UIMerchantShopMakeWnd::OnProcess() { std::sprintf(text, "%s ", edit->Text()); if (!g_session.IsNumberWithCommas(text)) { g_windowMgr.Confirm(LookupMessage(MSI_CAN_INPUT_NUMBER_ONLY), 0, true, false, 0, "Message", 280, 120, 0); - edit->SetText(this->unknown_0170.c_str()); + edit->SetText(this->previousPriceText.c_str()); g_windowMgr.SetFocus(edit); return; } @@ -3134,8 +3134,8 @@ void UIMerchantShopMakeWnd::OnProcess() { const PriceColors colors = PriceColor(price); edit->TextColor(colors.primary, colors.secondary); edit->SetText(FormatGroupedInteger(price, text, sizeof(text))); - this->unknown_0170 = this->priceEdits[index]->Text(); - this->unknown_016C = this->priceEdits[index]->Length(); + this->previousPriceText = this->priceEdits[index]->Text(); + this->previousPriceLength = this->priceEdits[index]->Length(); edit->SetCursor(edit->Length()); } @@ -3152,7 +3152,7 @@ void UINoticeMessageBox_LockSellItem::OnProcess() { void UIItemSellWnd2::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -3162,7 +3162,7 @@ void UIItemSellWnd2::OnRBtnDown(int x, int y) { void UIItemSellWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -3172,7 +3172,7 @@ void UIItemSellWnd::OnRBtnDown(int x, int y) { void UIItemShopWnd2::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_modeMgr.GetGameMode(); g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -3183,7 +3183,7 @@ void UIItemShopWnd2::OnRBtnDown(int x, int y) { void UIMerchantItemMyShopWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_modeMgr.GetGameMode(); g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -3274,7 +3274,7 @@ ITEM_INFO UIItemBaseWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->columns * this->scroll) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return *it; } @@ -3301,7 +3301,7 @@ ITEM_INFO UIItemStoreFindWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->columns * this->scroll) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return *it; } @@ -3328,7 +3328,7 @@ ITEM_INFO UIItemStoreSubWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->columns * this->scroll) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return *it; } @@ -3355,7 +3355,7 @@ ITEM_INFO UIItemStoreWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->columns * this->scroll) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return *it; } @@ -3382,7 +3382,7 @@ ITEM_INFO UIItemWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->scroll * this->columns) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return *it; } @@ -3408,7 +3408,7 @@ ITEM_INFO UIMerchantShopMakeWnd::GetItemAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->scroll * this->columns) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row) { const ITEM_INFO& item = *it; if (x < 35) { @@ -3483,11 +3483,11 @@ CSkillInfo UISkillListWnd::GetVisibleSkill(int row) { // OFFSET: 0x00974570 // FUNCTION: fn_13303 bool UIMerchantShopMakeWnd::HasSelection() const { - if (0 > this->unknown_018A) { + if (0 > this->selectedRow) { return false; } - if (0 > this->unknown_018C) { + if (0 > this->selectedColumn) { return false; } @@ -3500,11 +3500,11 @@ bool UIMerchantShopMakeWnd::HasSelection() const { // FUNCTION: fn_13304 void UIMerchantShopMakeWnd::SendShopRequest() { if (this->mode == 1) { - g_modeMgr.GetGameMode()->SendMsg(MM_OPEN_BUYING_STORE_EXTENDED, reinterpret_cast(this->unknown_00CC->Text()), std::atoi(this->unknown_0128->Text()), 0, 0); + g_modeMgr.GetGameMode()->SendMsg(MM_OPEN_BUYING_STORE_EXTENDED, reinterpret_cast(this->titleEdit->Text()), std::atoi(this->zenyLimitEdit->Text()), 0, 0); return; } - g_modeMgr.GetGameMode()->SendMsg(MM_OFFLINE_STORE_CREATE, reinterpret_cast(this->unknown_00CC->Text()), 0, 0, 0); + g_modeMgr.GetGameMode()->SendMsg(MM_OFFLINE_STORE_CREATE, reinterpret_cast(this->titleEdit->Text()), 0, 0, 0); } #pragma inline_depth() @@ -3512,19 +3512,19 @@ void UIMerchantShopMakeWnd::SendShopRequest() { // OFFSET: 0x00974820 // FUNCTION: fn_13306 void UIMerchantShopMakeWnd::AddActionButton() { - this->unknown_0168 = new UIBasicButton(); - this->unknown_0168->Configure(60, LookupMessage(MSI_GUILD_AGIT_AGIT_MESSAGE)); - this->unknown_0168->Move(this->geometry.width - 156, this->geometry.height - 24); - this->unknown_0168->SetTooltip(LookupMessage(MSI_WARNING_UNDER_AGE_MSG1)); - this->unknown_0168->SetId(560); - this->AddChild(this->unknown_0168); + this->actionButton = new UIBasicButton(); + this->actionButton->Configure(60, LookupMessage(MSI_GUILD_AGIT_AGIT_MESSAGE)); + this->actionButton->Move(this->geometry.width - 156, this->geometry.height - 24); + this->actionButton->SetTooltip(LookupMessage(MSI_WARNING_UNDER_AGE_MSG1)); + this->actionButton->SetId(560); + this->AddChild(this->actionButton); } // OFFSET: 0x00994800 // FUNCTION: fn_13436 void UIMerchantShopMakeWnd::SetSelection(short row, short column) { - this->unknown_018A = row; - this->unknown_018C = column; + this->selectedRow = row; + this->selectedColumn = column; } // OFFSET: 0x00995320 @@ -3628,11 +3628,11 @@ void UIItemWnd::StoreInfo() { this->saved->height = this->geometry.height; this->saved->x = this->geometry.x; this->saved->y = this->geometry.y; - this->saved->unknown_0010 = this->unknown_0110; - this->saved->unknown_0014 = this->unknown_010C; - this->saved->unknown_0018 = this->unknown_0100; - this->saved->unknown_001C = this->unknown_0104; - this->saved->unknown_0020 = this->unknown_0108; + this->saved->expandedHeight = this->expandedHeight; + this->saved->selectedTab = this->categoryFilter; + this->saved->usableRows = this->usableFilter; + this->saved->equipmentRows = this->equipmentFilter; + this->saved->etcRows = this->miscFilter; } } @@ -3716,7 +3716,7 @@ void UISkillListWnd::StoreInfo() { // OFFSET: 0x00994840 // FUNCTION: fn_13437 void UIMerchantShopMakeWnd::SetSuspended(unsigned char suspend) { - UIWindow* window = reinterpret_cast(this->mode == 1 ? g_windowMgr.unknown_0410 : g_windowMgr.unknown_02F8); + UIWindow* window = reinterpret_cast(this->mode == 1 ? g_windowMgr.buyingShopMirrorItemWnd : g_windowMgr.merchantMirrorItemWnd); if (!window) { return; } @@ -3732,21 +3732,21 @@ void UIMerchantShopMakeWnd::SetSuspended(unsigned char suspend) { this->suspended = 0; this->Show(1); window->Show(1); - this->unknown_018A = -1; - this->unknown_018C = -1; + this->selectedRow = -1; + this->selectedColumn = -1; } // OFFSET: 0x00994CC0 // FUNCTION: fn_13440 void UIMerchantShopMakeWnd::SetItems(int count, const short* ids) { - this->unknown_0188 = 1; + this->itemsSet = 1; UIWindow* window; if (this->mode == 1) { - window = reinterpret_cast(g_windowMgr.unknown_0410); + window = reinterpret_cast(g_windowMgr.buyingShopMirrorItemWnd); } else { g_session.SetItems1750(count, ids); - window = reinterpret_cast(g_windowMgr.unknown_02F8); + window = reinterpret_cast(g_windowMgr.merchantMirrorItemWnd); } if (window) { @@ -3769,8 +3769,8 @@ void UIMerchantItemMyShopWnd::OpenShop() { g_session.m_muteSellSound = false; this->saleAlarm->Show(0); - const int previousHeight = this->unknown_011C; - this->unknown_011C = 57; + const int previousHeight = this->footerHeight; + this->footerHeight = 57; this->Resize(this->geometry.width, this->geometry.height - previousHeight + 57); this->SendMsg(nullptr, UM_RESIZE, 7, this->geometry.width, this->geometry.height, 0); this->Invalidate(); @@ -3785,7 +3785,7 @@ void UIItemWnd::ReleaseSelection(unsigned char keep) { for (auto it = this->items.begin(); it != this->items.end(); ++it) { g_session.ClearItemSelection(); - it->unknown_0074[1] = 0; + it->flags[1] = 0; } if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { @@ -3836,8 +3836,8 @@ struct ItemTypeNameLess { // OFFSET: 0x009700C0 // FUNCTION: fn_13240 bool ItemTypeNameLess::operator()(const ITEM_INFO& left, const ITEM_INFO& right) const { - const int leftRank = ItemTypeSortRank(left.unknown_0000[0]); - const int rightRank = ItemTypeSortRank(right.unknown_0000[0]); + const int leftRank = ItemTypeSortRank(left.identity[0]); + const int rightRank = ItemTypeSortRank(right.identity[0]); if (leftRank == rightRank) { return left.DisplayName(0) < right.DisplayName(0); } @@ -3933,8 +3933,8 @@ void UIMerchantItemShopWnd::StartTimer(std::uint32_t value) { this->startTick = timeGetTime(); this->duration = value; - const int previousHeight = this->unknown_0118; - this->unknown_0118 = 57; + const int previousHeight = this->footerHeight; + this->footerHeight = 57; this->Resize(this->geometry.width, this->geometry.height - previousHeight + 57); this->SendMsg(nullptr, UM_RESIZE, 3, this->geometry.width, this->geometry.height, 0); } @@ -3960,7 +3960,7 @@ void UIItemStoreFindWnd::SetSearchText(std::string text) { // OFFSET: 0x00971490 // FUNCTION: fn_13263 int UIMerchantShopMakeWnd::CommitPrice(int next) { - if (this->editIndex == -1 || g_session.unknown_5C00[1] == 0) { + if (this->editIndex == -1 || g_session.itemDropOptions[1] == 0) { this->editIndex = next; return 1; } @@ -4136,7 +4136,7 @@ void UIItemSellWnd2::DragAndDrop(int x, int y, std::intptr_t value) { CMode* mode = g_modeMgr.GetGameMode(); const ModeDragState* drag = reinterpret_cast(value); if (drag->source == 3) { - if (drag->quantity != 1 && g_windowMgr.unknown_0064 == 0) { + if (drag->quantity != 1 && g_windowMgr.dragAllItems == 0) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 16, 0, 0, 0); } else { @@ -4158,7 +4158,7 @@ void UIItemSellWnd::DragAndDrop(int x, int y, std::intptr_t value) { CMode* mode = g_modeMgr.GetGameMode(); const ModeDragState* drag = reinterpret_cast(value); if (drag->source == 3) { - if (drag->quantity != 1 && g_windowMgr.unknown_0064 == 0) { + if (drag->quantity != 1 && g_windowMgr.dragAllItems == 0) { g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 2, 0, 0, 0); } else { @@ -4195,7 +4195,7 @@ void UIMerchantItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { // OFFSET: 0x00972C00 // FUNCTION: fn_13278 void UIMerchantItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { - if (g_windowMgr.LookupWindow(WID_EXCHANGEUI) || g_windowMgr.unknown_01F0 || g_windowMgr.unknown_01F8) { + if (g_windowMgr.LookupWindow(WID_EXCHANGEUI) || g_windowMgr.sayDialogWnd || g_windowMgr.choose3Wnd) { UIWindow::DragAndDrop(x, y, value); return; } @@ -4227,7 +4227,7 @@ void UIMerchantItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { // OFFSET: 0x0097BC00 // FUNCTION: fn_13321 void UIMerchantItemShopWnd::OnCreate(int width, int height) { - if (this->unknown_010C) { + if (this->buyingShop) { this->notice = new UIStaticText(); this->notice->SetSize(160, 15); char text[80]; @@ -4237,10 +4237,10 @@ void UIMerchantItemShopWnd::OnCreate(int width, int height) { this->AddChild(this->notice); } - const unsigned rows = static_cast(height - this->unknown_0118 - 17) / 32; + const unsigned rows = static_cast(height - this->footerHeight - 17) / 32; this->visibleRows = rows; this->columns = 1; - this->unknown_00F0 = this->geometry.height - rows * 32; + this->nonItemHeight = this->geometry.height - rows * 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -4399,7 +4399,7 @@ std::string UIEditCtrl3::PlaceLineLinks(const char* line, std::string& text, con if (std::strncmp(link.c_str(), "00000T", 6) == 0) { const int id = ItemLinkMessageId(link); - if (g_itemTagOwner->unknown_0118 >= id) { + if (g_itemTagOwner->maxTipId >= id) { std::string name; const std::string title = g_itemTagOwner->Title(id, &name, 17); if (name.size() + 2 + result.size() > std::strlen(line)) { @@ -4433,7 +4433,7 @@ std::string UIEditCtrl3::PlaceLineLinks(const char* line, std::string& text, con } UIItemTagButton* button = new (std::nothrow) UIItemTagButton(); - reinterpret_cast(button->unknown_00F8) = item; + reinterpret_cast(button->itemPayload) = item; button->Configure(name.c_str(), 0x82F2E1, 0, 12, 0, 0); button->SetTooltip(item.DisplayName(0).c_str()); button->m_hoverColor = 0x82F2E1; @@ -4468,26 +4468,26 @@ void UIEditCtrl3::SetLinkedText(const char* value) { std::vector lines; int width = this->geometry.width - 6; - if (this->unknown_0134 != 0) { - width += 3 - this->unknown_0130->geometry.width; + if (this->scrollEnabled != 0) { + width += 3 - this->scrollBar->geometry.width; } - this->WrapTextWithBreaks(resolved.c_str(), &lines, &this->unknown_0174, width); + this->WrapTextWithBreaks(resolved.c_str(), &lines, &this->lineBreaks, width); this->WrapLines(lines); - this->unknown_013C = static_cast(lines.size()); - if (reinterpret_cast(&this->unknown_0184)[1] != 0) { - this->unknown_013C = static_cast(lines.size()) + 1; + this->lineCount = static_cast(lines.size()); + if (reinterpret_cast(&this->editFlags)[1] != 0) { + this->lineCount = static_cast(lines.size()) + 1; } this->UpdateScrollBar(); - if (this->unknown_0134 != 0) { + if (this->scrollEnabled != 0) { lines.clear(); resolved = this->ResolveItemLinks(std::string(value, std::strlen(value))); width = this->geometry.width - 6; - if (this->unknown_0134 != 0) { - width += 3 - this->unknown_0130->geometry.width; + if (this->scrollEnabled != 0) { + width += 3 - this->scrollBar->geometry.width; } - this->WrapTextWithBreaks(resolved.c_str(), &lines, &this->unknown_0174, width); + this->WrapTextWithBreaks(resolved.c_str(), &lines, &this->lineBreaks, width); this->WrapLines(lines); } @@ -4710,16 +4710,16 @@ void UIItemShopWnd2::OnCreate(int width, int height) { this->checkBox->SetSize(200, 12); this->checkBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_NOQUESTION_ITEMCOUNT)); this->checkBox->Move(12, this->geometry.height - 20); - this->checkBox->SetChecked(g_windowMgr.unknown_0064); + this->checkBox->SetChecked(g_windowMgr.dragAllItems); this->AddChild(this->checkBox); UIScrollBar* scrollBar = new UIScrollBar(); this->scrollBar = scrollBar; - scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17); + scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->extraBottomHeight - this->bottomBarHeight - 17); this->AddChild(this->scrollBar); this->columns = 1; - this->visibleRows = (height - this->unknown_0108 - this->unknown_0104 - 17) / 32; + this->visibleRows = (height - this->extraBottomHeight - this->bottomBarHeight - 17) / 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -4745,16 +4745,16 @@ void UIItemShopWnd::OnCreate(int width, int height) { this->checkBox->SetSize(200, 12); this->checkBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_NOQUESTION_ITEMCOUNT)); this->checkBox->Move(12, this->geometry.height - 20); - this->checkBox->SetChecked(g_windowMgr.unknown_0064); + this->checkBox->SetChecked(g_windowMgr.dragAllItems); this->AddChild(this->checkBox); UIScrollBar* scrollBar = new UIScrollBar(); this->scrollBar = scrollBar; - scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17); + scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->footerHeight - this->bottomPadding - 17); this->AddChild(this->scrollBar); this->columns = 1; - this->visibleRows = (height - this->unknown_0108 - this->unknown_0104 - 17) / 32; + this->visibleRows = (height - this->footerHeight - this->bottomPadding - 17) / 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -4855,9 +4855,9 @@ void UIMerchantMirrorItemWnd::OnCreate(int width, int height) { UIStaticText* title = new UIStaticText(); title->SetSize(150, 15); int messageId; - if (this->unknown_00F4 == 1) { + if (this->mode == 1) { messageId = 1733; - } else if (this->unknown_00F4 == 2) { + } else if (this->mode == 2) { messageId = 1738; } else { messageId = 232; @@ -4883,9 +4883,9 @@ void UIMerchantMirrorItemWnd::OnCreate(int width, int height) { this->columns = (width - 40) / 32; this->visibleRows = (height - 38) / 32; - if (this->unknown_00F4 == 1) { + if (this->mode == 1) { g_session.CollectItems1750(); - } else if (this->unknown_00F4 == 2) { + } else if (this->mode == 2) { g_session.RefreshItems1750(); } else if (Replay::Instance().state != 6) { g_session.CopyItems1740To1750(); @@ -4900,12 +4900,12 @@ void UISkillListWnd::UpdateRowButtons() { CSkillInfo skill = this->GetVisibleSkill(row); int points = 0; if (this->skillTab == 0) { - points = reinterpret_cast(g_session.unknown_1664)[0]; + points = reinterpret_cast(g_session.companionSkillPoints)[0]; } else if (this->skillTab == 1) { - points = reinterpret_cast(g_session.unknown_1664)[1]; + points = reinterpret_cast(g_session.companionSkillPoints)[1]; } - if (row < this->visibleRows && this->scroll + row < this->skills.size() && points != 0 && skill.available != 0 && skill.unknown_0018 != 0) { + if (row < this->visibleRows && this->scroll + row < this->skills.size() && points != 0 && skill.available != 0 && skill.upgradable != 0) { this->upgradeButtons[row]->Move(78, y - 13); } else { this->upgradeButtons[row]->Move(-200, y - 17); @@ -4981,11 +4981,11 @@ void UIItemShopWnd2::DragAndDrop(int x, int y, std::intptr_t value) { switch (drag->source) { case 4: case 5: - if (this->unknown_00F8 == 0) { + if (this->interactionDisabled == 0) { return; } - if (drag->quantity == 1 || g_windowMgr.unknown_0064 != 0) { + if (drag->quantity == 1 || g_windowMgr.dragAllItems != 0) { this->SendMsg(nullptr, UM_DROP, 1, 0, 0, 0); return; } @@ -5010,7 +5010,7 @@ void UIItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { const ModeDragState* drag = reinterpret_cast(value); switch (drag->source) { case 4: - if (this->unknown_00F8 != 0) { + if (this->sellMode != 0) { return; } @@ -5023,11 +5023,11 @@ void UIItemShopWnd::DragAndDrop(int x, int y, std::intptr_t value) { g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 3, 0, 0, 0); return; case 5: - if (this->unknown_00F8 == 0) { + if (this->sellMode == 0) { return; } - if (drag->quantity == 1 || g_windowMgr.unknown_0064 != 0) { + if (drag->quantity == 1 || g_windowMgr.dragAllItems != 0) { this->SendMsg(nullptr, UM_DROP, 1, 0, 0, 0); return; } @@ -5111,7 +5111,7 @@ void UIMerchantMirrorItemWnd::DragAndDrop(int x, int y, std::intptr_t value) { } g_windowMgr.ShowWindowById(WID_ITEMDROPCNTWND, 1); - if (this->unknown_00F4 == 2) { + if (this->mode == 2) { g_windowMgr.window_01EC->SendMsg(nullptr, UM_SETSTATE, 18, 0, 0, 0); return; } @@ -5174,7 +5174,7 @@ std::vector UIItemPurchaseWnd::GetReplayData() { std::vector UIItemSellWnd2::GetReplayData() { std::vector records; AppendReplayRecord(records, BuildReplayTaggedRecord(20800, nullptr, 0)); - AppendReplayRecord(records, BuildReplayTaggedRecord(20802, &this->unknown_00FC, 4)); + AppendReplayRecord(records, BuildReplayTaggedRecord(20802, &this->shopId, 4)); AppendReplayRecord(records, BuildReplayTaggedRecord(20801, nullptr, 0)); return records; } @@ -5215,7 +5215,7 @@ std::vector UIItemShopWnd::BuildReplayRecords() { // FUNCTION: fn_13286 std::vector UIParaItemShopWnd::BuildReplayRecords() { std::vector records; - if (this->unknown_0108 != 0) { + if (this->footerHeight != 0) { AppendReplayRecord(records, BuildReplayTaggedRecord(21100, nullptr, 0)); AppendReplayRecord(records, BuildReplayTaggedRecord(21101, nullptr, 0)); } else { @@ -5229,9 +5229,9 @@ std::vector UIParaItemShopWnd::BuildReplayRecords() { // FUNCTION: fn_13287 std::vector UIMerchantItemShopWnd::GetReplayData() { std::vector records; - if (this->unknown_010C != 0) { + if (this->buyingShop != 0) { AppendReplayRecord(records, BuildReplayTaggedRecord(21250, nullptr, 0)); - AppendReplayRecord(records, BuildReplayTaggedRecord(21253, &this->unknown_0108, 4)); + AppendReplayRecord(records, BuildReplayTaggedRecord(21253, &this->buyingZeny, 4)); AppendReplayRecord(records, BuildReplayTaggedRecord(21251, nullptr, 0)); } else { AppendReplayRecord(records, BuildReplayTaggedRecord(21200, nullptr, 0)); @@ -5282,7 +5282,7 @@ int UIItemBaseWnd::GetItemIndexAt(int x, int y) { for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { if (index >= this->scroll * this->columns) { - if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->unknown_005D) { + if (!g_session.IsPetEgg(std::atoi(it->itemId.c_str())) || !it->damaged) { if (visible == this->columns * row + column) { return index; } @@ -5298,11 +5298,11 @@ int UIItemBaseWnd::GetItemIndexAt(int x, int y) { // OFFSET: 0x00984050 // FUNCTION: fn_13349 void UIItemShopWnd2::OnLBtnDblClk(int x, int y) { - if (this->unknown_00F8 == 0 || g_windowMgr.unknown_0064 == 0) { + if (this->interactionDisabled == 0 || g_windowMgr.dragAllItems == 0) { return; } - UIWindow* target = reinterpret_cast(g_windowMgr.unknown_0260); + UIWindow* target = reinterpret_cast(g_windowMgr.itemSellWnd2); if (target) { this->OnLBtnDown(x, y); @@ -5315,11 +5315,11 @@ void UIItemShopWnd2::OnLBtnDblClk(int x, int y) { // OFFSET: 0x009840C0 // FUNCTION: fn_13350 void UIItemShopWnd::OnLBtnDblClk(int x, int y) { - if (this->unknown_00F8 == 0 || g_windowMgr.unknown_0064 == 0) { + if (this->sellMode == 0 || g_windowMgr.dragAllItems == 0) { return; } - UIWindow* target = reinterpret_cast(g_windowMgr.unknown_025C); + UIWindow* target = reinterpret_cast(g_windowMgr.itemSellWnd); if (target) { this->OnLBtnDown(x, y); @@ -5346,7 +5346,7 @@ void UISkillListWnd::OnLBtnDown(int x, int y) { CSkillInfo skill = this->GetSkillAt(x, y); - if (skill.available && skill.level && skill.unknown_000C) { + if (skill.available && skill.level && skill.type) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode) { @@ -5369,7 +5369,7 @@ void UISkillListWnd::OnLBtnDblClk(int x, int y) { if (this->hovered != -1) { CSkillInfo skill = this->GetSkillByIndex(this->hovered); - if (skill.available && skill.level && skill.unknown_0014) { + if (skill.available && skill.level && skill.spCost) { this->SendMsg(nullptr, UM_USESKILL, reinterpret_cast(&skill), 0, 0, 0); } } @@ -5382,7 +5382,7 @@ void UIMerchantItemShopWnd::OnLBtnDown(int x, int y) { UIFrameWnd::OnLBtnDown(x, y); } - if (this->unknown_010C == 0) { + if (this->buyingShop == 0) { const int previous = this->hovered; this->hovered = this->GetItemIndexAt(x, y); @@ -5392,7 +5392,7 @@ void UIMerchantItemShopWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 12, item, 1, -1); } } @@ -5410,7 +5410,7 @@ void UIItemPurchaseWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_modeMgr.GetGameMode(); g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -5428,7 +5428,7 @@ void UIItemShopWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_modeMgr.GetGameMode(); g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -5437,7 +5437,7 @@ void UIItemShopWnd::OnRBtnDown(int x, int y) { // OFFSET: 0x0098A260 // FUNCTION: fn_13409 void UIItemBaseWnd::OnWheel(int value) { - if (this->unknown_00E4) { + if (this->scrollOverflow) { const int step = std::min(this->visibleRows - 1, 3); this->SendMsg(this->scrollBar, UM_SCROLLVERT, value < 0 ? step : -step, 0, 0, 0); } @@ -5529,7 +5529,7 @@ int UISkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: case ID_OK: if (this->hovered != -1) { CSkillInfo skill = this->GetSkillByIndex(this->hovered); - if (skill.available != 0 && skill.level != 0 && skill.unknown_0014 != 0) { + if (skill.available != 0 && skill.level != 0 && skill.spCost != 0) { this->SendMsg(nullptr, UM_USESKILL, reinterpret_cast(&skill), 0, 0, 0); } return 0; @@ -5543,11 +5543,11 @@ int UISkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: case ID_LVLUP6: case ID_LVLUP7: { if (this->skillTab == 0) { - if (reinterpret_cast(g_session.unknown_1664)[0] == 0) { + if (reinterpret_cast(g_session.companionSkillPoints)[0] == 0) { return 0; } } else if (this->skillTab == 1) { - if (reinterpret_cast(g_session.unknown_1664)[1] == 0) { + if (reinterpret_cast(g_session.companionSkillPoints)[1] == 0) { return 0; } } @@ -5673,7 +5673,7 @@ int UISkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } if (skill.available != 0) { - if (skill.unknown_0018 != 0 || skill.level != 0) { + if (skill.upgradable != 0 || skill.level != 0) { this->skills.push_back(skill); ++upgradable; } @@ -5708,20 +5708,20 @@ int UISkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: return 0; } case UM_MAKEMENU: - this->unknown_0138.clear(); - if (g_windowMgr.unknown_0210) { + this->contextMenuEntries.clear(); + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->hovered != -1) { CSkillInfo skill = this->GetSkillByIndex(this->hovered); if (skill.available != 0) { - this->unknown_0138.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_SKILL)).c_str(), 3)); + this->contextMenuEntries.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_SKILL)).c_str(), 3)); } } - if (this->unknown_0138.size()) { + if (this->contextMenuEntries.size()) { UIWindow* menu = g_windowMgr.EnsureWindow(WID_MENUWND); - for (unsigned index = 0; index < this->unknown_0138.size(); ++index) { - menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->unknown_0138[index].text.c_str()), 0, 0, 0); + for (unsigned index = 0; index < this->contextMenuEntries.size(); ++index) { + menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->contextMenuEntries[index].text.c_str()), 0, 0, 0); } if (this->skillTab == 0) { menu->SendMsg(nullptr, UM_SET_CALLER_WID, 0x72, 0, 0, 0); @@ -5740,7 +5740,7 @@ int UISkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: if (this->hovered != -1) { CSkillInfo skill = this->GetSkillByIndex(this->hovered); if (skill.available != 0) { - const int kind = this->unknown_0138[a].value; + const int kind = this->contextMenuEntries[a].value; if (kind == 3) { g_windowMgr.EnsureWindow(WID_SKILLDESCRIBEWND)->SendMsg(nullptr, UM_SKILLDESCRIBE, skill.id, 0, 0, 0); } else if (kind == 0xE) { @@ -5852,7 +5852,7 @@ void UISkillListWnd::OnCreate(int width, int height) { // OFFSET: 0x0098A3A0 // FUNCTION: fn_13413 void UISkillListWnd::OnWheel(int value) { - if (this->unknown_0128) { + if (this->hasVerticalOverflow) { const int step = std::min(this->visibleRows - 1, 3); this->SendMsg(this->scrollBar, UM_SCROLLVERT, value < 0 ? step : -step, 0, 0, 0); } @@ -5873,7 +5873,7 @@ void UISkillListWnd::UpdateScrollBar() { overflow = 0; } - this->unknown_0128 = overflow != 0; + this->hasVerticalOverflow = overflow != 0; if (overflow != 0) { bar->SetRange(overflow, visible, rows); int position = this->scroll; @@ -5904,19 +5904,19 @@ void UIMerchantShopMakeWnd::UpdateLayout() { return; } - const int top = this->unknown_0154 - this->unknown_0140 * 42; + const int top = this->initialHeight - this->minimumRows * 42; int rows = (g_renderer->viewport.height - top) / 42; - this->unknown_0158 = rows; - if (rows > this->unknown_012C) { - this->unknown_0158 = this->unknown_012C; - rows = this->unknown_012C; + this->maxVisibleRows = rows; + if (rows > this->slotCount) { + this->maxVisibleRows = this->slotCount; + rows = this->slotCount; } const int count = static_cast(this->items.size()); - if (count >= this->unknown_0140) { + if (count >= this->minimumRows) { UIScrollBar* bar = static_cast(this->scrollBar); if (count > rows) { - this->unknown_0144 = 1; + this->scrollable = 1; bar->SetRange(count - rows, rows, count); int position = this->scroll; if (position < 0) { @@ -5924,7 +5924,7 @@ void UIMerchantShopMakeWnd::UpdateLayout() { position = 0; } - const int last = count - this->unknown_0158; + const int last = count - this->maxVisibleRows; if (position > last) { this->scroll = last; position = last; @@ -5932,7 +5932,7 @@ void UIMerchantShopMakeWnd::UpdateLayout() { static_cast(this->scrollBar)->SetPosition(position); } else { - this->unknown_0144 = 0; + this->scrollable = 0; this->scroll = 0; bar->SetRange(0, rows, count); rows = count; @@ -5947,21 +5947,21 @@ void UIMerchantShopMakeWnd::UpdateLayout() { this->actionButtons[index]->Move(this->actionButtons[index]->geometry.x, this->geometry.height - 24); } - if (this->unknown_0168) { - this->unknown_0168->Move(this->unknown_0168->geometry.x, this->geometry.height - 24); + if (this->actionButton) { + this->actionButton->Move(this->actionButton->geometry.x, this->geometry.height - 24); } this->scrollBar->Resize(1, this->geometry.height - 58); } - this->visibleRows = std::max((this->geometry.height - top) / 42, this->unknown_0140); + this->visibleRows = std::max((this->geometry.height - top) / 42, this->minimumRows); this->scrollBar->Invalidate(); } // OFFSET: 0x0098A2B0 // FUNCTION: fn_13410 void UIItemStoreFindWnd::OnWheel(int value) { - if (this->unknown_00E4) { + if (this->scrollOverflow) { const int step = std::min(this->visibleRows - 1, 3); this->SendMsg(this->scrollBar, UM_SCROLLVERT, value < 0 ? step : -step, 0, 0, 0); } @@ -5970,7 +5970,7 @@ void UIItemStoreFindWnd::OnWheel(int value) { // OFFSET: 0x0098A300 // FUNCTION: fn_13411 void UIItemStoreSubWnd::OnWheel(int value) { - if (this->unknown_00E4) { + if (this->scrollOverflow) { const int step = std::min(this->visibleRows - 1, 3); this->SendMsg(this->scrollBar, UM_SCROLLVERT, value < 0 ? step : -step, 0, 0, 0); } @@ -5979,8 +5979,8 @@ void UIItemStoreSubWnd::OnWheel(int value) { // OFFSET: 0x0098A350 // FUNCTION: fn_13412 void UIMerchantShopMakeWnd::OnWheel(int value) { - if (this->unknown_0144) { - const int step = std::min(this->unknown_0140 - 1, 3); + if (this->scrollable) { + const int step = std::min(this->minimumRows - 1, 3); this->SendMsg(this->scrollBar, UM_SCROLLVERT, value < 0 ? step : -step, 0, 0, 0); } } @@ -6000,7 +6000,7 @@ void UIItemBaseWnd::UpdateScrollBar() { overflow = 0; } - this->unknown_00E4 = overflow != 0; + this->scrollOverflow = overflow != 0; if (overflow != 0) { bar->SetRange(overflow, visible, rows); int position = this->scroll; @@ -6077,13 +6077,13 @@ int UIItemBaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return this->scroll - previous; } case UM_PAGEDOWNPUSH: - if (this->unknown_00E4 == 1) { + if (this->scrollOverflow == 1) { this->SendMsg(this->scrollBar, UM_SCROLLVERT, this->visibleRows, 0, 0, 0); return 0; } break; case UM_PAGEUPPUSH: - if (this->unknown_00E4 == 1) { + if (this->scrollOverflow == 1) { this->SendMsg(this->scrollBar, UM_SCROLLVERT, -this->visibleRows, 0, 0, 0); } break; @@ -6161,7 +6161,7 @@ int UIMerchantItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s const int size = g_session.GetList6Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1740At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -6203,15 +6203,15 @@ int UIMerchantMirrorItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_ } break; case 19: - if (lists->AddItem1750(item, this->unknown_00F4, 1)) { - lists->RemoveItem1768(item, this->unknown_00F4 != 0); + if (lists->AddItem1750(item, this->mode, 1)) { + lists->RemoveItem1768(item, this->mode != 0); } break; case 21: - lists->AddItem1750(item, this->unknown_00F4, 1); + lists->AddItem1750(item, this->mode, 1); lists->RemoveItem1760(item); - if (g_windowMgr.unknown_041C) { - reinterpret_cast(g_windowMgr.unknown_041C)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.buyingShopPurchaseWnd) { + reinterpret_cast(g_windowMgr.buyingShopPurchaseWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } break; } @@ -6260,7 +6260,7 @@ int UIMerchantMirrorItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_ const int size = g_session.GetList8Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1750At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -6318,8 +6318,8 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: CSession* lists = &g_session; lists->AddItem1730(item); lists->ReduceItem1718(item); - if (g_windowMgr.unknown_0254) { - g_windowMgr.unknown_0254->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemShopWnd2) { + g_windowMgr.itemShopWnd2->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -6334,14 +6334,14 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: if (a == ID_OK) { if (count > 0) { const int result = g_windowMgr.Confirm(LookupMessage(MSI_MIX_ACCEPT), 2, true, false, 0, "Message", 280, 120, 0); - mode->SendMsg(result == 187 ? 266 : 267, this->unknown_00FC, 0, 0, 0); + mode->SendMsg(result == 187 ? 266 : 267, this->shopId, 0, 0, 0); g_windowMgr.CloseWindow(WID_ITEMSHOPWND2); g_windowMgr.CloseWindow(WID_ITEMSELLWND2); g_session.ClearTradeItems(); return 0; } } else if (a == ID_CANCEL) { - mode->SendMsg(MM_CANCEL_ITEMLISTWIN, this->unknown_00FC, 0, 0, 0); + mode->SendMsg(MM_CANCEL_ITEMLISTWIN, this->shopId, 0, 0, 0); g_windowMgr.CloseWindow(WID_ITEMSHOPWND2); g_windowMgr.CloseWindow(WID_ITEMSELLWND2); g_session.ClearTradeItems(); @@ -6386,14 +6386,14 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: break; case UM_REFRESHITEM: { if (a) { - this->unknown_00FC = a; + this->shopId = a; } this->items.erase(this->items.begin(), this->items.end()); const int size = g_session.GetList4Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1730At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -6421,9 +6421,9 @@ int UIItemSellWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } if (header.type == 20802) { - std::memcpy(&this->unknown_00FC, bytes + offset, header.size); + std::memcpy(&this->shopId, bytes + offset, header.size); offset += header.size; - window->SendMsg(nullptr, UM_REFRESHITEM, this->unknown_00FC, 0, 0, 0); + window->SendMsg(nullptr, UM_REFRESHITEM, this->shopId, 0, 0, 0); } else { offset += header.size; } @@ -6452,8 +6452,8 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt this->Move(this->saved->x, this->saved->y); return 0; case UM_SETNAID: - this->unknown_0104 = b; - this->unknown_00F8 = a; + this->storeId = b; + this->merchantId = a; return 0; case UM_DROP: { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); @@ -6466,7 +6466,7 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt int owned = 0; for (int i = 0; i < ownedCount; ++i) { found = g_session.GetItem1760At(i); - if (found.unknown_0000[1] == item.unknown_0000[1]) { + if (found.identity[1] == item.identity[1]) { owned = found.quantity; break; } @@ -6478,10 +6478,10 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt for (int i = 0; i < stockCount; ++i) { stock = g_session.GetItem1748At(i); bool same; - if (this->unknown_0108) { + if (this->buyingStore) { same = std::atoi(stock.itemId.c_str()) == std::atoi(item.itemId.c_str()); } else { - same = stock.unknown_0000[1] == item.unknown_0000[1]; + same = stock.identity[1] == item.identity[1]; } if (same) { limit = stock.quantity; @@ -6494,21 +6494,21 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt if (limit < total) { total = limit; item.quantity = limit - owned; - std::sprintf(text, LookupMessage(this->unknown_0108 ? 1739 : 1706), limit); + std::sprintf(text, LookupMessage(this->buyingStore ? 1739 : 1706), limit); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 255, 0, 0, 0); } if (total > 30000) { item.quantity = 30000 - owned; - std::sprintf(text, LookupMessage((this->unknown_0108 != 0) + 1704), 30000); + std::sprintf(text, LookupMessage((this->buyingStore != 0) + 1704), 30000); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 255, 0, 0, 0); } if (item.quantity > 0) { const long long pending = g_session.GetItem1760Total(); - const int price = static_cast(drag.unknown_0314); - if (this->unknown_0108) { + const int price = static_cast(drag.price); + if (this->buyingStore) { if (static_cast(price * item.quantity) + g_session.m_zeny + pending > 0x7FFFFFFF) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_OVER_OR_LOW_MONEY)), 255, 0, 0, 0); @@ -6516,8 +6516,8 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt g_session.AddItem1760(item); g_session.RemoveItem1750(item, 2, 1); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); - if (g_windowMgr.unknown_0420) { - reinterpret_cast(g_windowMgr.unknown_0420)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.purchaseMirrorItemWnd) { + reinterpret_cast(g_windowMgr.purchaseMirrorItemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } } } else if (g_session.m_zeny >= static_cast(price) * item.quantity + pending) { @@ -6536,24 +6536,24 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt this->RecordResponse(static_cast(a), b, c, d); CMode* mode = g_modeMgr.gameMode; if (a == ID_OK) { - if (this->unknown_0108) { + if (this->buyingStore) { int sum = 0; for (std::list::iterator it = this->items.begin(); it != this->items.end(); ++it) { - if (it->unknown_0000[1] != 0) { - sum += static_cast(it->unknown_0014[1]) * it->quantity; + if (it->identity[1] != 0) { + sum += static_cast(it->prices[1]) * it->quantity; } } - if (sum > static_cast(g_windowMgr.unknown_0418)->unknown_0108) { + if (sum > static_cast(g_windowMgr.buyingShopItemsWnd)->buyingZeny) { g_windowMgr.Confirm(LookupMessage(MSI_BUYINGSTORE_SELLWND_LACKBUYERZENY), 0, true, false, 0, "Message", 280, 120, 0); return 0; } - mode->SendMsg(MM_REQ_TRADE_BUYING_STORE, this->unknown_00F8, this->unknown_0104, 0, 0); + mode->SendMsg(MM_REQ_TRADE_BUYING_STORE, this->merchantId, this->storeId, 0, 0); } else { - static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMPURCHASEMSGWND))->SetPurchase(this->unknown_00F8, this->unknown_0104); + static_cast(g_windowMgr.EnsureWindow(WID_MERCHANTITEMPURCHASEMSGWND))->SetPurchase(this->merchantId, this->storeId); } mode->SendMsg(MM_RELEASE_QUEST, 0, 0, 0, 0); - if (this->unknown_0108) { + if (this->buyingStore) { g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTITEMPURCHASEWND_MODE_1); g_windowMgr.CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_2); @@ -6566,7 +6566,7 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt if (a == ID_CANCEL) { int first; int second; - if (this->unknown_0108) { + if (this->buyingStore) { g_windowMgr.CloseWindow(WID_MERCHANTITEMSHOPWND_MODE_1); second = 179; first = 178; @@ -6613,8 +6613,8 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt const int count = g_session.GetList10Size(); for (int i = 0; i < count; ++i) { ITEM_INFO item = g_session.GetItem1760At(i); - if (item.unknown_0000[1] != 0) { - sum += item.quantity * static_cast(item.unknown_0014[1]); + if (item.identity[1] != 0) { + sum += item.quantity * static_cast(item.prices[1]); this->items.push_back(item); } } @@ -6624,7 +6624,7 @@ int UIMerchantItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intpt std::sprintf(text, "Total : %s Zeny", FormatGroupedInteger(sum, grouped, 64)); this->total->SetTextAutoWidth(text); this->visibleRows = std::max(this->items.size(), 4u); - this->Resize(this->geometry.width, this->visibleRows * 32 + this->unknown_00F0); + this->Resize(this->geometry.width, this->visibleRows * 32 + this->nonItemHeight); for (int i = 0; i < 2; ++i) { this->buttons[i]->Move(this->buttons[i]->geometry.x, this->geometry.height - 24); } @@ -6665,27 +6665,27 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t switch (message) { case UM_SETINFO: this->saved = reinterpret_cast(a); - if (!this->saved->IsValid(this->unknown_010C != 0)) { - this->saved->Reset(this->unknown_010C != 0); + if (!this->saved->IsValid(this->buyingShop != 0)) { + this->saved->Reset(this->buyingShop != 0); } this->SendMsg(nullptr, UM_RESIZE, 3, this->saved->width, this->saved->height, 0); this->Move(this->saved->x, this->saved->y); return 0; case UM_SETNAID: - this->unknown_0100 = a; + this->ownerAid = a; return 0; case UM_SETTITLE: - this->unknown_00F4->SetTextAutoWidth(LookupMessage(MSI_SHOPITEMS)); + this->titleText->SetTextAutoWidth(LookupMessage(MSI_SHOPITEMS)); return 0; case UM_DROP: { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (this->unknown_010C == 0) { + if (this->buyingShop == 0) { ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); g_session.RemoveItem1760(item); - if (g_windowMgr.unknown_0308) { - reinterpret_cast(g_windowMgr.unknown_0308)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.merchantItemPurchaseWnd) { + reinterpret_cast(g_windowMgr.merchantItemPurchaseWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -6697,7 +6697,7 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case UM_RESIZE: if (a == 3) { int width; - if (this->unknown_010C) { + if (this->buyingShop) { width = b <= 426 ? b : 426; } else { width = b <= 320 ? b : 320; @@ -6714,7 +6714,7 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const int newHeight = (height - 120) / 32 * 32 + 120; if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); - this->visibleRows = static_cast(newHeight - this->unknown_0118 - 17) / 32; + this->visibleRows = static_cast(newHeight - this->footerHeight - 17) / 32; } g_windowMgr.StoreSnapRectangle(this); @@ -6726,18 +6726,18 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const int size = g_session.GetList7Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1748At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } this->visibleRows = std::max(this->items.size(), 4u); - this->Resize(this->geometry.width, this->visibleRows * 32 + this->unknown_00F0); + this->Resize(this->geometry.width, this->visibleRows * 32 + this->nonItemHeight); this->Invalidate(); return 0; } case UM_SET_BUYING_SHOP_ZENY: { - this->unknown_0108 = a; + this->buyingZeny = a; char grouped[80]; char text[80]; std::sprintf(text, LookupMessage(MSI_BUYINGSTORE_MYSHOPWND_LIMITZENY), FormatGroupedInteger(static_cast(a), grouped, 80)); @@ -6758,7 +6758,7 @@ int UIMerchantItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } if (header.type == 21253) { - std::memcpy(&this->unknown_0108, bytes + offset, header.size); + std::memcpy(&this->buyingZeny, bytes + offset, header.size); offset += header.size; } else { offset += header.size; @@ -6787,7 +6787,7 @@ void UIMerchantItemPurchaseWnd::OnCreate(int width, int height) { UIStaticText* title = new UIStaticText(); title->SetSize(160, 15); - title->SetText(LookupMessage(this->unknown_0108 ? 168 : 228), 0); + title->SetText(LookupMessage(this->buyingStore ? 168 : 228), 0); title->Move(16, 2); title->shadow = 1; this->AddChild(title); @@ -6795,7 +6795,7 @@ void UIMerchantItemPurchaseWnd::OnCreate(int width, int height) { const std::string prefix("유저인터페이스\\"); int positions[2][2] = {{this->geometry.width - 106, this->geometry.height - 24}, {this->geometry.width - 61, this->geometry.height - 24}}; int ids[2] = {184, 185}; - if (this->unknown_0108) { + if (this->buyingStore) { const char* names[2][3] = {{"btn_sell", "btn_sell_a", "btn_sell_b"}, {"btn_cancel", "btn_cancel_a", "btn_cancel_b"}}; for (int index = 0; index < 2; ++index) { this->buttons[index] = new UIBitmapButton(); @@ -6825,14 +6825,14 @@ void UIMerchantItemPurchaseWnd::OnCreate(int width, int height) { this->visibleRows = (height - 38) / 32; this->columns = 1; - this->unknown_00F0 = this->geometry.height - this->visibleRows * 32; + this->nonItemHeight = this->geometry.height - this->visibleRows * 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } // OFFSET: 0x00979920 // FUNCTION: fn_13318 void UIMerchantItemMyShopWnd::OnCreate(int width, int height) { - if (this->unknown_0100) { + if (this->buyingShop) { this->notice = new UIStaticText(); this->notice->SetSize(160, 15); char text[80]; @@ -6844,7 +6844,7 @@ void UIMerchantItemMyShopWnd::OnCreate(int width, int height) { this->title = new UIStaticText(); this->title->SetSize(240, 15); - this->title->SetText(LookupMessage(this->unknown_0100 ? 1734 : 3237), 0); + this->title->SetText(LookupMessage(this->buyingShop ? 1734 : 3237), 0); this->title->Move(16, 2); this->title->shadow = 1; this->AddChild(this->title); @@ -6859,14 +6859,14 @@ void UIMerchantItemMyShopWnd::OnCreate(int width, int height) { UIScrollBar* scrollBar = new UIScrollBar(); this->scrollBar = scrollBar; - scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_011C - 17); + scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->footerHeight - 17); this->AddChild(this->scrollBar); this->saleAlarm = new UICheckBox(); this->saleAlarm->SetSize(240, 12); - this->saleAlarm->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(this->unknown_0100 ? 2698 : 2642)); + this->saleAlarm->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(this->buyingShop ? 2698 : 2642)); this->saleAlarm->FitToText(); - this->saleAlarm->Move(12, this->unknown_0100 ? this->geometry.height - 12 : this->geometry.height - 18); + this->saleAlarm->Move(12, this->buyingShop ? this->geometry.height - 12 : this->geometry.height - 18); this->saleAlarm->SetChecked(g_session.m_muteSellSound); this->AddChild(this->saleAlarm); @@ -6887,7 +6887,7 @@ void UIMerchantItemMyShopWnd::OnCreate(int width, int height) { } this->columns = (width - 40) / 32; - this->visibleRows = static_cast(height - this->unknown_011C - 17) / 32; + this->visibleRows = static_cast(height - this->footerHeight - 17) / 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -6964,7 +6964,7 @@ void UIItemPurchaseWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); item = g_session.FindItem1720ByItemId(item.itemId.c_str()); mode->drag.BeginItem(g_windowMgr, 4, item, item.quantity, -1); @@ -6991,17 +6991,17 @@ void UIItemSellWnd2::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 1, 0, 0); } } - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1730(item.unknown_0000[1]); + item = g_session.FindItem1730(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 5, item, item.quantity, -1); } } @@ -7026,17 +7026,17 @@ void UIItemSellWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 1, 0, 0); } } - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1730(item.unknown_0000[1]); + item = g_session.FindItem1730(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 5, item, item.quantity, -1); } } @@ -7061,18 +7061,18 @@ void UIItemShopWnd2::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 1, 0, 0); } } - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, item.unknown_0000[1]); - mode->drag.BeginItem(g_windowMgr, 3, item, owned.unknown_0000[1] > 0 ? item.quantity : 1, -1); + const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, item.identity[1]); + mode->drag.BeginItem(g_windowMgr, 3, item, owned.identity[1] > 0 ? item.quantity : 1, -1); } } @@ -7096,10 +7096,10 @@ void UIItemShopWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, item.unknown_0000[1]); - mode->drag.BeginItem(g_windowMgr, 3, item, owned.unknown_0000[1] > 0 ? item.quantity : 1, -1); + const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, item.identity[1]); + mode->drag.BeginItem(g_windowMgr, 3, item, owned.identity[1] > 0 ? item.quantity : 1, -1); } } @@ -7112,9 +7112,9 @@ void UIItemStoreFindWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0 && item.unknown_0074[2] == 0) { + if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.unknown_0000[1]); + item = g_session.FindItem1738(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7128,9 +7128,9 @@ void UIItemStoreSubWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0 && item.unknown_0074[2] == 0) { + if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.unknown_0000[1]); + item = g_session.FindItem1738(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7148,9 +7148,9 @@ void UIItemStoreWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0 && item.unknown_0074[2] == 0) { + if (item.identity[1] > 0 && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1738(item.unknown_0000[1]); + item = g_session.FindItem1738(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 6, item, item.quantity, -1); } } @@ -7175,10 +7175,10 @@ void UIMerchantItemPurchaseWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemByIndex(this->hovered); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); item = g_session.FindItem1760ByItemId(item.itemId.c_str()); - mode->drag.BeginItem(g_windowMgr, this->unknown_0108 != 0 ? 21 : 13, item, item.quantity, -1); + mode->drag.BeginItem(g_windowMgr, this->buyingStore != 0 ? 21 : 13, item, item.quantity, -1); } } @@ -7195,11 +7195,11 @@ void UIMerchantMirrorItemWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1750(item.unknown_0000[1]); + item = g_session.FindItem1750(item.identity[1]); mode->drag.BeginItem( - g_windowMgr, this->unknown_00F4 == 1 ? 20 : this->unknown_00F4 == 2 ? 22 : 11, item, item.quantity, -1 + g_windowMgr, this->mode == 1 ? 20 : this->mode == 2 ? 22 : 11, item, item.quantity, -1 ); } } @@ -7218,9 +7218,9 @@ void UIMerchantShopMakeWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1768(item.unknown_0000[1]); + item = g_session.FindItem1768(item.identity[1]); gameMode->drag.BeginItem(g_windowMgr, this->mode != 0 ? 19 : 10, item, item.quantity, -1); } } @@ -7229,7 +7229,7 @@ void UIMerchantShopMakeWnd::OnLBtnDown(int x, int y) { // FUNCTION: fn_13371 void UIItemPurchaseWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); @@ -7237,11 +7237,11 @@ void UIItemPurchaseWnd::OnMouseHover(int x, int y) { std::string text; char currency[12]; sprintf(currency, "Zeny"); - if (this->unknown_00FC) { + if (this->cashShopMode) { if (g_serviceType == 6) { sprintf(currency, "Koin"); } else if (g_serviceType == 0) { - if (*reinterpret_cast(&g_session.unknown_59DC[0x198]) == 1) { + if (*reinterpret_cast(&g_session.mouseAndChannelOptions[0x198]) == 1) { sprintf(currency, "한코인"); } else { sprintf(currency, LookupMessage(MSI_CASH)); @@ -7252,12 +7252,12 @@ void UIItemPurchaseWnd::OnMouseHover(int x, int y) { } char price[64]; - if (item.unknown_0014[0] != item.unknown_0014[1]) { - text = static_cast(FormatOwnedString("%s %d %s %d -> %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + if (item.prices[0] != item.prices[1]) { + text = static_cast(FormatOwnedString("%s %d %s %d -> %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } else { text = static_cast(FormatOwnedString("%s %d %s %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } g_modeMgr.gameMode->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7268,19 +7268,19 @@ void UIItemPurchaseWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13372 void UIItemSellWnd2::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); std::string text; char price[64]; - if (item.unknown_0014[0] != item.unknown_0014[1]) { - text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + if (item.prices[0] != item.prices[1]) { + text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } else { text = static_cast(FormatOwnedString("%s %d %s %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } g_modeMgr.gameMode->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7291,7 +7291,7 @@ void UIItemSellWnd2::OnMouseHover(int x, int y) { // FUNCTION: fn_13373 void UIItemSellWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } @@ -7301,21 +7301,21 @@ void UIItemSellWnd::OnMouseHover(int x, int y) { std::string text; char price[64]; - if (item.unknown_0014[0] != item.unknown_0014[1]) { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_EA12), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity, LookupMessage(MSI_EA4), - item.unknown_0014[0], FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), "Zeny")); + if (item.prices[0] != item.prices[1]) { + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_EA12), item.DisplayName(0).c_str(), item.optionCount, item.quantity, LookupMessage(MSI_EA4), + item.prices[0], FormatGroupedInteger(static_cast(item.prices[1]), price, 64), "Zeny")); } else { - text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } } else { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_TAIWAN_CASH_LEMITEMIN), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), "Zeny")); + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_TAIWAN_CASH_LEMITEMIN), item.DisplayName(0).c_str(), item.optionCount, item.quantity, LookupMessage(MSI_EA4), + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), "Zeny")); } else { text = static_cast(FormatOwnedString("%s %d %s %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } } @@ -7326,7 +7326,7 @@ void UIItemSellWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13374 void UIItemShopWnd2::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } @@ -7336,20 +7336,20 @@ void UIItemShopWnd2::OnMouseHover(int x, int y) { std::string text; char price[64]; - if (this->unknown_00F8 == 0) { - if (item.unknown_0014[0] == item.unknown_0014[1]) { - text = static_cast(FormatOwnedString("%s %s Zeny", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + if (this->interactionDisabled == 0) { + if (item.prices[0] == item.prices[1]) { + text = static_cast(FormatOwnedString("%s %s Zeny", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } else { - text = static_cast(FormatOwnedString("%s %d -> %s Zeny", item.DisplayName(0).c_str(), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + text = static_cast(FormatOwnedString("%s %d -> %s Zeny", item.DisplayName(0).c_str(), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } } else { - if (item.unknown_0014[0] == item.unknown_0014[1]) { + if (item.prices[0] == item.prices[1]) { text = static_cast(FormatOwnedString("%s %d %s %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } else { - text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + text = static_cast(FormatOwnedString("%s %d %s %d -> %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } } @@ -7360,7 +7360,7 @@ void UIItemShopWnd2::OnMouseHover(int x, int y) { // FUNCTION: fn_13375 void UIItemShopWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); @@ -7368,7 +7368,7 @@ void UIItemShopWnd::OnMouseHover(int x, int y) { std::string text; char currency[12]; sprintf(currency, "Zeny"); - if (this->unknown_010C) { + if (this->showFooter) { if (g_serviceType == 6) { sprintf(currency, "Koin"); } else if (g_serviceType == 0) { @@ -7383,39 +7383,39 @@ void UIItemShopWnd::OnMouseHover(int x, int y) { } char price[64]; - if (this->unknown_00F8) { - if (item.unknown_0014[0] != item.unknown_0014[1]) { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_EA12), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity, LookupMessage(MSI_EA4), - item.unknown_0014[0], FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + if (this->sellMode) { + if (item.prices[0] != item.prices[1]) { + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_EA12), item.DisplayName(0).c_str(), item.optionCount, item.quantity, LookupMessage(MSI_EA4), + item.prices[0], FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } else { - text = static_cast(FormatOwnedString("%s %d %s %d -> %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + text = static_cast(FormatOwnedString("%s %d %s %d -> %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } } else { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_TAIWAN_CASH_LEMITEMIN), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_TAIWAN_CASH_LEMITEMIN), item.DisplayName(0).c_str(), item.optionCount, item.quantity, LookupMessage(MSI_EA4), + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } else { text = static_cast(FormatOwnedString("%s %d %s %s %s", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } } } else { - if (item.unknown_0014[0] != item.unknown_0014[1]) { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_DRESSROOM_HEARCOLOR), item.DisplayName(0).c_str(), item.unknown_0098, item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + if (item.prices[0] != item.prices[1]) { + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_DRESSROOM_HEARCOLOR), item.DisplayName(0).c_str(), item.optionCount, item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } else { - text = static_cast(FormatOwnedString("%s %d -> %s %s", item.DisplayName(0).c_str(), item.unknown_0014[0], - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + text = static_cast(FormatOwnedString("%s %d -> %s %s", item.DisplayName(0).c_str(), item.prices[0], + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } } else { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_DRESSROOM_HEARSTYLE), item.DisplayName(0).c_str(), item.unknown_0098, - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), currency)); + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_DRESSROOM_HEARSTYLE), item.DisplayName(0).c_str(), item.optionCount, + FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } else { - text = static_cast(FormatOwnedString("%s %s %s", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), + text = static_cast(FormatOwnedString("%s %s %s", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.prices[1]), price, 64), currency)); } } @@ -7429,14 +7429,14 @@ void UIItemShopWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13376 void UIItemStoreFindWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7448,14 +7448,14 @@ void UIItemStoreFindWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13377 void UIItemStoreSubWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7467,14 +7467,14 @@ void UIItemStoreSubWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13378 void UIItemStoreWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7486,14 +7486,14 @@ void UIItemStoreWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13379 void UIItemWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.optionCount, item.quantity).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode @@ -7507,22 +7507,22 @@ void UIItemWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13380 void UIMerchantItemMyShopWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); std::string text; char price[64]; - if (this->unknown_0100 == 0) { - if (item.identified == 1 && item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_EA11), item.DisplayName(0).c_str(), item.unknown_0098, - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + if (this->buyingShop == 0) { + if (item.identified == 1 && item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_EA11), item.DisplayName(0).c_str(), item.optionCount, + FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } else { - text = static_cast(FormatOwnedString("%s %s Zeny", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64))); + text = static_cast(FormatOwnedString("%s %s Zeny", item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.prices[1]), price, 64))); } } else { - text = static_cast(FormatOwnedString(LookupMessage(MSI_BUYINGSTORE_MYSHOPWND_ITEMINFO), item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64), + text = static_cast(FormatOwnedString(LookupMessage(MSI_BUYINGSTORE_MYSHOPWND_ITEMINFO), item.DisplayName(0).c_str(), FormatGroupedInteger(static_cast(item.prices[1]), price, 64), item.quantity)); } @@ -7534,7 +7534,7 @@ void UIMerchantItemMyShopWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13381 void UIMerchantItemPurchaseWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); @@ -7542,7 +7542,7 @@ void UIMerchantItemPurchaseWnd::OnMouseHover(int x, int y) { char price[64]; g_modeMgr.gameMode ->ShowTooltip(FormatOwnedString("%s %d %s %s Zeny", item.DisplayName(0).c_str(), item.quantity, LookupMessage(MSI_EA4), - FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, 64)) + FormatGroupedInteger(static_cast(item.prices[1]), price, 64)) .c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } @@ -7552,14 +7552,14 @@ void UIMerchantItemPurchaseWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13382 void UIMerchantItemShopWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -7568,7 +7568,7 @@ void UIMerchantItemShopWnd::OnMouseHover(int x, int y) { } item = this->GetItemByIndex(this->GetItemIndexAt(x, y)); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } @@ -7576,9 +7576,9 @@ void UIMerchantItemShopWnd::OnMouseHover(int x, int y) { int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX - 2, tooltipY + 24, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX - 2, tooltipY + 24, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode->ShowTooltip(item.DisplayName(0).c_str(), tooltipX - 2, tooltipY + 24, g_session.GetItemNameColor(item), 0, 1); @@ -7589,14 +7589,14 @@ void UIMerchantItemShopWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13383 void UIMerchantItemWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.optionCount, item.quantity).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode @@ -7610,14 +7610,14 @@ void UIMerchantItemWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_13384 void UIMerchantMirrorItemWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_EA10), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_EA10), item.DisplayName(0).c_str(), item.optionCount, item.quantity).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode @@ -7652,19 +7652,19 @@ bool UIEditCtrl::DecodeItemLink(const std::vector& values, ITEM_INFO& item) return false; } - item.unknown_0000[2] = values[0]; + item.identity[2] = values[0]; item.SetItemId(values[2]); if (values[1] != 0) { - item.unknown_0000[0] = 4; + item.identity[0] = 4; } if (values.size() > 3) { - item.unknown_0060 = values[3]; + item.refiningLevel = values[3]; } - item.unknown_0070 = values[4]; + item.sprite = values[4]; int cardCount = 0; - item.unknown_0088 = static_cast(values[5]); + item.grade = static_cast(values[5]); if (values.size() > 6) { cardCount = values[6]; for (int i = 1; i < cardCount + 1; ++i) { @@ -7674,8 +7674,8 @@ bool UIEditCtrl::DecodeItemLink(const std::vector& values, ITEM_INFO& item) } if (static_cast(cardCount + 8) < values.size()) { - item.unknown_0098 = values[cardCount + 8]; - int optionCount = item.unknown_0098 + 1; + item.optionCount = values[cardCount + 8]; + int optionCount = item.optionCount + 1; for (int i = 1; i < optionCount; ++i) { const int base = cardCount + 9 + (i - 1) * 3; ItemOption option; @@ -7698,9 +7698,9 @@ UIItemBaseWnd::UIItemBaseWnd() this->resizer = nullptr; this->scrollBar = nullptr; this->scroll = 0; - this->unknown_00E4 = 0; + this->scrollOverflow = 0; this->showQuantity = 1; - this->unknown_00B8 = 0; + this->alternateButtonBar = 0; this->buttons[0] = nullptr; this->buttons[1] = nullptr; this->buttons[2] = nullptr; @@ -7718,8 +7718,8 @@ UIItemDropCntWnd::UIItemDropCntWnd() : UIFrameWnd(0) { // FUNCTION: fn_13216 UIItemPurchaseWnd::UIItemPurchaseWnd() : UIItemBaseWnd() { this->hovered = -1; - this->unknown_00B8 = 1; - this->unknown_00FC = 0; + this->alternateButtonBar = 1; + this->cashShopMode = 0; this->saved = nullptr; } @@ -7727,16 +7727,16 @@ UIItemPurchaseWnd::UIItemPurchaseWnd() : UIItemBaseWnd() { // FUNCTION: fn_13217 UIItemSellWnd2::UIItemSellWnd2() : UIItemBaseWnd() { this->hovered = -1; - this->unknown_00B8 = 1; + this->alternateButtonBar = 1; this->saved = nullptr; - this->unknown_00FC = 0; + this->shopId = 0; } // OFFSET: 0x0096E8B0 // FUNCTION: fn_13218 UIItemSellWnd::UIItemSellWnd() : UIItemBaseWnd() { this->hovered = -1; - this->unknown_00B8 = 1; + this->alternateButtonBar = 1; this->saved = nullptr; } @@ -7745,11 +7745,11 @@ UIItemSellWnd::UIItemSellWnd() : UIItemBaseWnd() { UIItemShopWnd2::UIItemShopWnd2() : UIItemBaseWnd() { this->hovered = -1; this->showQuantity = 0; - this->unknown_00F8 = 0; - this->unknown_00B8 = 1; + this->interactionDisabled = 0; + this->alternateButtonBar = 1; this->saved = nullptr; - this->unknown_0104 = 29; - this->unknown_0108 = 0; + this->bottomBarHeight = 29; + this->extraBottomHeight = 0; } // OFFSET: 0x0096E9D0 @@ -7757,12 +7757,12 @@ UIItemShopWnd2::UIItemShopWnd2() : UIItemBaseWnd() { UIItemShopWnd::UIItemShopWnd() : UIItemBaseWnd() { this->hovered = -1; this->showQuantity = 0; - this->unknown_00F8 = 0; - this->unknown_00B8 = 1; + this->sellMode = 0; + this->alternateButtonBar = 1; this->saved = nullptr; - this->unknown_0104 = 29; - this->unknown_0108 = 0; - this->unknown_010C = 0; + this->bottomPadding = 29; + this->footerHeight = 0; + this->showFooter = 0; } // OFFSET: 0x0096EA80 @@ -7773,7 +7773,7 @@ UIItemStoreFindWnd::UIItemStoreFindWnd() : UIItemBaseWnd() { this->scroll = 0; this->columns = 1; this->visibleRows = 3; - this->unknown_00E4 = 0; + this->scrollOverflow = 0; this->unknown_0120 = 18; } @@ -7785,32 +7785,32 @@ UIItemStoreSubWnd::UIItemStoreSubWnd() : UIItemBaseWnd() { this->scroll = 0; this->columns = 1; this->visibleRows = 3; - this->unknown_00E4 = 0; + this->scrollOverflow = 0; this->unknown_011C = 18; } // OFFSET: 0x0096EC60 // FUNCTION: fn_13223 UIItemStoreWnd::UIItemStoreWnd() : UIItemBaseWnd() { - this->unknown_016C = 0; - this->unknown_0170 = 0; - this->unknown_0174 = 0; - this->unknown_0180 = 0; + this->m_sortOptionA = 0; + this->m_sortOptionB = 0; + this->m_sortOptionC = 0; + this->m_sortMode = 0; this->showQuantity = 1; - this->unknown_00B8 = 1; + this->alternateButtonBar = 1; this->saved = nullptr; - this->unknown_0178 = 0; - this->unknown_017C = 0; + this->m_sortOptionD = 0; + this->m_sortOptionE = 0; this->searchEdit = nullptr; for (int i = 0; i < 8; ++i) { - this->unknown_00F8[i] = 0; + this->m_tabFlags[i] = 0; this->tabs[i] = nullptr; - this->unknown_0120[i] = 0; + this->m_tabWindows[i] = 0; } - this->unknown_0140 = 0; - this->unknown_0188 = 0; - this->unknown_018C = 0; - this->unknown_0190 = 0; + this->m_searchWindow = 0; + this->m_itemCount = 0; + this->m_capacity = 0; + this->m_hideCapacity = 0; } // OFFSET: 0x00977E10 @@ -7893,7 +7893,7 @@ void UIItemStoreWnd::OnCreate(int width, int height) { } this->m_message0 = 365; - this->unknown_0144 = ""; + this->m_capacityText = ""; this->columns = 1; this->visibleRows = (height - 74) / 32; this->AddCloseButton("", 0); @@ -7942,7 +7942,7 @@ void UIItemWnd::OnCreate(int width, int height) { this->baseButton = this->AddBaseButton(); this->minimizeButton = this->AddMinimizeButton("Ctrl+E", 0); this->closeButton = this->AddCloseButton("Alt+E", 0); - this->unknown_0110 = this->geometry.height; + this->expandedHeight = this->geometry.height; this->columns = (width - 40) / 32; this->visibleRows = (height - 38) / 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -7988,53 +7988,53 @@ void UIItemWnd::OnCreate(int width, int height) { this->AddChild(this->countButton); UIBitmapButton* lockDeal = new UIBitmapButton(); - this->unknown_0124 = lockDeal; + this->dealLockButton = lockDeal; lockDeal->SetBitmap(g_session.m_blockPrivateTab != 1 ? "유저인터페이스\\inventory\\bt_itemDeal_lock_off.bmp" : "유저인터페이스\\inventory\\bt_itemdeal_lock_on.bmp", 0, 0); - static_cast(this->unknown_0124)->SetBitmap("유저인터페이스\\inventory\\bt_itemDeal_lock_over.bmp", 1, 0); - static_cast(this->unknown_0124)->SetBitmap("유저인터페이스\\inventory\\bt_itemDeal_lock_press.bmp", 2, 0); - this->unknown_0124->SetSize(static_cast(this->unknown_0124)->BitmapWidth(), static_cast(this->unknown_0124)->BitmapHeight()); - this->unknown_0124->Move(124, this->geometry.height - 19); - this->unknown_0124->SetTooltip(LookupMessage(MSI_CONNECT_SNS_PART_SCREEN_SHOT)); - this->unknown_0124->SetId(507); - this->AddChild(this->unknown_0124); + static_cast(this->dealLockButton)->SetBitmap("유저인터페이스\\inventory\\bt_itemDeal_lock_over.bmp", 1, 0); + static_cast(this->dealLockButton)->SetBitmap("유저인터페이스\\inventory\\bt_itemDeal_lock_press.bmp", 2, 0); + this->dealLockButton->SetSize(static_cast(this->dealLockButton)->BitmapWidth(), static_cast(this->dealLockButton)->BitmapHeight()); + this->dealLockButton->Move(124, this->geometry.height - 19); + this->dealLockButton->SetTooltip(LookupMessage(MSI_CONNECT_SNS_PART_SCREEN_SHOT)); + this->dealLockButton->SetId(507); + this->AddChild(this->dealLockButton); - this->unknown_012C = new UIBitmapButton(); + this->filterButton = new UIBitmapButton(); this->RefreshSortButton(); - this->unknown_012C->SetSize(static_cast(this->unknown_012C)->BitmapWidth(), static_cast(this->unknown_012C)->BitmapHeight()); - this->unknown_012C->Move(157, this->geometry.height - 19); - this->unknown_012C->SetId(364); - this->AddChild(this->unknown_012C); + this->filterButton->SetSize(static_cast(this->filterButton)->BitmapWidth(), static_cast(this->filterButton)->BitmapHeight()); + this->filterButton->Move(157, this->geometry.height - 19); + this->filterButton->SetId(364); + this->AddChild(this->filterButton); } // OFFSET: 0x0096ED90 // FUNCTION: fn_13224 UIItemWnd::UIItemWnd() : UIItemBaseWnd() { - this->unknown_0124 = 0; - this->unknown_0128 = nullptr; - this->unknown_012C = 0; + this->dealLockButton = 0; + this->filterWindow = nullptr; + this->filterButton = 0; this->resizer = nullptr; this->scrollBar = nullptr; this->saved = nullptr; - this->unknown_0100 = 0; - this->unknown_0104 = 0; - this->unknown_0108 = 0; - this->unknown_010C = 0; + this->usableFilter = 0; + this->equipmentFilter = 0; + this->miscFilter = 0; + this->categoryFilter = 0; this->scroll = 0; - this->unknown_00E4 = 0; + this->scrollOverflow = 0; } // OFFSET: 0x0096EE60 // FUNCTION: fn_13225 UIMerchantItemMyShopWnd::UIMerchantItemMyShopWnd(int value) : UIItemBaseWnd() { - this->unknown_0100 = value; + this->buyingShop = value; this->startTick = 0; this->duration = 0; this->actionButton = nullptr; - this->unknown_011C = 21; - this->unknown_00B8 = 1; + this->footerHeight = 21; + this->alternateButtonBar = 1; this->saved = nullptr; this->shopOpen = 0; - this->unknown_010C = 0; + this->offlineStoreId = 0; } // OFFSET: 0x0096EF10 @@ -8048,47 +8048,47 @@ UIMerchantItemPurchaseMSGWnd::UIMerchantItemPurchaseMSGWnd() this->buyButton = nullptr; this->cancelButton = nullptr; this->purchaseIndex = 0; - this->unknown_00D0 = 0; + this->purchaseAmount = 0; } // OFFSET: 0x0096EFC0 // FUNCTION: fn_13227 UIMerchantItemPurchaseWnd::UIMerchantItemPurchaseWnd(int value) : UIItemBaseWnd() { - this->unknown_0108 = value; - this->unknown_00B8 = 1; - this->unknown_00F8 = 0; + this->buyingStore = value; + this->alternateButtonBar = 1; + this->merchantId = 0; this->saved = nullptr; this->hovered = -1; g_session.ClearItems1760(); - this->unknown_00F0 = 0; + this->nonItemHeight = 0; } // OFFSET: 0x0096F060 // FUNCTION: fn_13228 UIMerchantItemShopWnd::UIMerchantItemShopWnd(int value) : UIItemBaseWnd() { - this->unknown_0108 = 0; - this->unknown_010C = value; + this->buyingZeny = 0; + this->buyingShop = value; this->startTick = 0; this->duration = 0; - this->unknown_00B8 = 1; + this->alternateButtonBar = 1; this->hovered = -1; this->saved = nullptr; - this->unknown_00F0 = 0; - this->unknown_0118 = 21; + this->nonItemHeight = 0; + this->footerHeight = 21; } // OFFSET: 0x0096F110 // FUNCTION: fn_13229 UIMerchantItemWnd::UIMerchantItemWnd() : UIItemBaseWnd() { - this->unknown_00B8 = 1; + this->alternateButtonBar = 1; this->saved = nullptr; } // OFFSET: 0x0096F180 // FUNCTION: fn_13230 UIMerchantMirrorItemWnd::UIMerchantMirrorItemWnd(int value) : UIItemBaseWnd() { - this->unknown_00F4 = value; - this->unknown_00B8 = 1; + this->mode = value; + this->alternateButtonBar = 1; this->saved = nullptr; } @@ -8124,7 +8124,7 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: return 0; case UM_COMMAND: if (a == ID_CHECK) { - g_windowMgr.unknown_0064 = b; + g_windowMgr.dragAllItems = b; return 0; } break; @@ -8135,8 +8135,8 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); g_session.RemoveItem1720ByName(item); - if (g_windowMgr.unknown_0258) { - g_windowMgr.unknown_0258->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemPurchaseWnd) { + g_windowMgr.itemPurchaseWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -8150,8 +8150,8 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: CSession* lists = &g_session; lists->MergeItem1718(item); lists->RemoveItem1730(item); - if (g_windowMgr.unknown_0260) { - g_windowMgr.unknown_0260->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemSellWnd2) { + g_windowMgr.itemSellWnd2->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -8161,7 +8161,7 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } break; case UM_SETTITLE: - this->unknown_00F8 = 1; + this->interactionDisabled = 1; this->showQuantity = 1; this->title->SetTextAutoWidth(LookupMessage(MSI_ITEMSYOUCANCHANGE)); this->checkBox->m_disabled = 0; @@ -8182,10 +8182,10 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); this->columns = 1; - this->visibleRows = (newHeight - this->unknown_0108 - this->unknown_0104 - 17) / 32; + this->visibleRows = (newHeight - this->extraBottomHeight - this->bottomBarHeight - 17) / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); - this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17); + this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->extraBottomHeight - this->bottomBarHeight - 17); this->checkBox->Move(12, this->geometry.height - 20); this->UpdateScrollBar(); } @@ -8199,7 +8199,7 @@ int UIItemShopWnd2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: const int size = g_session.GetList1Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1718At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -8232,11 +8232,11 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: this->RecordResponse(static_cast(a), b, c, d); if (a == ID_CHECK) { if (g_replayAnimationScaling != 0) { - this->checkBox->geometry.unknown_0030 = b; + this->checkBox->geometry.state = b; this->checkBox->Invalidate(); } - g_windowMgr.unknown_0064 = b; + g_windowMgr.dragAllItems = b; return 0; } break; @@ -8247,8 +8247,8 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); g_session.RemoveItem1720ByName(item); - if (g_windowMgr.unknown_0258) { - g_windowMgr.unknown_0258->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemPurchaseWnd) { + g_windowMgr.itemPurchaseWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -8262,8 +8262,8 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: CSession* lists = &g_session; lists->MergeItem1718(item); lists->RemoveItem1730(item); - if (g_windowMgr.unknown_025C) { - g_windowMgr.unknown_025C->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemSellWnd) { + g_windowMgr.itemSellWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -8272,22 +8272,22 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } break; case UM_SETTITLE: - this->unknown_010C = b; + this->showFooter = b; if (a) { - this->unknown_00F8 = 1; + this->sellMode = 1; this->showQuantity = 1; this->title->SetTextAutoWidth(LookupMessage(MSI_ITEMSYOUCANSELL)); this->checkBox->m_disabled = 0; } else { - this->unknown_00F8 = 0; + this->sellMode = 0; this->showQuantity = 0; this->title->SetTextAutoWidth(LookupMessage(MSI_SHOPITEMS)); this->checkBox->m_disabled = 1; } - this->unknown_0108 = this->unknown_010C != 0 ? 20 : 0; + this->footerHeight = this->showFooter != 0 ? 20 : 0; { - const int height = this->geometry.height - this->unknown_0104 - this->unknown_0108 - 17; + const int height = this->geometry.height - this->bottomPadding - this->footerHeight - 17; this->visibleRows = height / 32; this->scrollBar->Resize(this->geometry.width - 15, height); } @@ -8309,10 +8309,10 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); this->columns = 1; - this->visibleRows = (newHeight - this->unknown_0104 - this->unknown_0108 - 17) / 32; + this->visibleRows = (newHeight - this->bottomPadding - this->footerHeight - 17) / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); - this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->unknown_0104 - this->unknown_0108 - 17); + this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->bottomPadding - this->footerHeight - 17); this->checkBox->Move(12, this->geometry.height - 20); this->UpdateScrollBar(); } @@ -8326,7 +8326,7 @@ int UIItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: const int size = g_session.GetList1Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1718At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -8371,14 +8371,14 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s const int size = g_session.GetList5Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1738At(i); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } - item.unknown_0078[0] = g_itemInfoMgr->IsCostume(std::stoi(item.itemId)); - const int type = static_cast(item.unknown_0000[0]); + item.saleData[0] = g_itemInfoMgr->IsCostume(std::stoi(item.itemId)); + const int type = static_cast(item.identity[0]); bool matches = false; - if (item.unknown_0078[0] != 0) { + if (item.saleData[0] != 0) { matches = this->tabIndex == 4; } else { switch (this->tabIndex) { @@ -8432,7 +8432,7 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->SortReversed2(); } - if (!this->unknown_0138.empty() && !this->FilterByName2(std::string(this->unknown_0138.c_str(), this->unknown_0138.size()))) { + if (!this->nameFilter.empty() && !this->FilterByName2(std::string(this->nameFilter.c_str(), this->nameFilter.size()))) { return 0; } @@ -8469,12 +8469,12 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case UM_SETCOUNTINFO: { char text[64]; std::sprintf(text, "%d/%d", a, b); - this->unknown_0120 = text; + this->footerText = text; this->Invalidate(); return 0; } case UM_SEARCH_ITEMS: - if (!this->unknown_0138.empty() && this->FilterByName2(std::string(this->unknown_0138.c_str(), this->unknown_0138.size()))) { + if (!this->nameFilter.empty() && this->FilterByName2(std::string(this->nameFilter.c_str(), this->nameFilter.size()))) { this->Invalidate(); this->UpdateScrollBar(); } @@ -8485,7 +8485,7 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s return 0; } - this->unknown_0158 = 1; + this->sortEnabled = 1; if (g_session.m_itemAscendingOrder == true) { this->Sort2(); } else if (g_session.m_itemDescendingOrder == true) { @@ -8496,7 +8496,7 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->UpdateScrollBar(); return 0; case UM_RESET_ITEM_SORT: - this->unknown_0158 = 0; + this->sortEnabled = 0; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); return 0; default: @@ -8509,9 +8509,9 @@ int UIItemStoreSubWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { switch (message) { case UM_SETCOUNTINFO: - this->unknown_0188 = a; - this->unknown_018C = b; - this->unknown_0144 = FormatThreadText("%d/%d", a, b); + this->m_itemCount = a; + this->m_capacity = b; + this->m_capacityText = FormatThreadText("%d/%d", a, b); this->Invalidate(); return 0; case UM_SETINFO: @@ -8522,13 +8522,13 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: this->Move(this->saved->x, this->saved->y); this->SendMsg(nullptr, UM_RESIZE, 3, this->saved->width, this->saved->height, 0); - this->unknown_016C = 3; - this->unknown_0170 = 3; - this->unknown_0174 = 3; - this->unknown_0178 = 3; - this->unknown_017C = 4; + this->m_sortOptionA = 3; + this->m_sortOptionB = 3; + this->m_sortOptionC = 3; + this->m_sortOptionD = 3; + this->m_sortOptionE = 4; for (int index = 0; index < 8; ++index) { - if ((this->saved->unknown_0010 & (1 << index)) != 0 && this->tabs[index]) { + if ((this->saved->openTabs & (1 << index)) != 0 && this->tabs[index]) { this->tabs[index]->SetChecked(1); } } @@ -8538,14 +8538,14 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: case UM_COMMAND: switch (a) { case ID_CLOSE: { - const int openTabs = this->saved->unknown_0010; + const int openTabs = this->saved->openTabs; for (int index = 0; index < 7; ++index) { g_windowMgr.CloseWindow(index + 146); } g_windowMgr.CloseWindow(WID_ITEMSTORESUBWND_TAB_7); - this->saved->unknown_0010 = openTabs; + this->saved->openTabs = openTabs; g_windowMgr.CloseWindow(WID_ITEMSTOREFINDWND); - this->unknown_0140 = nullptr; + this->m_searchWindow = nullptr; if (g_modeMgr.gameMode) { g_modeMgr.gameMode->SendMsg(MM_CLOSE_STORE, 0, 0, 0, 0); } @@ -8566,19 +8566,19 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: if (g_windowMgr.LookupWindow(WID_ITEMSTORESUBWND_TAB_7)) { g_windowMgr.LookupWindow(WID_ITEMSTORESUBWND_TAB_7)->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); } - if (this->unknown_0140) { - this->unknown_0140->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); + if (this->m_searchWindow) { + this->m_searchWindow->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); } break; case ID_PREV: - this->unknown_0184[0] = 0; + this->m_searchFlags[0] = 0; static_cast(this->buttons[1])->Enable(1); static_cast(this->buttons[3])->Enable(0); this->buttons[1]->Move(this->geometry.width - 105, this->geometry.height - 24); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); for (int index = 0; index < 7; ++index) { - if (this->unknown_0120[index]) { - this->unknown_0120[index]->SendMsg(nullptr, UM_RESET_ITEM_SORT, 0, 0, 0, 0); + if (this->m_tabWindows[index]) { + this->m_tabWindows[index]->SendMsg(nullptr, UM_RESET_ITEM_SORT, 0, 0, 0, 0); } } this->buttons[1]->Move(220, this->geometry.height - 50); @@ -8587,10 +8587,10 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: std::string text(this->searchEdit->Text()); if (!text.empty()) { UIItemStoreFindWnd* window = static_cast(g_windowMgr.EnsureWindow(WID_ITEMSTOREFINDWND)); - this->unknown_0140 = window; + this->m_searchWindow = window; window->SetSearchText(std::string(text.c_str(), text.size())); - this->unknown_0140->SendMsg(nullptr, UM_REFRESHITEM, 365, 0, 0, 0); - this->unknown_0140->SendMsg(nullptr, UM_SEARCH_ITEMS, 0, 0, 0, 0); + this->m_searchWindow->SendMsg(nullptr, UM_REFRESHITEM, 365, 0, 0, 0); + this->m_searchWindow->SendMsg(nullptr, UM_SEARCH_ITEMS, 0, 0, 0, 0); this->searchEdit->SetText(""); } break; @@ -8608,20 +8608,20 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: break; } - if (tab->geometry.unknown_0030 != 0) { - this->unknown_0120[index] = nullptr; - this->unknown_0120[index] = g_windowMgr.EnsureWindow(a); - if (this->unknown_0120[index]) { - this->unknown_0120[index]->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (tab->geometry.state != 0) { + this->m_tabWindows[index] = nullptr; + this->m_tabWindows[index] = g_windowMgr.EnsureWindow(a); + if (this->m_tabWindows[index]) { + this->m_tabWindows[index]->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - this->saved->unknown_0010 |= 1 << index; + this->saved->openTabs |= 1 << index; break; } g_windowMgr.CloseWindow(a); - if (this->unknown_0120[index]) { - this->saved->unknown_0010 ^= 1 << index; - this->unknown_0120[index] = nullptr; + if (this->m_tabWindows[index]) { + this->saved->openTabs ^= 1 << index; + this->m_tabWindows[index] = nullptr; } break; } @@ -8630,29 +8630,29 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: break; } - if (this->tabs[7]->geometry.unknown_0030 != 0) { - this->unknown_0120[7] = nullptr; - this->unknown_0120[7] = g_windowMgr.EnsureWindow(WID_ITEMSTORESUBWND_TAB_7); - if (this->unknown_0120[7]) { - this->unknown_0120[7]->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (this->tabs[7]->geometry.state != 0) { + this->m_tabWindows[7] = nullptr; + this->m_tabWindows[7] = g_windowMgr.EnsureWindow(WID_ITEMSTORESUBWND_TAB_7); + if (this->m_tabWindows[7]) { + this->m_tabWindows[7]->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } - this->saved->unknown_0010 |= 0x80; + this->saved->openTabs |= 0x80; break; } g_windowMgr.CloseWindow(WID_ITEMSTORESUBWND_TAB_7); - if (this->unknown_0120[7]) { - this->saved->unknown_0010 ^= 0x80; - this->unknown_0120[7] = nullptr; + if (this->m_tabWindows[7]) { + this->saved->openTabs ^= 0x80; + this->m_tabWindows[7] = nullptr; } break; case 133: - if (!this->unknown_0140) { - this->unknown_0140 = g_windowMgr.EnsureWindow(WID_ITEMSTOREFINDWND); + if (!this->m_searchWindow) { + this->m_searchWindow = g_windowMgr.EnsureWindow(WID_ITEMSTOREFINDWND); std::string text(this->searchEdit->Text()); if (!text.empty() && reinterpret_cast(this)->FilterByName3(std::string(text.c_str(), text.size()))) { - static_cast(this->unknown_0140)->SetSearchText(std::string(text.c_str(), text.size())); - this->unknown_0140->SendMsg(nullptr, UM_SEARCH_ITEMS, 0, 0, 0, 0); + static_cast(this->m_searchWindow)->SetSearchText(std::string(text.c_str(), text.size())); + this->m_searchWindow->SendMsg(nullptr, UM_SEARCH_ITEMS, 0, 0, 0, 0); } } break; @@ -8672,7 +8672,7 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: case UM_RESIZE: if (a == 3) { int height = c; - const int maximum = g_windowMgr.unknown_0480 * 7 / 10; + const int maximum = g_windowMgr.screenHeight * 7 / 10; if (height > maximum) { height = maximum; } @@ -8706,17 +8706,17 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: const int size = g_session.GetList5Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1738At(i); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } - item.unknown_0078[0] = g_itemInfoMgr->IsCostume(std::stoi(item.itemId)); - const int type = static_cast(item.unknown_0000[0]); + item.saleData[0] = g_itemInfoMgr->IsCostume(std::stoi(item.itemId)); + const int type = static_cast(item.identity[0]); bool matches = false; - if (item.unknown_0078[0] != 0) { - matches = this->unknown_0180 == 4; + if (item.saleData[0] != 0) { + matches = this->m_sortMode == 4; } else { - switch (this->unknown_0180) { + switch (this->m_sortMode) { case 0: matches = type == 0 || type == 1 || type == 2; break; @@ -8808,11 +8808,11 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: return 0; } case UM_TAB: - this->unknown_0180 = a; - if (this->unknown_0180 < 0) { - this->unknown_0180 = 0; - } else if (this->unknown_0180 > 7) { - this->unknown_0180 = 7; + this->m_sortMode = a; + if (this->m_sortMode < 0) { + this->m_sortMode = 0; + } else if (this->m_sortMode > 7) { + this->m_sortMode = 7; } this->Invalidate(); @@ -8853,12 +8853,12 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } for (int index = 0; index < 8; ++index) { - if (this->unknown_0120[index]) { - this->unknown_0120[index]->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); + if (this->m_tabWindows[index]) { + this->m_tabWindows[index]->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); } } - if (this->unknown_0140) { - this->unknown_0140->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); + if (this->m_searchWindow) { + this->m_searchWindow->SendMsg(nullptr, UM_SORT_ITEMS, 0, 0, 0, 0); } this->Invalidate(); @@ -8873,23 +8873,23 @@ int UIItemStoreWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: // OFFSET: 0x00859470 // FUNCTION: fn_10776 void UIChatEditCtrl::InsertItemLink(const ITEM_INFO& item) { - if (!this->unknown_0144) { - this->unknown_0144 = new (std::nothrow) UIItemTagOnChat(); - if (!this->unknown_0144) { + if (!this->itemTags) { + this->itemTags = new (std::nothrow) UIItemTagOnChat(); + if (!this->itemTags) { return; } } - if (!this->unknown_0144->CanInsertTag(item.DisplayName(0), this->geometry.width)) { + if (!this->itemTags->CanInsertTag(item.DisplayName(0), this->geometry.width)) { return; } - this->unknown_0144->taggedText = this->text; + this->itemTags->taggedText = this->text; const std::string name = item.DisplayName(0); - const std::string tag = this->unknown_0144->AppendTag(name); + const std::string tag = this->itemTags->AppendTag(name); g_serverLanguage->ResetInput(); g_serverLanguage->Insert(tag.c_str()); - this->unknown_0144->AddItemTag(item, 0x12B8A4); + this->itemTags->AddItemTag(item, 0x12B8A4); } // OFFSET: 0x00980340 @@ -8921,7 +8921,7 @@ void UIItemStoreFindWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -8932,11 +8932,11 @@ void UIItemStoreFindWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawWrappedItemName(left + 40, top + 29, width, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -8947,7 +8947,7 @@ void UIItemStoreFindWnd::Paint() { } } - this->DrawTextAt(16, this->geometry.height - 20, this->unknown_0124.c_str(), 0, 0, 12, 0, 0, 0); + this->DrawTextAt(16, this->geometry.height - 20, this->statusText.c_str(), 0, 0, 12, 0, 0, 0); } // OFFSET: 0x00980610 @@ -8979,7 +8979,7 @@ void UIItemStoreSubWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -8990,11 +8990,11 @@ void UIItemStoreSubWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawWrappedItemName(left + 40, top + 29, width, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9005,7 +9005,7 @@ void UIItemStoreSubWnd::Paint() { } } - this->DrawTextAt(16, this->geometry.height - 20, this->unknown_0120.c_str(), 0, 0, 12, 0, 0, 0); + this->DrawTextAt(16, this->geometry.height - 20, this->footerText.c_str(), 0, 0, 12, 0, 0, 0); } // OFFSET: 0x0097E7A0 @@ -9033,7 +9033,7 @@ void UIItemPurchaseWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int height = this->geometry.height; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); @@ -9052,7 +9052,7 @@ void UIItemPurchaseWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9068,8 +9068,8 @@ void UIItemPurchaseWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); int nameWidth = 110; - const int amount = static_cast(it->unknown_0014[0]); - if (amount != static_cast(it->unknown_0014[1])) { + const int amount = static_cast(it->prices[0]); + if (amount != static_cast(it->prices[1])) { if (amount >= 10000) { nameWidth = 45; } else if (amount >= 1000) { @@ -9082,11 +9082,11 @@ void UIItemPurchaseWnd::Paint() { } this->DrawWrappedItemName(column + 76, top + 29, nameWidth, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9094,12 +9094,12 @@ void UIItemPurchaseWnd::Paint() { char currency[10]; StringFormat(currency, 10, static_cast(-1), "Z"); - if (this->unknown_00FC != 0) { + if (this->cashShopMode != 0) { const char* name; if (g_serviceType == 6) { name = "Koin"; } else if (g_serviceType == 0) { - if (*reinterpret_cast(&g_session.unknown_59DC[0x198]) == 1) { + if (*reinterpret_cast(&g_session.mouseAndChannelOptions[0x198]) == 1) { name = "한코인"; } else { name = LookupMessage(MSI_CASH); @@ -9113,10 +9113,10 @@ void UIItemPurchaseWnd::Paint() { char price[64]; char text[64]; int length; - if (it->unknown_0014[0] != it->unknown_0014[1]) { - length = sprintf(text, " %d -> %s %s", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 64), currency); + if (it->prices[0] != it->prices[1]) { + length = sprintf(text, " %d -> %s %s", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 64), currency); } else { - length = sprintf(text, " %s %s", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 64), currency); + length = sprintf(text, " %s %s", FormatGroupedInteger(static_cast(it->prices[0]), price, 64), currency); } this->DrawRightAlignedText(this->geometry.width - 18, top + 29, text, length, 0, 12, 0, 0); @@ -9125,7 +9125,7 @@ void UIItemPurchaseWnd::Paint() { } } - if (this->unknown_00FC != 0) { + if (this->cashShopMode != 0) { this->DrawTextAt(12, this->geometry.height - 48, LookupMessage(MSI_USE_FREE_POINT), 0, 0, 12, 0, 0, 0); this->DrawTextAt(179, this->geometry.height - 48, LookupMessage(MSI_CASH), 0, 0, 12, 0, 0, 0); this->FillRegion(109, this->geometry.height - 51, 66, 18, 0x8E8E8E); @@ -9159,7 +9159,7 @@ void UIItemSellWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; const int slotRows = (this->geometry.height - 38) / 32; @@ -9180,7 +9180,7 @@ void UIItemSellWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9196,8 +9196,8 @@ void UIItemSellWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); int nameWidth = 100; - const int amount = static_cast(it->unknown_0014[0]); - if (amount != static_cast(it->unknown_0014[1])) { + const int amount = static_cast(it->prices[0]); + if (amount != static_cast(it->prices[1])) { if (amount >= 10000) { nameWidth = 45; } else if (amount >= 1000) { @@ -9210,21 +9210,21 @@ void UIItemSellWnd::Paint() { } this->DrawWrappedItemName(column + 76, top + 29, nameWidth, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); } int length; - if (it->unknown_0014[0] == it->unknown_0014[1]) { - length = sprintf(text, " %s Zeny", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 64)); + if (it->prices[0] == it->prices[1]) { + length = sprintf(text, " %s Zeny", FormatGroupedInteger(static_cast(it->prices[0]), price, 64)); } else { - length = sprintf(text, " %d -> %s Zeny", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 64)); + length = sprintf(text, " %d -> %s Zeny", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 64)); } this->DrawRightAlignedText(this->geometry.width - 18, top + 29, text, length, 0, 12, 0, 0); @@ -9243,13 +9243,13 @@ void UIItemShopWnd::Paint() { return; } - int rows = (this->geometry.height - this->unknown_0104 - 17) / 8 + ((this->geometry.height - this->unknown_0104 - 17) % 8 != 0); + int rows = (this->geometry.height - this->bottomPadding - 17) / 8 + ((this->geometry.height - this->bottomPadding - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { const auto* left = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp"))); this->DrawBitmap(0, y, &left->image, false); } - rows = (this->geometry.height - this->unknown_0104 - 17) / 8 + ((this->geometry.height - this->unknown_0104 - 17) % 8 != 0); + rows = (this->geometry.height - this->bottomPadding - 17) / 8 + ((this->geometry.height - this->bottomPadding - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { const auto* right = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp"))); this->DrawBitmap(this->geometry.width - right->image.width, y, &right->image, false); @@ -9257,26 +9257,26 @@ void UIItemShopWnd::Paint() { unsigned red, green, blue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->unknown_0104 - 17, RGB(red, green, blue)); + this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->bottomPadding - 17, RGB(red, green, blue)); this->FillRegion( - 20, (this->geometry.height - this->unknown_0104 - 17) / 32 * 32 + 17, this->geometry.width - 24, - (this->geometry.height - this->unknown_0104 - 17) % 32, RGB(red, green, blue) + 20, (this->geometry.height - this->bottomPadding - 17) / 32 * 32 + 17, this->geometry.width - 24, + (this->geometry.height - this->bottomPadding - 17) % 32, RGB(red, green, blue) ); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; - int slotRows = (this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17) / 32; + int slotRows = (this->geometry.height - this->footerHeight - this->bottomPadding - 17) / 32; int slots = slotRows; for (int y = 17; slots > 0; --slots, y += 32) { DrawItemSlotBackground(*this, 40, y); } - if (this->unknown_010C != 0) { - slotRows = (this->geometry.height - this->unknown_0104 - 17) / 32; + if (this->showFooter != 0) { + slotRows = (this->geometry.height - this->bottomPadding - 17) / 32; } SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(72, 17, columns * 32 - 32, slotRows * 32, RGB(red, green, blue)); - if (this->unknown_010C != 0) { + if (this->showFooter != 0) { this->FillRegion(40, slotRows * 32 - 15, 32, 32, RGB(red, green, blue)); } @@ -9288,7 +9288,7 @@ void UIItemShopWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9304,8 +9304,8 @@ void UIItemShopWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); int nameWidth = 100; - const int amount = static_cast(it->unknown_0014[0]); - if (amount != static_cast(it->unknown_0014[1])) { + const int amount = static_cast(it->prices[0]); + if (amount != static_cast(it->prices[1])) { if (amount >= 10000) { nameWidth = 45; } else if (amount >= 1000) { @@ -9318,11 +9318,11 @@ void UIItemShopWnd::Paint() { } this->DrawWrappedItemName(column + 76, top + 29, nameWidth, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9330,12 +9330,12 @@ void UIItemShopWnd::Paint() { char currency[8]; sprintf(currency, "Z"); - if (this->unknown_010C != 0) { + if (this->showFooter != 0) { const char* name; if (g_serviceType == 6) { name = "K"; } else if (g_serviceType == 0) { - name = *reinterpret_cast(&g_session.unknown_59DC[0x198]) != 1 ? "C" : "H"; + name = *reinterpret_cast(&g_session.mouseAndChannelOptions[0x198]) != 1 ? "C" : "H"; } else { name = "P"; } @@ -9345,10 +9345,10 @@ void UIItemShopWnd::Paint() { char price[64]; char text[64]; int length; - if (it->unknown_0014[0] != it->unknown_0014[1]) { - length = sprintf(text, " %d -> %s %s", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 64), currency); + if (it->prices[0] != it->prices[1]) { + length = sprintf(text, " %d -> %s %s", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 64), currency); } else { - length = sprintf(text, " %s %s", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 64), currency); + length = sprintf(text, " %s %s", FormatGroupedInteger(static_cast(it->prices[0]), price, 64), currency); } this->DrawRightAlignedText(this->geometry.width - 18, top + 29, text, length, 0, 12, 0, 0); @@ -9357,24 +9357,24 @@ void UIItemShopWnd::Paint() { } } - if (this->unknown_010C != 0) { + if (this->showFooter != 0) { int message; - if (g_serviceType == 0 && *reinterpret_cast(&g_session.unknown_59DC[0x198]) == 1) { + if (g_serviceType == 0 && *reinterpret_cast(&g_session.mouseAndChannelOptions[0x198]) == 1) { message = 1290; } else { message = 1210; } char text[352]; - const int aid = *reinterpret_cast(&g_session.unknown_5913[0x1D]); + const int aid = *reinterpret_cast(&g_session.characterRenameData[0x1D]); const char* name = this->ClipTextToWidth(g_session.DecodePlayerName(), 100, 0, 12, 0); int length = sprintf(text, LookupMessage(message), name, aid); this->DrawTextAt(12, this->geometry.height - 21, text, length, 0, 12, 0, 0, 0); - const int gid = *reinterpret_cast(&g_session.unknown_5913[0x21]); + const int gid = *reinterpret_cast(&g_session.characterRenameData[0x21]); name = this->ClipTextToWidth(g_session.DecodePlayerName(), 100, 0, 12, 0); length = sprintf(text, LookupMessage(MSI_POINT_SHOP2), name, gid); - this->DrawTextAt(12, this->geometry.height - this->unknown_0104 - 21, text, length, 0, 12, 0, 0, 0); + this->DrawTextAt(12, this->geometry.height - this->bottomPadding - 21, text, length, 0, 12, 0, 0, 0); } } @@ -9403,11 +9403,11 @@ void UIItemStoreWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 3 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 3 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; const int slotRows = (this->geometry.height - 74) / 32; - if (!this->unknown_0190) { + if (!this->m_hideCapacity) { this->scrollBar->Show(0); unsigned fillRed, fillGreen, fillBlue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, fillRed, fillGreen, fillBlue); @@ -9441,7 +9441,7 @@ void UIItemStoreWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9451,11 +9451,11 @@ void UIItemStoreWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawWrappedItemName(column + 80, top + 29, 180, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9468,10 +9468,10 @@ void UIItemStoreWnd::Paint() { const auto* icon = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\inventory\\icon_num.bmp"))); this->DrawBitmap(6, this->geometry.height - 21, &icon->image, true); - const std::uint32_t color = this->unknown_0188 >= this->unknown_018C ? 0xFF : 0x232323; - this->DrawTextAt(22, this->geometry.height - 19, FormatOwnedString("%d", this->unknown_0188).c_str(), 0, 0, 11, color, 0, 0); - const int width = this->TextWidth(FormatOwnedString("%d", this->unknown_0188).c_str(), 0, 0, 11, 0, 0); - this->DrawTextAt(width + 23, this->geometry.height - 19, FormatOwnedString("/%d", this->unknown_018C).c_str(), 0, 0, 11, 0, 0, 0); + const std::uint32_t color = this->m_itemCount >= this->m_capacity ? 0xFF : 0x232323; + this->DrawTextAt(22, this->geometry.height - 19, FormatOwnedString("%d", this->m_itemCount).c_str(), 0, 0, 11, color, 0, 0); + const int width = this->TextWidth(FormatOwnedString("%d", this->m_itemCount).c_str(), 0, 0, 11, 0, 0); + this->DrawTextAt(width + 23, this->geometry.height - 19, FormatOwnedString("/%d", this->m_capacity).c_str(), 0, 0, 11, 0, 0, 0); } // OFFSET: 0x009819C0 @@ -9499,7 +9499,7 @@ void UIMerchantItemPurchaseWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; const int slotRows = (this->geometry.height - 38) / 32; @@ -9516,7 +9516,7 @@ void UIMerchantItemPurchaseWnd::Paint() { int index = 0; for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9532,11 +9532,11 @@ void UIMerchantItemPurchaseWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawWrappedItemName(column + 76, top + 29, 90, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9545,10 +9545,10 @@ void UIMerchantItemPurchaseWnd::Paint() { char price[64]; char text[64]; int length; - if (it->unknown_0014[0] == it->unknown_0014[1]) { - length = sprintf(text, " %s Zeny", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 64)); + if (it->prices[0] == it->prices[1]) { + length = sprintf(text, " %s Zeny", FormatGroupedInteger(static_cast(it->prices[0]), price, 64)); } else { - length = sprintf(text, " %d -> %s Zeny", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 64)); + length = sprintf(text, " %d -> %s Zeny", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 64)); } this->DrawRightAlignedText(this->geometry.width - 18, top + 29, text, length, 0, 12, 0, 0); ++visible; @@ -9572,7 +9572,7 @@ void UIMerchantShopMakeWnd::Paint() { barHeight = this->DrawButtonBar(2, 0, 2); } - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { if (this->mode == 0) { this->priceEdits[i]->Show(i < this->visibleRows); } else if (i < this->visibleRows) { @@ -9584,7 +9584,7 @@ void UIMerchantShopMakeWnd::Paint() { } } - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { unsigned char hidden = 1; if (this->scroll <= i && i < this->visibleRows + this->scroll) { hidden = 0; @@ -9600,15 +9600,15 @@ void UIMerchantShopMakeWnd::Paint() { int messageY; if (this->mode != 0) { int count = this->items.size(); - if (static_cast(count) < static_cast(this->unknown_0140)) { - count = this->unknown_0140; + if (static_cast(count) < static_cast(this->minimumRows)) { + count = this->minimumRows; } for (int i = 0, y = 72; i < count; ++i, y += 42) { this->DrawTextAt(this->geometry.width - 155, y - 15, LookupMessage(MSI_BUYINGSTORE_MAKEWND_PRICE), 0, 0, 12, 0, 0, 0); this->DrawTextAt(this->geometry.width - 176, y - 15, LookupMessage(MSI_EA4), 0, 0, 12, 0, 0, 0); DrawItemSlotBackground(*this, 3, y - 18); - if (i >= this->unknown_012C) { + if (i >= this->slotCount) { continue; } @@ -9642,9 +9642,9 @@ void UIMerchantShopMakeWnd::Paint() { this->DrawTextAt(2, 25, LookupMessage(MSI_STALL_NAME), 0, 0, 12, 0, 0, 0); const int labelWidth = this->TextWidth(LookupMessage(MSI_BUYINGSTORE_MAKEWND_LIMITZENY), 0, 0, 12, 0, 0) + 10; - this->unknown_0128->Move(labelWidth, this->geometry.height - barHeight + 5); + this->zenyLimitEdit->Move(labelWidth, this->geometry.height - barHeight + 5); this->DrawTextAt(5, this->geometry.height - barHeight + 5, LookupMessage(MSI_BUYINGSTORE_MAKEWND_LIMITZENY), 0, 0, 12, 0, 0, 0); - this->DrawTextAt(this->unknown_0128->geometry.width + this->unknown_0128->geometry.x + 5, this->geometry.height - barHeight + 5, + this->DrawTextAt(this->zenyLimitEdit->geometry.width + this->zenyLimitEdit->geometry.x + 5, this->geometry.height - barHeight + 5, "Zeny", 0, 0, 12, 0, 0, 0 ); @@ -9656,7 +9656,7 @@ void UIMerchantShopMakeWnd::Paint() { this->DrawRightAlignedText(155, this->geometry.height - barHeight * 2 + 5, text, 0, 0, 12, 0, 0); std::uint32_t color; - if (this->unknown_0188 == 1) { + if (this->itemsSet == 1) { sprintf(text, "Max Weight : %3d", g_session.m_maxWeight); color = 0; } else { @@ -9671,7 +9671,7 @@ void UIMerchantShopMakeWnd::Paint() { for (int i = 0, y = 72; i < this->visibleRows; ++i, y += 42) { this->DrawTextAt(this->geometry.width - 165, y - 15, LookupMessage(MSI_SELLPRICE), 0, 0, 12, 0, 0, 0); DrawItemSlotBackground(*this, 3, y - 18); - if (i >= this->unknown_012C) { + if (i >= this->slotCount) { continue; } @@ -9717,7 +9717,7 @@ void UIMerchantShopMakeWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -9727,11 +9727,11 @@ void UIMerchantShopMakeWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 48, *it, 0, 0); this->DrawWrappedItemName(column + 39, top + 57, 100, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 60, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -9760,30 +9760,30 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp const char* over; const char* press; if (g_session.m_blockPrivateTab == 1) { - if (this->unknown_0128) { - this->SendMsg(this->unknown_0128, UM_COMMAND, ID_CLOSE, 0, 0, 0); + if (this->filterWindow) { + this->SendMsg(this->filterWindow, UM_COMMAND, ID_CLOSE, 0, 0, 0); } g_session.m_blockPrivateTab = 0; press = "유저인터페이스\\inventory\\bt_itemDeal_lock_press.bmp"; over = "유저인터페이스\\inventory\\bt_itemDeal_lock_over.bmp"; normal = "유저인터페이스\\inventory\\bt_itemDeal_lock_off.bmp"; } else { - if (!this->unknown_0128) { - this->unknown_0128 = new UINoticeMessageBox_LockSellItem(); - this->unknown_0128->SetSize(242, 26); - this->unknown_0128->Move(30, this->geometry.height - 50); - this->AddChild(this->unknown_0128); + if (!this->filterWindow) { + this->filterWindow = new UINoticeMessageBox_LockSellItem(); + this->filterWindow->SetSize(242, 26); + this->filterWindow->Move(30, this->geometry.height - 50); + this->AddChild(this->filterWindow); } g_session.m_blockPrivateTab = 1; press = "유저인터페이스\\inventory\\bt_itemDeal_lock_on_press.bmp"; over = "유저인터페이스\\inventory\\bt_itemDeal_lock_on_over.bmp"; normal = "유저인터페이스\\inventory\\bt_itemDeal_lock_on.bmp"; } - UIBitmapButton* button = static_cast(this->unknown_0124); + UIBitmapButton* button = static_cast(this->dealLockButton); button->SetBitmap(normal, 0, 0); button->SetBitmap(over, 1, 0); button->SetBitmap(press, 2, 0); - this->unknown_0124->Invalidate(); + this->dealLockButton->Invalidate(); this->Invalidate(); return 0; } @@ -9793,7 +9793,7 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp } return 0; case ID_SORT_ITEMS: - if (this->unknown_010C != 3) { + if (this->categoryFilter != 3) { return 0; } g_sortPrivateTab = !g_sortPrivateTab; @@ -9801,9 +9801,9 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp this->RefreshItems(); return 0; case ID_CLOSE: - if (this->unknown_0128 == sender) { - this->RemoveChild(this->unknown_0128, 0); - this->unknown_0128 = nullptr; + if (this->filterWindow == sender) { + this->RemoveChild(this->filterWindow, 0); + this->filterWindow = nullptr; this->Invalidate(); } else { g_windowMgr.CloseWindow(WID_ITEMWND); @@ -9812,9 +9812,9 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp case ID_MINI: { const int height = this->geometry.height; if (height == 17) { - this->Resize(this->geometry.width, this->unknown_0110); + this->Resize(this->geometry.width, this->expandedHeight); } else { - this->unknown_0110 = height; + this->expandedHeight = height; this->Resize(this->geometry.width, 17); } g_windowMgr.StoreSnapRectangle(this); @@ -9864,48 +9864,48 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp buttons[index]->Move(positions[index], 3); } } - this->unknown_0110 = this->geometry.height; + this->expandedHeight = this->geometry.height; g_windowMgr.StoreSnapRectangle(this); this->lockDropBox->Move(79, this->geometry.height - 16); this->optionBox->Move(103, this->geometry.height - 17); this->countButton->Move(23, this->geometry.height - 17); - this->unknown_0124->Move(124, this->geometry.height - 19); - if (this->unknown_0128) { - this->unknown_0128->Move(30, this->geometry.height - 50); + this->dealLockButton->Move(124, this->geometry.height - 19); + if (this->filterWindow) { + this->filterWindow->Move(30, this->geometry.height - 50); } - this->unknown_012C->Move(157, this->geometry.height - 19); + this->filterButton->Move(157, this->geometry.height - 19); return 0; } case UM_TAB: - this->unknown_010C = static_cast(a); + this->categoryFilter = static_cast(a); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); return 0; case UM_REFRESHITEM: - if (this->unknown_010C == 3) { + if (this->categoryFilter == 3) { this->RefreshItems(); return 0; } this->items.erase(this->items.begin(), this->items.end()); for (int i = 0; i < g_session.GetList0Size(); ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } - const unsigned type = item.unknown_0000[0]; + const unsigned type = item.identity[0]; bool include = false; - if (item.unknown_0074[0] != 0) { - include = this->unknown_010C == 3; - } else if (this->unknown_010C == 0) { + if (item.flags[0] != 0) { + include = this->categoryFilter == 3; + } else if (this->categoryFilter == 0) { if (type <= 2 || type == 18) { - if (this->unknown_0100 == 0) { + if (this->usableFilter == 0) { include = type == 0; - } else if (this->unknown_0100 == 2) { + } else if (this->usableFilter == 2) { include = type == 1 || type == 2; - } else if (this->unknown_0100 == 3) { + } else if (this->usableFilter == 3) { include = true; } } - } else if (this->unknown_010C == 1) { + } else if (this->categoryFilter == 1) { switch (type) { case TYPE_ARMOR: case TYPE_WEAPON: @@ -9916,20 +9916,20 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp case TYPE_ARMORMB: case TYPE_ARMORTMB: case TYPE_GUN: - if (this->unknown_0104 == 0) { + if (this->equipmentFilter == 0) { include = type == 5 || type == 9 || type == 8; - } else if (this->unknown_0104 == 1) { + } else if (this->equipmentFilter == 1) { include = type == 4 || type == 11 || type == 12 || type == 13 || type == 14; - } else if (this->unknown_0104 == 3) { + } else if (this->equipmentFilter == 3) { include = true; } break; default: break; } - } else if (this->unknown_010C == 2) { + } else if (this->categoryFilter == 2) { if (type == 6 || type == 3 || type == 7 || type == 10 || type == 16 || type == 17 || type == 19) { - include = this->unknown_0108 == 4; + include = this->miscFilter == 4; } } if (include) { @@ -9944,15 +9944,15 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp if (this->saved->IsValid() == 0) { this->saved->Reset(); } - this->SendMsg(nullptr, UM_RESIZE, 7, this->saved->width, this->saved->unknown_0010, 0); - this->unknown_010C = this->saved->unknown_0014; - this->unknown_0100 = 3; - this->unknown_0104 = 3; - this->unknown_0108 = 4; - this->tabs->unknown_007C = this->saved->unknown_0014; + this->SendMsg(nullptr, UM_RESIZE, 7, this->saved->width, this->saved->expandedHeight, 0); + this->categoryFilter = this->saved->selectedTab; + this->usableFilter = 3; + this->equipmentFilter = 3; + this->miscFilter = 4; + this->tabs->activeTabIndex = this->saved->selectedTab; this->Invalidate(); this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); - if (this->saved->height != this->saved->unknown_0010) { + if (this->saved->height != this->saved->expandedHeight) { this->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } this->Move(this->saved->x, this->saved->y); @@ -9971,8 +9971,8 @@ int UIItemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intp mode->SendMsg(MM_MOVE_ITEM_FROM_CART_TO_BODY, static_cast(drag.id), drag.quantity, 0, 0); break; case 15: - if (g_windowMgr.unknown_0458) { - g_windowMgr.unknown_0458->SendMsg(nullptr, UM_DECITEM, static_cast(drag.id), drag.quantity, 0, 0); + if (g_windowMgr.rodexComposeWnd) { + g_windowMgr.rodexComposeWnd->SendMsg(nullptr, UM_DECITEM, static_cast(drag.id), drag.quantity, 0, 0); } break; case 17: @@ -10003,7 +10003,7 @@ void UIItemWnd::RefreshSortButton() { name += "_off"; } - UIBitmapButton* button = static_cast(this->unknown_012C); + UIBitmapButton* button = static_cast(this->filterButton); button->SetBitmap(std::format("{}.bmp", name).c_str(), 0, 0); button->SetBitmap(std::format("{}_over.bmp", name).c_str(), 1, 0); button->SetBitmap(std::format("{}_press.bmp", name).c_str(), 2, 0); @@ -10020,7 +10020,7 @@ int UIMerchantItemPurchaseMSGWnd::SendMsg(UIWindow* sender, int message, std::in switch (a) { case ID_OK: - g_modeMgr.gameMode->SendMsg(MM_PC_PURCHASE_ITEMLIST_FROMMC, this->purchaseIndex, this->unknown_00D0, 0, 0); + g_modeMgr.gameMode->SendMsg(MM_PC_PURCHASE_ITEMLIST_FROMMC, this->purchaseIndex, this->purchaseAmount, 0, 0); case ID_CANCEL: g_windowMgr.CloseWindow(WID_MERCHANTITEMPURCHASEMSGWND); g_session.ClearItems1760And1748(); @@ -10035,7 +10035,7 @@ void UIItemWnd::RefreshItems() { this->items.clear(); for (int i = 0; i < g_session.GetList0Size(); ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); - if (item.unknown_0074[0] == 1) { + if (item.flags[0] == 1) { this->items.push_back(item); } } @@ -10056,7 +10056,7 @@ bool UIItemStoreSubWnd::FilterByName1(std::string query) { for (auto it = this->items.begin(); it != this->items.end();) { ITEM_INFO item = *it; - const std::string name = item.unknown_0044; + const std::string name = item.displayName; auto next = std::next(it); if (!_mbsstr(reinterpret_cast(name.c_str()), reinterpret_cast(query.c_str()))) { this->items.erase(it); @@ -10075,7 +10075,7 @@ bool UIItemStoreSubWnd::FilterByName2(std::string query) { for (auto it = this->items.begin(); it != this->items.end();) { ITEM_INFO item = *it; - const std::string name = item.unknown_0044; + const std::string name = item.displayName; if (name.find(query) == std::string::npos) { it = this->items.erase(it); } else { @@ -10094,7 +10094,7 @@ bool UIItemStoreSubWnd::FilterByName3(std::string query) { for (auto it = this->items.begin(); it != this->items.end();) { ITEM_INFO item = *it; - const std::string name = item.unknown_0044; + const std::string name = item.displayName; if (name.find(query) == std::string::npos) { it = this->items.erase(it); } else { @@ -10171,15 +10171,15 @@ bool UIItemStoreSubWnd::UpdateItemNames3() { // FUNCTION: fn_13477 void UIMerchantItemPurchaseMSGWnd::SetPurchase(int value, int amount) { this->purchaseIndex = value; - this->unknown_00D0 = amount; + this->purchaseAmount = amount; int total = 0; const int count = g_session.GetList10Size(); for (int i = 0; i < count; ++i) { ITEM_INFO item; item = g_session.GetItem1760At(i); - if (item.unknown_0000[1] > 0) { - total += item.quantity * item.unknown_0014[0]; + if (item.identity[1] > 0) { + total += item.quantity * item.prices[0]; } } @@ -10275,7 +10275,7 @@ bool UIEditCtrl3::LinkDisplayName(const std::string& encoded, std::string& outpu const bool isTag = encoded.substr(0, 6) == "00000T"; if (isTag) { const int id = ItemLinkMessageId(encoded); - if (g_itemTagOwner->unknown_0118 >= id) { + if (g_itemTagOwner->maxTipId >= id) { g_itemTagOwner->Title(id, &output, 17); return true; } @@ -10305,15 +10305,15 @@ void UIMerchantItemShopWnd::Paint() { return; } - unsigned rows = static_cast(this->geometry.height - this->unknown_0118 - 17) / 8 + - (static_cast(this->geometry.height - this->unknown_0118 - 17) % 8 != 0); + unsigned rows = static_cast(this->geometry.height - this->footerHeight - 17) / 8 + + (static_cast(this->geometry.height - this->footerHeight - 17) % 8 != 0); for (int y = 17; rows != 0; --rows, y += 8) { const auto* left = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp"))); this->DrawBitmap(0, y, &left->image, false); } - rows = static_cast(this->geometry.height - this->unknown_0118 - 17) / 8 + - (static_cast(this->geometry.height - this->unknown_0118 - 17) % 8 != 0); + rows = static_cast(this->geometry.height - this->footerHeight - 17) / 8 + + (static_cast(this->geometry.height - this->footerHeight - 17) % 8 != 0); for (int y = 17; rows != 0; --rows, y += 8) { const auto* right = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp"))); this->DrawBitmap(this->geometry.width - right->image.width, y, &right->image, false); @@ -10321,15 +10321,15 @@ void UIMerchantItemShopWnd::Paint() { unsigned red, green, blue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->unknown_0118 - 17, RGB(red, green, blue)); + this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->footerHeight - 17, RGB(red, green, blue)); this->FillRegion( - 20, static_cast(this->geometry.height - this->unknown_0118 - 17) / 32 * 32 + 17, this->geometry.width - 24, - static_cast(this->geometry.height - this->unknown_0118 - 17) % 32, RGB(red, green, blue) + 20, static_cast(this->geometry.height - this->footerHeight - 17) / 32 * 32 + 17, this->geometry.width - 24, + static_cast(this->geometry.height - this->footerHeight - 17) % 32, RGB(red, green, blue) ); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; - const unsigned slotRows = static_cast(this->geometry.height - this->unknown_0118 - 17) / 32; + const unsigned slotRows = static_cast(this->geometry.height - this->footerHeight - 17) / 32; unsigned slots = slotRows; for (int y = 17; slots != 0; --slots, y += 32) { DrawItemSlotBackground(*this, 40, y); @@ -10340,8 +10340,8 @@ void UIMerchantItemShopWnd::Paint() { this->FillRegion(72, 17, columns * 32 - 32, slotRows * 32, RGB(fillRed, fillGreen, fillBlue)); { - std::string actor = static_cast(g_modeMgr.GetGameMode())->ActorName(this->unknown_0100); - const char* label = LookupMessage(this->unknown_010C == 0 ? 227 : 1737); + std::string actor = static_cast(g_modeMgr.GetGameMode())->ActorName(this->ownerAid); + const char* label = LookupMessage(this->buyingShop == 0 ? 227 : 1737); char title[128]; if (!actor.empty()) { sprintf(title, "%s - %s", label, actor.c_str()); @@ -10357,7 +10357,7 @@ void UIMerchantItemShopWnd::Paint() { int index = 0; for (auto it = this->items.begin(); it != this->items.end(); ++it, ++index) { - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -10372,7 +10372,7 @@ void UIMerchantItemShopWnd::Paint() { char price[128]; int x; - if (this->unknown_010C != 0) { + if (this->buyingShop != 0) { sprintf(price, LookupMessage(MSI_EA), it->quantity); const int quantityX = this->geometry.width - this->TextWidth(" 100,000,000Z", 0, 0, 12, 0, 0) - this->TextWidth(price, 0, 0, 12, 0, 0) - 18; @@ -10384,11 +10384,11 @@ void UIMerchantItemShopWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); } - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -10398,13 +10398,13 @@ void UIMerchantItemShopWnd::Paint() { this->DrawTextAt(this->geometry.width - width - 18, top + 29, "Z", 0, 0, 12, 0, 0, 0); char text[128]; - if (it->unknown_0014[0] != it->unknown_0014[1]) { - sprintf(text, " %d -> %s ", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 128)); + if (it->prices[0] != it->prices[1]) { + sprintf(text, " %d -> %s ", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 128)); } else { - sprintf(text, " %s ", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 128)); + sprintf(text, " %s ", FormatGroupedInteger(static_cast(it->prices[0]), price, 128)); } width += this->TextWidth(text, 0, 0, 12, 0, 0); - this->DrawAmount(static_cast(it->unknown_0014[0]), text, this->geometry.width - width - 18, top + 29); + this->DrawAmount(static_cast(it->prices[0]), text, this->geometry.width - width - 18, top + 29); int nameWidth = this->geometry.width - width - left - 66; if (nameWidth > 130) { @@ -10414,7 +10414,7 @@ void UIMerchantItemShopWnd::Paint() { ++visible; } - if (this->unknown_0118 == 57) { + if (this->footerHeight == 57) { this->DrawButtonBar(3, 0, 1); } @@ -10435,7 +10435,7 @@ void UIMerchantItemShopWnd::Paint() { ); } - if (this->unknown_010C == 1) { + if (this->buyingShop == 1) { this->notice->Move(170, this->geometry.height - 20); } } @@ -10509,7 +10509,7 @@ void UIMerchantShopMakeWnd::PrintSellList() { char* cursor = name; int capacity = 256; - if (item.unknown_0060 != 0) { + if (item.refiningLevel != 0) { cursor += item.Refine(cursor, capacity, 1); } @@ -10565,22 +10565,22 @@ void UIItemWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (item.unknown_0074[2] == 0) { - item = LookupClientItemByIdentity(g_session.m_inventoryItems, item.unknown_0000[1]); + if (item.flags[2] == 0) { + item = LookupClientItemByIdentity(g_session.m_inventoryItems, item.identity[1]); mode->drag.BeginItem(g_windowMgr, 1, item, item.quantity, -1); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { if (g_windowMgr.GetHoverWindow() && item.identified != 0) { if (g_windowMgr.GetHoverWindow()->geometry.id == 492) { - reinterpret_cast(g_windowMgr.unknown_0318)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 490) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.rodexComposeWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -10603,21 +10603,21 @@ void UIMerchantItemWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0 && !g_windowMgr.unknown_02FC && item.unknown_0074[2] == 0) { + if (item.identity[1] > 0 && !g_windowMgr.merchantShopMakeWnd && item.flags[2] == 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - item = g_session.FindItem1740(item.unknown_0000[1]); + item = g_session.FindItem1740(item.identity[1]); mode->drag.BeginItem(g_windowMgr, 9, item, item.quantity, -1); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { if (g_windowMgr.GetHoverWindow() && item.identified != 0) { if (g_windowMgr.GetHoverWindow()->geometry.id == 492) { - reinterpret_cast(g_windowMgr.unknown_0318)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 490) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.rodexComposeWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -10676,7 +10676,7 @@ void UIItemSellWnd2::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - 38, RGB(red, green, blue)); this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; const int slotRows = (this->geometry.height - 38) / 32; @@ -10697,7 +10697,7 @@ void UIItemSellWnd2::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -10713,11 +10713,11 @@ void UIItemSellWnd2::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawFittedItemName(column + 76, top + 29, &*it, 0, 0, 12, 0); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -10738,13 +10738,13 @@ void UIItemShopWnd2::Paint() { return; } - int rows = (this->geometry.height - this->unknown_0104 - 17) / 8 + ((this->geometry.height - this->unknown_0104 - 17) % 8 != 0); + int rows = (this->geometry.height - this->bottomBarHeight - 17) / 8 + ((this->geometry.height - this->bottomBarHeight - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { const auto* left = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp"))); this->DrawBitmap(0, y, &left->image, false); } - rows = (this->geometry.height - this->unknown_0104 - 17) / 8 + ((this->geometry.height - this->unknown_0104 - 17) % 8 != 0); + rows = (this->geometry.height - this->bottomBarHeight - 17) / 8 + ((this->geometry.height - this->bottomBarHeight - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { const auto* right = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp"))); this->DrawBitmap(this->geometry.width - right->image.width, y, &right->image, false); @@ -10752,12 +10752,12 @@ void UIItemShopWnd2::Paint() { unsigned red, green, blue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->unknown_0104 - 17, RGB(red, green, blue)); - this->FillRegion(20, (this->geometry.height - this->unknown_0104 - 17) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - this->unknown_0104 - 17) % 32, RGB(red, green, blue)); - this->DrawButtonBar(this->unknown_00B8 != 0 ? 2 : 0, 0, 1); + this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->bottomBarHeight - 17, RGB(red, green, blue)); + this->FillRegion(20, (this->geometry.height - this->bottomBarHeight - 17) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - this->bottomBarHeight - 17) % 32, RGB(red, green, blue)); + this->DrawButtonBar(this->alternateButtonBar != 0 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; - const int slotRows = (this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17) / 32; + const int slotRows = (this->geometry.height - this->extraBottomHeight - this->bottomBarHeight - 17) / 32; int slots = slotRows; for (int y = 17; slots > 0; --slots, y += 32) { DrawItemSlotBackground(*this, 40, y); @@ -10775,7 +10775,7 @@ void UIItemShopWnd2::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -10791,11 +10791,11 @@ void UIItemShopWnd2::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawFittedItemName(column + 76, top + 29, &*it, 0, 0, 12, 0); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); @@ -10829,8 +10829,8 @@ int UIItemSellWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: CSession* lists = &g_session; lists->AddItem1730(item); lists->ReduceItem1718(item); - if (g_windowMgr.unknown_0250) { - g_windowMgr.unknown_0250->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemShopWnd) { + g_windowMgr.itemShopWnd->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); @@ -10898,8 +10898,8 @@ int UIItemSellWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: const int size = g_session.GetList4Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1730At(i); - if (item.unknown_0000[1] != 0) { - totalPrice += item.quantity * item.unknown_0014[1]; + if (item.identity[1] != 0) { + totalPrice += item.quantity * item.prices[1]; this->items.push_back(item); } } @@ -10968,7 +10968,7 @@ void UIItemWnd::Paint() { } unsigned red, green, blue; - if (this->unknown_010C == 3 && g_session.m_blockPrivateTab == 1) { + if (this->categoryFilter == 3 && g_session.m_blockPrivateTab == 1) { SkinPaletteChannels(ResourceMgr::Instance(), 0, 8, red, green, blue); this->FillRegion(20, 17, this->geometry.width - 21, this->geometry.height - 38, RGB(red, green, blue)); } else { @@ -10977,14 +10977,14 @@ void UIItemWnd::Paint() { this->FillRegion(20, (this->geometry.height - 38) / 32 * 32 + 17, this->geometry.width - 24, (this->geometry.height - 38) % 32, RGB(red, green, blue)); } - if (this->unknown_0128) { - this->unknown_0128->Show(this->unknown_010C == 3 && g_session.m_blockPrivateTab == 1 ? 1 : 0); + if (this->filterWindow) { + this->filterWindow->Show(this->categoryFilter == 3 && g_session.m_blockPrivateTab == 1 ? 1 : 0); } - if (this->unknown_0124) { - this->unknown_0124->Enable(this->unknown_010C == 3); + if (this->dealLockButton) { + this->dealLockButton->Enable(this->categoryFilter == 3); } - if (this->unknown_012C) { - this->unknown_012C->Enable(this->unknown_010C == 3); + if (this->filterButton) { + this->filterButton->Enable(this->categoryFilter == 3); } this->DrawButtonBar(0, 0, 1); @@ -10996,7 +10996,7 @@ void UIItemWnd::Paint() { for (int y = 17; slotRows > 0; --slotRows, y += 32) { int count = slotColumns; for (int x = 40; count > 0; --count, x += 32) { - if (this->unknown_010C == 3 && g_session.m_blockPrivateTab == 1) { + if (this->categoryFilter == 3 && g_session.m_blockPrivateTab == 1) { const auto* lock = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\inventory\\itemwin_mid_lock.bmp"))); this->DrawBitmap(x, y, &lock->image, false); } else { @@ -11012,14 +11012,14 @@ void UIItemWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } const int y = visible / this->columns * 32 + 17; const int x = visible % this->columns * 32 + 40; - if (it->unknown_0074[1]) { - if (this->unknown_010C == 3 && g_session.m_blockPrivateTab == 1) { + if (it->flags[1]) { + if (this->categoryFilter == 3 && g_session.m_blockPrivateTab == 1) { const auto* mark = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\inventory\\itemwin_new_lock.bmp"))); this->DrawBitmap(x, y, &mark->image, false); } else { @@ -11039,7 +11039,7 @@ void UIItemWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -11048,17 +11048,17 @@ void UIItemWnd::Paint() { const int y = top + 21; DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, y, *it, 0, 0); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); } - if (g_session.HasItem61B8(it->unknown_0000[1])) { + if (g_session.HasItem61B8(it->identity[1])) { CTexture* background = g_texMgr.Load("유저인터페이스\\swap_equipment\\bg_change.bmp", 0, false, true, false); if (background) { this->geometry.surface->DrawScaledSurface( @@ -11080,10 +11080,10 @@ void UIItemWnd::Paint() { } const int count = g_session.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50(); - const std::uint32_t color = count >= g_session.unknown_7FBC + 100 ? 0xFF : 0x232323; + const std::uint32_t color = count >= g_session.extraInventorySlots + 100 ? 0xFF : 0x232323; this->DrawTextAt(35, this->geometry.height - 15, FormatOwnedString("%d", count).c_str(), 0, 0, 11, color, 0, 0); const int width = this->TextWidth(FormatOwnedString("%d", count).c_str(), 0, 0, 11, 0, 0); - this->DrawTextAt(width + 36, this->geometry.height - 15, FormatOwnedString("/%d", g_session.unknown_7FBC + 100).c_str(), 0, 0, 11, 0, 0, 0 + this->DrawTextAt(width + 36, this->geometry.height - 15, FormatOwnedString("/%d", g_session.extraInventorySlots + 100).c_str(), 0, 0, 11, 0, 0, 0 ); } @@ -11109,13 +11109,13 @@ void UIItemDropCntWnd::OnCreate(int, int) { if (dragName) { ITEM_INFO item; item.itemId = dragName; - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = gameMode->drag.identified; name = item.DisplayName(0); } auto* title = new UIStaticText(); - this->unknown_00B8 = reinterpret_cast(title); + this->itemTitle = reinterpret_cast(title); title->SetSize(100, 15); title->Move(15, 6); title->SetText(name.c_str(), 0); @@ -11133,7 +11133,7 @@ void UIItemDropCntWnd::OnCreate(int, int) { button->SetId(184); this->AddChild(button); this->m_message0 = 184; - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } // OFFSET: 0x00975050 @@ -11213,7 +11213,7 @@ int UIItemStoreFindWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, const int size = g_session.GetList5Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1738At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -11235,7 +11235,7 @@ int UIItemStoreFindWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, case UM_COMMAND: if (a == ID_CLOSE) { g_windowMgr.CloseWindow(WID_ITEMSTOREFINDWND); - static_cast(g_windowMgr.LookupWindow(WID_ITEMSTOREWND))->unknown_0140 = 0; + static_cast(g_windowMgr.LookupWindow(WID_ITEMSTOREWND))->m_searchWindow = 0; return 0; } case UM_RESIZE: @@ -11283,7 +11283,7 @@ int UIItemStoreFindWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, case UM_SETCOUNTINFO: { char text[64]; std::sprintf(text, "%d/%d", a, b); - this->unknown_0124.assign(text, std::strlen(text)); + this->statusText.assign(text, std::strlen(text)); this->Invalidate(); return 0; } @@ -11334,12 +11334,12 @@ void UIItemDropCntWnd::Show(int visible) { if (dragName) { ITEM_INFO item; item.itemId = dragName; - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = gameMode->drag.identified; name = item.DisplayName(0); } - reinterpret_cast(this->unknown_00B8)->SetTextFittedCodePage(name.c_str()); + reinterpret_cast(this->itemTitle)->SetTextFittedCodePage(name.c_str()); this->Invalidate(); g_windowMgr.StoreSnapRectangle(this); } else { @@ -11367,7 +11367,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); if (mode->drag.source == 20) { - if (g_session.GetList11Size() < this->unknown_012C) { + if (g_session.GetList11Size() < this->slotCount) { if (!g_session.AddItem1768(item, 1, 1)) { g_windowMgr.Confirm(LookupMessage(MSI_BUYINGSTORE_MAKEWND_DUPLICATEITEM), 0, true, false, 0, "Message", 280, 120, 0); } else { @@ -11397,7 +11397,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 0xFF, 0, 0, 0); } if (item.quantity != 0) { - const bool full = this->unknown_012C <= g_session.GetList11Size(); + const bool full = this->slotCount <= g_session.GetList11Size(); int quantity = g_session.GetItem1750Quantity(mode->drag.id); if (full && quantity != 0) { quantity = g_session.GetItem1768Quantity(mode->drag.id); @@ -11410,10 +11410,10 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t bool fresh = true; std::string price; ITEM_INFO owned = g_session.FindItem1768(mode->drag.id); - if (owned.unknown_0000[1] != 0) { + if (owned.identity[1] != 0) { index = 0; for (const ITEM_INFO& old : this->items) { - if (old.unknown_0000[1] == owned.unknown_0000[1]) { + if (old.identity[1] == owned.identity[1]) { fresh = false; price = this->priceEdits[index]->Text(); break; @@ -11449,7 +11449,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const int count = g_session.GetList11Size(); for (int i = 0; i < count; ++i) { ITEM_INFO item = g_session.GetItem1768At(i); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { this->items.push_back(item); } } @@ -11462,7 +11462,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const PriceColors colors = PriceColor(0); this->priceEdits[index]->TextColor(colors.primary, colors.secondary); this->priceEdits[index]->SetText("0"); - g_windowMgr.SetFocus(index == 0 ? this->unknown_00CC : this->priceEdits[index - 1]); + g_windowMgr.SetFocus(index == 0 ? this->titleEdit : this->priceEdits[index - 1]); } else { g_windowMgr.SetFocus(this->priceEdits[index]); } @@ -11471,7 +11471,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t edit->disabled = 1; edit->Invalidate(); char text[24] = {}; - for (; index < this->unknown_012C - 1; ++index) { + for (; index < this->slotCount - 1; ++index) { this->priceEdits[index]->SetText(this->priceEdits[index + 1]->Text()); this->priceEdits[index + 1]->SetText("0"); std::sprintf(text, "%s ", this->priceEdits[index]->Text()); @@ -11494,28 +11494,28 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case UM_SCROLLVERTPAGEDOWN: { const int previous = this->scroll; if (message == UM_SCROLLVERTPAGEUP) { - this->scroll = previous - this->unknown_0140 + 1; + this->scroll = previous - this->minimumRows + 1; } else if (message == UM_SCROLLVERTPAGEDOWN) { - this->scroll = previous + this->unknown_0140 - 1; + this->scroll = previous + this->minimumRows - 1; } else { this->scroll = previous + static_cast(a); } if (previous != this->scroll) { if (this->scrollBar) { const int count = static_cast(this->items.size()); - const int maximum = std::max(count - this->unknown_0158, 0); - this->unknown_0144 = maximum != 0; + const int maximum = std::max(count - this->maxVisibleRows, 0); + this->scrollable = maximum != 0; UIScrollBar* bar = static_cast(this->scrollBar); if (maximum == 0) { this->scroll = 0; - bar->SetRange(0, this->unknown_0158, count); + bar->SetRange(0, this->maxVisibleRows, count); } else { - bar->SetRange(maximum, this->unknown_0158, count); + bar->SetRange(maximum, this->maxVisibleRows, count); if (this->scroll < 0) { this->scroll = 0; } - if (this->scroll > count - this->unknown_0158) { - this->scroll = count - this->unknown_0158; + if (this->scroll > count - this->maxVisibleRows) { + this->scroll = count - this->maxVisibleRows; } bar->SetPosition(this->scroll); } @@ -11554,21 +11554,21 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.EnsureWindow(WID_NOTEWND); } } else if (a == ID_RESTORE_STORE_INFO) { - this->unknown_0168->SetDisabled(1); - this->unknown_0168->Invalidate(); + this->actionButton->SetDisabled(1); + this->actionButton->Invalidate(); g_session.m_storeInfoBackup.Load(g_session.m_aid, g_session.m_gid, std::string(g_session.m_accountName.c_str()), this->mode); } else if (a == ID_CANCEL) { CMode* mode = g_modeMgr.GetGameMode(); if (this->mode == 0) { - if (this->unknown_0188 != 1) { - mode->SendMsg(MM_REQ_OPENSTORE, reinterpret_cast(this->unknown_00CC->Text()), 0, 0, 0); + if (this->itemsSet != 1) { + mode->SendMsg(MM_REQ_OPENSTORE, reinterpret_cast(this->titleEdit->Text()), 0, 0, 0); g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); } else if (this->suspended == 1) { this->SetSuspended(0); } else { mode->SendMsg(MM_CANCEL_VENDING_MAKE, 0, 0, 0, 0); } - } else if (this->unknown_0188 == 1) { + } else if (this->itemsSet == 1) { if (this->suspended == 1) { this->SetSuspended(0); } else { @@ -11587,7 +11587,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } if (g_windowMgr.window_027C || g_windowMgr.window_0274) { g_windowMgr.Confirm(LookupMessage(MSI_CANT_OPEN_STORE_WHILE_CHAT), 0, true, false, 0, "Message", 280, 120, 0); - if (this->unknown_0188 == 1) { + if (this->itemsSet == 1) { g_modeMgr.GetGameMode()->SendMsg(this->mode == 1 ? MM_CANCEL_BUYING_STORE_MAKE : MM_CANCEL_VENDING_MAKE, 0, 0, 0, 0); } else { g_windowMgr.CloseWindow(WID_MERCHANTSHOPMAKEWND); @@ -11604,7 +11604,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t goto showError; } auto current = this->items.begin(); - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { char text[24]; std::sprintf(text, "%s ", this->priceEdits[i]->Text()); if (!g_session.IsNumberWithCommas(text)) { @@ -11624,7 +11624,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } ITEM_INFO item = g_session.GetItem1768At(i); if (static_cast(i) < this->items.size()) { - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return 0; } if (item.identified == 0) { @@ -11661,7 +11661,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } } else { current = this->items.begin(); - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { char text[24]; std::sprintf(text, "%s ", this->quantityEdits[i]->Text()); if (!g_session.IsNumberWithCommas(text)) { @@ -11680,21 +11680,21 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } ++current; } - const std::int64_t budget = _atoi64(this->unknown_0128->Text()); + const std::int64_t budget = _atoi64(this->zenyLimitEdit->Text()); if (budget > g_session.m_zeny || budget > 0x7FFFFFFF) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(budget > g_session.m_zeny ? 3683 : 1870)), 0x6464FF, 0, 0, 0); break; } } - if (this->unknown_00CC->Length() == 0) { + if (this->titleEdit->Length() == 0) { error = 225; goto showError; } - if (!g_forbiddenWords.Allows(this->unknown_00CC->Text())) { + if (!g_forbiddenWords.Allows(this->titleEdit->Text())) { error = 14; goto showError; } - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { char text[24]; int price = 0; std::sprintf(text, "%s ", this->priceEdits[i]->Text()); @@ -11709,7 +11709,7 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_session.SetItem1768Unknown0014(i, price); } if (this->mode != 0) { - for (int i = 0; i < this->unknown_012C; ++i) { + for (int i = 0; i < this->slotCount; ++i) { char text[24]; int quantity = 0; std::sprintf(text, "%s ", this->quantityEdits[i]->Text()); @@ -11723,30 +11723,30 @@ int UIMerchantShopMakeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } g_session.SetItem1768Quantity(i, quantity); } - if (this->unknown_0188 == 1) { + if (this->itemsSet == 1) { this->SetSuspended(1); } else { - const int budget = static_cast(_atoi64(this->unknown_0128->Text())); - mode->SendMsg(MM_REQ_OPEN_BUYING_STORE, reinterpret_cast(this->unknown_00CC->Text()), 1, budget, 0); + const int budget = static_cast(_atoi64(this->zenyLimitEdit->Text())); + mode->SendMsg(MM_REQ_OPEN_BUYING_STORE, reinterpret_cast(this->titleEdit->Text()), 1, budget, 0); } } else { std::int64_t total = g_session.m_zeny; for (std::int64_t i = 0; i < g_session.GetList11Size(); ++i) { ITEM_INFO item = g_session.GetItem1768At(static_cast(i)); - total += static_cast(static_cast(item.unknown_0014[1])) * item.quantity; + total += static_cast(static_cast(item.prices[1])) * item.quantity; } if (total > 0x7FFFFFFF) { error = 3826; goto showError; } - if (this->unknown_0188 == 1) { + if (this->itemsSet == 1) { this->SetSuspended(1); } else { - mode->SendMsg(MM_REQ_OPENSTORE, reinterpret_cast(this->unknown_00CC->Text()), 1, 0, 0); + mode->SendMsg(MM_REQ_OPENSTORE, reinterpret_cast(this->titleEdit->Text()), 1, 0, 0); } } - this->RecordText(0, this->unknown_00CC->Text()); - g_session.m_storeInfoBackup.title = std::string(this->unknown_00CC->Text()); + this->RecordText(0, this->titleEdit->Text()); + g_session.m_storeInfoBackup.title = std::string(this->titleEdit->Text()); } break; } diff --git a/Source/UI/Edit/UIEditCtrl.h b/Source/UI/Edit/UIEditCtrl.h index cb5b840f2..5391f4f68 100644 --- a/Source/UI/Edit/UIEditCtrl.h +++ b/Source/UI/Edit/UIEditCtrl.h @@ -74,7 +74,7 @@ public: /* 00BC */ std::string tooltip; /* 00D4 */ unsigned char disabled; /* 00D8 */ std::string text; - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int tagTextLength; /* 00F4 */ int topPadding; /* 00F8 */ unsigned char preserveInput; /* 00FC */ std::list links; @@ -139,24 +139,24 @@ public: /* 011C */ std::list> entries; /* 0124 */ std::vector pendingText; - /* 0130 */ UIWindow* unknown_0130; - /* 0134 */ unsigned char unknown_0134; - /* 0138 */ int unknown_0138; - /* 013C */ int unknown_013C; - /* 0140 */ int unknown_0140; - /* 0144 */ int unknown_0144; - /* 0148 */ int unknown_0148; - /* 014C */ int unknown_014C; - /* 0150 */ int unknown_0150; - /* 0154 */ int unknown_0154; - /* 0158 */ int unknown_0158; - /* 015C */ short unknown_015C; - /* 015E */ unsigned char unknown_015E; - /* 0160 */ char* unknown_0160; - /* 0164 */ char* unknown_0164; - /* 0168 */ std::vector unknown_0168; - /* 0174 */ std::vector unknown_0174; - /* 0184 */ short unknown_0184; + /* 0130 */ UIWindow* scrollBar; + /* 0134 */ unsigned char scrollEnabled; + /* 0138 */ int lineHeight; + /* 013C */ int lineCount; + /* 0140 */ int caretLineLength; + /* 0144 */ int previousLineLength; + /* 0148 */ int nextLineLength; + /* 014C */ int caretPixelX; + /* 0150 */ int verticalCursorStep; + /* 0154 */ int previousCursor; + /* 0158 */ int firstVisibleLine; + /* 015C */ short scrollFlags; + /* 015E */ unsigned char movingDown; + /* 0160 */ char* previousLineText; + /* 0164 */ char* nextLineText; + /* 0168 */ std::vector wrappedLines; + /* 0174 */ std::vector lineBreaks; + /* 0184 */ short editFlags; }; class CUIEditCtrl : public UIEditCtrl3 { @@ -208,8 +208,8 @@ public: /* 011C */ std::vector history; /* 0128 */ std::string pending; - /* 0140 */ int unknown_0140; - /* 0144 */ UIItemTagOnChat* unknown_0144; + /* 0140 */ int historyIndex; + /* 0144 */ UIItemTagOnChat* itemTags; /* 0148 */ int historyLimit; }; diff --git a/Source/UI/Edit/UIEditCtrl3.cpp b/Source/UI/Edit/UIEditCtrl3.cpp index 8e7c1dc7b..136eaae6e 100644 --- a/Source/UI/Edit/UIEditCtrl3.cpp +++ b/Source/UI/Edit/UIEditCtrl3.cpp @@ -8,25 +8,25 @@ // OFFSET: 0x00861AB0 // FUNCTION: fn_10902 void UIEditCtrl3::UpdateScrollBar() { - const int visible = this->geometry.height / this->unknown_0138; - const int total = this->unknown_013C; + const int visible = this->geometry.height / this->lineHeight; + const int total = this->lineCount; int maximum = total - visible; - if (maximum == 1 && this->unknown_0158 == 0) { + if (maximum == 1 && this->firstVisibleLine == 0) { maximum = 0; } if (maximum < 0) { maximum = 0; } - this->unknown_0134 = maximum > 0; + this->scrollEnabled = maximum > 0; if (maximum > 0) { - static_cast(this->unknown_0130)->SetRange(maximum, visible, total); - static_cast(this->unknown_0130)->SetPosition(this->unknown_0158); + static_cast(this->scrollBar)->SetRange(maximum, visible, total); + static_cast(this->scrollBar)->SetPosition(this->firstVisibleLine); } else { - static_cast(this->unknown_0130)->SetRange(0, visible, total); - this->unknown_0158 = 0; + static_cast(this->scrollBar)->SetRange(0, visible, total); + this->firstVisibleLine = 0; } - this->unknown_0130->Invalidate(); + this->scrollBar->Invalidate(); } // OFFSET: 0x00861B50 diff --git a/Source/UI/Edit/UIEditCtrl_Currency.cpp b/Source/UI/Edit/UIEditCtrl_Currency.cpp index 88c6e042c..5cd87047a 100644 --- a/Source/UI/Edit/UIEditCtrl_Currency.cpp +++ b/Source/UI/Edit/UIEditCtrl_Currency.cpp @@ -3,12 +3,12 @@ // OFFSET: 0x0086D250 // FUNCTION: fn_11043 UIEditCtrl_Custom::UIEditCtrl_Custom() - : UIEditCtrl2(), unknown_011C(0), unknown_0120(0), unknown_0124(0), unknown_0128(0) { + : UIEditCtrl2(), labelBold(0), labelOffsetX(0), labelOffsetY(0), labelAlignment(0) { } // OFFSET: 0x0086D1B0 // FUNCTION: fn_11042 UIEditCtrl_Currency::UIEditCtrl_Currency() : UIEditCtrl_Custom() { - this->unknown_0128 = 1; + this->labelAlignment = 1; this->formattedLength = 0; } diff --git a/Source/UI/Edit/UIEditCtrl_Currency.h b/Source/UI/Edit/UIEditCtrl_Currency.h index e7368fe0b..c37be9e46 100644 --- a/Source/UI/Edit/UIEditCtrl_Currency.h +++ b/Source/UI/Edit/UIEditCtrl_Currency.h @@ -14,10 +14,10 @@ public: void Trim() override; void DrawLabel(int x, int y, const char* text); - /* 011C */ unsigned char unknown_011C; - /* 0120 */ int unknown_0120; - /* 0124 */ int unknown_0124; - /* 0128 */ int unknown_0128; + /* 011C */ unsigned char labelBold; + /* 0120 */ int labelOffsetX; + /* 0124 */ int labelOffsetY; + /* 0128 */ int labelAlignment; }; class UIEditCtrl_Currency : public UIEditCtrl_Custom { diff --git a/Source/UI/Edit/UIEditLinks.cpp b/Source/UI/Edit/UIEditLinks.cpp index cea39e38f..261cbedf8 100644 --- a/Source/UI/Edit/UIEditLinks.cpp +++ b/Source/UI/Edit/UIEditLinks.cpp @@ -59,15 +59,15 @@ bool UIEditCtrl::RemoveInvalidLink(int type, std::list::iterator& ent int boundary; if (before.find("<") != std::string::npos && after.find(">") == std::string::npos) { - if (g_windowMgr.unknown_0458 && - reinterpret_cast(g_windowMgr.unknown_0458)->m_contents != g_windowMgr.GetHoverWindow()) { + if (g_windowMgr.rodexComposeWnd && + reinterpret_cast(g_windowMgr.rodexComposeWnd)->m_contents != g_windowMgr.GetHoverWindow()) { continue; } boundary = position + bytes; } else if (before.find("<") == std::string::npos && after.find(">") != std::string::npos) { - if (g_windowMgr.unknown_0458 && - reinterpret_cast(g_windowMgr.unknown_0458)->m_contents != g_windowMgr.GetHoverWindow()) { + if (g_windowMgr.rodexComposeWnd && + reinterpret_cast(g_windowMgr.rodexComposeWnd)->m_contents != g_windowMgr.GetHoverWindow()) { continue; } @@ -117,7 +117,7 @@ void UIEditCtrl::MoveCursorToEnd() { // OFFSET: 0x008550E0 // FUNCTION: fn_10750 void UIEditCtrl::SnapLinkSelection(const std::string& prefix, const int& bytes) { - if (g_windowMgr.unknown_0458 && reinterpret_cast(g_windowMgr.unknown_0458)->m_contents != g_windowMgr.GetHoverWindow()) { + if (g_windowMgr.rodexComposeWnd && reinterpret_cast(g_windowMgr.rodexComposeWnd)->m_contents != g_windowMgr.GetHoverWindow()) { return; } @@ -211,21 +211,21 @@ std::string UIEditCtrl::BracketFittedText(const std::string& name) { // OFFSET: 0x0085A870 // FUNCTION: fn_10780 void UIChatEditCtrl::InsertItemTag(int tagId) { - if (!this->unknown_0144) { - this->unknown_0144 = new (std::nothrow) UIItemTagOnChat(); - if (!this->unknown_0144) { + if (!this->itemTags) { + this->itemTags = new (std::nothrow) UIItemTagOnChat(); + if (!this->itemTags) { return; } } - if (static_cast(this->unknown_0144->tags.size()) >= 3 || this->unknown_00F0 + this->text.size() > static_cast(this->maximum)) { + if (static_cast(this->itemTags->tags.size()) >= 3 || this->tagTextLength + this->text.size() > static_cast(this->maximum)) { return; } - const std::string tag = this->unknown_0144->AddSkillTag(tagId, 0x7F00E4); + const std::string tag = this->itemTags->AddSkillTag(tagId, 0x7F00E4); const std::string combined = this->text + tag; g_serverLanguage->ResetInput(); g_serverLanguage->Insert(combined.c_str()); - this->unknown_0144->taggedText = this->text; + this->itemTags->taggedText = this->text; } diff --git a/Source/UI/Edit/UIEditVariants.cpp b/Source/UI/Edit/UIEditVariants.cpp index 9a2f6874d..a3cd8ea9b 100644 --- a/Source/UI/Edit/UIEditVariants.cpp +++ b/Source/UI/Edit/UIEditVariants.cpp @@ -55,8 +55,8 @@ int UIEditCtrl2::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in // FUNCTION: fn_10912 int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { using NextCharHandler = const char*(__thiscall*)(InputCharset*, const char*, int); - unsigned char* const scrolling = reinterpret_cast(&this->unknown_015C); - unsigned char* const lineMove = reinterpret_cast(&this->unknown_0184); + unsigned char* const scrolling = reinterpret_cast(&this->scrollFlags); + unsigned char* const lineMove = reinterpret_cast(&this->editFlags); switch (message) { case UM_DEFPUSH: @@ -70,53 +70,53 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { - const int previous = this->unknown_0158; + const int previous = this->firstVisibleLine; scrolling[0] = 1; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_0158 = previous - this->geometry.height / this->unknown_0138 + 1; + this->firstVisibleLine = previous - this->geometry.height / this->lineHeight + 1; } else if (message == UM_SCROLLVERTPAGEDOWN) { - this->unknown_0158 = previous - 1 + this->geometry.height / this->unknown_0138; + this->firstVisibleLine = previous - 1 + this->geometry.height / this->lineHeight; } else { - this->unknown_0158 = previous + a; + this->firstVisibleLine = previous + a; } - if (this->unknown_0158 < 0) { - this->unknown_0158 = 0; + if (this->firstVisibleLine < 0) { + this->firstVisibleLine = 0; } - const int last = this->unknown_013C - this->geometry.height / this->unknown_0138; - if (this->unknown_0158 > last) { - this->unknown_0158 = last; + const int last = this->lineCount - this->geometry.height / this->lineHeight; + if (this->firstVisibleLine > last) { + this->firstVisibleLine = last; } - static_cast(this->unknown_0130)->SetPosition(this->unknown_0158); - this->unknown_0130->Invalidate(); + static_cast(this->scrollBar)->SetPosition(this->firstVisibleLine); + this->scrollBar->Invalidate(); this->Invalidate(); if (this->parent) { this->parent->Invalidate(); } - return this->unknown_0158 - previous; + return this->firstVisibleLine - previous; } case UM_UPPUSH: { lineMove[0] = 0; - const unsigned count = this->unknown_0168.size(); - if (count <= 1 && (count != 1 || !this->unknown_0174[0])) { + const unsigned count = this->wrappedLines.size(); + if (count <= 1 && (count != 1 || !this->lineBreaks[0])) { return 0; } g_serverLanguage->Selection(this->anchor, this->cursor); - if (this->unknown_0150 <= 0 || this->unknown_0154 != this->cursor || scrolling[1] != 0) { - const char* current = this->unknown_0160; - this->unknown_015E = 0; + if (this->verticalCursorStep <= 0 || this->previousCursor != this->cursor || scrolling[1] != 0) { + const char* current = this->previousLineText; + this->movingDown = 0; int bytes = 0; int width = 0; const char* const end = current + std::strlen(current); int column = 0; - if (this->unknown_0144 != 0) { + if (this->previousLineLength != 0) { while (current < end) { const int previousBytes = bytes; const int previousWidth = width; @@ -132,8 +132,8 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } column = bytes; - if (width > this->unknown_014C) { - if (width - this->unknown_014C > this->unknown_014C - previousWidth) { + if (width > this->caretPixelX) { + if (width - this->caretPixelX > this->caretPixelX - previousWidth) { column = previousBytes; } break; @@ -141,10 +141,10 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } } - this->unknown_0150 = this->unknown_0144 - column + static_cast(std::strlen(this->unknown_0160)); + this->verticalCursorStep = this->previousLineLength - column + static_cast(std::strlen(this->previousLineText)); } - g_serverLanguage->RetreatCursor(this->unknown_0150); + g_serverLanguage->RetreatCursor(this->verticalCursorStep); scrolling[1] = 1; lineMove[0] = 1; break; @@ -152,21 +152,21 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in case UM_DOWNPUSH: { lineMove[0] = 0; - const unsigned count = this->unknown_0168.size(); - if ((count <= 1 || static_cast(this->textY) >= count - 1) && (count != 1 || !this->unknown_0174[0] || this->unknown_0148 <= 0)) { + const unsigned count = this->wrappedLines.size(); + if ((count <= 1 || static_cast(this->textY) >= count - 1) && (count != 1 || !this->lineBreaks[0] || this->nextLineLength <= 0)) { return 0; } g_serverLanguage->Selection(this->anchor, this->cursor); - if (this->unknown_0150 <= 0 || this->unknown_0154 != this->cursor || this->unknown_015E != 0) { + if (this->verticalCursorStep <= 0 || this->previousCursor != this->cursor || this->movingDown != 0) { scrolling[1] = 0; int bytes = 0; int width = 0; int column = 0; - const unsigned lines = this->unknown_0168.size(); + const unsigned lines = this->wrappedLines.size(); if (lines > 1 && static_cast(this->textY) < lines - 1) { - const char* current = this->unknown_0164; + const char* current = this->nextLineText; const char* const end = current + std::strlen(current); while (current < end) { @@ -184,8 +184,8 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } column = bytes; - if (width > this->unknown_014C) { - if (width - this->unknown_014C > this->unknown_014C - previousWidth) { + if (width > this->caretPixelX) { + if (width - this->caretPixelX > this->caretPixelX - previousWidth) { column = previousBytes; } break; @@ -193,11 +193,11 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } } - this->unknown_0150 = this->unknown_0148 + column; + this->verticalCursorStep = this->nextLineLength + column; } - g_serverLanguage->AdvanceCursor(this->unknown_0150); - this->unknown_015E = 1; + g_serverLanguage->AdvanceCursor(this->verticalCursorStep); + this->movingDown = 1; break; } case 256: @@ -210,7 +210,7 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in } g_serverLanguage->Selection(this->anchor, this->cursor); - this->unknown_0154 = this->cursor; + this->previousCursor = this->cursor; return 0; } @@ -219,8 +219,8 @@ int UIEditCtrl3::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::in void UIEditCtrl3::HandleInputMessage(unsigned key, std::intptr_t data) { UIWindow* const chatWindow = ChatWindow() ? ChatWindow()->m_suggestions : nullptr; - this->unknown_0150 = 0; - this->unknown_0154 = 0; + this->verticalCursorStep = 0; + this->previousCursor = 0; switch (key) { case VK_LEFT: @@ -228,9 +228,9 @@ void UIEditCtrl3::HandleInputMessage(unsigned key, std::intptr_t data) { g_serverLanguage->Selection(this->anchor, this->cursor); int length = 0; for (int line = 0; line < this->textY; ++line) { - length += static_cast(std::strlen(this->unknown_0168[line].c_str())); + length += static_cast(std::strlen(this->wrappedLines[line].c_str())); } - if (length == this->cursor && this->unknown_0174[this->textY - 1]) { + if (length == this->cursor && this->lineBreaks[this->textY - 1]) { g_serverLanguage->KeyDown(key, data); } } @@ -238,12 +238,12 @@ void UIEditCtrl3::HandleInputMessage(unsigned key, std::intptr_t data) { break; case VK_RIGHT: g_serverLanguage->Selection(this->anchor, this->cursor); - if (static_cast(this->textY) < this->unknown_0168.size()) { + if (static_cast(this->textY) < this->wrappedLines.size()) { int length = 0; for (int line = 0; line <= this->textY; ++line) { - length += static_cast(std::strlen(this->unknown_0168[line].c_str())); + length += static_cast(std::strlen(this->wrappedLines[line].c_str())); } - if (length - 2 == this->cursor && this->unknown_0174[this->textY]) { + if (length - 2 == this->cursor && this->lineBreaks[this->textY]) { g_serverLanguage->KeyDown(key, data); g_serverLanguage->KeyDown(key, data); return; @@ -252,37 +252,37 @@ void UIEditCtrl3::HandleInputMessage(unsigned key, std::intptr_t data) { g_serverLanguage->KeyDown(key, data); break; case VK_HOME: - if (this->unknown_0168.size() != 0) { + if (this->wrappedLines.size() != 0) { g_serverLanguage->Selection(this->anchor, this->cursor); int offset = this->cursor; for (int line = 0; line < this->textY; ++line) { - offset -= static_cast(std::strlen(this->unknown_0168[line].c_str())); + offset -= static_cast(std::strlen(this->wrappedLines[line].c_str())); } g_serverLanguage->RetreatCursor(offset); g_serverLanguage->Selection(this->anchor, this->cursor); } break; case VK_END: - if (this->unknown_0168.size() != 0) { + if (this->wrappedLines.size() != 0) { g_serverLanguage->Selection(this->anchor, this->cursor); int offset = this->cursor; for (int line = 0; line < this->textY; ++line) { - offset -= static_cast(std::strlen(this->unknown_0168[line].c_str())); + offset -= static_cast(std::strlen(this->wrappedLines[line].c_str())); } - const int length = static_cast(std::strlen(this->unknown_0168[this->textY].c_str())); - g_serverLanguage->AdvanceCursor(this->unknown_0174[this->textY] ? length - offset - 2 : length - offset); + const int length = static_cast(std::strlen(this->wrappedLines[this->textY].c_str())); + g_serverLanguage->AdvanceCursor(this->lineBreaks[this->textY] ? length - offset - 2 : length - offset); g_serverLanguage->Selection(this->anchor, this->cursor); } - reinterpret_cast(&this->unknown_0184)[0] = 1; + reinterpret_cast(&this->editFlags)[0] = 1; return; case VK_BACK: - if (this->unknown_0168.size() != 0) { + if (this->wrappedLines.size() != 0) { g_serverLanguage->Selection(this->anchor, this->cursor); int length = 0; for (int line = 0; line < this->textY; ++line) { - length += static_cast(std::strlen(this->unknown_0168[line].c_str())); + length += static_cast(std::strlen(this->wrappedLines[line].c_str())); } - if (length == this->cursor && this->unknown_0174[this->textY - 1]) { + if (length == this->cursor && this->lineBreaks[this->textY - 1]) { g_serverLanguage->Character(VK_BACK, data); } } @@ -301,65 +301,65 @@ void UIEditCtrl3::HandleInputMessage(unsigned key, std::intptr_t data) { // OFFSET: 0x0084F570 // FUNCTION: fn_10659 UIEditCtrl3::UIEditCtrl3() : UIEditCtrl2() { - this->unknown_0130 = 0; - this->unknown_0134 = 0; - this->unknown_0138 = 14; - this->unknown_013C = 0; - this->unknown_0140 = 0; - this->unknown_0144 = 0; - this->unknown_0148 = 0; - this->unknown_014C = 0; - this->unknown_0150 = 0; - this->unknown_0154 = 0; - this->unknown_0158 = 0; - this->unknown_015C = 0; - this->unknown_015E = 0; - this->unknown_0184 = 0; - this->unknown_0160 = 0; - this->unknown_0164 = 0; + this->scrollBar = 0; + this->scrollEnabled = 0; + this->lineHeight = 14; + this->lineCount = 0; + this->caretLineLength = 0; + this->previousLineLength = 0; + this->nextLineLength = 0; + this->caretPixelX = 0; + this->verticalCursorStep = 0; + this->previousCursor = 0; + this->firstVisibleLine = 0; + this->scrollFlags = 0; + this->movingDown = 0; + this->editFlags = 0; + this->previousLineText = 0; + this->nextLineText = 0; } // OFFSET: 0x0084F2B0 // FUNCTION: fn_10658 UIEditCtrl3::UIEditCtrl3(const UIEditCtrl3& other) : UIEditCtrl2(other) { - this->unknown_0130 = 0; + this->scrollBar = 0; this->UIEditCtrl3::OnCreate(other.geometry.width, other.geometry.height); - this->unknown_0134 = other.unknown_0134; - this->unknown_0138 = other.unknown_0138; - this->unknown_013C = other.unknown_013C; - this->unknown_0140 = other.unknown_0140; - this->unknown_0144 = other.unknown_0144; - this->unknown_0148 = other.unknown_0148; - this->unknown_014C = other.unknown_014C; - this->unknown_0150 = other.unknown_0150; - this->unknown_0154 = other.unknown_0154; - this->unknown_0158 = other.unknown_0158; - reinterpret_cast(&this->unknown_015C)[0] = reinterpret_cast(&other.unknown_015C)[0]; - reinterpret_cast(&this->unknown_015C)[1] = reinterpret_cast(&other.unknown_015C)[1]; - this->unknown_015E = other.unknown_015E; - reinterpret_cast(&this->unknown_0184)[0] = reinterpret_cast(&other.unknown_0184)[0]; - reinterpret_cast(&this->unknown_0184)[1] = reinterpret_cast(&other.unknown_0184)[1]; + this->scrollEnabled = other.scrollEnabled; + this->lineHeight = other.lineHeight; + this->lineCount = other.lineCount; + this->caretLineLength = other.caretLineLength; + this->previousLineLength = other.previousLineLength; + this->nextLineLength = other.nextLineLength; + this->caretPixelX = other.caretPixelX; + this->verticalCursorStep = other.verticalCursorStep; + this->previousCursor = other.previousCursor; + this->firstVisibleLine = other.firstVisibleLine; + reinterpret_cast(&this->scrollFlags)[0] = reinterpret_cast(&other.scrollFlags)[0]; + reinterpret_cast(&this->scrollFlags)[1] = reinterpret_cast(&other.scrollFlags)[1]; + this->movingDown = other.movingDown; + reinterpret_cast(&this->editFlags)[0] = reinterpret_cast(&other.editFlags)[0]; + reinterpret_cast(&this->editFlags)[1] = reinterpret_cast(&other.editFlags)[1]; - char* first = other.unknown_0160; - if (first != this->unknown_0160) { + char* first = other.previousLineText; + if (first != this->previousLineText) { if (IsNullOrEmpty(first)) { - this->unknown_0160 = 0; + this->previousLineText = 0; } else { const std::size_t length = std::strlen(first) + 1; - this->unknown_0160 = new char[length]; - strcpy_s(this->unknown_0160, length, first); + this->previousLineText = new char[length]; + strcpy_s(this->previousLineText, length, first); } } - char* second = other.unknown_0164; - if (second != this->unknown_0164) { + char* second = other.nextLineText; + if (second != this->nextLineText) { if (IsNullOrEmpty(second)) { - this->unknown_0164 = 0; + this->nextLineText = 0; } else { const std::size_t length = std::strlen(second) + 1; - this->unknown_0164 = new char[length]; - strcpy_s(this->unknown_0164, length, second); + this->nextLineText = new char[length]; + strcpy_s(this->nextLineText, length, second); } } } @@ -376,17 +376,17 @@ UIEditCtrl3::~UIEditCtrl3() { // OFFSET: 0x0085AC40 // FUNCTION: fn_10786 void UIEditCtrl3::OnCreate(int width, int height) { - this->unknown_0130 = new UIScrollBar3(); - static_cast(this->unknown_0130)->Configure(width - 10, 0, 1, height); - this->AddChild(this->unknown_0130); + this->scrollBar = new UIScrollBar3(); + static_cast(this->scrollBar)->Configure(width - 10, 0, 1, height); + this->AddChild(this->scrollBar); } // OFFSET: 0x00863280 // FUNCTION: fn_10906 void UIEditCtrl3::Resize(int width, int height) { this->UIWindow::Resize(width, height); - this->unknown_0130->Move(this->geometry.width - 10, 0); - this->unknown_0130->Resize(this->unknown_0130->geometry.width, height); + this->scrollBar->Move(this->geometry.width - 10, 0); + this->scrollBar->Resize(this->scrollBar->geometry.width, height); this->UpdateScrollBar(); } @@ -463,41 +463,41 @@ void UIEditCtrl3::PaintText() { display = prefix + this->text; int width = this->geometry.width - 6; - if (this->unknown_0134 != 0) { - width += 3 - this->unknown_0130->geometry.width; + if (this->scrollEnabled != 0) { + width += 3 - this->scrollBar->geometry.width; } - this->unknown_0168.clear(); - this->unknown_0174.clear(); - this->WrapTextWithBreaks(display.c_str(), &this->unknown_0168, &this->unknown_0174, width); - this->WrapLines(this->unknown_0168); + this->wrappedLines.clear(); + this->lineBreaks.clear(); + this->WrapTextWithBreaks(display.c_str(), &this->wrappedLines, &this->lineBreaks, width); + this->WrapLines(this->wrappedLines); - for (std::size_t index = 0; index < this->unknown_0168.size() - this->unknown_0174.size(); ++index) { - this->unknown_0174.push_back(false); + for (std::size_t index = 0; index < this->wrappedLines.size() - this->lineBreaks.size(); ++index) { + this->lineBreaks.push_back(false); } - this->unknown_013C = static_cast(this->unknown_0168.size()); - if (reinterpret_cast(&this->unknown_0184)[1] != 0) { - ++this->unknown_013C; + this->lineCount = static_cast(this->wrappedLines.size()); + if (reinterpret_cast(&this->editFlags)[1] != 0) { + ++this->lineCount; } - if (this->unknown_0168.size() == 0) { + if (this->wrappedLines.size() == 0) { this->DrawBlinkingCaret(color); return; } - const int rows = this->geometry.height / this->unknown_0138; - const int first = this->unknown_0158; - const int last = std::min(rows + first, this->unknown_0168.size()); + const int rows = this->geometry.height / this->lineHeight; + const int first = this->firstVisibleLine; + const int last = std::min(rows + first, this->wrappedLines.size()); int offset = 0; for (int line = 0; line < first; ++line) { - offset += static_cast(std::strlen(this->unknown_0168[line].c_str())); + offset += static_cast(std::strlen(this->wrappedLines[line].c_str())); } for (int line = first; line < last; ++line) { - const int y = (line - first) * this->unknown_0138; - offset += static_cast(std::strlen(this->unknown_0168[line].c_str())); + const int y = (line - first) * this->lineHeight; + offset += static_cast(std::strlen(this->wrappedLines[line].c_str())); if (g_windowMgr.GetHoverWindow() == this && std::abs(g_serverLanguage->cursor - g_serverLanguage->anchor) != 0) { const int selectionBegin = std::min(this->anchor, this->cursor); @@ -506,31 +506,31 @@ void UIEditCtrl3::PaintText() { int endX = 0; if (selectionBegin < offset) { - int begin = selectionBegin + static_cast(std::strlen(this->unknown_0168[line].c_str())) - offset; + int begin = selectionBegin + static_cast(std::strlen(this->wrappedLines[line].c_str())) - offset; if (begin < 0) { begin = 0; } - startX = begin != 0 ? this->TextWidth(this->unknown_0168[line].c_str(), begin, 0, 12, 0, 0) : 0; + startX = begin != 0 ? this->TextWidth(this->wrappedLines[line].c_str(), begin, 0, 12, 0, 0) : 0; - int length = static_cast(std::strlen(this->unknown_0168[line].c_str())); - if (this->unknown_0174[line]) { + int length = static_cast(std::strlen(this->wrappedLines[line].c_str())); + if (this->lineBreaks[line]) { length -= 2; } - endX = this->TextWidth(this->unknown_0168[line].c_str(), length, 0, 12, 0, 0); + endX = this->TextWidth(this->wrappedLines[line].c_str(), length, 0, 12, 0, 0); } if (selectionEnd <= offset) { - int end = selectionEnd + static_cast(std::strlen(this->unknown_0168[line].c_str())) - offset; + int end = selectionEnd + static_cast(std::strlen(this->wrappedLines[line].c_str())) - offset; if (end < 0) { end = 0; } int length = end; - if (static_cast(std::strlen(this->unknown_0168[line].c_str())) == end && this->unknown_0174[line]) { + if (static_cast(std::strlen(this->wrappedLines[line].c_str())) == end && this->lineBreaks[line]) { length = end - 2; } - endX = length != 0 ? this->TextWidth(this->unknown_0168[line].c_str(), length, 0, 12, 0, 0) : 0; + endX = length != 0 ? this->TextWidth(this->wrappedLines[line].c_str(), length, 0, 12, 0, 0) : 0; } int left = x + startX; @@ -554,16 +554,16 @@ void UIEditCtrl3::PaintText() { } if (this->pendingText.size() < static_cast(line + 1)) { - this->pendingText.push_back(this->unknown_0168[line]); - } else if (&this->pendingText[line] != &this->unknown_0168[line]) { - this->pendingText[line] = this->unknown_0168[line]; + this->pendingText.push_back(this->wrappedLines[line]); + } else if (&this->pendingText[line] != &this->wrappedLines[line]) { + this->pendingText[line] = this->wrappedLines[line]; } - this->PlaceLinks(this->unknown_0168[line], y, line, first, last); + this->PlaceLinks(this->wrappedLines[line], y, line, first, last); - const std::size_t length = std::strlen(this->unknown_0168[line].c_str()); + const std::size_t length = std::strlen(this->wrappedLines[line].c_str()); char* buffer = new char[length + 1]; - std::strcpy(buffer, this->unknown_0168[line].c_str()); + std::strcpy(buffer, this->wrappedLines[line].c_str()); buffer[length] = '\0'; if (buffer[length - 2] == '\r') { buffer[length - 2] = '\0'; @@ -592,24 +592,24 @@ void UIEditCtrl3::PaintText() { int reading = std::max(this->anchor, this->cursor) + static_cast(g_serverLanguage->candidate.size() + std::strlen(prefix)); int remaining = column; - for (std::size_t index = 0; index < this->unknown_0168.size(); ++index) { - remaining -= static_cast(std::strlen(this->unknown_0168[index].c_str())); + for (std::size_t index = 0; index < this->wrappedLines.size(); ++index) { + remaining -= static_cast(std::strlen(this->wrappedLines[index].c_str())); this->textY = static_cast(index); - if (remaining < 0 || (static_cast(this->unknown_0184) != 0 && remaining == 0)) { + if (remaining < 0 || (static_cast(this->editFlags) != 0 && remaining == 0)) { break; } } if (g_windowMgr.GetHoverWindow() == this) { int caretLine = this->textY; - if (this->unknown_0140 != static_cast(std::strlen(this->unknown_0168[caretLine].c_str()))) { - reinterpret_cast(&this->unknown_015C)[0] = 0; - this->unknown_0140 = static_cast(std::strlen(this->unknown_0168[caretLine].c_str())); + if (this->caretLineLength != static_cast(std::strlen(this->wrappedLines[caretLine].c_str()))) { + reinterpret_cast(&this->scrollFlags)[0] = 0; + this->caretLineLength = static_cast(std::strlen(this->wrappedLines[caretLine].c_str())); } int before = 0; for (int index = 0; index < caretLine; ++index) { - before += static_cast(std::strlen(this->unknown_0168[index].c_str())); + before += static_cast(std::strlen(this->wrappedLines[index].c_str())); } int wrapped = 0; @@ -617,22 +617,22 @@ void UIEditCtrl3::PaintText() { column -= before; } - if (static_cast(std::strlen(this->unknown_0168[caretLine].c_str())) == column && this->unknown_0174[caretLine]) { + if (static_cast(std::strlen(this->wrappedLines[caretLine].c_str())) == column && this->lineBreaks[caretLine]) { wrapped = 1; column = 0; } - if (this->unknown_0148 != static_cast(std::strlen(this->unknown_0168[caretLine].c_str())) - column) { - this->unknown_0148 = static_cast(std::strlen(this->unknown_0168[caretLine].c_str())) - column; + if (this->nextLineLength != static_cast(std::strlen(this->wrappedLines[caretLine].c_str())) - column) { + this->nextLineLength = static_cast(std::strlen(this->wrappedLines[caretLine].c_str())) - column; } - if (this->unknown_0144 != column) { - this->unknown_0144 = column; + if (this->previousLineLength != column) { + this->previousLineLength = column; } int caretX = 0; if (column != 0) { - caretX = this->TextWidth(this->unknown_0168[caretLine].c_str(), column, 0, 12, 0, 0); + caretX = this->TextWidth(this->wrappedLines[caretLine].c_str(), column, 0, 12, 0, 0); caretLine = this->textY; } @@ -641,11 +641,11 @@ void UIEditCtrl3::PaintText() { } int readingLength = reading; - if (static_cast(std::strlen(this->unknown_0168[caretLine].c_str())) == reading && this->unknown_0174[caretLine]) { + if (static_cast(std::strlen(this->wrappedLines[caretLine].c_str())) == reading && this->lineBreaks[caretLine]) { readingLength = reading - 2; } - const int readingX = readingLength != 0 ? this->TextWidth(this->unknown_0168[caretLine].c_str(), readingLength, 0, 12, 0, 0) : 0; + const int readingX = readingLength != 0 ? this->TextWidth(this->wrappedLines[caretLine].c_str(), readingLength, 0, 12, 0, 0) : 0; if (g_serverLanguage->candidate.size() != 0) { int gap = readingX - caretX; @@ -653,43 +653,43 @@ void UIEditCtrl3::PaintText() { gap = 2; } caretX += gap + 2; - this->unknown_0144 += 2; + this->previousLineLength += 2; this->MoveCandidateWindow(caretX); this->MoveReadingWindow(readingX); } - if (this->unknown_014C != caretX) { - this->unknown_014C = caretX; + if (this->caretPixelX != caretX) { + this->caretPixelX = caretX; } if ((timeGetTime() / 500 & 1) == 0 && (!g_windowMgr.IsHoverOnWindow01C8Button() || g_windowMgr.inputSuggestionsEnabled)) { - this->DrawTextAt(x - 2 + caretX, (wrapped - first + this->textY) * this->unknown_0138, "|", 0, 0, 12, color, 0, 0); + this->DrawTextAt(x - 2 + caretX, (wrapped - first + this->textY) * this->lineHeight, "|", 0, 0, 12, color, 0, 0); - const unsigned char* scroll = reinterpret_cast(&this->unknown_015C); + const unsigned char* scroll = reinterpret_cast(&this->scrollFlags); if (scroll[0] == 0) { if (scroll[1] != 0) { const int current = this->textY; - if (current - wrapped < this->unknown_0158) { - if (current >= this->unknown_013C - rows) { - this->unknown_0158 = this->unknown_013C - rows; + if (current - wrapped < this->firstVisibleLine) { + if (current >= this->lineCount - rows) { + this->firstVisibleLine = this->lineCount - rows; } else { - this->unknown_0158 = current + wrapped; + this->firstVisibleLine = current + wrapped; } } - } else if (this->unknown_015E != 0) { + } else if (this->movingDown != 0) { const int current = this->textY; - if (this->unknown_0158 - 1 + rows < current) { + if (this->firstVisibleLine - 1 + rows < current) { if (current < rows) { - this->unknown_0158 = 0; + this->firstVisibleLine = 0; } else { - this->unknown_0158 = current - rows + 1; + this->firstVisibleLine = current - rows + 1; } } } else { - const int top = this->unknown_013C <= rows ? this->textY : this->unknown_013C - rows + wrapped; - this->unknown_0158 = top; - if (reinterpret_cast(&this->unknown_0184)[1] != 0 && top > 0) { - this->unknown_0158 = top - 1; + const int top = this->lineCount <= rows ? this->textY : this->lineCount - rows + wrapped; + this->firstVisibleLine = top; + if (reinterpret_cast(&this->editFlags)[1] != 0 && top > 0) { + this->firstVisibleLine = top - 1; } } } @@ -700,42 +700,42 @@ void UIEditCtrl3::PaintText() { } } - std::size_t count = this->unknown_0168.size(); + std::size_t count = this->wrappedLines.size(); if (count > 1 && this->textY > 0) { - const std::size_t length = std::strlen(this->unknown_0168[this->textY - 1].c_str()); - if (this->unknown_0160) { - delete[] this->unknown_0160; - this->unknown_0160 = nullptr; + const std::size_t length = std::strlen(this->wrappedLines[this->textY - 1].c_str()); + if (this->previousLineText) { + delete[] this->previousLineText; + this->previousLineText = nullptr; } - this->unknown_0160 = new char[length + 1]; - std::strcpy(this->unknown_0160, this->unknown_0168[this->textY - 1].c_str()); - } else if ((count == 1 || (count > 1 && this->textY == 0)) && this->unknown_0174[0]) { - const std::size_t length = std::strlen(this->unknown_0168[0].c_str()); - if (this->unknown_0160) { - delete[] this->unknown_0160; - this->unknown_0160 = nullptr; + this->previousLineText = new char[length + 1]; + std::strcpy(this->previousLineText, this->wrappedLines[this->textY - 1].c_str()); + } else if ((count == 1 || (count > 1 && this->textY == 0)) && this->lineBreaks[0]) { + const std::size_t length = std::strlen(this->wrappedLines[0].c_str()); + if (this->previousLineText) { + delete[] this->previousLineText; + this->previousLineText = nullptr; } - this->unknown_0160 = new char[length + 1]; - std::strcpy(this->unknown_0160, this->unknown_0168[0].c_str()); + this->previousLineText = new char[length + 1]; + std::strcpy(this->previousLineText, this->wrappedLines[0].c_str()); } - count = this->unknown_0168.size(); + count = this->wrappedLines.size(); if (count > 1 && static_cast(this->textY) < count - 1) { - const std::size_t length = std::strlen(this->unknown_0168[this->textY + 1].c_str()); - if (this->unknown_0164) { - delete[] this->unknown_0164; - this->unknown_0164 = nullptr; + const std::size_t length = std::strlen(this->wrappedLines[this->textY + 1].c_str()); + if (this->nextLineText) { + delete[] this->nextLineText; + this->nextLineText = nullptr; } - this->unknown_0164 = new char[length + 1]; - std::strcpy(this->unknown_0164, this->unknown_0168[this->textY + 1].c_str()); - } else if (count == 1 && this->unknown_0174[0]) { - const std::size_t length = std::strlen(this->unknown_0168[0].c_str()); - if (this->unknown_0164) { - delete[] this->unknown_0164; - this->unknown_0164 = nullptr; + this->nextLineText = new char[length + 1]; + std::strcpy(this->nextLineText, this->wrappedLines[this->textY + 1].c_str()); + } else if (count == 1 && this->lineBreaks[0]) { + const std::size_t length = std::strlen(this->wrappedLines[0].c_str()); + if (this->nextLineText) { + delete[] this->nextLineText; + this->nextLineText = nullptr; } - this->unknown_0164 = new char[length + 1]; - std::strcpy(this->unknown_0164, this->unknown_0168[0].c_str()); + this->nextLineText = new char[length + 1]; + std::strcpy(this->nextLineText, this->wrappedLines[0].c_str()); } this->UpdateScrollBar(); @@ -846,21 +846,21 @@ void UIEditCtrl3::Paint() { // OFFSET: 0x0085FF60 // FUNCTION: fn_10892 void UIEditCtrl3::OnWheel(int value) { - if (this->unknown_0134 == 0) { + if (this->scrollEnabled == 0) { return; } if (value < 0) { - this->SendMsg(this->unknown_0130, UM_SCROLLVERT, 3, 0, 0, 0); + this->SendMsg(this->scrollBar, UM_SCROLLVERT, 3, 0, 0, 0); } else { - this->SendMsg(this->unknown_0130, UM_SCROLLVERT, -3, 0, 0, 0); + this->SendMsg(this->scrollBar, UM_SCROLLVERT, -3, 0, 0, 0); } } // OFFSET: 0x00868300 // FUNCTION: fn_10958 void UIEditCtrl3::Trim() { - const int limit = this->maximum - this->unknown_00F0; + const int limit = this->maximum - this->tagTextLength; const auto length = this->text.size(); if (static_cast(length) <= limit) { @@ -907,9 +907,9 @@ void UIBitmapEditCtrl::SetBitmapName(const char* name) { // OFFSET: 0x0084EE90 // FUNCTION: fn_10654 UIChatEditCtrl::UIChatEditCtrl() : UIEditCtrl(), historyLimit(30) { - this->unknown_0140 = 0; + this->historyIndex = 0; this->history.reserve(this->historyLimit); - this->unknown_0144 = 0; + this->itemTags = 0; } // OFFSET: 0x0085EB50 @@ -928,21 +928,21 @@ int UIChatEditCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: switch (message) { case UM_UPPUSH: if (this->history.size() != 0) { - if (this->unknown_0140 == this->history.size()) { + if (this->historyIndex == this->history.size()) { this->pending = this->Text(); } - if (this->unknown_0140 != 0) { - --this->unknown_0140; + if (this->historyIndex != 0) { + --this->historyIndex; } - this->SetText(this->history[this->unknown_0140].c_str()); + this->SetText(this->history[this->historyIndex].c_str()); this->OnBeginEdit(); } break; case UM_DOWNPUSH: - if (this->history.size() != 0 && this->unknown_0140 < this->history.size()) { - ++this->unknown_0140; - this->SetText((this->unknown_0140 == this->history.size() ? this->pending : this->history[this->unknown_0140]).c_str()); + if (this->history.size() != 0 && this->historyIndex < this->history.size()) { + ++this->historyIndex; + this->SetText((this->historyIndex == this->history.size() ? this->pending : this->history[this->historyIndex]).c_str()); this->OnBeginEdit(); } break; @@ -1085,24 +1085,24 @@ int UIShowAndEditTimeCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t // OFFSET: 0x00853F20 // FUNCTION: fn_10745 void UIEditCtrl3::ClearLineState() { - auto line = this->unknown_0168.begin(); - while (line != this->unknown_0168.end()) { - line = this->unknown_0168.erase(line); + auto line = this->wrappedLines.begin(); + while (line != this->wrappedLines.end()) { + line = this->wrappedLines.erase(line); } - this->unknown_0168.clear(); + this->wrappedLines.clear(); - while (!this->unknown_0174.empty()) { - this->unknown_0174.pop_back(); + while (!this->lineBreaks.empty()) { + this->lineBreaks.pop_back(); } - if (this->unknown_0160) { - delete[] this->unknown_0160; - this->unknown_0160 = nullptr; + if (this->previousLineText) { + delete[] this->previousLineText; + this->previousLineText = nullptr; } - if (this->unknown_0164) { - delete[] this->unknown_0164; - this->unknown_0164 = nullptr; + if (this->nextLineText) { + delete[] this->nextLineText; + this->nextLineText = nullptr; } } @@ -1144,16 +1144,16 @@ void UIChatEditCtrl::Paint() { this->textY = this->topPadding + 2; this->PaintText(); - UIItemTagOnChat* tag = this->unknown_0144; + UIItemTagOnChat* tag = this->itemTags; if (tag != nullptr) { tag->SetTaggedText(this->text, this->geometry.width); - this->unknown_0144->UpdateItemTags(); - UIItemTagOnChat* current = this->unknown_0144; - const int span = static_cast(current->unknown_0140.size() - current->taggedText.size()); - this->unknown_00F0 = span > 0 ? span : 0; - if (current->unknown_011C == 0) { - delete this->unknown_0144; - this->unknown_0144 = nullptr; + this->itemTags->UpdateItemTags(); + UIItemTagOnChat* current = this->itemTags; + const int span = static_cast(current->linkedText.size() - current->taggedText.size()); + this->tagTextLength = span > 0 ? span : 0; + if (current->previousTagCount == 0) { + delete this->itemTags; + this->itemTags = nullptr; } } } diff --git a/Source/UI/Edit/UIItemTagCtrl.h b/Source/UI/Edit/UIItemTagCtrl.h index 870e3653f..315abed4c 100644 --- a/Source/UI/Edit/UIItemTagCtrl.h +++ b/Source/UI/Edit/UIItemTagCtrl.h @@ -30,10 +30,10 @@ public: void AddItemTag(const ITEM_INFO& item, unsigned int color); std::string AddSkillTag(int tagId, unsigned int color); - /* 011C */ int unknown_011C; + /* 011C */ int previousTagCount; /* 0120 */ std::list tags; /* 0128 */ std::string taggedText; - /* 0140 */ std::string unknown_0140; + /* 0140 */ std::string linkedText; /* 0158 */ int tagWidth; }; diff --git a/Source/UI/Emotion/UIEmotionWnd.cpp b/Source/UI/Emotion/UIEmotionWnd.cpp index 731b4fb3f..eef166372 100644 --- a/Source/UI/Emotion/UIEmotionWnd.cpp +++ b/Source/UI/Emotion/UIEmotionWnd.cpp @@ -126,7 +126,7 @@ int UIEmotionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 g_windowMgr.CloseWindow(WID_EMOTIONWND); break; case ID_OPEN_EMOTIONLIST: - if (static_cast(g_windowMgr.unknown_0384) == nullptr) { + if (static_cast(g_windowMgr.cashEmotionListWnd) == nullptr) { g_windowMgr.EnsureWindow(WID_CASHEMOTIONLISTWND); } else { g_windowMgr.CloseWindow(WID_CASHEMOTIONLISTWND); diff --git a/Source/UI/Enchant/EnchantUI.h b/Source/UI/Enchant/EnchantUI.h index 2ac6179e7..4aa876f98 100644 --- a/Source/UI/Enchant/EnchantUI.h +++ b/Source/UI/Enchant/EnchantUI.h @@ -77,12 +77,12 @@ public: class CUITargetItem : public CUIListItem { public: // INLINED - CUITargetItem() : itemIcon(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr) { + CUITargetItem() : itemIcon(nullptr), targetIcon(nullptr), targetText(nullptr) { } /* 00E8 */ CUIGameItem* itemIcon; - /* 00EC */ CUIStaticImage* unknown_00EC; - /* 00F0 */ CUIStaticText* unknown_00F0; + /* 00EC */ CUIStaticImage* targetIcon; + /* 00F0 */ CUIStaticText* targetText; void OnCreate(int width, int height) override; void OnMouseHover(int x, int y) override; @@ -95,11 +95,11 @@ public: class CUIIngredient : public CUIControl { public: explicit CUIIngredient() - : CUIControl(), unknown_0080(nullptr), unknown_0084(nullptr), itemIcon(nullptr), ownedText(nullptr), requiredText(nullptr) { + : CUIControl(), backgroundImage(nullptr), sufficientMaterialImage(nullptr), itemIcon(nullptr), ownedText(nullptr), requiredText(nullptr) { } - /* 0080 */ CUIStaticImage* unknown_0080; - /* 0084 */ CUIStaticImage* unknown_0084; + /* 0080 */ CUIStaticImage* backgroundImage; + /* 0084 */ CUIStaticImage* sufficientMaterialImage; /* 0088 */ CUIGameItem* itemIcon; /* 008C */ CUIStaticText* ownedText; /* 0090 */ CUIStaticText* requiredText; @@ -113,18 +113,18 @@ public: CUIEnchantPage(); union { - /* 0080 */ unsigned char unknown_0080[0x4]; + /* 0080 */ unsigned char backgroundStorage[0x4]; /* 0080 */ CUIStaticImage* background; }; /* 0084 */ CUIGameItem* gameItem; - /* 0088 */ std::map unknown_0088; - /* 0090 */ std::list unknown_0090; + /* 0088 */ std::map slots; + /* 0090 */ std::list ingredients; /* 0098 */ CUIListBoxEx* enchantList; - /* 009C */ CUIStaticText* unknown_009C; - /* 00A0 */ CUIImageButton* unknown_00A0 = nullptr; + /* 009C */ CUIStaticText* costText; + /* 00A0 */ CUIImageButton* enchantButton = nullptr; /* 00A4 */ EnchantInfo* enchantInfo; /* 00A8 */ uint64_t group; - /* 00B0 */ int unknown_00B0; + /* 00B0 */ int selectedSlot; void OnCreate(int width, int height) override; void OnInit() override; @@ -209,7 +209,7 @@ class CUIUpgradePerfect : public CUIUpgradeEnchantPage { public: using CUIUpgradeEnchantPage::CUIUpgradeEnchantPage; - /* 00B8 */ bool unknown_00B8 = false; + /* 00B8 */ bool isUpgrade = false; void OnCreate(int width, int height) override; void OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) override; diff --git a/Source/UI/Enchant/UIEnchantUI.cpp b/Source/UI/Enchant/UIEnchantUI.cpp index 7ead6a02c..b21c47f40 100644 --- a/Source/UI/Enchant/UIEnchantUI.cpp +++ b/Source/UI/Enchant/UIEnchantUI.cpp @@ -123,7 +123,7 @@ EnchantUI::CUIEnchantItem* CUIListBoxExonPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (EnchantUI::CUIEnchantItem* other : this->items) { @@ -132,7 +132,7 @@ EnchantUI::CUIEnchantItem* CUIListBoxExSetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } EnchantUI::CUIEnchantItem* selectedItem = dynamic_cast(listItem); @@ -221,7 +221,7 @@ EnchantUI::CUITargetItem* CUIListBoxEx::Cre } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (EnchantUI::CUITargetItem* other : this->items) { @@ -230,7 +230,7 @@ EnchantUI::CUITargetItem* CUIListBoxEx::Cre } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } EnchantUI::CUITargetItem* selectedItem = dynamic_cast(listItem); @@ -325,8 +325,8 @@ namespace EnchantUI { // OFFSET: 0x009F70C0 // FUNCTION: fn_14768 CUIEnchantPage::CUIEnchantPage() - : CUIControl(), unknown_0080{}, gameItem(nullptr), unknown_0088(), unknown_0090(), enchantList(nullptr), unknown_009C{}, enchantInfo(nullptr), - group(0), unknown_00B0(-1) { + : CUIControl(), backgroundStorage{}, gameItem(nullptr), slots(), ingredients(), enchantList(nullptr), costText{}, enchantInfo(nullptr), + group(0), selectedSlot(-1) { } // OFFSET: 0x009F72F0 @@ -361,8 +361,8 @@ void CUIEnchantItem::OnCreate(int width, int height) { this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(2, 3); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->name = new CUIStaticText(); @@ -395,15 +395,15 @@ void CUITargetItem::OnCreate(int width, int height) { this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(6, 13); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); - this->unknown_00EC = new CUIStaticImage(); - this->unknown_00EC->SetSize(12, 12); - this->unknown_00EC->Move(166, 7); + this->targetIcon = new CUIStaticImage(); + this->targetIcon->SetSize(12, 12); + this->targetIcon->Move(166, 7); { - this->unknown_00EC->SetImage(std::string([]() { + this->targetIcon->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x4F, 0x12, 0x2F, 0x7D, 0xBD, 0x0B, 0x68, 0xB8, 0x49, 0x59, 0x2F, 0x4B, 0xC0, 0x7F, 0xF1, 0x12, 0xFD, 0xDC, 0x8B, 0xE2, 0x22, 0xA0, 0xC3, 0x16, 0xE7, 0xDC, 0x81, 0xF3, 0x21, 0xA2, 0xDF, 0x14, @@ -415,16 +415,16 @@ void CUITargetItem::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_00EC); + this->AddChild(this->targetIcon); - this->unknown_00F0 = new CUIStaticText(); - this->unknown_00F0->SetSize(152, 12); - this->unknown_00F0->Move(38, 23); - this->unknown_00F0->SetText(""); - this->unknown_00F0->SetFitText(1); - this->unknown_00F0->SetAlign(0, 0); + this->targetText = new CUIStaticText(); + this->targetText->SetSize(152, 12); + this->targetText->Move(38, 23); + this->targetText->SetText(""); + this->targetText->SetFitText(1); + this->targetText->SetAlign(0, 0); { - this->unknown_00F0->SetFont(std::string([]() { + this->targetText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x2A, 0xCE, 0xF9, 0x44, 0xFE, 0xFB}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25224 @@ -432,12 +432,12 @@ void CUITargetItem::OnCreate(int width, int height) { return name.Text(); }())); } - this->unknown_00F0->SetFontHeight(12); - this->unknown_00F0->SetBold(1); - this->unknown_00F0->SetColor(0x959595); - this->unknown_00F0->SetShadow(0, 0xFFFFFF); - this->unknown_00F0->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00F0); + this->targetText->SetFontHeight(12); + this->targetText->SetBold(1); + this->targetText->SetColor(0x959595); + this->targetText->SetShadow(0, 0xFFFFFF); + this->targetText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->targetText); } // OFFSET: 0x009F9880 @@ -458,11 +458,11 @@ CUIIngredient* CUIEnchantPage::CreateIngredient() { // OFFSET: 0x009FB800 // FUNCTION: fn_14818 void CUIIngredient::OnCreate(int width, int height) { - this->unknown_0080 = new CUIStaticImage(); - this->unknown_0080->SetSize(70, 50); - this->unknown_0080->Move(0, 0); + this->backgroundImage = new CUIStaticImage(); + this->backgroundImage->SetSize(70, 50); + this->backgroundImage->Move(0, 0); { - this->unknown_0080->SetImage(std::string([]() { + this->backgroundImage->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x5B, 0xF8, 0xC3, 0x63, 0xA7, 0xCB, 0xC0, 0xC8, 0x5D, 0xB3, 0xC3, 0x55, 0xDA, 0xBF, 0x59, 0x40, 0xF5, 0x34, 0x6B, 0xF8, 0x09, 0x71, 0x50, 0x4C, 0xC7, 0x35, 0x64, 0xC6, 0x02, 0x6B, 0x66, 0x5A, @@ -474,13 +474,13 @@ void CUIIngredient::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_0080); + this->AddChild(this->backgroundImage); - this->unknown_0084 = new CUIStaticImage(); - this->unknown_0084->SetSize(70, 50); - this->unknown_0084->Move(0, 0); + this->sufficientMaterialImage = new CUIStaticImage(); + this->sufficientMaterialImage->SetSize(70, 50); + this->sufficientMaterialImage->Move(0, 0); { - this->unknown_0084->SetImage(std::string([]() { + this->sufficientMaterialImage->SetImage(std::string([]() { constexpr std::uint8_t bytes[] = { 0x21, 0xD4, 0x39, 0x2D, 0x15, 0xDD, 0xFC, 0x10, 0x27, 0x9F, 0x39, 0x1B, 0x68, 0xA9, 0x65, 0x98, 0x8F, 0x18, 0x91, 0xB6, 0xBB, 0x67, 0x6C, 0x94, 0xBD, 0x19, 0x9E, 0x88, 0xB0, 0x7D, 0x5A, 0x82, @@ -492,14 +492,14 @@ void CUIIngredient::OnCreate(int width, int height) { return name.Text(); }())); } - this->AddChild(this->unknown_0084); + this->AddChild(this->sufficientMaterialImage); this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(6, 10); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->ownedText = new CUIStaticText(); @@ -589,8 +589,8 @@ void CUISlot0::OnCreate(int width, int height) { radioButton->Invalidate(); } this->itemIcon->Move(69, 11); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->description->Move(0, 44); this->description->SetTextOffset(2, 0); this->description->SetFont(std::string("Gulim")); @@ -631,8 +631,8 @@ void CUISlot1::OnCreate(int width, int height) { radioButton->Invalidate(); } this->itemIcon->Move(69, 11); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->description->Move(0, 44); this->description->SetTextOffset(2, 0); this->description->SetFont(std::string("Gulim")); @@ -673,8 +673,8 @@ void CUISlot2::OnCreate(int width, int height) { radioButton->Invalidate(); } this->itemIcon->Move(13, 11); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->description->Move(10, 44); this->description->SetTextOffset(0, 0); this->description->SetFont(std::string("Gulim")); @@ -715,8 +715,8 @@ void CUISlot3::OnCreate(int width, int height) { radioButton->Invalidate(); } this->itemIcon->Move(13, 11); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->description->Move(10, 44); this->description->SetTextOffset(0, 0); this->description->SetFont(std::string("Gulim")); @@ -928,8 +928,8 @@ void CUISlot::OnCreate(int width, int height) { this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(69, 11); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); this->description = new CUITextViewer(); @@ -1163,7 +1163,7 @@ namespace EnchantUI { // OFFSET: 0x00A02D80 // FUNCTION: fn_14845 void CUIEnchantPage::SetSlot(int value) { - this->unknown_00B0 = value; + this->selectedSlot = value; } // OFFSET: 0x00A05190 @@ -1178,8 +1178,8 @@ void CUIUpgradeEnchantPage::OnSelectSlot(int value) { // OFFSET: 0x00A06B00 // FUNCTION: fn_15006 void CUIUpgradeEnchantPage::SetSlot(int value) { - this->unknown_00B0 = value; - for (const auto& slot : this->unknown_0088) { + this->selectedSlot = value; + for (const auto& slot : this->slots) { const bool selected = value == slot.first; slot.second->radioButton->checked = selected; slot.second->radioButton->Invalidate(); @@ -1199,7 +1199,7 @@ int CUIEnchantPage::FindEmptySlot() { return true; } int card; - std::memcpy(&card, item.unknown_001C + slot * 4, sizeof(card)); + std::memcpy(&card, item.cards + slot * 4, sizeof(card)); return card == 0; }); if (it == slots.end()) { @@ -1333,13 +1333,13 @@ void CUITargetItem::SetSelected(bool selected) { if (selected) { if (this->selected != 1) { this->itemIcon->Move(this->itemIcon->geometry.x + 1, this->itemIcon->geometry.y + 1); - this->unknown_00EC->Move(this->unknown_00EC->geometry.x + 1, this->unknown_00EC->geometry.y + 1); - this->unknown_00F0->Move(this->unknown_00F0->geometry.x + 1, this->unknown_00F0->geometry.y + 1); + this->targetIcon->Move(this->targetIcon->geometry.x + 1, this->targetIcon->geometry.y + 1); + this->targetText->Move(this->targetText->geometry.x + 1, this->targetText->geometry.y + 1); } } else if (this->selected == 1) { this->itemIcon->Move(this->itemIcon->geometry.x - 1, this->itemIcon->geometry.y - 1); - this->unknown_00EC->Move(this->unknown_00EC->geometry.x - 1, this->unknown_00EC->geometry.y - 1); - this->unknown_00F0->Move(this->unknown_00F0->geometry.x - 1, this->unknown_00F0->geometry.y - 1); + this->targetIcon->Move(this->targetIcon->geometry.x - 1, this->targetIcon->geometry.y - 1); + this->targetText->Move(this->targetText->geometry.x - 1, this->targetText->geometry.y - 1); } CUIListItem::SetSelected(selected); } @@ -1354,7 +1354,7 @@ void CUINormalPerfect::RequestEnchant() { ++it; } CEnchantMgr::GetInstance()->RequestPerfectEnchant( - this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1]), static_cast(this->unknown_00B0), it->itemId + this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot), it->itemId ); } } @@ -1363,22 +1363,22 @@ void CUINormalPerfect::RequestEnchant() { // FUNCTION: fn_14966 void CUINormalRandom::RequestEnchant() { CEnchantMgr::GetInstance()->RequestRandomEnchant( - this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1]), static_cast(this->unknown_00B0) + this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); } // OFFSET: 0x00A04F10 // FUNCTION: fn_14967 void CUIReset::RequestEnchant() { - CEnchantMgr::GetInstance()->RequestResetEnchant(this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1])); + CEnchantMgr::GetInstance()->RequestResetEnchant(this->group, static_cast(this->gameItem->GetItemInfo()->identity[1])); } // OFFSET: 0x00A04FB0 // FUNCTION: fn_14968 void CUIUpgradePerfect::RequestEnchant() { - if (this->unknown_00B8) { + if (this->isUpgrade) { CEnchantMgr::GetInstance()->RequestUpgradeEnchant( - this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1]), static_cast(this->unknown_00B0) + this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); return; } @@ -1388,7 +1388,7 @@ void CUIUpgradePerfect::RequestEnchant() { auto it = list->data.begin(); std::advance(it, static_cast(list->selected)); CEnchantMgr::GetInstance()->RequestUpgradePerfectEnchant( - this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1]), static_cast(this->unknown_00B0), it->itemId + this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot), it->itemId ); } } @@ -1397,7 +1397,7 @@ void CUIUpgradePerfect::RequestEnchant() { // FUNCTION: fn_14969 void CUIUpgradeRandom::RequestEnchant() { CEnchantMgr::GetInstance()->RequestUpgradeRandomEnchant( - this->group, static_cast(this->gameItem->GetItemInfo()->unknown_0000[1]), static_cast(this->unknown_00B0) + this->group, static_cast(this->gameItem->GetItemInfo()->identity[1]), static_cast(this->selectedSlot) ); } } @@ -1412,16 +1412,16 @@ bool CUIEnchantUI::CanHitTest() { // FUNCTION: fn_14766 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009F6F00 // FUNCTION: fn_14767 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009F7670 @@ -1458,13 +1458,13 @@ void CUIEnchantUI::SetEnchantGroup(uint64_t group) { continue; } const ITEM_INFO target = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - if (static_cast(target.unknown_0060) < this->enchantInfo->condition1) { + if (static_cast(target.refiningLevel) < this->enchantInfo->condition1) { continue; } - if (static_cast(target.unknown_0088) < this->enchantInfo->condition2) { + if (static_cast(target.grade) < this->enchantInfo->condition2) { continue; } - if (!this->enchantInfo->approveRandomOption && target.unknown_0098 > 0) { + if (!this->enchantInfo->approveRandomOption && target.optionCount > 0) { continue; } this->targetList->data.push_back(target); @@ -1501,12 +1501,12 @@ void CUIEnchantPage::UpdateEnchantItem(CUIEnchantItem* item, const CEnchantItemD // FUNCTION: fn_14979 void UpdateTargetItem(CUITargetItem* item, ITEM_INFO* info) { item->itemIcon->SetItem(*info); - if (info->unknown_0088 > 0) { - item->unknown_00EC->SetImage(std::format("유저인터페이스\\grade_enchant\\grade_icon{}.bmp", info->unknown_0088)); + if (info->grade > 0) { + item->targetIcon->SetImage(std::format("유저인터페이스\\grade_enchant\\grade_icon{}.bmp", info->grade)); } - item->unknown_00EC->Show(info->unknown_0088 > 0); + item->targetIcon->Show(info->grade > 0); const std::string name = info->DisplayName(0); - item->unknown_00F0->SetText(name); + item->targetText->SetText(name); } // OFFSET: 0x00A05E20 // FUNCTION: fn_14984 @@ -1528,7 +1528,7 @@ void CUIMainPage::OnInit() { // OFFSET: 0x009F3160 // FUNCTION: fn_14752 void CUIEnchantUI::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(690, 470); this->Move(0, 0); @@ -1541,7 +1541,7 @@ void CUIEnchantUI::Initialize() { void EnchantUI::CUIUpgradeRandom::OnInit() { EnchantUI::CUIEnchantPage::OnInit(); auto* const list = this->enchantList; - list->unknown_00C4 = 1; + list->layoutFlag = 1; list->Invalidate(); } @@ -1552,7 +1552,7 @@ void CUIEnchantPage::OnInit() { for (int i = 0; i < 8; ++i) { CUIIngredient* ingredient = this->CreateIngredient(); ingredient->Move(ingredient->geometry.x + i % 4 * 74, ingredient->geometry.y + i / 4 * 52); - this->unknown_0090.push_back(ingredient); + this->ingredients.push_back(ingredient); } this->ResetSlots(); @@ -1562,7 +1562,7 @@ void CUIEnchantPage::OnInit() { // FUNCTION: fn_14985 void CUINormalPerfect::OnInit() { CUIEnchantPage::OnInit(); - for (const auto& slot : this->unknown_0088) { + for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); @@ -1573,14 +1573,14 @@ void CUINormalPerfect::OnInit() { // FUNCTION: fn_14986 void CUINormalRandom::OnInit() { CUIEnchantPage::OnInit(); - for (const auto& slot : this->unknown_0088) { + for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); } auto* const list = this->enchantList; - list->unknown_00C4 = 1; + list->layoutFlag = 1; list->Invalidate(); } @@ -1588,14 +1588,14 @@ void CUINormalRandom::OnInit() { // FUNCTION: fn_14987 void CUIReset::OnInit() { CUIEnchantPage::OnInit(); - for (const auto& slot : this->unknown_0088) { + for (const auto& slot : this->slots) { auto* const radioButton = slot.second->radioButton; radioButton->disabled = 1; radioButton->Invalidate(); } auto* const list = this->enchantList; - list->unknown_00C4 = 1; + list->layoutFlag = 1; list->Invalidate(); } @@ -1603,13 +1603,13 @@ void CUIReset::OnInit() { // FUNCTION: fn_15002 void CUIEnchantPage::UpdateEnchantInfo() { this->enchantList->ClearData(); - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } - this->unknown_009C->SetText(std::to_string(0)); + this->costText->SetText(std::to_string(0)); { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } @@ -1626,13 +1626,13 @@ void CUIEnchantPage::UpdateEnchantInfo() { // OFFSET: 0x00A06520 // FUNCTION: fn_15003 void CUIReset::UpdateEnchantInfo() { - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } - this->unknown_009C->SetText(std::to_string(0)); + this->costText->SetText(std::to_string(0)); { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } @@ -1643,18 +1643,18 @@ void CUIReset::UpdateEnchantInfo() { // OFFSET: 0x00A06800 // FUNCTION: fn_15004 void CUIEnchantPage::ResetSlots() { - for (const auto& slot : this->unknown_0088) { + for (const auto& slot : this->slots) { slot.second->Show(0); } - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } this->enchantList->ClearData(); - this->unknown_009C->SetText(std::to_string(0)); + this->costText->SetText(std::to_string(0)); { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } @@ -1696,13 +1696,13 @@ namespace EnchantUI { // OFFSET: 0x00A05470 // FUNCTION: fn_14975 void CUINormalPerfect::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) { - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } - this->unknown_009C->SetText(std::to_string(0)); + this->costText->SetText(std::to_string(0)); - std::optional option = this->FindOption(this->unknown_00B0); + std::optional option = this->FindOption(this->selectedSlot); if (option && (*option)->perfectEnchants.size() != 0) { const int itemId = std::atoi(item->itemIcon->GetItemInfo()->itemId.c_str()); auto it = (*option)->perfectEnchants.find(itemId); @@ -1715,15 +1715,15 @@ void CUINormalPerfect::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemD // OFFSET: 0x00A05640 // FUNCTION: fn_14976 void CUIUpgradePerfect::OnSelectEnchant(CUIEnchantItem* item, const CEnchantItemData& data) { - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { ingredient->Show(0); } - this->unknown_009C->SetText(std::to_string(0)); + this->costText->SetText(std::to_string(0)); - std::optional option = this->FindOption(this->unknown_00B0); + std::optional option = this->FindOption(this->selectedSlot); if (option && (*option)->perfectUpgrades.size() != 0) { - const int baseItemId = std::atoi(this->unknown_0088[this->unknown_00B0]->itemIcon->GetItemInfo()->itemId.c_str()); + const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = (*option)->perfectUpgrades.find(baseItemId); if (base != (*option)->perfectUpgrades.end()) { const int itemId = std::atoi(item->itemIcon->GetItemInfo()->itemId.c_str()); @@ -1741,7 +1741,7 @@ bool CUIReset::LoadEnchantList() { this->SetCost(*reinterpret_cast(&this->enchantInfo->resetCost)); if (!this->enchantInfo->resetEnabled) { { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = 1; button->Invalidate(); } @@ -1754,12 +1754,12 @@ bool CUIReset::LoadEnchantList() { return false; } int card; - std::memcpy(&card, item.unknown_001C + slot * 4, sizeof(card)); + std::memcpy(&card, item.cards + slot * 4, sizeof(card)); return card != 0; }); if (empty) { { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = empty; button->Invalidate(); } @@ -1770,16 +1770,16 @@ bool CUIReset::LoadEnchantList() { // OFFSET: 0x00A079E0 // FUNCTION: fn_15014 bool CUIEnchantPage::SetItem(const ITEM_INFO& item) { - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return false; } this->gameItem->SetItem(item); - for (const auto& entry : this->unknown_0088) { + for (const auto& entry : this->slots) { CUISlot* slot = entry.second; int card = 0; if (entry.first < 4) { - std::memcpy(&card, item.unknown_001C + entry.first * 4, sizeof(card)); + std::memcpy(&card, item.cards + entry.first * 4, sizeof(card)); } if (card > 0) { ITEM_INFO cardInfo; @@ -1810,7 +1810,7 @@ void CUIIngredient::SetMaterial(int itemId, int required) { this->requiredText->SetText(std::format("/{}", required)); const bool enough = owned >= required; - this->unknown_0084->Show(enough); + this->sufficientMaterialImage->Show(enough); const std::uint32_t color = enough ? 0xF0F0F0 : 0x5A3CE6; this->ownedText->SetColor(color); this->ownedText->SetOutline(enough, 0x965532); @@ -1822,7 +1822,7 @@ void CUIIngredient::SetMaterial(int itemId, int required) { // FUNCTION: fn_15016 void CUIEnchantPage::SetCost(const EnchantPerfectInfo& info) { auto material = info.materials.begin(); - for (CUIIngredient* ingredient : this->unknown_0090) { + for (CUIIngredient* ingredient : this->ingredients) { if (material == info.materials.end()) { ingredient->Show(0); } else { @@ -1832,14 +1832,14 @@ void CUIEnchantPage::SetCost(const EnchantPerfectInfo& info) { } } - this->unknown_009C->SetText(std::to_string(info.cost)); + this->costText->SetText(std::to_string(info.cost)); const bool lackZeny = g_session.m_zeny < info.cost; - const bool lackMaterial = std::any_of(this->unknown_0090.begin(), this->unknown_0090.end(), [](CUIIngredient* ingredient) { - return ingredient->geometry.visible && !ingredient->unknown_0084->geometry.visible; + const bool lackMaterial = std::any_of(this->ingredients.begin(), this->ingredients.end(), [](CUIIngredient* ingredient) { + return ingredient->geometry.visible && !ingredient->sufficientMaterialImage->geometry.visible; }); { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = lackZeny || lackMaterial; button->Invalidate(); } @@ -1863,7 +1863,7 @@ bool CUINormalRandom::LoadEnchantList() { return false; } - auto grade = (*option)->enchants.find(this->gameItem->GetItemInfo()->unknown_0088); + auto grade = (*option)->enchants.find(this->gameItem->GetItemInfo()->grade); if (grade == (*option)->enchants.end()) { return false; } @@ -1884,16 +1884,16 @@ bool CUINormalRandom::LoadEnchantList() { // OFFSET: 0x00A075E0 // FUNCTION: fn_15013 bool CUIUpgradeRandom::LoadEnchantList() { - if (this->unknown_00B0 == -1) { + if (this->selectedSlot == -1) { return false; } - std::optional option = this->FindOption(this->unknown_00B0); + std::optional option = this->FindOption(this->selectedSlot); if (!option || (*option)->randomUpgrades.size() == 0) { return false; } - const int baseItemId = std::atoi(this->unknown_0088[this->unknown_00B0]->itemIcon->GetItemInfo()->itemId.c_str()); + const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = (*option)->randomUpgrades.find(baseItemId); if (base == (*option)->randomUpgrades.end()) { return false; @@ -1915,21 +1915,21 @@ bool CUIUpgradeRandom::LoadEnchantList() { // OFFSET: 0x00A07440 // FUNCTION: fn_15012 bool CUIUpgradePerfect::LoadEnchantList() { - if (this->unknown_00B0 == -1) { + if (this->selectedSlot == -1) { return false; } - std::optional option = this->FindOption(this->unknown_00B0); + std::optional option = this->FindOption(this->selectedSlot); if (!option) { return false; } - this->unknown_00B8 = (*option)->isUpgrade; + this->isUpgrade = (*option)->isUpgrade; if ((*option)->perfectUpgrades.size() == 0) { return false; } - const int baseItemId = std::atoi(this->unknown_0088[this->unknown_00B0]->itemIcon->GetItemInfo()->itemId.c_str()); + const int baseItemId = std::atoi(this->slots[this->selectedSlot]->itemIcon->GetItemInfo()->itemId.c_str()); auto base = (*option)->perfectUpgrades.find(baseItemId); if (base == (*option)->perfectUpgrades.end() || base->second.size() == 0) { return false; @@ -1972,33 +1972,33 @@ void CUIEnchantPage::OnCreate(int width, int height) { this->gameItem->SetMode(1); this->gameItem->SetScale(100); this->gameItem->Move(112, 5); - this->gameItem->unknown_0084 = 1; - this->gameItem->unknown_0085 = 1; + this->gameItem->showNameTooltip = 1; + this->gameItem->allowItemInfo = 1; this->AddChild(this->gameItem); CUISlot* slot = new CUISlot0; slot->SetSize(106, 84); slot->Move(6, 20); this->AddChild(slot); - this->unknown_0088[0] = slot; + this->slots[0] = slot; slot = new CUISlot1; slot->SetSize(106, 84); slot->Move(29, 105); this->AddChild(slot); - this->unknown_0088[1] = slot; + this->slots[1] = slot; slot = new CUISlot2; slot->SetSize(106, 84); slot->Move(164, 105); this->AddChild(slot); - this->unknown_0088[2] = slot; + this->slots[2] = slot; slot = new CUISlot3; slot->SetSize(106, 84); slot->Move(187, 20); this->AddChild(slot); - this->unknown_0088[3] = slot; + this->slots[3] = slot; CUIListBoxEx* enchantList = new CUIListBoxEx; this->enchantList = enchantList; @@ -2108,14 +2108,14 @@ void CUIEnchantPage::OnCreate(int width, int height) { this->enchantList->AddNewItem(); this->AddChild(this->enchantList); - this->unknown_009C = new CUIStaticText; - this->unknown_009C->SetSize(100, 15); - this->unknown_009C->Move(150, 309); - this->unknown_009C->SetText(""); - this->unknown_009C->SetFitText(0); - this->unknown_009C->SetAlign(2, 6); + this->costText = new CUIStaticText; + this->costText->SetSize(100, 15); + this->costText->Move(150, 309); + this->costText->SetText(""); + this->costText->SetFitText(0); + this->costText->SetAlign(2, 6); { - this->unknown_009C->SetFont(std::string([]() { + this->costText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x5A, 0x70, 0xFF, 0x40, 0x1C, 0x23}; constexpr EncryptedSource<6> source(bytes); // GLOBAL: gl_25268 @@ -2123,27 +2123,27 @@ void CUIEnchantPage::OnCreate(int width, int height) { return name.Text(); }())); } - this->unknown_009C->SetFontHeight(14); - this->unknown_009C->SetBold(1); - this->unknown_009C->SetColor(0); - this->unknown_009C->SetShadow(0, 0xFFFFFF); - this->unknown_009C->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_009C); + this->costText->SetFontHeight(14); + this->costText->SetBold(1); + this->costText->SetColor(0); + this->costText->SetShadow(0, 0xFFFFFF); + this->costText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->costText); - this->unknown_00A0 = new CUIImageButton; - this->unknown_00A0->SetSize(140, 40); - this->unknown_00A0->Move(80, 330); - this->unknown_00A0->SetOnClick([this]() { this->RequestEnchant(); }); + this->enchantButton = new CUIImageButton; + this->enchantButton->SetSize(140, 40); + this->enchantButton->Move(80, 330); + this->enchantButton->SetOnClick([this]() { this->RequestEnchant(); }); { - CUIImageButton* button = this->unknown_00A0; + CUIImageButton* button = this->enchantButton; button->disabled = 0; button->Invalidate(); } - this->unknown_00A0->SetImages( + this->enchantButton->SetImages( std::string("유저인터페이스\\EnchantUI\\btn_enc.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_press.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_over.bmp"), std::string("유저인터페이스\\EnchantUI\\btn_enc_dis.bmp") ); - this->AddChild(this->unknown_00A0); + this->AddChild(this->enchantButton); } // OFFSET: 0x009FCDE0 diff --git a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp index 6e897bec0..1695a749e 100644 --- a/Source/UI/EntryQueue/UIEntryQueueWnd.cpp +++ b/Source/UI/EntryQueue/UIEntryQueueWnd.cpp @@ -448,7 +448,7 @@ void UIEntryQueueWnd::Paint() { EntryQueueInfo* info = g_entryQueueMgr->current; if (info) { const std::string path = "유저인터페이스\\battle_field\\"; - CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve((path + info->unknown_0634).c_str()))); + CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve((path + info->bitmapName).c_str()))); if (bitmap) { this->DrawBitmap(157, 25, bitmap, false); } @@ -489,9 +489,9 @@ int UIEntryQueueWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std error = 0x86C; } else if (g_session.PartyCount() == 0) { error = 0x86D; - } else if (g_session.unknown_5464 == 0) { + } else if (g_session.partyLeader == 0) { error = 0x86E; - } else if (static_cast(g_entryQueueMgr->current->unknown_020C) < + } else if (static_cast(g_entryQueueMgr->current->minLevel) < static_cast(g_session.OnlinePartyCount())) { error = 0x86F; } else { @@ -509,9 +509,9 @@ int UIEntryQueueWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std error = 0x86C; } else if (guild->m_guildId < 1) { error = 0x870; - } else if (guild->unknown_00B4 == 0) { + } else if (guild->isMaster == 0) { error = 0x871; - } else if (static_cast(g_entryQueueMgr->current->unknown_020C) < static_cast(guild->unknown_0068)) { + } else if (static_cast(g_entryQueueMgr->current->minLevel) < static_cast(guild->onlineMemberCount)) { error = 0x872; } else { if (this->ConfirmApply(LookupMessage(MSI_BATTLEFIELD_LEVELDOWN_D))) { @@ -576,30 +576,30 @@ void UIEntryQueueWnd::SelectQueue(EntryQueueInfo* info) { strcpy_s(text, sizeof(text), info->displayName); break; case 2: - sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_LEVEL_D_D), info->unknown_020C, info->unknown_0210); + sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_LEVEL_D_D), info->minLevel, info->maxLevel); break; case 3: - if (info->unknown_0218 == 1) { - sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_LIMITLESS), info->unknown_021C); - } else if (info->unknown_0218 == 2) { - sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_MSG_NOT_JOINMAP), info->unknown_021C); - } else if (info->unknown_0218 == 3) { - sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_MSG_WAIT_1MM), info->unknown_021C, info->unknown_0220); + if (info->limitType == 1) { + sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_LIMITLESS), info->limitValue); + } else if (info->limitType == 2) { + sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_MSG_NOT_JOINMAP), info->limitValue); + } else if (info->limitType == 3) { + sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_MSG_WAIT_1MM), info->limitValue, info->limitValueEnd); } else { sprintf_s(text, sizeof(text), LookupMessage(MSI_BATTLEFIELD_MSG_PLZ_PALTYJOIN)); } break; case 4: - strcpy_s(text, sizeof(text), info->unknown_0224); + strcpy_s(text, sizeof(text), info->description); break; case 5: - strcpy_s(text, sizeof(text), info->unknown_0328); + strcpy_s(text, sizeof(text), info->rulesText); break; case 6: - strcpy_s(text, sizeof(text), info->unknown_042C); + strcpy_s(text, sizeof(text), info->rewardText); break; case 1: - strcpy_s(text, sizeof(text), info->unknown_0530); + strcpy_s(text, sizeof(text), info->extraText); break; } diff --git a/Source/UI/Exchange/UIExchangeUI.cpp b/Source/UI/Exchange/UIExchangeUI.cpp index 1d448af96..e689bbef4 100644 --- a/Source/UI/Exchange/UIExchangeUI.cpp +++ b/Source/UI/Exchange/UIExchangeUI.cpp @@ -83,8 +83,8 @@ bool UnusedTrueA0F7B0() { // FUNCTION: fn_15180 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A0FA00 @@ -108,7 +108,7 @@ void CUIListBoxEx::ClearItems() { // OFFSET: 0x00A10140 // FUNCTION: fn_15189 void CUIExchangeUI::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(560, 377); this->Move(0, 0); @@ -221,7 +221,7 @@ void CUIExchangeUI::Cancel() { } mode->SendMsg(MM_CANCEL_EXCHANGE_ITEM, 0, 0, 0, 0); - CUIImageButton* button = this->unknown_0118; + CUIImageButton* button = this->cancelButton; button->disabled = 1; button->Invalidate(); } @@ -261,7 +261,7 @@ void CUIExchangeUI::SubmitZeny() { amount = value < 0 ? 0 : value; } - mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.unknown_5210 + amount, 0, 0); + mode->SendMsg(MM_ADD_EXCHANGE_ITEM, 0, g_session.exchangeMoney + amount, 0, 0); mode->SendMsg(MM_CONCLUDE_EXCHANGE_ITEM, 0, 0, 0, 0); this->lockButton->disabled = 1; this->lockButton->Invalidate(); @@ -292,7 +292,7 @@ void CUIExchangeUI::DragAndDrop(int x, int y, std::intptr_t value) { return; } - if (this->firstList->unknown_00C4) { + if (this->firstList->layoutFlag) { mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return; } @@ -351,7 +351,7 @@ void CUIExchangeUI::OnInit() { this->titleBar->SetTitle(title); } - this->unknown_010C->SetText(LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE)); + this->screenshotLabel->SetText(LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE)); for (int count = 10; count != 0; --count) { this->firstList->AddData(ExchangeUI::CItemData(ITEM_INFO(), 0), false); @@ -445,13 +445,13 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->partnerName = reinterpret_cast(argument1); if (argument2 > 0) { if (g_serviceType == 6) { - this->unknown_00DC->SetText(std::format("{} Lv{}", this->partnerName, static_cast(argument3))); + this->partnerText->SetText(std::format("{} Lv{}", this->partnerName, static_cast(argument3))); } else { std::string job = ShortcutFilename(argument2); - this->unknown_00DC->SetText(std::format("{} Lv{} ({})", this->partnerName, static_cast(argument3), job)); + this->partnerText->SetText(std::format("{} Lv{} ({})", this->partnerName, static_cast(argument3), job)); } } else { - this->unknown_00DC->SetText(this->partnerName); + this->partnerText->SetText(this->partnerName); } break; case UM_MYDRAGCLOSED: @@ -460,7 +460,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->UpdateZeny(true); { CUIImageButton* button = this->tradeButton; - if (this->firstList->unknown_00C4 && this->secondList->unknown_00C4) { + if (this->firstList->layoutFlag && this->secondList->layoutFlag) { button->disabled = 0; } else { button->disabled = 1; @@ -473,7 +473,7 @@ int CUIExchangeUI::SendMsg(UIWindow* sender, int message, std::intptr_t argument this->UpdateZeny(false); { CUIImageButton* button = this->tradeButton; - if (this->firstList->unknown_00C4 && this->secondList->unknown_00C4) { + if (this->firstList->layoutFlag && this->secondList->layoutFlag) { button->disabled = 0; } else { button->disabled = 1; @@ -527,17 +527,17 @@ void CUIExchangeUI::BindItem(ExchangeUI::CUIItem* item, const ExchangeUI::CItemD const int quantity = data.item.quantity; const bool visible = quantity > 0; item->itemIcon->Show(visible); - item->unknown_00F0->Show(visible); - item->unknown_00F4->Show(visible); + item->quantityText->Show(visible); + item->itemNameText->Show(visible); item->itemIcon->SetItem(data.item); - item->unknown_00F0->SetText(quantity > 0 ? std::to_string(data.item.quantity) : ""); - item->unknown_00F4->SetText(quantity > 0 ? data.item.DisplayName(0) : ""); - item->unknown_00F4->SetTooltip("", 0); + item->quantityText->SetText(quantity > 0 ? std::to_string(data.item.quantity) : ""); + item->itemNameText->SetText(quantity > 0 ? data.item.DisplayName(0) : ""); + item->itemNameText->SetTooltip("", 0); if (data.frozen) { item->SetFrozen(true); - item->unknown_00E8->Show(0); + item->slotBackground->Show(0); } } @@ -561,15 +561,15 @@ void CUIExchangeUI::UpdateZeny(bool mine) { CUIStaticText* third; int zeny; if (mine) { - first = this->unknown_00E8; - second = this->unknown_00EC; - third = this->unknown_00F0; - zeny = g_session.unknown_5210; + first = this->ownZenyHighlight; + second = this->ownZenyText; + third = this->ownZenyShadow; + zeny = g_session.exchangeMoney; } else { - first = this->unknown_00FC; - second = this->unknown_0100; - third = this->unknown_0104; - zeny = g_session.unknown_5214; + first = this->partnerZenyHighlight; + second = this->partnerZenyText; + third = this->partnerZenyShadow; + zeny = g_session.otherExchangeMoney; } char text[24]; @@ -591,7 +591,7 @@ void CUIExchangeUI::FreezeItems(bool mine) { data.frozen = true; } list->UpdateScrollBar(); - list->unknown_00C4 = 1; + list->layoutFlag = 1; list->Invalidate(); } @@ -632,49 +632,49 @@ private: // OFFSET: 0x00A149B0 // FUNCTION: fn_15192 void ExchangeUI::CUIItem::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticImage(); - this->unknown_00E8->SetSize(32, 32); - this->unknown_00E8->Move(9, 0); - this->unknown_00E8->SetImage(std::string(DecryptName<0x75ADC57D87EFBD8FULL>({'\x4F', '\x12', '\x2F', '\x7D', '\xBD', '\x0B', '\x68', '\xB8', '\x49', '\x59', '\x2F', '\x4B', '\xC0', '\x7F', '\xF1', '\x17', + this->slotBackground = new CUIStaticImage(); + this->slotBackground->SetSize(32, 32); + this->slotBackground->Move(9, 0); + this->slotBackground->SetImage(std::string(DecryptName<0x75ADC57D87EFBD8FULL>({'\x4F', '\x12', '\x2F', '\x7D', '\xBD', '\x0B', '\x68', '\xB8', '\x49', '\x59', '\x2F', '\x4B', '\xC0', '\x7F', '\xF1', '\x17', '\xEE', '\xCE', '\x86', '\xE4', '\x22', '\xAC', '\xC3', '\x01', '\xEA', '\xCF', '\x89', '\xE6', '\x1E', '\xA0', '\xF1', '\x1C', '\xFB', '\xD8', '\x82', '\xF0', '\x14', '\xAB', '\xF2', '\x18', '\xE6', '\xD9', '\xC1', '\xE5', '\x10', '\xB5', '\xAD'}))); - this->AddChild(this->unknown_00E8); + this->AddChild(this->slotBackground); this->itemIcon = new CUIGameItem(); this->itemIcon->SetMode(0); this->itemIcon->SetScale(100); this->itemIcon->Move(13, 1); - this->itemIcon->unknown_0084 = 1; - this->itemIcon->unknown_0085 = 1; + this->itemIcon->showNameTooltip = 1; + this->itemIcon->allowItemInfo = 1; this->AddChild(this->itemIcon); - this->unknown_00F0 = new CUIStaticText(); - this->unknown_00F0->SetSize(100, 13); - this->unknown_00F0->Move(25, 15); - this->unknown_00F0->SetText(""); - this->unknown_00F0->SetFitText(0); - this->unknown_00F0->SetAlign(0, 6); - this->unknown_00F0->SetFont(std::string(DecryptName<0xC517FB932D95BB6DULL>({'\x2A', '\xCE', '\xF9', '\x44', '\xFE', '\xFB'}))); - this->unknown_00F0->SetFontHeight(11); - this->unknown_00F0->SetBold(0); - this->unknown_00F0->SetColor(0); - this->unknown_00F0->SetShadow(0, 0xFFFFFF); - this->unknown_00F0->SetOutline(1, 0xFFFFFF); - this->AddChild(this->unknown_00F0); + this->quantityText = new CUIStaticText(); + this->quantityText->SetSize(100, 13); + this->quantityText->Move(25, 15); + this->quantityText->SetText(""); + this->quantityText->SetFitText(0); + this->quantityText->SetAlign(0, 6); + this->quantityText->SetFont(std::string(DecryptName<0xC517FB932D95BB6DULL>({'\x2A', '\xCE', '\xF9', '\x44', '\xFE', '\xFB'}))); + this->quantityText->SetFontHeight(11); + this->quantityText->SetBold(0); + this->quantityText->SetColor(0); + this->quantityText->SetShadow(0, 0xFFFFFF); + this->quantityText->SetOutline(1, 0xFFFFFF); + this->AddChild(this->quantityText); - this->unknown_00F4 = new CUIStaticText(); - this->unknown_00F4->SetSize(215, 30); - this->unknown_00F4->Move(45, 0); - this->unknown_00F4->SetText(""); - this->unknown_00F4->SetFitText(1); - this->unknown_00F4->SetAlign(0, 6); - this->unknown_00F4->SetFont(std::string(DecryptName<0x23BBD58F8B5FF5C9ULL>({'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}))); - this->unknown_00F4->SetFontHeight(12); - this->unknown_00F4->SetBold(0); - this->unknown_00F4->SetColor(0); - this->unknown_00F4->SetShadow(0, 0xFFFFFF); - this->unknown_00F4->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00F4); + this->itemNameText = new CUIStaticText(); + this->itemNameText->SetSize(215, 30); + this->itemNameText->Move(45, 0); + this->itemNameText->SetText(""); + this->itemNameText->SetFitText(1); + this->itemNameText->SetAlign(0, 6); + this->itemNameText->SetFont(std::string(DecryptName<0x23BBD58F8B5FF5C9ULL>({'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}))); + this->itemNameText->SetFontHeight(12); + this->itemNameText->SetBold(0); + this->itemNameText->SetColor(0); + this->itemNameText->SetShadow(0, 0xFFFFFF); + this->itemNameText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->itemNameText); } // OFFSET: 0x00A103F0 @@ -737,14 +737,14 @@ void CUIExchangeUI::OnCreate(int width, int height) { this->titleBar->titleText = title; this->titleBar->AddChild(title); - this->unknown_00DC = new CUIStaticText(); - this->unknown_00DC->SetSize(495, 17); - this->unknown_00DC->Move(62, 0); - this->unknown_00DC->SetText(""); - this->unknown_00DC->SetFitText(1); - this->unknown_00DC->SetAlign(0, 6); + this->partnerText = new CUIStaticText(); + this->partnerText->SetSize(495, 17); + this->partnerText->Move(62, 0); + this->partnerText->SetText(""); + this->partnerText->SetFitText(1); + this->partnerText->SetAlign(0, 6); { - CUIStaticText* partner = this->unknown_00DC; + CUIStaticText* partner = this->partnerText; const char partnerFontSource[] = { '\x28', '\x08', '\x97', '\x4A', '\x1C', '\x07' }; @@ -752,18 +752,18 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName partnerFontName(partnerFontSource); partner->SetFont(std::string(partnerFontName.Text())); } - this->unknown_00DC->SetFontHeight(12); - this->unknown_00DC->SetBold(0); - this->unknown_00DC->SetColor(0); - this->unknown_00DC->SetShadow(1, 0xB4B4B4); - this->unknown_00DC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00DC); + this->partnerText->SetFontHeight(12); + this->partnerText->SetBold(0); + this->partnerText->SetColor(0); + this->partnerText->SetShadow(1, 0xB4B4B4); + this->partnerText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->partnerText); - this->unknown_00E0 = new CUIStaticImage(); - this->unknown_00E0->SetSize(560, 360); - this->unknown_00E0->Move(0, 17); + this->backgroundImage = new CUIStaticImage(); + this->backgroundImage->SetSize(560, 360); + this->backgroundImage->Move(0, 17); { - CUIStaticImage* background = this->unknown_00E0; + CUIStaticImage* background = this->backgroundImage; const char backgroundSource[] = { '\x83', '\x86', '\x93', '\xDD', '\x15', '\x71', '\x8C', '\x54', '\x85', '\xCD', '\x93', '\xEB', '\x68', '\x05', '\x15', '\xFB', '\x22', '\x5A', '\x3A', '\x44', '\x8A', '\xD6', '\x27', '\xED', '\x26', '\x5B', '\x35', '\x46', '\xB6', '\xDA', '\x15', '\xFC', @@ -773,7 +773,7 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName backgroundName(backgroundSource); background->SetImage(std::string(backgroundName.Text())); } - this->AddChild(this->unknown_00E0); + this->AddChild(this->backgroundImage); this->firstList = new ExchangeUI::CItemListBox(); this->firstList->itemWidth = 272; @@ -844,21 +844,21 @@ void CUIExchangeUI::OnCreate(int width, int height) { this->firstList->AddNewItem(); this->AddChild(this->firstList); - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(150, 18); - this->unknown_00E8->Move(69, 330); + this->ownZenyHighlight = new CUIStaticText(); + this->ownZenyHighlight->SetSize(150, 18); + this->ownZenyHighlight->Move(69, 330); { const char zenySource[] = { '\x97', '\xF5' }; // GLOBAL: gl_25406 thread_local EncryptedName zenyName(zenySource); - this->unknown_00E8->SetText(zenyName.Text()); + this->ownZenyHighlight->SetText(zenyName.Text()); } - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(2, 6); + this->ownZenyHighlight->SetFitText(0); + this->ownZenyHighlight->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->ownZenyHighlight; const char zenyFontSource[] = { '\xFC', '\xCF', '\x84', '\x56', '\xD7', '\xBF' }; @@ -866,28 +866,28 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_00E8->SetFontHeight(16); - this->unknown_00E8->SetBold(0); - this->unknown_00E8->SetColor(0xFFFF00); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->ownZenyHighlight->SetFontHeight(16); + this->ownZenyHighlight->SetBold(0); + this->ownZenyHighlight->SetColor(0xFFFF00); + this->ownZenyHighlight->SetShadow(0, 0xFFFFFF); + this->ownZenyHighlight->SetOutline(0, 0xFFFFFF); + this->AddChild(this->ownZenyHighlight); - this->unknown_00EC = new CUIStaticText(); - this->unknown_00EC->SetSize(150, 18); - this->unknown_00EC->Move(70, 330); + this->ownZenyText = new CUIStaticText(); + this->ownZenyText->SetSize(150, 18); + this->ownZenyText->Move(70, 330); { const char zenySource[] = { '\xBF', '\x99' }; // GLOBAL: gl_25408 thread_local EncryptedName zenyName(zenySource); - this->unknown_00EC->SetText(zenyName.Text()); + this->ownZenyText->SetText(zenyName.Text()); } - this->unknown_00EC->SetFitText(0); - this->unknown_00EC->SetAlign(2, 6); + this->ownZenyText->SetFitText(0); + this->ownZenyText->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_00EC; + CUIStaticText* text = this->ownZenyText; const char zenyFontSource[] = { '\xD6', '\x83', '\x88', '\xBC', '\xBD', '\x93' }; @@ -895,28 +895,28 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_00EC->SetFontHeight(16); - this->unknown_00EC->SetBold(0); - this->unknown_00EC->SetColor(0xFFFF00); - this->unknown_00EC->SetShadow(0, 0xFFFFFF); - this->unknown_00EC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00EC); + this->ownZenyText->SetFontHeight(16); + this->ownZenyText->SetBold(0); + this->ownZenyText->SetColor(0xFFFF00); + this->ownZenyText->SetShadow(0, 0xFFFFFF); + this->ownZenyText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->ownZenyText); - this->unknown_00F0 = new CUIStaticText(); - this->unknown_00F0->SetSize(150, 18); - this->unknown_00F0->Move(70, 331); + this->ownZenyShadow = new CUIStaticText(); + this->ownZenyShadow->SetSize(150, 18); + this->ownZenyShadow->Move(70, 331); { const char zenySource[] = { '\xFD', '\xF1' }; // GLOBAL: gl_25410 thread_local EncryptedName zenyName(zenySource); - this->unknown_00F0->SetText(zenyName.Text()); + this->ownZenyShadow->SetText(zenyName.Text()); } - this->unknown_00F0->SetFitText(0); - this->unknown_00F0->SetAlign(2, 6); + this->ownZenyShadow->SetFitText(0); + this->ownZenyShadow->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_00F0; + CUIStaticText* text = this->ownZenyShadow; const char zenyFontSource[] = { '\x3E', '\x67', '\xE4', '\x70', '\x5B', '\x0F' }; @@ -924,12 +924,12 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_00F0->SetFontHeight(16); - this->unknown_00F0->SetBold(0); - this->unknown_00F0->SetColor(0x323232); - this->unknown_00F0->SetShadow(0, 0xFFFFFF); - this->unknown_00F0->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00F0); + this->ownZenyShadow->SetFontHeight(16); + this->ownZenyShadow->SetBold(0); + this->ownZenyShadow->SetColor(0x323232); + this->ownZenyShadow->SetShadow(0, 0xFFFFFF); + this->ownZenyShadow->SetOutline(0, 0xFFFFFF); + this->AddChild(this->ownZenyShadow); this->zenyEdit = new CUIEditBoxEx(); this->zenyEdit->Create(100, 16, false); @@ -1015,21 +1015,21 @@ void CUIExchangeUI::OnCreate(int width, int height) { this->secondList->AddNewItem(); this->AddChild(this->secondList); - this->unknown_00FC = new CUIStaticText(); - this->unknown_00FC->SetSize(150, 18); - this->unknown_00FC->Move(349, 330); + this->partnerZenyHighlight = new CUIStaticText(); + this->partnerZenyHighlight->SetSize(150, 18); + this->partnerZenyHighlight->Move(349, 330); { const char zenySource[] = { '\x2D', '\x05' }; // GLOBAL: gl_25418 thread_local EncryptedName zenyName(zenySource); - this->unknown_00FC->SetText(zenyName.Text()); + this->partnerZenyHighlight->SetText(zenyName.Text()); } - this->unknown_00FC->SetFitText(0); - this->unknown_00FC->SetAlign(2, 6); + this->partnerZenyHighlight->SetFitText(0); + this->partnerZenyHighlight->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_00FC; + CUIStaticText* text = this->partnerZenyHighlight; const char zenyFontSource[] = { '\x0E', '\x15', '\x84', '\xE4', '\x65', '\x37' }; @@ -1037,28 +1037,28 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_00FC->SetFontHeight(16); - this->unknown_00FC->SetBold(0); - this->unknown_00FC->SetColor(0xFFFF00); - this->unknown_00FC->SetShadow(0, 0xFFFFFF); - this->unknown_00FC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00FC); + this->partnerZenyHighlight->SetFontHeight(16); + this->partnerZenyHighlight->SetBold(0); + this->partnerZenyHighlight->SetColor(0xFFFF00); + this->partnerZenyHighlight->SetShadow(0, 0xFFFFFF); + this->partnerZenyHighlight->SetOutline(0, 0xFFFFFF); + this->AddChild(this->partnerZenyHighlight); - this->unknown_0100 = new CUIStaticText(); - this->unknown_0100->SetSize(150, 18); - this->unknown_0100->Move(350, 330); + this->partnerZenyText = new CUIStaticText(); + this->partnerZenyText->SetSize(150, 18); + this->partnerZenyText->Move(350, 330); { const char zenySource[] = { '\x4F', '\xD5' }; // GLOBAL: gl_25420 thread_local EncryptedName zenyName(zenySource); - this->unknown_0100->SetText(zenyName.Text()); + this->partnerZenyText->SetText(zenyName.Text()); } - this->unknown_0100->SetFitText(0); - this->unknown_0100->SetAlign(2, 6); + this->partnerZenyText->SetFitText(0); + this->partnerZenyText->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_0100; + CUIStaticText* text = this->partnerZenyText; const char zenyFontSource[] = { '\x62', '\x83', '\xBE', '\x76', '\xBB', '\x49' }; @@ -1066,28 +1066,28 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_0100->SetFontHeight(16); - this->unknown_0100->SetBold(0); - this->unknown_0100->SetColor(0xFFFF00); - this->unknown_0100->SetShadow(0, 0xFFFFFF); - this->unknown_0100->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_0100); + this->partnerZenyText->SetFontHeight(16); + this->partnerZenyText->SetBold(0); + this->partnerZenyText->SetColor(0xFFFF00); + this->partnerZenyText->SetShadow(0, 0xFFFFFF); + this->partnerZenyText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->partnerZenyText); - this->unknown_0104 = new CUIStaticText(); - this->unknown_0104->SetSize(150, 18); - this->unknown_0104->Move(350, 331); + this->partnerZenyShadow = new CUIStaticText(); + this->partnerZenyShadow->SetSize(150, 18); + this->partnerZenyShadow->Move(350, 331); { const char zenySource[] = { '\xD1', '\x99' }; // GLOBAL: gl_25422 thread_local EncryptedName zenyName(zenySource); - this->unknown_0104->SetText(zenyName.Text()); + this->partnerZenyShadow->SetText(zenyName.Text()); } - this->unknown_0104->SetFitText(0); - this->unknown_0104->SetAlign(2, 6); + this->partnerZenyShadow->SetFitText(0); + this->partnerZenyShadow->SetAlign(2, 6); { - CUIStaticText* text = this->unknown_0104; + CUIStaticText* text = this->partnerZenyShadow; const char zenyFontSource[] = { '\x0E', '\xD3', '\xA6', '\x54', '\x0F', '\xD7' }; @@ -1095,12 +1095,12 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName zenyFontName(zenyFontSource); text->SetFont(std::string(zenyFontName.Text())); } - this->unknown_0104->SetFontHeight(16); - this->unknown_0104->SetBold(0); - this->unknown_0104->SetColor(0x323232); - this->unknown_0104->SetShadow(0, 0xFFFFFF); - this->unknown_0104->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_0104); + this->partnerZenyShadow->SetFontHeight(16); + this->partnerZenyShadow->SetBold(0); + this->partnerZenyShadow->SetColor(0x323232); + this->partnerZenyShadow->SetShadow(0, 0xFFFFFF); + this->partnerZenyShadow->SetOutline(0, 0xFFFFFF); + this->AddChild(this->partnerZenyShadow); this->logCheckBox = new CUICheckBox(); this->logCheckBox->SetSize(10, 10); @@ -1143,14 +1143,14 @@ void CUIExchangeUI::OnCreate(int width, int height) { this->logCheckBox->Invalidate(); this->AddChild(this->logCheckBox); - this->unknown_010C = new CUIStaticText(); - this->unknown_010C->SetSize(135, 14); - this->unknown_010C->Move(123, 356); - this->unknown_010C->SetText(""); - this->unknown_010C->SetFitText(0); - this->unknown_010C->SetAlign(0, 6); + this->screenshotLabel = new CUIStaticText(); + this->screenshotLabel->SetSize(135, 14); + this->screenshotLabel->Move(123, 356); + this->screenshotLabel->SetText(""); + this->screenshotLabel->SetFitText(0); + this->screenshotLabel->SetAlign(0, 6); { - CUIStaticText* label = this->unknown_010C; + CUIStaticText* label = this->screenshotLabel; const char labelFontSource[] = { '\x22', '\x86', '\xBB', '\x34', '\xE0', '\x13' }; @@ -1158,12 +1158,12 @@ void CUIExchangeUI::OnCreate(int width, int height) { thread_local EncryptedName labelFontName(labelFontSource); label->SetFont(std::string(labelFontName.Text())); } - this->unknown_010C->SetFontHeight(12); - this->unknown_010C->SetBold(1); - this->unknown_010C->SetColor(0xFF); - this->unknown_010C->SetShadow(0, 0xFFFFFF); - this->unknown_010C->SetOutline(1, 0xFFFFFF); - this->AddChild(this->unknown_010C); + this->screenshotLabel->SetFontHeight(12); + this->screenshotLabel->SetBold(1); + this->screenshotLabel->SetColor(0xFF); + this->screenshotLabel->SetShadow(0, 0xFFFFFF); + this->screenshotLabel->SetOutline(1, 0xFFFFFF); + this->AddChild(this->screenshotLabel); this->lockButton = new CUIImageButton(); this->lockButton->SetSize(42, 20); @@ -1246,12 +1246,12 @@ void CUIExchangeUI::OnCreate(int width, int height) { } this->AddChild(this->tradeButton); - this->unknown_0118 = new CUIImageButton(); - this->unknown_0118->SetSize(42, 20); - this->unknown_0118->Move(510, 354); - this->unknown_0118->SetOnClick([this]() { this->Cancel(); }); - this->unknown_0118->disabled = 0; - this->unknown_0118->Invalidate(); + this->cancelButton = new CUIImageButton(); + this->cancelButton->SetSize(42, 20); + this->cancelButton->Move(510, 354); + this->cancelButton->SetOnClick([this]() { this->Cancel(); }); + this->cancelButton->disabled = 0; + this->cancelButton->Invalidate(); { const char disabledSource[] = { '\x0D', '\xAC', '\x0D', '\x81', '\x57', '\xF5', '\xD6', '\xFE', '\x0B', '\xE7', '\x0D', '\xB7', '\x2A', '\x81', '\x4F', '\x51', @@ -1281,22 +1281,22 @@ void CUIExchangeUI::OnCreate(int width, int height) { // GLOBAL: gl_25440 thread_local EncryptedName normalName(normalSource); const std::string normal(normalName.Text()); - this->unknown_0118->SetImages(normal, hover, pressed, disabled); + this->cancelButton->SetImages(normal, hover, pressed, disabled); } - this->AddChild(this->unknown_0118); + this->AddChild(this->cancelButton); } // OFFSET: 0x00A16C50 // FUNCTION: fn_15282 CUIExchangeUI::CUIExchangeUI() - : titleBar(nullptr), unknown_00DC(nullptr), unknown_00E0(nullptr), firstList(nullptr), unknown_00E8(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), - zenyEdit(nullptr), secondList(nullptr), unknown_00FC(nullptr), unknown_0100(nullptr), unknown_0104(nullptr), logCheckBox(nullptr), unknown_010C(nullptr), - lockButton(nullptr), tradeButton(nullptr), unknown_0118(nullptr) { + : titleBar(nullptr), partnerText(nullptr), backgroundImage(nullptr), firstList(nullptr), ownZenyHighlight(nullptr), ownZenyText(nullptr), ownZenyShadow(nullptr), + zenyEdit(nullptr), secondList(nullptr), partnerZenyHighlight(nullptr), partnerZenyText(nullptr), partnerZenyShadow(nullptr), logCheckBox(nullptr), screenshotLabel(nullptr), + lockButton(nullptr), tradeButton(nullptr), cancelButton(nullptr) { } // OFFSET: 0x00A16E10 // FUNCTION: fn_15283 -ExchangeUI::CUIItem::CUIItem() : CUIListItem(), unknown_00E8(nullptr), itemIcon(nullptr), unknown_00F0(nullptr), unknown_00F4(nullptr) { +ExchangeUI::CUIItem::CUIItem() : CUIListItem(), slotBackground(nullptr), itemIcon(nullptr), quantityText(nullptr), itemNameText(nullptr) { } // OFFSET: 0x00A10030 @@ -1345,7 +1345,7 @@ void CUIListBoxEx::AddNewItem() { } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (ExchangeUI::CUIItem* other : this->items) { @@ -1354,7 +1354,7 @@ void CUIListBoxEx::AddNewItem() { } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } ExchangeUI::CUIItem* selectedItem = dynamic_cast(listItem); diff --git a/Source/UI/Exchange/UIExchangeUI.h b/Source/UI/Exchange/UIExchangeUI.h index 8ab0050ac..dee9a5a4f 100644 --- a/Source/UI/Exchange/UIExchangeUI.h +++ b/Source/UI/Exchange/UIExchangeUI.h @@ -17,10 +17,10 @@ class CUIStaticText; namespace ExchangeUI { class CUIItem : public CUIListItem { public: - /* 00E8 */ CUIStaticImage* unknown_00E8; + /* 00E8 */ CUIStaticImage* slotBackground; /* 00EC */ CUIGameItem* itemIcon; - /* 00F0 */ CUIStaticText* unknown_00F0; - /* 00F4 */ CUIStaticText* unknown_00F4; + /* 00F0 */ CUIStaticText* quantityText; + /* 00F4 */ CUIStaticText* itemNameText; CUIItem(); void OnCreate(int width, int height) override; @@ -46,22 +46,22 @@ using CItemListBox = CUIListBoxEx; class CUIExchangeUI : public CUIFrameWnd { public: /* 00D8 */ CUITitleBar* titleBar; - /* 00DC */ CUIStaticText* unknown_00DC; - /* 00E0 */ CUIStaticImage* unknown_00E0; + /* 00DC */ CUIStaticText* partnerText; + /* 00E0 */ CUIStaticImage* backgroundImage; /* 00E4 */ ExchangeUI::CItemListBox* firstList; - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIStaticText* unknown_00EC; - /* 00F0 */ CUIStaticText* unknown_00F0; + /* 00E8 */ CUIStaticText* ownZenyHighlight; + /* 00EC */ CUIStaticText* ownZenyText; + /* 00F0 */ CUIStaticText* ownZenyShadow; /* 00F4 */ CUIEditBoxEx* zenyEdit; /* 00F8 */ ExchangeUI::CItemListBox* secondList; - /* 00FC */ CUIStaticText* unknown_00FC; - /* 0100 */ CUIStaticText* unknown_0100; - /* 0104 */ CUIStaticText* unknown_0104; + /* 00FC */ CUIStaticText* partnerZenyHighlight; + /* 0100 */ CUIStaticText* partnerZenyText; + /* 0104 */ CUIStaticText* partnerZenyShadow; /* 0108 */ CUICheckBox* logCheckBox; - /* 010C */ CUIStaticText* unknown_010C; + /* 010C */ CUIStaticText* screenshotLabel; /* 0110 */ CUIImageButton* lockButton; /* 0114 */ CUIImageButton* tradeButton; - /* 0118 */ CUIImageButton* unknown_0118; + /* 0118 */ CUIImageButton* cancelButton; /* 011C */ std::string partnerName; /* 0134 */ std::string zenyText; diff --git a/Source/UI/FrameSkin.cpp b/Source/UI/FrameSkin.cpp index c3ba029d4..58bffb680 100644 --- a/Source/UI/FrameSkin.cpp +++ b/Source/UI/FrameSkin.cpp @@ -14,11 +14,11 @@ CUIRegisterMgr* Singleton::s_instance = nullptr; // OFFSET: 0x009E69D0 // FUNCTION: fn_14469 CUIFrameWnd::~CUIFrameWnd() { - if (static_cast(this->unknown_00B4) != 0) { + if (static_cast(this->ownedSkinColors) != 0) { if (CUIRegisterMgr::s_instance == nullptr) { CUIRegisterMgr::s_instance = new (std::nothrow) CUIRegisterMgr; } - std::map>& positions = CUIRegisterMgr::s_instance->unknown_000C; + std::map>& positions = CUIRegisterMgr::s_instance->windowPositions; std::map>::iterator position = positions.lower_bound(this->geometry.id); if (position == positions.end() || this->geometry.id < position->first) { position = positions.insert(position, std::map>::value_type(this->geometry.id, std::pair())); @@ -27,11 +27,11 @@ CUIFrameWnd::~CUIFrameWnd() { position->second.second = this->geometry.y; } - if (static_cast(this->unknown_00B4 >> 8) != 0) { + if (static_cast(this->ownedSkinColors >> 8) != 0) { if (CUIRegisterMgr::s_instance == nullptr) { CUIRegisterMgr::s_instance = new (std::nothrow) CUIRegisterMgr; } - std::map>& sizes = CUIRegisterMgr::s_instance->unknown_0014; + std::map>& sizes = CUIRegisterMgr::s_instance->windowSizes; std::map>::iterator size = sizes.lower_bound(this->geometry.id); if (size == sizes.end() || this->geometry.id < size->first) { size = sizes.insert(size, std::map>::value_type(this->geometry.id, std::pair())); diff --git a/Source/UI/FrameSkin.h b/Source/UI/FrameSkin.h index 69601d217..5a3ab7d04 100644 --- a/Source/UI/FrameSkin.h +++ b/Source/UI/FrameSkin.h @@ -12,7 +12,7 @@ class CUIFrameWnd : public UIFrameWnd { public: // INLINED CUIFrameWnd() - : UIFrameWnd(0), unknown_00B4(0), m_hasSkinColors(false), + : UIFrameWnd(0), ownedSkinColors(0), m_hasSkinColors(false), m_backgroundColor(0xFFFFFF), m_borderColor(0xCECECE), m_backgroundCell{0, 0}, m_borderCell{3, 1}, m_buttonBarStyle(0), m_resolveSkin(true) { } @@ -23,7 +23,7 @@ public: void SetSkinColors(int backgroundColumn, int backgroundRow, int borderColumn, int borderRow); protected: - /* 00B4 */ std::uint16_t unknown_00B4; + /* 00B4 */ std::uint16_t ownedSkinColors; /* 00B6 */ bool m_hasSkinColors; /* 00B8 */ std::uint32_t m_backgroundColor; /* 00BC */ std::uint32_t m_borderColor; diff --git a/Source/UI/GameSettings/GameSettingsUI.cpp b/Source/UI/GameSettings/GameSettingsUI.cpp index 2962814cd..fbbb34631 100644 --- a/Source/UI/GameSettings/GameSettingsUI.cpp +++ b/Source/UI/GameSettings/GameSettingsUI.cpp @@ -399,18 +399,18 @@ void CUIComboBox::SetItemBinder(std::function binder) // INLINED template void CUIComboBox::SetButton(const std::string& normal, const std::string& hover, const std::string& pressed, const std::string& disabled) { - if (this->unknown_0088 != nullptr) { - this->RemoveChild(this->unknown_0088, 1); - this->unknown_0088 = nullptr; + if (this->dropDownButton != nullptr) { + this->RemoveChild(this->dropDownButton, 1); + this->dropDownButton = nullptr; this->Resize(this->geometry.width - 18, this->geometry.height); } - if (this->unknown_0088 == nullptr) { + if (this->dropDownButton == nullptr) { this->Resize(this->geometry.width + 18, this->geometry.height); - this->unknown_0088 = new CUIImageButton(); - this->unknown_0088->SetSize(18, 18); - this->unknown_0088->Move(this->geometry.width - 18, 0); - this->unknown_0088->SetImages(normal, hover, pressed, disabled); - this->unknown_0088->SetOnClick([this]() { + this->dropDownButton = new CUIImageButton(); + this->dropDownButton->SetSize(18, 18); + this->dropDownButton->Move(this->geometry.width - 18, 0); + this->dropDownButton->SetImages(normal, hover, pressed, disabled); + this->dropDownButton->SetOnClick([this]() { if (!g_windowMgr.CloseDropDown()) { int x = 0; int y = this->geometry.height - 1; @@ -418,7 +418,7 @@ void CUIComboBox::SetButton(const std::string& normal, const std::string& g_windowMgr.ShowDropDown(this, this->listBox, x, y); } }); - this->AddChild(this->unknown_0088); + this->AddChild(this->dropDownButton); } } @@ -828,7 +828,7 @@ void CUIListBoxEx::AddNewItem() { // INLINED template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (GameSettingsUI::CUIOptionItem* other : this->items) { @@ -837,7 +837,7 @@ void CUIListBoxEx::SelectItem(CUIListIt } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } GameSettingsUI::CUIOptionItem* selectedItem = dynamic_cast(item); @@ -903,7 +903,7 @@ __declspec(noinline) GameSettingsUI::CUIComboItem::CUIComboItem() : CUIListItem( // OFFSET: 0x00A3CF80 // FUNCTION: fn_15903 __declspec(noinline) GameSettingsUI::CUIOptionItem::CUIOptionItem() - : CUIListItem(), m_check(nullptr), unknown_00EC(nullptr), m_label(nullptr), m_description(nullptr), m_optionId(300) { + : CUIListItem(), m_check(nullptr), m_runButton(nullptr), m_label(nullptr), m_description(nullptr), m_optionId(300) { } // OFFSET: 0x00A36170 @@ -1245,7 +1245,7 @@ void CUIListBoxEx::OnCreate(int width, // FUNCTION: fn_15442 template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (GameSettingsUI::CUIComboItem* other : this->items) { @@ -1254,7 +1254,7 @@ void CUIListBoxEx::SelectItem(CUILi } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } GameSettingsUI::CUIComboItem* selectedItem = dynamic_cast(item); @@ -1279,7 +1279,7 @@ void CUIListBoxEx::SelectItem(CUILi // FUNCTION: fn_15443 template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (GameSettingsUI::CUIComboItem* other : this->items) { @@ -1288,7 +1288,7 @@ void CUIListBoxEx::SelectItem(CUIList } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } GameSettingsUI::CUIComboItem* selectedItem = dynamic_cast(item); @@ -1313,7 +1313,7 @@ void CUIListBoxEx::SelectItem(CUIList // FUNCTION: fn_15444 template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (GameSettingsUI::CUIComboItem* other : this->items) { @@ -1322,7 +1322,7 @@ void CUIListBoxEx::SelectItem(CUILi } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } GameSettingsUI::CUIComboItem* selectedItem = dynamic_cast(item); @@ -1347,7 +1347,7 @@ void CUIListBoxEx::SelectItem(CUILi // FUNCTION: fn_15445 template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (GameSettingsUI::CUIComboItem* other : this->items) { @@ -1356,7 +1356,7 @@ void CUIListBoxEx::SelectItem(CUIList } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } GameSettingsUI::CUIComboItem* selectedItem = dynamic_cast(item); @@ -1922,7 +1922,7 @@ CUIGameSettingsUI::CUIGameSettingsUI() // OFFSET: 0x00A1EE20 // FUNCTION: fn_15383 void CUIGameSettingsUI::Initialize() { - this->unknown_00B4 = 1; + this->ownedSkinColors = 1; this->m_resolveSkin = true; this->Resize(400, 350); this->Move(0, 0); @@ -2333,40 +2333,40 @@ void GameSettingsUI::CUIGroupTrilinear::OnInit() { // FUNCTION: fn_15341 template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A19560 // FUNCTION: fn_15342 template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A19720 // FUNCTION: fn_15343 template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A198E0 // FUNCTION: fn_15344 template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A19AA0 // FUNCTION: fn_15345 template <> __declspec(noinline) CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A41B60 @@ -2374,9 +2374,9 @@ __declspec(noinline) CUIListBoxEx::CUIL void GameSettingsUI::CUIGroupSound::OnInit() { this->m_title->SetText(LookupMessage(MSI_SOUND_OPTIONWND)); this->m_bgmText->SetText(LookupMessage(MSI_BGM)); - this->unknown_0090->SetText(LookupMessage(MSI_GAME_SETTINGS_RODEX_SPAM_OFF)); + this->m_bgmMuteText->SetText(LookupMessage(MSI_GAME_SETTINGS_RODEX_SPAM_OFF)); this->m_effectText->SetText(LookupMessage(MSI_SOUND)); - this->unknown_00A0->SetText(LookupMessage(MSI_GAME_SETTINGS_RODEX_SPAM_OFF)); + this->m_effectMuteText->SetText(LookupMessage(MSI_GAME_SETTINGS_RODEX_SPAM_OFF)); } // OFFSET: 0x00A41560 @@ -2479,7 +2479,7 @@ void GameSettingsUI::CUIGroupSound::Apply() { // OFFSET: 0x00A19C60 // FUNCTION: fn_15346 -inline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), unknown_00C4(nullptr), unknown_00EC(nullptr) { +inline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), clickWindow(nullptr), hoverWindow(nullptr) { } // OFFSET: 0x00A19D30 @@ -2541,7 +2541,7 @@ GameSettingsUI::CUIGroupSkin::CUIGroupSkin() : CUIGroup(), m_combo(nullptr) { // OFFSET: 0x00A3CC60 // FUNCTION: fn_15898 -GameSettingsUI::CUIGroupSound::CUIGroupSound() : CUIGroup(), m_bgmText(nullptr), m_bgmSlider(nullptr), m_bgmMute(nullptr), unknown_0090(nullptr), m_effectText(nullptr), m_effectSlider(nullptr), m_effectMute(nullptr), unknown_00A0(nullptr) { +GameSettingsUI::CUIGroupSound::CUIGroupSound() : CUIGroup(), m_bgmText(nullptr), m_bgmSlider(nullptr), m_bgmMute(nullptr), m_bgmMuteText(nullptr), m_effectText(nullptr), m_effectSlider(nullptr), m_effectMute(nullptr), m_effectMuteText(nullptr) { } // OFFSET: 0x00A3CD30 @@ -3778,29 +3778,29 @@ void GameSettingsUI::CUIGroupSound::OnCreate(int width, int height) { this->m_bgmMute->checked = false; this->m_bgmMute->Invalidate(); this->AddChild(this->m_bgmMute); - this->unknown_0090 = new CUIStaticText(); - this->unknown_0090->SetSize(50, 13); - this->unknown_0090->Move(348, 12); - this->unknown_0090->SetText([]() { + this->m_bgmMuteText = new CUIStaticText(); + this->m_bgmMuteText->SetSize(50, 13); + this->m_bgmMuteText->Move(348, 12); + this->m_bgmMuteText->SetText([]() { constexpr std::uint8_t bytes[] = {0xE9, 0x43, 0xD0, 0xBB, 0x4F}; constexpr EncryptedSource<5> source(bytes); thread_local EncryptedName<5, 0xF715514F5961B75BULL> name(source); return name.Text(); }()); - this->unknown_0090->SetFitText(0); - this->unknown_0090->SetAlign(0, 0); - this->unknown_0090->SetFont(std::string([]() { + this->m_bgmMuteText->SetFitText(0); + this->m_bgmMuteText->SetAlign(0, 0); + this->m_bgmMuteText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0xDE, 0x4C, 0x91, 0x58, 0x38, 0xBB}; constexpr EncryptedSource<6> source(bytes); thread_local EncryptedName<6, 0x4191BB5531FD3999ULL> name(source); return name.Text(); }())); - this->unknown_0090->SetFontHeight(12); - this->unknown_0090->SetBold(0); - this->unknown_0090->SetColor(0); - this->unknown_0090->SetShadow(0, 0xFFFFFF); - this->unknown_0090->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_0090); + this->m_bgmMuteText->SetFontHeight(12); + this->m_bgmMuteText->SetBold(0); + this->m_bgmMuteText->SetColor(0); + this->m_bgmMuteText->SetShadow(0, 0xFFFFFF); + this->m_bgmMuteText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->m_bgmMuteText); this->m_effectText = new CUIStaticText(); this->m_effectText->SetSize(50, 13); this->m_effectText->Move(110, 36); @@ -3895,29 +3895,29 @@ void GameSettingsUI::CUIGroupSound::OnCreate(int width, int height) { this->m_effectMute->checked = false; this->m_effectMute->Invalidate(); this->AddChild(this->m_effectMute); - this->unknown_00A0 = new CUIStaticText(); - this->unknown_00A0->SetSize(50, 13); - this->unknown_00A0->Move(348, 36); - this->unknown_00A0->SetText([]() { + this->m_effectMuteText = new CUIStaticText(); + this->m_effectMuteText->SetSize(50, 13); + this->m_effectMuteText->Move(348, 36); + this->m_effectMuteText->SetText([]() { constexpr std::uint8_t bytes[] = {0xB3, 0xF9, 0xF6, 0xBF, 0xED}; constexpr EncryptedSource<5> source(bytes); thread_local EncryptedName<5, 0x81F58DED5D470D01ULL> name(source); return name.Text(); }()); - this->unknown_00A0->SetFitText(0); - this->unknown_00A0->SetAlign(0, 0); - this->unknown_00A0->SetFont(std::string([]() { + this->m_effectMuteText->SetFitText(0); + this->m_effectMuteText->SetAlign(0, 0); + this->m_effectMuteText->SetFont(std::string([]() { constexpr std::uint8_t bytes[] = {0x8C, 0x98, 0xDF, 0x42, 0xEA, 0x31}; constexpr EncryptedSource<6> source(bytes); thread_local EncryptedName<6, 0x454D31872BB3EDCBULL> name(source); return name.Text(); }())); - this->unknown_00A0->SetFontHeight(12); - this->unknown_00A0->SetBold(0); - this->unknown_00A0->SetColor(0); - this->unknown_00A0->SetShadow(0, 0xFFFFFF); - this->unknown_00A0->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00A0); + this->m_effectMuteText->SetFontHeight(12); + this->m_effectMuteText->SetBold(0); + this->m_effectMuteText->SetColor(0); + this->m_effectMuteText->SetShadow(0, 0xFFFFFF); + this->m_effectMuteText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->m_effectMuteText); } // OFFSET: 0x00A2F880 @@ -4255,7 +4255,7 @@ void GameSettingsUI::CUIListPage::BindOption(CUIOptionItem* item, const TALKTYPE check->checked = IsServiceOption(item->m_optionId) ^ g_serviceOptions.Get(item->m_optionId); check->Invalidate(); } - item->unknown_00EC->Show(option->type == 1); + item->m_runButton->Show(option->type == 1); item->m_label->SetText(option->title); item->m_label->tooltipText = option->tooltip; item->m_label->disabled = option->tipBoxId <= 0; @@ -4275,7 +4275,7 @@ void GameSettingsUI::CUIListPage::LoadOptions(int tab) { this->m_optionList->data.push_back(static_cast(id)); } this->m_optionList->UpdateScrollBar(); - this->m_optionList->unknown_00C4 = 1; + this->m_optionList->layoutFlag = 1; this->m_optionList->Invalidate(); this->RefreshOptions(); } @@ -5011,7 +5011,7 @@ void GameSettingsUI::CUIOptionItem::OnCreate(int width, int height) { this->AddChild(this->m_check); CUIImageButton* runButton = new CUIImageButton(); - this->unknown_00EC = runButton; + this->m_runButton = runButton; runButton->SetSize(34, 15); runButton->Move(7, 5); runButton->SetOnClick([this]() { this->RunFunction(); }); @@ -5038,7 +5038,7 @@ void GameSettingsUI::CUIOptionItem::OnCreate(int width, int height) { thread_local EncryptedName<58, 0x0B8745519B1F95D7ULL> name(source); return name.Text(); }())); - this->AddChild(this->unknown_00EC); + this->AddChild(this->m_runButton); this->m_label = new CUITextButton(); this->m_label->SetSize(85, 13); diff --git a/Source/UI/GameSettings/GameSettingsUI.h b/Source/UI/GameSettings/GameSettingsUI.h index afa9e85d7..7339dad92 100644 --- a/Source/UI/GameSettings/GameSettingsUI.h +++ b/Source/UI/GameSettings/GameSettingsUI.h @@ -35,7 +35,7 @@ extern std::map g_optionHotkeys; template class CUIComboBox : public CUIControl { public: explicit CUIComboBox() - : CUIControl(), display(), button(), unknown_0088(), listBox(nullptr), width(), itemHeight(0), visibleItems(1), onSelect(), onChange() { + : CUIControl(), display(), button(), dropDownButton(), listBox(nullptr), width(), itemHeight(0), visibleItems(1), onSelect(), onChange() { } void Paint() override; @@ -52,7 +52,7 @@ public: /* 0080 */ T* display; /* 0084 */ CUIButton* button; - /* 0088 */ CUIImageButton* unknown_0088; + /* 0088 */ CUIImageButton* dropDownButton; /* 008C */ CUIListBoxEx* listBox; /* 0090 */ int width; /* 0094 */ int itemHeight; @@ -221,11 +221,11 @@ public: /* 0084 */ CUIStaticText* m_bgmText; /* 0088 */ CUIVScrollBar* m_bgmSlider; /* 008C */ CUICheckBox* m_bgmMute; - /* 0090 */ CUIStaticText* unknown_0090; + /* 0090 */ CUIStaticText* m_bgmMuteText; /* 0094 */ CUIStaticText* m_effectText; /* 0098 */ CUIVScrollBar* m_effectSlider; /* 009C */ CUICheckBox* m_effectMute; - /* 00A0 */ CUIStaticText* unknown_00A0; + /* 00A0 */ CUIStaticText* m_effectMuteText; }; class CUIGroupSpriteDetailLevel : public CUIGroup { @@ -342,7 +342,7 @@ public: void OnClickLabel(); /* 00E8 */ CUICheckBox* m_check; - /* 00EC */ UIWindow* unknown_00EC; + /* 00EC */ UIWindow* m_runButton; /* 00F0 */ CUITextButton* m_label; /* 00F4 */ CUIStaticText* m_description; /* 00F8 */ int m_optionId; diff --git a/Source/UI/Gauges/UIPcGage.h b/Source/UI/Gauges/UIPcGage.h index 569982890..d2b0d674a 100644 --- a/Source/UI/Gauges/UIPcGage.h +++ b/Source/UI/Gauges/UIPcGage.h @@ -23,11 +23,11 @@ public: __declspec(noinline) void SetValues(int current, int maximum); void SetLimits(int first, int second); - /* 009C */ int unknown_009C; + /* 009C */ int displayMode; /* 00A0 */ int current; /* 00A4 */ int maximum; - /* 00A8 */ int unknown_00A8; - /* 00AC */ int unknown_00AC; + /* 00A8 */ int secondaryValue; + /* 00AC */ int secondaryMaximum; }; class UIRechargeGage : public UIGage { @@ -50,7 +50,7 @@ public: void SetThirdValues(std::function current, std::function maximum); void SetFourthValues(std::function current, std::function maximum); - /* 009C */ int unknown_009C; + /* 009C */ int actorKind; /* 00A0 */ std::function m_firstCurrent; /* 00C8 */ std::function m_firstMaximum; /* 00F0 */ std::function m_secondCurrent; diff --git a/Source/UI/Gauges/UIPetInfoBarGraph.cpp b/Source/UI/Gauges/UIPetInfoBarGraph.cpp index 9f4c301c3..6740cc6dc 100644 --- a/Source/UI/Gauges/UIPetInfoBarGraph.cpp +++ b/Source/UI/Gauges/UIPetInfoBarGraph.cpp @@ -33,7 +33,7 @@ void UIINT64BarGraph::FillBackground(std::uint32_t color) { // OFFSET: 0x0089B540 // FUNCTION: fn_11567 void UIPetInfoBarGraph::SetValue(int value) { - this->unknown_007C = value; + this->percentage = value; this->Invalidate(); } @@ -52,13 +52,13 @@ void UIPetInfoBarGraph::Paint() { this->DrawBitmap(this->geometry.width - right->image.width, 0, right, false); - if (this->unknown_007C != 0) { + if (this->percentage != 0) { auto* barLeft = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gzeblue_left.bmp"))); auto* barMiddle = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gzeblue_mid.bmp"))); auto* barRight = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\gzeblue_right.bmp"))); const int fill = static_cast( static_cast(this->geometry.width - barRight->image.width - barLeft->image.width) * - (static_cast(static_cast(this->unknown_007C)) / 100.0f) + (static_cast(static_cast(this->percentage)) / 100.0f) ); this->DrawBitmap(0, 0, barLeft, true); int x = 0; @@ -78,5 +78,5 @@ UIINT64BarGraph::UIINT64BarGraph() : UIWindow(0), m_current(0), m_maximum(0) { // OFFSET: 0x0086E1B0 // FUNCTION: fn_11066 -UIPetInfoBarGraph::UIPetInfoBarGraph() : UIWindow(0), unknown_007C(0) { +UIPetInfoBarGraph::UIPetInfoBarGraph() : UIWindow(0), percentage(0) { } diff --git a/Source/UI/Gauges/UIPlayerGage.cpp b/Source/UI/Gauges/UIPlayerGage.cpp index 92bbe8e7c..086fef354 100644 --- a/Source/UI/Gauges/UIPlayerGage.cpp +++ b/Source/UI/Gauges/UIPlayerGage.cpp @@ -15,8 +15,8 @@ UIGage::UIGage() : UIWindow(0) { // OFFSET: 0x0086E120 // FUNCTION: fn_11065 -UIPcGage::UIPcGage() : current(0), maximum(0), unknown_00A8(0), unknown_00AC(0) { - this->unknown_009C = 0; +UIPcGage::UIPcGage() : current(0), maximum(0), secondaryValue(0), secondaryMaximum(0) { + this->displayMode = 0; } // OFFSET: 0x0086E3A0 @@ -26,7 +26,7 @@ UIRechargeGage::UIRechargeGage() : current(0), maximum(100) { // OFFSET: 0x0086E210 // FUNCTION: fn_11067 -UIPlayerGage::UIPlayerGage() : unknown_009C(0) { +UIPlayerGage::UIPlayerGage() : actorKind(0) { } // OFFSET: 0x0086DE90 @@ -37,7 +37,7 @@ UIMonsterGage::UIMonsterGage() { this->colors[2] = 0x00E700FF; this->colors[4] = 0x0000FFFF; this->m_threshold = 0x19; - this->unknown_009C = 1; + this->displayMode = 1; } // OFFSET: 0x00882450 @@ -78,7 +78,7 @@ void UIPlayerGage::SetThirdValues(std::function current, std::fu // OFFSET: 0x0089C070 // FUNCTION: fn_11580 void UIMonsterGage::SetMode(int mode) { - this->unknown_009C = mode; + this->displayMode = mode; } // OFFSET: 0x0089C390 @@ -110,7 +110,7 @@ void UIPlayerGage::Paint() { this->FillRegion(1, y, static_cast(static_cast(this->geometry.width - 2) * ratio), 3, color); }; - switch (this->unknown_009C) { + switch (this->actorKind) { case 7: if (this->m_thirdCurrent && this->m_thirdMaximum) { drawBar(1, this->m_thirdCurrent, this->m_thirdMaximum, this->colors[5], this->colors[6], true, true); diff --git a/Source/UI/Guild/UIGuildHelperWnd.cpp b/Source/UI/Guild/UIGuildHelperWnd.cpp index 4bac8309c..11f889cf9 100644 --- a/Source/UI/Guild/UIGuildHelperWnd.cpp +++ b/Source/UI/Guild/UIGuildHelperWnd.cpp @@ -68,7 +68,7 @@ void UIGuildHelperWnd::Paint() { void UIGuildHelperWnd::OnLBtnDown(int x, int y) { if (y < 17) { UIFrameWnd::OnLBtnDown(x, y); - if (UIWindow* window = g_windowMgr.unknown_0438) { + if (UIWindow* window = g_windowMgr.createGuildWnd) { window->geometry.targetAlpha = 128; window->geometry.alphaStart = timeGetTime(); } @@ -79,7 +79,7 @@ void UIGuildHelperWnd::OnLBtnDown(int x, int y) { // FUNCTION: fn_13095 void UIGuildHelperWnd::OnLBtnUp(int x, int y) { UIFrameWnd::OnLBtnUp(x, y); - if (UIWindow* window = g_windowMgr.unknown_0438) { + if (UIWindow* window = g_windowMgr.createGuildWnd) { window->geometry.targetAlpha = 255; window->geometry.alphaStart = timeGetTime(); } @@ -89,11 +89,11 @@ void UIGuildHelperWnd::OnLBtnUp(int x, int y) { // FUNCTION: fn_13098 void UIGuildHelperWnd::OnMouseMove(int x, int y) { UIFrameWnd::OnMouseMove(x, y); - if (g_windowMgr.unknown_0438) { + if (g_windowMgr.createGuildWnd) { x = 0; y = 0; this->ToScreen(x, y); - g_windowMgr.unknown_0438->Move(x + 2 + this->geometry.width, y); + g_windowMgr.createGuildWnd->Move(x + 2 + this->geometry.width, y); } } @@ -210,9 +210,9 @@ int UIGuildBanReasonDescWnd::SendMsg(UIWindow* sender, int message, std::intptr_ return 0; case UM_SETINFO: { const GuildBanTarget* target = reinterpret_cast(a1); - this->m_target.unknown_0000 = target->unknown_0000; - this->m_target.unknown_0004 = target->unknown_0004; - this->m_target.unknown_0008 = target->unknown_0008; + this->m_target.guildId = target->guildId; + this->m_target.accountId = target->accountId; + this->m_target.characterId = target->characterId; return 0; } default: @@ -239,11 +239,11 @@ int UIGuildHelperWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s case 448: if (!g_windowMgr.CloseWindow(WID_CREATEGUILDWND_MODE_0)) { g_windowMgr.EnsureWindow(WID_CREATEGUILDWND_MODE_0); - if (g_windowMgr.unknown_0438) { + if (g_windowMgr.createGuildWnd) { int x = 0; int y = 0; this->ToScreen(x, y); - g_windowMgr.unknown_0438->Move(x + 2 + this->geometry.width, y); + g_windowMgr.createGuildWnd->Move(x + 2 + this->geometry.width, y); } } break; diff --git a/Source/UI/Guild/UIGuildHelperWnd.h b/Source/UI/Guild/UIGuildHelperWnd.h index 2beba38ea..18027044d 100644 --- a/Source/UI/Guild/UIGuildHelperWnd.h +++ b/Source/UI/Guild/UIGuildHelperWnd.h @@ -10,9 +10,9 @@ class UIStaticText; class UITextViewer; struct GuildBanTarget { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; + /* 0000 */ int guildId; + /* 0004 */ int accountId; + /* 0008 */ int characterId; }; class UIGuildHelperWnd : public UIFrameWnd { diff --git a/Source/UI/Guild/UIGuildWnd.cpp b/Source/UI/Guild/UIGuildWnd.cpp index a35b5d831..4333e5f1e 100644 --- a/Source/UI/Guild/UIGuildWnd.cpp +++ b/Source/UI/Guild/UIGuildWnd.cpp @@ -62,10 +62,10 @@ int g_guildTotalInfoColumnWidths[4] = {151, 82, 70, 70}; struct GuildTotalInfoEntry { /* 0000 */ int unknown_0000; /* 0004 */ std::string name; - /* 001C */ int unknown_001C; - /* 0020 */ int unknown_0020; - /* 0024 */ int unknown_0024; - /* 0028 */ int unknown_0028; + /* 001C */ int level; + /* 0020 */ int memberCount; + /* 0024 */ int maxMembers; + /* 0028 */ int ranking; }; // GLOBAL: gl_24994 @@ -275,14 +275,14 @@ UIGuildBanishedMemberWnd::UIGuildBanishedMemberWnd() // OFFSET: 0x009539C0 // FUNCTION: fn_12997 UIGuildInfoManageWnd::UIGuildInfoManageWnd() - : UIGuildWnd(), unknown_00D8(), unknown_00E0(), unknown_00EC(0), unknown_00F0(0), m_guildId(g_guildInfo.m_guildId) { + : UIGuildWnd(), emblemFiles(), emblemMenuEntries(), unknown_00EC(0), unknown_00F0(0), m_guildId(g_guildInfo.m_guildId) { } // OFFSET: 0x00953B00 // FUNCTION: fn_12999 UIGuildMemberManageWnd::UIGuildMemberManageWnd() - : UIGuildWnd(), unknown_0150(), m_scrollTop(0), m_hoverRow(10), m_columns(1), m_visibleRows(6), unknown_016C(0), - m_scrollable(0), m_rowSpacing(0), m_members(), unknown_0180(), m_sortOrders() { + : UIGuildWnd(), memberMenuEntries(), m_scrollTop(0), m_hoverRow(10), m_columns(1), m_visibleRows(6), selectedMemberRow(0), + m_scrollable(0), m_rowSpacing(0), m_members(), membersByCharacterId(), m_sortOrders() { this->m_buttonTime = 0; this->m_scrollBar = nullptr; for (int index = 0; index < 6; ++index) { @@ -305,13 +305,13 @@ UIGuildNoticeWnd::UIGuildNoticeWnd() : UIGuildWnd() { UIGuildPositionManageWnd::UIGuildPositionManageWnd() : UIGuildWnd(), m_buttonTime(0) { for (int index = 0; index < 11; ++index) { - this->unknown_00D0[index] = 0; - this->unknown_00FC[index] = 0; - this->unknown_0128[index] = 0; - this->unknown_0180[index] = 0; - this->unknown_0154[index] = 0; - this->unknown_01D8[index] = 0; - this->unknown_01AC[index] = 0; + this->inviteChecks[index] = 0; + this->expelChecks[index] = 0; + this->storageChecks[index] = 0; + this->positionNameEdits[index] = 0; + this->taxEdits[index] = 0; + this->positionNameLabels[index] = 0; + this->taxLabels[index] = 0; } } @@ -582,7 +582,7 @@ void UIGuildWnd::StoreInfo() { this->m_saved->y = this->geometry.y; this->m_saved->width = this->geometry.width; this->m_saved->height = this->geometry.height; - this->m_saved->unknown_0010 = this->Tab(); + this->m_saved->tab = this->Tab(); } } @@ -593,7 +593,7 @@ __declspec(noinline) void UIGuildWnd::CreateTabs() { return; } - if (g_guildInfo.unknown_00A4 == -1) { + if (g_guildInfo.guildTabBitmask == -1) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENUINTERFACE, 0, 0, 0, 0); } @@ -641,7 +641,7 @@ int UIGuildWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, std::in case 2: case 4: case 5: - if ((permissions[a1] & g_guildInfo.unknown_00A4) == 0) { + if ((permissions[a1] & g_guildInfo.guildTabBitmask) == 0) { return 0; } break; @@ -689,7 +689,7 @@ void UIGuildBanishedMemberWnd::UpdateScroll() { return; } - const int rows = g_guildInfo.unknown_00EC.size() / this->m_columns + (g_guildInfo.unknown_00EC.size() % this->m_columns != 0); + const int rows = g_guildInfo.bannedMembers.size() / this->m_columns + (g_guildInfo.bannedMembers.size() % this->m_columns != 0); const int visible = this->m_visibleRows; int range = 0; if (rows - visible >= 0) { @@ -728,7 +728,7 @@ void UIGuildBanishedMemberWnd::OnLBtnDown(int x, int y) { const int row = (y - g_guildBanishedRowHeight - 46) / g_guildBanishedRowHeight; int visible = 0; int index = 0; - const auto& members = g_guildInfo.unknown_00EC; + const auto& members = g_guildInfo.bannedMembers; for (auto member = members.begin(); member != members.end(); ++member, ++index) { if (index >= this->m_scrollTop * this->m_columns) { if (visible == this->m_columns * row) { @@ -791,7 +791,7 @@ void UIGuildTotalInfoWnd::UpdateScroll() { return; } - const int rows = g_guildInfo.unknown_00F4.size() / this->m_columns + (g_guildInfo.unknown_00F4.size() % this->m_columns != 0); + const int rows = g_guildInfo.guildList.size() / this->m_columns + (g_guildInfo.guildList.size() % this->m_columns != 0); const int visible = this->m_visibleRows; int range = 0; if (rows - visible >= 0) { @@ -830,7 +830,7 @@ void UIGuildTotalInfoWnd::OnLBtnDown(int x, int y) { const int row = (y - g_guildTotalInfoRowHeight - 46) / g_guildTotalInfoRowHeight; int visible = 0; int index = 0; - const auto& entries = g_guildInfo.unknown_00F4; + const auto& entries = g_guildInfo.guildList; for (auto entry = entries.begin(); entry != entries.end(); ++entry, ++index) { if (index >= this->m_scrollTop * this->m_columns) { if (visible == this->m_columns * row) { @@ -883,11 +883,11 @@ int UIGuildTotalInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1 // FUNCTION: fn_13066 void UIGuildTotalInfoWnd::OnCreate(int, int) { this->CreateTabs(); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00D0 = 1; + g_guildInfo.masterCharacterId = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 5, 0, 0, 0); this->m_scrollTop = 0; this->m_hoverRow = 0; @@ -913,11 +913,11 @@ void UIGuildTotalInfoWnd::OnCreate(int, int) { // FUNCTION: fn_13057 void UIGuildBanishedMemberWnd::OnCreate(int, int) { this->CreateTabs(); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00CC = 1; + g_guildInfo.bansRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 4, 0, 0, 0); this->m_scrollTop = 0; this->m_hoverRow = 0; @@ -951,15 +951,15 @@ void UIGuildInfoManageWnd::OnCreate(int, int) { this->CreateTabs(); this->m_allyRow = -1; this->m_hostileRow = -1; - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00CC = 1; + g_guildInfo.bansRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 4, 0, 0, 0); - g_guildInfo.unknown_00BC = 1; + g_guildInfo.infoRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); - g_guildInfo.unknown_00C0 = 1; + g_guildInfo.membersRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 1, 0, 0, 0); { @@ -969,7 +969,7 @@ void UIGuildInfoManageWnd::OnCreate(int, int) { this->m_editButton->SetBitmap((prefix + "btn_edit_a" + ".bmp").c_str(), 1, 0); this->m_editButton->SetBitmap((prefix + "btn_edit_b" + ".bmp").c_str(), 2, 0); this->m_editButton->SetSize(this->m_editButton->BitmapWidth(), this->m_editButton->BitmapHeight()); - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { this->m_editButton->Move(this->geometry.width - this->m_editButton->geometry.width - 8, 69); } else { this->m_editButton->Move(-200, -200); @@ -982,7 +982,7 @@ void UIGuildInfoManageWnd::OnCreate(int, int) { this->m_disbandButton->SetBitmap("유저인터페이스\\btn_disBand_a.bmp", 1, 0); this->m_disbandButton->SetBitmap("유저인터페이스\\btn_disBand_b.bmp", 2, 0); this->m_disbandButton->SetSize(this->m_disbandButton->BitmapWidth(), this->m_disbandButton->BitmapHeight()); - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { this->m_disbandButton->Move(this->geometry.width - this->m_disbandButton->geometry.width - 15, this->geometry.height - this->m_disbandButton->geometry.height - 5); } else { this->m_disbandButton->Move(-200, -200); @@ -1132,8 +1132,8 @@ void UIGuildSkillWnd::UpdateSkillButtons() { int row = 0; for (int y = 34; y < 272; y += 34, ++row) { CSkillInfo skill = this->VisibleSkillAt(row); - if (g_guildInfo.unknown_00B4 && row < this->m_visibleRows && this->m_scrollTop + row < this->m_skills.size() && g_session.m_guildSkillPoint && - skill.available && skill.unknown_0018) { + if (g_guildInfo.isMaster && row < this->m_visibleRows && this->m_scrollTop + row < this->m_skills.size() && g_session.m_guildSkillPoint && + skill.available && skill.upgradable) { this->m_levelUpButtons[row]->Move(78, y + 11); } else { this->m_levelUpButtons[row]->Move(-200, y - 17); @@ -1293,7 +1293,7 @@ void UIGuildSkillWnd::Paint() { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); if (skill->level == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 10, 2, red, green, blue); - } else if (skill->unknown_0014 == 0) { + } else if (skill->spCost == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 14, 2, red, green, blue); } this->FillRegion(x + 104, y + 43, 164, 28, RGB(red, green, blue)); @@ -1307,10 +1307,10 @@ void UIGuildSkillWnd::Paint() { if (skill->level != 0) { std::sprintf(text, g_serviceType == 12 ? "Nv : %d" : "Lv : %d", skill->level); this->DrawTextAt(x + 113, y + 58, text, 0, 0, 12, 0, 0, 0); - if (skill->unknown_000C == 0) { + if (skill->type == 0) { std::sprintf(text, LookupMessage(MSI_PASSIVE)); } else { - std::sprintf(text, "Sp : %d", skill->unknown_0014); + std::sprintf(text, "Sp : %d", skill->spCost); } this->DrawTextAt(x + 212, y + 58, text, 0, 0, 12, 0, 0, 0); gray = 0; @@ -1334,26 +1334,26 @@ void UIGuildSkillWnd::Paint() { void UIGuildPositionManageWnd::Paint() { UIGuildWnd::Paint(); for (int index = 0; index < 11; ++index) { - if (this->unknown_00D0[index]) { - this->unknown_00D0[index]->Move(-200, -200); + if (this->inviteChecks[index]) { + this->inviteChecks[index]->Move(-200, -200); } - if (this->unknown_00FC[index]) { - this->unknown_00FC[index]->Move(-200, -200); + if (this->expelChecks[index]) { + this->expelChecks[index]->Move(-200, -200); } - if (this->unknown_0180[index]) { - this->unknown_0180[index]->Move(-200, -200); + if (this->positionNameEdits[index]) { + this->positionNameEdits[index]->Move(-200, -200); } - if (this->unknown_0154[index]) { - this->unknown_0154[index]->Move(-200, -200); + if (this->taxEdits[index]) { + this->taxEdits[index]->Move(-200, -200); } - if (this->unknown_01D8[index]) { - this->unknown_01D8[index]->Move(-200, -200); + if (this->positionNameLabels[index]) { + this->positionNameLabels[index]->Move(-200, -200); } - if (this->unknown_01AC[index]) { - this->unknown_01AC[index]->Move(-200, -200); + if (this->taxLabels[index]) { + this->taxLabels[index]->Move(-200, -200); } - if (this->unknown_0128[index]) { - this->unknown_0128[index]->Move(-200, -200); + if (this->storageChecks[index]) { + this->storageChecks[index]->Move(-200, -200); } } @@ -1410,18 +1410,18 @@ void UIGuildPositionManageWnd::Paint() { char path[128]; std::sprintf(buffer, "%d", position->id); this->DrawTextAt(8, y, buffer, 0, 0, 12, 0, 0, 0); - if (this->unknown_0180[drawn]) { - this->unknown_0180[drawn]->SetText(position->name.c_str()); - this->unknown_0180[drawn]->Move(g_guildPositionColumnWidths[0] + 9, y - 2); - } else if (this->unknown_01D8[drawn]) { - this->unknown_01D8[drawn]->SetTextFitted(position->name.c_str()); - this->unknown_01D8[drawn]->Move(g_guildPositionColumnWidths[0] + 9, y - 2); + if (this->positionNameEdits[drawn]) { + this->positionNameEdits[drawn]->SetText(position->name.c_str()); + this->positionNameEdits[drawn]->Move(g_guildPositionColumnWidths[0] + 9, y - 2); + } else if (this->positionNameLabels[drawn]) { + this->positionNameLabels[drawn]->SetTextFitted(position->name.c_str()); + this->positionNameLabels[drawn]->Move(g_guildPositionColumnWidths[0] + 9, y - 2); } - if (this->unknown_00D0[drawn]) { - this->unknown_00D0[drawn]->geometry.unknown_0030 = position->canInvite; - this->unknown_00D0[drawn]->Invalidate(); - this->unknown_00D0[drawn]->Move(g_guildPositionColumnWidths[1] + g_guildPositionColumnWidths[0] + 10, y); + if (this->inviteChecks[drawn]) { + this->inviteChecks[drawn]->geometry.state = position->canInvite; + this->inviteChecks[drawn]->Invalidate(); + this->inviteChecks[drawn]->Move(g_guildPositionColumnWidths[1] + g_guildPositionColumnWidths[0] + 10, y); } else { std::sprintf(path, "유저인터페이스\\checkbox_%d.bmp", position->canInvite != 0); this->DrawBitmap( @@ -1430,10 +1430,10 @@ void UIGuildPositionManageWnd::Paint() { ); } - if (this->unknown_00FC[drawn]) { - this->unknown_00FC[drawn]->geometry.unknown_0030 = position->canExpel; - this->unknown_00FC[drawn]->Invalidate(); - this->unknown_00FC[drawn]->Move(g_guildPositionColumnWidths[0] + 11 + g_guildPositionColumnWidths[1] + g_guildPositionColumnWidths[2], y); + if (this->expelChecks[drawn]) { + this->expelChecks[drawn]->geometry.state = position->canExpel; + this->expelChecks[drawn]->Invalidate(); + this->expelChecks[drawn]->Move(g_guildPositionColumnWidths[0] + 11 + g_guildPositionColumnWidths[1] + g_guildPositionColumnWidths[2], y); } else { std::sprintf(path, "유저인터페이스\\checkbox_%d.bmp", position->canExpel != 0); this->DrawBitmap( @@ -1444,10 +1444,10 @@ void UIGuildPositionManageWnd::Paint() { const int storageX = g_guildPositionColumnWidths[0] + 12 + g_guildPositionColumnWidths[2] + g_guildPositionColumnWidths[3] + g_guildPositionColumnWidths[1]; - if (this->unknown_0128[drawn]) { - this->unknown_0128[drawn]->geometry.unknown_0030 = position->canStorage; - this->unknown_0128[drawn]->Invalidate(); - this->unknown_0128[drawn]->Move(storageX, y); + if (this->storageChecks[drawn]) { + this->storageChecks[drawn]->geometry.state = position->canStorage; + this->storageChecks[drawn]->Invalidate(); + this->storageChecks[drawn]->Move(storageX, y); } else { std::sprintf(path, "유저인터페이스\\checkbox_%d.bmp", position->canStorage != 0); this->DrawBitmap(storageX, y, &static_cast(ResourceMgr::Instance().Load(Resolve(path)))->image, false); @@ -1455,18 +1455,18 @@ void UIGuildPositionManageWnd::Paint() { const int taxX = g_guildPositionColumnWidths[0] + 13 + g_guildPositionColumnWidths[3] + g_guildPositionColumnWidths[4] + g_guildPositionColumnWidths[2] + g_guildPositionColumnWidths[1]; - if (this->unknown_0154[drawn]) { + if (this->taxEdits[drawn]) { std::sprintf(buffer, "%d", position->tax); - this->unknown_0154[drawn]->SetText(buffer); - this->unknown_0154[drawn]->Move(taxX, y - 2); + this->taxEdits[drawn]->SetText(buffer); + this->taxEdits[drawn]->Move(taxX, y - 2); this->DrawTextAt(g_guildPositionColumnWidths[5] / 2 + g_guildPositionColumnWidths[4] + g_guildPositionColumnWidths[3] + g_guildPositionColumnWidths[2] + g_guildPositionColumnWidths[1] + g_guildPositionColumnWidths[0] + 13, y, "%", 0, 0, 12, 0, 0, 0 ); - } else if (this->unknown_01AC[drawn]) { + } else if (this->taxLabels[drawn]) { std::sprintf(buffer, "%d %s", position->tax, "%"); - this->unknown_01AC[drawn]->SetText(buffer, 0); - this->unknown_01AC[drawn]->Move(taxX, y - 2); + this->taxLabels[drawn]->SetText(buffer, 0); + this->taxLabels[drawn]->Move(taxX, y - 2); } if (++drawn == this->m_visibleRows * this->m_columns) { @@ -1481,14 +1481,14 @@ void UIGuildInfoManageWnd::Paint() { UIGuildWnd::Paint(); GuildInfo& guild = g_guildInfo; char text[1024]; - std::sprintf(text, "%s : %s", LookupMessage(MSI_GUILDNAME), guild.unknown_0000.c_str()); + std::sprintf(text, "%s : %s", LookupMessage(MSI_GUILDNAME), guild.guildName.c_str()); this->DrawTextAt(8, 49, text, 0, 0, 12, 0, 0, 0); - std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILDLEVEL), guild.unknown_0060); + std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILDLEVEL), guild.guildLevel); this->DrawTextAt(8, 65, text, 0, 0, 12, 0, 0, 0); - const std::string master = this->StripNamelessTag(g_guildInfo.unknown_0018); + const std::string master = this->StripNamelessTag(g_guildInfo.masterName); std::sprintf(text, "%s : %s", LookupMessage(MSI_GUILD_MASTER_NAME), master.c_str()); this->DrawTextAt(8, 81, text, 0, 0, 12, 0, 0, 0); - std::sprintf(text, "%s : %d / %d", LookupMessage(MSI_GUILD_NUM_MEMBER), guild.unknown_0064, guild.unknown_006C); + std::sprintf(text, "%s : %d / %d", LookupMessage(MSI_GUILD_NUM_MEMBER), guild.memberCount, guild.maxMemberCount); this->DrawTextAt(8, 97, text, 0, 0, 12, 0, 0, 0); const int width = this->TextWidth(text, 0, 0, 12, 0, 0); @@ -1497,22 +1497,22 @@ void UIGuildInfoManageWnd::Paint() { int x; if (g_serviceType == 0) { this->DrawBitmap(128, 95, online, true); - std::sprintf(text, " %d", guild.unknown_0068); + std::sprintf(text, " %d", guild.onlineMemberCount); x = 138; } else { this->DrawBitmap(width + 16, 95, online, true); - std::sprintf(text, " %d", guild.unknown_0068); + std::sprintf(text, " %d", guild.onlineMemberCount); this->TextWidth(LookupMessage(MSI_GUILD_MASTER_NAME), 0, 0, 12, 0, 0); x = online->image.width + 16 + width; } this->DrawTextAt(x, 97, text, 0, 0, 12, 0, 0, 0); - std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILD_AVG_MEMBER_LEVEL), guild.unknown_0070); + std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILD_AVG_MEMBER_LEVEL), guild.memberAverageLevel); this->DrawTextAt(8, 113, text, 0, 0, 12, 0, 0, 0); - std::sprintf(text, "%s : %s", LookupMessage(MSI_GUILD_MANAGE_LAND), guild.unknown_0074.c_str()); + std::sprintf(text, "%s : %s", LookupMessage(MSI_GUILD_MANAGE_LAND), guild.manageLand.c_str()); this->DrawTextAt(8, 129, text, 0, 0, 12, 0, 0, 0); - std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILD_EXP), guild.unknown_008C); - this->DrawTextAt(200, 49, text, 0, 0, 12, guild.unknown_0060 >= 50 ? 0xFF : 0, 0, 0); + std::sprintf(text, "%s : %d", LookupMessage(MSI_GUILD_EXP), guild.exp); + this->DrawTextAt(200, 49, text, 0, 0, 12, guild.guildLevel >= 50 ? 0xFF : 0, 0, 0); std::sprintf(text, "%s", LookupMessage(MSI_GUILD_EMBLEM)); this->DrawTextAt(200, 73, text, 0, 0, 12, 0, 0, 0); std::sprintf(text, "%s", LookupMessage(MSI_ALLY_GUILD)); @@ -1536,17 +1536,17 @@ void UIGuildInfoManageWnd::Paint() { this->FillRegion(200, 155, 168, 48, RGB(boxRed, boxGreen, boxBlue)); int row = 0; int y = 157; - for (auto related = guild.unknown_00E4.begin(); related != guild.unknown_00E4.end(); ++related) { + for (auto related = guild.relatedGuilds.begin(); related != guild.relatedGuilds.end(); ++related) { if (y > 204) { break; } - if (related->unknown_0004 == 0) { + if (related->relation == 0) { if (row == this->m_allyRow) { unsigned hoverRed, hoverGreen, hoverBlue; SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue); this->FillRegion(204, y, 80, 16, RGB(hoverRed, hoverGreen, hoverBlue)); } - this->DrawTextAt(204, y, related->unknown_0008.c_str(), 0, 0, 12, 0, 0, 0); + this->DrawTextAt(204, y, related->name.c_str(), 0, 0, 12, 0, 0, 0); ++row; y += 16; } @@ -1556,17 +1556,17 @@ void UIGuildInfoManageWnd::Paint() { this->FillRegion(200, 229, 168, 48, RGB(boxRed, boxGreen, boxBlue)); row = 0; y = 231; - for (auto related = guild.unknown_00E4.begin(); related != guild.unknown_00E4.end(); ++related) { + for (auto related = guild.relatedGuilds.begin(); related != guild.relatedGuilds.end(); ++related) { if (y > 278) { break; } - if (related->unknown_0004 == 1) { + if (related->relation == 1) { if (row == this->m_hostileRow) { unsigned hoverRed, hoverGreen, hoverBlue; SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue); this->FillRegion(204, y, 80, 16, RGB(hoverRed, hoverGreen, hoverBlue)); } - this->DrawTextAt(204, y, related->unknown_0008.c_str(), 0, 0, 12, 0, 0, 0); + this->DrawTextAt(204, y, related->name.c_str(), 0, 0, 12, 0, 0, 0); ++row; y += 16; } @@ -1584,7 +1584,7 @@ void UIGuildSkillWnd::OnLBtnDown(int x, int y) { if (g_replayAnimationScaling == 0) { CSkillInfo skill = this->SkillAt(this->m_hoverIndex); - if (skill.available != 0 && skill.level != 0 && skill.unknown_000C != 0) { + if (skill.available != 0 && skill.level != 0 && skill.type != 0) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); if (gameMode) { int level = g_session.UseLevel(skill.id); @@ -1640,7 +1640,7 @@ void UIGuildTotalInfoWnd::Paint() { x += widths[column] + 1; } - const auto& entries = *reinterpret_cast*>(&g_guildInfo.unknown_00F4); + const auto& entries = *reinterpret_cast*>(&g_guildInfo.guildList); int drawn = 0; int index = 0; for (auto entry = entries.begin(); entry != entries.end(); ++entry, ++index) { @@ -1658,12 +1658,12 @@ void UIGuildTotalInfoWnd::Paint() { char buffer[512]; this->m_rows[drawn]->SetTextFitted(entry->name.c_str()); this->m_rows[drawn]->Move(8, y); - std::sprintf(buffer, "%d", entry->unknown_001C); + std::sprintf(buffer, "%d", entry->level); this->DrawTextAt(g_guildTotalInfoColumnWidths[0] + 9, y, buffer, 0, 0, 12, 0, 0, 0); - std::sprintf(buffer, "%d/%d", entry->unknown_0020, entry->unknown_0024); + std::sprintf(buffer, "%d/%d", entry->memberCount, entry->maxMembers); this->DrawTextAt(g_guildTotalInfoColumnWidths[0] + g_guildTotalInfoColumnWidths[1] + 10, y, buffer, 0, 0, 12, 0, 0, 0 ); - std::sprintf(buffer, "%d", entry->unknown_0028); + std::sprintf(buffer, "%d", entry->ranking); this->DrawTextAt(g_guildTotalInfoColumnWidths[0] + g_guildTotalInfoColumnWidths[1] + g_guildTotalInfoColumnWidths[2] + 11, y, buffer, 0, 0, 12, 0, 0, 0 ); if (++drawn == this->m_visibleRows * this->m_columns) { @@ -1676,11 +1676,11 @@ void UIGuildTotalInfoWnd::Paint() { // FUNCTION: fn_13061 void UIGuildMemberManageWnd::OnCreate(int, int) { this->CreateTabs(); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00C0 = 1; + g_guildInfo.membersRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 1, 0, 0, 0); this->m_members = g_guildInfo.m_members; this->m_rowSpacing += 8; @@ -1711,7 +1711,7 @@ void UIGuildMemberManageWnd::OnCreate(int, int) { this->AddChild(this->m_rowTexts[0][row]); } - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { const std::string prefix("유저인터페이스\\basic_interface\\"); UIBitmapButton** button = this->m_rowButtons; for (int y = 82; y < 298; y += 36, ++button) { @@ -1741,7 +1741,7 @@ void UIGuildMemberManageWnd::OnCreate(int, int) { button->SetBitmap((prefix + "btn_ok_b" + ".bmp").c_str(), 2, 0); button->SetBitmap((prefix + "btn_ok_dis" + ".bmp").c_str(), 3, 0); button->SetSize(button->BitmapWidth(), button->BitmapHeight()); - if (!g_guildInfo.unknown_00B4 || this->unknown_0180.empty()) { + if (!g_guildInfo.isMaster || this->membersByCharacterId.empty()) { x = -200; y = -200; } @@ -1831,7 +1831,7 @@ void UIGuildBanishedMemberWnd::Paint() { x += widths[column] + 1; } - const auto& members = g_guildInfo.unknown_00EC; + const auto& members = g_guildInfo.bannedMembers; int drawn = 0; int index = 0; for (auto member = members.begin(); member != members.end(); ++member, ++index) { @@ -1851,7 +1851,7 @@ void UIGuildBanishedMemberWnd::Paint() { char reason[260]; memset(reason, 0, sizeof(reason)); - strncpy_s(reason, sizeof(reason), member->unknown_0034.c_str(), member->unknown_0034.size()); + strncpy_s(reason, sizeof(reason), member->reason.c_str(), member->reason.size()); if (g_forbiddenWords.Contains(reason) == true) { std::string masked; g_forbiddenWords.Mask(reason, &masked); @@ -1897,8 +1897,8 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i } if (member.online == 1) { - const std::string headAct = g_session.GetHeadActName(member.job, member.unknown_002C, &member.unknown_0020); - const std::string headSpr = g_session.GetHeadSprName(member.job, member.unknown_002C, &member.unknown_0020); + const std::string headAct = g_session.GetHeadActName(member.job, member.sex, &member.head); + const std::string headSpr = g_session.GetHeadSprName(member.job, member.sex, &member.head); CActRes* action = static_cast(ResourceMgr::Instance().Load(headAct.c_str())); CSprRes* sprite = static_cast(ResourceMgr::Instance().Load(headSpr.c_str())); const std::uint32_t* palette = sprite->palette; @@ -1908,8 +1908,8 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i } const SpriteRleImage* image = sprite->images[cell.imageType][cell.image]; - if (member.unknown_0024 != 0) { - const std::string headPal = g_session.GetHeadPalName(member.unknown_0020, member.job, member.unknown_002C, member.unknown_0024); + if (member.headPalette != 0) { + const std::string headPal = g_session.GetHeadPalName(member.head, member.job, member.sex, member.headPalette); palette = static_cast(ResourceMgr::Instance().Load(headPal.c_str()))->palette; } @@ -1921,12 +1921,12 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } this->geometry.surface->DrawSurface( (this->m_rowSpacing - image->width + 36) / 2 + 6, (this->m_rowSpacing + 36) * row + 70, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } @@ -1940,7 +1940,7 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i } int x = g_guildMemberColumnWidths[0] + g_guildMemberColumnWidths[1] + 8; - const std::string job(g_session.GetJobName(member.job, member.unknown_002C)); + const std::string job(g_session.GetJobName(member.job, member.sex)); this->m_rowTexts[3][row]->SetTextFittedCodePage(job.c_str()); this->m_rowTexts[3][row]->Move(x + 4, y); x += g_guildMemberColumnWidths[2] + 1; @@ -1955,7 +1955,7 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i } char lastLogin[128]; - const __time32_t* lastLoginTime = reinterpret_cast(member.unknown_0074); + const __time32_t* lastLoginTime = reinterpret_cast(member.lastOfflineTime); if (*lastLoginTime != 0) { strftime(lastLogin, sizeof(lastLogin), LookupMessage(MSI_CANNOT_OPEN_BANKING_DURING_REFINING), _localtime32(lastLoginTime)); } else { @@ -1970,7 +1970,7 @@ bool UIGuildMemberManageWnd::DrawMember(GuildInfo::Member& member, int& index, i void UIGuildNoticeWnd::OnCreate(int, int) { this->CreateTabs(); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } @@ -1982,7 +1982,7 @@ void UIGuildNoticeWnd::OnCreate(int, int) { this->m_titleEdit->SetId(281); this->AddChild(this->m_titleEdit); g_windowMgr.SetFocus(this->m_titleEdit); - this->m_titleEdit->SetText(g_guildInfo.unknown_0030.c_str()); + this->m_titleEdit->SetText(g_guildInfo.subject.c_str()); this->m_bodyEdit = new UIEditCtrl3(); this->m_bodyEdit->SetSize(this->geometry.width - 10, 156); @@ -1991,7 +1991,7 @@ void UIGuildNoticeWnd::OnCreate(int, int) { this->m_bodyEdit->maximum = 119; this->m_bodyEdit->Background(242, 242, 242); this->AddChild(this->m_bodyEdit); - this->m_bodyEdit->SetText(g_guildInfo.unknown_0048.c_str()); + this->m_bodyEdit->SetText(g_guildInfo.notice.c_str()); const std::string prefix("유저인터페이스\\"); this->m_sendButton = new UIBitmapButton(); @@ -2000,7 +2000,7 @@ void UIGuildNoticeWnd::OnCreate(int, int) { this->m_sendButton->SetBitmap((prefix + "btn_send_b" + ".bmp").c_str(), 2, 0); this->m_sendButton->SetSize(this->m_sendButton->BitmapWidth(), this->m_sendButton->BitmapHeight()); - if (g_guildInfo.unknown_00B4 != 0) { + if (g_guildInfo.isMaster != 0) { this->m_sendButton->Move(this->geometry.width - 46, this->geometry.height - 24); } @@ -2022,7 +2022,7 @@ int UIGuildNoticeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, s if (g_forbiddenWords.Contains(this->m_titleEdit->Text()) == true || g_forbiddenWords.Contains(body.c_str()) == true) { g_windowMgr.Confirm(LookupMessage(MSI_BAD_SENTANGE), 0, true, false, 0, "Message", 280, 120, 0); } else { - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { g_modeMgr.gameMode->SendMsg(MM_GUILD_NOTICE, g_guildInfo.m_guildId, reinterpret_cast(this->m_titleEdit->Text()), reinterpret_cast(body.c_str()), 0); } this->InvalidateChildren(); @@ -2145,7 +2145,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st const int count = static_cast(g_session.m_additionalSkills.size()); for (int index = 0; index < count; ++index) { CSkillInfo skill = g_session.AdditionalSkillAt(index); - if (skill.available != 0 && (skill.unknown_0018 != 0 || skill.level != 0)) { + if (skill.available != 0 && (skill.upgradable != 0 || skill.level != 0)) { this->m_skills.push_back(skill); } } @@ -2157,7 +2157,7 @@ int UIGuildSkillWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a1, st case UM_MAKEMENU: this->m_menuItems.clear(); - if (g_windowMgr.unknown_0210 != 0) { + if (g_windowMgr.menuWnd != 0) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->m_hoverIndex != -1) { @@ -2241,11 +2241,11 @@ UIListBoxAgitMenu::UIListBoxAgitMenu() : UIListBox() { // FUNCTION: fn_13064 void UIGuildSkillWnd::OnCreate(int, int height) { this->CreateTabs(); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00C8 = 1; + g_guildInfo.skillsRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 3, 0, 0, 0); this->m_scrollBar = new UIScrollBar(); this->m_scrollBar->Configure(this->geometry.width - 15, 41, 1, this->geometry.height - 70); @@ -2360,7 +2360,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr switch (a1) { case ID_OK: if (this->m_positionMap.size() != 0) { - reinterpret_cast&>(g_guildInfo.unknown_010C) = this->m_positionMap; + reinterpret_cast&>(g_guildInfo.pendingPositionChanges) = this->m_positionMap; g_modeMgr.gameMode->SendMsg(MM_REQ_CHANGE_GUILD_POSITIONINFO, 0, 0, 0, 0); this->m_positionMap.clear(); this->m_button->Move(-200, -200); @@ -2375,30 +2375,30 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr g_windowMgr.CloseWindow(WID_GUILDWND); return 0; case ID_CHECK: - if (this->unknown_00D0[0] && this->unknown_00FC[0] && this->unknown_0128[0]) { + if (this->inviteChecks[0] && this->expelChecks[0] && this->storageChecks[0]) { for (int index = 0; index < 11; ++index) { - if (this->unknown_00D0[index] == sender) { + if (this->inviteChecks[index] == sender) { int found; GuildPositionEntry& position = this->PositionAt(this->m_scrollTop + index, &found); if (found) { position.canInvite = a2; - this->m_positionMap[position.unknown_0004] = position; + this->m_positionMap[position.positionId] = position; } } - if (this->unknown_00FC[index] == sender) { + if (this->expelChecks[index] == sender) { int found; GuildPositionEntry& position = this->PositionAt(this->m_scrollTop + index, &found); if (found) { position.canExpel = a2; - this->m_positionMap[position.unknown_0004] = position; + this->m_positionMap[position.positionId] = position; } } - if (this->unknown_0128[index] == sender) { + if (this->storageChecks[index] == sender) { int found; GuildPositionEntry& position = this->PositionAt(this->m_scrollTop + index, &found); if (found) { position.canStorage = a2; - this->m_positionMap[position.unknown_0004] = position; + this->m_positionMap[position.positionId] = position; } } } @@ -2406,10 +2406,10 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr } return 0; case ID_POSNAME_EDIT: - if (this->unknown_0180[0]) { + if (this->positionNameEdits[0]) { int row = a1 - 275; for (int index = 0; index < 11; ++index) { - if (this->unknown_0180[index] == sender) { + if (this->positionNameEdits[index] == sender) { row = index; break; } @@ -2418,17 +2418,17 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr int found; GuildPositionEntry& position = this->PositionAt(this->m_scrollTop + row, &found); if (found) { - position.name = this->unknown_0180[row]->Text(); - this->m_positionMap[position.unknown_0004] = position; + position.name = this->positionNameEdits[row]->Text(); + this->m_positionMap[position.positionId] = position; } break; } return 0; case ID_PAYRATE_EDIT: - if (this->unknown_0154[0]) { + if (this->taxEdits[0]) { int row = a1 - 276; for (int index = 0; index < 11; ++index) { - if (this->unknown_0154[index] == sender) { + if (this->taxEdits[index] == sender) { row = index; break; } @@ -2437,7 +2437,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr int found; GuildPositionEntry& position = this->PositionAt(this->m_scrollTop + row, &found); if (found) { - position.tax = std::atoi(this->unknown_0154[row]->Text()); + position.tax = std::atoi(this->taxEdits[row]->Text()); if (position.tax < 0 || position.tax > 50) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_INC_ATTACKDAMAGE_ABILITYPOWER), 50, 0).c_str()), 0xFF, 0, 0, 0); if (position.tax < 0) { @@ -2446,7 +2446,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr position.tax = 50; } } - this->m_positionMap[position.unknown_0004] = position; + this->m_positionMap[position.positionId] = position; } break; } @@ -2455,7 +2455,7 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr return 0; } - if (g_guildInfo.unknown_00B4 && this->m_positionMap.size()) { + if (g_guildInfo.isMaster && this->m_positionMap.size()) { this->m_button->Move(this->geometry.width - 61, this->geometry.height - 23); } else { this->m_button->Move(-200, -200); @@ -2464,9 +2464,9 @@ int UIGuildPositionManageWnd::SendMsg(UIWindow* sender, int message, std::intptr return 0; case UM_REFRESH: - this->m_positions = reinterpret_cast&>(g_guildInfo.unknown_00D4); + this->m_positions = reinterpret_cast&>(g_guildInfo.positions); this->InvalidateChildren(); - if (g_guildInfo.unknown_00B4 && this->m_positionMap.size()) { + if (g_guildInfo.isMaster && this->m_positionMap.size()) { this->m_button->Move(this->geometry.width - 61, this->geometry.height - 23); } else { this->m_button->Move(-200, -200); @@ -2567,16 +2567,16 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t if (member->positionId != a1 && valid) { member->positionId = a1; member->positionName = g_guildInfo.m_positions[member->positionId]; - this->unknown_0180[static_cast(member->characterId)].accountId = member->accountId; - this->unknown_0180[static_cast(member->characterId)].characterId = member->characterId; - this->unknown_0180[static_cast(member->characterId)].positionId = member->positionId; + this->membersByCharacterId[static_cast(member->characterId)].accountId = member->accountId; + this->membersByCharacterId[static_cast(member->characterId)].characterId = member->characterId; + this->membersByCharacterId[static_cast(member->characterId)].positionId = member->positionId; } break; } } int x = this->geometry.width - 61; int y = this->geometry.height - 23; - if (!g_guildInfo.unknown_00B4 || this->unknown_0180.empty()) { + if (!g_guildInfo.isMaster || this->membersByCharacterId.empty()) { x = -200; y = -200; } @@ -2587,10 +2587,10 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case UM_COMMAND: switch (a1) { case ID_OK: - if (!this->unknown_0180.empty()) { - g_guildInfo.unknown_0104 = this->unknown_0180; + if (!this->membersByCharacterId.empty()) { + g_guildInfo.pendingMemberPositions = this->membersByCharacterId; g_modeMgr.gameMode->SendMsg(MM_REQ_CHANGE_MEMBERPOS, 0, 0, 0, 0); - this->unknown_0180.clear(); + this->membersByCharacterId.clear(); UIButton* button = this->m_button; button->SetDisabled(1); button->Invalidate(); @@ -2615,9 +2615,9 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t break; } } - this->m_hoverRow = this->unknown_016C = this->m_scrollTop + row; + this->m_hoverRow = this->selectedMemberRow = this->m_scrollTop + row; this->Invalidate(); - if (g_windowMgr.unknown_0214 != nullptr) { + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } UIWindow* menu = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); @@ -2664,53 +2664,53 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t return this->m_scrollTop - previous; } case UM_MAKEMENU: - this->unknown_0150.clear(); - if (g_windowMgr.unknown_0210 != 0) { + this->memberMenuEntries.clear(); + if (g_windowMgr.menuWnd != 0) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->m_hoverRow != -1) { GuildInfo::Member member; if (this->GetMember(this->m_hoverRow, member) == true) { - const int master = g_guildInfo.unknown_00D0; + const int master = g_guildInfo.masterCharacterId; if (member.characterId == static_cast(g_session.m_gid)) { if (master != 0) { if (member.characterId != master) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_LEAVE_GUILD), 17)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_LEAVE_GUILD), 17)); } - } else if (!(member.name == g_guildInfo.unknown_0018)) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_LEAVE_GUILD), 17)); + } else if (!(member.name == g_guildInfo.masterName)) { + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_LEAVE_GUILD), 17)); } } else { if (master != 0) { if (master == static_cast(g_session.m_gid)) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_SHOP_WITHDRAWAL), 59)); - } else if (g_guildInfo.unknown_00B0 != 0 && member.characterId != master) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_SHOP_WITHDRAWAL), 59)); + } else if (g_guildInfo.canExpel != 0 && member.characterId != master) { + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); } - } else if (g_guildInfo.unknown_0018 == g_session.DecodePlayerName()) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_SHOP_WITHDRAWAL), 59)); - } else if (g_guildInfo.unknown_00B0 != 0 && !(member.name == g_guildInfo.unknown_0018)) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); + } else if (g_guildInfo.masterName == g_session.DecodePlayerName()) { + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_SHOP_WITHDRAWAL), 59)); + } else if (g_guildInfo.canExpel != 0 && !(member.name == g_guildInfo.masterName)) { + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_EXPEL_GUILD), 16)); } if (member.online == 1) { - const bool invite = g_session.unknown_5464 != 0 && + const bool invite = g_session.partyLeader != 0 && g_session.PartyByName(member.name.c_str()).valid == 0; if (invite) { - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_REQ_JOIN_PARTY3), 5)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_REQ_JOIN_PARTY3), 5)); } - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_DIRECT_CHAT), 20)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_DIRECT_CHAT), 20)); } - this->unknown_0150.push_back(MiniPartyInfoEntry(LookupMessage(MSI_USA_PERSONALINFO_DEATH), 58)); + this->memberMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_USA_PERSONALINFO_DEATH), 58)); } } } - if (this->unknown_0150.size() != 0) { + if (this->memberMenuEntries.size() != 0) { UIWindow* menu = g_windowMgr.EnsureWindow(WID_MENUWND); - for (std::size_t index = 0; index < this->unknown_0150.size(); ++index) { - menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->unknown_0150[index].text.c_str()), 0, 0, 0); + for (std::size_t index = 0; index < this->memberMenuEntries.size(); ++index) { + menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->memberMenuEntries[index].text.c_str()), 0, 0, 0); } menu->SendMsg(nullptr, UM_SET_CALLER_WID, WID_GUILDMEMBERMANAGEWND, 0, 0, 0); menu->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); @@ -2737,7 +2737,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t return 0; } - switch (this->unknown_0150[a1].value) { + switch (this->memberMenuEntries[a1].value) { case MENUID_REMOVE_GUILE_MEMBER: { GuildInfo::Member target; if (this->GetMember(this->m_hoverRow, target)) { @@ -2753,7 +2753,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case MENUID_LEAVE_GUILD: { GuildInfo::Member target; if (this->GetMember(this->m_hoverRow, target) && target.accountId == static_cast(g_session.m_aid)) { - *reinterpret_cast(g_session.unknown_0F54) = static_cast(static_cast(target.characterId)); + *reinterpret_cast(g_session.guildTargetCharacter) = static_cast(static_cast(target.characterId)); g_windowMgr.EnsureWindow(WID_GUILDLEAVEREASONDESCWND); } break; @@ -2801,11 +2801,11 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t if (g_windowMgr.Confirm(text.c_str(), 2, false, false, 0, "Message", 280, 120, 0) != 188) { target.positionId = 0; target.positionName = g_guildInfo.m_positions[target.positionId]; - this->unknown_0180[static_cast(target.characterId)].accountId = target.accountId; - this->unknown_0180[static_cast(target.characterId)].characterId = target.characterId; - this->unknown_0180[static_cast(target.characterId)].positionId = target.positionId; - g_guildInfo.unknown_0104.clear(); - g_guildInfo.unknown_0104 = this->unknown_0180; + this->membersByCharacterId[static_cast(target.characterId)].accountId = target.accountId; + this->membersByCharacterId[static_cast(target.characterId)].characterId = target.characterId; + this->membersByCharacterId[static_cast(target.characterId)].positionId = target.positionId; + g_guildInfo.pendingMemberPositions.clear(); + g_guildInfo.pendingMemberPositions = this->membersByCharacterId; g_modeMgr.GetGameMode()->SendMsg(MM_REQ_CHANGE_MEMBERPOS, 0, 0, 0, 0); } } @@ -2815,12 +2815,12 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t return 0; } case UM_REFRESH: { - this->unknown_0180.clear(); + this->membersByCharacterId.clear(); this->m_members = g_guildInfo.m_members; this->InvalidateChildren(); int x = this->geometry.width - 61; int y = this->geometry.height - 23; - if (!g_guildInfo.unknown_00B4 || this->unknown_0180.empty()) { + if (!g_guildInfo.isMaster || this->membersByCharacterId.empty()) { x = -200; y = -200; } @@ -2830,7 +2830,7 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } case UM_SET_DISABLE: { this->m_members = g_guildInfo.m_members; - const bool enabled = g_guildInfo.unknown_00B4 != 0; + const bool enabled = g_guildInfo.isMaster != 0; for (int index = 0; index < 6; ++index) { if (this->m_rowButtons[index]) { this->m_rowButtons[index]->Enable(enabled); @@ -2869,12 +2869,12 @@ int UIGuildMemberManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t // FUNCTION: fn_13063 void UIGuildPositionManageWnd::OnCreate(int, int) { this->CreateTabs(); - this->m_positions = reinterpret_cast&>(g_guildInfo.unknown_00D4); - if (std::strcmp(g_guildInfo.unknown_0018.c_str(), "") == 0) { + this->m_positions = reinterpret_cast&>(g_guildInfo.positions); + if (std::strcmp(g_guildInfo.masterName.c_str(), "") == 0) { g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 0, 0, 0, 0); } - g_guildInfo.unknown_00C4 = 1; + g_guildInfo.positionsRequested = 1; g_modeMgr.gameMode->SendMsg(MM_REQ_GUILD_MENU, 2, 0, 0, 0); this->m_scrollTop = 0; this->m_hoverIndex = 0; @@ -2885,79 +2885,79 @@ void UIGuildPositionManageWnd::OnCreate(int, int) { this->m_scrollBar->Configure(this->geometry.width - 15, 41, 1, this->geometry.height - 70); this->AddChild(this->m_scrollBar); - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { for (int row = 0; row < 11; ++row) { - this->unknown_00D0[row] = new UICheckBox(); - this->unknown_00D0[row]->SetSize(12, 12); - this->unknown_00D0[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); - this->unknown_00D0[row]->Move(this->geometry.width - 148, row * g_guildPositionRowHeight + 66); - this->unknown_00D0[row]->geometry.unknown_0030 = 0; - this->unknown_00D0[row]->Invalidate(); - this->AddChild(this->unknown_00D0[row]); + this->inviteChecks[row] = new UICheckBox(); + this->inviteChecks[row]->SetSize(12, 12); + this->inviteChecks[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); + this->inviteChecks[row]->Move(this->geometry.width - 148, row * g_guildPositionRowHeight + 66); + this->inviteChecks[row]->geometry.state = 0; + this->inviteChecks[row]->Invalidate(); + this->AddChild(this->inviteChecks[row]); } for (int row = 0; row < 11; ++row) { - this->unknown_00FC[row] = new UICheckBox(); - this->unknown_00FC[row]->SetSize(12, 12); - this->unknown_00FC[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); - this->unknown_00FC[row]->Move(this->geometry.width - 48, row * g_guildPositionRowHeight + 66); - this->unknown_00FC[row]->geometry.unknown_0030 = 0; - this->unknown_00FC[row]->Invalidate(); - this->AddChild(this->unknown_00FC[row]); + this->expelChecks[row] = new UICheckBox(); + this->expelChecks[row]->SetSize(12, 12); + this->expelChecks[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); + this->expelChecks[row]->Move(this->geometry.width - 48, row * g_guildPositionRowHeight + 66); + this->expelChecks[row]->geometry.state = 0; + this->expelChecks[row]->Invalidate(); + this->AddChild(this->expelChecks[row]); } for (int row = 0; row < 11; ++row) { - this->unknown_0128[row] = new UICheckBox(); - this->unknown_0128[row]->SetSize(12, 12); - this->unknown_0128[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); - this->unknown_0128[row]->Move(this->geometry.width - 124, row * g_guildPositionRowHeight + 66); - this->unknown_0128[row]->geometry.unknown_0030 = 0; - this->unknown_0128[row]->Invalidate(); - this->AddChild(this->unknown_0128[row]); + this->storageChecks[row] = new UICheckBox(); + this->storageChecks[row]->SetSize(12, 12); + this->storageChecks[row]->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); + this->storageChecks[row]->Move(this->geometry.width - 124, row * g_guildPositionRowHeight + 66); + this->storageChecks[row]->geometry.state = 0; + this->storageChecks[row]->Invalidate(); + this->AddChild(this->storageChecks[row]); } } - if (g_guildInfo.unknown_00B4) { + if (g_guildInfo.isMaster) { for (int row = 0; row < 11; ++row) { - this->unknown_0180[row] = new UIEditCtrlVarId(); - this->unknown_0180[row]->SetSize(g_guildPositionColumnWidths[1] - 4, 16); - this->unknown_0180[row]->Move(g_guildPositionColumnWidths[0] + 9, row * g_guildPositionRowHeight + 66); - this->unknown_0180[row]->maximum = 30; - this->unknown_0180[row]->Background(242, 242, 242); - this->unknown_0180[row]->SetId(275); - this->AddChild(this->unknown_0180[row]); + this->positionNameEdits[row] = new UIEditCtrlVarId(); + this->positionNameEdits[row]->SetSize(g_guildPositionColumnWidths[1] - 4, 16); + this->positionNameEdits[row]->Move(g_guildPositionColumnWidths[0] + 9, row * g_guildPositionRowHeight + 66); + this->positionNameEdits[row]->maximum = 30; + this->positionNameEdits[row]->Background(242, 242, 242); + this->positionNameEdits[row]->SetId(275); + this->AddChild(this->positionNameEdits[row]); } for (int row = 0; row < 11; ++row) { - this->unknown_0154[row] = new UIEditCtrlVarId(); - this->unknown_0154[row]->SetSize(g_guildPositionColumnWidths[4] / 2 - 4, 16); - this->unknown_0154[row]->Move( + this->taxEdits[row] = new UIEditCtrlVarId(); + this->taxEdits[row]->SetSize(g_guildPositionColumnWidths[4] / 2 - 4, 16); + this->taxEdits[row]->Move( g_guildPositionColumnWidths[1] + 12 + g_guildPositionColumnWidths[0] + g_guildPositionColumnWidths[2] + g_guildPositionColumnWidths[3], row * g_guildPositionRowHeight + 66 ); - this->unknown_0154[row]->maximum = 2; - this->unknown_0154[row]->Background(242, 242, 242); - this->unknown_0154[row]->SetId(276); - this->AddChild(this->unknown_0154[row]); + this->taxEdits[row]->maximum = 2; + this->taxEdits[row]->Background(242, 242, 242); + this->taxEdits[row]->SetId(276); + this->AddChild(this->taxEdits[row]); } } else { for (int row = 0; row < 11; ++row) { - this->unknown_01D8[row] = new UIStaticText(); - this->unknown_01D8[row]->SetSize(g_guildPositionColumnWidths[1] - 4, 15); - this->unknown_01D8[row]->SetTextFitted(""); - this->unknown_01D8[row]->Move(g_guildPositionColumnWidths[0] + 9, row * g_guildPositionRowHeight + 66); - this->AddChild(this->unknown_01D8[row]); + this->positionNameLabels[row] = new UIStaticText(); + this->positionNameLabels[row]->SetSize(g_guildPositionColumnWidths[1] - 4, 15); + this->positionNameLabels[row]->SetTextFitted(""); + this->positionNameLabels[row]->Move(g_guildPositionColumnWidths[0] + 9, row * g_guildPositionRowHeight + 66); + this->AddChild(this->positionNameLabels[row]); } for (int row = 0; row < 11; ++row) { - this->unknown_01AC[row] = new UIStaticText(); - this->unknown_01AC[row]->SetSize(g_guildPositionColumnWidths[4] / 2 - 4, 15); - this->unknown_01AC[row]->SetTextFitted(""); - this->unknown_01AC[row]->Move( + this->taxLabels[row] = new UIStaticText(); + this->taxLabels[row]->SetSize(g_guildPositionColumnWidths[4] / 2 - 4, 15); + this->taxLabels[row]->SetTextFitted(""); + this->taxLabels[row]->Move( g_guildPositionColumnWidths[1] + 12 + g_guildPositionColumnWidths[0] + g_guildPositionColumnWidths[2] + g_guildPositionColumnWidths[3], row * g_guildPositionRowHeight + 66 ); - this->AddChild(this->unknown_01AC[row]); + this->AddChild(this->taxLabels[row]); } } @@ -2972,7 +2972,7 @@ void UIGuildPositionManageWnd::OnCreate(int, int) { button->SetBitmap((prefix + "btn_ok_b" + ".bmp").c_str(), 2, 0); button->SetBitmap((prefix + "btn_ok_dis" + ".bmp").c_str(), 3, 0); button->SetSize(button->BitmapWidth(), button->BitmapHeight()); - if (!g_guildInfo.unknown_00B4 || this->m_positionMap.empty()) { + if (!g_guildInfo.isMaster || this->m_positionMap.empty()) { x = -200; y = -200; } @@ -2991,20 +2991,20 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a switch (message) { case UM_MENU_SELECTED: { CMode* gameMode = g_modeMgr.GetGameMode(); - if (this->unknown_00E0[a1].value != 27) { + if (this->emblemMenuEntries[a1].value != 27) { break; } if (this->m_allyRow != -1) { int row = 0; - for (std::list::iterator it = g_guildInfo.unknown_00E4.begin(); it != g_guildInfo.unknown_00E4.end(); ++it) { + for (std::list::iterator it = g_guildInfo.relatedGuilds.begin(); it != g_guildInfo.relatedGuilds.end(); ++it) { if (row >= 3) { break; } - if (it->unknown_0004 == 0) { + if (it->relation == 0) { if (row == this->m_allyRow) { - if (it->unknown_0000 != 0) { - gameMode->SendMsg(MM_REQ_DELETE_RELATED_GUILD, it->unknown_0000, 0, 0, 0); + if (it->guildId != 0) { + gameMode->SendMsg(MM_REQ_DELETE_RELATED_GUILD, it->guildId, 0, 0, 0); } return 0; } @@ -3013,14 +3013,14 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } } else if (this->m_hostileRow != -1) { int row = 0; - for (std::list::iterator it = g_guildInfo.unknown_00E4.begin(); it != g_guildInfo.unknown_00E4.end(); ++it) { + for (std::list::iterator it = g_guildInfo.relatedGuilds.begin(); it != g_guildInfo.relatedGuilds.end(); ++it) { if (row >= 3) { break; } - if (it->unknown_0004 == 1) { + if (it->relation == 1) { if (row == this->m_hostileRow) { - if (it->unknown_0000 != 0) { - gameMode->SendMsg(MM_REQ_DELETE_RELATED_GUILD, it->unknown_0000, 1, 0, 0); + if (it->guildId != 0) { + gameMode->SendMsg(MM_REQ_DELETE_RELATED_GUILD, it->guildId, 1, 0, 0); } return 0; } @@ -3031,17 +3031,17 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a break; } case UM_MAKEMENU: - this->unknown_00E0.erase(this->unknown_00E0.begin(), this->unknown_00E0.end()); - if (g_windowMgr.unknown_0210 != 0) { + this->emblemMenuEntries.erase(this->emblemMenuEntries.begin(), this->emblemMenuEntries.end()); + if (g_windowMgr.menuWnd != 0) { g_windowMgr.CloseWindow(WID_MENUWND); } - if (g_guildInfo.unknown_00B4 != 0) { - this->unknown_00E0.push_back(MiniPartyInfoEntry(LookupMessage(MSI_DELETE), 27)); + if (g_guildInfo.isMaster != 0) { + this->emblemMenuEntries.push_back(MiniPartyInfoEntry(LookupMessage(MSI_DELETE), 27)); } - if (this->unknown_00E0.size() != 0) { + if (this->emblemMenuEntries.size() != 0) { UIWindow* menu = g_windowMgr.EnsureWindow(WID_MENUWND); - for (std::size_t index = 0; index < this->unknown_00E0.size(); ++index) { - menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->unknown_00E0[index].text.c_str()), 0, 0, 0); + for (std::size_t index = 0; index < this->emblemMenuEntries.size(); ++index) { + menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->emblemMenuEntries[index].text.c_str()), 0, 0, 0); } menu->SendMsg(nullptr, UM_SET_CALLER_WID, WID_GUILDINFOMANAGEWND, 0, 0, 0); menu->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); @@ -3066,22 +3066,22 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a g_windowMgr.CloseWindow(WID_GUILDWND); return 0; case ID_CHANGE_GUILE_EMBLEM: { - if (g_windowMgr.unknown_0214 != 0) { + if (g_windowMgr.comboBoxWnd != 0) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } - this->unknown_00D8.clear(); + this->emblemFiles.clear(); char directory[256]; std::sprintf(directory, "%s\\emblem\\", g_applicationDirectory); - EnumerateFileNames(this->unknown_00D8, directory, "*.bmp"); - EnumerateFileNames(this->unknown_00D8, directory, "*.gif"); - const int count = static_cast(this->unknown_00D8.size()); + EnumerateFileNames(this->emblemFiles, directory, "*.bmp"); + EnumerateFileNames(this->emblemFiles, directory, "*.gif"); + const int count = static_cast(this->emblemFiles.size()); if (count == 0) { g_windowMgr.Confirm(LookupMessage(MSI_SWAP_FAIL_SWAP), 0, true, false, 0, "Caution", 280, 120, 0); return 0; } UIWindow* menu = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); - for (std::list::iterator it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (std::list::iterator it = this->emblemFiles.begin(); it != this->emblemFiles.end(); ++it) { menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(it->c_str()), 0, 0, 0); } menu->SendMsg(nullptr, UM_SETCURITEM, 0, 0, 0, 0); @@ -3102,13 +3102,13 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a case UM_SETSTATE: break; case UM_COMBOBOX_SELECTED: { - if (this->unknown_00D8.size() == 0) { + if (this->emblemFiles.size() == 0) { break; } std::string name; int index = 0; - for (std::list::iterator it = this->unknown_00D8.begin(); it != this->unknown_00D8.end(); ++it) { + for (std::list::iterator it = this->emblemFiles.begin(); it != this->emblemFiles.end(); ++it) { if (a1 == index) { name = it->c_str(); break; @@ -3144,7 +3144,7 @@ int UIGuildInfoManageWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } case UM_REFRESH: this->m_guildId = g_guildInfo.m_guildId; - if (g_guildInfo.unknown_00B4 != 0) { + if (g_guildInfo.isMaster != 0) { this->m_editButton->Move(this->geometry.width - this->m_editButton->geometry.width - 8, 69); this->m_disbandButton->Move(this->geometry.width - this->m_disbandButton->geometry.width - 15, this->geometry.height - this->m_disbandButton->geometry.height - 5); } else { diff --git a/Source/UI/Guild/UIGuildWnd.h b/Source/UI/Guild/UIGuildWnd.h index cf4e32c16..dcb7aa595 100644 --- a/Source/UI/Guild/UIGuildWnd.h +++ b/Source/UI/Guild/UIGuildWnd.h @@ -48,7 +48,7 @@ bool CompareWideText(const char* left, const char* right); struct GuildPositionEntry { /* 0000 */ int id; - /* 0004 */ int unknown_0004; + /* 0004 */ int positionId; /* 0008 */ std::string name; /* 0020 */ int canInvite; /* 0024 */ int canExpel; @@ -113,8 +113,8 @@ protected: /* 00D0 */ UIBitmapButton* m_editButton; /* 00D4 */ UIBitmapButton* m_disbandButton; - /* 00D8 */ std::list unknown_00D8; - /* 00E0 */ std::vector unknown_00E0; + /* 00D8 */ std::list emblemFiles; + /* 00E0 */ std::vector emblemMenuEntries; /* 00EC */ int unknown_00EC; /* 00F0 */ int unknown_00F0; /* 00F4 */ std::uint32_t m_guildId; @@ -147,16 +147,16 @@ protected: /* 0130 */ UIBitmapButton* m_rowButtons[6]; /* 0148 */ UIScrollBar* m_scrollBar; /* 014C */ UIButton* m_button; - /* 0150 */ std::vector unknown_0150; + /* 0150 */ std::vector memberMenuEntries; /* 015C */ int m_scrollTop; /* 0160 */ int m_hoverRow; /* 0164 */ int m_columns; /* 0168 */ int m_visibleRows; - /* 016C */ int unknown_016C; + /* 016C */ int selectedMemberRow; /* 0170 */ int m_scrollable; /* 0174 */ int m_rowSpacing; /* 0178 */ std::list m_members; - /* 0180 */ std::map unknown_0180; + /* 0180 */ std::map membersByCharacterId; /* 0188 */ int m_sortColumn; /* 018C */ std::map m_sortOrders; /* 0194 */ UICheckBox* m_onlineCheck; @@ -202,13 +202,13 @@ protected: int PositionIndexAt(int x, int y); GuildPositionEntry& PositionAt(int index, int* found); - /* 00D0 */ UICheckBox* unknown_00D0[11]; - /* 00FC */ UICheckBox* unknown_00FC[11]; - /* 0128 */ UICheckBox* unknown_0128[11]; - /* 0154 */ UIEditCtrl* unknown_0154[11]; - /* 0180 */ UIEditCtrl* unknown_0180[11]; - /* 01AC */ UIStaticText* unknown_01AC[11]; - /* 01D8 */ UIStaticText* unknown_01D8[11]; + /* 00D0 */ UICheckBox* inviteChecks[11]; + /* 00FC */ UICheckBox* expelChecks[11]; + /* 0128 */ UICheckBox* storageChecks[11]; + /* 0154 */ UIEditCtrl* taxEdits[11]; + /* 0180 */ UIEditCtrl* positionNameEdits[11]; + /* 01AC */ UIStaticText* taxLabels[11]; + /* 01D8 */ UIStaticText* positionNameLabels[11]; /* 0204 */ UIScrollBar* m_scrollBar; /* 0208 */ UIButton* m_button; /* 020C */ int m_scrollTop; diff --git a/Source/UI/Guild/UIGuild_Storage_Log.cpp b/Source/UI/Guild/UIGuild_Storage_Log.cpp index 27df94328..13a8450c3 100644 --- a/Source/UI/Guild/UIGuild_Storage_Log.cpp +++ b/Source/UI/Guild/UIGuild_Storage_Log.cpp @@ -21,20 +21,20 @@ std::vector g_guildStorageLogs[3]; // OFFSET: 0x009469D0 // FUNCTION: fn_12849 UIGuild_Storage_Log::UIGuild_Storage_Log() : UIFrameWnd(0) { - this->unknown_0184 = 0; - this->unknown_0188 = 0; - this->unknown_018C = 0; + this->m_rowFlagsBegin = 0; + this->m_rowFlagsEnd = 0; + this->m_rowFlagsCapacity = 0; this->m_category = 0; this->m_offset = 0; this->m_state = 1; - this->unknown_0174 = 0; + this->m_logTextHeight = 0; const int first = static_cast(g_guildStorageLogs[0].size()); - this->unknown_0178[0] = first; + this->m_categoryCounts[0] = first; const int second = static_cast(g_guildStorageLogs[1].size()); - this->unknown_0178[1] = second; + this->m_categoryCounts[1] = second; const int third = static_cast(g_guildStorageLogs[2].size()); this->m_page = 1; - this->unknown_0178[2] = third; + this->m_categoryCounts[2] = third; this->m_pageCounts[0] = (first + 9) / 10; this->m_pageCounts[1] = (second + 9) / 10; this->m_pageCounts[2] = (third + 9) / 10; @@ -66,8 +66,8 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->m_state = 1; this->m_page = page + 1; - this->unknown_0174 = 0; - this->unknown_0188 = this->unknown_0184; + this->m_logTextHeight = 0; + this->m_rowFlagsEnd = this->m_rowFlagsBegin; this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); return 0; } @@ -77,7 +77,7 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a, if (page > 1) { const int state = this->m_state; this->m_state = 1; - this->unknown_0174 = 0; + this->m_logTextHeight = 0; unsigned offset = this->m_offset; if (state == 11) { @@ -88,7 +88,7 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->m_offset = std::max(0u, offset); this->m_page = std::max(1u, page - 1); - this->unknown_0188 = this->unknown_0184; + this->m_rowFlagsEnd = this->m_rowFlagsBegin; this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); return 0; } @@ -102,9 +102,9 @@ int UIGuild_Storage_Log::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->m_category = static_cast(a); this->m_page = 1; this->m_state = 1; - this->unknown_0174 = 0; + this->m_logTextHeight = 0; this->m_offset = 0; - this->unknown_0188 = this->unknown_0184; + this->m_rowFlagsEnd = this->m_rowFlagsBegin; this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); return 0; @@ -130,17 +130,17 @@ __forceinline void UIGuild_Storage_Log::FillLogRows(int index) { char number[256]; std::memset(number, 0, 255); for (auto it = logs.begin(); it != logs.end(); ++it) { - if (static_cast(this->m_state) > 10 || this->m_offset >= this->unknown_0178[index]) { + if (static_cast(this->m_state) > 10 || this->m_offset >= this->m_categoryCounts[index]) { break; } std::string date; - date = logs[this->m_offset].unknown_003C; - std::uint32_t flag = logs[this->m_offset].unknown_0008; - reinterpret_cast*>(&this->unknown_0184)->push_back(flag); - _itoa(logs[this->m_offset].unknown_0004, number, 10); + date = logs[this->m_offset].itemName; + std::uint32_t flag = logs[this->m_offset].operation; + reinterpret_cast*>(&this->m_rowFlagsBegin)->push_back(flag); + _itoa(logs[this->m_offset].quantity, number, 10); - if (logs[this->m_offset].unknown_0070 == 1) { + if (logs[this->m_offset].category == 1) { this->m_dateTexts[this->m_state - 1]->SetColor(255, 0, 0); this->m_nameTexts[this->m_state - 1]->SetColor(255, 0, 0); this->m_itemTexts[this->m_state - 1]->SetColor(255, 0, 0); @@ -154,9 +154,9 @@ __forceinline void UIGuild_Storage_Log::FillLogRows(int index) { this->m_dateTexts[this->m_state - 1]->SetTextFitted(date.c_str()); this->m_nameTexts[this->m_state - 1]->SetTextFitted(number); - this->m_itemTexts[this->m_state - 1]->SetTextFitted(logs[this->m_offset].unknown_0009); - this->m_countTexts[this->m_state - 1]->SetTextFitted(logs[this->m_offset].unknown_0021); - this->unknown_0174 += 15; + this->m_itemTexts[this->m_state - 1]->SetTextFitted(logs[this->m_offset].characterName); + this->m_countTexts[this->m_state - 1]->SetTextFitted(logs[this->m_offset].timestamp); + this->m_logTextHeight += 15; ++this->m_state; ++this->m_offset; } @@ -199,12 +199,12 @@ void UIGuild_Storage_Log::Paint() { CBitmapRes* out = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\out.bmp"))); CBitmapRes* in = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\in.bmp"))); - for (int tab = 0; tab < static_cast(this->unknown_0158->labels.size()); ++tab) { - this->unknown_0158->colors[tab] = 0xFFFFFFFF; - this->unknown_0158->Invalidate(); + for (int tab = 0; tab < static_cast(this->m_tabs->labels.size()); ++tab) { + this->m_tabs->colors[tab] = 0xFFFFFFFF; + this->m_tabs->Invalidate(); } - this->unknown_0158->colors[this->m_category] = 0xC89623; - this->unknown_0158->Invalidate(); + this->m_tabs->colors[this->m_category] = 0xC89623; + this->m_tabs->Invalidate(); this->DrawTextAt(234, 23, LookupMessage(MSI_EA5), 0, 0, 11, 0xFF, 0, 0); this->DrawTextAt(6, 47, LookupMessage(MSI_GUILD_STORAGE_LOG_IN), 0, 0, 12, 0, 0, 0); @@ -215,7 +215,7 @@ void UIGuild_Storage_Log::Paint() { this->FillRows(); int y = 60; - for (const std::uint32_t* it = this->unknown_0184; it != this->unknown_0188; ++it) { + for (const std::uint32_t* it = this->m_rowFlagsBegin; it != this->m_rowFlagsEnd; ++it) { this->DrawBitmap(6, y, *it == 1 ? in : out, true); y += 15; } diff --git a/Source/UI/Guild/UIGuild_Storage_Log.h b/Source/UI/Guild/UIGuild_Storage_Log.h index 9c86ec5fb..347e57955 100644 --- a/Source/UI/Guild/UIGuild_Storage_Log.h +++ b/Source/UI/Guild/UIGuild_Storage_Log.h @@ -11,18 +11,18 @@ class UIStaticText; class UITabControl; struct GuildStorageLogEntry { - /* 0000 */ int unknown_0000 = 0; - /* 0004 */ int unknown_0004 = 0; - /* 0008 */ unsigned char unknown_0008 = 0; - /* 0009 */ char unknown_0009[24] = {}; - /* 0021 */ char unknown_0021[24] = {}; - /* 003C */ std::string unknown_003C; - /* 0054 */ unsigned char unknown_0054 = 0; - /* 0058 */ int unknown_0058 = 0; - /* 005C */ int unknown_005C = 0; - /* 0060 */ unsigned char unknown_0060[16] = {}; - /* 0070 */ unsigned char unknown_0070 = 0; - /* 0072 */ std::int16_t unknown_0072 = 0; + /* 0000 */ int logId = 0; + /* 0004 */ int quantity = 0; + /* 0008 */ unsigned char operation = 0; + /* 0009 */ char characterName[24] = {}; + /* 0021 */ char timestamp[24] = {}; + /* 003C */ std::string itemName; + /* 0054 */ unsigned char identified = 0; + /* 0058 */ int itemType = 0; + /* 005C */ int refineLevel = 0; + /* 0060 */ unsigned char cards[16] = {}; + /* 0070 */ unsigned char category = 0; + /* 0072 */ std::int16_t grade = 0; }; extern std::vector g_guildStorageLogs[3]; @@ -40,16 +40,16 @@ protected: /* 0104 */ UIStaticText* m_itemTexts[10]; /* 012C */ UIStaticText* m_countTexts[10]; /* 0154 */ int m_category; - /* 0158 */ UITabControl* unknown_0158; + /* 0158 */ UITabControl* m_tabs; /* 015C */ unsigned m_page; /* 0160 */ unsigned m_pageCounts[3]; /* 016C */ unsigned m_offset; /* 0170 */ int m_state; - /* 0174 */ int unknown_0174; - /* 0178 */ std::uint32_t unknown_0178[3]; - /* 0184 */ std::uint32_t* unknown_0184; - /* 0188 */ std::uint32_t* unknown_0188; - /* 018C */ std::uint32_t* unknown_018C; + /* 0174 */ int m_logTextHeight; + /* 0178 */ std::uint32_t m_categoryCounts[3]; + /* 0184 */ std::uint32_t* m_rowFlagsBegin; + /* 0188 */ std::uint32_t* m_rowFlagsEnd; + /* 018C */ std::uint32_t* m_rowFlagsCapacity; void FillLogRows(int index); void FillRows(); diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp index 9b0b6ea43..53a639fda 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.cpp +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.cpp @@ -49,12 +49,12 @@ template void CUIListBoxEx void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* other : this->items) { @@ -63,7 +63,7 @@ void CUIListBoxExSetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine* selectedItem = @@ -230,8 +230,8 @@ bool CUIEquipmentPropertiesWnd::IsTransmitMouseInput() { template <> CUIListBoxEx::CUIListBoxEx() : CUIControl(), unknown_0084(), unknown_0088(), unknown_008C(), imageNames(), disabledName(), scrollBar(nullptr), - itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), unknown_00C5{}, items(), data(), - selected(static_cast(-1)), unknown_00E0(1), rebind(0), unknown_00E2{}, onSelect(), binder() { + itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), unknown_00C5{}, items(), data(), + selected(static_cast(-1)), selectionFlag(1), rebind(0), unknown_00E2{}, onSelect(), binder() { } // OFFSET: 0x00A08680 @@ -244,7 +244,7 @@ CUIListBoxExResize(300, 308); - this->unknown_00B4 = 0x101; + this->ownedSkinColors = 0x101; this->m_resolveSkin = true; this->Move(0, 0); this->OnCreate(this->geometry.width, this->geometry.height); @@ -882,39 +882,39 @@ void CUIEquipmentPropertiesWnd::OnCreate(int width, int height) { // OFFSET: 0x00A0C9C0 // FUNCTION: fn_15036 void EquipmentPropertiesWnd::CUIItemEquipmentPropertiesLine::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(44, 12); - this->unknown_00E8->Move(0, 4); - this->unknown_00E8->SetText(""); - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(6, 0); + this->labelText = new CUIStaticText(); + this->labelText->SetSize(44, 12); + this->labelText->Move(0, 4); + this->labelText->SetText(""); + this->labelText->SetFitText(0); + this->labelText->SetAlign(6, 0); const char titleFontSource[] = {'\x9E', '\x8C', '\x8D', '\x8A', '\x00', '\x15'}; // GLOBAL: gl_25121 thread_local EncryptedName titleFont(titleFontSource); - this->unknown_00E8->SetFont(std::string(titleFont.Text())); - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(0); - this->unknown_00E8->SetColor(0xFF2A00); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->labelText->SetFont(std::string(titleFont.Text())); + this->labelText->SetFontHeight(12); + this->labelText->SetBold(0); + this->labelText->SetColor(0xFF2A00); + this->labelText->SetShadow(0, 0xFFFFFF); + this->labelText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->labelText); - this->unknown_00EC = new CUIStaticText(); - this->unknown_00EC->SetSize(216, 12); - this->unknown_00EC->Move(49, 4); - this->unknown_00EC->SetText(""); - this->unknown_00EC->SetFitText(1); - this->unknown_00EC->SetAlign(0, 0); + this->valueText = new CUIStaticText(); + this->valueText->SetSize(216, 12); + this->valueText->Move(49, 4); + this->valueText->SetText(""); + this->valueText->SetFitText(1); + this->valueText->SetAlign(0, 0); const char textFontSource[] = {'\x8E', '\x80', '\x33', '\xE2', '\xE2', '\xD5'}; // GLOBAL: gl_25122 thread_local EncryptedName textFont(textFontSource); - this->unknown_00EC->SetFont(std::string(textFont.Text())); - this->unknown_00EC->SetFontHeight(12); - this->unknown_00EC->SetBold(0); - this->unknown_00EC->SetColor(0); - this->unknown_00EC->SetShadow(0, 0xFFFFFF); - this->unknown_00EC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00EC); + this->valueText->SetFont(std::string(textFont.Text())); + this->valueText->SetFontHeight(12); + this->valueText->SetBold(0); + this->valueText->SetColor(0); + this->valueText->SetShadow(0, 0xFFFFFF); + this->valueText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->valueText); } // OFFSET: 0x00A0EE90 @@ -975,21 +975,21 @@ void CUIEquipmentPropertiesWnd::BindLine(EquipmentPropertiesWnd::CUIItemEquipmen return; } - line->unknown_00E8->SetColor(0xFF2A00); - line->unknown_00EC->SetColor(0); + line->labelText->SetColor(0xFF2A00); + line->valueText->SetColor(0); std::vector parts = Split(text, "#"); if (parts.size() > 1) { std::vector title = Split(parts[0], "{~}"); if (title.size() > 1) { - line->unknown_00E8->SetColor(0x3C00FF); - line->unknown_00E8->SetText(title[1]); + line->labelText->SetColor(0x3C00FF); + line->labelText->SetText(title[1]); } else { - line->unknown_00E8->SetText(parts[0]); + line->labelText->SetText(parts[0]); } - line->unknown_00EC->SetText(parts[1]); + line->valueText->SetText(parts[1]); } else { - line->unknown_00E8->SetText(""); - line->unknown_00EC->SetText(parts[0].c_str(), parts[0].size()); + line->labelText->SetText(""); + line->valueText->SetText(parts[0].c_str(), parts[0].size()); } } diff --git a/Source/UI/Item/UIEquipmentPropertiesWnd.h b/Source/UI/Item/UIEquipmentPropertiesWnd.h index d4a4932c3..404a92eb6 100644 --- a/Source/UI/Item/UIEquipmentPropertiesWnd.h +++ b/Source/UI/Item/UIEquipmentPropertiesWnd.h @@ -13,8 +13,8 @@ class CUIItemEquipmentPropertiesLine : public CUIListItem { public: CUIItemEquipmentPropertiesLine(); - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIStaticText* unknown_00EC; + /* 00E8 */ CUIStaticText* labelText; + /* 00EC */ CUIStaticText* valueText; /* 00F0 */ std::uint32_t evenRowColor; /* 00F4 */ std::uint32_t oddRowColor; diff --git a/Source/UI/Item/UIItemBaseWnd.h b/Source/UI/Item/UIItemBaseWnd.h index 62c809dd4..c005d50be 100644 --- a/Source/UI/Item/UIItemBaseWnd.h +++ b/Source/UI/Item/UIItemBaseWnd.h @@ -23,14 +23,14 @@ public: void UpdateScrollBar(); /* 00B4 */ int showQuantity; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int alternateButtonBar; /* 00BC */ UIWindow* resizer; /* 00C0 */ UIWindow* scrollBar; /* 00C4 */ UIWindow* buttons[5]; /* 00D8 */ int scroll; /* 00DC */ int visibleRows; /* 00E0 */ int columns; - /* 00E4 */ int unknown_00E4; + /* 00E4 */ int scrollOverflow; /* 00E8 */ std::list items; }; diff --git a/Source/UI/Item/UIItemPurchaseWnd.h b/Source/UI/Item/UIItemPurchaseWnd.h index 63bd53b8b..1b88408f5 100644 --- a/Source/UI/Item/UIItemPurchaseWnd.h +++ b/Source/UI/Item/UIItemPurchaseWnd.h @@ -25,7 +25,7 @@ public: /* 00F0 */ UIStaticText* title; /* 00F4 */ ItemPurchaseWndInfo* saved; /* 00F8 */ int hovered; - /* 00FC */ int unknown_00FC; + /* 00FC */ int cashShopMode; /* 0100 */ UIEditCtrl* quantityEdit; }; diff --git a/Source/UI/Item/UIItemSellWnd2.h b/Source/UI/Item/UIItemSellWnd2.h index 5dafd831a..7e1a455a3 100644 --- a/Source/UI/Item/UIItemSellWnd2.h +++ b/Source/UI/Item/UIItemSellWnd2.h @@ -29,7 +29,7 @@ protected: public: /* 00F4 */ ItemSellWndInfo* saved; /* 00F8 */ int hovered; - /* 00FC */ int unknown_00FC; + /* 00FC */ int shopId; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Item/UIItemShopWnd.h b/Source/UI/Item/UIItemShopWnd.h index 5d87008e0..1f869eb54 100644 --- a/Source/UI/Item/UIItemShopWnd.h +++ b/Source/UI/Item/UIItemShopWnd.h @@ -30,12 +30,12 @@ protected: public: /* 00F4 */ UICheckBox* checkBox; - /* 00F8 */ int unknown_00F8; + /* 00F8 */ int sellMode; /* 00FC */ ItemShopWndInfo* saved; /* 0100 */ int hovered; - /* 0104 */ int unknown_0104; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; + /* 0104 */ int bottomPadding; + /* 0108 */ int footerHeight; + /* 010C */ int showFooter; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Item/UIItemShopWnd2.h b/Source/UI/Item/UIItemShopWnd2.h index d30038168..e7d4aaf28 100644 --- a/Source/UI/Item/UIItemShopWnd2.h +++ b/Source/UI/Item/UIItemShopWnd2.h @@ -28,11 +28,11 @@ protected: public: /* 00F4 */ UICheckBox* checkBox; - /* 00F8 */ int unknown_00F8; + /* 00F8 */ int interactionDisabled; /* 00FC */ WindowPlacement* saved; /* 0100 */ int hovered; - /* 0104 */ int unknown_0104; - /* 0108 */ int unknown_0108; + /* 0104 */ int bottomBarHeight; + /* 0108 */ int extraBottomHeight; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Item/UIItemStoreFindWnd.h b/Source/UI/Item/UIItemStoreFindWnd.h index e357cf6db..82a5250b2 100644 --- a/Source/UI/Item/UIItemStoreFindWnd.h +++ b/Source/UI/Item/UIItemStoreFindWnd.h @@ -36,7 +36,7 @@ public: /* 0118 */ UIStaticText* title; /* 011C */ unsigned char unknown_011C[0x4]; /* 0120 */ int unknown_0120; - /* 0124 */ std::string unknown_0124; + /* 0124 */ std::string statusText; /* 013C */ std::string searchText; /* 0154 */ ItemStoreFindWndInfo* saved; /* 0158 */ unsigned char unknown_0158[0x4]; @@ -45,7 +45,7 @@ public: }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(UIItemStoreFindWnd, unknown_0124) == 0x124); +static_assert(offsetof(UIItemStoreFindWnd, statusText) == 0x124); static_assert(offsetof(UIItemStoreFindWnd, searchText) == 0x13C); static_assert(offsetof(UIItemStoreFindWnd, saved) == 0x154); static_assert(offsetof(UIItemStoreFindWnd, closeButton) == 0xFC); diff --git a/Source/UI/Item/UIItemStoreSubWnd.h b/Source/UI/Item/UIItemStoreSubWnd.h index 728cc239b..e9372cca0 100644 --- a/Source/UI/Item/UIItemStoreSubWnd.h +++ b/Source/UI/Item/UIItemStoreSubWnd.h @@ -45,11 +45,11 @@ public: /* 0114 */ UIStaticText* title; /* 0118 */ unsigned char unknown_0118[0x04]; /* 011C */ int unknown_011C; - /* 0120 */ std::string unknown_0120; - /* 0138 */ std::string unknown_0138; + /* 0120 */ std::string footerText; + /* 0138 */ std::string nameFilter; /* 0150 */ ItemStoreFindSlotInfo* saved; /* 0154 */ int tabIndex; - /* 0158 */ unsigned char unknown_0158; + /* 0158 */ unsigned char sortEnabled; /* 0159 */ unsigned char unknown_0159[7]; }; diff --git a/Source/UI/Item/UIItemStoreWnd.h b/Source/UI/Item/UIItemStoreWnd.h index ffa57263d..87cbd9d56 100644 --- a/Source/UI/Item/UIItemStoreWnd.h +++ b/Source/UI/Item/UIItemStoreWnd.h @@ -32,25 +32,25 @@ public: /* 00F0 */ UIBitmapEditCtrl* searchEdit; /* 00F4 */ UIItemStoreComboBoxWnd* sortCombo; - /* 00F8 */ unsigned char unknown_00F8[0x08]; + /* 00F8 */ unsigned char m_tabFlags[0x08]; /* 0100 */ UICheckBox* tabs[8]; - /* 0120 */ UIWindow* unknown_0120[8]; - /* 0140 */ UIWindow* unknown_0140; - /* 0144 */ std::string unknown_0144; + /* 0120 */ UIWindow* m_tabWindows[8]; + /* 0140 */ UIWindow* m_searchWindow; + /* 0144 */ std::string m_capacityText; /* 015C */ UIStaticText* title; /* 0160 */ unsigned char unknown_0160[0x04]; /* 0164 */ ItemStoreFindListInfo* saved; /* 0168 */ UITab* tabBar; - /* 016C */ int unknown_016C; - /* 0170 */ int unknown_0170; - /* 0174 */ int unknown_0174; - /* 0178 */ int unknown_0178; - /* 017C */ int unknown_017C; - /* 0180 */ int unknown_0180; - /* 0184 */ unsigned char unknown_0184[0x04]; - /* 0188 */ int unknown_0188; - /* 018C */ int unknown_018C; - /* 0190 */ unsigned char unknown_0190; + /* 016C */ int m_sortOptionA; + /* 0170 */ int m_sortOptionB; + /* 0174 */ int m_sortOptionC; + /* 0178 */ int m_sortOptionD; + /* 017C */ int m_sortOptionE; + /* 0180 */ int m_sortMode; + /* 0184 */ unsigned char m_searchFlags[0x04]; + /* 0188 */ int m_itemCount; + /* 018C */ int m_capacity; + /* 0190 */ unsigned char m_hideCapacity; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Item/UIItemWnd.h b/Source/UI/Item/UIItemWnd.h index 6b7343679..3896f711c 100644 --- a/Source/UI/Item/UIItemWnd.h +++ b/Source/UI/Item/UIItemWnd.h @@ -43,25 +43,25 @@ public: /* 00F4 */ UIBitmapButton* baseButton; /* 00F8 */ UIBitmapButton* minimizeButton; /* 00FC */ UIBitmapButton* closeButton; - /* 0100 */ int unknown_0100; - /* 0104 */ int unknown_0104; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ int unknown_0110; + /* 0100 */ int usableFilter; + /* 0104 */ int equipmentFilter; + /* 0108 */ int miscFilter; + /* 010C */ int categoryFilter; + /* 0110 */ int expandedHeight; /* 0114 */ UICheckBox* lockDropBox; /* 0118 */ UITabControl* tabs; /* 011C */ UIWindow* optionBox; /* 0120 */ UIBitmapButton* countButton; - /* 0124 */ UIButton* unknown_0124; - /* 0128 */ UIWindow* unknown_0128; - /* 012C */ UIButton* unknown_012C; + /* 0124 */ UIButton* dealLockButton; + /* 0128 */ UIWindow* filterWindow; + /* 012C */ UIButton* filterButton; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(UIItemWnd, saved) == 0xF0); -static_assert(offsetof(UIItemWnd, unknown_0110) == 0x110); +static_assert(offsetof(UIItemWnd, expandedHeight) == 0x110); static_assert(offsetof(UIItemWnd, tabs) == 0x118); -static_assert(offsetof(UIItemWnd, unknown_0128) == 0x128); +static_assert(offsetof(UIItemWnd, filterWindow) == 0x128); #endif #endif diff --git a/Source/UI/Item/UIMerchantItemLogWnd.cpp b/Source/UI/Item/UIMerchantItemLogWnd.cpp index 6dacccf3a..295fdf416 100644 --- a/Source/UI/Item/UIMerchantItemLogWnd.cpp +++ b/Source/UI/Item/UIMerchantItemLogWnd.cpp @@ -34,7 +34,7 @@ // OFFSET: 0x0099E0E0 // FUNCTION: fn_13571 UIMerchantItemLogWnd::UIMerchantItemLogWnd(int mode) : UIItemBaseWnd() { - this->unknown_00FC = mode; + this->mode = mode; } // OFFSET: 0x0099E510 @@ -42,7 +42,7 @@ UIMerchantItemLogWnd::UIMerchantItemLogWnd(int mode) : UIItemBaseWnd() { void UIMerchantItemLogWnd::OnCreate(int width, int height) { UIStaticText* title = new UIStaticText(); title->SetSize(160, 15); - title->SetText(LookupMessage(2559 + (this->unknown_00FC != 0)), 0); + title->SetText(LookupMessage(2559 + (this->mode != 0)), 0); title->Move(16, 2); title->shadow = 1; this->AddChild(title); @@ -117,7 +117,7 @@ void UIMerchantItemLogWnd::Paint() { break; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) && it->damaged) { continue; } @@ -125,11 +125,11 @@ void UIMerchantItemLogWnd::Paint() { const int x = visible % this->columns * 32 + 44; DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) ), true ); @@ -147,7 +147,7 @@ void UIMerchantItemLogWnd::Paint() { char grouped[64]; std::memset(price, 0, sizeof(price)); std::memset(grouped, 0, sizeof(grouped)); - const int length = std::sprintf(price, " %10s Zeny", FormatGroupedInteger(static_cast(it->unknown_0014[0]), grouped, sizeof(grouped))); + const int length = std::sprintf(price, " %10s Zeny", FormatGroupedInteger(static_cast(it->prices[0]), grouped, sizeof(grouped))); this->DrawTextAt(textX, textY, price, length, 0, 12, 0, 0, 0); textX += 110; @@ -165,14 +165,14 @@ void UIMerchantItemLogWnd::Paint() { // FUNCTION: fn_13577 void UIMerchantItemLogWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { g_modeMgr.gameMode - ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.unknown_0098, item.quantity).c_str(), tooltipX, tooltipY, + ->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0).c_str(), item.optionCount, item.quantity).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { g_modeMgr.gameMode @@ -203,7 +203,7 @@ void UIMerchantItemLogWnd::OnProcess() { void UIMerchantItemLogWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_modeMgr.GetGameMode(); g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -215,7 +215,7 @@ int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a switch (message) { case UM_COMMAND: if (a == 201) { - g_windowMgr.CloseWindow(this->unknown_00FC != 0 ? 258 : 257); + g_windowMgr.CloseWindow(this->mode != 0 ? 258 : 257); } break; case UM_RESIZE: @@ -246,7 +246,7 @@ int UIMerchantItemLogWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a lcData data; data.name = LookupPlayerName(b); - data.unknown_001C = item.DisplayName(0); + data.itemName = item.DisplayName(0); data.time = c; data.characterId = b; this->logs.push_back(data); diff --git a/Source/UI/Item/UIMerchantItemLogWnd.h b/Source/UI/Item/UIMerchantItemLogWnd.h index 31e8c93e1..eb36fafdf 100644 --- a/Source/UI/Item/UIMerchantItemLogWnd.h +++ b/Source/UI/Item/UIMerchantItemLogWnd.h @@ -18,7 +18,7 @@ public: } /* 0004 */ std::string name; - /* 001C */ std::string unknown_001C; + /* 001C */ std::string itemName; /* 0034 */ __time32_t time; /* 0038 */ std::uint32_t characterId; }; @@ -32,7 +32,7 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; /* 00F0 */ std::vector logs; - /* 00FC */ int unknown_00FC; + /* 00FC */ int mode; }; #endif diff --git a/Source/UI/Item/UIParaItemShopWnd.cpp b/Source/UI/Item/UIParaItemShopWnd.cpp index d4ab2a26b..33e27860c 100644 --- a/Source/UI/Item/UIParaItemShopWnd.cpp +++ b/Source/UI/Item/UIParaItemShopWnd.cpp @@ -73,11 +73,11 @@ UIParaItemShopWnd::UIParaItemShopWnd() { UIParaResultWnd::UIParaResultWnd() : UIItemBaseWnd() { this->title = nullptr; this->total = nullptr; - this->unknown_00F8 = -1; + this->hovered = -1; this->showQuantity = 0; - this->unknown_00B8 = 1; - this->unknown_00FC = 29; - this->unknown_0100 = 0; + this->alternateButtonBar = 1; + this->footerHeight = 29; + this->headerHeight = 0; } // OFFSET: 0x009A80F0 @@ -86,8 +86,8 @@ void UIParaResultWnd::AddItem(const RawItemBasic& item, int quantity) { ITEM_INFO info; info.AssignBasic(item); info.quantity = quantity; - info.unknown_0060 = 0; - info.unknown_005D = 0; + info.refiningLevel = 0; + info.damaged = 0; info.SetItemId(atoi(info.itemId.c_str())); this->items.push_back(info); } @@ -166,9 +166,9 @@ void UIParaResultWnd::OnLBtnDown(int x, int y) { UIFrameWnd::OnLBtnDown(x, y); } - int previousHovered = this->unknown_00F8; - this->unknown_00F8 = this->GetItemIndexAt(x, y); - if (previousHovered != this->unknown_00F8) { + int previousHovered = this->hovered; + this->hovered = this->GetItemIndexAt(x, y); + if (previousHovered != this->hovered) { this->Invalidate(); } } @@ -177,7 +177,7 @@ void UIParaResultWnd::OnLBtnDown(int x, int y) { // FUNCTION: fn_13755 void UIParaResultWnd::OnMouseHover(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { int tooltipX = (x - 40) / 32 * 32 + 40; int tooltipY = (y - 17) / 32 * 32 + 1; this->ToScreen(tooltipX, tooltipY); @@ -185,12 +185,12 @@ void UIParaResultWnd::OnMouseHover(int x, int y) { std::string text; char price[64]; std::memset(price, 0, sizeof(price)); - if (item.unknown_0014[0] == item.unknown_0014[1]) { - const char* amount = FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, sizeof(price)); + if (item.prices[0] == item.prices[1]) { + const char* amount = FormatGroupedInteger(static_cast(item.prices[1]), price, sizeof(price)); text = FormatOwnedString("%s %s Zeny", item.DisplayName(0).c_str(), amount); } else { - const char* amount = FormatGroupedInteger(static_cast(item.unknown_0014[1]), price, sizeof(price)); - text = FormatOwnedString("%s %d -> %s Zeny", item.DisplayName(0).c_str(), item.unknown_0014[0], amount); + const char* amount = FormatGroupedInteger(static_cast(item.prices[1]), price, sizeof(price)); + text = FormatOwnedString("%s %d -> %s Zeny", item.DisplayName(0).c_str(), item.prices[0], amount); } g_modeMgr.gameMode->ShowTooltip(text.c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -200,14 +200,14 @@ void UIParaResultWnd::OnMouseHover(int x, int y) { // OFFSET: 0x009A99C0 // FUNCTION: fn_13756 void UIParaResultWnd::OnRBtnDown(int x, int y) { - const int previousHovered = this->unknown_00F8; - this->unknown_00F8 = this->GetItemIndexAt(x, y); - if (previousHovered != this->unknown_00F8) { + const int previousHovered = this->hovered; + this->hovered = this->GetItemIndexAt(x, y); + if (previousHovered != this->hovered) { this->Invalidate(); } - ITEM_INFO item = this->GetItemByIndex(this->unknown_00F8); - if (item.unknown_0000[1] != 0) { + ITEM_INFO item = this->GetItemByIndex(this->hovered); + if (item.identity[1] != 0) { g_modeMgr.GetGameMode(); UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); @@ -245,7 +245,7 @@ void UIParaResultWnd::OnCreate(int width, int height) { UIScrollBar* scrollBar = new UIScrollBar(); this->scrollBar = scrollBar; - scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0100 - this->unknown_00FC - 17); + scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->headerHeight - this->footerHeight - 17); this->AddChild(scrollBar); { @@ -263,7 +263,7 @@ void UIParaResultWnd::OnCreate(int width, int height) { this->AddChild(button); } - this->visibleRows = (height - this->unknown_0100 - this->unknown_00FC - 17) / 32; + this->visibleRows = (height - this->headerHeight - this->footerHeight - 17) / 32; this->columns = 1; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -297,7 +297,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case TYPE_ARMORMB: case TYPE_ARMORTMB: case TYPE_GUN: { - const int count = drag.unknown_03B6 == 1 ? g_session.GetItem1720Quantity(drag.id) : g_session.GetItem1720QuantityByItemId(drag.name.c_str()); + const int count = drag.uniqueItem == 1 ? g_session.GetItem1720Quantity(drag.id) : g_session.GetItem1720QuantityByItemId(drag.name.c_str()); if (count > 0) { mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -311,7 +311,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t ITEM_INFO item; item.Assign(reinterpret_cast(drag)); const int total = g_session.GetItem1720Total(); - const int price = drag.unknown_0314; + const int price = drag.price; const bool affordable = g_session.m_zeny >= static_cast(price) * drag.quantity + total; int existing = 0; @@ -332,7 +332,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(text), 255, 0, 0, 0); } - const int available = item.unknown_0074[3] == 1 ? g_session.GetItem1718QuantityOf(item) : g_session.GetItem1718QuantityByItemId(item); + const int available = item.flags[3] == 1 ? g_session.GetItem1718QuantityOf(item) : g_session.GetItem1718QuantityByItemId(item); if (available != -1 && available < a) { item.quantity = available; g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); @@ -341,7 +341,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t if (item.quantity > 0) { std::uint16_t weight; - if (item.unknown_0074[3] == 1) { + if (item.flags[3] == 1) { const std::uint16_t added = g_session.GetItem1718Unknown006COf(item) * static_cast(item.quantity); weight = added + g_session.SumItem1720Unknown006C(); } else { @@ -356,7 +356,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GUILD_STORAGE_ITEM_COUNT)), 255, 0, 0, 0); } else { - if (item.unknown_0074[3] == 1) { + if (item.flags[3] == 1) { g_session.RemoveItem1718(item); g_session.MergeItem1720(item); } else { @@ -378,7 +378,7 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t switch (a) { case ID_OK: { ITEM_INFO item = g_session.GetItem1720At(0); - if (item.unknown_0074[3] == 1) { + if (item.flags[3] == 1) { mode->SendMsg(MM_NPC_MARKET_PURCHASE_V2, 0, 0, 0, 0); } else { mode->SendMsg(MM_NPC_MARKET_PURCHASE, 0, 0, 0, 0); @@ -433,8 +433,8 @@ int UIParaItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const int size = g_session.GetList2Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1720At(i); - if (item.unknown_0000[1] != 0) { - sum += item.quantity * item.unknown_0014[1]; + if (item.identity[1] != 0) { + sum += item.quantity * item.prices[1]; this->items.push_back(item); } } @@ -498,11 +498,11 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->RecordResponse(static_cast(a), b, c, d); if (a == 213) { if (g_replayAnimationScaling != 0) { - this->checkBox->geometry.unknown_0030 = b; + this->checkBox->geometry.state = b; this->checkBox->Invalidate(); } - g_windowMgr.unknown_0064 = b; + g_windowMgr.dragAllItems = b; return 0; } break; @@ -512,7 +512,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s ITEM_INFO item; item.Assign(reinterpret_cast(mode->drag)); CSession* lists = &g_session; - if (item.unknown_0074[3] == 1) { + if (item.flags[3] == 1) { lists->RemoveItem1720(item); lists->MergeItem1718(item); } else { @@ -528,12 +528,12 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s break; case UM_SETTITLE: if (a == 1) { - this->unknown_00F8 = 1; + this->sellMode = 1; this->showQuantity = 1; this->title->SetTextAutoWidth(LookupMessage(MSI_ITEMSYOUCANSELL)); this->checkBox->m_disabled = 0; } else { - this->unknown_00F8 = 0; + this->sellMode = 0; this->showQuantity = 0; this->title->SetTextAutoWidth(LookupMessage(MSI_SHOPITEMS)); this->checkBox->m_disabled = 1; @@ -555,10 +555,10 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); this->columns = 1; - this->visibleRows = (newHeight - this->unknown_0108 - this->unknown_0104 - 17) / 32; + this->visibleRows = (newHeight - this->footerHeight - this->bottomPadding - 17) / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); - this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17); + this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->footerHeight - this->bottomPadding - 17); this->checkBox->Move(12, this->geometry.height - 20); this->UpdateScrollBar(); } @@ -572,7 +572,7 @@ int UIParaItemShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s const int size = g_session.GetList1Size(); for (int i = 0; i < size; ++i) { ITEM_INFO item = g_session.GetItem1718At(i); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->items.push_back(item); } } @@ -627,10 +627,10 @@ int UIParaResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std if (newWidth != this->geometry.width || newHeight != this->geometry.height) { this->Resize(newWidth, newHeight); this->columns = 1; - this->visibleRows = (newHeight - this->unknown_0100 - this->unknown_00FC - 17) / 32; + this->visibleRows = (newHeight - this->headerHeight - this->footerHeight - 17) / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); - this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->unknown_0100 - this->unknown_00FC - 17); + this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - this->headerHeight - this->footerHeight - 17); this->UpdateScrollBar(); } @@ -644,7 +644,7 @@ int UIParaResultWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std case UM_REFRESHITEM: { int sum = 0; for (const ITEM_INFO& item : this->items) { - sum += item.unknown_0014[1] * item.quantity; + sum += item.prices[1] * item.quantity; } char text[80]; @@ -672,7 +672,7 @@ void UIParaItemShopWnd::Paint() { return; } - const int barHeight = this->DrawButtonBar(this->unknown_00B8 == 1 ? 2 : 0, 0, 1); + const int barHeight = this->DrawButtonBar(this->alternateButtonBar == 1 ? 2 : 0, 0, 1); unsigned red = 0xFF, green = 0xFF, blue = 0xFF; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); const int height = this->geometry.height - barHeight - titleHeight; @@ -698,7 +698,7 @@ void UIParaItemShopWnd::Paint() { } } - const int footer = this->unknown_010C == 1 ? this->unknown_0108 : 0; + const int footer = this->showFooter == 1 ? this->footerHeight : 0; int slots = (height - footer) / 32; for (int y = titleHeight; slots > 0; --slots, y += 32) { DrawItemSlotBackground(*this, 30, y); @@ -712,7 +712,7 @@ void UIParaItemShopWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) == 1 && it->unknown_005D == 1) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) == 1 && it->damaged == 1) { continue; } @@ -723,7 +723,7 @@ void UIParaItemShopWnd::Paint() { this->FillRegion(72, top + 2, 191, 28, RGB(hoverRed, hoverGreen, hoverBlue)); } - if (this->unknown_00F8 == 1 || it->quantity != 0) { + if (this->sellMode == 1 || it->quantity != 0) { DrawItemWithQuantity(*this, ResourceMgr::Instance(), 34, top + 4, *it, 0, 0); } else { DrawItemWithQuantityAuxiliary(*this, 1, 34, top + 4, *it, 0, 0); @@ -731,18 +731,18 @@ void UIParaItemShopWnd::Paint() { this->DrawWrappedItemName(70, top + 12, 120, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( 34, top + 16, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) )->image, true ); } std::string currency = "Z"; - if (this->unknown_010C == 1) { + if (this->showFooter == 1) { if (g_serviceType == 6) { currency = "K"; } else if (g_serviceType == 0) { @@ -758,10 +758,10 @@ void UIParaItemShopWnd::Paint() { char price[64]; std::memset(price, 0, sizeof(price)); - FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, sizeof(price)); + FormatGroupedInteger(static_cast(it->prices[1]), price, sizeof(price)); std::string text = FormatOwnedString(" %s %s", price, currency.c_str()); - if (it->unknown_0014[0] != it->unknown_0014[1]) { - text = static_cast(FormatOwnedString(" %d -> %s %s", it->unknown_0014[0], price, currency.c_str())); + if (it->prices[0] != it->prices[1]) { + text = static_cast(FormatOwnedString(" %d -> %s %s", it->prices[0], price, currency.c_str())); } this->DrawRightAlignedText(this->geometry.width - 18, top + 12, text.c_str(), text.size(), 0, 12, 0, 0); @@ -771,7 +771,7 @@ void UIParaItemShopWnd::Paint() { } } - if (this->unknown_010C == 1) { + if (this->showFooter == 1) { std::string text; if (g_serviceType == 0 && g_session.m_channelCopId == 1) { text = static_cast(FormatOwnedString(LookupMessage(MSI_POINT_SHOP_NHN), this->ClipTextToWidth(g_session.DecodePlayerName(), 100, 0, 12, 0), g_pendingAid)); @@ -794,13 +794,13 @@ void UIParaResultWnd::Paint() { return; } - int rows = (this->geometry.height - this->unknown_00FC - 17) / 8 + ((this->geometry.height - this->unknown_00FC - 17) % 8 != 0); + int rows = (this->geometry.height - this->footerHeight - 17) / 8 + ((this->geometry.height - this->footerHeight - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { auto* left = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp"))); this->DrawBitmap(0, y, left, false); } - rows = (this->geometry.height - this->unknown_00FC - 17) / 8 + ((this->geometry.height - this->unknown_00FC - 17) % 8 != 0); + rows = (this->geometry.height - this->footerHeight - 17) / 8 + ((this->geometry.height - this->footerHeight - 17) % 8 != 0); for (int y = 17; rows > 0; --rows, y += 8) { auto* right = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp"))); this->DrawBitmap(this->geometry.width - right->image.width, y, right, false); @@ -809,14 +809,14 @@ void UIParaResultWnd::Paint() { { unsigned red = 0, green = 0, blue = 0; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - const int listHeight = this->geometry.height - this->unknown_00FC - 17; + const int listHeight = this->geometry.height - this->footerHeight - 17; this->FillRegion(20, 17, (this->geometry.width - 60) % 32, listHeight, RGB(red, green, blue)); this->FillRegion(20, listHeight / 32 * 32 + 17, this->geometry.width - 24, listHeight % 32, RGB(red, green, blue)); } - this->DrawButtonBar(this->unknown_00B8 == 1 ? 2 : 0, 0, 1); + this->DrawButtonBar(this->alternateButtonBar == 1 ? 2 : 0, 0, 1); const int columns = (this->geometry.width - 40) / 32; - const int slots = (this->geometry.height - this->unknown_0100 - this->unknown_00FC - 17) / 32; + const int slots = (this->geometry.height - this->headerHeight - this->footerHeight - 17) / 32; for (int slot = slots, y = 17; slot > 0; --slot, y += 32) { DrawItemSlotBackground(*this, 40, y); } @@ -835,13 +835,13 @@ void UIParaResultWnd::Paint() { continue; } - if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) == 1 && it->unknown_005D) { + if (g_session.IsPetEgg(std::atoi(it->itemId.c_str())) == 1 && it->damaged) { continue; } const int column = visible % this->columns * 32; const int top = visible / this->columns * 32; - if (this->unknown_00F8 == index) { + if (this->hovered == index) { unsigned hoverRed = 0, hoverGreen = 0, hoverBlue = 0; SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, hoverRed, hoverGreen, hoverBlue); this->FillRegion(column + 72, top + 19, 191, 28, RGB(hoverRed, hoverGreen, hoverBlue)); @@ -851,11 +851,11 @@ void UIParaResultWnd::Paint() { DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, top + 21, *it, 0, 0); this->DrawWrappedItemName(column + 76, top + 29, 110, &*it, 0, 0, 12); - if (it->unknown_0088 > 0) { + if (it->grade > 0) { this->DrawBitmap( x, top + 33, static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", it->grade).c_str())) ), true ); @@ -866,10 +866,10 @@ void UIParaResultWnd::Paint() { std::memset(text, 0, sizeof(text)); std::memset(price, 0, sizeof(price)); int length; - if (it->unknown_0014[0] != it->unknown_0014[1]) { - length = sprintf(text, " %d -> %s Z", it->unknown_0014[0], FormatGroupedInteger(static_cast(it->unknown_0014[1]), price, 64)); + if (it->prices[0] != it->prices[1]) { + length = sprintf(text, " %d -> %s Z", it->prices[0], FormatGroupedInteger(static_cast(it->prices[1]), price, 64)); } else { - length = sprintf(text, " %s Z", FormatGroupedInteger(static_cast(it->unknown_0014[0]), price, 64)); + length = sprintf(text, " %s Z", FormatGroupedInteger(static_cast(it->prices[0]), price, 64)); } this->DrawRightAlignedText(this->geometry.width - 18, top + 29, text, length, 0, 12, 0, 0); diff --git a/Source/UI/Item/UIParaItemShopWnd.h b/Source/UI/Item/UIParaItemShopWnd.h index 95f16011b..f129087bb 100644 --- a/Source/UI/Item/UIParaItemShopWnd.h +++ b/Source/UI/Item/UIParaItemShopWnd.h @@ -46,9 +46,9 @@ public: /* 00F0 */ UIStaticText* title; /* 00F4 */ UIStaticText* total; - /* 00F8 */ int unknown_00F8; - /* 00FC */ int unknown_00FC; - /* 0100 */ int unknown_0100; + /* 00F8 */ int hovered; + /* 00FC */ int footerHeight; + /* 0100 */ int headerHeight; }; #endif diff --git a/Source/UI/Items/MergeItemWnd.cpp b/Source/UI/Items/MergeItemWnd.cpp index 8cb0047d9..c38c61ebb 100644 --- a/Source/UI/Items/MergeItemWnd.cpp +++ b/Source/UI/Items/MergeItemWnd.cpp @@ -59,7 +59,7 @@ void CMergeItemWnd::SelectSameItems(int id) { int checked = 0; for (auto it = this->m_items.begin(); it != this->m_items.end(); ++it) { if (itemId == std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, (*it)->m_message).itemId.c_str())) { - const std::uint32_t state = (*it)->geometry.unknown_0030; + const std::uint32_t state = (*it)->geometry.state; if ((*it)->m_message == id) { if (state == 0) { continue; @@ -158,7 +158,7 @@ void CMergeItemWnd::Paint() { UICheckBox* box = this->m_items[first + index]; if (box != nullptr) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, box->m_message); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { box->SetHidden(false); box->Move(this->m_checkOffsetX + x, this->m_checkOffsetY + y); DrawItemWithQuantity( @@ -182,7 +182,7 @@ void CMergeItemWnd::OnLBtnDown(int x, int y) { const int id = this->ItemAt(x, y); for (auto it = this->m_items.begin(); it != this->m_items.end(); ++it) { if (id == (*it)->m_message) { - (*it)->SetChecked((*it)->geometry.unknown_0030 == 0); + (*it)->SetChecked((*it)->geometry.state == 0); break; } } @@ -196,7 +196,7 @@ void CMergeItemWnd::OnMouseHover(int x, int y) { int screenX = x; int screenY = y; ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, id); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { this->ToScreen(screenX, screenY); std::string text = FormatOwnedString(LookupMessage(MSI_EA2), item.DisplayName(0).c_str(), item.quantity); g_modeMgr.gameMode->ShowTooltip(text.c_str(), screenX, screenY, g_session.GetItemNameColor(item), 0, 1); @@ -345,7 +345,7 @@ int CMergeItemWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std: } case UM_REFRESH: { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - g_session.RemoveItem1710(item.unknown_0000[1], item.quantity); + g_session.RemoveItem1710(item.identity[1], item.quantity); item.quantity = argument2; g_session.AddItem1710(item, 1); break; @@ -390,7 +390,7 @@ bool CMergeItemWnd::RequestMerge() { std::vector ids; for (auto it = this->m_items.begin(); it != this->m_items.end(); ++it) { UICheckBox* item = *it; - if (item != nullptr && item->geometry.unknown_0030 != 0) { + if (item != nullptr && item->geometry.state != 0) { ids.push_back(static_cast(item->m_message)); } } diff --git a/Source/UI/Items/UICardItemIllustWnd.h b/Source/UI/Items/UICardItemIllustWnd.h index 257ad15ff..18875aa33 100644 --- a/Source/UI/Items/UICardItemIllustWnd.h +++ b/Source/UI/Items/UICardItemIllustWnd.h @@ -14,7 +14,7 @@ public: /* 00B4 */ std::string m_bitmapPath; /* 00CC */ std::string m_name; - /* 00E4 */ unsigned char unknown_00E4; + /* 00E4 */ unsigned char identified; }; #endif diff --git a/Source/UI/Items/UIEquipWnd.h b/Source/UI/Items/UIEquipWnd.h index 58d45baa3..ddef1f43f 100644 --- a/Source/UI/Items/UIEquipWnd.h +++ b/Source/UI/Items/UIEquipWnd.h @@ -26,30 +26,30 @@ public: /* 00CC */ UIBitmapButton* m_viewButton; /* 00D0 */ UIBitmapButton* m_otherButton; /* 00D4 */ std::uint32_t m_updateTick; - /* 00D8 */ int unknown_00D8; - /* 00DC */ UICheckBox* unknown_00DC; - /* 00E0 */ UICheckBox* unknown_00E0; + /* 00D8 */ int contentOffset; + /* 00DC */ UICheckBox* allowViewCheck; + /* 00E0 */ UICheckBox* swapModeCheck; /* 00E4 */ unsigned char unknown_00E4[0x08]; /* 00EC */ UITabControl* m_tabs; /* 00F0 */ int m_page; /* 00F4 */ int m_contentTop; - /* 00F8 */ int unknown_00F8[8]; - /* 0118 */ int unknown_0118; - /* 011C */ int unknown_011C; + /* 00F8 */ int appearance[8]; + /* 0118 */ int robeId; + /* 011C */ int costumeJob; /* 0120 */ UIListBoxTitle* m_titleList; - /* 0124 */ UIWindow* unknown_0124; - /* 0128 */ int unknown_0128; - /* 012C */ UIBitmapButton* unknown_012C; - /* 0130 */ UIBitmapButton* unknown_0130; + /* 0124 */ UIWindow* swapWindow; + /* 0128 */ int swapState; + /* 012C */ UIBitmapButton* swapButton; + /* 0130 */ UIBitmapButton* unequipButton; /* 0134 */ UIWindow* m_scrollBar; - /* 0138 */ UIWindow* unknown_0138[6]; + /* 0138 */ UIWindow* damageSkinButtons[6]; /* 0150 */ int unknown_0150; /* 0154 */ int m_firstSlot; /* 0158 */ int m_hoverSlot; - /* 015C */ int unknown_015C; + /* 015C */ int damageSkinMode; /* 0160 */ std::vector m_damageSkinNames; /* 016C */ std::vector m_damageSkinIcons; - /* 0178 */ UIBitmapButton* unknown_0178; + /* 0178 */ UIBitmapButton* abilityButton; void OnProcess() override; void OnLBtnDown(int x, int y) override; diff --git a/Source/UI/Items/UIExchangeWnd.h b/Source/UI/Items/UIExchangeWnd.h index c19aa9dd3..e9588ee5d 100644 --- a/Source/UI/Items/UIExchangeWnd.h +++ b/Source/UI/Items/UIExchangeWnd.h @@ -13,25 +13,25 @@ class UICheckBox; class UIExchangeWnd : public UIFrameWnd { public: /* 00B4 */ UIWindow* m_buttons[3]; - /* 00C0 */ UIEditCtrl* unknown_00C0; + /* 00C0 */ UIEditCtrl* zenyEdit; /* 00C4 */ UIWindow* m_scrollBar; /* 00C8 */ unsigned char unknown_00C8[0x04]; - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; - /* 00D4 */ int unknown_00D4; - /* 00D8 */ int unknown_00D8; - /* 00DC */ int unknown_00DC; + /* 00CC */ int isLocalTrader; + /* 00D0 */ int localConfirmed; + /* 00D4 */ int remoteConfirmed; + /* 00D8 */ int localAccepted; + /* 00DC */ int remoteAccepted; /* 00E0 */ std::list m_myItems; /* 00E8 */ std::list m_otherItems; - /* 00F0 */ std::string unknown_00F0; - /* 0108 */ int unknown_0108; - /* 010C */ short unknown_010C; + /* 00F0 */ std::string partnerName; + /* 0108 */ int partnerId; + /* 010C */ short partnerLevel; /* 010E */ unsigned char unknown_010E[0x04]; /* 0112 */ short m_rowHeight; /* 0114 */ short m_hoverX; /* 0116 */ unsigned char unknown_0116[0x02]; - /* 0118 */ UICheckBox* unknown_0118; - /* 011C */ unsigned char unknown_011C; + /* 0118 */ UICheckBox* screenshotCheckBox; + /* 011C */ unsigned char takeScreenshot; /* 0120 */ int m_moneyLength; /* 0124 */ std::string m_moneyText; diff --git a/Source/UI/Items/UIGameItem.cpp b/Source/UI/Items/UIGameItem.cpp index 16baf1964..776471a5d 100644 --- a/Source/UI/Items/UIGameItem.cpp +++ b/Source/UI/Items/UIGameItem.cpp @@ -25,7 +25,7 @@ // OFFSET: 0x009F71F0 // FUNCTION: fn_14769 CUIGameItem::CUIGameItem() - : CUIControl(), mode(0), unknown_0084(1), unknown_0085(1), transparent(0), scale(100), itemInfo(), name(), image(nullptr), showOverlay(0), + : CUIControl(), mode(0), showNameTooltip(1), allowItemInfo(1), transparent(0), scale(100), itemInfo(), name(), image(nullptr), showOverlay(0), overlay(nullptr), onClick() { } @@ -97,7 +97,7 @@ void CUIGameItem::OnLBtnDown(int x, int y) { // OFFSET: 0x009E7610 // FUNCTION: fn_14482 void CUIGameItem::OnMouseHover(int x, int y) { - if (this->unknown_0084 == 0 || this->name.empty()) { + if (this->showNameTooltip == 0 || this->name.empty()) { return; } @@ -106,8 +106,8 @@ void CUIGameItem::OnMouseHover(int x, int y) { this->ToScreen(screenX, screenY); const std::uint32_t color = g_session.GetItemNameColor(this->itemInfo); CMode* tooltip = g_modeMgr.gameMode; - if (this->itemInfo.unknown_0098 > 0) { - const std::string text = FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), this->name.c_str(), this->itemInfo.unknown_0098); + if (this->itemInfo.optionCount > 0) { + const std::string text = FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), this->name.c_str(), this->itemInfo.optionCount); tooltip->ShowTooltip(text.c_str(), screenX, screenY, color, 0, 1); } else { tooltip->ShowTooltip(this->name.c_str(), screenX, screenY, color, 0, 1); @@ -117,7 +117,7 @@ void CUIGameItem::OnMouseHover(int x, int y) { // OFFSET: 0x009E7750 // FUNCTION: fn_14483 void CUIGameItem::OnLBtnDblClk(int, int) { - if (this->unknown_0085 == 0 || std::atoi(this->itemInfo.itemId.c_str()) <= 0) { + if (this->allowItemInfo == 0 || std::atoi(this->itemInfo.itemId.c_str()) <= 0) { return; } @@ -161,8 +161,8 @@ void CUIGameItem::SetItem(const ITEM_INFO& item) { oldImage->Unlock(); } - if (item.unknown_0088 > 0) { - CBitmapRes* overlay = static_cast(ResourceMgr::Instance().Load(std::format("유저인터페이스\\grade_enchant\\grade_icon{}.bmp", item.unknown_0088))); + if (item.grade > 0) { + CBitmapRes* overlay = static_cast(ResourceMgr::Instance().Load(std::format("유저인터페이스\\grade_enchant\\grade_icon{}.bmp", item.grade))); if (overlay) { overlay->Lock(); } diff --git a/Source/UI/Items/UIGameItem.h b/Source/UI/Items/UIGameItem.h index bbad8aefb..77f448271 100644 --- a/Source/UI/Items/UIGameItem.h +++ b/Source/UI/Items/UIGameItem.h @@ -12,8 +12,8 @@ public: CUIGameItem(); /* 0080 */ int mode; - /* 0084 */ unsigned char unknown_0084; - /* 0085 */ unsigned char unknown_0085; + /* 0084 */ unsigned char showNameTooltip; + /* 0085 */ unsigned char allowItemInfo; /* 0086 */ unsigned char transparent; /* 0088 */ unsigned short scale; /* 0090 */ ITEM_INFO itemInfo; diff --git a/Source/UI/Items/UIItemCollectionWnd.h b/Source/UI/Items/UIItemCollectionWnd.h index 24a05e407..fa99c9f50 100644 --- a/Source/UI/Items/UIItemCollectionWnd.h +++ b/Source/UI/Items/UIItemCollectionWnd.h @@ -36,24 +36,24 @@ public: /* 01B4 */ UIBitmapButton* m_viewButton; /* 01B8 */ UISpriteButton* m_readButtons[2]; /* 01C0 */ std::uint32_t m_previewTick; - /* 01C4 */ std::string unknown_01C4; + /* 01C4 */ std::string m_bitmapName; /* 01DC */ std::string unknown_01DC; /* 01F4 */ unsigned char unknown_01F4[0x4]; /* 01F8 */ int m_kind; - /* 01FC */ int unknown_01FC; + /* 01FC */ int m_optionCount; /* 0200 */ WindowPlacement* m_placement; /* 0204 */ UIResizer* m_resizer; /* 0208 */ UIBitmapButton* m_closeButton; /* 020C */ unsigned char m_compare; /* 0210 */ UIItemMoveInfo* m_moveInfo; /* 0214 */ UIBitmapButton* m_helpButton; - /* 0218 */ std::int16_t unknown_0218; - /* 021A */ std::int16_t unknown_021A; - /* 021C */ std::int16_t unknown_021C; - /* 021E */ unsigned char unknown_021E[0x18]; - /* 0236 */ std::uint16_t unknown_0236; - /* 0238 */ int unknown_0238; - /* 023C */ UIBasicButton* unknown_023C; + /* 0218 */ std::int16_t m_petLevel; + /* 021A */ std::int16_t m_petHunger; + /* 021C */ std::int16_t m_petFriendly; + /* 021E */ unsigned char m_petName[0x18]; + /* 0236 */ std::uint16_t m_petAccessory; + /* 0238 */ int m_petRenamed; + /* 023C */ UIBasicButton* m_withdrawButton; /* 0240 */ std::map> m_cardTexts; /* 0248 */ int m_extraHeight; /* 024C */ unsigned char unknown_024C[0x4]; diff --git a/Source/UI/Items/UIItemIdentifyWnd.h b/Source/UI/Items/UIItemIdentifyWnd.h index bc817142c..e65e80f58 100644 --- a/Source/UI/Items/UIItemIdentifyWnd.h +++ b/Source/UI/Items/UIItemIdentifyWnd.h @@ -43,7 +43,7 @@ public: std::vector GetReplayData() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; - /* 00F0 */ std::int16_t unknown_00F0; + /* 00F0 */ std::int16_t listType; }; class UIPetEggListWnd : public UIItemIdentifyWnd { diff --git a/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp b/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp index 48d239942..70e6a27e5 100644 --- a/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp +++ b/Source/UI/Items/UIItemParamChangeDisplayWnd.cpp @@ -8,10 +8,10 @@ UIItemParamChangeDisplayWnd::UIItemParamChangeDisplayWnd() m_after(0), m_beforeSecond(0), m_afterSecond(0), - unknown_00C4(0), - unknown_00C8(0), - unknown_00CC(0), - unknown_00D0(0), + itemParam(0), + itemSecondParam(0), + equippedParam(0), + equippedSecondParam(0), m_label("512"), - unknown_00EC(0), + itemIndex(0), m_placement(nullptr) {} diff --git a/Source/UI/Items/UIItemParamChangeDisplayWnd.h b/Source/UI/Items/UIItemParamChangeDisplayWnd.h index 66fcb43cc..a4f209151 100644 --- a/Source/UI/Items/UIItemParamChangeDisplayWnd.h +++ b/Source/UI/Items/UIItemParamChangeDisplayWnd.h @@ -17,12 +17,12 @@ public: /* 00B8 */ int m_after; /* 00BC */ int m_beforeSecond; /* 00C0 */ int m_afterSecond; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; + /* 00C4 */ int itemParam; + /* 00C8 */ int itemSecondParam; + /* 00CC */ int equippedParam; + /* 00D0 */ int equippedSecondParam; /* 00D4 */ std::string m_label; - /* 00EC */ int unknown_00EC; + /* 00EC */ int itemIndex; /* 00F0 */ WindowPlacement* m_placement; void StoreInfo() override; @@ -35,7 +35,7 @@ public: }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(UIItemParamChangeDisplayWnd, m_placement) - offsetof(UIItemParamChangeDisplayWnd, unknown_00C4) == 0x2C); +static_assert(offsetof(UIItemParamChangeDisplayWnd, m_placement) - offsetof(UIItemParamChangeDisplayWnd, itemParam) == 0x2C); #endif #endif diff --git a/Source/UI/Items/UIItemRepairWnd.cpp b/Source/UI/Items/UIItemRepairWnd.cpp index 0099a1fb8..be63c44f1 100644 --- a/Source/UI/Items/UIItemRepairWnd.cpp +++ b/Source/UI/Items/UIItemRepairWnd.cpp @@ -61,7 +61,7 @@ void UIMakeTargetResultWnd::Paint() { ITEM_INFO item; item.SetItemId(this->makeType); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; const int firstWidth = this->DrawFittedItemName(0x10, 2, &item, 0, 0, 0xC, 0); @@ -221,7 +221,7 @@ int UIItemRepairWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std this->indices.push_back(entry.index); item.SetItemId(entry.itemId); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; this->m_list->AddLine(item.DisplayName(0).c_str()); return 0; diff --git a/Source/UI/Items/UIMakeTargetListWnd.cpp b/Source/UI/Items/UIMakeTargetListWnd.cpp index 0919a565b..6b43bbdf7 100644 --- a/Source/UI/Items/UIMakeTargetListWnd.cpp +++ b/Source/UI/Items/UIMakeTargetListWnd.cpp @@ -62,7 +62,7 @@ int UIMakeTargetListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, this->itemIds.push_back(itemId); item.SetItemId(itemId); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; this->m_list->AddLine(item.DisplayName(0).c_str()); return 0; diff --git a/Source/UI/Items/UIMakeTargetProcessWnd.cpp b/Source/UI/Items/UIMakeTargetProcessWnd.cpp index ee94928f8..4d94bd4a7 100644 --- a/Source/UI/Items/UIMakeTargetProcessWnd.cpp +++ b/Source/UI/Items/UIMakeTargetProcessWnd.cpp @@ -44,7 +44,7 @@ void UIMakeTargetProcessWnd::DragAndDrop(int x, int y, std::intptr_t value) { bool hasElementalStone = false; int emptySlot = 3; for (int index = 0; index < 3; ++index) { - if (this->materials[index].unknown_0000[1] != 0) { + if (this->materials[index].identity[1] != 0) { hasElementalStone |= this->materials[index].IsElementalStone(); } else if (emptySlot == 3) { emptySlot = index; @@ -53,12 +53,12 @@ void UIMakeTargetProcessWnd::DragAndDrop(int x, int y, std::intptr_t value) { if (emptySlot < 3) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, drag->id); - if (item.unknown_0000[1] != 0 && item.IsForgeMaterial() && (!hasElementalStone || !item.IsElementalStone())) { + if (item.identity[1] != 0 && item.IsForgeMaterial() && (!hasElementalStone || !item.IsElementalStone())) { this->materials[emptySlot] = item; this->materials[emptySlot].quantity = 1; - g_session.RemoveItem1710(item.unknown_0000[1], 1); - if (g_windowMgr.unknown_01D4) { - reinterpret_cast(g_windowMgr.unknown_01D4)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + g_session.RemoveItem1710(item.identity[1], 1); + if (g_windowMgr.itemWnd) { + reinterpret_cast(g_windowMgr.itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } this->Invalidate(); } @@ -137,7 +137,7 @@ void UIMakeTargetProcessWnd::Paint() { for (int x = 8; x < 104; x += 32, ++material) { auto* bar = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\btnbar_right2.bmp"))); DrawItemSlotBackground(*this, x - 4, this->geometry.height - bar->image.height - 32); - if (material->unknown_0000[1] != 0) { + if (material->identity[1] != 0) { DrawItemIcon(*this, ResourceMgr::Instance(), x, this->geometry.height - bar->image.height - 28, *material, 0); } } @@ -147,7 +147,7 @@ void UIMakeTargetProcessWnd::Paint() { ITEM_INFO item; item.SetItemId(this->makeType); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; const int nameWidth = this->DrawFittedItemName(16, 2, &item, 0, 0, 12, 0); this->DrawShadowedText(nameWidth + 16, 2, LookupMessage(MSI_MAKE_TARGET), 0, 0, 0xFFFFFF, 0, 12, 0); @@ -165,7 +165,7 @@ void UIMakeTargetProcessWnd::Paint() { // FUNCTION: fn_13614 void UIMakeTargetProcessWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->GetItemAt(x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { g_modeMgr.gameMode->SendMsg(MM_BEGIN_DRAG_FROM_METALPROCESSWND, reinterpret_cast(item.itemId.c_str()), 0, 0, 0); } else { this->UIFrameWnd::OnLBtnDown(x, y); @@ -185,7 +185,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t const char* name = reinterpret_cast(a); for (int index = 2; index >= 0; --index) { ITEM_INFO& material = this->materials[index]; - if (material.unknown_0000[1] > 0 && material.itemId == name) { + if (material.identity[1] > 0 && material.itemId == name) { g_session.AddItem1710(material, 1); material.Reset(); this->Invalidate(); @@ -210,7 +210,7 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t g_modeMgr.GetGameMode()->SendMsg(MM_REQ_MAKING_ITEM, 0, reinterpret_cast(this->materials), 0, 0); bool restored = false; for (int index = 0; index < 3; ++index) { - if (this->materials[index].unknown_0000[1] > 0) { + if (this->materials[index].identity[1] > 0) { restored = true; g_session.AddItem1710(this->materials[index], 0); } @@ -220,8 +220,8 @@ int UIMakeTargetProcessWnd::SendMsg(UIWindow* sender, int message, std::intptr_t RefreshItemWindows(&g_windowMgr); } - if (g_windowMgr.unknown_01D4) { - reinterpret_cast(g_windowMgr.unknown_01D4)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + if (g_windowMgr.itemWnd) { + reinterpret_cast(g_windowMgr.itemWnd)->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } g_windowMgr.CloseWindow(WID_MAKETARGETPROCESSWND); diff --git a/Source/UI/Items/UISwapEquipmentWnd.cpp b/Source/UI/Items/UISwapEquipmentWnd.cpp index 719780bb8..5ee97245b 100644 --- a/Source/UI/Items/UISwapEquipmentWnd.cpp +++ b/Source/UI/Items/UISwapEquipmentWnd.cpp @@ -45,9 +45,9 @@ unsigned long g_swapEquipmentTick; // OFFSET: 0x0082F560 // FUNCTION: fn_10387 UISwapEquipmentWnd::UISwapEquipmentWnd() - : UIFrameWnd(0), m_swapButton(nullptr), unknown_00BC(0), unknown_00C0(timeGetTime()), unknown_00D4(-1), unknown_00D8(-1), - unknown_00DC(-1) { - this->geometry.unknown_0030 = 0; + : UIFrameWnd(0), m_swapButton(nullptr), equipmentPage(0), previewTick(timeGetTime()), hoverSlot(-1), hoverSecondarySlot(-1), + hoverTertiarySlot(-1) { + this->geometry.state = 0; } // OFFSET: 0x0082F990 @@ -76,19 +76,19 @@ void UISwapEquipmentWnd::DragAndDrop(int x, int y, std::intptr_t value) { break; } - if (item.unknown_0000[1] > 0) { - switch (item.unknown_0000[0]) { + if (item.identity[1] > 0) { + switch (item.identity[0]) { case 10: case 16: case 17: case 19: - mode->SendMsg(MM_WEAR_SWAP_EQUIP, drag->id, item.unknown_0000[2], 0, 0); + mode->SendMsg(MM_WEAR_SWAP_EQUIP, drag->id, item.identity[2], 0, 0); break; default: if (equipped == 1) { mode->SendMsg(MM_SWAP_EQUIPMENT_BY_INDEX, reinterpret_cast(&item), 0, 0, 0); - } else if (item.unknown_0000[2] != 0 && item.identified != 0 && item.unknown_0000[3] == 0) { - mode->SendMsg(MM_WEAR_SWAP_EQUIP, drag->id, item.unknown_0000[2], 0, 0); + } else if (item.identity[2] != 0 && item.identified != 0 && item.identity[3] == 0) { + mode->SendMsg(MM_WEAR_SWAP_EQUIP, drag->id, item.identity[2], 0, 0); } break; } @@ -100,37 +100,37 @@ void UISwapEquipmentWnd::DragAndDrop(int x, int y, std::intptr_t value) { // OFFSET: 0x0082FD90 // FUNCTION: fn_10391 void UISwapEquipmentWnd::DrawEquipmentSlots() { - this->unknown_00D0 = 0; - this->unknown_00C4 = 0; - this->unknown_00C8 = 0; - this->unknown_00CC = 0; + this->weaponView = 0; + this->topAccessory = 0; + this->midAccessory = 0; + this->bottomAccessory = 0; for (int slot = 0; slot < 10; ++slot) { bool fromSwap = true; ITEM_INFO item = this->GetSlotItem(slot); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { fromSwap = false; - if (this->unknown_00BC == 2) { + if (this->equipmentPage == 2) { item = g_session.GetItem2B50(slot); } else { item = g_session.GetItem17F0(slot); } } - if (item.unknown_0000[1] > 0 && item.quantity == 1) { + if (item.identity[1] > 0 && item.quantity == 1) { int xCoords[4] = {34, 173, 6, 250}; int yCoords[4] = {54, 80, 106, 132}; if (fromSwap) { - this->SetSlotValue(slot, item.unknown_0070); + this->SetSlotValue(slot, item.sprite); const int row = slot & 3; if (slot < 8) { const int iconY = row * 26 + 48; DrawItemIcon(*this, ResourceMgr::Instance(), xCoords[slot / 4 + 2], iconY, item, 0); this->DrawItemName(xCoords[slot / 4], yCoords[row], 70, &item, 0, 0, 12); - if (item.unknown_0088 > 0) { + if (item.grade > 0) { CBitmapRes* gradeBitmap = static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade).c_str())) ); this->DrawBitmap(xCoords[slot / 4 + 2], iconY + 12, gradeBitmap, true); } @@ -139,14 +139,14 @@ void UISwapEquipmentWnd::DrawEquipmentSlots() { this->DrawItemName(xCoords[slot - 8], 30, 70, &item, 0, 0, 12); } } else { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); int locations[3] = {slots.values[2], slots.values[1], slots.values[0]}; for (int i = 0; i < 3; ++i) { - fromSwap = this->GetSlotItem(locations[i]).unknown_0000[1] > 0; + fromSwap = this->GetSlotItem(locations[i]).identity[1] > 0; } if (!fromSwap) { - this->SetSlotValue(slot, item.unknown_0070); + this->SetSlotValue(slot, item.sprite); char path[128]; if (slot < 8) { const int iconX = xCoords[slot / 4 + 2]; @@ -158,9 +158,9 @@ void UISwapEquipmentWnd::DrawEquipmentSlots() { this->DrawAuxiliary(1, iconX, row * 26 + 48, &bitmap->image, true, false); } this->DrawItemName(xCoords[slot / 4], yCoords[row], 70, &item, 0, 0, 12); - if (item.unknown_0088 > 0) { + if (item.grade > 0) { CBitmapRes* gradeBitmap = static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade).c_str())) ); this->DrawBitmap(iconX, row * 26 + 60, gradeBitmap, true); } @@ -184,7 +184,7 @@ void UISwapEquipmentWnd::DrawEquipmentSlots() { // FUNCTION: fn_10400 void UISwapEquipmentWnd::OnRBtnDown(int x, int y) { ITEM_INFO item = this->ItemAtPoint(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } } @@ -197,8 +197,8 @@ int UISwapEquipmentWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg switch (argument1) { case ID_CANCEL: g_session.m_swapEquipmentMode = 0; - if (g_windowMgr.unknown_01E0) { - g_windowMgr.unknown_01E0->SendMsg(nullptr, UM_COMMAND, 0x1FC, 0, 0, 0); + if (g_windowMgr.equipWnd) { + g_windowMgr.equipWnd->SendMsg(nullptr, UM_COMMAND, 0x1FC, 0, 0, 0); } break; case ID_CLOSE: @@ -209,13 +209,13 @@ int UISwapEquipmentWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_CHAT)), 0xFF, 0, 0, 0); return 1; } - if (static_cast(g_modeMgr.GetGameMode())->unknown_0250) { + if (static_cast(g_modeMgr.GetGameMode())->isPlayerDead) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_MERCHANTSHOP)), 0xFF, 0, 0, 0); - } else if (g_windowMgr.unknown_0304 || g_windowMgr.unknown_0308 || g_windowMgr.unknown_02FC) { + } else if (g_windowMgr.merchantItemMyShopWnd || g_windowMgr.merchantItemPurchaseWnd || g_windowMgr.merchantShopMakeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_MDUNGEON_CREATE_FAIL_PARTY_ONLINE)), 0xFF, 0, 0, 0); - } else if (static_cast(g_modeMgr.GetGameMode())->scene->player->unknown_0264[3]) { + } else if (static_cast(g_modeMgr.GetGameMode())->scene->player->actorWindows[3]) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SWAP_EQUIPITEM_FAIL_USE_NPC)), 0xFF, 0, 0, 0); - } else if (g_windowMgr.unknown_01F0 || g_windowMgr.unknown_01F8) { + } else if (g_windowMgr.sayDialogWnd || g_windowMgr.choose3Wnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_USESKILL_FAIL_NEED_MORE_ARROW_CNT)), 0xFF, 0, 0, 0); } else { g_modeMgr.GetGameMode()->SendMsg(MM_SWAP_EQUIPMENT, 0, 0, 0, 0); @@ -236,16 +236,16 @@ int UISwapEquipmentWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg void UISwapEquipmentWnd::SetSlotValue(int index, int value) { switch (index) { case 8: - this->unknown_00C8 = value; + this->midAccessory = value; break; case 9: - this->unknown_00CC = value; + this->bottomAccessory = value; break; case 0: - this->unknown_00C4 = value; + this->topAccessory = value; break; case 2: - this->unknown_00D0 = value; + this->weaponView = value; break; } } @@ -279,13 +279,13 @@ ITEM_INFO UISwapEquipmentWnd::GetSlotItem(int slot) { return ITEM_INFO(0); } - if (this->unknown_00BC == 2) { + if (this->equipmentPage == 2) { ITEM_INFO item = g_session.GetItem6B68(slot); - return item.unknown_0000[1] > 0 ? item : ITEM_INFO(0); + return item.identity[1] > 0 ? item : ITEM_INFO(0); } ITEM_INFO item = g_session.GetItem61B8(slot); - return item.unknown_0000[1] > 0 ? item : ITEM_INFO(0); + return item.identity[1] > 0 ? item : ITEM_INFO(0); } // OFFSET: 0x00830760 @@ -328,9 +328,9 @@ void UISwapBitmapButton::Paint() { void UISwapEquipmentWnd::Paint() { this->ClearSurface(0xFFFFFFFF); std::string background; - if (this->unknown_00BC == 1) { + if (this->equipmentPage == 1) { background = "유저인터페이스\\swap_equipment\\equipwin_bg2_change.bmp"; - } else if (this->unknown_00BC == 2) { + } else if (this->equipmentPage == 2) { background = "유저인터페이스\\swap_equipment\\equipwin_special_change.bmp"; } @@ -353,23 +353,23 @@ void UISwapEquipmentWnd::Paint() { g_session.m_job, static_cast(g_session.m_bodyCostume), static_cast(g_session.m_head), - static_cast(this->unknown_00C4), - static_cast(this->unknown_00C8), - static_cast(this->unknown_00CC), - this->unknown_00D0, + static_cast(this->topAccessory), + static_cast(this->midAccessory), + static_cast(this->bottomAccessory), + this->weaponView, 0, 0, g_session.m_bodyStyle, g_session.m_headPalette, 0, 0, - this->unknown_00C0 + this->previewTick ); drawer.Draw(false); - if (g_session.unknown_7EC8 != 0) { - ITEM_INFO dragItem = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_7EC8); - if (dragItem.unknown_0000[1] > 0) { + if (g_session.swapArrowIndex != 0) { + ITEM_INFO dragItem = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.swapArrowIndex); + if (dragItem.identity[1] > 0) { DrawItemIcon(*this, ResourceMgr::Instance(), this->geometry.width / 2 - 24, 27, dragItem, 0); this->DrawFittedItemName(this->geometry.width / 2 - 24, 51, &dragItem, 0, 0, 12, 0); } @@ -384,13 +384,13 @@ void UISwapEquipmentWnd::OnLBtnDblClk(int x, int y) { } ITEM_INFO item = this->ItemAtPoint(x, y); - if (item.unknown_0000[1] > 0 && item.quantity > 0) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + if (item.identity[1] > 0 && item.quantity > 0) { + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); CMode* mode = g_modeMgr.gameMode; if (GetAsyncKeyState(VK_CONTROL)) { mode->SendMsg(MM_SWAP_EQUIPMENT_BY_INDEX, reinterpret_cast(&item), 0, 0, 0); } else { - mode->SendMsg(MM_TAKE_OFF_SWAP_EQUIP, slots.values[2], this->unknown_00BC == 2, 0, 0); + mode->SendMsg(MM_TAKE_OFF_SWAP_EQUIP, slots.values[2], this->equipmentPage == 2, 0, 0); } } } @@ -399,24 +399,24 @@ void UISwapEquipmentWnd::OnLBtnDblClk(int x, int y) { // FUNCTION: fn_10398 void UISwapEquipmentWnd::OnLBtnDown(int x, int y) { ITEM_INFO item = this->ItemAtPoint(x, y); - if (item.unknown_0000[1] <= 0 || item.quantity <= 0) { + if (item.identity[1] <= 0 || item.quantity <= 0) { return; } - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[3]); + const EquipSlots slots = g_session.GetEquipSlots(item.identity[3]); CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - mode->drag.BeginItem(g_windowMgr, this->unknown_00BC == 2 ? 18 : 17, item, item.quantity, slots.values[2]); + mode->drag.BeginItem(g_windowMgr, this->equipmentPage == 2 ? 18 : 17, item, item.quantity, slots.values[2]); if (HIBYTE(GetAsyncKeyState(VK_SHIFT))) { if (g_windowMgr.GetHoverWindow() && item.identified != 0) { if (g_windowMgr.GetHoverWindow()->geometry.id == 492) { - reinterpret_cast(g_windowMgr.unknown_0318)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 490) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 493) { reinterpret_cast(ChatWindow()->m_chatEdit)->InsertItemLink(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 491) { - reinterpret_cast(g_windowMgr.unknown_0458)->InsertItemTag(item); + reinterpret_cast(g_windowMgr.rodexComposeWnd)->InsertItemTag(item); } else if (g_windowMgr.GetHoverWindow()->geometry.id == 494) { static_cast(g_windowMgr.GetHoverWindow())->InsertItemLink(item); } @@ -429,7 +429,7 @@ void UISwapEquipmentWnd::OnLBtnDown(int x, int y) { void UISwapEquipmentWnd::OnMouseHover(int x, int y) { { ITEM_INFO item = this->ItemAtPoint(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { int tooltipX = 6; int tooltipY = y - (y - 22) % 26 - 19; if (x >= 170) { @@ -441,13 +441,13 @@ void UISwapEquipmentWnd::OnMouseHover(int x, int y) { std::string text; if (item.quantity > 1) { - if (item.unknown_0098 != 0) { + if (item.optionCount != 0) { text = static_cast(FormatOwnedString(LookupMessage(MSI_FAIL_NEED_EQUIPPED_GUN_GATLING), item.DisplayName(0))); } else { text = static_cast(FormatOwnedString(LookupMessage(MSI_EA2), item.DisplayName(0).c_str(), item.quantity)); } - } else if (item.unknown_0098 != 0) { - text = static_cast(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098)); + } else if (item.optionCount != 0) { + text = static_cast(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount)); } else { text = static_cast(item.DisplayName(0)); } @@ -456,12 +456,12 @@ void UISwapEquipmentWnd::OnMouseHover(int x, int y) { } } - const int previousD4 = this->unknown_00D4; - const int previousD8 = this->unknown_00D8; - const int previousDC = this->unknown_00DC; - this->unknown_00D4 = -1; - this->unknown_00D8 = -1; - this->unknown_00DC = -1; + const int previousD4 = this->hoverSlot; + const int previousD8 = this->hoverSecondarySlot; + const int previousDC = this->hoverTertiarySlot; + this->hoverSlot = -1; + this->hoverSecondarySlot = -1; + this->hoverTertiarySlot = -1; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode->drag.source == 1) { @@ -470,19 +470,19 @@ void UISwapEquipmentWnd::OnMouseHover(int x, int y) { } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, mode->drag.id); - if (item.unknown_0000[1] > 0 && item.unknown_0000[2] != 0) { - const EquipSlots slots = g_session.GetEquipSlots(item.unknown_0000[2]); - this->unknown_00D4 = slots.values[2]; + if (item.identity[1] > 0 && item.identity[2] != 0) { + const EquipSlots slots = g_session.GetEquipSlots(item.identity[2]); + this->hoverSlot = slots.values[2]; if (slots.values[1] != -1) { - this->unknown_00D8 = slots.values[1]; + this->hoverSecondarySlot = slots.values[1]; } if (slots.values[0] != -1) { - this->unknown_00DC = slots.values[0]; + this->hoverTertiarySlot = slots.values[0]; } } } - if (previousD4 != this->unknown_00D4 || previousD8 != this->unknown_00D8 || previousDC != this->unknown_00DC) { + if (previousD4 != this->hoverSlot || previousD8 != this->hoverSecondarySlot || previousDC != this->hoverTertiarySlot) { this->Invalidate(); } } diff --git a/Source/UI/Items/UISwapEquipmentWnd.h b/Source/UI/Items/UISwapEquipmentWnd.h index b7db394d2..dd0f74532 100644 --- a/Source/UI/Items/UISwapEquipmentWnd.h +++ b/Source/UI/Items/UISwapEquipmentWnd.h @@ -39,15 +39,15 @@ public: protected: /* 00B4 */ std::uint32_t unknown_00B4; /* 00B8 */ UISwapBitmapButton* m_swapButton; - /* 00BC */ int unknown_00BC; - /* 00C0 */ std::uint32_t unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; - /* 00D4 */ int unknown_00D4; - /* 00D8 */ int unknown_00D8; - /* 00DC */ int unknown_00DC; + /* 00BC */ int equipmentPage; + /* 00C0 */ std::uint32_t previewTick; + /* 00C4 */ int topAccessory; + /* 00C8 */ int midAccessory; + /* 00CC */ int bottomAccessory; + /* 00D0 */ int weaponView; + /* 00D4 */ int hoverSlot; + /* 00D8 */ int hoverSecondarySlot; + /* 00DC */ int hoverTertiarySlot; }; #endif diff --git a/Source/UI/Items/UIWeaponRefineWnd.cpp b/Source/UI/Items/UIWeaponRefineWnd.cpp index 796426333..2a236f348 100644 --- a/Source/UI/Items/UIWeaponRefineWnd.cpp +++ b/Source/UI/Items/UIWeaponRefineWnd.cpp @@ -79,7 +79,7 @@ int UIWeaponRefineWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->indices.push_back(b); item.SetItemId(itemId); - item.unknown_0060 = 0; + item.refiningLevel = 0; item.identified = 1; this->m_list->AddLine(item.DisplayName(0).c_str()); return 0; diff --git a/Source/UI/Layout/WindowGeometry.h b/Source/UI/Layout/WindowGeometry.h index fbf2905a1..9719a63d6 100644 --- a/Source/UI/Layout/WindowGeometry.h +++ b/Source/UI/Layout/WindowGeometry.h @@ -13,8 +13,8 @@ struct WindowGeometry { /* 0024 */ CDC* surface; /* 0028 */ int visible; /* 002C */ int id; - /* 0030 */ std::uint32_t unknown_0030; - /* 0034 */ std::uint32_t unknown_0034; + /* 0030 */ std::uint32_t state; + /* 0034 */ std::uint32_t animationFrame; /* 0038 */ std::uint32_t targetAlpha; /* 003C */ std::uint32_t alphaStart; /* 0040 */ std::uint32_t currentAlpha; diff --git a/Source/UI/Layout/WindowSnapping.cpp b/Source/UI/Layout/WindowSnapping.cpp index 0132a9ff0..398f1fa68 100644 --- a/Source/UI/Layout/WindowSnapping.cpp +++ b/Source/UI/Layout/WindowSnapping.cpp @@ -28,7 +28,7 @@ void UIWindowMgr::ConstrainSnap(UIWindow* window, int& dx, int& dy, int groupMem SnapRectangle moving; moving.Set(window->geometry.x, window->geometry.y, window->geometry.width, window->geometry.height); SnapRectangle screen; - screen.Set(0, 0, this->unknown_047C, this->unknown_0480); + screen.Set(0, 0, this->screenWidth, this->screenHeight); screen.ReverseEdges(); int x = 0, y = 0; screen.Snap(moving, x, y); diff --git a/Source/UI/Lists/UIChatHisBox.cpp b/Source/UI/Lists/UIChatHisBox.cpp index ebe65b47e..9ad44b0d0 100644 --- a/Source/UI/Lists/UIChatHisBox.cpp +++ b/Source/UI/Lists/UIChatHisBox.cpp @@ -37,7 +37,7 @@ std::string UIChatHisBox::ResolvePlayerTags(const char* name) { if (label.find(LookupMessage(MSI_NAMELESS_USER)) != std::string::npos) { const std::size_t found = result.find(LookupMessage(MSI_NAMELESS_USER)); - const std::string player = LookupPlayerName(row[index]->unknown_01F8); + const std::string player = LookupPlayerName(row[index]->tipId); if (std::strcmp(player.c_str(), name) == 0) { result.replace(found, std::strlen(LookupMessage(MSI_NAMELESS_USER)), name, std::strlen(name)); @@ -49,14 +49,14 @@ std::string UIChatHisBox::ResolvePlayerTags(const char* name) { position += start + std::strlen(opening.c_str()) + 1; row[index]->column = this->TextWidth(head.c_str(), 0, 0, 12, 0, 0) - this->horizontalOffset; - const std::string bracket = this->BracketName(reinterpret_cast(row[index]->unknown_00F8).DisplayName(0)); + const std::string bracket = this->BracketName(reinterpret_cast(row[index]->itemPayload).DisplayName(0)); row[index]->SetTooltip(bracket.c_str()); row[index]->label = bracket; row[index]->ResizeToTextClipped(this->TextWidth(bracket.c_str(), 0, 0, 12, 0, 0) + 1, row[index]->geometry.height); this->lines[line] = result; } } else { - const std::string bracket = this->BracketName(reinterpret_cast(row[index]->unknown_00F8).DisplayName(0)); + const std::string bracket = this->BracketName(reinterpret_cast(row[index]->itemPayload).DisplayName(0)); const std::string tail = result.substr(position); const std::size_t found = tail.find(bracket); const std::string head = result.substr(0, position + found); @@ -76,11 +76,11 @@ __declspec(noinline) void UIChatHisBox::RebuildHistory() { this->Clear(); this->ClearNaviLinks(); - for (unsigned int index = 0; index < this->unknown_0100.size(); ++index) { - if (this->unknown_0100[index].find(g_itemLinkTagBegin) != std::string::npos) { - this->AddText(this->unknown_0100[index].c_str(), this->unknown_010C[index], this->unknown_0118[index].c_str()); + for (unsigned int index = 0; index < this->historyTexts.size(); ++index) { + if (this->historyTexts[index].find(g_itemLinkTagBegin) != std::string::npos) { + this->AddText(this->historyTexts[index].c_str(), this->historyColors[index], this->historyItemIds[index].c_str()); } else { - this->AddTextWrapped(this->unknown_0100[index].c_str(), this->unknown_010C[index], this->unknown_0118[index].c_str()); + this->AddTextWrapped(this->historyTexts[index].c_str(), this->historyColors[index], this->historyItemIds[index].c_str()); } } @@ -93,9 +93,9 @@ UIChatHisBox::UIChatHisBox() : UIListBox() { this->maxLines = 240; this->lineHeight = 14; this->lines.reserve(240); - this->unknown_00E4.reserve(240); + this->lineColors.reserve(240); this->history.reserve(240); - this->unknown_0100.reserve(240); - this->unknown_010C.reserve(240); - this->unknown_0118.reserve(240); + this->historyTexts.reserve(240); + this->historyColors.reserve(240); + this->historyItemIds.reserve(240); } diff --git a/Source/UI/Lists/UIChatHisBox.h b/Source/UI/Lists/UIChatHisBox.h index 983cf29ef..813d7c6bb 100644 --- a/Source/UI/Lists/UIChatHisBox.h +++ b/Source/UI/Lists/UIChatHisBox.h @@ -55,12 +55,12 @@ public: /* 00D4 */ std::list> itemTags; /* 00DC */ std::list> naviLinks; - /* 00E4 */ std::vector unknown_00E4; + /* 00E4 */ std::vector lineColors; /* 00F0 */ int maxLines; /* 00F4 */ std::vector history; - /* 0100 */ std::vector unknown_0100; - /* 010C */ std::vector unknown_010C; - /* 0118 */ std::vector unknown_0118; + /* 0100 */ std::vector historyTexts; + /* 010C */ std::vector historyColors; + /* 0118 */ std::vector historyItemIds; }; #endif diff --git a/Source/UI/Lists/UIComboBox.cpp b/Source/UI/Lists/UIComboBox.cpp index 6f9d25473..6709d6d7e 100644 --- a/Source/UI/Lists/UIComboBox.cpp +++ b/Source/UI/Lists/UIComboBox.cpp @@ -18,7 +18,7 @@ int UIComboBox::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, target->SendMsg(nullptr, UM_COMBOBOX_SELECTED, this->selected, 0, 0, 0); } - if (g_windowMgr.unknown_0214 != nullptr) { + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } @@ -93,9 +93,9 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 case UM_DEFPUSH: if (UIWindow* target = g_windowMgr.LookupWindow(this->targetId)) { int extra = 0; - const auto found = this->unknown_00C4.find(this->selected); + const auto found = this->lineData.find(this->selected); - if (found != this->unknown_00C4.end()) { + if (found != this->lineData.end()) { extra = found->second; } @@ -103,7 +103,7 @@ int UIComboBoxID::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 target->SendMsg(nullptr, UM_COMBOBOX_SELECTED, lineId, extra, 0, 0); } - if (g_windowMgr.unknown_0214 != nullptr) { + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } diff --git a/Source/UI/Lists/UIComboBoxDefWnd.cpp b/Source/UI/Lists/UIComboBoxDefWnd.cpp index 6ec028a00..0e1e69ee4 100644 --- a/Source/UI/Lists/UIComboBoxDefWnd.cpp +++ b/Source/UI/Lists/UIComboBoxDefWnd.cpp @@ -371,7 +371,7 @@ int UINewComboBoxCtrl::SendMsg(UIWindow* sender, int message, std::intptr_t argu if (argument1 == ID_OPEN_MEMBER_POS_COMBO) { this->dropped = !this->dropped; - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } @@ -420,7 +420,7 @@ void UIString::ParseTags(std::string text) { TrimLeading(text, " \t"); if (text[0] != '<') { - this->unknown_00DC = text; + this->text = text; return; } @@ -446,11 +446,11 @@ void UIString::ParseTags(std::string text) { if (key == "image") { const std::size_t start = tags.find_first_of("\"", index) + 1; index = tags.find_first_of("\"", start); - this->unknown_00AC = tags.substr(start, index - start); - TrimLeading(this->unknown_00AC, " \t"); - TrimTrailing(this->unknown_00AC, " \t"); - TrimLeading(this->unknown_00AC, "\""); - TrimTrailing(this->unknown_00AC, "\""); + this->image = tags.substr(start, index - start); + TrimLeading(this->image, " \t"); + TrimTrailing(this->image, " \t"); + TrimLeading(this->image, "\""); + TrimTrailing(this->image, "\""); } else if (key == "color") { const std::size_t start = tags.find_first_of(" \t", index) + 1; index = tags.find_first_of(" \t", start); @@ -459,40 +459,40 @@ void UIString::ParseTags(std::string text) { const std::string green = value.substr(2, 2); const std::string blue = value.substr(4, 2); char* stop; - this->unknown_009C = std::strtol(red.c_str(), &stop, 16); - this->unknown_00A0 = std::strtol(green.c_str(), &stop, 16); - this->unknown_00A4 = std::strtol(blue.c_str(), &stop, 16); + this->red = std::strtol(red.c_str(), &stop, 16); + this->green = std::strtol(green.c_str(), &stop, 16); + this->blue = std::strtol(blue.c_str(), &stop, 16); } else if (key == "link") { const std::size_t start = tags.find_first_of("\"", index) + 1; index = tags.find_first_of("\"", start); - this->unknown_0084 = tags.substr(start, index - start); - TrimLeading(this->unknown_0084, " \t"); - TrimTrailing(this->unknown_0084, " \t"); - TrimLeading(this->unknown_0084, "\""); - TrimTrailing(this->unknown_0084, "\""); - this->unknown_009C = 10; - this->unknown_00A0 = 10; - this->unknown_00A4 = 255; + this->link = tags.substr(start, index - start); + TrimLeading(this->link, " \t"); + TrimTrailing(this->link, " \t"); + TrimLeading(this->link, "\""); + TrimTrailing(this->link, "\""); + this->red = 10; + this->green = 10; + this->blue = 255; } else if (key == "font") { const std::size_t start = tags.find_first_of("\"", index) + 1; index = tags.find_first_of("\"", start); - this->unknown_00C4 = tags.substr(start, index - start); - TrimLeading(this->unknown_00C4, " \t"); - TrimTrailing(this->unknown_00C4, " \t"); - TrimLeading(this->unknown_00C4, "\""); - TrimTrailing(this->unknown_00C4, "\""); + this->fontName = tags.substr(start, index - start); + TrimLeading(this->fontName, " \t"); + TrimTrailing(this->fontName, " \t"); + TrimLeading(this->fontName, "\""); + TrimTrailing(this->fontName, "\""); } else if (key == "bold") { } else if (key == "size") { const std::size_t start = tags.find_first_of(" \t", index) + 1; index = tags.find_first_of(" \t", start); const std::string value = tags.substr(start, index - start); - this->unknown_00A8 = std::atoi(value.c_str()); + this->fontSize = std::atoi(value.c_str()); } position = index + 1; } - this->unknown_00DC = text.substr(end + 1, text.find_first_of("<", end + 1) - (end + 1)); + this->text = text.substr(end + 1, text.find_first_of("<", end + 1) - (end + 1)); } // OFFSET: 0x008A0B10 @@ -548,14 +548,14 @@ void UIDescriptRace::DrawRaceDescription() { if (this->m_noRace) { if (this->m_createTime + 60 <= timeGetTime()) { - int next = this->unknown_0284 + 1; + int next = this->m_frameIndex + 1; if (next >= static_cast(act->FrameCount(action))) { next = 0; } - this->unknown_0284 = next; + this->m_frameIndex = next; this->m_createTime = timeGetTime(); } - frame = this->unknown_0284; + frame = this->m_frameIndex; } const ActionFrame* actionFrame = &act->Frame(action, frame); @@ -563,7 +563,7 @@ void UIDescriptRace::DrawRaceDescription() { POINT point = imf->GetLongPoint(layer, action, frame); if (layer == 1) { const ActionFrame* body = &static_cast(ResourceMgr::Instance().Load(GetBodyActionResourceName(job, g_session.m_sex, job, 0)))->Frame(action, frame); - if (actionFrame->anchorCount != 0 && body->anchorCount != 0 && actionFrame->anchors[0].unknown_0008 == body->anchors[0].unknown_0008) { + if (actionFrame->anchorCount != 0 && body->anchorCount != 0 && actionFrame->anchors[0].attachmentId == body->anchors[0].attachmentId) { point.x += body->anchors[0].x - actionFrame->anchors[0].x; point.y += body->anchors[0].y - actionFrame->anchors[0].y; } @@ -583,12 +583,12 @@ void UIDescriptRace::DrawRaceDescription() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } this->geometry.surface->DrawSurface( cell.x + point.x + 60, cell.y + point.y + 140, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, - image->height, cell.mirrored, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -674,12 +674,12 @@ void UITextViewEX::SetText(std::string text) { const auto last = this->extraLinks.end(); for (; link != last; ++link) { UIString* label = static_cast(*link); - const std::string caption = label->unknown_00DC; + const std::string caption = label->text; x += label->geometry.width + 5; if (x + 15 > this->geometry.width || caption == "\n") { this->AddLineLinks(reinterpret_cast(std::to_address(first)), reinterpret_cast(std::to_address(link))); first = link; - x = label->unknown_00DC == "\n" ? 0 : label->geometry.width + 5; + x = label->text == "\n" ? 0 : label->geometry.width + 5; } } @@ -715,10 +715,10 @@ int UITextViewEX::AddWords(std::string text, int attached, int red, int green, i UIString* label = new UIString(); label->SetText(100, 100, word); label->Show(0); - label->unknown_0080 = attached; - label->unknown_009C = red; - label->unknown_00A0 = green; - label->unknown_00A4 = blue; + label->enabled = attached; + label->red = red; + label->green = green; + label->blue = blue; attached = 0; this->AddChild(label); this->extraLinks.push_back(label); diff --git a/Source/UI/Lists/UIComboBoxEx.cpp b/Source/UI/Lists/UIComboBoxEx.cpp index 273d11cdb..e552a68fe 100644 --- a/Source/UI/Lists/UIComboBoxEx.cpp +++ b/Source/UI/Lists/UIComboBoxEx.cpp @@ -144,7 +144,7 @@ int UIComboBoxEx::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i target->SendMsg(nullptr, UM_COMBOBOX_SELECTED, this->selected, 0, 0, 0); } - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } diff --git a/Source/UI/Lists/UIComboBoxV2Wnd.cpp b/Source/UI/Lists/UIComboBoxV2Wnd.cpp index 63bd95a6f..f68f136d0 100644 --- a/Source/UI/Lists/UIComboBoxV2Wnd.cpp +++ b/Source/UI/Lists/UIComboBoxV2Wnd.cpp @@ -2,5 +2,5 @@ // OFFSET: 0x0086CF40 // FUNCTION: fn_11039 -UIComboBoxV2Wnd::UIComboBoxV2Wnd() : UIWindow(0), selected(-1), unknown_0098(nullptr), list(nullptr) { +UIComboBoxV2Wnd::UIComboBoxV2Wnd() : UIWindow(0), selected(-1), auxiliaryWindow(nullptr), list(nullptr) { } diff --git a/Source/UI/Lists/UIComboBoxV2Wnd.h b/Source/UI/Lists/UIComboBoxV2Wnd.h index 1acd74266..7aa3c56ba 100644 --- a/Source/UI/Lists/UIComboBoxV2Wnd.h +++ b/Source/UI/Lists/UIComboBoxV2Wnd.h @@ -18,7 +18,7 @@ public: /* 007C */ std::string text; /* 0094 */ int selected; - /* 0098 */ UIWindow* unknown_0098; + /* 0098 */ UIWindow* auxiliaryWindow; /* 009C */ UIListBoxEx* list; }; diff --git a/Source/UI/Lists/UIImgMenu.h b/Source/UI/Lists/UIImgMenu.h index 03dd2af9c..9eaf544c1 100644 --- a/Source/UI/Lists/UIImgMenu.h +++ b/Source/UI/Lists/UIImgMenu.h @@ -22,11 +22,11 @@ public: /* 0084 */ int itemWidth; /* 0088 */ int itemHeight; /* 008C */ int horizontal; - /* 0090 */ bool* unknown_0090; - /* 0094 */ bool* unknown_0094; + /* 0090 */ bool* pressedItems; + /* 0094 */ bool* disabledItems; /* 0098 */ std::string bitmapName; /* 00B0 */ std::string baseName; - /* 00C8 */ int unknown_00C8; + /* 00C8 */ int callerWindowId; }; #endif diff --git a/Source/UI/Lists/UIListBox.cpp b/Source/UI/Lists/UIListBox.cpp index 0043a6b6c..b36347e7a 100644 --- a/Source/UI/Lists/UIListBox.cpp +++ b/Source/UI/Lists/UIListBox.cpp @@ -168,7 +168,7 @@ void UIChatHisBox3::AddText(const char* text, int color) { this->DropOldestLines(); } - this->unknown_00E4.push_back(color); + this->lineColors.push_back(color); int mode = 3; const auto* bytes = reinterpret_cast(text); @@ -181,7 +181,7 @@ void UIChatHisBox3::AddText(const char* text, int color) { this->UIListBox::AddLine(text); } - if (this->verticalOverflow != 0 && atBottom && this->unknown_0130 != 0) { + if (this->verticalOverflow != 0 && atBottom && this->autoScroll != 0) { this->topLine = (static_cast(this->lines.size()) - this->geometry.height / this->lineHeight) + this->bottomMargin; this->verticalBar->position = this->topLine; this->verticalBar->Invalidate(); @@ -203,7 +203,7 @@ void UIChatHisBox::AddText(const char* text, int color, const char* style) { } this->history.push_back(style ? std::string(style) : std::string()); - this->unknown_00E4.push_back(color); + this->lineColors.push_back(color); int mode = 4; const auto* bytes = reinterpret_cast(text); @@ -512,9 +512,9 @@ int UIListBox::TextLength() { // OFFSET: 0x0087AAF0 // FUNCTION: fn_11238 void UIChatHisBox::CopyHistory(const UIChatHisBox& other) { - this->unknown_0100 = other.unknown_0100; - this->unknown_010C = other.unknown_010C; - this->unknown_0118 = other.unknown_0118; + this->historyTexts = other.historyTexts; + this->historyColors = other.historyColors; + this->historyItemIds = other.historyItemIds; this->RebuildHistory(); } @@ -528,7 +528,7 @@ void UIComboBoxID::AddLine(const char* text, int id, int data) { this->Refresh(); if (data != 0) { - this->unknown_00C4.try_emplace(index, data); + this->lineData.try_emplace(index, data); } } diff --git a/Source/UI/Lists/UIListBoxID.h b/Source/UI/Lists/UIListBoxID.h index e9cff7f4c..f9ea2884c 100644 --- a/Source/UI/Lists/UIListBoxID.h +++ b/Source/UI/Lists/UIListBoxID.h @@ -31,7 +31,7 @@ public: virtual void Clear(); virtual void Refresh(); - /* 007C */ unsigned char unknown_007C[0xC]; + /* 007C */ unsigned char backgroundChannels[0xC]; /* 0088 */ std::map lines; /* 0090 */ int selected; /* 0094 */ int topLine; @@ -71,7 +71,7 @@ public: void AddLine(const char* text, int id, int data); /* 00C0 */ int targetId; - /* 00C4 */ std::map unknown_00C4; + /* 00C4 */ std::map lineData; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Lists/UIListBoxTemplate.h b/Source/UI/Lists/UIListBoxTemplate.h index 13a278a4e..99b78b453 100644 --- a/Source/UI/Lists/UIListBoxTemplate.h +++ b/Source/UI/Lists/UIListBoxTemplate.h @@ -52,10 +52,10 @@ public: void OnCreate(int width, int height) override; void OnInit() override; - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIStaticImage* unknown_00EC; + /* 00E8 */ CUIStaticText* labelText; + /* 00EC */ CUIStaticImage* stampImage; /* 00F0 */ int id; - /* 00F4 */ unsigned int unknown_00F4; + /* 00F4 */ unsigned int questId; }; class CUITab : public CUIListItem { @@ -68,12 +68,12 @@ public: void OnSelectSubTab(CUISubTab* subTab); CUIListBox* CreateSubTabList(); - /* 00E8 */ CUIStaticText* unknown_00E8; + /* 00E8 */ CUIStaticText* labelText; /* 00EC */ CUIListBox* subTabs; - /* 00F0 */ std::string unknown_00F0; + /* 00F0 */ std::string title; /* 0108 */ int type; /* 010C */ CUIPage* page; - /* 0110 */ int unknown_0110; + /* 0110 */ int collapsedHeight; }; class CUIItemInfo : public CUIListItem { @@ -86,19 +86,19 @@ public: void SetDescription(int type, const std::vector& description); union { - /* 00E8 */ unsigned char unknown_00E8[0x08]; + /* 00E8 */ unsigned char headerControls[0x08]; struct { /* 00E8 */ CUIStaticImage* image; /* 00EC */ CUIStaticText* nameText; }; }; - /* 00F0 */ CUIStaticText* unknown_00F0; - /* 00F4 */ CUIStaticText* unknown_00F4; - /* 00F8 */ CUIStaticText* unknown_00F8; + /* 00F0 */ CUIStaticText* descriptionViewer; + /* 00F4 */ CUIStaticText* optionsViewer; + /* 00F8 */ CUIStaticText* sourcesViewer; /* 00FC */ int itemId; /* 0100 */ int type; /* 0104 */ int location; - /* 0108 */ std::string unknown_0108; + /* 0108 */ std::string description; }; class CUIMonsterInfo : public CUIListItem { @@ -109,9 +109,9 @@ public: void Paint() override; void SetMonster(const std::string& title); - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIStaticText* unknown_00EC; - /* 00F0 */ CUIStaticText* unknown_00F0; + /* 00E8 */ CUIStaticText* nameText; + /* 00EC */ CUIStaticText* detailsViewer; + /* 00F0 */ CUIStaticText* valuesViewer; /* 00F4 */ CSprRes* sprite; /* 00F8 */ CActRes* action; }; @@ -126,11 +126,11 @@ public: void SetStatusLines(bool first, bool second, bool third); void SetViewerLines(const std::vector& lines); - /* 00E8 */ UIWindow* unknown_00E8; - /* 00EC */ CUIStaticText* unknown_00EC; - /* 00F0 */ CUIStaticText* unknown_00F0; - /* 00F4 */ CUIStaticText* unknown_00F4; - /* 00F8 */ std::string unknown_00F8; + /* 00E8 */ UIWindow* stampImage; + /* 00EC */ CUIStaticText* titleViewer; + /* 00F0 */ CUIStaticText* linesViewer; + /* 00F4 */ CUIStaticText* statusViewer; + /* 00F8 */ std::string title; /* 0110 */ int questId; }; @@ -140,8 +140,8 @@ public: void OnCreate(int width, int height) override; void OnInit() override; - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIStaticText* unknown_00EC; + /* 00E8 */ CUIStaticText* titleText; + /* 00EC */ CUIStaticText* descriptionText; }; class CItemData { public: @@ -149,8 +149,8 @@ public: /* 0004 */ std::uint8_t first; /* 0005 */ std::uint8_t second; /* 0006 */ std::uint8_t third; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; + /* 0008 */ int categoryId; + /* 000C */ int categoryIndex; /* 0010 */ std::string text; /* 0028 */ std::vector values; /* 0034 */ int type; @@ -164,9 +164,9 @@ public: class CQuestInfo { public: /* 0000 */ int id; - /* 0004 */ std::uint8_t unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; + /* 0004 */ std::uint8_t categoryType; + /* 0008 */ int categoryId; + /* 000C */ int categoryIndex; /* 0010 */ int questId; /* 0014 */ std::string title; /* 002C */ std::string text; @@ -265,10 +265,10 @@ public: } CResPtr& NormalImage() { - return this->unknown_0080; + return this->normalImage; } - /* 0080 */ CResPtr unknown_0080; + /* 0080 */ CResPtr normalImage; /* 0084 */ CResPtr unknown_0084; /* 0088 */ CResPtr unknown_0088; /* 008C */ CResPtr unknown_008C; @@ -468,10 +468,10 @@ public: } CResPtr& NormalImage() { - return this->unknown_0080; + return this->normalImage; } - /* 0080 */ CResPtr unknown_0080; + /* 0080 */ CResPtr normalImage; /* 0084 */ CResPtr unknown_0084; /* 0088 */ CResPtr unknown_0088; /* 008C */ CResPtr unknown_008C; @@ -482,12 +482,12 @@ public: /* 00B8 */ int rowHeight; /* 00BC */ int itemX; /* 00C0 */ int itemY; - /* 00C4 */ unsigned char unknown_00C4; + /* 00C4 */ unsigned char layoutFlag; /* 00C5 */ unsigned char unknown_00C5[0x03]; /* 00C8 */ std::vector items; /* 00D4 */ std::list data; /* 00DC */ unsigned int selected; - /* 00E0 */ unsigned char unknown_00E0; + /* 00E0 */ unsigned char selectionFlag; /* 00E1 */ unsigned char rebind; /* 00E2 */ unsigned char unknown_00E2[0x06]; /* 00E8 */ std::function onSelect; diff --git a/Source/UI/Lists/UIMemberListBox.h b/Source/UI/Lists/UIMemberListBox.h index 05a392988..ba30793a5 100644 --- a/Source/UI/Lists/UIMemberListBox.h +++ b/Source/UI/Lists/UIMemberListBox.h @@ -25,8 +25,8 @@ public: void Resize(int width, int height) override; virtual void AddText(const char* text, int color); - /* 0130 */ int unknown_0130; - /* 0134 */ int unknown_0134; + /* 0130 */ int autoScroll; + /* 0134 */ int fontHeight; }; class UIMemberListBox : public UIChatHisBox2 { diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index 0691412f7..84666cf9d 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -531,8 +531,8 @@ int UIImgMenu::ItemAt(int x, int y) { // OFFSET: 0x0086ECF0 // FUNCTION: fn_11083 UITabControl::UITabControl() - : UIWindow(0), unknown_00E8(12), flags() { - this->unknown_007C = -1; + : UIWindow(0), fontSize(12), flags() { + this->activeTabIndex = -1; this->dragX = 0; this->dragY = 0; } @@ -540,15 +540,15 @@ UITabControl::UITabControl() // OFFSET: 0x00879300 // FUNCTION: fn_11215 void UITabControl::SelectTab(int index) { - if (index < static_cast(this->labels.size()) && this->unknown_007C != index) { - this->unknown_007C = index; + if (index < static_cast(this->labels.size()) && this->activeTabIndex != index) { + this->activeTabIndex = index; } this->edit->SetText(""); this->edit->Move(-100, -100); if (this->parent) { - this->parent->SendMsg(this, UM_TAB, this->unknown_007C, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->activeTabIndex, 0, 0, 0); this->parent->Invalidate(); } @@ -573,7 +573,7 @@ void UITabControl::RemoveTab(int index) { this->labels.erase(this->labels.begin() + tab); this->widths.erase(this->widths.begin() + tab); this->flags.erase(this->flags.begin() + tab); - this->unknown_007C = 0; + this->activeTabIndex = 0; this->FitToTabs(); return; } @@ -587,8 +587,8 @@ void UITabControl::ClearTabs() { this->colors.clear(); this->widths.clear(); this->flags.clear(); - this->unknown_007C = 0; - this->unknown_00E8 = 12; + this->activeTabIndex = 0; + this->fontSize = 12; this->FitToTabs(); } @@ -610,7 +610,7 @@ void UITabControl::AddTab(const char* label, const char* tooltip) { const int tabWidth = this->parent->geometry.width / this->labels.size() - this->tabPadding; for (std::size_t index = 0; index < this->labels.size(); ++index) { - if (this->TextWidth(this->labels[index].c_str(), 0, 0, this->unknown_00E8, 0, 0) > tabWidth) { + if (this->TextWidth(this->labels[index].c_str(), 0, 0, this->fontSize, 0, 0) > tabWidth) { if (index != this->labels.size() - 1) { if (this->tooltips[index].empty()) { this->tooltips[index] = this->labels[index]; @@ -628,14 +628,14 @@ void UITabControl::AddTab(const char* label, const char* tooltip) { } } - this->unknown_007C = 0; + this->activeTabIndex = 0; this->colors.push_back(0xFFFFFFFFu); int width; if (this->layout == 0 || this->layout == 2) { - width = this->VerticalTextHeight(label, 0, 0, this->unknown_00E8, 0); + width = this->VerticalTextHeight(label, 0, 0, this->fontSize, 0); } else { - width = this->TextWidth(label, 0, 0, this->unknown_00E8, 0, 0); + width = this->TextWidth(label, 0, 0, this->fontSize, 0, 0); } this->widths.push_back(width + this->tabPadding); @@ -692,7 +692,7 @@ bool UIChatHisBox::IsTransmitMouseInput() { // FUNCTION: fn_11222 void UIChatHisBox::Clear() { UIListBox::Clear(); - this->unknown_00E4.erase(this->unknown_00E4.begin(), this->unknown_00E4.end()); + this->lineColors.erase(this->lineColors.begin(), this->lineColors.end()); this->history.erase(this->history.begin(), this->history.end()); } @@ -726,7 +726,7 @@ void UIChatHisBox::PlaceNaviLinks(int line) { // FUNCTION: fn_11272 void UIEditCtrl_Custom::DrawLabel(int x, int y, const char* text) { const std::uint32_t outline = this->secondColor; - const unsigned char bold = this->unknown_011C; + const unsigned char bold = this->labelBold; const std::uint32_t color = this->textColor; if (outline == 0xFFFFFFFF) { this->DrawTextAt(x, y, text, 0, 0, 12, color, bold, 0); @@ -744,8 +744,8 @@ void UIEditCtrl_Custom::DrawLabel(int x, int y, const char* text) { // OFFSET: 0x0087E1F0 // FUNCTION: fn_11265 void UIEditCtrl_Custom::PaintText() { - int x = this->unknown_0120 + 3; - const int y = this->unknown_0124 + this->textY; + int x = this->labelOffsetX + 3; + const int y = this->labelOffsetY + this->textY; std::string display; FontCache& fonts = g_fontCache; @@ -764,11 +764,11 @@ void UIEditCtrl_Custom::PaintText() { end = std::max(this->anchor, this->cursor) + static_cast(g_serverLanguage->candidate.size()) + static_cast(std::strlen(prefix)); } - if (this->unknown_0128 == 1) { - x = this->geometry.width - x - this->TextWidth(display.c_str(), 0, 0, 12, this->unknown_011C, 0); - } else if (this->unknown_0128 == 2) { + if (this->labelAlignment == 1) { + x = this->geometry.width - x - this->TextWidth(display.c_str(), 0, 0, 12, this->labelBold, 0); + } else if (this->labelAlignment == 2) { const float center = this->geometry.width * g_depthAverageHalf; - x = static_cast(center - this->TextWidth(display.c_str(), 0, 0, 12, this->unknown_011C, 0) * g_depthAverageHalf); + x = static_cast(center - this->TextWidth(display.c_str(), 0, 0, 12, this->labelBold, 0) * g_depthAverageHalf); } const int left = begin ? this->TextWidth(display.c_str(), begin, 0, 12, 0, 0) : 0; const int right = end ? this->TextWidth(display.c_str(), end, 0, 12, 0, 0) : 0; @@ -796,11 +796,11 @@ void UIEditCtrl_Custom::PaintText() { display = this->text; } - if (this->unknown_0128 == 1) { - x = this->geometry.width - x - this->TextWidth(display.c_str(), 0, 0, 12, this->unknown_011C, 0); - } else if (this->unknown_0128 == 2) { + if (this->labelAlignment == 1) { + x = this->geometry.width - x - this->TextWidth(display.c_str(), 0, 0, 12, this->labelBold, 0); + } else if (this->labelAlignment == 2) { const float center = this->geometry.width * g_depthAverageHalf; - x = static_cast(center - this->TextWidth(display.c_str(), 0, 0, 12, this->unknown_011C, 0) * g_depthAverageHalf); + x = static_cast(center - this->TextWidth(display.c_str(), 0, 0, 12, this->labelBold, 0) * g_depthAverageHalf); } this->DrawLabel(x, y, display.c_str()); } @@ -825,7 +825,7 @@ void UIBasicItemCtrl::DrawItemIcon(int x, int y, int, bool compact) { this->DrawBitmap(x, y, bitmap, true); } - if (this->m_item.unknown_0000[1] == 0 || this->m_item.quantity == 0) { + if (this->m_item.identity[1] == 0 || this->m_item.quantity == 0) { return; } @@ -946,11 +946,11 @@ void UIBasicItemCtrl::DragAndDrop(int, int, std::intptr_t argument3) { const ModeDragState* drag = reinterpret_cast(argument3); if (!drag->skill && drag->identified == this->m_identified) { this->m_item = LookupClientItemByIdentity(g_session.m_inventoryItems, drag->id); - if ((this->m_itemType == 21 && g_session.IsConsumableItemType(this->m_item.unknown_0000[0])) || - (this->m_itemType == 22 && g_session.IsEquipItemType(this->m_item.unknown_0000[0])) || - (this->m_itemType == 23 && g_session.IsMiscItemType(this->m_item.unknown_0000[0])) || this->m_item.unknown_0000[0] == this->m_itemType || + if ((this->m_itemType == 21 && g_session.IsConsumableItemType(this->m_item.identity[0])) || + (this->m_itemType == 22 && g_session.IsEquipItemType(this->m_item.identity[0])) || + (this->m_itemType == 23 && g_session.IsMiscItemType(this->m_item.identity[0])) || this->m_item.identity[0] == this->m_itemType || this->m_itemType == -1) { - if ((this->m_itemMask == -1 || (this->m_item.unknown_0000[2] & this->m_itemMask) != 0) && this->m_item.unknown_0000[1] != 0) { + if ((this->m_itemMask == -1 || (this->m_item.identity[2] & this->m_itemMask) != 0) && this->m_item.identity[1] != 0) { if (this->Root()) { this->Root()->Invalidate(); this->Root()->InvalidateChildren(); @@ -970,7 +970,7 @@ void UIBasicSkillCtrl::DragAndDrop(int, int, std::intptr_t argument3) { if (drag->skill) { std::string name = drag->skillName; CSkillInfo skill = g_session.LookupSkill(drag->id); - if (skill.level && skill.available && skill.unknown_0014) { + if (skill.level && skill.available && skill.spCost) { this->m_skillId = static_cast(drag->id); this->m_level = drag->skillLevel; if (this->Root()) { @@ -1007,7 +1007,7 @@ void UITabControl::DragAndDrop(int argument1, int argument2, std::intptr_t argum void UITabControl::DrawVerticalTab(int index) { const int width = this->widths[index]; const int textHeight = - this->VerticalTextHeight(this->labels[index].c_str(), 0, 0, this->unknown_00E8, 0); + this->VerticalTextHeight(this->labels[index].c_str(), 0, 0, this->fontSize, 0); int y = 0; for (int previous = 0; previous < index; ++previous) { y += this->widths[previous] - 1; @@ -1017,7 +1017,7 @@ void UITabControl::DrawVerticalTab(int index) { int x = textX + 1; const int textY = (width - textHeight) / 2 + (width - textHeight) % 2 + y; std::uint32_t color; - if (this->unknown_007C == index) { + if (this->activeTabIndex == index) { this->FillTab(index, 0, y, this->geometry.width, width, this->activeFillColor); this->DrawTabBorder(0, y, this->geometry.width, width, this->activeBorderColor); color = this->activeTextColor; @@ -1035,7 +1035,7 @@ void UITabControl::DrawVerticalTab(int index) { color = this->inactiveTextColor; } - this->DrawVerticalText(x, textY, this->labels[index].c_str(), 0, 0, this->unknown_00E8, color, 0); + this->DrawVerticalText(x, textY, this->labels[index].c_str(), 0, 0, this->fontSize, color, 0); } // OFFSET: 0x0087F1D0 @@ -1073,7 +1073,7 @@ void UITabControl::DrawTabBorder(int x, int y, int width, int height, std::uint3 void UITabControl::DrawHorizontalTab(int index) { const int width = this->widths[index]; const int textWidth = - this->TextWidth(this->labels[index].c_str(), 0, 0, this->unknown_00E8, 0, 0); + this->TextWidth(this->labels[index].c_str(), 0, 0, this->fontSize, 0, 0); int x = 0; for (int previous = 0; previous < index; ++previous) { x += this->widths[previous] - 1; @@ -1083,7 +1083,7 @@ void UITabControl::DrawHorizontalTab(int index) { const int textY = (this->geometry.height - 12) / 2; int y = textY + 1; std::uint32_t color; - if (this->unknown_007C == index) { + if (this->activeTabIndex == index) { this->FillTab(index, x, 0, width, this->geometry.height, this->activeFillColor); this->DrawTabBorder(x, 0, width, this->geometry.height, this->activeBorderColor); color = this->activeTextColor; @@ -1102,7 +1102,7 @@ void UITabControl::DrawHorizontalTab(int index) { } this->DrawTextAt(textX, y, this->labels[index].c_str(), 0, 0, - this->unknown_00E8, color, 0, 0 + this->fontSize, color, 0, 0 ); } @@ -1137,15 +1137,15 @@ int UITabControl::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 return 0; } - const int width = this->TextWidth(text.c_str(), 0, 0, this->unknown_00E8, 0, 0); + const int width = this->TextWidth(text.c_str(), 0, 0, this->fontSize, 0, 0); if ((this->tabPadding + width) * this->TabCount() >= this->parent->geometry.width - 90) { g_windowMgr.Confirm(LookupMessage(MSI_FAILED_CHANGE_TABNAME), 0, true, false, 0, "Message", 280, 120, 0); } else { - this->labels[this->unknown_007C] = text; + this->labels[this->activeTabIndex] = text; const int previousWidth = this->geometry.width; this->RecalculateWidths(); if (this->parent) { - this->parent->SendMsg(this, 116, reinterpret_cast(text.c_str()), this->unknown_007C, previousWidth > this->geometry.width ? previousWidth : 0, 0); + this->parent->SendMsg(this, 116, reinterpret_cast(text.c_str()), this->activeTabIndex, previousWidth > this->geometry.width ? previousWidth : 0, 0); } } } @@ -1164,11 +1164,11 @@ void UIChatHisBox::DropOldestLines() { } this->lines.resize(half); - half = static_cast(this->unknown_00E4.size()) / 2; + half = static_cast(this->lineColors.size()) / 2; for (int index = 0; index < static_cast(half); ++index) { - this->unknown_00E4[index] = this->unknown_00E4[index + half]; + this->lineColors[index] = this->lineColors[index + half]; } - this->unknown_00E4.resize(half); + this->lineColors.resize(half); half = static_cast(this->history.size()) / 2; for (unsigned int index = 0; index < half; ++index) { @@ -1225,9 +1225,9 @@ __declspec(noinline) void UIChatHisBox::ClearNaviLinks() { // OFFSET: 0x00879E80 // FUNCTION: fn_11221 void UIChatHisBox::ResetContents() { - this->unknown_0100.clear(); - this->unknown_010C.clear(); - this->unknown_0118.clear(); + this->historyTexts.clear(); + this->historyColors.clear(); + this->historyItemIds.clear(); this->Clear(); this->ClearNaviLinks(); this->ShiftNaviLinks(); @@ -1236,23 +1236,23 @@ void UIChatHisBox::ResetContents() { // OFFSET: 0x0087CC30 // FUNCTION: fn_11256 void UIChatHisBox::DropOldestRecords() { - unsigned int half = static_cast(this->unknown_0100.size()) / 2; + unsigned int half = static_cast(this->historyTexts.size()) / 2; for (unsigned int index = 0; index < half; ++index) { - this->unknown_0100[index] = this->unknown_0100[index + half]; + this->historyTexts[index] = this->historyTexts[index + half]; } - this->unknown_0100.resize(half); + this->historyTexts.resize(half); - half = static_cast(this->unknown_010C.size()) / 2; + half = static_cast(this->historyColors.size()) / 2; for (int index = 0; index < static_cast(half); ++index) { - this->unknown_010C[index] = this->unknown_010C[index + half]; + this->historyColors[index] = this->historyColors[index + half]; } - this->unknown_010C.resize(half); + this->historyColors.resize(half); - half = static_cast(this->unknown_0118.size()) / 2; + half = static_cast(this->historyItemIds.size()) / 2; for (unsigned int index = 0; index < half; ++index) { - this->unknown_0118[index] = this->unknown_0118[index + half]; + this->historyItemIds[index] = this->historyItemIds[index + half]; } - this->unknown_0118.resize(half); + this->historyItemIds.resize(half); this->RebuildHistory(); } @@ -1287,7 +1287,7 @@ void UIChatHisBox::ShiftItemTags() { // FUNCTION: fn_11267 int UITreeView::LayoutNodes(std::list& nodes, int x, int y) { int rowHeight = 0; - const int first = this->unknown_00A8; + const int first = this->scrollRow; const int last = this->geometry.height / this->itemHeight + first; const int gap = this->itemPadding - 2; if (static_cast(nodes.size()) <= 0) { @@ -1318,28 +1318,28 @@ int UITreeView::LayoutNodes(std::list& nodes, int x, int y) { } UITVTextButton* label = node->labelButton; - label->unknown_00B4 = 0; + label->drawBackground = 0; label->Invalidate(); - if (this->unknown_0088 && this->unknown_0088 == node) { - node->labelButton->unknown_00B4 = 1; + if (this->selectedNode && this->selectedNode == node) { + node->labelButton->drawBackground = 1; node->labelButton->Invalidate(); } label = node->labelButton; - label->unknown_00B5 = 0; + label->highlighted = 0; label->m_highlightColor = 0; label->Invalidate(); - if (this->unknown_00AC && this->unknown_008C && this->unknown_0090 && this->unknown_00B0) { - if (this->unknown_0090 == node) { + if (this->mouseInside && this->dragNode && this->dropNode && this->highlightColor) { + if (this->dropNode == node) { label = node->labelButton; - label->unknown_00B5 = 1; - label->m_highlightColor = this->unknown_00B0; + label->highlighted = 1; + label->m_highlightColor = this->highlightColor; label->Invalidate(); } - if (node->unknown_0170 && node->unknown_0170->labelButton && node->unknown_0170->labelButton->unknown_00B5) { + if (node->parent && node->parent->labelButton && node->parent->labelButton->highlighted) { label = node->labelButton; - label->m_highlightColor = this->unknown_00B0; - label->unknown_00B5 = 1; + label->m_highlightColor = this->highlightColor; + label->highlighted = 1; label->Invalidate(); } } @@ -1353,11 +1353,11 @@ int UITreeView::LayoutNodes(std::list& nodes, int x, int y) { label = node->labelButton; const int height = label->geometry.height; if (maxWidth != label->geometry.width && std::strcmp(label->label.c_str(), "") != 0) { - label->unknown_00DC = label->label; + label->displayText = label->label; int width; if (label->geometry.width > maxWidth) { const char* fitted = label->ClipTextToWidth(label->label.c_str(), maxWidth - 2, label->m_fontFamily, label->m_fontHeight, label->m_outlined); - label->unknown_00DC = fitted; + label->displayText = fitted; width = label->m_border ? maxWidth + 2 : maxWidth; } else { width = label->TextWidth(label->label.c_str(), 0, label->m_fontFamily, label->m_fontHeight, @@ -1463,7 +1463,7 @@ void UIChatHisBox::Paint() { this->DrawTextAt(3, this->lineHeight * row + 4, this->lines[index].c_str(), 0, 0, 12, 0, 0, 0); x = 2; } - this->DrawTextAt(x, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->unknown_00E4[index], 0, 0); + this->DrawTextAt(x, this->lineHeight * row + 3, this->lines[index].c_str(), 0, 0, 12, this->lineColors[index], 0, 0); this->PlaceNaviLinks(index); this->PlaceItemTags(index); } @@ -1482,32 +1482,32 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { this->HideNodes(this->root->children); - const int previous = this->unknown_00A8; + const int previous = this->scrollRow; const int visible = this->geometry.height / this->itemHeight; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_00A8 = previous - visible + 1; + this->scrollRow = previous - visible + 1; } else if (message == UM_SCROLLVERTPAGEDOWN) { - this->unknown_00A8 = previous - 1 + visible; + this->scrollRow = previous - 1 + visible; } else { - this->unknown_00A8 = previous + static_cast(a); + this->scrollRow = previous + static_cast(a); } - if (this->unknown_00A8 < 0) { - this->unknown_00A8 = 0; + if (this->scrollRow < 0) { + this->scrollRow = 0; } const int maximum = this->itemCount - visible; - if (this->unknown_00A8 > maximum) { - this->unknown_00A8 = maximum; + if (this->scrollRow > maximum) { + this->scrollRow = maximum; } - this->verticalBar->position = this->unknown_00A8; + this->verticalBar->position = this->scrollRow; this->verticalBar->Invalidate(); this->Invalidate(); if (this->parent) { this->parent->Invalidate(); } - return this->unknown_00A8 - previous; + return this->scrollRow - previous; } case UM_UPPUSH: if (this->verticalOverflow) { @@ -1520,7 +1520,7 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } break; case UM_TEXT_LBTN_DblClk: - this->unknown_0088 = reinterpret_cast(a); + this->selectedNode = reinterpret_cast(a); if (a) { this->parent->SendMsg(this, UM_TEXT_LBTN_DblClk, a, sender->geometry.x + b, sender->geometry.height / 2 + sender->geometry.y, 0); } @@ -1528,9 +1528,9 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int case UM_TEXT_LBTN_UP: case UM_TEXT_RBTN_UP: case UM_BMP_LBTN_UP: - this->unknown_008C = nullptr; - this->unknown_0090 = nullptr; - this->unknown_0088 = reinterpret_cast(a); + this->dragNode = nullptr; + this->dropNode = nullptr; + this->selectedNode = reinterpret_cast(a); if (!a) { break; } @@ -1540,17 +1540,17 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int break; } - if (this->unknown_0088->children.size() != 0) { + if (this->selectedNode->children.size() != 0) { this->HideNodes(this->root->children); const int x = sender->geometry.x; const int y = message == UM_TEXT_LBTN_UP ? sender->geometry.y - 6 : sender->geometry.y; UIWindow* button; - if (this->unknown_0088->expanded == 0) { - this->unknown_0088->expanded = 1; - button = this->unknown_0088->collapseButton; + if (this->selectedNode->expanded == 0) { + this->selectedNode->expanded = 1; + button = this->selectedNode->collapseButton; } else { - this->unknown_0088->expanded = 0; - button = this->unknown_0088->expandButton; + this->selectedNode->expanded = 0; + button = this->selectedNode->expandButton; } button->Move(x, y); this->Invalidate(); @@ -1558,66 +1558,66 @@ int UITreeView::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int if (message == UM_TEXT_LBTN_UP) { this->parent->SendMsg( - this, 98, reinterpret_cast(this->unknown_0088), sender->geometry.x + b, sender->geometry.height / 2 + sender->geometry.y, 0 + this, 98, reinterpret_cast(this->selectedNode), sender->geometry.x + b, sender->geometry.height / 2 + sender->geometry.y, 0 ); } - this->unknown_008C = nullptr; - this->unknown_0090 = nullptr; + this->dragNode = nullptr; + this->dropNode = nullptr; break; case UM_BEGIN_DRAG_BTN: - this->unknown_008C = reinterpret_cast(a); - this->unknown_0088 = reinterpret_cast(a); - if (this->unknown_008C->draggable == 0) { - this->unknown_008C = nullptr; + this->dragNode = reinterpret_cast(a); + this->selectedNode = reinterpret_cast(a); + if (this->dragNode->draggable == 0) { + this->dragNode = nullptr; } break; case UM_MOUSE_HOVER_BTN: g_modeMgr.gameMode->SetCursorAction(0); - if (this->unknown_008C && this->unknown_008C->id != a) { + if (this->dragNode && this->dragNode->id != a) { UITreeNode* target = reinterpret_cast(a); - this->unknown_0090 = target; + this->dropNode = target; if (target->container == 0) { - this->unknown_0090 = target->unknown_0170; + this->dropNode = target->parent; } - this->unknown_0090->expanded = 1; + this->dropNode->expanded = 1; this->Invalidate(); } break; case UM_END_DRAG_BTN: if (sender == this->parent) { - this->unknown_0090 = nullptr; + this->dropNode = nullptr; } - if (this->unknown_008C) { - if (this->unknown_008C->unknown_0170 == this->unknown_0090) { + if (this->dragNode) { + if (this->dragNode->parent == this->dropNode) { break; } - if (this->unknown_0090 && this->unknown_0090->unknown_0170 == this->unknown_008C) { + if (this->dropNode && this->dropNode->parent == this->dragNode) { break; } g_modeMgr.gameMode->SetCursorAction(2); - UITreeNode* node = this->unknown_008C; + UITreeNode* node = this->dragNode; UITVTextButton* label = node->labelButton; - this->RemoveChildNode(node->unknown_0170, node->id, true); - UITreeNode* previousParent = this->unknown_008C->unknown_0170; - this->unknown_008C->unknown_0170 = this->unknown_0090; - UITreeNode* target = this->unknown_0090 ? this->unknown_0090 : this->root; - target->children.push_back(this->unknown_008C); - this->unknown_008C->labelButton = label; + this->RemoveChildNode(node->parent, node->id, true); + UITreeNode* previousParent = this->dragNode->parent; + this->dragNode->parent = this->dropNode; + UITreeNode* target = this->dropNode ? this->dropNode : this->root; + target->children.push_back(this->dragNode); + this->dragNode->labelButton = label; if (this->parent) { this->parent->SendMsg( - this, 109, reinterpret_cast(this->unknown_008C), reinterpret_cast(this->unknown_0090), + this, 109, reinterpret_cast(this->dragNode), reinterpret_cast(this->dropNode), reinterpret_cast(previousParent), 0 ); } this->HideNodes(this->root->children); } - this->unknown_0088 = nullptr; - this->unknown_008C = nullptr; - this->unknown_0090 = nullptr; + this->selectedNode = nullptr; + this->dragNode = nullptr; + this->dropNode = nullptr; this->Invalidate(); break; case UM_CHANGE_TVITEM_TEXT: @@ -1784,8 +1784,8 @@ void UITabControl::Configure( this->tabHeight = tabHeight; this->tabPadding = tabPadding; this->uniformWidths = uniformWidths; - this->unknown_00A9 = unknownA9; - this->unknown_00A8 = unknownA8; + this->skipTabFill = unknownA9; + this->allowTabRename = unknownA8; this->activeFillColor = activeFillColor ? activeFillColor : 0xFFFFFF; this->inactiveFillColor = inactiveFillColor ? inactiveFillColor : 0xFFFFFF; this->activeBorderColor = activeBorderColor ? activeBorderColor : 0xC3C3C3; @@ -1833,10 +1833,10 @@ bool UIItemTagCtrl::RemoveInvalidTag(std::list::iterator& entry) bool atCursor; if (before.find("<") != std::string::npos && after.find(">") == std::string::npos) { - atCursor = (!g_windowMgr.unknown_0458 || static_cast(g_windowMgr.unknown_0458)->m_contents == g_windowMgr.GetHoverWindow()) && + atCursor = (!g_windowMgr.rodexComposeWnd || static_cast(g_windowMgr.rodexComposeWnd)->m_contents == g_windowMgr.GetHoverWindow()) && absolute + bytes == g_serverLanguage->cursor; } else if (before.find("<") == std::string::npos && after.find(">") != std::string::npos) { - atCursor = (!g_windowMgr.unknown_0458 || static_cast(g_windowMgr.unknown_0458)->m_contents == g_windowMgr.GetHoverWindow()) && + atCursor = (!g_windowMgr.rodexComposeWnd || static_cast(g_windowMgr.rodexComposeWnd)->m_contents == g_windowMgr.GetHoverWindow()) && absolute == g_serverLanguage->cursor; } else if (before.find("<") != std::string::npos && after.find(">") != std::string::npos) { ++count; @@ -1929,7 +1929,7 @@ std::string UIChatHisBox::RenderItemLinks(const char* lineText, std::string& sou result += prefix; int titleId = 0; - if (encoded.substr(0, 6) == "00000T" && (titleId = ItemLinkMessageId(encoded)) <= g_itemTagOwner->unknown_0118) { + if (encoded.substr(0, 6) == "00000T" && (titleId = ItemLinkMessageId(encoded)) <= g_itemTagOwner->maxTipId) { std::string label; const std::string title = g_itemTagOwner->Title(titleId, &label, 17); if (!title.empty()) { @@ -1955,7 +1955,7 @@ std::string UIChatHisBox::RenderItemLinks(const char* lineText, std::string& sou UIItemTagButton* button = new (std::nothrow) UIItemTagButton(); if (button) { - std::memcpy(button->unknown_00F8, &item, sizeof(item)); + std::memcpy(button->itemPayload, &item, sizeof(item)); button->Configure(label.c_str(), 0x82F2E1, 0, 12, 0, 0); button->SetTooltip(item.DisplayName(0).c_str()); button->m_hoverColor = 0x82F2E1; @@ -1967,9 +1967,9 @@ std::string UIChatHisBox::RenderItemLinks(const char* lineText, std::string& sou const std::string unknownName = LookupMessage(MSI_NAMELESS_USER); if (label.find(unknownName) != std::string::npos) { std::uint32_t creator[2]; - std::memcpy(creator, item.unknown_001C + 8, sizeof(creator)); - button->unknown_01F8 = creator[0] + (creator[1] << 16); - g_session.AddUnknown7F94(button->unknown_01F8); + std::memcpy(creator, item.cards + 8, sizeof(creator)); + button->tipId = creator[0] + (creator[1] << 16); + g_session.AddUnknown7F94(button->tipId); } this->AddChild(button); @@ -2166,7 +2166,7 @@ void UIChatHisBox::AddItemLinkLine(const char* text, int& color, int& mode) { for (unsigned int line = 0; line < wrapped.size(); ++line) { wrapped[line] = this->RenderItemLinks(wrapped[line].c_str(), source); if (line != 0) { - this->unknown_00E4.push_back(color); + this->lineColors.push_back(color); this->history.push_back(std::string()); } this->UIListBox::AddLine(wrapped[line].c_str()); @@ -2190,7 +2190,7 @@ void UIChatHisBox::AddNavigationLinkLine(const char* text, int& color, int& mode for (unsigned int line = 0; line < wrapped.size(); ++line) { wrapped[line] = this->RenderNavigationLinks(wrapped[line].c_str(), source); if (line != 0) { - this->unknown_00E4.push_back(color); + this->lineColors.push_back(color); } this->UIListBox::AddLine(wrapped[line].c_str()); } @@ -2201,7 +2201,7 @@ void UIChatHisBox::AddNavigationLinkLine(const char* text, int& color, int& mode UIListBoxID::UIListBoxID() : UIWindow(0), lines(), selected(0), topLine(0), horizontalOffset(0), contentWidth(0), verticalOverflow(0), bottomMargin(0), verticalBar(nullptr), horizontalBar(nullptr), transparent(0), lineHeight(16) { - int* background = reinterpret_cast(this->unknown_007C); + int* background = reinterpret_cast(this->backgroundChannels); background[0] = 255; background[1] = 255; background[2] = 255; @@ -2215,17 +2215,17 @@ void UIString::SetText(int width, int height, std::string text) { this->SetSize(width, height); if (text.size() == 1 && text[0] == '\n') { this->Resize(5, 5); - this->unknown_00DC = text; + this->text = text; return; } this->ParseTags(text); - if (this->unknown_00AC.size() != 0) { - this->Resize(this->TextWidth(this->unknown_00DC.c_str(), static_cast(this->unknown_00DC.size()), 0, 12, 0, 0) + 24, 24); + if (this->image.size() != 0) { + this->Resize(this->TextWidth(this->text.c_str(), static_cast(this->text.size()), 0, 12, 0, 0) + 24, 24); } else { this->Resize( - this->TextWidth(this->unknown_00DC.c_str(), static_cast(this->unknown_00DC.size()), 0, 12, 0, 0), - this->TextHeight(this->unknown_00DC.c_str(), static_cast(this->unknown_00DC.size()), 0, 12, 0, 0) + this->TextWidth(this->text.c_str(), static_cast(this->text.size()), 0, 12, 0, 0), + this->TextHeight(this->text.c_str(), static_cast(this->text.size()), 0, 12, 0, 0) ); } } diff --git a/Source/UI/Lists/UITabControl.h b/Source/UI/Lists/UITabControl.h index 0e2b2926e..36f152920 100644 --- a/Source/UI/Lists/UITabControl.h +++ b/Source/UI/Lists/UITabControl.h @@ -39,7 +39,7 @@ public: void OnMouseHover(int x, int y) override; void OnLBtnUp(int x, int y) override; - /* 007C */ int unknown_007C; + /* 007C */ int activeTabIndex; /* 0080 */ int layout; /* 0084 */ int tabHeight; /* 0088 */ int tabPadding; @@ -51,8 +51,8 @@ public: /* 009C */ std::uint32_t inactiveBorderColor; /* 00A0 */ std::uint32_t activeTextColor; /* 00A4 */ std::uint32_t inactiveTextColor; - /* 00A8 */ unsigned char unknown_00A8; - /* 00A9 */ unsigned char unknown_00A9; + /* 00A8 */ unsigned char allowTabRename; + /* 00A9 */ unsigned char skipTabFill; /* 00AC */ int dragX; /* 00B0 */ int dragY; /* 00B4 */ std::vector labels; @@ -60,7 +60,7 @@ public: /* 00CC */ std::vector widths; /* 00D8 */ UIEditCtrl* edit; /* 00DC */ std::vector tooltips; - /* 00E8 */ int unknown_00E8; + /* 00E8 */ int fontSize; /* 00EC */ std::vector flags; }; diff --git a/Source/UI/Lists/UITagListBox.cpp b/Source/UI/Lists/UITagListBox.cpp index dfedcd8ab..71a125a40 100644 --- a/Source/UI/Lists/UITagListBox.cpp +++ b/Source/UI/Lists/UITagListBox.cpp @@ -231,16 +231,16 @@ bool UITagListBox::ItemFromFields(const std::vector& fields, ITEM_INFO& ite return false; } - item.unknown_0000[2] = fields[0]; + item.identity[2] = fields[0]; item.SetItemId(fields[2]); if (fields[1] != 0) { - item.unknown_0000[0] = 4; + item.identity[0] = 4; } if (fields.size() > 3) { - item.unknown_0060 = fields[3]; + item.refiningLevel = fields[3]; } - item.unknown_0070 = fields[4]; - item.unknown_0088 = static_cast(fields[5]); + item.sprite = fields[4]; + item.grade = static_cast(fields[5]); int cardCount = 0; if (fields.size() > 6) { @@ -253,7 +253,7 @@ bool UITagListBox::ItemFromFields(const std::vector& fields, ITEM_INFO& ite if (static_cast(cardCount + 8) < fields.size()) { const int optionCount = fields[cardCount + 8]; - item.unknown_0098 = optionCount; + item.optionCount = optionCount; for (int option = 1; option < optionCount + 1; ++option) { const int* record = &fields[cardCount + 9 + (option - 1) * 3]; ItemOption value; @@ -599,13 +599,13 @@ std::string UITagListBox::ParseTaggedText(std::string text, std::vector(result.size()); + tag.startOffset = static_cast(result.size()); const std::pair parsed = this->ParseTag(source.text, source.tag); result += parsed.first; - tag.unknown_000C = static_cast(result.size()); - tag.unknown_0010 = parsed.first; - tag.unknown_0028 = parsed.second; - tag.unknown_0004 = g_textTagRegistry[source.tag].type; + tag.endOffset = static_cast(result.size()); + tag.label = parsed.first; + tag.data = parsed.second; + tag.type = g_textTagRegistry[source.tag].type; tags.push_back(tag); position = source.position + source.text.size(); } @@ -656,8 +656,8 @@ void UITagListBox::AppendTaggedLines(std::string text, std::vector& const char* start = buffer + position; int next = WrappedLineLength(start, static_cast(text.size() - position), width) + static_cast(position); for (std::size_t index = 0; index < tags.size(); ++index) { - if (next > tags[index].unknown_0008 && next < tags[index].unknown_000C) { - next = tags[index].unknown_0008; + if (next > tags[index].startOffset && next < tags[index].endOffset) { + next = tags[index].startOffset; break; } } @@ -676,22 +676,22 @@ void UITagListBox::AppendTaggedLines(std::string text, std::vector& // OFFSET: 0x009B7A20 // FUNCTION: fn_13870 void UITagListBox::AddTagButton(STagInfoV2 tag, int lineCount) { - if (tag.unknown_0010.empty()) { + if (tag.label.empty()) { return; } UITagButton* button = new UITagButton(); - button->Configure(tag.unknown_0010.c_str(), 0x00F4934A, 0, 12, 0, 1); + button->Configure(tag.label.c_str(), 0x00F4934A, 0, 12, 0, 1); const int height = button->geometry.height; button->ResizeToTextClipped( - this->TextWidth(tag.unknown_0010.c_str(), 0, 0, 12, 0, 0) + 1, height + this->TextWidth(tag.label.c_str(), 0, 0, 12, 0, 0) + 1, height ); button->m_hoverColor = 0x00FF7864; - button->SetId(tag.unknown_0004); + button->SetId(tag.type); - std::string data = tag.unknown_0028; + std::string data = tag.data; if (!data.empty()) { - switch (tag.unknown_0004) { + switch (tag.type) { case LINE_SEGMENT_NAVI: { std::string remaining = data; std::size_t separator = remaining.find(","); @@ -718,9 +718,9 @@ void UITagListBox::AddTagButton(STagInfoV2 tag, int lineCount) { if (!button->GetString(1).empty()) { id = std::atoi(button->GetString(1).c_str()); } - button->item.unknown_0000[0] = id; + button->item.identity[0] = id; button->item.identified = 1; - button->item.unknown_0060 = 0; + button->item.refiningLevel = 0; button->item.itemId = button->GetString(0); break; } @@ -739,8 +739,8 @@ void UITagListBox::AddTagButton(STagInfoV2 tag, int lineCount) { const unsigned int count = static_cast(this->lines.size()); for (unsigned int index = count - lineCount; index < count; ++index) { bytes += static_cast(this->lines[index].size()); - if (tag.unknown_0008 < bytes) { - const int prefixLength = static_cast(this->lines[index].size()) - bytes + tag.unknown_0008; + if (tag.startOffset < bytes) { + const int prefixLength = static_cast(this->lines[index].size()) - bytes + tag.startOffset; const std::string stripped = StripColorTokens(this->lines[index].c_str(), prefixLength); const std::string prefix = stripped.substr(0, prefixLength); x = this->TextWidth(prefix.c_str(), 0, 0, 12, 0, 0) + 2; diff --git a/Source/UI/Lists/UITagListBox.h b/Source/UI/Lists/UITagListBox.h index 0ee86c985..097f2b0a1 100644 --- a/Source/UI/Lists/UITagListBox.h +++ b/Source/UI/Lists/UITagListBox.h @@ -14,11 +14,11 @@ class UITagButton; class UITagListBox : public UIListBox { public: struct STagInfoV2 { - /* 0004 */ int unknown_0004; - /* 0008 */ int unknown_0008; - /* 000C */ int unknown_000C; - /* 0010 */ std::string unknown_0010; - /* 0028 */ std::string unknown_0028; + /* 0004 */ int type; + /* 0008 */ int startOffset; + /* 000C */ int endOffset; + /* 0010 */ std::string label; + /* 0028 */ std::string data; virtual ~STagInfoV2(); }; diff --git a/Source/UI/Lists/UITreeView.cpp b/Source/UI/Lists/UITreeView.cpp index 21eb7f730..7dc4c328e 100644 --- a/Source/UI/Lists/UITreeView.cpp +++ b/Source/UI/Lists/UITreeView.cpp @@ -8,10 +8,10 @@ UITreeView::UITreeView() : UIWindow(0) { this->itemCount = 0; this->verticalBar = nullptr; this->verticalOverflow = 0; - this->unknown_00A8 = 0; - this->unknown_0088 = nullptr; - this->unknown_008C = nullptr; - this->unknown_0090 = nullptr; - this->unknown_00AC = 0; - this->unknown_00B0 = 0; + this->scrollRow = 0; + this->selectedNode = nullptr; + this->dragNode = nullptr; + this->dropNode = nullptr; + this->mouseInside = 0; + this->highlightColor = 0; } diff --git a/Source/UI/Lists/UITreeView.h b/Source/UI/Lists/UITreeView.h index 8ce3079aa..82277f6f6 100644 --- a/Source/UI/Lists/UITreeView.h +++ b/Source/UI/Lists/UITreeView.h @@ -21,7 +21,7 @@ struct UITreeNode { /* 016A */ unsigned char draggable; /* 016B */ unsigned char container; /* 016C */ unsigned char unknown_016C[0x4]; - /* 0170 */ UITreeNode* unknown_0170; + /* 0170 */ UITreeNode* parent; /* 0174 */ UITVBitmapButton* expandButton; /* 0178 */ UITVBitmapButton* collapseButton; /* 017C */ UITVTextButton* labelButton; @@ -57,18 +57,18 @@ protected: /* 007C */ UIScrollBar* verticalBar; /* 0080 */ int verticalOverflow; /* 0084 */ UITreeNode* root; - /* 0088 */ UITreeNode* unknown_0088; - /* 008C */ UITreeNode* unknown_008C; - /* 0090 */ UITreeNode* unknown_0090; + /* 0088 */ UITreeNode* selectedNode; + /* 008C */ UITreeNode* dragNode; + /* 0090 */ UITreeNode* dropNode; /* 0094 */ UITreeNode* editNode; /* 0098 */ UIEditCtrl2* edit; /* 009C */ int itemPadding; /* 00A0 */ int itemHeight; /* 00A4 */ int itemCount; - /* 00A8 */ int unknown_00A8; - /* 00AC */ unsigned char unknown_00AC; + /* 00A8 */ int scrollRow; + /* 00AC */ unsigned char mouseInside; - /* 00B0 */ int unknown_00B0; + /* 00B0 */ int highlightColor; }; #endif diff --git a/Source/UI/Menu/UIMenuIconWnd.cpp b/Source/UI/Menu/UIMenuIconWnd.cpp index 558d3cb31..a7e90ecb8 100644 --- a/Source/UI/Menu/UIMenuIconWnd.cpp +++ b/Source/UI/Menu/UIMenuIconWnd.cpp @@ -50,7 +50,7 @@ UIMenuIcon::UIMenuIcon() {} // OFFSET: 0x0084A240 // FUNCTION: fn_10607 UIMenuIconWnd::UIMenuIconWnd() - : UIFrameWnd(1), unknown_00CC(nullptr), unknown_00D0(nullptr), unknown_00D4(nullptr) {} + : UIFrameWnd(1), openButton(nullptr), notificationOpenButton(nullptr), closeButton(nullptr) {} // OFFSET: 0x0084A850 // FUNCTION: fn_10612 @@ -71,13 +71,13 @@ UIWindow* UIMenuIconWnd::HitTest(int x, int y) { } if (!g_session.m_showMenuIcon) { - if (x >= this->geometry.x + this->geometry.width || y < this->geometry.y || y >= this->geometry.y + this->unknown_00D0->geometry.height) { + if (x >= this->geometry.x + this->geometry.width || y < this->geometry.y || y >= this->geometry.y + this->notificationOpenButton->geometry.height) { return nullptr; } - if (this->unknown_00C4.size() == 0) { - return this->unknown_00CC; + if (this->notifiedCommands.size() == 0) { + return this->openButton; } - return this->unknown_00D0; + return this->notificationOpenButton; } if (x >= this->geometry.x + this->geometry.width || y < this->geometry.y || y >= this->geometry.y + this->geometry.height) { @@ -138,7 +138,7 @@ void UIMenuIconWnd::OnCreate(int width, int height) { icon->SetId(ids[index]); icon->Enable(0); this->AddChild(icon); - this->unknown_00B4[ids[index]] = icon; + this->menuButtons[ids[index]] = icon; switch (ids[index]) { case ID_STATUS: @@ -155,7 +155,7 @@ void UIMenuIconWnd::OnCreate(int width, int height) { badge->SetId(ids[index]); badge->Enable(0); this->AddChild(badge); - this->unknown_00BC[ids[index]] = badge; + this->notificationButtons[ids[index]] = badge; break; } } @@ -163,35 +163,35 @@ void UIMenuIconWnd::OnCreate(int width, int height) { ++position; } - this->unknown_00CC = new UIBitmapButton(); - this->unknown_00CC->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_normal.bmp", 0, 0); - this->unknown_00CC->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_over.bmp", 1, 0); - this->unknown_00CC->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_press.bmp", 2, 0); - this->unknown_00CC->SetSize(this->unknown_00CC->BitmapWidth(), this->unknown_00CC->BitmapHeight()); - this->unknown_00CC->Move(0, 4); - this->unknown_00CC->SetId(510); - this->unknown_00CC->Enable(0); - this->AddChild(this->unknown_00CC); - this->unknown_00D0 = new UIBitmapButton(); - this->unknown_00D0->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_normal.bmp", 0, 0); - this->unknown_00D0->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_over.bmp", 1, 0); - this->unknown_00D0->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_press.bmp", 2, 0); - this->unknown_00D0->SetSize(this->unknown_00D0->BitmapWidth(), this->unknown_00D0->BitmapHeight()); - this->unknown_00D0->Move(0, 0); - this->unknown_00D0->SetId(510); - this->unknown_00D0->Enable(0); - this->AddChild(this->unknown_00D0); - this->unknown_00D4 = new UIBitmapButton(); - this->unknown_00D4->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_normal.bmp", 0, 0); - this->unknown_00D4->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_over.bmp", 1, 0); - this->unknown_00D4->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_press.bmp", 2, 0); - this->unknown_00D4->SetSize(this->unknown_00D4->BitmapWidth(), this->unknown_00D4->BitmapHeight()); - this->unknown_00D4->Move(0, 4); - this->unknown_00D4->SetId(201); - this->unknown_00D4->Enable(0); - this->AddChild(this->unknown_00D4); + this->openButton = new UIBitmapButton(); + this->openButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_normal.bmp", 0, 0); + this->openButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_over.bmp", 1, 0); + this->openButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_press.bmp", 2, 0); + this->openButton->SetSize(this->openButton->BitmapWidth(), this->openButton->BitmapHeight()); + this->openButton->Move(0, 4); + this->openButton->SetId(510); + this->openButton->Enable(0); + this->AddChild(this->openButton); + this->notificationOpenButton = new UIBitmapButton(); + this->notificationOpenButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_normal.bmp", 0, 0); + this->notificationOpenButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_over.bmp", 1, 0); + this->notificationOpenButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_new_press.bmp", 2, 0); + this->notificationOpenButton->SetSize(this->notificationOpenButton->BitmapWidth(), this->notificationOpenButton->BitmapHeight()); + this->notificationOpenButton->Move(0, 0); + this->notificationOpenButton->SetId(510); + this->notificationOpenButton->Enable(0); + this->AddChild(this->notificationOpenButton); + this->closeButton = new UIBitmapButton(); + this->closeButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_normal.bmp", 0, 0); + this->closeButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_over.bmp", 1, 0); + this->closeButton->SetBitmap("유저인터페이스\\menu_icon\\bt_menu_close_press.bmp", 2, 0); + this->closeButton->SetSize(this->closeButton->BitmapWidth(), this->closeButton->BitmapHeight()); + this->closeButton->Move(0, 4); + this->closeButton->SetId(201); + this->closeButton->Enable(0); + this->AddChild(this->closeButton); this->SendMsg(this, UM_COMMAND, g_session.m_showMenuIcon == true ? 510 : 201, 0, 0, 0); - if (this->unknown_00B4.size() > 20) { + if (this->menuButtons.size() > 20) { this->Resize(220, 238); } } @@ -200,32 +200,32 @@ void UIMenuIconWnd::OnCreate(int width, int height) { // FUNCTION: fn_10617 void UIMenuIconWnd::Paint() { this->m_primitives.clear(); - this->unknown_00CC->Enable(0); - this->unknown_00D0->Enable(0); - this->unknown_00D4->Enable(0); + this->openButton->Enable(0); + this->notificationOpenButton->Enable(0); + this->closeButton->Enable(0); UIButton* toggle; if (g_session.m_showMenuIcon) { - toggle = this->unknown_00D4; - } else if (this->unknown_00C4.size() == 0) { - toggle = this->unknown_00CC; + toggle = this->closeButton; + } else if (this->notifiedCommands.size() == 0) { + toggle = this->openButton; } else { - toggle = this->unknown_00D0; + toggle = this->notificationOpenButton; } toggle->Enable(1); - for (auto it = this->unknown_00B4.begin(); it != this->unknown_00B4.end(); ++it) { + for (auto it = this->menuButtons.begin(); it != this->menuButtons.end(); ++it) { if (!g_session.m_showMenuIcon) { it->second->Enable(0); - if (this->unknown_00BC.find(it->first) != this->unknown_00BC.end()) { - this->unknown_00BC[it->first]->Enable(0); + if (this->notificationButtons.find(it->first) != this->notificationButtons.end()) { + this->notificationButtons[it->first]->Enable(0); } } else { this->DrawNamed(g_renderer->primitives, 0, 13, "유저인터페이스\\menu_icon\\bg_menu.tga", 0xFFFFFFFF, 0, 0); - const bool pinned = std::find(this->unknown_00C4.begin(), this->unknown_00C4.end(), it->first) != this->unknown_00C4.end(); + const bool pinned = std::find(this->notifiedCommands.begin(), this->notifiedCommands.end(), it->first) != this->notifiedCommands.end(); it->second->Enable(!pinned); - if (this->unknown_00BC.find(it->first) != this->unknown_00BC.end()) { - this->unknown_00BC[it->first]->Enable(pinned); + if (this->notificationButtons.find(it->first) != this->notificationButtons.end()) { + this->notificationButtons[it->first]->Enable(pinned); } } } @@ -373,13 +373,13 @@ int UIMenuIconWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument break; case ID_NOTICE: { const int id = argument2; - auto found = std::find(this->unknown_00C4.begin(), this->unknown_00C4.end(), id); + auto found = std::find(this->notifiedCommands.begin(), this->notifiedCommands.end(), id); if (argument3 > 0) { - if (found == this->unknown_00C4.end()) { - this->unknown_00C4.push_back(id); + if (found == this->notifiedCommands.end()) { + this->notifiedCommands.push_back(id); } - } else if (found != this->unknown_00C4.end()) { - this->unknown_00C4.erase(found); + } else if (found != this->notifiedCommands.end()) { + this->notifiedCommands.erase(found); } this->Invalidate(); break; diff --git a/Source/UI/Menu/UIMenuIconWnd.h b/Source/UI/Menu/UIMenuIconWnd.h index 7a4a975a2..50162d71b 100644 --- a/Source/UI/Menu/UIMenuIconWnd.h +++ b/Source/UI/Menu/UIMenuIconWnd.h @@ -18,12 +18,12 @@ class UIMenuIconWnd : public UIFrameWnd { public: UIMenuIconWnd(); - /* 00B4 */ std::map unknown_00B4; - /* 00BC */ std::map unknown_00BC; - /* 00C4 */ std::list unknown_00C4; - /* 00CC */ UIBitmapButton* unknown_00CC; - /* 00D0 */ UIBitmapButton* unknown_00D0; - /* 00D4 */ UIBitmapButton* unknown_00D4; + /* 00B4 */ std::map menuButtons; + /* 00BC */ std::map notificationButtons; + /* 00C4 */ std::list notifiedCommands; + /* 00CC */ UIBitmapButton* openButton; + /* 00D0 */ UIBitmapButton* notificationOpenButton; + /* 00D4 */ UIBitmapButton* closeButton; void Move(int x, int y) override; bool IsTransmitMouseInput() override; diff --git a/Source/UI/MiniPartyManager.cpp b/Source/UI/MiniPartyManager.cpp index 1f08df249..aee1bfffe 100644 --- a/Source/UI/MiniPartyManager.cpp +++ b/Source/UI/MiniPartyManager.cpp @@ -24,10 +24,10 @@ CMiniPartyWndAreaMgr* CMiniPartyWndAreaMgr::Instance() { // OFFSET: 0x00AA9ED0 // FUNCTION: fn_17263 void UIWindowMgr::SetScreenSize(int width, int height) { - this->unknown_047C = width; - this->unknown_0480 = height; - this->unknown_0030 = 0; - this->unknown_0034 = height - this->unknown_0038; + this->screenWidth = width; + this->screenHeight = height; + this->chatWndX = 0; + this->chatWndY = height - this->chatWndHeight; reinterpret_cast(CMiniPartyWndAreaMgr::Instance())->BuildAvailableCells(); } @@ -45,7 +45,7 @@ void UIWindowMgr::ArrangeMiniPartyWindows() { // OFFSET: 0x00AAAB20 // FUNCTION: fn_17270 void UIWindowMgr::RearrangeMiniPartyWindows() { - const int height = this->unknown_0480; + const int height = this->screenHeight; int top = static_cast(static_cast(height) * 0.3f); if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { top = window->geometry.height; @@ -54,7 +54,7 @@ void UIWindowMgr::RearrangeMiniPartyWindows() { RECT bounds; bounds.left = 0; bounds.top = top; - bounds.right = this->unknown_047C; + bounds.right = this->screenWidth; bounds.bottom = height - g_miniPartyCellHeight * 3; CMiniPartyWndSortArea area(bounds); const std::list cells = area.GetCells(); @@ -120,7 +120,7 @@ void UIWindowMgr::RebuildMiniPartyWindows() { } const SessionRecord0734 record = g_session.FindRecord0734(member.accountId); - if (record.unknown_0000 == 0) { + if (record.active == 0) { continue; } @@ -137,18 +137,18 @@ void UIWindowMgr::RebuildMiniPartyWindows() { UIMiniPartyWnd* window = new UIMiniPartyWnd(); window->SetSize(174, 52); - window->m_cell = record.unknown_0008; + window->m_cell = record.cell; this->AddMiniPartyWindow(window); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&member), 0, 0, 0); - g_session.AddRecord0734(record.id, record.unknown_0008); + g_session.AddRecord0734(record.id, record.cell); - UIWindow* drag = this->unknown_0210; + UIWindow* drag = this->menuWnd; if (drag != nullptr && *reinterpret_cast(reinterpret_cast(drag) + 0xB4) == 301 && - *reinterpret_cast(reinterpret_cast(drag) + 0xCC) == record.unknown_0008) { + *reinterpret_cast(reinterpret_cast(drag) + 0xCC) == record.cell) { const int x = drag->geometry.x; const int y = drag->geometry.y; window->SendMsg(nullptr, UM_MAKEMENU, 0, 0, 0, 0); - this->unknown_0210->Move(x, y); + this->menuWnd->Move(x, y); } } @@ -156,5 +156,5 @@ void UIWindowMgr::RebuildMiniPartyWindows() { this->Promote(this->window_4F250); } - this->Promote(this->unknown_0210); + this->Promote(this->menuWnd); } diff --git a/Source/UI/MiniPartyPlacement.cpp b/Source/UI/MiniPartyPlacement.cpp index d5faa50b0..e9fcfbfe6 100644 --- a/Source/UI/MiniPartyPlacement.cpp +++ b/Source/UI/MiniPartyPlacement.cpp @@ -7,7 +7,7 @@ // OFFSET: 0x00737680 // FUNCTION: fn_07650 __forceinline CMiniPartyWndSortArea::CMiniPartyWndSortArea(const RECT& bounds) { - SetRect(&this->area, 0, 0, g_windowMgr.unknown_047C, g_windowMgr.unknown_0480); + SetRect(&this->area, 0, 0, g_windowMgr.screenWidth, g_windowMgr.screenHeight); this->columns = (this->area.right - this->area.left) / g_miniPartyCellWidth; this->rows = (this->area.bottom - this->area.top) / g_miniPartyCellHeight; diff --git a/Source/UI/MiniPartyUsableArea.cpp b/Source/UI/MiniPartyUsableArea.cpp index b6672be67..989e6b6ed 100644 --- a/Source/UI/MiniPartyUsableArea.cpp +++ b/Source/UI/MiniPartyUsableArea.cpp @@ -6,14 +6,14 @@ // OFFSET: 0x00A918B0 // FUNCTION: fn_17166 RECT UIWindowMgr::GetMiniPartyUsableArea() { - const int height = this->unknown_0480; + const int height = this->screenHeight; int top = static_cast(height * 0.3f); if (UIWindow* window = g_windowMgr.LookupWindow(WID_MENUICONWND)) { top = window->geometry.height; } RECT area; - area.right = this->unknown_047C; + area.right = this->screenWidth; area.top = top; area.left = 0; area.bottom = height - g_miniPartyCellHeight * 3; diff --git a/Source/UI/Navigation/UINavigationV4Wnd.cpp b/Source/UI/Navigation/UINavigationV4Wnd.cpp index 6cf5ce281..62c608125 100644 --- a/Source/UI/Navigation/UINavigationV4Wnd.cpp +++ b/Source/UI/Navigation/UINavigationV4Wnd.cpp @@ -9,9 +9,9 @@ UINavigationRuideWnd::UINavigationRuideWnd() // OFFSET: 0x005C28C0 // FUNCTION: fn_03537 UINavigationV4Wnd::UINavigationV4Wnd() : UIFrameWnd(0) { - this->unknown_0118 = 0; - this->unknown_0100 = nullptr; - this->unknown_011C = 2000; + this->noticeUntil = 0; + this->moveButton = nullptr; + this->animationDuration = 2000; } // OFFSET: 0x005C2960 diff --git a/Source/UI/Navigation/UINavigationV4Wnd.h b/Source/UI/Navigation/UINavigationV4Wnd.h index 942af5248..4faa4de7c 100644 --- a/Source/UI/Navigation/UINavigationV4Wnd.h +++ b/Source/UI/Navigation/UINavigationV4Wnd.h @@ -48,31 +48,31 @@ public: void InsertNavigationLink(std::string name, int x, int y); void DrawTargetSprite(int x, int y, int width, int height, const CBitmapRes* background); - /* 00B4 */ UIWindow* unknown_00B4; - /* 00B8 */ UIWindow* unknown_00B8; - /* 00BC */ UIWindow* unknown_00BC; - /* 00C0 */ UIWindow* unknown_00C0; - /* 00C4 */ UIWindow* unknown_00C4; - /* 00C8 */ UIWindow* unknown_00C8; - /* 00CC */ UIWindow* unknown_00CC; - /* 00D0 */ UIWindow* unknown_00D0; - /* 00D4 */ UIWindow* unknown_00D4; - /* 00D8 */ UIWindow* unknown_00D8; - /* 00DC */ UIWindow* unknown_00DC; - /* 00E0 */ UIWindow* unknown_00E0; - /* 00E4 */ UIWindow* unknown_00E4; - /* 00E8 */ UIStaticText* unknown_00E8; - /* 00EC */ UIListBox_NaviSearch* unknown_00EC; - /* 00F0 */ UIListBox_NaviSearch* unknown_00F0; - /* 00F4 */ UIWindow* unknown_00F4; - /* 00F8 */ UIWindow* unknown_00F8; - /* 00FC */ UIWindow* unknown_00FC; - /* 0100 */ UIWindow* unknown_0100; - /* 0104 */ std::vector unknown_0104; + /* 00B4 */ UIWindow* closeButton; + /* 00B8 */ UIWindow* expandedCloseButton; + /* 00BC */ UIWindow* minimizeButton; + /* 00C0 */ UIWindow* helpButton; + /* 00C4 */ UIWindow* maximizeButton; + /* 00C8 */ UIWindow* roadIconButton; + /* 00CC */ UIWindow* dataButton; + /* 00D0 */ UIWindow* backButton; + /* 00D4 */ UIWindow* minimizeCheck; + /* 00D8 */ UIWindow* roadListButton; + /* 00DC */ UIWindow* searchType; + /* 00E0 */ UIWindow* searchEdit; + /* 00E4 */ UIWindow* searchButton; + /* 00E8 */ UIStaticText* summaryLabel; + /* 00EC */ UIListBox_NaviSearch* roadList; + /* 00F0 */ UIListBox_NaviSearch* searchList; + /* 00F4 */ UIWindow* filterCheck; + /* 00F8 */ UIWindow* shareButton; + /* 00FC */ UIWindow* findButton; + /* 0100 */ UIWindow* moveButton; + /* 0104 */ std::vector routeFiles; /* 0110 */ NavigationWindowInfo* info; /* 0114 */ int unknown_0114; - /* 0118 */ int unknown_0118; - /* 011C */ int unknown_011C; + /* 0118 */ int noticeUntil; + /* 011C */ int animationDuration; /* 0120 */ unsigned char unknown_0120[4]; }; diff --git a/Source/UI/Party/UIAdvenPartyBoardWnd.cpp b/Source/UI/Party/UIAdvenPartyBoardWnd.cpp index f2480dff9..25444150a 100644 --- a/Source/UI/Party/UIAdvenPartyBoardWnd.cpp +++ b/Source/UI/Party/UIAdvenPartyBoardWnd.cpp @@ -256,7 +256,7 @@ void UIAdvenPartyBoardWnd::LoadPage(int pageValue) { this->refresh->Invalidate(); g_adventurerAgencyMgr->RequestList(pageValue); - if (g_session.unknown_5464 == 1) { + if (g_session.partyLeader == 1) { g_adventurerAgencyMgr->RequestMyParty(); } } @@ -265,7 +265,7 @@ void UIAdvenPartyBoardWnd::LoadPage(int pageValue) { // FUNCTION: fn_09322 void UIAdvenPartyBoardWnd::Registration(bool value) { - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { this->recruit->SetTooltip(""); if (value) { @@ -369,7 +369,7 @@ void UIAdvenPartyBoardWnd::UpdatePagination() { this->previous->Invalidate(); this->Invalidate(); - if (g_session.unknown_5464 == 0) { + if (g_session.partyLeader == 0) { this->ownParty->SetState(3); } diff --git a/Source/UI/Party/UIMiniPartyWnd.cpp b/Source/UI/Party/UIMiniPartyWnd.cpp index 89b594633..0add039a2 100644 --- a/Source/UI/Party/UIMiniPartyWnd.cpp +++ b/Source/UI/Party/UIMiniPartyWnd.cpp @@ -178,12 +178,12 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg CRenderObject* actor; if (self) { actor = world->player; - current = g_session.unknown_5568; - maximum = g_session.unknown_556C; + current = g_session.hp; + maximum = g_session.maxHp; } else { actor = world->GetGameActorByAID(this->m_owner->GetMember().accountId); if (actor) { - UIPcGage* gauge = reinterpret_cast(static_cast(actor)->unknown_0490); + UIPcGage* gauge = reinterpret_cast(static_cast(actor)->gaugeWindow); if (gauge) { current = gauge->current; maximum = gauge->maximum; @@ -203,7 +203,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } case UM_MAKEMENU: this->m_entries.clear(); - if (g_windowMgr.unknown_0210) { + if (g_windowMgr.menuWnd) { g_windowMgr.CloseWindow(WID_MENUWND); } if (this->m_owner->GetMember().valid) { @@ -212,7 +212,7 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg this->m_entries.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_LEAVE_PARTY)).c_str(), 9)); } else { this->m_entries.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_OPEN_1ON1_WINDOW)).c_str(), 7)); - if (g_session.unknown_5464) { + if (g_session.partyLeader) { this->m_entries.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_EXPEL)).c_str(), 0)); this->m_entries.push_back(MiniPartyInfoEntry(std::string(LookupMessage(MSI_YIELD_PARTYMASTER)).c_str(), 43)); } @@ -340,14 +340,14 @@ int UIMiniPartyInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg break; case ID_PARTY_SETTING: if (!g_session.m_lockMouse) { - if (g_windowMgr.unknown_042C) { + if (g_windowMgr.partyInvitationToWnd) { g_windowMgr.CloseWindow(WID_PARTYINVITATIONTOWND); } if (!g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT) && g_session.PartyCount()) { g_windowMgr.EnsureWindow(WID_PARTYSETTINGWND_PARTYCOUNT); } g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); - UIWindow* window = reinterpret_cast(g_windowMgr.unknown_030C); + UIWindow* window = reinterpret_cast(g_windowMgr.partySettingWnd); if (window) { int x = 0; int y = 0; @@ -537,7 +537,7 @@ void UIMiniPartyInfoWnd::Paint() { if (this->m_owner->GetMember().dead == 1) { dead = 1; } else if (g_session.m_aid == this->m_owner->GetMember().accountId) { - dead = static_cast(g_modeMgr.GetGameMode())->unknown_0250 == 1; + dead = static_cast(g_modeMgr.GetGameMode())->isPlayerDead == 1; } const int leader = this->m_owner->GetMember().leader; diff --git a/Source/UI/Party/UIPartyInfoWnd.cpp b/Source/UI/Party/UIPartyInfoWnd.cpp index e753894bd..716031bd1 100644 --- a/Source/UI/Party/UIPartyInfoWnd.cpp +++ b/Source/UI/Party/UIPartyInfoWnd.cpp @@ -79,7 +79,7 @@ void UIPartyInfoWnd::Paint() { CBitmapRes* background = nullptr; - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: background = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_names[0].c_str()))); break; diff --git a/Source/UI/Party/UIRegisterPartyWnd.cpp b/Source/UI/Party/UIRegisterPartyWnd.cpp index 33dd4f61e..75cf96497 100644 --- a/Source/UI/Party/UIRegisterPartyWnd.cpp +++ b/Source/UI/Party/UIRegisterPartyWnd.cpp @@ -279,7 +279,7 @@ int UIRegisterPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, break; case 564: case 565: - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { if (g_forbiddenWords.Contains(this->memo->Text()) == true) { char text[256] = {}; StringFormat(text, sizeof(text), _TRUNCATE, LookupMessage(MSI_STOP_RECRUITING_PARTY)); diff --git a/Source/UI/Party/UIRequestJoinPartyWnd.cpp b/Source/UI/Party/UIRequestJoinPartyWnd.cpp index 01190b64b..0f29ef3ee 100644 --- a/Source/UI/Party/UIRequestJoinPartyWnd.cpp +++ b/Source/UI/Party/UIRequestJoinPartyWnd.cpp @@ -111,7 +111,7 @@ int UIRequestJoinPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t this->block->SetChecked(0); break; case 542: - if (this->block->geometry.unknown_0030 != 0) { + if (this->block->geometry.state != 0) { g_requestJoinPartyMgr->Block(this->accountId); } diff --git a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp index 1b80e59e0..2a9a844d4 100644 --- a/Source/UI/ProbabilityTable/UIProbabilityTable.cpp +++ b/Source/UI/ProbabilityTable/UIProbabilityTable.cpp @@ -101,7 +101,7 @@ void ProbabilityTableFreezeCallback::operator()(CUIListItem* const& item) { void ProbabilityTableSelectCallback::operator()(CUIListItem* const& item) { CUIListBoxEx* list = this->list; CUIListItem* selectedItem = item; - if (!list->unknown_00C4) { + if (!list->layoutFlag) { for (ProbabilityTable::CUIItem* row : list->items) { if (selectedItem != row) { row->SetSelected(false); @@ -109,7 +109,7 @@ void ProbabilityTableSelectCallback::operator()(CUIListItem* const& item) { } selectedItem->SetSelected(true); - if (selectedItem->index != static_cast(list->selected) || !list->unknown_00E0) { + if (selectedItem->index != static_cast(list->selected) || !list->selectionFlag) { ProbabilityTable::CUIItem* probabilityItem = dynamic_cast(selectedItem); if (probabilityItem) { const int selectedIndex = probabilityItem->index; @@ -164,8 +164,8 @@ bool UnusedTrueA47F10() { // FUNCTION: fn_16108 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A48160 @@ -203,7 +203,7 @@ void CUIListBoxEx::Clear // OFFSET: 0x00A487D0 // FUNCTION: fn_16116 void CUIProbabilityTable::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->Resize(345, 455); this->Move(0, 0); this->OnCreate(this->geometry.width, this->geometry.height); @@ -420,7 +420,7 @@ void CUIListBoxEx::OnScr // FUNCTION: fn_16126 template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (ProbabilityTable::CUIItem* other : this->items) { @@ -429,7 +429,7 @@ void CUIListBoxEx::Selec } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } ProbabilityTable::CUIItem* selectedItem = dynamic_cast(item); @@ -453,7 +453,7 @@ void CUIListBoxEx::Selec // OFFSET: 0x00A4D6A0 // FUNCTION: fn_16191 CUIProbabilityTable::CUIProbabilityTable() - : m_titleBar(nullptr), m_nameHeader(nullptr), m_searchEdit(nullptr), unknown_00E4{}, m_itemName(nullptr), m_probabilityHeader(nullptr), m_list(nullptr), + : m_titleBar(nullptr), m_nameHeader(nullptr), m_searchEdit(nullptr), m_searchButtonStorage{}, m_itemName(nullptr), m_probabilityHeader(nullptr), m_list(nullptr), m_itemId(0) { } diff --git a/Source/UI/ProbabilityTable/UIProbabilityTable.h b/Source/UI/ProbabilityTable/UIProbabilityTable.h index 0ffa0c994..91cfb2cd1 100644 --- a/Source/UI/ProbabilityTable/UIProbabilityTable.h +++ b/Source/UI/ProbabilityTable/UIProbabilityTable.h @@ -58,7 +58,7 @@ public: /* 00DC */ CUIStaticText* m_nameHeader; /* 00E0 */ CUIEditBoxEx* m_searchEdit; union { - /* 00E4 */ unsigned char unknown_00E4[0x04]; + /* 00E4 */ unsigned char m_searchButtonStorage[0x04]; /* 00E4 */ CUIImageButton* m_searchButton; }; /* 00E8 */ CUIStaticText* m_itemName; diff --git a/Source/UI/Quest/UIOngoingQuestInfo.cpp b/Source/UI/Quest/UIOngoingQuestInfo.cpp index 750ee352f..07debf6ce 100644 --- a/Source/UI/Quest/UIOngoingQuestInfo.cpp +++ b/Source/UI/Quest/UIOngoingQuestInfo.cpp @@ -53,8 +53,8 @@ __declspec(noinline) CUIListBoxEx CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A4F7F0 @@ -92,7 +92,7 @@ void CUIListBoxExunknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(342, 412); this->Move(0, 0); @@ -344,7 +344,7 @@ void CUIRewards::OnInit() { this->firstLabel->SetText(LookupMessage(MSI_RENEW_QUEST_CHECK_TOOTIP1_ITEM)); this->secondLabel->SetText(LookupMessage(MSI_RENEW_QUEST_CHECK_TOOTIP2_ITEM)); this->thirdLabel->SetText(LookupMessage(MSI_RENEW_QUEST_CHECK_TOOTIP3_ITEM)); - this->rewardList->unknown_00C4 = 1; + this->rewardList->layoutFlag = 1; this->rewardList->Invalidate(); this->npcSprite = new UINpcSprWnd(); this->npcSprite->SetSize(75, 145); @@ -409,20 +409,20 @@ void CUIScrollWindow::SetQuest(unsigned int id) { for (int index = 0; index < quest.m_huntCount; ++index) { this->secondContents->textViewer->AddLine(quest.GetHuntText(index)); } - this->rewards->firstText->SetText(quest.unknown_01B8); - this->rewards->secondText->SetText(quest.unknown_01D0); + this->rewards->firstText->SetText(quest.baseExpReward); + this->rewards->secondText->SetText(quest.jobExpReward); for (const auto& reward : quest.m_rewards) { this->rewards->rewardList->AddData(CRewardItemData{static_cast(reward.first), static_cast(reward.second)}, false); } this->rewards->rewardList->UpdateScrollBar(); CUIRewards* rewards = this->rewards; - if (quest.unknown_007C.empty()) { + if (quest.npcSprite.empty()) { rewards->npcSprite->Show(0); } else { - rewards->npcSprite->SetSprite(75, 145, quest.unknown_007C); - if (!quest.unknown_0094.empty()) { - rewards->npcSprite->SetDestination(quest.unknown_0094, quest.unknown_00AC, quest.unknown_00B0); + rewards->npcSprite->SetSprite(75, 145, quest.npcSprite); + if (!quest.destinationMap.empty()) { + rewards->npcSprite->SetDestination(quest.destinationMap, quest.destinationX, quest.destinationY); } rewards->npcSprite->Move(rewards->geometry.width - rewards->npcSprite->geometry.width - 23, 9); rewards->npcSprite->Show(1); @@ -595,8 +595,8 @@ void CUIRewardItem::OnCreate(int width, int height) { this->gameItem = new CUIGameItem(); this->gameItem->SetMode(0); this->gameItem->Move(7, 7); - this->gameItem->unknown_0084 = 1; - this->gameItem->unknown_0085 = 1; + this->gameItem->showNameTooltip = 1; + this->gameItem->allowItemInfo = 1; this->AddChild(this->gameItem); this->nameText = new CUIStaticText(); @@ -709,7 +709,7 @@ CUIScrollWindow::CUIScrollWindow() // INLINED template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (OngoingQuestInfo::CUIRewardItem* other : this->items) { @@ -718,7 +718,7 @@ void CUIListBoxExSetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } OngoingQuestInfo::CUIRewardItem* selectedItem = dynamic_cast(item); diff --git a/Source/UI/Quest/UIQuestDisplay.cpp b/Source/UI/Quest/UIQuestDisplay.cpp index 4b91e98fe..cb0cb3b36 100644 --- a/Source/UI/Quest/UIQuestDisplay.cpp +++ b/Source/UI/Quest/UIQuestDisplay.cpp @@ -60,12 +60,12 @@ void UIQuestDisplay::Paint() { const int top = single * 50 + (none + multiple * 2) * 40; std::string title = info.m_title.size() == 0 ? FormatOwnedString("Unknown Quest, ID = %d", questId) : info.m_title; - if (questId == this->unknown_007C) { + if (questId == this->selectedQuestId) { this->FillRegion(-12, top - 2, this->geometry.width - 10, 40, 0); } this->DrawShadowedText(0, top, title.c_str(), 0, 0xD6E1, 0, 0, 12, 0); - std::string description = info.m_descriptions.empty() ? std::string() : info.unknown_004C; + std::string description = info.m_descriptions.empty() ? std::string() : info.summary; description = StripColorCodes(description.c_str(), description.size()); description = static_cast(DisplayUrlTextTag(description)); description = static_cast(DisplayNavigationTextTag(description)); @@ -248,7 +248,7 @@ int UIQuestDisplay::SendMsg(UIWindow* sender, int message, std::intptr_t argumen } case UM_MAKEMENU: { this->m_menuItems.clear(); - if (g_windowMgr.unknown_0210 != 0) { + if (g_windowMgr.menuWnd != 0) { this->Show(0); } if (this->m_selectedIndex != -1) { diff --git a/Source/UI/Quest/UIQuestDisplay.h b/Source/UI/Quest/UIQuestDisplay.h index 5c1f4d3ff..d9c0608e6 100644 --- a/Source/UI/Quest/UIQuestDisplay.h +++ b/Source/UI/Quest/UIQuestDisplay.h @@ -19,7 +19,7 @@ public: void Create(int width, int height); protected: - /* 007C */ unsigned int unknown_007C; + /* 007C */ unsigned int selectedQuestId; /* 0080 */ int m_selectedIndex; /* 0084 */ std::vector m_menuItems; /* 0090 */ int* m_visibleSetting; diff --git a/Source/UI/Quest/UIRecommendedQuestInfo.cpp b/Source/UI/Quest/UIRecommendedQuestInfo.cpp index e4e079a62..1a242c3e0 100644 --- a/Source/UI/Quest/UIRecommendedQuestInfo.cpp +++ b/Source/UI/Quest/UIRecommendedQuestInfo.cpp @@ -17,7 +17,7 @@ // OFFSET: 0x00A568E0 // FUNCTION: fn_16321 void CUIRecommendedQuestInfo::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(342, 412); this->Move(0, 0); @@ -283,7 +283,7 @@ void CUIScrollWindow::SetQuest(unsigned int questId) { const auto found = g_renewQuestMgr->m_recommendedQuests.find(questId); if (found != g_renewQuestMgr->m_recommendedQuests.end()) { const RenewQuestRecommendedInfo& quest = found->second; - this->background->SetImage("유저인터페이스\\renew_questui\\" + quest.unknown_00B4); + this->background->SetImage("유저인터페이스\\renew_questui\\" + quest.backgroundImage); for (std::size_t i = 0; i < std::min(this->questInfos.size(), 3); ++i) { for (std::string line : quest.m_descriptions[i]) { @@ -291,12 +291,12 @@ void CUIScrollWindow::SetQuest(unsigned int questId) { } } - if (quest.unknown_007C.size() == 0) { + if (quest.npcSprite.size() == 0) { this->npcSprite->Show(0); } else { - this->npcSprite->SetSprite(75, 145, quest.unknown_007C); - if (quest.unknown_0094.size() != 0) { - this->npcSprite->SetDestination(quest.unknown_0094, quest.unknown_00AC, quest.unknown_00B0); + this->npcSprite->SetSprite(75, 145, quest.npcSprite); + if (quest.destinationMap.size() != 0) { + this->npcSprite->SetDestination(quest.destinationMap, quest.destinationX, quest.destinationY); } this->npcSprite->Move(this->geometry.width - this->npcSprite->geometry.width - 40, this->geometry.height - this->npcSprite->geometry.height - 10); this->npcSprite->Show(1); diff --git a/Source/UI/Quest/UIRenewQuestUI.cpp b/Source/UI/Quest/UIRenewQuestUI.cpp index c3079f333..7161d80e4 100644 --- a/Source/UI/Quest/UIRenewQuestUI.cpp +++ b/Source/UI/Quest/UIRenewQuestUI.cpp @@ -750,7 +750,7 @@ void CUIListBoxEx::OnScroll(int posit // FUNCTION: fn_16445 template <> __declspec(noinline) void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (RenewQuestUI::CUIQuestItem* other : this->items) { @@ -759,7 +759,7 @@ __declspec(noinline) void CUIListBoxExSetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } RenewQuestUI::CUIQuestItem* selectedItem = dynamic_cast(item); @@ -804,7 +804,7 @@ void CQuestItemSelector::SetHighlighted(CUIListItem* const& item) { void CQuestItemSelector::Select(CUIListItem* const& item) { CUIListBoxEx* listBox = this->listBox; CUIListItem* selection = item; - if (listBox->unknown_00C4) { + if (listBox->layoutFlag) { return; } for (RenewQuestUI::CUIQuestItem* other : listBox->items) { @@ -813,7 +813,7 @@ void CQuestItemSelector::Select(CUIListItem* const& item) { } } selection->SetSelected(1); - if (selection->index == static_cast(listBox->selected) && listBox->unknown_00E0) { + if (selection->index == static_cast(listBox->selected) && listBox->selectionFlag) { return; } RenewQuestUI::CUIQuestItem* selectedItem = dynamic_cast(selection); @@ -902,7 +902,7 @@ void RenewQuestUI::CUIQuestItem::OnSimpleView(bool simpleView) { // OFFSET: 0x00A66C70 // FUNCTION: fn_16622 void RenewQuestUI::CUIQuestItem::OnInit() { - CUIButton* button = this->unknown_00F4; + CUIButton* button = this->simpleViewCheckBox; std::string tooltip = LookupMessage(MSI_PASSWORD); button->tooltip = tooltip; } @@ -910,13 +910,13 @@ void RenewQuestUI::CUIQuestItem::OnInit() { // OFFSET: 0x00A66D90 // FUNCTION: fn_16623 void RenewQuestUI::CUIQuestList::OnInit() { - this->list->unknown_00E0 = 0; + this->list->selectionFlag = 0; } // OFFSET: 0x00A5C200 // FUNCTION: fn_16432 void CUIRenewQuestUI::Initialize() { - this->unknown_00B4 = 1; + this->ownedSkinColors = 1; this->m_resolveSkin = true; this->Resize(381, 466); this->Move( @@ -964,7 +964,7 @@ bool CUIRenewQuestUI::MatchesFilter(const RenewQuestInfo& info) const { } if (!this->searchText.empty()) { - if (FindSubstring(info.unknown_004C.c_str(), static_cast(info.unknown_004C.size()), this->searchText.c_str()) == -1 && + if (FindSubstring(info.summary.c_str(), static_cast(info.summary.size()), this->searchText.c_str()) == -1 && FindSubstring(info.m_title.c_str(), static_cast(info.m_title.size()), this->searchText.c_str()) == -1) { return false; } @@ -1058,8 +1058,8 @@ bool sub_A59960() { // FUNCTION: fn_16366 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A59C80 @@ -1078,7 +1078,7 @@ CUIEditBoxEx::CUIEditBoxEx() // OFFSET: 0x00A67CA0 // FUNCTION: fn_16630 void RenewQuestUI::CUIQuestItem::SetSelected(bool selected) { - this->unknown_00EC->SetColor(selected ? 0x00E47B2E : 0x00955322); + this->titleText->SetColor(selected ? 0x00E47B2E : 0x00955322); CUIListItem::SetSelected(selected); } @@ -1167,14 +1167,14 @@ void RenewQuestUI::CUIQuestList::BindItem(CUIQuestItem* item, const unsigned lon const RenewQuestRecommendedInfo& info = found->second; item->icon->SetImage(std::format("유저인터페이스\\renew_questui\\{}", info.m_icon.empty() ? std::string("ico_nq.bmp") : info.m_icon)); item->icon->tooltip = info.m_iconTooltip; - item->unknown_00EC->SetText(info.m_title); - item->unknown_00F0->SetText(info.unknown_004C); - item->unknown_00F4->Show(0); - item->unknown_00F8->Show(1); - item->unknown_00F8->checked = info.m_active; - item->unknown_00F8->Invalidate(); + item->titleText->SetText(info.m_title); + item->descriptionText->SetText(info.summary); + item->simpleViewCheckBox->Show(0); + item->activeCheckBox->Show(1); + item->activeCheckBox->checked = info.m_active; + item->activeCheckBox->Invalidate(); std::string tooltip = LookupMessage(MSI_SAVE_ID); - item->unknown_00F8->tooltip = tooltip; + item->activeCheckBox->tooltip = tooltip; } else { auto found = g_renewQuestMgr->m_ongoingQuests.find(questId); if (found == g_renewQuestMgr->m_ongoingQuests.end()) { @@ -1184,16 +1184,16 @@ void RenewQuestUI::CUIQuestList::BindItem(CUIQuestItem* item, const unsigned lon const RenewQuestOngoingInfo& info = found->second; item->icon->SetImage(std::format("유저인터페이스\\renew_questui\\{}", info.m_icon.empty() ? std::string("ico_nq.bmp") : info.m_icon)); item->icon->tooltip = info.m_iconTooltip; - item->unknown_00EC->SetText(info.m_title); - item->unknown_00F0->SetText(info.unknown_004C); - item->unknown_00F4->Show(this->type != 8); - item->unknown_00F4->checked = info.m_simpleView; - item->unknown_00F4->Invalidate(); - item->unknown_00F8->Show(this->type != 8); - item->unknown_00F8->checked = info.m_active; - item->unknown_00F8->Invalidate(); + item->titleText->SetText(info.m_title); + item->descriptionText->SetText(info.summary); + item->simpleViewCheckBox->Show(this->type != 8); + item->simpleViewCheckBox->checked = info.m_simpleView; + item->simpleViewCheckBox->Invalidate(); + item->activeCheckBox->Show(this->type != 8); + item->activeCheckBox->checked = info.m_active; + item->activeCheckBox->Invalidate(); std::string tooltip = LookupMessage(MSI_OTP_INPUT_TIME); - item->unknown_00F8->tooltip = tooltip; + item->activeCheckBox->tooltip = tooltip; } } @@ -1210,7 +1210,7 @@ void CUIRenewQuestUI::UpdateQuestLists(unsigned int flags) { const int position = listBox->data.size() == 0 ? -1 : listBox->scrollBar->position; listBox->ClearData(); for (std::pair entry : g_renewQuestMgr->m_ongoingQuests) { - if (this->MatchesFilter(entry.second) && entry.second.unknown_01F8 != 1 && entry.second.m_state != 0) { + if (this->MatchesFilter(entry.second) && entry.second.questType != 1 && entry.second.m_state != 0) { listBox->AddData(entry.first, false); } } @@ -1270,7 +1270,7 @@ void CUIRenewQuestUI::UpdateQuestLists(unsigned int flags) { if (!this->MatchesFilter(entry.second)) { continue; } - if (entry.second.unknown_01F8 != 1 && entry.second.m_state == 0) { + if (entry.second.questType != 1 && entry.second.m_state == 0) { listBox->AddData(entry.first, false); } } @@ -1296,7 +1296,7 @@ void CUIRenewQuestUI::UpdateQuestLists(unsigned int flags) { if (!this->MatchesFilter(entry.second)) { continue; } - if (entry.second.unknown_01F8 == 1) { + if (entry.second.questType == 1) { listBox->AddData(entry.first, false); } } @@ -1333,41 +1333,41 @@ void RenewQuestUI::CUIQuestItem::OnCreate(int width, int height) { this->icon->SetImage(std::string("")); this->AddChild(this->icon); - this->unknown_00EC = new CUIStaticText(); - this->unknown_00EC->SetSize(260, 12); - this->unknown_00EC->Move(42, 6); - this->unknown_00EC->SetText(""); - this->unknown_00EC->SetFitText(1); - this->unknown_00EC->SetAlign(0, 0); - this->unknown_00EC->SetFont(std::string(DecryptName<0xAD075B8DB599F1CDULL>({'\x8A', '\x84', '\xF5', '\xDC', '\xE0', '\x5B'}))); - this->unknown_00EC->SetFontHeight(12); - this->unknown_00EC->SetBold(1); - this->unknown_00EC->SetColor(0x955322); - this->unknown_00EC->SetShadow(0, 0xFFFFFF); - this->unknown_00EC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00EC); + this->titleText = new CUIStaticText(); + this->titleText->SetSize(260, 12); + this->titleText->Move(42, 6); + this->titleText->SetText(""); + this->titleText->SetFitText(1); + this->titleText->SetAlign(0, 0); + this->titleText->SetFont(std::string(DecryptName<0xAD075B8DB599F1CDULL>({'\x8A', '\x84', '\xF5', '\xDC', '\xE0', '\x5B'}))); + this->titleText->SetFontHeight(12); + this->titleText->SetBold(1); + this->titleText->SetColor(0x955322); + this->titleText->SetShadow(0, 0xFFFFFF); + this->titleText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->titleText); - this->unknown_00F0 = new CUIStaticText(); - this->unknown_00F0->SetSize(260, 12); - this->unknown_00F0->Move(42, 24); - this->unknown_00F0->SetText(""); - this->unknown_00F0->SetFitText(1); - this->unknown_00F0->SetAlign(0, 0); - this->unknown_00F0->SetFont(std::string(DecryptName<0xDD3913D5D7F97BE1ULL>({'\xA6', '\x0E', '\x95', '\xBE', '\xB8', '\x13'}))); - this->unknown_00F0->SetFontHeight(12); - this->unknown_00F0->SetBold(0); - this->unknown_00F0->SetColor(0x38302E); - this->unknown_00F0->SetShadow(0, 0xFFFFFF); - this->unknown_00F0->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00F0); + this->descriptionText = new CUIStaticText(); + this->descriptionText->SetSize(260, 12); + this->descriptionText->Move(42, 24); + this->descriptionText->SetText(""); + this->descriptionText->SetFitText(1); + this->descriptionText->SetAlign(0, 0); + this->descriptionText->SetFont(std::string(DecryptName<0xDD3913D5D7F97BE1ULL>({'\xA6', '\x0E', '\x95', '\xBE', '\xB8', '\x13'}))); + this->descriptionText->SetFontHeight(12); + this->descriptionText->SetBold(0); + this->descriptionText->SetColor(0x38302E); + this->descriptionText->SetShadow(0, 0xFFFFFF); + this->descriptionText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->descriptionText); - this->unknown_00F4 = new CUICheckBox(); - this->unknown_00F4->SetSize(14, 14); - this->unknown_00F4->Move(312, 3); - this->unknown_00F4->SetOnCheck([this](bool checked) { this->OnSimpleView(checked); }); - this->unknown_00F4->disabled = 0; - this->unknown_00F4->Invalidate(); - this->unknown_00F4->SetImages( + this->simpleViewCheckBox = new CUICheckBox(); + this->simpleViewCheckBox->SetSize(14, 14); + this->simpleViewCheckBox->Move(312, 3); + this->simpleViewCheckBox->SetOnCheck([this](bool checked) { this->OnSimpleView(checked); }); + this->simpleViewCheckBox->disabled = 0; + this->simpleViewCheckBox->Invalidate(); + this->simpleViewCheckBox->SetImages( std::string(DecryptName<0x050505679903579BULL>({ '\x5B', '\xF8', '\xC3', '\x63', '\xA7', '\xCB', '\xC0', '\xC8', '\x5D', '\xB3', '\xC3', '\x55', '\xDA', '\xBF', '\x59', '\x57', '\xFE', '\x39', '\x66', '\xEE', '\x38', '\x54', '\x70', '\x60', '\xE8', '\x23', '\x56', '\xD0', '\x3B', '\x67', '\x71', '\x5A', @@ -1389,17 +1389,17 @@ void RenewQuestUI::CUIQuestItem::OnCreate(int width, int height) { '\x6A', '\x4F', '\x4A', '\xD8', '\xD6', '\x02', '\x12', '\xBF', '\x6F', '\x09', '\x4D', '\xD6', '\xCD', '\x5D' })) ); - this->unknown_00F4->checked = false; - this->unknown_00F4->Invalidate(); - this->AddChild(this->unknown_00F4); + this->simpleViewCheckBox->checked = false; + this->simpleViewCheckBox->Invalidate(); + this->AddChild(this->simpleViewCheckBox); - this->unknown_00F8 = new CUICheckBox(); - this->unknown_00F8->SetSize(20, 17); - this->unknown_00F8->Move(306, 22); - this->unknown_00F8->SetOnCheck([this](bool checked) { this->OnActiveStateChanged(checked); }); - this->unknown_00F8->disabled = 0; - this->unknown_00F8->Invalidate(); - this->unknown_00F8->SetImages( + this->activeCheckBox = new CUICheckBox(); + this->activeCheckBox->SetSize(20, 17); + this->activeCheckBox->Move(306, 22); + this->activeCheckBox->SetOnCheck([this](bool checked) { this->OnActiveStateChanged(checked); }); + this->activeCheckBox->disabled = 0; + this->activeCheckBox->Invalidate(); + this->activeCheckBox->SetImages( std::string(DecryptName<0xED796785D1DF137FULL>({ '\xBF', '\xBC', '\x1F', '\x2B', '\x45', '\xA9', '\xBC', '\x20', '\xB9', '\xF7', '\x1F', '\x1D', '\x38', '\xDD', '\x25', '\xBF', '\x1A', '\x7D', '\xBA', '\xA6', '\xDA', '\x36', '\x0C', '\x88', '\x0C', '\x67', '\x8A', '\x98', '\xD9', '\x05', '\x0D', '\xB2', @@ -1421,9 +1421,9 @@ void RenewQuestUI::CUIQuestItem::OnCreate(int width, int height) { '\x0B', '\xC4', '\xF2', '\xCE', '\x8F', '\x5D', '\x8E', '\x63', '\x67' })) ); - this->unknown_00F8->checked = false; - this->unknown_00F8->Invalidate(); - this->AddChild(this->unknown_00F8); + this->activeCheckBox->checked = false; + this->activeCheckBox->Invalidate(); + this->AddChild(this->activeCheckBox); } // OFFSET: 0x00A5D850 @@ -2138,7 +2138,7 @@ void CUIListBoxEx::Resize(int width, // OFFSET: 0x00A659B0 // FUNCTION: fn_16597 RenewQuestUI::CUIQuestItem::CUIQuestItem() - : CUIListItem(), icon(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), unknown_00F4(nullptr), unknown_00F8(nullptr), questType(1), + : CUIListItem(), icon(nullptr), titleText(nullptr), descriptionText(nullptr), simpleViewCheckBox(nullptr), activeCheckBox(nullptr), questType(1), questId(0), pressed(0), baseX(0), baseY(0) { } diff --git a/Source/UI/Quest/UIRenewQuestUI.h b/Source/UI/Quest/UIRenewQuestUI.h index abeb64567..0cc96846d 100644 --- a/Source/UI/Quest/UIRenewQuestUI.h +++ b/Source/UI/Quest/UIRenewQuestUI.h @@ -33,10 +33,10 @@ public: void OnSimpleView(bool simpleView); /* 00E8 */ CUIStaticImage* icon; - /* 00EC */ CUIStaticText* unknown_00EC; - /* 00F0 */ CUIStaticText* unknown_00F0; - /* 00F4 */ CUICheckBox* unknown_00F4; - /* 00F8 */ CUICheckBox* unknown_00F8; + /* 00EC */ CUIStaticText* titleText; + /* 00F0 */ CUIStaticText* descriptionText; + /* 00F4 */ CUICheckBox* simpleViewCheckBox; + /* 00F8 */ CUICheckBox* activeCheckBox; /* 00FC */ int questType; /* 0100 */ int questId; /* 0104 */ unsigned char pressed; diff --git a/Source/UI/Quest/UIRenewQuestWnd.cpp b/Source/UI/Quest/UIRenewQuestWnd.cpp index 17f82fc95..2f0ba6c88 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.cpp +++ b/Source/UI/Quest/UIRenewQuestWnd.cpp @@ -116,7 +116,7 @@ void UINpcSprWnd::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } if (image->width != this->geometry.width || image->height != this->geometry.height) { @@ -349,12 +349,12 @@ void UIOngoingQuestScrollWnd::SetQuest(unsigned int questId) { this->AddScrollChild(bitmap); y += bitmap->geometry.height + 8; - if (!quest.unknown_007C.empty()) { + if (!quest.npcSprite.empty()) { UINpcSprWnd* npc = new UINpcSprWnd(); - npc->SetSprite(75, 145, quest.unknown_007C); + npc->SetSprite(75, 145, quest.npcSprite); npc->Move(this->geometry.width - npc->geometry.width - 30, y); - if (!quest.unknown_0094.empty()) { - npc->SetDestination(quest.unknown_0094, quest.unknown_00AC, quest.unknown_00B0); + if (!quest.destinationMap.empty()) { + npc->SetDestination(quest.destinationMap, quest.destinationX, quest.destinationY); } this->AddScrollChild(npc); } @@ -381,9 +381,9 @@ void UIOngoingQuestScrollWnd::SetQuest(unsigned int questId) { this->AddScrollChild(label); label = new UIStaticText(); - size = context.Measure(quest.unknown_01B8.c_str(), static_cast(quest.unknown_01B8.size())); + size = context.Measure(quest.baseExpReward.c_str(), static_cast(quest.baseExpReward.size())); label->SetSize(size.cx + 4, 12); - label->SetText(quest.unknown_01B8.c_str(), 0); + label->SetText(quest.baseExpReward.c_str(), 0); label->SetColor(29, 85, 160); label->Move(109, y); this->AddScrollChild(label); @@ -397,9 +397,9 @@ void UIOngoingQuestScrollWnd::SetQuest(unsigned int questId) { this->AddScrollChild(label); label = new UIStaticText(); - size = context.Measure(quest.unknown_01D0.c_str(), static_cast(quest.unknown_01D0.size())); + size = context.Measure(quest.jobExpReward.c_str(), static_cast(quest.jobExpReward.size())); label->SetSize(size.cx + 4, 12); - label->SetText(quest.unknown_01D0.c_str(), 0); + label->SetText(quest.jobExpReward.c_str(), 0); label->SetColor(29, 85, 160); label->Move(109, y); this->AddScrollChild(label); @@ -462,7 +462,7 @@ void UIOngoingQuestScrollWnd::SetQuest(unsigned int questId) { // OFFSET: 0x007FAF70 // FUNCTION: fn_09949 UIRecommededQuestScrollWnd::UIRecommededQuestScrollWnd(int width, int height) - : UIScrollWnd(width, height, 0), unknown_00B0(0), unknown_00B4(14) { + : UIScrollWnd(width, height, 0), m_questId(0), unknown_00B4(14) { this->OnCreate(width, height); } @@ -515,7 +515,7 @@ void UIRecommededQuestScrollWnd::SetQuest(unsigned int questId) { this->Clear(); this->horizontalBar = nullptr; this->scrollBar = nullptr; - this->unknown_00B0 = questId; + this->m_questId = questId; UITagTextViewer* viewers[3]; viewers[0] = new UITagTextViewer(); @@ -549,12 +549,12 @@ void UIRecommededQuestScrollWnd::SetQuest(unsigned int questId) { } } - if (!quest.unknown_007C.empty()) { + if (!quest.npcSprite.empty()) { UINpcSprWnd* npc = new UINpcSprWnd(); - npc->SetSprite(75, 145, quest.unknown_007C); + npc->SetSprite(75, 145, quest.npcSprite); npc->Move(this->geometry.width - npc->geometry.width - 40, this->geometry.height - npc->geometry.height - 10); - if (!quest.unknown_0094.empty()) { - npc->SetDestination(quest.unknown_0094, quest.unknown_00AC, quest.unknown_00B0); + if (!quest.destinationMap.empty()) { + npc->SetDestination(quest.destinationMap, quest.destinationX, quest.destinationY); } this->AddScrollChild(npc); } @@ -669,7 +669,7 @@ void UIRenewDetailQuestInfoWnd::SetQuest(unsigned int questId, bool recommended) this->m_ongoingWnd->Show(0); this->m_recommendedWnd->Show(1); this->m_recommendedWnd->SetQuest(this->m_questId); - this->m_imageName = g_renewQuestMgr->GetRecommendedQuest(questId).unknown_00B4; + this->m_imageName = g_renewQuestMgr->GetRecommendedQuest(questId).backgroundImage; if (!this->m_imageName.empty()) { this->m_imageName = "유저인터페이스\\renew_questui\\" + this->m_imageName; } @@ -826,14 +826,14 @@ void UIRenewQuestWnd::Paint() { this->DrawTextAt(80, this->m_pressed + 30 + y, quest->m_title.empty() ? "" : quest->m_title.c_str(), 0, 0, 12, 0xE47B2E, 1, 0 ); - summary = quest->unknown_004C.empty() ? "" : quest->unknown_004C.c_str(); + summary = quest->summary.empty() ? "" : quest->summary.c_str(); summaryY = this->m_pressed + y; } else { this->DrawBitmap(38, y + 24, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\renew_questui\\bg_questList.bmp"))), true); this->m_rows.icons[index]->Move(46, y + 31); this->DrawTextAt(80, y + 30, quest->m_title.empty() ? "" : quest->m_title.c_str(), 0, 0, 12, 0x955322, 1, 0 ); - summary = quest->unknown_004C.empty() ? "" : quest->unknown_004C.c_str(); + summary = quest->summary.empty() ? "" : quest->summary.c_str(); summaryY = y; } @@ -898,7 +898,7 @@ void UIRenewQuestWnd::RefreshRows() { const std::vector& ids = this->m_questIds[1]; if (index < ids.size()) { const RenewQuestRecommendedInfo& quest = g_renewQuestMgr->GetRecommendedQuest(ids[index]); - this->m_rows.lockBoxes[i]->geometry.unknown_0030 = quest.m_state; + this->m_rows.lockBoxes[i]->geometry.state = quest.m_state; this->m_rows.lockBoxes[i]->Invalidate(); this->m_rows.lockBoxes[i]->SetTooltip(LookupMessage(MSI_SAVE_ID)); this->m_rows.lockBoxes[i]->SetHidden(false); @@ -918,11 +918,11 @@ void UIRenewQuestWnd::RefreshRows() { this->m_rows.checkBoxes[i]->SetHidden(true); this->m_rows.lockBoxes[i]->SetHidden(true); } else { - this->m_rows.lockBoxes[i]->geometry.unknown_0030 = quest.m_state; + this->m_rows.lockBoxes[i]->geometry.state = quest.m_state; this->m_rows.lockBoxes[i]->Invalidate(); this->m_rows.lockBoxes[i]->SetTooltip(LookupMessage(MSI_OTP_INPUT_TIME)); this->m_rows.lockBoxes[i]->SetHidden(false); - this->m_rows.checkBoxes[i]->geometry.unknown_0030 = quest.m_simpleView; + this->m_rows.checkBoxes[i]->geometry.state = quest.m_simpleView; this->m_rows.checkBoxes[i]->Invalidate(); this->m_rows.checkBoxes[i]->SetHidden(false); } @@ -982,7 +982,7 @@ void UIRenewQuestWnd::RefreshQuestLists(int type, unsigned int questId) { this->m_questIds[3].clear(); CRenewQuestMgr* mgr = g_renewQuestMgr; for (auto it = mgr->m_ongoingQuests.begin(); it != mgr->m_ongoingQuests.end(); ++it) { - if (it->second.unknown_01F8 == 1) { + if (it->second.questType == 1) { this->m_questIds[3].push_back(it->first); } else if (it->second.m_state == 1) { this->m_questIds[0].push_back(it->first); @@ -1052,7 +1052,7 @@ static void SetRecommendedQuestTitle(CRenewQuestMgr* mgr, unsigned int id, std:: // INLINED static void SetRecommendedQuestSummary(CRenewQuestMgr* mgr, unsigned int id, std::string summary) { - mgr->m_recommendedQuests[id].unknown_004C = summary; + mgr->m_recommendedQuests[id].summary = summary; } // OFFSET: 0x007FD7F0 @@ -1145,7 +1145,7 @@ int UIRenewQuestWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume std::string title = quest->second.m_title; title = this->FitDisplayText(250, title.c_str(), 0, 12, 1); SetRecommendedQuestTitle(g_renewQuestMgr, quest->first, title); - std::string summary = quest->second.unknown_004C; + std::string summary = quest->second.summary; summary = this->FitDisplayText(250, summary.c_str(), 0, 12, 0); SetRecommendedQuestSummary(g_renewQuestMgr, quest->first, summary); ++quest; diff --git a/Source/UI/Quest/UIRenewQuestWnd.h b/Source/UI/Quest/UIRenewQuestWnd.h index 2b5815982..5cdb48eb6 100644 --- a/Source/UI/Quest/UIRenewQuestWnd.h +++ b/Source/UI/Quest/UIRenewQuestWnd.h @@ -70,7 +70,7 @@ public: void SetQuest(unsigned int questId); - /* 00B0 */ int unknown_00B0; + /* 00B0 */ int m_questId; /* 00B4 */ int unknown_00B4; }; @@ -135,7 +135,7 @@ public: }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(UIRecommededQuestScrollWnd, unknown_00B0) == 0xB0); +static_assert(offsetof(UIRecommededQuestScrollWnd, m_questId) == 0xB0); static_assert(sizeof(UIRecommededQuestScrollWnd) == 0xB8); static_assert(sizeof(UIRenewQuestScrollBar) == sizeof(UIScrollBar)); static_assert(offsetof(RenewQuestRowControls, lockBoxes) == 0x24); diff --git a/Source/UI/Rodex/UIRodexComposeWnd.cpp b/Source/UI/Rodex/UIRodexComposeWnd.cpp index ffdcac24c..972b27562 100644 --- a/Source/UI/Rodex/UIRodexComposeWnd.cpp +++ b/Source/UI/Rodex/UIRodexComposeWnd.cpp @@ -95,14 +95,14 @@ ITEM_INFO UIRodexComposeWnd::GetItemAtPoint(int x, int y) { // OFFSET: 0x007FF710 // FUNCTION: fn_10003 void UIRodexComposeWnd::InsertItemTag(const ITEM_INFO& item) { - if (!this->unknown_0100) { - this->unknown_0100 = new UIItemTagOnMail(); - if (!this->unknown_0100) { + if (!this->m_tagCtrl) { + this->m_tagCtrl = new UIItemTagOnMail(); + if (!this->m_tagCtrl) { return; } } - auto* tagCtrl = static_cast(this->unknown_0100); + auto* tagCtrl = static_cast(this->m_tagCtrl); if (!tagCtrl->CanInsertTag(item.DisplayName(0), this->m_contents->geometry.width)) { return; } @@ -116,19 +116,19 @@ void UIRodexComposeWnd::InsertItemTag(const ITEM_INFO& item) { // OFFSET: 0x007FF940 // FUNCTION: fn_10004 void UIRodexComposeWnd::InsertSkillTag(int tagId) { - if (!this->unknown_0100) { - this->unknown_0100 = new UIItemTagOnMail(); - if (!this->unknown_0100) { + if (!this->m_tagCtrl) { + this->m_tagCtrl = new UIItemTagOnMail(); + if (!this->m_tagCtrl) { return; } } - auto* tagCtrl = static_cast(this->unknown_0100); + auto* tagCtrl = static_cast(this->m_tagCtrl); if (tagCtrl->tags.size() >= 3) { return; } - if (this->m_contents->Length() + this->m_contents->unknown_00F0 > this->m_contents->maximum) { + if (this->m_contents->Length() + this->m_contents->tagTextLength > this->m_contents->maximum) { return; } @@ -143,9 +143,9 @@ void UIRodexComposeWnd::InsertSkillTag(int tagId) { // FUNCTION: fn_10006 void UIRodexEditCtrl3::OnCreate(int width, int height) { auto* scrollBar = new UIRodexScrollBar(); - this->unknown_0130 = scrollBar; + this->scrollBar = scrollBar; scrollBar->Configure(width - 5, 0, 1, height); - this->AddChild(this->unknown_0130); + this->AddChild(this->scrollBar); } // OFFSET: 0x00800DD0 @@ -192,7 +192,7 @@ void UIRodexComposeWnd::OnLBtnDown(int x, int y) { } ITEM_INFO item = this->GetItemAtPoint(x, y); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 15, item, item.quantity, -1); } } @@ -206,10 +206,10 @@ void UIRodexComposeWnd::OnMouseHover(int x, int y) { int tooltipY = 290; this->ToScreen(tooltipX, tooltipY); CMode* tooltip = g_modeMgr.gameMode; - if (item.identified == 1 && item.unknown_0098 != 0) { + if (item.identified == 1 && item.optionCount != 0) { std::uint32_t color = g_session.GetItemNameColor(item); tooltip->ShowTooltip( - FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, color, 0, 1 + FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, color, 0, 1 ); } else { std::uint32_t color = g_session.GetItemNameColor(item); @@ -238,20 +238,20 @@ void UIRodexComposeWnd::OnRBtnDown(int x, int y) { // OFFSET: 0x007FEDD0 // FUNCTION: fn_09992 UIRodexComposeWnd::UIRodexComposeWnd() - : UIFrameWnd(0), unknown_00B4(nullptr), unknown_00B8(nullptr), unknown_00BC(nullptr), unknown_00C0(nullptr), unknown_00C4(nullptr), - unknown_00C8(nullptr), unknown_00CC(0), unknown_00D0(nullptr), m_contents(nullptr), unknown_00D8(nullptr), m_zeny(nullptr), unknown_00E0(0), - unknown_00E4(0) { - this->unknown_0100 = nullptr; - this->unknown_00F8 = 0; + : UIFrameWnd(0), m_recipientEdit(nullptr), m_confirmedRecipientEdit(nullptr), m_confirmRecipientButton(nullptr), m_recipientLevelText(nullptr), m_recipientJobText(nullptr), + m_recipientIdText(nullptr), m_recipientId(0), m_titleEdit(nullptr), m_contents(nullptr), m_sendButton(nullptr), m_zeny(nullptr), m_reservedStateA(0), + m_reservedStateB(0) { + this->m_tagCtrl = nullptr; + this->m_tax = 0; this->m_itemIndex = 0; this->m_items.clear(); } // INLINED UIRodexComposeWnd::~UIRodexComposeWnd() { - if (this->unknown_0100) { - static_cast(this->unknown_0100)->ClearTags(); - delete this->unknown_0100; + if (this->m_tagCtrl) { + static_cast(this->m_tagCtrl)->ClearTags(); + delete this->m_tagCtrl; } } @@ -264,23 +264,23 @@ int UIRodexComposeWnd::MeasureText(const std::string& text, const unsigned& byte // OFFSET: 0x007FF290 // FUNCTION: fn_09999 void UIRodexComposeWnd::SetRecipient(int id, unsigned short job, unsigned short level, const char* name) { - this->unknown_00C0->SetTextWithinWidth(FormatOwnedString("Lv%d", level).c_str(), 0); - this->unknown_00C0->Show(1); - this->unknown_00C4->SetTextWithinWidth(g_session.GetJobName(job, 99), 0); - this->unknown_00C4->Show(1); - this->unknown_00CC = id; - this->unknown_00C8->SetTextWithinWidth(ShortcutFilename(id).c_str(), 0); - this->unknown_00C8->Show(1); - this->unknown_00B4->Show(0); - this->unknown_00BC->Enable(0); - this->unknown_00B8->Show(1); - this->unknown_00B8->SetText(name); + this->m_recipientLevelText->SetTextWithinWidth(FormatOwnedString("Lv%d", level).c_str(), 0); + this->m_recipientLevelText->Show(1); + this->m_recipientJobText->SetTextWithinWidth(g_session.GetJobName(job, 99), 0); + this->m_recipientJobText->Show(1); + this->m_recipientId = id; + this->m_recipientIdText->SetTextWithinWidth(ShortcutFilename(id).c_str(), 0); + this->m_recipientIdText->Show(1); + this->m_recipientEdit->Show(0); + this->m_confirmRecipientButton->Enable(0); + this->m_confirmedRecipientEdit->Show(1); + this->m_confirmedRecipientEdit->SetText(name); } // OFFSET: 0x007FF400 // FUNCTION: fn_10000 void UIRodexComposeWnd::DragAndDrop(int x, int y, std::intptr_t value) { - if (!g_windowMgr.unknown_0458) { + if (!g_windowMgr.rodexComposeWnd) { UIWindow::DragAndDrop(x, y, value); return; } @@ -319,8 +319,8 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu if (argument1 == ID_CLOSE) { g_windowMgr.CloseWindow(WID_RODEXCOMPOSEWND); } else if (argument1 == ID_CHECK) { - if (this->unknown_00B4->Length() != 0 && this->unknown_00B4->Length() < 24) { - if (g_navigationLinkParser->HasLink(this->unknown_00B4->Text())) { + if (this->m_recipientEdit->Length() != 0 && this->m_recipientEdit->Length() < 24) { + if (g_navigationLinkParser->HasLink(this->m_recipientEdit->Text())) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_STYLING_SHOP_OPEN_COUPON)), 0x64FFFF, 0, 0, 0); return 0; } @@ -328,7 +328,7 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu RodexCheckRecipientPacket packet; packet.packetType = 0xB97; std::memset(packet.name, 0, sizeof(packet.name)); - strcpy_s(packet.name, sizeof(packet.name), this->unknown_00B4->Text()); + strcpy_s(packet.name, sizeof(packet.name), this->m_recipientEdit->Text()); if (g_session.HasUnknown809C(packet.name)) { packet.known = 1; } else { @@ -338,20 +338,20 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu return 0; } - if (this->unknown_00B4->Length() >= 24) { + if (this->m_recipientEdit->Length() >= 24) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_WND_OVERFULL)), 0x64FFFF, 0, 0, 0); } - if (g_navigationLinkParser->HasLink(this->unknown_00B4->Text())) { + if (g_navigationLinkParser->HasLink(this->m_recipientEdit->Text())) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_STYLING_SHOP_OPEN_COUPON)), 0x64FFFF, 0, 0, 0); } else { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL_ITEM)), 0x64FFFF, 0, 0, 0); } } else if (argument1 == ID_SEND) { - if (this->unknown_00B4->Length() == 0 && this->unknown_00B8->Length() == 0) { + if (this->m_recipientEdit->Length() == 0 && this->m_confirmedRecipientEdit->Length() == 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILED_SEND_MAIL_ITEM)), 0x64FFFF, 0, 0, 0); return 0; } - if (this->unknown_00D0->Length() < 4 || this->unknown_00D0->Length() >= 51) { + if (this->m_titleEdit->Length() < 4 || this->m_titleEdit->Length() >= 51) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAIELD_SEND_MAIL_TO)), 0x64FFFF, 0, 0, 0); return 0; } @@ -366,17 +366,17 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_TAIWAN_PERSONALINFO_EXPMSG)), 0x64FFFF, 0, 0, 0); return 0; } - if (zeny + this->unknown_00F8 > g_session.m_zeny) { + if (zeny + this->m_tax > g_session.m_zeny) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ACHIEVEMENT_SYSTEM)), 0x64FFFF, 0, 0, 0); return 0; } } - if (this->unknown_00F8 > 0 && this->unknown_00F8 > g_session.m_zeny) { + if (this->m_tax > 0 && this->m_tax > g_session.m_zeny) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ACHIEVEMENT_SYSTEM)), 0x64FFFF, 0, 0, 0); return 0; } - if (this->unknown_00C8->GetText().length() <= 0) { + if (this->m_recipientIdText->GetText().length() <= 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SEND_MAIL_COMMISSION)), 0x64FFFF, 0, 0, 0); return 0; } @@ -394,15 +394,15 @@ int UIRodexComposeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu body = this->m_contents->TakePendingText(); } - auto* tagCtrl = static_cast(this->unknown_0100); - if (tagCtrl && tagCtrl->unknown_0140.size() != 0) { - body = tagCtrl->unknown_0140.c_str(); + auto* tagCtrl = static_cast(this->m_tagCtrl); + if (tagCtrl && tagCtrl->linkedText.size() != 0) { + body = tagCtrl->linkedText.c_str(); } RodexSendMailRequest mail; - mail.recipientId = this->unknown_00CC; - mail.recipient = this->unknown_00B8->Text(); - mail.title = this->unknown_00D0->Text(); + mail.recipientId = this->m_recipientId; + mail.recipient = this->m_confirmedRecipientEdit->Text(); + mail.title = this->m_titleEdit->Text(); mail.body = body; mail.zeny = static_cast(zeny); g_modeMgr.GetGameMode()->SendMsg(MM_SEND_MAIL, reinterpret_cast(&mail), 0, 0, 0); @@ -451,7 +451,7 @@ void UIRodexComposeWnd::Paint() { const auto* bg = &static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\bg_rodex_read.bmp")))->image; this->DrawBitmap(0, 0, bg, false); - if (this->unknown_00B8->geometry.visible == 1) { + if (this->m_confirmedRecipientEdit->geometry.visible == 1) { const auto* balloon = &static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\bg_id_balloon.bmp")))->image; this->DrawBitmap(161, 21, balloon, true); } @@ -459,7 +459,7 @@ void UIRodexComposeWnd::Paint() { std::string countStr = std::format("/ {}", 1000); this->DrawTextAt(261, 276, countStr.c_str(), 0, 0, 10, 0xD66E44, 0, 0); - int length = this->m_contents->Length() + this->m_contents->unknown_00F0; + int length = this->m_contents->Length() + this->m_contents->tagTextLength; std::string lengthStr = FormatOwnedString("%d", length); this->DrawRightAlignedText(258, 276, lengthStr.c_str(), 0, 0, 10, 0xD66E44, 0); @@ -469,7 +469,7 @@ void UIRodexComposeWnd::Paint() { const char* weightMsg = LookupMessage(MSI_TWITTER_TAG); this->DrawTextAt(245, 316, weightMsg, 0, 0, 11, 0x737373, 0, 0); - std::string weightStr = FormatOwnedString("%d", static_cast(g_session.unknown_6140)); + std::string weightStr = FormatOwnedString("%d", static_cast(g_session.achievementResult)); this->DrawRightAlignedText(244, 316, weightStr.c_str(), 0, 0, 11, 0x737373, 0); this->FillRegion(35, 347, 95, 16, 0xFFFFFF); @@ -496,14 +496,14 @@ void UIRodexComposeWnd::Paint() { std::int64_t inputZeny = _atoi64(inputBuf); if (this->m_zeny->Text() != nullptr) { tax += (inputZeny * 2) / 100; - this->unknown_00F8 = tax; + this->m_tax = tax; } FormatGroupedInteger(tax, taxBuf, sizeof(taxBuf)); - std::uint32_t taxColor = (inputZeny + this->unknown_00F8 > g_session.m_zeny) ? 0x4E71CF : 0; + std::uint32_t taxColor = (inputZeny + this->m_tax > g_session.m_zeny) ? 0x4E71CF : 0; this->DrawRightAlignedText(104, 382, taxBuf, 0, 0, 11, taxColor, 0); if (this->m_zeny->Length() != 0) { - std::uint32_t textColor = (inputZeny > g_session.m_zeny || inputZeny + this->unknown_00F8 > g_session.m_zeny) ? 0xFF : 0; + std::uint32_t textColor = (inputZeny > g_session.m_zeny || inputZeny + this->m_tax > g_session.m_zeny) ? 0xFF : 0; this->m_zeny->TextColor(textColor, 0xFFFFFFFF); } @@ -517,13 +517,13 @@ void UIRodexComposeWnd::Paint() { for (const auto& item : this->m_items) { const auto* shadowOn = &static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\shadow_item_on.bmp")))->image; this->DrawBitmap(itemX - 4, 319, shadowOn, true); - if (this->unknown_00F8 <= g_session.m_zeny) { + if (this->m_tax <= g_session.m_zeny) { DrawItemWithQuantity(*this, ResourceMgr::Instance(), itemX, 309, item, 0, 0); } else { DrawItemWithQuantityAuxiliary(*this, 2, itemX, 309, item, item.identified, 0); } - if (item.unknown_0088 > 0) { - std::string gradeStr = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", static_cast(item.unknown_0088)); + if (item.grade > 0) { + std::string gradeStr = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", static_cast(item.grade)); const auto* gradeBmp = &static_cast(ResourceMgr::Instance().Load(Resolve(gradeStr.c_str())))->image; this->DrawBitmap(itemX, 321, gradeBmp, true); } @@ -531,17 +531,17 @@ void UIRodexComposeWnd::Paint() { } } - if (this->unknown_0100) { - auto* tagCtrl = static_cast(this->unknown_0100); - tagCtrl->SetLines(this->m_contents->unknown_0168); + if (this->m_tagCtrl) { + auto* tagCtrl = static_cast(this->m_tagCtrl); + tagCtrl->SetLines(this->m_contents->wrappedLines); tagCtrl->SetTaggedText(this->m_contents->Text(), this->m_contents->geometry.width); tagCtrl->UpdateItemTags(); - auto* editCtrl3 = static_cast(this->unknown_0100); - int diff = editCtrl3->unknown_0150 - editCtrl3->unknown_0138; - this->m_contents->unknown_00F0 = std::max(0, diff); - if (tagCtrl->unknown_011C == 0) { - delete this->unknown_0100; - this->unknown_0100 = nullptr; + auto* editCtrl3 = static_cast(this->m_tagCtrl); + int diff = editCtrl3->verticalCursorStep - editCtrl3->lineHeight; + this->m_contents->tagTextLength = std::max(0, diff); + if (tagCtrl->previousTagCount == 0) { + delete this->m_tagCtrl; + this->m_tagCtrl = nullptr; } } } @@ -552,90 +552,90 @@ void UIRodexComposeWnd::OnCreate(int, int) { this->AddBaseButton(); this->AddCloseButton("", 0); - this->unknown_00B4 = new UIEditCtrl_Custom(); - this->unknown_00B4->SetSize(0x96, 0x12); - this->unknown_00B4->Move(8, 0x1A); - this->unknown_00B4->maximum = 50; - this->unknown_00B4->Background(0xFF, 0xFF, 0xFF); - this->unknown_00B4->flat = 0; - this->unknown_00B4->Border(0xA6, 0xA6, 0xA6); - this->unknown_00B4->TextColor(0x313131, 0xFFFFFFFF); - this->unknown_00B4->unknown_0120 = 1; - this->unknown_00B4->unknown_0124 = 1; - this->AddChild(this->unknown_00B4); + this->m_recipientEdit = new UIEditCtrl_Custom(); + this->m_recipientEdit->SetSize(0x96, 0x12); + this->m_recipientEdit->Move(8, 0x1A); + this->m_recipientEdit->maximum = 50; + this->m_recipientEdit->Background(0xFF, 0xFF, 0xFF); + this->m_recipientEdit->flat = 0; + this->m_recipientEdit->Border(0xA6, 0xA6, 0xA6); + this->m_recipientEdit->TextColor(0x313131, 0xFFFFFFFF); + this->m_recipientEdit->labelOffsetX = 1; + this->m_recipientEdit->labelOffsetY = 1; + this->AddChild(this->m_recipientEdit); - this->unknown_00B8 = new UIEditCtrl_Custom(); - this->unknown_00B8->SetSize(0x96, 0x12); - this->unknown_00B8->Move(8, 0x1A); - this->unknown_00B8->maximum = 50; - this->unknown_00B8->Background(0x110, 0x110, 0x110); - this->unknown_00B8->flat = 0; - this->unknown_00B8->Border(0xA6, 0xA6, 0xA6); - this->unknown_00B8->TextColor(0x95330F, 0xFFFFFFFF); - this->unknown_00B8->unknown_011C = 1; - this->unknown_00B8->unknown_0120 = 1; - this->unknown_00B8->unknown_0124 = 1; - this->unknown_00B8->disabled = 1; - this->unknown_00B8->Invalidate(); - this->unknown_00B8->Show(0); - this->AddChild(this->unknown_00B8); + this->m_confirmedRecipientEdit = new UIEditCtrl_Custom(); + this->m_confirmedRecipientEdit->SetSize(0x96, 0x12); + this->m_confirmedRecipientEdit->Move(8, 0x1A); + this->m_confirmedRecipientEdit->maximum = 50; + this->m_confirmedRecipientEdit->Background(0x110, 0x110, 0x110); + this->m_confirmedRecipientEdit->flat = 0; + this->m_confirmedRecipientEdit->Border(0xA6, 0xA6, 0xA6); + this->m_confirmedRecipientEdit->TextColor(0x95330F, 0xFFFFFFFF); + this->m_confirmedRecipientEdit->labelBold = 1; + this->m_confirmedRecipientEdit->labelOffsetX = 1; + this->m_confirmedRecipientEdit->labelOffsetY = 1; + this->m_confirmedRecipientEdit->disabled = 1; + this->m_confirmedRecipientEdit->Invalidate(); + this->m_confirmedRecipientEdit->Show(0); + this->AddChild(this->m_confirmedRecipientEdit); - this->unknown_00BC = new UIBmpTextButton(); - this->unknown_00BC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_out.bmp", 0, 0); - this->unknown_00BC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_over.bmp", 1, 0); - this->unknown_00BC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_press.bmp", 2, 0); - this->unknown_00BC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_press.bmp", 3, 0); - this->unknown_00BC->SetSize(this->unknown_00BC->BitmapWidth(), this->unknown_00BC->BitmapHeight()); + this->m_confirmRecipientButton = new UIBmpTextButton(); + this->m_confirmRecipientButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_out.bmp", 0, 0); + this->m_confirmRecipientButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_over.bmp", 1, 0); + this->m_confirmRecipientButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_press.bmp", 2, 0); + this->m_confirmRecipientButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_confirm_id_empty_press.bmp", 3, 0); + this->m_confirmRecipientButton->SetSize(this->m_confirmRecipientButton->BitmapWidth(), this->m_confirmRecipientButton->BitmapHeight()); { const int textX = static_cast( - static_cast(this->unknown_00BC->geometry.width - this->TextWidth(LookupMessage(MSI_RODEX_TAB_RETURN), 0, 0, 12, 0, 0)) * + static_cast(this->m_confirmRecipientButton->geometry.width - this->TextWidth(LookupMessage(MSI_RODEX_TAB_RETURN), 0, 0, 12, 0, 0)) * g_depthAverageHalf ); - UIBmpTextButton* button = this->unknown_00BC; + UIBmpTextButton* button = this->m_confirmRecipientButton; const int textY = static_cast( static_cast(button->geometry.height - this->TextHeight(LookupMessage(MSI_RODEX_TAB_RETURN), 0, 0, 12, 0, 0)) * g_depthAverageHalf ); button->AddTextStyle(0, 12, 0x313131, 0, 0, textX, textY); - this->unknown_00BC->AddTextStyle(1, 12, 0x313131, 0, 0, textX, textY); - this->unknown_00BC->AddTextStyle(2, 12, 0x313131, 0, 1, textX, textY); - this->unknown_00BC->AddTextStyle(3, 12, 0xC2C2C2, 0, 0, textX, textY); + this->m_confirmRecipientButton->AddTextStyle(1, 12, 0x313131, 0, 0, textX, textY); + this->m_confirmRecipientButton->AddTextStyle(2, 12, 0x313131, 0, 1, textX, textY); + this->m_confirmRecipientButton->AddTextStyle(3, 12, 0xC2C2C2, 0, 0, textX, textY); } - this->unknown_00BC->SetText(LookupMessage(MSI_RODEX_TAB_RETURN)); - this->unknown_00BC->Move(0xA2, 0x1A); - this->unknown_00BC->SetId(0xD5); - this->AddChild(this->unknown_00BC); + this->m_confirmRecipientButton->SetText(LookupMessage(MSI_RODEX_TAB_RETURN)); + this->m_confirmRecipientButton->Move(0xA2, 0x1A); + this->m_confirmRecipientButton->SetId(0xD5); + this->AddChild(this->m_confirmRecipientButton); - this->unknown_00C0 = new UIStaticText(); - this->unknown_00C0->SetSize(0x100, 0x10); - this->unknown_00C0->Move(0xAC, 0x19); - this->unknown_00C0->SetColor(0xC6, 0x28, 0x28); - this->unknown_00C0->SetFont(0, 11, 0, 0); - this->unknown_00C0->Show(0); - this->AddChild(this->unknown_00C0); + this->m_recipientLevelText = new UIStaticText(); + this->m_recipientLevelText->SetSize(0x100, 0x10); + this->m_recipientLevelText->Move(0xAC, 0x19); + this->m_recipientLevelText->SetColor(0xC6, 0x28, 0x28); + this->m_recipientLevelText->SetFont(0, 11, 0, 0); + this->m_recipientLevelText->Show(0); + this->AddChild(this->m_recipientLevelText); - this->unknown_00C4 = new UIStaticText(); - this->unknown_00C4->SetSize(0x100, 0x10); - this->unknown_00C4->Move(0xAC, 0x25); - this->unknown_00C4->SetColor(0xC6, 0x28, 0x28); - this->unknown_00C4->SetFont(0, 11, 0, 0); - this->unknown_00C4->Show(0); - this->AddChild(this->unknown_00C4); + this->m_recipientJobText = new UIStaticText(); + this->m_recipientJobText->SetSize(0x100, 0x10); + this->m_recipientJobText->Move(0xAC, 0x25); + this->m_recipientJobText->SetColor(0xC6, 0x28, 0x28); + this->m_recipientJobText->SetFont(0, 11, 0, 0); + this->m_recipientJobText->Show(0); + this->AddChild(this->m_recipientJobText); - this->unknown_00C8 = new UIStaticText(); - this->unknown_00C8->SetSize(0xFD, 0x10); - this->unknown_00C8->Move(0xAC, 0x31); - this->unknown_00C8->SetColor(0xC6, 0x28, 0x28); - this->unknown_00C8->SetFont(0, 11, 0, 0); - this->unknown_00C8->Show(0); - this->AddChild(this->unknown_00C8); + this->m_recipientIdText = new UIStaticText(); + this->m_recipientIdText->SetSize(0xFD, 0x10); + this->m_recipientIdText->Move(0xAC, 0x31); + this->m_recipientIdText->SetColor(0xC6, 0x28, 0x28); + this->m_recipientIdText->SetFont(0, 11, 0, 0); + this->m_recipientIdText->Show(0); + this->AddChild(this->m_recipientIdText); - this->unknown_00D0 = new UIEditCtrl_Custom(); - this->unknown_00D0->SetSize(0x9B, 0xE); - this->unknown_00D0->Move(6, 0x32); - this->unknown_00D0->maximum = 50; - this->unknown_00D0->SetText("TITLE"); - this->AddChild(this->unknown_00D0); + this->m_titleEdit = new UIEditCtrl_Custom(); + this->m_titleEdit->SetSize(0x9B, 0xE); + this->m_titleEdit->Move(6, 0x32); + this->m_titleEdit->maximum = 50; + this->m_titleEdit->SetText("TITLE"); + this->AddChild(this->m_titleEdit); this->m_contents = new UIRodexEditCtrl3(); this->m_contents->SetSize(0x10B, 0xC0); @@ -659,9 +659,9 @@ void UIRodexComposeWnd::OnCreate(int, int) { this->m_zeny->SetText("0"); this->AddChild(this->m_zeny); - this->unknown_00D8 = new UIBasicButton(); - this->unknown_00D8->Configure(0x46, LookupMessage(MSI_RODEX_TAB_DEFAULT)); - this->unknown_00D8->Move(0xE2, 0x178); - this->unknown_00D8->SetId(0x159); - this->AddChild(this->unknown_00D8); + this->m_sendButton = new UIBasicButton(); + this->m_sendButton->Configure(0x46, LookupMessage(MSI_RODEX_TAB_DEFAULT)); + this->m_sendButton->Move(0xE2, 0x178); + this->m_sendButton->SetId(0x159); + this->AddChild(this->m_sendButton); } diff --git a/Source/UI/Rodex/UIRodexComposeWnd.h b/Source/UI/Rodex/UIRodexComposeWnd.h index a55bb8b40..9cad5a44e 100644 --- a/Source/UI/Rodex/UIRodexComposeWnd.h +++ b/Source/UI/Rodex/UIRodexComposeWnd.h @@ -48,24 +48,24 @@ public: void SetRecipient(int id, unsigned short job, unsigned short level, const char* name); __declspec(noinline) std::int64_t GetZeny(); - /* 00B4 */ UIEditCtrl_Custom* unknown_00B4; - /* 00B8 */ UIEditCtrl_Custom* unknown_00B8; - /* 00BC */ UIBmpTextButton* unknown_00BC; - /* 00C0 */ UIStaticText* unknown_00C0; - /* 00C4 */ UIStaticText* unknown_00C4; - /* 00C8 */ UIStaticText* unknown_00C8; - /* 00CC */ int unknown_00CC; - /* 00D0 */ UIEditCtrl_Custom* unknown_00D0; + /* 00B4 */ UIEditCtrl_Custom* m_recipientEdit; + /* 00B8 */ UIEditCtrl_Custom* m_confirmedRecipientEdit; + /* 00BC */ UIBmpTextButton* m_confirmRecipientButton; + /* 00C0 */ UIStaticText* m_recipientLevelText; + /* 00C4 */ UIStaticText* m_recipientJobText; + /* 00C8 */ UIStaticText* m_recipientIdText; + /* 00CC */ int m_recipientId; + /* 00D0 */ UIEditCtrl_Custom* m_titleEdit; /* 00D4 */ UIRodexEditCtrl3* m_contents; - /* 00D8 */ UIBasicButton* unknown_00D8; + /* 00D8 */ UIBasicButton* m_sendButton; /* 00DC */ UIEditCtrl_Currency* m_zeny; - /* 00E0 */ int unknown_00E0; - /* 00E4 */ int unknown_00E4; + /* 00E0 */ int m_reservedStateA; + /* 00E4 */ int m_reservedStateB; /* 00E8 */ std::list m_items; /* 00F0 */ int m_itemIndex; /* 00F4 */ int unknown_00F4; - /* 00F8 */ std::int64_t unknown_00F8; - /* 0100 */ UIEditCtrl* unknown_0100; + /* 00F8 */ std::int64_t m_tax; + /* 0100 */ UIEditCtrl* m_tagCtrl; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Rodex/UIRodexInboxWnd.cpp b/Source/UI/Rodex/UIRodexInboxWnd.cpp index c143b9d6d..b65295e36 100644 --- a/Source/UI/Rodex/UIRodexInboxWnd.cpp +++ b/Source/UI/Rodex/UIRodexInboxWnd.cpp @@ -62,14 +62,14 @@ struct PACKET_CZ_RODEX_RETURN { // OFFSET: 0x00804D50 // FUNCTION: fn_10038 UIRodexInboxWnd::UIRodexInboxWnd() - : UIItemWnd(), unknown_0130(0), unknown_0134(0), unknown_0138(0), unknown_013C(nullptr), unknown_0140(nullptr), - unknown_018C(nullptr), unknown_0190(nullptr), unknown_0194(nullptr), unknown_0198(nullptr), unknown_019C(0), unknown_01A0(0), - expired(0), unknown_01C8(nullptr), unknown_01CC(0), unknown_01D0(0), unknown_01D4(0), searchResults(), mails0(), mails1(), mails2() { - std::memset(this->unknown_0144, 0, sizeof(this->unknown_0144)); - std::memset(this->unknown_015C, 0, sizeof(this->unknown_015C)); + : UIItemWnd(), mailTab(0), accountTab(0), returnTab(0), refreshButton(nullptr), writeButton(nullptr), + receiveButton(nullptr), deleteButton(nullptr), previousPageButton(nullptr), nextPageButton(nullptr), page(0), pageCount(0), + expired(0), searchEdit(nullptr), searchButton(0), searchTab(0), searchActive(0), searchResults(), mails0(), mails1(), mails2() { + std::memset(this->senderButtons, 0, sizeof(this->senderButtons)); + std::memset(this->subjectButtons, 0, sizeof(this->subjectButtons)); std::memset(this->checks, 0, sizeof(this->checks)); - std::memset(this->unknown_01A8, 0, sizeof(this->unknown_01A8)); - g_rodexMailStore->unknown_001C = false; + std::memset(this->returnButtons, 0, sizeof(this->returnButtons)); + g_rodexMailStore->isPageComplete = false; PACKET_CZ_OPEN_RODEXBOX packet; packet.packetType = ID_CZ_OPEN_RODEXBOX; packet.lastMailId0 = 0; @@ -143,103 +143,103 @@ void UIRodexInboxWnd::OnCreate(int width, int height) { this->AddBaseButton(); this->AddCloseButton("", 0); - this->unknown_0138 = new UIBmpRadioBtn(); - this->unknown_0138->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); - this->unknown_0138->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); - this->unknown_0138->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); + this->returnTab = new UIBmpRadioBtn(); + this->returnTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); + this->returnTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); + this->returnTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); { - UIBmpRadioBtn* tab = this->unknown_0138; + UIBmpRadioBtn* tab = this->returnTab; const std::string label = LookupMessage(MSI_FAILED_HOMUN_AUTO_FEEDING_BY_ITEMACTION); tab->m_label = label; tab->Invalidate(); } { - const int textX = static_cast(static_cast(this->unknown_0138->geometry.width - this->TextWidth(LookupMessage(MSI_FAILED_HOMUN_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0)) * g_depthAverageHalf); - UIBmpRadioBtn* tab = this->unknown_0138; + const int textX = static_cast(static_cast(this->returnTab->geometry.width - this->TextWidth(LookupMessage(MSI_FAILED_HOMUN_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0)) * g_depthAverageHalf); + UIBmpRadioBtn* tab = this->returnTab; const int textY = static_cast(static_cast(tab->geometry.height - this->TextHeight(LookupMessage(MSI_FAILED_HOMUN_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0) - 3) * g_depthAverageHalf); tab->AddText(0, 12, 0xCCB5AD, true, false, textX, textY); - this->unknown_0138->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); - this->unknown_0138->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); + this->returnTab->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); + this->returnTab->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); } - this->unknown_0138->Move(0xCF, 0x46); - this->AddChild(this->unknown_0138); - this->unknown_0138->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->returnTab->Move(0xCF, 0x46); + this->AddChild(this->returnTab); + this->returnTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_0134 = new UIBmpRadioBtn(); - this->unknown_0134->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); - this->unknown_0134->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); - this->unknown_0134->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); + this->accountTab = new UIBmpRadioBtn(); + this->accountTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); + this->accountTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); + this->accountTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); { - UIBmpRadioBtn* tab = this->unknown_0134; + UIBmpRadioBtn* tab = this->accountTab; const std::string label = LookupMessage(MSI_RODEX_TAB_SEARCH); tab->m_label = label; tab->Invalidate(); } { - const int textX = static_cast(static_cast(this->unknown_0134->geometry.width - this->TextWidth(LookupMessage(MSI_RODEX_TAB_SEARCH), 0, 0, 12, 0, 0)) * g_depthAverageHalf); - UIBmpRadioBtn* tab = this->unknown_0134; + const int textX = static_cast(static_cast(this->accountTab->geometry.width - this->TextWidth(LookupMessage(MSI_RODEX_TAB_SEARCH), 0, 0, 12, 0, 0)) * g_depthAverageHalf); + UIBmpRadioBtn* tab = this->accountTab; const int textY = static_cast(static_cast(tab->geometry.height - this->TextHeight(LookupMessage(MSI_RODEX_TAB_SEARCH), 0, 0, 12, 0, 0) - 3) * g_depthAverageHalf); tab->AddText(0, 12, 0xCCB5AD, true, false, textX, textY); - this->unknown_0134->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); - this->unknown_0134->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); + this->accountTab->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); + this->accountTab->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); } - this->unknown_0134->Move(0x13, 0x46); - this->AddChild(this->unknown_0134); - this->unknown_0134->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->accountTab->Move(0x13, 0x46); + this->AddChild(this->accountTab); + this->accountTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_0130 = new UIBmpRadioBtn(); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); - this->unknown_0130->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); + this->mailTab = new UIBmpRadioBtn(); + this->mailTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); + this->mailTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); + this->mailTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); { - UIBmpRadioBtn* tab = this->unknown_0130; + UIBmpRadioBtn* tab = this->mailTab; const std::string label = LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION); tab->m_label = label; tab->Invalidate(); } { - const int textX = static_cast(static_cast(this->unknown_0130->geometry.width - this->TextWidth(LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0)) * g_depthAverageHalf); - UIBmpRadioBtn* tab = this->unknown_0130; + const int textX = static_cast(static_cast(this->mailTab->geometry.width - this->TextWidth(LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0)) * g_depthAverageHalf); + UIBmpRadioBtn* tab = this->mailTab; const int textY = static_cast(static_cast(tab->geometry.height - this->TextHeight(LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION), 0, 0, 12, 0, 0) - 3) * g_depthAverageHalf); tab->AddText(0, 12, 0xCCB5AD, true, false, textX, textY); - this->unknown_0130->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); - this->unknown_0130->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); + this->mailTab->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); + this->mailTab->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); } - this->unknown_0130->Move(0x71, 0x46); - this->AddChild(this->unknown_0130); - this->unknown_0130->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->mailTab->Move(0x71, 0x46); + this->AddChild(this->mailTab); + this->mailTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - switch (g_rodexMailStore->unknown_0010) { + switch (g_rodexMailStore->inboxType) { case MAIL_INBOX_NORMAL: - this->unknown_0130->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); + this->mailTab->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); break; case MAIL_INBOX_ACCOUNT: - this->unknown_0134->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); + this->accountTab->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); break; case MAIL_INBOX_RETURNED: - this->unknown_0138->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); + this->returnTab->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); break; } - this->unknown_013C = new UIBitmapButton(); - this->unknown_013C->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_out.bmp", 0, 0); - this->unknown_013C->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_over.bmp", 1, 0); - this->unknown_013C->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_press.bmp", 2, 0); - this->unknown_013C->SetTooltip(LookupMessage(MSI_RODEX_DELETE_TIME_DAY)); - this->unknown_013C->SetSize(this->unknown_013C->BitmapWidth(), this->unknown_013C->BitmapHeight()); - this->unknown_013C->Move(0xEF, 0x14); - this->unknown_013C->SetId(0x19F); - this->AddChild(this->unknown_013C); + this->refreshButton = new UIBitmapButton(); + this->refreshButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_out.bmp", 0, 0); + this->refreshButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_over.bmp", 1, 0); + this->refreshButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_refresh_press.bmp", 2, 0); + this->refreshButton->SetTooltip(LookupMessage(MSI_RODEX_DELETE_TIME_DAY)); + this->refreshButton->SetSize(this->refreshButton->BitmapWidth(), this->refreshButton->BitmapHeight()); + this->refreshButton->Move(0xEF, 0x14); + this->refreshButton->SetId(0x19F); + this->AddChild(this->refreshButton); - this->unknown_0140 = new UIBitmapButton(); - this->unknown_0140->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_out.bmp", 0, 0); - this->unknown_0140->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_over.bmp", 1, 0); - this->unknown_0140->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_press.bmp", 2, 0); - this->unknown_0140->SetTooltip(LookupMessage(MSI_MAIL_WRITE)); - this->unknown_0140->SetSize(this->unknown_0140->BitmapWidth(), this->unknown_0140->BitmapHeight()); - this->unknown_0140->Move(0x10C, 0x12); - this->unknown_0140->SetId(0x131); - this->AddChild(this->unknown_0140); + this->writeButton = new UIBitmapButton(); + this->writeButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_out.bmp", 0, 0); + this->writeButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_over.bmp", 1, 0); + this->writeButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_write_press.bmp", 2, 0); + this->writeButton->SetTooltip(LookupMessage(MSI_MAIL_WRITE)); + this->writeButton->SetSize(this->writeButton->BitmapWidth(), this->writeButton->BitmapHeight()); + this->writeButton->Move(0x10C, 0x12); + this->writeButton->SetId(0x131); + this->AddChild(this->writeButton); for (int y = 0x66, row = 0; y < 0x16E; y += 0x2C, ++row) { this->checks[row] = new UICheckBox(); @@ -251,143 +251,143 @@ void UIRodexInboxWnd::OnCreate(int width, int height) { this->checks[row]->Show(0); this->AddChild(this->checks[row]); - this->unknown_015C[row] = new UITextButton(); - this->unknown_015C[row]->Configure("", 0, 0, 12, 0, 0); - this->unknown_015C[row]->m_hoverColor = 0x51417E; - this->unknown_015C[row]->Move(0x45, y); - this->unknown_015C[row]->SetId(0x143); - this->unknown_015C[row]->SetTooltip(LookupMessage(MSI_TAIWAN_CASH_MSG_2)); - this->unknown_015C[row]->Enable(0); - this->AddChild(this->unknown_015C[row]); + this->subjectButtons[row] = new UITextButton(); + this->subjectButtons[row]->Configure("", 0, 0, 12, 0, 0); + this->subjectButtons[row]->m_hoverColor = 0x51417E; + this->subjectButtons[row]->Move(0x45, y); + this->subjectButtons[row]->SetId(0x143); + this->subjectButtons[row]->SetTooltip(LookupMessage(MSI_TAIWAN_CASH_MSG_2)); + this->subjectButtons[row]->Enable(0); + this->AddChild(this->subjectButtons[row]); - this->unknown_0144[row] = new UITextButton(); - this->unknown_0144[row]->Configure("", 0x844A42, 0, 11, 1, 0); - this->unknown_0144[row]->m_hoverColor = 0x51417E; - this->unknown_0144[row]->Move(0x47, y + 0x10); - this->unknown_0144[row]->SetId(0x142); - this->unknown_0144[row]->SetTooltip(LookupMessage(MSI_TAIWAN_CASH_MSG_1)); - this->unknown_0144[row]->Enable(0); - this->AddChild(this->unknown_0144[row]); + this->senderButtons[row] = new UITextButton(); + this->senderButtons[row]->Configure("", 0x844A42, 0, 11, 1, 0); + this->senderButtons[row]->m_hoverColor = 0x51417E; + this->senderButtons[row]->Move(0x47, y + 0x10); + this->senderButtons[row]->SetId(0x142); + this->senderButtons[row]->SetTooltip(LookupMessage(MSI_TAIWAN_CASH_MSG_1)); + this->senderButtons[row]->Enable(0); + this->AddChild(this->senderButtons[row]); - this->unknown_01A8[row] = new UIBitmapButton(); - this->unknown_01A8[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_out.bmp", 0, 0); - this->unknown_01A8[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_over.bmp", 1, 0); - this->unknown_01A8[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_press.bmp", 2, 0); - this->unknown_01A8[row]->SetSize(this->unknown_01A8[row]->BitmapWidth(), this->unknown_01A8[row]->BitmapHeight()); - this->unknown_01A8[row]->Move(0xBA, y + 0x1D); - this->unknown_01A8[row]->SetTooltip(LookupMessage(MSI_RODEX_DELETE_TIME_HOUR)); - this->unknown_01A8[row]->SetId(0x136); - this->unknown_01A8[row]->Enable(0); - this->AddChild(this->unknown_01A8[row]); + this->returnButtons[row] = new UIBitmapButton(); + this->returnButtons[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_out.bmp", 0, 0); + this->returnButtons[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_over.bmp", 1, 0); + this->returnButtons[row]->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_return_press.bmp", 2, 0); + this->returnButtons[row]->SetSize(this->returnButtons[row]->BitmapWidth(), this->returnButtons[row]->BitmapHeight()); + this->returnButtons[row]->Move(0xBA, y + 0x1D); + this->returnButtons[row]->SetTooltip(LookupMessage(MSI_RODEX_DELETE_TIME_HOUR)); + this->returnButtons[row]->SetId(0x136); + this->returnButtons[row]->Enable(0); + this->AddChild(this->returnButtons[row]); } UIBasicButton* button = new UIBasicButton(); - this->unknown_018C = button; + this->receiveButton = button; button->Configure(0x46, LookupMessage(MSI_RODEX_BUTTON_RECEIVE_ALL)); - this->unknown_018C->SetId(0x222); - this->unknown_018C->Move(4, 0x178); - this->AddChild(this->unknown_018C); + this->receiveButton->SetId(0x222); + this->receiveButton->Move(4, 0x178); + this->AddChild(this->receiveButton); button = new UIBasicButton(); - this->unknown_0190 = button; + this->deleteButton = button; button->Configure(0x46, LookupMessage(MSI_HOTKEYWND_SKILLBAR2)); - this->unknown_0190->Move(0x54, 0x188); - this->unknown_0190->SetId(0x224); - this->AddChild(this->unknown_0190); + this->deleteButton->Move(0x54, 0x188); + this->deleteButton->SetId(0x224); + this->AddChild(this->deleteButton); - this->unknown_0194 = new UIBitmapButton(); - this->unknown_0194->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_out.bmp", 0, 0); - this->unknown_0194->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_over.bmp", 1, 0); - this->unknown_0194->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_press.bmp", 2, 0); - this->unknown_0194->SetTooltip(LookupMessage(MSI_BOOK_PREV)); - this->unknown_0194->SetSize(this->unknown_0194->BitmapWidth(), this->unknown_0194->BitmapHeight()); - this->unknown_0194->Move(0xF6, 0x176); - this->unknown_0194->SetId(0x13C); - this->AddChild(this->unknown_0194); + this->previousPageButton = new UIBitmapButton(); + this->previousPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_out.bmp", 0, 0); + this->previousPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_over.bmp", 1, 0); + this->previousPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_prev_press.bmp", 2, 0); + this->previousPageButton->SetTooltip(LookupMessage(MSI_BOOK_PREV)); + this->previousPageButton->SetSize(this->previousPageButton->BitmapWidth(), this->previousPageButton->BitmapHeight()); + this->previousPageButton->Move(0xF6, 0x176); + this->previousPageButton->SetId(0x13C); + this->AddChild(this->previousPageButton); - this->unknown_0198 = new UIBitmapButton(); - this->unknown_0198->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_out.bmp", 0, 0); - this->unknown_0198->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_over.bmp", 1, 0); - this->unknown_0198->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_press.bmp", 2, 0); - this->unknown_0198->SetTooltip(LookupMessage(MSI_BOOK_NEXT)); - this->unknown_0198->SetSize(this->unknown_0198->BitmapWidth(), this->unknown_0198->BitmapHeight()); - this->unknown_0198->Move(0x10E, 0x176); - this->unknown_0198->SetId(0x13D); - this->AddChild(this->unknown_0198); + this->nextPageButton = new UIBitmapButton(); + this->nextPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_out.bmp", 0, 0); + this->nextPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_over.bmp", 1, 0); + this->nextPageButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_next_press.bmp", 2, 0); + this->nextPageButton->SetTooltip(LookupMessage(MSI_BOOK_NEXT)); + this->nextPageButton->SetSize(this->nextPageButton->BitmapWidth(), this->nextPageButton->BitmapHeight()); + this->nextPageButton->Move(0x10E, 0x176); + this->nextPageButton->SetId(0x13D); + this->AddChild(this->nextPageButton); const int searchTexts[2] = {0xC78, 0xC79}; for (int x = 0x16, index = 0; x < 0x7C; x += 0x33, ++index) { - this->unknown_01C0[index] = new UIRadioBtn(); - this->unknown_01C0[index]->SetSize(0x33, 12); + this->searchModeButtons[index] = new UIRadioBtn(); + this->searchModeButtons[index]->SetSize(0x33, 12); { - UIRadioBtn* radio = this->unknown_01C0[index]; + UIRadioBtn* radio = this->searchModeButtons[index]; const std::string unchecked = "유저인터페이스\\basic_interface\\rodexsystem\\renewal\\checkbox_search_off.bmp"; const std::string checked = "유저인터페이스\\basic_interface\\rodexsystem\\renewal\\checkbox_search_on.bmp"; radio->checkedBitmap = checked; radio->uncheckedBitmap = unchecked; radio->Invalidate(); } - this->unknown_01C0[index]->SetText(LookupMessage(searchTexts[index])); - this->unknown_01C0[index]->textColor = 0x654939; - this->unknown_01C0[index]->Move(x, 0x44); - this->unknown_01C0[index]->value = 0x141; - this->unknown_01C0[index]->SendMsg(this, UM_SETSTATE, 1 - index, 0, 0, 0); - this->AddChild(this->unknown_01C0[index]); + this->searchModeButtons[index]->SetText(LookupMessage(searchTexts[index])); + this->searchModeButtons[index]->textColor = 0x654939; + this->searchModeButtons[index]->Move(x, 0x44); + this->searchModeButtons[index]->value = 0x141; + this->searchModeButtons[index]->SendMsg(this, UM_SETSTATE, 1 - index, 0, 0, 0); + this->AddChild(this->searchModeButtons[index]); } - this->unknown_01C8 = new UIEditCtrl(); - this->unknown_01C8->SetSize(0x84, 0x12); - this->unknown_01C8->Move(0x85, 0x41); - this->unknown_01C8->maximum = 0x10; - this->unknown_01C8->flat = 0; - this->unknown_01C8->Border(0xAD, 0xAD, 0xAD); - this->unknown_01C8->preserveInput = 1; - this->AddChild(this->unknown_01C8); + this->searchEdit = new UIEditCtrl(); + this->searchEdit->SetSize(0x84, 0x12); + this->searchEdit->Move(0x85, 0x41); + this->searchEdit->maximum = 0x10; + this->searchEdit->flat = 0; + this->searchEdit->Border(0xAD, 0xAD, 0xAD); + this->searchEdit->preserveInput = 1; + this->AddChild(this->searchEdit); - this->unknown_01CC = new UIBitmapButton(); - this->unknown_01CC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_out.bmp", 0, 0); - this->unknown_01CC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_over.bmp", 1, 0); - this->unknown_01CC->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_press.bmp", 2, 0); - this->unknown_01CC->SetSize(this->unknown_01CC->BitmapWidth(), this->unknown_01CC->BitmapHeight()); - this->unknown_01CC->Move(0x108, 0x41); - this->unknown_01CC->SetId(0x141); - this->AddChild(this->unknown_01CC); + this->searchButton = new UIBitmapButton(); + this->searchButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_out.bmp", 0, 0); + this->searchButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_over.bmp", 1, 0); + this->searchButton->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_search_press.bmp", 2, 0); + this->searchButton->SetSize(this->searchButton->BitmapWidth(), this->searchButton->BitmapHeight()); + this->searchButton->Move(0x108, 0x41); + this->searchButton->SetId(0x141); + this->AddChild(this->searchButton); - this->unknown_01D0 = new UIBmpRadioBtn(); - this->unknown_01D0->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); - this->unknown_01D0->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); - this->unknown_01D0->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); + this->searchTab = new UIBmpRadioBtn(); + this->searchTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_out.bmp", 0); + this->searchTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_over.bmp", 1); + this->searchTab->SetBitmap("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\btn_listtab_empty_press.bmp", 2); { - UIBmpRadioBtn* tab = this->unknown_01D0; + UIBmpRadioBtn* tab = this->searchTab; const std::string label = LookupMessage(MSI_MSI_INVENTORY_TABNAME_4); tab->m_label = label; tab->Invalidate(); } { - const int textX = static_cast(static_cast(this->unknown_01D0->geometry.width - this->TextWidth(LookupMessage(MSI_MSI_INVENTORY_TABNAME_4), 0, 0, 12, 0, 0)) * g_depthAverageHalf); - UIBmpRadioBtn* tab = this->unknown_01D0; + const int textX = static_cast(static_cast(this->searchTab->geometry.width - this->TextWidth(LookupMessage(MSI_MSI_INVENTORY_TABNAME_4), 0, 0, 12, 0, 0)) * g_depthAverageHalf); + UIBmpRadioBtn* tab = this->searchTab; const int textY = static_cast(static_cast(tab->geometry.height - this->TextHeight(LookupMessage(MSI_MSI_INVENTORY_TABNAME_4), 0, 0, 12, 0, 0) - 3) * g_depthAverageHalf); tab->AddText(0, 12, 0xCCB5AD, true, false, textX, textY); - this->unknown_01D0->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); - this->unknown_01D0->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); + this->searchTab->AddText(1, 12, 0x9C3E1F, true, false, textX, textY); + this->searchTab->AddText(2, 12, 0x9C3E1F, true, false, textX, textY); } - this->unknown_01D0->Move(0xDF, 0x56); - this->AddChild(this->unknown_01D0); - this->unknown_01D0->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->searchTab->Move(0xDF, 0x56); + this->AddChild(this->searchTab); + this->searchTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_0134->Move(0x13, 0x56); - this->unknown_0130->Move(0x57, 0x56); - this->unknown_0138->Move(0x9B, 0x56); - this->unknown_013C->Move(0xF8, 0x14); - this->unknown_0140->Move(0x115, 0x12); + this->accountTab->Move(0x13, 0x56); + this->mailTab->Move(0x57, 0x56); + this->returnTab->Move(0x9B, 0x56); + this->refreshButton->Move(0xF8, 0x14); + this->writeButton->Move(0x115, 0x12); for (int y = 0x79, row = 0; y < 0x181; y += 0x2C, ++row) { this->checks[row]->Move(0x11, y + 7); - this->unknown_015C[row]->Move(0x45, y); - this->unknown_0144[row]->Move(0x47, y + 0x14); + this->subjectButtons[row]->Move(0x45, y); + this->senderButtons[row]->Move(0x47, y + 0x14); } - this->unknown_018C->Move(4, 0x188); - this->unknown_0194->Move(0xFF, 0x186); - this->unknown_0198->Move(0x117, 0x186); + this->receiveButton->Move(4, 0x188); + this->previousPageButton->Move(0xFF, 0x186); + this->nextPageButton->Move(0x117, 0x186); this->RefreshMailLists(); this->Invalidate(); } @@ -398,32 +398,32 @@ void UIRodexInboxWnd::Paint() { this->ClearSurface(0xFF00FF); this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\bg_rodex_list.bmp"))), false); for (int i = 0; i < 6; ++i) { - this->unknown_01A8[i]->Enable(0); + this->returnButtons[i]->Enable(0); } - if (!g_rodexMailStore->unknown_001C) { + if (!g_rodexMailStore->isPageComplete) { this->DrawBitmap(0x1F, 0x9A, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\rodexsystem\\renewal\\img_notice.bmp"))), true); this->DrawWrappedFormattedText(0x1F, 0xE5, std::string(LookupMessage(MSI_RODEX_SENDER)), 0xF8, 3, 6, 0, 12, 0, 0); this->DrawCenteredText(0x1F, 0x10E, LookupMessage(MSI_CLOSE_SETUP), 0xF8, 0, 0x12, 0xC89482, 1); return; } - unsigned int index = this->unknown_019C * 6; - if (this->unknown_01D4 == 1) { + unsigned int index = this->page * 6; + if (this->searchActive == 1) { for (int row = 0; row < 6; ++row, ++index) { if (index < this->searchResults.size()) { std::map* mails = RodexMailsOfType(this->searchResults[index].first); if (mails) { std::map::iterator it = mails->find(this->searchResults[index].second); if (it != mails->end()) { - this->DrawMailIcons(row, it->second.unknown_0001, it->second.isRead, this->searchResults[index].first == 2); - this->DrawExpireTime(row, it->second.unknown_001C, it->second.unknown_0020, this->searchResults[index].first == 2); + this->DrawMailIcons(row, it->second.type, it->second.isRead, this->searchResults[index].first == 2); + this->DrawExpireTime(row, it->second.sentAt, it->second.expiresAt, this->searchResults[index].first == 2); if (this->expired == 1) { this->expired = 0; mails->erase(it); } else { - this->SetMailRow(row, this->searchResults[index].second, it->second.unknown_0004, it->second.unknown_0024, it->second.isRead, - it->second.unknown_0190, it->second.unknown_0194); + this->SetMailRow(row, this->searchResults[index].second, it->second.sender, it->second.title, it->second.isRead, + it->second.isReturned, it->second.isKnownSender); } } } @@ -431,30 +431,30 @@ void UIRodexInboxWnd::Paint() { this->checks[row]->Show(0); this->checks[row]->SetChecked(0); this->checks[row]->m_message = 0; - this->unknown_0144[row]->Enable(0); - this->unknown_015C[row]->Enable(0); + this->senderButtons[row]->Enable(0); + this->subjectButtons[row]->Enable(0); } } } else { for (int row = 0; row < 6; ++row, ++index) { this->checks[row]->Show(0); - this->unknown_0144[row]->Enable(0); - this->unknown_015C[row]->Enable(0); - switch (g_rodexMailStore->unknown_0010) { + this->senderButtons[row]->Enable(0); + this->subjectButtons[row]->Enable(0); + switch (g_rodexMailStore->inboxType) { case MAIL_INBOX_ACCOUNT: if (index < this->mails1.size()) { std::map::iterator it = g_rodexMailStore->m_mails1.find(this->mails1[index].second); if (it != g_rodexMailStore->m_mails1.end()) { - this->DrawMailIcons(row, it->second.unknown_0001, it->second.isRead, 0); - this->DrawExpireTime(row, it->second.unknown_001C, it->second.unknown_0020, 0); + this->DrawMailIcons(row, it->second.type, it->second.isRead, 0); + this->DrawExpireTime(row, it->second.sentAt, it->second.expiresAt, 0); if (this->expired == 1) { this->expired = 0; g_rodexMailStore->m_mails1.erase(it); } else { this->checks[row]->Show(1); - this->unknown_0144[row]->Enable(1); - this->unknown_015C[row]->Enable(1); - this->SetMailRow(row, it->first, it->second.unknown_0004, it->second.unknown_0024, it->second.isRead, it->second.unknown_0190, -1); + this->senderButtons[row]->Enable(1); + this->subjectButtons[row]->Enable(1); + this->SetMailRow(row, it->first, it->second.sender, it->second.title, it->second.isRead, it->second.isReturned, -1); } } } @@ -463,34 +463,34 @@ void UIRodexInboxWnd::Paint() { if (index < this->mails2.size()) { std::map::iterator it = g_rodexMailStore->m_mails2.find(this->mails2[index].second); if (it != g_rodexMailStore->m_mails2.end()) { - this->DrawMailIcons(row, it->second.unknown_0001, it->second.isRead, 0); - this->DrawExpireTime(row, it->second.unknown_001C, it->second.unknown_0020, 0); + this->DrawMailIcons(row, it->second.type, it->second.isRead, 0); + this->DrawExpireTime(row, it->second.sentAt, it->second.expiresAt, 0); if (this->expired == 1) { this->expired = 0; g_rodexMailStore->m_mails2.erase(it); } else { this->checks[row]->Show(1); - this->unknown_0144[row]->Enable(1); - this->unknown_015C[row]->Enable(1); - this->SetMailRow(row, it->first, it->second.unknown_0004, it->second.unknown_0024, it->second.isRead, it->second.unknown_0190, -1); + this->senderButtons[row]->Enable(1); + this->subjectButtons[row]->Enable(1); + this->SetMailRow(row, it->first, it->second.sender, it->second.title, it->second.isRead, it->second.isReturned, -1); } } } break; default: - this->unknown_0144[row]->Enable(0); - this->unknown_015C[row]->Enable(0); + this->senderButtons[row]->Enable(0); + this->subjectButtons[row]->Enable(0); if (index < this->mails0.size()) { std::map::iterator it = g_rodexMailStore->m_mails0.find(this->mails0[index].second); if (it != g_rodexMailStore->m_mails0.end()) { - this->DrawMailIcons(row, it->second.unknown_0001, it->second.isRead, 0); - this->DrawExpireTime(row, it->second.unknown_001C, it->second.unknown_0020, 0); + this->DrawMailIcons(row, it->second.type, it->second.isRead, 0); + this->DrawExpireTime(row, it->second.sentAt, it->second.expiresAt, 0); if (this->expired == 1) { this->expired = 0; g_rodexMailStore->m_mails0.erase(it); } else { - this->SetMailRow(row, it->first, it->second.unknown_0004, it->second.unknown_0024, it->second.isRead, it->second.unknown_0190, - it->second.unknown_0194); + this->SetMailRow(row, it->first, it->second.sender, it->second.title, it->second.isRead, it->second.isReturned, + it->second.isKnownSender); } } } @@ -498,42 +498,42 @@ void UIRodexInboxWnd::Paint() { } } - this->DrawRightAlignedText(0x111, 0x2E, FormatOwnedString("%d", g_rodexMailStore->unknown_0014).c_str(), 0, 0, 11, 0xC89482, 1); + this->DrawRightAlignedText(0x111, 0x2E, FormatOwnedString("%d", g_rodexMailStore->dailySendCount).c_str(), 0, 0, 11, 0xC89482, 1); this->DrawTextAt(0x111, 0x2E, LookupMessage(MSI_EMBLEM_CHANGE), 0, 0, 11, 0xC89482, 1, 0); } // OFFSET: 0x00808FD0 // FUNCTION: fn_10056 void UIRodexInboxWnd::SetButtonsDisabled(unsigned char disabled) { - UIButton* button = this->unknown_0194; + UIButton* button = this->previousPageButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_0194->Invalidate(); + this->previousPageButton->Invalidate(); - button = this->unknown_0198; + button = this->nextPageButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_0198->Invalidate(); + this->nextPageButton->Invalidate(); - button = this->unknown_013C; + button = this->refreshButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_013C->Invalidate(); + this->refreshButton->Invalidate(); - button = this->unknown_018C; + button = this->receiveButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_018C->Invalidate(); + this->receiveButton->Invalidate(); - button = this->unknown_0140; + button = this->writeButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_0140->Invalidate(); + this->writeButton->Invalidate(); - button = this->unknown_0190; + button = this->deleteButton; button->SetDisabled(disabled); button->Invalidate(); - this->unknown_0190->Invalidate(); + this->deleteButton->Invalidate(); this->Invalidate(); } @@ -546,7 +546,7 @@ void UIRodexInboxWnd::SetMailRow(int row, std::int64_t mailId, std::string name, const std::pair stripped = RemoveLineBreakTag(subjectText); subjectText = stripped.second; if (stripped.first == true) { - this->unknown_0144[row]->SetTooltip(""); + this->senderButtons[row]->SetTooltip(""); } nameText = g_navigationLinkParser->ExpandMessages(nameText); @@ -555,46 +555,46 @@ void UIRodexInboxWnd::SetMailRow(int row, std::int64_t mailId, std::string name, this->checks[row]->Show(1); this->checks[row]->m_message = static_cast(mailId); - UITextButton* button = this->unknown_0144[row]; + UITextButton* button = this->senderButtons[row]; { const std::string label = nameText.c_str(); button->label = label; } - this->unknown_0144[row]->ResizeToTextClipped(0x8C, this->unknown_0144[row]->geometry.height); - this->unknown_0144[row]->m_value = static_cast(mailId); - this->unknown_0144[row]->Enable(1); + this->senderButtons[row]->ResizeToTextClipped(0x8C, this->senderButtons[row]->geometry.height); + this->senderButtons[row]->m_value = static_cast(mailId); + this->senderButtons[row]->Enable(1); std::uint32_t color; if (noAttachment == 0) { - this->unknown_01A8[row]->Enable(1); - this->unknown_01A8[row]->m_argument = static_cast(mailId); + this->returnButtons[row]->Enable(1); + this->returnButtons[row]->m_argument = static_cast(mailId); color = read == 1 ? 0xC8C8E6 : 0xFF; } else { color = read == 1 ? 0xC8C8C8 : 0; } - this->unknown_015C[row]->m_color = color; - button = this->unknown_015C[row]; + this->subjectButtons[row]->m_color = color; + button = this->subjectButtons[row]; { const std::string label = subjectText.c_str(); button->label = label; } - this->unknown_015C[row]->ResizeToTextClipped(0x8C, this->unknown_015C[row]->geometry.height); - this->unknown_015C[row]->m_value = static_cast(mailId); - this->unknown_015C[row]->Enable(1); + this->subjectButtons[row]->ResizeToTextClipped(0x8C, this->subjectButtons[row]->geometry.height); + this->subjectButtons[row]->m_value = static_cast(mailId); + this->subjectButtons[row]->Enable(1); if (returned == 1) { this->checks[row]->m_message = -1; - this->unknown_0144[row]->Enable(0); - this->unknown_015C[row]->m_color = 0xC8C8C8; - button = this->unknown_015C[row]; + this->senderButtons[row]->Enable(0); + this->subjectButtons[row]->m_color = 0xC8C8C8; + button = this->subjectButtons[row]; { const std::string label = LookupMessage(MSI_THAI_PERSONALINFO_DROP); button->label = label; } - this->unknown_015C[row]->ResizeToTextClipped(0x8C, this->unknown_015C[row]->geometry.height); - this->unknown_015C[row]->m_value = -1; - this->unknown_015C[row]->Enable(1); + this->subjectButtons[row]->ResizeToTextClipped(0x8C, this->subjectButtons[row]->geometry.height); + this->subjectButtons[row]->m_value = -1; + this->subjectButtons[row]->Enable(1); } } @@ -634,7 +634,7 @@ void UIRodexInboxWnd::DrawExpireTime(int row, __time32_t sendTime, __time32_t ex // OFFSET: 0x008098D0 // FUNCTION: fn_10059 void UIRodexInboxWnd::ClearChecks() { - ++this->unknown_019C; + ++this->page; for (int i = 0; i < 6; ++i) { this->checks[i]->SetChecked(0); this->checks[i]->m_message = 0; @@ -683,17 +683,17 @@ void UIRodexInboxWnd::SearchBySender(const std::string keyword) { std::vector& results = this->searchResults; std::for_each(g_rodexMailStore->m_mails0.begin(), g_rodexMailStore->m_mails0.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0004.find(keyword, 0) != std::string::npos) { + if (mail.second.sender.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(0, mail.first)); } }); std::for_each(g_rodexMailStore->m_mails1.begin(), g_rodexMailStore->m_mails1.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0004.find(keyword, 0) != std::string::npos) { + if (mail.second.sender.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(1, mail.first)); } }); std::for_each(g_rodexMailStore->m_mails2.begin(), g_rodexMailStore->m_mails2.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0004.find(keyword, 0) != std::string::npos) { + if (mail.second.sender.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(2, mail.first)); } }); @@ -708,17 +708,17 @@ void UIRodexInboxWnd::SearchByTitle(const std::string keyword) { std::vector& results = this->searchResults; std::for_each(g_rodexMailStore->m_mails0.begin(), g_rodexMailStore->m_mails0.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0024.find(keyword, 0) != std::string::npos) { + if (mail.second.title.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(0, mail.first)); } }); std::for_each(g_rodexMailStore->m_mails1.begin(), g_rodexMailStore->m_mails1.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0024.find(keyword, 0) != std::string::npos) { + if (mail.second.title.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(1, mail.first)); } }); std::for_each(g_rodexMailStore->m_mails2.begin(), g_rodexMailStore->m_mails2.end(), [&results, keyword](const std::pair& mail) { - if (mail.second.unknown_0024.find(keyword, 0) != std::string::npos) { + if (mail.second.title.find(keyword, 0) != std::string::npos) { results.push_back(RodexMailEntry(2, mail.first)); } }); @@ -738,7 +738,7 @@ void __stdcall RequestRodexMailAttachments(int type, std::int64_t mailId) { if (mails != nullptr) { std::map::iterator mail = mails->find(mailId); if (mail != mails->end()) { - flags = mail->second.unknown_0001; + flags = mail->second.type; } } @@ -760,16 +760,16 @@ void __stdcall RequestRodexMailAttachments(int type, std::int64_t mailId) { // OFFSET: 0x008078E0 // FUNCTION: fn_10054 void UIRodexInboxWnd::InitializeMailActions() { - this->unknown_019C = 0; + this->page = 0; for (int i = 0; i < 6; ++i) { this->checks[i]->SetChecked(0); this->checks[i]->m_message = 0; } - this->unknown_018C->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_ALL)); - this->unknown_018C->SetId(0x222); - this->unknown_0190->SetText(LookupMessage(MSI_HOTKEYWND_SKILLBAR2)); - this->unknown_0190->SetId(0x224); + this->receiveButton->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_ALL)); + this->receiveButton->SetId(0x222); + this->deleteButton->SetText(LookupMessage(MSI_HOTKEYWND_SKILLBAR2)); + this->deleteButton->SetId(0x224); this->Invalidate(); } @@ -799,7 +799,7 @@ bool RodexMailEntryLess::operator()(const RodexMailEntry& left, const RodexMailE } else if (rightMail->second.isRead == 0) { return false; } - return leftMail->second.unknown_001C > rightMail->second.unknown_001C; + return leftMail->second.sentAt > rightMail->second.sentAt; } // OFFSET: 0x008054D0 @@ -811,12 +811,12 @@ bool __stdcall RequestRodexMailAction(int type, std::int64_t mailId) { } std::map::iterator mail = mails->find(mailId); - if (mail == mails->end() || (mail->second.unknown_0001 & 6) != 0) { + if (mail == mails->end() || (mail->second.type & 6) != 0) { return false; } g_modeMgr.GetGameMode()->SendMsg(MM_DELETE_MAIL, static_cast(mailId), type, 0, 0); - if (g_windowMgr.unknown_045C != 0) { + if (g_windowMgr.rodexContentsWnd != 0) { g_windowMgr.CloseWindow(WID_RODEXCONTENTSWND); } return true; @@ -827,7 +827,7 @@ bool __stdcall RequestRodexMailAction(int type, std::int64_t mailId) { void UIRodexInboxWnd::RequestAllMailActions() { int requested = 0; int skipped = 0; - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { for (std::vector::iterator entry = this->searchResults.begin(); entry != this->searchResults.end(); ++entry) { std::map* mails = RodexMailsOfType(entry->first); if (mails == nullptr) { @@ -839,7 +839,7 @@ void UIRodexInboxWnd::RequestAllMailActions() { continue; } - if ((mail->second.unknown_0001 & 6) == 0) { + if ((mail->second.type & 6) == 0) { g_modeMgr.GetGameMode()->SendMsg(MM_DELETE_MAIL, static_cast(entry->second), entry->first, 0, 0); ++requested; } else { @@ -847,14 +847,14 @@ void UIRodexInboxWnd::RequestAllMailActions() { } } } else { - int type = g_rodexMailStore->unknown_0010; + int type = g_rodexMailStore->inboxType; std::map* mails = RodexMailsOfType(type); if (mails == nullptr) { return; } for (std::map::iterator mail = mails->begin(); mail != mails->end(); ++mail) { - if ((mail->second.unknown_0001 & 6) == 0) { + if ((mail->second.type & 6) == 0) { g_modeMgr.GetGameMode()->SendMsg(MM_DELETE_MAIL, static_cast(mail->first), type, 0, 0); ++requested; } else { @@ -863,7 +863,7 @@ void UIRodexInboxWnd::RequestAllMailActions() { } } - if (requested > 0 && g_windowMgr.unknown_045C != 0) { + if (requested > 0 && g_windowMgr.rodexContentsWnd != 0) { g_windowMgr.CloseWindow(WID_RODEXCONTENTSWND); } if (skipped > 0) { @@ -874,12 +874,12 @@ void UIRodexInboxWnd::RequestAllMailActions() { // OFFSET: 0x00807AA0 // FUNCTION: fn_10055 int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { - if (g_windowMgr.unknown_0458 != nullptr || g_windowMgr.unknown_045C != nullptr) { + if (g_windowMgr.rodexComposeWnd != nullptr || g_windowMgr.rodexContentsWnd != nullptr) { return 0; } CMode* mode = g_modeMgr.GetGameMode(); - if (g_rodexMailStore->unknown_001C == false && !(message == UM_COMMAND && argument1 == ID_CLOSE)) { + if (g_rodexMailStore->isPageComplete == false && !(message == UM_COMMAND && argument1 == ID_CLOSE)) { return 0; } @@ -889,7 +889,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume case ID_RADIOBTN: if (argument2 == 0x141) { for (int i = 0; i < 2; ++i) { - UIRadioBtn* radio = this->unknown_01C0[i]; + UIRadioBtn* radio = this->searchModeButtons[i]; if (radio == sender) { radio->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); } else { @@ -898,32 +898,32 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } this->Invalidate(); } else { - this->unknown_0130->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_0134->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_0138->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); - this->unknown_01D0->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->mailTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->accountTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->returnTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); + this->searchTab->SendMsg(this, UM_SETSTATE, 0, 0, 0, 0); sender->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); for (int i = 0; i < 6; ++i) { this->checks[i]->SetChecked(0); this->checks[i]->m_message = 0; } - this->unknown_019C = 0; + this->page = 0; - if (this->unknown_0130 == sender) { - g_rodexMailStore->unknown_0010 = 0; - } else if (this->unknown_0134 == sender) { - g_rodexMailStore->unknown_0010 = 1; - } else if (this->unknown_0138 == sender) { - g_rodexMailStore->unknown_0010 = 2; + if (this->mailTab == sender) { + g_rodexMailStore->inboxType = 0; + } else if (this->accountTab == sender) { + g_rodexMailStore->inboxType = 1; + } else if (this->returnTab == sender) { + g_rodexMailStore->inboxType = 2; } - this->unknown_01D4 = this->unknown_01D0 == sender; + this->searchActive = this->searchTab == sender; this->Invalidate(); } break; case ID_PREV_PAGE: - if (--this->unknown_019C < 0) { - this->unknown_019C = 0; + if (--this->page < 0) { + this->page = 0; } else { for (int i = 0; i < 6; ++i) { this->checks[i]->SetChecked(0); @@ -934,11 +934,11 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume break; case ID_NEXT_PAGE: { - if (this->unknown_01D4 == 1) { - if (this->searchResults.size() > static_cast((this->unknown_019C + 1) * 6)) { + if (this->searchActive == 1) { + if (this->searchResults.size() > static_cast((this->page + 1) * 6)) { this->ClearChecks(); } - } else if (RodexMailsOfType(g_rodexMailStore->unknown_0010)->size() > static_cast((this->unknown_019C + 1) * 6)) { + } else if (RodexMailsOfType(g_rodexMailStore->inboxType)->size() > static_cast((this->page + 1) * 6)) { this->ClearChecks(); } break; @@ -981,12 +981,12 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume break; case ID_DELETE: - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { std::vector selected; for (int i = 0; i < 6; ++i) { UICheckBox* check = this->checks[i]; - if (check->geometry.visible == 1 && check->geometry.unknown_0030 != 0 && check->m_message != -1) { - const RodexMailEntry entry = this->searchResults[this->unknown_019C * 6 + i]; + if (check->geometry.visible == 1 && check->geometry.state != 0 && check->m_message != -1) { + const RodexMailEntry entry = this->searchResults[this->page * 6 + i]; selected.push_back(entry); } } @@ -1011,7 +1011,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume std::list selected; for (int i = 0; i < 6; ++i) { UICheckBox* check = this->checks[i]; - if (check->geometry.visible == 1 && check->geometry.unknown_0030 != 0) { + if (check->geometry.visible == 1 && check->geometry.state != 0) { const int id = check->m_message; if (id != -1) { selected.push_back(id); @@ -1028,7 +1028,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume bool success = true; for (std::list::iterator id = selected.begin(); id != selected.end(); ++id) { - success &= RequestRodexMailAction(g_rodexMailStore->unknown_0010, *id); + success &= RequestRodexMailAction(g_rodexMailStore->inboxType, *id); } if (!success) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILE_MAIL_RECIEVER_INFO)), 0x64FFFF, 0, 0, 0); @@ -1039,39 +1039,39 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume break; case ID_SEARCH: - if (this->unknown_01C0[0]->geometry.unknown_0030 == 1) { - this->SearchByTitle(this->unknown_01C8->Text()); - } else if (this->unknown_01C0[1]->geometry.unknown_0030 == 1) { - this->SearchBySender(this->unknown_01C8->Text()); + if (this->searchModeButtons[0]->geometry.state == 1) { + this->SearchByTitle(this->searchEdit->Text()); + } else if (this->searchModeButtons[1]->geometry.state == 1) { + this->SearchBySender(this->searchEdit->Text()); } - this->SendMsg(this->unknown_01D0, UM_COMMAND, ID_RADIOBTN, 0, 0, 0); + this->SendMsg(this->searchTab, UM_COMMAND, ID_RADIOBTN, 0, 0, 0); this->Invalidate(); break; case ID_CHECK: { int checked = 0; for (int i = 0; i < 6; ++i) { - if (this->checks[i]->geometry.unknown_0030 > 0) { + if (this->checks[i]->geometry.state > 0) { ++checked; } } if (checked != 0) { - this->unknown_018C->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_SELECTED)); - this->unknown_018C->SetId(0xD3); - this->unknown_0190->SetText(LookupMessage(MSI_RODEX_MESSAGE_RECEIVE_ALL)); - this->unknown_0190->SetId(0x223); + this->receiveButton->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_SELECTED)); + this->receiveButton->SetId(0xD3); + this->deleteButton->SetText(LookupMessage(MSI_RODEX_MESSAGE_RECEIVE_ALL)); + this->deleteButton->SetId(0x223); } else { - this->unknown_018C->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_ALL)); - this->unknown_018C->SetId(0x222); - this->unknown_0190->SetText(LookupMessage(MSI_HOTKEYWND_SKILLBAR2)); - this->unknown_0190->SetId(0x224); + this->receiveButton->SetText(LookupMessage(MSI_RODEX_BUTTON_RECEIVE_ALL)); + this->receiveButton->SetId(0x222); + this->deleteButton->SetText(LookupMessage(MSI_HOTKEYWND_SKILLBAR2)); + this->deleteButton->SetId(0x224); } break; } case 0x136: - if (g_rodexMailStore->unknown_0010 == MAIL_INBOX_NORMAL) { + if (g_rodexMailStore->inboxType == MAIL_INBOX_NORMAL) { std::map::iterator mail = g_rodexMailStore->m_mails0.find(argument2); if (mail != g_rodexMailStore->m_mails0.end()) { PACKET_CZ_RODEX_RETURN packet; @@ -1084,10 +1084,10 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume case 0x222: { std::string type; - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { type = LookupMessage(MSI_MSI_INVENTORY_TABNAME_4); } else { - switch (g_rodexMailStore->unknown_0010) { + switch (g_rodexMailStore->inboxType) { case MAIL_INBOX_NORMAL: type = LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION); break; @@ -1109,10 +1109,10 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume case 0x224: { std::string type; - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { type = LookupMessage(MSI_MSI_INVENTORY_TABNAME_4); } else { - switch (g_rodexMailStore->unknown_0010) { + switch (g_rodexMailStore->inboxType) { case MAIL_INBOX_NORMAL: type = LookupMessage(MSI_FAILED_PET_AUTO_FEEDING_BY_ITEMACTION); break; @@ -1127,22 +1127,22 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume const std::string text = FormatOwnedString(LookupMessage(MSI_HOTKEYGUIDEWND_LEFT), type.c_str()); if (g_windowMgr.Confirm(text.c_str(), 2, false, false, 0, "Message", 280, 120, 0) == 0xBB) { - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { for (std::vector::iterator entry = this->searchResults.begin(); entry != this->searchResults.end(); ++entry) { if (entry->first == 0) { std::map::iterator mail = g_rodexMailStore->m_mails0.find(entry->second); - if (mail != g_rodexMailStore->m_mails0.end() && mail->second.unknown_0194 <= 0) { + if (mail != g_rodexMailStore->m_mails0.end() && mail->second.isKnownSender <= 0) { continue; } } RequestRodexMailAttachments(entry->first, entry->second); } } else { - const int mailType = g_rodexMailStore->unknown_0010; + const int mailType = g_rodexMailStore->inboxType; std::map* mails = RodexMailsOfType(mailType); if (mails != nullptr) { for (std::map::iterator mail = mails->begin(); mail != mails->end(); ++mail) { - if (mail->second.unknown_0194 > 0) { + if (mail->second.isKnownSender > 0) { RequestRodexMailAttachments(mailType, mail->first); } } @@ -1153,12 +1153,12 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } case 0x223: { - if (this->unknown_01D4 == 1) { + if (this->searchActive == 1) { std::vector selected; for (int i = 0; i < 6; ++i) { UICheckBox* check = this->checks[i]; - if (check->geometry.visible == 1 && check->geometry.unknown_0030 != 0 && check->m_message != -1) { - const RodexMailEntry entry = this->searchResults[this->unknown_019C * 6 + i]; + if (check->geometry.visible == 1 && check->geometry.state != 0 && check->m_message != -1) { + const RodexMailEntry entry = this->searchResults[this->page * 6 + i]; selected.push_back(entry); } } @@ -1177,7 +1177,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume std::vector selected; for (int i = 0; i < 6; ++i) { UICheckBox* check = this->checks[i]; - if (check->geometry.visible == 1 && check->geometry.unknown_0030 != 0) { + if (check->geometry.visible == 1 && check->geometry.state != 0) { const int id = check->m_message; if (id != -1) { selected.push_back(id); @@ -1188,7 +1188,7 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume if (selected.size() != 0 && g_windowMgr.Confirm(LookupMessage(MSI_CHANGE_SKILLBER), 2, false, false, 0, "Message", 280, 120, 0) == 0xBB) { for (std::vector::iterator id = selected.begin(); id != selected.end(); ++id) { - RequestRodexMailAttachments(g_rodexMailStore->unknown_0010, *id); + RequestRodexMailAttachments(g_rodexMailStore->inboxType, *id); } for (int i = 0; i < 6; ++i) { this->checks[i]->SetChecked(0); @@ -1207,24 +1207,24 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume case UM_TEXT_LBTN_UP: if (argument1 == 0x142) { - if (g_rodexMailStore->unknown_0010 == MAIL_INBOX_NORMAL) { + if (g_rodexMailStore->inboxType == MAIL_INBOX_NORMAL) { std::map::iterator mail = g_rodexMailStore->m_mails0.find(argument2); - if (mail != g_rodexMailStore->m_mails0.end() && (mail->second.unknown_0001 & 8) == 0 && mail->second.unknown_0004.size() != 0) { - const std::pair title = RemoveLineBreakTag(mail->second.unknown_0024); + if (mail != g_rodexMailStore->m_mails0.end() && (mail->second.type & 8) == 0 && mail->second.sender.size() != 0) { + const std::pair title = RemoveLineBreakTag(mail->second.title); if (title.first != true) { - mode->SendMsg(MM_OPEN_WRITE_RODEX, reinterpret_cast(mail->second.unknown_0004.c_str()), 0, 0, 0); + mode->SendMsg(MM_OPEN_WRITE_RODEX, reinterpret_cast(mail->second.sender.c_str()), 0, 0, 0); } } } } else if (argument1 == 0x143) { std::map::iterator mail = g_rodexMailStore->m_mails0.find(argument2); - if (mail != g_rodexMailStore->m_mails0.end() && mail->second.unknown_0194 == 0) { + if (mail != g_rodexMailStore->m_mails0.end() && mail->second.isKnownSender == 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_GRADE_ENCHANT_SUCCESS_REFINING_LEVEL_DISAPPEAR)), 0xFF, 0, 0, 0); if (g_windowMgr.Confirm(LookupMessage(MSI_GRADE_ENCHANT_SUCCESS_REFINING_LEVEL_DISAPPEAR), 2, false, false, 0, "Message", 280, 120, 0) == 0xBC) { break; } } - mode->SendMsg(MM_OPEN_MAIL, argument2, g_rodexMailStore->unknown_0010, 0, 0); + mode->SendMsg(MM_OPEN_MAIL, argument2, g_rodexMailStore->inboxType, 0, 0); } break; @@ -1236,8 +1236,8 @@ int UIRodexInboxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume break; case UM_DEFPUSH: - if (this->unknown_01C8 == sender) { - this->SendMsg(this->unknown_01CC, UM_COMMAND, ID_SEARCH, 0, 0, 0); + if (this->searchEdit == sender) { + this->SendMsg(this->searchButton, UM_COMMAND, ID_SEARCH, 0, 0, 0); } break; diff --git a/Source/UI/Rodex/UIRodexInboxWnd.h b/Source/UI/Rodex/UIRodexInboxWnd.h index a65474ded..afa5617e7 100644 --- a/Source/UI/Rodex/UIRodexInboxWnd.h +++ b/Source/UI/Rodex/UIRodexInboxWnd.h @@ -65,27 +65,27 @@ public: void InitializeMailActions(); void RequestAllMailActions(); - /* 0130 */ UIBmpRadioBtn* unknown_0130; - /* 0134 */ UIBmpRadioBtn* unknown_0134; - /* 0138 */ UIBmpRadioBtn* unknown_0138; - /* 013C */ UIBitmapButton* unknown_013C; - /* 0140 */ UIBitmapButton* unknown_0140; - /* 0144 */ UITextButton* unknown_0144[6]; - /* 015C */ UITextButton* unknown_015C[6]; + /* 0130 */ UIBmpRadioBtn* mailTab; + /* 0134 */ UIBmpRadioBtn* accountTab; + /* 0138 */ UIBmpRadioBtn* returnTab; + /* 013C */ UIBitmapButton* refreshButton; + /* 0140 */ UIBitmapButton* writeButton; + /* 0144 */ UITextButton* senderButtons[6]; + /* 015C */ UITextButton* subjectButtons[6]; /* 0174 */ UICheckBox* checks[6]; - /* 018C */ UIBasicButton* unknown_018C; - /* 0190 */ UIBasicButton* unknown_0190; - /* 0194 */ UIBitmapButton* unknown_0194; - /* 0198 */ UIBitmapButton* unknown_0198; - /* 019C */ int unknown_019C; - /* 01A0 */ int unknown_01A0; + /* 018C */ UIBasicButton* receiveButton; + /* 0190 */ UIBasicButton* deleteButton; + /* 0194 */ UIBitmapButton* previousPageButton; + /* 0198 */ UIBitmapButton* nextPageButton; + /* 019C */ int page; + /* 01A0 */ int pageCount; /* 01A4 */ unsigned char expired; - /* 01A8 */ UIBitmapButton* unknown_01A8[6]; - /* 01C0 */ UIRadioBtn* unknown_01C0[2]; - /* 01C8 */ UIEditCtrl* unknown_01C8; - /* 01CC */ UIBitmapButton* unknown_01CC; - /* 01D0 */ UIBmpRadioBtn* unknown_01D0; - /* 01D4 */ unsigned char unknown_01D4; + /* 01A8 */ UIBitmapButton* returnButtons[6]; + /* 01C0 */ UIRadioBtn* searchModeButtons[2]; + /* 01C8 */ UIEditCtrl* searchEdit; + /* 01CC */ UIBitmapButton* searchButton; + /* 01D0 */ UIBmpRadioBtn* searchTab; + /* 01D4 */ unsigned char searchActive; /* 01D8 */ std::vector searchResults; /* 01E4 */ std::vector mails0; /* 01F0 */ std::vector mails1; @@ -94,7 +94,7 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(RodexMailEntry) == 0x10); -static_assert(offsetof(UIRodexInboxWnd, unknown_012C) == 0x12C); +static_assert(offsetof(UIRodexInboxWnd, filterButton) == 0x12C); static_assert(offsetof(UIRodexInboxWnd, checks) == 0x174); static_assert(offsetof(UIRodexInboxWnd, expired) == 0x1A4); static_assert(offsetof(UIRodexInboxWnd, searchResults) == 0x1D8); diff --git a/Source/UI/RuneSystem/UIRuneSystemWindows.h b/Source/UI/RuneSystem/UIRuneSystemWindows.h index cd9a91628..9d2a4e3e4 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWindows.h +++ b/Source/UI/RuneSystem/UIRuneSystemWindows.h @@ -97,7 +97,7 @@ public: __declspec(noinline) void DrawRuneIcon(int x, int y, const char* name, bool active); /* 00B4 */ int m_itemHeight; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int m_slotSpacing; /* 00BC */ int m_selected; }; @@ -216,9 +216,9 @@ public: /* 007C */ RuneSetData* m_runeSet; /* 0080 */ UIRuneSystem_ActiveWnd* m_activeWnd; - /* 0084 */ UIBitmapButton* unknown_0084; - /* 0088 */ UIBitmapButton* unknown_0088; - /* 008C */ UIBitmapButton* unknown_008C; + /* 0084 */ UIBitmapButton* m_activateButton; + /* 0088 */ UIBitmapButton* m_equipButton; + /* 008C */ UIBitmapButton* m_unequipButton; /* 0090 */ UIRuneSystemTab* m_tab; /* 0094 */ UIGage_Circle* m_gauge; /* 0098 */ UIStaticText* m_gradeText; @@ -255,8 +255,8 @@ public: void SelectDecomType(unsigned int type); __declspec(noinline) void SetItem(int itemId); - /* 007C */ std::string unknown_007C; - /* 0094 */ std::string unknown_0094; + /* 007C */ std::string m_itemName; + /* 0094 */ std::string m_itemImagePath; /* 00AC */ unsigned int m_ownedCount; /* 00B0 */ std::vector* m_decomList; /* 00B4 */ int m_itemId; diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp index 51fb238ef..7e4edc6f1 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.cpp +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.cpp @@ -33,8 +33,8 @@ void UIRuneSetList::ScrollBy(int delta) { // OFFSET: 0x00816830 // FUNCTION: fn_10166 void UIRune_Decom::Reset() { - this->unknown_007C.clear(); - this->unknown_0094.clear(); + this->m_itemName.clear(); + this->m_itemImagePath.clear(); this->m_ownedCount = 0; this->m_itemId = 0; this->m_decomList = nullptr; @@ -125,7 +125,7 @@ void UIRuneSetReWard::Paint() { } else if (this->m_state == 0) { name = &this->m_texts[0]; } else if (this->m_state == 1) { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: name = &this->m_names[3]; break; @@ -138,7 +138,7 @@ void UIRuneSetReWard::Paint() { break; } } else { - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: name = &this->m_names[0]; break; @@ -166,7 +166,7 @@ void UIRuneSetReWard::Paint() { // FUNCTION: fn_10184 void UIRuneSystemTab::Paint() { ResourceMgr& resources = ResourceMgr::Instance(); - const std::string name = FormatOwnedString(this->m_label.c_str(), this->geometry.unknown_0030); + const std::string name = FormatOwnedString(this->m_label.c_str(), this->geometry.state); this->DrawBitmap(0, 0, &static_cast(resources.Load(Resolve(name.c_str())))->image, false); } @@ -264,10 +264,10 @@ void UIRuneSystemTab::OnLBtnDown(int x, int) { index = index > 0 ? index : 0; index = index < this->m_count - 1 ? index : this->m_count - 1; - if (index < 3 && static_cast(this->geometry.unknown_0030) != index) { - this->geometry.unknown_0030 = index; + if (index < 3 && static_cast(this->geometry.state) != index) { + this->geometry.state = index; this->Invalidate(); - this->parent->SendMsg(this, UM_TAB, this->geometry.unknown_0030, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->geometry.state, 0, 0, 0); } } @@ -473,7 +473,7 @@ void UIRuneSet_Info::OnProcess() { // OFFSET: 0x0081CC00 // FUNCTION: fn_10213 void UIRuneSystemWnd::OnProcess() { - switch (this->m_tab->geometry.unknown_0030) { + switch (this->m_tab->geometry.state) { case 0: this->m_runeSetInfo->OnProcess(); break; @@ -508,11 +508,11 @@ void UIRuneSetList::OnWheel(int delta) { // FUNCTION: fn_10220 void UIRuneSet_Info::UpdateActivation() { this->m_activeWnd->Show(0); - this->unknown_0084->Enable(0); + this->m_activateButton->Enable(0); if (this->m_runeSet && !this->m_runeSet->IsActive()) { this->m_activeWnd->Show(1); - this->unknown_0084->Enable(1); - UIBitmapButton* button = this->unknown_0084; + this->m_activateButton->Enable(1); + UIBitmapButton* button = this->m_activateButton; button->SetDisabled(!g_runeSystemMgr->HasRequiredItems(this->m_runeSet->GetActiveType())); button->Invalidate(); } @@ -584,9 +584,9 @@ int UIRuneSystemTab::SendMsg(UIWindow*, int message, std::intptr_t argument1, st this->Invalidate(); return 0; case UM_SETSTATE: - this->geometry.unknown_0030 = argument1; + this->geometry.state = argument1; this->Invalidate(); - this->parent->SendMsg(this, UM_TAB, this->geometry.unknown_0030, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->geometry.state, 0, 0, 0); break; } @@ -759,9 +759,9 @@ void UIRuneSet_Info::UpdateRewards() { // FUNCTION: fn_10219 void UIRuneSet_Info::Refresh() { this->m_activeWnd->Show(0); - this->unknown_0084->Enable(0); - this->unknown_0088->Enable(0); - this->unknown_008C->Enable(0); + this->m_activateButton->Enable(0); + this->m_equipButton->Enable(0); + this->m_unequipButton->Enable(0); this->m_tab->Show(0); this->m_gauge->Show(0); this->m_gradeText->Show(0); @@ -776,24 +776,24 @@ void UIRuneSet_Info::Refresh() { if (this->m_runeSet) { if (this->m_runeSet->IsActive()) { if (this->m_runeSet == g_runeSystemMgr->GetCurRuneSet()) { - this->unknown_008C->Enable(1); + this->m_unequipButton->Enable(1); } else { - this->unknown_0088->Enable(1); + this->m_equipButton->Enable(1); } } else { this->m_activeWnd->Show(1); this->m_activeWnd->Invalidate(); - this->unknown_0084->Enable(1); - UIBitmapButton* button = this->unknown_0084; + this->m_activateButton->Enable(1); + UIBitmapButton* button = this->m_activateButton; button->SetDisabled(!g_runeSystemMgr->HasRequiredItems(this->m_runeSet->GetActiveType())); button->Invalidate(); - this->m_tab->geometry.unknown_0030 = 0; + this->m_tab->geometry.state = 0; this->m_tab->Invalidate(); this->m_tab->Invalidate(); } this->m_tab->Show(1); - const std::uint32_t tab = this->m_tab->geometry.unknown_0030; + const std::uint32_t tab = this->m_tab->geometry.state; if (tab == 1) { if (this->m_runeSet->m_reward.values[0] == 1) { for (int index = 0; index < this->m_runeSet->CountSlots(); ++index) { @@ -871,15 +871,15 @@ void UIRuneSystemWnd::SelectTab() { for (int index = 0; index < 3; ++index) { UIRuneSetList* list = this->m_lists[index]; if (list) { - list->Show(this->m_tab->geometry.unknown_0030 == static_cast(index)); + list->Show(this->m_tab->geometry.state == static_cast(index)); } } - this->m_equipRuneSet->Show(this->m_tab->geometry.unknown_0030 == 0); - this->m_tagList->SendMsg(this, 0xA9, this->m_tab->geometry.unknown_0030, this->m_equipRuneSet->geometry.height, 0, 0); + this->m_equipRuneSet->Show(this->m_tab->geometry.state == 0); + this->m_tagList->SendMsg(this, 0xA9, this->m_tab->geometry.state, this->m_equipRuneSet->geometry.height, 0, 0); this->m_tagList->Show(1); this->m_tagList->Invalidate(); - switch (this->m_tab->geometry.unknown_0030) { + switch (this->m_tab->geometry.state) { case 0: this->m_runeSetInfo->Show(1); this->m_runeSetInfo->RefreshDescription(); @@ -994,7 +994,7 @@ void UIRuneSystem_Decom_RadioBtn::Paint() { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(this->m_disabledBitmap.c_str()))); color = 0xECD5C4; } else { - bitmap = static_cast(ResourceMgr::Instance().Load(Resolve((this->geometry.unknown_0030 ? this->uncheckedBitmap : this->checkedBitmap).c_str()))); + bitmap = static_cast(ResourceMgr::Instance().Load(Resolve((this->geometry.state ? this->uncheckedBitmap : this->checkedBitmap).c_str()))); } if (bitmap) { @@ -1195,7 +1195,7 @@ void UIRuneSetList::Paint() { this->DrawBitmap(0, y, &static_cast(ResourceMgr::Instance().Load(Resolve(background.c_str())))->image, true); for (unsigned int slot = 0; slot < runeSet->m_slots.size(); ++slot) { if (runeSet->m_slots[slot]) { - this->DrawRuneIcon(this->unknown_00B8 * slot + 20, y + 25, runeSet->m_slots[slot]->GetResName(), runeSet->m_slots[slot]->IsActive()); + this->DrawRuneIcon(this->m_slotSpacing * slot + 20, y + 25, runeSet->m_slots[slot]->GetResName(), runeSet->m_slots[slot]->IsActive()); } } @@ -1497,7 +1497,7 @@ void UIRune_ViewInfo::Paint() { // OFFSET: 0x00814BC0 // FUNCTION: fn_10136 UIRuneSystemTab::UIRuneSystemTab() : UIWindow(0), m_count(4), m_label("유저인터페이스\\runesystem\\runesystam_tab_%d.bmp") { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } // OFFSET: 0x00814D40 @@ -1572,8 +1572,8 @@ UIRuneSystem_tagListWnd::UIRuneSystem_tagListWnd() // OFFSET: 0x008152B0 // FUNCTION: fn_10142 UIRune_Decom::UIRune_Decom() : UIWindow(0) { - this->unknown_007C.clear(); - this->unknown_0094.clear(); + this->m_itemName.clear(); + this->m_itemImagePath.clear(); this->m_ownedCount = 0; this->m_decomList = nullptr; this->m_itemId = 0; @@ -1595,7 +1595,7 @@ int UIRuneSet_Info::SendMsg(UIWindow* sender, int message, std::intptr_t argumen } if (!this->m_runeSet->IsActive()) { UIRuneSystemTab* tab = this->m_tab; - tab->geometry.unknown_0030 = 0; + tab->geometry.state = 0; tab->Invalidate(); g_windowMgr.Confirm(LookupMessage(MSI_RUNESYSTEM_TITLE), 0, true, false, 0, "Message", 280, 120, 0); } @@ -1663,7 +1663,7 @@ void UIRune_Decom::SetItem(int itemId) { item.identified = 1; if (this->m_itemId != itemId) { this->m_itemId = itemId; - this->unknown_007C = item.DisplayName(0); + this->m_itemName = item.DisplayName(0); std::string resource; if (IsItemCard(std::atoi(item.itemId.c_str()))) { @@ -1673,11 +1673,11 @@ void UIRune_Decom::SetItem(int itemId) { resource = ItemResourcePath(item); } - this->unknown_0094 = static_cast(FormatOwnedString("유저인터페이스\\Illust\\%s.bmp", resource.c_str())); - if (!ResourceMgr::Instance().Exists(this->unknown_0094.c_str())) { - this->unknown_0094 = static_cast(FormatOwnedString("유저인터페이스\\cardbmp\\%s.bmp", resource.c_str())); - if (!ResourceMgr::Instance().Exists(this->unknown_0094.c_str())) { - this->unknown_0094 = ""; + this->m_itemImagePath = static_cast(FormatOwnedString("유저인터페이스\\Illust\\%s.bmp", resource.c_str())); + if (!ResourceMgr::Instance().Exists(this->m_itemImagePath.c_str())) { + this->m_itemImagePath = static_cast(FormatOwnedString("유저인터페이스\\cardbmp\\%s.bmp", resource.c_str())); + if (!ResourceMgr::Instance().Exists(this->m_itemImagePath.c_str())) { + this->m_itemImagePath = ""; } } @@ -1742,14 +1742,14 @@ int UIRune_Decom::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 if (!g_runeSystemMgr->IsRequestPending() && (!this->parent || this->parent->SendMsg(this, 0x6A, 50, 0, 0, 0) != 0) && this->m_ownedCount) { if (static_cast(g_session.m_weight) > static_cast(g_session.m_maxWeight) * 0.7f || g_session.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50() + 8 >= - g_session.unknown_7FBC + 100) { + g_session.extraInventorySlots + 100) { g_windowMgr.Confirm(LookupMessage(MSI_MACRO_USER_REPORT), 0, true, false, 0, "Message", 280, 120, 0); } else { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, this->m_itemId, 0); RuneDecomRequestPacket packet; packet.id = 0x0BD8; packet.itemId = item.GetItemId(); - packet.itemIndex = item.unknown_0000[1]; + packet.itemIndex = item.identity[1]; packet.decomType = this->m_decomType + 1; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); g_runeSystemMgr->SetRequestPending(true); @@ -1873,35 +1873,35 @@ void UIRuneSet_Info::OnCreate(int, int) { this->m_activeWnd->SetSize(0xE6, 0x8C); this->m_activeWnd->Move(0x46, 0x156); - this->unknown_0084 = new UIBitmapButton(); - this->AddChild(this->unknown_0084); - this->unknown_0084->SetBitmap("유저인터페이스\\runesystem\\bt_active_nomal.bmp", 0, 0); - this->unknown_0084->SetBitmap("유저인터페이스\\runesystem\\bt_active_mouseon.bmp", 1, 0); - this->unknown_0084->SetBitmap("유저인터페이스\\runesystem\\bt_active_pressed.bmp", 2, 0); - this->unknown_0084->SetBitmap("유저인터페이스\\runesystem\\bt_active_disabled.bmp", 3, 0); - this->unknown_0084->SetSize(this->unknown_0084->BitmapWidth(), this->unknown_0084->BitmapHeight()); - this->unknown_0084->Move(0x6F, 0x1EC); - this->unknown_0084->SetId(0x23C); + this->m_activateButton = new UIBitmapButton(); + this->AddChild(this->m_activateButton); + this->m_activateButton->SetBitmap("유저인터페이스\\runesystem\\bt_active_nomal.bmp", 0, 0); + this->m_activateButton->SetBitmap("유저인터페이스\\runesystem\\bt_active_mouseon.bmp", 1, 0); + this->m_activateButton->SetBitmap("유저인터페이스\\runesystem\\bt_active_pressed.bmp", 2, 0); + this->m_activateButton->SetBitmap("유저인터페이스\\runesystem\\bt_active_disabled.bmp", 3, 0); + this->m_activateButton->SetSize(this->m_activateButton->BitmapWidth(), this->m_activateButton->BitmapHeight()); + this->m_activateButton->Move(0x6F, 0x1EC); + this->m_activateButton->SetId(0x23C); - this->unknown_0088 = new UIBitmapButton(); - this->AddChild(this->unknown_0088); - this->unknown_0088->SetBitmap("유저인터페이스\\runesystem\\bt_equip_nomal.bmp", 0, 0); - this->unknown_0088->SetBitmap("유저인터페이스\\runesystem\\bt_equip_mouseon.bmp", 1, 0); - this->unknown_0088->SetBitmap("유저인터페이스\\runesystem\\bt_equip_pressed.bmp", 2, 0); - this->unknown_0088->SetBitmap("유저인터페이스\\runesystem\\bt_equip_disabled.bmp", 3, 0); - this->unknown_0088->SetSize(this->unknown_0088->BitmapWidth(), this->unknown_0088->BitmapHeight()); - this->unknown_0088->Move(0x6F, 0x1EC); - this->unknown_0088->SetId(0xC3); + this->m_equipButton = new UIBitmapButton(); + this->AddChild(this->m_equipButton); + this->m_equipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equip_nomal.bmp", 0, 0); + this->m_equipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equip_mouseon.bmp", 1, 0); + this->m_equipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equip_pressed.bmp", 2, 0); + this->m_equipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equip_disabled.bmp", 3, 0); + this->m_equipButton->SetSize(this->m_equipButton->BitmapWidth(), this->m_equipButton->BitmapHeight()); + this->m_equipButton->Move(0x6F, 0x1EC); + this->m_equipButton->SetId(0xC3); - this->unknown_008C = new UIBitmapButton(); - this->AddChild(this->unknown_008C); - this->unknown_008C->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_nomal.bmp", 0, 0); - this->unknown_008C->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_mouseon.bmp", 1, 0); - this->unknown_008C->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_pressed.bmp", 2, 0); - this->unknown_008C->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_disabled.bmp", 3, 0); - this->unknown_008C->SetSize(this->unknown_008C->BitmapWidth(), this->unknown_008C->BitmapHeight()); - this->unknown_008C->Move(0x6F, 0x1EC); - this->unknown_008C->SetId(0x158); + this->m_unequipButton = new UIBitmapButton(); + this->AddChild(this->m_unequipButton); + this->m_unequipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_nomal.bmp", 0, 0); + this->m_unequipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_mouseon.bmp", 1, 0); + this->m_unequipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_pressed.bmp", 2, 0); + this->m_unequipButton->SetBitmap("유저인터페이스\\runesystem\\bt_equiptakeoff_disabled.bmp", 3, 0); + this->m_unequipButton->SetSize(this->m_unequipButton->BitmapWidth(), this->m_unequipButton->BitmapHeight()); + this->m_unequipButton->Move(0x6F, 0x1EC); + this->m_unequipButton->SetId(0x158); this->m_tab = new UIRuneSystemTab(); this->AddChild(this->m_tab); @@ -2030,7 +2030,7 @@ void UIRuneSet_Info::Paint() { this->DrawBitmap(0x76, 0x95, static_cast(runeSetBitmap), true); } - const std::uint32_t tab = this->m_tab->geometry.unknown_0030; + const std::uint32_t tab = this->m_tab->geometry.state; if (tab == 0) { this->DrawBitmap( 0x179, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\bg_runeset_desc_title.bmp"))), true @@ -2113,23 +2113,23 @@ void UIRuneSet_Info::Paint() { void UIRune_Decom::Paint() { this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\bg_main.bmp"))), true); this->DrawBitmap(0xDD, 0x8E, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\rune_edge_big.bmp"))), true); - if (!this->m_decomList || this->unknown_0094.empty()) { + if (!this->m_decomList || this->m_itemImagePath.empty()) { return; } this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\bg_main.bmp"))), true); this->DrawBitmap(0xDD, 0x47, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\rune_edge_big.bmp"))), true); - CTexture* texture = g_texMgr.Load(this->unknown_0094.c_str(), 0, false, true, false); + CTexture* texture = g_texMgr.Load(this->m_itemImagePath.c_str(), 0, false, true, false); if (texture) { const float scale = 180.0f / static_cast(texture->Width()); this->geometry.surface->DrawScaledSurface(0xE1, 0x4B, 0xB4, 0xF0, texture, texture->Width(), texture->Height(), scale, scale, 0xFFFFFFFF, false, 0, 0, 0, 0); } - if (this->unknown_007C.size()) { - const int nameWidth = this->TextWidth(this->unknown_007C.c_str(), this->unknown_007C.size(), 0, 13, 0, 0); + if (this->m_itemName.size()) { + const int nameWidth = this->TextWidth(this->m_itemName.c_str(), this->m_itemName.size(), 0, 13, 0, 0); const int nameX = static_cast(static_cast(this->geometry.width - nameWidth) * 0.5f); - this->DrawTextAt(nameX, 0x19, this->unknown_007C.c_str(), 0, 0, 13, 0xFFF0E1, 1, 0); - this->DrawTextAt(nameX - 1, 0x1A, this->unknown_007C.c_str(), 0, 0, 13, 0x864D43, 1, 0); + this->DrawTextAt(nameX, 0x19, this->m_itemName.c_str(), 0, 0, 13, 0xFFF0E1, 1, 0); + this->DrawTextAt(nameX - 1, 0x1A, this->m_itemName.c_str(), 0, 0, 13, 0x864D43, 1, 0); } this->DrawBitmap(200, 0x149, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\runesystem\\bg_radio2.bmp"))), true); @@ -2209,8 +2209,8 @@ int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: - if (this->m_lists[this->m_tab->geometry.unknown_0030]) { - this->m_lists[this->m_tab->geometry.unknown_0030]->ScrollBy(argument1); + if (this->m_lists[this->m_tab->geometry.state]) { + this->m_lists[this->m_tab->geometry.state]->ScrollBy(argument1); this->Invalidate(); } break; @@ -2219,13 +2219,13 @@ int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume this->SelectTab(); break; case UM_REFRESH: { - UIRuneSetList* list = this->m_lists[this->m_tab->geometry.unknown_0030]; + UIRuneSetList* list = this->m_lists[this->m_tab->geometry.state]; if (!list) { break; } list->Invalidate(); - switch (this->m_tab->geometry.unknown_0030) { + switch (this->m_tab->geometry.state) { case 0: this->m_equipRuneSet->Invalidate(); this->m_runeSetInfo->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); @@ -2276,7 +2276,7 @@ int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume return 0; } case 0xA9: - this->m_tab->geometry.unknown_0030 = argument1; + this->m_tab->geometry.state = argument1; this->m_tab->Invalidate(); this->SelectTab(); if (argument1 == 0) { @@ -2297,7 +2297,7 @@ int UIRuneSystemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume break; case 0xAB: if (argument1 == 0xC2) { - switch (this->m_tab->geometry.unknown_0030) { + switch (this->m_tab->geometry.state) { case 0: { RuneData* rune = argument2 == -1 ? g_runeSystemMgr->GetCurRuneSet() : g_runeSystemMgr->GetCurrentRune(0, argument2); if (!rune) { @@ -2424,7 +2424,7 @@ UIRuneList::UIRuneList() : UIRuneSetList() { // OFFSET: 0x00814940 // FUNCTION: fn_10132 -UIRuneSetList::UIRuneSetList() : UIScrollBar(), m_itemHeight(0x44), unknown_00B8(0x28), m_selected(-1) { +UIRuneSetList::UIRuneSetList() : UIScrollBar(), m_itemHeight(0x44), m_slotSpacing(0x28), m_selected(-1) { this->arrowLength = 6; } diff --git a/Source/UI/RuneSystem/UIRuneSystemWnd.h b/Source/UI/RuneSystem/UIRuneSystemWnd.h index e6f246212..8447a7376 100644 --- a/Source/UI/RuneSystem/UIRuneSystemWnd.h +++ b/Source/UI/RuneSystem/UIRuneSystemWnd.h @@ -99,7 +99,7 @@ public: __declspec(noinline) void DrawRuneIcon(int x, int y, const char* name, bool active); /* 00B4 */ int m_itemHeight; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int m_slotSpacing; /* 00BC */ int m_selected; }; @@ -218,9 +218,9 @@ public: /* 007C */ RuneSetData* m_runeSet; /* 0080 */ UIRuneSystem_ActiveWnd* m_activeWnd; - /* 0084 */ UIBitmapButton* unknown_0084; - /* 0088 */ UIBitmapButton* unknown_0088; - /* 008C */ UIBitmapButton* unknown_008C; + /* 0084 */ UIBitmapButton* m_activateButton; + /* 0088 */ UIBitmapButton* m_equipButton; + /* 008C */ UIBitmapButton* m_unequipButton; /* 0090 */ UIRuneSystemTab* m_tab; /* 0094 */ UIGage_Circle* m_gauge; /* 0098 */ UIStaticText* m_gradeText; @@ -257,8 +257,8 @@ public: void SelectDecomType(unsigned int type); __declspec(noinline) void SetItem(int itemId); - /* 007C */ std::string unknown_007C; - /* 0094 */ std::string unknown_0094; + /* 007C */ std::string m_itemName; + /* 0094 */ std::string m_itemImagePath; /* 00AC */ unsigned int m_ownedCount; /* 00B0 */ std::vector* m_decomList; /* 00B4 */ int m_itemId; diff --git a/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp b/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp index 83e05067a..68c5f8a1b 100644 --- a/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp +++ b/Source/UI/SelectPackageItemBox/UISelectPackageItemBox.cpp @@ -43,8 +43,8 @@ void CUIListBoxEx CUIListBoxEx::CUIListBoxEx() : CUIControl(), unknown_0084(), unknown_0088(), unknown_008C(), imageNames(), disabledName(), scrollBar(nullptr), - itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), unknown_00C5{}, items(), data(), - selected(static_cast(-1)), unknown_00E0(1), rebind(0), unknown_00E2{}, onSelect(), binder() { + itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), unknown_00C5{}, items(), data(), + selected(static_cast(-1)), selectionFlag(1), rebind(0), unknown_00E2{}, onSelect(), binder() { } // OFFSET: 0x00A686A0 @@ -52,8 +52,8 @@ CUIListBoxEx::CUIListBoxEx() template <> CUIListBoxEx::CUIListBoxEx() : CUIControl(), unknown_0084(), unknown_0088(), unknown_008C(), imageNames(), disabledName(), scrollBar(nullptr), - itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), unknown_00C5{}, items(), data(), - selected(static_cast(-1)), unknown_00E0(1), rebind(0), unknown_00E2{}, onSelect(), binder() { + itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), unknown_00C5{}, items(), data(), + selected(static_cast(-1)), selectionFlag(1), rebind(0), unknown_00E2{}, onSelect(), binder() { } // OFFSET: 0x00A68860 @@ -95,7 +95,7 @@ void CUIListBoxExunknown_00B4 = 0; + this->ownedSkinColors = 0; this->Resize(387, 283); this->Move(0, 0); this->OnCreate(this->geometry.width, this->geometry.height); @@ -168,7 +168,7 @@ void CUIListBoxEx void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (SelectPackageItemBox::CUIItemInfo* other : this->items) { @@ -177,7 +177,7 @@ void CUIListBoxEx::SelectItem(CUIL } } item->SetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } SelectPackageItemBox::CUIItemInfo* selectedItem = dynamic_cast(item); @@ -195,7 +195,7 @@ void CUIListBoxEx::SelectItem(CUIL // INLINED template <> void CUIListBoxEx::SelectItem(CUIListItem* item) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (SelectPackageItemBox::CUITabInfo* other : this->items) { @@ -204,7 +204,7 @@ void CUIListBoxExSetSelected(1); - if (item->index == static_cast(this->selected) && this->unknown_00E0) { + if (item->index == static_cast(this->selected) && this->selectionFlag) { return; } SelectPackageItemBox::CUITabInfo* selectedTab = dynamic_cast(item); @@ -515,7 +515,7 @@ template <> void ListSelectCallback::operator()(CUIListItem* const& item) { CUIListBoxEx* list = this->list; CUIListItem* selection = item; - if (list->unknown_00C4) { + if (list->layoutFlag) { return; } @@ -526,7 +526,7 @@ void ListSelectCallback::operator( } selection->SetSelected(true); - if (selection->index == static_cast(list->selected) && list->unknown_00E0) { + if (selection->index == static_cast(list->selected) && list->selectionFlag) { return; } @@ -552,7 +552,7 @@ template <> void ListSelectCallback::operator()(CUIListItem* const& item) { CUIListBoxEx* list = this->list; CUIListItem* selection = item; - if (list->unknown_00C4) { + if (list->layoutFlag) { return; } @@ -563,7 +563,7 @@ void ListSelectCallbackSetSelected(true); - if (selection->index == static_cast(list->selected) && list->unknown_00E0) { + if (selection->index == static_cast(list->selected) && list->selectionFlag) { return; } @@ -772,8 +772,8 @@ void SelectPackageItemBox::CUIItemInfo::OnCreate(int width, int height) { this->gameItem->SetMode(0); this->gameItem->SetScale(100); this->gameItem->Move(6, 5); - this->gameItem->unknown_0084 = 1; - this->gameItem->unknown_0085 = 1; + this->gameItem->showNameTooltip = 1; + this->gameItem->allowItemInfo = 1; this->AddChild(this->gameItem); this->nameText = new CUIStaticText(); @@ -1273,8 +1273,8 @@ void CUISelectPackageItemBox::BindItem(SelectPackageItemBox::CUIItemInfo* item, thread_local EncryptedName<43, 0x3F5315DFE32B4FAFULL> name(source); return name.Text(); }()); - if (data.unknown_0068 > 0) { - if (data.unknown_0098 > 0) { + if (data.expireTime > 0) { + if (data.optionCount > 0) { image = std::string([]() { constexpr std::uint8_t bytes[] = {0x55, 0x52, 0xD1, 0x49, 0x91, 0xAB, 0x50, 0xFC, 0x53, 0x19, 0xD1, 0x7F, 0xEC, 0xDF, 0xC9, 0x42, 0xF0, 0x91, 0x74, 0xD0, 0x25, 0x15, 0xF4, 0x52, 0xFE, 0x9C, @@ -1294,7 +1294,7 @@ void CUISelectPackageItemBox::BindItem(SelectPackageItemBox::CUIItemInfo* item, return name.Text(); }()); } - } else if (data.unknown_0098 > 0) { + } else if (data.optionCount > 0) { image = std::string([]() { constexpr std::uint8_t bytes[] = {0xD5, 0x3C, 0x73, 0x3B, 0x27, 0x8D, 0x94, 0x20, 0xD3, 0x77, 0x73, 0x0D, 0x5A, 0xF9, 0x0D, 0x9E, 0x70, 0xFF, 0xD6, 0xA2, 0x93, 0x33, 0x30, 0x8E, 0x7E, 0xF2, 0xD4, 0xA4, 0xBB, 0x2A, 0x25, 0x88, 0x78, 0xCC, @@ -1316,7 +1316,7 @@ void CUISelectPackageItemBox::BindItem(SelectPackageItemBox::CUIItemInfo* item, void CUISelectPackageItemBox::OnInit() { this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); auto* const list = this->itemList; - list->unknown_00C4 = 1; + list->layoutFlag = 1; list->Invalidate(); auto* const ok = this->okButton; ok->disabled = 1; @@ -1333,7 +1333,7 @@ void CUISelectPackageItemBox::Open(int sourceIndex) { this->title->SetTitle("", 0); this->sourceIndex = sourceIndex; const ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, sourceIndex); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } diff --git a/Source/UI/Shop/MerchantShopRefresh.cpp b/Source/UI/Shop/MerchantShopRefresh.cpp index 613e85410..76d3c16fe 100644 --- a/Source/UI/Shop/MerchantShopRefresh.cpp +++ b/Source/UI/Shop/MerchantShopRefresh.cpp @@ -17,15 +17,15 @@ void UIMerchantShopMakeWnd::Refresh() { CMCStoreInfoBackup& backup = g_session.m_storeInfoBackup; if (std::string(backup.title).empty()) { - this->unknown_0168->SetDisabled(0); - this->unknown_0168->Invalidate(); + this->actionButton->SetDisabled(0); + this->actionButton->Invalidate(); return; } - this->unknown_00CC->SetText(std::string(backup.title).c_str()); - this->unknown_00CC->Invalidate(); + this->titleEdit->SetText(std::string(backup.title).c_str()); + this->titleEdit->Invalidate(); - for (int index = 0; index < this->unknown_012C; ++index) { + for (int index = 0; index < this->slotCount; ++index) { UIEditCtrl* edit = this->priceEdits[index]; edit->SetText(""); @@ -50,18 +50,18 @@ void UIMerchantShopMakeWnd::Refresh() { } g_session.ClearItems1768(); - backup.Restore(this->mode != 0, this->unknown_012C); + backup.Restore(this->mode != 0, this->slotCount); const std::vector displayed(backup.items); int index = 0; UIEditCtrl** edit = this->priceEdits; for (const ITEM_INFO& item : displayed) { - if (index >= this->unknown_012C) { + if (index >= this->slotCount) { break; } - const int price = static_cast(item.unknown_0014[0]); + const int price = static_cast(item.prices[0]); char value[24] = {}; _itoa(price, value, 10); (*edit)->disabled = 0; @@ -81,7 +81,7 @@ void UIMerchantShopMakeWnd::Refresh() { char grouped[24] = {}; FormatGroupedInteger(price, grouped, sizeof(grouped)); (*edit)->SetText(grouped); - this->unknown_016C = (*edit)->Length(); + this->previousPriceLength = (*edit)->Length(); } ++edit; @@ -90,7 +90,7 @@ void UIMerchantShopMakeWnd::Refresh() { g_session.RefreshItem1768Window(this->mode != 0, 0); g_session.RefreshItem1750Window(this->mode); - this->unknown_0168->SetDisabled(0); - this->unknown_0168->Invalidate(); + this->actionButton->SetDisabled(0); + this->actionButton->Invalidate(); backup.Clear(); } diff --git a/Source/UI/Shop/UIMerchantItemMyShopWnd.h b/Source/UI/Shop/UIMerchantItemMyShopWnd.h index e37ad193c..507895812 100644 --- a/Source/UI/Shop/UIMerchantItemMyShopWnd.h +++ b/Source/UI/Shop/UIMerchantItemMyShopWnd.h @@ -26,27 +26,27 @@ public: void OpenShop(); void SetDuration(std::uint32_t value); - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int buyingZeny; /* 00F4 */ UIStaticText* title; /* 00F8 */ MerchantItemMyShopWndInfo* saved; /* 00FC */ UIStaticText* notice; - /* 0100 */ int unknown_0100; + /* 0100 */ int buyingShop; /* 0104 */ UICheckBox* saleAlarm; /* 0108 */ unsigned char shopOpen; /* 0109 */ unsigned char unknown_0109[0x03]; - /* 010C */ int unknown_010C; + /* 010C */ int offlineStoreId; /* 0110 */ std::uint32_t startTick; /* 0114 */ std::uint32_t duration; /* 0118 */ UIBasicButton* actionButton; - /* 011C */ int unknown_011C; + /* 011C */ int footerHeight; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(offsetof(UIMerchantItemMyShopWnd, saved) == 0xF8); -static_assert(offsetof(UIMerchantItemMyShopWnd, unknown_0100) == 0x100); +static_assert(offsetof(UIMerchantItemMyShopWnd, buyingShop) == 0x100); static_assert(offsetof(UIMerchantItemMyShopWnd, saleAlarm) == 0x104); static_assert(offsetof(UIMerchantItemMyShopWnd, startTick) == 0x110); -static_assert(offsetof(UIMerchantItemMyShopWnd, unknown_011C) == 0x11C); +static_assert(offsetof(UIMerchantItemMyShopWnd, footerHeight) == 0x11C); #endif #endif diff --git a/Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h b/Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h index 8c4f23fc8..074d87d9e 100644 --- a/Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h +++ b/Source/UI/Shop/UIMerchantItemPurchaseMSGWnd.h @@ -21,7 +21,7 @@ public: /* 00C4 */ UIBitmapButton* buyButton; /* 00C8 */ UIBitmapButton* cancelButton; /* 00CC */ int purchaseIndex; - /* 00D0 */ int unknown_00D0; + /* 00D0 */ int purchaseAmount; }; #endif diff --git a/Source/UI/Shop/UIMerchantItemPurchaseWnd.h b/Source/UI/Shop/UIMerchantItemPurchaseWnd.h index cba8febc6..c150b42c5 100644 --- a/Source/UI/Shop/UIMerchantItemPurchaseWnd.h +++ b/Source/UI/Shop/UIMerchantItemPurchaseWnd.h @@ -21,13 +21,13 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; - /* 00F0 */ int unknown_00F0; + /* 00F0 */ int nonItemHeight; /* 00F4 */ UIStaticText* total; - /* 00F8 */ int unknown_00F8; + /* 00F8 */ int merchantId; /* 00FC */ MerchantItemPurchaseWndInfo* saved; /* 0100 */ int hovered; - /* 0104 */ int unknown_0104; - /* 0108 */ int unknown_0108; + /* 0104 */ int storeId; + /* 0108 */ int buyingStore; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Shop/UIMerchantItemShopWnd.h b/Source/UI/Shop/UIMerchantItemShopWnd.h index 7f8b817ca..318d35784 100644 --- a/Source/UI/Shop/UIMerchantItemShopWnd.h +++ b/Source/UI/Shop/UIMerchantItemShopWnd.h @@ -26,17 +26,17 @@ public: void StartTimer(std::uint32_t value); - /* 00F0 */ int unknown_00F0; - /* 00F4 */ UIStaticText* unknown_00F4; + /* 00F0 */ int nonItemHeight; + /* 00F4 */ UIStaticText* titleText; /* 00F8 */ MerchantItemShopWndInfo* saved; /* 00FC */ int hovered; - /* 0100 */ int unknown_0100; + /* 0100 */ int ownerAid; /* 0104 */ UIStaticText* notice; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; + /* 0108 */ int buyingZeny; + /* 010C */ int buyingShop; /* 0110 */ std::uint32_t startTick; /* 0114 */ std::uint32_t duration; - /* 0118 */ int unknown_0118; + /* 0118 */ int footerHeight; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Shop/UIMerchantMirrorItemWnd.h b/Source/UI/Shop/UIMerchantMirrorItemWnd.h index 0b9433f78..9c6e948e1 100644 --- a/Source/UI/Shop/UIMerchantMirrorItemWnd.h +++ b/Source/UI/Shop/UIMerchantMirrorItemWnd.h @@ -20,7 +20,7 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; /* 00F0 */ MerchantMirrorItemWndInfo* saved; - /* 00F4 */ int unknown_00F4; + /* 00F4 */ int mode; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Shop/UIMerchantShopMakeWnd.h b/Source/UI/Shop/UIMerchantShopMakeWnd.h index 56ae98ba3..60002be15 100644 --- a/Source/UI/Shop/UIMerchantShopMakeWnd.h +++ b/Source/UI/Shop/UIMerchantShopMakeWnd.h @@ -41,44 +41,44 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; - /* 00B4 */ std::string unknown_00B4; - /* 00CC */ UIEditCtrl* unknown_00CC; + /* 00B4 */ std::string title; + /* 00CC */ UIEditCtrl* titleEdit; /* 00D0 */ unsigned char unknown_00D0[0x8]; /* 00D8 */ int editIndex; /* 00DC */ UIWindow* notice; /* 00E0 */ UIEditCtrl* priceEdits[13]; /* 0114 */ UIEditCtrl* quantityEdits[5]; - /* 0128 */ UIEditCtrl* unknown_0128; - /* 012C */ int unknown_012C; + /* 0128 */ UIEditCtrl* zenyLimitEdit; + /* 012C */ int slotCount; /* 0130 */ int mode; /* 0134 */ UIWindow* scrollBar; /* 0138 */ int scroll; /* 013C */ int columns; - /* 0140 */ int unknown_0140; - /* 0144 */ int unknown_0144; + /* 0140 */ int minimumRows; + /* 0144 */ int scrollable; /* 0148 */ std::list items; /* 0150 */ MerchantShopMakeWndInfo* saved; - /* 0154 */ int unknown_0154; - /* 0158 */ int unknown_0158; + /* 0154 */ int initialHeight; + /* 0158 */ int maxVisibleRows; /* 015C */ int visibleRows; /* 0160 */ UIWindow* actionButtons[2]; - /* 0168 */ UIBasicButton* unknown_0168; - /* 016C */ int unknown_016C; - /* 0170 */ std::string unknown_0170; - /* 0188 */ unsigned char unknown_0188; + /* 0168 */ UIBasicButton* actionButton; + /* 016C */ int previousPriceLength; + /* 0170 */ std::string previousPriceText; + /* 0188 */ unsigned char itemsSet; /* 0189 */ unsigned char suspended; - /* 018A */ short unknown_018A; - /* 018C */ short unknown_018C; + /* 018A */ short selectedRow; + /* 018C */ short selectedColumn; }; #if defined(_WIN32) && !defined(_WIN64) -static_assert(offsetof(UIMerchantShopMakeWnd, unknown_00CC) == 0xCC); +static_assert(offsetof(UIMerchantShopMakeWnd, titleEdit) == 0xCC); static_assert(offsetof(UIMerchantShopMakeWnd, editIndex) == 0xD8); static_assert(offsetof(UIMerchantShopMakeWnd, priceEdits) == 0xE0); -static_assert(offsetof(UIMerchantShopMakeWnd, unknown_0128) == 0x128); +static_assert(offsetof(UIMerchantShopMakeWnd, zenyLimitEdit) == 0x128); static_assert(offsetof(UIMerchantShopMakeWnd, items) == 0x148); static_assert(offsetof(UIMerchantShopMakeWnd, saved) == 0x150); -static_assert(offsetof(UIMerchantShopMakeWnd, unknown_018C) == 0x18C); +static_assert(offsetof(UIMerchantShopMakeWnd, selectedColumn) == 0x18C); #endif #endif diff --git a/Source/UI/Shop/UIMerchantShopTitle.cpp b/Source/UI/Shop/UIMerchantShopTitle.cpp index e5437363b..d9d5ade77 100644 --- a/Source/UI/Shop/UIMerchantShopTitle.cpp +++ b/Source/UI/Shop/UIMerchantShopTitle.cpp @@ -33,7 +33,7 @@ void UIMerchantShopTitle::OnCreate(int, int) { // FUNCTION: fn_10811 void UIMerchantShopTitle::Paint() { this->ClearSurface(0xFFFF00FF); - const std::uint32_t color = this->ownerAid == g_session.unknown_5BF0 ? 0x7DFAFF : 0xFFFFFF; + const std::uint32_t color = this->ownerAid == g_session.storeSearchOwnerAid ? 0x7DFAFF : 0xFFFFFF; DrawFilledRoundedBorder(*this, 0, 0, this->geometry.width, this->geometry.height - 6, color); DrawRoundedBorder(*this, 2, 2, this->geometry.width - 4, this->geometry.height - 10, 0xC3C3C3); const char* icon = this->buyingShop != 0 ? "유저인터페이스\\buyingshop.bmp" : "유저인터페이스\\shop.bmp"; @@ -49,10 +49,10 @@ void UIMerchantShopTitle::OnLBtnDown(int, int) { CMode* mode = g_modeMgr.GetGameMode(); if (this->buyingShop != 0) { - if (g_windowMgr.unknown_0308 == 0) { + if (g_windowMgr.merchantItemPurchaseWnd == 0) { mode->SendMsg(MM_REQ_CLICK_TO_BUYING_STORE, this->ownerAid, 0, 0, 0); } - } else if (g_windowMgr.unknown_0418 == 0) { + } else if (g_windowMgr.buyingShopItemsWnd == 0) { mode->SendMsg(MM_REQ_BUY_FROMMC, this->ownerAid, 0, 0, 0); } } @@ -62,10 +62,10 @@ void UIMerchantShopTitle::OnLBtnDown(int, int) { void UIMerchantShopTitle::OnLBtnDblClk(int, int) { CMode* mode = g_modeMgr.GetGameMode(); if (this->buyingShop != 0) { - if (g_windowMgr.unknown_0308 == 0) { + if (g_windowMgr.merchantItemPurchaseWnd == 0) { mode->SendMsg(MM_REQ_CLICK_TO_BUYING_STORE, this->ownerAid, 0, 0, 0); } - } else if (g_windowMgr.unknown_0418 == 0) { + } else if (g_windowMgr.buyingShopItemsWnd == 0) { mode->SendMsg(MM_REQ_BUY_FROMMC, this->ownerAid, 0, 0, 0); } } @@ -85,8 +85,8 @@ void UIMerchantShopTitle::ResetCursor(int x, int y) { void UIMerchantShopTitle::OnRBtnDown(int, int) { if (g_serviceOptions.Get(167)) { g_modeMgr.gameMode->SendMsg(MM_RELEASE_QUEST_SH, 0, 0, 0, 0); - g_session.unknown_1760.clear(); - g_session.unknown_1748.clear(); + g_session.merchantHopeToSellItems.clear(); + g_session.merchantMirrorItems.clear(); } } @@ -122,8 +122,8 @@ int UIMerchantShopTitle::SendMsg(UIWindow* sender, int message, std::intptr_t a, title = title.substr(0, end); } - this->unknown_0084 = static_cast(b); - switch (this->unknown_0084) { + this->fontStyle = static_cast(b); + switch (this->fontStyle) { case 1: this->label->fontFamily = 21; break; diff --git a/Source/UI/Shop/UIMerchantShopTitle.h b/Source/UI/Shop/UIMerchantShopTitle.h index fe1f9176d..82a271b1f 100644 --- a/Source/UI/Shop/UIMerchantShopTitle.h +++ b/Source/UI/Shop/UIMerchantShopTitle.h @@ -20,7 +20,7 @@ public: /* 007C */ UIStaticText* label; /* 0080 */ std::uint32_t ownerAid; - /* 0084 */ std::int16_t unknown_0084; + /* 0084 */ std::int16_t fontStyle; /* 0086 */ unsigned char unknown_0086[2]; /* 0088 */ int buyingShop; diff --git a/Source/UI/Shortcuts/ShortcutActivation.cpp b/Source/UI/Shortcuts/ShortcutActivation.cpp index 708860b83..5b64cbe37 100644 --- a/Source/UI/Shortcuts/ShortcutActivation.cpp +++ b/Source/UI/Shortcuts/ShortcutActivation.cpp @@ -20,7 +20,7 @@ void UIShortCutWnd::OnLBtnDblClk(int x, int y) { } const NormalItemSlot& slot = *this->m_slots[index]; - if (slot.unknown_0000 != 0 && g_session.m_automaticSkills.Contains(static_cast(slot.itemId))) { + if (slot.enabled != 0 && g_session.m_automaticSkills.Contains(static_cast(slot.itemId))) { g_session.SetOption(AutomaticSkills::CancelOption(static_cast(slot.itemId)), 1, 0); } else { g_session.m_automaticSkills.DisableAll(); diff --git a/Source/UI/Shortcuts/ShortcutBindings.cpp b/Source/UI/Shortcuts/ShortcutBindings.cpp index ebae349c6..a8f932c02 100644 --- a/Source/UI/Shortcuts/ShortcutBindings.cpp +++ b/Source/UI/Shortcuts/ShortcutBindings.cpp @@ -14,9 +14,9 @@ int CSession::RotateShortcut(int index, int bank) const { int rotation; if (bank == 0) { - rotation = this->unknown_06FC; + rotation = this->mainShortcutRow; } else if (bank == 1) { - rotation = this->unknown_06A8; + rotation = this->alternateShortcutRow; } else { return index; } @@ -66,11 +66,11 @@ void CSession::AssignShortcut(unsigned char type, std::uint32_t id, int level, i continue; } - bool duplicate = previous.itemId == id && previous.unknown_0005 == level && previous.unknown_0000 == type; + bool duplicate = previous.itemId == id && previous.value == level && previous.enabled == type; if (!duplicate) { const bool usesLevel = CSkillInfo::UsesLevel(*this->m_hotkeyScript, static_cast(previous.itemId)); - duplicate = !usesLevel && previous.itemId == id && previous.unknown_0000 == type; + duplicate = !usesLevel && previous.itemId == id && previous.enabled == type; } if (!duplicate) { @@ -96,12 +96,12 @@ void CSession::AssignShortcut(unsigned char type, std::uint32_t id, int level, i } if (bank == 0) { - this->m_shortcutSlots[destination].unknown_0005 = static_cast(level); - this->m_shortcutSlots[destination].unknown_0000 = type; + this->m_shortcutSlots[destination].value = static_cast(level); + this->m_shortcutSlots[destination].enabled = type; this->m_shortcutSlots[destination].itemId = id; } else if (bank == 1) { - this->m_secondaryShortcutSlots[destination].unknown_0005 = static_cast(level); - this->m_secondaryShortcutSlots[destination].unknown_0000 = type; + this->m_secondaryShortcutSlots[destination].value = static_cast(level); + this->m_secondaryShortcutSlots[destination].enabled = type; this->m_secondaryShortcutSlots[destination].itemId = id; } @@ -119,8 +119,8 @@ void CSession::AssignItemShortcut(std::uint32_t id, int slot) { } } - this->m_normalItemSlots[slot].unknown_0005 = 0; - this->m_normalItemSlots[slot].unknown_0000 = 0; + this->m_normalItemSlots[slot].value = 0; + this->m_normalItemSlots[slot].enabled = 0; this->m_normalItemSlots[slot].itemId = id; } else { this->m_normalItemSlots[slot] = {}; diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 4a87bed31..a9d0b71c7 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -438,13 +438,13 @@ void UIQuickSlotWnd::Paint() { } } else { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(entry.id), 1); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, 5, item, item.identified, 1); - if (item.unknown_0088 > 0) { - const std::string name = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088); + if (item.grade > 0) { + const std::string name = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item.grade); auto* grade = static_cast(ResourceMgr::Instance().Load(Resolve(name.c_str()))); this->DrawBitmap(x, 17, &grade->image, true); } @@ -568,9 +568,9 @@ int UISeekPartyWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen } case ID_MINI: if (this->m_minimized) { - this->Resize(this->geometry.width, this->unknown_01E0); + this->Resize(this->geometry.width, this->expandedHeight); } else { - this->unknown_01E0 = this->geometry.height; + this->expandedHeight = this->geometry.height; this->Resize(this->geometry.width, 44); } this->m_minimized = !this->m_minimized; @@ -653,10 +653,10 @@ int g_charViewOffsetY; // FUNCTION: fn_12678 void UISelCharForUServerWnd::Paint() { const char* background = - g_session.unknown_0E94 > 12 ? "유저인터페이스\\login_interface\\selCharForIntergration2.bmp" : "유저인터페이스\\login_interface\\selCharForIntergration.bmp"; + g_session.characterCount > 12 ? "유저인터페이스\\login_interface\\selCharForIntergration2.bmp" : "유저인터페이스\\login_interface\\selCharForIntergration.bmp"; this->DrawBitmap(0, 0, &static_cast(ResourceMgr::Instance().Load(Resolve(background)))->image, false); - for (int index = 0; index < g_session.unknown_0E94; ++index) { + for (int index = 0; index < g_session.characterCount; ++index) { if (this->m_slotEnabled[index] != 0) { continue; } @@ -697,7 +697,7 @@ void UISelCharForUServerWnd::Paint() { turn = 1; } - int direction = turn - slot.unknown_0148 + slot.action; + int direction = turn - slot.actionBase + slot.action; if (direction < 0) { direction = 7; } @@ -715,7 +715,7 @@ void UISelCharForUServerWnd::Paint() { if (frame->anchorCount != 0 && body->anchorCount != 0) { const ActionAnchor* head = frame->anchors.data(); const ActionAnchor* base = body->anchors.data(); - if (head->unknown_0008 == base->unknown_0008) { + if (head->attachmentId == base->attachmentId) { offsetX += base->x - head->x; g_charViewOffsetX = offsetX; offsetY += base->y - head->y; @@ -736,7 +736,7 @@ void UISelCharForUServerWnd::Paint() { if (frame->anchorCount != 0 && head->anchorCount != 0) { const ActionAnchor* anchor = frame->anchors.data(); const ActionAnchor* base = head->anchors.data(); - if (anchor->unknown_0008 == base->unknown_0008) { + if (anchor->attachmentId == base->attachmentId) { offsetX += base->x - anchor->x; offsetY += base->y - anchor->y; } @@ -744,7 +744,7 @@ void UISelCharForUServerWnd::Paint() { offsetX += g_charViewOffsetX; offsetY += g_charViewOffsetY; - if (layer == 3 && (this->unknown_1974[index] == 0xB5 || this->unknown_1974[index] == 0xC5)) { + if (layer == 3 && (this->accessory2[index] == 0xB5 || this->accessory2[index] == 0xC5)) { offsetY -= 7; } } @@ -773,12 +773,12 @@ void UISelCharForUServerWnd::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } this->geometry.surface->DrawSurface( cell.x + offsetX + slot.x, cell.y + offsetY + slot.y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), - image->width, image->height, cell.mirrored, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + image->width, image->height, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -805,11 +805,11 @@ void UISerachStoreInfoWnd::Paint() { DrawOutlinedText(*this, 273, 20, "Zeny", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); this->DrawTextAt(353, 38, "~", 0, 0, 12, 0, 0, 0); - const std::string count = FormatOwnedString(LookupMessage(MSI_SSI_REST_OF_NUMBER_OF_SEARCHES), g_session.unknown_5BE0); + const std::string count = FormatOwnedString(LookupMessage(MSI_SSI_REST_OF_NUMBER_OF_SEARCHES), g_session.storeSearchCount); this->DrawRightAlignedText(this->geometry.width - 60, 60, count.c_str(), 0, 0, 12, 0, 0); this->FillRegion(5, 80, this->geometry.width - 10, 20, 0xDFFFFE); - DrawRoundedBorder(*this, 5, 80, this->geometry.width - 10, this->unknown_00E8 * 10 + 21, 0xC0C0C0); + DrawRoundedBorder(*this, 5, 80, this->geometry.width - 10, this->m_rowHeight * 10 + 21, 0xC0C0C0); DrawRectangleBorder(*this, 50, 80, 110, 21, 0xC0C0C0); DrawRectangleBorder(*this, 330, 80, 30, 21, 0xC0C0C0); this->FillRegion(5, 100, this->geometry.width - 10, 1, 0xC0C0C0); @@ -827,40 +827,40 @@ void UISerachStoreInfoWnd::Paint() { LookupMessage(MSI_SEARCH_ITEM_PRICE), 0, 0, 12, 0, 0, 0 ); - if (this->unknown_00F0.size() != 0) { - this->DrawTextAt(5, this->geometry.height - 20, this->unknown_00F0.c_str(), 0, 0, 12, 0xFF, 0, 0); + if (this->m_statusText.size() != 0) { + this->DrawTextAt(5, this->geometry.height - 20, this->m_statusText.c_str(), 0, 0, 12, 0xFF, 0, 0); } - if (static_cast(this->unknown_00DC * 10 - 10) >= g_session.unknown_5BD4.size()) { + if (static_cast(this->m_page * 10 - 10) >= g_session.storeSearchResults.size()) { return; } - const SearchStoreEntry* end = reinterpret_cast(g_session.unknown_5BD4.data() + g_session.unknown_5BD4.size()); - const SearchStoreEntry* entry = reinterpret_cast(g_session.unknown_5BD4.data()) + (this->unknown_00DC - 1) * 10; + const SearchStoreEntry* end = reinterpret_cast(g_session.storeSearchResults.data() + g_session.storeSearchResults.size()); + const SearchStoreEntry* entry = reinterpret_cast(g_session.storeSearchResults.data()) + (this->m_page - 1) * 10; for (int row = 0; entry != end; ++entry) { if (row == 10) { break; } - if (this->unknown_00E0 == row) { - this->FillRegion(5, this->unknown_00E8 * row + 100, this->geometry.width - 10, this->unknown_00E8, 0xFBDFCA); + if (this->m_hoverRow == row) { + this->FillRegion(5, this->m_rowHeight * row + 100, this->geometry.width - 10, this->m_rowHeight, 0xFBDFCA); } - DrawRectangleBorder(*this, 50, this->unknown_00E8 * row + 100, 110, this->unknown_00E8 + 1, 0xC0C0C0); - DrawRectangleBorder(*this, 330, this->unknown_00E8 * row + 100, 30, this->unknown_00E8 + 1, 0xC0C0C0); + DrawRectangleBorder(*this, 50, this->m_rowHeight * row + 100, 110, this->m_rowHeight + 1, 0xC0C0C0); + DrawRectangleBorder(*this, 330, this->m_rowHeight * row + 100, 30, this->m_rowHeight + 1, 0xC0C0C0); const int next = row + 1; if (next < 10) { - this->FillRegion(5, this->unknown_00E8 * next + 100, this->geometry.width - 10, 1, 0xC0C0C0); + this->FillRegion(5, this->m_rowHeight * next + 100, this->geometry.width - 10, 1, 0xC0C0C0); } - const int top = this->unknown_00E8 * row + 100; + const int top = this->m_rowHeight * row + 100; const int y = top + 7; DrawItemIcon(*this, ResourceMgr::Instance(), 13, top, entry->item, 0); - if (entry->item.unknown_0088 > 0) { + if (entry->item.grade > 0) { this->DrawBitmap( 13, y + 5, &static_cast( - ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", entry->item.unknown_0088).c_str())) + ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", entry->item.grade).c_str())) )->image, true ); @@ -886,7 +886,7 @@ void UISerachStoreInfoWnd::Paint() { } char page[12]; - std::sprintf(page, " %d ", this->unknown_00DC); + std::sprintf(page, " %d ", this->m_page); this->DrawTextAt((this->geometry.width - this->TextWidth(page, 0, 0, 12, 0, 0)) / 2, this->geometry.height - 20, page, 0, 0, 12, 0, 0, 0 ); diff --git a/Source/UI/Shortcuts/ShortcutDetails.cpp b/Source/UI/Shortcuts/ShortcutDetails.cpp index 0f6e9f409..35e6b27fb 100644 --- a/Source/UI/Shortcuts/ShortcutDetails.cpp +++ b/Source/UI/Shortcuts/ShortcutDetails.cpp @@ -39,10 +39,10 @@ void UIShortCutWnd::OnRBtnDown(int x, int y) { } } - if (limit <= index || slot->unknown_0000 == 0) { + if (limit <= index || slot->enabled == 0) { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot->itemId), 1); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { UIWindow* detail = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); detail->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } diff --git a/Source/UI/Shortcuts/ShortcutDrop.cpp b/Source/UI/Shortcuts/ShortcutDrop.cpp index 515168c58..65546eeb2 100644 --- a/Source/UI/Shortcuts/ShortcutDrop.cpp +++ b/Source/UI/Shortcuts/ShortcutDrop.cpp @@ -135,12 +135,12 @@ void UIShortCutWnd::DragAndDrop(int x, int y, std::intptr_t argument) { } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, value.id); - if (item.unknown_0000[1] == 0 || item.identified == 0) { + if (item.identity[1] == 0 || item.identified == 0) { g_modeMgr.gameMode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return; } - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case TYPE_EVENT: case TYPE_ARROW: case TYPE_AMMO: @@ -162,7 +162,7 @@ void UIShortCutWnd::DragAndDrop(int x, int y, std::intptr_t argument) { } } - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -172,7 +172,7 @@ void UIShortCutWnd::DragAndDrop(int x, int y, std::intptr_t argument) { case TYPE_ARMORMB: case TYPE_ARMORTMB: case TYPE_GUN: - if (item.unknown_0000[2] == 0) { + if (item.identity[2] == 0) { break; } case TYPE_HEAL: @@ -278,8 +278,8 @@ void UIQuickSlotWnd::DragAndDrop(int x, int y, std::intptr_t argument) { } } else if (value.source != 6 && value.source != 9) { ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, value.id); - if (item.unknown_0000[1] != 0 && item.identified != 0) { - switch (item.unknown_0000[0]) { + if (item.identity[1] != 0 && item.identified != 0) { + switch (item.identity[0]) { case TYPE_ARMOR: case TYPE_WEAPON: case TYPE_BOW: @@ -289,7 +289,7 @@ void UIQuickSlotWnd::DragAndDrop(int x, int y, std::intptr_t argument) { case TYPE_ARMORMB: case TYPE_ARMORTMB: case TYPE_GUN: - if (item.unknown_0000[2] == 0) { + if (item.identity[2] == 0) { break; } case TYPE_HEAL: diff --git a/Source/UI/Shortcuts/ShortcutPainting.cpp b/Source/UI/Shortcuts/ShortcutPainting.cpp index 9d76e9cf6..897d6513a 100644 --- a/Source/UI/Shortcuts/ShortcutPainting.cpp +++ b/Source/UI/Shortcuts/ShortcutPainting.cpp @@ -105,7 +105,7 @@ void UIShortCutWnd::Paint() { } const int x = 16 + 29 * column; - if (slot.unknown_0000 != 0) { + if (slot.enabled != 0) { CSkillInfo skill = g_session.LookupSkill(slot.itemId); if (!skill.MatchesShortcut(&slot)) { continue; @@ -121,7 +121,7 @@ void UIShortCutWnd::Paint() { g_session.m_mainCooldownIcons.push_back({skill.id, index, x, y}); Bitmap(window, image, x, y, true); - int level = slot.unknown_0005; + int level = slot.value; if ((skill.id == 6579 || skill.id == 6580) && skill.level < level) { level = skill.level; @@ -130,7 +130,7 @@ void UIShortCutWnd::Paint() { Count(window, x + 27, (y + 17), level); } else { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot.itemId), 1); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } @@ -139,9 +139,9 @@ void UIShortCutWnd::Paint() { Count(window, x + 27, (y + 17), item.quantity); } - if (item.unknown_0088 > 0) { + if (item.grade > 0) { char tail[96]; - std::sprintf(tail, "\\grade_enchant\\grade_icon%d.bmp", item.unknown_0088); + std::sprintf(tail, "\\grade_enchant\\grade_icon%d.bmp", item.grade); Bitmap(window, Load(resources, tail), x, (y + 12), true); } } @@ -158,7 +158,7 @@ void UIShortCutWnd::Paint() { } ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot.itemId), 1); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { continue; } diff --git a/Source/UI/Shortcuts/ShortcutPress.cpp b/Source/UI/Shortcuts/ShortcutPress.cpp index 6626ebff0..0fa5fdda1 100644 --- a/Source/UI/Shortcuts/ShortcutPress.cpp +++ b/Source/UI/Shortcuts/ShortcutPress.cpp @@ -37,14 +37,14 @@ void UIShortCutWnd::OnLBtnDown(int x, int y) { return; } - if (slot.unknown_0000 != 0) { + if (slot.enabled != 0) { CSkillInfo skill = g_session.LookupSkill(slot.itemId); if (skill.MatchesShortcut(&slot) && g_modeMgr.GetGameMode()) { - static_cast(g_modeMgr.GetGameMode())->drag.BeginSkill(g_windowMgr, ResourceMgr::Instance(), 7, skill.id, skill.name, slot.unknown_0005, index); + static_cast(g_modeMgr.GetGameMode())->drag.BeginSkill(g_windowMgr, ResourceMgr::Instance(), 7, skill.id, skill.name, slot.value, index); } } else { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot.itemId), 1); - if (item.unknown_0000[1] != 0 && g_modeMgr.GetGameMode()) { + if (item.identity[1] != 0 && g_modeMgr.GetGameMode()) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 7, item, item.quantity, -1); } } @@ -55,7 +55,7 @@ void UIShortCutWnd::OnLBtnDown(int x, int y) { } ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot.itemId), 1); - if (item.unknown_0000[1] != 0 && g_modeMgr.GetGameMode()) { + if (item.identity[1] != 0 && g_modeMgr.GetGameMode()) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 7, item, item.quantity, -1); } } diff --git a/Source/UI/Shortcuts/ShortcutTooltip.cpp b/Source/UI/Shortcuts/ShortcutTooltip.cpp index 0b19cdff1..3948a8dff 100644 --- a/Source/UI/Shortcuts/ShortcutTooltip.cpp +++ b/Source/UI/Shortcuts/ShortcutTooltip.cpp @@ -73,12 +73,12 @@ void UIShortCutWnd::OnMouseHover(int x, int y) { if (slot.itemId == 0) { text = shortcut; - } else if (slot.unknown_0000 != 0) { + } else if (slot.enabled != 0) { CSkillInfo skill = g_session.LookupSkill(slot.itemId); if (!skill.MatchesShortcut(&slot)) { text = shortcut; } else { - int level = slot.unknown_0005; + int level = slot.value; if ((skill.id == 6579 || skill.id == 6580) && skill.level < level) { level = skill.level; } diff --git a/Source/UI/Shortcuts/ShortcutVisibility.cpp b/Source/UI/Shortcuts/ShortcutVisibility.cpp index e2e2ae319..4d50de8db 100644 --- a/Source/UI/Shortcuts/ShortcutVisibility.cpp +++ b/Source/UI/Shortcuts/ShortcutVisibility.cpp @@ -51,7 +51,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { return false; } - this->unknown_003C = visible; + this->chatWndVisible = visible; if (!this->window_01C8) { g_windowMgr.EnsureWindow(WID_CHATWND); @@ -83,7 +83,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { return false; case WID_SHORTCUTWND: - if (g_replayAnimationScaling && !Replay::Instance().header.options.unknown_0007) { + if (g_replayAnimationScaling && !Replay::Instance().header.options.showItemSlots) { return false; } @@ -110,7 +110,7 @@ bool UIWindowMgr::ShowWindowById(int id, int visible) { return true; case WID_SKILLDESCRIBEWND: { - this->unknown_0048 = visible; + this->skillDescriptionVisible = visible; if (!this->window_0230) { if (visible == 0) { diff --git a/Source/UI/Shortcuts/UIQuickSlotWnd.cpp b/Source/UI/Shortcuts/UIQuickSlotWnd.cpp index 34f338e34..74ee1cc9d 100644 --- a/Source/UI/Shortcuts/UIQuickSlotWnd.cpp +++ b/Source/UI/Shortcuts/UIQuickSlotWnd.cpp @@ -63,7 +63,7 @@ void UIQuickSlotWnd::OnLBtnDown(int x, int y) { } } else if (entry.id != 0) { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(entry.id), 1); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); mode->drag.BeginItem(g_windowMgr, 16, item, item.quantity, -1); } @@ -169,7 +169,7 @@ void UIQuickSlotWnd::OnRBtnDown(int x, int y) { } } else if (entry.id != 0) { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(entry.id), 1); - if (item.unknown_0000[1] > 0) { + if (item.identity[1] > 0) { UIWindow* detail = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); detail->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -192,7 +192,7 @@ UIQuickSlotWnd::UIQuickSlotWnd() int UIQuickSlotWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { switch (message) { case UM_REFRESHITEM: { - const NormalItemSlot* saved = &g_session.unknown_06EB; + const NormalItemSlot* saved = &g_session.quickSlot; for (int index = 0; index < 2; ++index) { const NormalItemSlot source = saved[index]; QuickSlotEntry& entry = this->m_entries[index]; @@ -203,9 +203,9 @@ int UIQuickSlotWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen continue; } - if (source.unknown_0000 == 0) { + if (source.enabled == 0) { ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(source.itemId), 1); - if (item.unknown_0000[1] != 0 && item.identified != 0) { + if (item.identity[1] != 0 && item.identified != 0) { entry.id = source.itemId; } continue; @@ -237,7 +237,7 @@ int UIQuickSlotWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen if (g_session.UseLevel(static_cast(skill.id)) == 0) { entry.count = static_cast(skill.level); } else { - entry.count = source.unknown_0005; + entry.count = source.value; } } } @@ -262,34 +262,34 @@ int UIQuickSlotWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen } ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(entry.id), 1); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { CMode* mode = g_modeMgr.GetGameMode(); - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case UM_DEFPUSH: case UM_CANCELPUSH: case UM_TOGGLEPUSH: - mode->SendMsg(MM_USEITEM, item.unknown_0000[1], 0, 0, 0); + mode->SendMsg(MM_USEITEM, item.identity[1], 0, 0, 0); break; case UM_SCROLLVERTPAGEDOWN: case UM_OPENCHATWND: case UM_LOADINGPERCENT: case UM_DOWNPUSH: - if (item.unknown_0000[3] == 0x8000) { + if (item.identity[3] == 0x8000) { mode->SendMsg(MM_TAKE_OFF_EQUIP, 0xF, 0, 0, 0); - mode->SendMsg(MM_WEAR_EQUIP_ARROW, item.unknown_0000[1], item.unknown_0000[2], 0, 0); + mode->SendMsg(MM_WEAR_EQUIP_ARROW, item.identity[1], item.identity[2], 0, 0); } break; case UM_UPPUSH: - if (*reinterpret_cast(&g_session.unknown_16F4[4]) >= 0) { + if (*reinterpret_cast(&g_session.healthPoints[4]) >= 0) { const std::string text = FormatOwnedString(LookupMessage(MSI_CONFIRM_TO_OPEN_CASH_ITEM), item.DisplayName(0).c_str()); if (g_windowMgr.Confirm(text.c_str(), 2, false, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { - mode->SendMsg(MM_USEITEM, item.unknown_0000[1], 0, 0, 0); + mode->SendMsg(MM_USEITEM, item.identity[1], 0, 0, 0); } } break; default: - if (item.unknown_0000[2] != 0 && item.unknown_0000[3] == 0 && item.identified != 0) { - mode->SendMsg(MM_WEAR_EQUIP, item.unknown_0000[1], item.unknown_0000[2], 0, 0); + if (item.identity[2] != 0 && item.identity[3] == 0 && item.identified != 0) { + mode->SendMsg(MM_WEAR_EQUIP, item.identity[1], item.identity[2], 0, 0); } break; } diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index ef75766f4..988585160 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -193,7 +193,7 @@ __forceinline void UIShortCutWnd::ClickControl(int id) { case 549: { const int bank = g_session.GetOption(10); g_session.SetOption(10, bank == 0 ? 1 : 0, 0); - this->m_bank->geometry.unknown_0030 = bank == 0; + this->m_bank->geometry.state = bank == 0; this->m_bank->Invalidate(); for (ShortcutCooldownRecord& record : g_session.m_requestTimers) { @@ -336,13 +336,13 @@ __forceinline void UseShortcutSlot(const NormalItemSlot& slot) { return; } - if (slot.unknown_0000 != 0) { + if (slot.enabled != 0) { CSkillInfo skill = g_session.LookupSkill(slot.itemId); if (skill.MatchesShortcut(&slot)) { CMode* mode = g_modeMgr.gameMode; - int level = slot.unknown_0005; + int level = slot.value; if (IsIndexedSkill(static_cast(skill.id))) { - level = (std::min)(static_cast(slot.unknown_0005), skill.level); + level = (std::min)(static_cast(slot.value), skill.level); } mode->SendMsg(MM_USING_SKILL, reinterpret_cast(&skill), level, 0, 0); @@ -352,27 +352,27 @@ __forceinline void UseShortcutSlot(const NormalItemSlot& slot) { } ITEM_INFO item = LookupClientItem(g_session.m_inventoryItems, static_cast(slot.itemId), 1); - if (item.unknown_0000[1] == 0) { + if (item.identity[1] == 0) { return; } CMode* mode = g_modeMgr.GetGameMode(); - switch (item.unknown_0000[0]) { + switch (item.identity[0]) { case TYPE_HEAL: case TYPE_SCHANGE: case TYPE_SPECIAL: if (item.GetItemId() != 12802 || g_windowMgr.Confirm(LookupMessage(MSI_COMMAND_SETTING), 2, false, false, 0, "Message", 280, 120, 0) != 188) { - mode->SendMsg(MM_USEITEM, item.unknown_0000[1], 0, 0, 0); + mode->SendMsg(MM_USEITEM, item.identity[1], 0, 0, 0); } break; case TYPE_CASH_POINT_ITEM: - if (*reinterpret_cast(&g_session.unknown_16F4[4]) >= 0) { + if (*reinterpret_cast(&g_session.healthPoints[4]) >= 0) { const int result = g_windowMgr.Confirm(FormatOwnedString(LookupMessage(MSI_CONFIRM_TO_OPEN_CASH_ITEM), item.DisplayName(0).c_str()).c_str(), 2, false, false, 0, "Message", 280, 120, 0); if (result == 187) { - mode->SendMsg(MM_USEITEM, item.unknown_0000[1], 0, 0, 0); + mode->SendMsg(MM_USEITEM, item.identity[1], 0, 0, 0); } } @@ -382,15 +382,15 @@ __forceinline void UseShortcutSlot(const NormalItemSlot& slot) { case TYPE_AMMO: case TYPE_THROWWEAPON: case 19: - if (item.unknown_0000[3] == 0x8000) { - mode->SendMsg(MM_WEAR_EQUIP_ARROW, item.unknown_0000[1], item.unknown_0000[2], 0, 0); + if (item.identity[3] == 0x8000) { + mode->SendMsg(MM_WEAR_EQUIP_ARROW, item.identity[1], item.identity[2], 0, 0); } break; default: - if (item.unknown_0000[2] != 0 && item.unknown_0000[3] == 0 && item.identified != 0) { - mode->SendMsg(MM_WEAR_EQUIP, item.unknown_0000[1], item.unknown_0000[2], 0, 0); + if (item.identity[2] != 0 && item.identity[3] == 0 && item.identified != 0) { + mode->SendMsg(MM_WEAR_EQUIP, item.identity[1], item.identity[2], 0, 0); } break; @@ -417,7 +417,7 @@ int UIShortCutWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } NormalItemSlot& slot = *this->m_slots[index]; - if (slot.itemId == 0 || slot.unknown_0000 == 0) { + if (slot.itemId == 0 || slot.enabled == 0) { continue; } @@ -447,7 +447,7 @@ int UIShortCutWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } if (skill.available != 0 && skill.level != 0 && g_session.UseLevel(static_cast(skill.id)) == 0) { - slot.unknown_0005 = static_cast(skill.level); + slot.value = static_cast(skill.level); } } @@ -471,7 +471,7 @@ int UIShortCutWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 0; case UM_ROTATE_SHORTCUT_ROWS: - if (RotateCooldownRows(g_session.m_requestTimers, static_cast(a), static_cast(b), g_session.unknown_06FC, g_session.unknown_06A8)) { + if (RotateCooldownRows(g_session.m_requestTimers, static_cast(a), static_cast(b), g_session.mainShortcutRow, g_session.alternateShortcutRow)) { this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -499,7 +499,7 @@ void UINewChatWnd::Move(int x, int y) { this->m_inputX = screenX + 3; this->m_inputY = this->m_inputOffsetY + screenY; - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_03F0)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.subChatMiniWnd)) { window->SendMsg(this, UM_COMMAND, ID_DIALOG, this->geometry.width + x, this->geometry.height + y, 0); } } @@ -592,7 +592,7 @@ void UINewChatWnd::OnMouseMove(int x, int y) { // FUNCTION: fn_12695 void UINewChatWnd::OnLBtnDown(int x, int y) { if (static_cast(y - 1) <= 19) { - if (static_cast(this->geometry.unknown_0030) <= 0) { + if (static_cast(this->geometry.state) <= 0) { return; } @@ -632,7 +632,7 @@ void UINewChatWnd::Paint() { this->ClearSurface(0xFFFF00FF); this->FillRegion(4, this->geometry.height - this->m_inputAreaHeight, this->geometry.width - 8, 1, 0x8E8E8E); - if (static_cast(g_windowMgr.unknown_03F4) != 0 && this->m_inputAreaHeight + this->m_inputOffsetY < this->geometry.height) { + if (static_cast(g_windowMgr.chatWndStickOn) != 0 && this->m_inputAreaHeight + this->m_inputOffsetY < this->geometry.height) { const int tabsWidth = static_cast(this->m_tabControl->labels.size()) * this->m_tabWidth; this->FillRegion(3, this->m_inputOffsetY, 1, this->geometry.height - this->m_inputOffsetY, 0xFFFFFF); this->FillRegion(tabsWidth + 3, this->m_inputOffsetY, this->geometry.width - tabsWidth - 10, 1, 0xFFFFFF); @@ -646,7 +646,7 @@ void UINewChatWnd::Paint() { this->DrawBitmap(0, this->geometry.height - background->image.height, &background->image, false); } - if (static_cast(this->geometry.unknown_0030) > 0) { + if (static_cast(this->geometry.state) > 0) { if (g_windowMgr.chatModeChanged) { auto* chatMode = static_cast(ResourceMgr::Instance().Load( Resolve(g_windowMgr.inputSuggestionsEnabled ? "유저인터페이스\\basic_interface\\chatmode_on.bmp" : "유저인터페이스\\basic_interface\\chatmode_off.bmp") @@ -675,25 +675,25 @@ void UINewChatWnd::OnLBtnUp(int x, int y) { // OFFSET: 0x009313F0 // FUNCTION: fn_12704 void UIRoMapWnd::OnLBtnUp(int x, int y) { - this->unknown_01FC.clear(); + this->fieldNames.clear(); unsigned int mapIndex = 0; if (CWorldViewMap* map = g_worldViewMgr.CurrentWorld()->MapAt(mapIndex, x, y)) { - this->unknown_0208 = mapIndex; + this->selectedMapIndex = mapIndex; for (CWorldViewField* field : map->fields) { - this->unknown_01FC.push_back(field->unknown_002C); + this->fieldNames.push_back(field->fieldName); } } - if (!this->unknown_01FC.empty()) { - if (g_windowMgr.unknown_0214 != 0) { + if (!this->fieldNames.empty()) { + if (g_windowMgr.comboBoxWnd != 0) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } - if (!this->unknown_01FC.empty()) { + if (!this->fieldNames.empty()) { UIWindow* menu = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); int width = 0; - for (std::vector::iterator name = this->unknown_01FC.begin(); name != this->unknown_01FC.end(); ++name) { + for (std::vector::iterator name = this->fieldNames.begin(); name != this->fieldNames.end(); ++name) { const int textWidth = this->TextWidth(name->c_str(), 0, 0, 14, 0, 0); if (width < textWidth) { width = textWidth; @@ -701,7 +701,7 @@ void UIRoMapWnd::OnLBtnUp(int x, int y) { menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(name->c_str()), 0, 0, 0); } - const int height = static_cast((std::min)(this->unknown_01FC.size() * 16, 160u)); + const int height = static_cast((std::min)(this->fieldNames.size() * 16, 160u)); menu->SendMsg(nullptr, UM_SETCURITEM, 0, 0, 0, 0); menu->Resize(width, height); menu->SendMsg(nullptr, UM_SET_CALLER_WID, 140, 0, 0, 0); @@ -710,13 +710,13 @@ void UIRoMapWnd::OnLBtnUp(int x, int y) { const int menuX = this->geometry.width - (x + 2) - width >= 0 ? x + 2 : this->geometry.width - width; menu->Move(menuX, menuY); } - } else if (this->unknown_00C0) { - std::string name = this->unknown_00C0->name; + } else if (this->selectedRecord) { + std::string name = this->selectedRecord->name; if (name.size() > 4) { name.resize(name.size() - 4); } - g_navigationManager.unknown_1254 = false; + g_navigationManager.expandedMap = false; g_navigationManager.SearchNavigation(name, 0, false); if (g_windowMgr.window_4F174) { static_cast(g_windowMgr.window_4F174)->SelectRoute(0); @@ -733,11 +733,11 @@ void UIMemorialDunWnd::Move(int x, int y) { const int top = y <= g_renderer->viewport.height - this->geometry.height ? y : 310; this->UIFrameWnd::Move(left, top); - if (g_session.unknown_5940 != left) { - g_session.unknown_5940 = left; + if (g_session.memorialWindowX != left) { + g_session.memorialWindowX = left; } - if (g_session.unknown_5944 != top) { - g_session.unknown_5944 = top; + if (g_session.memorialWindowY != top) { + g_session.memorialWindowY = top; } } @@ -770,11 +770,11 @@ void UIMemorialDunWnd::OnCreate(int, int) { // OFFSET: 0x0091CF00 // FUNCTION: fn_12621 void UIMemorialDunWnd::ResetDungeonInfo() { - g_session.unknown_5950 = ""; - g_session.unknown_5968 = 0; - g_session.unknown_596C = 0; - g_session.unknown_5970 = 0; - g_session.unknown_5948 = 0; + g_session.memorialDungeonName = ""; + g_session.memorialQueuePosition = 0; + g_session.memorialCreationTime = 0; + g_session.memorialExpirationTime = 0; + g_session.memorialDungeonState = 0; } // OFFSET: 0x0092C6B0 @@ -794,26 +794,26 @@ void UIMemorialDunWnd::Paint() { char timeText[128]; const unsigned short codePage = static_cast(g_textCodePage); - if (g_session.unknown_5948 != 3) { + if (g_session.memorialDungeonState != 3) { char nameColor[12]; char endColor[12]; char name[80]; char title[100]; sprintf(nameColor, "^%02X%02X%02X", 0x41, 0x69, 0xE1); sprintf(endColor, "^%02X%02X%02X", 0, 0, 0); - sprintf(name, "%s[%s]%s", nameColor, g_session.unknown_5950.c_str(), endColor); - sprintf(title, LookupMessage(g_session.unknown_5948 + 0x539), name); + sprintf(name, "%s[%s]%s", nameColor, g_session.memorialDungeonName.c_str(), endColor); + sprintf(title, LookupMessage(g_session.memorialDungeonState + 0x539), name); const int width = this->ColoredTextWidth(title, 0, 0, 12, 0); DrawColoredText(*this, (this->geometry.width - width) / 2, 30, title, 0, color, 0, 12, false); } - if (g_session.unknown_5948 == 0) { - sprintf(text, LookupMessage(MSI_MEMORIAL_DUN_PRIORITY), g_session.unknown_5968); + if (g_session.memorialDungeonState == 0) { + sprintf(text, LookupMessage(MSI_MEMORIAL_DUN_PRIORITY), g_session.memorialQueuePosition); const int width = this->ColoredTextWidth(text, 0, 0, 12, 0); DrawColoredText(*this, (this->geometry.width - width) / 2, (this->geometry.height - 17) / 2, text, 0, color, 0, 12, false); - } else if (g_session.unknown_5948 == 1) { - if (g_session.unknown_5970) { - strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.unknown_5970))); + } else if (g_session.memorialDungeonState == 1) { + if (g_session.memorialExpirationTime) { + strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.memorialExpirationTime))); sprintf(text, LookupMessage(MSI_MEMORIAL_DUN_NOTIFY), timeText); std::vector lines; this->WrapPixelText(text, lines, this->geometry.width - 20); @@ -828,15 +828,15 @@ void UIMemorialDunWnd::Paint() { DrawColoredText(*this, (this->geometry.width - width) / 2, 55, lines[0].c_str(), 0, color, 0, 12, false); } } - } else if (g_session.unknown_5948 == 2) { - if (g_session.unknown_596C) { + } else if (g_session.memorialDungeonState == 2) { + if (g_session.memorialCreationTime) { this->DrawTextAt(10, 55, LookupMessage(MSI_MEMORIAL_DUN_NOTIFY2), 0, 0, 12, 0, 0, 0); - strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.unknown_596C))); + strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.memorialCreationTime))); sprintf(text, "^ff0000%s^ffffff", timeText); const int width = this->ColoredTextWidth(text, 0, 0, 12, 0); DrawColoredText(*this, (this->geometry.width - width) / 2, 75, text, 0, color, 0, 12, false); } - } else if (g_session.unknown_5948 == 3) { + } else if (g_session.memorialDungeonState == 3) { std::vector lines; this->WrapPixelText(LookupMessage(MSI_MEMORIAL_DUN_OUT1), lines, this->geometry.width - 20); int y = 55; @@ -866,7 +866,7 @@ void UIMemorialDunWnd::Paint() { // OFFSET: 0x0092AFE0 // FUNCTION: fn_12656 void UISubChatMiniWnd::OnCreate(int, int) { - this->Resize(this->m_rowHeight * this->unknown_00B4, this->m_offsetY); + this->Resize(this->m_rowHeight * this->rowCount, this->m_offsetY); } // OFFSET: 0x0093CA50 @@ -928,10 +928,10 @@ void UISubChatMiniWnd::OnLBtnDown(int x, int) { // OFFSET: 0x00940EB0 // FUNCTION: fn_12782 void UINewChatWnd::StoreInfo() { - g_windowMgr.unknown_004C = this->geometry.unknown_0030; - g_windowMgr.unknown_0038 = this->geometry.height; - g_windowMgr.unknown_0030 = this->geometry.x; - g_windowMgr.unknown_0034 = this->geometry.y; + g_windowMgr.chatWndStatus = this->geometry.state; + g_windowMgr.chatWndHeight = this->geometry.height; + g_windowMgr.chatWndX = this->geometry.x; + g_windowMgr.chatWndY = this->geometry.y; } // OFFSET: 0x00941190 @@ -990,7 +990,7 @@ void UINewChatWnd::SaveChatLogs() { // OFFSET: 0x009166A0 // FUNCTION: fn_12584 void UINewChatWnd::RefreshTabs(bool arrange) { - if (arrange && this->geometry.unknown_0030 != 0) { + if (arrange && this->geometry.state != 0) { int index = 0; for (std::vector::iterator tab = this->m_tabs.begin(); tab != this->m_tabs.end(); ++tab, ++index) { if (this->m_currentTab == index) { @@ -1017,13 +1017,13 @@ void UIMemorialDunWnd::ArrangeButtons() { this->m_partyButton->Move(-100, -100); } - if (g_session.unknown_5948 == 0 || g_session.unknown_5948 == 1 || g_session.unknown_5948 == 2) { + if (g_session.memorialDungeonState == 0 || g_session.memorialDungeonState == 1 || g_session.memorialDungeonState == 2) { this->m_actionButton->Move(-100, -100); this->m_message0 = 600; - if (g_session.unknown_5464 && this->m_partyButton && g_session.unknown_5948 == 1) { + if (g_session.partyLeader && this->m_partyButton && g_session.memorialDungeonState == 1) { this->m_partyButton->Move(41, 115); } - } else if (g_session.unknown_5948 == 3) { + } else if (g_session.memorialDungeonState == 3) { this->m_actionButton->Move((this->geometry.width - this->m_actionButton->geometry.width) / 2, this->geometry.height - 30); this->m_message0 = 184; } @@ -1047,9 +1047,9 @@ int UIMemorialDunWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum case ID_CANCEL: { MemorialDungeonCommandPacket packet; packet.id = 0x2CF; - if (g_session.unknown_5948 == 0) { + if (g_session.memorialDungeonState == 0) { packet.command = 0; - } else if (g_session.unknown_5948 == 1) { + } else if (g_session.memorialDungeonState == 1) { packet.command = 1; } GetRagConnection().Send(g_packetLengths.FixedLength(packet.id), &packet); @@ -1057,12 +1057,12 @@ int UIMemorialDunWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum } case ID_CLOSE: this->Show(0); - if (g_session.unknown_5948 == 2) { - g_session.unknown_593C = 0; + if (g_session.memorialDungeonState == 2) { + g_session.memorialWindowOpen = 0; } return 0; case ID_DELETE: - if (g_session.unknown_5464 != 0) { + if (g_session.partyLeader != 0) { g_modeMgr.GetGameMode()->SendMsg(MM_MEMORIALDUNGEON_COMMAND, 0, 0, 0, 0); } return 0; @@ -1129,22 +1129,22 @@ UIMemorialDunWnd::UIMemorialDunWnd() // OFFSET: 0x00912460 // FUNCTION: fn_12530 UISubChatMiniWnd::UISubChatMiniWnd() - : UIFrameWnd(0), unknown_00B4(2), m_rowHeight(32), m_offsetY(32) { + : UIFrameWnd(0), rowCount(2), m_rowHeight(32), m_offsetY(32) { } // OFFSET: 0x00911700 // FUNCTION: fn_12518 UINewChatWnd::UINewChatWnd() : UIFrameWnd(0) { this->m_chatEdit = nullptr; - this->unknown_00C0 = nullptr; + this->m_whisperEdit = nullptr; this->m_inputEdit = nullptr; - this->unknown_00B8 = nullptr; - this->unknown_0110 = 10; - *reinterpret_cast(&g_windowMgr.unknown_03F4) = 1; - this->geometry.unknown_0030 = 0; - this->unknown_00F0 = 0; + this->m_inputResizer = nullptr; + this->m_maxTabs = 10; + *reinterpret_cast(&g_windowMgr.chatWndStickOn) = 1; + this->geometry.state = 0; + this->m_menuMode = 0; this->m_currentTab = 0; - this->unknown_0118 = 0; + this->m_savedRowCount = 0; this->m_inputOffsetY = 16; this->m_tabWidth = 71; this->m_inputAreaHeight = 24; @@ -1168,11 +1168,11 @@ UINewChatWnd::UINewChatWnd() : UIFrameWnd(0) { // FUNCTION: fn_12738 void UISubChatHisWnd::Resize(int width, int height) { this->UIFrameWnd::Resize(width, height); - this->m_chatBox->Resize(this->geometry.width - 8, this->geometry.height - this->unknown_00F0 - this->m_inputHeight - 4, true); + this->m_chatBox->Resize(this->geometry.width - 8, this->geometry.height - this->headerHeight - this->m_inputHeight - 4, true); this->m_resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->m_miniButton->Move(this->m_inputWidth + 26, 5); - this->m_state.unknown_0008 = this->geometry.width; - this->m_state.unknown_000C = this->geometry.height - this->m_inputHeight; + this->m_state.width = this->geometry.width; + this->m_state.height = this->geometry.height - this->m_inputHeight; g_session.m_subChatWnds[this->m_index].width = this->geometry.width; g_session.m_subChatWnds[this->m_index].height = this->geometry.height; } @@ -1352,7 +1352,7 @@ int UISubChatHisWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume rectangle.left = this->m_chatBox->geometry.x; rectangle.top = this->m_chatBox->geometry.y; rectangle.right = this->geometry.width - 3; - rectangle.bottom = this->geometry.height - this->unknown_00F0; + rectangle.bottom = this->geometry.height - this->headerHeight; this->FillSurface(0xFFFF00FF, &rectangle); return 0; } @@ -1367,13 +1367,13 @@ int UISubChatHisWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume // FUNCTION: fn_12644 void UINewChatWnd::OnCreate(int width, int height) { if (height > this->m_inputAreaHeight) { - int rows = (height - (static_cast(this->geometry.unknown_0030) + this->m_inputOffsetY + 74)) / 42 + 1; + int rows = (height - (static_cast(this->geometry.state) + this->m_inputOffsetY + 74)) / 42 + 1; if (rows > 4) { rows = 4; } - this->geometry.unknown_0030 = rows; + this->geometry.state = rows; } else { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } this->m_tabWidth = 0; @@ -1383,18 +1383,18 @@ void UINewChatWnd::OnCreate(int width, int height) { this->m_tabControl->Configure(1, this->m_inputOffsetY, 10, 1, 1, 1, 0, 0, 0xFFFFFF, 0x8E8E8E, 0xFFFFFF, 0xFFFFFF); this->m_tabControl->Move(3, 0); this->AddChild(this->m_tabControl); - this->m_tabControl->unknown_007C = 0; + this->m_tabControl->activeTabIndex = 0; { std::string name = "유저인터페이스\\basic_interface\\stickoff"; - this->unknown_0128 = new UIBitmapButton(); - static_cast(this->unknown_0128)->SetBitmap((name + "_a.bmp").c_str(), 0, 0); - static_cast(this->unknown_0128)->SetBitmap((name + "_b.bmp").c_str(), 1, 0); - static_cast(this->unknown_0128)->SetBitmap((name + "_b.bmp").c_str(), 2, 0); - static_cast(this->unknown_0128)->SetSize(static_cast(this->unknown_0128)->BitmapWidth(), static_cast(this->unknown_0128)->BitmapHeight()); - static_cast(this->unknown_0128)->Move(this->m_tabWidth * 2 + 4, 4); - static_cast(this->unknown_0128)->SetId(0x166); - this->AddChild(static_cast(this->unknown_0128)); + this->m_headerButton = new UIBitmapButton(); + static_cast(this->m_headerButton)->SetBitmap((name + "_a.bmp").c_str(), 0, 0); + static_cast(this->m_headerButton)->SetBitmap((name + "_b.bmp").c_str(), 1, 0); + static_cast(this->m_headerButton)->SetBitmap((name + "_b.bmp").c_str(), 2, 0); + static_cast(this->m_headerButton)->SetSize(static_cast(this->m_headerButton)->BitmapWidth(), static_cast(this->m_headerButton)->BitmapHeight()); + static_cast(this->m_headerButton)->Move(this->m_tabWidth * 2 + 4, 4); + static_cast(this->m_headerButton)->SetId(0x166); + this->AddChild(static_cast(this->m_headerButton)); } { @@ -1464,20 +1464,20 @@ void UINewChatWnd::OnCreate(int width, int height) { g_windowMgr.SetFocus(this->m_chatEdit); this->m_chatEdit->SetId(0x1ED); - this->unknown_00C0 = new UIWhisperEditCtrl(); - static_cast(this->unknown_00C0)->SetSize(90, 16); - static_cast(this->unknown_00C0)->Move(6, this->geometry.height - this->m_inputAreaHeight + 4); - static_cast(this->unknown_00C0)->maximum = 24; - static_cast(this->unknown_00C0)->Background(240, 240, 240); - this->AddChild(static_cast(this->unknown_00C0)); + this->m_whisperEdit = new UIWhisperEditCtrl(); + static_cast(this->m_whisperEdit)->SetSize(90, 16); + static_cast(this->m_whisperEdit)->Move(6, this->geometry.height - this->m_inputAreaHeight + 4); + static_cast(this->m_whisperEdit)->maximum = 24; + static_cast(this->m_whisperEdit)->Background(240, 240, 240); + this->AddChild(static_cast(this->m_whisperEdit)); this->m_message0 = 0xB8; - this->unknown_00B8 = new UIResizer(); - static_cast(this->unknown_00B8)->SetBitmapName("유저인터페이스\\basic_interface\\dialog_mid.bmp"); - static_cast(this->unknown_00B8)->SetSize(static_cast(this->unknown_00B8)->geometry.width, static_cast(this->unknown_00B8)->geometry.height); - static_cast(this->unknown_00B8)->SetDirection(0); - static_cast(this->unknown_00B8)->Move(2, this->geometry.height - static_cast(this->unknown_00B8)->geometry.height); - this->AddChild(static_cast(this->unknown_00B8)); + this->m_inputResizer = new UIResizer(); + static_cast(this->m_inputResizer)->SetBitmapName("유저인터페이스\\basic_interface\\dialog_mid.bmp"); + static_cast(this->m_inputResizer)->SetSize(static_cast(this->m_inputResizer)->geometry.width, static_cast(this->m_inputResizer)->geometry.height); + static_cast(this->m_inputResizer)->SetDirection(0); + static_cast(this->m_inputResizer)->Move(2, this->geometry.height - static_cast(this->m_inputResizer)->geometry.height); + this->AddChild(static_cast(this->m_inputResizer)); std::string basePath = "유저인터페이스\\basic_interface\\"; const int base = this->geometry.height - this->m_inputAreaHeight; @@ -1515,9 +1515,9 @@ void UINewChatWnd::OnCreate(int width, int height) { this->m_inputX = screenX + 3; this->m_listColor = 0x66000000; this->m_inputY = screenY + this->m_inputOffsetY; - std::memset(this->unknown_00DC, 0, sizeof(this->unknown_00DC)); + std::memset(this->m_secondaryStateStorage, 0, sizeof(this->m_secondaryStateStorage)); this->m_listWidth = this->geometry.width - 6; - std::memset(this->unknown_00D4, 0, sizeof(this->unknown_00D4)); + std::memset(this->m_primaryStateStorage, 0, sizeof(this->m_primaryStateStorage)); this->m_listHeight = this->geometry.height - this->m_inputOffsetY - this->m_inputAreaHeight; if (!g_windowMgr.chatModeChanged) { diff --git a/Source/UI/Skill/UISkillDescribeWnd.h b/Source/UI/Skill/UISkillDescribeWnd.h index 5fc5298d5..d78bdc196 100644 --- a/Source/UI/Skill/UISkillDescribeWnd.h +++ b/Source/UI/Skill/UISkillDescribeWnd.h @@ -14,9 +14,9 @@ public: /* 00B4 */ UIBitmapButton* m_closeButton; /* 00B8 */ UITextViewer* m_viewer; - /* 00BC */ std::string unknown_00BC; - /* 00D4 */ std::string unknown_00D4; - /* 00EC */ std::string unknown_00EC; + /* 00BC */ std::string iconName; + /* 00D4 */ std::string skillName; + /* 00EC */ std::string descriptionText; /* 0104 */ int m_skillId; /* 0108 */ UITextViewer* m_text; /* 010C */ UIBitmapButton* m_delayButton; diff --git a/Source/UI/Skill/UISkillListWnd.h b/Source/UI/Skill/UISkillListWnd.h index 1471e8b93..88f93a51c 100644 --- a/Source/UI/Skill/UISkillListWnd.h +++ b/Source/UI/Skill/UISkillListWnd.h @@ -42,10 +42,10 @@ public: /* 011C */ int scroll; /* 0120 */ int columns; /* 0124 */ int visibleRows; - /* 0128 */ int unknown_0128; + /* 0128 */ int hasVerticalOverflow; /* 012C */ std::list skills; /* 0134 */ SkillListWndInfo* saved; - /* 0138 */ std::vector unknown_0138; + /* 0138 */ std::vector contextMenuEntries; /* 0144 */ int skillTab; }; diff --git a/Source/UI/SkillDelayInfo/SkillDelayInfo.h b/Source/UI/SkillDelayInfo/SkillDelayInfo.h index f264a1ea7..c0131aefa 100644 --- a/Source/UI/SkillDelayInfo/SkillDelayInfo.h +++ b/Source/UI/SkillDelayInfo/SkillDelayInfo.h @@ -18,8 +18,8 @@ class CUITime; class CDelayItemData { public: - /* 0000 */ int unknown_0000; - /* 0004 */ std::map unknown_0004; + /* 0000 */ int levelIndex; + /* 0004 */ std::map delayTimes; }; class CUIDelayItem : public CUIListItem { @@ -68,7 +68,7 @@ public: void SetSkill(int skillId); /* 00D8 */ CUITitleBar* titleBar; - /* 00DC */ CUIStaticText* unknown_00DC; + /* 00DC */ CUIStaticText* skillNameText; /* 00E0 */ CUIStaticText* labels[3]; /* 00EC */ CUIStaticText* columns[4]; /* 00FC */ CUIListBoxEx* delayList; diff --git a/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp index ad6757eaf..9a37559a0 100644 --- a/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp +++ b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp @@ -96,8 +96,8 @@ struct SkillDelayInfoSelectCallback { // FUNCTION: fn_16799 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x00A71300 @@ -135,7 +135,7 @@ void CUIListBoxEx: // OFFSET: 0x00A719E0 // FUNCTION: fn_16807 void CUISkillDelayInfo::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = true; this->Resize(345, 379); this->Move(0, 0); @@ -262,7 +262,7 @@ void CUIListBoxEx: } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (SkillDelayInfo::CUIDelayItem* row : this->items) { @@ -272,7 +272,7 @@ void CUIListBoxEx: } listItem->SetSelected(true); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } SkillDelayInfo::CUIDelayItem* delayItem = dynamic_cast(listItem); @@ -395,7 +395,7 @@ void SkillDelayInfoFreezeCallback::operator()(CUIListItem* const& item) { void SkillDelayInfoSelectCallback::operator()(CUIListItem* const& item) { CUIListBoxEx* list = this->list; CUIListItem* selectedItem = item; - if (list->unknown_00C4) { + if (list->layoutFlag) { return; } for (SkillDelayInfo::CUIDelayItem* row : list->items) { @@ -405,7 +405,7 @@ void SkillDelayInfoSelectCallback::operator()(CUIListItem* const& item) { } selectedItem->SetSelected(true); - if (selectedItem->index == static_cast(list->selected) && list->unknown_00E0) { + if (selectedItem->index == static_cast(list->selected) && list->selectionFlag) { return; } SkillDelayInfo::CUIDelayItem* delayItem = dynamic_cast(selectedItem); @@ -426,7 +426,7 @@ void SkillDelayInfoSelectCallback::operator()(CUIListItem* const& item) { // OFFSET: 0x00A77200 // FUNCTION: fn_16872 CUISkillDelayInfo::CUISkillDelayInfo() - : titleBar(nullptr), unknown_00DC(nullptr), labels{}, columns{}, delayList(nullptr), description(nullptr), backgroundColor(0), borderColor(0), skillId(7999) { + : titleBar(nullptr), skillNameText(nullptr), labels{}, columns{}, delayList(nullptr), description(nullptr), backgroundColor(0), borderColor(0), skillId(7999) { } namespace SkillDelayInfo { @@ -468,11 +468,11 @@ void CUISkillDelayInfo::OnSelectItem(SkillDelayInfo::CUIDelayItem*, const SkillD // OFFSET: 0x00A77B20 // FUNCTION: fn_16881 void CUISkillDelayInfo::OnUpdateItem(SkillDelayInfo::CUIDelayItem* item, const SkillDelayInfo::CDelayItemData& data) { - item->level->SetText(std::to_string(data.unknown_0000 + 1)); + item->level->SetText(std::to_string(data.levelIndex + 1)); for (int index = 0; index < 4; ++index) { - const auto found = data.unknown_0004.find(index); - item->times[index]->SetTime(found != data.unknown_0004.end() ? found->second : 0); + const auto found = data.delayTimes.find(index); + item->times[index]->SetTime(found != data.delayTimes.end() ? found->second : 0); } } @@ -543,7 +543,7 @@ void CUISkillDelayInfo::SetSkill(int skillId) { if (!IsNullOrEmpty(skillDescription)) { std::vector lines = Split(skillDescription, "\r\n"); if (!lines.empty()) { - this->unknown_00DC->SetText(lines[0].c_str(), lines[0].size()); + this->skillNameText->SetText(lines[0].c_str(), lines[0].size()); } } @@ -615,7 +615,7 @@ void CUISkillDelayInfo::OnInit() { this->labels[1]->SetText(LookupMessage(4304)); this->labels[2]->SetText(LookupMessage(4305)); - this->delayList->unknown_00C4 = 1; + this->delayList->layoutFlag = 1; this->delayList->Invalidate(); this->description->scrollBar->SetHidden(1); } @@ -707,20 +707,20 @@ void CUISkillDelayInfo::OnCreate(int width, int height) { ); this->titleBar->SetSecondButton(closeButton); - this->unknown_00DC = new CUIStaticText(); - this->unknown_00DC->SetSize(325, 25); - this->unknown_00DC->Move(10, 27); - this->unknown_00DC->SetText(""); - this->unknown_00DC->SetFitText(1); - this->unknown_00DC->SetAlign(6, 6); - this->unknown_00DC->SetFont(DecryptName<0x192D654D29337BE5ULL>({ + this->skillNameText = new CUIStaticText(); + this->skillNameText->SetSize(325, 25); + this->skillNameText->Move(10, 27); + this->skillNameText->SetText(""); + this->skillNameText->SetFitText(1); + this->skillNameText->SetAlign(6, 6); + this->skillNameText->SetFont(DecryptName<0x192D654D29337BE5ULL>({ '\xA2', '\x0E', '\x5F', '\x40', '\x20', '\x65'})); - this->unknown_00DC->SetFontHeight(13); - this->unknown_00DC->SetBold(1); - this->unknown_00DC->SetColor(0); - this->unknown_00DC->SetShadow(0, 0xFFFFFF); - this->unknown_00DC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00DC); + this->skillNameText->SetFontHeight(13); + this->skillNameText->SetBold(1); + this->skillNameText->SetColor(0); + this->skillNameText->SetShadow(0, 0xFFFFFF); + this->skillNameText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->skillNameText); this->labels[0] = new CUIStaticText(); this->labels[0]->SetSize(140, 22); diff --git a/Source/UI/StylingShop/UIStylingShopWnd.cpp b/Source/UI/StylingShop/UIStylingShopWnd.cpp index de1781f38..bbf07a88d 100644 --- a/Source/UI/StylingShop/UIStylingShopWnd.cpp +++ b/Source/UI/StylingShop/UIStylingShopWnd.cpp @@ -96,7 +96,7 @@ void UIShowInfoWnd::ResetCheckBoxes() { } std::memset(this->m_changed, 0, sizeof(this->m_changed)); - this->unknown_00BC = 0; + this->costumeChanged = 0; for (unsigned int i = 0; i < this->m_list.size(); ++i) { this->m_list.clear(); } @@ -133,7 +133,7 @@ void UISlotForSelectWnd::OnLBtnDblClk(int, int) { // OFFSET: 0x0082A0C0 // FUNCTION: fn_10354 void UI2ndCostumeCheckBox::OnLBtnDown(int x, int y) { - if (this->m_disabled == 0 && this->geometry.unknown_0030 != 1) { + if (this->m_disabled == 0 && this->geometry.state != 1) { UICheckBox::OnLBtnDown(x, y); } } @@ -153,7 +153,7 @@ void UIStylingShopButton::OnLBtnUp(int, int) { return; } - this->geometry.unknown_0030 = 2; + this->geometry.state = 2; UIWindow* parent = this->parent; if (parent) { if (g_windowMgr.WindowPolicy(3, parent->geometry.id) != 0) { @@ -198,8 +198,8 @@ void UIStylingShopButton::OnMouseHover(int, int) { // FUNCTION: fn_10358 void UIStylingShopButton::OnMouseMove(int x, int y) { if (this->m_disabled == 0 && g_windowMgr.Capture() == this && x >= 0 && x < this->geometry.width && y >= 0 && y < this->geometry.height && - this->geometry.unknown_0030 != 2) { - this->geometry.unknown_0030 = 2; + this->geometry.state != 2) { + this->geometry.state = 2; this->Invalidate(); } } @@ -210,9 +210,9 @@ void UIStylingShopWnd::OnProcess() { for (std::map::iterator it = this->m_tabs.begin(); it != this->m_tabs.end(); ++it) { int id = it->first->geometry.id; if (id == 200) { - it->second->unknown_0084 = it->second->geometry.visible == 1; + it->second->primaryTabVisible = it->second->geometry.visible == 1; } else if (id == 498 || id == 583) { - it->second->unknown_0086 = it->second->geometry.visible == 1; + it->second->accessoryTabVisible = it->second->geometry.visible == 1; } if (it->second->geometry.visible != 0) { @@ -240,13 +240,13 @@ int UI2ndCostumeWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume if (argument1 == ID_CHECK) { if (sender == this->m_showCheckBox) { - if (this->m_display && this->m_hideCheckBox && this->m_showCheckBox->geometry.unknown_0030 != 0) { + if (this->m_display && this->m_hideCheckBox && this->m_showCheckBox->geometry.state != 0) { this->m_display->job = 1; this->m_hideCheckBox->SetChecked(0); this->m_showInfo->Invalidate(); } } else if (sender == this->m_hideCheckBox) { - if (this->m_display && this->m_showCheckBox && this->m_hideCheckBox->geometry.unknown_0030 != 0) { + if (this->m_display && this->m_showCheckBox && this->m_hideCheckBox->geometry.state != 0) { this->m_display->job = 0; this->m_showCheckBox->SetChecked(0); this->m_showInfo->Invalidate(); @@ -288,11 +288,11 @@ int UIBasicStylingWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu unselected = false; bool coloring = true; if (g_session.IsDoramJob(g_session.GetDisplayJob()) == true) { - g_session.m_hotkeyScript->Call("StylingShop_GetIsColoring_by_goods", "d>b", this->m_display->unknown_008C, &coloring); + g_session.m_hotkeyScript->Call("StylingShop_GetIsColoring_by_goods", "d>b", this->m_display->head, &coloring); } if (coloring == true) { - this->m_display->unknown_0094 = i + 1; + this->m_display->headPalette = i + 1; this->m_display->Invalidate(); } else { g_windowMgr.Confirm(LookupMessage(MSI_STYLING_SHOP_BASICSTYLE), 0, false, false, 0, "Message", 280, 120, 0); @@ -305,7 +305,7 @@ int UIBasicStylingWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu if (!unselected) { this->m_defaultPaletteButton->SetState(0); } else if (unselected == true && sender == this->m_defaultPaletteButton) { - this->m_display->unknown_0094 = 0; + this->m_display->headPalette = 0; this->m_display->Invalidate(); } @@ -389,12 +389,12 @@ int UIMyStyleWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 case ID_CLOSE: if (g_windowMgr.Confirm(LookupMessage(MSI_STYLING_SHOP_REGISTER_BOOKMARK), 2, false, false, 0, "Message", 280, 120, 0) != 188) { for (int i = 0; i < 2; ++i) { - if (sender == this->unknown_0094[i]) { + if (sender == this->deleteStyleButtons[i]) { this->RemoveChild(this->m_slots[i], 1); this->m_slots[i] = nullptr; - this->unknown_0094[i]->Enable(0); - this->unknown_009C[i]->Enable(0); - this->unknown_00A4[i]->Enable(0); + this->deleteStyleButtons[i]->Enable(0); + this->rotateLeftButtons[i]->Enable(0); + this->rotateRightButtons[i]->Enable(0); } } this->Invalidate(); @@ -411,11 +411,11 @@ int UIMyStyleWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 UIDisplayCharacter* display = slot->m_display; if (i == this->m_selectedSlot) { if (display) { - display->unknown_007C = "유저인터페이스\\styleshop\\shadow_chr_on.bmp"; + display->shadowBitmapName = "유저인터페이스\\styleshop\\shadow_chr_on.bmp"; display->Invalidate(); } } else if (display) { - display->unknown_007C = "유저인터페이스\\styleshop\\shadow_chr_off.bmp"; + display->shadowBitmapName = "유저인터페이스\\styleshop\\shadow_chr_off.bmp"; display->Invalidate(); } this->m_slots[i]->InvalidateChildren(); @@ -426,7 +426,7 @@ int UIMyStyleWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 case ID_RIGHT: case ID_LEFT: for (int i = 0; i < 2; ++i) { - if (sender == this->unknown_009C[i] || sender == this->unknown_00A4[i]) { + if (sender == this->rotateLeftButtons[i] || sender == this->rotateRightButtons[i]) { this->m_slots[i]->m_display->SendMsg(nullptr, UM_COMMAND, argument1, 0, 0, 0); } } @@ -472,14 +472,14 @@ int UIStylingshopTabParentWnd::SendMsg(UIWindow*, int, std::intptr_t, std::intpt // OFFSET: 0x00827610 // FUNCTION: fn_10327 void UIDisplayCharacter::LoadSessionStyle() { - this->unknown_0088 = g_session.m_robe; - this->unknown_008C = g_session.m_head; + this->robe = g_session.m_robe; + this->head = g_session.m_head; this->job = g_session.m_bodyCostume; - this->unknown_0094 = g_session.m_headPalette; - this->unknown_0098 = g_session.m_bodyStyle; - this->unknown_009C = *reinterpret_cast(&g_session.unknown_0EF4[4]); - this->unknown_00A0 = *reinterpret_cast(&g_session.unknown_0EF4[8]); - this->unknown_00A4 = *reinterpret_cast(&g_session.unknown_0EF4[0]); + this->headPalette = g_session.m_headPalette; + this->bodyStyle = g_session.m_bodyStyle; + this->topAccessory = *reinterpret_cast(&g_session.accessoryAppearance[4]); + this->middleAccessory = *reinterpret_cast(&g_session.accessoryAppearance[8]); + this->bottomAccessory = *reinterpret_cast(&g_session.accessoryAppearance[0]); } // OFFSET: 0x00822C60 @@ -500,41 +500,41 @@ UICostumeChangeWnd::UICostumeChangeWnd() : UIStylingshopTabParentWnd() { // OFFSET: 0x00822F20 // FUNCTION: fn_10289 UIDisplayCharacter::UIDisplayCharacter() : UIWindow(0) { - this->unknown_0080 = 0; - this->unknown_0084 = 0; - this->unknown_0088 = 0; - this->unknown_008C = 0; + this->slotNumber = 0; + this->direction = 0; + this->robe = 0; + this->head = 0; this->job = 0; - this->unknown_0094 = 0; - this->unknown_0098 = 0; - this->unknown_009C = 0; - this->unknown_00A0 = 0; - this->unknown_00A4 = 0; - *reinterpret_cast(&this->unknown_00B0) = 0; - this->unknown_00BC = 0; - this->unknown_00C0 = 0; - this->unknown_00C4 = 0; - this->unknown_00B4 = 0; - this->unknown_00B8 = 0; - this->unknown_007C = "유저인터페이스\\styleshop\\shadow_chr_off.bmp"; + this->headPalette = 0; + this->bodyStyle = 0; + this->topAccessory = 0; + this->middleAccessory = 0; + this->bottomAccessory = 0; + *reinterpret_cast(&this->hideFavoriteButton) = 0; + this->topAccessoryItemId = 0; + this->middleAccessoryItemId = 0; + this->bottomAccessoryItemId = 0; + this->shadowX = 0; + this->shadowY = 0; + this->shadowBitmapName = "유저인터페이스\\styleshop\\shadow_chr_off.bmp"; } // OFFSET: 0x00823CE0 // FUNCTION: fn_10298 void UIDisplayCharacter::CopyStyle(const UIDisplayCharacter* other) { - this->unknown_0080 = other->unknown_0080; - this->unknown_0084 = other->unknown_0084; - this->unknown_0088 = other->unknown_0088; - this->unknown_008C = other->unknown_008C; + this->slotNumber = other->slotNumber; + this->direction = other->direction; + this->robe = other->robe; + this->head = other->head; this->job = other->job; - this->unknown_0094 = other->unknown_0094; - this->unknown_0098 = other->unknown_0098; - this->unknown_009C = other->unknown_009C; - this->unknown_00A0 = other->unknown_00A0; - this->unknown_00A4 = other->unknown_00A4; - this->unknown_00BC = other->unknown_00BC; - this->unknown_00C0 = other->unknown_00C0; - this->unknown_00C4 = other->unknown_00C4; + this->headPalette = other->headPalette; + this->bodyStyle = other->bodyStyle; + this->topAccessory = other->topAccessory; + this->middleAccessory = other->middleAccessory; + this->bottomAccessory = other->bottomAccessory; + this->topAccessoryItemId = other->topAccessoryItemId; + this->middleAccessoryItemId = other->middleAccessoryItemId; + this->bottomAccessoryItemId = other->bottomAccessoryItemId; this->Invalidate(); } @@ -561,8 +561,8 @@ void UIStylingShopWnd::RefreshFavoriteButton() { UISlotOfMyStyleWnd* slot = myStyle->m_slots[i]; if (slot) { UIDisplayCharacter* saved = slot->m_display; - if (saved->unknown_008C == display->unknown_008C && saved->unknown_0094 == display->unknown_0094 && saved->unknown_0098 == display->unknown_0098 && - saved->unknown_009C == display->unknown_009C && saved->unknown_00A0 == display->unknown_00A0 && saved->unknown_00A4 == display->unknown_00A4 && + if (saved->head == display->head && saved->headPalette == display->headPalette && saved->bodyStyle == display->bodyStyle && + saved->topAccessory == display->topAccessory && saved->middleAccessory == display->middleAccessory && saved->bottomAccessory == display->bottomAccessory && saved->job == display->job) { favorite = true; break; @@ -645,13 +645,13 @@ bool UIStylingShopWnd::AddToMyStyle() { UISlotOfMyStyleWnd* slot = new UISlotOfMyStyleWnd(); slot->SetSize(static_cast(myStyle->geometry.width * 0.5 - 3.0), myStyle->geometry.height + 25); slot->Move(static_cast(myStyle->geometry.width * 0.5 * index), 0); - display->unknown_0080 = index; + display->slotNumber = index; slot->m_display->CopyStyle(display); myStyle->AddChildFront(slot); myStyle->m_slots[index] = slot; - myStyle->unknown_0094[index]->Enable(1); - myStyle->unknown_009C[index]->Enable(1); - myStyle->unknown_00A4[index]->Enable(1); + myStyle->deleteStyleButtons[index]->Enable(1); + myStyle->rotateLeftButtons[index]->Enable(1); + myStyle->rotateRightButtons[index]->Enable(1); return true; } } @@ -705,19 +705,19 @@ void UIStylingShopWnd::Paint() { // FUNCTION: fn_10320 void UIShowInfoWnd::CheckColoringGoods(bool* coloring) { if (g_session.IsDoramJob(g_session.GetDisplayJob()) == true) { - g_session.m_hotkeyScript->Call("StylingShop_GetIsColoring_by_goods", "d>b", this->m_display->unknown_008C, coloring); + g_session.m_hotkeyScript->Call("StylingShop_GetIsColoring_by_goods", "d>b", this->m_display->head, coloring); } const bool* flags = this->m_changed; const UIDisplayCharacter* display = this->m_display; if (*coloring) { - if (flags[0] && display->unknown_0094 == g_session.m_headPalette) { - } else if (flags[1] && display->unknown_008C == g_session.m_head) { - } else if (this->unknown_00BC == 1 && display->job == g_session.m_bodyCostume) { - } else if (flags[2] && display->unknown_0098 == g_session.m_bodyStyle) { - } else if (flags[3] && (display->unknown_009C == *reinterpret_cast(&g_session.unknown_0EF4[4]) || display->unknown_009C == 0)) { - } else if (flags[4] && (display->unknown_00A0 == *reinterpret_cast(&g_session.unknown_0EF4[8]) || display->unknown_00A0 == 0)) { - } else if (flags[5] && (display->unknown_00A4 == *reinterpret_cast(&g_session.unknown_0EF4[0]) || display->unknown_00A0 == 0)) { + if (flags[0] && display->headPalette == g_session.m_headPalette) { + } else if (flags[1] && display->head == g_session.m_head) { + } else if (this->costumeChanged == 1 && display->job == g_session.m_bodyCostume) { + } else if (flags[2] && display->bodyStyle == g_session.m_bodyStyle) { + } else if (flags[3] && (display->topAccessory == *reinterpret_cast(&g_session.accessoryAppearance[4]) || display->topAccessory == 0)) { + } else if (flags[4] && (display->middleAccessory == *reinterpret_cast(&g_session.accessoryAppearance[8]) || display->middleAccessory == 0)) { + } else if (flags[5] && (display->bottomAccessory == *reinterpret_cast(&g_session.accessoryAppearance[0]) || display->middleAccessory == 0)) { } else { return; } @@ -729,7 +729,7 @@ void UIShowInfoWnd::CheckColoringGoods(bool* coloring) { } this->m_list.clear(); std::memset(this->m_changed, 0, sizeof(this->m_changed)); - this->unknown_00BC = 0; + this->costumeChanged = 0; } // OFFSET: 0x00826E50 @@ -761,9 +761,9 @@ void UIShowInfoWnd::ArrangeCheckBoxes(const int& layout) { switch (layout) { case 496: this->m_checkTop = 1; - this->unknown_00A8 = 11; - this->unknown_00C8 = 24; - this->unknown_00CC = 0; + this->paymentFontSize = 11; + this->paymentTextX = 24; + this->paymentTextYOffset = 0; this->m_offBitmap = "유저인터페이스\\styleshop\\checkbox_mini_off.bmp"; for (int row = static_cast(this->m_list.size()); row < 4; ++row) { for (int column = static_cast(this->m_list.size()); column < 2; ++column) { @@ -779,14 +779,14 @@ void UIShowInfoWnd::ArrangeCheckBoxes(const int& layout) { break; case 200: this->m_checkTop = 6; - this->unknown_00A8 = 12; - this->unknown_00A1 = 1; - this->unknown_00A2 = 1; - this->unknown_00A0 = 1; - this->unknown_00C0 = 41; - this->unknown_00C4 = -2; - this->unknown_00C8 = 68; - this->unknown_00CC = 6; + this->paymentFontSize = 12; + this->showPaymentItems = 1; + this->showDottedLines = 1; + this->showPayments = 1; + this->paymentIconX = 41; + this->paymentIconYOffset = -2; + this->paymentTextX = 68; + this->paymentTextYOffset = 6; this->m_offBitmap = "유저인터페이스\\styleshop\\checkbox_off.bmp"; for (int i = static_cast(this->m_list.size()); i < 8; ++i) { this->m_checks[i]->SetBitmaps("유저인터페이스\\styleshop\\check_able.bmp", "유저인터페이스\\styleshop\\Notcheck.bmp"); @@ -795,9 +795,9 @@ void UIShowInfoWnd::ArrangeCheckBoxes(const int& layout) { break; case 497: this->m_checkTop = 1; - this->unknown_00A8 = 11; - this->unknown_00C8 = 24; - this->unknown_00CC = 0; + this->paymentFontSize = 11; + this->paymentTextX = 24; + this->paymentTextYOffset = 0; this->m_offBitmap = "유저인터페이스\\styleshop\\checkbox_mini_off.bmp"; for (int row = static_cast(this->m_list.size()); row < 4; ++row) { for (int column = static_cast(this->m_list.size()); column < 2; ++column) { @@ -814,14 +814,14 @@ void UIShowInfoWnd::ArrangeCheckBoxes(const int& layout) { case 498: case 583: this->m_checkTop = 6; - this->unknown_00A8 = 12; - this->unknown_00A1 = 1; - this->unknown_00A2 = 1; - this->unknown_00A0 = 1; - this->unknown_00C0 = 41; - this->unknown_00C4 = -2; - this->unknown_00C8 = 68; - this->unknown_00CC = 6; + this->paymentFontSize = 12; + this->showPaymentItems = 1; + this->showDottedLines = 1; + this->showPayments = 1; + this->paymentIconX = 41; + this->paymentIconYOffset = -2; + this->paymentTextX = 68; + this->paymentTextYOffset = 6; this->m_offBitmap = "유저인터페이스\\styleshop\\checkbox_off.bmp"; for (int i = static_cast(this->m_list.size()); i < 8; ++i) { this->m_checks[i]->SetBitmaps("유저인터페이스\\styleshop\\check_able.bmp", "유저인터페이스\\styleshop\\Notcheck.bmp"); @@ -848,32 +848,32 @@ __declspec(noinline) void ToggleStylingAccessory(int itemId, int slot) { switch (slot) { case 0: display = tab->m_display; - if (desc.unknown_0040 == display->unknown_009C) { - display->unknown_00BC = 0; - display->unknown_009C = 0; + if (desc.viewId == display->topAccessory) { + display->topAccessoryItemId = 0; + display->topAccessory = 0; } else { - display->unknown_00BC = itemId; - display->unknown_009C = desc.unknown_0040; + display->topAccessoryItemId = itemId; + display->topAccessory = desc.viewId; } break; case 1: display = tab->m_display; - if (desc.unknown_0040 == display->unknown_00A0) { - display->unknown_00C0 = 0; - display->unknown_00A0 = 0; + if (desc.viewId == display->middleAccessory) { + display->middleAccessoryItemId = 0; + display->middleAccessory = 0; } else { - display->unknown_00C0 = itemId; - display->unknown_00A0 = desc.unknown_0040; + display->middleAccessoryItemId = itemId; + display->middleAccessory = desc.viewId; } break; case 2: display = tab->m_display; - if (desc.unknown_0040 == display->unknown_00A4) { - display->unknown_00C4 = 0; - display->unknown_00A4 = 0; + if (desc.viewId == display->bottomAccessory) { + display->bottomAccessoryItemId = 0; + display->bottomAccessory = 0; } else { - display->unknown_00C4 = itemId; - display->unknown_00A4 = desc.unknown_0040; + display->bottomAccessoryItemId = itemId; + display->bottomAccessory = desc.viewId; } break; } @@ -1020,22 +1020,22 @@ bool UIShowInfoWnd::CheckPayment(const int& index, const int& zeny, const int& i void UIShowInfoWnd::GetPayment(const int& type, int* zeny, int* itemId, int* costumeItemId) { switch (type) { case 1: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_0094, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->headPalette, zeny, itemId, costumeItemId); break; case 2: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_008C, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->head, zeny, itemId, costumeItemId); break; case 3: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_0098, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->bodyStyle, zeny, itemId, costumeItemId); break; case 4: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_00BC, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->topAccessoryItemId, zeny, itemId, costumeItemId); break; case 5: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_00C0, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->middleAccessoryItemId, zeny, itemId, costumeItemId); break; case 6: - g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->unknown_00C4, zeny, itemId, costumeItemId); + g_session.m_hotkeyScript->Call("StylingShop_GetPayment_by_goods", "sd>ddd", this->m_display->GetStyleTable(type).c_str(), this->m_display->bottomAccessoryItemId, zeny, itemId, costumeItemId); break; case 7: g_session.m_hotkeyScript->Call("StylingShop_GetPaymentChangeCostume", "dd>ddd", g_session.m_job, this->m_display->job, zeny, itemId, costumeItemId); @@ -1048,53 +1048,53 @@ void UIShowInfoWnd::GetPayment(const int& type, int* zeny, int* itemId, int* cos void UIShowInfoWnd::UpdateChangedStyles() { bool coloring = true; this->CheckColoringGoods(&coloring); - if (!this->m_changed[0] && this->m_display->unknown_0094 != g_session.m_headPalette && coloring == true) { + if (!this->m_changed[0] && this->m_display->headPalette != g_session.m_headPalette && coloring == true) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(1); this->m_changed[0] = 1; } - if (!this->m_changed[1] && this->m_display->unknown_008C != g_session.m_head) { + if (!this->m_changed[1] && this->m_display->head != g_session.m_head) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(2); this->m_changed[1] = 1; } - if (!this->m_changed[2] && this->m_display->unknown_0098 != g_session.m_bodyStyle) { + if (!this->m_changed[2] && this->m_display->bodyStyle != g_session.m_bodyStyle) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(3); this->m_changed[2] = 1; } int sequence = 0; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "TopAccessory", this->m_display->unknown_00BC, &sequence); - if (!this->m_changed[3] && this->m_display->unknown_009C != *reinterpret_cast(&g_session.unknown_0EF4[4]) && this->m_display->unknown_009C != 0 && + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "TopAccessory", this->m_display->topAccessoryItemId, &sequence); + if (!this->m_changed[3] && this->m_display->topAccessory != *reinterpret_cast(&g_session.accessoryAppearance[4]) && this->m_display->topAccessory != 0 && sequence != 0) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(4); this->m_changed[3] = 1; } - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "MidAccessory", this->m_display->unknown_00C0, &sequence); - if (!this->m_changed[4] && this->m_display->unknown_00A0 != *reinterpret_cast(&g_session.unknown_0EF4[8]) && this->m_display->unknown_00A0 != 0 && + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "MidAccessory", this->m_display->middleAccessoryItemId, &sequence); + if (!this->m_changed[4] && this->m_display->middleAccessory != *reinterpret_cast(&g_session.accessoryAppearance[8]) && this->m_display->middleAccessory != 0 && sequence != 0) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(5); this->m_changed[4] = 1; } - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "BottomAccessory", this->m_display->unknown_00C4, &sequence); - if (!this->m_changed[5] && this->m_display->unknown_00A4 != *reinterpret_cast(&g_session.unknown_0EF4[0]) && this->m_display->unknown_00A4 != 0 && + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", "BottomAccessory", this->m_display->bottomAccessoryItemId, &sequence); + if (!this->m_changed[5] && this->m_display->bottomAccessory != *reinterpret_cast(&g_session.accessoryAppearance[0]) && this->m_display->bottomAccessory != 0 && sequence != 0) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(6); this->m_changed[5] = 1; } - if (!this->unknown_00BC && this->m_display->job != g_session.m_bodyCostume) { + if (!this->costumeChanged && this->m_display->job != g_session.m_bodyCostume) { this->m_checks[this->m_list.size()]->SetChecked(1); this->m_list.push_back(7); - this->unknown_00BC = 1; + this->costumeChanged = 1; } } @@ -1111,20 +1111,20 @@ int UIDisplayCharacter::SendMsg(UIWindow* sender, int message, std::intptr_t arg this->LoadSessionStyle(); break; case ID_RIGHT: - if (this->unknown_0084 > 0) { - --this->unknown_0084; + if (this->direction > 0) { + --this->direction; } else { - this->unknown_0084 = 7; + this->direction = 7; } break; case ID_LEFT: - this->unknown_0084 = this->unknown_0084 < 7 ? this->unknown_0084 + 1 : 0; + this->direction = this->direction < 7 ? this->direction + 1 : 0; break; case ID_PREVIEW: - this->SelectPreviousStyle(this->GetStyleTable(3).c_str(), &this->unknown_0098); + this->SelectPreviousStyle(this->GetStyleTable(3).c_str(), &this->bodyStyle); break; case ID_NEXTVIEW: - this->SelectNextStyle(this->GetStyleTable(3).c_str(), &this->unknown_0098); + this->SelectNextStyle(this->GetStyleTable(3).c_str(), &this->bodyStyle); break; case ID_BOOKMARK: if (this->m_favoriteButton->m_argument == 0) { @@ -1136,10 +1136,10 @@ int UIDisplayCharacter::SendMsg(UIWindow* sender, int message, std::intptr_t arg } break; case 450: - this->SelectPreviousStyle(this->GetStyleTable(2).c_str(), &this->unknown_008C); + this->SelectPreviousStyle(this->GetStyleTable(2).c_str(), &this->head); break; case 451: - this->SelectNextStyle(this->GetStyleTable(2).c_str(), &this->unknown_008C); + this->SelectNextStyle(this->GetStyleTable(2).c_str(), &this->head); break; case 495: shop->SendMsg(nullptr, 495, 0, 0, 0, 0); @@ -1241,7 +1241,7 @@ void UIMyStyleWnd::SaveLikeList() { memset(slotText, 0, sizeof(slotText)); memset(formatted, 0, sizeof(formatted)); UIDisplayCharacter* display = slot->m_display; - sprintf_s(formatted, "characterName:%s\nslotNum:%d\nheadPaletteNum:%d\nheadStyle:%d\nbodyStyle:%d\nbodyPaletteNum:%d\ntopAccNum:%d\nmidAccNum:%d\nbottomAccNum:%d\nRobe:%d\n*\n", g_session.DecodePlayerName(), display->unknown_0080, display->unknown_0094, display->unknown_008C, display->job, display->unknown_0098, display->unknown_009C, display->unknown_00A0, display->unknown_00A4, display->unknown_0088); + sprintf_s(formatted, "characterName:%s\nslotNum:%d\nheadPaletteNum:%d\nheadStyle:%d\nbodyStyle:%d\nbodyPaletteNum:%d\ntopAccNum:%d\nmidAccNum:%d\nbottomAccNum:%d\nRobe:%d\n*\n", g_session.DecodePlayerName(), display->slotNumber, display->headPalette, display->head, display->job, display->bodyStyle, display->topAccessory, display->middleAccessory, display->bottomAccessory, display->robe); strcpy_s(slotText, sizeof(slotText), formatted); likeList += slotText; } @@ -1257,7 +1257,7 @@ void UIMyStyleWnd::SaveLikeList() { // OFFSET: 0x008261E0 // FUNCTION: fn_10322 void UIShowInfoWnd::DrawPaymentItem(const int& type, const int& zeny, const int& itemId, bool enabled, const int& row) { - if (!this->unknown_00A1) { + if (!this->showPaymentItems) { return; } @@ -1268,11 +1268,11 @@ void UIShowInfoWnd::DrawPaymentItem(const int& type, const int& zeny, const int& memset(path, 0, sizeof(path)); if (type == 4 || type == 5 || type == 6) { if (type == 4) { - id = this->m_display->unknown_00BC; + id = this->m_display->topAccessoryItemId; } else if (type == 5) { - id = this->m_display->unknown_00C0; + id = this->m_display->middleAccessoryItemId; } else { - id = this->m_display->unknown_00C4; + id = this->m_display->bottomAccessoryItemId; } char number[32] = {}; @@ -1285,11 +1285,11 @@ void UIShowInfoWnd::DrawPaymentItem(const int& type, const int& zeny, const int& bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(path))); } else if (id != 0) { if (type == 4) { - id = this->m_display->unknown_00BC; + id = this->m_display->topAccessoryItemId; } else if (type == 5) { - id = this->m_display->unknown_00C0; + id = this->m_display->middleAccessoryItemId; } else if (type == 6) { - id = this->m_display->unknown_00C4; + id = this->m_display->bottomAccessoryItemId; } char path[128]; @@ -1301,12 +1301,12 @@ void UIShowInfoWnd::DrawPaymentItem(const int& type, const int& zeny, const int& } if (!enabled) { - this->DrawAuxiliary(1, this->unknown_00C0, this->geometry.height / 8 * row + this->unknown_00C4, bitmap ? &bitmap->image : nullptr, true, false); + this->DrawAuxiliary(1, this->paymentIconX, this->geometry.height / 8 * row + this->paymentIconYOffset, bitmap ? &bitmap->image : nullptr, true, false); return; } if (bitmap) { - this->DrawBitmap(this->unknown_00C0, this->geometry.height / 8 * row + this->unknown_00C4, bitmap, false); + this->DrawBitmap(this->paymentIconX, this->geometry.height / 8 * row + this->paymentIconYOffset, bitmap, false); } } @@ -1323,8 +1323,8 @@ UIMyStyleWnd::UIMyStyleWnd() : UIStylingshopTabParentWnd(), m_selectedSlot(0), m // OFFSET: 0x00823210 // FUNCTION: fn_10291 UIShowInfoWnd::UIShowInfoWnd() - : UIWindow(0), m_display(nullptr), unknown_00A0(0), unknown_00A1(0), unknown_00A2(0), m_checkTop(5), unknown_00A8(12), m_changed{}, - unknown_00BC(0), unknown_00C0(0), unknown_00C4(0), unknown_00C8(0), unknown_00CC(0), m_offBitmap(nullptr) { + : UIWindow(0), m_display(nullptr), showPayments(0), showPaymentItems(0), showDottedLines(0), m_checkTop(5), paymentFontSize(12), m_changed{}, + costumeChanged(0), paymentIconX(0), paymentIconYOffset(0), paymentTextX(0), paymentTextYOffset(0), m_offBitmap(nullptr) { } // OFFSET: 0x008232F0 @@ -1447,7 +1447,7 @@ int UIStylingShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum if (it->first->geometry.id == 498) { UI2ndCostumeWnd* costume = static_cast(it->second); costume->m_hideCheckBox->SetChecked(costume->m_display->job == 0); - costume->m_showCheckBox->SetChecked(costume->m_hideCheckBox->geometry.unknown_0030 == 0); + costume->m_showCheckBox->SetChecked(costume->m_hideCheckBox->geometry.state == 0); } it->second->Show(1); it->second->InvalidateChildren(); @@ -1476,7 +1476,7 @@ int UIStylingShopWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum if (slot && slot->m_showInfo && slot->m_showInfo->SendStyleChange() == true) { myStyle->RemoveChild(myStyle->m_slots[myStyle->m_selectedSlot], 1); myStyle->m_slots[myStyle->m_selectedSlot] = nullptr; - myStyle->unknown_0094[myStyle->m_selectedSlot]->Enable(0); + myStyle->deleteStyleButtons[myStyle->m_selectedSlot]->Enable(0); } } else if (tab->m_showInfo) { tab->m_showInfo->SendStyleChange(); @@ -1546,7 +1546,7 @@ void UIStylingShopWnd::AddTab(const char* normal, const char* hover, const char* void UISlotOfMyStyleWnd::OnCreate(int, int) { UIDisplayCharacter* display = new (std::nothrow) UIDisplayCharacter(); if (display) { - *reinterpret_cast(&display->unknown_00B0) = 1; + *reinterpret_cast(&display->hideFavoriteButton) = 1; } this->m_display = display; @@ -1627,9 +1627,9 @@ void UIStylingShopWnd::OnCreate(int, int) { // FUNCTION: fn_10347 void UIDisplayCharacter::Paint() { this->ClearSurface(0xFFFFFFFF); - CBitmapRes* shadow = static_cast(ResourceMgr::Instance().Load(Resolve(this->unknown_007C))); + CBitmapRes* shadow = static_cast(ResourceMgr::Instance().Load(Resolve(this->shadowBitmapName))); if (shadow) { - this->DrawBitmap(this->unknown_00B4, this->unknown_00B8, shadow, false); + this->DrawBitmap(this->shadowX, this->shadowY, shadow, false); } CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; @@ -1638,10 +1638,10 @@ void UIDisplayCharacter::Paint() { } FuncDrawWNDChar draw( - this, this->geometry.width / 2, this->geometry.height - 33, static_cast(player->unknown_0260), static_cast(player->GetEffectiveJob(-1)), - player->unknown_04D4, static_cast(this->job), static_cast(this->unknown_008C), static_cast(this->unknown_00A4), - static_cast(this->unknown_009C), static_cast(this->unknown_00A0), this->unknown_0088, player->unknown_02CC, player->GetMadogearType(), - g_session.GetBodyStyle(player->GetEffectiveJob(-1), this->unknown_0098, this->job), this->unknown_0094, this->unknown_0084, 0, this->unknown_00A8 + this, this->geometry.width / 2, this->geometry.height - 33, static_cast(player->sex), static_cast(player->GetEffectiveJob(-1)), + player->appearanceJob, static_cast(this->job), static_cast(this->head), static_cast(this->bottomAccessory), + static_cast(this->topAccessory), static_cast(this->middleAccessory), this->robe, player->isRiding, player->GetMadogearType(), + g_session.GetBodyStyle(player->GetEffectiveJob(-1), this->bodyStyle, this->job), this->headPalette, this->direction, 0, this->animationStartTick ); draw.Draw(false); } @@ -1656,26 +1656,26 @@ void UIDisplayCharacter::Paint() { // FUNCTION: fn_10364 void UIShowInfoWnd::DrawPayments() { int positions[8][2]; - if (dynamic_cast(this->parent)->unknown_0084 == true || - dynamic_cast(this->parent)->unknown_0086 == true) { + if (dynamic_cast(this->parent)->primaryTabVisible == true || + dynamic_cast(this->parent)->accessoryTabVisible == true) { for (int i = 0; i < 8; ++i) { - positions[i][0] = this->unknown_00C8 + 3; - positions[i][1] = this->unknown_00CC + this->geometry.height / 8 * i; + positions[i][0] = this->paymentTextX + 3; + positions[i][1] = this->paymentTextYOffset + this->geometry.height / 8 * i; } } else { for (int i = 0; i < 4; ++i) { - const int left = this->unknown_00C8 - 4; - const int right = this->unknown_00C8 + 101; + const int left = this->paymentTextX - 4; + const int right = this->paymentTextX + 101; if (i == 0) { positions[i * 2][0] = left; - positions[i * 2][1] = this->unknown_00CC; + positions[i * 2][1] = this->paymentTextYOffset; positions[i * 2 + 1][0] = right; - positions[i * 2 + 1][1] = this->unknown_00CC; + positions[i * 2 + 1][1] = this->paymentTextYOffset; } else { positions[i * 2][0] = left; - positions[i * 2][1] = this->geometry.height / 8 * i + this->unknown_00CC; + positions[i * 2][1] = this->geometry.height / 8 * i + this->paymentTextYOffset; positions[i * 2 + 1][0] = right; - positions[i * 2 + 1][1] = this->geometry.height / 8 * i + this->unknown_00CC; + positions[i * 2 + 1][1] = this->geometry.height / 8 * i + this->paymentTextYOffset; } } } @@ -1709,7 +1709,7 @@ void UIShowInfoWnd::DrawPayments() { if (payable == true) { color = 0x5A5A84; - if (this->m_checks[row]->geometry.unknown_0030 != 0) { + if (this->m_checks[row]->geometry.state != 0) { totalZeny += zeny; } this->m_checks[row]->SetChecked(1); @@ -1723,10 +1723,10 @@ void UIShowInfoWnd::DrawPayments() { char text[16] = {}; std::sprintf(text, "%d\tZeny", zeny); if (!payable) { - const int width = this->TextWidth(text, this->unknown_00A8, 0, 12, 0, 0); + const int width = this->TextWidth(text, this->paymentFontSize, 0, 12, 0, 0); this->FillRegion(x - 2, y + 5, width + 2, 1, color); } - this->DrawTextAt(x, y, text, 0, 0, this->unknown_00A8, color, 0, 0); + this->DrawTextAt(x, y, text, 0, 0, this->paymentFontSize, color, 0, 0); } else if (itemId) { this->DrawPaymentItem(*it, zeny, itemId, payable, row); if (!payable) { @@ -1739,20 +1739,20 @@ void UIShowInfoWnd::DrawPayments() { this->DrawPaymentItem(*it, zeny, itemId, true, row); this->m_checks[row]->SetTooltip(LookupMessage(MSI_STYLING_SHOP_ADJUST_NEW_CHAR_STYLE)); ITEM_DESC description = FindItemDescription(costumeItemId); - this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->unknown_00A8, color, 0, 0); + this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->paymentFontSize, color, 0, 0); } else { ITEM_DESC description = FindItemDescription(itemId); if (!costumePayable) { const int width = - this->TextWidth(description.identifiedName, this->unknown_00A8, 0, 12, 0, 0); + this->TextWidth(description.identifiedName, this->paymentFontSize, 0, 12, 0, 0); this->FillRegion(x - 2, y + 5, width + 2, 1, color); } - this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->unknown_00A8, color, 0, 0); + this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->paymentFontSize, color, 0, 0); } } } else { ITEM_DESC description = FindItemDescription(itemId); - this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->unknown_00A8, color, 0, 0); + this->DrawTextAt(x, y, description.identifiedName, 0, 0, this->paymentFontSize, color, 0, 0); } } else { char text[260]; @@ -1766,10 +1766,10 @@ void UIShowInfoWnd::DrawPayments() { StringFormat(text, sizeof(text), static_cast(-1), "%d\tZeny", zeny); } - if (this->unknown_00A1 == 1) { - this->DrawBitmap(this->unknown_00C0, this->geometry.height / 8 * row + this->unknown_00C4, icon, false); + if (this->showPaymentItems == 1) { + this->DrawBitmap(this->paymentIconX, this->geometry.height / 8 * row + this->paymentIconYOffset, icon, false); } - this->DrawTextAt(x, y, text, 0, 0, this->unknown_00A8, 0x5A5A84, 0, 0); + this->DrawTextAt(x, y, text, 0, 0, this->paymentFontSize, 0x5A5A84, 0, 0); } } @@ -1781,12 +1781,12 @@ void UIShowInfoWnd::DrawPayments() { if (this->m_list.size() == 0) { for (int i = 0; i < 8; ++i) { - positions[i][0] = this->unknown_00C8; - positions[i][1] = this->unknown_00CC + this->geometry.height / 8 * i; + positions[i][0] = this->paymentTextX; + positions[i][1] = this->paymentTextYOffset + this->geometry.height / 8 * i; } this->m_buyable = false; - if (this->unknown_00A0 == 1) { + if (this->showPayments == 1) { std::vector lines; this->WrapPixelText(LookupMessage(MSI_UPGRADESKILLERROR_MORE_BASE_LEVEL), lines, this->geometry.width - 20); for (unsigned int i = 0; i < lines.size(); ++i) { @@ -1834,7 +1834,7 @@ void UIShowInfoWnd::Paint() { return; } - if (this->unknown_00A2 == 1) { + if (this->showDottedLines == 1) { for (int i = 0; i < 8; ++i) { CBitmapRes* line = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\styleshop\\line_dotted_1px_light.bmp"))); if (line) { @@ -1871,66 +1871,66 @@ bool UIShowInfoWnd::SendStyleChange() { const int type = *it; switch (type) { case 1: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 1; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_0094, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->headPalette, &item.value); } break; } case 2: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 2; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_008C, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->head, &item.value); item.kind = g_session.IsDoramJob(g_session.GetDisplayJob()) == true ? 6 : 1; } break; } case 3: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 3; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_0098, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->bodyStyle, &item.value); item.kind = g_session.IsDoramJob(g_session.GetDisplayJob()) == true ? 8 : 2; } break; } case 4: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 4; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_00BC, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->topAccessoryItemId, &item.value); item.kind = 3; } break; } case 5: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 5; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_00C0, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->middleAccessoryItemId, &item.value); item.kind = 4; } break; } case 6: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; int table = 6; - g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->unknown_00C4, &item.value); + g_session.m_hotkeyScript->Call("StylingShop_GetSeqnumber_by_goods", "sd>d", display->GetStyleTable(table).c_str(), display->bottomAccessoryItemId, &item.value); item.kind = 5; } break; } case 7: { - if (this->m_checks[index]->geometry.unknown_0030 != 0) { + if (this->m_checks[index]->geometry.state != 0) { changed = true; std::map::iterator job = display->m_jobs.find(display->job); if (job != display->m_jobs.end()) { @@ -2062,15 +2062,15 @@ void UIMyStyleWnd::LoadLikeList() { } UIDisplayCharacter* display = new UIDisplayCharacter(); - display->unknown_0080 = style.slotNum; - display->unknown_0088 = style.robe; - display->unknown_008C = style.headStyle; + display->slotNumber = style.slotNum; + display->robe = style.robe; + display->head = style.headStyle; display->job = style.bodyStyle; - display->unknown_0094 = style.headPaletteNum; - display->unknown_0098 = style.bodyPaletteNum; - display->unknown_009C = style.topAccNum; - display->unknown_00A0 = style.midAccNum; - display->unknown_00A4 = style.bottomAccNum; + display->headPalette = style.headPaletteNum; + display->bodyStyle = style.bodyPaletteNum; + display->topAccessory = style.topAccNum; + display->middleAccessory = style.midAccNum; + display->bottomAccessory = style.bottomAccNum; int goods = 0; int count = 0; @@ -2079,8 +2079,8 @@ void UIMyStyleWnd::LoadLikeList() { for (int index = 1; index < count + 1; ++index) { g_session.m_hotkeyScript->Call("StylingShop_GetGoods", "sd>d", "TopAccessory", index, &goods); ITEM_DESC description = FindItemDescription(goods); - if (style.topAccNum == description.unknown_0040) { - display->unknown_00BC = goods; + if (style.topAccNum == description.viewId) { + display->topAccessoryItemId = goods; break; } } @@ -2090,8 +2090,8 @@ void UIMyStyleWnd::LoadLikeList() { for (int index = 1; index < count + 1; ++index) { g_session.m_hotkeyScript->Call("StylingShop_GetGoods", "sd>d", "MidAccessory", index, &goods); ITEM_DESC description = FindItemDescription(goods); - if (style.midAccNum == description.unknown_0040) { - display->unknown_00C0 = goods; + if (style.midAccNum == description.viewId) { + display->middleAccessoryItemId = goods; break; } } @@ -2101,8 +2101,8 @@ void UIMyStyleWnd::LoadLikeList() { for (int index = 1; index < count + 1; ++index) { g_session.m_hotkeyScript->Call("StylingShop_GetGoods", "sd>d", "BottomAccessory", index, &goods); ITEM_DESC description = FindItemDescription(goods); - if (style.bottomAccNum == description.unknown_0040) { - display->unknown_00C4 = goods; + if (style.bottomAccNum == description.viewId) { + display->bottomAccessoryItemId = goods; break; } } @@ -2173,44 +2173,44 @@ void UIMyStyleWnd::OnCreate(int, int) { this->AddChild(select); for (int i = 0; i < 2; ++i) { - this->unknown_0094[i] = new (std::nothrow) UIBitmapButton(); - this->unknown_0094[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_out.bmp", 0, 0); - this->unknown_0094[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_over.bmp", 1, 0); - this->unknown_0094[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_press.bmp", 2, 0); - this->unknown_0094[i]->SetSize(this->unknown_0094[i]->BitmapWidth(), this->unknown_0094[i]->BitmapHeight()); - this->unknown_0094[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * 0.5f)) * i + 7, 4); - this->unknown_0094[i]->SetId(201); + this->deleteStyleButtons[i] = new (std::nothrow) UIBitmapButton(); + this->deleteStyleButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_out.bmp", 0, 0); + this->deleteStyleButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_over.bmp", 1, 0); + this->deleteStyleButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_delete_press.bmp", 2, 0); + this->deleteStyleButtons[i]->SetSize(this->deleteStyleButtons[i]->BitmapWidth(), this->deleteStyleButtons[i]->BitmapHeight()); + this->deleteStyleButtons[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * 0.5f)) * i + 7, 4); + this->deleteStyleButtons[i]->SetId(201); if (this->m_slots[i] == nullptr) { - this->unknown_0094[i]->Enable(0); + this->deleteStyleButtons[i]->Enable(0); } - this->AddChild(this->unknown_0094[i]); + this->AddChild(this->deleteStyleButtons[i]); } for (int i = 0; i < 2; ++i) { - this->unknown_009C[i] = new (std::nothrow) UIBitmapButton(); - this->unknown_009C[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_out.bmp", 0, 0); - this->unknown_009C[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_over.bmp", 1, 0); - this->unknown_009C[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_press.bmp", 2, 0); - this->unknown_009C[i]->SetSize(this->unknown_009C[i]->BitmapWidth(), this->unknown_009C[i]->BitmapHeight()); + this->rotateLeftButtons[i] = new (std::nothrow) UIBitmapButton(); + this->rotateLeftButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_out.bmp", 0, 0); + this->rotateLeftButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_over.bmp", 1, 0); + this->rotateLeftButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_l_press.bmp", 2, 0); + this->rotateLeftButtons[i]->SetSize(this->rotateLeftButtons[i]->BitmapWidth(), this->rotateLeftButtons[i]->BitmapHeight()); float ratio = static_cast(i) * 0.5f + 0.25f; - this->unknown_009C[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * ratio)) - this->unknown_009C[i]->BitmapWidth(), 213); - this->unknown_009C[i]->SetId(227); + this->rotateLeftButtons[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * ratio)) - this->rotateLeftButtons[i]->BitmapWidth(), 213); + this->rotateLeftButtons[i]->SetId(227); if (this->m_slots[i] == nullptr) { - this->unknown_009C[i]->Enable(0); + this->rotateLeftButtons[i]->Enable(0); } - this->AddChild(this->unknown_009C[i]); + this->AddChild(this->rotateLeftButtons[i]); - this->unknown_00A4[i] = new (std::nothrow) UIBitmapButton(); - this->unknown_00A4[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_out.bmp", 0, 0); - this->unknown_00A4[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_over.bmp", 1, 0); - this->unknown_00A4[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_press.bmp", 2, 0); - this->unknown_00A4[i]->SetSize(this->unknown_00A4[i]->BitmapWidth(), this->unknown_00A4[i]->BitmapHeight()); - this->unknown_00A4[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * ratio)), 213); - this->unknown_00A4[i]->SetId(226); + this->rotateRightButtons[i] = new (std::nothrow) UIBitmapButton(); + this->rotateRightButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_out.bmp", 0, 0); + this->rotateRightButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_over.bmp", 1, 0); + this->rotateRightButtons[i]->SetBitmap("유저인터페이스\\styleshop\\btn_rotatearrow_r_press.bmp", 2, 0); + this->rotateRightButtons[i]->SetSize(this->rotateRightButtons[i]->BitmapWidth(), this->rotateRightButtons[i]->BitmapHeight()); + this->rotateRightButtons[i]->Move(static_cast(roundf(static_cast(this->geometry.width) * ratio)), 213); + this->rotateRightButtons[i]->SetId(226); if (this->m_slots[i] == nullptr) { - this->unknown_00A4[i]->Enable(0); + this->rotateRightButtons[i]->Enable(0); } - this->AddChild(this->unknown_00A4[i]); + this->AddChild(this->rotateRightButtons[i]); } } // OFFSET: 0x008280F0 @@ -2317,21 +2317,21 @@ void UIDisplayCharacter::CreateButtons() { // FUNCTION: fn_10336 void UIDisplayCharacter::OnCreate(int width, int height) { this->Resize(width, height); - this->unknown_00A8 = timeGetTime(); - if (!*reinterpret_cast(&this->unknown_00B0)) { + this->animationStartTick = timeGetTime(); + if (!*reinterpret_cast(&this->hideFavoriteButton)) { this->CreateButtons(); } - this->unknown_0088 = g_session.m_robe; - this->unknown_008C = g_session.m_head; + this->robe = g_session.m_robe; + this->head = g_session.m_head; this->job = g_session.m_bodyCostume; - this->unknown_0094 = g_session.m_headPalette; - this->unknown_0098 = g_session.m_bodyStyle; - this->unknown_009C = *reinterpret_cast(&g_session.unknown_0EF4[4]); - this->unknown_00A0 = *reinterpret_cast(&g_session.unknown_0EF4[8]); - this->unknown_00A4 = *reinterpret_cast(&g_session.unknown_0EF4[0]); - this->unknown_00B4 = static_cast(roundf(static_cast(this->geometry.width) * 0.55f) - 40.0f); - this->unknown_00B8 = static_cast(roundf(static_cast(this->geometry.height) * 0.877f) - 17.0f); + this->headPalette = g_session.m_headPalette; + this->bodyStyle = g_session.m_bodyStyle; + this->topAccessory = *reinterpret_cast(&g_session.accessoryAppearance[4]); + this->middleAccessory = *reinterpret_cast(&g_session.accessoryAppearance[8]); + this->bottomAccessory = *reinterpret_cast(&g_session.accessoryAppearance[0]); + this->shadowX = static_cast(roundf(static_cast(this->geometry.width) * 0.55f) - 40.0f); + this->shadowY = static_cast(roundf(static_cast(this->geometry.height) * 0.877f) - 17.0f); } // OFFSET: 0x00829080 @@ -2353,7 +2353,7 @@ void UIShowInfoWnd::OnCreate(int, int) { } std::memset(this->m_changed, 0, sizeof(this->m_changed)); - this->unknown_00BC = 0; + this->costumeChanged = 0; for (unsigned int i = 0; i < this->m_list.size(); ++i) { this->m_list.clear(); } @@ -2405,7 +2405,7 @@ void UI2ndCostumeWnd::OnCreate(int, int) { this->AddChild(this->m_showInfo); this->m_hideCheckBox->SetChecked(this->m_display->job == 0); - this->m_showCheckBox->SetChecked(this->m_hideCheckBox->geometry.unknown_0030 == 0); + this->m_showCheckBox->SetChecked(this->m_hideCheckBox->geometry.state == 0); } // OFFSET: 0x00828380 diff --git a/Source/UI/StylingShop/UIStylingShopWnd.h b/Source/UI/StylingShop/UIStylingShopWnd.h index 82ea10c49..dd4c39280 100644 --- a/Source/UI/StylingShop/UIStylingShopWnd.h +++ b/Source/UI/StylingShop/UIStylingShopWnd.h @@ -26,25 +26,25 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; - /* 007C */ const char* unknown_007C; - /* 0080 */ int unknown_0080; - /* 0084 */ int unknown_0084; - /* 0088 */ int unknown_0088; - /* 008C */ int unknown_008C; + /* 007C */ const char* shadowBitmapName; + /* 0080 */ int slotNumber; + /* 0084 */ int direction; + /* 0088 */ int robe; + /* 008C */ int head; /* 0090 */ int job; - /* 0094 */ int unknown_0094; - /* 0098 */ int unknown_0098; - /* 009C */ int unknown_009C; - /* 00A0 */ int unknown_00A0; - /* 00A4 */ int unknown_00A4; - /* 00A8 */ int unknown_00A8; + /* 0094 */ int headPalette; + /* 0098 */ int bodyStyle; + /* 009C */ int topAccessory; + /* 00A0 */ int middleAccessory; + /* 00A4 */ int bottomAccessory; + /* 00A8 */ int animationStartTick; /* 00AC */ UIBitmapButton* m_favoriteButton; - /* 00B0 */ int unknown_00B0; - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; + /* 00B0 */ int hideFavoriteButton; + /* 00B4 */ int shadowX; + /* 00B8 */ int shadowY; + /* 00BC */ int topAccessoryItemId; + /* 00C0 */ int middleAccessoryItemId; + /* 00C4 */ int bottomAccessoryItemId; /* 00C8 */ std::map m_jobs; }; @@ -67,20 +67,20 @@ public: /* 007C */ UIDisplayCharacter* m_display; /* 0080 */ UICheckBox* m_checks[8]; - /* 00A0 */ unsigned char unknown_00A0; - /* 00A1 */ unsigned char unknown_00A1; - /* 00A2 */ unsigned char unknown_00A2; + /* 00A0 */ unsigned char showPayments; + /* 00A1 */ unsigned char showPaymentItems; + /* 00A2 */ unsigned char showDottedLines; /* 00A3 */ unsigned char unknown_00A3; /* 00A4 */ int m_checkTop; - /* 00A8 */ int unknown_00A8; + /* 00A8 */ int paymentFontSize; /* 00AC */ bool m_buyable; /* 00AD */ bool m_changed[6]; /* 00B4 */ std::list m_list; - /* 00BC */ unsigned char unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; + /* 00BC */ unsigned char costumeChanged; + /* 00C0 */ int paymentIconX; + /* 00C4 */ int paymentIconYOffset; + /* 00C8 */ int paymentTextX; + /* 00CC */ int paymentTextYOffset; /* 00D0 */ const char* m_offBitmap; }; @@ -94,9 +94,9 @@ public: /* 007C */ UIDisplayCharacter* m_display; /* 0080 */ UIShowInfoWnd* m_showInfo; - /* 0084 */ bool unknown_0084; + /* 0084 */ bool primaryTabVisible; /* 0085 */ bool unknown_0085; - /* 0086 */ bool unknown_0086; + /* 0086 */ bool accessoryTabVisible; void OnCreate(int width, int height) override; void Paint() override; @@ -200,9 +200,9 @@ public: /* 0088 */ int m_selectedSlot; /* 008C */ UISlotOfMyStyleWnd* m_slots[2]; - /* 0094 */ UIBitmapButton* unknown_0094[2]; - /* 009C */ UIBitmapButton* unknown_009C[2]; - /* 00A4 */ UIBitmapButton* unknown_00A4[2]; + /* 0094 */ UIBitmapButton* deleteStyleButtons[2]; + /* 009C */ UIBitmapButton* rotateLeftButtons[2]; + /* 00A4 */ UIBitmapButton* rotateRightButtons[2]; }; class UISlotOfMyStyleWnd : public UIStylingshopTabParentWnd { diff --git a/Source/UI/Text/CreateLineInfo.h b/Source/UI/Text/CreateLineInfo.h index 7d4182533..eab68c225 100644 --- a/Source/UI/Text/CreateLineInfo.h +++ b/Source/UI/Text/CreateLineInfo.h @@ -38,14 +38,14 @@ struct LineTextStyle { struct LineTextSegment { // INLINED LineTextSegment(const std::string& text, const LineTextStyle& style) - : text(text), style(style), type(LINE_SEGMENT_TEXT), unknown_0028(0), unknown_002C(0) { + : text(text), style(style), type(LINE_SEGMENT_TEXT), auxiliaryState(0), auxiliaryValue(0) { } /* 0000 */ std::string text; /* 0018 */ LineTextStyle style; /* 0024 */ int type; - /* 0028 */ int unknown_0028; - /* 002C */ int unknown_002C; + /* 0028 */ int auxiliaryState; + /* 002C */ int auxiliaryValue; }; struct LineFontFlags { @@ -82,10 +82,10 @@ public: /* 001C */ int m_fontHeight; /* 0020 */ std::uint32_t m_defaultColor; /* 0024 */ std::uint32_t m_color; - /* 0028 */ bool unknown_0028; - /* 002C */ int unknown_002C; - /* 0030 */ bool unknown_0030; - /* 0034 */ int unknown_0034; + /* 0028 */ bool outline; + /* 002C */ int outlineColor; + /* 0030 */ bool shadow; + /* 0034 */ int shadowColor; /* 0038 */ unsigned char m_align; /* 003C */ std::vector m_fontStack; /* 0048 */ bool m_newSegment; diff --git a/Source/UI/Text/ItemLinkDisplay.cpp b/Source/UI/Text/ItemLinkDisplay.cpp index 01748f312..1502e9d33 100644 --- a/Source/UI/Text/ItemLinkDisplay.cpp +++ b/Source/UI/Text/ItemLinkDisplay.cpp @@ -13,7 +13,7 @@ bool UIChatHisBox::Name(const std::string& encoded, std::string& output) { if (encoded.substr(0, 6) == "00000T") { const int id = ItemLinkMessageId(encoded); - if (g_itemTagOwner->unknown_0118 >= id) { + if (g_itemTagOwner->maxTipId >= id) { std::string abbreviated; output = g_itemTagOwner->Title(id, &abbreviated, 17); diff --git a/Source/UI/Text/NavigationLink.cpp b/Source/UI/Text/NavigationLink.cpp index 621bc32dc..4a9b33af7 100644 --- a/Source/UI/Text/NavigationLink.cpp +++ b/Source/UI/Text/NavigationLink.cpp @@ -704,10 +704,10 @@ CCreateLineInfo::CCreateLineInfo( this->m_fontHeight = fontHeight; this->m_bold = flags.bold; this->m_italic = flags.italic; - this->unknown_0030 = unknown0030; - this->unknown_0034 = unknown0034; - this->unknown_0028 = unknown0028; - this->unknown_002C = unknown002C; + this->shadow = unknown0030; + this->shadowColor = unknown0034; + this->outline = unknown0028; + this->outlineColor = unknown002C; if (!s_fontStackCache.empty()) { this->m_fontStack.swap(s_fontStackCache); @@ -801,7 +801,7 @@ int CCreateLineInfo::LayoutEmotion(int x, const std::string& text) { if (action) { UIEmotion* emotion = new UIEmotion(sprite, action); emotion->SetSize(50, 50); - emotion->m_animation = data->unknown_0020; + emotion->m_animation = data->actionIndex; emotion->Invalidate(); emotion->m_maxLoops = loops; emotion->m_loops = 1; @@ -1152,14 +1152,14 @@ UIWindow* CCreateLineInfo::CreateTextWindow(std::string text, const LineTextStyl LineCutter::UIText* window = new LineCutter::UIText(); window->SetSize(size.cx, size.cy); window->m_text = text; - window->m_outlineColor = this->unknown_002C; - window->m_shadowed = this->unknown_0030; + window->m_outlineColor = this->outlineColor; + window->m_shadowed = this->shadow; window->m_color = style.color; window->m_fontHeight = style.fontHeight; window->m_bold = style.bold; window->m_italic = style.italic; - window->m_outlined = this->unknown_0028; - window->m_shadowColor = this->unknown_0034; + window->m_outlined = this->outline; + window->m_shadowColor = this->shadowColor; if (window->m_outlined == 1) { const int textWidth = window->TextWidth(window->m_text.c_str(), 0, 0, style.fontHeight, style.bold, style.italic); window->Resize(textWidth + 2, style.fontHeight + 2); @@ -1214,7 +1214,7 @@ void ShowTextButtonItem(UITextButton* button) { const std::string itemId = button->GetLine(0); const int index = std::atoi(button->GetLine(1).c_str()); ITEM_INFO item; - item.unknown_0000[0] = static_cast(index); + item.identity[0] = static_cast(index); item.itemId = itemId; item.identified = 1; UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); @@ -1729,12 +1729,12 @@ bool NavigationLinkParser::HasUnownedItemLink(std::string text) { } const int itemId = ItemLinkMessageId(link); - if (link.substr(0, 6) == "00000T" && itemId <= g_itemTagOwner->unknown_0118) { + if (link.substr(0, 6) == "00000T" && itemId <= g_itemTagOwner->maxTipId) { offset += static_cast(link.size() + g_itemLinkTag.size() + g_itemLinkCloseTag.size()); continue; } - const bool unowned = !(LookupClientItem(g_session.m_inventoryItems, itemId, 0).unknown_0000[1] > 0 || g_session.HasItemId(itemId) || + const bool unowned = !(LookupClientItem(g_session.m_inventoryItems, itemId, 0).identity[1] > 0 || g_session.HasItemId(itemId) || g_session.HasItem1740Number(itemId)); if (!unowned) { offset += static_cast(link.size() + g_itemLinkTag.size() + g_itemLinkCloseTag.size()); diff --git a/Source/UI/Text/UIAchWnd.cpp b/Source/UI/Text/UIAchWnd.cpp index 71d3b182b..50fc9d1f9 100644 --- a/Source/UI/Text/UIAchWnd.cpp +++ b/Source/UI/Text/UIAchWnd.cpp @@ -81,26 +81,26 @@ void UIAchTV::Clear() { // FUNCTION: fn_09207 void UIAchTab::ClearGroups() { this->groups.clear(); - this->unknown_007C = 0; - this->unknown_0080 = -1; + this->selectedGroup = 0; + this->selectedSub = -1; this->Refresh(); } // OFFSET: 0x007B3910 // FUNCTION: fn_09208 void UIAchListWnd::Create(int width, int height, int rows) { - this->unknown_0084 = height / rows; + this->rowHeight = height / rows; this->rowCount = rows; this->scrollBar = new UIAchScrollBar(); - this->scrollBar->Configure(width - this->unknown_0094, 0, 1, height); + this->scrollBar->Configure(width - this->scrollBarWidth, 0, 1, height); this->AddChild(this->scrollBar); this->buttons = new UIButton*[this->rowCount]; for (int index = 0; index < this->rowCount; ++index) { this->buttons[index] = new UIButton(); this->buttons[index]->SetSize(30, 30); - this->buttons[index]->Move(5, this->unknown_0084 * index + 5); + this->buttons[index]->Move(5, this->rowHeight * index + 5); this->buttons[index]->SetId(index); this->buttons[index]->m_drawLabel = 0; this->AddChild(this->buttons[index]); @@ -117,12 +117,12 @@ void UIAchTab::DrawGroup(int group) { std::string name = this->groups[group].name; int textY = (this->groupHeight - this->TextHeight(name.c_str(), 0, 0, this->fontHeight, 0, 0)) / 2 + y; - if (group > this->unknown_007C) { - y += std::min(static_cast(this->groups[this->unknown_007C].subs.size()), this->visibleSubs) * this->subHeight; - textY += std::min(static_cast(this->groups[this->unknown_007C].subs.size()), this->visibleSubs) * this->subHeight; + if (group > this->selectedGroup) { + y += std::min(static_cast(this->groups[this->selectedGroup].subs.size()), this->visibleSubs) * this->subHeight; + textY += std::min(static_cast(this->groups[this->selectedGroup].subs.size()), this->visibleSubs) * this->subHeight; } - if (group == this->unknown_007C) { + if (group == this->selectedGroup) { this->DrawBitmap(0, y, AchievementBitmap("유저인터페이스\\achievement_re\\tab_press.bmp"), false); this->DrawTextAt(11, textY, name.c_str(), 0, 0, this->fontHeight, this->selectedGroupColor, 1, 0); @@ -142,7 +142,7 @@ void UIAchTab::DrawGroup(int group) { const int rowHeight = this->subHeight; std::uint32_t color; - if (it->first == this->unknown_0080) { + if (it->first == this->selectedSub) { this->DrawBitmap(0, rowY, AchievementBitmap("유저인터페이스\\achievement_re\\tab_sub_press.bmp"), false); this->DrawBitmap(12, rowY + 7, AchievementBitmap("유저인터페이스\\achievement_re\\tab_subarrow.bmp"), true); color = this->selectedSubColor; @@ -180,11 +180,11 @@ bool UIAchTab::HitTestTab(int x, int y, int* a, int* b) { return false; } - const int top = (this->unknown_007C + 1) * this->groupHeight; - const int extent = std::min(static_cast(this->groups[this->unknown_007C].subs.size()), this->visibleSubs) * this->subHeight; + const int top = (this->selectedGroup + 1) * this->groupHeight; + const int extent = std::min(static_cast(this->groups[this->selectedGroup].subs.size()), this->visibleSubs) * this->subHeight; if (y >= top) { if (y > top && y < extent + top) { - *a = this->unknown_007C; + *a = this->selectedGroup; *b = (y - top) / this->subHeight + this->scrollPos; return true; } @@ -206,7 +206,7 @@ void UIAchievementWnd::CreateTab() { tab->tabWidth = 102; tab->groupHeight = 40; tab->subHeight = 26; - tab->unknown_00AC = 0; + tab->tabState = 0; tab->selectedGroupColor = 0x9C1810; tab->groupColor = 0x9C6B5A; tab->selectedSubColor = 0x9B6A59; @@ -249,23 +249,23 @@ void UIAchievementWnd::CreateTab() { // FUNCTION: fn_09214 void UIAchUpperWnd::OnCreate(int, int) { UICustomGageBar* gauge = new (std::nothrow) UICustomGageBar(); - this->unknown_00A4 = gauge; + this->levelGauge = gauge; gauge->OnCreate(84, 10); gauge->Resize(84, 10); gauge->value = 0; gauge->maximum = 100; - this->unknown_00A4->Move(47, 24); - this->unknown_00A4->text = LookupMessage(MSI_ZENY_LOTTO_ACHIEVE); - this->AddChild(this->unknown_00A4); + this->levelGauge->Move(47, 24); + this->levelGauge->text = LookupMessage(MSI_ZENY_LOTTO_ACHIEVE); + this->AddChild(this->levelGauge); gauge = new (std::nothrow) UICustomGageBar(); - this->unknown_00A8 = gauge; + this->completionGauge = gauge; gauge->OnCreate(124, 8); gauge->Resize(124, 8); gauge->value = 0; gauge->maximum = 100; - this->unknown_00A8->Move(613, 29); - this->AddChild(this->unknown_00A8); + this->completionGauge->Move(613, 29); + this->AddChild(this->completionGauge); int index = 0; UIWindow** slot = this->buttons; @@ -338,9 +338,9 @@ void UIAchViewWnd::OnCreate(int, int) { void UIAchListWnd::Paint() { this->DrawBitmap(0, 0, AchievementBitmap("유저인터페이스\\achievement_re\\bg_list.bmp"), false); - std::map* achievements = reinterpret_cast*>(this->unknown_00AC); + std::map* achievements = reinterpret_cast*>(this->achievementList); for (int row = 0; row < this->rowCount; ++row) { - const unsigned index = this->unknown_008C + row; + const unsigned index = this->firstRow + row; if (index >= this->ids.size()) { continue; } @@ -352,9 +352,9 @@ void UIAchListWnd::Paint() { const AchievementInfo& info = found->second; const SessionRecord6144 record = g_session.FindRecord6144(found->first); - const bool completed = static_cast(record.unknown_0000 >> 8) == 1; - const int top = this->unknown_0084 * row; - if (this->selectedIndex == this->unknown_008C + row) { + const bool completed = static_cast(record.completionFlags >> 8) == 1; + const int top = this->rowHeight * row; + if (this->selectedIndex == this->firstRow + row) { this->DrawBitmap( 0, top, AchievementBitmap(completed ? "유저인터페이스\\achievement_re\\list_complete_press.bmp" : "유저인터페이스\\achievement_re\\list_press.bmp"), false @@ -366,25 +366,25 @@ void UIAchListWnd::Paint() { ); } - const std::string iconName = "유저인터페이스\\achievement_re\\icon_" + info.unknown_0068 + ".bmp"; + const std::string iconName = "유저인터페이스\\achievement_re\\icon_" + info.iconName + ".bmp"; CBitmapRes* icon = static_cast(ResourceMgr::Instance().Load(Resolve(iconName.c_str()))); if (icon) { this->DrawBitmap(8, top + 3, icon, true); } - if (g_session.HasUnknown6178Record(this->ids[this->unknown_008C + row])) { + if (g_session.HasUnknown6178Record(this->ids[this->firstRow + row])) { this->DrawBitmap(8, top + 3, AchievementBitmap("유저인터페이스\\achievement_re\\list_pin.bmp"), true); } this->DrawTextAt(53, top + 14, info.title.c_str(), 0, 0, 12, 0xA55239, 1, 0); - this->DrawCenteredText(258, top + 14, FormatOwnedString("%3d", info.unknown_0048).c_str(), 40, 0, 12, 0xA55239, 1); - this->DrawTextAt(10, top + 54, info.unknown_0018.c_str(), 0, 0, 12, 0xA55239, 0, 0); + this->DrawCenteredText(258, top + 14, FormatOwnedString("%3d", info.points).c_str(), 40, 0, 12, 0xA55239, 1); + this->DrawTextAt(10, top + 54, info.summaryText.c_str(), 0, 0, 12, 0xA55239, 0, 0); if (completed) { this->DrawBitmap(250, top + 5, AchievementBitmap("유저인터페이스\\achievement_re\\badge_complete.bmp"), true); } - const bool hasReward = info.unknown_0054 > 0 || info.unknown_0050 > 0 || info.unknown_004C > 0; - if (hasReward && record.unknown_0030 == 0) { + const bool hasReward = info.rewardBuffId > 0 || info.rewardTitleId > 0 || info.rewardItemId > 0; + if (hasReward && record.rewarded == 0) { this->DrawBitmap( 263, top + 49, AchievementBitmap( @@ -519,7 +519,7 @@ void UIAchSummaryWnd::Paint() { this->DrawTextAt(x - 241, 365, g_achievementMgr->GetUnknown0018(it->first).c_str(), 0, 0, 12, 0xC9977D, 0, 0); SessionRecord6144 record = g_session.FindRecord6144(it->first); - if (g_achievementMgr->HasReward(it->first) == 1 && record.unknown_0030 == 0) { + if (g_achievementMgr->HasReward(it->first) == 1 && record.rewarded == 0) { this->DrawBitmap(x + 12, 360, AchievementBitmap("유저인터페이스\\achievement_re\\list_rewardbox_not_receive.bmp"), true); } @@ -549,9 +549,9 @@ void UIAchUpperWnd::Paint() { if (this->title == LookupMessage(MSI_OTPUSER_ONLY)) { this->DrawBitmap(0, 0, AchievementBitmap("유저인터페이스\\achievement_re\\bg_upper.bmp"), false); - this->DrawRightAlignedText(130, 13, FormatOwnedString("%d/%d", this->unknown_0094, this->unknown_0098).c_str(), 0, 0, 11, 0, 0); - this->DrawCenteredText(353, 6, FormatOwnedString("%d", g_session.unknown_614C).c_str(), 46, 0, 12, 0x582708, 1); - this->DrawCenteredText(16, 19, FormatOwnedString("%d", g_session.unknown_6150).c_str(), 15, 0, 12, 0x44C58, 1); + this->DrawRightAlignedText(130, 13, FormatOwnedString("%d/%d", this->achievementPoints, this->nextLevelPoints).c_str(), 0, 0, 11, 0, 0); + this->DrawCenteredText(353, 6, FormatOwnedString("%d", g_session.achievementScore).c_str(), 46, 0, 12, 0x582708, 1); + this->DrawCenteredText(16, 19, FormatOwnedString("%d", g_session.achievementLevel).c_str(), 15, 0, 12, 0x44C58, 1); for (int index = 0; index < 2; ++index) { this->buttons[index]->Show(0); } @@ -563,10 +563,10 @@ void UIAchUpperWnd::Paint() { this->DrawTextAt(169, 11, LookupMessage(MSI_ZENY_LOTTO_ACHIEVE_FAIL), 0, 0, 12, 0, 0, 0); this->DrawTextAt(169, 26, LookupMessage(MSI_SWAP_EQUIPITEM), 0, 0, 12, 0, 0, 0); this->DrawTextAt(614, 15, this->title.c_str(), 0, 0, 11, 0x582708, 0, 0); - this->DrawRightAlignedText(130, 13, FormatOwnedString("%d/%d", this->unknown_0094, this->unknown_0098).c_str(), 0, 0, 11, 0, 0); - this->DrawRightAlignedText(737, 15, FormatOwnedString("(%d/%d)", this->unknown_009C, this->unknown_00A0).c_str(), 0, 0, 11, 0x582708, 0); - this->DrawCenteredText(353, 6, FormatOwnedString("%d", g_session.unknown_614C).c_str(), 46, 0, 12, 0x582708, 1); - this->DrawCenteredText(16, 19, FormatOwnedString("%d", g_session.unknown_6150).c_str(), 15, 0, 12, 0x44C58, 1); + this->DrawRightAlignedText(130, 13, FormatOwnedString("%d/%d", this->achievementPoints, this->nextLevelPoints).c_str(), 0, 0, 11, 0, 0); + this->DrawRightAlignedText(737, 15, FormatOwnedString("(%d/%d)", this->completedCount, this->achievementCount).c_str(), 0, 0, 11, 0x582708, 0); + this->DrawCenteredText(353, 6, FormatOwnedString("%d", g_session.achievementScore).c_str(), 46, 0, 12, 0x582708, 1); + this->DrawCenteredText(16, 19, FormatOwnedString("%d", g_session.achievementLevel).c_str(), 15, 0, 12, 0x44C58, 1); for (int index = 0; index < 2; ++index) { this->buttons[index]->Show(1); } @@ -574,7 +574,7 @@ void UIAchUpperWnd::Paint() { visible = 1; } - this->unknown_00A8->Show(visible); + this->completionGauge->Show(visible); } // OFFSET: 0x007B7420 @@ -585,21 +585,21 @@ void UIAchViewWnd::Paint() { return; } - if (static_cast(g_session.FindRecord6144(this->achievementId).unknown_0000 >> 8) == 1) { + if (static_cast(g_session.FindRecord6144(this->achievementId).completionFlags >> 8) == 1) { this->DrawBitmap(264, 3, AchievementBitmap("유저인터페이스\\achievement_re\\detail_stamp.bmp"), true); } this->DrawTextAt(15, 14, this->info->title.c_str(), 0, 0, 12, 0xA55239, 1, 0); for (unsigned index = 0; index < this->info->rewards.size(); ++index) { - if (this->info->unknown_0064 == 0) { + if (this->info->progressMode == 0) { this->DrawBitmap(20, 103 + 19 * index, AchievementBitmap("유저인터페이스\\achievement_re\\detail_bullet.bmp"), true); - } else if (this->info->unknown_0064 == 1) { + } else if (this->info->progressMode == 1) { this->DrawBitmap(20, 111 + 36 * index, AchievementBitmap("유저인터페이스\\achievement_re\\detail_bullet.bmp"), true); } } - if (this->info->unknown_004C > 0 || this->info->unknown_0050 > 0 || this->info->unknown_0054 > 0) { + if (this->info->rewardItemId > 0 || this->info->rewardTitleId > 0 || this->info->rewardBuffId > 0) { int width = 0; int count = 0; for (UIToolTipBitmapWnd* reward : this->rewards) { @@ -653,8 +653,8 @@ void UIToolTipBitmapWnd::Paint() { const int item = this->itemId; if (item > 0) { - this->unknown_00B4 = 20; - this->unknown_00B8 = 15; + this->iconX = 20; + this->iconY = 15; ITEM_INFO info; info.SetItemId(item); char path[260]; @@ -681,7 +681,7 @@ void UIAchTab::OnMouseMove(int x, int y) { // OFFSET: 0x007B7BB0 // FUNCTION: fn_09237 void UIToolTipBitmapWnd::OnRBtnDown(int x, int y) { - if (this->itemId > 0 && this->unknown_00B4 <= x && x <= this->unknown_00B4 + 24 && this->unknown_00B8 <= y && y <= this->unknown_00B8 + 24) { + if (this->itemId > 0 && this->iconX <= x && x <= this->iconX + 24 && this->iconY <= y && y <= this->iconY + 24) { ITEM_INFO item; item.SetItemId(this->itemId); item.identified = 1; @@ -708,12 +708,12 @@ void UIAchievementWnd::SelectAchievement(int id) { list->selectedIndex = index; if (index < list->rowCount) { - list->unknown_008C = 0; + list->firstRow = 0; } else { - list->unknown_008C = std::min(static_cast(index), static_cast(list->unknown_00AC->count - list->rowCount)); + list->firstRow = std::min(static_cast(index), static_cast(list->achievementList->count - list->rowCount)); } - list->scrollBar->SetPosition(list->unknown_008C); + list->scrollBar->SetPosition(list->firstRow); if (list->parent) { list->parent->SendMsg(list, UM_LIST_SELECTION, static_cast(list->selectedIndex) < list->ids.size() ? list->ids[list->selectedIndex] : -1, 0, 0, 0); } @@ -754,7 +754,7 @@ void UIAchTab::OnWheel(int delta) { // OFFSET: 0x007B7E10 // FUNCTION: fn_09241 void UIAchListWnd::UpdateScroll() { - UIAchListInfo* info = this->unknown_00AC; + UIAchListInfo* info = this->achievementList; if (!info || !this->scrollBar) { return; } @@ -765,17 +765,17 @@ void UIAchListWnd::UpdateScroll() { if (overflow > 0) { this->scrollBar->SetRange(overflow, rows, info->count); - if (this->unknown_008C < 0) { - this->unknown_008C = 0; + if (this->firstRow < 0) { + this->firstRow = 0; this->scrollBar->SetPosition(0); } else { - if (this->unknown_008C > overflow) { - this->unknown_008C = overflow; + if (this->firstRow > overflow) { + this->firstRow = overflow; } - this->scrollBar->SetPosition(this->unknown_008C); + this->scrollBar->SetPosition(this->firstRow); } } else { - this->unknown_008C = 0; + this->firstRow = 0; this->scrollBar->SetRange(0, rows, info->count); } @@ -783,7 +783,7 @@ void UIAchListWnd::UpdateScroll() { for (int index = 0; index < this->rowCount; ++index) { UIButton* button = this->buttons[index]; - if (static_cast(this->unknown_008C + index) < static_cast(this->unknown_00AC->count)) { + if (static_cast(this->firstRow + index) < static_cast(this->achievementList->count)) { button->SetDisabled(0); } else { button->SetDisabled(1); @@ -799,7 +799,7 @@ void UIAchTab::UpdateScrollBar() { return; } - const int count = static_cast(this->groups[this->unknown_007C].subs.size()); + const int count = static_cast(this->groups[this->selectedGroup].subs.size()); const int visible = this->visibleSubs; const int overflow = std::max(count - visible, 0); this->scrollable = overflow > 0; @@ -820,7 +820,7 @@ void UIAchTab::UpdateScrollBar() { } } - this->scrollBar->Move(0, (this->unknown_007C + 1) * this->groupHeight); + this->scrollBar->Move(0, (this->selectedGroup + 1) * this->groupHeight); this->scrollBar->Invalidate(); } @@ -930,41 +930,41 @@ void UIAchListWnd::SetAchievements(std::map* achievements, this->ids.clear(); auto byProgress = [this](int left, int right) { - return g_session.FindRecord6144(left).unknown_002C < g_session.FindRecord6144(right).unknown_002C; + return g_session.FindRecord6144(left).completedAt < g_session.FindRecord6144(right).completedAt; }; if (mode == 0) { for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).unknown_0000 >> 8) == 1) { + if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 1) { this->ids.push_back(it->first); } std::sort(this->ids.begin(), this->ids.end(), byProgress); } for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).unknown_0000 >> 8) == 0) { + if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 0) { this->ids.push_back(it->first); } } } else if (mode == 1) { for (auto it = achievements->begin(); it != achievements->end(); ++it) { SessionRecord6144 record = g_session.FindRecord6144(it->first); - if (static_cast(record.unknown_0000 >> 8) == 1 && g_achievementMgr->HasReward(it->first) == 1 && record.unknown_0030 == 0) { + if (static_cast(record.completionFlags >> 8) == 1 && g_achievementMgr->HasReward(it->first) == 1 && record.rewarded == 0) { this->ids.push_back(it->first); } std::sort(this->ids.begin(), this->ids.end(), byProgress); } for (auto it = achievements->begin(); it != achievements->end(); ++it) { - if (static_cast(g_session.FindRecord6144(it->first).unknown_0000 >> 8) == 0) { + if (static_cast(g_session.FindRecord6144(it->first).completionFlags >> 8) == 0) { this->ids.push_back(it->first); } } } - this->unknown_00AC = reinterpret_cast(achievements); + this->achievementList = reinterpret_cast(achievements); this->selectedIndex = 0; - this->unknown_008C = 0; + this->firstRow = 0; this->UpdateScroll(); this->selectedIndex = 0; if (this->parent) { @@ -1014,8 +1014,8 @@ void UIAchievementWnd::SelectTab(int group, int sub) { this->group = group; this->sub = sub; - this->tab->unknown_007C = group; - this->tab->unknown_0080 = sub; + this->tab->selectedGroup = group; + this->tab->selectedSub = sub; this->tab->Invalidate(); this->upper->SetTitle(group == 0 ? LookupMessage(MSI_OTPUSER_ONLY) : this->tab->Label(this->group, this->sub)); @@ -1037,8 +1037,8 @@ void UIAchTab::SetLabel(const char* text, int group, int sub) { this->groups[group].subs[sub] = text; } - this->unknown_007C = 0; - this->unknown_0080 = -1; + this->selectedGroup = 0; + this->selectedSub = -1; this->Refresh(); } @@ -1203,7 +1203,7 @@ void UIToolTipBitmapWnd::OnMouseHover(int x, int y) { // OFFSET: 0x007B50C0 // FUNCTION: fn_09213 void UIAchSummaryWnd::OnCreate(int, int) { - for (int index = 0; index < this->unknown_007C; ++index) { + for (int index = 0; index < this->visibleCount; ++index) { UICustomGageBar* gauge = new (std::nothrow) UICustomGageBar(); if (index == 0) { gauge->OnCreate(558, 10); @@ -1245,7 +1245,7 @@ void UIAchSummaryWnd::OnCreate(int, int) { int UIAchListWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) { switch (message) { case UM_COMMAND: - if (g_session.ToggleTrackedAchievement(this->ids[this->unknown_008C + argument1])) { + if (g_session.ToggleTrackedAchievement(this->ids[this->firstRow + argument1])) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ACHTRACINGWND); if (window) { window->Invalidate(); @@ -1255,22 +1255,22 @@ int UIAchListWnd::SendMsg(UIWindow*, int message, std::intptr_t argument1, std:: case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { - const int previous = this->unknown_008C; + const int previous = this->firstRow; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_008C = previous - this->rowCount + 1; + this->firstRow = previous - this->rowCount + 1; } else { if (message == UM_SCROLLVERTPAGEDOWN) { argument1 = this->rowCount - 1; } - this->unknown_008C = previous + argument1; + this->firstRow = previous + argument1; } - if (previous != this->unknown_008C) { + if (previous != this->firstRow) { this->UpdateScroll(); this->Invalidate(); } - return this->unknown_008C - previous; + return this->firstRow - previous; } } @@ -1324,18 +1324,18 @@ int UIAchievementWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum const int completed = g_achievementMgr->GetCompletedCount(this->group, this->sub); const int total = g_achievementMgr->GetAchievementCount(this->group, this->sub); UIAchUpperWnd* upper = this->upper; - upper->unknown_009C = completed; - upper->unknown_00A8->value = completed; - upper->unknown_00A0 = total; - upper->unknown_00A8->maximum = total; - upper->unknown_00A8->Invalidate(); + upper->completedCount = completed; + upper->completionGauge->value = completed; + upper->achievementCount = total; + upper->completionGauge->maximum = total; + upper->completionGauge->Invalidate(); upper = this->upper; - upper->unknown_0094 = g_session.unknown_6154; - upper->unknown_00A4->value = g_session.unknown_6154; - upper->unknown_0098 = g_session.unknown_6158; - upper->unknown_00A4->maximum = g_session.unknown_6158; - upper->unknown_00A4->Invalidate(); + upper->achievementPoints = g_session.achievementCompleted; + upper->levelGauge->value = g_session.achievementCompleted; + upper->nextLevelPoints = g_session.achievementTotal; + upper->levelGauge->maximum = g_session.achievementTotal; + upper->levelGauge->Invalidate(); this->upper->Invalidate(); this->Invalidate(); @@ -1386,7 +1386,7 @@ void UIAchSummaryWnd::UpdateInfo() { static_cast(this->buttons[0])->ResizeToText(); } - for (int index = 0; index < this->unknown_007C; ++index) { + for (int index = 0; index < this->visibleCount; ++index) { this->gauges[index]->value = g_achievementMgr->GetCompletedCount(index, -1); this->gauges[index]->maximum = g_achievementMgr->GetAchievementCount(index, -1); } @@ -1414,14 +1414,14 @@ void UIAchViewWnd::UpdateInfo() { if (this->info) { const SessionRecord6144 record = g_session.FindRecord6144(this->achievementId); - this->description->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(this->info->unknown_0030.c_str()), 50, 0, 0); + this->description->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(this->info->description.c_str()), 50, 0, 0); - const bool hasReward = this->info->unknown_0054 > 0 || this->info->unknown_0050 > 0 || this->info->unknown_004C > 0; - if (hasReward && record.unknown_0030 == 0) { + const bool hasReward = this->info->rewardBuffId > 0 || this->info->rewardTitleId > 0 || this->info->rewardItemId > 0; + if (hasReward && record.rewarded == 0) { this->receiveButton->Enable(1); this->receiveButton->SetDisabled(1); this->receiveButton->Invalidate(); - if (static_cast(record.unknown_0000 >> 8) == 1) { + if (static_cast(record.completionFlags >> 8) == 1) { this->receiveButton->SetDisabled(0); this->receiveButton->Invalidate(); } @@ -1430,11 +1430,11 @@ void UIAchViewWnd::UpdateInfo() { for (unsigned int index = 0; index < this->info->rewards.size(); ++index) { UIAchTV* condition = this->conditions[index]; condition->Show(1); - condition->SetId(this->info->rewards[index].unknown_001C); + condition->SetId(this->info->rewards[index].conditionId); - if (this->info->unknown_0064 == 1) { - const int progress = record.unknown_0004[index]; - const int target = this->info->rewards[index].unknown_0018; + if (this->info->progressMode == 1) { + const int progress = record.objectives[index]; + const int target = this->info->rewards[index].targetCount; const std::string text = FormatOwnedString("%s ( %d / %d )", this->info->rewards[index].text.c_str(), progress, target); condition->SendMsg(nullptr, UM_SETTEXT, reinterpret_cast(text.c_str()), 56, 0, 0); this->gauges[index]->Show(1); @@ -1446,16 +1446,16 @@ void UIAchViewWnd::UpdateInfo() { this->gauges[index]->Show(0); } - const int progress = record.unknown_0004[index]; - if (this->info->unknown_0064 == 0) { + const int progress = record.objectives[index]; + if (this->info->progressMode == 0) { if (progress > 0) { this->conditions[index]->textColor = 0xC9977D; condition->underline = 1; } else { this->conditions[index]->textColor = 0x995736; } - } else if (this->info->unknown_0064 == 1) { - if (progress == this->info->rewards[index].unknown_0018) { + } else if (this->info->progressMode == 1) { + if (progress == this->info->rewards[index].targetCount) { condition->textColor = 0xC9977D; condition->underline = 1; } else { @@ -1463,33 +1463,33 @@ void UIAchViewWnd::UpdateInfo() { } } - if (this->info->unknown_0064 == 0) { + if (this->info->progressMode == 0) { condition->Move(28, 97 + 19 * index); - } else if (this->info->unknown_0064 == 1) { + } else if (this->info->progressMode == 1) { condition->Move(28, 123 + 36 * index - 18); this->gauges[index]->Move(28, 123 + 36 * index); } } - if (this->info->unknown_0054 > 0 || this->info->unknown_0050 > 0 || this->info->unknown_004C > 0) { - if (this->info->unknown_0050 > 0) { + if (this->info->rewardBuffId > 0 || this->info->rewardTitleId > 0 || this->info->rewardItemId > 0) { + if (this->info->rewardTitleId > 0) { const std::string bitmap = "유저인터페이스\\achievement_re\\reward_title.bmp"; - const std::string title = GetJobTitleString(this->info->unknown_0050); + const std::string title = GetJobTitleString(this->info->rewardTitleId); this->rewards[0]->Set(bitmap.c_str(), title.c_str(), 0); this->rewards[0]->Show(1); } - if (this->info->unknown_0054 > 0) { + if (this->info->rewardBuffId > 0) { const std::string bitmap = "유저인터페이스\\achievement_re\\reward_buff.bmp"; const char* description = nullptr; - g_session.m_hotkeyScript->Call("GetStateIconDescript", "dd>s", this->info->unknown_0054, 1, &description); + g_session.m_hotkeyScript->Call("GetStateIconDescript", "dd>s", this->info->rewardBuffId, 1, &description); this->rewards[1]->Set(bitmap.c_str(), description, 0); this->rewards[1]->Show(1); } - if (this->info->unknown_004C > 0) { + if (this->info->rewardItemId > 0) { const std::string bitmap = "유저인터페이스\\achievement_re\\reward_item.bmp"; - this->rewards[2]->Set(bitmap.c_str(), nullptr, this->info->unknown_004C); + this->rewards[2]->Set(bitmap.c_str(), nullptr, this->info->rewardItemId); this->rewards[2]->Show(1); } } @@ -1501,8 +1501,8 @@ void UIAchViewWnd::UpdateInfo() { // OFFSET: 0x007B1E60 // FUNCTION: fn_09181 UIAchListWnd::UIAchListWnd() - : UIWindow(0), buttons(nullptr), unknown_0084(0), rowCount(0), unknown_008C(0), selectedIndex(0), unknown_0094(11), scrollable(0), - unknown_009C(0), unknown_00AC(nullptr), scrollBar(nullptr) { + : UIWindow(0), buttons(nullptr), rowHeight(0), rowCount(0), firstRow(0), selectedIndex(0), scrollBarWidth(11), scrollable(0), + listState(0), achievementList(nullptr), scrollBar(nullptr) { } // INLINED @@ -1522,13 +1522,13 @@ UIAchScrollBar::UIAchScrollBar() : UIScrollBar() { // OFFSET: 0x007B1FB0 // FUNCTION: fn_09183 -UIAchSummaryWnd::UIAchSummaryWnd() : UIWindow(0), unknown_007C(7) { +UIAchSummaryWnd::UIAchSummaryWnd() : UIWindow(0), visibleCount(7) { } // OFFSET: 0x007B21D0 // FUNCTION: fn_09184 UIAchUpperWnd::UIAchUpperWnd() - : UIWindow(0), unknown_0094(0), unknown_0098(0), unknown_009C(0), unknown_00A0(0), unknown_00A4(nullptr), unknown_00A8(nullptr), buttons{nullptr, nullptr}, + : UIWindow(0), achievementPoints(0), nextLevelPoints(0), completedCount(0), achievementCount(0), levelGauge(nullptr), completionGauge(nullptr), buttons{nullptr, nullptr}, selected(0) { } @@ -1556,5 +1556,5 @@ UICustomGageBar::UICustomGageBar() // OFFSET: 0x007B25B0 // FUNCTION: fn_09188 UIToolTipBitmapWnd::UIToolTipBitmapWnd(WindowManagerWindows&) - : UIWindow(0), bitmap(nullptr), itemId(0), unknown_00B4(0), unknown_00B8(0) { + : UIWindow(0), bitmap(nullptr), itemId(0), iconX(0), iconY(0) { } diff --git a/Source/UI/Text/UIAchWnd.h b/Source/UI/Text/UIAchWnd.h index 892aea352..30d213747 100644 --- a/Source/UI/Text/UIAchWnd.h +++ b/Source/UI/Text/UIAchWnd.h @@ -56,15 +56,15 @@ public: /* 007C */ UIAchScrollBar* scrollBar; /* 0080 */ UIButton** buttons; - /* 0084 */ int unknown_0084; + /* 0084 */ int rowHeight; /* 0088 */ int rowCount; - /* 008C */ int unknown_008C; + /* 008C */ int firstRow; /* 0090 */ int selectedIndex; - /* 0094 */ int unknown_0094; + /* 0094 */ int scrollBarWidth; /* 0098 */ unsigned char scrollable; - /* 009C */ int unknown_009C; + /* 009C */ int listState; /* 00A0 */ std::vector ids; - /* 00AC */ UIAchListInfo* unknown_00AC; + /* 00AC */ UIAchListInfo* achievementList; void Create(int width, int height, int rows); void SelectAchievement(int index); @@ -87,14 +87,14 @@ class UIAchTab : public UIWindow { public: // INLINED UIAchTab() - : UIWindow(0), unknown_007C(-1), unknown_0080(-1), fontHeight(0), hoverGroup(0), hoverSub(0), scrollBar(nullptr), scrollable(0), + : UIWindow(0), selectedGroup(-1), selectedSub(-1), fontHeight(0), hoverGroup(0), hoverSub(0), scrollBar(nullptr), scrollable(0), scrollBarX(13), visibleSubs(3) { this->fontHeight = 12; this->scrollPos = 0; } - /* 007C */ int unknown_007C; - /* 0080 */ int unknown_0080; + /* 007C */ int selectedGroup; + /* 0080 */ int selectedSub; /* 0084 */ int tabWidth; /* 0088 */ int groupHeight; /* 008C */ int subHeight; @@ -105,7 +105,7 @@ public: /* 00A0 */ std::uint32_t groupColor; /* 00A4 */ std::uint32_t selectedSubColor; /* 00A8 */ std::uint32_t subColor; - /* 00AC */ unsigned char unknown_00AC; + /* 00AC */ unsigned char tabState; /* 00B0 */ std::map groups; /* 00B8 */ UIAchScrollBar* scrollBar; /* 00BC */ int scrollPos; @@ -132,10 +132,10 @@ public: class UIAchTV : public UITextViewer { public: // INLINED - UIAchTV() : unknown_00EC(0), textColor(0), outlineColor(0), underline(0) { + UIAchTV() : selectionDisabled(0), textColor(0), outlineColor(0), underline(0) { } - /* 00EC */ unsigned char unknown_00EC; + /* 00EC */ unsigned char selectionDisabled; /* 00F0 */ std::uint32_t textColor; /* 00F4 */ std::uint32_t outlineColor; /* 00F8 */ unsigned char underline; @@ -153,8 +153,8 @@ public: /* 0094 */ CBitmapRes* bitmap; /* 0098 */ std::string bitmapName; /* 00B0 */ int itemId; - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; + /* 00B4 */ int iconX; + /* 00B8 */ int iconY; void Paint() override; void OnMouseHover(int x, int y) override; @@ -188,12 +188,12 @@ public: UIAchUpperWnd(); /* 007C */ std::string title; - /* 0094 */ int unknown_0094; - /* 0098 */ int unknown_0098; - /* 009C */ int unknown_009C; - /* 00A0 */ int unknown_00A0; - /* 00A4 */ UICustomGageBar* unknown_00A4; - /* 00A8 */ UICustomGageBar* unknown_00A8; + /* 0094 */ int achievementPoints; + /* 0098 */ int nextLevelPoints; + /* 009C */ int completedCount; + /* 00A0 */ int achievementCount; + /* 00A4 */ UICustomGageBar* levelGauge; + /* 00A8 */ UICustomGageBar* completionGauge; /* 00AC */ UIWindow* buttons[2]; /* 00B4 */ int selected; @@ -211,7 +211,7 @@ class UIAchSummaryWnd : public UIWindow { public: UIAchSummaryWnd(); - /* 007C */ int unknown_007C; + /* 007C */ int visibleCount; /* 0080 */ std::vector gauges; /* 008C */ std::vector> recent; /* 0098 */ UIWindow* buttons[2]; diff --git a/Source/UI/Text/UIBalloonText.cpp b/Source/UI/Text/UIBalloonText.cpp index afd498321..6761bb522 100644 --- a/Source/UI/Text/UIBalloonText.cpp +++ b/Source/UI/Text/UIBalloonText.cpp @@ -40,9 +40,9 @@ namespace { // FUNCTION: fn_10648 __declspec(noinline) UIBalloonText::UIBalloonText() : UIWindow(0) { this->m_richText = 0; - this->unknown_007C = 0; + this->balloonFlag = 0; this->m_fontHeight = 12; - this->geometry.unknown_0034 = 0; + this->geometry.animationFrame = 0; this->m_textColor = 0xFFFFFF; this->m_outlineColor = 0; } @@ -62,7 +62,7 @@ bool UIBalloonText::CanHitTest() { // OFFSET: 0x0085FAE0 // FUNCTION: fn_10882 void UIBalloonText::OnProcess() { - ++this->geometry.unknown_0034; + ++this->geometry.animationFrame; } // OFFSET: 0x00867F20 @@ -292,7 +292,7 @@ void UINameBalloonText::SetIcon(const char* name, unsigned char framed) { if (ResourceMgr::Instance().Exists(path)) { this->iconName = path; if (!framed) { - this->Resize(this->unknown_00B8 + 25, std::max(this->geometry.height, 24)); + this->Resize(this->nameWidth + 25, std::max(this->geometry.height, 24)); this->Invalidate(); return; } @@ -301,7 +301,7 @@ void UINameBalloonText::SetIcon(const char* name, unsigned char framed) { } if (framed == 1) { - this->Resize(this->unknown_00B8 + 29, std::max(this->geometry.height, 28)); + this->Resize(this->nameWidth + 29, std::max(this->geometry.height, 28)); } this->Invalidate(); @@ -311,8 +311,8 @@ void UINameBalloonText::SetIcon(const char* name, unsigned char framed) { UINameBalloonText::UINameBalloonText() : UIBalloonText(), monsterType(0), framed(0) { this->m_textColor = 0xFFFFFF; this->m_outlineColor = 0; - this->unknown_00B8 = 0; - this->unknown_0098 = 0; + this->nameWidth = 0; + this->textFlags = 0; } // OFFSET: 0x00CCDFF0 @@ -334,16 +334,16 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi } if (g_serviceFlag05) { - if (std::strlen(info.unknown_007C.c_str()) != 0) { - this->m_lines.push_back(info.unknown_007C.c_str()); + if (std::strlen(info.displayName.c_str()) != 0) { + this->m_lines.push_back(info.displayName.c_str()); } - if (std::strlen(info.unknown_004C.c_str()) == 0) { - this->unknown_00B8 = 0; + if (std::strlen(info.clanName.c_str()) == 0) { + this->nameWidth = 0; } else { char position[260]; std::memset(position, 0, sizeof(position)); - strncpy_s(position, sizeof(position), info.unknown_004C.c_str(), info.unknown_004C.size()); + strncpy_s(position, sizeof(position), info.clanName.c_str(), info.clanName.size()); if (g_forbiddenWords.Contains(position)) { std::string masked; g_forbiddenWords.Mask(position, &masked); @@ -353,20 +353,20 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi this->m_lines.push_back(name.c_str()); } else { - if (std::strlen(info.unknown_007C.c_str()) != 0) { - this->m_lines.push_back(info.unknown_007C.c_str()); + if (std::strlen(info.displayName.c_str()) != 0) { + this->m_lines.push_back(info.displayName.c_str()); } - if (std::strlen(info.unknown_0064.c_str()) != 0) { - name = FormatOwnedString("[%s] %s", info.unknown_0064.c_str(), name.c_str()); + if (std::strlen(info.title.c_str()) != 0) { + name = FormatOwnedString("[%s] %s", info.title.c_str(), name.c_str()); } - if (std::strlen(info.unknown_001C.c_str()) == 0) { + if (std::strlen(info.partyName.c_str()) == 0) { this->m_lines.push_back(name.c_str()); } else { char party[260]; std::memset(party, 0, sizeof(party)); - strncpy_s(party, sizeof(party), info.unknown_001C.c_str(), info.unknown_001C.size()); + strncpy_s(party, sizeof(party), info.partyName.c_str(), info.partyName.size()); if (g_forbiddenWords.Contains(party)) { std::string masked; g_forbiddenWords.Mask(party, &masked); @@ -378,10 +378,10 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi this->m_lines.push_back(line); } - if (std::strlen(info.unknown_0034.c_str()) != 0) { + if (std::strlen(info.guildName.c_str()) != 0) { char guild[260]; std::memset(guild, 0, sizeof(guild)); - strncpy_s(guild, sizeof(guild), info.unknown_0034.c_str(), info.unknown_0034.size()); + strncpy_s(guild, sizeof(guild), info.guildName.c_str(), info.guildName.size()); if (g_forbiddenWords.Contains(guild)) { std::string masked = ""; g_forbiddenWords.Mask(guild, &masked); @@ -389,7 +389,7 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi char position[260]; std::memset(position, 0, sizeof(position)); - strncpy_s(position, sizeof(position), info.unknown_004C.c_str(), info.unknown_004C.size()); + strncpy_s(position, sizeof(position), info.clanName.c_str(), info.clanName.size()); if (g_forbiddenWords.Contains(position)) { std::string masked = ""; g_forbiddenWords.Mask(position, &masked); @@ -408,9 +408,9 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi width = std::max(lineWidth, width); } - this->unknown_00B8 = width; + this->nameWidth = width; this->monsterType = monsterType; - if (monsterType == 0 || info.unknown_0094 != 0) { + if (monsterType == 0 || info.groupIconId != 0) { this->Resize(width, static_cast(this->m_lines.size()) * (g_nameBalloonFontHeight + 2) + 6); } else { const char* path; @@ -429,7 +429,7 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi if (height < static_cast(bitmap->image.height)) { height = bitmap->image.height; } - this->Resize(bitmap->image.width + this->unknown_00B8, static_cast(height)); + this->Resize(bitmap->image.width + this->nameWidth, static_cast(height)); } } @@ -446,9 +446,9 @@ void UINameBalloonText::AddNameLine(const char* text) { this->m_lines.clear(); this->m_lines.push_back(std::string(text)); const std::string& last = this->m_lines.back(); - this->unknown_00B8 = + this->nameWidth = std::max(this->TextWidth(last.c_str(), last.size(), 0, g_nameBalloonFontHeight, g_serviceFlag06, 0) + 8, 32); - this->Resize(this->unknown_00B8, g_nameBalloonFontHeight + 8); + this->Resize(this->nameWidth, g_nameBalloonFontHeight + 8); this->Invalidate(); } diff --git a/Source/UI/Text/UIBalloonText.h b/Source/UI/Text/UIBalloonText.h index a5602c8bb..00fbacd92 100644 --- a/Source/UI/Text/UIBalloonText.h +++ b/Source/UI/Text/UIBalloonText.h @@ -31,12 +31,12 @@ public: void SetFontHeight(int height); protected: - /* 007C */ unsigned char unknown_007C; + /* 007C */ unsigned char balloonFlag; /* 0080 */ int m_fontHeight; /* 0084 */ std::vector m_lines; /* 0090 */ std::uint32_t m_textColor; /* 0094 */ std::uint32_t m_outlineColor; - /* 0098 */ std::uint16_t unknown_0098; + /* 0098 */ std::uint16_t textFlags; /* 009A */ std::uint16_t m_fontMode; /* 009C */ unsigned char m_richText; }; diff --git a/Source/UI/Text/UINameBalloonText.h b/Source/UI/Text/UINameBalloonText.h index f0c424e95..6d7e5a787 100644 --- a/Source/UI/Text/UINameBalloonText.h +++ b/Source/UI/Text/UINameBalloonText.h @@ -18,7 +18,7 @@ public: virtual void AddNameLine(const char* text); /* 00A0 */ std::string iconName; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int nameWidth; /* 00BC */ unsigned char monsterType; /* 00BD */ unsigned char framed; }; diff --git a/Source/UI/Text/UIStaticTextControl.h b/Source/UI/Text/UIStaticTextControl.h index 67b30fd58..820b69bb1 100644 --- a/Source/UI/Text/UIStaticTextControl.h +++ b/Source/UI/Text/UIStaticTextControl.h @@ -33,15 +33,15 @@ public: void SetTooltip(const char* value, std::size_t length); std::string& Tooltip() { - return *reinterpret_cast(this->unknown_00B0); + return *reinterpret_cast(this->tooltipStorage); } /* 0080 */ std::string text; - /* 0098 */ std::string unknown_0098; - /* 00B0 */ unsigned char unknown_00B0[0x10]; + /* 0098 */ std::string displayText; + /* 00B0 */ unsigned char tooltipStorage[0x10]; /* 00C0 */ CUIVScrollBar* scrollBar; - /* 00C4 */ unsigned char unknown_00C4[0x04]; + /* 00C4 */ unsigned char tooltipTailStorage[0x04]; /* 00C8 */ bool fitText; /* 00CC */ int horizontalAlign; /* 00D0 */ int verticalAlign; @@ -59,7 +59,7 @@ public: #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CUIStaticText) == 0xFC); -static_assert(offsetof(CUIStaticText, unknown_0098) == 0x98); +static_assert(offsetof(CUIStaticText, displayText) == 0x98); static_assert(offsetof(CUIStaticText, scrollBar) == 0xC0); static_assert(offsetof(CUIStaticText, color) == 0xE0); static_assert(offsetof(CUIStaticText, outlineColor) == 0xF0); diff --git a/Source/UI/Text/UIString.h b/Source/UI/Text/UIString.h index 1c78c6202..f1dabed56 100644 --- a/Source/UI/Text/UIString.h +++ b/Source/UI/Text/UIString.h @@ -16,15 +16,15 @@ public: virtual void SetText(int width, int height, std::string text); /* 007C */ int unknown_007C; - /* 0080 */ int unknown_0080; - /* 0084 */ std::string unknown_0084; - /* 009C */ int unknown_009C; - /* 00A0 */ int unknown_00A0; - /* 00A4 */ int unknown_00A4; - /* 00A8 */ int unknown_00A8; - /* 00AC */ std::string unknown_00AC; - /* 00C4 */ std::string unknown_00C4; - /* 00DC */ std::string unknown_00DC; + /* 0080 */ int enabled; + /* 0084 */ std::string link; + /* 009C */ int red; + /* 00A0 */ int green; + /* 00A4 */ int blue; + /* 00A8 */ int fontSize; + /* 00AC */ std::string image; + /* 00C4 */ std::string fontName; + /* 00DC */ std::string text; }; #endif diff --git a/Source/UI/Text/UITextViewer.cpp b/Source/UI/Text/UITextViewer.cpp index f83c4543c..99e13ff9e 100644 --- a/Source/UI/Text/UITextViewer.cpp +++ b/Source/UI/Text/UITextViewer.cpp @@ -108,23 +108,23 @@ void UITextViewer::OnLBtnDblClk(int, int) { // OFFSET: 0x007B78D0 // FUNCTION: fn_09228 void UIAchListWnd::OnLBtnDown(int x, int y) { - if (x < 0 || x > this->geometry.width - this->unknown_0094) { + if (x < 0 || x > this->geometry.width - this->scrollBarWidth) { return; } - const int row = y / this->unknown_0084; - if (static_cast(row) >= static_cast(this->unknown_00AC->count)) { + const int row = y / this->rowHeight; + if (static_cast(row) >= static_cast(this->achievementList->count)) { return; } - this->SelectAchievement(this->unknown_008C + row); + this->SelectAchievement(this->firstRow + row); g_windowMgr.SetCapture(this); } // OFFSET: 0x007B7920 // FUNCTION: fn_09229 void UIAchTV::OnLBtnDown(int, int) { - if (this->unknown_00EC == 1) { + if (this->selectionDisabled == 1) { return; } @@ -143,8 +143,8 @@ void UIAchTab::OnLBtnDown(int x, int y) { return; } - this->unknown_007C = a; - this->unknown_0080 = b; + this->selectedGroup = a; + this->selectedSub = b; if (this->parent) { this->parent->SendMsg(this, UM_TAB, a, b, 0, 0); this->parent->Invalidate(); @@ -262,7 +262,7 @@ void UIItemTagCtrl::AddTagButton(UIWindow* button) { // OFFSET: 0x00874E10 // FUNCTION: fn_11195 void UIItemTagOnMail::AddTagButton(UIWindow* button) { - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0458)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.rodexComposeWnd)) { window->AddChild(button); } } @@ -270,7 +270,7 @@ void UIItemTagOnMail::AddTagButton(UIWindow* button) { // OFFSET: 0x00874E30 // FUNCTION: fn_11196 void UIItemTagOnMegaPhone::AddTagButton(UIWindow* button) { - if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0318)) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.npcTextEditDialogWnd)) { window->AddChild(button); } } diff --git a/Source/UI/Text/UITextViewerControl.h b/Source/UI/Text/UITextViewerControl.h index 9c7162abd..65fc87e0f 100644 --- a/Source/UI/Text/UITextViewerControl.h +++ b/Source/UI/Text/UITextViewerControl.h @@ -47,8 +47,8 @@ public: /* 008C */ int fontHeight; /* 0090 */ bool bold; /* 0094 */ std::uint32_t textColor; - /* 0098 */ bool unknown_0098; - /* 009C */ std::uint32_t unknown_009C; + /* 0098 */ bool shadow; + /* 009C */ std::uint32_t shadowColor; /* 00A0 */ bool outline; /* 00A4 */ std::uint32_t outlineColor; /* 00A8 */ int lineSpacing; diff --git a/Source/UI/Text/UITextViewerLinks.cpp b/Source/UI/Text/UITextViewerLinks.cpp index e9bf69b14..13751731b 100644 --- a/Source/UI/Text/UITextViewerLinks.cpp +++ b/Source/UI/Text/UITextViewerLinks.cpp @@ -159,13 +159,13 @@ bool UITextViewer::AddNaviLinks(std::string text, unsigned addedLines) { // OFFSET: 0x00876D50 // FUNCTION: fn_11207 void UIChatHisBox::AddLinkRecord(const char* name, int value, const char* detail) { - if (this->unknown_0100.size() >= static_cast(this->maxLines)) { + if (this->historyTexts.size() >= static_cast(this->maxLines)) { this->DropOldestRecords(); } - this->unknown_0100.push_back(std::string(name)); - this->unknown_010C.push_back(value); - this->unknown_0118.push_back(std::string(detail)); + this->historyTexts.push_back(std::string(name)); + this->historyColors.push_back(value); + this->historyItemIds.push_back(std::string(detail)); } // OFFSET: 0x0089BA70 diff --git a/Source/UI/Text/UITextViewerMessages.cpp b/Source/UI/Text/UITextViewerMessages.cpp index 0654b80d7..8e3de745f 100644 --- a/Source/UI/Text/UITextViewerMessages.cpp +++ b/Source/UI/Text/UITextViewerMessages.cpp @@ -108,8 +108,8 @@ __forceinline void UITextViewer::Activate(UITextButton* button, int id) { ITEM_INFO item; item.identified = 1; - item.unknown_0000[0] = static_cast(idValue); - item.unknown_0060 = 0; + item.identity[0] = static_cast(idValue); + item.refiningLevel = 0; item.itemId = button->GetLine(0); if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)) { @@ -366,8 +366,8 @@ int UITextViewer::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 } ITEM_INFO item; item.identified = 1; - item.unknown_0000[0] = static_cast(idValue); - item.unknown_0060 = 0; + item.identity[0] = static_cast(idValue); + item.refiningLevel = 0; item.itemId = button->GetLine(0); if (UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND)) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); diff --git a/Source/UI/UIBarGraph.h b/Source/UI/UIBarGraph.h index 0bd6c0bc5..2063a2399 100644 --- a/Source/UI/UIBarGraph.h +++ b/Source/UI/UIBarGraph.h @@ -80,7 +80,7 @@ public: void Paint() override; void SetValue(int value); - /* 007C */ int unknown_007C; + /* 007C */ int percentage; }; class UIBarGraphHomun : public UIWindow { diff --git a/Source/UI/UIBartermarketWnd.cpp b/Source/UI/UIBartermarketWnd.cpp index fc49ab9e3..26ffcd012 100644 --- a/Source/UI/UIBartermarketWnd.cpp +++ b/Source/UI/UIBartermarketWnd.cpp @@ -37,12 +37,12 @@ // FUNCTION: fn_10567 UIExpandedBarterItemPurchaseWnd::UIExpandedBarterItemPurchaseWnd() : UIFrameWnd(0) { - new (&this->unknown_00B4) std::list(); + new (&this->entryListStorage) std::list(); this->resizer = nullptr; this->scrollBar = nullptr; - this->unknown_00C4 = 0; + this->firstRow = 0; this->rowCount = 0; - this->unknown_00CC = 0; + this->hoveredRow = 0; this->scrollEnabled = 0; } @@ -50,12 +50,12 @@ UIExpandedBarterItemPurchaseWnd::UIExpandedBarterItemPurchaseWnd() // FUNCTION: fn_10569 UIExpandedBartermarketWnd::UIExpandedBartermarketWnd() : UIFrameWnd(0) { - new (&this->unknown_00B4) std::list(); - this->unknown_00BC = nullptr; + new (&this->entryListStorage) std::list(); + this->resizer = nullptr; this->scrollBar = nullptr; - this->unknown_00C4 = 0; + this->firstRow = 0; this->rowCount = 0; - this->unknown_00CC = 0; + this->hoveredRow = 0; this->scrollEnabled = 0; } @@ -276,7 +276,7 @@ std::pair UIExpandedBarterItemPurchaseWnd::GetEntryAt(i int index = 0; int visible = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == row) { return std::pair(true, *it); } @@ -296,7 +296,7 @@ std::pair UIExpandedBartermarketWnd::GetEntryAt(int x, int index = 0; int visible = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == (y - 17) / 64) { return std::pair(true, *it); } @@ -318,7 +318,7 @@ std::pair UIExpandedBarterItemPurchaseWnd::GetEntryOrCh int index = 0; int visible = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == row) { BarterMarketEntry entry; if ((offsetY / 32) & 1) { @@ -357,7 +357,7 @@ std::pair UIExpandedBartermarketWnd::GetEntryOrChunkAt( int index = 0; int visible = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == row) { BarterMarketEntry entry; if ((offsetY / 32) & 1) { @@ -426,22 +426,22 @@ void UIExpandedBarterItemPurchaseWnd::UpdateScrollBar() { this->scrollEnabled = 1; this->scrollBar->SetRange(overflow, rows, count); - int position = this->unknown_00C4; + int position = this->firstRow; if (position < 0) { - this->unknown_00C4 = 0; + this->firstRow = 0; position = 0; } const int limit = count - this->rowCount; if (position > limit) { - this->unknown_00C4 = limit; + this->firstRow = limit; position = limit; } this->scrollBar->SetPosition(position); } else { this->scrollEnabled = 0; - this->unknown_00C4 = 0; + this->firstRow = 0; this->scrollBar->SetRange(0, rows, count); } @@ -466,22 +466,22 @@ void UIExpandedBartermarketWnd::UpdateScrollBar() { this->scrollEnabled = 1; this->scrollBar->SetRange(overflow, rows, count); - int position = this->unknown_00C4; + int position = this->firstRow; if (position < 0) { - this->unknown_00C4 = 0; + this->firstRow = 0; position = 0; } const int limit = count - this->rowCount; if (position > limit) { - this->unknown_00C4 = limit; + this->firstRow = limit; position = limit; } this->scrollBar->SetPosition(position); } else { this->scrollEnabled = 0; - this->unknown_00C4 = 0; + this->firstRow = 0; this->scrollBar->SetRange(0, rows, count); } @@ -494,7 +494,7 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: switch (message) { case UM_DROP: { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - std::pair found = g_expandedBarterMarketItemMgr->FindItem(mode->drag.unknown_03B0); + std::pair found = g_expandedBarterMarketItemMgr->FindItem(mode->drag.barterId); if (!found.first) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -504,7 +504,7 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: found.second.value = mode->drag.quantity; for (std::vector::iterator chunk = found.second.chunks.begin(); chunk != found.second.chunks.end(); ++chunk) { ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, chunk->field_0); - bool missing = owned.unknown_0000[1] > 0; + bool missing = owned.identity[1] > 0; if (!missing && g_session.HasItemCount(chunk->field_0, chunk->field_4) == true) { const int itemId = chunk->field_0; const int refine = chunk->field_4; @@ -512,7 +512,7 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: int available = 0; for (int i = 0; i < count; ++i) { ITEM_INFO item = g_session.GetInventoryItemAt(i); - if (std::atoi(item.itemId.c_str()) == itemId && item.unknown_0060 >= refine) { + if (std::atoi(item.itemId.c_str()) == itemId && item.refiningLevel >= refine) { available = item.quantity; break; } @@ -544,7 +544,7 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: } } - if (mode->drag.quantity + g_expandedBarterMarketItemMgr->GetValueById(mode->drag.unknown_03B0) > 30000) { + if (mode->drag.quantity + g_expandedBarterMarketItemMgr->GetValueById(mode->drag.barterId) > 30000) { char buffer[200]; std::memset(buffer, 0, sizeof(buffer)); StringFormat(buffer, sizeof(buffer), static_cast(-1), LookupMessage(MSI_GLOBALRODEX_MESSAGE_RECEIVE_ALL), 30000); @@ -553,7 +553,7 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: return 0; } - const int factor = static_cast(g_expandedBarterMarketItemMgr->GetItemFactorById(mode->drag.unknown_03B0)); + const int factor = static_cast(g_expandedBarterMarketItemMgr->GetItemFactorById(mode->drag.barterId)); if (factor < 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -629,21 +629,21 @@ int UIExpandedBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std: case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { - const int previous = this->unknown_00C4; + const int previous = this->firstRow; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_00C4 = previous - this->rowCount + 1; + this->firstRow = previous - this->rowCount + 1; } else { if (message == UM_SCROLLVERTPAGEDOWN) { a = this->rowCount - 1; } - this->unknown_00C4 = a + previous; + this->firstRow = a + previous; } - if (previous != this->unknown_00C4) { + if (previous != this->firstRow) { this->UpdateScrollBar(); this->Invalidate(); } - return this->unknown_00C4 - previous; + return this->firstRow - previous; } case UM_REFRESHITEM: { @@ -668,7 +668,7 @@ int UIExpandedBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intpt switch (message) { case UM_DROP: { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - std::pair found = g_expandedBarterMarketItemMgr->FindEntry(mode->drag.unknown_03B0); + std::pair found = g_expandedBarterMarketItemMgr->FindEntry(mode->drag.barterId); if (found.first) { found.second.value = mode->drag.quantity; g_expandedBarterMarketItemMgr->RemoveEntry(found.second); @@ -701,7 +701,7 @@ int UIExpandedBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intpt if (width != this->geometry.width || height != this->geometry.height) { this->Resize(width, height); this->rowCount = (height - 46) / 64; - this->unknown_00BC->Move(this->geometry.width - 15, this->geometry.height - 15); + this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); this->scrollBar->Resize(this->scrollBar->geometry.width, this->geometry.height - 46); this->UpdateScrollBar(); @@ -713,21 +713,21 @@ int UIExpandedBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intpt case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { - const int previous = this->unknown_00C4; + const int previous = this->firstRow; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_00C4 = previous - this->rowCount + 1; + this->firstRow = previous - this->rowCount + 1; } else { if (message == UM_SCROLLVERTPAGEDOWN) { a = this->rowCount - 1; } - this->unknown_00C4 = a + previous; + this->firstRow = a + previous; } - if (previous != this->unknown_00C4) { + if (previous != this->firstRow) { this->UpdateScrollBar(); this->Invalidate(); } - return this->unknown_00C4 - previous; + return this->firstRow - previous; } case UM_REFRESHITEM: { @@ -750,13 +750,13 @@ int UIExpandedBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intpt // FUNCTION: fn_18076 ITEM_INFO BarterMarketItem::ToItemInfo() const { ITEM_INFO item; - item.unknown_0000[0] = this->field_1c; + item.identity[0] = this->field_1c; item.quantity = this->value; - item.unknown_0014[0] = this->field_20; + item.prices[0] = this->field_20; item.itemId = this->name; item.identified = 1; - item.unknown_0000[2] = this->field_40; - item.unknown_0070 = this->field_44; + item.identity[2] = this->field_40; + item.sprite = this->field_44; return item; } @@ -764,15 +764,15 @@ ITEM_INFO BarterMarketItem::ToItemInfo() const { // FUNCTION: fn_18077 ITEM_INFO BarterMarketEntry::ToItemInfo() const { ITEM_INFO item; - item.unknown_0000[0] = this->field_0; + item.identity[0] = this->field_0; item.quantity = this->value; - item.unknown_0014[0] = this->field_8; + item.prices[0] = this->field_8; item.itemId = this->name; - item.unknown_0060 = this->field_28; + item.refiningLevel = this->field_28; item.identified = 1; - item.unknown_006C = static_cast(this->factor); - item.unknown_0000[2] = this->field_38; - item.unknown_0070 = this->field_3c; + item.priceFactor = static_cast(this->factor); + item.identity[2] = this->field_38; + item.sprite = this->field_3c; return item; } @@ -867,14 +867,14 @@ void UIExpandedBarterItemPurchaseWnd::OnLBtnDown(int x, int y) { UIFrameWnd::OnLBtnDown(x, y); } - const int previous = this->unknown_00CC; + const int previous = this->hoveredRow; int hovered = -1; if (x >= 40 && x < this->geometry.width - 20 && y >= 17 && y < this->rowCount * 64 + 17) { const int row = (y - 17) / 64; int visible = 0; int index = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == row) { hovered = index; break; @@ -883,7 +883,7 @@ void UIExpandedBarterItemPurchaseWnd::OnLBtnDown(int x, int y) { } } } - this->unknown_00CC = hovered; + this->hoveredRow = hovered; if (previous != hovered) { this->Invalidate(); } @@ -903,14 +903,14 @@ void UIExpandedBartermarketWnd::OnLBtnDown(int x, int y) { UIFrameWnd::OnLBtnDown(x, y); } - const int previous = this->unknown_00CC; + const int previous = this->hoveredRow; int hovered = -1; if (x >= 40 && x < this->geometry.width - 20 && y >= 17 && y < this->rowCount * 64 + 17) { const int row = (y - 17) / 64; int visible = 0; int index = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index >= this->unknown_00C4) { + if (index >= this->firstRow) { if (visible == row) { hovered = index; break; @@ -919,7 +919,7 @@ void UIExpandedBartermarketWnd::OnLBtnDown(int x, int y) { } } } - this->unknown_00CC = hovered; + this->hoveredRow = hovered; if (previous != hovered) { this->Invalidate(); } @@ -1172,7 +1172,7 @@ bool UIBarterItemPurchaseWnd::Purchase() { } } - if (count > g_session.unknown_7FBC + 100) { + if (count > g_session.extraInventorySlots + 100) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SOUL_REAPER)), 255, 0, 0, 0); this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); @@ -1269,7 +1269,7 @@ int UIBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_ return 0; } - std::pair found = g_barterMarketItemMgr->FindItem(mode->drag.unknown_03B0); + std::pair found = g_barterMarketItemMgr->FindItem(mode->drag.barterId); if (found.first == false) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -1309,7 +1309,7 @@ int UIBarterItemPurchaseWnd::SendMsg(UIWindow* sender, int message, std::intptr_ return 0; } - const int amountById = g_barterMarketItemMgr->GetAmountById(mode->drag.unknown_03B0); + const int amountById = g_barterMarketItemMgr->GetAmountById(mode->drag.barterId); if (amountById < 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -1475,7 +1475,7 @@ int UIBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s return 0; } - std::pair found = g_barterMarketItemMgr->FindAllItem(mode->drag.unknown_03B0); + std::pair found = g_barterMarketItemMgr->FindAllItem(mode->drag.barterId); if (found.first == false) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_OUT_OF_STOCK)), 255, 0, 0, 0); mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); @@ -1508,7 +1508,7 @@ int UIBartermarketWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s if (width != this->geometry.width || height != this->geometry.height) { this->Resize(width, height); this->columns = 1; - const int contentHeight = this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17; + const int contentHeight = this->geometry.height - this->footerHeight - this->bottomPadding - 17; this->visibleRows = contentHeight / 32; this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); this->scrollBar->Move(this->geometry.width - 15, 14); @@ -1551,11 +1551,11 @@ void UIBartermarketWnd::OnCreate(int width, int height) { this->AddChild(this->resizer); this->scrollBar = new UIScrollBar(); - static_cast(this->scrollBar)->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->unknown_0104 - 17); + static_cast(this->scrollBar)->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - this->bottomPadding - 17); this->AddChild(this->scrollBar); this->columns = 1; - this->visibleRows = (height - this->unknown_0104 - 17) / 32; + this->visibleRows = (height - this->bottomPadding - 17) / 32; this->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } @@ -1585,7 +1585,7 @@ bool UIExpandedBarterItemPurchaseWnd::Purchase() { } } - if (count > g_session.unknown_7FBC + 100) { + if (count > g_session.extraInventorySlots + 100) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_SOUL_REAPER)), 255, 0, 0, 0); this->SendMsg(nullptr, UM_COMMAND, ID_CANCEL, 0, 0, 0); @@ -1626,13 +1626,13 @@ bool UIExpandedBarterItemPurchaseWnd::Purchase() { // OFFSET: 0x00847290 // FUNCTION: fn_10584 void UIExpandedBartermarketWnd::OnCreate(int width, int height) { - this->unknown_00BC = new UIResizer(); - this->unknown_00BC->SetSize(16, 16); - static_cast(this->unknown_00BC)->SetDirection(7); - static_cast(this->unknown_00BC)->SetBitmapName("유저인터페이스\\btn_resize.bmp"); - this->unknown_00BC->Move(this->geometry.width - 15, this->geometry.height - 15); - static_cast(this->unknown_00BC)->SetColors(0xFFFF00FF, 0xFFFF00FF); - this->AddChild(this->unknown_00BC); + this->resizer = new UIResizer(); + this->resizer->SetSize(16, 16); + static_cast(this->resizer)->SetDirection(7); + static_cast(this->resizer)->SetBitmapName("유저인터페이스\\btn_resize.bmp"); + this->resizer->Move(this->geometry.width - 15, this->geometry.height - 15); + static_cast(this->resizer)->SetColors(0xFFFF00FF, 0xFFFF00FF); + this->AddChild(this->resizer); this->scrollBar = new UIScrollBar(); this->scrollBar->Configure(this->geometry.width - 15, 14, 1, this->geometry.height - 46); @@ -1730,13 +1730,13 @@ void UIBartermarketWnd::Paint() { return; } - const int leftHeight = this->geometry.height - this->unknown_0104 - 17; + const int leftHeight = this->geometry.height - this->bottomPadding - 17; const int leftTiles = leftHeight / 8 + (leftHeight % 8 != 0); for (int tile = 0, y = 17; tile < leftTiles; ++tile, y += 8) { auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_left.bmp"))); this->DrawBitmap(0, y, &bitmap->image, false); } - const int rightHeight = this->geometry.height - this->unknown_0104 - 17; + const int rightHeight = this->geometry.height - this->bottomPadding - 17; const int rightTiles = rightHeight / 8 + (rightHeight % 8 != 0); for (int tile = 0, y = 17; tile < rightTiles; ++tile, y += 8) { auto* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\itemwin_right.bmp"))); @@ -1747,13 +1747,13 @@ void UIBartermarketWnd::Paint() { unsigned green; unsigned blue; SkinPaletteChannels(ResourceMgr::Instance(), 2, 2, red, green, blue); - this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->unknown_0104 - 17, RGB(red, green, blue)); - const int contentHeight = this->geometry.height - this->unknown_0104 - 17; + this->FillRegion(20, 17, (this->geometry.width - 60) % 32, this->geometry.height - this->bottomPadding - 17, RGB(red, green, blue)); + const int contentHeight = this->geometry.height - this->bottomPadding - 17; this->FillRegion(20, contentHeight / 32 * 32 + 17, this->geometry.width - 24, contentHeight % 32, RGB(red, green, blue)); this->DrawButtonBar(2, 0, 1); const int columns = (this->geometry.width - 40) / 32; - const int rows = (this->geometry.height - this->unknown_0108 - this->unknown_0104 - 17) / 32; + const int rows = (this->geometry.height - this->footerHeight - this->bottomPadding - 17) / 32; for (int row = 0; row < rows; ++row) { DrawItemSlotBackground(*this, 40, row * 32 + 17); } @@ -1829,7 +1829,7 @@ void UIExpandedBarterItemPurchaseWnd::Paint() { int visible = 0; int index = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index < this->unknown_00C4) { + if (index < this->firstRow) { continue; } @@ -1838,7 +1838,7 @@ void UIExpandedBarterItemPurchaseWnd::Paint() { for (int slot = 0; slot < static_cast(it->chunks.size()); ++slot) { DrawItemSlotBackground(*this, 72 + slot * 42, y + 49); } - if (this->unknown_00CC == index) { + if (this->hoveredRow == index) { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); this->FillRegion(72, y + 19, this->geometry.width - 0x5A, 0x3C, RGB(red, green, blue)); } @@ -1858,7 +1858,7 @@ void UIExpandedBarterItemPurchaseWnd::Paint() { ITEM_INFO chunkItem; chunkItem.SetItemId(chunk->field_0); chunkItem.quantity = chunk->amount * it->value; - chunkItem.unknown_0060 = chunk->field_4; + chunkItem.refiningLevel = chunk->field_4; const int chunkX = 84 + chunkIndex * 42; DrawItemWithQuantity(*this, ResourceMgr::Instance(), chunkX - 8, y + 49, chunkItem, 1, 0); if (chunk->field_4 > 0) { @@ -1914,7 +1914,7 @@ void UIExpandedBartermarketWnd::Paint() { int visible = 0; int index = 0; for (std::list::iterator it = this->Entries().begin(); it != this->Entries().end(); ++it, ++index) { - if (index < this->unknown_00C4) { + if (index < this->firstRow) { continue; } @@ -1923,7 +1923,7 @@ void UIExpandedBartermarketWnd::Paint() { for (int slot = 0; slot < static_cast(it->chunks.size()); ++slot) { DrawItemSlotBackground(*this, 72 + slot * 42, y + 49); } - if (this->unknown_00CC == index) { + if (this->hoveredRow == index) { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); this->FillRegion(72, y + 19, this->geometry.width - 0x5A, 0x3C, RGB(red, green, blue)); } @@ -1948,7 +1948,7 @@ void UIExpandedBartermarketWnd::Paint() { ITEM_INFO chunkItem; chunkItem.SetItemId(chunk->field_0); chunkItem.quantity = chunk->amount; - chunkItem.unknown_0060 = chunk->field_4; + chunkItem.refiningLevel = chunk->field_4; const int chunkX = 76 + chunkIndex * 42; if (it->value == 0) { DrawItemWithQuantityAuxiliary(*this, 1, chunkX, y + 49, chunkItem, 1, 0); diff --git a/Source/UI/UIBartermarketWnd.h b/Source/UI/UIBartermarketWnd.h index 043cd10c3..32898a82c 100644 --- a/Source/UI/UIBartermarketWnd.h +++ b/Source/UI/UIBartermarketWnd.h @@ -30,15 +30,16 @@ public: void UpdateScrollBar(); __declspec(noinline) std::pair GetEntryAt(int x, int y); __declspec(noinline) std::pair GetEntryOrChunkAt(int x, int y); - std::list& Entries() { return *reinterpret_cast*>(&this->unknown_00B4); } + // INLINED + std::list& Entries() { return *reinterpret_cast*>(&this->entryListStorage); } - /* 00B4 */ int unknown_00B4; + /* 00B4 */ int entryListStorage; /* 00B8 */ int itemCount; /* 00BC */ UIResizer* resizer; /* 00C0 */ UIScrollBar* scrollBar; - /* 00C4 */ int unknown_00C4; + /* 00C4 */ int firstRow; /* 00C8 */ int rowCount; - /* 00CC */ int unknown_00CC; + /* 00CC */ int hoveredRow; /* 00D0 */ unsigned char scrollEnabled; /* 00D4 */ UIExpandedBarterPurchaseButton* buyButton; /* 00D8 */ UIBitmapButton* cancelButton; @@ -58,15 +59,16 @@ public: void UpdateScrollBar(); __declspec(noinline) std::pair GetEntryAt(int x, int y); __declspec(noinline) std::pair GetEntryOrChunkAt(int x, int y); - std::list& Entries() { return *reinterpret_cast*>(&this->unknown_00B4); } + // INLINED + std::list& Entries() { return *reinterpret_cast*>(&this->entryListStorage); } - /* 00B4 */ int unknown_00B4; + /* 00B4 */ int entryListStorage; /* 00B8 */ int itemCount; - /* 00BC */ UIWindow* unknown_00BC; + /* 00BC */ UIWindow* resizer; /* 00C0 */ UIScrollBar* scrollBar; - /* 00C4 */ int unknown_00C4; + /* 00C4 */ int firstRow; /* 00C8 */ int rowCount; - /* 00CC */ int unknown_00CC; + /* 00CC */ int hoveredRow; /* 00D0 */ unsigned char scrollEnabled; }; diff --git a/Source/UI/UICaptchaPreviewWnd.cpp b/Source/UI/UICaptchaPreviewWnd.cpp index dd46e47bf..27a10a75b 100644 --- a/Source/UI/UICaptchaPreviewWnd.cpp +++ b/Source/UI/UICaptchaPreviewWnd.cpp @@ -142,7 +142,7 @@ void UIMacroDetectorWnd::Paint() { this->DrawRightAlignedText(280, 138, str.c_str(), 0, 0, 13, 0xFF2323, 1); } { - std::string str = FormatOwnedString(LookupMessage(MSI_MACRO_REPORTER_TOOLTIP_CHAR), this->unknown_00D0); + std::string str = FormatOwnedString(LookupMessage(MSI_MACRO_REPORTER_TOOLTIP_CHAR), this->remainingAttempts); this->DrawTextAt(60, 138, str.c_str(), 0, 0, 13, 0x2323FF, 1, 0); } } diff --git a/Source/UI/UIChangeMaterialWnd.cpp b/Source/UI/UIChangeMaterialWnd.cpp index c054b911d..9e8aead08 100644 --- a/Source/UI/UIChangeMaterialWnd.cpp +++ b/Source/UI/UIChangeMaterialWnd.cpp @@ -56,7 +56,7 @@ inline const MaterialListEntry* UIChangeMaterialWnd_List::GetEntry(unsigned int // OFFSET: 0x005E03B0 // FUNCTION: fn_03861 UIChangeMaterialWnd::UIChangeMaterialWnd() - : UIFrameWnd(0), unknown_00B4(nullptr), unknown_00B8(nullptr), m_sortBox(nullptr), m_button(nullptr), m_resultItem(), m_materials(), m_resultAmount(0), + : UIFrameWnd(0), itemList(nullptr), searchEdit(nullptr), m_sortBox(nullptr), m_button(nullptr), m_resultItem(), m_materials(), m_resultAmount(0), m_resultText() { this->m_resultX = 168; this->m_resultY = 131; @@ -70,7 +70,7 @@ UIChangeMaterialWnd::UIChangeMaterialWnd() // OFFSET: 0x005E0560 // FUNCTION: fn_03862 UIChangeMaterialWnd_List::UIChangeMaterialWnd_List() - : UIFrameWnd(0), unknown_00B4(27), unknown_00B8(16), m_selectedIndex(0), m_hoverIndex(0), m_scrollOffset(0), m_previousScrollOffset(0), m_scrollBar(nullptr), m_items(), + : UIFrameWnd(0), rowHeight(27), scrollBarWidth(16), m_selectedIndex(0), m_hoverIndex(0), m_scrollOffset(0), m_previousScrollOffset(0), m_scrollBar(nullptr), m_items(), m_entries() { } @@ -84,10 +84,10 @@ UIChangeMaterialWnd_ScrollBar::UIChangeMaterialWnd_ScrollBar() : UIScrollBar() { // FUNCTION: fn_03877 void UIChangeMaterialWnd_List::OnCreate(int width, int height) { this->m_scrollBar = new UIChangeMaterialWnd_ScrollBar(); - this->m_scrollBar->Configure(width - this->unknown_00B8, 0, 1, height); + this->m_scrollBar->Configure(width - this->scrollBarWidth, 0, 1, height); this->m_scrollBar->Show(0); this->AddChild(this->m_scrollBar); - this->m_pageSize = height / this->unknown_00B4; + this->m_pageSize = height / this->rowHeight; this->UpdateScrollBar(); } @@ -151,7 +151,7 @@ void UIChangeMaterialWnd_List::Move(int x, int y) { // OFFSET: 0x005E2590 // FUNCTION: fn_03883 void UIChangeMaterialWnd_List::OnLBtnUp(int, int position) { - const int rowHeight = this->unknown_00B4; + const int rowHeight = this->rowHeight; const unsigned int last = static_cast(this->m_items.size() - 1); unsigned int index = static_cast(position / rowHeight + this->m_scrollOffset); index = std::min(index, last); @@ -183,13 +183,13 @@ void UIChangeMaterialWnd_List::OnMouseMove(int x, int y) { // OFFSET: 0x005E2850 // FUNCTION: fn_03887 void UIChangeMaterialWnd::OnProcess() { - const std::string text = this->unknown_00B8->Text(); + const std::string text = this->searchEdit->Text(); if (text.compare(LookupMessage(MSI_BO_RESEARCHREPORT_OFF)) != 0) { if (text.empty()) { - this->unknown_00B8->SetText(LookupMessage(MSI_BO_RESEARCHREPORT_OFF)); - this->unknown_00B8->TextColor(0xb1u, 0xb1u, 0xb1u, 0xffffffffu); + this->searchEdit->SetText(LookupMessage(MSI_BO_RESEARCHREPORT_OFF)); + this->searchEdit->TextColor(0xb1u, 0xb1u, 0xb1u, 0xffffffffu); } else { - this->unknown_00B8->TextColor(0, 0, 0, 0xffffffffu); + this->searchEdit->TextColor(0, 0, 0, 0xffffffffu); } } } @@ -243,7 +243,7 @@ void UIChangeMaterialWnd_List::UpdateScrollBar() { // OFFSET: 0x005E2B20 // FUNCTION: fn_03891 void UIChangeMaterialWnd_List::ApplyFilter(std::string text) { - const int rowHeight = this->unknown_00B4; + const int rowHeight = this->rowHeight; this->m_pageSize = this->geometry.height / rowHeight; this->m_selectedIndex = 0; this->m_scrollOffset = 0; @@ -336,7 +336,7 @@ void UIChangeMaterialWnd::SendChangeMaterial() { unsigned char* entry = packet + 0xC; for (auto it = this->m_materials.begin(); it != this->m_materials.end(); ++it) { *reinterpret_cast(entry + 2) = static_cast(it->quantity); - *reinterpret_cast(entry) = static_cast(it->unknown_0000[1]); + *reinterpret_cast(entry) = static_cast(it->identity[1]); entry += 4; } @@ -363,8 +363,8 @@ int UIChangeMaterialWnd::SendMsg( ) { switch (message) { case UM_DEFPUSH: - if (sender == reinterpret_cast(this->unknown_00B8) && reinterpret_cast(this->unknown_00B8) == g_windowMgr.GetHoverWindow()) { - this->unknown_00B4->SendMsg(nullptr, UM_COMMAND, ID_SEARCH, reinterpret_cast(this->unknown_00B8->Text()), 0, 0); + if (sender == reinterpret_cast(this->searchEdit) && reinterpret_cast(this->searchEdit) == g_windowMgr.GetHoverWindow()) { + this->itemList->SendMsg(nullptr, UM_COMMAND, ID_SEARCH, reinterpret_cast(this->searchEdit->Text()), 0, 0); } break; case UM_COMMAND: @@ -376,23 +376,23 @@ int UIChangeMaterialWnd::SendMsg( g_windowMgr.CloseWindow(WID_CHANGEMATERIALWND); break; case ID_SEARCH: - this->unknown_00B4->SendMsg(nullptr, UM_COMMAND, ID_SEARCH, reinterpret_cast(this->unknown_00B8->Text()), 0, 0); + this->itemList->SendMsg(nullptr, UM_COMMAND, ID_SEARCH, reinterpret_cast(this->searchEdit->Text()), 0, 0); break; case 0x16c: - this->unknown_00B4->SortItems(argument2 > 0); + this->itemList->SortItems(argument2 > 0); break; case 0x19f: - this->unknown_00B4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + this->itemList->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); break; default: break; } break; case UM_UPPUSH: - this->unknown_00B4->SendMsg(nullptr, UM_UPPUSH, 0, 0, 0, 0); + this->itemList->SendMsg(nullptr, UM_UPPUSH, 0, 0, 0, 0); break; case UM_DOWNPUSH: - this->unknown_00B4->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0); + this->itemList->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0); break; case UM_REFRESHITEM: if (argument1 != 0) { @@ -406,7 +406,7 @@ int UIChangeMaterialWnd::SendMsg( info.SetItemId(it->id); info.quantity = it->quantity; const ITEM_INFO stock = LookupClientItem(g_session.m_inventoryItems, it->id, 1); - info.unknown_0000[1] = stock.unknown_0000[1]; + info.identity[1] = stock.identity[1]; info.identified = it->quantity <= stock.quantity; this->m_materials.push_back(info); } @@ -565,7 +565,7 @@ void UIChangeMaterialWnd_List::Paint() { } } - const int rowHeight = this->unknown_00B4; + const int rowHeight = this->rowHeight; if (!entry) { CRes* disabled = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\ChangeMaterial\\btn_material_disable.bmp")); this->DrawBitmap(0, rowHeight * row, static_cast(disabled), true); @@ -650,7 +650,7 @@ void UIChangeMaterialWnd_ScrollBar::Paint() { // OFFSET: 0x005E26B0 // FUNCTION: fn_03885 void UIChangeMaterialWnd_List::OnMouseHover(int x, int y) { - const int rowHeight = this->unknown_00B4; + const int rowHeight = this->rowHeight; const int index = y / rowHeight + this->m_scrollOffset; if (static_cast(index) >= this->m_items.size()) { return; @@ -698,16 +698,16 @@ void UIChangeMaterialWnd::OnCreate(int width, int height) { close->SetId(201); this->AddChild(close); - this->unknown_00B8 = new UIEditCtrl(); - this->unknown_00B8->SetSize(118, 13); - this->unknown_00B8->Move(313, 262); - this->unknown_00B8->maximum = 20; - this->unknown_00B8->preserveInput = 1; - this->unknown_00B8->SetText(LookupMessage(MSI_BO_RESEARCHREPORT_OFF)); - this->unknown_00B8->TextColor(0xB1u, 0xB1u, 0xB1u, 0xFFFFFFFFu); - this->unknown_00B8->Background(255, 236, 207); - this->unknown_00B8->topPadding = -1; - this->AddChild(this->unknown_00B8); + this->searchEdit = new UIEditCtrl(); + this->searchEdit->SetSize(118, 13); + this->searchEdit->Move(313, 262); + this->searchEdit->maximum = 20; + this->searchEdit->preserveInput = 1; + this->searchEdit->SetText(LookupMessage(MSI_BO_RESEARCHREPORT_OFF)); + this->searchEdit->TextColor(0xB1u, 0xB1u, 0xB1u, 0xFFFFFFFFu); + this->searchEdit->Background(255, 236, 207); + this->searchEdit->topPadding = -1; + this->AddChild(this->searchEdit); UIBmpTextButton* search = new UIBmpTextButton(); search->SetBitmap("유저인터페이스\\ChangeMaterial\\btn_search.bmp", 0, 0); @@ -756,11 +756,11 @@ void UIChangeMaterialWnd::OnCreate(int width, int height) { cancel->SetId(201); this->AddChild(cancel); - this->unknown_00B4 = new UIChangeMaterialWnd_List(); - this->unknown_00B4->SetSize(186, 216); - this->unknown_00B4->Move(310, 41); - this->AddChild(this->unknown_00B4); - this->unknown_00B4->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); + this->itemList = new UIChangeMaterialWnd_List(); + this->itemList->SetSize(186, 216); + this->itemList->Move(310, 41); + this->AddChild(this->itemList); + this->itemList->SendMsg(nullptr, UM_REFRESHITEM, 0, 0, 0, 0); } // OFFSET: 0x005E1E20 @@ -779,12 +779,12 @@ void UIChangeMaterialWnd_CheckBox::Paint() { return; } - if (this->geometry.unknown_0030 == 0) { + if (this->geometry.state == 0) { this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve(this->m_unchecked.c_str()))), false); if (!this->ascendingText.empty()) { this->DrawTextAt(0xc, 1, this->ascendingText.c_str(), 0, 0, 0xc, 0, 0, 0); } - } else if (this->geometry.unknown_0030 == 1) { + } else if (this->geometry.state == 1) { this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve(this->m_checked.c_str()))), false); if (!this->descendingText.empty()) { this->DrawTextAt(0xc, 1, this->descendingText.c_str(), 0, 0, 0xc, 0, 0, 0); diff --git a/Source/UI/UIChangeMaterialWnd.h b/Source/UI/UIChangeMaterialWnd.h index c709dccf1..9772a7ab8 100644 --- a/Source/UI/UIChangeMaterialWnd.h +++ b/Source/UI/UIChangeMaterialWnd.h @@ -80,8 +80,8 @@ public: int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; - /* 00B4 */ UIChangeMaterialWnd_List* unknown_00B4; - /* 00B8 */ UIEditCtrl* unknown_00B8; + /* 00B4 */ UIChangeMaterialWnd_List* itemList; + /* 00B8 */ UIEditCtrl* searchEdit; /* 00BC */ UIChangeMaterialWnd_CheckBox* m_sortBox; /* 00C0 */ UIBitmapButton* m_button; /* 00C4 */ int m_resultX; @@ -118,8 +118,8 @@ public: void OnCreate(int width, int height) override; const MaterialListEntry* GetEntry(unsigned int index) const; - /* 00B4 */ int unknown_00B4; - /* 00B8 */ int unknown_00B8; + /* 00B4 */ int rowHeight; + /* 00B8 */ int scrollBarWidth; /* 00BC */ int m_pageSize; /* 00C0 */ int64_t m_selectedIndex; diff --git a/Source/UI/UIGradeEnchantWnd.cpp b/Source/UI/UIGradeEnchantWnd.cpp index d49df18c5..5b27b3fea 100644 --- a/Source/UI/UIGradeEnchantWnd.cpp +++ b/Source/UI/UIGradeEnchantWnd.cpp @@ -75,9 +75,9 @@ static inline int MaterialRowAt(int x, int y) { // FUNCTION: fn_09738 UIGradeEnchantWnd::UIGradeEnchantWnd() : UIFrameWnd(0), enhancedUpButton(nullptr), state(0), - result(-1), unknown_00C8(200), unknown_00CC(100), stateTick(0), unknown_00D4(0), unknown_00D8(1), unknown_00DC(1), unknown_00E0(0), - selectedMaterial(-1), hoverMaterial(-1), materials(), info{}, unknown_0108(0), unknown_010C(0), unknown_0110(0), unknown_0114(0), unknown_0118(0), - unknown_011C(), item(0), unknown_0220(0), startButton(nullptr), enhancedDownButton(nullptr) { + result(-1), itemFrameInterval(200), wheelFrameInterval(100), stateTick(0), wheelTick(0), itemFrame(1), wheelFrame(1), resultTick(0), + selectedMaterial(-1), hoverMaterial(-1), materials(), info{}, enchantOption(0), enchantOptionCount(0), protect(0), blessingAmount(0), baseSuccessRate(0), + messageIds(), item(0), requestPending(0), startButton(nullptr), enhancedDownButton(nullptr) { } // OFFSET: 0x007E6A60 @@ -110,20 +110,20 @@ void UIGradeEnchantWnd::DragAndDrop(int x, int y, std::intptr_t value) { // OFFSET: 0x007E7560 // FUNCTION: fn_09750 void UIGradeEnchantWnd::ResetItem() { - this->unknown_0220 = 0; - this->unknown_00D8 = 1; - this->unknown_00DC = 1; + this->requestPending = 0; + this->itemFrame = 1; + this->wheelFrame = 1; this->item = ITEM_INFO(0); this->materials.clear(); this->selectedMaterial = -1; this->info = GradeEnchantInfo{}; - this->unknown_0108 = 0; - this->unknown_010C = 0; - this->unknown_0114 = 0; - this->unknown_0110 = 0; - this->unknown_0118 = 0; - this->unknown_00E0 = 0; + this->enchantOption = 0; + this->enchantOptionCount = 0; + this->blessingAmount = 0; + this->protect = 0; + this->baseSuccessRate = 0; + this->resultTick = 0; this->SetResult(0, -1); this->Invalidate(); @@ -132,7 +132,7 @@ void UIGradeEnchantWnd::ResetItem() { // OFFSET: 0x007E76A0 // FUNCTION: fn_09751 int UIGradeEnchantWnd::SelectedMaterialZeny() { - if (this->item.unknown_0000[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && + if (this->item.identity[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && this->materials.size() > static_cast(this->selectedMaterial)) { return this->materials[this->selectedMaterial].zeny; } @@ -143,13 +143,13 @@ int UIGradeEnchantWnd::SelectedMaterialZeny() { // OFFSET: 0x007E7740 // FUNCTION: fn_09752 int UIGradeEnchantWnd::SuccessRate() { - if (this->item.unknown_0000[1] <= 0) { + if (this->item.identity[1] <= 0) { return 0; } - int rate = this->unknown_0118; - if (this->unknown_0114 > 0) { - rate += this->unknown_0114 / this->info.unknown_0004 * this->info.unknown_000C; + int rate = this->baseSuccessRate; + if (this->blessingAmount > 0) { + rate += this->blessingAmount / this->info.blessingStepAmount * this->info.bonusPerStep; } return rate > 100 ? 100 : rate; @@ -239,7 +239,7 @@ void UIGradeEnchantWnd::Paint() { if (this->state == 1 || this->state == 2) { this->DrawBitmap(192, 225, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\btn_unbroken.bmp").c_str()))), false); - this->DrawBitmap(24, 54, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\bg_gradeitem%d.bmp", this->unknown_00D8).c_str()))), false); + this->DrawBitmap(24, 54, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\bg_gradeitem%d.bmp", this->itemFrame).c_str()))), false); if (this->hoverMaterial >= 0 && this->hoverMaterial != this->selectedMaterial) { this->DrawBitmap(158, this->hoverMaterial * 40 + 102, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\btn_material_over.bmp").c_str()))), false); @@ -264,23 +264,23 @@ void UIGradeEnchantWnd::Paint() { y += 40; } - if (this->info.unknown_0000 > 0) { + if (this->info.blessingItemId > 0) { ITEM_INFO itemInfo; - itemInfo.SetItemId(this->info.unknown_0000); + itemInfo.SetItemId(this->info.blessingItemId); itemInfo.GetIdDisplayName(description, capacity, 0); DrawItemIcon(*this, ResourceMgr::Instance(), 195, 228, itemInfo, 0); - std::string text = FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description, this->unknown_0114); + std::string text = FormatOwnedString(LookupMessage(MSI_NO_ITEM_FOR_EXCHANGE), description, this->blessingAmount); this->DrawAlignedText(228, 237, text, 160, 0, 0xFFFFFF, 0, 0, 11, 1, 1); } this->UpdateEnchantMessages(); - const int count = static_cast(this->unknown_011C.size()); + const int count = static_cast(this->messageIds.size()); for (int i = 0; i < 3; ++i) { if (i < count) { const int itemY = 46 + i * 16; this->DrawBitmap(152, itemY, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\caution.bmp").c_str()))), true); - const int msgId = this->unknown_011C[i]; + const int msgId = this->messageIds[i]; if (msgId == 3711 || msgId == 3822) { this->DrawAlignedText(166, itemY, LookupMessage(msgId), 228, 0, 0x5AEB00, 0, 0, 11, 1, 0); } else { @@ -294,15 +294,15 @@ void UIGradeEnchantWnd::Paint() { } if (this->state == 2) { - this->DrawBitmap(56, 268, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\gradewheel%d.bmp", this->unknown_00DC).c_str()))), true); + this->DrawBitmap(56, 268, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\gradewheel%d.bmp", this->wheelFrame).c_str()))), true); } else { this->DrawBitmap(56, 268, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\gradewheel%d.bmp", 1).c_str()))), true); } - if (this->item.unknown_0000[1] > 0) { + if (this->item.identity[1] > 0) { DrawItemIcon(*this, ResourceMgr::Instance(), 64, 125, this->item, 0); - if (this->item.unknown_0088 > 0) { - this->DrawBitmap(64, 137, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", this->item.unknown_0088).c_str()))), true); + if (this->item.grade > 0) { + this->DrawBitmap(64, 137, static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", this->item.grade).c_str()))), true); } } @@ -333,7 +333,7 @@ void UIGradeEnchant_BtnStart::Paint() { // OFFSET: 0x007E8990 // FUNCTION: fn_09758 void UIGradeEnchantWnd::OnLBtnDblClk(int x, int y) { - if (this->item.unknown_0000[1] > 0 && x >= 53 && x <= 99 && y >= 114 && y <= 160) { + if (this->item.identity[1] > 0 && x >= 53 && x <= 99 && y >= 114 && y <= 160) { this->ResetItem(); } } @@ -346,7 +346,7 @@ void UIGradeEnchantWnd::OnLBtnDown(int x, int y) { return; } - if (this->state == 1 && this->item.unknown_0000[1] > 0 && x >= 64 && x <= 110 && y >= 125 && y <= 171) { + if (this->state == 1 && this->item.identity[1] > 0 && x >= 64 && x <= 110 && y >= 125 && y <= 171) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 33, this->item, 1, -1); } } @@ -365,13 +365,13 @@ void UIGradeEnchantWnd::OnLBtnUp(int x, int y) { } if (this->selectedMaterial != row) { - if (this->unknown_0114 > 0) { + if (this->blessingAmount > 0) { g_windowMgr.Confirm(LookupMessage(MSI_ENCHANT_TAB_PERFECT), 0, true, false, 0, "Message", 280, 120, 0); } this->selectedMaterial = row; - this->unknown_0114 = 0; - this->unknown_0110 = 0; + this->blessingAmount = 0; + this->protect = 0; } this->Invalidate(); @@ -408,28 +408,28 @@ void UIGradeEnchant_BtnEnhancedUp::OnMouseHover(int x, int y) { // FUNCTION: fn_09763 void UIGradeEnchantWnd::OnProcess() { const int frameCounts[3] = {6, 6, 5}; - if (this->unknown_00D8 >= frameCounts[this->state]) { + if (this->itemFrame >= frameCounts[this->state]) { return; } const DWORD now = timeGetTime(); - if (now > this->unknown_00C8 + this->stateTick) { - if (++this->unknown_00D8 >= frameCounts[this->state]) { - this->unknown_00D8 = 1; + if (now > this->itemFrameInterval + this->stateTick) { + if (++this->itemFrame >= frameCounts[this->state]) { + this->itemFrame = 1; } this->stateTick = timeGetTime(); this->Invalidate(); } - if (now > this->unknown_00CC + this->unknown_00D4) { - if (++this->unknown_00DC >= 4) { - this->unknown_00DC = 1; + if (now > this->wheelFrameInterval + this->wheelTick) { + if (++this->wheelFrame >= 4) { + this->wheelFrame = 1; } - this->unknown_00D4 = timeGetTime(); + this->wheelTick = timeGetTime(); this->Invalidate(); } - if (this->state == 2 && now >= this->unknown_00E0 + 3000) { + if (this->state == 2 && now >= this->resultTick + 3000) { switch (this->result) { case ENCHANTGRADE_UPGRADE_SUCCESS: g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ITEM_GRADE_ENCHANT_FAIL_BREAK)), 0xFFFF00, 0, 0, 0); @@ -450,10 +450,10 @@ void UIGradeEnchantWnd::OnProcess() { this->ResetItem(); } - const bool disabled = this->unknown_0220 == 1 || this->item.unknown_0000[1] == 0 || this->selectedMaterial == -1 || + const bool disabled = this->requestPending == 1 || this->item.identity[1] == 0 || this->selectedMaterial == -1 || LookupClientItem(g_session.m_inventoryItems, this->materials[this->selectedMaterial].itemId, 0).quantity < this->materials[this->selectedMaterial].amount || - g_session.m_zeny < this->SelectedMaterialZeny() || this->unknown_0118 == 0; + g_session.m_zeny < this->SelectedMaterialZeny() || this->baseSuccessRate == 0; if (disabled) { this->startButton->SetDisabled(1); @@ -492,13 +492,13 @@ void UIGradeEnchantWnd::OnRBtnUp(int x, int y) { if (x >= 195 && x <= 219 && y >= 228 && y <= 252) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { - ITEM_INFO blessing = LookupClientItem(g_session.m_inventoryItems, this->info.unknown_0000, 0); + ITEM_INFO blessing = LookupClientItem(g_session.m_inventoryItems, this->info.blessingItemId, 0); window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&blessing), 0, 0, 0); } } } - if (this->item.unknown_0000[1] > 0 && x >= 53 && x <= 99 && y >= 114 && y <= 160) { + if (this->item.identity[1] > 0 && x >= 53 && x <= 99 && y >= 114 && y <= 160) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&this->item), 0, 0, 0); @@ -515,20 +515,20 @@ int UIGradeEnchantWnd::SendMsg( case UM_COMMAND: switch (argument1) { case ID_OK: - if (this->unknown_0220 != 1 && this->item.unknown_0000[1] > 0 && this->selectedMaterial != -1) { + if (this->requestPending != 1 && this->item.identity[1] > 0 && this->selectedMaterial != -1) { const int quantity = LookupClientItem(g_session.m_inventoryItems, this->materials[this->selectedMaterial].itemId, 0).quantity; if (quantity >= this->materials[this->selectedMaterial].amount && g_session.m_zeny >= this->SelectedMaterialZeny()) { - if (this->unknown_0110 != 0 || this->unknown_0114 != 0 || + if (this->protect != 0 || this->blessingAmount != 0 || g_windowMgr.Confirm(LookupMessage(MSI_MERCHANTSHOP_TOTA_LOVER_ZENY_ERR), 2, true, false, 0, "Message", 280, 120, 0) != 188) { - this->unknown_0220 = 1; + this->requestPending = 1; GradeEnchantRequestPacket packet; packet.id = 0xB5B; - packet.index = static_cast(this->item.unknown_0000[1]); + packet.index = static_cast(this->item.identity[1]); packet.material = this->selectedMaterial; - packet.useBlessing = this->unknown_0114 > 0; - packet.blessingCount = this->unknown_0114 / this->info.unknown_0004; - packet.protect = this->unknown_0110; + packet.useBlessing = this->blessingAmount > 0; + packet.blessingCount = this->blessingAmount / this->info.blessingStepAmount; + packet.protect = this->protect; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); } } @@ -543,14 +543,14 @@ int UIGradeEnchantWnd::SendMsg( break; } case ID_UP: - if (this->info.unknown_0000 > 0 && this->unknown_0114 < this->info.unknown_0008 * this->info.unknown_0004 && - LookupClientItem(g_session.m_inventoryItems, this->info.unknown_0000, 0).quantity >= this->unknown_0114 + this->info.unknown_0004) { - this->unknown_0114 += this->info.unknown_0004; + if (this->info.blessingItemId > 0 && this->blessingAmount < this->info.maxBlessingSteps * this->info.blessingStepAmount && + LookupClientItem(g_session.m_inventoryItems, this->info.blessingItemId, 0).quantity >= this->blessingAmount + this->info.blessingStepAmount) { + this->blessingAmount += this->info.blessingStepAmount; } break; case ID_DOWN: - if (this->info.unknown_0000 > 0 && this->unknown_0114 > 0) { - this->unknown_0114 -= this->info.unknown_0004; + if (this->info.blessingItemId > 0 && this->blessingAmount > 0) { + this->blessingAmount -= this->info.blessingStepAmount; } break; case 510: @@ -561,12 +561,12 @@ int UIGradeEnchantWnd::SendMsg( case UM_REFRESHITEM: if (this->state == 0 || this->state == 1) { const ITEM_INFO dropped = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - if (g_session.HasItem61B8(dropped.unknown_0000[1]) == 1) { + if (g_session.HasItem61B8(dropped.identity[1]) == 1) { g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return -1; } - if (dropped.unknown_0000[1] != 0 && dropped.identified == 1) { + if (dropped.identity[1] != 0 && dropped.identified == 1) { GradeEnchantSelectPacket packet; packet.id = 0xB59; packet.index = static_cast(argument1); @@ -593,28 +593,28 @@ void UIGradeEnchantWnd::SetEnchantInfo( } const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, index); - if (owned.unknown_0000[1] == 0) { + if (owned.identity[1] == 0) { return; } this->item = owned; this->info = info; - this->unknown_0108 = value0108; - this->unknown_010C = value010C; + this->enchantOption = value0108; + this->enchantOptionCount = value010C; this->materials.assign(materials, materials + materialCount); this->selectedMaterial = -1; - this->unknown_0114 = 0; - this->unknown_0118 = value; + this->blessingAmount = 0; + this->baseSuccessRate = value; this->state = 1; this->result = -1; this->stateTick = timeGetTime(); - this->unknown_00D8 = 1; + this->itemFrame = 1; this->enhancedUpButton->tooltipEnabled = 1; this->Invalidate(); - this->unknown_0220 = 0; - this->enhancedUpButton->tooltipValue = this->info.unknown_0004; + this->requestPending = 0; + this->enhancedUpButton->tooltipValue = this->info.blessingStepAmount; } // OFFSET: 0x007E9910 @@ -659,12 +659,12 @@ void UIGradeEnchantWnd::SetResult(int state, int result) { this->state = state; this->result = result; this->stateTick = timeGetTime(); - this->unknown_00D8 = 1; + this->itemFrame = 1; this->enhancedUpButton->tooltipEnabled = state != 0; switch (state) { case 2: - this->unknown_00E0 = this->stateTick; + this->resultTick = this->stateTick; break; } @@ -675,48 +675,48 @@ void UIGradeEnchantWnd::SetResult(int state, int result) { // OFFSET: 0x007E7050 // FUNCTION: fn_09748 void UIGradeEnchantWnd::UpdateEnchantMessages() { - this->unknown_011C.clear(); + this->messageIds.clear(); if (this->state != 1) { return; } std::string message; - if (this->unknown_0118 == 0) { - this->unknown_011C.push_back(3821); + if (this->baseSuccessRate == 0) { + this->messageIds.push_back(3821); return; } - if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].unknown_0010 == 0) { - this->unknown_011C.push_back(3822); + if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].breakOnFailure == 0) { + this->messageIds.push_back(3822); } if (this->selectedMaterial == -1) { - this->unknown_011C.push_back(3707); + this->messageIds.push_back(3707); } if (this->selectedMaterial != -1 && LookupClientItem(g_session.m_inventoryItems, this->materials[this->selectedMaterial].itemId, 0).quantity < this->materials[this->selectedMaterial].amount) { - this->unknown_011C.push_back(3708); + this->messageIds.push_back(3708); } if (g_session.m_zeny < this->SelectedMaterialZeny()) { - this->unknown_011C.push_back(3709); + this->messageIds.push_back(3709); } if (static_cast(g_session.m_weight) > static_cast(g_session.m_maxWeight) * 0.7f || g_session.GetList0Size() + g_session.CountItems17F0() + g_session.CountItems2B50() >= - g_session.unknown_7FBC + 100) { - this->unknown_011C.push_back(3710); + g_session.extraInventorySlots + 100) { + this->messageIds.push_back(3710); } - if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].unknown_0010 == 1) { + if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].breakOnFailure == 1) { int warning = this->SuccessRate() < 100 ? 3712 : 3822; - this->unknown_011C.push_back(warning); + this->messageIds.push_back(warning); } - if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].unknown_000C > 0) { - this->unknown_011C.push_back(3713); + if (this->selectedMaterial != -1 && this->materials[this->selectedMaterial].downgradeAmount > 0) { + this->messageIds.push_back(3713); } } diff --git a/Source/UI/UIGradeEnchantWnd.h b/Source/UI/UIGradeEnchantWnd.h index 4442486b2..709770f64 100644 --- a/Source/UI/UIGradeEnchantWnd.h +++ b/Source/UI/UIGradeEnchantWnd.h @@ -13,16 +13,16 @@ struct GradeEnchantMaterial { /* 0000 */ std::uint32_t itemId; /* 0004 */ std::int32_t amount; /* 0008 */ std::int32_t zeny; - /* 000C */ std::int32_t unknown_000C; - /* 0010 */ unsigned char unknown_0010; + /* 000C */ std::int32_t downgradeAmount; + /* 0010 */ unsigned char breakOnFailure; }; #pragma pack(pop) struct GradeEnchantInfo { - /* 0000 */ std::int32_t unknown_0000; - /* 0004 */ std::int32_t unknown_0004; - /* 0008 */ std::int32_t unknown_0008; - /* 000C */ std::int32_t unknown_000C; + /* 0000 */ std::int32_t blessingItemId; + /* 0004 */ std::int32_t blessingStepAmount; + /* 0008 */ std::int32_t maxBlessingSteps; + /* 000C */ std::int32_t bonusPerStep; }; #if defined(_WIN32) && !defined(_WIN64) @@ -83,25 +83,25 @@ public: /* 00BC */ UIGradeEnchant_BtnEnhancedDown* enhancedDownButton; /* 00C0 */ int state; /* 00C4 */ int result; - /* 00C8 */ std::uint32_t unknown_00C8; - /* 00CC */ std::uint32_t unknown_00CC; + /* 00C8 */ std::uint32_t itemFrameInterval; + /* 00CC */ std::uint32_t wheelFrameInterval; /* 00D0 */ std::uint32_t stateTick; - /* 00D4 */ std::uint32_t unknown_00D4; - /* 00D8 */ int unknown_00D8; - /* 00DC */ int unknown_00DC; - /* 00E0 */ std::uint32_t unknown_00E0; + /* 00D4 */ std::uint32_t wheelTick; + /* 00D8 */ int itemFrame; + /* 00DC */ int wheelFrame; + /* 00E0 */ std::uint32_t resultTick; /* 00E4 */ int selectedMaterial; /* 00E8 */ int hoverMaterial; /* 00EC */ std::vector materials; /* 00F8 */ GradeEnchantInfo info; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ unsigned char unknown_0110; - /* 0114 */ int unknown_0114; - /* 0118 */ int unknown_0118; - /* 011C */ std::vector unknown_011C; + /* 0108 */ int enchantOption; + /* 010C */ int enchantOptionCount; + /* 0110 */ unsigned char protect; + /* 0114 */ int blessingAmount; + /* 0118 */ int baseSuccessRate; + /* 011C */ std::vector messageIds; /* 0128 */ ITEM_INFO item; - /* 0220 */ unsigned char unknown_0220; + /* 0220 */ unsigned char requestPending; }; #endif diff --git a/Source/UI/UIHotkeyGuideWnd.cpp b/Source/UI/UIHotkeyGuideWnd.cpp index 0e9d010d1..514a1d674 100644 --- a/Source/UI/UIHotkeyGuideWnd.cpp +++ b/Source/UI/UIHotkeyGuideWnd.cpp @@ -260,7 +260,7 @@ void UIHotkeyGuideWnd::Paint() { void UIHotkeyGuideWnd::OnProcess() { auto tab = this->m_tabs.begin(); for (; tab != this->m_tabs.end(); ++tab) { - if ((*tab)->geometry.unknown_0030 == 2) { + if ((*tab)->geometry.state == 2) { int id = (*tab)->geometry.id; if (id != this->m_current) { this->m_keys.clear(); diff --git a/Source/UI/UIItemReformWnd.cpp b/Source/UI/UIItemReformWnd.cpp index 7b9ec339e..75693bd4a 100644 --- a/Source/UI/UIItemReformWnd.cpp +++ b/Source/UI/UIItemReformWnd.cpp @@ -373,24 +373,24 @@ void UIItemReformWnd::SelectItem(ITEM_INFO* item) { } this->resultItem.SetItemId(info->resultItem); - this->resultItem.unknown_0000[0] = 5; + this->resultItem.identity[0] = 5; this->resultItem.identified = 1; - this->resultItem.unknown_0060 = this->selectedItem->unknown_0060 + static_cast(info->changeRefineValue); + this->resultItem.refiningLevel = this->selectedItem->refiningLevel + static_cast(info->changeRefineValue); for (int index = 0; index < 25; ++index) { - this->resultItem.unknown_009C[index] = 0; + this->resultItem.options[index] = 0; } if (info->randomOptionCode.size() == 0) { - this->resultItem.unknown_0098 = this->selectedItem->unknown_0098; - memcpy_s(this->resultItem.unknown_009C, sizeof(this->resultItem.unknown_009C), this->selectedItem->unknown_009C, this->selectedItem->unknown_0098 * 5); + this->resultItem.optionCount = this->selectedItem->optionCount; + memcpy_s(this->resultItem.options, sizeof(this->resultItem.options), this->selectedItem->options, this->selectedItem->optionCount * 5); } else if (info->randomOptionCode.size() != 2 || info->randomOptionCode[0] != 'G' || info->randomOptionCode[1] != '0') { - this->resultItem.unknown_0098 = 1; - *reinterpret_cast(this->resultItem.unknown_009C) = g_itemOptionPlaceholderId; + this->resultItem.optionCount = 1; + *reinterpret_cast(this->resultItem.options) = g_itemOptionPlaceholderId; } if (info->preserveSocketItem == 1) { - std::memcpy(this->resultItem.unknown_001C, this->selectedItem->unknown_001C, sizeof(this->resultItem.unknown_001C)); + std::memcpy(this->resultItem.cards, this->selectedItem->cards, sizeof(this->resultItem.cards)); } if (info->preserveGrade == 1) { - this->resultItem.unknown_0088 = this->selectedItem->unknown_0088; + this->resultItem.grade = this->selectedItem->grade; } for (std::map::iterator it = info->materials.begin(); it != info->materials.end(); ++it) { @@ -460,7 +460,7 @@ int UIItemReformWnd::SendMsg( PACKET_CZ_ITEM_REFORM packet; packet.packetType = ID_CZ_ITEM_REFORM; packet.itemId = this->reformItem.GetItemId(); - packet.index = static_cast(this->selectedItem->unknown_0000[1]); + packet.index = static_cast(this->selectedItem->identity[1]); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); } break; @@ -524,18 +524,18 @@ int UIItemReformWnd_List::SendMsg( continue; } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, *index); - const std::uint64_t refine = item.unknown_0060; + const std::uint64_t refine = item.refiningLevel; if (refine < static_cast(info->needRefineMin) || refine > static_cast(info->needRefineMax)) { continue; } - const std::uint64_t options = item.unknown_0098; + const std::uint64_t options = item.optionCount; if (options < static_cast(info->needOptionNumMin)) { continue; } bool emptySocket = true; if (info->isEmptySocket == 1) { for (unsigned int slot = std::min(ItemSlotsCount(item), 4); slot < 4; ++slot) { - if (static_cast(slot) < 4 && reinterpret_cast(item.unknown_001C)[slot] > 0) { + if (static_cast(slot) < 4 && reinterpret_cast(item.cards)[slot] > 0) { emptySocket = false; break; } diff --git a/Source/UI/UILapineBoxWnd.cpp b/Source/UI/UILapineBoxWnd.cpp index 6cd104bc1..411e3d8c0 100644 --- a/Source/UI/UILapineBoxWnd.cpp +++ b/Source/UI/UILapineBoxWnd.cpp @@ -42,18 +42,18 @@ struct RandomCombineItemPacket { // FUNCTION: fn_04140 UILapineBoxWnd::UILapineBoxWnd() : UIFrameWnd(0), cancelButton(nullptr), makeButton(nullptr), - moveButton(nullptr), ingredientList(nullptr), unknown_00C4(0), noticeTick(0), noticeDuration(3000), waiting(0) { + moveButton(nullptr), ingredientList(nullptr), ingredientId(0), noticeTick(0), noticeDuration(3000), waiting(0) { } // OFFSET: 0x006006D0 // FUNCTION: fn_04160 void UIIngredientInfoWnd::OnLBtnDblClk(int, int) { if (this->insufficient == 1) { - static_cast(this->parent)->CanUseIngredient(this->item.unknown_0000[1]); + static_cast(this->parent)->CanUseIngredient(this->item.identity[1]); return; } - const int id = this->item.unknown_0000[1]; + const int id = this->item.identity[1]; if (id == 0) { return; } @@ -70,7 +70,7 @@ void UIIngredientInfoWnd::OnLBtnDblClk(int, int) { // OFFSET: 0x00600830 // FUNCTION: fn_04162 void UIIngredientInfoWnd::OnLBtnDown(int x, int y) { - if (this->insufficient != 1 && this->item.unknown_0000[1] > 0) { + if (this->insufficient != 1 && this->item.identity[1] > 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 27, this->item, this->quantity, -1); } } @@ -108,9 +108,9 @@ void UILapineBoxWnd::OnLBtnDblClk(int x, int y) { ITEM_INFO& item = *reinterpret_cast(storage); this->ReadMaterial(&item, x, y); - if (item.unknown_0000[1] != 0) { - if (this->ingredientList->AddIngredient(item.unknown_0000[1]) == 1) { - this->SendMsg(this, UM_DECITEM, item.unknown_0000[1], 0, 0, 0); + if (item.identity[1] != 0) { + if (this->ingredientList->AddIngredient(item.identity[1]) == 1) { + this->SendMsg(this, UM_DECITEM, item.identity[1], 0, 0, 0); } } @@ -128,7 +128,7 @@ void UILapineBoxWnd::OnLBtnDown(int x, int y) { ITEM_INFO& item = *reinterpret_cast(storage); this->ReadMaterial(&item, x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 0x1A, item, item.quantity, -1); } @@ -144,12 +144,12 @@ void UILapineBoxWnd::OnMouseHover(int x, int y) { ITEM_INFO& item = *reinterpret_cast(storage); this->ReadMaterial(&item, x, y); - if (item.unknown_0000[1] != 0) { + if (item.identity[1] != 0) { int tipX = 0; int tipY = -20; const int count = static_cast(this->items.size()); for (int index = 0; index < count; ++index) { - if (this->items[index].unknown_0000[1] == item.unknown_0000[1]) { + if (this->items[index].identity[1] == item.identity[1]) { int position[2] = {0, 0}; this->MaterialPosition(position, index); tipX = position[0]; @@ -159,7 +159,7 @@ void UILapineBoxWnd::OnMouseHover(int x, int y) { } this->ToScreen(tipX, tipY); - g_modeMgr.gameMode->ShowTooltip(item.unknown_0044.c_str(), tipX, tipY, -1, 0, 1); + g_modeMgr.gameMode->ShowTooltip(item.displayName.c_str(), tipX, tipY, -1, 0, 1); } item.~ITEM_INFO(); @@ -193,7 +193,7 @@ void UILapineBoxWnd::OnProcess() { // OFFSET: 0x00600C00 // FUNCTION: fn_04168 void UIIngredientInfoWnd::OnRBtnDown(int, int) { - if (this->item.unknown_0000[1] > 0) { + if (this->item.identity[1] > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); window->SendMsg(this, UM_ITEMEXPLANATION, reinterpret_cast(&this->item), 0, 0, 0); } @@ -241,7 +241,7 @@ __declspec(noinline) void UILapineBoxWnd::ReadMaterial(ITEM_INFO* out, int x, in bool UILapineBox_IngredientListWnd::CanUseIngredient(std::uint32_t identity) { std::vector::iterator entryIt; for (entryIt = this->items.begin(); entryIt != this->items.end(); ++entryIt) { - if ((*entryIt)->item.unknown_0000[1] == identity) { + if ((*entryIt)->item.identity[1] == identity) { break; } } @@ -267,20 +267,20 @@ bool UILapineBox_IngredientListWnd::CanUseIngredient(std::uint32_t identity) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(FormatOwnedString(LookupMessage(MSI_INPUT_FREE_MESSAGE), required).c_str()), 0, 0, 0); return false; } - if (this->minRefine > item.unknown_0060) { + if (this->minRefine > item.refiningLevel) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_CAPTCHA_INPUT_ANSWER)), 0, 0, 0); return false; } - if (this->maxRefine < item.unknown_0060) { + if (this->maxRefine < item.refiningLevel) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_ITEM_COUNT_INFINITY)), 0, 0, 0); return false; } - if (this->minRefine != 0 && this->minRefine < item.unknown_0060) { + if (this->minRefine != 0 && this->minRefine < item.refiningLevel) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_ITEMSHOP_CURRENCY)), 0, 0, 0); } if (Equipment(item) && !item.IsApprenticeItem() && !item.HasSpecialCard()) { - const int* cards = reinterpret_cast(item.unknown_001C); + const int* cards = reinterpret_cast(item.cards); for (int index = 0; index < ItemSlotsCount(item); ++index) { if (index < 4 && cards[index] > 0) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_PURCHASEWND_TOTAL)), 0, 0, 0); @@ -308,7 +308,7 @@ void UILapineBoxWnd::OnRBtnDown(int x, int y) { ITEM_INFO& item = *reinterpret_cast(storage); this->ReadMaterial(&item, x, y); - if (static_cast(item.unknown_0000[1]) > 0) { + if (static_cast(item.identity[1]) > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&item), 0, 0, 0); } @@ -349,14 +349,14 @@ int UILapineBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: packet->id = ID_CZ_REQ_RANDOM_COMBINE_ITEM; const std::int16_t materialsLength = static_cast(this->items.size() * 4); packet->length = materialsLength + 8; - packet->ingredientId = this->unknown_00C4; + packet->ingredientId = this->ingredientId; char* payload = new (std::nothrow) char[materialsLength + 8]; memcpy_s(payload, packet->length, packet, 8); for (std::size_t index = 0; index < this->items.size(); ++index) { const ITEM_INFO& item = this->items[index]; - const std::uint16_t material[2] = {static_cast(item.unknown_0000[1]), static_cast(item.quantity)}; + const std::uint16_t material[2] = {static_cast(item.identity[1]), static_cast(item.quantity)}; memcpy_s(payload + 8 + index * 4, packet->length, material, sizeof(material)); } @@ -380,8 +380,8 @@ int UILapineBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: if (selected != entries.end()) { UIIngredientInfoWnd* entry = *selected; - if (entry != nullptr && entry->insufficient != 1 && this->ingredientList->SendMsg(this, UM_DECITEM, entry->item.unknown_0000[1], 0, 0, 0) >= 0) { - this->AddIngredient(entry->item.unknown_0000[1], entry->quantity); + if (entry != nullptr && entry->insufficient != 1 && this->ingredientList->SendMsg(this, UM_DECITEM, entry->item.identity[1], 0, 0, 0) >= 0) { + this->AddIngredient(entry->item.identity[1], entry->quantity); } } break; @@ -389,7 +389,7 @@ int UILapineBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } break; case UM_DECITEM: { - const auto found = std::find_if(this->items.begin(), this->items.end(), [a](ITEM_INFO item) { return a == item.unknown_0000[1]; }); + const auto found = std::find_if(this->items.begin(), this->items.end(), [a](ITEM_INFO item) { return a == item.identity[1]; }); if (found != this->items.end()) { this->items.erase(found); @@ -428,8 +428,8 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i } for (std::vector::iterator it = this->items.begin(); it != this->items.end(); ++it) { - ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, (*it)->item.unknown_0000[1]); - if (owned.unknown_0000[1] == 0) { + ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, (*it)->item.identity[1]); + if (owned.identity[1] == 0) { (*it)->Show(0); } } @@ -450,7 +450,7 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i case UM_DECITEM: { std::vector::iterator it; for (it = this->items.begin(); it != this->items.end(); ++it) { - if (static_cast(a) == (*it)->item.unknown_0000[1]) { + if (static_cast(a) == (*it)->item.identity[1]) { break; } } @@ -478,7 +478,7 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i return -1; } - if (selected->item.unknown_0060 < found->unknown_0060) { + if (selected->item.refiningLevel < found->refiningLevel) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_CAPTCHA_INPUT_ANSWER)), 0, 0, 0); return -1; } @@ -523,7 +523,7 @@ int UILapineBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, std::i // OFFSET: 0x006016C0 // FUNCTION: fn_04174 void UILapineBoxWnd::SetIngredient(int id) { - this->unknown_00C4 = id; + this->ingredientId = id; { ITEM_INFO item; @@ -591,7 +591,7 @@ void UIIngredientInfoWnd::SetIngredientItem(std::uint32_t id) { this->BuildItemName(&this->item, &highlightColor, &breaks, &cursor, &remaining, &highlight, 1, 0); if (this->item.identified == 1) { - const int count = this->item.unknown_0098; + const int count = this->item.optionCount; if (count != 0) { sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, count); } diff --git a/Source/UI/UILapineScrollBar.cpp b/Source/UI/UILapineScrollBar.cpp index b2bb019ca..98efafb11 100644 --- a/Source/UI/UILapineScrollBar.cpp +++ b/Source/UI/UILapineScrollBar.cpp @@ -226,7 +226,7 @@ void UIIngredientInfoWnd::Paint() { } std::string name; - name = this->FitDisplayText(100, this->item.unknown_0044.c_str(), 0, 12, 0).c_str(); + name = this->FitDisplayText(100, this->item.displayName.c_str(), 0, 12, 0).c_str(); std::uint32_t color = 0; if (this->insufficient == 0) { @@ -278,7 +278,7 @@ void UILapineBoxWnd::Paint() { // FUNCTION: fn_04177 int UILapineBoxWnd::AddIngredient(std::uint32_t id, int quantity) { if (this->items.size() < 10) { - if (std::find_if(this->items.begin(), this->items.end(), [id](ITEM_INFO entry) { return id == entry.unknown_0000[1]; }) != this->items.end()) { + if (std::find_if(this->items.begin(), this->items.end(), [id](ITEM_INFO entry) { return id == entry.identity[1]; }) != this->items.end()) { return 0; } ITEM_INFO item = LookupClientItemByIdentity(g_session.m_inventoryItems, id); @@ -292,8 +292,8 @@ int UILapineBoxWnd::AddIngredient(std::uint32_t id, int quantity) { char* cursor = name; int highlightColor; this->BuildItemName(&item, &highlightColor, &breaks, &cursor, &remaining, &highlight, 1, 0); - if (item.identified == 1 && item.unknown_0098 != 0) { - sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, item.unknown_0098); + if (item.identified == 1 && item.optionCount != 0) { + sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, item.optionCount); } item.SetName(name); } @@ -312,16 +312,16 @@ int UILapineBoxWnd::AddIngredient(std::uint32_t id, int quantity) { // FUNCTION: fn_04178 unsigned char UILapineBox_IngredientListWnd::AddIngredient(std::uint32_t id) { ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, id); - if (owned.unknown_0000[1] == 0) { + if (owned.identity[1] == 0) { return 0; } const int itemId = std::atoi(owned.itemId.c_str()); - if (g_session.IsPetEgg(itemId) == 1 && owned.unknown_005D == 1) { + if (g_session.IsPetEgg(itemId) == 1 && owned.damaged == 1) { return 0; } - if (g_session.HasItem61B8(owned.unknown_0000[1]) == 1) { + if (g_session.HasItem61B8(owned.identity[1]) == 1) { return 0; } @@ -334,7 +334,7 @@ unsigned char UILapineBox_IngredientListWnd::AddIngredient(std::uint32_t id) { } for (UIIngredientInfoWnd* itemWnd : this->items) { - if (itemWnd->item.unknown_0000[1] == id) { + if (itemWnd->item.identity[1] == id) { itemWnd->item.quantity += it->quantity; itemWnd->insufficient = 0; itemWnd->Show(1); @@ -355,7 +355,7 @@ unsigned char UILapineBox_IngredientListWnd::AddIngredient(std::uint32_t id) { info->insufficient = 1; } - if (this->minRefine > owned.unknown_0060 || this->maxRefine < owned.unknown_0060) { + if (this->minRefine > owned.refiningLevel || this->maxRefine < owned.refiningLevel) { info->insufficient = 1; } diff --git a/Source/UI/UILapineScrollBar.h b/Source/UI/UILapineScrollBar.h index 17ef1e965..e97c1553a 100644 --- a/Source/UI/UILapineScrollBar.h +++ b/Source/UI/UILapineScrollBar.h @@ -108,7 +108,7 @@ public: /* 00B8 */ UIBitmapButton* makeButton; /* 00BC */ UIBitmapButton* moveButton; /* 00C0 */ UILapineBox_IngredientListWnd* ingredientList; - /* 00C4 */ int unknown_00C4; + /* 00C4 */ int ingredientId; /* 00C8 */ std::string title; /* 00E0 */ std::vector items; /* 00EC */ int maxItems; diff --git a/Source/UI/UILapineUpgradeBoxWnd.cpp b/Source/UI/UILapineUpgradeBoxWnd.cpp index 61a80e84f..4f01def8f 100644 --- a/Source/UI/UILapineUpgradeBoxWnd.cpp +++ b/Source/UI/UILapineUpgradeBoxWnd.cpp @@ -143,7 +143,7 @@ void UILapineUpgradeBox_IngredientInfoWnd::Paint() { DrawItemIcon(*this, ResourceMgr::Instance(), 4, 3, this->item, 0); - const std::string name = this->FitDisplayText(100, this->item.unknown_0044.c_str(), 0, 12, 0); + const std::string name = this->FitDisplayText(100, this->item.displayName.c_str(), 0, 12, 0); this->DrawShadowedText(36, 9, name.c_str(), 0, 0, 0xE0E0E0, 0, 12, 0); } @@ -160,7 +160,7 @@ void UILapineUpgradeBoxWnd::Paint() { this->DrawCenteredText(35, 47, LookupMessage(MSI_LAPINE_FAIL_NOT_ENOUGH_REFINING_LEVEL), 156, 0, 11, 0xCD7A51, 0); this->DrawCenteredText(35, 63, this->description.c_str(), 156, 0, 11, 0x844A42, 0); - if (this->item.unknown_0000[1] != 0) { + if (this->item.identity[1] != 0) { DrawItemIcon(*this, ResourceMgr::Instance(), 101, 165, this->item, 0); } @@ -175,7 +175,7 @@ void UILapineUpgradeBoxWnd::Paint() { // FUNCTION: fn_04194 void UILapineUpgradeBoxWnd::DragAndDrop(int x, int y, std::intptr_t value) { CMode* mode = g_modeMgr.GetGameMode(); - if (this->item.unknown_0000[1] > 0) { + if (this->item.identity[1] > 0) { mode->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return; } @@ -203,16 +203,16 @@ void UILapineUpgradeBox_IngredientInfoWnd::Move(int x, int y) { // OFFSET: 0x00603DB0 // FUNCTION: fn_04203 void UILapineUpgradeBoxWnd::OnLBtnDblClk(int x, int y) { - if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.unknown_0000[1] != 0) { - this->SendMsg(this, UM_DECITEM, this->item.unknown_0000[1], 0, 0, 0); + if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] != 0) { + this->SendMsg(this, UM_DECITEM, this->item.identity[1], 0, 0, 0); } } // OFFSET: 0x00603DF0 // FUNCTION: fn_04204 void UILapineUpgradeBox_IngredientInfoWnd::OnLBtnDblClk(int x, int y) { - if (this->item.unknown_0000[1] > 0) { - this->parent->SendMsg(this, UM_DECITEM, this->item.unknown_0000[1], 0, 0, 0); + if (this->item.identity[1] > 0) { + this->parent->SendMsg(this, UM_DECITEM, this->item.identity[1], 0, 0, 0); } } @@ -222,7 +222,7 @@ void UILapineUpgradeBoxWnd::OnLBtnDown(int x, int y) { if (y < 17) { UIFrameWnd::OnLBtnDown(x, y); } - if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.unknown_0000[1] != 0) { + if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] != 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 26, this->item, 1, -1); } } @@ -230,7 +230,7 @@ void UILapineUpgradeBoxWnd::OnLBtnDown(int x, int y) { // OFFSET: 0x00603E80 // FUNCTION: fn_04206 void UILapineUpgradeBox_IngredientInfoWnd::OnLBtnDown(int x, int y) { - if (this->item.unknown_0000[1] != 0) { + if (this->item.identity[1] != 0) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 27, this->item, this->quantity, -1); } } @@ -256,7 +256,7 @@ void UILapineUpgradeBox_IngredientInfoWnd::OnWheel(int argument) { // OFFSET: 0x006040E0 // FUNCTION: fn_04211 void UILapineUpgradeBoxWnd::OnRBtnDown(int x, int y) { - if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.unknown_0000[1] > 0) { + if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&this->item), 0, 0, 0); } @@ -265,7 +265,7 @@ void UILapineUpgradeBoxWnd::OnRBtnDown(int x, int y) { // OFFSET: 0x00604140 // FUNCTION: fn_04212 void UILapineUpgradeBox_IngredientInfoWnd::OnRBtnDown(int x, int y) { - if (this->item.unknown_0000[1] > 0) { + if (this->item.identity[1] > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); window->SendMsg(this, UM_ITEMEXPLANATION, reinterpret_cast(&this->item), 0, 0, 0); } @@ -347,8 +347,8 @@ int UILapineUpgradeBox_IngredientListWnd::SendMsg(UIWindow* sender, int message, } } for (auto it = this->items.begin(); it != this->items.end(); ++it) { - const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, (*it)->item.unknown_0000[1]); - if (owned.unknown_0000[1] == 0) { + const ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, (*it)->item.identity[1]); + if (owned.identity[1] == 0) { (*it)->Show(0); } } @@ -430,14 +430,14 @@ void UILapineUpgradeBoxWnd::OnProcess() { this->selectButton->Invalidate(); this->Invalidate(); } - } else if (this->selectButton->Disabled() == 1 && this->item.unknown_0000[1] == 0) { + } else if (this->selectButton->Disabled() == 1 && this->item.identity[1] == 0) { this->selectButton->SetDisabled(0); this->selectButton->Invalidate(); this->Invalidate(); } if (this->waiting == 0) { - if (this->item.unknown_0000[1] != 0) { + if (this->item.identity[1] != 0) { if (this->upgradeButton->Disabled() == 1) { this->upgradeButton->SetDisabled(0); this->upgradeButton->Invalidate(); @@ -473,11 +473,11 @@ void UILapineUpgradeBox_IngredientInfoWnd::OnMouseHover(int x, int y) { void UILapineUpgradeBoxWnd::OnMouseHover(int x, int y) { this->OnMouseMove(x, y); - if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.unknown_0000[1] > 0) { + if (static_cast(x - 101) <= 24 && static_cast(y - 165) <= 24 && this->item.identity[1] > 0) { int tipX = 101; int tipY = 145; this->ToScreen(tipX, tipY); - g_modeMgr.gameMode->ShowTooltip(this->item.unknown_0044.c_str(), tipX, tipY, -1, false, true); + g_modeMgr.gameMode->ShowTooltip(this->item.displayName.c_str(), tipX, tipY, -1, false, true); } } @@ -498,14 +498,14 @@ void UILapineUpgradeBoxWnd::AddMaterial(int id) { // FUNCTION: fn_04220 bool UILapineUpgradeBox_IngredientListWnd::AddIngredient(std::uint32_t identity) { ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, identity); - if (owned.unknown_0000[1] == 0) { + if (owned.identity[1] == 0) { return false; } const int itemId = std::atoi(owned.itemId.c_str()); - if (owned.unknown_0060 < this->minRefine || owned.unknown_0060 > this->maxRefine || owned.unknown_0098 < this->minOptionCount) { + if (owned.refiningLevel < this->minRefine || owned.refiningLevel > this->maxRefine || owned.optionCount < this->minOptionCount) { return false; } - if ((g_session.IsPetEgg(itemId) == 1 && owned.unknown_005D == 1) || g_session.HasItem61B8(owned.unknown_0000[1]) == 1) { + if ((g_session.IsPetEgg(itemId) == 1 && owned.damaged == 1) || g_session.HasItem61B8(owned.identity[1]) == 1) { return false; } const auto material = std::find_if(this->materials.begin(), this->materials.end(), [itemId](ITEM_INFO value) { @@ -515,7 +515,7 @@ bool UILapineUpgradeBox_IngredientListWnd::AddIngredient(std::uint32_t identity) return false; } for (UILapineUpgradeBox_IngredientInfoWnd* entry : this->items) { - if (entry->item.unknown_0000[1] == identity) { + if (entry->item.identity[1] == identity) { return true; } } @@ -545,8 +545,8 @@ __declspec(noinline) void UILapineUpgradeBox_IngredientInfoWnd::SetItem(std::uin int highlightColor; this->BuildItemName(&this->item, &highlightColor, &breaks, &cursor, &remaining, &highlight, 1, 0); - if (this->item.identified == 1 && this->item.unknown_0098 != 0) { - sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, this->item.unknown_0098); + if (this->item.identified == 1 && this->item.optionCount != 0) { + sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, this->item.optionCount); } this->item.SetName(name); @@ -558,7 +558,7 @@ __declspec(noinline) void UILapineUpgradeBox_IngredientInfoWnd::SetItem(std::uin // FUNCTION: fn_04222 bool UILapineUpgradeBox_IngredientListWnd::CanUseIngredient(std::uint32_t identity) { auto entryIt = std::find_if(this->items.begin(), this->items.end(), [identity](UILapineUpgradeBox_IngredientInfoWnd* entry) { - return entry->item.unknown_0000[1] == identity; + return entry->item.identity[1] == identity; }); if (entryIt == this->items.end()) { return false; @@ -574,21 +574,21 @@ bool UILapineUpgradeBox_IngredientListWnd::CanUseIngredient(std::uint32_t identi return false; } - if (this->minRefine > item.unknown_0060) { + if (this->minRefine > item.refiningLevel) { return false; } - if (this->maxRefine < item.unknown_0060) { + if (this->maxRefine < item.refiningLevel) { return false; } - if (this->minRefine != 0 && this->minRefine < item.unknown_0060) { + if (this->minRefine != 0 && this->minRefine < item.refiningLevel) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_ITEMSHOP_CURRENCY)), 0, 0, 0); } if (Equipment(item) && !item.IsApprenticeItem() && !item.HasSpecialCard()) { - for (std::size_t offset = 0; offset < sizeof(item.unknown_001C); offset += sizeof(std::uint32_t)) { + for (std::size_t offset = 0; offset < sizeof(item.cards); offset += sizeof(std::uint32_t)) { std::uint32_t card = 0; - std::memcpy(&card, item.unknown_001C + offset, sizeof(card)); + std::memcpy(&card, item.cards + offset, sizeof(card)); if (card != 0) { this->parent->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(LookupMessage(MSI_PURCHASEWND_TOTAL)), 0, 0, 0); break; @@ -596,7 +596,7 @@ bool UILapineUpgradeBox_IngredientListWnd::CanUseIngredient(std::uint32_t identi } } - if (this->minOptionCount > item.unknown_0098) { + if (this->minOptionCount > item.optionCount) { return false; } @@ -620,17 +620,17 @@ int UILapineUpgradeBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t case ID_LAPINE_ADD_INGREDIENT: { UILapineUpgradeBox_IngredientInfoWnd* selected = this->ingredientList->FindSelected(); if (selected) { - this->SendMsg(this, UM_ADDITEM, selected->item.unknown_0000[1], 0, 0, 0); + this->SendMsg(this, UM_ADDITEM, selected->item.identity[1], 0, 0, 0); return 0; } break; } case ID_LAPINE_START_UPGRADE: - if (this->item.unknown_0000[1] != 0) { + if (this->item.identity[1] != 0) { LapineUpgradeStartPacket packet; packet.id = 0xAB6; packet.ingredientId = this->ingredientId; - packet.itemId = static_cast(this->item.unknown_0000[1]); + packet.itemId = static_cast(this->item.identity[1]); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); this->waiting = 1; this->upgradeButton->SetDisabled(1); @@ -642,9 +642,9 @@ int UILapineUpgradeBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } break; case UM_ADDITEM: - if (this->item.unknown_0000[1] == 0 && this->ingredientList->CanUseIngredient(static_cast(a)) == 1) { + if (this->item.identity[1] == 0 && this->ingredientList->CanUseIngredient(static_cast(a)) == 1) { ITEM_INFO owned = LookupClientItemByIdentity(g_session.m_inventoryItems, static_cast(a)); - if (owned.unknown_0000[1] != 0) { + if (owned.identity[1] != 0) { std::vector breaks; char name[260]; std::memset(name, 0, sizeof(name)); @@ -654,8 +654,8 @@ int UILapineUpgradeBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t char* highlight = nullptr; this->BuildItemName(&owned, &highlightColor, &breaks, &cursor, &remaining, &highlight, 1, 0); - if (owned.identified == 1 && owned.unknown_0098 != 0) { - sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, owned.unknown_0098); + if (owned.identified == 1 && owned.optionCount != 0) { + sprintf_s(name, sizeof(name), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), name, owned.optionCount); } owned.SetName(name); @@ -666,7 +666,7 @@ int UILapineUpgradeBoxWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } break; case UM_DECITEM: - if (this->item.unknown_0000[1] != 0 && this->item.unknown_0000[1] == a) { + if (this->item.identity[1] != 0 && this->item.identity[1] == a) { this->item = ITEM_INFO(); this->SendMsg(this, UM_RECEIVE_MSG, reinterpret_cast(""), 0, 0, 0); this->Invalidate(); diff --git a/Source/UI/UIMacroBlackListCheckWnd.cpp b/Source/UI/UIMacroBlackListCheckWnd.cpp index bf8ed01fb..7026fb238 100644 --- a/Source/UI/UIMacroBlackListCheckWnd.cpp +++ b/Source/UI/UIMacroBlackListCheckWnd.cpp @@ -32,7 +32,7 @@ namespace { // FUNCTION: fn_09792 UIMacroBlackListCheckWnd::UIMacroBlackListCheckWnd() : UIFrameWnd(0) { - this->unknown_00E4 = 0; + this->resultState = 0; this->inputLength = 0; this->duration = 0; this->startTick = 0; @@ -111,8 +111,8 @@ void UIMacroBlackListCheckWnd::Paint() { this->DrawButtonBar(2, this->geometry.width + 1, 1); this->DrawAlignedText(7, 0x24, FormatOwnedString(LookupMessage(MSI_WEDDING_RING_ITEM_NAME_FORMAT)).c_str(), 0x20E, 6, 0, 0, 0, 0xC, 1, 0); - this->DrawAlignedText(7, 0x159, FormatOwnedString(LookupMessage(MSI_ACCOUNT_LIMITED_TOOL_RESULT_NEWFORMAT), this->unknown_00E4).c_str(), 0x20E, 6, 0x3939FF, 0, 0, 0xC, 1, 0); - this->DrawAlignedText(0x4F, 0xF6, FormatOwnedString(LookupMessage(MSI_ACCOUNT_LIMITED_SALE_ITEM_NEXT_NEWDATE), this->unknown_00E4).c_str(), 0xA2, 6, 0, 0, 0, 0xC, 0, 0); + this->DrawAlignedText(7, 0x159, FormatOwnedString(LookupMessage(MSI_ACCOUNT_LIMITED_TOOL_RESULT_NEWFORMAT), this->resultState).c_str(), 0x20E, 6, 0x3939FF, 0, 0, 0xC, 1, 0); + this->DrawAlignedText(0x4F, 0xF6, FormatOwnedString(LookupMessage(MSI_ACCOUNT_LIMITED_SALE_ITEM_NEXT_NEWDATE), this->resultState).c_str(), 0xA2, 6, 0, 0, 0, 0xC, 0, 0); std::string stars; for (int i = 0; i < this->inputLength; ++i) { @@ -305,7 +305,7 @@ int UIMacroBlackListCheckWnd::SendMsg( // FUNCTION: fn_09802 void UIMacroBlackListCheckWnd::SetCode(unsigned char state, const char* code) { strncpy_s(this->code, sizeof(this->code), code, _TRUNCATE); - this->unknown_00E4 = state; + this->resultState = state; std::string text(code); this->codeLength = static_cast(text.size()); for (int i = 0; i < this->codeLength; ++i) { @@ -320,6 +320,6 @@ void UIMacroBlackListCheckWnd::SetCode(unsigned char state, const char* code) { void UIMacroBlackListCheckWnd::Activate(unsigned char state, int duration) { this->startTick = timeGetTime(); this->duration = duration; - this->unknown_00E4 = state; + this->resultState = state; this->Invalidate(); } diff --git a/Source/UI/UIMacroBlackListCheckWnd.h b/Source/UI/UIMacroBlackListCheckWnd.h index 48a53476d..56682f410 100644 --- a/Source/UI/UIMacroBlackListCheckWnd.h +++ b/Source/UI/UIMacroBlackListCheckWnd.h @@ -24,7 +24,7 @@ public: /* 00B4 */ UIBitmapButton* digitButtons[10]; /* 00DC */ UIBitmapButton* resetButton; /* 00E0 */ UIBitmapButton* okButton; - /* 00E4 */ unsigned char unknown_00E4; + /* 00E4 */ unsigned char resultState; /* 00E5 */ char digits[10]; /* 00F0 */ int inputLength; /* 00F4 */ char input[9]; diff --git a/Source/UI/UIMacroDetectorWnd.cpp b/Source/UI/UIMacroDetectorWnd.cpp index 4c7bbb06b..cae8680e0 100644 --- a/Source/UI/UIMacroDetectorWnd.cpp +++ b/Source/UI/UIMacroDetectorWnd.cpp @@ -65,14 +65,14 @@ void UIMacroDetectorWnd::ClearImageData() { // FUNCTION: fn_09822 void UIMacroDetectorWnd::SetCountdown(unsigned char count, std::uint32_t duration) { DWORD now = timeGetTime(); - if (this->unknown_0110 > 0) { + if (this->lastCountdownTick > 0) { std::string text = FormatOwnedString(LookupMessage(MSI_MACRO_REGISTER_DATA), count); this->message = text; } - this->unknown_00D0 = count; + this->remainingAttempts = count; this->messageDuration = now; - this->unknown_0110 = now; + this->lastCountdownTick = now; if (this->totalDuration == 0) { this->totalDuration = duration; } diff --git a/Source/UI/UIMacroDetectorWnd.h b/Source/UI/UIMacroDetectorWnd.h index fcb7343cb..79d621ce9 100644 --- a/Source/UI/UIMacroDetectorWnd.h +++ b/Source/UI/UIMacroDetectorWnd.h @@ -34,14 +34,14 @@ public: /* 00C4 */ unsigned char* m_imageData; /* 00C8 */ int m_imageSize; /* 00CC */ int m_imageReceived; - /* 00D0 */ unsigned char unknown_00D0; + /* 00D0 */ unsigned char remainingAttempts; /* 00D1 */ unsigned char unknown_00D1[3]; /* 00D4 */ std::uint32_t totalDuration; /* 00D8 */ std::uint32_t startTick; /* 00DC */ std::uint32_t messageDuration; /* 00E0 */ std::string m_lastAnswer; /* 00F8 */ std::string message; - /* 0110 */ std::uint32_t unknown_0110; + /* 0110 */ std::uint32_t lastCountdownTick; /* 0114 */ std::uint32_t messageTick; }; diff --git a/Source/UI/UIMacroReport.cpp b/Source/UI/UIMacroReport.cpp index 88d901cfd..9714cb49f 100644 --- a/Source/UI/UIMacroReport.cpp +++ b/Source/UI/UIMacroReport.cpp @@ -81,8 +81,8 @@ static_assert(offsetof(ReportUserPacket, message) == 0x24); // OFFSET: 0x00A477F0 // FUNCTION: fn_16096 CUIMacroReport::CUIMacroReport() - : m_background(nullptr), m_titleBar(nullptr), m_messageEdit(nullptr), unknown_00E4(nullptr), unknown_00E8(nullptr), unknown_00EC(nullptr), - unknown_00F0(nullptr), m_firstTypeButton(nullptr), m_secondTypeButton(nullptr), unknown_00FC(nullptr), unknown_0100(0), m_reportType(0) { + : m_background(nullptr), m_titleBar(nullptr), m_messageEdit(nullptr), firstTypeText(nullptr), secondTypeText(nullptr), cancelButton(nullptr), + reportButton(nullptr), m_firstTypeButton(nullptr), m_secondTypeButton(nullptr), warningText(nullptr), targetId(0), m_reportType(0) { } // OFFSET: 0x00A47A30 @@ -95,10 +95,10 @@ void CUIMacroReport::OnButtonClick() { void CUIMacroReport::SendReport() { ReportUserPacket packet; packet.id = ID_CZ_REQ_REPORT_USER; - packet.targetId = this->unknown_0100; + packet.targetId = this->targetId; packet.accountId = g_session.m_aid; packet.type = static_cast(this->m_reportType); - strncpy_s(packet.targetName, sizeof(packet.targetName), this->unknown_0108.c_str(), _TRUNCATE); + strncpy_s(packet.targetName, sizeof(packet.targetName), this->targetName.c_str(), _TRUNCATE); { const std::string message = this->m_messageEdit->edit->Text(); strncpy_s(packet.message, sizeof(packet.message), message.c_str(), _TRUNCATE); @@ -119,8 +119,8 @@ void CUIMacroReport::OnInit() { this->Move((g_renderer->viewport.width - this->geometry.width) / 2, (g_renderer->viewport.height - this->geometry.height) / 2); if (g_modeMgr.GetGameMode()) { - this->unknown_0100 = static_cast(g_modeMgr.GetGameMode())->unknown_02E0; - this->unknown_0108 = static_cast(g_modeMgr.GetGameMode())->unknown_02EC; + this->targetId = static_cast(g_modeMgr.GetGameMode())->menuTargetAid; + this->targetName = static_cast(g_modeMgr.GetGameMode())->menuTargetName; } } @@ -137,7 +137,7 @@ void CUIMacroReport::OnReportTypeSelect(CUIRadioButton* button) { // OFFSET: 0x00A441F0 // FUNCTION: fn_16052 void CUIMacroReport::Initialize() { - this->unknown_00B4 = 0; + this->ownedSkinColors = 0; this->m_resolveSkin = false; this->Resize(0xE7, 0xBD); this->Move(0, 0); @@ -299,62 +299,62 @@ void CUIMacroReport::OnCreate(int width, int height) { } this->AddChild(this->m_messageEdit); - this->unknown_00E4 = new CUIStaticText(); - this->unknown_00E4->SetSize(165, 12); - this->unknown_00E4->Move(28, 25); + this->firstTypeText = new CUIStaticText(); + this->firstTypeText->SetSize(165, 12); + this->firstTypeText->Move(28, 25); { - CUIStaticText* text = this->unknown_00E4; + CUIStaticText* text = this->firstTypeText; const char firstTypeSource[] = { '\x07', '\x6F', '\x54', '\xCA', '\x9B', '\x78', '\x2E', '\x34', '\x73', '\x0C', '\x3A', '\x80', '\x1E', '\x9F', '\x2F', '\x44', '\x00', '\x74', '\xCD', '\x8A', '\x7E', '\x0F', '\x02', '\x83'}; text->SetText(DecryptName<0x83EFBFBB37EDBDBDULL>(firstTypeSource)); } - this->unknown_00E4->SetFitText(0); - this->unknown_00E4->SetAlign(0, 0); + this->firstTypeText->SetFitText(0); + this->firstTypeText->SetAlign(0, 0); { - CUIStaticText* text = this->unknown_00E4; + CUIStaticText* text = this->firstTypeText; const char firstTypeFontSource[] = { '\xE0', '\x80', '\x13', '\x50', '\x5C', '\x4B'}; text->SetFont(std::string(DecryptName<0xBF2B4B31397FF5A7ULL>(firstTypeFontSource))); } - this->unknown_00E4->SetFontHeight(12); - this->unknown_00E4->SetBold(0); - this->unknown_00E4->SetColor(0); - this->unknown_00E4->SetShadow(0, 0xFFFFFF); - this->unknown_00E4->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E4); + this->firstTypeText->SetFontHeight(12); + this->firstTypeText->SetBold(0); + this->firstTypeText->SetColor(0); + this->firstTypeText->SetShadow(0, 0xFFFFFF); + this->firstTypeText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->firstTypeText); - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(165, 12); - this->unknown_00E8->Move(28, 43); + this->secondTypeText = new CUIStaticText(); + this->secondTypeText->SetSize(165, 12); + this->secondTypeText->Move(28, 43); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->secondTypeText; const char secondTypeSource[] = { '\x2E', '\x07', '\x50', '\x0A', '\xF1', '\x2A', '\x3E', '\x0F', '\x2A', '\x32', '\x5C', '\x67', '\x14', '\x48', '\xC9', '\x91', '\x50', '\x4E', '\x0A', '\xDD'}; text->SetText(DecryptName<0x2FE993D1DDE1F197ULL>(secondTypeSource)); } - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(0, 0); + this->secondTypeText->SetFitText(0); + this->secondTypeText->SetAlign(0, 0); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->secondTypeText; const char secondTypeFontSource[] = { '\xC8', '\xEC', '\x87', '\x64', '\xD8', '\x7F'}; text->SetFont(std::string(DecryptName<0x39FF7FB50DEB998FULL>(secondTypeFontSource))); } - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(0); - this->unknown_00E8->SetColor(0); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->secondTypeText->SetFontHeight(12); + this->secondTypeText->SetBold(0); + this->secondTypeText->SetColor(0); + this->secondTypeText->SetShadow(0, 0xFFFFFF); + this->secondTypeText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->secondTypeText); - this->unknown_00EC = new CUIImageButton(); - this->unknown_00EC->SetSize(58, 20); - this->unknown_00EC->Move(117, 165); - this->unknown_00EC->SetOnClick([this]() { g_windowMgr.CloseWindow(WID_MACROREPORT); }); - this->unknown_00EC->disabled = 0; - this->unknown_00EC->Invalidate(); + this->cancelButton = new CUIImageButton(); + this->cancelButton->SetSize(58, 20); + this->cancelButton->Move(117, 165); + this->cancelButton->SetOnClick([this]() { g_windowMgr.CloseWindow(WID_MACROREPORT); }); + this->cancelButton->disabled = 0; + this->cancelButton->Invalidate(); { - CUIImageButton* button = this->unknown_00EC; + CUIImageButton* button = this->cancelButton; const char cancelDisabledSource[] = { '\xB5', '\x62', '\x2D', '\xA7', '\xAB', '\xAB', '\x20', '\xF8', '\xB3', '\x29', '\x2D', '\x91', '\xD6', '\xDF', '\xB9', '\x57', '\x01', '\xA3', '\xB2', '\x3E', '\x0A', '\x0B', '\x86', '\x50', '\x19', '\xFF', '\xB2', '\x39', '\x02', '\x16', '\x84', '\x57', '\x19', '\xA8', '\xC3', '\x3F', '\x06', '\x15', '\xE5'}; @@ -373,16 +373,16 @@ void CUIMacroReport::OnCreate(int width, int height) { const std::string cancelNormal(DecryptName<0x2F8B0F37118D157FULL>(cancelNormalSource)); button->SetImages(cancelNormal, cancelPressed, cancelHover, cancelDisabled); } - this->AddChild(this->unknown_00EC); + this->AddChild(this->cancelButton); - this->unknown_00F0 = new CUIImageButton(); - this->unknown_00F0->SetSize(58, 20); - this->unknown_00F0->Move(55, 165); - this->unknown_00F0->SetOnClick([this]() { this->SendReport(); }); - this->unknown_00F0->disabled = 0; - this->unknown_00F0->Invalidate(); + this->reportButton = new CUIImageButton(); + this->reportButton->SetSize(58, 20); + this->reportButton->Move(55, 165); + this->reportButton->SetOnClick([this]() { this->SendReport(); }); + this->reportButton->disabled = 0; + this->reportButton->Invalidate(); { - CUIImageButton* button = this->unknown_00F0; + CUIImageButton* button = this->reportButton; const char reportDisabledSource[] = { '\xA3', '\x5A', '\x21', '\x85', '\xFB', '\xEB', '\xD8', '\x06', '\xA5', '\x11', '\x21', '\xB3', '\x86', '\x9F', '\x41', '\xA9', '\x17', '\x9B', '\xBE', '\x0D', '\x5E', '\x55', '\x72', '\xB9', '\x17', '\xAA', '\x85', '\x16', '\x48', '\x44', '\x7F', '\xA7', '\x06', '\xDB', '\x83', '\x12', '\x4B', '\x25'}; @@ -401,7 +401,7 @@ void CUIMacroReport::OnCreate(int width, int height) { const std::string reportNormal(DecryptName<0xB7FD8F670FC7B96BULL>(reportNormalSource)); button->SetImages(reportNormal, reportPressed, reportHover, reportDisabled); } - this->AddChild(this->unknown_00F0); + this->AddChild(this->reportButton); this->m_firstTypeButton = new CUIRadioButton(); this->m_firstTypeButton->SetSize(12, 12); @@ -463,29 +463,29 @@ void CUIMacroReport::OnCreate(int width, int height) { this->m_secondTypeButton->Invalidate(); this->AddChild(this->m_secondTypeButton); - this->unknown_00FC = new CUIStaticText(); - this->unknown_00FC->SetSize(210, 13); - this->unknown_00FC->Move(9, 142); + this->warningText = new CUIStaticText(); + this->warningText->SetSize(210, 13); + this->warningText->Move(9, 142); { - CUIStaticText* text = this->unknown_00FC; + CUIStaticText* text = this->warningText; const char warningSource[] = { '\xD4', '\xB7', '\x7D', '\xB6', '\x2D', '\x51', '\xE8', '\xFA', '\x8E', '\x75', '\x74', '\xBC', '\x2D', '\x2E', '\x89', '\x85', '\x82', '\xED', '\x6F', '\x5F', '\xB4', '\x31', '\xEF', '\xFE', '\x45', '\xE9', '\x3F', '\x5F', '\xCD', '\x39', '\x92', '\x85', '\xD1', '\x9A', '\x7D', '\xA6', '\x23', '\xEF'}; text->SetText(DecryptName<0x452FEF0D7FC95565ULL>(warningSource)); } - this->unknown_00FC->SetFitText(0); - this->unknown_00FC->SetAlign(0, 0); + this->warningText->SetFitText(0); + this->warningText->SetAlign(0, 0); { - CUIStaticText* text = this->unknown_00FC; + CUIStaticText* text = this->warningText; const char warningFontSource[] = { '\x1A', '\x78', '\x25', '\xE0', '\xCC', '\x7D'}; const std::string warningFont(DecryptName<0x9FED7DA189490D5DULL>(warningFontSource)); text->SetFont(warningFont); } - this->unknown_00FC->SetFontHeight(12); - this->unknown_00FC->SetBold(0); - this->unknown_00FC->SetColor(0x2D35F7); - this->unknown_00FC->SetShadow(0, 0xFFFFFF); - this->unknown_00FC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00FC); + this->warningText->SetFontHeight(12); + this->warningText->SetBold(0); + this->warningText->SetColor(0x2D35F7); + this->warningText->SetShadow(0, 0xFFFFFF); + this->warningText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->warningText); } diff --git a/Source/UI/UIMacroReport.h b/Source/UI/UIMacroReport.h index 51d691c56..84d2f11ab 100644 --- a/Source/UI/UIMacroReport.h +++ b/Source/UI/UIMacroReport.h @@ -18,16 +18,16 @@ public: /* 00D8 */ CUIStaticImage* m_background; /* 00DC */ CUITitleBar* m_titleBar; /* 00E0 */ CUIEditBox* m_messageEdit; - /* 00E4 */ CUIStaticText* unknown_00E4; - /* 00E8 */ CUIStaticText* unknown_00E8; - /* 00EC */ CUIImageButton* unknown_00EC; - /* 00F0 */ CUIImageButton* unknown_00F0; + /* 00E4 */ CUIStaticText* firstTypeText; + /* 00E8 */ CUIStaticText* secondTypeText; + /* 00EC */ CUIImageButton* cancelButton; + /* 00F0 */ CUIImageButton* reportButton; /* 00F4 */ CUIRadioButton* m_firstTypeButton; /* 00F8 */ CUIRadioButton* m_secondTypeButton; - /* 00FC */ CUIStaticText* unknown_00FC; - /* 0100 */ int unknown_0100; + /* 00FC */ CUIStaticText* warningText; + /* 0100 */ int targetId; /* 0104 */ int m_reportType; - /* 0108 */ std::string unknown_0108; + /* 0108 */ std::string targetName; __declspec(noinline) CUIMacroReport(); diff --git a/Source/UI/UIMacroUserInfoWnd.cpp b/Source/UI/UIMacroUserInfoWnd.cpp index 949557c35..e494cc0d5 100644 --- a/Source/UI/UIMacroUserInfoWnd.cpp +++ b/Source/UI/UIMacroUserInfoWnd.cpp @@ -43,13 +43,13 @@ // OFFSET: 0x007EE980 // FUNCTION: fn_09831 MacroReporterEntry::MacroReporterEntry(std::string name, int id, short unknown_001C) - : name(name), id(id), unknown_001C(unknown_001C) {} + : name(name), id(id), reportValue(unknown_001C) {} // OFFSET: 0x007EEA00 // FUNCTION: fn_09832 UIMacroReporterWnd::UIMacroReporterWnd() - : UIFrameWnd(0), m_scrollBar(nullptr), m_scrollable(false), unknown_00C8(13), m_firstRow(0), m_visibleRows(10), unknown_00D4(nullptr), - m_reportButton(nullptr), m_mode(0), m_edit(nullptr), unknown_00F4(1), unknown_00F8(5), m_state(nullptr), unknown_010C(false) { + : UIFrameWnd(0), m_scrollBar(nullptr), m_scrollable(false), scrollBarWidth(13), m_firstRow(0), m_visibleRows(10), activeCheckBox(nullptr), + m_reportButton(nullptr), m_mode(0), m_edit(nullptr), reportCount(1), maxReportCount(5), m_state(nullptr), activeOnly(false) { this->m_tabs[0] = nullptr; this->m_tabs[1] = nullptr; this->m_tabs[2] = nullptr; @@ -242,7 +242,7 @@ void UIMacroUserInfoWnd::Paint() { // OFFSET: 0x007F1160 // FUNCTION: fn_09850 void UIMacroReporterWnd::OnLBtnDown(int x, int y) { - if (this->unknown_010C == 1 && y > 17) { + if (this->activeOnly == 1 && y > 17) { return; } @@ -431,7 +431,7 @@ void UIMacroReporterWnd::StoreInfo() { this->m_state->height = this->geometry.height; this->m_state->x = this->geometry.x; this->m_state->y = this->geometry.y; - this->m_state->unknown_0011 = this->unknown_010C; + this->m_state->activeOnly = this->activeOnly; this->m_state->entries.clear(); this->m_state->entries.resize(this->m_entries.size()); for (unsigned int index = 0; index < this->m_entries.size(); ++index) { @@ -466,12 +466,12 @@ void UIMacroReporterWnd::OnCreate(int, int) { this->m_scrollBar->Configure(186, 56, 1, 216); this->AddChild(this->m_scrollBar); - this->unknown_00D4 = new UICheckBox(); - static_cast(this->unknown_00D4)->SetSize(42, 20); - static_cast(this->unknown_00D4)->SetBitmaps("유저인터페이스\\btn_q_active_a.bmp", "유저인터페이스\\btn_q_active.bmp"); - static_cast(this->unknown_00D4)->Move(202, 27); - static_cast(this->unknown_00D4)->SetChecked(0); - this->AddChild(this->unknown_00D4); + this->activeCheckBox = new UICheckBox(); + static_cast(this->activeCheckBox)->SetSize(42, 20); + static_cast(this->activeCheckBox)->SetBitmaps("유저인터페이스\\btn_q_active_a.bmp", "유저인터페이스\\btn_q_active.bmp"); + static_cast(this->activeCheckBox)->Move(202, 27); + static_cast(this->activeCheckBox)->SetChecked(0); + this->AddChild(this->activeCheckBox); this->m_reportButton = new UIBitmapButton(); static_cast(this->m_reportButton)->SetBitmap("유저인터페이스\\btn_ok.bmp", 0, 0); @@ -542,7 +542,7 @@ void UIMacroReporterWnd::OnCreate(int, int) { static_cast(this->m_edit)->maximum = 1; static_cast(this->m_edit)->preserveInput = 1; static_cast(this->m_edit)->invalidatesParent = 1; - static_cast(this->m_edit)->SetText(IntToString(this->unknown_00F4, 0).c_str()); + static_cast(this->m_edit)->SetText(IntToString(this->reportCount, 0).c_str()); if (const char* tooltip = LookupMessage(MSI_TAIWANSS_PERSONALINFO_DEATHMSG)) { static_cast(this->m_edit)->tooltip = tooltip; } @@ -585,12 +585,12 @@ int UIMacroReporterWnd::SendMsg( } this->Resize(this->m_state->width, this->m_state->height); this->Move(this->m_state->x, this->m_state->y); - this->unknown_010C = this->m_state->unknown_0011; - static_cast(this->unknown_00D4)->SetChecked(this->unknown_010C); + this->activeOnly = this->m_state->activeOnly; + static_cast(this->activeCheckBox)->SetChecked(this->activeOnly); this->m_entries.clear(); for (unsigned int index = 0; index < this->m_state->entries.size(); ++index) { const MacroReporterEntry& entry = this->m_state->entries[index]; - this->m_entries.push_back(MacroReporterEntry(entry.name, entry.id, entry.unknown_001C)); + this->m_entries.push_back(MacroReporterEntry(entry.name, entry.id, entry.reportValue)); this->AddActorRow(entry.id, entry.name); } this->UpdateScrollBar(); @@ -609,7 +609,7 @@ int UIMacroReporterWnd::SendMsg( for (auto next = it + 1; next != this->m_entries.end(); ++next, ++it) { it->name.swap(next->name); it->id = next->id; - it->unknown_001C = next->unknown_001C; + it->reportValue = next->reportValue; } this->m_entries.pop_back(); break; @@ -632,10 +632,10 @@ int UIMacroReporterWnd::SendMsg( } case ID_CHECK: - if (this->unknown_00D4 != sender) { + if (this->activeCheckBox != sender) { break; } - this->unknown_010C = argument2 != 0; + this->activeOnly = argument2 != 0; switch (this->m_mode) { case 0: case 1: @@ -712,18 +712,18 @@ int UIMacroReporterWnd::SendMsg( break; case ID_RADIOBTN: { - if (this->unknown_010C == true) { + if (this->activeOnly == true) { switch (this->m_mode) { case 0: case 1: if (argument2 == 2 || argument2 == 3) { - static_cast(this->unknown_00D4)->SetChecked(0); + static_cast(this->activeCheckBox)->SetChecked(0); } break; case 2: case 3: if (argument2 == 0 || argument2 == 1) { - static_cast(this->unknown_00D4)->SetChecked(0); + static_cast(this->activeCheckBox)->SetChecked(0); } break; } @@ -808,15 +808,15 @@ int UIMacroReporterWnd::SendMsg( UIEditCtrl* edit = static_cast(this->m_edit); std::string text = edit->Text(); if (text.size() > 1) { - edit->SetText(IntToString(this->unknown_00F4, 0).c_str()); + edit->SetText(IntToString(this->reportCount, 0).c_str()); } else if (text.c_str()[0] >= '0' && text.c_str()[0] <= '9') { - this->unknown_00F4 = std::atoi(text.c_str()); - if (this->unknown_00F4 > this->unknown_00F8) { - this->unknown_00F4 = this->unknown_00F8; - edit->SetText(IntToString(this->unknown_00F8, 0).c_str()); + this->reportCount = std::atoi(text.c_str()); + if (this->reportCount > this->maxReportCount) { + this->reportCount = this->maxReportCount; + edit->SetText(IntToString(this->maxReportCount, 0).c_str()); } } else { - edit->SetText(IntToString(this->unknown_00F4, 0).c_str()); + edit->SetText(IntToString(this->reportCount, 0).c_str()); } } break; @@ -842,7 +842,7 @@ int UIMacroReporterWnd::SendMsg( if (!g_windowMgr.CloseWindow(WID_MACROUSERINFOWND)) { UIMacroUserInfoWnd* info = static_cast(g_windowMgr.EnsureWindow(WID_MACROUSERINFOWND)); info->Move(this->geometry.x + 15, this->geometry.y + row * 22 + 78); - const unsigned short job = entry->unknown_001C; + const unsigned short job = entry->reportValue; std::string name = entry->name; info->m_name = name; info->m_message = g_session.GetJobName(job, -1); diff --git a/Source/UI/UIMacroUserInfoWnd.h b/Source/UI/UIMacroUserInfoWnd.h index 552590487..551eaf7bd 100644 --- a/Source/UI/UIMacroUserInfoWnd.h +++ b/Source/UI/UIMacroUserInfoWnd.h @@ -30,7 +30,7 @@ struct MacroReporterEntry { /* 0000 */ std::string name; /* 0018 */ int id; - /* 001C */ short unknown_001C; + /* 001C */ short reportValue; }; struct MacroReporterState { @@ -39,7 +39,7 @@ struct MacroReporterState { /* 0008 */ int x; /* 000C */ int y; /* 0010 */ unsigned char unknown_0010; - /* 0011 */ bool unknown_0011; + /* 0011 */ bool activeOnly; /* 0014 */ std::vector entries; }; @@ -68,19 +68,19 @@ public: /* 00B4 */ std::vector> m_rows; /* 00C0 */ UIScrollBar* m_scrollBar; /* 00C4 */ bool m_scrollable; - /* 00C8 */ int unknown_00C8; + /* 00C8 */ int scrollBarWidth; /* 00CC */ int m_firstRow; /* 00D0 */ int m_visibleRows; - /* 00D4 */ UIWindow* unknown_00D4; + /* 00D4 */ UIWindow* activeCheckBox; /* 00D8 */ UIButton* m_reportButton; /* 00DC */ UIWindow* m_tabs[4]; /* 00EC */ int m_mode; /* 00F0 */ UIWindow* m_edit; - /* 00F4 */ int unknown_00F4; - /* 00F8 */ int unknown_00F8; + /* 00F4 */ int reportCount; + /* 00F8 */ int maxReportCount; /* 00FC */ MacroReporterState* m_state; /* 0100 */ std::vector m_entries; - /* 010C */ bool unknown_010C; + /* 010C */ bool activeOnly; /* 0110 */ std::vector m_removedRows; /* 011C */ UIWindow* m_fields[10]; /* 0144 */ std::string m_names[10]; diff --git a/Source/UI/UIPreviewEquipWnd.cpp b/Source/UI/UIPreviewEquipWnd.cpp index 7d6369da7..0271a2e0a 100644 --- a/Source/UI/UIPreviewEquipWnd.cpp +++ b/Source/UI/UIPreviewEquipWnd.cpp @@ -25,7 +25,7 @@ // OFFSET: 0x007F2F90 // FUNCTION: fn_09879 UIPreviewEquipWnd::UIPreviewEquipWnd() - : UIFrameWnd(1), saved(nullptr), m_render(nullptr), m_leftButton(nullptr), m_rightButton(nullptr), unknown_00C4(0) { + : UIFrameWnd(1), saved(nullptr), m_render(nullptr), m_leftButton(nullptr), m_rightButton(nullptr), m_actionButton(0) { } // OFFSET: 0x007F3090 @@ -38,39 +38,39 @@ UIPreviewEquipWnd::~UIPreviewEquipWnd() { // FUNCTION: fn_09881 void UIPreviewEquipWnd::DrawCharacter() { matrix view; - view.MakeXRotation(this->m_render->unknown_0074 / 180.0f * 3.141592f); - view.AppendYRotation(this->m_render->unknown_0078 / 180.0f * 3.141592f); + view.MakeXRotation(this->m_render->cameraPitch / 180.0f * 3.141592f); + view.AppendYRotation(this->m_render->cameraYaw / 180.0f * 3.141592f); vector3d offset; offset.x = 0.0f; offset.y = 0.0f; - offset.z = -this->m_render->unknown_0070; + offset.z = -this->m_render->cameraDistance; float eye[3]; eye[0] = offset.x * view.values[0] + offset.y * view.values[3] + offset.z * view.values[6] + view.values[9]; eye[1] = offset.x * view.values[1] + offset.y * view.values[4] + offset.z * view.values[7] + view.values[10]; eye[2] = offset.x * view.values[2] + offset.y * view.values[5] + offset.z * view.values[8] + view.values[11]; float up[3]; - up[0] = this->m_render->unknown_0088; - up[1] = this->m_render->unknown_008C; - up[2] = *reinterpret_cast(&this->m_render->unknown_0090); - view.LookAt(eye, reinterpret_cast(&this->m_render->unknown_0004), up); + up[0] = this->m_render->cameraUpX; + up[1] = this->m_render->cameraUpY; + up[2] = *reinterpret_cast(&this->m_render->cameraUpZ); + view.LookAt(eye, reinterpret_cast(&this->m_render->positionX), up); float screenX = 0.0f; float screenY = 0.0f; float depth = 0.0f; g_renderer->ProjectViewportCentered( - reinterpret_cast(&this->m_render->unknown_0004), view.values, &screenX, &screenY, &depth, - static_cast(this->geometry.width) + *reinterpret_cast(&this->m_render->unknown_0054), - static_cast(this->geometry.height) + this->m_render->unknown_0058 + reinterpret_cast(&this->m_render->positionX), view.values, &screenX, &screenY, &depth, + static_cast(this->geometry.width) + *reinterpret_cast(&this->m_render->viewportOffsetX), + static_cast(this->geometry.height) + this->m_render->viewportOffsetY ); FuncDrawWNDChar drawer( - this, static_cast(screenX), static_cast(screenY), static_cast(this->m_render->unknown_0018[0]), - static_cast(this->m_render->unknown_0010), this->m_render->unknown_0014, static_cast(this->m_render->unknown_0050), - static_cast(this->m_render->unknown_0018[1]), static_cast(this->m_render->unknown_0028), static_cast(this->m_render->unknown_002C), - static_cast(this->m_render->unknown_0030), this->m_render->unknown_00BC, this->m_render->unknown_004C, this->m_render->unknown_0048, this->m_render->unknown_0018[2], - this->m_render->unknown_0018[3], this->m_render->unknown_0040, this->m_render->unknown_0044, 0 + this, static_cast(screenX), static_cast(screenY), static_cast(this->m_render->appearance[0]), + static_cast(this->m_render->job), this->m_render->headJob, static_cast(this->m_render->bodyCostume), + static_cast(this->m_render->appearance[1]), static_cast(this->m_render->lowerHeadgear), static_cast(this->m_render->upperHeadgear), + static_cast(this->m_render->middleHeadgear), this->m_render->robe, this->m_render->riding, this->m_render->madogearType, this->m_render->appearance[2], + this->m_render->appearance[3], this->m_render->actionIndex, this->m_render->frameIndex, 0 ); drawer.Draw(1); } @@ -126,12 +126,12 @@ void UIPreviewEquipWnd::OnCreate(int width, int height) { this->m_rightButton->SetId(0x181); this->AddChild(this->m_rightButton); - this->unknown_00C4 = new UIBasicButton(); - this->unknown_00C4->Configure(80, LookupMessage(MSI_BLOCK_CALL_PERMIT)); - this->unknown_00C4->Move(static_cast((this->geometry.width - this->unknown_00C4->geometry.width) * 0.5), this->geometry.height - 30); - this->unknown_00C4->SetId(0x16B); - this->unknown_00C4->invalidateParent = 1; - this->AddChild(this->unknown_00C4); + this->m_actionButton = new UIBasicButton(); + this->m_actionButton->Configure(80, LookupMessage(MSI_BLOCK_CALL_PERMIT)); + this->m_actionButton->Move(static_cast((this->geometry.width - this->m_actionButton->geometry.width) * 0.5), this->geometry.height - 30); + this->m_actionButton->SetId(0x16B); + this->m_actionButton->invalidateParent = 1; + this->AddChild(this->m_actionButton); } // OFFSET: 0x007F3CD0 @@ -146,7 +146,7 @@ void UIPreviewEquipWnd::Paint() { // OFFSET: 0x007F3DC0 // FUNCTION: fn_09885 void UIPreviewEquipWnd::SyncFromPlayer() { - this->m_render->unknown_00B0 = 0; + this->m_render->drawShadow = 0; CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); CPlayer* player = mode->scene->player; @@ -154,21 +154,21 @@ void UIPreviewEquipWnd::SyncFromPlayer() { return; } - this->m_render->unknown_0010 = player->GetEffectiveJob(-1); - this->m_render->unknown_0014 = player->unknown_04D4; - this->m_render->unknown_0018[0] = player->unknown_0260; - this->m_render->unknown_0018[1] = player->unknown_0440; - this->m_render->unknown_0018[2] = static_cast(player->render.unknown_0048); - this->m_render->unknown_0018[3] = player->unknown_0444; - this->m_render->unknown_0028 = player->unknown_0450; - this->m_render->unknown_002C = player->unknown_0454; - this->m_render->unknown_0030 = player->unknown_0458; - this->m_render->SetRobe(player->unknown_049C); - this->m_render->unknown_0048 = player->GetMadogearType(); - this->m_render->unknown_004C = player->unknown_02CC; - this->m_render->unknown_0050 = player->GetBodyCostume(); - *reinterpret_cast(&this->m_render->unknown_0054) = -5.0f; - this->m_render->unknown_0058 = 136.0f; + this->m_render->job = player->GetEffectiveJob(-1); + this->m_render->headJob = player->appearanceJob; + this->m_render->appearance[0] = player->sex; + this->m_render->appearance[1] = player->head; + this->m_render->appearance[2] = static_cast(player->render.bodyPalette); + this->m_render->appearance[3] = player->headPalette; + this->m_render->lowerHeadgear = player->accessory; + this->m_render->upperHeadgear = player->accessory2; + this->m_render->middleHeadgear = player->accessory3; + this->m_render->SetRobe(player->robe); + this->m_render->madogearType = player->GetMadogearType(); + this->m_render->riding = player->isRiding; + this->m_render->bodyCostume = player->GetBodyCostume(); + *reinterpret_cast(&this->m_render->viewportOffsetX) = -5.0f; + this->m_render->viewportOffsetY = 136.0f; this->RefreshHeadgearLocations(); this->Invalidate(); } @@ -185,16 +185,16 @@ int UIPreviewEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s this->SyncFromPlayer(); break; case 0x180: - this->m_render->unknown_0040 = this->m_render->unknown_0040 + 1; - if (this->m_render->unknown_0040 > 7) { - this->m_render->unknown_0040 = 0; + this->m_render->actionIndex = this->m_render->actionIndex + 1; + if (this->m_render->actionIndex > 7) { + this->m_render->actionIndex = 0; } this->Invalidate(); break; case 0x181: - this->m_render->unknown_0040 = this->m_render->unknown_0040 - 1; - if (this->m_render->unknown_0040 < 0) { - this->m_render->unknown_0040 = 7; + this->m_render->actionIndex = this->m_render->actionIndex - 1; + if (this->m_render->actionIndex < 0) { + this->m_render->actionIndex = 7; } this->Invalidate(); break; @@ -202,91 +202,91 @@ int UIPreviewEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s } else if (message == UM_REFRESHITEM) { if (a != 0) { const ITEM_INFO* item = reinterpret_cast(a); - switch (item->unknown_0000[2]) { + switch (item->identity[2]) { case EQP_HEAD_TOP: case EQP_COSTUME_HEAD_TOP: - this->m_render->unknown_002C = item->unknown_0070; - this->m_render->unknown_0038 = 0x100; - if ((this->m_render->unknown_0034 & 0x100) != 0) { - this->m_render->unknown_0034 = 0; - this->m_render->unknown_0028 = 0; + this->m_render->upperHeadgear = item->sprite; + this->m_render->upperHeadgearLocation = 0x100; + if ((this->m_render->lowerHeadgearLocation & 0x100) != 0) { + this->m_render->lowerHeadgearLocation = 0; + this->m_render->lowerHeadgear = 0; } - if ((this->m_render->unknown_003C & 0x100) != 0) { - this->m_render->unknown_003C = 0; - this->m_render->unknown_0030 = 0; + if ((this->m_render->middleHeadgearLocation & 0x100) != 0) { + this->m_render->middleHeadgearLocation = 0; + this->m_render->middleHeadgear = 0; } break; case EQP_HEAD_MID: case EQP_COSTUME_HEAD_MID: - this->m_render->unknown_0030 = item->unknown_0070; - this->m_render->unknown_003C = 0x200; - if ((this->m_render->unknown_0034 & 0x200) != 0) { - this->m_render->unknown_0034 = 0; - this->m_render->unknown_0028 = 0; + this->m_render->middleHeadgear = item->sprite; + this->m_render->middleHeadgearLocation = 0x200; + if ((this->m_render->lowerHeadgearLocation & 0x200) != 0) { + this->m_render->lowerHeadgearLocation = 0; + this->m_render->lowerHeadgear = 0; } - if ((this->m_render->unknown_0038 & 0x200) != 0) { - this->m_render->unknown_0038 = 0; - this->m_render->unknown_002C = 0; + if ((this->m_render->upperHeadgearLocation & 0x200) != 0) { + this->m_render->upperHeadgearLocation = 0; + this->m_render->upperHeadgear = 0; } break; case 0x300: case 0xC00: - this->m_render->unknown_002C = item->unknown_0070; - this->m_render->unknown_0030 = 0; - this->m_render->unknown_0038 = 0x300; - this->m_render->unknown_003C = 0x300; - if (this->m_render->unknown_0034 != EQP_HEAD_LOW) { - this->m_render->unknown_0034 = 0; - this->m_render->unknown_0028 = 0; + this->m_render->upperHeadgear = item->sprite; + this->m_render->middleHeadgear = 0; + this->m_render->upperHeadgearLocation = 0x300; + this->m_render->middleHeadgearLocation = 0x300; + if (this->m_render->lowerHeadgearLocation != EQP_HEAD_LOW) { + this->m_render->lowerHeadgearLocation = 0; + this->m_render->lowerHeadgear = 0; } break; case 0x301: case 0x1C00: - this->m_render->unknown_0028 = item->unknown_0070; - this->m_render->unknown_002C = 0; - this->m_render->unknown_0030 = 0; - this->m_render->unknown_0034 = 0x301; - this->m_render->unknown_0038 = 0x301; - this->m_render->unknown_003C = 0x301; + this->m_render->lowerHeadgear = item->sprite; + this->m_render->upperHeadgear = 0; + this->m_render->middleHeadgear = 0; + this->m_render->lowerHeadgearLocation = 0x301; + this->m_render->upperHeadgearLocation = 0x301; + this->m_render->middleHeadgearLocation = 0x301; break; case 0x201: case 0x1800: - this->m_render->unknown_0030 = item->unknown_0070; - this->m_render->unknown_0028 = 0; - this->m_render->unknown_003C = 0x201; - this->m_render->unknown_0034 = 0x201; - if (this->m_render->unknown_0038 != EQP_HEAD_TOP) { - this->m_render->unknown_0038 = 0; - this->m_render->unknown_002C = 0; + this->m_render->middleHeadgear = item->sprite; + this->m_render->lowerHeadgear = 0; + this->m_render->middleHeadgearLocation = 0x201; + this->m_render->lowerHeadgearLocation = 0x201; + if (this->m_render->upperHeadgearLocation != EQP_HEAD_TOP) { + this->m_render->upperHeadgearLocation = 0; + this->m_render->upperHeadgear = 0; } break; case 0x101: case 0x1400: - this->m_render->unknown_002C = item->unknown_0070; - this->m_render->unknown_0028 = 0; - this->m_render->unknown_0038 = 0x101; - this->m_render->unknown_0034 = 0x101; - if (this->m_render->unknown_003C != EQP_HEAD_MID) { - this->m_render->unknown_003C = 0; - this->m_render->unknown_0030 = 0; + this->m_render->upperHeadgear = item->sprite; + this->m_render->lowerHeadgear = 0; + this->m_render->upperHeadgearLocation = 0x101; + this->m_render->lowerHeadgearLocation = 0x101; + if (this->m_render->middleHeadgearLocation != EQP_HEAD_MID) { + this->m_render->middleHeadgearLocation = 0; + this->m_render->middleHeadgear = 0; } break; case EQP_HEAD_LOW: case EQP_COSTUME_HEAD_LOW: - this->m_render->unknown_0028 = item->unknown_0070; - this->m_render->unknown_0034 = 1; - if ((this->m_render->unknown_0038 & 1) != 0) { - this->m_render->unknown_0038 = 0; - this->m_render->unknown_002C = 0; + this->m_render->lowerHeadgear = item->sprite; + this->m_render->lowerHeadgearLocation = 1; + if ((this->m_render->upperHeadgearLocation & 1) != 0) { + this->m_render->upperHeadgearLocation = 0; + this->m_render->upperHeadgear = 0; } - if ((this->m_render->unknown_003C & 1) != 0) { - this->m_render->unknown_003C = 0; - this->m_render->unknown_0030 = 0; + if ((this->m_render->middleHeadgearLocation & 1) != 0) { + this->m_render->middleHeadgearLocation = 0; + this->m_render->middleHeadgear = 0; } break; case EQP_GARMENT: case EQP_COSTUME_GARMENT: - this->m_render->SetRobe(item->unknown_0070); + this->m_render->SetRobe(item->sprite); break; } } @@ -304,98 +304,98 @@ int UIPreviewEquipWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s // OFFSET: 0x007F43E0 // FUNCTION: fn_09887 void UIPreviewEquipWnd::RefreshHeadgearLocations() { - if (this->m_render->unknown_0028) { + if (this->m_render->lowerHeadgear) { ITEM_INFO equipped = g_session.GetItem17F0(0); - if (this->m_render->unknown_0028 == equipped.unknown_0070) { - this->m_render->unknown_0034 = 1; - if (equipped.unknown_0000[2] == 0x301) { - this->m_render->unknown_0034 = 0x301; - this->m_render->unknown_0038 = 0x301; - this->m_render->unknown_003C = 0x301; + if (this->m_render->lowerHeadgear == equipped.sprite) { + this->m_render->lowerHeadgearLocation = 1; + if (equipped.identity[2] == 0x301) { + this->m_render->lowerHeadgearLocation = 0x301; + this->m_render->upperHeadgearLocation = 0x301; + this->m_render->middleHeadgearLocation = 0x301; } } ITEM_INFO costume = g_session.GetItem2B50(0); - if (this->m_render->unknown_0028 == costume.unknown_0070) { - this->m_render->unknown_0034 = 1; - if (costume.unknown_0000[2] == 0x1C00) { - this->m_render->unknown_0034 = 0x301; - this->m_render->unknown_0038 = 0x301; - this->m_render->unknown_003C = 0x301; + if (this->m_render->lowerHeadgear == costume.sprite) { + this->m_render->lowerHeadgearLocation = 1; + if (costume.identity[2] == 0x1C00) { + this->m_render->lowerHeadgearLocation = 0x301; + this->m_render->upperHeadgearLocation = 0x301; + this->m_render->middleHeadgearLocation = 0x301; } } } - if (this->m_render->unknown_002C) { + if (this->m_render->upperHeadgear) { ITEM_INFO equipped = g_session.GetItem17F0(8); - if (this->m_render->unknown_002C == equipped.unknown_0070) { - if (equipped.unknown_0000[2] == 0x100) { - this->m_render->unknown_0038 = 0x100; + if (this->m_render->upperHeadgear == equipped.sprite) { + if (equipped.identity[2] == 0x100) { + this->m_render->upperHeadgearLocation = 0x100; } - if (equipped.unknown_0000[2] == 0x101) { - this->m_render->unknown_0038 = 0x101; - this->m_render->unknown_0034 = 0x101; + if (equipped.identity[2] == 0x101) { + this->m_render->upperHeadgearLocation = 0x101; + this->m_render->lowerHeadgearLocation = 0x101; } - if (equipped.unknown_0000[2] == 0x300) { - this->m_render->unknown_0038 = 0x300; - this->m_render->unknown_003C = 0x300; + if (equipped.identity[2] == 0x300) { + this->m_render->upperHeadgearLocation = 0x300; + this->m_render->middleHeadgearLocation = 0x300; } - if (equipped.unknown_0000[2] == 0x301) { - this->m_render->unknown_0034 = 0x301; - this->m_render->unknown_0038 = 0x301; - this->m_render->unknown_003C = 0x301; + if (equipped.identity[2] == 0x301) { + this->m_render->lowerHeadgearLocation = 0x301; + this->m_render->upperHeadgearLocation = 0x301; + this->m_render->middleHeadgearLocation = 0x301; } } ITEM_INFO costume = g_session.GetItem2B50(8); - if (this->m_render->unknown_002C == costume.unknown_0070) { - if (costume.unknown_0000[2] == 0x400) { - this->m_render->unknown_0038 = 0x100; + if (this->m_render->upperHeadgear == costume.sprite) { + if (costume.identity[2] == 0x400) { + this->m_render->upperHeadgearLocation = 0x100; } - if (costume.unknown_0000[2] == 0x1400) { - this->m_render->unknown_0038 = 0x101; - this->m_render->unknown_0034 = 0x101; + if (costume.identity[2] == 0x1400) { + this->m_render->upperHeadgearLocation = 0x101; + this->m_render->lowerHeadgearLocation = 0x101; } - if (costume.unknown_0000[2] == 0xC00) { - this->m_render->unknown_0038 = 0x300; - this->m_render->unknown_003C = 0x300; + if (costume.identity[2] == 0xC00) { + this->m_render->upperHeadgearLocation = 0x300; + this->m_render->middleHeadgearLocation = 0x300; } - if (costume.unknown_0000[2] == 0x1C00) { - this->m_render->unknown_0034 = 0x301; - this->m_render->unknown_0038 = 0x301; - this->m_render->unknown_003C = 0x301; + if (costume.identity[2] == 0x1C00) { + this->m_render->lowerHeadgearLocation = 0x301; + this->m_render->upperHeadgearLocation = 0x301; + this->m_render->middleHeadgearLocation = 0x301; } } } - if (this->m_render->unknown_0030) { + if (this->m_render->middleHeadgear) { ITEM_INFO equipped = g_session.GetItem17F0(9); - if (this->m_render->unknown_0030 == equipped.unknown_0070) { - if (equipped.unknown_0000[2] == 0x200) { - this->m_render->unknown_003C = 0x200; + if (this->m_render->middleHeadgear == equipped.sprite) { + if (equipped.identity[2] == 0x200) { + this->m_render->middleHeadgearLocation = 0x200; } - if (equipped.unknown_0000[2] == 0x201) { - this->m_render->unknown_003C = 0x201; - this->m_render->unknown_0034 = 0x201; + if (equipped.identity[2] == 0x201) { + this->m_render->middleHeadgearLocation = 0x201; + this->m_render->lowerHeadgearLocation = 0x201; } } ITEM_INFO costume = g_session.GetItem2B50(9); - if (this->m_render->unknown_0030 == costume.unknown_0070) { - if (costume.unknown_0000[2] == 0x800) { - this->m_render->unknown_003C = 0x200; + if (this->m_render->middleHeadgear == costume.sprite) { + if (costume.identity[2] == 0x800) { + this->m_render->middleHeadgearLocation = 0x200; } - if (costume.unknown_0000[2] == 0x1800) { - this->m_render->unknown_003C = 0x201; - this->m_render->unknown_0034 = 0x201; + if (costume.identity[2] == 0x1800) { + this->m_render->middleHeadgearLocation = 0x201; + this->m_render->lowerHeadgearLocation = 0x201; } } } diff --git a/Source/UI/UIPreviewEquipWnd.h b/Source/UI/UIPreviewEquipWnd.h index 32c584077..7157dd633 100644 --- a/Source/UI/UIPreviewEquipWnd.h +++ b/Source/UI/UIPreviewEquipWnd.h @@ -25,7 +25,7 @@ public: /* 00B8 */ CCharacterRender* m_render; /* 00BC */ UIBitmapButton* m_leftButton; /* 00C0 */ UIBitmapButton* m_rightButton; - /* 00C4 */ UIBasicButton* unknown_00C4; + /* 00C4 */ UIBasicButton* m_actionButton; }; #endif diff --git a/Source/UI/UIRefiningWnd.cpp b/Source/UI/UIRefiningWnd.cpp index 82222dc50..4ced9cf97 100644 --- a/Source/UI/UIRefiningWnd.cpp +++ b/Source/UI/UIRefiningWnd.cpp @@ -59,8 +59,8 @@ struct RefiningClosePacket { // FUNCTION: fn_09890 UIRefiningWnd::UIRefiningWnd() : UIFrameWnd(0), refiningButton(nullptr), returnButton(nullptr), - unknown_00C0(nullptr), state(0), result(7), frameInterval(100), stateTick(0), frame(0), selectedMaterial(-1), materials(), catalystEnabled(0), - catalystItemId(0), catalystCount(0), item(0), unknown_01F0(0), nextMaterials(), nextCatalystCount(0), nextItem(0) { + cancelButton(nullptr), state(0), result(7), frameInterval(100), stateTick(0), frame(0), selectedMaterial(-1), materials(), catalystEnabled(0), + catalystItemId(0), catalystCount(0), item(0), requestPending(0), nextMaterials(), nextCatalystCount(0), nextItem(0) { this->catalystItemId = 6635; } @@ -90,7 +90,7 @@ void UIRefiningWnd::OnCreate(int width, int height) { basic->Move(204, 322); basic->SetId(185); this->AddChild(basic); - this->unknown_00C0 = basic; + this->cancelButton = basic; this->refiningButton = new UIRefining_BtnRefining(); this->refiningButton->SetBitmap("유저인터페이스\\refining_renewal\\bt_refining_normal.bmp", 0, 0); @@ -148,7 +148,7 @@ void UIRefiningWnd::DragAndDrop(int x, int y, std::intptr_t value) { // OFFSET: 0x007F52D0 // FUNCTION: fn_09903 __declspec(noinline) void UIRefiningWnd::Reset() { - this->unknown_01F0 = 0; + this->requestPending = 0; this->item = ITEM_INFO(0); this->selectedMaterial = -1; this->materials.clear(); @@ -165,9 +165,9 @@ __declspec(noinline) void UIRefiningWnd::Reset() { this->result = 7; this->stateTick = timeGetTime(); this->frame = 0; - if (this->unknown_00C0) { - this->unknown_00C0->SetDisabled(0); - this->unknown_00C0->Invalidate(); + if (this->cancelButton) { + this->cancelButton->SetDisabled(0); + this->cancelButton->Invalidate(); } this->result = 7; @@ -183,9 +183,9 @@ __declspec(noinline) void UIRefiningWnd::Reset() { // OFFSET: 0x007F54B0 // FUNCTION: fn_09904 std::uint32_t UIRefiningWnd::SelectedMaterialValue() { - if (this->item.unknown_0000[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && + if (this->item.identity[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && this->materials.size() > static_cast(this->selectedMaterial)) { - return this->materials[this->selectedMaterial].unknown_0005; + return this->materials[this->selectedMaterial].cost; } return 0; } @@ -301,11 +301,11 @@ __declspec(safebuffers) void UIRefiningWnd::ApplyResult() { this->materials = this->nextMaterials; unsigned char level = 0; - if (this->item.unknown_0000[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && + if (this->item.identity[1] > 0 && this->materials.size() > 0 && this->selectedMaterial >= 0 && this->materials.size() > static_cast(this->selectedMaterial)) { - level = this->materials[this->selectedMaterial].unknown_0004; + level = this->materials[this->selectedMaterial].successRate; } - this->againButton->unknown_0125 = level; + this->againButton->remainingCount = level; this->againButton->Invalidate(); if (!same) { @@ -334,7 +334,7 @@ __declspec(safebuffers) void UIRefiningWnd::ApplyResult() { } } - this->unknown_01F0 = 0; + this->requestPending = 0; this->Invalidate(); } @@ -346,7 +346,7 @@ void UIRefining_BtnAgain::Paint() { int width = this->TextWidth(LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, 1, 0); std::uint32_t color = this->success == 1 ? 0xE1C1F : (this->m_disabled == 1 ? 0x6F4333 : 0x3E1B12); this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 14, LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, color, 1, 0 + (this->geometry.state == 2) + 14, LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, color, 1, 0 ); return; } @@ -354,18 +354,18 @@ void UIRefining_BtnAgain::Paint() { int width = this->TextWidth(LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, 1, 0); std::uint32_t color = this->success == 1 ? 0xE1C1F : (this->m_disabled == 1 ? 0x6F4333 : 0x3E1B12); this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 9, LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, color, 1, 0 + (this->geometry.state == 2) + 9, LookupMessage(MSI_REFINING_AGAIN_FAILED_LACK_OF_MONEY), 0, 0, 12, color, 1, 0 ); - std::string count = FormatOwnedString(LookupMessage(MSI_CASHSHOP_SALE_LIST), this->unknown_0125); + std::string count = FormatOwnedString(LookupMessage(MSI_CASHSHOP_SALE_LIST), this->remainingCount); width = this->TextWidth(count.c_str(), 0, 0, 11, 0, 0); this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 22, count.c_str(), 0, 0, 11, 0, 0, 0 + (this->geometry.state == 2) + 22, count.c_str(), 0, 0, 11, 0, 0, 0 ); width = this->TextWidth(IntToString(this->cost, 0).c_str(), 0, 0, 11, 1, 0); this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 38, IntToString(this->cost, 0).c_str(), 0, 0, 11, 0xFFFFFF, 1, 0 + (this->geometry.state == 2) + 38, IntToString(this->cost, 0).c_str(), 0, 0, 11, 0xFFFFFF, 1, 0 ); } @@ -376,12 +376,12 @@ void UIRefining_BtnRefining::Paint() { int width = this->TextWidth(LookupMessage(MSI_NOTENOUGH_BLACKSMITH_BLESSING), 0, 0, 13, 1, 0); std::uint32_t color = this->m_disabled == 1 ? 0x94644A : 0x3E1B12; this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 11, LookupMessage(MSI_NOTENOUGH_BLACKSMITH_BLESSING), 0, 0, 12, color, 1, 0 + (this->geometry.state == 2) + 11, LookupMessage(MSI_NOTENOUGH_BLACKSMITH_BLESSING), 0, 0, 12, color, 1, 0 ); if (this->m_disabled == 0) { width = this->TextWidth(IntToString(this->cost, 0).c_str(), 0, 0, 12, 1, 0); - this->DrawTextAt(83 - width, (this->geometry.unknown_0030 == 2) + 28, IntToString(this->cost, 0).c_str(), 0, 0, 12, 0xFFFFFF, 1, 0 + this->DrawTextAt(83 - width, (this->geometry.state == 2) + 28, IntToString(this->cost, 0).c_str(), 0, 0, 12, 0xFFFFFF, 1, 0 ); } } @@ -393,7 +393,7 @@ void UIRefining_BtnReturn::Paint() { int width = this->TextWidth(LookupMessage(MSI_MANUFACTURED_MARRIAGERING_ITEM), 0, 0, 12, 1, 0); std::uint32_t color = this->highlighted == 1 ? 0xE1C1F : 0x3E1B12; this->DrawTextAt(static_cast(static_cast(this->geometry.width - width) * 0.5f), - (this->geometry.unknown_0030 == 2) + 14, LookupMessage(MSI_MANUFACTURED_MARRIAGERING_ITEM), 0, 0, 12, color, 1, 0 + (this->geometry.state == 2) + 14, LookupMessage(MSI_MANUFACTURED_MARRIAGERING_ITEM), 0, 0, 12, color, 1, 0 ); } @@ -420,7 +420,7 @@ void UIRefining_Notice::Paint() { // OFFSET: 0x007F72A0 // FUNCTION: fn_09913 void UIRefiningWnd::OnLBtnDblClk(int x, int y) { - if (this->item.unknown_0000[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { + if (this->item.identity[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { this->Reset(); } } @@ -433,7 +433,7 @@ void UIRefiningWnd::OnLBtnDown(int x, int y) { return; } - if (this->state == 1 && this->item.unknown_0000[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { + if (this->state == 1 && this->item.identity[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { static_cast(g_modeMgr.GetGameMode())->drag.BeginItem(g_windowMgr, 28, this->item, 1, -1); } } @@ -465,7 +465,7 @@ void UIRefiningWnd::OnLBtnUp(int x, int y) { this->refiningButton->cost = this->SelectedMaterialValue(); this->refiningButton->Invalidate(); - if (this->materials[slot].unknown_0004 <= 99 && this->catalystEnabled == 0) { + if (this->materials[slot].successRate <= 99 && this->catalystEnabled == 0) { int message; switch (this->materials[slot].itemId) { case Carnium: @@ -596,7 +596,7 @@ void UIRefiningWnd::OnProcess() { this->notice->OnProcess(); } - if (this->state == 1 && this->refiningButton->Disabled() == 1 && this->item.unknown_0000[1] > 0 && this->selectedMaterial >= 0 && + if (this->state == 1 && this->refiningButton->Disabled() == 1 && this->item.identity[1] > 0 && this->selectedMaterial >= 0 && static_cast(this->selectedMaterial) < this->materials.size()) { this->refiningButton->SetDisabled(0); this->refiningButton->Invalidate(); @@ -711,7 +711,7 @@ void UIRefiningWnd::OnRBtnUp(int x, int y) { if (slot >= 0) { if (static_cast(slot) < this->materials.size()) { ITEM_INFO info = LookupClientItem(g_session.m_inventoryItems, this->materials[slot].itemId, 0); - if (info.unknown_0000[1] > 0) { + if (info.identity[1] > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&info), 0, 0, 0); @@ -725,7 +725,7 @@ void UIRefiningWnd::OnRBtnUp(int x, int y) { return; } ITEM_INFO info = LookupClientItem(g_session.m_inventoryItems, this->catalystItemId, 0); - if (info.unknown_0000[1] > 0) { + if (info.identity[1] > 0) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&info), 0, 0, 0); @@ -736,7 +736,7 @@ void UIRefiningWnd::OnRBtnUp(int x, int y) { } } - if (this->item.unknown_0000[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { + if (this->item.identity[1] > 0 && static_cast(x - 109) <= 46 && static_cast(y - 201) <= 46) { UIWindow* window = g_windowMgr.EnsureWindow(WID_ITEMCOLLECTIONWND); if (window) { window->SendMsg(nullptr, UM_ITEMEXPLANATION, reinterpret_cast(&this->item), 0, 0, 0); @@ -788,13 +788,13 @@ int UIRefiningWnd::SendMsg( ShellExecuteA(hWnd, "open", LookupMessage(MSI_SELLINGSLOT_ERROR_MAXSLOT), nullptr, nullptr, SW_SHOWNORMAL); break; case ID_OK: - if (this->unknown_01F0 != 1) { - const std::uint32_t index = this->item.unknown_0000[1]; + if (this->requestPending != 1) { + const std::uint32_t index = this->item.identity[1]; if (index != 0) { if (g_session.m_zeny < static_cast(this->SelectedMaterialValue())) { this->notice->SetNotice(LookupMessage(MSI_REFINING_SUCCESS), 3000, 1); } else { - this->unknown_01F0 = 1; + this->requestPending = 1; RefiningRequestPacket packet; packet.id = 0xAA3; packet.index = static_cast(index); @@ -832,12 +832,12 @@ int UIRefiningWnd::SendMsg( case UM_REFRESHITEM: if (this->state == 0 || this->state == 1) { const ITEM_INFO info = LookupClientItemByIdentity(g_session.m_inventoryItems, argument1); - if (g_session.HasItem61B8(info.unknown_0000[1]) == 1) { + if (g_session.HasItem61B8(info.identity[1]) == 1) { g_modeMgr.GetGameMode()->SendMsg(MM_CANCEL_DRAG, 0, 0, 0, 0); return -1; } - if (info.unknown_0000[1] > 0) { + if (info.identity[1] > 0) { if (info.identified == 1) { RefiningSelectPacket packet; packet.id = 0xAA1; @@ -866,7 +866,7 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in } ITEM_INFO found = LookupClientItemByIdentity(g_session.m_inventoryItems, id); - if (found.unknown_0000[1] == 0) { + if (found.identity[1] == 0) { return; } @@ -879,8 +879,8 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in std::size_t remaining = sizeof(text); char* cursor = text; this->BuildItemName(&this->item, &highlightColor, &breaks, &cursor, &remaining, &highlight, 1, 0); - if (this->item.identified == 1 && this->item.unknown_0098 != 0) { - sprintf_s(text, sizeof(text), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), text, this->item.unknown_0098); + if (this->item.identified == 1 && this->item.optionCount != 0) { + sprintf_s(text, sizeof(text), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), text, this->item.optionCount); } this->item.SetName(text); @@ -893,9 +893,9 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in this->result = 7; this->stateTick = timeGetTime(); this->frame = 0; - if (this->unknown_00C0) { - this->unknown_00C0->SetDisabled(0); - this->unknown_00C0->Invalidate(); + if (this->cancelButton) { + this->cancelButton->SetDisabled(0); + this->cancelButton->Invalidate(); } this->result = 7; @@ -905,7 +905,7 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in this->returnButton->Enable(0); this->againButton->Enable(0); this->Invalidate(); - this->unknown_01F0 = 0; + this->requestPending = 0; break; } case 2: @@ -913,12 +913,12 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in case 4: case 5: case 6: { - if (id == -1 || this->item.unknown_0000[1] != static_cast(id)) { + if (id == -1 || this->item.identity[1] != static_cast(id)) { return; } ITEM_INFO found = LookupClientItemByIdentity(g_session.m_inventoryItems, id); - if (found.unknown_0000[1] == 0) { + if (found.identity[1] == 0) { return; } @@ -931,8 +931,8 @@ void UIRefiningWnd::ApplyItem(int id, int count, RefiningMaterial* materials, in std::size_t remaining = sizeof(text); char* name = text; this->BuildItemName(&this->nextItem, &highlightColor, &breaks, &name, &remaining, &cursor, 1, 0); - if (this->nextItem.identified == 1 && this->nextItem.unknown_0098 != 0) { - sprintf_s(text, sizeof(text), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), text, this->nextItem.unknown_0098); + if (this->nextItem.identified == 1 && this->nextItem.optionCount != 0) { + sprintf_s(text, sizeof(text), LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), text, this->nextItem.optionCount); } this->nextItem.SetName(text); @@ -976,9 +976,9 @@ void UIRefiningWnd::SetState(int state, int result) { this->result = result; this->stateTick = timeGetTime(); this->frame = 0; - if (this->unknown_00C0) { - this->unknown_00C0->SetDisabled(0); - this->unknown_00C0->Invalidate(); + if (this->cancelButton) { + this->cancelButton->SetDisabled(0); + this->cancelButton->Invalidate(); } switch (state) { @@ -998,9 +998,9 @@ void UIRefiningWnd::SetState(int state, int result) { this->refiningButton->Invalidate(); this->returnButton->Enable(0); this->againButton->Enable(0); - if (this->unknown_00C0) { - this->unknown_00C0->SetDisabled(1); - this->unknown_00C0->Invalidate(); + if (this->cancelButton) { + this->cancelButton->SetDisabled(1); + this->cancelButton->Invalidate(); } break; case 3: @@ -1116,23 +1116,23 @@ __declspec(safebuffers) void UIRefiningWnd::Paint() { } } - if (this->item.unknown_0000[1] > 0) { + if (this->item.identity[1] > 0) { DrawItemIcon(*this, ResourceMgr::Instance(), 120, 212, this->item, 0); - if (this->item.unknown_0088 > 0) { + if (this->item.grade > 0) { this->DrawBitmap(120, 224, - static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", this->item.unknown_0088).c_str()))), + static_cast(ResourceMgr::Instance().Load(Resolve(FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", this->item.grade).c_str()))), true); } } switch (this->state) { case 1: - this->DrawCenteredText(0, 246, this->item.unknown_0044.c_str(), 264, 0, 12, 0x462117, 1); + this->DrawCenteredText(0, 246, this->item.displayName.c_str(), 264, 0, 12, 0x462117, 1); break; case 3: case 5: case 6: - this->DrawCenteredText(0, 249, this->item.unknown_0044.c_str(), 264, 0, 12, 0x462117, 1); + this->DrawCenteredText(0, 249, this->item.displayName.c_str(), 264, 0, 12, 0x462117, 1); break; case 4: this->DrawCenteredText(0, 249, LookupMessage(MSI_OTP_MUST_8_CHAR), 264, 0, 12, 0x462117, 1); @@ -1148,17 +1148,17 @@ __declspec(safebuffers) void UIRefiningWnd::Paint() { } unsigned char rate = 0; - if (this->item.unknown_0000[1] > 0 && !this->materials.empty() && this->selectedMaterial >= 0 && + if (this->item.identity[1] > 0 && !this->materials.empty() && this->selectedMaterial >= 0 && static_cast(this->selectedMaterial) < this->materials.size()) { - rate = this->materials[this->selectedMaterial].unknown_0004; + rate = this->materials[this->selectedMaterial].successRate; } const std::string label = FormatOwnedString("%s %d%%", LookupMessage(MSI_CHANGE_HOMUN_NAME), rate); const int labelWidth = this->TextWidth(label.c_str(), 0, 0, 12, 1, 0); rate = 0; - if (this->item.unknown_0000[1] > 0 && !this->materials.empty() && this->selectedMaterial >= 0 && + if (this->item.identity[1] > 0 && !this->materials.empty() && this->selectedMaterial >= 0 && static_cast(this->selectedMaterial) < this->materials.size()) { - rate = this->materials[this->selectedMaterial].unknown_0004; + rate = this->materials[this->selectedMaterial].successRate; } const std::string percent = FormatOwnedString("%d%%", rate); const int percentWidth = this->TextWidth(percent.c_str(), 0, 0, 12, 1, 0); diff --git a/Source/UI/UIRefiningWnd.h b/Source/UI/UIRefiningWnd.h index 9e1e9f53a..a56875bfd 100644 --- a/Source/UI/UIRefiningWnd.h +++ b/Source/UI/UIRefiningWnd.h @@ -13,8 +13,8 @@ #pragma pack(push, 1) struct RefiningMaterial { /* 0000 */ std::uint32_t itemId; - /* 0004 */ unsigned char unknown_0004; - /* 0005 */ std::uint32_t unknown_0005; + /* 0004 */ unsigned char successRate; + /* 0005 */ std::uint32_t cost; }; #pragma pack(pop) @@ -31,7 +31,7 @@ public: /* 0120 */ int cost; /* 0124 */ unsigned char success; - /* 0125 */ unsigned char unknown_0125; + /* 0125 */ unsigned char remainingCount; }; class UIRefining_BtnRefining : public UIBitmapButton { @@ -92,7 +92,7 @@ public: /* 00B4 */ UIRefining_BtnRefining* refiningButton; /* 00B8 */ UIRefining_BtnReturn* returnButton; /* 00BC */ UIRefining_BtnAgain* againButton; - /* 00C0 */ UIButton* unknown_00C0; + /* 00C0 */ UIButton* cancelButton; /* 00C4 */ UIRefining_Notice* notice; /* 00C8 */ int state; /* 00CC */ int result; @@ -105,7 +105,7 @@ public: /* 00F0 */ int catalystItemId; /* 00F4 */ int catalystCount; /* 00F8 */ ITEM_INFO item; - /* 01F0 */ unsigned char unknown_01F0; + /* 01F0 */ unsigned char requestPending; /* 01F4 */ std::vector nextMaterials; /* 0200 */ int nextCatalystCount; /* 0208 */ ITEM_INFO nextItem; diff --git a/Source/UI/UIReputeWnd.cpp b/Source/UI/UIReputeWnd.cpp index b30bc5de3..97318f60c 100644 --- a/Source/UI/UIReputeWnd.cpp +++ b/Source/UI/UIReputeWnd.cpp @@ -165,7 +165,7 @@ void UIReputeWnd::Paint() { const std::int64_t point = info->point; if (point < 0) { const std::int64_t value = -point; - for (std::uint64_t k = 0; k < info->unknown_0020 / 1000; ++k) { + for (std::uint64_t k = 0; k < info->maxPointNegative / 1000; ++k) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\Reputation\\light_empty.bmp"))); this->DrawBitmap(left + 12 + static_cast(k) * 14, top + 72, bitmap, true); } @@ -179,7 +179,7 @@ void UIReputeWnd::Paint() { this->FillRegion(left + 12, top + 100, static_cast(static_cast(remain) / 1000.0f * 299.0f), 6, 0xFF); this->DrawRightAlignedText(left + 311, top + 114, FormatOwnedString(LookupMessage(MSI_GRADE_ENCHANT_ADDITIONAL_SOURCE_RESET), remain).c_str(), 0, 0, 12, 0, 1); } else { - for (std::uint64_t k = 0; k < info->unknown_0018 / 1000; ++k) { + for (std::uint64_t k = 0; k < info->maxPointPositive / 1000; ++k) { bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\Reputation\\light_empty.bmp"))); this->DrawBitmap(left + 12 + static_cast(k) * 14, top + 72, bitmap, true); } diff --git a/Source/UI/UIScrollWnd.cpp b/Source/UI/UIScrollWnd.cpp index 52ac91dc4..d9ef596ba 100644 --- a/Source/UI/UIScrollWnd.cpp +++ b/Source/UI/UIScrollWnd.cpp @@ -17,7 +17,7 @@ // FUNCTION: fn_13770 UIScrollWnd::UIScrollWnd(int width, int height, unsigned char cached) : UIWindow(cached), viewWidth(0), viewHeight(0), contentWidth(0), contentHeight(0), horizontalBar(nullptr), scrollBar(nullptr), - scrollBarWidth(13), scrollBarHeight(13), unknown_009C(0), scrollPosition(0), unknown_00A4(0), wheelScroll(0) { + scrollBarWidth(13), scrollBarHeight(13), horizontalScrollPosition(0), scrollPosition(0), horizontalScrollable(0), wheelScroll(0) { this->UIWindow::Resize(width, height); this->OnCreate(width, height); } @@ -80,7 +80,7 @@ bool UIScrollWnd::Update(int redraw) { } for (auto it = this->childOrigins.begin(); it != this->childOrigins.end(); ++it) { - it->first->Move(it->second.first - this->unknown_009C, it->second.second - this->scrollPosition); + it->first->Move(it->second.first - this->horizontalScrollPosition, it->second.second - this->scrollPosition); } if (this->m_dirty == 1) { @@ -138,7 +138,7 @@ bool UIScrollWnd::UpdateCached(int redraw) { } else { static_cast(child->geometry.surface)->UploadTexture(child->m_texture); primitives.push_back(this->BuildPrimitive( - child->geometry.x + this->unknown_009C, child->geometry.y + this->scrollPosition, 0, 0, child->geometry.width, child->geometry.height, + child->geometry.x + this->horizontalScrollPosition, child->geometry.y + this->scrollPosition, 0, 0, child->geometry.width, child->geometry.height, child->m_texture, child->Color() )); } @@ -150,7 +150,7 @@ bool UIScrollWnd::UpdateCached(int redraw) { } for (auto it = this->childOrigins.begin(); it != this->childOrigins.end(); ++it) { - it->first->Move(it->second.first - this->unknown_009C, it->second.second - this->scrollPosition); + it->first->Move(it->second.first - this->horizontalScrollPosition, it->second.second - this->scrollPosition); } return changed; } @@ -221,7 +221,7 @@ RenderPrimitive* UIScrollWnd::DrawPrimitive() { } return this->BuildPrimitive( - this->geometry.x, this->geometry.y, this->unknown_009C, this->scrollPosition, this->geometry.width, this->geometry.height, this->m_texture, this->Color() + this->geometry.x, this->geometry.y, this->horizontalScrollPosition, this->scrollPosition, this->geometry.width, this->geometry.height, this->m_texture, this->Color() ); } @@ -313,7 +313,7 @@ void UIScrollWnd::UpdateScrollRange() { } } - this->unknown_00A4 = 0; + this->horizontalScrollable = 0; this->wheelScroll = 0; this->viewWidth = this->geometry.width; this->viewHeight = this->geometry.height; @@ -321,7 +321,7 @@ void UIScrollWnd::UpdateScrollRange() { int visibleHeight; if (right > this->geometry.width) { visibleHeight = this->geometry.height - this->scrollBarHeight; - this->unknown_00A4 = 1; + this->horizontalScrollable = 1; this->viewHeight = visibleHeight; } else { visibleHeight = this->geometry.height; @@ -336,8 +336,8 @@ void UIScrollWnd::UpdateScrollRange() { visibleWidth = this->geometry.width; } - if (this->unknown_00A4 == 0 && right > visibleWidth) { - this->unknown_00A4 = 1; + if (this->horizontalScrollable == 0 && right > visibleWidth) { + this->horizontalScrollable = 1; visibleHeight = this->geometry.height - this->scrollBarHeight; this->viewHeight = visibleHeight; } @@ -357,17 +357,17 @@ void UIScrollWnd::UpdateScrollRange() { } this->contentHeight = bottom; - if (this->unknown_00A4 == 1) { + if (this->horizontalScrollable == 1) { this->horizontalBar->Resize(visibleWidth, this->scrollBarHeight); this->horizontalBar->SetRange(this->contentWidth - this->viewWidth, this->viewWidth, this->contentWidth); const int maximum = this->contentWidth - this->viewWidth; - int position = this->unknown_009C; + int position = this->horizontalScrollPosition; if (position > maximum) { - this->unknown_009C = maximum; + this->horizontalScrollPosition = maximum; position = maximum; } if (position < 0) { - this->unknown_009C = 0; + this->horizontalScrollPosition = 0; position = 0; } this->horizontalBar->SetPosition(position); @@ -391,20 +391,20 @@ void UIScrollWnd::UpdateScrollRange() { this->scrollBar->Invalidate(); } - if (this->unknown_00A4 == 0) { - this->unknown_009C = 0; + if (this->horizontalScrollable == 0) { + this->horizontalScrollPosition = 0; } if (this->wheelScroll == 0) { this->scrollPosition = 0; } - this->horizontalBar->Show(this->unknown_00A4); + this->horizontalBar->Show(this->horizontalScrollable); this->scrollBar->Show(this->wheelScroll); } // OFFSET: 0x009AD790 // FUNCTION: fn_13786 void UIScrollWnd::Clear() { - this->unknown_009C = 0; + this->horizontalScrollPosition = 0; this->scrollPosition = 0; this->childOrigins.clear(); this->DeleteChildren(); @@ -463,23 +463,23 @@ int UIScrollWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, case UM_SCROLLHORZ: case UM_SCROLLHORZPAGEUP: case UM_SCROLLHORZPAGEDOWN: { - const int previous = this->unknown_009C; + const int previous = this->horizontalScrollPosition; if (message == UM_SCROLLHORZPAGEUP) { delta = -1; } else if (message == UM_SCROLLHORZPAGEDOWN) { delta = 1; } - this->unknown_009C = previous + delta; - if (this->unknown_009C < 0) { - this->unknown_009C = 0; + this->horizontalScrollPosition = previous + delta; + if (this->horizontalScrollPosition < 0) { + this->horizontalScrollPosition = 0; } - if (this->unknown_009C > this->contentWidth - this->viewWidth) { - this->unknown_009C = this->contentWidth - this->viewWidth; + if (this->horizontalScrollPosition > this->contentWidth - this->viewWidth) { + this->horizontalScrollPosition = this->contentWidth - this->viewWidth; } - this->horizontalBar->SetPosition(this->unknown_009C); + this->horizontalBar->SetPosition(this->horizontalScrollPosition); this->horizontalBar->Invalidate(); this->Invalidate(); - return this->unknown_009C - previous; + return this->horizontalScrollPosition - previous; } } return UIWindow::SendMsg(sender, message, argument1, argument2, argument3, argument4); diff --git a/Source/UI/UIScrollWnd.h b/Source/UI/UIScrollWnd.h index c40eba861..4fe9aad8f 100644 --- a/Source/UI/UIScrollWnd.h +++ b/Source/UI/UIScrollWnd.h @@ -38,9 +38,9 @@ public: /* 0090 */ UIScrollBar* scrollBar; /* 0094 */ int scrollBarWidth; /* 0098 */ int scrollBarHeight; - /* 009C */ int unknown_009C; + /* 009C */ int horizontalScrollPosition; /* 00A0 */ int scrollPosition; - /* 00A4 */ unsigned char unknown_00A4; + /* 00A4 */ unsigned char horizontalScrollable; /* 00A5 */ unsigned char wheelScroll; /* 00A8 */ std::map> childOrigins; }; diff --git a/Source/UI/UISlotBitmap.cpp b/Source/UI/UISlotBitmap.cpp index 206dfa964..fa216db7f 100644 --- a/Source/UI/UISlotBitmap.cpp +++ b/Source/UI/UISlotBitmap.cpp @@ -5,7 +5,7 @@ // OFFSET: 0x0085ADA0 // FUNCTION: fn_10789 void UISlotBitmap::OnCreate(int, int) { - if (this->unknown_00B8 == 1) { + if (this->showAddButton == 1) { this->addButton = new UIBitmapButton(); this->addButton->SetBitmap("유저인터페이스\\select_character\\btn_add_out.bmp", 0, 0); this->addButton->SetBitmap("유저인터페이스\\select_character\\btn_add_over.bmp", 1, 0); @@ -56,7 +56,7 @@ int UISlotBitmap::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 } return 0; case UM_SETSTATE: - this->geometry.unknown_0030 = argument1; + this->geometry.state = argument1; return 0; default: return UIStaticBitmap::SendMsg(sender, message, argument1, argument2, argument3, argument4); @@ -67,7 +67,7 @@ int UISlotBitmap::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 // FUNCTION: fn_10672 UISlotBitmap::UISlotBitmap(int slot) : UIStaticBitmap() { this->slot = slot; - this->unknown_00B8 = 0; + this->showAddButton = 0; this->addButton = nullptr; } @@ -75,6 +75,6 @@ UISlotBitmap::UISlotBitmap(int slot) : UIStaticBitmap() { // FUNCTION: fn_10673 UISlotBitmap::UISlotBitmap(int slot, unsigned char flag) : UIStaticBitmap() { this->slot = slot; - this->unknown_00B8 = flag; + this->showAddButton = flag; this->addButton = nullptr; } diff --git a/Source/UI/UISlotBitmap.h b/Source/UI/UISlotBitmap.h index dcd8e0ad9..e810b7b94 100644 --- a/Source/UI/UISlotBitmap.h +++ b/Source/UI/UISlotBitmap.h @@ -15,7 +15,7 @@ public: void OnRBtnDown(int x, int y) override; int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; - /* 00B8 */ unsigned char unknown_00B8; + /* 00B8 */ unsigned char showAddButton; /* 00BC */ UIBitmapButton* addButton; /* 00C0 */ int slot; }; diff --git a/Source/UI/UIStaticBitmap.cpp b/Source/UI/UIStaticBitmap.cpp index 5db3cdaf4..685bc0511 100644 --- a/Source/UI/UIStaticBitmap.cpp +++ b/Source/UI/UIStaticBitmap.cpp @@ -41,7 +41,7 @@ void UIStaticBitmap::Paint() { return; } - switch (this->geometry.unknown_0030) { + switch (this->geometry.state) { case 0: { CBitmapRes* resource = static_cast(ResourceMgr::Instance().Load(Resolve(this->bitmap.c_str()))); this->DrawBitmap(0, 0, resource, false); diff --git a/Source/UI/Window/FrameFocus.cpp b/Source/UI/Window/FrameFocus.cpp index 0599829f6..5c6174d32 100644 --- a/Source/UI/Window/FrameFocus.cpp +++ b/Source/UI/Window/FrameFocus.cpp @@ -165,7 +165,7 @@ int UIWindowMgr::Window4F250Ready() { if (*reinterpret_cast(reinterpret_cast(window) + 0xB4) == nullptr) { return false; } - if (window->geometry.unknown_0030 != 0) { + if (window->geometry.state != 0) { return false; } return true; @@ -174,9 +174,9 @@ int UIWindowMgr::Window4F250Ready() { // OFFSET: 0x00A97410 // FUNCTION: fn_17203 bool UIWindowMgr::HasPendingDialog() { - return this->unknown_0284 || this->unknown_02CC || this->unknown_02D0 || this->unknown_02D4 || this->unknown_02D8 || this->unknown_02DC || - this->unknown_02E0 || this->unknown_02E4 || this->unknown_02E8 || this->unknown_02EC || this->unknown_03B4 || this->unknown_01F0 || - this->unknown_01F4; + return this->exchangeAcceptWnd || this->joinPartyAcceptWnd || this->coupleAcceptWnd || this->starPlaceAcceptWnd || this->mixAcceptWnd || this->yourItemWnd || + this->babyAcceptWnd || this->babyAcceptWnd2 || this->joinGuildAcceptWnd || this->allyGuildAcceptWnd || this->joinFriendAcceptWnd || this->sayDialogWnd || + this->sayDialogOverlayWnd; } // OFFSET: 0x00A97200 @@ -231,7 +231,7 @@ bool UIWindowMgr::HasTitleAtActorCell(std::uint32_t aid) { // OFFSET: 0x00A97490 // FUNCTION: fn_17204 void UIWindowMgr::CancelActiveDialog() { - UIWindow* window = this->window_03DC ? this->window_03DC : this->unknown_03B0; + UIWindow* window = this->window_03DC ? this->window_03DC : this->bookWnd; if (window) { window->SendMsg(nullptr, UM_LEFTPUSH, 0, 0, 0, 0); return; diff --git a/Source/UI/Window/FuncDrawWNDChar.cpp b/Source/UI/Window/FuncDrawWNDChar.cpp index 50aefd207..97291e318 100644 --- a/Source/UI/Window/FuncDrawWNDChar.cpp +++ b/Source/UI/Window/FuncDrawWNDChar.cpp @@ -26,8 +26,8 @@ FuncDrawWNDChar::FuncDrawWNDChar( ) : m_window(window), m_x(x), m_y(y), m_sex(sex), m_job(job), m_hairColor(hairColor), m_body(body), m_head(head), m_bottomAccessory(bottomAccessory), m_topAccessory(topAccessory), m_midAccessory(midAccessory), m_robe(robe), m_flags(flags), m_shield(shield), m_bodyStyle(bodyStyle), - m_headPalette(headPalette), m_action(action), m_motion(motion), m_time(time), m_helmRobe(false), m_drawOnTop(false), m_resources(), unknown_0050(), - unknown_0068(), m_layers(), unknown_0088(0), unknown_008C(0), unknown_0090(0), unknown_0094(0) { + m_headPalette(headPalette), m_action(action), m_motion(motion), m_time(time), m_helmRobe(false), m_drawOnTop(false), m_resources(), bodyPaletteName(), + headPaletteName(), m_layers(), hideHeadLayer(0), offsetX(0), offsetY(0), customRendering(0) { g_session.m_hotkeyScript->CallTable(std::string("TB_Layer_Priority", 17), std::string("IsHelmRobe", 10), "d>b", this->m_robe, &this->m_helmRobe); this->m_drawOnTop = this->DrawOnTop(); this->m_layers[5] = this->m_bottomAccessory; @@ -90,7 +90,7 @@ void FuncDrawWNDChar::Draw(bool option) { switch (layer) { case 2: { FuncDrawOffset body = this->BodyAnchorOffset(frame, option); - if (this->unknown_0094 == 1) { + if (this->customRendering == 1) { continue; } @@ -102,7 +102,7 @@ void FuncDrawWNDChar::Draw(bool option) { case 4: case 5: case 6: { - if (!this->unknown_0088 && this->m_resources.find(2) != this->m_resources.end() && this->m_resources[2].second) { + if (!this->hideHeadLayer && this->m_resources.find(2) != this->m_resources.end() && this->m_resources[2].second) { CActRes* bodyAct = this->m_resources.find(2) != this->m_resources.end() ? this->m_resources[2].second : nullptr; this->BodyAnchorOffset(&bodyAct->Frame(this->m_action, this->m_motion), option); } @@ -132,10 +132,10 @@ void FuncDrawWNDChar::Draw(bool option) { const std::uint32_t* palette = sprite->palette; if (layer == 1) { if (this->m_bodyStyle > 0) { - palette = static_cast(ResourceMgr::Instance().Load(this->unknown_0050))->palette; + palette = static_cast(ResourceMgr::Instance().Load(this->bodyPaletteName))->palette; } } else if (layer == 2 && this->m_headPalette > 0) { - palette = static_cast(ResourceMgr::Instance().Load(this->unknown_0068))->palette; + palette = static_cast(ResourceMgr::Instance().Load(this->headPaletteName))->palette; } const SpriteFrameCell& cell = frame->Cell(this->IsSpecialLayer(layer)); @@ -156,7 +156,7 @@ void FuncDrawWNDChar::Draw(bool option) { UIWindow* window = this->m_window; window->AddSpriteCellOverlay( this->m_x + offsetX, this->m_y + offsetY, reinterpret_cast(act), reinterpret_cast(sprite), image, &cell, scale, - static_cast(cell.unknown_001C), window->Color(), palette, 1.0f + static_cast(cell.rotation), window->Color(), palette, 1.0f ); } else { if (cell.image == -1) { @@ -172,7 +172,7 @@ void FuncDrawWNDChar::Draw(bool option) { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } int x = this->m_x + cell.x + offset.x; @@ -182,7 +182,7 @@ void FuncDrawWNDChar::Draw(bool option) { if (clip <= top) { this->m_window->geometry.surface->DrawSurface( x, top, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f - static_cast(clip)), image->width, - image->height + clip, cell.mirrored, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + image->height + clip, cell.mirrored, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -298,7 +298,7 @@ FuncDrawOffset FuncDrawWNDChar::BodyAnchorOffset(const ActionFrame* frame, bool if (frame->anchorCount > 0 && base.anchorCount > 0) { const ActionAnchor* frameAnchor = frame->anchors.data(); const ActionAnchor* baseAnchor = base.anchors.data(); - if (frameAnchor->unknown_0008 == baseAnchor->unknown_0008) { + if (frameAnchor->attachmentId == baseAnchor->attachmentId) { if (this->m_shield != 0) { if (keepScale == true) { offset.x += baseAnchor->x - frameAnchor->x; @@ -313,12 +313,12 @@ FuncDrawOffset FuncDrawWNDChar::BodyAnchorOffset(const ActionFrame* frame, bool offset.y = baseAnchor->y - frameAnchor->y; } - this->unknown_0090 = offset.y; - this->unknown_008C = offset.x; + this->offsetY = offset.y; + this->offsetX = offset.x; } } - this->unknown_0088 = 1; + this->hideHeadLayer = 1; return offset; } @@ -342,18 +342,18 @@ FuncDrawOffset FuncDrawWNDChar::LayerAnchorOffset(int layer, const ActionFrame** if (current->anchorCount > 0 && base.anchorCount > 0) { const ActionAnchor* baseAnchor = base.anchors.data(); const ActionAnchor* frameAnchor = current->anchors.data(); - if (frameAnchor->unknown_0008 == baseAnchor->unknown_0008) { + if (frameAnchor->attachmentId == baseAnchor->attachmentId) { offset.x = baseAnchor->x - frameAnchor->x; offset.y = baseAnchor->y - frameAnchor->y; } } - offset.x += this->unknown_008C; + offset.x += this->offsetX; int ridingOffset; if (IsIgnoredRidingState(this->m_layers[layer], this->m_job, this->m_action - this->m_action % 8, this->m_flags) == true) { ridingOffset = SpriteRidingOffset(&base, this->m_action, this->m_motion, this->m_job, this->m_sex, this->m_body); } else { - ridingOffset = this->unknown_0090; + ridingOffset = this->offsetY; } offset.y += ridingOffset; @@ -380,7 +380,7 @@ __declspec(safebuffers) void FuncDrawWNDChar::LoadResources(const std::list int job = this->m_flags == 1 ? g_session.GetRidingJob(this->m_job) : this->m_job; sprName = static_cast(g_session.GetBodySprName(job, this->m_sex, this->m_body, this->m_shield)); actName = static_cast(GetBodyActionResourceName(job, this->m_sex, this->m_body, this->m_shield)); - this->unknown_0050 = static_cast(g_session.GetBodyPalName(job, this->m_sex, this->m_bodyStyle, this->m_body, this->m_shield, 0)); + this->bodyPaletteName = static_cast(g_session.GetBodyPalName(job, this->m_sex, this->m_bodyStyle, this->m_body, this->m_shield, 0)); break; } case 2: { @@ -388,7 +388,7 @@ __declspec(safebuffers) void FuncDrawWNDChar::LoadResources(const std::list sprName = static_cast(g_session.GetHeadSprName(this->m_job, this->m_sex, &head)); actName = static_cast(g_session.GetHeadActName(this->m_job, this->m_sex, &head)); this->m_head = static_cast(head); - this->unknown_0068 = static_cast(g_session.GetHeadPalName(this->m_head, this->m_job, this->m_sex, this->m_headPalette)); + this->headPaletteName = static_cast(g_session.GetHeadPalName(this->m_head, this->m_job, this->m_sex, this->m_headPalette)); break; } case 3: @@ -418,7 +418,7 @@ __declspec(safebuffers) void FuncDrawWNDChar::LoadResources(const std::list for (int layer = 3; layer <= 5; ++layer) { if (g_session.IsSpecialMonsterJob(this->m_layers[layer]) == true) { - this->unknown_0094 = 1; + this->customRendering = 1; return; } } diff --git a/Source/UI/Window/FuncDrawWNDChar.h b/Source/UI/Window/FuncDrawWNDChar.h index 0333c2f38..08222143f 100644 --- a/Source/UI/Window/FuncDrawWNDChar.h +++ b/Source/UI/Window/FuncDrawWNDChar.h @@ -58,13 +58,13 @@ public: /* 0044 */ bool m_helmRobe; /* 0045 */ bool m_drawOnTop; /* 0048 */ std::map> m_resources; - /* 0050 */ std::string unknown_0050; - /* 0068 */ std::string unknown_0068; + /* 0050 */ std::string bodyPaletteName; + /* 0068 */ std::string headPaletteName; /* 0080 */ std::map m_layers; - /* 0088 */ unsigned char unknown_0088; - /* 008C */ int unknown_008C; - /* 0090 */ int unknown_0090; - /* 0094 */ unsigned char unknown_0094; + /* 0088 */ unsigned char hideHeadLayer; + /* 008C */ int offsetX; + /* 0090 */ int offsetY; + /* 0094 */ unsigned char customRendering; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Window/UIBalloonOpenBtn.cpp b/Source/UI/Window/UIBalloonOpenBtn.cpp index d200c1781..288736b59 100644 --- a/Source/UI/Window/UIBalloonOpenBtn.cpp +++ b/Source/UI/Window/UIBalloonOpenBtn.cpp @@ -63,7 +63,7 @@ int UIBalloonOpenBtn::SendMsg(UIWindow* sender, int message, std::intptr_t argum return 0; } - this->m_balloon->m_fontMode = static_cast(g_session.unknown_0F30[0]); + this->m_balloon->m_fontMode = static_cast(g_session.chatFont[0]); this->m_balloon->m_richText = 1; this->m_balloon->SetLine("", popup->m_color); for (auto it = popup->m_descriptions.begin(); it != popup->m_descriptions.end(); ++it) { diff --git a/Source/UI/Window/UIBasicInfoWnd.cpp b/Source/UI/Window/UIBasicInfoWnd.cpp index 5d240aabf..d617aa942 100644 --- a/Source/UI/Window/UIBasicInfoWnd.cpp +++ b/Source/UI/Window/UIBasicInfoWnd.cpp @@ -36,19 +36,19 @@ namespace { std::int64_t BaseExpCurrent() { - return *reinterpret_cast(&g_session.unknown_162C[0x04]); + return *reinterpret_cast(&g_session.playerExperienceState[0x04]); } std::int64_t BaseExpMaximum() { - return *reinterpret_cast(&g_session.unknown_162C[0x0C]); + return *reinterpret_cast(&g_session.playerExperienceState[0x0C]); } std::int64_t JobExpCurrent() { - return *reinterpret_cast(&g_session.unknown_162C[0x1C]); + return *reinterpret_cast(&g_session.playerExperienceState[0x1C]); } std::int64_t JobExpMaximum() { - return *reinterpret_cast(&g_session.unknown_162C[0x14]); + return *reinterpret_cast(&g_session.playerExperienceState[0x14]); } } @@ -166,7 +166,7 @@ void UIBasicInfoWnd::StoreInfo() { this->saved->width = this->geometry.width; this->saved->x = this->geometry.x; this->saved->y = this->geometry.y; - this->saved->unknown_0010 = this->mode; + this->saved->mode = this->mode; } } @@ -278,7 +278,7 @@ int UIBasicInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen } case 214: if (!g_windowMgr.CloseWindow(WID_CHATROOMMAKEWND) && !g_windowMgr.window_027C) { - if (!g_windowMgr.unknown_02FC && !g_windowMgr.unknown_0304) { + if (!g_windowMgr.merchantShopMakeWnd && !g_windowMgr.merchantItemMyShopWnd) { g_windowMgr.EnsureWindow(WID_CHATROOMMAKEWND); } else { g_windowMgr.Confirm(LookupMessage(MSI_CANT_OPEN_STORE_WHILE_CHAT), 0, true, false, 0, "Message", 280, 120, 0); @@ -311,7 +311,7 @@ int UIBasicInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen g_windowMgr.StoreSnapRectangle(this); break; case 247: - if (!g_windowMgr.LookupWindow(WID_MERGEITEMWND) && !g_windowMgr.CloseWindow(WID_MERCHANTITEMWND) && g_session.unknown_5C1C > 0) { + if (!g_windowMgr.LookupWindow(WID_MERGEITEMWND) && !g_windowMgr.CloseWindow(WID_MERCHANTITEMWND) && g_session.replayPacketMode > 0) { g_windowMgr.EnsureWindow(WID_MERCHANTITEMWND); } break; @@ -350,7 +350,7 @@ int UIBasicInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen this->saved->Reset(); } - this->mode = this->saved->unknown_0010 != 0; + this->mode = this->saved->mode != 0; this->SetHeight(this->saved->height); this->Move(this->saved->x, this->saved->y); break; @@ -387,14 +387,14 @@ void UIBasicInfoWnd::DrawExpanded() { this->DrawTextAt(9, 65, LookupMessage(MSI_BASICINFO_EXP), 0, 1, 14, 0, 0, 0); this->DrawTextAt(9, 80, LookupMessage(MSI_GUILD_AGIT_ARE_YOU_MOVE_AGIT), 0, 1, 14, 0, 0, 0); - if (g_session.unknown_556C > 0) { - const std::int64_t percent = static_cast(g_session.unknown_5568) * 100 / g_session.unknown_556C; + if (g_session.maxHp > 0) { + const std::int64_t percent = static_cast(g_session.hp) * 100 / g_session.maxHp; std::string text = FormatOwnedString("%d%%", percent); this->DrawTextAt(173, 51, text.c_str(), 0, 1, 14, 0, 0, 0); } - const int sp = *reinterpret_cast(&g_session.unknown_5570[0]); - const int spMax = *reinterpret_cast(&g_session.unknown_5570[4]); + const int sp = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); + const int spMax = *reinterpret_cast(&g_session.spAndHomunculusStats[4]); if (spMax > 0) { const std::int64_t percent = static_cast(sp) * 100 / spMax; std::string text = FormatOwnedString("%d%%", percent); @@ -484,10 +484,10 @@ void UIBasicInfoWnd::DrawCollapsed() { this->DrawTextAt(8, 20, title.c_str(), 0, family, fontHeight, 0, 0, 0); std::uint32_t hpColor = 0; - if (g_session.unknown_556C > 0) { - hpColor = 0.25f > static_cast(g_session.unknown_5568) / static_cast(g_session.unknown_556C) ? 255 : 0; + if (g_session.maxHp > 0) { + hpColor = 0.25f > static_cast(g_session.hp) / static_cast(g_session.maxHp) ? 255 : 0; } - std::string hpText = FormatOwnedString("%s %d / %d", LookupMessage(MSI_BASICINFO_JOBLEVEL), g_session.unknown_5568, g_session.unknown_556C); + std::string hpText = FormatOwnedString("%s %d / %d", LookupMessage(MSI_BASICINFO_JOBLEVEL), g_session.hp, g_session.maxHp); this->DrawTextAt(8, 36, hpText.c_str(), 0, family, fontHeight, hpColor, 0, 0); std::int64_t current = BaseExpCurrent(); @@ -510,8 +510,8 @@ void UIBasicInfoWnd::DrawCollapsed() { std::string expText = FormatOwnedString("| %s %.1lf%%", LookupMessage(MSI_SIMPLECASH_P), percent); this->DrawTextAt(136, 36, expText.c_str(), 0, family, fontHeight, 0, 0, 0); - const int sp = *reinterpret_cast(&g_session.unknown_5570[0]); - const int spMax = *reinterpret_cast(&g_session.unknown_5570[4]); + const int sp = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); + const int spMax = *reinterpret_cast(&g_session.spAndHomunculusStats[4]); std::uint32_t spColor = 0; if (spMax > 0) { spColor = 0.25f > static_cast(sp) / static_cast(spMax) ? 255 : 0; @@ -540,8 +540,8 @@ void UIBasicInfoWnd::OnCreate(int width, int height) { this->hpBar = new UIBarGraphPlayer(); static_cast(this->hpBar)->SetValues( - []() -> std::int64_t { return g_session.unknown_5568; }, - []() -> std::int64_t { return g_session.unknown_556C; } + []() -> std::int64_t { return g_session.hp; }, + []() -> std::int64_t { return g_session.maxHp; } ); static_cast(this->hpBar)->SetSize(135, 9); static_cast(this->hpBar)->Move(-100, -100); @@ -549,8 +549,8 @@ void UIBasicInfoWnd::OnCreate(int width, int height) { this->spBar = new UIBarGraphPlayer(); static_cast(this->spBar)->SetValues( - []() -> std::int64_t { return *reinterpret_cast(&g_session.unknown_5570[0]); }, - []() -> std::int64_t { return *reinterpret_cast(&g_session.unknown_5570[4]); } + []() -> std::int64_t { return *reinterpret_cast(&g_session.spAndHomunculusStats[0]); }, + []() -> std::int64_t { return *reinterpret_cast(&g_session.spAndHomunculusStats[4]); } ); static_cast(this->spBar)->SetSize(135, 9); static_cast(this->spBar)->Move(-100, -100); @@ -622,12 +622,12 @@ void UIBasicInfoWnd::Paint() { if (g_session.IsTreeGroupTwo(g_session.GetDisplayJob())) { maxLevel = g_session.m_maxLevel; } else if (g_session.IsSuperNovice2Job(g_session.GetDisplayJob())) { - maxLevel = *reinterpret_cast(&g_session.unknown_7EF0[0]); + maxLevel = *reinterpret_cast(&g_session.jobLevelLimits[0]); } else if (g_session.IsExpandedJob(g_session.GetDisplayJob())) { - maxLevel = *reinterpret_cast(&g_session.unknown_7EF0[4]); + maxLevel = *reinterpret_cast(&g_session.jobLevelLimits[4]); } else { - maxLevel = g_session.IsDoramJob(g_session.GetDisplayJob()) == true ? *reinterpret_cast(&g_session.unknown_7EF0[0x28]) - : *reinterpret_cast(g_session.unknown_7EE8); + maxLevel = g_session.IsDoramJob(g_session.GetDisplayJob()) == true ? *reinterpret_cast(&g_session.jobLevelLimits[0x28]) + : *reinterpret_cast(g_session.maxBaseLevel); } double percent; @@ -685,17 +685,17 @@ void UIBasicInfoWnd::Paint() { FormatGroupedInteger(g_session.m_zeny, zenyText, 64); int offset = 0; - if (g_session.unknown_556C != 0) { - const std::uint32_t color = static_cast(g_session.unknown_5568) * 100.0f / static_cast(g_session.unknown_556C) < 25.0f ? 255 : 0; - const int hpLength = std::sprintf(text, x == 9 ? "HP. %d / %d" : "HP %d / %d", g_session.unknown_5568, g_session.unknown_556C); + if (g_session.maxHp != 0) { + const std::uint32_t color = static_cast(g_session.hp) * 100.0f / static_cast(g_session.maxHp) < 25.0f ? 255 : 0; + const int hpLength = std::sprintf(text, x == 9 ? "HP. %d / %d" : "HP %d / %d", g_session.hp, g_session.maxHp); this->DrawTextAt(x, 36, text, hpLength, 1, 14, color, 0, 0); offset = this->TextWidth(text, hpLength, 1, 14, 0, 0); length = std::sprintf(text, " | "); this->DrawTextAt(offset + x, 36, text, length, 1, 14, 0, 0, 0); } - const int sp = *reinterpret_cast(&g_session.unknown_5570[0]); - const int spMax = *reinterpret_cast(&g_session.unknown_5570[4]); + const int sp = *reinterpret_cast(&g_session.spAndHomunculusStats[0]); + const int spMax = *reinterpret_cast(&g_session.spAndHomunculusStats[4]); if (spMax < 0) { return; } @@ -732,14 +732,14 @@ void UIBasicInfoWnd::Paint() { this->DrawTextAt(17, 51, "HP", 0, 1, 14, 0, 0, 0); this->DrawTextAt(17, 65, "SP", 0, 1, 14, 0, 0, 0); - if (g_session.unknown_556C != 0) { - std::sprintf(text, "%d%%", g_session.unknown_5568 * 100 / g_session.unknown_556C); + if (g_session.maxHp != 0) { + std::sprintf(text, "%d%%", g_session.hp * 100 / g_session.maxHp); this->DrawTextAt(173, 51, text, 0, 1, 14, 0, 0, 0); } - const int spMax = *reinterpret_cast(&g_session.unknown_5570[4]); + const int spMax = *reinterpret_cast(&g_session.spAndHomunculusStats[4]); if (spMax != 0) { - std::sprintf(text, "%d%%", *reinterpret_cast(&g_session.unknown_5570[0]) * 100 / spMax); + std::sprintf(text, "%d%%", *reinterpret_cast(&g_session.spAndHomunculusStats[0]) * 100 / spMax); this->DrawTextAt(173, 65, text, 0, 1, 14, 0, 0, 0); } diff --git a/Source/UI/Window/UIBattleMsgOptionWnd.cpp b/Source/UI/Window/UIBattleMsgOptionWnd.cpp index 6efd3b15e..42498a71b 100644 --- a/Source/UI/Window/UIBattleMsgOptionWnd.cpp +++ b/Source/UI/Window/UIBattleMsgOptionWnd.cpp @@ -36,12 +36,12 @@ void UIBattleMsgOptionWnd::OnWheel(int delta) { // OFFSET: 0x00910C40 // FUNCTION: fn_12510 UIBattleMsgOptionWnd::UIBattleMsgOptionWnd() : UIFrameWnd(0) { - this->unknown_00B8 = -1; + this->hoveredOption = -1; this->messages.push_back(LookupMessage(MSI_ST_CHAT)); - this->unknown_0108 = -1; - this->unknown_0110 = 1; - this->unknown_010C = 0; + this->chatWindowIndex = -1; + this->useMainChatOptions = 1; + this->allChecked = 0; this->messages.push_back(LookupMessage(MSI_VIEW_CHAT_MSG)); this->messages.push_back(LookupMessage(MSI_VIEW_WHISPER_MSG)); @@ -83,7 +83,7 @@ void UIBattleMsgOptionWnd::OnCreate(int, int height) { this->m_allCheckBox->SetSize(70, 12); this->m_allCheckBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", " all on"); this->m_allCheckBox->Move(20, this->geometry.height - 16); - this->m_allCheckBox->SetChecked(this->unknown_010C); + this->m_allCheckBox->SetChecked(this->allChecked); this->AddChild(this->m_allCheckBox); this->m_visibleRows = (height - 38) / 20; this->UpdateScrollBar(); @@ -97,7 +97,7 @@ int UIBattleMsgOptionWnd::RowAt(int x, int y) { int row = 0; int index = 0; for (std::vector::iterator it = this->messages.begin(); it != this->messages.end(); ++it, ++index) { - if (std::strcmp(LookupMessage(MSI_VIEW_SEEK_PARTY), *it) != 0 && index >= this->unknown_00C4) { + if (std::strcmp(LookupMessage(MSI_VIEW_SEEK_PARTY), *it) != 0 && index >= this->scrollPosition) { if (row == (y - 17) / 20 + column) { return index; } @@ -125,24 +125,24 @@ void UIBattleMsgOptionWnd::OnLBtnDown(int x, int y) { return; } - const int previous = this->unknown_00B8; - this->unknown_00B8 = this->RowAt(x, y); - if (previous != this->unknown_00B8) { + const int previous = this->hoveredOption; + this->hoveredOption = this->RowAt(x, y); + if (previous != this->hoveredOption) { this->Invalidate(); } - if (this->unknown_00B8 != -1) { - this->unknown_00EC[this->unknown_00B8] = this->unknown_00EC[this->unknown_00B8] == 0; - (this->unknown_0110 ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->unknown_0108].options[this->unknown_00B8] = - this->unknown_00EC[this->unknown_00B8]; - this->unknown_010C = 1; + if (this->hoveredOption != -1) { + this->optionStates[this->hoveredOption] = this->optionStates[this->hoveredOption] == 0; + (this->useMainChatOptions ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->chatWindowIndex].options[this->hoveredOption] = + this->optionStates[this->hoveredOption]; + this->allChecked = 1; for (int i = 0; i < 25; ++i) { - if (this->unknown_00EC[i] == 0) { - this->unknown_010C = 0; + if (this->optionStates[i] == 0) { + this->allChecked = 0; break; } } - this->m_allCheckBox->geometry.unknown_0030 = this->unknown_010C; + this->m_allCheckBox->geometry.state = this->allChecked; this->m_allCheckBox->Invalidate(); this->Invalidate(); } @@ -151,9 +151,9 @@ void UIBattleMsgOptionWnd::OnLBtnDown(int x, int y) { // OFFSET: 0x009317A0 // FUNCTION: fn_12707 void UIBattleMsgOptionWnd::OnMouseHover(int x, int y) { - const int previous = this->unknown_00B8; - this->unknown_00B8 = this->RowAt(x, y); - if (previous != this->unknown_00B8) { + const int previous = this->hoveredOption; + this->hoveredOption = this->RowAt(x, y); + if (previous != this->hoveredOption) { this->Invalidate(); } } @@ -171,15 +171,15 @@ void UIBattleMsgOptionWnd::UpdateScrollBar() { this->m_scrollable = range != 0; if (range != 0) { this->m_scrollBar->SetRange(range, visible, total); - if (this->unknown_00C4 < 0) { - this->unknown_00C4 = 0; + if (this->scrollPosition < 0) { + this->scrollPosition = 0; } - if (this->unknown_00C4 > total - this->m_visibleRows) { - this->unknown_00C4 = total - this->m_visibleRows; + if (this->scrollPosition > total - this->m_visibleRows) { + this->scrollPosition = total - this->m_visibleRows; } - this->m_scrollBar->SetPosition(this->unknown_00C4); + this->m_scrollBar->SetPosition(this->scrollPosition); } else { - this->unknown_00C4 = 0; + this->scrollPosition = 0; this->m_scrollBar->SetRange(0, visible, total); } this->m_scrollBar->Invalidate(); @@ -215,11 +215,11 @@ void UIBattleMsgOptionWnd::Paint() { int row = 1; int y = 22; for (std::vector::iterator it = this->messages.begin(); it != this->messages.end(); ++it, ++index) { - if (std::strcmp(LookupMessage(MSI_VIEW_SEEK_PARTY), *it) == 0 || index < this->unknown_00C4) { + if (std::strcmp(LookupMessage(MSI_VIEW_SEEK_PARTY), *it) == 0 || index < this->scrollPosition) { continue; } - if (this->unknown_00B8 == index) { + if (this->hoveredOption == index) { unsigned selectRed, selectGreen, selectBlue; SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, selectRed, selectGreen, selectBlue); this->FillRegion(25, y - 3, this->geometry.width - 40, 20, RGB(selectRed, selectGreen, selectBlue)); @@ -227,7 +227,7 @@ void UIBattleMsgOptionWnd::Paint() { } this->DrawTextAt(50, y, *it, 0, 0, 12, 0, 0, 0); - const bool online = this->unknown_00EC[index] != 0; + const bool online = this->optionStates[index] != 0; auto* icon = static_cast(ResourceMgr::Instance().Load( Resolve(online ? "유저인터페이스\\basic_interface\\grp_online.bmp" : "유저인터페이스\\basic_interface\\grp_offline.bmp") )); @@ -248,7 +248,7 @@ int UIBattleMsgOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a case UM_COMMAND: switch (a) { case ID_OPTION: { - if (this->unknown_0108 == b && this->unknown_0110 == (c != 0)) { + if (this->chatWindowIndex == b && this->useMainChatOptions == (c != 0)) { if (d != 2) { g_windowMgr.CloseWindow(WID_BATTLEMSGOPTIONWND); return 0; @@ -257,19 +257,19 @@ int UIBattleMsgOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a return 0; } - this->unknown_0108 = b; - this->unknown_0110 = c != 0; + this->chatWindowIndex = b; + this->useMainChatOptions = c != 0; SubChatWndInfo info; - info = (this->unknown_0110 ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->unknown_0108]; + info = (this->useMainChatOptions ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->chatWindowIndex]; if (!info.name.empty()) { - this->unknown_010C = 1; + this->allChecked = 1; for (int i = 0; i < 25; ++i) { - this->unknown_00EC[i] = info.options[i]; + this->optionStates[i] = info.options[i]; if (!info.options[i]) { - this->unknown_010C = 0; + this->allChecked = 0; } } - this->m_allCheckBox->geometry.unknown_0030 = this->unknown_010C; + this->m_allCheckBox->geometry.state = this->allChecked; this->m_allCheckBox->Invalidate(); this->text = info.name; this->text += LookupMessage(MSI_SET_CHATINFO); @@ -282,11 +282,11 @@ int UIBattleMsgOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a g_windowMgr.CloseWindow(WID_BATTLEMSGOPTIONWND); return 0; case ID_CHECK: - this->unknown_010C = b; + this->allChecked = b; for (int i = 0; i < 25; ++i) { - const bool checked = this->unknown_010C != 0; - this->unknown_00EC[i] = checked; - (this->unknown_0110 ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->unknown_0108].options[i] = checked; + const bool checked = this->allChecked != 0; + this->optionStates[i] = checked; + (this->useMainChatOptions ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->chatWindowIndex].options[i] = checked; } this->Invalidate(); return 0; @@ -296,19 +296,19 @@ int UIBattleMsgOptionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a case UM_SCROLLVERT: case UM_SCROLLVERTPAGEUP: case UM_SCROLLVERTPAGEDOWN: { - const int previous = this->unknown_00C4; + const int previous = this->scrollPosition; if (message == UM_SCROLLVERTPAGEUP) { - this->unknown_00C4 = previous - this->m_visibleRows + 1; + this->scrollPosition = previous - this->m_visibleRows + 1; } else if (message == UM_SCROLLVERTPAGEDOWN) { - this->unknown_00C4 = previous + this->m_visibleRows - 1; + this->scrollPosition = previous + this->m_visibleRows - 1; } else { - this->unknown_00C4 = previous + static_cast(a); + this->scrollPosition = previous + static_cast(a); } - if (previous != this->unknown_00C4) { + if (previous != this->scrollPosition) { this->UpdateScrollBar(); this->Invalidate(); } - return this->unknown_00C4 - previous; + return this->scrollPosition - previous; } } diff --git a/Source/UI/Window/UIBattleMsgOptionWnd.h b/Source/UI/Window/UIBattleMsgOptionWnd.h index 9ec5104c1..69a695fd6 100644 --- a/Source/UI/Window/UIBattleMsgOptionWnd.h +++ b/Source/UI/Window/UIBattleMsgOptionWnd.h @@ -23,16 +23,16 @@ public: virtual void UpdateScrollBar(); /* 00B4 */ UIScrollBar* m_scrollBar; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int hoveredOption; /* 00BC */ int m_visibleRows; /* 00C0 */ int m_scrollable; - /* 00C4 */ int unknown_00C4; + /* 00C4 */ int scrollPosition; /* 00C8 */ std::vector messages; /* 00D4 */ std::string text; - /* 00EC */ unsigned char unknown_00EC[0x1C]; - /* 0108 */ int unknown_0108; - /* 010C */ int unknown_010C; - /* 0110 */ unsigned char unknown_0110; + /* 00EC */ unsigned char optionStates[0x1C]; + /* 0108 */ int chatWindowIndex; + /* 010C */ int allChecked; + /* 0110 */ unsigned char useMainChatOptions; /* 0111 */ unsigned char unknown_0111[0x3]; /* 0114 */ UICheckBox* m_allCheckBox; }; diff --git a/Source/UI/Window/UIBitmapTab.cpp b/Source/UI/Window/UIBitmapTab.cpp index 97189c343..16c2b70e2 100644 --- a/Source/UI/Window/UIBitmapTab.cpp +++ b/Source/UI/Window/UIBitmapTab.cpp @@ -11,7 +11,7 @@ void UIBitmapTab::Paint() { int y = 0; for (unsigned index = 0; index < this->tabs.size(); ++index) { - const std::string name = FormatOwnedString(this->tabs[index].name.c_str(), 'a' + (this->geometry.unknown_0030 == index)); + const std::string name = FormatOwnedString(this->tabs[index].name.c_str(), 'a' + (this->geometry.state == index)); CBitmapRes* bitmap = static_cast(ResourceMgr::Instance().Load(Resolve(name.c_str()))); if (bitmap) { this->DrawBitmap(0, y, bitmap, false); @@ -31,10 +31,10 @@ void UIBitmapTab::OnLBtnDown(int, int y) { for (unsigned index = 0; index < this->tabs.size(); ++index) { bottom += this->tabs[index].height; if (y < bottom) { - if (this->geometry.unknown_0030 != index) { - this->geometry.unknown_0030 = index; + if (this->geometry.state != index) { + this->geometry.state = index; this->Invalidate(); - this->parent->SendMsg(this, UM_TAB, this->geometry.unknown_0030, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->geometry.state, 0, 0, 0); } return; @@ -55,7 +55,7 @@ void UIBitmapTab::DragAndDrop(int argument1, int argument2, std::intptr_t argume int UIBitmapTab::SendMsg(UIWindow*, int message, std::intptr_t argument1, std::intptr_t, std::intptr_t, std::intptr_t) { switch (message) { case UM_SETSTATE: - this->geometry.unknown_0030 = argument1; + this->geometry.state = argument1; this->Invalidate(); break; case UM_CLEAR_ITEM: diff --git a/Source/UI/Window/UIChatRoomWnd.h b/Source/UI/Window/UIChatRoomWnd.h index 6a7118d61..e9d67cd49 100644 --- a/Source/UI/Window/UIChatRoomWnd.h +++ b/Source/UI/Window/UIChatRoomWnd.h @@ -28,9 +28,9 @@ public: std::vector SerializeReplayData(); /* 00B4 */ std::string title; - /* 00CC */ std::string unknown_00CC; + /* 00CC */ std::string roomSettingsText; /* 00E4 */ union { - int unknown_00E4[4]; + int roomStatusValues[4]; struct { int roomType; int memberCount; @@ -44,8 +44,8 @@ public: /* 0100 */ UIMemberListBox* memberList; /* 0104 */ UIBitmapButton* closeButton; /* 0108 */ UIStaticText* titleText; - /* 010C */ std::map unknown_010C; - /* 0114 */ std::vector> unknown_0114; + /* 010C */ std::map memberRoles; + /* 0114 */ std::vector> menuCommands; /* 0120 */ ChatRoomWndInfo* saved; }; diff --git a/Source/UI/Window/UICollectionSystemWnd.cpp b/Source/UI/Window/UICollectionSystemWnd.cpp index 44db83190..4c02be4b4 100644 --- a/Source/UI/Window/UICollectionSystemWnd.cpp +++ b/Source/UI/Window/UICollectionSystemWnd.cpp @@ -22,7 +22,7 @@ // OFFSET: 0x00910890 // FUNCTION: fn_12504 CUICollectionSystemWnd::CUICollectionSystemWnd() - : UIFrameWnd(0), m_frameDelay(15), unknown_00B8(-1), unknown_00BC(0), + : UIFrameWnd(0), m_frameDelay(15), collectionId(-1), animationIndex(0), m_frame(0), m_lastFrame(-1), m_paused(false), m_lastTick(0) { this->m_action = static_cast(ResourceMgr::Instance().Load("collection_slotmachine.act")); this->m_sprite = static_cast(ResourceMgr::Instance().Load("collection_slotmachine.spr")); @@ -35,7 +35,7 @@ void CUICollectionSystemWnd::OnCreate(int, int) {} // OFFSET: 0x0092B830 // FUNCTION: fn_12658 void CUICollectionSystemWnd::Paint() { - const ActionFrame& current = this->m_action->Frame(this->unknown_00BC, this->m_frame); + const ActionFrame& current = this->m_action->Frame(this->animationIndex, this->m_frame); const std::uint32_t* palette = this->m_sprite->palette; SpriteAtlasRecord record{}; @@ -52,14 +52,14 @@ void CUICollectionSystemWnd::Paint() { } this->geometry.surface->DrawSurface( this->geometry.width / 2 + cell.x, this->geometry.height / 2 + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } const std::uint32_t now = timeGetTime(); if (!this->m_paused && static_cast(now - this->m_lastTick) > this->m_frameDelay) { ++this->m_frame; - if (this->m_frame >= static_cast(this->m_action->FrameCount(this->unknown_00BC))) { + if (this->m_frame >= static_cast(this->m_action->FrameCount(this->animationIndex))) { this->m_frame = 0; } this->m_lastTick = now; @@ -69,9 +69,9 @@ void CUICollectionSystemWnd::Paint() { // OFFSET: 0x00930A40 // FUNCTION: fn_12691 void CUICollectionSystemWnd::OnLBtnDown(int, int) { - if (this->unknown_00BC == 0) { - this->unknown_00BC = 1; - g_modeMgr.GetGameMode()->SendMsg(MM_TRYCOLLECTION, this->unknown_00B8, 0, 0, 0); + if (this->animationIndex == 0) { + this->animationIndex = 1; + g_modeMgr.GetGameMode()->SendMsg(MM_TRYCOLLECTION, this->collectionId, 0, 0, 0); } } @@ -96,7 +96,7 @@ void CUICollectionSystemWnd::OnProcess() { int CUICollectionSystemWnd::SendMsg(UIWindow*, int message, std::intptr_t a, std::intptr_t b, std::intptr_t, std::intptr_t) { if (message == UM_SET_TARGET) { if (a == 0) { - this->unknown_00B8 = b; + this->collectionId = b; return 0; } this->m_lastFrame = b; diff --git a/Source/UI/Window/UICollectionSystemWnd.h b/Source/UI/Window/UICollectionSystemWnd.h index aa66e4fd9..e55a11241 100644 --- a/Source/UI/Window/UICollectionSystemWnd.h +++ b/Source/UI/Window/UICollectionSystemWnd.h @@ -19,8 +19,8 @@ public: private: /* 00B4 */ int m_frameDelay; - /* 00B8 */ int unknown_00B8; - /* 00BC */ int unknown_00BC; + /* 00B8 */ int collectionId; + /* 00BC */ int animationIndex; /* 00C0 */ int m_frame; /* 00C4 */ int m_lastFrame; /* 00C8 */ bool m_paused; diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index cba43a3aa..c17403f0f 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -95,7 +95,7 @@ template <> __declspec(noinline) void CUIListBoxExItemSelector::Select(CUIListItem* const& item) { CUIListBoxEx* listBox = this->listBox; CUIListItem* selection = item; - if (listBox->unknown_00C4) { + if (listBox->layoutFlag) { return; } for (AdventureGuide::CUIItemInfo* other : listBox->items) { @@ -104,7 +104,7 @@ __declspec(noinline) void CUIListBoxExItemSelectorSetSelected(1); - if (selection->index == static_cast(listBox->selected) && listBox->unknown_00E0) { + if (selection->index == static_cast(listBox->selected) && listBox->selectionFlag) { return; } AdventureGuide::CUIItemInfo* selectedItem = dynamic_cast(selection); @@ -127,7 +127,7 @@ template <> __declspec(noinline) void CUIListBoxExItemSelector::Select(CUIListItem* const& item) { CUIListBoxEx* listBox = this->listBox; CUIListItem* selection = item; - if (listBox->unknown_00C4) { + if (listBox->layoutFlag) { return; } for (AdventureGuide::CUIMonsterInfo* other : listBox->items) { @@ -136,7 +136,7 @@ __declspec(noinline) void CUIListBoxExItemSelectorSetSelected(1); - if (selection->index == static_cast(listBox->selected) && listBox->unknown_00E0) { + if (selection->index == static_cast(listBox->selected) && listBox->selectionFlag) { return; } AdventureGuide::CUIMonsterInfo* selectedItem = dynamic_cast(selection); @@ -159,7 +159,7 @@ template <> __declspec(noinline) void CUIListBoxExItemSelector::Select(CUIListItem* const& item) { CUIListBoxEx* listBox = this->listBox; CUIListItem* selection = item; - if (listBox->unknown_00C4) { + if (listBox->layoutFlag) { return; } for (AdventureGuide::CUIQuestInfo* other : listBox->items) { @@ -168,7 +168,7 @@ __declspec(noinline) void CUIListBoxExItemSelectorSetSelected(1); - if (selection->index == static_cast(listBox->selected) && listBox->unknown_00E0) { + if (selection->index == static_cast(listBox->selected) && listBox->selectionFlag) { return; } AdventureGuide::CUIQuestInfo* selectedItem = dynamic_cast(selection); @@ -191,7 +191,7 @@ template <> __declspec(noinline) void CUIListBoxExItemSelector::Select(CUIListItem* const& item) { CUIListBoxEx* listBox = this->listBox; CUIListItem* selection = item; - if (listBox->unknown_00C4) { + if (listBox->layoutFlag) { return; } for (AdventureGuide::CUITabInfo* other : listBox->items) { @@ -200,7 +200,7 @@ __declspec(noinline) void CUIListBoxExItemSelectorSetSelected(1); - if (selection->index == static_cast(listBox->selected) && listBox->unknown_00E0) { + if (selection->index == static_cast(listBox->selected) && listBox->selectionFlag) { return; } AdventureGuide::CUITabInfo* selectedItem = dynamic_cast(selection); @@ -234,7 +234,7 @@ CBitmapRes* CUIControl::LoadBitmapResource(const std::string& name, bool resolve } // INLINED -__forceinline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), unknown_00C4(nullptr), unknown_00EC(nullptr) { +__forceinline CUIButton::CUIButton() : CUIControl(), state(0), disabled(0), tooltip(), clickWindow(nullptr), hoverWindow(nullptr) { } // OFFSET: 0x009BDF40 @@ -797,7 +797,7 @@ void CUIButton::SetState(int value) { // OFFSET: 0x009D3050 // FUNCTION: fn_14027 void CUIButton::SetOnClick(std::function handler) { - std::function& onClick = *reinterpret_cast*>(this->unknown_00A0); + std::function& onClick = *reinterpret_cast*>(this->clickHandlerStorage); onClick = handler; } @@ -821,8 +821,8 @@ void CUIButton::OnLBtnDown(int, int) { void CUIButton::OnLBtnUp(int, int) { this->SetState(2); if (this == g_windowMgr.Capture()) { - if (!this->disabled && this->unknown_00C4) { - this->unknown_00C4->IsFrameWnd(); + if (!this->disabled && this->clickWindow) { + this->clickWindow->IsFrameWnd(); } g_windowMgr.ReleaseCapture(); } @@ -837,8 +837,8 @@ void CUIButton::OnMouseEnter() { // OFFSET: 0x009EEA00 // FUNCTION: fn_14631 void CUIButton::OnMouseHover(int, int) { - if (this->unknown_00EC) { - this->unknown_00EC->IsFrameWnd(); + if (this->hoverWindow) { + this->hoverWindow->IsFrameWnd(); } if (this->tooltip.empty()) { @@ -1153,8 +1153,8 @@ void CUITabButton::SetSelected(bool selected) { if (this->page) { this->page->Show(selected); } - if (selected && this->unknown_00C4) { - this->unknown_00C4->IsFrameWnd(); + if (selected && this->clickWindow) { + this->clickWindow->IsFrameWnd(); } this->Invalidate(); } @@ -1744,7 +1744,7 @@ void CUIListBoxEx::AddNe } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (AdventureGuide::CUIItemInfo* other : this->items) { @@ -1753,7 +1753,7 @@ void CUIListBoxEx::AddNe } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } AdventureGuide::CUIItemInfo* selectedItem = dynamic_cast(listItem); @@ -1810,7 +1810,7 @@ void CUIListBoxEx: } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (AdventureGuide::CUIMonsterInfo* other : this->items) { @@ -1819,7 +1819,7 @@ void CUIListBoxEx: } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } AdventureGuide::CUIMonsterInfo* selectedItem = dynamic_cast(listItem); @@ -1876,7 +1876,7 @@ void CUIListBoxEx::Add } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (AdventureGuide::CUIQuestInfo* other : this->items) { @@ -1885,7 +1885,7 @@ void CUIListBoxEx::Add } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } AdventureGuide::CUIQuestInfo* selectedItem = dynamic_cast(listItem); @@ -1942,7 +1942,7 @@ void CUIListBoxEx::AddNewItem } }; item->onPress = [this](CUIListItem* listItem) { - if (this->unknown_00C4) { + if (this->layoutFlag) { return; } for (AdventureGuide::CUITabInfo* other : this->items) { @@ -1951,7 +1951,7 @@ void CUIListBoxEx::AddNewItem } } listItem->SetSelected(1); - if (listItem->index == static_cast(this->selected) && this->unknown_00E0) { + if (listItem->index == static_cast(this->selected) && this->selectionFlag) { return; } AdventureGuide::CUITabInfo* selectedItem = dynamic_cast(listItem); @@ -2620,7 +2620,7 @@ UIWindow* CUIControl::FindChildById(int id) { // OFFSET: 0x009BE300 // FUNCTION: fn_13947 CUITextViewer::CUITextViewer() - : CUIControl(), textX(0), textY(0), font(0), fontHeight(12), bold(false), textColor(0), unknown_0098(false), unknown_009C(0xFFFFFF), outline(false), + : CUIControl(), textX(0), textY(0), font(0), fontHeight(12), bold(false), textColor(0), shadow(false), shadowColor(0xFFFFFF), outline(false), outlineColor(0xFFFFFF), lineSpacing(6), backgroundColor(0xFFFFFF), paddingLeft(3), paddingTop(3), paddingRight(3), paddingBottom(3), scrollBar(nullptr), padding(nullptr), lines(), contentHeight(0), childPositions() { } @@ -2713,32 +2713,32 @@ bool UnusedTrue9BD5C0() { // FUNCTION: fn_13939 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009BD990 // FUNCTION: fn_13940 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009BDB50 // FUNCTION: fn_13941 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009BDD10 // FUNCTION: fn_13942 template <> CUIListBoxEx::CUIListBoxEx() - : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), unknown_00C4(0), selected(static_cast(-1)), - unknown_00E0(1), rebind(0) { + : CUIControl(), scrollBar(nullptr), itemWidth(0), rowHeight(0), itemX(0), itemY(0), layoutFlag(0), selected(static_cast(-1)), + selectionFlag(1), rebind(0) { } // OFFSET: 0x009BE5F0 @@ -2781,8 +2781,8 @@ CUIListBoxEx::~CUIListBoxEx() // FUNCTION: fn_13963 CUIButton::~CUIButton() { using Handler = std::function; - reinterpret_cast(this->unknown_00C8)->~Handler(); - reinterpret_cast(this->unknown_00A0)->~Handler(); + reinterpret_cast(this->hoverHandlerStorage)->~Handler(); + reinterpret_cast(this->clickHandlerStorage)->~Handler(); } // OFFSET: 0x009BFED0 @@ -2802,36 +2802,36 @@ namespace AdventureGuide { // OFFSET: 0x009D9150 // FUNCTION: fn_14276 __declspec(noinline) CUIItemInfo::CUIItemInfo() - : CUIListItem(), unknown_00E8(), unknown_00F0(nullptr), unknown_00F4(nullptr), unknown_00F8(nullptr), itemId(-1), type(21), location(-1), - unknown_0108() { + : CUIListItem(), headerControls(), descriptionViewer(nullptr), optionsViewer(nullptr), sourcesViewer(nullptr), itemId(-1), type(21), location(-1), + description() { } // OFFSET: 0x009D92D0 // FUNCTION: fn_14278 CUIMonsterInfo::CUIMonsterInfo() - : CUIListItem(), unknown_00E8(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), sprite(nullptr), action(nullptr) { + : CUIListItem(), nameText(nullptr), detailsViewer(nullptr), valuesViewer(nullptr), sprite(nullptr), action(nullptr) { } // OFFSET: 0x009D9420 // FUNCTION: fn_14280 __declspec(noinline) CUIQuestInfo::CUIQuestInfo() - : CUIListItem(), unknown_00E8(nullptr), unknown_00EC(nullptr), unknown_00F0(nullptr), unknown_00F4(nullptr), unknown_00F8(), questId(0) { + : CUIListItem(), stampImage(nullptr), titleViewer(nullptr), linesViewer(nullptr), statusViewer(nullptr), title(), questId(0) { } // OFFSET: 0x009D94D0 // FUNCTION: fn_14281 -CUISubTab::CUISubTab() : CUIListItem(), unknown_00E8(nullptr), unknown_00EC(nullptr), id(0), unknown_00F4(0) { +CUISubTab::CUISubTab() : CUIListItem(), labelText(nullptr), stampImage(nullptr), id(0), questId(0) { } // OFFSET: 0x009D9550 // FUNCTION: fn_14282 CUITab::CUITab() - : CUIListItem(), unknown_00E8(nullptr), subTabs(nullptr), unknown_00F0(), type(7), page(nullptr), unknown_0110(0) { + : CUIListItem(), labelText(nullptr), subTabs(nullptr), title(), type(7), page(nullptr), collapsedHeight(0) { } // OFFSET: 0x009D9600 // FUNCTION: fn_14283 -CUITabInfo::CUITabInfo() : CUIListItem(), unknown_00E8(nullptr), unknown_00EC(nullptr) { +CUITabInfo::CUITabInfo() : CUIListItem(), titleText(nullptr), descriptionText(nullptr) { } } @@ -2864,16 +2864,16 @@ void CUIStaticText::OnMouseHover(int x, int y) { void CUIStaticText::UpdateText() { this->Tooltip().clear(); if (this->fitText) { - this->unknown_0098 = this->FitDisplayText(this->geometry.width, this->text.c_str(), this->fontIndex, this->fontHeight, this->bold); - if (this->unknown_0098 != this->text) { + this->displayText = this->FitDisplayText(this->geometry.width, this->text.c_str(), this->fontIndex, this->fontHeight, this->bold); + if (this->displayText != this->text) { this->Tooltip() = this->text; } } else { - this->unknown_0098 = this->text; + this->displayText = this->text; } const SIZE size = - this->TextSize(this->unknown_0098.c_str(), 0, this->fontIndex, this->fontHeight, this->bold, 0); + this->TextSize(this->displayText.c_str(), 0, this->fontIndex, this->fontHeight, this->bold, 0); if (this->horizontalAlign == 0) { this->textX = 0; @@ -3187,23 +3187,23 @@ void CUIBasicButton::DrawLabel() { // FUNCTION: fn_14669 void CUIStaticText::Paint() { this->ClearSurface(0xFFFF00FF); - if (this->unknown_0098.size() == 0) { + if (this->displayText.size() == 0) { return; } if (this->shadow) { - this->DrawTextAt(this->textX + 1, this->textY + 1, this->unknown_0098.c_str(), 0, this->fontIndex, + this->DrawTextAt(this->textX + 1, this->textY + 1, this->displayText.c_str(), 0, this->fontIndex, this->fontHeight, this->shadowColor, this->bold, 0 ); } if (this->outline) { DrawOutlinedText( - *this, this->textX, this->textY + 1, this->unknown_0098.c_str(), 0, this->color, this->outlineColor, this->fontIndex, this->fontHeight, this->bold, + *this, this->textX, this->textY + 1, this->displayText.c_str(), 0, this->color, this->outlineColor, this->fontIndex, this->fontHeight, this->bold, 0 ); return; } - this->DrawTextAt(this->textX, this->textY, this->unknown_0098.c_str(), 0, this->fontIndex, this->fontHeight, + this->DrawTextAt(this->textX, this->textY, this->displayText.c_str(), 0, this->fontIndex, this->fontHeight, this->color, this->bold, 0 ); } @@ -3288,7 +3288,7 @@ CUITextButton::CUITextButton() // OFFSET: 0x009E1250 // FUNCTION: fn_14394 CUIBasicButton::CUIBasicButton() - : CUITextButton(), unknown_0190(0), defaultWidth(0), leftImages(), disabledLeft(), middleImages(), disabledMiddle(), rightImages(), + : CUITextButton(), enabledState(0), defaultWidth(0), leftImages(), disabledLeft(), middleImages(), disabledMiddle(), rightImages(), disabledRight() { this->textColors[0] = 0; this->textColors[1] = 0; @@ -3329,7 +3329,7 @@ void CUITextViewer::OnCreate(int width, int height) { // OFFSET: 0x009E2D10 // FUNCTION: fn_14408 void CUIBasicButton::SetAutoWidth(bool enabled) { - this->unknown_0190 = enabled; + this->enabledState = enabled; if (enabled) { const int width = this->TextWidth(this->text.c_str(), 0, 0, 12, 0, 0) + 8; if (width > this->geometry.width) { @@ -3417,19 +3417,19 @@ const char* UIWindow::ClipTextToWidth(const char* text, int maxWidth, int family bool CUIRegisterMgr::SaveTemporary() { std::string data; - if (this->unknown_000C.size() != 0) { + if (this->windowPositions.size() != 0) { data += "TblPos = \r\n"; data += "{\r\n"; - for (const auto& position : this->unknown_000C) { + for (const auto& position : this->windowPositions) { data += std::format("\t[ {} ] = {{ x = {}, y = {} }},\r\n", position.first, position.second.first, position.second.second); } data += "}\r\n"; } - if (this->unknown_0014.size() != 0) { + if (this->windowSizes.size() != 0) { data += "TblSize = \r\n"; data += "{\r\n"; - for (const auto& size : this->unknown_0014) { + for (const auto& size : this->windowSizes) { data += std::format("\t[ {} ] = {{ w = {}, h = {} }},\r\n", size.first, size.second.first, size.second.second); } data += "}\r\n"; @@ -3473,9 +3473,9 @@ CUIFrameWnd* CUIRegisterMgr::Create(int key) { window->SetId(key); window->Initialize(); - if (static_cast(window->unknown_00B4) != 0) { - auto position = this->unknown_000C.find(key); - if (position != this->unknown_000C.end()) { + if (static_cast(window->ownedSkinColors) != 0) { + auto position = this->windowPositions.find(key); + if (position != this->windowPositions.end()) { RECT bounds{0, 0, g_renderer->viewport.width - window->geometry.width, g_renderer->viewport.height - window->geometry.height}; POINT savedPosition{position->second.first, position->second.second}; if (PtInRect(&bounds, savedPosition)) { @@ -3484,9 +3484,9 @@ CUIFrameWnd* CUIRegisterMgr::Create(int key) { } } - if (static_cast(window->unknown_00B4 >> 8) != 0) { - auto size = this->unknown_0014.find(key); - if (size != this->unknown_0014.end()) { + if (static_cast(window->ownedSkinColors >> 8) != 0) { + auto size = this->windowSizes.find(key); + if (size != this->windowSizes.end()) { window->Grow(size->second.first - window->geometry.width, size->second.second - window->geometry.height); } } @@ -3517,14 +3517,14 @@ void CUIRegisterMgr::Load() { int y = 0; script.Call("GetWindowPos", "d>bdd", entry.first, &available, &x, &y); if (available) { - this->unknown_000C[entry.first] = std::pair(x, y); + this->windowPositions[entry.first] = std::pair(x, y); } int width = 0; int height = 0; script.Call("GetWindowSize", "d>bdd", entry.first, &available, &width, &height); if (available) { - this->unknown_0014[entry.first] = std::pair(width, height); + this->windowSizes[entry.first] = std::pair(width, height); } } } @@ -3596,7 +3596,7 @@ void CUIVScrollBar::OnCreate(int, int) { // OFFSET: 0x009BE1A0 // FUNCTION: fn_13946 CUIStaticText::CUIStaticText() - : CUIControl(), unknown_0098(), unknown_00B0(), scrollBar(nullptr), unknown_00C4(), fitText(false), horizontalAlign(0), + : CUIControl(), displayText(), tooltipStorage(), scrollBar(nullptr), tooltipTailStorage(), fitText(false), horizontalAlign(0), verticalAlign(0), fontIndex(0), fontHeight(12), bold(0), color(0), shadow(false), shadowColor(0xFFFFFF), outline(false), outlineColor(0xFFFFFF), textX(0), textY(0), text() { new (&this->Tooltip()) std::string(); @@ -3655,7 +3655,7 @@ void CUIEditBox::OnCreate(int width, int height) { this->edit = new CUIEditCtrl(); this->edit->SetSize(width, height); this->edit->invalidatesParent = 1; - reinterpret_cast(&this->edit->unknown_0184)[1] = 1; + reinterpret_cast(&this->edit->editFlags)[1] = 1; this->AddChild(this->edit); } @@ -3673,7 +3673,7 @@ void CUITextViewer::AddLine(const std::string& text) { LineFontFlags flags{this->bold, false}; CCreateLineInfo lineInfo( this, text.c_str(), availableWidth, this->lineSpacing, this->textColor, this->fontHeight, flags, - this->outline, this->outlineColor, this->unknown_0098, this->unknown_009C, align + this->outline, this->outlineColor, this->shadow, this->shadowColor, align ); if (!lineInfo.m_lines.empty()) { this->lines.push_back(text); diff --git a/Source/UI/Window/UIControl.h b/Source/UI/Window/UIControl.h index f3b0af093..531822469 100644 --- a/Source/UI/Window/UIControl.h +++ b/Source/UI/Window/UIControl.h @@ -123,10 +123,10 @@ public: /* 0084 */ unsigned char disabled; /* 0085 */ unsigned char unknown_0085[0x03]; /* 0088 */ std::string tooltip; - /* 00A0 */ unsigned char unknown_00A0[0x24]; - /* 00C4 */ UIWindow* unknown_00C4; - /* 00C8 */ unsigned char unknown_00C8[0x24]; - /* 00EC */ UIWindow* unknown_00EC; + /* 00A0 */ unsigned char clickHandlerStorage[0x24]; + /* 00C4 */ UIWindow* clickWindow; + /* 00C8 */ unsigned char hoverHandlerStorage[0x24]; + /* 00EC */ UIWindow* hoverWindow; }; class CUITextButton : public CUIButton { @@ -201,7 +201,7 @@ public: void Create(int width, int height); void SetAutoWidth(bool enabled); - /* 0190 */ unsigned char unknown_0190; + /* 0190 */ unsigned char enabledState; /* 0194 */ int defaultWidth; /* 0198 */ std::map> leftImages; /* 01A0 */ CResPtr disabledLeft; diff --git a/Source/UI/Window/UIEmblemWnd.cpp b/Source/UI/Window/UIEmblemWnd.cpp index cc097af2b..ea35aa2e6 100644 --- a/Source/UI/Window/UIEmblemWnd.cpp +++ b/Source/UI/Window/UIEmblemWnd.cpp @@ -55,7 +55,7 @@ void UIEmblemWnd::OnProcess() { if (this->screenX != screenX || this->screenX != screenY) { this->screenY = screenY; this->screenX = screenX; - const float scale = actor->render.unknown_005C; + const float scale = actor->render.distanceScale; const int x = static_cast(screenX - static_cast(g_renderer->viewport.width * 10 / 640) * scale); const int y = static_cast(screenY - static_cast(g_renderer->viewport.height * 100 / 480) * scale); this->Move(x, y); diff --git a/Source/UI/Window/UIEscOptionWnd.cpp b/Source/UI/Window/UIEscOptionWnd.cpp index 2045ade5f..0cbcdee2c 100644 --- a/Source/UI/Window/UIEscOptionWnd.cpp +++ b/Source/UI/Window/UIEscOptionWnd.cpp @@ -73,7 +73,7 @@ UIEscOptionWnd::UIEscOptionWnd() : UIFrameWnd(0), m_titleHeight(17) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); int escMode; - if (mode->unknown_0250 == 0) { + if (mode->isPlayerDead == 0) { escMode = 0; } else if (!mode->HasResurrectionItem() && !g_session.HasSkillEffect(580)) { escMode = 1; diff --git a/Source/UI/Window/UIFrameWnd.cpp b/Source/UI/Window/UIFrameWnd.cpp index 66ef34774..77c467c6f 100644 --- a/Source/UI/Window/UIFrameWnd.cpp +++ b/Source/UI/Window/UIFrameWnd.cpp @@ -421,9 +421,9 @@ void UIReplayButton::OnLBtnUp(int x, int y) { } if (x < 0 || x >= this->geometry.width || y < 0 || y >= this->geometry.height) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; } else { - this->geometry.unknown_0030 = 1; + this->geometry.state = 1; if (this->parent) { this->parent->SendMsg(this, UM_COMMAND, this->geometry.id, this->m_argument, 0, 0); this->parent->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); @@ -638,7 +638,7 @@ UIBank_NewWnd::UIBank_NewWnd() // OFFSET: 0x008A35A0 // FUNCTION: fn_11655 UIChatRoomWnd::UIChatRoomWnd() - : UIFrameWnd(0), title(), unknown_00CC(), unknown_010C(), unknown_0114(), saved(nullptr) { + : UIFrameWnd(0), title(), roomSettingsText(), memberRoles(), menuCommands(), saved(nullptr) { } #pragma pack(push, 1) @@ -684,9 +684,9 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: if (!this->edit->links.empty()) { text = this->edit->LinkedText(); } else if (_mbsstr(reinterpret_cast(this->edit->Text()), reinterpret_cast("<"))) { - UIItemTagOnChat* tags = this->edit->unknown_0144; - if (tags != nullptr && !tags->unknown_0140.empty()) { - text = tags->unknown_0140; + UIItemTagOnChat* tags = this->edit->itemTags; + if (tags != nullptr && !tags->linkedText.empty()) { + text = tags->linkedText; } } @@ -724,7 +724,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: g_modeMgr.gameMode->SendMsg(MM_PROCESS_TALK_TYPE, talkType, reinterpret_cast(parts), 0, 0); } } else { - g_windowMgr.unknown_04DC = buffer; + g_windowMgr.chatInputText = buffer; const std::string name = this->memberList->lines[this->memberList->selected]; g_modeMgr.gameMode->SendMsg(MM_WHISPERMSG, reinterpret_cast(name.c_str()), 0, 0, 0); } @@ -745,7 +745,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } case UM_MENU_SELECTED: { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - switch (this->unknown_0114[a].second) { + switch (this->menuCommands[a].second) { case 0: { if (this->memberList->selected == -1) { return 0; @@ -763,7 +763,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 0; } case 2: - g_windowMgr.EnsureWindow(WID_CHATROOMCHANGEWND)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&mode->unknown_03C8), 0, 0, 0); + g_windowMgr.EnsureWindow(WID_CHATROOMCHANGEWND)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(&mode->chatRoomTitle), 0, 0, 0); return 0; case 3: g_windowMgr.Confirm(LookupMessage(MSI_NOTSUPPORTEDYET), 0, true, false, 0, "Message", 280, 120, 0); @@ -784,57 +784,57 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: } } case UM_MAKEMENU: { - this->unknown_0114.clear(); - if (g_windowMgr.unknown_0210 != nullptr) { + this->menuCommands.clear(); + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } { const std::string self = g_session.DecodePlayerName(); - if (this->unknown_010C.find(self) == this->unknown_010C.end()) { + if (this->memberRoles.find(self) == this->memberRoles.end()) { return 0; } - const int rank = this->unknown_010C[self]; + const int rank = this->memberRoles[self]; if (rank == -1) { return 0; } if (this->memberList->selected != -1) { const std::string target = this->memberList->lines[this->memberList->selected]; - if (this->unknown_010C.find(target) == this->unknown_010C.end() || this->unknown_010C[target] == -1) { + if (this->memberRoles.find(target) == this->memberRoles.end() || this->memberRoles[target] == -1) { return 0; } switch (rank) { case 0: if (!(target == self)) { - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_BAN)), 0)); - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_GIVE_GIVE_ROOM_POWER)), 1)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_BAN)), 0)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_GIVE_GIVE_ROOM_POWER)), 1)); } - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_CHARACTER)), 3)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_CHARACTER)), 3)); if (g_serviceMode != 3 && !g_windowMgr.IsFriend(target.c_str()) && !(target == self)) { - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_ADD_TO_FRIEND_CHAR_LIST)), 21)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_ADD_TO_FRIEND_CHAR_LIST)), 21)); } - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_CHANGE_ROOM_SETTING)), 2)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_CHANGE_ROOM_SETTING)), 2)); break; case 1: - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_CHARACTER)), 3)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_SEE_INFORMATION_OF_CHARACTER)), 3)); if (!g_windowMgr.IsFriend(target.c_str()) && !(target == self) && g_serviceMode != 3) { - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_ADD_TO_FRIEND_CHAR_LIST)), 21)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_ADD_TO_FRIEND_CHAR_LIST)), 21)); } break; } } else { if (rank == 0) { - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_CHANGE_ROOM_SETTING)), 2)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_CHANGE_ROOM_SETTING)), 2)); } - this->unknown_0114.push_back(std::pair(std::string(LookupMessage(MSI_WRITE_CHAT_TO_FILE)), 11)); + this->menuCommands.push_back(std::pair(std::string(LookupMessage(MSI_WRITE_CHAT_TO_FILE)), 11)); } } - if (!this->unknown_0114.empty()) { + if (!this->menuCommands.empty()) { UIWindow* menu = g_windowMgr.EnsureWindow(WID_MENUWND); - for (unsigned index = 0; index < this->unknown_0114.size(); ++index) { - menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->unknown_0114[index].first.c_str()), 0, 0, 0); + for (unsigned index = 0; index < this->menuCommands.size(); ++index) { + menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->menuCommands[index].first.c_str()), 0, 0, 0); } menu->SendMsg(nullptr, UM_SET_CALLER_WID, 28, 0, 0, 0); menu->SendMsg(nullptr, UM_ADJUSTSIZE, 0, 0, 0, 0); @@ -862,7 +862,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: case UM_SETINFO: { const ChatRoomTitleInfo* settings = reinterpret_cast(a); this->title = settings->title; - this->unknown_00CC = settings->unknown_0018; + this->roomSettingsText = settings->password; this->roomStatus.roomType = settings->type; this->roomStatus.memberCount = settings->memberCount; this->roomStatus.memberLimit = settings->memberLimit; @@ -886,33 +886,33 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 0; } case UM_ROLE_CHANGE: { - if (this->unknown_010C.find(std::string(reinterpret_cast(a))) != this->unknown_010C.end()) { - this->unknown_010C[std::string(reinterpret_cast(a))] = static_cast(b); + if (this->memberRoles.find(std::string(reinterpret_cast(a))) != this->memberRoles.end()) { + this->memberRoles[std::string(reinterpret_cast(a))] = static_cast(b); } this->memberList->Clear(); - for (std::map::iterator it = this->unknown_010C.begin(); it != this->unknown_010C.end(); ++it) { + for (std::map::iterator it = this->memberRoles.begin(); it != this->memberRoles.end(); ++it) { this->memberList->AddText(it->first.c_str(), it->second != 0 ? 0 : 0x808000, nullptr); } return 0; } case UM_MEMBER_EXIT: { - const std::map::iterator found = this->unknown_010C.find(std::string(reinterpret_cast(a))); - if (found == this->unknown_010C.end()) { + const std::map::iterator found = this->memberRoles.find(std::string(reinterpret_cast(a))); + if (found == this->memberRoles.end()) { return 0; } - this->unknown_010C.erase(found); + this->memberRoles.erase(found); this->memberList->Clear(); - for (std::map::iterator it = this->unknown_010C.begin(); it != this->unknown_010C.end(); ++it) { + for (std::map::iterator it = this->memberRoles.begin(); it != this->memberRoles.end(); ++it) { this->memberList->AddText(it->first.c_str(), it->second != 0 ? 0 : 0x808000, nullptr); } return 0; } case UM_CLEARMEMBER: this->memberList->Clear(); - this->unknown_010C.erase(this->unknown_010C.begin(), this->unknown_010C.end()); + this->memberRoles.erase(this->memberRoles.begin(), this->memberRoles.end()); return 0; case UM_ADDMEMBER: { - this->unknown_010C[std::string(reinterpret_cast(a))] = static_cast(b); + this->memberRoles[std::string(reinterpret_cast(a))] = static_cast(b); int color = 0; if (b != 0) { if (g_serviceOptions.Get(11) && g_soundMgr->unknown != 0) { @@ -1031,7 +1031,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: if (header.tag == 0x5014) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_ROOM_IS_MADE)), 0xFFFF00, 0, 0, 0); - ChatRoomTitleInfo* settings = reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->unknown_03C8); + ChatRoomTitleInfo* settings = reinterpret_cast(&static_cast(g_modeMgr.GetGameMode())->chatRoomTitle); unsigned offset = 6; while (offset < size) { std::memcpy(&header, data + offset, sizeof(header)); @@ -1056,7 +1056,7 @@ int UIChatRoomWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: std::memset(value, 0, sizeof(value)); std::memcpy(value, data + offset, header.size); offset += header.size; - settings->unknown_0018 = this->unknown_00CC = value; + settings->password = this->roomSettingsText = value; break; } case 0x5019: @@ -1119,19 +1119,19 @@ UICntWnd::UICntWnd() // OFFSET: 0x008A37F0 // FUNCTION: fn_11658 UIHomunInfoWnd::UIHomunInfoWnd() : UIFrameWnd(0) { - this->unknown_00D4 = nullptr; - this->unknown_00D0 = nullptr; + this->autoFeedCheckBox = nullptr; + this->feedConfirmation = nullptr; } // OFFSET: 0x008A3860 // FUNCTION: fn_11659 UILoginOTPWnd::UILoginOTPWnd() - : UIFrameWnd(0), unknown_00B4(0), unknown_00B8(0), timerText(nullptr), unknown_00C0(0) { + : UIFrameWnd(0), authCodeEdit(0), inputState(0), timerText(nullptr), timerState(0) { } // OFFSET: 0x008A38E0 // FUNCTION: fn_11660 -UILoginWnd::UILoginWnd() : UIFrameWnd(0), unknown_00D8(), unknown_00E8(0), unknown_00EC("G000") { +UILoginWnd::UILoginWnd() : UIFrameWnd(0), savedAccounts(), loginTypeCombo(0), loginExtra("G000") { this->idEdit = nullptr; this->passwordEdit = nullptr; this->unknown_00C4 = 0; @@ -1139,5 +1139,5 @@ UILoginWnd::UILoginWnd() : UIFrameWnd(0), unknown_00D8(), unknown_00E8(0), unkno this->unknown_00CC = 1; this->unknown_00D0 = 0; this->unknown_00D4 = 0; - this->unknown_00BC = nullptr; + this->backgroundWindow = nullptr; } diff --git a/Source/UI/Window/UIHomunInfoWnd.h b/Source/UI/Window/UIHomunInfoWnd.h index 70060fae6..2d3920a99 100644 --- a/Source/UI/Window/UIHomunInfoWnd.h +++ b/Source/UI/Window/UIHomunInfoWnd.h @@ -27,8 +27,8 @@ public: /* 00C4 */ UIINT64BarGraph* expBar; /* 00C8 */ UIBarGraph4* intimacyBar; /* 00CC */ HomunInfoWndInfo* saved; - /* 00D0 */ UINormalMB* unknown_00D0; - /* 00D4 */ UICheckBox* unknown_00D4; + /* 00D0 */ UINormalMB* feedConfirmation; + /* 00D4 */ UICheckBox* autoFeedCheckBox; }; diff --git a/Source/UI/Window/UIHotKeyWnd.cpp b/Source/UI/Window/UIHotKeyWnd.cpp index 9b892f05a..40c7e02f9 100644 --- a/Source/UI/Window/UIHotKeyWnd.cpp +++ b/Source/UI/Window/UIHotKeyWnd.cpp @@ -89,14 +89,14 @@ void UIHotKeyWnd::OnCreate(int, int) { this->m_balloon->Show(0); g_windowMgr.AddRendered(this->m_balloon); - this->unknown_0100 = new UITabControl(); - this->unknown_0100->Configure(1, this->unknown_00C4 - 3, 20, 1, 1, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0100->Move(this->unknown_00C8, this->unknown_00CC + this->unknown_00BC); - this->AddChild(this->unknown_0100); + this->m_tabs = new UITabControl(); + this->m_tabs->Configure(1, this->m_tabHeight - 3, 20, 1, 1, 0, 0, 0, 0, 0, 0, 0); + this->m_tabs->Move(this->m_horizontalMargin, this->m_verticalMargin + this->m_titleHeight); + this->AddChild(this->m_tabs); const char* tabs[4] = {LookupMessage(MSI_HOTKEYWND_TAB1), LookupMessage(MSI_HOTKEYGUIDEWND_UP), LookupMessage(MSI_HOTKEYWND_TAB2), LookupMessage(MSI_HOTKEYWND_TAB3)}; for (int index = 0; index < 4; ++index) { - this->unknown_0100->AddTab(tabs[index], ""); + this->m_tabs->AddTab(tabs[index], ""); } { @@ -129,12 +129,12 @@ void UIHotKeyWnd::OnCreate(int, int) { } UICheckBox* checkBox = new UICheckBox(); - this->unknown_0108 = checkBox; + this->m_optionCheckBox = checkBox; checkBox->SetSize(150, 12); checkBox->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_CHATMODE_ONOFF)); checkBox->Move(80, this->geometry.height - 22); checkBox->SetChecked(g_windowMgr.chatModeChanged); - this->AddChild(this->unknown_0108); + this->AddChild(this->m_optionCheckBox); this->m_prevButton = new UIBitmapButton(); UIBitmapButton* prevButton = static_cast(this->m_prevButton); @@ -185,8 +185,8 @@ void UIHotKeyWnd::UpdatePageButtons() { // OFFSET: 0x00911300 // FUNCTION: fn_12513 UIHotKeyWnd::UIHotKeyWnd() - : UIFrameWnd(0), m_selectedRow(-1), m_rowsPerPage(18), unknown_00BC(17), unknown_00C0(0), unknown_00C4(20), unknown_00C8(3), unknown_00CC(3), - unknown_00D0(20), unknown_00D4(80), unknown_00D8(135), m_balloon(nullptr), m_tab(0), m_page(1), m_pageCount(0), unknown_0114(0) { + : UIFrameWnd(0), m_selectedRow(-1), m_rowsPerPage(18), m_titleHeight(17), m_buttonBarHeight(0), m_tabHeight(20), m_horizontalMargin(3), m_verticalMargin(3), + m_rowHeight(20), m_keyColumnWidth(80), m_descriptionColumnWidth(135), m_balloon(nullptr), m_tab(0), m_page(1), m_pageCount(0), m_paged(0) { } // OFFSET: 0x00916760 @@ -222,19 +222,19 @@ void UIHotKeyWnd::SaveHotkeys() { // OFFSET: 0x0091BD80 // FUNCTION: fn_12609 int UIHotKeyWnd::RowFromPoint(int x, int y) { - if (x < this->unknown_00C8 || x > this->geometry.width - this->unknown_00C8) { + if (x < this->m_horizontalMargin || x > this->geometry.width - this->m_horizontalMargin) { return -1; } - if (y < this->unknown_00C4 + this->unknown_00BC + this->unknown_00CC) { + if (y < this->m_tabHeight + this->m_titleHeight + this->m_verticalMargin) { return -1; } - if (y > (this->geometry.height - this->unknown_00C0) - this->unknown_00CC) { + if (y > (this->geometry.height - this->m_buttonBarHeight) - this->m_verticalMargin) { return -1; } - int row = (((y - this->unknown_00BC) - this->unknown_00C4) - this->unknown_00CC) / this->unknown_00D0; + int row = (((y - this->m_titleHeight) - this->m_tabHeight) - this->m_verticalMargin) / this->m_rowHeight; if (x > this->geometry.width / 2) { row += this->m_rowsPerPage; } @@ -250,7 +250,7 @@ int UIHotKeyWnd::RowFromPoint(int x, int y) { // OFFSET: 0x00930B80 // FUNCTION: fn_12693 void UIHotKeyWnd::OnLBtnDown(int x, int y) { - if (y < this->unknown_00BC) { + if (y < this->m_titleHeight) { UIFrameWnd::OnLBtnDown(x, y); } @@ -272,7 +272,7 @@ void UIHotKeyWnd::OnLBtnDown(int x, int y) { this->m_balloon->m_outlineColor = 0; this->m_balloon->Move( (this->geometry.width - this->m_balloon->geometry.width) / 2 + screenX, - (this->m_selectedRow % this->m_rowsPerPage - 1) * this->unknown_00D0 + this->unknown_00CC + this->unknown_00C4 + screenY + this->unknown_00BC + (this->m_selectedRow % this->m_rowsPerPage - 1) * this->m_rowHeight + this->m_verticalMargin + this->m_tabHeight + screenY + this->m_titleHeight ); this->m_balloon->Show(1); g_windowMgr.Promote(this->m_balloon); @@ -320,7 +320,7 @@ void UIHotKeyWnd::OnMouseHover(int x, int y) { int screenX = 0; int screenY = 0; const int x0 = this->geometry.width / 2 * column + 0x14; - const int y0 = (row - 1) * this->unknown_00D0 + this->unknown_00CC + this->unknown_00C4 + this->unknown_00BC; + const int y0 = (row - 1) * this->m_rowHeight + this->m_verticalMargin + this->m_tabHeight + this->m_titleHeight; this->ToScreen(screenX, screenY); const HotkeyEntry entry = this->GetHotkey(this->m_tab, index + (this->m_page * 9 - 9) * 4, true); @@ -344,9 +344,9 @@ void UISerachStoreInfoWnd::OnMouseHover(int x, int y) { std::string text; if (static_cast(x - 51) <= 108) { - const auto entry = g_session.unknown_5BD4.begin() + ((this->unknown_00DC - 1) * 10 + this->unknown_00E0); - if (entry != g_session.unknown_5BD4.end()) { - text.assign(reinterpret_cast(&entry->unknown_0000[8])); + const auto entry = g_session.storeSearchResults.begin() + ((this->m_page - 1) * 10 + this->m_hoverRow); + if (entry != g_session.storeSearchResults.end()) { + text.assign(reinterpret_cast(&entry->storeIdentity[8])); const std::size_t end = text.find('\r'); if (end != std::string::npos) { text = text.substr(0, end); @@ -375,20 +375,20 @@ void UISerachStoreInfoWnd::OnMouseHover(int x, int y) { // OFFSET: 0x0092BEC0 // FUNCTION: fn_12663 void UIHotKeyWnd::Paint() { - if (this->geometry.height == this->unknown_00BC) { + if (this->geometry.height == this->m_titleHeight) { return; } - this->unknown_00BC = this->DrawTitleBar(true, LookupMessage(MSI_HOTKEYWND_TITLE), 0); - this->unknown_00C0 = this->DrawButtonBar(2, 0, 1); - this->DrawPanelBackground(this->unknown_00BC, 0, ""); + this->m_titleHeight = this->DrawTitleBar(true, LookupMessage(MSI_HOTKEYWND_TITLE), 0); + this->m_buttonBarHeight = this->DrawButtonBar(2, 0, 1); + this->DrawPanelBackground(this->m_titleHeight, 0, ""); const int count = HotkeyCount(*g_session.m_hotkeyScript, this->m_tab); int visibleRow = 0; for (int row = 0; row < count; ++row) { - if (this->unknown_0114 && row < 36 * this->m_page - 36) { + if (this->m_paged && row < 36 * this->m_page - 36) { continue; } if (row >= 36 * this->m_page) { @@ -407,15 +407,15 @@ void UIHotKeyWnd::Paint() { const int halfWidth = this->geometry.width / 2; const int column = visibleRow / this->m_rowsPerPage; - const int rowY = this->unknown_00BC + this->unknown_00C4 + this->unknown_00CC + - (visibleRow % this->m_rowsPerPage) * this->unknown_00D0; + const int rowY = this->m_titleHeight + this->m_tabHeight + this->m_verticalMargin + + (visibleRow % this->m_rowsPerPage) * this->m_rowHeight; const int textWidth = this->TextWidth(text.c_str(), 0, 0, 12, 0, 0); - const int textX = (this->unknown_00D4 - textWidth) / 2; + const int textX = (this->m_keyColumnWidth - textWidth) / 2; - const int backgroundX = column ? this->geometry.width - this->unknown_00D4 - this->unknown_00C8 - : halfWidth - this->unknown_00D4; - const int keyX = column ? halfWidth : this->unknown_00C8; + const int backgroundX = column ? this->geometry.width - this->m_keyColumnWidth - this->m_horizontalMargin + : halfWidth - this->m_keyColumnWidth; + const int keyX = column ? halfWidth : this->m_horizontalMargin; std::uint32_t color = 0xDFFFFE; switch (this->m_tab) { @@ -429,18 +429,18 @@ void UIHotKeyWnd::Paint() { break; } - this->FillRegion(backgroundX, rowY, this->unknown_00D4, this->unknown_00D0 - 1, color); + this->FillRegion(backgroundX, rowY, this->m_keyColumnWidth, this->m_rowHeight - 1, color); if (visibleRow == this->m_selectedRow) { - this->FillRegion(keyX + 1, rowY, halfWidth - this->unknown_00C8 - 1, 19, 0xE1E1FF); + this->FillRegion(keyX + 1, rowY, halfWidth - this->m_horizontalMargin - 1, 19, 0xE1E1FF); } - this->FillRegion(keyX, rowY - 1 + this->unknown_00D0, this->unknown_00D4 + this->unknown_00D8, 1, 0xC0C0C0); - this->FillRegion(backgroundX, rowY, 1, this->unknown_00D0, 0xC0C0C0); + this->FillRegion(keyX, rowY - 1 + this->m_rowHeight, this->m_keyColumnWidth + this->m_descriptionColumnWidth, 1, 0xC0C0C0); + this->FillRegion(backgroundX, rowY, 1, this->m_rowHeight, 0xC0C0C0); const std::string fitted = this->FitDisplayText(130, entry.info.description.c_str(), 0, 12, 0); const int fittedWidth = this->TextWidth(fitted.c_str(), 0, 0, 12, 0, 0); - const int descriptionX = keyX + (halfWidth - this->unknown_00C8 - this->unknown_00D4 - fittedWidth) / 2; + const int descriptionX = keyX + (halfWidth - this->m_horizontalMargin - this->m_keyColumnWidth - fittedWidth) / 2; this->DrawTextAt(descriptionX, rowY + 5, fitted.c_str(), 0, 0, 12, 0, 0, 0); this->DrawTextAt(textX + backgroundX, rowY + 5, text.c_str(), 0, 0, 12, 0, 0, 0); @@ -448,7 +448,7 @@ void UIHotKeyWnd::Paint() { ++visibleRow; } - if (this->unknown_0114) { + if (this->m_paged) { const std::string pages = FormatOwnedString("%d / %d", this->m_page, this->m_pageCount); const int pagesWidth = this->TextWidth(pages.c_str(), 0, 0, 12, 0, 0); const int pageX = @@ -462,19 +462,19 @@ void UIHotKeyWnd::Paint() { DrawOutlinedText(*this, pageX + currentWidth, 25, total.c_str(), 0, 0x666666, 0xFFFFFF, 0, 11, 1, 0); } - const int bottomY = this->unknown_00BC + this->unknown_00C4 + this->unknown_00CC; - const int innerWidth = this->geometry.width - 2 * this->unknown_00C8; + const int bottomY = this->m_titleHeight + this->m_tabHeight + this->m_verticalMargin; + const int innerWidth = this->geometry.width - 2 * this->m_horizontalMargin; const int innerHeight = - this->geometry.height - 2 * this->unknown_00CC - this->unknown_00C4 - this->unknown_00BC - this->unknown_00C0; + this->geometry.height - 2 * this->m_verticalMargin - this->m_tabHeight - this->m_titleHeight - this->m_buttonBarHeight; - DrawRectangleBorder(*this, this->unknown_00C8, bottomY, innerWidth, innerHeight, 0xC0C0C0); + DrawRectangleBorder(*this, this->m_horizontalMargin, bottomY, innerWidth, innerHeight, 0xC0C0C0); this->FillRegion(this->geometry.width / 2, bottomY, 1, innerHeight, 0xC0C0C0); - this->FillRegion(this->unknown_00C8, bottomY - 3, 1, 3, 0xC0C0C0); - this->FillRegion(this->geometry.width - this->unknown_00C8 - 1, bottomY - 3, 1, 3, 0xC0C0C0); + this->FillRegion(this->m_horizontalMargin, bottomY - 3, 1, 3, 0xC0C0C0); + this->FillRegion(this->geometry.width - this->m_horizontalMargin - 1, bottomY - 3, 1, 3, 0xC0C0C0); this->FillRegion( - this->unknown_0100->geometry.width + this->unknown_00C8, + this->m_tabs->geometry.width + this->m_horizontalMargin, bottomY - 3, - innerWidth - this->unknown_0100->geometry.width, + innerWidth - this->m_tabs->geometry.width, 1, 0xC0C0C0 ); @@ -541,7 +541,7 @@ bool UIHotKeyWnd::AssignSelectedHotkey(int mode) { this->ToScreen(screenX, screenY); const int balloonY = - (this->m_selectedRow % this->m_rowsPerPage - 1) * this->unknown_00D0 + this->unknown_00CC + this->unknown_00C4 + this->unknown_00BC; + (this->m_selectedRow % this->m_rowsPerPage - 1) * this->m_rowHeight + this->m_verticalMargin + this->m_tabHeight + this->m_titleHeight; this->m_balloon->SetText(LookupMessage(MSI_HOTKEYWND_NOTICE1), 0x3C); this->m_balloon->m_textColor = 0xFFFFFF; this->m_balloon->m_outlineColor = 0; @@ -700,7 +700,7 @@ int UIHotKeyWnd::SendMsg( g_windowMgr.CloseWindow(WID_HOTKEYWND); return 0; case ID_CHECK: - if (sender != this->unknown_0108) { + if (sender != this->m_optionCheckBox) { return 0; } @@ -736,7 +736,7 @@ int UIHotKeyWnd::SendMsg( if (message == UM_TAB) { if (sender == g_windowMgr.LookupWindow(WID_HOTKEYGUIDEWND)) { - this->unknown_0100->SelectTab(static_cast(argument1)); + this->m_tabs->SelectTab(static_cast(argument1)); return 0; } @@ -752,12 +752,12 @@ int UIHotKeyWnd::SendMsg( this->m_selectedRow = -1; this->m_tab = tab; - this->unknown_0114 = 0; + this->m_paged = 0; this->m_page = 1; const int count = HotkeyCount(*g_session.m_hotkeyScript, tab); if (count > 36) { - this->unknown_0114 = 1; + this->m_paged = 1; this->m_pageCount = count / 36; if (count % 36 != 0) { ++this->m_pageCount; diff --git a/Source/UI/Window/UIHotKeyWnd.h b/Source/UI/Window/UIHotKeyWnd.h index 2e1b20605..3324499bd 100644 --- a/Source/UI/Window/UIHotKeyWnd.h +++ b/Source/UI/Window/UIHotKeyWnd.h @@ -37,22 +37,22 @@ public: /* 00B4 */ int m_selectedRow; /* 00B8 */ int m_rowsPerPage; - /* 00BC */ int unknown_00BC; - /* 00C0 */ int unknown_00C0; - /* 00C4 */ int unknown_00C4; - /* 00C8 */ int unknown_00C8; - /* 00CC */ int unknown_00CC; - /* 00D0 */ int unknown_00D0; - /* 00D4 */ int unknown_00D4; - /* 00D8 */ int unknown_00D8; + /* 00BC */ int m_titleHeight; + /* 00C0 */ int m_buttonBarHeight; + /* 00C4 */ int m_tabHeight; + /* 00C8 */ int m_horizontalMargin; + /* 00CC */ int m_verticalMargin; + /* 00D0 */ int m_rowHeight; + /* 00D4 */ int m_keyColumnWidth; + /* 00D8 */ int m_descriptionColumnWidth; /* 00DC */ std::map hotkeys[4]; /* 00FC */ UIBalloonText* m_balloon; - /* 0100 */ UITabControl* unknown_0100; + /* 0100 */ UITabControl* m_tabs; /* 0104 */ int m_tab; - /* 0108 */ UIWindow* unknown_0108; + /* 0108 */ UIWindow* m_optionCheckBox; /* 010C */ int m_page; /* 0110 */ int m_pageCount; - /* 0114 */ unsigned char unknown_0114; + /* 0114 */ unsigned char m_paged; /* 0115 */ unsigned char unknown_0115[0x3]; /* 0118 */ UIButton* m_prevButton; /* 011C */ UIButton* m_nextButton; diff --git a/Source/UI/Window/UIJobListWnd.cpp b/Source/UI/Window/UIJobListWnd.cpp index bfa21f68c..c2f6a1e46 100644 --- a/Source/UI/Window/UIJobListWnd.cpp +++ b/Source/UI/Window/UIJobListWnd.cpp @@ -117,7 +117,7 @@ int UIJobListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1 std::int16_t job = -1; bool enabled = false; if (check != nullptr) { - if (check->geometry.unknown_0030 != 0) { + if (check->geometry.state != 0) { ++selected; enabled = true; job = static_cast(it->first); @@ -184,5 +184,5 @@ void UIJobListWnd::RefreshJobs() { // OFFSET: 0x00911410 // FUNCTION: fn_12514 UIJobListWnd::UIJobListWnd() - : UIFrameWnd(0), m_title(nullptr), m_okButton(nullptr), unknown_00E8(0) { + : UIFrameWnd(0), m_title(nullptr), m_okButton(nullptr), m_selectionState(0) { } diff --git a/Source/UI/Window/UIJobListWnd.h b/Source/UI/Window/UIJobListWnd.h index 62191e8df..2dd19758b 100644 --- a/Source/UI/Window/UIJobListWnd.h +++ b/Source/UI/Window/UIJobListWnd.h @@ -26,7 +26,7 @@ protected: /* 00B8 */ UICheckBox* m_jobChecks[6]; /* 00D0 */ UIBitmapButton* m_okButton; /* 00D4 */ unsigned char unknown_00D4[0x14]; - /* 00E8 */ int unknown_00E8; + /* 00E8 */ int m_selectionState; /* 00EC */ JobListWndInfo* m_saved; }; diff --git a/Source/UI/Window/UILocaleTextWnd.cpp b/Source/UI/Window/UILocaleTextWnd.cpp index 9a82aca91..7a2fe04d9 100644 --- a/Source/UI/Window/UILocaleTextWnd.cpp +++ b/Source/UI/Window/UILocaleTextWnd.cpp @@ -46,102 +46,102 @@ namespace AdventureGuide { // OFFSET: 0x009D1830 // FUNCTION: fn_14008 void CUISubTab::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(98, 26); - this->unknown_00E8->Move(0, 0); - this->unknown_00E8->SetText(""); - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(6, 6); + this->labelText = new CUIStaticText(); + this->labelText->SetSize(98, 26); + this->labelText->Move(0, 0); + this->labelText->SetText(""); + this->labelText->SetFitText(0); + this->labelText->SetAlign(6, 6); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->labelText; const std::uint8_t fontSource[] = {0x16, 0x82, 0x37, 0x1E, 0xF0, 0xA1}; thread_local EncryptedName fontName(fontSource); text->SetFont(fontName.Text()); } - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(1); - this->unknown_00E8->SetColor(0x5F3C2C); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->labelText->SetFontHeight(12); + this->labelText->SetBold(1); + this->labelText->SetColor(0x5F3C2C); + this->labelText->SetShadow(0, 0xFFFFFF); + this->labelText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->labelText); - this->unknown_00EC = new CUIStaticImage(); - this->unknown_00EC->SetSize(40, 26); - this->unknown_00EC->Move(58, 0); + this->stampImage = new CUIStaticImage(); + this->stampImage->SetSize(40, 26); + this->stampImage->Move(58, 0); { - CUIStaticImage* stamp = this->unknown_00EC; + CUIStaticImage* stamp = this->stampImage; const char stampSource[] = {'\x9D', '\x44', '\xB3', '\xB3', '\x5B', '\x87', '\xA4', '\xC2', '\x9B', '\x0F', '\xB3', '\x85', '\x26', '\xF3', '\x3D', '\x4E', '\x39', '\x9D', '\x16', '\x27', '\xEF', '\x3C', '\x13', '\x6A', '\x1A', '\x9E', '\x1A', '\x2D', '\xFE', '\x15', '\x12', '\x7B', '\x3C', '\x86', '\x03', '\x16', '\xF8', '\x26', '\x0C', '\x7F', '\x31', '\x8E', '\x07', '\x2C', '\xFF', '\x16', '\x12', '\x7A', '\x3F', '\xC5', '\x11', '\x24', '\xEB', '\x49'}; thread_local EncryptedName stampName(stampSource); stamp->SetImage(stampName.Text()); } - this->AddChild(this->unknown_00EC); + this->AddChild(this->stampImage); } // OFFSET: 0x009D1C80 // FUNCTION: fn_14009 void CUITab::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(98, 40); - this->unknown_00E8->Move(0, 0); - this->unknown_00E8->SetText(""); - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(6, 6); + this->labelText = new CUIStaticText(); + this->labelText->SetSize(98, 40); + this->labelText->Move(0, 0); + this->labelText->SetText(""); + this->labelText->SetFitText(0); + this->labelText->SetAlign(6, 6); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->labelText; const std::uint8_t fontSource[] = {0xBA, 0xC0, 0x5F, 0x86, 0x3C, 0x37}; thread_local EncryptedName fontName(fontSource); text->SetFont(fontName.Text()); } - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(1); - this->unknown_00E8->SetColor(0x5F3C2C); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->labelText->SetFontHeight(12); + this->labelText->SetBold(1); + this->labelText->SetColor(0x5F3C2C); + this->labelText->SetShadow(0, 0xFFFFFF); + this->labelText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->labelText); } // OFFSET: 0x009D1F00 // FUNCTION: fn_14010 void CUITabInfo::OnCreate(int width, int height) { - this->unknown_00E8 = new CUIStaticText(); - this->unknown_00E8->SetSize(90, 44); - this->unknown_00E8->Move(32, 0); - this->unknown_00E8->SetText(""); - this->unknown_00E8->SetFitText(0); - this->unknown_00E8->SetAlign(0, 6); + this->titleText = new CUIStaticText(); + this->titleText->SetSize(90, 44); + this->titleText->Move(32, 0); + this->titleText->SetText(""); + this->titleText->SetFitText(0); + this->titleText->SetAlign(0, 6); { - CUIStaticText* text = this->unknown_00E8; + CUIStaticText* text = this->titleText; const std::uint8_t fontSource[] = {0x28, 0x08, 0x97, 0x4A, 0x1C, 0x07}; thread_local EncryptedName fontName(fontSource); text->SetFont(fontName.Text()); } - this->unknown_00E8->SetFontHeight(12); - this->unknown_00E8->SetBold(1); - this->unknown_00E8->SetColor(0x815A48); - this->unknown_00E8->SetShadow(0, 0xFFFFFF); - this->unknown_00E8->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00E8); + this->titleText->SetFontHeight(12); + this->titleText->SetBold(1); + this->titleText->SetColor(0x815A48); + this->titleText->SetShadow(0, 0xFFFFFF); + this->titleText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->titleText); - this->unknown_00EC = new CUIStaticText(); - this->unknown_00EC->SetSize(442, 44); - this->unknown_00EC->Move(140, 0); - this->unknown_00EC->SetText(""); - this->unknown_00EC->SetFitText(1); - this->unknown_00EC->SetAlign(0, 6); + this->descriptionText = new CUIStaticText(); + this->descriptionText->SetSize(442, 44); + this->descriptionText->Move(140, 0); + this->descriptionText->SetText(""); + this->descriptionText->SetFitText(1); + this->descriptionText->SetAlign(0, 6); { - CUIStaticText* text = this->unknown_00EC; + CUIStaticText* text = this->descriptionText; const std::uint8_t fontSource[] = {0x04, 0x5C, 0x3F, 0x4E, 0xB8, 0xBF}; thread_local EncryptedName fontName(fontSource); text->SetFont(fontName.Text()); } - this->unknown_00EC->SetFontHeight(12); - this->unknown_00EC->SetBold(0); - this->unknown_00EC->SetColor(0x2A435D); - this->unknown_00EC->SetShadow(0, 0xFFFFFF); - this->unknown_00EC->SetOutline(0, 0xFFFFFF); - this->AddChild(this->unknown_00EC); + this->descriptionText->SetFontHeight(12); + this->descriptionText->SetBold(0); + this->descriptionText->SetColor(0x2A435D); + this->descriptionText->SetShadow(0, 0xFFFFFF); + this->descriptionText->SetOutline(0, 0xFFFFFF); + this->AddChild(this->descriptionText); } } diff --git a/Source/UI/Window/UILoginOTPWnd.h b/Source/UI/Window/UILoginOTPWnd.h index 318c45c7a..0da006902 100644 --- a/Source/UI/Window/UILoginOTPWnd.h +++ b/Source/UI/Window/UILoginOTPWnd.h @@ -15,10 +15,10 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; - /* 00B4 */ UIEditCtrl* unknown_00B4; - /* 00B8 */ int unknown_00B8; + /* 00B4 */ UIEditCtrl* authCodeEdit; + /* 00B8 */ int inputState; /* 00BC */ UIStaticText* timerText; - /* 00C0 */ int unknown_00C0; + /* 00C0 */ int timerState; }; #endif diff --git a/Source/UI/Window/UILoginWnd.h b/Source/UI/Window/UILoginWnd.h index a00ca8e46..e9026f426 100644 --- a/Source/UI/Window/UILoginWnd.h +++ b/Source/UI/Window/UILoginWnd.h @@ -27,7 +27,7 @@ public: /* 00B4 */ UIEditCtrl_Custom* idEdit; /* 00B8 */ UIEditCtrl_Custom* passwordEdit; - /* 00BC */ UIWindow* unknown_00BC; + /* 00BC */ UIWindow* backgroundWindow; /* 00C0 */ bool idPlaceholder; /* 00C1 */ bool passwordPlaceholder; /* 00C2 */ unsigned char unknown_00C2[0x2]; @@ -36,10 +36,10 @@ public: /* 00CC */ int unknown_00CC; /* 00D0 */ int unknown_00D0; /* 00D4 */ int unknown_00D4; - /* 00D8 */ std::vector unknown_00D8; - /* 00E4 */ int unknown_00E4; - /* 00E8 */ UIComboBoxDef2Wnd* unknown_00E8; - /* 00EC */ const char* unknown_00EC; + /* 00D8 */ std::vector savedAccounts; + /* 00E4 */ int accountListOpen; + /* 00E8 */ UIComboBoxDef2Wnd* loginTypeCombo; + /* 00EC */ const char* loginExtra; }; extern const char* g_webPageUrl; diff --git a/Source/UI/Window/UIMakeCharWnd.h b/Source/UI/Window/UIMakeCharWnd.h index 48ac98f55..b4ff2567e 100644 --- a/Source/UI/Window/UIMakeCharWnd.h +++ b/Source/UI/Window/UIMakeCharWnd.h @@ -24,12 +24,12 @@ public: /* 00B8 */ CharacterInfo m_info; /* 0167 */ unsigned char unknown_0167; /* 0168 */ CharSlotInfo m_view; - /* 02C4 */ UIBitmapButton* unknown_02C4; - /* 02C8 */ UIBitmapButton* unknown_02C8; - /* 02CC */ UIScrollBar* unknown_02CC; - /* 02D0 */ UIScrollBar* unknown_02D0; - /* 02D4 */ int unknown_02D4; - /* 02D8 */ int unknown_02D8; + /* 02C4 */ UIBitmapButton* m_rotateLeftButton; + /* 02C8 */ UIBitmapButton* m_rotateRightButton; + /* 02CC */ UIScrollBar* m_hairStyleBar; + /* 02D0 */ UIScrollBar* m_hairColorBar; + /* 02D4 */ int m_hairStyle; + /* 02D8 */ int m_hairColor; }; #endif diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index 66e11eac6..505b6c3ca 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -162,8 +162,8 @@ namespace { // OFFSET: 0x008A39C0 // FUNCTION: fn_11661 UIMakeCharWnd::UIMakeCharWnd() - : UIFrameWnd(0), unknown_02C4(0), unknown_02C8(0), unknown_02CC(0), unknown_02D0(0), unknown_02D4(0), unknown_02D8(0) { - this->geometry.unknown_0034 = 0; + : UIFrameWnd(0), m_rotateLeftButton(0), m_rotateRightButton(0), m_hairStyleBar(0), m_hairColorBar(0), m_hairStyle(0), m_hairColor(0) { + this->geometry.animationFrame = 0; this->m_nameEdit = nullptr; this->m_info.sex = static_cast(g_session.m_sex); @@ -193,7 +193,7 @@ UIMakeCharWnd::UIMakeCharWnd() this->m_info.shield = 0; this->m_info.accessory2 = 0; this->m_info.accessory3 = 0; - this->m_view.unknown_0148 = 0; + this->m_view.actionBase = 0; this->m_view.action = 0; this->m_view.frame = 0; this->m_view.x = 70; @@ -214,7 +214,7 @@ UIMakeCharWnd::UIMakeCharWnd() this->m_info.head = static_cast(head); this->m_view.bodyPalette = bodyPalette; if (bodyPalette) { - this->m_view.bodyPaletteName.assign(g_session.GetBodyPalName(this->m_info.job, this->m_info.sex, bodyPalette, this->m_info.unknown_0058, 0, 0)); + this->m_view.bodyPaletteName.assign(g_session.GetBodyPalName(this->m_info.job, this->m_info.sex, bodyPalette, this->m_info.bodyCostume, 0, 0)); } const int headPalette = this->m_info.headPalette; @@ -223,7 +223,7 @@ UIMakeCharWnd::UIMakeCharWnd() this->m_view.headPaletteName.assign(g_session.GetHeadPalName(head, this->m_info.job, this->m_info.sex, headPalette)); } - this->m_view.imfName = GetBodyImfName(this->m_info.job, this->m_info.sex, this->m_info.head, this->m_info.unknown_0058); + this->m_view.imfName = GetBodyImfName(this->m_info.job, this->m_info.sex, this->m_info.head, this->m_info.bodyCostume); this->geometry.currentAlpha = 0x80; this->geometry.targetAlpha = 0xFF; } @@ -251,7 +251,7 @@ UIMessageBoxAutoreturn::UIMessageBoxAutoreturn() : UIFrameWnd(0) { UIMonsterInfoWnd::UIMonsterInfoWnd() : UIFrameWnd(0) { std::memset(&this->info, 0, offsetof(MonsterInfo, resistances) + sizeof(this->info.resistances)); - this->unknown_00D4 = 0; + this->actorId = 0; } // INLINED @@ -335,7 +335,7 @@ void UIMakeCharWnd::Paint() { if (i == 1) { CActRes* body = static_cast(ResourceMgr::Instance().Load(this->m_view.actionNames[0].c_str())); const ActionFrame& bodyFrame = body->Frame(this->m_view.action, this->m_view.frame); - if (frame.anchorCount != 0 && bodyFrame.anchorCount != 0 && frame.anchors[0].unknown_0008 == bodyFrame.anchors[0].unknown_0008) { + if (frame.anchorCount != 0 && bodyFrame.anchorCount != 0 && frame.anchors[0].attachmentId == bodyFrame.anchors[0].attachmentId) { offset.x += bodyFrame.anchors[0].x - frame.anchors[0].x; offset.y += bodyFrame.anchors[0].y - frame.anchors[0].y; } @@ -367,12 +367,12 @@ void UIMakeCharWnd::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } this->geometry.surface->DrawSurface( this->m_view.x + cell.x + offset.x, this->m_view.y + cell.y + offset.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -745,7 +745,7 @@ void UIMessageBox::OnProcess() { } if (timeGetTime() > this->deadline) { - g_windowMgr.unknown_0474 = 187; + g_windowMgr.modalResponse = 187; this->counting = 0; return; } @@ -779,7 +779,7 @@ int UIMessageBox::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i this->RecordResponse(static_cast(a), b, c, d); if (this->modal != 0) { - g_windowMgr.unknown_0474 = static_cast(a); + g_windowMgr.modalResponse = static_cast(a); } else { switch (a) { case ID_OK: @@ -813,7 +813,7 @@ int UIMessageBoxAutoreturn::SendMsg(UIWindow* sender, int message, std::intptr_t return UIFrameWnd::SendMsg(sender, message, a, b, c, d); } - g_windowMgr.unknown_0474 = static_cast(a); + g_windowMgr.modalResponse = static_cast(a); return 0; } @@ -876,7 +876,7 @@ int UITalkboxTrapInputWnd::SendMsg(UIWindow* sender, int message, std::intptr_t // OFFSET: 0x008C1ED0 // FUNCTION: fn_11818 void UIWindowMgr::SetUnknown04DC(const char* text) { - this->unknown_04DC = text; + this->chatInputText = text; } // OFFSET: 0x008C35A0 @@ -985,7 +985,7 @@ int UIMerInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i g_windowMgr.CloseWindow(WID_MERINFOWND); g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_1); g_session.ResetMercenaryStats(); - g_session.unknown_56B0 = 0; + g_session.mercenaryAlive = 0; return 0; } @@ -1047,15 +1047,15 @@ void UILoginOTPWnd::OnCreate(int, int) { thread_local EncryptedName prefixName(prefixSource); const std::string prefix(prefixName.Text()); - this->unknown_00B4 = new UIEditCtrl(); - this->unknown_00B4->SetSize(80, 16); - this->unknown_00B4->maximum = 8; - this->unknown_00B4->Move(99, 95); - this->unknown_00B4->mask = '*'; - this->unknown_00B4->Background(243, 243, 243); - this->AddChild(this->unknown_00B4); - this->unknown_00B4->SetText(""); - g_windowMgr.SetFocus(this->unknown_00B4); + this->authCodeEdit = new UIEditCtrl(); + this->authCodeEdit->SetSize(80, 16); + this->authCodeEdit->maximum = 8; + this->authCodeEdit->Move(99, 95); + this->authCodeEdit->mask = '*'; + this->authCodeEdit->Background(243, 243, 243); + this->AddChild(this->authCodeEdit); + this->authCodeEdit->SetText(""); + g_windowMgr.SetFocus(this->authCodeEdit); UIStaticText* label = new UIStaticText(); label->SetSize(80, 20); @@ -1569,50 +1569,50 @@ void UIMakeCharWnd::InitHairControls() { this->AddChild(button); } - this->unknown_02C4 = new (std::nothrow) UIBitmapButton(); - this->unknown_02C4->SetBitmap("유저인터페이스\\scroll1left.bmp", 0, 0); - this->unknown_02C4->SetBitmap("유저인터페이스\\scroll1left.bmp", 1, 0); - this->unknown_02C4->SetBitmap("유저인터페이스\\scroll1left.bmp", 2, 0); - this->unknown_02C4->SetSize(this->unknown_02C4->BitmapWidth(), this->unknown_02C4->BitmapHeight()); - this->unknown_02C4->Move(20, 80); - this->unknown_02C4->SetId(227); - this->unknown_02C4->SetTooltip(LookupMessage(MSI_VIEW_BEFORE_WORLDINFO_TITLE)); - this->AddChild(this->unknown_02C4); + this->m_rotateLeftButton = new (std::nothrow) UIBitmapButton(); + this->m_rotateLeftButton->SetBitmap("유저인터페이스\\scroll1left.bmp", 0, 0); + this->m_rotateLeftButton->SetBitmap("유저인터페이스\\scroll1left.bmp", 1, 0); + this->m_rotateLeftButton->SetBitmap("유저인터페이스\\scroll1left.bmp", 2, 0); + this->m_rotateLeftButton->SetSize(this->m_rotateLeftButton->BitmapWidth(), this->m_rotateLeftButton->BitmapHeight()); + this->m_rotateLeftButton->Move(20, 80); + this->m_rotateLeftButton->SetId(227); + this->m_rotateLeftButton->SetTooltip(LookupMessage(MSI_VIEW_BEFORE_WORLDINFO_TITLE)); + this->AddChild(this->m_rotateLeftButton); - this->unknown_02C8 = new (std::nothrow) UIBitmapButton(); - this->unknown_02C8->SetBitmap("유저인터페이스\\scroll1right.bmp", 0, 0); - this->unknown_02C8->SetBitmap("유저인터페이스\\scroll1right.bmp", 1, 0); - this->unknown_02C8->SetBitmap("유저인터페이스\\scroll1right.bmp", 2, 0); - this->unknown_02C8->SetSize(this->unknown_02C4->BitmapWidth(), this->unknown_02C4->BitmapHeight()); - this->unknown_02C8->Move(110, 80); - this->unknown_02C8->SetId(226); - this->unknown_02C8->SetTooltip(LookupMessage(MSI_VIEW_BEFORE_SERVERINFO)); - this->AddChild(this->unknown_02C8); + this->m_rotateRightButton = new (std::nothrow) UIBitmapButton(); + this->m_rotateRightButton->SetBitmap("유저인터페이스\\scroll1right.bmp", 0, 0); + this->m_rotateRightButton->SetBitmap("유저인터페이스\\scroll1right.bmp", 1, 0); + this->m_rotateRightButton->SetBitmap("유저인터페이스\\scroll1right.bmp", 2, 0); + this->m_rotateRightButton->SetSize(this->m_rotateLeftButton->BitmapWidth(), this->m_rotateLeftButton->BitmapHeight()); + this->m_rotateRightButton->Move(110, 80); + this->m_rotateRightButton->SetId(226); + this->m_rotateRightButton->SetTooltip(LookupMessage(MSI_VIEW_BEFORE_SERVERINFO)); + this->AddChild(this->m_rotateRightButton); - this->unknown_02D4 = this->m_info.head - 1; - if (this->unknown_02D4 < 0) { - this->unknown_02D4 = 0; + this->m_hairStyle = this->m_info.head - 1; + if (this->m_hairStyle < 0) { + this->m_hairStyle = 0; } - this->unknown_02D8 = this->m_view.headPalette < 0 ? 0 : this->m_view.headPalette; + this->m_hairColor = this->m_view.headPalette < 0 ? 0 : this->m_view.headPalette; - this->unknown_02CC = new UIScrollBar(); - this->unknown_02CC->Configure(10, 190, 0, 130); - this->AddChild(this->unknown_02CC); + this->m_hairStyleBar = new UIScrollBar(); + this->m_hairStyleBar->Configure(10, 190, 0, 130); + this->AddChild(this->m_hairStyleBar); - this->unknown_02D0 = new UIScrollBar(); - this->unknown_02D0->Configure(10, 230, 0, 130); - this->AddChild(this->unknown_02D0); + this->m_hairColorBar = new UIScrollBar(); + this->m_hairColorBar->Configure(10, 230, 0, 130); + this->AddChild(this->m_hairColorBar); - if (this->unknown_02CC) { - this->unknown_02CC->SetRange(22, 1, 23); - this->unknown_02CC->Invalidate(); + if (this->m_hairStyleBar) { + this->m_hairStyleBar->SetRange(22, 1, 23); + this->m_hairStyleBar->Invalidate(); } - if (this->unknown_02D0) { - this->unknown_02D0->SetRange(8, 1, 9); - this->unknown_02D0->Invalidate(); + if (this->m_hairColorBar) { + this->m_hairColorBar->SetRange(8, 1, 9); + this->m_hairColorBar->Invalidate(); } - this->unknown_02CC->SetPosition(this->unknown_02D4); - this->unknown_02D0->SetPosition(this->unknown_02D8); + this->m_hairStyleBar->SetPosition(this->m_hairStyle); + this->m_hairColorBar->SetPosition(this->m_hairColor); } // OFFSET: 0x008B0B60 @@ -1746,7 +1746,7 @@ void UINoticeWnd::OnCreate(int, int) { int lines[20]; lines[0] = 0; int lineCount = 1; - this->unknown_0108 = 0; + this->lineCount = 0; for (int i = 0; i < patchSize; ++i) { const char c = patchText[i]; if (c == '\n') { @@ -1756,14 +1756,14 @@ void UINoticeWnd::OnCreate(int, int) { if (lineCount > 20) { lineCount = 20; } - ++this->unknown_0108; + ++this->lineCount; } else if (c == '\r') { patchText[i] = 0; } else if (c == '^') { const int previous = lineCount - 1; - this->m_bottomPositions[this->m_noticeCount] = this->unknown_0108 - 1; + this->m_bottomPositions[this->m_noticeCount] = this->lineCount - 1; ++this->m_noticeCount; - this->m_scrollPositions[this->m_noticeCount] = this->unknown_0108 + 1; + this->m_scrollPositions[this->m_noticeCount] = this->lineCount + 1; lineCount = previous < 0 ? 0 : previous; } else if (i < checkSize && static_cast(i) < 1000 && c != checkText[i]) { ++changed; @@ -1774,7 +1774,7 @@ void UINoticeWnd::OnCreate(int, int) { lineCount = 19; } - this->m_bottomPositions[this->m_noticeCount] = this->unknown_0108; + this->m_bottomPositions[this->m_noticeCount] = this->lineCount; if (changed == 0) { FILE* file = std::fopen("notice_read.txt", "rb"); @@ -1930,7 +1930,7 @@ void UIReplayRECControlWnd::OnCreate(int, int) { const bool pathEnabled = ReplayFileList::Instance().pathEnabled; this->fileOptions[0]->SetChecked(pathEnabled); this->replayPathEnabled = pathEnabled; - const bool option119 = ReplayFileList::Instance().unknown_0119; + const bool option119 = ReplayFileList::Instance().rejectExistingName; this->fileOptions[1]->SetChecked(option119); this->replayOption119 = option119; @@ -2084,7 +2084,7 @@ void UIMessageBoxAutoreturn::OnProcess() { } if (timeGetTime() > this->deadline) { - g_windowMgr.unknown_0474 = 187; + g_windowMgr.modalResponse = 187; this->counting = 0; return; } @@ -2372,8 +2372,8 @@ int UIReplayRECControlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t } if (sender == this->window_012C) { - ReplayFileList::Instance().unknown_0119 = b != 0; - this->replayOption119 = ReplayFileList::Instance().unknown_0119; + ReplayFileList::Instance().rejectExistingName = b != 0; + this->replayOption119 = ReplayFileList::Instance().rejectExistingName; return 0; } @@ -2399,11 +2399,11 @@ int UIReplayRECControlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t this->recordOptions[0] = b != 0; } else { if (b == 1) { - if (this->options[0]->geometry.unknown_0030 == 0) { + if (this->options[0]->geometry.state == 0) { static_cast(this->options[0])->SetChecked(1); this->recordOptions[0] = 1; } - } else if (this->options[9]->geometry.unknown_0030 == 1) { + } else if (this->options[9]->geometry.state == 1) { static_cast(this->options[9])->SetChecked(0); this->recordOptions[9] = 0; } @@ -2424,8 +2424,8 @@ int UIReplayRECControlWnd::SendMsg(UIWindow* sender, int message, std::intptr_t this->UpdateRecordTime(); return 0; case UM_SETPOS: - Replay::Instance().unknown_01F4 = this->geometry.x; - Replay::Instance().unknown_01F8 = this->geometry.y; + Replay::Instance().recordingState = this->geometry.x; + Replay::Instance().playbackState = this->geometry.y; return 0; case UM_REFRESH: this->Invalidate(); @@ -2554,34 +2554,34 @@ std::vector UIChatRoomWnd::SerializeReplayData() { records.insert(records.end(), record.begin(), record.end()); } { - const auto record = BuildReplayTaggedRecord(0x5018, this->unknown_00CC.data(), static_cast(this->unknown_00CC.size())); + const auto record = BuildReplayTaggedRecord(0x5018, this->roomSettingsText.data(), static_cast(this->roomSettingsText.size())); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = BuildReplayTaggedRecord(0x5019, this->unknown_00E4, 4); + const auto record = BuildReplayTaggedRecord(0x5019, this->roomStatusValues, 4); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = BuildReplayTaggedRecord(0x501A, this->unknown_00E4 + 4, 4); + const auto record = BuildReplayTaggedRecord(0x501A, this->roomStatusValues + 4, 4); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = BuildReplayTaggedRecord(0x501B, this->unknown_00E4 + 8, 4); + const auto record = BuildReplayTaggedRecord(0x501B, this->roomStatusValues + 8, 4); records.insert(records.end(), record.begin(), record.end()); } { - const auto record = BuildReplayTaggedRecord(0x501C, this->unknown_00E4 + 12, 4); + const auto record = BuildReplayTaggedRecord(0x501C, this->roomStatusValues + 12, 4); records.insert(records.end(), record.begin(), record.end()); } - for (const auto& entry : this->unknown_010C) { + for (const auto& entry : this->memberRoles) { if (entry.second == 0) { const auto record = BuildReplayTaggedRecord(0x501E, entry.first.data(), static_cast(entry.first.size())); records.insert(records.end(), record.begin(), record.end()); } } - for (const auto& entry : this->unknown_010C) { + for (const auto& entry : this->memberRoles) { if (entry.second != 0) { const auto record = BuildReplayTaggedRecord(0x501F, entry.first.data(), static_cast(entry.first.size())); records.insert(records.end(), record.begin(), record.end()); @@ -2690,7 +2690,7 @@ UINoticeWnd::UINoticeWnd() : UIFrameWnd(0) { for (int i = 0; i < 19; ++i) { this->m_texts[i] = new UIStaticText(); } - this->unknown_0108 = 20; + this->lineCount = 20; this->unknown_010C = 0; this->m_noticeCount = 0; this->m_index = 0; @@ -3035,8 +3035,8 @@ int UISelectServerWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s switch (a) { case ID_SELECT_REPLAY: reinterpret_cast(ReplayFileList::Instance()).SetBaseFrame(reinterpret_cast(&Replay::Instance())); - ReplayFileList::Instance().unknown_011C = g_session.m_aid; - ReplayFileList::Instance().unknown_0120 = g_session.SyncUnknown0E98(); + ReplayFileList::Instance().selectionState = g_session.m_aid; + ReplayFileList::Instance().dialogState = g_session.SyncUnknown0E98(); g_modeMgr.gameMode->SendMsg(LMM_SELECT_REPLAY_DATA, 0, 0, 0, 0); g_windowMgr.Schedule(this); return 0; @@ -3103,31 +3103,31 @@ void UIPetInfoWnd::Paint() { char level[8]; char hunger[24]; - if (g_session.unknown_1044 >= 0 && g_session.unknown_1044 <= 10) { + if (g_session.petHunger >= 0 && g_session.petHunger <= 10) { std::strcpy(hunger, LookupMessage(MSI_VERY_HUNGRY)); - } else if (g_session.unknown_1044 > 10 && g_session.unknown_1044 <= 25) { + } else if (g_session.petHunger > 10 && g_session.petHunger <= 25) { std::strcpy(hunger, LookupMessage(MSI_HUNGRY)); - } else if (g_session.unknown_1044 > 25 && g_session.unknown_1044 <= 75) { + } else if (g_session.petHunger > 25 && g_session.petHunger <= 75) { std::strcpy(hunger, LookupMessage(MSI_NORMAL)); - } else if (g_session.unknown_1044 > 75 && g_session.unknown_1044 <= 90) { + } else if (g_session.petHunger > 75 && g_session.petHunger <= 90) { std::strcpy(hunger, LookupMessage(MSI_REPLETE)); - } else if (g_session.unknown_1044 > 90 && g_session.unknown_1044 <= 100) { + } else if (g_session.petHunger > 90 && g_session.petHunger <= 100) { std::strcpy(hunger, LookupMessage(MSI_VERY_REPLETE)); } else { std::strcpy(hunger, LookupMessage(MSI_UNKNOWN)); } - _itoa(g_session.unknown_1040, level, 10); + _itoa(g_session.petLevel, level, 10); this->DrawTextAt(135, 44, level, 0, 0, 12, 0, 0, 0); this->DrawTextAt(145, 69, hunger, 0, 0, 12, 0, 0, 0); this->DrawTextAt(145, 89, this->friendlyText.c_str(), 0, 0, 12, 0, 0, 0); - const int job = g_session.unknown_103C; + const int job = g_session.petJob; if (job != -1 && ((job > 1000 && job < 3999) || static_cast(job - 20021) < 11979)) { char illust[260]; std::memset(illust, 0, sizeof(illust)); - g_session.GetPetIllustName(job, g_session.unknown_1038, illust); + g_session.GetPetIllustName(job, g_session.petAccessory, illust); if (auto* image = dynamic_cast(ResourceMgr::Instance().Load(Resolve(illust)))) { this->DrawBitmap(5, 21, image, false); @@ -3138,9 +3138,9 @@ void UIPetInfoWnd::Paint() { const int width = this->TextWidth(command, 0, 0, 12, 0, 0); this->DrawTextAt(206 - width / 2, 48, command, 0, 0, 12, 0, 0, 0); this->DrawTextAt(100, 119, LookupMessage(MSI_PET_ACCESSARY), 0, 0, 12, 0, 0, 0); - this->DrawTextAt(100, 139, LookupMessage(g_session.unknown_1038 == 0 ? 600 : 598), 0, 0, 12, 0, 0, 0); + this->DrawTextAt(100, 139, LookupMessage(g_session.petAccessory == 0 ? 600 : 598), 0, 0, 12, 0, 0, 0); - if (this->unknown_00E4 == 1) { + if (this->autoFeedAvailable == 1) { this->DrawTextAt(100, 159, LookupMessage(MSI_PET_AUTO_FEEDING_OFF), 0, 0, 12, 0, 0, 0); } } @@ -3216,7 +3216,7 @@ void UIMonsterInfoWnd::OnCreate(int, int) { this->AddChild(button); this->m_message0 = 184; - this->unknown_00D4 = g_monsterInfoActorId; + this->actorId = g_monsterInfoActorId; this->name = static_cast(g_modeMgr.GetGameMode())->ActorName(g_monsterInfoActorId); const std::size_t separator = this->name.find("#"); if (separator != std::string::npos) { @@ -3229,12 +3229,12 @@ void UIMonsterInfoWnd::OnCreate(int, int) { // FUNCTION: fn_11667 UIPetInfoWnd::UIPetInfoWnd() : UIFrameWnd(0), friendlyGauge(nullptr), friendlyText("") { - this->unknown_00E4 = 0; - this->unknown_00E8 = 0; + this->autoFeedAvailable = 0; + this->autoFeedCheck = 0; this->nameEdit = nullptr; this->saved = nullptr; - this->unknown_00BC = 0; - this->unknown_00C0 = 0; + this->renameButton = 0; + this->statusButton = 0; this->window_00C4 = nullptr; } @@ -3317,15 +3317,15 @@ EncryptedName<80, 0xF3CB6F7711A71B6DULL>& HangameJoinUrl::operator()() const { int UILoginWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { switch (message) { case UM_COMBOBOX_SELECTED: - if (sender == this->unknown_00E8) { + if (sender == this->loginTypeCombo) { if (a == 0) { const char source[] = {'\x1A', '\x3D', '\x79', '\xB9', '\xA1'}; thread_local EncryptedName name(source); - this->unknown_00EC = name.Text(); + this->loginExtra = name.Text(); } else if (a == 1) { const char source[] = {'\x86', '\x77', '\xF5', '\x20', '\xE1'}; thread_local EncryptedName name(source); - this->unknown_00EC = name.Text(); + this->loginExtra = name.Text(); } else { const char source[] = {'\x10', '\x9D', '\xBC', '\x33', '\xE2', '\x64', '\x01', '\x37', '\x04', '\x90', '\xB4', '\x32', '\xF8', '\x7D', '\x1B', '\x37', '\x06', '\x9F', '\xB6', '\x2E', '\xFE', '\x33', '\x09', '\x78', '\x10', '\x9D', '\xB3', '\x7C', '\x8D'}; @@ -3363,7 +3363,7 @@ int UILoginWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int StringFormat(g_launchAccountPassword, 24, static_cast(-1), "%s", this->idEdit->Text()); g_modeMgr.gameMode->SendMsg(LMM_PASSWORD, reinterpret_cast(this->passwordEdit->Text()), 0, 0, 0); g_modeMgr.gameMode->SendMsg(LMM_ID, reinterpret_cast(this->idEdit->Text()), 0, 0, 0); - g_modeMgr.gameMode->SendMsg(LMM_SET_LOGIN_EXTRA, reinterpret_cast(this->unknown_00EC), 0, 0, 0); + g_modeMgr.gameMode->SendMsg(LMM_SET_LOGIN_EXTRA, reinterpret_cast(this->loginExtra), 0, 0, 0); g_windowMgr.CloseWindow(WID_LOGINWND); this->SaveLogin(); } else if (this->idEdit->Length() < 4) { @@ -3388,14 +3388,14 @@ int UILoginWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int this->SaveLogin(); break; case ID_CLASSCOMBO: { - if (g_windowMgr.unknown_0214 != nullptr) { + if (g_windowMgr.comboBoxWnd != nullptr) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } UIWindow* list = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); - this->unknown_00E4 = 1; - const int count = static_cast(this->unknown_00D8.size()); - for (unsigned int index = 0; index < this->unknown_00D8.size(); ++index) { - list->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->unknown_00D8[index].c_str()), 0, 0, 0); + this->accountListOpen = 1; + const int count = static_cast(this->savedAccounts.size()); + for (unsigned int index = 0; index < this->savedAccounts.size(); ++index) { + list->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(this->savedAccounts[index].c_str()), 0, 0, 0); } list->SendMsg(nullptr, UM_SETCURITEM, 0, 0, 0, 0); int height = count * 16; @@ -3446,8 +3446,8 @@ int UILoginOTPWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: const char soundSource[] = {'\x58', '\x6F', '\x41', '\xFF', '\x3D', '\x11', '\x99', '\xDD', '\xCF', '\xEE', '\xE6', '\x39', '\x81'}; thread_local EncryptedName soundName(soundSource); g_soundMgr->PlayWave(soundName.Text(), 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); - if (this->unknown_00B4->Length() == 8) { - g_modeMgr.gameMode->SendMsg(LMM_SET_AUTH_CODE, reinterpret_cast(this->unknown_00B4->Text()), 0, 0, 0); + if (this->authCodeEdit->Length() == 8) { + g_modeMgr.gameMode->SendMsg(LMM_SET_AUTH_CODE, reinterpret_cast(this->authCodeEdit->Text()), 0, 0, 0); g_modeMgr.gameMode->SendMsg(LMM_SEND_LOGIN_AUTH_CODE, 0, 0, 0, 0); g_windowMgr.CloseWindow(WID_LOGINOTPWND); } else { @@ -3458,7 +3458,7 @@ int UILoginOTPWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: break; } case UM_REFRESH: { - this->unknown_00B4->SetText(""); + this->authCodeEdit->SetText(""); return 0; } } @@ -3472,7 +3472,7 @@ void UIHomunInfoWnd::OnCreate(int, int) { this->AddCloseButton("", 0); this->nameEdit = new UIEditCtrl2(); this->nameEdit->SetSize(80, 16); - char* const name = reinterpret_cast(&g_session.unknown_5570[0x0C]); + char* const name = reinterpret_cast(&g_session.spAndHomunculusStats[0x0C]); if (std::strcmp(name, "") == 0) { std::sprintf(name, g_session.GetJobName(g_session.m_homunJob, -1)); } @@ -3529,13 +3529,13 @@ void UIHomunInfoWnd::OnCreate(int, int) { this->hpBar = new UIBarGraphHomun(); this->hpBar->SetValues([]() -> std::int64_t { return g_session.m_homunHp; }, - []() -> std::int64_t { return *reinterpret_cast(g_session.unknown_55C8); }); + []() -> std::int64_t { return *reinterpret_cast(g_session.homunMaxHp); }); this->hpBar->SetSize(157, 9); this->hpBar->Move(117, 73); this->AddChild(this->hpBar); this->spBar = new UIBarGraphHomun(); - this->spBar->SetValues([]() -> std::int64_t { return g_session.m_homunSp; }, []() -> std::int64_t { return g_session.unknown_55D0; }); + this->spBar->SetValues([]() -> std::int64_t { return g_session.m_homunSp; }, []() -> std::int64_t { return g_session.homunMaxSp; }); this->spBar->SetSize(157, 9); this->spBar->Move(117, 88); this->AddChild(this->spBar); @@ -3551,16 +3551,16 @@ void UIHomunInfoWnd::OnCreate(int, int) { this->intimacyBar->m_plainColor = false; this->intimacyBar->SetSize(102, 6); this->intimacyBar->Move(101, 145); - this->intimacyBar->SetValues(&g_session.unknown_55F0, &g_session.unknown_55F4); + this->intimacyBar->SetValues(&g_session.homunHunger, &g_session.homunMaxHunger); this->AddChild(this->intimacyBar); this->m_message0 = 201; - this->unknown_00D4 = new UICheckBox(); - this->unknown_00D4->SetSize(12, 12); - this->unknown_00D4->Move(210, 142); - this->unknown_00D4->SetBitmaps("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp"); - this->unknown_00D4->SetChecked(g_session.m_homunculusAutoFeed); - this->AddChild(this->unknown_00D4); + this->autoFeedCheckBox = new UICheckBox(); + this->autoFeedCheckBox->SetSize(12, 12); + this->autoFeedCheckBox->Move(210, 142); + this->autoFeedCheckBox->SetBitmaps("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp"); + this->autoFeedCheckBox->SetChecked(g_session.m_homunculusAutoFeed); + this->AddChild(this->autoFeedCheckBox); } // OFFSET: 0x008B7DB0 @@ -3578,7 +3578,7 @@ void UIHomunInfoWnd::Paint() { this->DrawTextAt(100, 131, LookupMessage(MSI_PET_HUNGRY), 0, 0, 12, 0, 0, 0); this->DrawTextAt(100, 159, LookupMessage(MSI_PET_FRIENDLY), 0, 0, 12, 0, 0, 0); this->DrawTextAt(140, 159, ":", 0, 0, 12, 0, 0, 0); - const int* const stats = reinterpret_cast(&g_session.unknown_5570[0x2C]); + const int* const stats = reinterpret_cast(&g_session.spAndHomunculusStats[0x2C]); char number[12]; int bytes = std::sprintf(number, "%d", stats[0]); this->DrawRightAlignedText(79, 24, number, bytes, 1, 14, 0, 0); @@ -3597,7 +3597,7 @@ void UIHomunInfoWnd::Paint() { bytes = std::sprintf(number, "%d", (2000 - stats[7]) / 10); this->DrawRightAlignedText(79, 150, number, bytes, 1, 14, 0, 0); char level[12]; - _itoa(*reinterpret_cast(g_session.unknown_55C0), level, 10); + _itoa(*reinterpret_cast(g_session.homunLevel), level, 10); this->DrawTextAt(135, 47, level, 0, 0, 12, 0, 0, 0); if (g_session.m_homunJob == -1) { return; @@ -3606,9 +3606,9 @@ void UIHomunInfoWnd::Paint() { char text[24]; bytes = std::sprintf(text, "%lld", g_session.m_homunMaxExp); this->DrawRightAlignedText(205, 104, text, bytes, 1, 14, 0, 0); - bytes = std::sprintf(text, "%d / %d", g_session.unknown_55F0, 100); + bytes = std::sprintf(text, "%d / %d", g_session.homunHunger, 100); this->DrawRightAlignedText(200, 130, text, bytes, 1, 14, 0, 0); - const int intimacy = g_session.unknown_55D4; + const int intimacy = g_session.homunFriendly; if (intimacy >= 0 && intimacy <= 3) { std::strcpy(text, LookupMessage(MSI_VERYHATE)); } else if (intimacy > 3 && intimacy <= 10) { @@ -3634,7 +3634,7 @@ void UIHomunInfoWnd::Paint() { // OFFSET: 0x008BDD10 // FUNCTION: fn_11803 int UIHomunInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (this->unknown_00D0 && sender != this->unknown_00D0) { + if (this->feedConfirmation && sender != this->feedConfirmation) { return 0; } @@ -3646,7 +3646,7 @@ int UIHomunInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: switch (a) { case ID_OK: { - char* const name = reinterpret_cast(&g_session.unknown_5570[0x0C]); + char* const name = reinterpret_cast(&g_session.spAndHomunculusStats[0x0C]); if (std::strlen(this->nameEdit->Text()) >= 24) { g_windowMgr.Confirm(LookupMessage(MSI_HOMUN_NAME_IN23), 0, true, false, 0, "Message", 280, 120, 0); } else if (_mbsstr(reinterpret_cast(this->nameEdit->Text()), reinterpret_cast(s_messageBoxItemLinkOpening.c_str())) || @@ -3675,7 +3675,7 @@ int UIHomunInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: g_windowMgr.CloseWindow(WID_HOMUNINFOWND); return 0; case ID_CHECK: - if (sender == this->unknown_00D4) { + if (sender == this->autoFeedCheckBox) { if (b > 0) { g_session.SendHomunculusAutoFeedOption(1); } else { @@ -3689,9 +3689,9 @@ int UIHomunInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: } return 0; case ID_FEED_TO_HOMUN: - this->unknown_00D0 = new UINormalMB(); - this->unknown_00D0->Create(this, LookupMessage(MSI_SURE_TO_FEED_PET), 2, true, nullptr, 280, 120, nullptr); - g_windowMgr.AddRendered(this->unknown_00D0); + this->feedConfirmation = new UINormalMB(); + this->feedConfirmation->Create(this, LookupMessage(MSI_SURE_TO_FEED_PET), 2, true, nullptr, 280, 120, nullptr); + g_windowMgr.AddRendered(this->feedConfirmation); return 0; case ID_DELETE_HOMUN: { CMode* mode = g_modeMgr.GetGameMode(); @@ -3700,21 +3700,21 @@ int UIHomunInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std: g_windowMgr.CloseWindow(WID_HOMUNINFOWND); g_windowMgr.CloseWindow(WID_SKILLLISTWND_SKILLTAB_0); g_session.ClearHomunStatus(); - g_session.unknown_5614 = 0; + g_session.homunAlive = 0; } return 0; } case 488: { CMode* mode = g_modeMgr.GetGameMode(); - if (sender == this->unknown_00D0 && b == 187) { + if (sender == this->feedConfirmation && b == 187) { if (g_windowMgr.LookupWindow(WID_EXCHANGEUI)) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_EXCHANGED_FAILED)), 255, 0, 0, 0); } else { mode->SendMsg(MM_COMMAND_HOMUN, 1, 0, 0, 0); } } - g_windowMgr.Schedule(this->unknown_00D0); - this->unknown_00D0 = nullptr; + g_windowMgr.Schedule(this->feedConfirmation); + this->feedConfirmation = nullptr; return 0; } default: @@ -3739,32 +3739,32 @@ void UIPetInfoWnd::OnCreate(int, int) { this->AddCloseButton("", 0); this->nameEdit = new UIEditCtrl2(); this->nameEdit->SetSize(80, 16); - if (std::strcmp(g_session.unknown_1018, "") == 0) { - std::sprintf(g_session.unknown_1018, g_session.GetJobName(g_session.unknown_103C, -1)); + if (std::strcmp(g_session.petName, "") == 0) { + std::sprintf(g_session.petName, g_session.GetJobName(g_session.petJob, -1)); } this->nameEdit->Move(135, 24); - this->nameEdit->SetText(g_session.unknown_1018); + this->nameEdit->SetText(g_session.petName); this->nameEdit->maximum = 50; this->nameEdit->Background(232, 232, 232); this->AddChild(this->nameEdit); { const std::string prefix("유저인터페이스\\"); - this->unknown_00BC = new UIBitmapButton(); - this->unknown_00BC->SetBitmap((prefix + "btn_rewrite" + ".bmp").c_str(), 0, 0); - this->unknown_00BC->SetBitmap((prefix + "btn_rewrite_a" + ".bmp").c_str(), 1, 0); - this->unknown_00BC->SetBitmap((prefix + "btn_rewrite_b" + ".bmp").c_str(), 2, 0); - this->unknown_00BC->SetSize(this->unknown_00BC->BitmapWidth(), this->unknown_00BC->BitmapHeight()); - this->unknown_00BC->Move(230, 21); - this->unknown_00BC->SetId(184); - this->AddChild(this->unknown_00BC); + this->renameButton = new UIBitmapButton(); + this->renameButton->SetBitmap((prefix + "btn_rewrite" + ".bmp").c_str(), 0, 0); + this->renameButton->SetBitmap((prefix + "btn_rewrite_a" + ".bmp").c_str(), 1, 0); + this->renameButton->SetBitmap((prefix + "btn_rewrite_b" + ".bmp").c_str(), 2, 0); + this->renameButton->SetSize(this->renameButton->BitmapWidth(), this->renameButton->BitmapHeight()); + this->renameButton->Move(230, 21); + this->renameButton->SetId(184); + this->AddChild(this->renameButton); } const char tooltip[] = "Pet Command"; - this->unknown_00C0 = new UINoneVisibleButton(); - this->unknown_00C0->SetSize(120, 18); - this->unknown_00C0->Move(150, 44); - this->unknown_00C0->SetId(268); - this->AddChild(this->unknown_00C0); + this->statusButton = new UINoneVisibleButton(); + this->statusButton->SetSize(120, 18); + this->statusButton->Move(150, 44); + this->statusButton->SetId(268); + this->AddChild(this->statusButton); { const std::string prefix("유저인터페이스\\basic_interface\\"); UIBitmapButton* button = new UIBitmapButton(); @@ -3786,15 +3786,15 @@ void UIPetInfoWnd::OnCreate(int, int) { this->UpdateFriendlyGauge(); this->m_message0 = 201; - const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).itemId.c_str()); - this->unknown_00E4 = g_petEvolutionMgr->IsAutoFeeding(petEgg); - if (this->unknown_00E4 == true) { - this->unknown_00E8 = new UICheckBox(); - this->unknown_00E8->SetSize(12, 12); - this->unknown_00E8->Move(this->TextWidth(LookupMessage(MSI_PET_AUTO_FEEDING_OFF), 0, 0, 12, 0, 0) + 110, 159); - this->unknown_00E8->SetBitmaps("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp"); - this->unknown_00E8->SetChecked(g_petAutoFeed); - this->AddChild(this->unknown_00E8); + const int petEgg = std::atoi(LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).itemId.c_str()); + this->autoFeedAvailable = g_petEvolutionMgr->IsAutoFeeding(petEgg); + if (this->autoFeedAvailable == true) { + this->autoFeedCheck = new UICheckBox(); + this->autoFeedCheck->SetSize(12, 12); + this->autoFeedCheck->Move(this->TextWidth(LookupMessage(MSI_PET_AUTO_FEEDING_OFF), 0, 0, 12, 0, 0) + 110, 159); + this->autoFeedCheck->SetBitmaps("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp"); + this->autoFeedCheck->SetChecked(g_petAutoFeed); + this->AddChild(this->autoFeedCheck); } } @@ -3812,7 +3812,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i CMode* mode = g_modeMgr.GetGameMode(); switch (a) { case 467: - if (g_windowMgr.unknown_0458) { + if (g_windowMgr.rodexComposeWnd) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_REFINING_FAIL_ITEM_DISAPPEAR)), 255, 0, 0, 0); break; } @@ -3837,7 +3837,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i if (g_session.m_petFriendly > 900) { g_windowMgr.CloseWindow(WID_COMBOBOXIDWND); UIWindow* window = g_windowMgr.EnsureWindow(WID_PETEVOLUTIONWND); - const int petEgg = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).GetItemId(); + const int petEgg = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).GetItemId(); window->SendMsg(nullptr, UM_SET_PET_EVOLUTION_MATERIALS, petEgg, b, 0, 0); this->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); g_windowMgr.CloseWindow(WID_COMBOBOXIDWND); @@ -3867,7 +3867,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i if (g_windowMgr.Confirm(text, 2, false, false, 0, "Message", 280, 120, 0) != 188) { if (g_forbiddenWords.Contains(this->nameEdit->Text()) != true) { g_modeMgr.GetGameMode()->SendMsg(MM_PET_RENAME, reinterpret_cast(this->nameEdit->Text()), 0, 0, 0); - std::sprintf(g_session.unknown_1018, this->nameEdit->Text()); + std::sprintf(g_session.petName, this->nameEdit->Text()); this->Invalidate(); return 0; } @@ -3875,7 +3875,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i g_windowMgr.Confirm(LookupMessage(MSI_CANNOT_SELL_IN_PRIVATE_TAB), 0, true, false, 0, "Message", 280, 120, 0); } - this->nameEdit->SetText(g_session.unknown_1018); + this->nameEdit->SetText(g_session.petName); this->nameEdit->Invalidate(); } return 0; @@ -3883,7 +3883,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i g_windowMgr.CloseWindow(WID_PETINFOWND); return 0; case ID_CHECK: - if (sender == this->unknown_00E8) { + if (sender == this->autoFeedCheck) { if (b > 0) { g_session.SendPetAutoFeedOption(1); } else { @@ -3905,7 +3905,7 @@ int UIPetInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::i menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(performance.c_str()), 468, 0, 0); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(unequip.c_str()), 469, 0, 0); menu->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(returnToEgg.c_str()), 470, 0, 0); - const int petEgg = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.unknown_1050).GetItemId(); + const int petEgg = LookupClientItemByIdentity(g_session.m_inventoryItems, g_session.petEggIndex).GetItemId(); const std::pair> targets = g_petEvolutionMgr->GetEvolutionTargets(petEgg); if (targets.first == true) { for (auto it = targets.second.begin(); it != targets.second.end(); ++it) { @@ -4293,16 +4293,16 @@ int UIMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: return 0; case ID_LEFT: { int action = this->m_view.action + 1; - if (action >= this->m_view.unknown_0148 + 8) { - action = this->m_view.unknown_0148; + if (action >= this->m_view.actionBase + 8) { + action = this->m_view.actionBase; } this->m_view.action = action; this->Invalidate(); return 0; } case ID_RIGHT: - if (--this->m_view.action < this->m_view.unknown_0148) { - this->m_view.action = this->m_view.unknown_0148 + 7; + if (--this->m_view.action < this->m_view.actionBase) { + this->m_view.action = this->m_view.actionBase + 7; } this->Invalidate(); return 0; @@ -4320,60 +4320,60 @@ int UIMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: case UM_SCROLLHORZPAGEUP: case UM_SCROLLHORZPAGEDOWN: { const int sex = this->m_info.sex; - if (sender == this->unknown_02CC) { - const int previous = this->unknown_02D4; + if (sender == this->m_hairStyleBar) { + const int previous = this->m_hairStyle; if (message == UM_SCROLLHORZPAGEUP) { - this->unknown_02D4 = previous - 1; + this->m_hairStyle = previous - 1; } else if (message == UM_SCROLLHORZPAGEDOWN) { - this->unknown_02D4 = previous + 1; + this->m_hairStyle = previous + 1; } else { - this->unknown_02D4 = a + previous; + this->m_hairStyle = a + previous; } - if (this->unknown_02D4 < 0) { - this->unknown_02D4 = 0; - } else if (this->unknown_02D4 > 22) { - this->unknown_02D4 = 22; + if (this->m_hairStyle < 0) { + this->m_hairStyle = 0; + } else if (this->m_hairStyle > 22) { + this->m_hairStyle = 22; } - this->unknown_02CC->SetPosition(this->unknown_02D4); - this->unknown_02CC->Invalidate(); + this->m_hairStyleBar->SetPosition(this->m_hairStyle); + this->m_hairStyleBar->Invalidate(); this->Invalidate(); - this->m_info.head = static_cast(this->unknown_02D4 + 1); + this->m_info.head = static_cast(this->m_hairStyle + 1); int head = this->m_info.head; this->m_view.actionNames[1].assign(g_session.GetHeadActName(this->m_info.job, sex, &head)); this->m_view.spriteNames[1].assign(g_session.GetHeadSprName(this->m_info.job, sex, &head)); this->m_info.head = static_cast(head); - this->m_view.imfName = GetBodyImfName(this->m_info.job, sex, this->m_info.head, this->m_info.unknown_0058); + this->m_view.imfName = GetBodyImfName(this->m_info.job, sex, this->m_info.head, this->m_info.bodyCostume); if (this->m_view.headPalette) { this->m_view.headPaletteName.assign(g_session.GetHeadPalName(head, this->m_info.job, sex, this->m_view.headPalette)); } - return this->unknown_02D4 - previous; + return this->m_hairStyle - previous; } - if (sender == this->unknown_02D0) { - const int previous = this->unknown_02D8; + if (sender == this->m_hairColorBar) { + const int previous = this->m_hairColor; if (message == UM_SCROLLHORZPAGEUP) { - this->unknown_02D8 = previous - 1; + this->m_hairColor = previous - 1; } else if (message == UM_SCROLLHORZPAGEDOWN) { - this->unknown_02D8 = previous + 1; + this->m_hairColor = previous + 1; } else { - this->unknown_02D8 = a + previous; + this->m_hairColor = a + previous; } - if (this->unknown_02D8 < 0) { - this->unknown_02D8 = 0; - } else if (this->unknown_02D8 > 8) { - this->unknown_02D8 = 8; + if (this->m_hairColor < 0) { + this->m_hairColor = 0; + } else if (this->m_hairColor > 8) { + this->m_hairColor = 8; } - this->unknown_02D0->SetPosition(this->unknown_02D8); - this->unknown_02D0->Invalidate(); + this->m_hairColorBar->SetPosition(this->m_hairColor); + this->m_hairColorBar->Invalidate(); this->Invalidate(); - this->m_view.headPalette = this->unknown_02D8; + this->m_view.headPalette = this->m_hairColor; if (this->m_view.headPalette) { this->m_view.headPaletteName = g_session.GetHeadPalName(this->m_info.head, this->m_info.job, sex, this->m_view.headPalette); } this->m_info.headPalette = static_cast(this->m_view.headPalette); - return this->unknown_02D8 - previous; + return this->m_hairColor - previous; } return 0; } @@ -4385,8 +4385,8 @@ int UIMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std:: // OFFSET: 0x008AF190 // FUNCTION: fn_11742 void UILoginWnd::OnCreate(int, int) { - this->unknown_00BC = g_windowMgr.EnsureWindow(WID_RPIMAGEWND2); - UIRPImageWnd2* backgroundWindow = static_cast(this->unknown_00BC); + this->backgroundWindow = g_windowMgr.EnsureWindow(WID_RPIMAGEWND2); + UIRPImageWnd2* backgroundWindow = static_cast(this->backgroundWindow); const char backgroundSource[] = {'\xA7', '\x04', '\x51', '\x5F', '\x61', '\xF1', '\x26', '\xDE', '\xA1', '\x4F', '\x51', '\x69', '\x1C', '\x85', '\xBF', '\x7F', '\x08', '\xCC', '\xF8', '\xCB', '\xFE', '\x56', '\x8D', '\x67', '\x02', '\xD9', '\xF7', '\xC4', '\xC2', '\x5A', '\xBF', '\x71', '\x00', '\xF4', '\xFD', '\xCA', '\xC6', '\x56', '\x8D', '\x3D', '\x13', '\xCC', '\xF0', '\xA5'}; @@ -4516,7 +4516,7 @@ void UILoginWnd::OnCreate(int, int) { this->passwordEdit = new UIEditCtrl_Custom(); this->passwordEdit->SetSize(153, 16); this->passwordEdit->Move(15, 64); - this->passwordEdit->unknown_0128 = 2; + this->passwordEdit->labelAlignment = 2; this->passwordEdit->Background(255, 255, 255); const char placeholderSource[] = {'\x9D', '\xB0', '\xCA', '\xE6', '\xDA', '\x14', '\x55', '\xE9', '\xCD'}; thread_local EncryptedName placeholderName(placeholderSource); @@ -4528,7 +4528,7 @@ void UILoginWnd::OnCreate(int, int) { this->idEdit = new UIEditCtrl_Custom(); this->idEdit->SetSize(153, 16); this->idEdit->Move(15, 40); - this->idEdit->unknown_0128 = 2; + this->idEdit->labelAlignment = 2; this->idEdit->Background(255, 255, 255); this->idEdit->TextColor(RGB(156, 156, 156), 0xFFFFFFFF); this->AddChild(this->idEdit); @@ -4547,20 +4547,20 @@ void UILoginWnd::OnCreate(int, int) { saveIdCheck->SetChecked(this->saveId); this->AddChild(saveIdCheck); - this->unknown_00E8 = new UIComboBoxDef2Wnd(); - this->unknown_00E8->skin = 1; - this->unknown_00E8->alignment = 1; - this->unknown_00E8->dropdownHeight = 18; - this->unknown_00E8->textOffset = 3; - this->unknown_00E8->SetSize(160, 22); - this->unknown_00E8->Move(13, 10); - this->AddChild(this->unknown_00E8); - this->unknown_00E8->AddOption(LookupMessage(MSI_ENTER_THE_SEARCH_WORD), 0); - this->unknown_00E8->AddOption(LookupMessage(MSI_MOTP), 0); - this->unknown_00E8->Clear(); - this->unknown_00E8->AddOption(LookupMessage(MSI_ENTER_THE_SEARCH_WORD), 0); - this->unknown_00E8->Select(0); - this->SendMsg(this->unknown_00E8, UM_COMBOBOX_SELECTED, 0, 0, 0, 0); + this->loginTypeCombo = new UIComboBoxDef2Wnd(); + this->loginTypeCombo->skin = 1; + this->loginTypeCombo->alignment = 1; + this->loginTypeCombo->dropdownHeight = 18; + this->loginTypeCombo->textOffset = 3; + this->loginTypeCombo->SetSize(160, 22); + this->loginTypeCombo->Move(13, 10); + this->AddChild(this->loginTypeCombo); + this->loginTypeCombo->AddOption(LookupMessage(MSI_ENTER_THE_SEARCH_WORD), 0); + this->loginTypeCombo->AddOption(LookupMessage(MSI_MOTP), 0); + this->loginTypeCombo->Clear(); + this->loginTypeCombo->AddOption(LookupMessage(MSI_ENTER_THE_SEARCH_WORD), 0); + this->loginTypeCombo->Select(0); + this->SendMsg(this->loginTypeCombo, UM_COMBOBOX_SELECTED, 0, 0, 0, 0); this->idEdit->maximum = 24; this->passwordEdit->maximum = 24; diff --git a/Source/UI/Window/UIMileageWnd.cpp b/Source/UI/Window/UIMileageWnd.cpp index 48c51c210..e3da6d44f 100644 --- a/Source/UI/Window/UIMileageWnd.cpp +++ b/Source/UI/Window/UIMileageWnd.cpp @@ -74,7 +74,7 @@ void UIMileageWnd::OnLBtnDown(int x, int y) { // OFFSET: 0x0094EF10 // FUNCTION: fn_12923 void UIMileageWnd::OnLBtnUp(int x, int y) { - if (g_session.unknown_0000 == 20) { + if (g_session.mapPropertyId == 20) { return; } diff --git a/Source/UI/Window/UIMonsterDisplayWnd.h b/Source/UI/Window/UIMonsterDisplayWnd.h index 4b6116e63..d921eb6cf 100644 --- a/Source/UI/Window/UIMonsterDisplayWnd.h +++ b/Source/UI/Window/UIMonsterDisplayWnd.h @@ -9,7 +9,7 @@ class UIMonsterDisplayWnd : public UIFrameWnd { public: UIMonsterDisplayWnd(); /* 00B4 */ std::string m_name; - /* 00CC */ std::string unknown_00CC; + /* 00CC */ std::string titleText; /* 00E4 */ unsigned char unknown_00E4; void OnCreate(int width, int height) override; diff --git a/Source/UI/Window/UIMonsterInfoWnd.h b/Source/UI/Window/UIMonsterInfoWnd.h index 0a8537422..a6d7d1781 100644 --- a/Source/UI/Window/UIMonsterInfoWnd.h +++ b/Source/UI/Window/UIMonsterInfoWnd.h @@ -31,7 +31,7 @@ public: void DrawNewItemIcon(int x, int y); /* 00B4 */ MonsterInfo info; - /* 00D4 */ int unknown_00D4; + /* 00D4 */ int actorId; /* 00D8 */ std::string name; }; diff --git a/Source/UI/Window/UINavigationHelpWnd.cpp b/Source/UI/Window/UINavigationHelpWnd.cpp index 68d1bcb8b..a408a4a73 100644 --- a/Source/UI/Window/UINavigationHelpWnd.cpp +++ b/Source/UI/Window/UINavigationHelpWnd.cpp @@ -72,5 +72,5 @@ int UINavigationHelpWnd::SendMsg(UIWindow*, int message, std::intptr_t a, std::i // OFFSET: 0x009115B0 // FUNCTION: fn_12517 UINavigationHelpWnd::UINavigationHelpWnd() - : UIFrameWnd(0), m_viewer(nullptr), unknown_00B8(0) { + : UIFrameWnd(0), m_viewer(nullptr), helpState(0) { } diff --git a/Source/UI/Window/UINavigationHelpWnd.h b/Source/UI/Window/UINavigationHelpWnd.h index 18c81d94d..eb950c389 100644 --- a/Source/UI/Window/UINavigationHelpWnd.h +++ b/Source/UI/Window/UINavigationHelpWnd.h @@ -14,7 +14,7 @@ public: protected: /* 00B4 */ UITextViewer* m_viewer; - /* 00B8 */ int unknown_00B8; + /* 00B8 */ int helpState; }; #endif diff --git a/Source/UI/Window/UINavigationWnd.cpp b/Source/UI/Window/UINavigationWnd.cpp index 833f03281..1f49027ed 100644 --- a/Source/UI/Window/UINavigationWnd.cpp +++ b/Source/UI/Window/UINavigationWnd.cpp @@ -62,13 +62,13 @@ void UINavigationWnd::OnCreate(int width, int height) { std::string base = "유저인터페이스\\"; - this->unknown_0128 = new UIResizer(); - this->unknown_0128->SetSize(14, 14); - this->unknown_0128->SetDirection(7); - this->unknown_0128->SetBitmapName((base + "btn_resize.bmp").c_str()); - this->unknown_0128->SetColors(0xFFFF00FF, 0xFFFF00FF); - this->unknown_0128->Move(-1000, -1000); - this->AddChild(this->unknown_0128); + this->m_resizer = new UIResizer(); + this->m_resizer->SetSize(14, 14); + this->m_resizer->SetDirection(7); + this->m_resizer->SetBitmapName((base + "btn_resize.bmp").c_str()); + this->m_resizer->SetColors(0xFFFF00FF, 0xFFFF00FF); + this->m_resizer->Move(-1000, -1000); + this->AddChild(this->m_resizer); std::string path = base; path += "navigation_interface\\"; @@ -94,31 +94,31 @@ void UINavigationWnd::OnCreate(int width, int height) { this->m_closeButton = this->AddCloseButton(LookupMessage(MSI_NAVIGATION_HELP), 0); this->m_minimizeButton = this->AddMinimizeButton("", 0); - this->unknown_0120 = new UIBitmapButton(); - this->unknown_0120->SetBitmap((path + "NaviHelp_off.bmp").c_str(), 0, 0); - this->unknown_0120->SetBitmap((path + "NaviHelp_on.bmp").c_str(), 1, 0); - this->unknown_0120->SetBitmap((path + "NaviHelp_on.bmp").c_str(), 2, 0); - this->unknown_0120->SetSize(this->unknown_0120->BitmapWidth(), this->unknown_0120->BitmapHeight()); - this->unknown_0120->Move(this->geometry.width - 42, 3); - this->unknown_0120->SetId(343); - this->unknown_0120->SetTooltip(LookupMessage(MSI_NAVIGATION_NPC)); - this->AddChild(this->unknown_0120); + this->m_helpButton = new UIBitmapButton(); + this->m_helpButton->SetBitmap((path + "NaviHelp_off.bmp").c_str(), 0, 0); + this->m_helpButton->SetBitmap((path + "NaviHelp_on.bmp").c_str(), 1, 0); + this->m_helpButton->SetBitmap((path + "NaviHelp_on.bmp").c_str(), 2, 0); + this->m_helpButton->SetSize(this->m_helpButton->BitmapWidth(), this->m_helpButton->BitmapHeight()); + this->m_helpButton->Move(this->geometry.width - 42, 3); + this->m_helpButton->SetId(343); + this->m_helpButton->SetTooltip(LookupMessage(MSI_NAVIGATION_NPC)); + this->AddChild(this->m_helpButton); - this->unknown_00EC = new UIComboBoxDefWnd(); - this->unknown_00EC->dropdownHeight = 67; - this->unknown_00EC->SetSize(56, 18); - this->unknown_00EC->Move(-1000, -1000); - this->unknown_00EC->borderRed = 100; - this->unknown_00EC->borderGreen = 100; - this->unknown_00EC->borderBlue = 100; - this->unknown_00EC->red = 232; - this->unknown_00EC->green = 232; - this->unknown_00EC->blue = 232; - this->AddChild(this->unknown_00EC); - this->unknown_00EC->AddOption(LookupMessage(MSI_NAVIGATION_MOB), 0); - this->unknown_00EC->AddOption(LookupMessage(MSI_NAVIGATION_SETSTRING), 0); - this->unknown_00EC->AddOption(LookupMessage(MSI_NAVIGATION_SCROLL), 0); - this->unknown_00EC->AddOption(LookupMessage(MSI_NAVIGATION_USESCROLL), 0); + this->m_searchType = new UIComboBoxDefWnd(); + this->m_searchType->dropdownHeight = 67; + this->m_searchType->SetSize(56, 18); + this->m_searchType->Move(-1000, -1000); + this->m_searchType->borderRed = 100; + this->m_searchType->borderGreen = 100; + this->m_searchType->borderBlue = 100; + this->m_searchType->red = 232; + this->m_searchType->green = 232; + this->m_searchType->blue = 232; + this->AddChild(this->m_searchType); + this->m_searchType->AddOption(LookupMessage(MSI_NAVIGATION_MOB), 0); + this->m_searchType->AddOption(LookupMessage(MSI_NAVIGATION_SETSTRING), 0); + this->m_searchType->AddOption(LookupMessage(MSI_NAVIGATION_SCROLL), 0); + this->m_searchType->AddOption(LookupMessage(MSI_NAVIGATION_USESCROLL), 0); this->m_titleBar = new UIEditCtrl(); this->m_titleBar->SetSize(226, 18); @@ -138,32 +138,32 @@ void UINavigationWnd::OnCreate(int width, int height) { this->m_titleBar->Invalidate(); } - this->unknown_0118 = new UICheckBox(); - this->unknown_0118->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_USESERVICE), 10, 0, 12, 0, 0), 12); + this->m_includeObjects = new UICheckBox(); + this->m_includeObjects->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_USESERVICE), 10, 0, 12, 0, 0), 12); path = base; - this->unknown_0118->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_USESERVICE)); - this->unknown_0118->Move(-1000, -1000); - this->unknown_0118->SetChecked(g_navigationManager.unknown_127D); - this->unknown_0118->SetTooltip(LookupMessage(MSI_NAVIGATION_PLANE)); - this->AddChild(this->unknown_0118); + this->m_includeObjects->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_USESERVICE)); + this->m_includeObjects->Move(-1000, -1000); + this->m_includeObjects->SetChecked(g_navigationManager.includeObjects); + this->m_includeObjects->SetTooltip(LookupMessage(MSI_NAVIGATION_PLANE)); + this->AddChild(this->m_includeObjects); - this->unknown_0114 = new UICheckBox(); - this->unknown_0114->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_USEPLANE), 10, 0, 12, 0, 0), 12); + this->m_allowGates = new UICheckBox(); + this->m_allowGates->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_USEPLANE), 10, 0, 12, 0, 0), 12); path = base; - this->unknown_0114->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_USEPLANE)); - this->unknown_0114->Move(-1000, -1000); - this->unknown_0114->SetChecked(g_navigationManager.unknown_127C); - this->unknown_0114->SetTooltip(LookupMessage(MSI_NAVIGATION_TARGETUNKNOWN)); - this->AddChild(this->unknown_0114); + this->m_allowGates->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_USEPLANE)); + this->m_allowGates->Move(-1000, -1000); + this->m_allowGates->SetChecked(g_navigationManager.allowGates); + this->m_allowGates->SetTooltip(LookupMessage(MSI_NAVIGATION_TARGETUNKNOWN)); + this->AddChild(this->m_allowGates); - this->unknown_011C = new UICheckBox(); - this->unknown_011C->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_GOING), 10, 0, 12, 0, 0), 12); + this->m_allowWarps = new UICheckBox(); + this->m_allowWarps->SetSize(this->TextWidth(LookupMessage(MSI_NAVIGATION_GOING), 10, 0, 12, 0, 0), 12); path = base; - this->unknown_011C->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_GOING)); - this->unknown_011C->Move(-1000, -1000); - this->unknown_011C->SetChecked(g_navigationManager.unknown_127E); - this->unknown_011C->SetTooltip(LookupMessage(MSI_NAVIGATION_SEARCHING)); - this->AddChild(this->unknown_011C); + this->m_allowWarps->SetImages((path + "checkbox_1.bmp").c_str(), (path + "checkbox_0.bmp").c_str(), LookupMessage(MSI_NAVIGATION_GOING)); + this->m_allowWarps->Move(-1000, -1000); + this->m_allowWarps->SetChecked(g_navigationManager.allowWarps); + this->m_allowWarps->SetTooltip(LookupMessage(MSI_NAVIGATION_SEARCHING)); + this->AddChild(this->m_allowWarps); } // OFFSET: 0x00931390 @@ -184,9 +184,9 @@ void UINavigationWnd::LayoutTabs() { this->m_searchFooter->Move(-1000, -1000); const int x = this->geometry.width - 222; - if (!g_navigationManager.unknown_1254) { + if (!g_navigationManager.expandedMap) { UIWindow* footer; - if (g_navigationManager.unknown_125C == 1) { + if (g_navigationManager.displayMode == 1) { this->m_searchPanel->Move(x, 37); this->m_searchPanel->Invalidate(); footer = this->m_searchFooter; @@ -204,7 +204,7 @@ void UINavigationWnd::LayoutTabs() { // OFFSET: 0x0093DB80 // FUNCTION: fn_12771 void UINavigationWnd::RefreshHeaderTexts(int mode) { - if (g_navigationManager.unknown_1254) { + if (g_navigationManager.expandedMap) { if (mode == 2) { char text[260]; char saved[260]; @@ -233,7 +233,7 @@ void UINavigationWnd::RefreshHeaderTexts(int mode) { // FUNCTION: fn_12772 void UINavigationWnd::RefreshWorldMapMarks() { g_worldViewMgr.ClearMarks(); - if (g_navigationManager.unknown_1258 == 2) { + if (g_navigationManager.viewMode == 2) { std::string name; for (int index = 0; index < g_navigationManager.NodeCount(); ++index) { CNavi_Link* node = g_navigationManager.GetNode(index); @@ -291,7 +291,7 @@ void UINavigationWnd::RefreshRouteList() { this->m_searchPanel->Invalidate(); const int nodeCount = g_navigationManager.NodeCount(); - if (g_navigationManager.unknown_1258 != 2) { + if (g_navigationManager.viewMode != 2) { return; } @@ -426,7 +426,7 @@ void UINavigationWnd::RefreshRouteList() { // OFFSET: 0x0093EB60 // FUNCTION: fn_12776 void UINavigationWnd::ApplyMinimized() { - if (g_navigationManager.unknown_1254) { + if (g_navigationManager.expandedMap) { this->Resize(134, 61); int x = this->geometry.x; int y = this->geometry.y; @@ -438,8 +438,8 @@ void UINavigationWnd::ApplyMinimized() { } this->Move(x < 0 ? 0 : x, y < 0 ? 0 : y); - this->unknown_0128->Move(-1000, -1000); - this->unknown_0120->Move(this->geometry.width - 42, 3); + this->m_resizer->Move(-1000, -1000); + this->m_helpButton->Move(this->geometry.width - 42, 3); this->m_closeButton->Move(this->geometry.width - 14, 3); this->m_minimizeButton->Move(this->geometry.width - 28, 3); this->m_minimizeButton->SetTooltip(LookupMessage(MSI_NAVIGATION_ALL)); @@ -449,10 +449,10 @@ void UINavigationWnd::ApplyMinimized() { } this->LayoutTabs(); - this->unknown_00EC->Move(-1000, -1000); - this->unknown_0114->Move(-1000, -1000); - this->unknown_0118->Move(-1000, -1000); - this->unknown_011C->Move(-1000, -1000); + this->m_searchType->Move(-1000, -1000); + this->m_allowGates->Move(-1000, -1000); + this->m_includeObjects->Move(-1000, -1000); + this->m_allowWarps->Move(-1000, -1000); this->m_titleBar->Move(-1000, -1000); } else { if (this->m_saved->minimized) { @@ -476,8 +476,8 @@ void UINavigationWnd::ApplyMinimized() { this->m_routePanel->Resize(215, this->geometry.height - 78); this->m_searchPanel->Resize(215, this->geometry.height - 78); - this->unknown_0128->Move(this->geometry.width - 14, this->geometry.height - 14); - this->unknown_0120->Move(this->geometry.width - 42, 3); + this->m_resizer->Move(this->geometry.width - 14, this->geometry.height - 14); + this->m_helpButton->Move(this->geometry.width - 42, 3); this->m_closeButton->Move(this->geometry.width - 14, 3); this->m_minimizeButton->Move(this->geometry.width - 28, 3); this->m_minimizeButton->SetTooltip(LookupMessage(MSI_NAVIGATION_MAP)); @@ -490,10 +490,10 @@ void UINavigationWnd::ApplyMinimized() { } this->LayoutTabs(); - this->unknown_00EC->Move(6, 18); - this->unknown_0114->Move(this->geometry.width - 136, this->geometry.height - 37); - this->unknown_0118->Move(this->geometry.width - 186, this->geometry.height - 37); - this->unknown_011C->Move(this->geometry.width - 136, this->geometry.height - 21); + this->m_searchType->Move(6, 18); + this->m_allowGates->Move(this->geometry.width - 136, this->geometry.height - 37); + this->m_includeObjects->Move(this->geometry.width - 186, this->geometry.height - 37); + this->m_allowWarps->Move(this->geometry.width - 136, this->geometry.height - 21); this->m_titleBar->Move(65, 18); } } @@ -528,7 +528,7 @@ void UINavigationWnd::StoreInfo() { void UINavigationWnd::Paint() { this->DrawTitleBar(true, this->m_title.c_str(), 0); this->DrawPanelBackground(0x11, 0, ""); - if (g_navigationManager.unknown_1254) { + if (g_navigationManager.expandedMap) { this->DrawTextAt(6, 20, this->m_subtitle.c_str(), 0, 0, 12, 0, 0, 0); return; } @@ -537,13 +537,13 @@ void UINavigationWnd::Paint() { return; } - int mapCellY = g_navigationManager.unknown_1290; - int mapCellX = g_navigationManager.unknown_128C; + int mapCellY = g_navigationManager.previewY; + int mapCellX = g_navigationManager.previewX; const int targetType = g_navigationManager.GetCurrentTarget().type; int size = 0x80; this->FillRegion(6, 0x25, 0x82, 0x82, 0x646464); - if (g_navigationManager.unknown_1284 == 2) { + if (g_navigationManager.previewType == 2) { int markerSize = size; if (targetType == 2) { markerSize = size - 0x3D; @@ -555,24 +555,24 @@ void UINavigationWnd::Paint() { } else if (targetType == 3) { size = 0x20; } - this->DrawActionSprite(g_navigationManager.unknown_12A4, g_navigationManager.unknown_12A0, 7, 0x26, markerSize, 0x80, 0x5dc, true, nullptr); + this->DrawActionSprite(g_navigationManager.previewSprite, g_navigationManager.previewAction, 7, 0x26, markerSize, 0x80, 0x5dc, true, nullptr); } const int mapX = 0x87 - size; const int mapY = 0xA6 - size; this->FillRegion(mapX, mapY, size, size, 0); - if (g_navigationManager.unknown_1288 != nullptr) { - const float scale = static_cast(size) / static_cast(g_navigationManager.unknown_1288->Width()); + if (g_navigationManager.previewTexture != nullptr) { + const float scale = static_cast(size) / static_cast(g_navigationManager.previewTexture->Width()); this->geometry.surface->DrawScaledSurface( - mapX, mapY, size, size, g_navigationManager.unknown_1288, g_navigationManager.unknown_1288->Width(), g_navigationManager.unknown_1288->Height(), scale, scale, 0xFFFFFFFFu, false, 0, 0, 0, + mapX, mapY, size, size, g_navigationManager.previewTexture, g_navigationManager.previewTexture->Width(), g_navigationManager.previewTexture->Height(), scale, scale, 0xFFFFFFFFu, false, 0, 0, 0, 0 ); } bool drawCrosshair = true; - if (g_navigationManager.unknown_1258 == 2) { + if (g_navigationManager.viewMode == 2) { if (g_navigationManager.IsCurrentTarget(g_session.m_navigationPlayerMap)) { - if (g_navigationManager.unknown_125C == 1) { + if (g_navigationManager.displayMode == 1) { drawCrosshair = false; } const float scale = static_cast(size) * g_navigationPointScale; @@ -602,7 +602,7 @@ void UINavigationWnd::Paint() { this->FillRegion(mapX + mapCellX - 1, mapY + mapCellY - 1, 2, 2, 0xFFFF); } - const int activeLabel = g_navigationManager.unknown_1284; + const int activeLabel = g_navigationManager.previewType; const int labelCount = static_cast(g_navigationManager.routeLines.size()); for (int index = 0; index < labelCount; ++index) { if (g_navigationManager.routeLines[index].kind == activeLabel) { @@ -652,7 +652,7 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } case ID_SEARCH: if (this->m_titleBar->Length() != 0) { - g_navigationManager.unknown_1264 = this->m_titleBar->Text(); + g_navigationManager.searchText = this->m_titleBar->Text(); g_navigationManager.RefreshSearch(); this->SendMsg(this, UM_COMMAND, ID_BUTTON2, 0, 0, 0); if (g_windowMgr.modal) { @@ -678,16 +678,16 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } break; case 0x1AD: - if (!g_navigationManager.unknown_1254 && this->m_saved->minimized) { + if (!g_navigationManager.expandedMap && this->m_saved->minimized) { const int targetType = g_navigationManager.GetCurrentTarget().type; if (targetType != 1 && targetType != 6 && targetType != 0) { - if (g_navigationManager.unknown_1284 == 1) { - g_navigationManager.unknown_1284 = 2; + if (g_navigationManager.previewType == 1) { + g_navigationManager.previewType = 2; this->Invalidate(); return 0; } - if (g_navigationManager.unknown_1284 == 2) { - g_navigationManager.unknown_1284 = 1; + if (g_navigationManager.previewType == 2) { + g_navigationManager.previewType = 1; } this->Invalidate(); return 0; @@ -700,16 +700,16 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume this->Invalidate(); return 0; case ID_MINI: - g_navigationManager.unknown_1254 = !g_navigationManager.unknown_1254; + g_navigationManager.expandedMap = !g_navigationManager.expandedMap; this->ApplyMinimized(); - this->RefreshHeaderTexts(g_navigationManager.unknown_1258); - if (g_navigationManager.unknown_1254 && g_windowMgr.modal) { + this->RefreshHeaderTexts(g_navigationManager.viewMode); + if (g_navigationManager.expandedMap && g_windowMgr.modal) { static_cast(g_windowMgr.modal)->UpdateNavigationButtons(); return 0; } break; case ID_CLOSE: - if (g_navigationManager.unknown_1258 == 2) { + if (g_navigationManager.viewMode == 2) { const int response = g_windowMgr.Confirm(LookupMessage(MSI_NAVIGATION_HELP2), 2, true, false, 0, "Message", 280, 120, 0); if (response != 0xBB) { break; @@ -720,10 +720,10 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume g_worldViewMgr.ClearLevels(); g_worldViewMgr.ResetSelection(); g_navigationManager.Reset(true); - g_navigationManager.unknown_1254 = false; - g_navigationManager.unknown_1248 = false; + g_navigationManager.expandedMap = false; + g_navigationManager.hideWindow = false; if (g_windowMgr.modal) { - g_navigationManager.unknown_1254 = true; + g_navigationManager.expandedMap = true; static_cast(g_windowMgr.modal)->UpdateNavigationButtons(); return 0; } @@ -731,15 +731,15 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume g_windowMgr.window_4F174 = nullptr; return 0; case ID_BUTTON1: - g_navigationManager.unknown_125C = 1; + g_navigationManager.displayMode = 1; this->LayoutTabs(); return 0; case ID_BUTTON2: - g_navigationManager.unknown_125C = 0; + g_navigationManager.displayMode = 0; this->LayoutTabs(); return 0; case 0xBF: { - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } @@ -767,16 +767,16 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume return 0; } case ID_CHECK: - if (sender == this->unknown_0114) { - g_navigationManager.unknown_127C = argument2 != 0; + if (sender == this->m_allowGates) { + g_navigationManager.allowGates = argument2 != 0; return 0; } - if (sender == this->unknown_0118) { - g_navigationManager.unknown_127D = argument2 != 0; + if (sender == this->m_includeObjects) { + g_navigationManager.includeObjects = argument2 != 0; return 0; } - if (sender == this->unknown_011C) { - g_navigationManager.unknown_127E = argument2 != 0; + if (sender == this->m_allowWarps) { + g_navigationManager.allowWarps = argument2 != 0; return 0; } break; @@ -806,11 +806,11 @@ int UINavigationWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argume } break; case UM_COMBOBOX_SELECTED: - if (this->unknown_00EC == sender) { - g_navigationManager.unknown_1260 = static_cast(argument1); + if (this->m_searchType == sender) { + g_navigationManager.searchType = static_cast(argument1); this->Invalidate(); if (g_replayAnimationScaling != 0) { - this->unknown_00EC->SendMsg(nullptr, UM_CHANGEMSG, argument1, 0, 0, 0); + this->m_searchType->SendMsg(nullptr, UM_CHANGEMSG, argument1, 0, 0, 0); return 0; } break; diff --git a/Source/UI/Window/UINavigationWnd.h b/Source/UI/Window/UINavigationWnd.h index 0e5382796..47769b123 100644 --- a/Source/UI/Window/UINavigationWnd.h +++ b/Source/UI/Window/UINavigationWnd.h @@ -51,7 +51,7 @@ protected: /* 00B8 */ UIButton* m_minimizeButton; /* 00BC */ std::string m_title; /* 00D4 */ std::string m_subtitle; - /* 00EC */ UIComboBoxDefWnd* unknown_00EC; + /* 00EC */ UIComboBoxDefWnd* m_searchType; /* 00F0 */ UIEditCtrl* m_titleBar; /* 00F4 */ UIListBoxNavi* m_routePanel; /* 00F8 */ UIListBoxNavi* m_searchPanel; @@ -66,12 +66,12 @@ protected: /* 0110 */ UIWindow* unknown_0110; }; }; - /* 0114 */ UICheckBox* unknown_0114; - /* 0118 */ UICheckBox* unknown_0118; - /* 011C */ UICheckBox* unknown_011C; - /* 0120 */ UIBitmapButton* unknown_0120; + /* 0114 */ UICheckBox* m_allowGates; + /* 0118 */ UICheckBox* m_includeObjects; + /* 011C */ UICheckBox* m_allowWarps; + /* 0120 */ UIBitmapButton* m_helpButton; /* 0124 */ NavigationWndInfo* m_saved; - /* 0128 */ UIResizer* unknown_0128; + /* 0128 */ UIResizer* m_resizer; /* 012C */ std::vector m_history; }; diff --git a/Source/UI/Window/UINewMakeCharWnd.cpp b/Source/UI/Window/UINewMakeCharWnd.cpp index 2ba047d0f..f8b7e4c16 100644 --- a/Source/UI/Window/UINewMakeCharWnd.cpp +++ b/Source/UI/Window/UINewMakeCharWnd.cpp @@ -34,10 +34,10 @@ // FUNCTION: fn_09609 UINewMakeCharWnd::UINewMakeCharWnd() : UIFrameWnd(0), - unknown_02C0(0), + nameEditStorage(0), m_race(0), m_raceViews() { - this->geometry.unknown_0034 = 0; + this->geometry.animationFrame = 0; const int* preset = reinterpret_cast(g_modeMgr.gameMode->SendMsg(LMM_GET_CHAR_PARAM, 0, 0, 0, 0)); this->m_stats[0] = static_cast(preset[0]); @@ -63,13 +63,13 @@ UINewMakeCharWnd::UINewMakeCharWnd() this->m_headPalette = 0; this->m_bodyPalette = 0; this->m_shield = 0; - this->unknown_0274 = 0; - this->unknown_0276 = 0; + this->accessory2 = 0; + this->accessory3 = 0; this->m_costumeJob = 0; this->m_sex = static_cast(g_session.m_sex); this->m_viewX = 500; this->m_viewY = 228; - this->unknown_01FC = 0; + this->actionBase = 0; this->m_action = 0; this->m_frame = 0; @@ -99,20 +99,20 @@ UINewMakeCharWnd::UINewMakeCharWnd() this->m_raceOffsets = GetBodyImfName(this->m_job, this->m_sex, this->m_head, this->m_costumeJob); - this->unknown_035C = 0; + this->previewState = 0; this->m_startTime = timeGetTime(); - this->unknown_0364 = 0; - this->unknown_0368 = 0; - this->unknown_02D0[0] = 0; - this->unknown_02D0[1] = 0; - this->unknown_02D0[2] = 0; - this->unknown_02D0[3] = 0; - this->unknown_02D0[4] = 0; - this->unknown_02D0[5] = 0; - this->unknown_0330[0] = 0; - this->unknown_0330[1] = 0; - this->unknown_0338 = 0; - this->unknown_0354 = 0; + this->previewCounter = 0; + this->previewPhase = 0; + this->hairStyleButtonStorage[0] = 0; + this->hairStyleButtonStorage[1] = 0; + this->hairStyleButtonStorage[2] = 0; + this->hairStyleButtonStorage[3] = 0; + this->hairStyleButtonStorage[4] = 0; + this->hairStyleButtonStorage[5] = 0; + this->hairColorButtonStorage[0] = 0; + this->hairColorButtonStorage[1] = 0; + this->hairColorButtonByte = 0; + this->genderButtonStorage = 0; } // OFFSET: 0x007DB320 @@ -190,7 +190,7 @@ void UINewMakeCharWnd::Paint() { if (i == 1) { CActRes* first = static_cast(ResourceMgr::Instance().Load(this->m_raceActions[0].c_str())); const ActionFrame& firstFrame = first->Frame(this->m_action, this->m_frame); - if (frame.anchorCount != 0 && firstFrame.anchorCount != 0 && frame.anchors[0].unknown_0008 == firstFrame.anchors[0].unknown_0008) { + if (frame.anchorCount != 0 && firstFrame.anchorCount != 0 && frame.anchors[0].attachmentId == firstFrame.anchors[0].attachmentId) { offset.x += firstFrame.anchors[0].x - frame.anchors[0].x; offset.y += firstFrame.anchors[0].y - frame.anchors[0].y; } @@ -216,12 +216,12 @@ void UINewMakeCharWnd::Paint() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } this->geometry.surface->DrawSurface( this->m_viewX + offset.x + cell.x, this->m_viewY + offset.y + cell.y, texture, static_cast(record.u0 * 256.0f), - static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + static_cast(record.v0 * 256.0f), image->width, image->height, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -568,7 +568,7 @@ int UINewMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum char name[24] = {}; strcpy(name, this->m_nameEdit->Text()); memcpy(this->m_name, name, sizeof(this->m_name)); - memcpy_s(&g_charInfo, sizeof(g_charInfo), this->unknown_0210, sizeof(g_charInfo)); + memcpy_s(&g_charInfo, sizeof(g_charInfo), this->characterData, sizeof(g_charInfo)); if (strstr(g_charInfo.name, "\xB1\xD7\xB6\xF3\xBA\xF1\xC6\xBC") != nullptr) { return 0; } @@ -669,8 +669,8 @@ int UINewMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum case ID_RIGHT: if (argument2 == 0) { --this->m_action; - if (this->m_action < this->unknown_01FC) { - this->m_action = this->unknown_01FC + 7; + if (this->m_action < this->actionBase) { + this->m_action = this->actionBase + 7; } this->Invalidate(); } @@ -679,8 +679,8 @@ int UINewMakeCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argum case ID_LEFT: if (argument2 == 0) { ++this->m_action; - if (this->m_action >= this->unknown_01FC + 8) { - this->m_action = this->unknown_01FC; + if (this->m_action >= this->actionBase + 8) { + this->m_action = this->actionBase; } this->Invalidate(); } diff --git a/Source/UI/Window/UINewMakeCharWnd.h b/Source/UI/Window/UINewMakeCharWnd.h index 33178ff0e..0da0705cc 100644 --- a/Source/UI/Window/UINewMakeCharWnd.h +++ b/Source/UI/Window/UINewMakeCharWnd.h @@ -81,11 +81,11 @@ public: /* 01AC */ std::string m_raceOffsets; /* 01C4 */ int m_racePaletteEnabled[2]; /* 01CC */ std::string m_racePalettes[2]; - /* 01FC */ int unknown_01FC; + /* 01FC */ int actionBase; /* 0200 */ int m_action; /* 0204 */ int m_frame; /* 0208 */ unsigned char unknown_0208[0x8]; - /* 0210 */ unsigned char unknown_0210[0x04]; + /* 0210 */ unsigned char characterData[0x04]; /* 0214 */ MakeCharacterStatus m_status; /* 0264 */ short m_job; /* 0266 */ short m_head; @@ -95,8 +95,8 @@ public: /* 026E */ short m_skillPoint; /* 0270 */ short unknown_0270; /* 0272 */ short m_shield; - /* 0274 */ short unknown_0274; - /* 0276 */ short unknown_0276; + /* 0274 */ short accessory2; + /* 0276 */ short accessory3; /* 0278 */ short m_headPalette; /* 027A */ short m_bodyPalette; /* 027C */ char m_name[24]; @@ -106,30 +106,30 @@ public: /* 02BE */ unsigned char m_sex; /* 02BF */ unsigned char unknown_02BF; union { - /* 02C0 */ int unknown_02C0; + /* 02C0 */ int nameEditStorage; UIEditCtrl2* m_nameEdit; }; /* 02C4 */ int m_race; /* 02C8 */ UIWindow* m_raceViews[2]; union { - /* 02D0 */ int unknown_02D0[6]; + /* 02D0 */ int hairStyleButtonStorage[6]; UIHairStyleButton* m_hairStyleButtons[24]; }; union { struct { - /* 0330 */ int unknown_0330[2]; - /* 0338 */ unsigned char unknown_0338; + /* 0330 */ int hairColorButtonStorage[2]; + /* 0338 */ unsigned char hairColorButtonByte; }; UIBmpRadioBtn* m_hairColorButtons[9]; }; union { - /* 0354 */ short unknown_0354; + /* 0354 */ short genderButtonStorage; UIBitmapButton* m_genderButtons[2]; }; - /* 035C */ int unknown_035C; + /* 035C */ int previewState; /* 0360 */ unsigned long m_startTime; - /* 0364 */ int unknown_0364; - /* 0368 */ int unknown_0368; + /* 0364 */ int previewCounter; + /* 0368 */ int previewPhase; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Window/UINewSelectCharWnd.cpp b/Source/UI/Window/UINewSelectCharWnd.cpp index b0976e39c..903d7ffbe 100644 --- a/Source/UI/Window/UINewSelectCharWnd.cpp +++ b/Source/UI/Window/UINewSelectCharWnd.cpp @@ -412,16 +412,16 @@ void UINewSelectCharWnd::OnCreate(int width, int height) { slotInfo.job = character->job; slotInfo.robe = character->robe; if (character->deleteDate > 0) { - slotInfo.unknown_0148 = 0x10; + slotInfo.actionBase = 0x10; slotInfo.action = 0x10; } else { - slotInfo.unknown_0148 = 0; + slotInfo.actionBase = 0; slotInfo.action = 0; } slotInfo.frame = 0; - slotInfo.actionNames[0] = GetBodyActionResourceName(character->job, character->sex, character->unknown_0058, 0); - slotInfo.spriteNames[0] = g_session.GetBodySprName(character->job, character->sex, character->unknown_0058, 0); + slotInfo.actionNames[0] = GetBodyActionResourceName(character->job, character->sex, character->bodyCostume, 0); + slotInfo.spriteNames[0] = g_session.GetBodySprName(character->job, character->sex, character->bodyCostume, 0); int head = character->head; slotInfo.actionNames[1] = g_session.GetHeadActName(character->job, character->sex, &head); slotInfo.spriteNames[1] = g_session.GetHeadSprName(character->job, character->sex, &head); @@ -434,9 +434,9 @@ void UINewSelectCharWnd::OnCreate(int width, int height) { slotInfo.actionNames[4] = g_session.GetAccessoryActName(character->job, character->sex, head, character->accessory); slotInfo.spriteNames[4] = g_session.GetAccessorySprName(character->job, character->sex, head, character->accessory); - slotInfo.bodyPalette = g_session.GetBodyStyle(character->job, character->bodyStyle, character->unknown_0058); + slotInfo.bodyPalette = g_session.GetBodyStyle(character->job, character->bodyStyle, character->bodyCostume); if (slotInfo.bodyPalette != 0) { - slotInfo.bodyPaletteName = g_session.GetBodyPalName(character->job, character->sex, slotInfo.bodyPalette, character->unknown_0058, 0, 0); + slotInfo.bodyPaletteName = g_session.GetBodyPalName(character->job, character->sex, slotInfo.bodyPalette, character->bodyCostume, 0, 0); } slotInfo.headPalette = character->headPalette; @@ -444,7 +444,7 @@ void UINewSelectCharWnd::OnCreate(int width, int height) { slotInfo.headPaletteName = g_session.GetHeadPalName(head, character->job, character->sex, slotInfo.headPalette); } - slotInfo.imfName = GetBodyImfName(character->job, character->sex, character->head, character->unknown_0058); + slotInfo.imfName = GetBodyImfName(character->job, character->sex, character->head, character->bodyCostume); } for (int index = 0; index < this->m_totalSlots; ++index) { @@ -499,7 +499,7 @@ void UINewSelectCharWnd::Paint() { const CharSlotInfo& slotInfo = this->m_charSlotInfos[slot]; const int sex = info->sex == 99 ? static_cast(g_session.m_sex) : info->sex; FuncDrawWNDChar( - this, slotInfo.x, slotInfo.y, sex, info->job, info->job, info->unknown_0058, info->head, info->accessory, info->accessory2, info->accessory3, info->robe, + this, slotInfo.x, slotInfo.y, sex, info->job, info->job, info->bodyCostume, info->head, info->accessory, info->accessory2, info->accessory3, info->robe, 0, 0, info->bodyStyle, info->headPalette, slotInfo.action, slotInfo.frame, this->m_lastTick ) .Draw(true); @@ -529,10 +529,10 @@ void UINewSelectCharWnd::Paint() { if (slot == this->m_pageSlot && deleteDate.IsBeforeNow() == 1 && static_cast(this->m_window100)->Disabled() == 1) { static_cast(this->m_window100)->Enable(1); } - this->m_charSlotInfos[slot].unknown_0148 = 16; + this->m_charSlotInfos[slot].actionBase = 16; this->m_charSlotInfos[slot].action = 16; } else { - this->m_charSlotInfos[slot].unknown_0148 = 0; + this->m_charSlotInfos[slot].actionBase = 0; this->m_charSlotInfos[slot].action = 0; } } @@ -559,7 +559,7 @@ void __stdcall Nullsub244(int, int) { // FUNCTION: fn_09593 void UINewSelectCharWnd::OnProcess() { if (g_mouse.buttons[0] == 3) { - if (g_windowMgr.unknown_0210 != 0) { + if (g_windowMgr.menuWnd != 0) { g_windowMgr.CloseWindow(WID_MENUWND); } } @@ -581,7 +581,7 @@ void UINewSelectCharWnd::OnProcess() { // OFFSET: 0x007D77D0 // FUNCTION: fn_09594 int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { - if (g_windowMgr.unknown_03BC != nullptr || g_windowMgr.unknown_03B8 != nullptr || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) != nullptr) { + if (g_windowMgr.secondPasswordEditWnd != nullptr || g_windowMgr.secondPasswordInputWnd != nullptr || g_windowMgr.LookupWindow(WID_NEWMAKECHARWND) != nullptr) { return 0; } @@ -607,8 +607,8 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg g_session.SetPlayerNameKey(reinterpret_cast(info->name)); g_session.SetFlag(info->sex == 'c' ? static_cast(g_session.m_sex) : static_cast(info->sex)); this->m_unknown118 = true; - const BlockedCharacterEntry* blocked = reinterpret_cast(&g_session.unknown_07F4[0x40]); - for (int index = 0; index < g_session.unknown_59D0; ++index) { + const BlockedCharacterEntry* blocked = reinterpret_cast(&g_session.characterSelectionData[0x40]); + for (int index = 0; index < g_session.blockedCharacterCount; ++index) { if (info->gid == blocked[index].gid) { char text[260]; std::memset(text, 0, sizeof(text)); @@ -667,7 +667,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg g_selectedSlotIndex = static_cast(this->m_page * this->m_slotsPerPage + index); this->m_slotButtons2[index]->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); if (argument2 != 0xE2 && this->m_slotStatus[static_cast(g_selectedSlotIndex)] != 0 && - static_cast(this->m_slotButtons2[index])->unknown_0128 == 0) { + static_cast(this->m_slotButtons2[index])->m_displayMode == 0) { this->SendMsg(nullptr, UM_COMMAND, ID_MAKE, this->m_pageSlot, 0, 0); break; } @@ -708,8 +708,8 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg const CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, static_cast(g_selectedSlotIndex), 0, 0, 0)); - const BlockedCharacterEntry* blocked = reinterpret_cast(&g_session.unknown_07F4[0x40]); - for (int index = 0; index < g_session.unknown_59D0; ++index) { + const BlockedCharacterEntry* blocked = reinterpret_cast(&g_session.characterSelectionData[0x40]); + for (int index = 0; index < g_session.blockedCharacterCount; ++index) { if (info->gid == blocked[index].gid) { char text[260]; std::memset(text, 0, sizeof(text)); @@ -919,8 +919,8 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } case 0x1A0: g_windowMgr.EnsureWindow(WID_SECONDPASSWORDEDITWND); - g_windowMgr.unknown_03BC->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); - g_windowMgr.unknown_03BC->SendMsg(nullptr, UM_COMMAND, ID_OK, 1, 0, 0); + g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_CHANGE_STORE_PASSWORD, 0, 0, 0); + g_windowMgr.secondPasswordEditWnd->SendMsg(nullptr, UM_COMMAND, ID_OK, 1, 0, 0); break; case 0x1A1: g_windowMgr.EnsureWindow(WID_SECONDPASSWORDEDITWND); @@ -974,7 +974,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->m_unknown13C) { break; } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { @@ -1000,7 +1000,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->m_unknown13C) { break; } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { @@ -1028,7 +1028,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->m_unknown13C) { break; } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { @@ -1052,7 +1052,7 @@ int UINewSelectCharWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg if (this->m_unknown13C) { break; } - if (g_windowMgr.unknown_0210 != nullptr) { + if (g_windowMgr.menuWnd != nullptr) { g_windowMgr.CloseWindow(WID_MENUWND); } if (g_windowMgr.HasModalWindow() != 1 && this->m_unknown118 != true) { diff --git a/Source/UI/Window/UINewSelectCharWnd.h b/Source/UI/Window/UINewSelectCharWnd.h index 4863661e2..16ad3991d 100644 --- a/Source/UI/Window/UINewSelectCharWnd.h +++ b/Source/UI/Window/UINewSelectCharWnd.h @@ -27,7 +27,7 @@ struct CharSlotInfo { /* 0114 */ int bodyPalette; /* 0118 */ std::string headPaletteName; /* 0130 */ std::string bodyPaletteName; - /* 0148 */ int unknown_0148; + /* 0148 */ int actionBase; /* 014C */ int action; /* 0150 */ int frame; /* 0154 */ int job; diff --git a/Source/UI/Window/UINewSkillListWnd.cpp b/Source/UI/Window/UINewSkillListWnd.cpp index e1f452b5e..128a0149e 100644 --- a/Source/UI/Window/UINewSkillListWnd.cpp +++ b/Source/UI/Window/UINewSkillListWnd.cpp @@ -145,7 +145,7 @@ void UINewSkillListWnd::ApplySkillPoints() { const int value = entry.value; CSkillInfo* skill = g_session.m_skillBundle.FindGrouped(id); if (skill != nullptr && skill->available != 0) { - const int next = skill->unknown_0030 + 1; + const int next = skill->learnedLevel + 1; if (next <= value) { for (int count = value - next + 1; count != 0; --count) { g_modeMgr.gameMode->SendMsg(MM_UPGRADE_SKILLLEVEL, id, 0, 0, 0); @@ -225,11 +225,11 @@ void UINewSkillListWnd::DrawCharacter() { if (g_session.IsDoramJob(job) == true) { int view = 0; if (layer == 4) { - view = *reinterpret_cast(&g_session.unknown_0EF4[0]); + view = *reinterpret_cast(&g_session.accessoryAppearance[0]); } else if (layer == 3) { - view = *reinterpret_cast(&g_session.unknown_0EF4[4]); + view = *reinterpret_cast(&g_session.accessoryAppearance[4]); } else if (layer == 2) { - view = *reinterpret_cast(&g_session.unknown_0EF4[8]); + view = *reinterpret_cast(&g_session.accessoryAppearance[8]); } int x = 0; int y = 0; @@ -242,7 +242,7 @@ void UINewSkillListWnd::DrawCharacter() { if (layer == 1) { CActRes* bodyAction = static_cast(ResourceMgr::Instance().Load(actions[0].c_str())); const ActionFrame& bodyFrame = bodyAction->Frame(23, frame); - if (actionFrame.anchorCount != 0 && bodyFrame.anchorCount != 0 && actionFrame.anchors[0].unknown_0008 == bodyFrame.anchors[0].unknown_0008) { + if (actionFrame.anchorCount != 0 && bodyFrame.anchorCount != 0 && actionFrame.anchors[0].attachmentId == bodyFrame.anchors[0].attachmentId) { offsetX += bodyFrame.anchors[0].x - actionFrame.anchors[0].x; offsetY += bodyFrame.anchors[0].y - actionFrame.anchors[0].y; g_skillListHeadOffsetX = offsetX; @@ -272,14 +272,14 @@ void UINewSkillListWnd::DrawCharacter() { texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } const int y = offsetY - 25 + cell.y + this->geometry.height; const int clipY = y < 0 ? y : 0; this->geometry.surface->DrawSurface( cell.x + offsetX + 48, y < 0 ? 0 : y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f - clipY), image->width, - image->height + clipY, cell.mirrored != 0, image->unknown_0004 + 1, image->unknown_0006 + 1, 0, 0 + image->height + clipY, cell.mirrored != 0, image->doubleWidth + 1, image->doubleHeight + 1, 0, 0 ); } } @@ -302,7 +302,7 @@ void UINewSkillListWnd::DrawSkillList() { SkinPaletteChannels(ResourceMgr::Instance(), 6, 2, red, green, blue); if (skill.level == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 10, 2, red, green, blue); - } else if (skill.unknown_0014 == 0) { + } else if (skill.spCost == 0) { SkinPaletteChannels(ResourceMgr::Instance(), 14, 2, red, green, blue); } this->FillRegion(x + 104, y + 32, 164, 28, RGB(red, green, blue)); @@ -356,10 +356,10 @@ void UINewSkillListWnd::DrawSkillList() { } this->DrawTextAt(levelX, textY, text, 0, 0, 12, RGB(green, green, red), 0, 0); - if (skill.unknown_000C == 0) { + if (skill.type == 0) { std::sprintf(text, LookupMessage(MSI_PASSIVE)); } else { - int sp = static_cast(skill.unknown_0014); + int sp = static_cast(skill.spCost); const int useLevel = g_session.UseLevel(static_cast(skill.id)); bool found = false; if (usesLevel) { @@ -428,7 +428,7 @@ CSkillInfo UINewSkillListWnd::SkillAt(int index, bool live) { CSkillInfo result(0); int sequentialIndex = 0; for (const CSkillInfo& skill : this->SkillList(this->m_tab, live)) { - int key = skill.unknown_0024; + int key = skill.treePosition; if (g_session.m_simplifiedSkillList != 0) { key = sequentialIndex; } @@ -471,7 +471,7 @@ std::optional UINewSkillListWnd::SkillPtr(int index, bool live) { } for (auto it = list.begin(); it != list.end(); ++it) { - if (it->unknown_0024 == index) { + if (it->treePosition == index) { return &*it; } } @@ -737,7 +737,7 @@ void UINewSkillListWnd::InitTabs() { if (initialTabCount == 0) { this->m_tabs->AddTab(LookupMessage(MSI_ETC), ""); } - this->m_tabs->unknown_007C = this->m_tab; + this->m_tabs->activeTabIndex = this->m_tab; } // OFFSET: 0x009B0E40 @@ -1002,7 +1002,7 @@ void UINewSkillListWnd::OnLBtnDown(int x, int y) { if (this->IsSkillArea(x, y) && !this->m_locked && this->m_selectedSkill != -1 && g_replayAnimationScaling == 0) { CSkillInfo skill = this->SkillAt(this->m_selectedSkill, false); - if (skill.available != 0 && skill.level != 0 && skill.unknown_000C != 0) { + if (skill.available != 0 && skill.level != 0 && skill.type != 0) { CGameMode* gameMode = static_cast(g_modeMgr.GetGameMode()); if (gameMode) { int level = g_session.UseLevel(skill.id); @@ -1027,7 +1027,7 @@ void UINewSkillListWnd::OnLBtnUp(int x, int y) { const int gate = g_session.m_simplifiedSkillList; if (gate == 0 && this->IsSkillArea(x, y)) { CSkillInfo skill = this->SkillAt(this->m_selectedSkill, false); - if (skill.unknown_002C != 0 && skill.available != 0) { + if (skill.canPlanLevel != 0 && skill.available != 0) { if (this->IncreaseSkillLevel(skill.id)) { this->m_needsRedraw = 1; this->m_locked = 1; @@ -1111,7 +1111,7 @@ void UINewSkillListWnd::OnRBtnUp(int x, int y) { return; } - window->SendMsg(nullptr, UM_SKILLDESCRIBE, skill.id, skill.unknown_0018, skill.level, 1); + window->SendMsg(nullptr, UM_SKILLDESCRIBE, skill.id, skill.upgradable, skill.level, 1); int originX = 0; int originY = 0; @@ -1142,11 +1142,11 @@ void UINewSkillListWnd::UpdateRequiredSkills() { } for (CSkillInfo& skill : this->SkillList(this->m_tab, false)) { - const int key = static_cast(skill.unknown_0024); + const int key = static_cast(skill.treePosition); if (key != -1 && this->m_firstRow * this->m_columns <= key && key == this->m_selectedSkill) { this->m_values.push_back({static_cast(skill.id), 0}); for (SkillInfoEntry& entry : skill.entries) { - NewSkillListValue required{static_cast(entry.unknown_0000), static_cast(entry.unknown_0004)}; + NewSkillListValue required{static_cast(entry.skillId), static_cast(entry.requiredLevel)}; const int tab = SkillTabOf(required.id); UITabControl* tabs = this->m_tabs; if (tab != this->m_tab && tab < static_cast(tabs->labels.size())) { @@ -1163,7 +1163,7 @@ void UINewSkillListWnd::UpdateRequiredSkills() { break; } } - entry.unknown_0004 = required.value; + entry.requiredLevel = required.value; this->m_values.push_back(required); } return; @@ -1195,7 +1195,7 @@ void UINewSkillListWnd::UpdateScrollBar() { if (gate == 0) { int maxKey = 0; for (const CSkillInfo& skill : list) { - const int key = static_cast(skill.unknown_0024); + const int key = static_cast(skill.treePosition); if (key > maxKey) { maxKey = key; } @@ -1269,8 +1269,8 @@ void UINewSkillListWnd::LayoutButtons() { if (g_session.m_simplifiedSkillList == 0) { if (!this->m_locked) { for (const CSkillInfo& skill : list) { - const unsigned int slot = skill.unknown_0024 - this->m_columns * this->m_firstRow; - if (slot < 42 && skill.available != 0 && skill.unknown_0024 != 0xFFFFFFFF && skill.level != 0 && + const unsigned int slot = skill.treePosition - this->m_columns * this->m_firstRow; + if (slot < 42 && skill.available != 0 && skill.treePosition != 0xFFFFFFFF && skill.level != 0 && CSkillInfo::UsesLevel(*g_session.m_hotkeyScript, skill.id)) { const int y = static_cast(slot) / this->m_columns * 56 + 70; const int x = static_cast(slot) % this->m_columns * 68; @@ -1285,9 +1285,9 @@ void UINewSkillListWnd::LayoutButtons() { for (int row = 0; row < 10; ++row) { const int y = row * 32 + 48; CSkillInfo skill = this->VisibleSkill(row); - if (skill.level < static_cast(skill.unknown_0028) && row < this->m_visibleRows && + if (skill.level < static_cast(skill.maxLevel) && row < this->m_visibleRows && static_cast(this->m_firstRow + row) < list.size() && this->m_skillPoints != 0 && skill.available != 0 && - skill.unknown_0018 != 0) { + skill.upgradable != 0) { this->m_btnLevelUp[row]->Move(78, y - 14); } if (!this->m_locked && row < this->m_visibleRows && static_cast(this->m_firstRow + row) < list.size() && @@ -1386,7 +1386,7 @@ int UINewSkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case 248: if (this->m_skillPoints != 0) { CSkillInfo skill = this->SkillAt(this->m_columns * this->m_firstRow + a - 239, false); - if (skill.available != 0 && skill.unknown_0018 != 0 && this->IncreaseSkillLevel(skill.id)) { + if (skill.available != 0 && skill.upgradable != 0 && this->IncreaseSkillLevel(skill.id)) { this->m_needsRedraw = 1; this->m_locked = 1; this->LayoutButtons(); @@ -1429,7 +1429,7 @@ int UINewSkillListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, s case UM_TAB: { std::list& list = this->SkillList(a, false); if (!this->IsExtraTab(a) && list.size() == 0) { - this->m_tabs->unknown_007C = this->m_tab; + this->m_tabs->activeTabIndex = this->m_tab; return 0; } if (this->m_tab != a) { @@ -1528,15 +1528,15 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { break; } } - target = (std::max)(static_cast(info->unknown_0030), current) + 1; - if (static_cast(info->unknown_0030) >= static_cast(info->unknown_0028)) { + target = (std::max)(static_cast(info->learnedLevel), current) + 1; + if (static_cast(info->learnedLevel) >= static_cast(info->maxLevel)) { return false; } } else { target = it->value; } - if (target > static_cast(info->unknown_0028)) { + if (target > static_cast(info->maxLevel)) { continue; } @@ -1547,12 +1547,12 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { break; } } - current = (std::max)(static_cast(info->unknown_0030), current); + current = (std::max)(static_cast(info->learnedLevel), current); if (current >= target) { continue; } - if (static_cast(info->unknown_002C) <= 0) { + if (static_cast(info->canPlanLevel) <= 0) { const char* name = info->DisplayName(*g_session.m_hotkeyScript); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(FormatString(LookupMessage(MSI_REFUSE_LOGIN_AUTH), name)), 0xFF, 0, 0, 0); return false; @@ -1581,7 +1581,7 @@ bool UINewSkillListWnd::IncreaseSkillLevel(int skillId) { std::list& list = this->SkillList(this->m_tab, false); for (CSkillInfo& skill : list) { if (static_cast(skill.id) == skillId) { - if (skill.level >= static_cast(skill.unknown_0028)) { + if (skill.level >= static_cast(skill.maxLevel)) { return false; } ++skill.level; @@ -1623,7 +1623,7 @@ void UINewSkillListWnd::DrawSkillTree() { } for (const CSkillInfo& skill : this->SkillList(this->m_tab, false)) { - const int position = static_cast(skill.unknown_0024); + const int position = static_cast(skill.treePosition); if (position == -1) { continue; } @@ -1643,7 +1643,7 @@ void UINewSkillListWnd::DrawSkillTree() { if (!this->IsExtraTab(this->m_tab) && HasSkillValue(this->m_values, static_cast(skill.id))) { this->FillRegion(x + 3, y + 43, 26, 26, 0xCCC0FF); DrawRoundedBorder(*this, x + 2, y + 42, 28, 28, 0xC1B6FF); - } else if (this->m_skillPoints != 0 && skill.available != 0 && skill.unknown_0018 != 0) { + } else if (this->m_skillPoints != 0 && skill.available != 0 && skill.upgradable != 0) { this->FillRegion(x + 3, y + 43, 26, 26, 0xF0C4AF); DrawRoundedBorder(*this, x + 2, y + 42, 28, 28, 0xF0C4AF); } else { @@ -1665,7 +1665,7 @@ void UINewSkillListWnd::DrawSkillTree() { if (value.size() != 0) { DrawOutlinedText(*this, x + 30, y + 58, value.c_str(), 0, 0xFFFFFF, 0, 0, 11, 1, 0); } - } else if (this->m_skillPoints != 0 && skill.available != 0 && skill.unknown_0018 != 0) { + } else if (this->m_skillPoints != 0 && skill.available != 0 && skill.upgradable != 0) { this->DrawAuxiliary(4, x + 4, y + 44, &bitmap->image, true, true); } else if (level == 0) { shade = 120; @@ -1677,7 +1677,7 @@ void UINewSkillListWnd::DrawSkillTree() { const int planned = SkillValueOf(this->m_unknown_02A0, static_cast(skill.id)); const CSkillInfo* current = g_session.m_skillBundle.FindGrouped(skill.id); if (current) { - int added = planned - current->unknown_0030; + int added = planned - current->learnedLevel; if (added < 0) { added = 0; } @@ -1687,7 +1687,7 @@ void UINewSkillListWnd::DrawSkillTree() { } } - const int maxLevel = this->SkillAt(static_cast(skill.unknown_0024), true).level; + const int maxLevel = this->SkillAt(static_cast(skill.treePosition), true).level; int red = shade; int green = shade; int blue = shade; diff --git a/Source/UI/Window/UINormalMB.cpp b/Source/UI/Window/UINormalMB.cpp index 7eb284b65..ec88881e2 100644 --- a/Source/UI/Window/UINormalMB.cpp +++ b/Source/UI/Window/UINormalMB.cpp @@ -41,7 +41,7 @@ int UINormalMB::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::int } if (this->m_keepOpen) { - g_windowMgr.unknown_0474 = id; + g_windowMgr.modalResponse = id; return 0; } } diff --git a/Source/UI/Window/UINoticeWnd.h b/Source/UI/Window/UINoticeWnd.h index a366b94d7..7c2e64ad4 100644 --- a/Source/UI/Window/UINoticeWnd.h +++ b/Source/UI/Window/UINoticeWnd.h @@ -17,7 +17,7 @@ public: /* 00B4 */ UIStaticText* m_texts[19]; /* 0100 */ unsigned char unknown_0100[0x08]; - /* 0108 */ int unknown_0108; + /* 0108 */ int lineCount; /* 010C */ int unknown_010C; /* 0110 */ const char* m_patchFile; /* 0114 */ int m_noticeCount; diff --git a/Source/UI/Window/UIOpenRoulletteWnd.cpp b/Source/UI/Window/UIOpenRoulletteWnd.cpp index b7fb06cc6..ae29723f5 100644 --- a/Source/UI/Window/UIOpenRoulletteWnd.cpp +++ b/Source/UI/Window/UIOpenRoulletteWnd.cpp @@ -44,7 +44,7 @@ int UIOpenRoulletteWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, return this->UIWindow::SendMsg(sender, message, a, b, c, d); } - if (a == 192 && g_windowMgr.unknown_0464 == nullptr) { + if (a == 192 && g_windowMgr.roulletteWnd == nullptr) { RouletteOpenPacket packet; packet.id = ID_CZ_REQ_OPEN_ROULETTE; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.id), &packet); diff --git a/Source/UI/Window/UIPetEvolutionWnd.cpp b/Source/UI/Window/UIPetEvolutionWnd.cpp index 1d8fd1a11..489292405 100644 --- a/Source/UI/Window/UIPetEvolutionWnd.cpp +++ b/Source/UI/Window/UIPetEvolutionWnd.cpp @@ -72,7 +72,7 @@ void UIPetEvolutionWnd::Paint() { int job = g_session.GetPetJobByEggItem(this->m_petEggId); if (job != -1) { - g_session.GetPetIllustName(job, g_session.unknown_1038, text); + g_session.GetPetIllustName(job, g_session.petAccessory, text); CBitmapRes* illust = dynamic_cast(ResourceMgr::Instance().Load(Resolve(text))); if (!illust) { illust = dynamic_cast(ResourceMgr::Instance().Load(Resolve("userinterface\\illust\\pet_noimage.bmp"))); @@ -94,7 +94,7 @@ void UIPetEvolutionWnd::Paint() { job = g_session.GetPetJobByEggItem(this->m_evolvedEggId); if (job != -1) { - g_session.GetPetIllustName(job, g_session.unknown_1038, text); + g_session.GetPetIllustName(job, g_session.petAccessory, text); CBitmapRes* illust = dynamic_cast(ResourceMgr::Instance().Load(Resolve(text))); if (!illust) { illust = dynamic_cast(ResourceMgr::Instance().Load(Resolve("userinterface\\illust\\pet_noimage.bmp"))); @@ -145,11 +145,11 @@ int UIPetEvolutionWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_PET_AUTO_FEEDING)), 255, 0, 0, 0); return 0; } - materials.push_back(static_cast(item.unknown_0000[1])); + materials.push_back(static_cast(item.identity[1])); materials.push_back(static_cast(it->second)); } - if (g_session.unknown_1038 != 0) { + if (g_session.petAccessory != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_TIME_LINE_DAY2)), 255, 0, 0, 0); return 0; } diff --git a/Source/UI/Window/UIPetInfoWnd.h b/Source/UI/Window/UIPetInfoWnd.h index d3ad8803e..7a4b3763d 100644 --- a/Source/UI/Window/UIPetInfoWnd.h +++ b/Source/UI/Window/UIPetInfoWnd.h @@ -26,13 +26,13 @@ public: /* 00B4 */ UIEditCtrl* nameEdit; /* 00B8 */ PetInfoWndInfo* saved; - /* 00BC */ UIBitmapButton* unknown_00BC; - /* 00C0 */ UINoneVisibleButton* unknown_00C0; + /* 00BC */ UIBitmapButton* renameButton; + /* 00C0 */ UINoneVisibleButton* statusButton; /* 00C4 */ UINormalMB* window_00C4; /* 00C8 */ UIPetInfoBarGraph* friendlyGauge; /* 00CC */ std::string friendlyText; - /* 00E4 */ unsigned char unknown_00E4; - /* 00E8 */ UICheckBox* unknown_00E8; + /* 00E4 */ unsigned char autoFeedAvailable; + /* 00E8 */ UICheckBox* autoFeedCheck; }; diff --git a/Source/UI/Window/UIRegisterMgr.h b/Source/UI/Window/UIRegisterMgr.h index f4889b30e..4889b0e82 100644 --- a/Source/UI/Window/UIRegisterMgr.h +++ b/Source/UI/Window/UIRegisterMgr.h @@ -21,8 +21,8 @@ public: bool SaveTemporary(); /* 0004 */ std::map> entries; - /* 000C */ std::map> unknown_000C; - /* 0014 */ std::map> unknown_0014; + /* 000C */ std::map> windowPositions; + /* 0014 */ std::map> windowSizes; /* 001C */ CRITICAL_SECTION lock; }; diff --git a/Source/UI/Window/UIRoMapWnd.cpp b/Source/UI/Window/UIRoMapWnd.cpp index eea3a6320..f3924b1d5 100644 --- a/Source/UI/Window/UIRoMapWnd.cpp +++ b/Source/UI/Window/UIRoMapWnd.cpp @@ -66,11 +66,11 @@ void SetRoMapMarker(std::string name, const WorldViewArea& area, RoMapMarker& ma // FUNCTION: fn_12622 __declspec(noinline) void UIRoMapWnd::ClearRecords() { this->m_records.clear(); - this->unknown_00D0 = 0; - this->unknown_00C4 = 0; - this->unknown_00C8 = 0; - this->unknown_00C0 = 0; - this->unknown_00BC = 0; + this->previewTexture = 0; + this->hoverTooltip = 0; + this->previewArea = 0; + this->selectedRecord = 0; + this->hoveredRecord = 0; this->unknown_00CC = 0; } @@ -87,7 +87,7 @@ void UIRoMapWnd::ResetKafraBounds() { // FUNCTION: fn_12634 void UIRoMapWnd::UpdateNavigationButtons() { UIWindow** buttons = reinterpret_cast(reinterpret_cast(this) + 0x20C); - if (g_windowMgr.window_4F174 != nullptr && !g_navigationManager.unknown_1254) { + if (g_windowMgr.window_4F174 != nullptr && !g_navigationManager.expandedMap) { buttons[0]->Move(-100, -100); buttons[1]->Move(-100, -100); buttons[2]->Move(-100, -100); @@ -95,7 +95,7 @@ void UIRoMapWnd::UpdateNavigationButtons() { buttons[0]->Move(335, 0); buttons[1]->Move(375, 3); buttons[2]->Move(131, 0); - g_navigationManager.unknown_1248 = true; + g_navigationManager.hideWindow = true; } this->Invalidate(); @@ -104,30 +104,30 @@ void UIRoMapWnd::UpdateNavigationButtons() { // OFFSET: 0x009335B0 // FUNCTION: fn_12725 void UIRoMapWnd::OnRBtnUp(int, int) { - if (g_windowMgr.unknown_0214 != 0) { + if (g_windowMgr.comboBoxWnd != 0) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } - this->unknown_0208 = 0; + this->selectedMapIndex = 0; } // OFFSET: 0x00919B50 // FUNCTION: fn_12598 void UIRoMapWnd::DrawHoverTooltip() { - if (this->unknown_00C4 != nullptr) { - delete this->unknown_00C4; - this->unknown_00C4 = nullptr; + if (this->hoverTooltip != nullptr) { + delete this->hoverTooltip; + this->hoverTooltip = nullptr; } - if (this->unknown_00BC == nullptr || this->unknown_00C8 == nullptr) { + if (this->hoveredRecord == nullptr || this->previewArea == nullptr) { return; } bool leftSide = false; int maxWidth = 0; const int lineHeight = this->TextHeight(" ", 0, 0, 12, 1, 0) + 3; - const WorldViewRecord* record = this->unknown_00BC; - const int* anchor = this->unknown_00C8; + const WorldViewRecord* record = this->hoveredRecord; + const int* anchor = this->previewArea; const RECT rect = reinterpret_cast(record->left); int x; if (anchor[2] < rect.right) { @@ -139,7 +139,7 @@ void UIRoMapWnd::DrawHoverTooltip() { int y = anchor[1]; int count = 0; - for (std::list::const_iterator it = record->unknown_004C.begin(); it != this->unknown_00BC->unknown_004C.end(); ++it) { + for (std::list::const_iterator it = record->relatedNames.begin(); it != this->hoveredRecord->relatedNames.end(); ++it) { const int width = this->TextWidth(it->c_str(), 0, 0, 12, 1, 0); if (maxWidth < width) { maxWidth = width; @@ -161,13 +161,13 @@ void UIRoMapWnd::DrawHoverTooltip() { } int textY = y + 5; - for (std::list::const_iterator it = this->unknown_00BC->unknown_004C.begin(); it != this->unknown_00BC->unknown_004C.end(); ++it) { + for (std::list::const_iterator it = this->hoveredRecord->relatedNames.begin(); it != this->hoveredRecord->relatedNames.end(); ++it) { const std::uint32_t color = std::strcmp(it->c_str(), g_session.DecodePlayerName()) == 0 ? 0x8080F0 : 0xFFFFFF; DrawOutlinedText(*this, boxX + 5, textY, it->c_str(), 0, color, 0, 0, 12, 1, 0); textY += lineHeight; } - this->unknown_00C4 = new RoMapTooltipBox(boxX, y, width, height); + this->hoverTooltip = new RoMapTooltipBox(boxX, y, width, height); DrawRoundedBorder(*this, boxX, y, width, height, 0xFFFFFF); } @@ -247,7 +247,7 @@ void UIRoMapWnd::DrawFieldLabels() { } for (std::vector::const_iterator fieldIt = map->fields.begin(); fieldIt != map->fields.end(); ++fieldIt) { - name = (*fieldIt)->unknown_002C; + name = (*fieldIt)->fieldName; if (name.empty()) { continue; } @@ -271,7 +271,7 @@ void UIRoMapWnd::DrawFieldLabels() { this->DrawTextAt(x + 1, y + 1, name.c_str(), 0, 0, fieldHeight, fieldShadow, 0, 0); this->DrawTextAt(x - 1, y - 1, name.c_str(), 0, 0, fieldHeight, fieldShadow, 0, 0); this->DrawTextAt(x, y, name.c_str(), 0, 0, fieldHeight, fieldColor, 0, 0); - name = (*fieldIt)->unknown_0044; + name = (*fieldIt)->description; if (name.empty()) { continue; } @@ -303,7 +303,7 @@ void UIRoMapWnd::DrawRecordBorders() { void UIRoMapWnd::DrawDungeonLinks() { CTexture* const positionTexture = g_texMgr.Load("유저인터페이스\\worldview_interface\\wv_dunPos.bmp", 0, true, true, false); CTexture* const selectTexture = g_texMgr.Load("유저인터페이스\\worldview_interface\\wv_dunSelect.bmp", 0, true, true, false); - const std::uint32_t rectColor = g_worldViewMgr.unknown_0084; + const std::uint32_t rectColor = g_worldViewMgr.dungeonOverlayColor; const std::uint32_t lineColor = g_worldViewMgr.dungeonColor; const std::uint32_t selectColor = g_worldViewMgr.dungeonSelectColor; std::vector::iterator it = g_worldViewMgr.CurrentWorld()->maps.begin(); @@ -314,7 +314,7 @@ void UIRoMapWnd::DrawDungeonLinks() { continue; } - const WorldViewRecord* selected = this->unknown_00C0; + const WorldViewRecord* selected = this->selectedRecord; bool isSelected; int x; int y; @@ -462,7 +462,7 @@ void UIRoMapWnd::RefreshPartyRecords() { found = false; for (std::list::iterator it = this->m_records.begin(); it != this->m_records.end(); ++it) { if (it->name == map) { - it->unknown_004C.push_back(name); + it->relatedNames.push_back(name); found = true; break; } @@ -472,7 +472,7 @@ void UIRoMapWnd::RefreshPartyRecords() { if (!found) { WorldViewRecord record; record.name = member.map; - record.unknown_004C.push_back(member.name); + record.relatedNames.push_back(member.name); if (this->LocateRecord(record)) { this->m_records.push_back(record); } @@ -483,7 +483,7 @@ void UIRoMapWnd::RefreshPartyRecords() { WorldViewRecord record; record.name = map; std::string name = g_session.DecodePlayerName(); - record.unknown_004C.push_back(std::move(name)); + record.relatedNames.push_back(std::move(name)); if (this->LocateRecord(record)) { this->m_records.push_back(record); } @@ -518,19 +518,19 @@ void UIRoMapWnd::OnMouseMove(int x, int y) { this->m_mouseX = x; this->m_mouseY = y; - this->unknown_00BC = nullptr; + this->hoveredRecord = nullptr; for (auto it = this->m_records.begin(); it != this->m_records.end(); ++it) { if (g_worldViewMgr.currentWorld == it->worldIndex && it->left < x && x < it->right && it->top < y && y < it->bottom) { - this->unknown_00BC = &*it; + this->hoveredRecord = &*it; break; } } this->Invalidate(); - if (this->unknown_00C0) { - delete this->unknown_00C0; - this->unknown_00C0 = nullptr; + if (this->selectedRecord) { + delete this->selectedRecord; + this->selectedRecord = nullptr; } unsigned int mapIndex = 0; @@ -545,14 +545,14 @@ void UIRoMapWnd::OnMouseMove(int x, int y) { } const int mapId = world->maps[mapIndex]->id; - this->unknown_00C0 = new WorldViewRecord(); - this->unknown_00C0->worldIndex = g_worldViewMgr.currentWorld; - this->unknown_00C0->mapIndex = mapId; - this->unknown_00C0->name = field->name; - reinterpret_cast(this->unknown_00C0->left) = reinterpret_cast(*field); + this->selectedRecord = new WorldViewRecord(); + this->selectedRecord->worldIndex = g_worldViewMgr.currentWorld; + this->selectedRecord->mapIndex = mapId; + this->selectedRecord->name = field->name; + reinterpret_cast(this->selectedRecord->left) = reinterpret_cast(*field); CWorldViewMap* map = world->maps[mapIndex]; - reinterpret_cast(this->unknown_00C0->unknown_000C) = reinterpret_cast(map->left); + reinterpret_cast(this->selectedRecord->screenLeft) = reinterpret_cast(map->left); this->Invalidate(); } @@ -576,7 +576,7 @@ void CKafraMoveMapServiceInfo::Build(std::string mapName) { // OFFSET: 0x00932C80 // FUNCTION: fn_12716 void CKafraMoveMapServiceInfo::Update(UIRoMapWnd* wnd, float elapsed) { - WorldViewRecord* record = wnd->unknown_00C0; + WorldViewRecord* record = wnd->selectedRecord; if (record && g_kafraServiceMapList.find(record->name) != g_kafraServiceMapList.end()) { if (this->mapName != record->name) { this->mapName = record->name; @@ -643,7 +643,7 @@ void UIRoMapWnd::DrawKafraMarkers(float elapsed) { // FUNCTION: fn_12779 void UIRoMapWnd::DrawMapMarker(const RoMapMarker& marker, unsigned char skipSelected) { if (skipSelected == 1) { - const WorldViewRecord* selected = this->unknown_00C0; + const WorldViewRecord* selected = this->selectedRecord; if (marker.area.left == selected->left && marker.area.right == selected->right && marker.area.top == selected->top && marker.area.bottom == selected->bottom) { return; @@ -658,20 +658,20 @@ void UIRoMapWnd::DrawMapMarker(const RoMapMarker& marker, unsigned char skipSele // OFFSET: 0x009119B0 // FUNCTION: fn_12522 -UIRoMapWnd::UIRoMapWnd() : UIFrameWnd(0), unknown_00D0(0) { +UIRoMapWnd::UIRoMapWnd() : UIFrameWnd(0), previewTexture(0) { g_session.m_hotkeyScript->Call("ReadKafraMoveMapServiceInfo", ""); g_session.m_hotkeyScript->Call("ReadKafraMiniMapPosInfo", ""); - this->unknown_01FC.clear(); + this->fieldNames.clear(); this->ClearRecords(); this->m_showLabels = 0; this->m_lastTime = 0; this->m_resetTime = 1; - this->m_flyingShipRoute.unknown_0038.assign("유저인터페이스\\worldview_interface\\wv_Airf3.bmp", 0x2F); - this->m_flyingShipRoute.unknown_0030 = 0xAAFFFFFF; - this->m_flyingShipRoute.unknown_002C = 1; - this->m_flyingShipRoute2.unknown_0038.assign("유저인터페이스\\worldview_interface\\wv_Airf3.bmp", 0x2F); - this->m_flyingShipRoute2.unknown_0030 = 0xAAFFFFFF; - this->m_flyingShipRoute2.unknown_002C = 0; + this->m_flyingShipRoute.lineTextureName.assign("유저인터페이스\\worldview_interface\\wv_Airf3.bmp", 0x2F); + this->m_flyingShipRoute.lineColor = 0xAAFFFFFF; + this->m_flyingShipRoute.routeType = 1; + this->m_flyingShipRoute2.lineTextureName.assign("유저인터페이스\\worldview_interface\\wv_Airf3.bmp", 0x2F); + this->m_flyingShipRoute2.lineColor = 0xAAFFFFFF; + this->m_flyingShipRoute2.routeType = 0; this->m_comboHeight = 0x12; this->m_mouseX = 0; this->m_mouseY = 0; @@ -684,15 +684,15 @@ UIRoMapWnd::UIRoMapWnd() : UIFrameWnd(0), unknown_00D0(0) { // OFFSET: 0x009144B0 // FUNCTION: fn_12541 UIRoMapWnd::~UIRoMapWnd() { - delete reinterpret_cast(this->unknown_00C8); - delete this->unknown_00C0; - this->unknown_00D0 = 0; + delete reinterpret_cast(this->previewArea); + delete this->selectedRecord; + this->previewTexture = 0; } // OFFSET: 0x0091E4D0 // FUNCTION: fn_12627 bool CFlyingShipRouteInfo::IsRouteMap(std::string mapName) { - switch (this->unknown_002C) { + switch (this->routeType) { case 0: if (mapName == "izlude.rsw" || mapName == "ra_fild12.rsw" || mapName == "yuno.rsw") { return true; @@ -716,13 +716,13 @@ void CFlyingShipRouteInfo::BuildRoute(const std::vector& mapNames) CWorldViewField* field = g_worldViewMgr.worlds[0]->FindField(it->c_str()); if (field) { std::string name = field->name; - WorldViewArea area = {field->left, field->top, field->right, field->bottom, field->unknown_0010}; + WorldViewArea area = {field->left, field->top, field->right, field->bottom, field->areaFlags}; RoMapMarker marker; SetRoMapMarker(name, area, marker); this->entries.push_back(reinterpret_cast(marker)); } } - reinterpret_cast(&this->unknown_0034)[1] = 1; + reinterpret_cast(&this->routeState)[1] = 1; } // OFFSET: 0x00938FF0 @@ -736,7 +736,7 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, return 0; case ID_STATUS: this->m_showLabels = !this->m_showLabels; - this->m_labelCheck->geometry.unknown_0030 = this->m_showLabels; + this->m_labelCheck->geometry.state = this->m_showLabels; this->m_labelCheck->Invalidate(); this->Invalidate(); return 0; @@ -764,13 +764,13 @@ int UIRoMapWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, this->Invalidate(); return 0; } - if (argument1 >= 0 && static_cast(argument1) < this->unknown_01FC.size()) { + if (argument1 >= 0 && static_cast(argument1) < this->fieldNames.size()) { { - std::string name(g_worldViewMgr.CurrentWorld()->maps[this->unknown_0208]->fields[argument1]->name); + std::string name(g_worldViewMgr.CurrentWorld()->maps[this->selectedMapIndex]->fields[argument1]->name); if (name.size() > 4) { name.resize(name.size() - 4); } - g_navigationManager.unknown_1254 = false; + g_navigationManager.expandedMap = false; g_navigationManager.SearchNavigation(name, 0, false); if (g_windowMgr.LookupWindow(WID_NAVIGATIONV4WND)) { static_cast(g_windowMgr.window_4F174)->SelectRoute(0); @@ -812,7 +812,7 @@ bool CFlyingShipRouteInfo::UpdateRoute(WorldViewRecord* record) { std::string name = record->name; - switch (this->unknown_002C) { + switch (this->routeType) { case 0: if (name == "izlude.rsw") { std::vector route; @@ -890,42 +890,42 @@ bool CFlyingShipRouteInfo::UpdateRoute(WorldViewRecord* record) { } if (this->m_moving) { - this->unknown_0028 = 1; - this->unknown_0018 = 0; - this->unknown_0024 = 0.0f; - this->unknown_0034 = 0; + this->routeReset = 1; + this->segmentIndex = 0; + this->travelledDistance = 0.0f; + this->routeState = 0; } return false; } // INLINED __forceinline void CFlyingShipRouteInfo::Update(UIRoMapWnd* wnd, float elapsed) { - if (!this->UpdateRoute(wnd->unknown_00C0)) { + if (!this->UpdateRoute(wnd->selectedRecord)) { return; } const int last = static_cast(this->entries.size()) - 1; if (last > 0) { - int index = this->unknown_0018; + int index = this->segmentIndex; this->m_moving = 1; - if (this->unknown_0024 > this->unknown_0020) { + if (this->travelledDistance > this->segmentLength) { if (index >= last - 1) { wnd->Invalidate(); index = -1; } ++index; - this->unknown_0024 = 0.0f; - this->unknown_0018 = index; + this->travelledDistance = 0.0f; + this->segmentIndex = index; } - const float dx = this->entries[index].unknown_002C[0] - this->entries[index + 1].unknown_002C[0]; - const float dy = this->entries[index].unknown_002C[1] - this->entries[index + 1].unknown_002C[1]; + const float dx = this->entries[index].screenPosition[0] - this->entries[index + 1].screenPosition[0]; + const float dy = this->entries[index].screenPosition[1] - this->entries[index + 1].screenPosition[1]; const float distance = SquareRoot(dx * dx + dy * dy); - if (this->unknown_0024 == 0.0f) { - this->unknown_0020 = distance; + if (this->travelledDistance == 0.0f) { + this->segmentLength = distance; } - this->unknown_0024 = elapsed * 200.0f + this->unknown_0024; - this->unknown_001C = this->unknown_0024 / this->unknown_0020; + this->travelledDistance = elapsed * 200.0f + this->travelledDistance; + this->segmentProgress = this->travelledDistance / this->segmentLength; } this->Draw(wnd); @@ -959,16 +959,16 @@ void UIRoMapWnd::DrawWorld() { this->DrawRecordFaces(1); this->DrawDungeonLinks(); - const WorldViewRecord* selected = this->unknown_00C0; - if (selected != nullptr && this->unknown_00C8 != nullptr) { + const WorldViewRecord* selected = this->selectedRecord; + if (selected != nullptr && this->previewArea != nullptr) { DrawAlphaRectangle(selected->left, selected->top, selected->right - selected->left, selected->bottom - selected->top, g_worldViewMgr.selectBoxColor); - if (this->unknown_00D0 != 0) { - DrawAlphaRectangle(this->unknown_00C8[0], this->unknown_00C8[1], 130, 130, 0x88000000); - reinterpret_cast(this->unknown_00D0)->Stretch(this->unknown_00C8[0], this->unknown_00C8[1], 130, 130); + if (this->previewTexture != 0) { + DrawAlphaRectangle(this->previewArea[0], this->previewArea[1], 130, 130, 0x88000000); + reinterpret_cast(this->previewTexture)->Stretch(this->previewArea[0], this->previewArea[1], 130, 130); } } - const RoMapTooltipBox* tooltip = this->unknown_00C4; + const RoMapTooltipBox* tooltip = this->hoverTooltip; if (tooltip != nullptr) { DrawAlphaRectangle(tooltip->x, tooltip->y, tooltip->width, tooltip->height, 0x66000000); } diff --git a/Source/UI/Window/UIRoMapWnd.h b/Source/UI/Window/UIRoMapWnd.h index 2ecde680d..4d57fd974 100644 --- a/Source/UI/Window/UIRoMapWnd.h +++ b/Source/UI/Window/UIRoMapWnd.h @@ -103,12 +103,12 @@ public: private: /* 00B4 */ std::list m_records; - /* 00BC */ WorldViewRecord* unknown_00BC; - /* 00C0 */ WorldViewRecord* unknown_00C0; - /* 00C4 */ RoMapTooltipBox* unknown_00C4; - /* 00C8 */ int* unknown_00C8; + /* 00BC */ WorldViewRecord* hoveredRecord; + /* 00C0 */ WorldViewRecord* selectedRecord; + /* 00C4 */ RoMapTooltipBox* hoverTooltip; + /* 00C8 */ int* previewArea; /* 00CC */ unsigned char unknown_00CC; - /* 00D0 */ int unknown_00D0; + /* 00D0 */ int previewTexture; /* 00D4 */ unsigned char m_showLabels; /* 00D8 */ std::uint32_t m_lastTime; /* 00DC */ unsigned char m_resetTime; @@ -120,8 +120,8 @@ private: /* 01F0 */ int m_comboHeight; /* 01F4 */ UIComboBoxDefWnd* m_worldCombo; /* 01F8 */ UICheckBox* m_labelCheck; - /* 01FC */ std::vector unknown_01FC; - /* 0208 */ int unknown_0208; + /* 01FC */ std::vector fieldNames; + /* 0208 */ int selectedMapIndex; /* 020C */ UIBitmapButton* m_searchButton; /* 0210 */ UIBitmapButton* m_searchListButton; /* 0214 */ UIEditCtrl* m_searchEdit; diff --git a/Source/UI/Window/UIRodexContentsWnd.cpp b/Source/UI/Window/UIRodexContentsWnd.cpp index e15f56112..e3e113dd8 100644 --- a/Source/UI/Window/UIRodexContentsWnd.cpp +++ b/Source/UI/Window/UIRodexContentsWnd.cpp @@ -65,11 +65,11 @@ void UIRodexContentsWnd::SetContentsText(const char* text) { // OFFSET: 0x00801CE0 // FUNCTION: fn_10015 UIRodexContentsWnd::UIRodexContentsWnd() - : UIFrameWnd(0), m_contents(nullptr), m_zeny(0), m_itemButton(nullptr), m_zenyButton(nullptr), unknown_0104(nullptr), - unknown_0108(nullptr) { + : UIFrameWnd(0), m_contents(nullptr), m_zeny(0), m_itemButton(nullptr), m_zenyButton(nullptr), m_confirmButton(nullptr), + m_adminButton(nullptr) { this->m_items.clear(); this->m_itemIndex = 0; - this->unknown_010C = false; + this->m_hasLineBreak = false; } // OFFSET: 0x00801F80 @@ -112,14 +112,14 @@ void UIRodexContentsWnd::OnCreate(int, int) { this->AddCloseButton("", 0); RodexMailStore* store = g_rodexMailStore; - switch (store->unknown_0010) { + switch (store->inboxType) { case MAIL_INBOX_NORMAL: { std::map::iterator mail = store->m_mails0.find(store->currentMailId); if (mail != store->m_mails0.end()) { - this->SetMailContents(mail->second.unknown_0004, mail->second.unknown_0024, mail->second.unknown_003C, mail->second.hasItem, mail->second.zeny, - mail->second.unknown_0001); + this->SetMailContents(mail->second.sender, mail->second.title, mail->second.body, mail->second.hasItem, mail->second.zeny, + mail->second.type); - if ((mail->second.unknown_0001 & 8) == 0 && mail->second.unknown_0194 == 0) { + if ((mail->second.type & 8) == 0 && mail->second.isKnownSender == 0) { UIBasicButton* report = new UIBasicButton(); report->Configure(70, LookupMessage(MSI_FAILED_HOMUN_AUTO_FEEDING_BY_ITEMACTION)); report->Move(224, 29); @@ -134,26 +134,26 @@ void UIRodexContentsWnd::OnCreate(int, int) { case MAIL_INBOX_ACCOUNT: { std::map::iterator mail = store->m_mails1.find(store->currentMailId); if (mail != store->m_mails1.end()) { - this->SetMailContents(mail->second.unknown_0004, mail->second.unknown_0024, mail->second.unknown_003C, mail->second.hasItem, mail->second.zeny, - mail->second.unknown_0001); + this->SetMailContents(mail->second.sender, mail->second.title, mail->second.body, mail->second.hasItem, mail->second.zeny, + mail->second.type); } break; } case MAIL_INBOX_RETURNED: { std::map::iterator mail = store->m_mails2.find(store->currentMailId); if (mail != store->m_mails2.end()) { - this->SetMailContents(mail->second.unknown_0004, mail->second.unknown_0024, mail->second.unknown_003C, mail->second.hasItem, mail->second.zeny, - mail->second.unknown_0001); + this->SetMailContents(mail->second.sender, mail->second.title, mail->second.body, mail->second.hasItem, mail->second.zeny, + mail->second.type); } break; } } - this->unknown_0104 = new UIBasicButton(); - this->unknown_0104->Configure(50, LookupMessage(MSI_RODEX_BUTTON_CONFIRM_ID)); - this->unknown_0104->Move(6, 376); - this->unknown_0104->SetId(211); - this->AddChild(this->unknown_0104); + this->m_confirmButton = new UIBasicButton(); + this->m_confirmButton->Configure(50, LookupMessage(MSI_RODEX_BUTTON_CONFIRM_ID)); + this->m_confirmButton->Move(6, 376); + this->m_confirmButton->SetId(211); + this->AddChild(this->m_confirmButton); } // OFFSET: 0x008023F0 @@ -196,9 +196,9 @@ void UIRodexContentsWnd::Paint() { ); this->DrawBitmap(x - 4, 319, &slot->image, true); DrawItemWithQuantity(*this, ResourceMgr::Instance(), x, 309, *item, 0, 0); - if (item->unknown_0088 > 0) { + if (item->grade > 0) { ResourceMgr& resources = ResourceMgr::Instance(); - const std::string name = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item->unknown_0088); + const std::string name = FormatOwnedString("유저인터페이스\\grade_enchant\\grade_icon%d.bmp", item->grade); const auto* grade = static_cast(resources.Load(Resolve(name.c_str()))); this->DrawBitmap(x, 321, &grade->image, true); } @@ -223,8 +223,8 @@ void UIRodexContentsWnd::OnMouseHover(int x, int y) { int tooltipY = 290; this->ToScreen(tooltipX, tooltipY); CMode* tooltip = g_modeMgr.gameMode; - if (item.identified == 1 && item.unknown_0098 != 0) { - tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + if (item.identified == 1 && item.optionCount != 0) { + tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { tooltip->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -254,7 +254,7 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg RodexMailAttachmentRequestPacket packet; packet.packetType = 0x9F3; packet.mailId = g_rodexMailStore->currentMailId; - packet.mailType = g_rodexMailStore->unknown_0010; + packet.mailType = g_rodexMailStore->inboxType; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); UIBitmapButton* button = this->m_itemButton; button->SetDisabled(1); @@ -270,7 +270,7 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg RodexMailAttachmentRequestPacket packet; packet.packetType = 0x9F1; packet.mailId = g_rodexMailStore->currentMailId; - packet.mailType = g_rodexMailStore->unknown_0010; + packet.mailType = g_rodexMailStore->inboxType; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); UIBitmapButton* button = this->m_zenyButton; button->SetDisabled(1); @@ -281,16 +281,16 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg case ID_CLOSE: g_windowMgr.CloseWindow(WID_RODEXCONTENTSWND); g_rodexMailStore->currentMailId = 0; - if (g_windowMgr.unknown_0454) { - reinterpret_cast(g_windowMgr.unknown_0454)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (g_windowMgr.rodexInboxWnd) { + reinterpret_cast(g_windowMgr.rodexInboxWnd)->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } break; case ID_DELETE: { RodexMailStore* store = g_rodexMailStore; std::map* mails; - if (store->unknown_0010 == 0) { + if (store->inboxType == 0) { mails = &store->m_mails0; - } else if (store->unknown_0010 == 1) { + } else if (store->inboxType == 1) { mails = &store->m_mails1; } else { mails = &store->m_mails2; @@ -301,21 +301,21 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg break; } - if ((mail->second.unknown_0001 & 6) != 0) { + if ((mail->second.type & 6) != 0) { g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_FAILE_MAIL_RECIEVER_INFO)), 0x64FFFF, 0, 0, 0); break; } if (g_windowMgr.Confirm(LookupMessage(MSI_DO_YOU_REALLY_WANT_DELETE), 2, false, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { - g_modeMgr.GetGameMode()->SendMsg(MM_DELETE_MAIL, static_cast(g_rodexMailStore->currentMailId), g_rodexMailStore->unknown_0010, 0, 0); - if (g_windowMgr.unknown_045C != 0) { + g_modeMgr.GetGameMode()->SendMsg(MM_DELETE_MAIL, static_cast(g_rodexMailStore->currentMailId), g_rodexMailStore->inboxType, 0, 0); + if (g_windowMgr.rodexContentsWnd != 0) { g_windowMgr.CloseWindow(WID_RODEXCONTENTSWND); } } break; } case ID_SEND_MAIL: - if (this->unknown_010C != 1) { + if (this->m_hasLineBreak != 1) { g_modeMgr.GetGameMode()->SendMsg(MM_OPEN_WRITE_RODEX, reinterpret_cast(this->m_title.c_str()), 0, 0, 0); } break; @@ -337,8 +337,8 @@ int UIRodexContentsWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg } this->Invalidate(); } else if (message == UM_SET_DISABLE) { - if (this->unknown_010C && this->unknown_0108) { - UIBasicButton* button = this->unknown_0108; + if (this->m_hasLineBreak && this->m_adminButton) { + UIBasicButton* button = this->m_adminButton; button->SetDisabled(1); button->Invalidate(); } @@ -357,7 +357,7 @@ void UIRodexContentsWnd::SetMailContents(std::string title, std::string sender, std::string text = body; std::pair lineBreak = RemoveLineBreakTag(this->m_sender); - this->unknown_010C = lineBreak.first; + this->m_hasLineBreak = lineBreak.first; this->m_sender = lineBreak.second; this->m_title = g_navigationLinkParser->ExpandMessages(this->m_title); @@ -377,7 +377,7 @@ void UIRodexContentsWnd::SetMailContents(std::string title, std::string sender, this->m_contents->TextColor(0x313131, 0xFFFFFFFF); this->m_contents->disabled = 1; this->m_contents->Invalidate(); - reinterpret_cast(&this->m_contents->unknown_0184)[1] = 1; + reinterpret_cast(&this->m_contents->editFlags)[1] = 1; this->m_contents->SetId(504); if (text.find("") == std::string::npos && text.find("") == std::string::npos) { @@ -412,17 +412,17 @@ void UIRodexContentsWnd::SetMailContents(std::string title, std::string sender, this->AddChild(this->m_zenyButton); } - if (g_rodexMailStore->unknown_0010 == 0 && (flags & 8) == 0) { - this->unknown_0108 = new UIBasicButton(); - this->unknown_0108->Configure(70, LookupMessage(MSI_RODEX_TAB_ADMIN)); - this->unknown_0108->Move(224, 376); - this->unknown_0108->SetId(305); - this->unknown_0108->SetDisabled(0); - this->unknown_0108->Invalidate(); - this->AddChild(this->unknown_0108); + if (g_rodexMailStore->inboxType == 0 && (flags & 8) == 0) { + this->m_adminButton = new UIBasicButton(); + this->m_adminButton->Configure(70, LookupMessage(MSI_RODEX_TAB_ADMIN)); + this->m_adminButton->Move(224, 376); + this->m_adminButton->SetId(305); + this->m_adminButton->SetDisabled(0); + this->m_adminButton->Invalidate(); + this->AddChild(this->m_adminButton); } - if (this->unknown_010C == 1) { + if (this->m_hasLineBreak == 1) { this->SendMsg(nullptr, UM_SET_DISABLE, 0, 0, 0, 0); } } diff --git a/Source/UI/Window/UIRodexContentsWnd.h b/Source/UI/Window/UIRodexContentsWnd.h index 2f63cb241..8a1f89749 100644 --- a/Source/UI/Window/UIRodexContentsWnd.h +++ b/Source/UI/Window/UIRodexContentsWnd.h @@ -39,9 +39,9 @@ public: /* 00F8 */ int m_itemIndex; /* 00FC */ UIBitmapButton* m_itemButton; /* 0100 */ UIBitmapButton* m_zenyButton; - /* 0104 */ UIBasicButton* unknown_0104; - /* 0108 */ UIBasicButton* unknown_0108; - /* 010C */ bool unknown_010C; + /* 0104 */ UIBasicButton* m_confirmButton; + /* 0108 */ UIBasicButton* m_adminButton; + /* 010C */ bool m_hasLineBreak; }; #endif diff --git a/Source/UI/Window/UIRoulletteWnd.cpp b/Source/UI/Window/UIRoulletteWnd.cpp index 4fddba526..f4f703466 100644 --- a/Source/UI/Window/UIRoulletteWnd.cpp +++ b/Source/UI/Window/UIRoulletteWnd.cpp @@ -126,9 +126,9 @@ void UIRoulletteWnd::OnCreate(int, int) { startSprite->SetActName("roullette\\Start.act"); startSprite->SetSize(99, 99); startSprite->Move(-100, -100); - startSprite->unknown_00BC = 0; - startSprite->unknown_00C0 = 0; - startSprite->unknown_00C4 = 1; + startSprite->animationIndex = 0; + startSprite->frameIndex = 0; + startSprite->animate = 1; this->AddChild(startSprite); auto* prizeSprite = new UISpriteButton(); @@ -137,9 +137,9 @@ void UIRoulletteWnd::OnCreate(int, int) { prizeSprite->SetActName("roullette\\GetWinPrize.act"); prizeSprite->SetSize(99, 99); prizeSprite->Move(-100, -100); - prizeSprite->unknown_00BC = 0; - prizeSprite->unknown_00C0 = 0; - prizeSprite->unknown_00C4 = 1; + prizeSprite->animationIndex = 0; + prizeSprite->frameIndex = 0; + prizeSprite->animate = 1; this->AddChild(prizeSprite); auto* stageArrow = new UISpriteButton(); @@ -148,9 +148,9 @@ void UIRoulletteWnd::OnCreate(int, int) { stageArrow->SetActName("roullette\\stageArrow.act"); stageArrow->SetSize(35, 40); stageArrow->Move(-100, -100); - stageArrow->unknown_00BC = 0; - stageArrow->unknown_00C0 = 0; - stageArrow->unknown_00C4 = 1; + stageArrow->animationIndex = 0; + stageArrow->frameIndex = 0; + stageArrow->animate = 1; this->AddChild(stageArrow); } @@ -258,8 +258,8 @@ void UIRoulletteWnd::OnMouseHover(int x, int y) { if (item.quantity != 0) { this->ToScreen(tooltipX, tooltipY); CMode* tooltip = g_modeMgr.gameMode; - if (item.identified == 1 && item.unknown_0098 != 0) { - tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.unknown_0098).c_str(), tooltipX, tooltipY, + if (item.identified == 1 && item.optionCount != 0) { + tooltip->ShowTooltip(FormatOwnedString(LookupMessage(MSI_FAILED_MAIL_LIMIT_CNT), item.DisplayName(0).c_str(), item.optionCount).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); } else { tooltip->ShowTooltip(item.DisplayName(0).c_str(), tooltipX, tooltipY, g_session.GetItemNameColor(item), 0, 1); @@ -271,7 +271,7 @@ void UIRoulletteWnd::OnMouseHover(int x, int y) { // FUNCTION: fn_10090 void UIRoulletteWnd::OnProcess() { if (g_effectDetailLevel != 2) { - if (this->m_startButton->geometry.unknown_0030 == 1 && this->m_enabled == 1) { + if (this->m_startButton->geometry.state == 1 && this->m_enabled == 1) { if (g_rouletteMgr->m_spinning == 0) { CBitmapRes* arrow = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\roullette\\stageArrow.bmp"))); @@ -287,7 +287,7 @@ void UIRoulletteWnd::OnProcess() { return; } - if (this->m_startButton->geometry.unknown_0030 == 1 && this->m_enabled == 1) { + if (this->m_startButton->geometry.state == 1 && this->m_enabled == 1) { if (g_rouletteMgr->m_spinning == 0) { this->m_startSprite->Move(339, 398); this->m_startSprite->SetTooltip(LookupMessage(MSI_GUILD_MAKE_GUILD_NOT_PERMITTED_MAP)); @@ -299,7 +299,7 @@ void UIRoulletteWnd::OnProcess() { this->m_startButton->SetState(0); } - if (this->m_startSprite->geometry.unknown_0030 == 2) { + if (this->m_startSprite->geometry.state == 2) { this->m_startSprite->SetState(3); this->m_startSprite->Move(-100, -100); this->m_startSprite->SetTooltip(""); @@ -307,13 +307,13 @@ void UIRoulletteWnd::OnProcess() { this->m_startButton->SetState(2); } - if (this->m_prizeButton->geometry.unknown_0030 == 1) { + if (this->m_prizeButton->geometry.state == 1) { this->m_prizeSprite->Move(203, 398); this->m_prizeSprite->SetTooltip(LookupMessage(MSI_TAKEOFF_TITLE)); this->m_prizeButton->SetState(0); } - if (this->m_prizeSprite->geometry.unknown_0030 == 2) { + if (this->m_prizeSprite->geometry.state == 2) { this->m_prizeSprite->SetState(3); this->m_prizeSprite->Move(-100, -100); this->m_prizeSprite->SetTooltip(""); @@ -363,7 +363,7 @@ int UIRoulletteWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen switch (argument1) { case ID_CLOSE: if (g_rouletteMgr->m_spinning == 0) { - if (g_windowMgr.unknown_0464 != nullptr) { + if (g_windowMgr.roulletteWnd != nullptr) { g_windowMgr.CloseWindow(WID_ROULLETTEWND); return 0; } diff --git a/Source/UI/Window/UISecondCostumeWnd.cpp b/Source/UI/Window/UISecondCostumeWnd.cpp index 8636d80fd..c87413663 100644 --- a/Source/UI/Window/UISecondCostumeWnd.cpp +++ b/Source/UI/Window/UISecondCostumeWnd.cpp @@ -23,33 +23,33 @@ // FUNCTION: fn_12882 void UISecondCostumeWnd::DrawCharacterPreview(int x, int y) { CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - const unsigned char flags = mode->scene->player->unknown_02CC; - const std::uint32_t time = this->unknown_0100; + const unsigned char flags = mode->scene->player->isRiding; + const std::uint32_t time = this->m_previewStartTime; const int action = this->m_page; int headPalette = 0; if (!this->m_entries[0].empty() && static_cast(this->m_selected[0]) < this->m_entries[0].size()) { - headPalette = this->m_entries[0][this->m_selected[0]].unknown_0018; + headPalette = this->m_entries[0][this->m_selected[0]].value; } int bodyStyle = 0; if (!this->m_entries[2].empty() && static_cast(this->m_selected[2]) < this->m_entries[2].size()) { - bodyStyle = this->m_entries[2][this->m_selected[2]].unknown_0018; + bodyStyle = this->m_entries[2][this->m_selected[2]].value; } const int robe = g_session.m_robe; - const short midAccessory = *reinterpret_cast(&g_session.unknown_0EF4[8]); - const short topAccessory = *reinterpret_cast(&g_session.unknown_0EF4[4]); - const short bottomAccessory = *reinterpret_cast(&g_session.unknown_0EF4[0]); + const short midAccessory = *reinterpret_cast(&g_session.accessoryAppearance[8]); + const short topAccessory = *reinterpret_cast(&g_session.accessoryAppearance[4]); + const short bottomAccessory = *reinterpret_cast(&g_session.accessoryAppearance[0]); int head = 0; if (!this->m_entries[1].empty() && static_cast(this->m_selected[1]) < this->m_entries[1].size()) { - head = this->m_entries[1][this->m_selected[1]].unknown_0018; + head = this->m_entries[1][this->m_selected[1]].value; } int body = 0; if (!this->m_entries[3].empty() && static_cast(this->m_selected[3]) < this->m_entries[3].size()) { - body = this->m_entries[3][this->m_selected[3]].unknown_0018; + body = this->m_entries[3][this->m_selected[3]].value; } FuncDrawWNDChar drawer( @@ -76,7 +76,7 @@ void UISecondCostumeWnd::LoadLists() { SecondCostumeEntry entry; entry.name = name; - entry.unknown_0018 = value; + entry.value = value; this->m_entries[0].push_back(entry); } @@ -90,7 +90,7 @@ void UISecondCostumeWnd::LoadLists() { SecondCostumeEntry entry; entry.name = name; - entry.unknown_0018 = value; + entry.value = value; this->m_entries[1].push_back(entry); } @@ -104,7 +104,7 @@ void UISecondCostumeWnd::LoadLists() { SecondCostumeEntry entry; entry.name = name; - entry.unknown_0018 = value; + entry.value = value; this->m_entries[2].push_back(entry); } @@ -118,7 +118,7 @@ void UISecondCostumeWnd::LoadLists() { SecondCostumeEntry entry; entry.name = name; - entry.unknown_0018 = value; + entry.value = value; this->m_entries[3].push_back(entry); } @@ -130,28 +130,28 @@ void UISecondCostumeWnd::LoadLists() { void UISecondCostumeWnd::SelectSavedEntries() { unsigned int index; for (index = 0; index < this->m_entries[0].size(); ++index) { - if (this->m_entries[0][index].unknown_0018 == g_session.m_headPalette) { + if (this->m_entries[0][index].value == g_session.m_headPalette) { break; } } this->m_selected[0] = index < this->m_entries[0].size() ? index : 0; for (index = 0; index < this->m_entries[1].size(); ++index) { - if (this->m_entries[1][index].unknown_0018 == g_session.m_head) { + if (this->m_entries[1][index].value == g_session.m_head) { break; } } this->m_selected[1] = index < this->m_entries[1].size() ? index : 0; for (index = 0; index < this->m_entries[2].size(); ++index) { - if (this->m_entries[2][index].unknown_0018 == g_session.m_bodyStyle) { + if (this->m_entries[2][index].value == g_session.m_bodyStyle) { break; } } this->m_selected[2] = index < this->m_entries[2].size() ? index : 0; for (index = 0; index < this->m_entries[3].size(); ++index) { - if (this->m_entries[3][index].unknown_0018 == g_session.m_bodyCostume) { + if (this->m_entries[3][index].value == g_session.m_bodyCostume) { break; } } @@ -300,6 +300,6 @@ UISecondCostumeWnd::UISecondCostumeWnd() this->m_selected[1] = 0; this->m_selected[2] = 0; this->m_selected[3] = 0; - this->unknown_0100 = timeGetTime(); + this->m_previewStartTime = timeGetTime(); this->m_page = 0; } diff --git a/Source/UI/Window/UISecondCostumeWnd.h b/Source/UI/Window/UISecondCostumeWnd.h index 4299b6945..5beb01fea 100644 --- a/Source/UI/Window/UISecondCostumeWnd.h +++ b/Source/UI/Window/UISecondCostumeWnd.h @@ -13,7 +13,7 @@ class UIListBox; struct SecondCostumeEntry { /* 0000 */ std::string name; - /* 0018 */ int unknown_0018; + /* 0018 */ int value; }; class UISecondCostumeWnd : public UIFrameWnd { @@ -34,7 +34,7 @@ protected: /* 00BC */ int m_tab; /* 00C0 */ int m_selected[4]; /* 00D0 */ std::vector m_entries[4]; - /* 0100 */ std::uint32_t unknown_0100; + /* 0100 */ std::uint32_t m_previewStartTime; /* 0104 */ int m_page; /* 0108 */ std::string unknown_0108[7]; /* 01B0 */ std::string unknown_01B0[7]; diff --git a/Source/UI/Window/UISeekPartyListWnd.cpp b/Source/UI/Window/UISeekPartyListWnd.cpp index c8649c91d..2117a0aa7 100644 --- a/Source/UI/Window/UISeekPartyListWnd.cpp +++ b/Source/UI/Window/UISeekPartyListWnd.cpp @@ -370,7 +370,7 @@ int UISeekPartyListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg return 0; } case ID_CLOSE: - g_session.m_partyBooking.m_alarm = this->m_alarmCheck->geometry.unknown_0030 != 0; + g_session.m_partyBooking.m_alarm = this->m_alarmCheck->geometry.state != 0; g_windowMgr.CloseWindow(WID_SEEKPARTYLISTWND); return 0; default: @@ -423,7 +423,7 @@ int UISeekPartyListWnd::SendMsg(UIWindow* sender, int message, std::intptr_t arg // OFFSET: 0x009431D0 // FUNCTION: fn_12815 void UISeekPartyListWnd::NotifyNewAd() { - if (this->m_alarmCheck->geometry.unknown_0030 != 0) { + if (this->m_alarmCheck->geometry.state != 0) { g_soundMgr->PlayWave("party_alarm.wav", 0.0f, 0.0f, 0.0f, 250, 40, 1.0f, 0); const char* message = LookupMessage(MSI_PARTY_BOOKING_NOTIFY); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(message), 0xFFFF00, 15, 0, 0); diff --git a/Source/UI/Window/UISeekPartyMBWnd.cpp b/Source/UI/Window/UISeekPartyMBWnd.cpp index 4d1948561..1cbb97db8 100644 --- a/Source/UI/Window/UISeekPartyMBWnd.cpp +++ b/Source/UI/Window/UISeekPartyMBWnd.cpp @@ -48,7 +48,7 @@ int UISeekPartyMBWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, st for (int category = 0; category < 8; ++category) { std::map& checks = this->m_jobChecks[category]; for (auto it = checks.begin(); it != checks.end(); ++it) { - if (it->second->geometry.unknown_0030) { + if (it->second->geometry.state) { if (count < 6) { this->m_registration.detail.job[count] = it->first; } @@ -256,8 +256,8 @@ void UISeekPartyMBWnd::ShowJobCategory(int category) { // OFFSET: 0x00911EE0 // FUNCTION: fn_12524 UISeekPartyMBWnd::UISeekPartyMBWnd() - : UIFrameWnd(0), m_titleText(nullptr), m_levelText(nullptr), unknown_00BC(nullptr), unknown_00C0(nullptr), m_levelEdit(nullptr), m_typeCombo(nullptr), m_subTypeCombo(nullptr), m_jobCategoryCombo(nullptr), - m_jobChecks(), m_subTypes(), unknown_0154(nullptr), unknown_0158(nullptr), m_jobCategory(-1), m_subType(0), m_restoreHeight(0), m_minimized(0) { + : UIFrameWnd(0), m_titleText(nullptr), m_levelText(nullptr), typeLabel(nullptr), jobLabel(nullptr), m_levelEdit(nullptr), m_typeCombo(nullptr), m_subTypeCombo(nullptr), m_jobCategoryCombo(nullptr), + m_jobChecks(), m_subTypes(), cancelButton(nullptr), confirmButton(nullptr), m_jobCategory(-1), m_subType(0), m_restoreHeight(0), m_minimized(0) { } // OFFSET: 0x009146D0 @@ -291,43 +291,43 @@ void UISeekPartyMBWnd::OnCreate(int width, int height) { this->AddChild(this->m_levelText); label = "MAP"; - this->unknown_00BC = new UIStaticText(); - this->unknown_00BC->SetSize(this->geometry.width - 10, 0x1E); - this->unknown_00BC->SetText(label.c_str(), 1); - this->unknown_00BC->Move(10, 0x2D); - this->unknown_00BC->shadow = 1; - this->AddChild(this->unknown_00BC); + this->typeLabel = new UIStaticText(); + this->typeLabel->SetSize(this->geometry.width - 10, 0x1E); + this->typeLabel->SetText(label.c_str(), 1); + this->typeLabel->Move(10, 0x2D); + this->typeLabel->shadow = 1; + this->AddChild(this->typeLabel); label = "JOB"; - this->unknown_00C0 = new UIStaticText(); - this->unknown_00C0->SetSize(this->geometry.width - 10, 0x1E); - this->unknown_00C0->SetText(label.c_str(), 1); - this->unknown_00C0->Move(10, 0x46); - this->unknown_00C0->shadow = 1; - this->AddChild(this->unknown_00C0); + this->jobLabel = new UIStaticText(); + this->jobLabel->SetSize(this->geometry.width - 10, 0x1E); + this->jobLabel->SetText(label.c_str(), 1); + this->jobLabel->Move(10, 0x46); + this->jobLabel->shadow = 1; + this->AddChild(this->jobLabel); { std::string path = "유저인터페이스\\"; - this->unknown_0158 = new UIBitmapButton(); - this->unknown_0158->SetBitmap((path + "btn_ok" + ".bmp").c_str(), 0, 0); - this->unknown_0158->SetBitmap((path + "btn_ok_a" + ".bmp").c_str(), 1, 0); - this->unknown_0158->SetBitmap((path + "btn_ok_b" + ".bmp").c_str(), 2, 0); - this->unknown_0158->SetSize(this->unknown_0158->BitmapWidth(), this->unknown_0158->BitmapHeight()); - this->unknown_0158->Move(this->geometry.width - 0x5D, this->geometry.height - 0x18); - this->unknown_0158->SetId(0xB8); - this->AddChild(this->unknown_0158); + this->confirmButton = new UIBitmapButton(); + this->confirmButton->SetBitmap((path + "btn_ok" + ".bmp").c_str(), 0, 0); + this->confirmButton->SetBitmap((path + "btn_ok_a" + ".bmp").c_str(), 1, 0); + this->confirmButton->SetBitmap((path + "btn_ok_b" + ".bmp").c_str(), 2, 0); + this->confirmButton->SetSize(this->confirmButton->BitmapWidth(), this->confirmButton->BitmapHeight()); + this->confirmButton->Move(this->geometry.width - 0x5D, this->geometry.height - 0x18); + this->confirmButton->SetId(0xB8); + this->AddChild(this->confirmButton); } { std::string path = "유저인터페이스\\"; - this->unknown_0154 = new UIBitmapButton(); - this->unknown_0154->SetBitmap((path + "btn_cancel" + ".bmp").c_str(), 0, 0); - this->unknown_0154->SetBitmap((path + "btn_cancel_a" + ".bmp").c_str(), 1, 0); - this->unknown_0154->SetBitmap((path + "btn_cancel_b" + ".bmp").c_str(), 2, 0); - this->unknown_0154->SetSize(this->unknown_0154->BitmapWidth(), this->unknown_0154->BitmapHeight()); - this->unknown_0154->Move(this->geometry.width - 0x2E, this->geometry.height - 0x18); - this->unknown_0154->SetId(0xB9); - this->AddChild(this->unknown_0154); + this->cancelButton = new UIBitmapButton(); + this->cancelButton->SetBitmap((path + "btn_cancel" + ".bmp").c_str(), 0, 0); + this->cancelButton->SetBitmap((path + "btn_cancel_a" + ".bmp").c_str(), 1, 0); + this->cancelButton->SetBitmap((path + "btn_cancel_b" + ".bmp").c_str(), 2, 0); + this->cancelButton->SetSize(this->cancelButton->BitmapWidth(), this->cancelButton->BitmapHeight()); + this->cancelButton->Move(this->geometry.width - 0x2E, this->geometry.height - 0x18); + this->cancelButton->SetId(0xB9); + this->AddChild(this->cancelButton); } this->CreateJobChecks(); diff --git a/Source/UI/Window/UISeekPartyMBWnd.h b/Source/UI/Window/UISeekPartyMBWnd.h index 1fb7daf4d..4bb88baf0 100644 --- a/Source/UI/Window/UISeekPartyMBWnd.h +++ b/Source/UI/Window/UISeekPartyMBWnd.h @@ -38,8 +38,8 @@ public: protected: /* 00B4 */ UIStaticText* m_titleText; /* 00B8 */ UIStaticText* m_levelText; - /* 00BC */ UIStaticText* unknown_00BC; - /* 00C0 */ UIStaticText* unknown_00C0; + /* 00BC */ UIStaticText* typeLabel; + /* 00C0 */ UIStaticText* jobLabel; /* 00C4 */ UIEditCtrl* m_levelEdit; /* 00C8 */ UIComboBoxDefWnd* m_typeCombo; /* 00CC */ UIComboBoxDefWnd* m_subTypeCombo; @@ -47,8 +47,8 @@ protected: /* 00D4 */ unsigned char unknown_00D4[0x30]; /* 0104 */ std::map m_jobChecks[9]; /* 014C */ std::map>> m_subTypes; - /* 0154 */ UIBitmapButton* unknown_0154; - /* 0158 */ UIBitmapButton* unknown_0158; + /* 0154 */ UIBitmapButton* cancelButton; + /* 0158 */ UIBitmapButton* confirmButton; /* 015C */ int m_jobCategory; /* 0160 */ short m_type; /* 0162 */ short m_subType; diff --git a/Source/UI/Window/UISeekPartyWnd.cpp b/Source/UI/Window/UISeekPartyWnd.cpp index 32ac20337..66f829424 100644 --- a/Source/UI/Window/UISeekPartyWnd.cpp +++ b/Source/UI/Window/UISeekPartyWnd.cpp @@ -24,7 +24,7 @@ UISeekPartyWnd::UISeekPartyWnd() : UIFrameWnd(0) { this->m_elapsed = 0; this->m_frameElapsed = 0; this->m_frameTick = 0; - this->unknown_01E0 = 0; + this->expandedHeight = 0; this->m_minimized = 0; this->m_elapsed = GetTickCount() - g_session.m_partyBooking.unknown_0034; } diff --git a/Source/UI/Window/UISeekPartyWnd.h b/Source/UI/Window/UISeekPartyWnd.h index d111d5d2c..217898add 100644 --- a/Source/UI/Window/UISeekPartyWnd.h +++ b/Source/UI/Window/UISeekPartyWnd.h @@ -32,7 +32,7 @@ protected: /* 00D4 */ std::uint32_t m_frameElapsed; /* 00D8 */ std::uint32_t m_frameTick; /* 00DC */ unsigned char unknown_00DC[0x104]; - /* 01E0 */ int unknown_01E0; + /* 01E0 */ int expandedHeight; /* 01E4 */ unsigned char m_minimized; /* 01E5 */ unsigned char unknown_01E5[3]; /* 01E8 */ SeekPartyWndInfo* m_saved; diff --git a/Source/UI/Window/UISelCharForUServerWnd.cpp b/Source/UI/Window/UISelCharForUServerWnd.cpp index 29c4f2cdd..f57b543f4 100644 --- a/Source/UI/Window/UISelCharForUServerWnd.cpp +++ b/Source/UI/Window/UISelCharForUServerWnd.cpp @@ -39,15 +39,15 @@ struct PACKET_CZ_SELECT_CHARACTERS { // FUNCTION: fn_12526 UISelCharForUServerWnd::UISelCharForUServerWnd() : UIFrameWnd(0), m_columns(6) { - if (g_session.unknown_0E94 > 12) { + if (g_session.characterCount > 12) { this->m_columns = 9; } - this->unknown_19E8 = 0; + this->characterInfoBalloon = 0; this->m_checkedCount = 0; - this->geometry.unknown_0034 = 0; - this->unknown_19E4 = 0; - for (int index = 0; index < g_session.unknown_0E94; ++index) { + this->geometry.animationFrame = 0; + this->confirmButton = 0; + for (int index = 0; index < g_session.characterCount; ++index) { this->m_slotEnabled[index] = 1; } @@ -59,19 +59,19 @@ UISelCharForUServerWnd::UISelCharForUServerWnd() void UISelCharForUServerWnd::OnCreate(int, int) { { std::string path = "유저인터페이스\\"; - this->unknown_19E4 = new UIBitmapButton(); - this->unknown_19E4->SetBitmap((path + "btn_ok" + ".bmp").c_str(), 0, 0); - this->unknown_19E4->SetBitmap((path + "btn_ok_a" + ".bmp").c_str(), 1, 0); - this->unknown_19E4->SetBitmap((path + "btn_ok_b" + ".bmp").c_str(), 2, 0); - this->unknown_19E4->SetSize(this->unknown_19E4->BitmapWidth(), this->unknown_19E4->BitmapHeight()); - this->unknown_19E4->Move(this->geometry.width - 46, this->geometry.height - 24); - this->unknown_19E4->SetId(184); - this->AddChild(this->unknown_19E4); + this->confirmButton = new UIBitmapButton(); + this->confirmButton->SetBitmap((path + "btn_ok" + ".bmp").c_str(), 0, 0); + this->confirmButton->SetBitmap((path + "btn_ok_a" + ".bmp").c_str(), 1, 0); + this->confirmButton->SetBitmap((path + "btn_ok_b" + ".bmp").c_str(), 2, 0); + this->confirmButton->SetSize(this->confirmButton->BitmapWidth(), this->confirmButton->BitmapHeight()); + this->confirmButton->Move(this->geometry.width - 46, this->geometry.height - 24); + this->confirmButton->SetId(184); + this->AddChild(this->confirmButton); } this->m_message0 = 184; - for (int index = 0; index < g_session.unknown_0E94; ++index) { + for (int index = 0; index < g_session.characterCount; ++index) { this->m_checkBoxes[index] = new UICheckBox(); this->m_checkBoxes[index]->SetSize(10, 10); static_cast(this->m_checkBoxes[index])->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", ""); @@ -79,7 +79,7 @@ void UISelCharForUServerWnd::OnCreate(int, int) { this->AddChild(this->m_checkBoxes[index]); } - for (int index = 0; index < g_session.unknown_0E94; ++index) { + for (int index = 0; index < g_session.characterCount; ++index) { CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, index, 0, 0, 0)); if (!info) { continue; @@ -94,12 +94,12 @@ void UISelCharForUServerWnd::OnCreate(int, int) { this->m_slotEnabled[slotIndex] = 0; slot.x = slotIndex % this->m_columns * 81 + 68; slot.y = slotIndex / this->m_columns * 149 + 191; - slot.unknown_0148 = 0; + slot.actionBase = 0; slot.action = 0; slot.frame = 0; - slot.actionNames[0] = static_cast(GetBodyActionResourceName(info->job, g_session.SyncUnknown0E98(), info->unknown_0058, 0)); - slot.spriteNames[0] = static_cast(g_session.GetBodySprName(info->job, g_session.SyncUnknown0E98(), info->unknown_0058, 0)); + slot.actionNames[0] = static_cast(GetBodyActionResourceName(info->job, g_session.SyncUnknown0E98(), info->bodyCostume, 0)); + slot.spriteNames[0] = static_cast(g_session.GetBodySprName(info->job, g_session.SyncUnknown0E98(), info->bodyCostume, 0)); int head = info->head; slot.actionNames[1] = static_cast(g_session.GetHeadActName(info->job, g_session.SyncUnknown0E98(), &head)); @@ -109,19 +109,19 @@ void UISelCharForUServerWnd::OnCreate(int, int) { info->head = static_cast(head); slot.actionNames[3] = static_cast(g_session.GetAccessoryActName(info->job, g_session.SyncUnknown0E98(), head, info->accessory2)); slot.spriteNames[3] = static_cast(g_session.GetAccessorySprName(info->job, g_session.SyncUnknown0E98(), head, info->accessory2)); - this->unknown_1974[slotIndex] = info->accessory2; + this->accessory2[slotIndex] = info->accessory2; slot.actionNames[4] = static_cast(g_session.GetAccessoryActName(info->job, g_session.SyncUnknown0E98(), head, info->accessory)); slot.spriteNames[4] = static_cast(g_session.GetAccessorySprName(info->job, g_session.SyncUnknown0E98(), head, info->accessory)); int bodyPalette = info->bodyStyle; - if (info->unknown_0058 < 1) { - bodyPalette = g_session.GetBodyStyle(info->job, bodyPalette, info->unknown_0058); + if (info->bodyCostume < 1) { + bodyPalette = g_session.GetBodyStyle(info->job, bodyPalette, info->bodyCostume); } slot.bodyPalette = bodyPalette; if (bodyPalette != 0) { slot.bodyPaletteName = static_cast( - g_session.GetBodyPalName(info->job, g_session.SyncUnknown0E98(), bodyPalette, info->unknown_0058, 0, 0)); + g_session.GetBodyPalName(info->job, g_session.SyncUnknown0E98(), bodyPalette, info->bodyCostume, 0, 0)); } slot.headPalette = info->headPalette; @@ -129,7 +129,7 @@ void UISelCharForUServerWnd::OnCreate(int, int) { slot.headPaletteName = static_cast(g_session.GetHeadPalName(head, info->job, g_session.SyncUnknown0E98(), slot.headPalette)); } - slot.imfName = GetBodyImfName(info->job, g_session.SyncUnknown0E98(), info->head, info->unknown_0058); + slot.imfName = GetBodyImfName(info->job, g_session.SyncUnknown0E98(), info->head, info->bodyCostume); } } @@ -148,8 +148,8 @@ int UISelCharForUServerWnd::SendMsg(UIWindow* sender, int message, std::intptr_t int characterIds[9] = {}; int count = 0; - for (int index = 0; index < g_session.unknown_0E94; ++index) { - if (this->m_checkBoxes[index]->geometry.unknown_0030 != 0) { + for (int index = 0; index < g_session.characterCount; ++index) { + if (this->m_checkBoxes[index]->geometry.state != 0) { CMode* mode = g_modeMgr.gameMode; const int* character = reinterpret_cast(mode->SendMsg(MM_QUERYCHARICTORINFO, index, 0, 0, 0)); if (character) { @@ -175,7 +175,7 @@ int UISelCharForUServerWnd::SendMsg(UIWindow* sender, int message, std::intptr_t break; } case ID_CHECK: - this->m_checkedCount += sender->geometry.unknown_0030 != 0 ? 1 : -1; + this->m_checkedCount += sender->geometry.state != 0 ? 1 : -1; if (this->m_checkedCount > 9) { g_windowMgr.Confirm(LookupMessage(MSI_ERROR_SELECT_CHARACTERS), 0, true, true, 0, "Message", 280, 120, 0); static_cast(sender)->SetChecked(0); @@ -197,14 +197,14 @@ void UISelCharForUServerWnd::OnMouseMove(int x, int y) { // FUNCTION: fn_12777 void UISelCharForUServerWnd::UpdateCharInfoBalloon(int x, int y, std::uint32_t color) { const unsigned char red = (color >> 16) & 0xFF; - if (!this->unknown_19E8) { - this->unknown_19E8 = new UICharInfoBalloonText(); - this->unknown_19E8->SetSize(140, 200); - g_windowMgr.AddRendered(this->unknown_19E8); + if (!this->characterInfoBalloon) { + this->characterInfoBalloon = new UICharInfoBalloonText(); + this->characterInfoBalloon->SetSize(140, 200); + g_windowMgr.AddRendered(this->characterInfoBalloon); } - this->unknown_19E8->Move(-400, -400); - this->unknown_19EC.clear(); + this->characterInfoBalloon->Move(-400, -400); + this->characterInfoLines.clear(); if (x > 26 && x < this->geometry.width - 26 && static_cast(y - 95) < 270 && (y > 249 || y < 211)) { const int index = (y - 95) / 135 * this->m_columns + (x - 27) / 81; CharacterInfo* info = reinterpret_cast(g_modeMgr.gameMode->SendMsg(MM_QUERYCHARICTORINFO, index, 0, 0, 0)); @@ -215,40 +215,40 @@ void UISelCharForUServerWnd::UpdateCharInfoBalloon(int x, int y, std::uint32_t c int width = this->TextWidth(name, 0, 0, 12, 0, 0) + 60; char text[100]; - this->unknown_19EC.push_back("Name"); - this->unknown_19EC.push_back(name); - this->unknown_19EC.push_back("Job"); - this->unknown_19EC.push_back(g_session.GetJobName(info->job, -1)); - this->unknown_19EC.push_back("Lv. "); - this->unknown_19EC.push_back(_itoa(info->level, text, 10)); - this->unknown_19EC.push_back("EXP"); - this->unknown_19EC.push_back(_itoa(static_cast(info->exp), text, 10)); - this->unknown_19EC.push_back("HP"); - this->unknown_19EC.push_back(_i64toa(info->hp, text, 10)); - this->unknown_19EC.push_back("SP"); - this->unknown_19EC.push_back(_i64toa(info->sp, text, 10)); - this->unknown_19EC.push_back("STR"); - this->unknown_19EC.push_back(_itoa(info->stats[0], text, 10)); - this->unknown_19EC.push_back("AGI"); - this->unknown_19EC.push_back(_itoa(info->stats[1], text, 10)); - this->unknown_19EC.push_back("VIT"); - this->unknown_19EC.push_back(_itoa(info->stats[2], text, 10)); - this->unknown_19EC.push_back("INT"); - this->unknown_19EC.push_back(_itoa(info->stats[3], text, 10)); - this->unknown_19EC.push_back("DEX"); - this->unknown_19EC.push_back(_itoa(info->stats[4], text, 10)); - this->unknown_19EC.push_back("LUK"); - this->unknown_19EC.push_back(_itoa(info->stats[5], text, 10)); + this->characterInfoLines.push_back("Name"); + this->characterInfoLines.push_back(name); + this->characterInfoLines.push_back("Job"); + this->characterInfoLines.push_back(g_session.GetJobName(info->job, -1)); + this->characterInfoLines.push_back("Lv. "); + this->characterInfoLines.push_back(_itoa(info->level, text, 10)); + this->characterInfoLines.push_back("EXP"); + this->characterInfoLines.push_back(_itoa(static_cast(info->exp), text, 10)); + this->characterInfoLines.push_back("HP"); + this->characterInfoLines.push_back(_i64toa(info->hp, text, 10)); + this->characterInfoLines.push_back("SP"); + this->characterInfoLines.push_back(_i64toa(info->sp, text, 10)); + this->characterInfoLines.push_back("STR"); + this->characterInfoLines.push_back(_itoa(info->stats[0], text, 10)); + this->characterInfoLines.push_back("AGI"); + this->characterInfoLines.push_back(_itoa(info->stats[1], text, 10)); + this->characterInfoLines.push_back("VIT"); + this->characterInfoLines.push_back(_itoa(info->stats[2], text, 10)); + this->characterInfoLines.push_back("INT"); + this->characterInfoLines.push_back(_itoa(info->stats[3], text, 10)); + this->characterInfoLines.push_back("DEX"); + this->characterInfoLines.push_back(_itoa(info->stats[4], text, 10)); + this->characterInfoLines.push_back("LUK"); + this->characterInfoLines.push_back(_itoa(info->stats[5], text, 10)); if (width < 140) { width = 140; } - this->unknown_19E8->Resize(width, 200); - this->unknown_19E8->m_outlineColor = 0; - this->unknown_19E8->m_textColor = ((color & 0xFF) << 16) | (color & 0xFF00) | red; - this->unknown_19E8->SetBackground(0x88000000); - this->unknown_19E8->m_lines = this->unknown_19EC; + this->characterInfoBalloon->Resize(width, 200); + this->characterInfoBalloon->m_outlineColor = 0; + this->characterInfoBalloon->m_textColor = ((color & 0xFF) << 16) | (color & 0xFF00) | red; + this->characterInfoBalloon->SetBackground(0x88000000); + this->characterInfoBalloon->m_lines = this->characterInfoLines; int screenX = x + 20; int screenY = y; @@ -256,23 +256,23 @@ void UISelCharForUServerWnd::UpdateCharInfoBalloon(int x, int y, std::uint32_t c if (screenX < -3) { screenX = -3; } - const int maxX = g_renderer->viewport.width - this->unknown_19E8->geometry.width + 3; + const int maxX = g_renderer->viewport.width - this->characterInfoBalloon->geometry.width + 3; if (screenX > maxX) { screenX = maxX; } if (screenY < -3) { screenY = -3; } - const int maxY = g_renderer->viewport.height - this->unknown_19E8->geometry.height + 3; + const int maxY = g_renderer->viewport.height - this->characterInfoBalloon->geometry.height + 3; if (screenY > maxY) { screenY = maxY; } - this->unknown_19E8->Move(screenX, screenY); + this->characterInfoBalloon->Move(screenX, screenY); return; } } - g_windowMgr.Schedule(this->unknown_19E8); - this->unknown_19E8 = nullptr; + g_windowMgr.Schedule(this->characterInfoBalloon); + this->characterInfoBalloon = nullptr; } diff --git a/Source/UI/Window/UISelCharForUServerWnd.h b/Source/UI/Window/UISelCharForUServerWnd.h index 52f0d8f2f..44d06139d 100644 --- a/Source/UI/Window/UISelCharForUServerWnd.h +++ b/Source/UI/Window/UISelCharForUServerWnd.h @@ -24,12 +24,12 @@ public: protected: /* 00B4 */ CharSlotInfo m_slots[18]; /* 192C */ int m_slotEnabled[18]; - /* 1974 */ short unknown_1974[18]; + /* 1974 */ short accessory2[18]; /* 1998 */ std::uint32_t m_startTime; /* 199C */ UIWindow* m_checkBoxes[18]; - /* 19E4 */ UIBitmapButton* unknown_19E4; - /* 19E8 */ UICharInfoBalloonText* unknown_19E8; - /* 19EC */ std::vector unknown_19EC; + /* 19E4 */ UIBitmapButton* confirmButton; + /* 19E8 */ UICharInfoBalloonText* characterInfoBalloon; + /* 19EC */ std::vector characterInfoLines; /* 19F8 */ int m_checkedCount; /* 19FC */ int m_columns; }; diff --git a/Source/UI/Window/UISerachStoreInfoWnd.cpp b/Source/UI/Window/UISerachStoreInfoWnd.cpp index c3a8c85fd..858525075 100644 --- a/Source/UI/Window/UISerachStoreInfoWnd.cpp +++ b/Source/UI/Window/UISerachStoreInfoWnd.cpp @@ -45,8 +45,8 @@ struct SearchStoreQueryPacket { static_assert(offsetof(SearchStoreQueryPacket, ids) == 0xF); struct SearchStoreResult { - /* 0000 */ int unknown_0000; - /* 0004 */ int unknown_0004; + /* 0000 */ int storeId; + /* 0004 */ int accountId; /* 0008 */ unsigned char unknown_0008[0x58]; /* 0060 */ ITEM_INFO item; }; @@ -56,29 +56,29 @@ static_assert(sizeof(SearchStoreResult) == sizeof(SessionEntry5BD4)); // OFFSET: 0x009121F0 // FUNCTION: fn_12527 UISerachStoreInfoWnd::UISerachStoreInfoWnd() - : UIFrameWnd(0), unknown_00DC(1), unknown_00E0(-1), - unknown_00E4(0), unknown_00E8(25), unknown_00EC(0), unknown_00ED(1), unknown_00F0("") { + : UIFrameWnd(0), m_page(1), m_hoverRow(-1), + m_searchType(0), m_rowHeight(25), m_searchPending(0), m_matchOption(1), m_statusText("") { } // OFFSET: 0x0091BBC0 // FUNCTION: fn_12608 ITEM_INFO UISerachStoreInfoWnd::ItemAt(int x, int y) { ITEM_INFO item(0); - this->unknown_00E0 = -1; - if (g_session.unknown_5BD4.empty()) { + this->m_hoverRow = -1; + if (g_session.storeSearchResults.empty()) { return item; } - if (x > 5 && x < this->geometry.width - 10 && y > 100 && y < (this->unknown_00E8 + 10) * 10) { - const int row = (y - 100) / this->unknown_00E8; - this->unknown_00E0 = row; - const unsigned int index = row + (this->unknown_00DC - 1) * 10; - if (index >= g_session.unknown_5BD4.size()) { + if (x > 5 && x < this->geometry.width - 10 && y > 100 && y < (this->m_rowHeight + 10) * 10) { + const int row = (y - 100) / this->m_rowHeight; + this->m_hoverRow = row; + const unsigned int index = row + (this->m_page - 1) * 10; + if (index >= g_session.storeSearchResults.size()) { return item; } - std::vector::iterator it = g_session.unknown_5BD4.begin() + index; - if (it != g_session.unknown_5BD4.end()) { + std::vector::iterator it = g_session.storeSearchResults.begin() + index; + if (it != g_session.storeSearchResults.end()) { item = reinterpret_cast(*it).item; } } @@ -98,7 +98,7 @@ void UISerachStoreInfoWnd::OnCreate(int width, int height) { } this->m_radios[0]->SetText(LookupMessage(MSI_SELL)); this->m_radios[1]->SetText(LookupMessage(MSI_BUY)); - this->m_radios[this->unknown_00E4]->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); + this->m_radios[this->m_searchType]->SendMsg(this, UM_SETSTATE, 1, 0, 0, 0); this->m_edits[1] = new UIEditCtrl(); this->m_edits[1]->SetSize(0x4C, 0x10); @@ -151,7 +151,7 @@ void UISerachStoreInfoWnd::OnCreate(int width, int height) { check->SetSize(0xA0, 0xC); check->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", LookupMessage(MSI_SEARCH_INCLUDED)); check->Move(100, 0x3C); - check->SetChecked(this->unknown_00ED); + check->SetChecked(this->m_matchOption); this->AddChild(check); { @@ -211,22 +211,22 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a SearchStoreRequestHeader packet; packet.packetType = 0x83B; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); - g_session.unknown_5BE8 = -1; - g_session.unknown_5BEC = -1; - g_session.unknown_5BF0 = 0xFFFFFFFF; - g_session.unknown_5BD4.clear(); + g_session.storeSearchX = -1; + g_session.storeSearchY = -1; + g_session.storeSearchOwnerAid = 0xFFFFFFFF; + g_session.storeSearchResults.clear(); g_windowMgr.CloseWindow(WID_SEARCH_STORE_INFO); break; } case ID_CHECK: - this->unknown_00ED = argument2 != 0; + this->m_matchOption = argument2 != 0; break; case ID_RADIOBTN: for (int index = 0; index < 2; ++index) { this->m_radios[index]->Invalidate(); int checked; if (sender == this->m_radios[index]) { - this->unknown_00E4 = index; + this->m_searchType = index; checked = 1; } else { checked = 0; @@ -235,32 +235,32 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } break; case 365: { - this->unknown_00EC = 1; + this->m_searchPending = 1; this->m_findButton->SetDisabled(1); this->m_findButton->Invalidate(); std::string cardName = this->m_edits[0]->Text(); std::string itemName = this->m_edits[1]->Text(); if (itemName.size() == 0) { - this->unknown_00EC = 0; - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_ENTER_THE_NAME_OF_ITEM); + this->m_searchPending = 0; + this->m_statusText = LookupMessage(MSI_SSI_FAILED_ENTER_THE_NAME_OF_ITEM); } - if (this->unknown_00EC != 0) { + if (this->m_searchPending != 0) { std::list itemIds; std::list cardIds; - itemIds = SearchItemIds(itemName, 0, this->unknown_00ED); + itemIds = SearchItemIds(itemName, 0, this->m_matchOption); if (itemIds.size() == 0) { - this->unknown_00EC = 0; - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_ITEM_DOES_NOT_EXIST); + this->m_searchPending = 0; + this->m_statusText = LookupMessage(MSI_SSI_FAILED_ITEM_DOES_NOT_EXIST); } else if (cardName.size() != 0) { - cardIds = SearchItemIds(cardName, 1, this->unknown_00ED); + cardIds = SearchItemIds(cardName, 1, this->m_matchOption); if (cardIds.size() == 0) { - this->unknown_00EC = 0; - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_NAME_OF_CARD_DOES_NOT_EXIST); + this->m_searchPending = 0; + this->m_statusText = LookupMessage(MSI_SSI_FAILED_NAME_OF_CARD_DOES_NOT_EXIST); } } const int count = static_cast(itemIds.size() + cardIds.size()); - if (this->unknown_00EC != 0) { + if (this->m_searchPending != 0) { if (count > 20) { this->SendMsg(this, UM_REFRESH, 1, 1, 0, 0); return 0; @@ -270,31 +270,31 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a const int maxPrice = std::atoi(this->m_edits[3]->Text()); const int maxLength = static_cast(std::strlen(this->m_edits[3]->Text())); if (minPrice > maxPrice && maxLength > 0) { - this->unknown_00EC = 0; + this->m_searchPending = 0; } if (std::strlen(this->m_edits[2]->Text()) != 0) { std::string text = FormatOwnedString("%d", minPrice); if (text != this->m_edits[2]->Text()) { - this->unknown_00EC = 0; + this->m_searchPending = 0; } } if (maxLength > 0) { std::string text = FormatOwnedString("%d", maxPrice); if (text != this->m_edits[3]->Text()) { - this->unknown_00EC = 0; + this->m_searchPending = 0; } } - if (this->unknown_00EC == 0) { - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_PRICE_ISNOT_VALID); + if (this->m_searchPending == 0) { + this->m_statusText = LookupMessage(MSI_SSI_FAILED_PRICE_ISNOT_VALID); } - if (this->unknown_00EC != 0) { + if (this->m_searchPending != 0) { const short length = static_cast(count * 4 + 15); const int maximum = std::atoi(this->m_edits[3]->Text()); const int minimum = std::atoi(this->m_edits[2]->Text()); - const unsigned char searchType = static_cast(this->unknown_00E4); + const unsigned char searchType = static_cast(this->m_searchType); if (length > 0x800) { - this->unknown_00EC = 0; - } else if (this->unknown_00EC != 0) { + this->m_searchPending = 0; + } else if (this->m_searchPending != 0) { SearchStoreQueryPacket packet; packet.maxPrice = maximum; packet.packetType = 0x835; @@ -316,7 +316,7 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a } } } - if (this->unknown_00EC == 0) { + if (this->m_searchPending == 0) { this->m_findButton->SetDisabled(0); this->m_findButton->Invalidate(); this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); @@ -328,44 +328,44 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a case UM_REFRESH: if (argument1 != 0) { - this->unknown_00F0 = ""; + this->m_statusText = ""; if (argument2 == 387) { - this->unknown_00DC = 1; + this->m_page = 1; } else if (argument2 < 387) { switch (argument2) { case SSI_FAILED_NOTHING_SEARCH_ITEM: - this->unknown_00DC = 1; - g_session.unknown_5BD4.clear(); - reinterpret_cast(&g_session.unknown_5BE4)[1] = 0; - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_SEARCH_STORE); - --g_session.unknown_5BE0; + this->m_page = 1; + g_session.storeSearchResults.clear(); + reinterpret_cast(&g_session.storeSearchPageFlags)[1] = 0; + this->m_statusText = LookupMessage(MSI_SSI_FAILED_SEARCH_STORE); + --g_session.storeSearchCount; break; case SSI_FAILED_OVER_MAXCOUNT: - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_OVER_MAXCOUNT); + this->m_statusText = LookupMessage(MSI_SSI_FAILED_OVER_MAXCOUNT); break; case SSI_FAILED_SEARCH_CNT: - this->unknown_00F0 = LookupMessage(MSI_SSI_FAILED_SEARCH_CNT); + this->m_statusText = LookupMessage(MSI_SSI_FAILED_SEARCH_CNT); break; case SSI_FAILED_LIMIT_SEARCH_TIME: g_windowMgr.Confirm(LookupMessage(MSI_SSI_FAILED_LIMIT_SERACH_TIME), 0, true, false, 0, "Message", 280, 120, 0); return 0; case SSI_FAILED_SSILIST_CLICK_TO_OPEN_STORE: - g_session.unknown_5BE8 = -1; - g_session.unknown_5BEC = -1; - g_session.unknown_5BF0 = 0xFFFFFFFF; + g_session.storeSearchX = -1; + g_session.storeSearchY = -1; + g_session.storeSearchOwnerAid = 0xFFFFFFFF; g_windowMgr.Confirm(LookupMessage(MSI_FAIL_OPEN_STORE), 0, true, false, 0, "Message", 280, 120, 0); return 0; } } - this->unknown_00EC = 0; + this->m_searchPending = 0; this->m_findButton->SetDisabled(0); this->m_findButton->Invalidate(); - } else if (g_session.unknown_5BD4.empty() && this->unknown_00EC != 0) { - this->unknown_00F0 = LookupMessage(MSI_SEARCHING_ITEM); + } else if (g_session.storeSearchResults.empty() && this->m_searchPending != 0) { + this->m_statusText = LookupMessage(MSI_SEARCHING_ITEM); } - this->m_prevButton->Enable(this->unknown_00DC != 1); - this->m_nextButton->Enable(reinterpret_cast(&g_session.unknown_5BE4)[1]); - if (static_cast(this->unknown_00DC * 10) < g_session.unknown_5BD4.size()) { + this->m_prevButton->Enable(this->m_page != 1); + this->m_nextButton->Enable(reinterpret_cast(&g_session.storeSearchPageFlags)[1]); + if (static_cast(this->m_page * 10) < g_session.storeSearchResults.size()) { this->m_nextButton->Enable(1); } this->Invalidate(); @@ -373,22 +373,22 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a case UM_TEXT_LBTN_UP: if (argument1 == 316) { - if (this->unknown_00DC > 1) { - this->unknown_00E0 = -1; - --this->unknown_00DC; + if (this->m_page > 1) { + this->m_hoverRow = -1; + --this->m_page; this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); return 0; } } else if (argument1 == 317) { - const int page = this->unknown_00DC; - this->unknown_00E0 = -1; - if (static_cast(page * 10) < g_session.unknown_5BD4.size()) { - this->unknown_00DC = page + 1; + const int page = this->m_page; + this->m_hoverRow = -1; + if (static_cast(page * 10) < g_session.storeSearchResults.size()) { + this->m_page = page + 1; this->SendMsg(this, UM_REFRESH, 0, 0, 0, 0); return 0; } - if (reinterpret_cast(&g_session.unknown_5BE4)[1] != 0) { - this->unknown_00DC = page + 1; + if (reinterpret_cast(&g_session.storeSearchPageFlags)[1] != 0) { + this->m_page = page + 1; SearchStoreRequestHeader packet; packet.packetType = 0x838; GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); @@ -403,8 +403,8 @@ int UISerachStoreInfoWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a #pragma pack(push, 1) struct SearchStoreClickPacket { /* 0000 */ std::int16_t packetType; - /* 0002 */ int unknown_0002; - /* 0006 */ int unknown_0006; + /* 0002 */ int accountId; + /* 0006 */ int storeId; /* 000A */ int itemId; }; #pragma pack(pop) @@ -417,28 +417,28 @@ void UISerachStoreInfoWnd::OnLBtnDblClk(int x, int y) { return; } - const unsigned int index = this->unknown_00E0 + (this->unknown_00DC - 1) * 10; - std::vector::iterator it = g_session.unknown_5BD4.begin() + index; - if (it == g_session.unknown_5BD4.end()) { + const unsigned int index = this->m_hoverRow + (this->m_page - 1) * 10; + std::vector::iterator it = g_session.storeSearchResults.begin() + index; + if (it == g_session.storeSearchResults.end()) { return; } - if (reinterpret_cast(&g_session.unknown_5BE4)[1] != 0 && + if (reinterpret_cast(&g_session.storeSearchPageFlags)[1] != 0 && g_windowMgr.Confirm(LookupMessage(MSI_OPEN_SEARCH_STORE), 2, true, false, 0, "Message", 0x118, 0x78, 0) != 0xBB) { return; } const SearchStoreResult* entry = reinterpret_cast(&*it); - g_session.unknown_5BE8 = -1; - g_session.unknown_5BEC = -1; - g_session.unknown_5BF0 = 0xFFFFFFFF; + g_session.storeSearchX = -1; + g_session.storeSearchY = -1; + g_session.storeSearchOwnerAid = 0xFFFFFFFF; SearchStoreClickPacket packet; packet.packetType = 0x83C; - packet.unknown_0002 = entry->unknown_0004; - packet.unknown_0006 = entry->unknown_0000; + packet.accountId = entry->accountId; + packet.storeId = entry->storeId; packet.itemId = entry->item.GetItemId(); GetRagConnection().Send(reinterpret_cast(GetRagConnection()).FixedLength(packet.packetType), &packet); - g_session.unknown_5BF0 = entry->unknown_0004; + g_session.storeSearchOwnerAid = entry->accountId; } diff --git a/Source/UI/Window/UISerachStoreInfoWnd.h b/Source/UI/Window/UISerachStoreInfoWnd.h index 180862009..887f99ac5 100644 --- a/Source/UI/Window/UISerachStoreInfoWnd.h +++ b/Source/UI/Window/UISerachStoreInfoWnd.h @@ -28,13 +28,13 @@ protected: /* 00D0 */ UITextButton* m_prevButton; /* 00D4 */ UITextButton* m_nextButton; /* 00D8 */ UIWindow* unknown_00D8; - /* 00DC */ int unknown_00DC; - /* 00E0 */ int unknown_00E0; - /* 00E4 */ int unknown_00E4; - /* 00E8 */ int unknown_00E8; - /* 00EC */ unsigned char unknown_00EC; - /* 00ED */ unsigned char unknown_00ED; - /* 00F0 */ std::string unknown_00F0; + /* 00DC */ int m_page; + /* 00E0 */ int m_hoverRow; + /* 00E4 */ int m_searchType; + /* 00E8 */ int m_rowHeight; + /* 00EC */ unsigned char m_searchPending; + /* 00ED */ unsigned char m_matchOption; + /* 00F0 */ std::string m_statusText; }; diff --git a/Source/UI/Window/UITab.cpp b/Source/UI/Window/UITab.cpp index af7245094..bc00fb4f0 100644 --- a/Source/UI/Window/UITab.cpp +++ b/Source/UI/Window/UITab.cpp @@ -12,13 +12,13 @@ void UITab::Paint() { char name[128]; if (this->style == 0) { - std::sprintf(name, "유저인터페이스\\basic_interface\\tab_itm_%02d.bmp", this->geometry.unknown_0030 + 1); + std::sprintf(name, "유저인터페이스\\basic_interface\\tab_itm_%02d.bmp", this->geometry.state + 1); } else if (this->style == 1) { - std::sprintf(name, "유저인터페이스\\basic_interface\\tab_cmd_%02d.bmp", this->geometry.unknown_0030 + 1); + std::sprintf(name, "유저인터페이스\\basic_interface\\tab_cmd_%02d.bmp", this->geometry.state + 1); } else if (this->style == 2) { - std::sprintf(name, "유저인터페이스\\basic_interface\\tab_que_%02d.bmp", this->geometry.unknown_0030 + 1); + std::sprintf(name, "유저인터페이스\\basic_interface\\tab_que_%02d.bmp", this->geometry.state + 1); } else if (this->style == 3) { - std::sprintf(name, "유저인터페이스\\basic_interface\\tab_item_%02d.bmp", this->geometry.unknown_0030 + 1); + std::sprintf(name, "유저인터페이스\\basic_interface\\tab_item_%02d.bmp", this->geometry.state + 1); } else { return; } @@ -43,10 +43,10 @@ void UITab::OnLBtnDown(int, int y) { index = this->tabCount - 1; } - if (this->geometry.unknown_0030 != static_cast(index)) { - this->geometry.unknown_0030 = index; + if (this->geometry.state != static_cast(index)) { + this->geometry.state = index; this->Invalidate(); - this->parent->SendMsg(this, UM_TAB, this->geometry.unknown_0030, 0, 0, 0); + this->parent->SendMsg(this, UM_TAB, this->geometry.state, 0, 0, 0); } } @@ -54,7 +54,7 @@ void UITab::OnLBtnDown(int, int y) { // FUNCTION: fn_10921 int UITab::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { if (message == UM_SETSTATE) { - this->geometry.unknown_0030 = argument1; + this->geometry.state = argument1; this->Invalidate(); } @@ -64,7 +64,7 @@ int UITab::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std:: // OFFSET: 0x00850680 // FUNCTION: fn_10679 UITab::UITab() : UIWindow(0) { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->tabCount = 3; this->style = 0; } diff --git a/Source/UI/Window/UITransMenuWnd.cpp b/Source/UI/Window/UITransMenuWnd.cpp index 70ed1a411..2b74a1168 100644 --- a/Source/UI/Window/UITransMenuWnd.cpp +++ b/Source/UI/Window/UITransMenuWnd.cpp @@ -69,19 +69,19 @@ void UITransMenuWnd::Resize(int width, int height) { // OFFSET: 0x0094CF00 // FUNCTION: fn_12900 void UITransMenuWnd::OnCreate(int width, int height) { - this->unknown_00C0 = this->geometry.x; - this->unknown_00C4 = this->geometry.y; + this->m_x = this->geometry.x; + this->m_y = this->geometry.y; this->m_width = this->geometry.width; - this->unknown_00D0 = 0; + this->m_rectangleReserved1 = 0; this->m_height = this->geometry.height; - this->unknown_00D4 = 0x66000000; - this->unknown_00D8 = 0; + this->m_backgroundColor = 0x66000000; + this->m_rectangleReserved2 = 0; } // OFFSET: 0x00949B70 // FUNCTION: fn_12884 bool UITransMenuWnd::GetTransBoxInfo(void* output) { - std::memcpy(output, &this->unknown_00C0, 28); + std::memcpy(output, &this->m_x, 28); return true; } @@ -89,8 +89,8 @@ bool UITransMenuWnd::GetTransBoxInfo(void* output) { // FUNCTION: fn_12889 void UITransMenuWnd::Move(int x, int y) { this->UIWindow::Move(x, y); - this->unknown_00C0 = this->geometry.x; - this->unknown_00C4 = this->geometry.y; + this->m_x = this->geometry.x; + this->m_y = this->geometry.y; } // OFFSET: 0x00951440 diff --git a/Source/UI/Window/UITransMenuWnd.h b/Source/UI/Window/UITransMenuWnd.h index 7addb9608..8332986bf 100644 --- a/Source/UI/Window/UITransMenuWnd.h +++ b/Source/UI/Window/UITransMenuWnd.h @@ -26,13 +26,13 @@ public: protected: /* 00B4 */ std::vector m_items; - /* 00C0 */ std::uint32_t unknown_00C0; - /* 00C4 */ std::uint32_t unknown_00C4; + /* 00C0 */ std::uint32_t m_x; + /* 00C4 */ std::uint32_t m_y; /* 00C8 */ int m_width; /* 00CC */ int m_height; - /* 00D0 */ std::uint32_t unknown_00D0; - /* 00D4 */ std::uint32_t unknown_00D4; - /* 00D8 */ std::uint32_t unknown_00D8; + /* 00D0 */ std::uint32_t m_rectangleReserved1; + /* 00D4 */ std::uint32_t m_backgroundColor; + /* 00D8 */ std::uint32_t m_rectangleReserved2; /* 00DC */ int m_lineHeight; /* 00E0 */ int m_margin; /* 00E4 */ int m_selected; diff --git a/Source/UI/Window/UIVideoWnd.cpp b/Source/UI/Window/UIVideoWnd.cpp index 09348bcea..ec9156a35 100644 --- a/Source/UI/Window/UIVideoWnd.cpp +++ b/Source/UI/Window/UIVideoWnd.cpp @@ -65,7 +65,7 @@ void UIVideoSkipButton::Paint() { std::string text = "SKIP>"; const int textWidth = this->TextWidth(text.c_str(), 0, 0, 30, 1, 0); const int textHeight = this->TextHeight(text.c_str(), 0, 0, 30, 1, 0); - const std::uint32_t color = this->geometry.unknown_0030 == 1 ? 0x4EC7FF : 0xFFFFFF; + const std::uint32_t color = this->geometry.state == 1 ? 0x4EC7FF : 0xFFFFFF; this->DrawTextAt(static_cast(static_cast(this->geometry.width - textWidth) * 0.5f + 5.0f), static_cast(static_cast(this->geometry.height - textHeight) * 0.5f), text.c_str(), 0, 0, 30, color, 1, 0 ); diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index efe9e32f8..8782a5b23 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -101,7 +101,7 @@ namespace { // INLINED inline WindowGeometry::WindowGeometry() - : width(0), height(0), x(0), y(0), surface(nullptr), visible(1), id(600), unknown_0030(0), unknown_0034(0), targetAlpha(255), alphaStart(timeGetTime()), + : width(0), height(0), x(0), y(0), surface(nullptr), visible(1), id(600), state(0), animationFrame(0), targetAlpha(255), alphaStart(timeGetTime()), currentAlpha(255) { } @@ -161,7 +161,7 @@ int __fastcall sub_5C22F0(const int* object) { // OFFSET: 0x00A79A90 // FUNCTION: fn_16914 UIWindow::UIWindow(unsigned char cached) - : parent(nullptr), unknown_0044(0), unknown_0048(0), unknown_004C(4), m_dirty(1), m_uid(++g_windowUid), m_cached(cached), m_clip(0) { + : parent(nullptr), hasTextBackground(0), textBackgroundColor(0), renderLayer(4), m_dirty(1), m_uid(++g_windowUid), m_cached(cached), m_clip(0) { } // OFFSET: 0x00A79E90 @@ -811,7 +811,7 @@ bool UIWindow::Contains(const UIWindow* window) const { // OFFSET: 0x00A7B3F0 // FUNCTION: fn_16926 void UIWindow::ResetStates() { - this->geometry.unknown_0030 = 0; + this->geometry.state = 0; this->Invalidate(); for (auto it = this->m_children.begin(); it != this->m_children.end(); ++it) { @@ -1925,22 +1925,22 @@ void UIListBox_NaviSearch::Resize(int width, int height) { // OFFSET: 0x005C3360 // FUNCTION: fn_03555 bool UINavigationV4Wnd::ClearRouteTexts() { - for (std::string& text : this->unknown_0104) { + for (std::string& text : this->routeFiles) { text.clear(); } - this->unknown_0104.clear(); + this->routeFiles.clear(); return true; } // OFFSET: 0x005C33E0 // FUNCTION: fn_03557 void UINavigationV4Wnd::DrawMapTexture(int x, int y, int size) { - if (g_navigationManager.unknown_1288) { + if (g_navigationManager.previewTexture) { this->FillRegion(x, y, size, size, 0); - const float scale = static_cast(size) / static_cast(g_navigationManager.unknown_1288->Width()); + const float scale = static_cast(size) / static_cast(g_navigationManager.previewTexture->Width()); this->geometry.surface->DrawScaledSurface( - x, y, size, size, g_navigationManager.unknown_1288, g_navigationManager.unknown_1288->Width(), g_navigationManager.unknown_1288->Height(), scale, scale, 0xFFFFFFFFu, false, 0, 0, 0, + x, y, size, size, g_navigationManager.previewTexture, g_navigationManager.previewTexture->Width(), g_navigationManager.previewTexture->Height(), scale, scale, 0xFFFFFFFFu, false, 0, 0, 0, 0 ); } @@ -1955,58 +1955,58 @@ std::string CGameMode::MapName() { // OFFSET: 0x005C45D0 // FUNCTION: fn_03568 bool UINavigationV4Wnd::IsListShown() const { - return this->unknown_00D4->geometry.unknown_0030 != 0; + return this->minimizeCheck->geometry.state != 0; } // OFFSET: 0x005C4690 // FUNCTION: fn_03575 void UINavigationV4Wnd::LayoutWithoutDetails() { - this->unknown_00B8->Move(-1000, -1000); - this->unknown_00C4->Move(-1000, -1000); - this->unknown_00C0->Move((this->geometry.width - 42), 3); - this->unknown_00B4->Move((this->geometry.width - 14), 3); - this->unknown_00BC->Move((this->geometry.width - 28), 3); - this->unknown_00DC->Move(29, 21); - this->unknown_00E0->Move(94, 21); - this->unknown_00E4->Move(207, 21); - this->unknown_00CC->Move(236, 21); - this->unknown_00D0->Move(4, 21); - this->unknown_00C8->Move(237, 317); - this->unknown_00D4->Move(9, 321); - this->unknown_00D8->Move(203, 317); - this->unknown_00E8->Move(-1000, -1000); - this->unknown_00EC->Move(-1000, -1000); - this->unknown_00F0->Move(-1000, -1000); - this->unknown_00F4->Move(-1000, -1000); - this->unknown_00F8->Move(-1000, -1000); - this->unknown_00FC->Move(-1000, -1000); - this->unknown_0100->Move(-1000, -1000); + this->expandedCloseButton->Move(-1000, -1000); + this->maximizeButton->Move(-1000, -1000); + this->helpButton->Move((this->geometry.width - 42), 3); + this->closeButton->Move((this->geometry.width - 14), 3); + this->minimizeButton->Move((this->geometry.width - 28), 3); + this->searchType->Move(29, 21); + this->searchEdit->Move(94, 21); + this->searchButton->Move(207, 21); + this->dataButton->Move(236, 21); + this->backButton->Move(4, 21); + this->roadIconButton->Move(237, 317); + this->minimizeCheck->Move(9, 321); + this->roadListButton->Move(203, 317); + this->summaryLabel->Move(-1000, -1000); + this->roadList->Move(-1000, -1000); + this->searchList->Move(-1000, -1000); + this->filterCheck->Move(-1000, -1000); + this->shareButton->Move(-1000, -1000); + this->findButton->Move(-1000, -1000); + this->moveButton->Move(-1000, -1000); this->Invalidate(); } // OFFSET: 0x005C4AE0 // FUNCTION: fn_03577 void UINavigationV4Wnd::LayoutWithDetails() { - this->unknown_00B8->Move(-1000, -1000); - this->unknown_00C4->Move(-1000, -1000); - this->unknown_00C0->Move((this->geometry.width - 42), 3); - this->unknown_00B4->Move((this->geometry.width - 14), 3); - this->unknown_00BC->Move((this->geometry.width - 28), 3); - this->unknown_00DC->Move(29, 21); - this->unknown_00E0->Move(94, 21); - this->unknown_00E4->Move(207, 21); - this->unknown_00CC->Move(236, 21); - this->unknown_00D0->Move(4, 21); - this->unknown_00C8->Move(237, 317); - this->unknown_00D4->Move(9, 321); - this->unknown_00D8->Move(203, 317); - this->unknown_00E8->Move(20, 48); - this->unknown_00EC->Move(1, 70); - this->unknown_00F0->Move(139, 166); - this->unknown_00F4->Move(146, 247); - this->unknown_00F8->Move(145, 263); - this->unknown_00FC->Move(207, 263); - this->unknown_0100->Move(145, 288); + this->expandedCloseButton->Move(-1000, -1000); + this->maximizeButton->Move(-1000, -1000); + this->helpButton->Move((this->geometry.width - 42), 3); + this->closeButton->Move((this->geometry.width - 14), 3); + this->minimizeButton->Move((this->geometry.width - 28), 3); + this->searchType->Move(29, 21); + this->searchEdit->Move(94, 21); + this->searchButton->Move(207, 21); + this->dataButton->Move(236, 21); + this->backButton->Move(4, 21); + this->roadIconButton->Move(237, 317); + this->minimizeCheck->Move(9, 321); + this->roadListButton->Move(203, 317); + this->summaryLabel->Move(20, 48); + this->roadList->Move(1, 70); + this->searchList->Move(139, 166); + this->filterCheck->Move(146, 247); + this->shareButton->Move(145, 263); + this->findButton->Move(207, 263); + this->moveButton->Move(145, 288); this->Invalidate(); } @@ -2114,7 +2114,7 @@ void UIPrivateAirplaneWnd::Paint() { // OFFSET: 0x005C72A0 // FUNCTION: fn_03604 void UINavigationV4Wnd::OnProcess() { - if (g_navigationManager.unknown_125C == 2) { + if (g_navigationManager.displayMode == 2) { this->Invalidate(); } } @@ -2249,7 +2249,7 @@ void UIListBox_NaviSearch::Paint() { // FUNCTION: fn_03581 void UINavigationV4Wnd::OnCreate(int, int) { UIBitmapButton* closeButton = new UIBitmapButton(); - this->unknown_00B8 = closeButton; + this->expandedCloseButton = closeButton; closeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_close_normal.bmp", 0, 0); closeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_close_over.bmp", 1, 0); closeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_close_press.bmp", 2, 0); @@ -2259,7 +2259,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(closeButton); UIBitmapButton* maximizeButton = new UIBitmapButton(); - this->unknown_00C4 = maximizeButton; + this->maximizeButton = maximizeButton; maximizeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_maximize_normal.bmp", 0, 0); maximizeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_maximize_over.bmp", 1, 0); maximizeButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_maximize_press.bmp", 2, 0); @@ -2269,7 +2269,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(maximizeButton); UICheckBox* minimizeCheck = new UICheckBox(); - this->unknown_00D4 = minimizeCheck; + this->minimizeCheck = minimizeCheck; minimizeCheck->SetSize(110, 12); minimizeCheck->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", "Minimize"); minimizeCheck->SetChecked(0); @@ -2277,7 +2277,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(minimizeCheck); UIBitmapButton* roadIconButton = new UIBitmapButton(); - this->unknown_00C8 = roadIconButton; + this->roadIconButton = roadIconButton; this->SetRoadIcon(g_navigationManager.viewIcon); roadIconButton->SetSize(roadIconButton->BitmapWidth(), roadIconButton->BitmapHeight()); roadIconButton->SetId(189); @@ -2285,7 +2285,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(roadIconButton); UIBitmapButton* roadListButton = new UIBitmapButton(); - this->unknown_00D8 = roadListButton; + this->roadListButton = roadListButton; roadListButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_roadlistwnd_normal.bmp", 0, 0); roadListButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_roadlistwnd_over.bmp", 1, 0); roadListButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_roadlistwnd_press.bmp", 2, 0); @@ -2295,7 +2295,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(roadListButton); UIListBox_NaviSearch* roadList = new UIListBox_NaviSearch(); - this->unknown_00EC = roadList; + this->roadList = roadList; roadList->SetSize(138, 244); roadList->backgroundRed = 255; roadList->backgroundGreen = 255; @@ -2304,7 +2304,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(roadList); UIListBox_NaviSearch* searchList = new UIListBox_NaviSearch(); - this->unknown_00F0 = searchList; + this->searchList = searchList; searchList->SetSize(132, 80); searchList->backgroundRed = 240; searchList->backgroundGreen = 244; @@ -2313,16 +2313,16 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(searchList); UICheckBox* filterCheck = new UICheckBox(); - this->unknown_00F4 = filterCheck; + this->filterCheck = filterCheck; filterCheck->SetSize(110, 12); filterCheck->SetImages("유저인터페이스\\checkbox_1.bmp", "유저인터페이스\\checkbox_0.bmp", "service"); filterCheck->SetId(213); - filterCheck->SetChecked(g_navigationManager.unknown_127C); + filterCheck->SetChecked(g_navigationManager.allowGates); filterCheck->SetTooltip(LookupMessage(MSI_NAVIGATION_V4_HELP)); this->AddChild(filterCheck); UIBitmapButton* shareButton = new UIBitmapButton(); - this->unknown_00F8 = shareButton; + this->shareButton = shareButton; shareButton->SetBitmap("유저인터페이스\\private_airplane\\btn_share_normal.bmp", 0, 0); shareButton->SetBitmap("유저인터페이스\\private_airplane\\btn_share_over.bmp", 1, 0); shareButton->SetBitmap("유저인터페이스\\private_airplane\\btn_share_press.bmp", 2, 0); @@ -2332,7 +2332,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(shareButton); UIBitmapButton* findButton = new UIBitmapButton(); - this->unknown_00FC = findButton; + this->findButton = findButton; findButton->SetBitmap("유저인터페이스\\private_airplane\\btn_find_normal.bmp", 0, 0); findButton->SetBitmap("유저인터페이스\\private_airplane\\btn_find_over.bmp", 1, 0); findButton->SetBitmap("유저인터페이스\\private_airplane\\btn_find_press.bmp", 2, 0); @@ -2342,7 +2342,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(findButton); UIBitmapButton* moveButton = new UIBitmapButton(); - this->unknown_0100 = moveButton; + this->moveButton = moveButton; moveButton->SetBitmap("유저인터페이스\\private_airplane\\btn_move_normal.bmp", 0, 0); moveButton->SetBitmap("유저인터페이스\\private_airplane\\btn_move_over.bmp", 1, 0); moveButton->SetBitmap("유저인터페이스\\private_airplane\\btn_move_press.bmp", 2, 0); @@ -2351,17 +2351,17 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(moveButton); UIStaticText* label = new UIStaticText(); - this->unknown_00E8 = label; + this->summaryLabel = label; label->SetSize(100, 20); this->AddChild(label); label->SetText(LookupMessage(MSI_NAVIGATION_SEARCH_02), 0); label->SetColor(0, 0, 0); - this->unknown_00B4 = this->AddCloseButton(LookupMessage(MSI_ZENY_LOTTO_BUY_10), 0); - this->unknown_00BC = this->AddMinimizeButton(LookupMessage(MSI_NAVIGATION_MAP), 0); + this->closeButton = this->AddCloseButton(LookupMessage(MSI_ZENY_LOTTO_BUY_10), 0); + this->minimizeButton = this->AddMinimizeButton(LookupMessage(MSI_NAVIGATION_MAP), 0); UIBitmapButton* helpButton = new UIBitmapButton(); - this->unknown_00C0 = helpButton; + this->helpButton = helpButton; helpButton->SetBitmap("유저인터페이스\\navigation_interface\\NaviHelp_off.bmp", 0, 0); helpButton->SetBitmap("유저인터페이스\\navigation_interface\\NaviHelp_on.bmp", 1, 0); helpButton->SetBitmap("유저인터페이스\\navigation_interface\\NaviHelp_on.bmp", 2, 0); @@ -2371,7 +2371,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(helpButton); UIBitmapButton* dataButton = new UIBitmapButton(); - this->unknown_00CC = dataButton; + this->dataButton = dataButton; dataButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_Navidata_Open_normal.bmp", 0, 0); dataButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_Navidata_Open_over.bmp", 1, 0); dataButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_Navidata_Open_press.bmp", 2, 0); @@ -2381,7 +2381,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(dataButton); UIBitmapEditCtrl* searchEdit = new UIBitmapEditCtrl(); - this->unknown_00E0 = searchEdit; + this->searchEdit = searchEdit; searchEdit->SetSize(113, 18); searchEdit->maximum = 30; searchEdit->SetBitmapName("유저인터페이스\\navigation_interface3\\bg_search.bmp"); @@ -2389,7 +2389,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(searchEdit); UIBitmapButton* searchButton = new UIBitmapButton(); - this->unknown_00E4 = searchButton; + this->searchButton = searchButton; searchButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_searchbar_normal.bmp", 3, 0); searchButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_searchbar_normal.bmp", 0, 0); searchButton->SetBitmap("유저인터페이스\\navigation_interface3\\btn_searchbar_over.bmp", 1, 0); @@ -2400,7 +2400,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(searchButton); UIBitmapButton* backButton = new UIBitmapButton(); - this->unknown_00D0 = backButton; + this->backButton = backButton; backButton->SetBitmap("유저인터페이스\\navigation_interface3\\bt_back.bmp", 3, 0); backButton->SetBitmap("유저인터페이스\\navigation_interface3\\bt_back.bmp", 0, 0); backButton->SetBitmap("유저인터페이스\\navigation_interface3\\bt_back_on.bmp", 1, 0); @@ -2411,7 +2411,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { this->AddChild(backButton); UIComboBox_BmpWnd* searchType = new UIComboBox_BmpWnd(); - this->unknown_00DC = searchType; + this->searchType = searchType; searchType->dropdownHeight = 67; searchType->Create(61, 18, "유저인터페이스\\navigation_interface3\\bg_combo.bmp", "유저인터페이스\\navigation_interface3\\dropdown_on"); searchType->borderRed = 100; @@ -2425,7 +2425,7 @@ void UINavigationV4Wnd::OnCreate(int, int) { searchType->AddOption(LookupMessage(MSI_NAVIGATION_SETSTRING), 0); searchType->AddOption(LookupMessage(MSI_NAVIGATION_SCROLL), 0); searchType->AddOption(LookupMessage(MSI_NAVIGATION_USESCROLL), 0); - searchType->Select(g_navigationManager.unknown_1260); + searchType->Select(g_navigationManager.searchType); this->RefreshLayout(); } @@ -2448,7 +2448,7 @@ void UINavigationroadiconWnd::OnCreate(int, int) { // OFFSET: 0x005C62F0 // FUNCTION: fn_03588 void UINavigationV4Wnd::Paint() { - if (g_navigationManager.unknown_1254 == true) { + if (g_navigationManager.expandedMap == true) { DrawFilledRoundedBorder(*this, 0, 0, 0x86, 0x3d, 0xffffff); DrawFilledRoundedBorder(*this, 1, 0x11, 0x84, 0x2b, 0); this->DrawTextAt(3, 3, LookupMessage(MSI_NAVIGATION_MOB_S_S), 0, 0, 12, 0, 0, 0); @@ -2470,7 +2470,7 @@ void UINavigationV4Wnd::Paint() { static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\navigation_interface3\\bg_down.bmp"))), false ); - if (g_navigationManager.unknown_1258 == 2 && g_navigationManager.unknown_125C == 1) { + if (g_navigationManager.viewMode == 2 && g_navigationManager.displayMode == 1) { this->FillRegion(1, 0x2c, 0x10e, 0x10e, 0xcccccc); this->DrawMapTexture(3, 0x2e, 0x10a); this->DrawTextAt(10, 0x30, g_navigationManager.destinationTitle.c_str(), 0, 0, 12, 0xffffff, 1, 0); @@ -2505,7 +2505,7 @@ void UINavigationV4Wnd::Paint() { return; } - if (g_navigationManager.unknown_125C == 2) { + if (g_navigationManager.displayMode == 2) { this->FillRegion(1, 0x2c, 0x10e, 0x10e, 0xcccccc); this->DrawMapTexture(3, 0x2e, 0x10a); CNaviInfo* info = static_cast(g_navigationManager.GetCurrentTarget().object); @@ -2514,7 +2514,7 @@ void UINavigationV4Wnd::Paint() { DrawOutlinedText(*this, 9, 0x41, info->GetName(), 0, 0xffffff, 0, 0, 0xb, 1, 0); } - if (static_cast(this->unknown_0118) > timeGetTime()) { + if (static_cast(this->noticeUntil) > timeGetTime()) { CTexture* background = g_texMgr.Load("유저인터페이스\\navigation_interface3\\back.bmp", 0, false, true, false); if (background) { this->geometry.surface->DrawScaledSurface( @@ -2573,14 +2573,14 @@ void UINavigationV4Wnd::Paint() { mapX = 0xe3; mapSize = 0x28; this->DrawActionSprite( - g_navigationManager.unknown_12A4, g_navigationManager.unknown_12A0, 0x93, 0x2d, 0x74, 0x74, 0x5dc, true, + g_navigationManager.previewSprite, g_navigationManager.previewAction, 0x93, 0x2d, 0x74, 0x74, 0x5dc, true, static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\Anibackground.bmp"))) ); mapY = 0x78; } this->DrawMapTexture(mapX, mapY, mapSize); - const int active = g_navigationManager.unknown_1284; + const int active = g_navigationManager.previewType; const int count = static_cast(g_navigationManager.routeLines.size()); for (int index = 0; index < count; ++index) { if (g_navigationManager.routeLines[index].kind == active) { @@ -2651,7 +2651,7 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); if (mode->scene && static_cast(g_modeMgr.GetGameMode())->scene->player && - static_cast(g_modeMgr.GetGameMode())->scene->player->render.unknown_0070 == 3) { + static_cast(g_modeMgr.GetGameMode())->scene->player->render.state == 3) { window->SendMsg(nullptr, 0x9A, reinterpret_cast(LookupMessage(MSI_REGISTER_ADVENTURER_AGENCY2)), 0, 0, 0); window->SendMsg(nullptr, UM_REFRESHBUTTON, 0, 0, 0, 0); } @@ -2675,7 +2675,7 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu result = g_navigationManager.Navigate(target.x, target.y); } if (result >= 0) { - g_navigationManager.unknown_125C = 1; + g_navigationManager.displayMode = 1; g_navigationManager.SelectTarget(g_navigationManager.GetSelectedNode()); if (g_windowMgr.modal) { static_cast(g_windowMgr.modal)->RefreshWorldMapMarks(); @@ -2690,15 +2690,15 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; } case ID_SEARCH: - if (static_cast(this->unknown_00E0)->Length() != 0 && !g_navigationManager.unknown_1254) { - g_navigationManager.unknown_1264 = static_cast(this->unknown_00E0)->Text(); + if (static_cast(this->searchEdit)->Length() != 0 && !g_navigationManager.expandedMap) { + g_navigationManager.searchText = static_cast(this->searchEdit)->Text(); g_navigationManager.UpdateSearchResults(); - this->unknown_00F0->Clear(); - this->unknown_00F0->Invalidate(); + this->searchList->Clear(); + this->searchList->Invalidate(); g_navigationManager.ResetCurrentTarget(); g_navigationManager.LoadTargetPreview(); this->FillRouteGroups(); - g_navigationManager.unknown_125C = 0; + g_navigationManager.displayMode = 0; if (g_windowMgr.modal) { static_cast(g_windowMgr.modal)->RefreshWorldMapLevels(); } @@ -2707,12 +2707,12 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu } break; case ID_CHECK: - g_navigationManager.unknown_127D = false; - g_navigationManager.unknown_127C = argument2 != 0; - g_navigationManager.unknown_127E = g_navigationManager.unknown_127C; + g_navigationManager.includeObjects = false; + g_navigationManager.allowGates = argument2 != 0; + g_navigationManager.allowWarps = g_navigationManager.allowGates; break; case ID_MINI: - g_navigationManager.unknown_1254 = true; + g_navigationManager.expandedMap = true; this->geometry.targetAlpha = 0xAA; this->geometry.alphaStart = timeGetTime(); if (g_windowMgr.modal) { @@ -2721,10 +2721,10 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu this->RefreshLayout(); break; case ID_BASE: - g_navigationManager.unknown_1254 = false; + g_navigationManager.expandedMap = false; this->geometry.targetAlpha = 0xFF; this->geometry.alphaStart = timeGetTime(); - g_navigationManager.unknown_1248 = false; + g_navigationManager.hideWindow = false; this->RefreshLayout(); break; case ID_BUTTON1: @@ -2733,17 +2733,17 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu } break; case 0xBF: { - if (g_windowMgr.unknown_0214 != 0) { + if (g_windowMgr.comboBoxWnd != 0) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } this->ClearRouteTexts(); const std::string directory = FormatOwnedString("%s\\Navigationdata\\", g_applicationDirectory); - EnumerateFileNames(this->unknown_0104, directory.c_str(), "*.txt"); - const int count = static_cast(this->unknown_0104.size()); + EnumerateFileNames(this->routeFiles, directory.c_str(), "*.txt"); + const int count = static_cast(this->routeFiles.size()); if (count != 0) { UIWindow* history = g_windowMgr.EnsureWindow(WID_COMBOBOXWND); - for (const std::string& name : this->unknown_0104) { + for (const std::string& name : this->routeFiles) { history->SendMsg(nullptr, UM_ADDITEM, reinterpret_cast(name.c_str()), 0, 0, 0); } const int height = (std::min)(count * 0x10, 0xA0); @@ -2769,17 +2769,17 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; case ID_SELECT_ITEM: if (g_replayAnimationScaling == 0) { - argument2 = this->unknown_00EC->selected; + argument2 = this->roadList->selected; } this->SelectRoute(static_cast(argument2)); if (argument2 != -1) { - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPathNode = 0; if (!g_navigationManager.SelectNodeState()) { - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPathNode = 0; g_navigationManager.SelectNodeState(); } - this->unknown_00F0->selected = g_navigationManager.unknown_12C8; - this->unknown_00F0->Invalidate(); + this->searchList->selected = g_navigationManager.selectedPathNode; + this->searchList->Invalidate(); if (g_windowMgr.modal) { static_cast(g_windowMgr.modal)->RefreshWorldMapSelection(); } @@ -2790,7 +2790,7 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; case 0x1B9: if (g_replayAnimationScaling == 0) { - argument2 = this->unknown_00F0->selected; + argument2 = this->searchList->selected; } if (argument2 != -1) { this->SelectRouteNode(static_cast(argument2)); @@ -2800,23 +2800,23 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; case ID_CHARGE: if (!g_navigationManager.GetSavedTarget().object) { - if (g_navigationManager.unknown_125C == 2) { - if (g_navigationManager.unknown_1258 == 2) { + if (g_navigationManager.displayMode == 2) { + if (g_navigationManager.viewMode == 2) { this->LayoutWithoutDetails(); - g_navigationManager.unknown_125C = 1; + g_navigationManager.displayMode = 1; g_navigationManager.SelectTarget(g_navigationManager.GetSelectedNode()); } else { this->LayoutWithDetails(); - g_navigationManager.unknown_125C = 0; + g_navigationManager.displayMode = 0; g_navigationManager.SelectNodeState(); } } - } else if (g_navigationManager.unknown_125C == 1 || (g_navigationManager.unknown_125C == 2 && g_navigationManager.unknown_1258 != 2)) { - g_navigationManager.unknown_125C = 0; + } else if (g_navigationManager.displayMode == 1 || (g_navigationManager.displayMode == 2 && g_navigationManager.viewMode != 2)) { + g_navigationManager.displayMode = 0; g_navigationManager.SelectNodeState(); this->RefreshLayout(); } else { - g_navigationManager.unknown_125C = 1; + g_navigationManager.displayMode = 1; g_navigationManager.SelectTarget(g_navigationManager.GetSelectedNode()); this->RefreshLayout(); } @@ -2826,8 +2826,8 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu const int type = g_navigationManager.GetCurrentTarget().type; if (type < 2) { this->LayoutWithoutDetails(); - g_navigationManager.unknown_125C = 2; - this->unknown_0118 = timeGetTime() + 5000; + g_navigationManager.displayMode = 2; + this->noticeUntil = timeGetTime() + 5000; } else { const NavigationTarget target = g_navigationManager.GetCurrentTarget(); CNavi_Object* object = static_cast(target.object); @@ -2844,10 +2844,10 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu } break; case ID_CLOSE: - if (g_navigationManager.unknown_1258 == 2) { + if (g_navigationManager.viewMode == 2) { if (g_windowMgr.Confirm(LookupMessage(MSI_NAVIGATION_HELP2), 2, true, false, 0, "Message", 0x118, 0x78, 0) == 0xBB) { g_navigationManager.SetViewMode(1); - g_navigationManager.unknown_125C = 0; + g_navigationManager.displayMode = 0; g_navigationManager.ClearSavedTarget(); g_windowMgr.CloseWindow(WID_NAVIGATIONRUIDEWND); this->RefreshLayout(); @@ -2857,8 +2857,8 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu if (g_windowMgr.modal) { this->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } - g_navigationManager.unknown_125C = 0; - g_navigationManager.unknown_1254 = false; + g_navigationManager.displayMode = 0; + g_navigationManager.expandedMap = false; g_navigationManager.Reset(true); g_worldViewMgr.ClearMarks(); g_worldViewMgr.ClearLevels(); @@ -2871,13 +2871,13 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; case UM_COMBOBOX_SELECTED: - if (sender == this->unknown_00DC) { - g_navigationManager.unknown_1260 = static_cast(argument1); + if (sender == this->searchType) { + g_navigationManager.searchType = static_cast(argument1); g_navigationManager.BuildNodePaths(); this->FillRouteGroups(); this->Invalidate(); if (g_replayAnimationScaling != 0) { - this->unknown_00DC->SendMsg(nullptr, UM_CHANGEMSG, argument1, 0, 0, 0); + this->searchType->SendMsg(nullptr, UM_CHANGEMSG, argument1, 0, 0, 0); } } else if (g_replayAnimationScaling == 0) { this->LoadRoute(static_cast(argument1)); @@ -2889,8 +2889,8 @@ int UINavigationV4Wnd::SendMsg(UIWindow* sender, int message, std::intptr_t argu break; case UM_DEFPUSH: - if (sender == this->unknown_00E0 && static_cast(this->unknown_00E0)->Length() > 0) { - this->SendMsg(this->unknown_00E0, UM_COMMAND, ID_SEARCH, 0, 0, 0); + if (sender == this->searchEdit && static_cast(this->searchEdit)->Length() > 0) { + this->SendMsg(this->searchEdit, UM_COMMAND, ID_SEARCH, 0, 0, 0); } break; } @@ -3140,13 +3140,13 @@ std::string UINavigationV4Wnd::ObjectLabel(int type, void* object) { // OFFSET: 0x005C9640 // FUNCTION: fn_03633 void UINavigationV4Wnd::SelectRoute(int route) { - this->unknown_00F0->Invalidate(); - this->unknown_00F0->Clear(); + this->searchList->Invalidate(); + this->searchList->Clear(); if (g_navigationManager.nodePaths.empty()) { return; } - g_navigationManager.unknown_12C4 = route; + g_navigationManager.selectedPath = route; if (route == -1) { return; } @@ -3169,7 +3169,7 @@ void UINavigationV4Wnd::SelectRoute(int route) { const int icon = target.type; const char* line = text.c_str(); - UIListBox_NaviSearch* list = this->unknown_00F0; + UIListBox_NaviSearch* list = this->searchList; list->icons.push_back(icon); list->AddLine(line); list->Invalidate(); @@ -3181,11 +3181,11 @@ void UINavigationV4Wnd::SelectRoute(int route) { // OFFSET: 0x005C9180 // FUNCTION: fn_03631 bool UINavigationV4Wnd::LoadRoute(int index) { - if (this->unknown_0104.empty() || static_cast(index) > this->unknown_0104.size() || index < 0) { + if (this->routeFiles.empty() || static_cast(index) > this->routeFiles.size() || index < 0) { return false; } - std::string name = this->unknown_0104[index].c_str(); + std::string name = this->routeFiles[index].c_str(); if (name.size() == 0) { return false; } @@ -3224,8 +3224,8 @@ bool UINavigationV4Wnd::LoadRoute(int index) { // OFFSET: 0x005C9A20 // FUNCTION: fn_03634 void UINavigationV4Wnd::FillRouteGroups() { - this->unknown_00EC->Clear(); - this->unknown_00EC->Invalidate(); + this->roadList->Clear(); + this->roadList->Invalidate(); for (unsigned int index = 0; index < g_navigationManager.nodePaths.size(); ++index) { NavigationTarget target = g_navigationManager.GetState(g_navigationManager.nodePaths[index][0]); const int count = static_cast(g_navigationManager.nodePaths[index].size()); @@ -3238,7 +3238,7 @@ void UINavigationV4Wnd::FillRouteGroups() { std::memset(text, 0, sizeof(text)); std::sprintf(text, "[%d]%s", count, name.c_str()); const int icon = target.type; - UIListBox_NaviSearch* list = this->unknown_00EC; + UIListBox_NaviSearch* list = this->roadList; list->icons.push_back(icon); list->AddLine(text); list->Invalidate(); @@ -3247,7 +3247,7 @@ void UINavigationV4Wnd::FillRouteGroups() { char summary[50]; std::memset(summary, 0, sizeof(summary)); std::sprintf(summary, LookupMessage(MSI_WORLDMAP_NAVIGATION_SET), static_cast(g_navigationManager.nodePaths.size())); - this->unknown_00E8->SetText(summary, 0); + this->summaryLabel->SetText(summary, 0); this->Invalidate(); } @@ -3304,10 +3304,10 @@ void UIWindow::DrawActionSprite( void UINavigationV4Wnd::OnLBtnUp(int x, int y) { UIFrameWnd::OnLBtnUp(x, y); - if (!g_navigationManager.unknown_1254) { + if (!g_navigationManager.expandedMap) { const int mapY = y - 46; const int mapX = x - 3; - if (mapY >= 0 && mapY <= 266 && mapX >= 0 && mapX <= 266 && g_navigationManager.unknown_125C == 2) { + if (mapY >= 0 && mapY <= 266 && mapX >= 0 && mapX <= 266 && g_navigationManager.displayMode == 2) { NavigationTarget target = g_navigationManager.GetCurrentTarget(); CNaviInfo* info = static_cast(target.object); const int width = info->GetCellX(); @@ -3369,40 +3369,40 @@ void UINavigationV4Wnd::InsertNavigationLink(std::string name, int x, int y) { // OFFSET: 0x005C4830 // FUNCTION: fn_03576 void UINavigationV4Wnd::RefreshLayout() { - if (g_navigationManager.unknown_1254 == true) { + if (g_navigationManager.expandedMap == true) { this->Resize(134, 61); - this->unknown_00B8->Move((this->geometry.width - 15), 2); - this->unknown_00C4->Move((this->geometry.width - 32), 2); - this->unknown_00C0->Move(-1000, -1000); - this->unknown_00B4->Move(-1000, -1000); - this->unknown_00BC->Move(-1000, -1000); - this->unknown_00DC->Move(-1000, -1000); - this->unknown_00E0->Move(-1000, -1000); - this->unknown_00E4->Move(-1000, -1000); - this->unknown_00CC->Move(-1000, -1000); - this->unknown_00D0->Move(-1000, -1000); - this->unknown_00C8->Move(-1000, -1000); - this->unknown_00D4->Move(-1000, -1000); - this->unknown_00E8->Move(-1000, -1000); - this->unknown_00EC->Move(-1000, -1000); - this->unknown_00F0->Move(-1000, -1000); - this->unknown_00F4->Move(-1000, -1000); - this->unknown_00F8->Move(-1000, -1000); - this->unknown_00FC->Move(-1000, -1000); - this->unknown_00D8->Move(-1000, -1000); - this->unknown_0100->Move(-1000, -1000); + this->expandedCloseButton->Move((this->geometry.width - 15), 2); + this->maximizeButton->Move((this->geometry.width - 32), 2); + this->helpButton->Move(-1000, -1000); + this->closeButton->Move(-1000, -1000); + this->minimizeButton->Move(-1000, -1000); + this->searchType->Move(-1000, -1000); + this->searchEdit->Move(-1000, -1000); + this->searchButton->Move(-1000, -1000); + this->dataButton->Move(-1000, -1000); + this->backButton->Move(-1000, -1000); + this->roadIconButton->Move(-1000, -1000); + this->minimizeCheck->Move(-1000, -1000); + this->summaryLabel->Move(-1000, -1000); + this->roadList->Move(-1000, -1000); + this->searchList->Move(-1000, -1000); + this->filterCheck->Move(-1000, -1000); + this->shareButton->Move(-1000, -1000); + this->findButton->Move(-1000, -1000); + this->roadListButton->Move(-1000, -1000); + this->moveButton->Move(-1000, -1000); } else { this->Resize(272, 338); - if (g_navigationManager.unknown_125C == 0) { + if (g_navigationManager.displayMode == 0) { this->LayoutWithDetails(); } else { this->LayoutWithoutDetails(); } } - this->Show(!g_navigationManager.unknown_1248); + this->Show(!g_navigationManager.hideWindow); this->FillRouteGroups(); - this->SelectRoute(g_navigationManager.unknown_12C4); + this->SelectRoute(g_navigationManager.selectedPath); g_navigationManager.LoadTargetPreview(); g_navigationManager.DestinationTitle(); g_navigationManager.DestinationText(); @@ -3419,14 +3419,14 @@ void UINavigationV4Wnd::SelectRouteNode(int node) { return; } - g_navigationManager.unknown_12C8 = node; + g_navigationManager.selectedPathNode = node; if (!g_navigationManager.SelectNodeState()) { - g_navigationManager.unknown_12C8 = 0; + g_navigationManager.selectedPathNode = 0; g_navigationManager.SelectNodeState(); } - UIListBox_NaviSearch* list = this->unknown_00F0; - list->selected = g_navigationManager.unknown_12C8; + UIListBox_NaviSearch* list = this->searchList; + list->selected = g_navigationManager.selectedPathNode; list->Invalidate(); if (g_windowMgr.modal) { reinterpret_cast(g_windowMgr.modal)->RefreshWorldMapSelection(); @@ -3533,7 +3533,7 @@ void UINavigationV4Wnd::SetRoadIcon(int slot) { std::sprintf(over, "유저인터페이스\\navigation_interface3\\btn_roadIocn_select%d_over.bmp", slot); std::sprintf(press, "유저인터페이스\\navigation_interface3\\btn_roadIocn_select%d_press.bmp", slot); - UIBitmapButton* button = static_cast(this->unknown_00C8); + UIBitmapButton* button = static_cast(this->roadIconButton); button->SetBitmap(normal, 0, 0); button->SetBitmap(over, 1, 0); button->SetBitmap(press, 2, 0); @@ -3580,7 +3580,7 @@ int UIPrivateAirplaneWnd::SendMsg( case UM_COMMAND: if (argument1 == ID_CLOSE) { if (!g_windowMgr.modalWindows.empty() && g_windowMgr.modalWindows.back()) { - g_windowMgr.unknown_0474 = 0xBC; + g_windowMgr.modalResponse = 0xBC; } } else if (argument1 == 500) { const std::string mapName = g_navigationManager.GetCurrentTargetName() + ".gat"; @@ -3619,7 +3619,7 @@ UIItemTagButton* UIWindow::CreateItemTagButton(const std::string& title, const s button->SetId(0x1D0); button->m_value = 0x205; button->Move(0, 0); - button->unknown_01F8 = tagId; + button->tipId = tagId; if (parent) { UIWindow* const child = button; child->parent = parent; @@ -3639,11 +3639,11 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co CNavi_Object* target = static_cast(g_navigationManager.GetCurrentTarget().object); NavigationTargetLook look = { - target->unknown_0058, target->unknown_005C, target->unknown_0060, target->unknown_0064, target->unknown_0068, - target->unknown_006C, target->unknown_0070, target->unknown_0074, target->unknown_0078, + target->job, target->sex, target->bodyPalette, target->head, target->headPalette, + target->accessory0, target->accessory1, target->accessory2, target->robe, }; if (!look.job) { - this->DrawActionSprite(g_navigationManager.unknown_12A4, g_navigationManager.unknown_12A0, x, y, width, height, 1500, true, background); + this->DrawActionSprite(g_navigationManager.previewSprite, g_navigationManager.previewAction, x, y, width, height, 1500, true, background); return; } @@ -3699,7 +3699,7 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co bodyFrame = 0; const int bodyCount = static_cast(bodyFrames->size()); - if (static_cast(now - bodyTime) / (this->unknown_011C / bodyCount) >= bodyCount) { + if (static_cast(now - bodyTime) / (this->animationDuration / bodyCount) >= bodyCount) { bodyTime = now; } @@ -3769,7 +3769,7 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co const std::vector* accessoryFrames = &actions[2]->Animation(0); if (accessoryFrames) { const int count = static_cast(accessoryFrames->size()); - if (static_cast(now - accessoryTime0) / (this->unknown_011C / count) >= count) { + if (static_cast(now - accessoryTime0) / (this->animationDuration / count) >= count) { accessoryTime0 = now; } @@ -3793,7 +3793,7 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co const std::vector* accessoryFrames = &actions[3]->Animation(0); if (accessoryFrames) { const int count = static_cast(accessoryFrames->size()); - if (static_cast(now - accessoryTime1) / (this->unknown_011C / count) >= count) { + if (static_cast(now - accessoryTime1) / (this->animationDuration / count) >= count) { accessoryTime1 = now; } @@ -3817,7 +3817,7 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co const std::vector* accessoryFrames = &actions[4]->Animation(0); if (accessoryFrames) { const int count = static_cast(accessoryFrames->size()); - if (static_cast(now - accessoryTime2) / (this->unknown_011C / count) >= count) { + if (static_cast(now - accessoryTime2) / (this->animationDuration / count) >= count) { accessoryTime2 = now; } diff --git a/Source/UI/Window/UIWindow.h b/Source/UI/Window/UIWindow.h index caae0cce1..a9e7f0dc9 100644 --- a/Source/UI/Window/UIWindow.h +++ b/Source/UI/Window/UIWindow.h @@ -205,11 +205,11 @@ public: // INLINED bool HasTextBackground() const { - return this->unknown_0044 != 0; + return this->hasTextBackground != 0; } // INLINED std::uint32_t TextBackground() const { - return this->unknown_0048; + return this->textBackgroundColor; } bool IsCached() const { @@ -220,9 +220,9 @@ public: /* 0014 */ WindowGeometry geometry; protected: - /* 0044 */ unsigned char unknown_0044; - /* 0048 */ std::uint32_t unknown_0048; - /* 004C */ std::uint32_t unknown_004C; + /* 0044 */ unsigned char hasTextBackground; + /* 0048 */ std::uint32_t textBackgroundColor; + /* 004C */ std::uint32_t renderLayer; /* 0050 */ std::list m_children; /* 0058 */ int m_dirty; /* 005C */ std::vector m_overlayPrimitives; diff --git a/Source/UI/Window/UIWindowFactory.cpp b/Source/UI/Window/UIWindowFactory.cpp index 049ccab36..f5a308cad 100644 --- a/Source/UI/Window/UIWindowFactory.cpp +++ b/Source/UI/Window/UIWindowFactory.cpp @@ -40,7 +40,7 @@ UIWindow* UIWindowMgr::CreateLayoutWindow(int id) { switch (id) { case WID_HOTKEYWND: window = new UIHotKeyWnd(); - this->unknown_0404 = window; + this->hotkeyWnd = window; break; case WID_JOINTO_BATTLEFIELDWND: window = new UIEntryQueueWnd(); @@ -79,11 +79,11 @@ UIWindow* UIWindowMgr::CreateLayoutWindow(int id) { window->Move(x, y); this->rendered.push_back(window); if (id == 0x9F) { - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_0934), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->hotkeyPlacement), 0, 0, 0); } else if (id == 0x9D) { - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_0944), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->battlefieldPlacement), 0, 0, 0); } else if (id == 0xD4) { - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_09D4), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->entryQueueStandbyPlacement), 0, 0, 0); } } diff --git a/Source/UI/Window/UIWindowMgr.cpp b/Source/UI/Window/UIWindowMgr.cpp index 7ef7e0e5e..3c5a30305 100644 --- a/Source/UI/Window/UIWindowMgr.cpp +++ b/Source/UI/Window/UIWindowMgr.cpp @@ -383,7 +383,7 @@ void UIWindowMgr::DrawWindows() { g_cooldownOwner->Drawing().SubmitNormal(g_renderer->queues, g_renderer->fog.supported != 0, g_depthStart, g_depthEnd); g_renderDiagnosticLine = 3866; g_renderDiagnosticFile = g_windowManagerDiagnosticFile; - if (window == this->unknown_0464) { + if (window == this->roulletteWnd) { g_rouletteMgr->Draw(); } @@ -652,147 +652,147 @@ void UIWindowMgr::ResetWindows() { this->inputWindow = nullptr; this->hoverWindow = nullptr; this->window_01C8 = nullptr; - this->unknown_01BC = 0; - this->unknown_01DC = 0; - this->unknown_01D4 = 0; - this->unknown_01E0 = 0; - this->unknown_01E4 = 0; - this->unknown_01C4 = 0; - this->unknown_01C0 = 0; + this->loadingWnd = 0; + this->basicInfoWnd = 0; + this->itemWnd = 0; + this->equipWnd = 0; + this->nCashWnd = 0; + this->statusWnd = 0; + this->minimapZoomWnd = 0; this->window_01EC = nullptr; - this->unknown_01F0 = 0; - this->unknown_01F4 = 0; - this->unknown_01F8 = 0; - this->unknown_01FC = 0; - this->unknown_0208 = 0; - this->unknown_020C = 0; - this->unknown_0210 = 0; - this->unknown_0214 = 0; - this->unknown_0218 = 0; - this->unknown_021C = 0; - this->unknown_0220 = 0; - this->unknown_0228 = 0; - this->unknown_022C = 0; + this->sayDialogWnd = 0; + this->sayDialogOverlayWnd = 0; + this->choose3Wnd = 0; + this->itemIdentifyWnd = 0; + this->itemCompositionWnd = 0; + this->chooseWarpWnd = 0; + this->menuWnd = 0; + this->comboBoxWnd = 0; + this->itemCollectionWnd = 0; + this->comboBoxIDWnd = 0; + this->itemCollectionComparisonWnd = 0; + this->combinedCardItemCollectionWnd = 0; + this->itemParamChangeDisplayWnd = 0; this->window_0230 = nullptr; - this->unknown_0234 = 0; - this->unknown_0238 = 0; - this->unknown_023C = 0; - this->unknown_0240 = 0; - this->unknown_0244 = 0; - this->unknown_0248 = 0; - this->unknown_024C = 0; - this->unknown_0250 = 0; - this->unknown_0254 = 0; - this->unknown_0258 = 0; - this->unknown_025C = 0; - this->unknown_0260 = 0; - this->unknown_0264 = 0; - this->unknown_0268 = 0; - this->unknown_026C = 0; + this->quitWnd = 0; + this->restartWnd = 0; + this->cardItemIllustWnd = 0; + this->notifyLevelUpWnd = 0; + this->notifyJobLevelUpWnd = 0; + this->notifyQuestWnd = 0; + this->nCashCallWnd = 0; + this->itemShopWnd = 0; + this->itemShopWnd2 = 0; + this->itemPurchaseWnd = 0; + this->itemSellWnd = 0; + this->itemSellWnd2 = 0; + this->chooseSellBuyWnd = 0; + this->paraItemShopWnd = 0; + this->paraItemPurchaseWnd = 0; this->window_0274 = nullptr; this->window_0278 = nullptr; this->window_027C = nullptr; - this->unknown_0280 = 0; - this->unknown_0284 = 0; + this->passwordWnd = 0; + this->exchangeAcceptWnd = 0; this->window_0288 = nullptr; - this->unknown_028C[0] = 0; - this->unknown_028C[1] = 0; - this->unknown_028C[2] = 0; - this->unknown_028C[3] = 0; - this->unknown_028C[4] = 0; - this->unknown_028C[5] = 0; - this->unknown_028C[6] = 0; - this->unknown_02A8 = 0; - this->unknown_02AC = 0; + this->itemStoreTabWnds[0] = 0; + this->itemStoreTabWnds[1] = 0; + this->itemStoreTabWnds[2] = 0; + this->itemStoreTabWnds[3] = 0; + this->itemStoreTabWnds[4] = 0; + this->itemStoreTabWnds[5] = 0; + this->itemStoreTabWnds[6] = 0; + this->itemStoreLastTabWnd = 0; + this->itemStoreFindWnd = 0; this->window_02C4 = nullptr; this->window_02C8 = nullptr; - this->unknown_02CC = 0; - this->unknown_02D0 = 0; - this->unknown_02D4 = 0; - this->unknown_02D8 = 0; - this->unknown_02DC = 0; - this->unknown_02E0 = 0; - this->unknown_02E4 = 0; - this->unknown_02E8 = 0; - this->unknown_02EC = 0; + this->joinPartyAcceptWnd = 0; + this->coupleAcceptWnd = 0; + this->starPlaceAcceptWnd = 0; + this->mixAcceptWnd = 0; + this->yourItemWnd = 0; + this->babyAcceptWnd = 0; + this->babyAcceptWnd2 = 0; + this->joinGuildAcceptWnd = 0; + this->allyGuildAcceptWnd = 0; this->window_01E8 = nullptr; - this->unknown_02F0 = 0; - this->unknown_02F4 = 0; - this->unknown_02F8 = 0; - this->unknown_02FC = 0; - this->unknown_0300 = 0; - this->unknown_0308 = 0; - this->unknown_0304 = 0; + this->tipOfTheDayWnd = 0; + this->merchantItemWnd = 0; + this->merchantMirrorItemWnd = 0; + this->merchantShopMakeWnd = 0; + this->merchantItemShopWnd = 0; + this->merchantItemPurchaseWnd = 0; + this->merchantItemMyShopWnd = 0; this->window_03A4 = 0; - this->unknown_03A8 = 0; + this->compositionWnd = 0; this->window_03AC = 0; - this->unknown_030C = 0; - this->unknown_0310 = 0; - this->unknown_0314 = 0; - this->unknown_0318 = 0; - this->unknown_031C = 0; + this->partySettingWnd = 0; + this->skillNameChangeWnd = 0; + this->npcEditDialogWnd = 0; + this->npcTextEditDialogWnd = 0; + this->notifyItemObtainWnd = 0; this->window_0320 = nullptr; this->window_0324 = nullptr; - this->unknown_0328 = 0; + this->guildPositionManageWnd = 0; this->window_032C = nullptr; - this->unknown_0330 = 0; - this->unknown_0334 = 0; - this->unknown_0338 = 0; - this->unknown_033C = 0; - this->unknown_0340 = 0; - this->unknown_0344 = 0; - this->unknown_0348 = 0; - this->unknown_034C[0] = 0; - this->unknown_034C[1] = 0; - this->unknown_034C[2] = 0; - this->unknown_034C[3] = 0; - this->unknown_034C[4] = 0; - this->unknown_034C[5] = 0; - this->unknown_034C[6] = 0; - this->unknown_034C[7] = 0; - this->unknown_034C[8] = 0; - this->unknown_034C[9] = 0; + this->guildBanishedMemberWnd = 0; + this->guildNoticeWnd = 0; + this->guildTotalInfoWnd = 0; + this->friendOptionWnd = 0; + this->guildLeaveReasonDescWnd = 0; + this->guildBanReasonDescWnd = 0; + this->illustWnd = 0; + this->multiIllustWnds[0] = 0; + this->multiIllustWnds[1] = 0; + this->multiIllustWnds[2] = 0; + this->multiIllustWnds[3] = 0; + this->multiIllustWnds[4] = 0; + this->multiIllustWnds[5] = 0; + this->multiIllustWnds[6] = 0; + this->multiIllustWnds[7] = 0; + this->multiIllustWnds[8] = 0; + this->multiIllustWnds[9] = 0; this->window_038C = nullptr; - this->unknown_0390 = 0; - this->unknown_0394 = 0; - this->unknown_0200 = 0; - this->unknown_0398 = 0; - this->unknown_039C = 0; - this->unknown_0380 = 0; - this->unknown_0384 = 0; - this->unknown_03B0 = 0; - this->unknown_03B4 = 0; + this->petEggListWnd = 0; + this->petTamingDeceiveWnd = 0; + this->itemRepairWnd = 0; + this->makingArrowListWnd = 0; + this->selectCartWnd = 0; + this->emotionWnd = 0; + this->cashEmotionListWnd = 0; + this->bookWnd = 0; + this->joinFriendAcceptWnd = 0; this->window_03C0 = nullptr; this->window_03C4 = nullptr; this->window_03C8 = nullptr; this->window_03CC = nullptr; - this->unknown_03D0 = 0; - this->unknown_03B8 = 0; - this->unknown_03BC = 0; + this->autoMessageWnd = 0; + this->secondPasswordInputWnd = 0; + this->secondPasswordEditWnd = 0; this->window_03D4 = nullptr; this->window_03D8 = nullptr; - this->unknown_03E0 = 0; - this->unknown_03E4 = 0; - this->unknown_03E8 = 0; - this->unknown_03F0 = 0; - this->unknown_03EC = 0; - this->unknown_03F8 = 0; - this->unknown_03FC = 0; + this->rebirthWnd = 0; + this->subChatHistoryWnd = 0; + this->secondSubChatHistoryWnd = 0; + this->subChatMiniWnd = 0; + this->battleMsgOptionWnd = 0; + this->memorialDunWnd = 0; + this->otherEquipWnd = 0; this->modal = 0; - this->unknown_0404 = 0; - this->unknown_0408 = 0; - this->unknown_040C = 0; - this->unknown_0410 = 0; - this->unknown_0414 = 0; - this->unknown_0418 = 0; - this->unknown_041C = 0; - this->unknown_0424 = 0; + this->hotkeyWnd = 0; + this->escOptionWnd = 0; + this->buyingShopMakeWnd = 0; + this->buyingShopMirrorItemWnd = 0; + this->buyingShopMyItemsWnd = 0; + this->buyingShopItemsWnd = 0; + this->buyingShopPurchaseWnd = 0; + this->monsterDisplayWnd = 0; this->retainedWindows.clear(); - this->unknown_02B0 = 0; - this->unknown_02B4 = 0; - this->unknown_02B8 = 0; - this->unknown_02BC = 0; - this->unknown_02C0 = 0; + this->seekPartyWnd = 0; + this->seekPartyMessageWnd = 0; + this->jobListWnd = 0; + this->seekPartyListWnd = 0; + this->partyBookingHelpWnd = 0; this->window_4F18C = nullptr; this->window_4F164 = nullptr; this->unknown_01D8 = 0; @@ -803,22 +803,22 @@ void UIWindowMgr::ResetWindows() { this->window_0448 = nullptr; this->messageBoxes.clear(); this->window_044C = nullptr; - this->unknown_0204 = 0; - this->unknown_0378 = 0; - this->unknown_0374 = 0; + this->weaponRefineWnd = 0; + this->makeTargetProcessWnd = 0; + this->makeTargetListWnd = 0; this->window_4F170 = nullptr; - this->unknown_0450 = 0; - this->unknown_0454 = 0; - this->unknown_0458 = 0; - this->unknown_045C = 0; - this->unknown_0430 = 0; - this->unknown_0434 = 0; - this->unknown_0438 = 0; - this->unknown_0460 = 0; - this->unknown_0464 = 0; + this->openMailBoxWnd = 0; + this->rodexInboxWnd = 0; + this->rodexComposeWnd = 0; + this->rodexContentsWnd = 0; + this->guildHelperWnd = 0; + this->guildTipWnd = 0; + this->createGuildWnd = 0; + this->openRoulletteWnd = 0; + this->roulletteWnd = 0; this->hiddenWindows.clear(); const bool hadWindow0270 = this->window_0270 != nullptr; - this->unknown_0508 = 0; + this->windowVisibilityState = 0; this->window_4F1CC = nullptr; this->window_4F1D0 = nullptr; this->window_4F1D4 = nullptr; @@ -832,7 +832,7 @@ void UIWindowMgr::ResetWindows() { this->window_01CC = nullptr; this->window_0468 = nullptr; this->window_4F25C = nullptr; - this->unknown_042C = 0; + this->partyInvitationToWnd = 0; this->window_4F260 = nullptr; this->window_4F264 = nullptr; this->window_4F268 = nullptr; @@ -841,10 +841,10 @@ void UIWindowMgr::ResetWindows() { this->window_4F274 = nullptr; this->window_4F278 = nullptr; this->window_4F27C = nullptr; - this->unknown_0420 = 0; - this->unknown_043C = 0; + this->purchaseMirrorItemWnd = 0; + this->createGuildAlternateWnd = 0; this->window_01D0 = nullptr; - this->unknown_0224 = 0; + this->combinedCardItemCollectionComparisonWnd = 0; if (hadWindow0270) { if (CMode* mode = g_modeMgr.GetGameMode()) { mode->SendMsg(MM_NPC_MARKET_CLOSE, 0, 0, 0, 0); @@ -852,9 +852,9 @@ void UIWindowMgr::ResetWindows() { } const bool hadWindow276 = this->window_4F1E4 != nullptr; this->window_0270 = nullptr; - this->unknown_037C = 0; + this->makeTargetResultWnd = 0; this->window_0388 = nullptr; - this->unknown_03A0 = 0; + this->spellListWnd = 0; if (hadWindow276) { this->visible_276 = 0; this->window_4F1E4 = nullptr; @@ -867,49 +867,49 @@ void UIWindowMgr::ResetWindows() { // OFFSET: 0x00A88490 // FUNCTION: fn_17086 UIWindowMgr::UIWindowMgr() - : activeWindowId(0), retainedPersistentWindow(false), window_03DC(nullptr), unknown_046C(-1), unknown_0470(-1), unknown_0526(true), - window_0A30(nullptr), unknown_4F210(false), unknown_4F211(false), window_4F2AC(nullptr) { + : activeWindowId(0), retainedPersistentWindow(false), window_03DC(nullptr), previousMouseX(-1), previousMouseY(-1), unknown_0526(true), + window_0A30(nullptr), macroReporterVisible(false), unknown_4F211(false), window_4F2AC(nullptr) { this->ResetWindows(); - this->unknown_0478 = nullptr; - this->unknown_047C = 0; - this->unknown_0480 = 0; - this->unknown_04DC.assign("", 0); - this->unknown_004C = 1; - this->unknown_0038 = 98; - this->unknown_0030 = 0; - this->unknown_0034 = 0; - this->unknown_003C = 1; - this->unknown_0050 = 1.0f; - this->unknown_0054 = 1; - this->unknown_005C = 0xAAFFFFFFu; - this->unknown_0060 = 1; + this->backgroundSurface = nullptr; + this->screenWidth = 0; + this->screenHeight = 0; + this->chatInputText.assign("", 0); + this->chatWndStatus = 1; + this->chatWndHeight = 98; + this->chatWndX = 0; + this->chatWndY = 0; + this->chatWndVisible = 1; + this->minimapZoom = 1.0f; + this->minimapMarkersVisible = 1; + this->minimapColor = 0xAAFFFFFFu; + this->drawCompass = 1; this->unknown_04F8 = 0; this->unknown_04F4 = 0; - this->unknown_04FC = 0; - this->unknown_03F4 = 1; - this->unknown_03F6 = 0; - this->unknown_0068 = g_language == 2; - this->unknown_0048 = 0; - this->unknown_049C = 0; + this->framesInvalidated = 0; + this->chatWndStickOn = 1; + this->battleSubChatEnabled = 0; + this->compactCompositionLayout = g_language == 2; + this->skillDescriptionVisible = 0; + this->loginGridX = 0; if (g_serviceType == 0) { - this->unknown_049E = -25; + this->loginGridY = -25; } else { - this->unknown_049E = 0; + this->loginGridY = 0; } - this->unknown_04A0 = {}; - this->unknown_04A4 = {}; - this->unknown_04A8 = {}; - this->unknown_04AC = {}; - this->unknown_04B0 = 0; - this->unknown_04B4 = 203; - this->unknown_04B8 = 115; - this->unknown_04BC = 0; - this->unknown_04C0 = 0; + this->loginSidePanelOffset = {}; + this->loginBottomPanelOffset = {}; + this->loginButtonPanelOffset = {}; + this->loginExtraPanelOffset = {}; + this->loginDragRegion = 0; + this->gradeImageWidth = 203; + this->gradeImageHeight = 115; + this->gradeImageX = 0; + this->gradeImageY = 0; this->windowHistory.clear(); this->lastWindowId = -1; this->inputSuggestionsEnabled = 0; this->chatModeChanged = 1; - this->unknown_0508 = 0; + this->windowVisibilityState = 0; this->window_4F168 = nullptr; this->window_4F164 = nullptr; this->window_4F16C = nullptr; @@ -922,15 +922,15 @@ UIWindowMgr::UIWindowMgr() this->visible_276 = 0; this->window_4F1EC = nullptr; this->window_4F250 = nullptr; - this->unknown_0058 = 0; - this->unknown_4F238 = 151; - this->unknown_4F23C = 37; + this->itemStoreWindowCount = 0; + this->miniPartyWidth = 151; + this->miniPartyHeight = 37; } // OFFSET: 0x007375E0 // FUNCTION: fn_07649 __declspec(noinline) CMiniPartyWndAreaMgr::CMiniPartyWndAreaMgr() { - SetRect(&this->area, 0, 0, g_windowMgr.unknown_047C, g_windowMgr.unknown_0480); + SetRect(&this->area, 0, 0, g_windowMgr.screenWidth, g_windowMgr.screenHeight); } // OFFSET: 0x00AA66D0 @@ -1021,9 +1021,9 @@ void UIWindowMgr::ClearMapWindows() { continue; } - if (window == reinterpret_cast(this->unknown_03F8) && g_session.unknown_593C != 0) { - g_session.unknown_5940 = window->geometry.x; - g_session.unknown_5944 = window->geometry.y; + if (window == reinterpret_cast(this->memorialDunWnd) && g_session.memorialWindowOpen != 0) { + g_session.memorialWindowX = window->geometry.x; + g_session.memorialWindowY = window->geometry.y; } if (!this->modalWindows.empty() && this->modalWindows.back()) { @@ -1068,16 +1068,16 @@ void UIWindowMgr::ClearMapWindows() { } std::uint32_t saved03E4 = 0; - if (this->unknown_03E4) { - saved03E4 = this->unknown_03E4; + if (this->subChatHistoryWnd) { + saved03E4 = this->subChatHistoryWnd; } std::uint32_t saved03E8 = 0; - if (this->unknown_03E8) { - saved03E8 = this->unknown_03E8; + if (this->secondSubChatHistoryWnd) { + saved03E8 = this->secondSubChatHistoryWnd; } std::uint32_t saved03F0 = 0; - if (this->unknown_03F0) { - saved03F0 = this->unknown_03F0; + if (this->subChatMiniWnd) { + saved03F0 = this->subChatMiniWnd; } UIWindow* saved01C8 = nullptr; if (this->window_01C8) { @@ -1087,9 +1087,9 @@ void UIWindowMgr::ClearMapWindows() { std::map savedWindows(this->retainedWindows); this->ResetWindows(); this->window_01C8 = saved01C8; - this->unknown_03E4 = saved03E4; - this->unknown_03F0 = saved03F0; - this->unknown_03E8 = saved03E8; + this->subChatHistoryWnd = saved03E4; + this->subChatMiniWnd = saved03F0; + this->secondSubChatHistoryWnd = saved03E8; this->retainedWindows = savedWindows; for (UIWindow*& window : this->snapExcluded) { @@ -1111,9 +1111,9 @@ UIWindowMgr::~UIWindowMgr() { } this->Shutdown(); - if (this->unknown_0478) { - delete this->unknown_0478; - this->unknown_0478 = nullptr; + if (this->backgroundSurface) { + delete this->backgroundSurface; + this->backgroundSurface = nullptr; } for (auto& entry : this->savedRectangles) { delete entry.second; @@ -1430,12 +1430,12 @@ static_assert(sizeof(ReplaySettingHeader) == 6); // OFFSET: 0x00AA80A0 // FUNCTION: fn_17240 void UIWindowMgr::CenterSurface0478() { - this->unknown_04FC = 0; - if (this->unknown_0478) { - int x = static_cast(GetRenderSystemHolder()->Width() - this->unknown_047C) / 2; - int height = this->unknown_0480; + this->framesInvalidated = 0; + if (this->backgroundSurface) { + int x = static_cast(GetRenderSystemHolder()->Width() - this->screenWidth) / 2; + int height = this->screenHeight; int y = static_cast(GetRenderSystemHolder()->Height() - height) / 2; - reinterpret_cast(this->unknown_0478)->Stretch(x, y, this->unknown_047C, height); + reinterpret_cast(this->backgroundSurface)->Stretch(x, y, this->screenWidth, height); } } @@ -1453,7 +1453,7 @@ std::vector UIWindowMgr::SaveReplaySettings() { std::vector chunk(10); *reinterpret_cast(&chunk[0]) = 25010; *reinterpret_cast(&chunk[2]) = 4; - *reinterpret_cast(&chunk[6]) = this->unknown_0064; + *reinterpret_cast(&chunk[6]) = this->dragAllItems; data.insert(data.end(), chunk.begin(), chunk.end()); } { @@ -1487,16 +1487,16 @@ std::vector UIWindowMgr::SaveReplayReserved() { // OFFSET: 0x00AA8980 // FUNCTION: fn_17245 void UIWindowMgr::ApplyReplayOptions(const ReplayOptions& options) { - this->unknown_05A4 = 0; - this->unknown_0588 = 0; - this->unknown_0568 = 0; - this->unknown_054C = 0; - this->unknown_073C = 0; - this->unknown_077C = 0; - this->unknown_05BC = 0; - this->unknown_05D0 = 0; - this->m_normalItemSlotWindow.show = options.unknown_0007; - this->unknown_003C = options.recordRestricted; + this->equipWndVisible = 0; + this->statusWndVisible = 0; + this->questWndVisible = 0; + this->itemWndVisible = 0; + this->messengerGroupWndVisible = 0; + this->skillListWndVisible = 0; + this->optionWndVisible = 0; + this->shortenItemWndVisible = 0; + this->m_normalItemSlotWindow.show = options.showItemSlots; + this->chatWndVisible = options.recordRestricted; } // OFFSET: 0x00AA8B20 @@ -1519,7 +1519,7 @@ int UIWindowMgr::LoadReplaySettings(const std::vector& data) { break; } if (header.tag == 25010) { - std::memcpy(&this->unknown_0064, data.data() + offset, header.size); + std::memcpy(&this->dragAllItems, data.data() + offset, header.size); } offset += header.size; } @@ -1555,24 +1555,24 @@ int UIWindowMgr::LoadReplayReserved(const std::vector& data) { // OFFSET: 0x00AA55C0 // FUNCTION: fn_17223 bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { - this->unknown_0025 = 1; + this->imeInputActive = 1; if (g_modeMgr.GetGameMode() == nullptr) { return this->ProcessHotkeyAction(key, pressed); } if (this->LookupWindow(WID_HOTKEYWND) != nullptr) { - this->unknown_0025 = 0; + this->imeInputActive = 0; } else if (!this->inputSuggestionsEnabled) { UIWindow* hover = this->hoverWindow; UIWindow* parent = hover ? hover->parent : nullptr; if (!hover || !parent || parent == this->window_01C8 || !parent->geometry.visible) { - this->unknown_0025 = 0; + this->imeInputActive = 0; } } int action = this->TranslateHotkey(key, keyData); - if (this->unknown_0404 != nullptr) { - static_cast(this->unknown_0404)->AssignSelectedHotkey(action); + if (this->hotkeyWnd != nullptr) { + static_cast(this->hotkeyWnd)->AssignSelectedHotkey(action); return false; } @@ -1651,7 +1651,7 @@ bool UIWindowMgr::ProcessKeyDown(int key, int keyData, int pressed) { return this->ProcessHotkeyAction(key, pressed); } if (this->IsHoverParentVisible() || this->IsHoverOnWindow01C8Button()) { - this->unknown_0025 = 1; + this->imeInputActive = 1; } return true; } @@ -1663,7 +1663,7 @@ void UIWindowMgr::SendEmotionHotkey(int index) { const EmotionHotkeys* emotions = &g_session.m_emotionHotkeys; std::strcpy(text, emotions->current[index].c_str()); - if (g_windowMgr.unknown_01DC != nullptr) { + if (g_windowMgr.basicInfoWnd != nullptr) { const bool linked = HasTextLinks(std::string(text)); if (linked) { g_windowMgr.Confirm(LookupMessage(MSI_UNDEAD_MONSTERINFO), 0, true, false, 0, "Message", 280, 120, 0); @@ -1678,15 +1678,15 @@ void UIWindowMgr::SendEmotionHotkey(int index) { int talkType; const int offset = g_session.GetTalkType(text, &talkType, parts); if (offset != -1) { - g_windowMgr.unknown_04DC = text + offset; + g_windowMgr.chatInputText = text + offset; } g_modeMgr.gameMode->SendMsg(MM_PROCESS_TALK_TYPE, talkType, reinterpret_cast(parts), 0, 0); } return; } - g_windowMgr.unknown_04DC = text; - const int& chatTarget = *reinterpret_cast(&g_session.unknown_5490[0x8]); + g_windowMgr.chatInputText = text; + const int& chatTarget = *reinterpret_cast(&g_session.itemSendState[0x8]); if (chatTarget == 2) { if (g_guildInfo.m_guildId != 0) { mode->SendMsg(MM_CHAT_GUILD, 0, 0, 0, 0); @@ -1717,10 +1717,10 @@ void UIWindowMgr::CycleWindowVisibility(int) { it = next; } - const int state = this->unknown_0508; + const int state = this->windowVisibilityState; if (state == 0) { - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); } if (this->hiddenWindows.size() == 0) { for (std::list::iterator it = this->rendered.begin(); it != this->rendered.end(); ++it) { @@ -1729,7 +1729,7 @@ void UIWindowMgr::CycleWindowVisibility(int) { } } } - this->unknown_0508 = 1; + this->windowVisibilityState = 1; } else if (state == 1) { bool closed = false; for (std::list::iterator it = this->rendered.begin(); it != this->rendered.end(); ++it) { @@ -1745,8 +1745,8 @@ void UIWindowMgr::CycleWindowVisibility(int) { } } if (closed) { - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); } return; } @@ -1761,14 +1761,14 @@ void UIWindowMgr::CycleWindowVisibility(int) { CPlayer* player = static_cast(g_modeMgr.GetGameMode())->scene->player; if (player) { player->SendMsg(nullptr, AM_DELETE_EFFECT, 0, 164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - player->unknown_0544 = 0; + player->skillEffect = 0; } - this->unknown_0508 = 2; + this->windowVisibilityState = 2; } else if (state == 2) { bool closed = false; for (std::list::iterator it = this->rendered.begin(); it != this->rendered.end(); ++it) { if (*it != reinterpret_cast(static_cast(g_modeMgr.GetGameMode())->EnsureBroadcastBalloon()) && - *it != static_cast(g_modeMgr.GetGameMode())->unknown_05FC && (*it)->geometry.visible) { + *it != static_cast(g_modeMgr.GetGameMode())->achievementBalloon && (*it)->geometry.visible) { UIWindow* window = *it; if (std::find(this->hiddenWindows.begin(), this->hiddenWindows.end(), window) != this->hiddenWindows.end()) { window->Show(0); @@ -1780,8 +1780,8 @@ void UIWindowMgr::CycleWindowVisibility(int) { } if (closed) { this->ShowWindows189(0); - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 222, 0, 0, 0); } return; } @@ -1795,11 +1795,11 @@ void UIWindowMgr::CycleWindowVisibility(int) { } } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (mode && mode->unknown_0254 == 1) { + if (mode && mode->canRotateView == 1) { this->EnsureWindow(WID_MINIMAPZOOMWND); } static_cast(g_modeMgr.GetGameMode())->scene->player->RefreshEffect164(); - this->unknown_0508 = 1; + this->windowVisibilityState = 1; } } @@ -1914,7 +1914,7 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: for (unsigned int index = 0; index < lines.size(); ++index) { std::string line; line = lines[index]; - this->unknown_04C4.push_back({line, color}); + this->pendingNoticeLines.push_back({line, color}); } } else { if (color == 0) { @@ -1927,8 +1927,8 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: break; } case UIM_LOADINGPERCENT: - if (this->unknown_01BC != nullptr) { - this->unknown_01BC->SendMsg(nullptr, UM_LOADINGPERCENT, a, 0, 0, 0); + if (this->loadingWnd != nullptr) { + this->loadingWnd->SendMsg(nullptr, UM_LOADINGPERCENT, a, 0, 0, 0); } break; case UIM_OPENCHATWND: @@ -1957,7 +1957,7 @@ int UIWindowMgr::SendNotice(int selector, std::intptr_t a, std::intptr_t b, std: // FUNCTION: fn_17252 __declspec(noinline) void UIWindowMgr::BroadcastMessage21() { UIWindow* window = this->window_03DC; - if (window || (window = this->unknown_03B0) != nullptr) { + if (window || (window = this->bookWnd) != nullptr) { window->SendMsg(nullptr, UM_RIGHTPUSH, 0, 0, 0, 0); return; } @@ -1992,7 +1992,7 @@ __declspec(noinline) bool UIWindowMgr::HasModalWindow() { // OFFSET: 0x00A8BC00 // FUNCTION: fn_17128 int UIWindowMgr::TranslateHotkey(int key, int keyData) { - if (!this->modalWindows.empty() && this->modalWindows.back() && this->unknown_0404) { + if (!this->modalWindows.empty() && this->modalWindows.back() && this->hotkeyWnd) { return 1; } @@ -2158,7 +2158,7 @@ void __fastcall RefreshPartyWindows(CSession* session); // FUNCTION: fn_17132 void UIWindowMgr::CloseMiniPartyWindow(int id) { g_session.EraseRecord0734(id); - this->unknown_4F248.push_back(id); + this->closedMiniPartyIds.push_back(id); RefreshPartyWindows(&g_session); } @@ -2175,9 +2175,9 @@ bool UIWindowMgr::ProcessEnterKey() { return true; } - UIWindow* window = this->unknown_0234; + UIWindow* window = this->quitWnd; if (window == nullptr) { - window = this->unknown_0314; + window = this->npcEditDialogWnd; if (window != nullptr) { if (Replay::Instance().state == 2) { window->RecordEditTexts(); @@ -2185,7 +2185,7 @@ bool UIWindowMgr::ProcessEnterKey() { window->SendMsg(nullptr, UM_DEFPUSH, 0, 0, 0, 0); return true; } - window = this->unknown_0318; + window = this->npcTextEditDialogWnd; if (window != nullptr) { if (Replay::Instance().state == 2) { window->RecordEditTexts(); @@ -2193,31 +2193,31 @@ bool UIWindowMgr::ProcessEnterKey() { window->SendMsg(nullptr, UM_DEFPUSH, 0, 0, 0, 0); return true; } - window = this->unknown_01F8; + window = this->choose3Wnd; if (window == nullptr) { - window = this->unknown_01F0; + window = this->sayDialogWnd; } if (window == nullptr) { - window = this->unknown_01F4; + window = this->sayDialogOverlayWnd; } if (window == nullptr) { - window = this->unknown_0214; + window = this->comboBoxWnd; } if (window == nullptr) { - window = this->unknown_021C; + window = this->comboBoxIDWnd; if (window != nullptr) { window->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0); return true; } - window = this->unknown_020C; + window = this->chooseWarpWnd; if (window == nullptr) { - window = this->unknown_0374; + window = this->makeTargetListWnd; } if (window == nullptr) { - window = this->unknown_0378; + window = this->makeTargetProcessWnd; } if (window == nullptr) { - window = this->unknown_030C; + window = this->partySettingWnd; } if (window == nullptr) { if (this->hoverWindow != nullptr) { @@ -2329,80 +2329,80 @@ void UIWindowMgr::DrawLoginOverlay() { char name[256]; if (CTexture* grade = g_texMgr.Load("유저인터페이스\\\0_GameGrade.tga", 0, false, true, false)) { - this->unknown_04B4 = grade->Width(); - this->unknown_04B8 = grade->Height(); + this->gradeImageWidth = grade->Width(); + this->gradeImageHeight = grade->Height(); } - int gradeLeft = this->unknown_04BC; + int gradeLeft = this->gradeImageX; if (gradeLeft == 0) { - gradeLeft = g_renderer->viewport.width - this->unknown_04B4 - 10; - this->unknown_04BC = gradeLeft; + gradeLeft = g_renderer->viewport.width - this->gradeImageWidth - 10; + this->gradeImageX = gradeLeft; } - int gradeTop = this->unknown_04C0; + int gradeTop = this->gradeImageY; if (gradeTop == 0) { - this->unknown_04C0 = 10; + this->gradeImageY = 10; gradeTop = 10; } if (g_mouse.buttons[0] == 1) { if (!this->inputWindow) { - this->unknown_04B0 = 0; - if (g_mouse.x > gradeLeft && g_mouse.x < this->unknown_04B4 + gradeLeft && g_mouse.y > gradeTop && g_mouse.y < this->unknown_04B8 + gradeTop) { - this->unknown_04B0 = 3; + this->loginDragRegion = 0; + if (g_mouse.x > gradeLeft && g_mouse.x < this->gradeImageWidth + gradeLeft && g_mouse.y > gradeTop && g_mouse.y < this->gradeImageHeight + gradeTop) { + this->loginDragRegion = 3; } const float columns = static_cast(quarter); const float mouseX = static_cast(g_mouse.x); - if (mouseX > columns * 3.3f + this->unknown_04A8.x && mouseX < columns * 3.9f + this->unknown_04A8.x && - static_cast(g_mouse.y) > static_cast(third) * 2.4f + this->unknown_04A8.y && - static_cast(g_mouse.y) < static_cast(third) * 2.8f + this->unknown_04A8.y) { - this->unknown_04B0 = 2; + if (mouseX > columns * 3.3f + this->loginButtonPanelOffset.x && mouseX < columns * 3.9f + this->loginButtonPanelOffset.x && + static_cast(g_mouse.y) > static_cast(third) * 2.4f + this->loginButtonPanelOffset.y && + static_cast(g_mouse.y) < static_cast(third) * 2.8f + this->loginButtonPanelOffset.y) { + this->loginDragRegion = 2; } - if (static_cast(g_mouse.x) > columns * 0.1f + this->unknown_049C && static_cast(g_mouse.x) < columns * 1.8f + this->unknown_049C && - static_cast(g_mouse.y) > static_cast(third) * 0.3f + this->unknown_049E && - static_cast(g_mouse.y) < static_cast(third) * 1.2f + this->unknown_049E) { - this->unknown_04B0 = 1; + if (static_cast(g_mouse.x) > columns * 0.1f + this->loginGridX && static_cast(g_mouse.x) < columns * 1.8f + this->loginGridX && + static_cast(g_mouse.y) > static_cast(third) * 0.3f + this->loginGridY && + static_cast(g_mouse.y) < static_cast(third) * 1.2f + this->loginGridY) { + this->loginDragRegion = 1; } - if (g_serviceType != 0 && static_cast(g_startupSecondPhase) > 0 && static_cast(g_mouse.x) > columns * 2.2f + this->unknown_04A0.x && - static_cast(g_mouse.x) < columns * 3.5f + this->unknown_04A0.x && g_mouse.y > this->unknown_04A0.y && - g_mouse.y < this->unknown_04A0.y + third * 3) { - this->unknown_04B0 = 5; + if (g_serviceType != 0 && static_cast(g_startupSecondPhase) > 0 && static_cast(g_mouse.x) > columns * 2.2f + this->loginSidePanelOffset.x && + static_cast(g_mouse.x) < columns * 3.5f + this->loginSidePanelOffset.x && g_mouse.y > this->loginSidePanelOffset.y && + g_mouse.y < this->loginSidePanelOffset.y + third * 3) { + this->loginDragRegion = 5; } - if (static_cast(g_mouse.y) > static_cast(third) * 2.7f + this->unknown_04A4.x && - static_cast(g_mouse.y) < static_cast(third) * 3.0f + this->unknown_04A4.x) { - this->unknown_04B0 = 4; + if (static_cast(g_mouse.y) > static_cast(third) * 2.7f + this->loginBottomPanelOffset.x && + static_cast(g_mouse.y) < static_cast(third) * 3.0f + this->loginBottomPanelOffset.x) { + this->loginDragRegion = 4; } } } if (g_mouse.buttons[0] == 2 && !this->inputWindow) { - if (this->unknown_04B0 == 1) { - this->unknown_049C += static_cast(g_mouse.deltaX); - this->unknown_049E += static_cast(g_mouse.deltaY); - } else if (this->unknown_04B0 == 2) { - this->unknown_04A8.x += static_cast(g_mouse.deltaX); - this->unknown_04A8.y += static_cast(g_mouse.deltaY); - } else if (this->unknown_04B0 == 3) { - this->unknown_04BC += g_mouse.deltaX; - this->unknown_04C0 += g_mouse.deltaY; - } else if (this->unknown_04B0 == 6) { - this->unknown_04AC.x += static_cast(g_mouse.deltaX); - this->unknown_04AC.y += static_cast(g_mouse.deltaY); - } else if (this->unknown_04B0 == 4) { - if (this->unknown_04A4.x + g_mouse.deltaY >= 0) { - this->unknown_04A4.x += static_cast(g_mouse.deltaY); + if (this->loginDragRegion == 1) { + this->loginGridX += static_cast(g_mouse.deltaX); + this->loginGridY += static_cast(g_mouse.deltaY); + } else if (this->loginDragRegion == 2) { + this->loginButtonPanelOffset.x += static_cast(g_mouse.deltaX); + this->loginButtonPanelOffset.y += static_cast(g_mouse.deltaY); + } else if (this->loginDragRegion == 3) { + this->gradeImageX += g_mouse.deltaX; + this->gradeImageY += g_mouse.deltaY; + } else if (this->loginDragRegion == 6) { + this->loginExtraPanelOffset.x += static_cast(g_mouse.deltaX); + this->loginExtraPanelOffset.y += static_cast(g_mouse.deltaY); + } else if (this->loginDragRegion == 4) { + if (this->loginBottomPanelOffset.x + g_mouse.deltaY >= 0) { + this->loginBottomPanelOffset.x += static_cast(g_mouse.deltaY); } - } else if (this->unknown_04B0 == 5) { + } else if (this->loginDragRegion == 5) { if (g_serviceType == 0) { - if (this->unknown_04A0.x + g_mouse.deltaX >= 0) { - this->unknown_04A0.x += static_cast(g_mouse.deltaX); + if (this->loginSidePanelOffset.x + g_mouse.deltaX >= 0) { + this->loginSidePanelOffset.x += static_cast(g_mouse.deltaX); } } else { - this->unknown_04A0.x += static_cast(g_mouse.deltaX); + this->loginSidePanelOffset.x += static_cast(g_mouse.deltaX); } } } @@ -2420,31 +2420,31 @@ void UIWindowMgr::DrawLoginOverlay() { rect.left = x; x += step; rect.right = x; - rect.bottom = static_cast(this->unknown_04A4.x + static_cast(third) * 3.0f); - rect.top = static_cast(this->unknown_04A4.x + static_cast(third) * 2.5f); - this->unknown_04A4.y = static_cast(rect.top); + rect.bottom = static_cast(this->loginBottomPanelOffset.x + static_cast(third) * 3.0f); + rect.top = static_cast(this->loginBottomPanelOffset.x + static_cast(third) * 2.5f); + this->loginBottomPanelOffset.y = static_cast(rect.top); std::sprintf(name, "유저인터페이스\\\0_테입%d.tga", tape); g_modeMgr.GetGameMode()->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load(name, 0, false, true, false), region); } - rect.left = this->unknown_04BC; - rect.top = this->unknown_04C0; - rect.right = this->unknown_04B4 + this->unknown_04BC; - rect.bottom = this->unknown_04B8 + this->unknown_04C0; + rect.left = this->gradeImageX; + rect.top = this->gradeImageY; + rect.right = this->gradeImageWidth + this->gradeImageX; + rect.bottom = this->gradeImageHeight + this->gradeImageY; g_modeMgr.GetGameMode()->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load("유저인터페이스\\\0_GameGrade.tga", 0, false, true, false), region); - rect.left = static_cast(this->unknown_04A8.x + static_cast(step) * 3.1f); + rect.left = static_cast(this->loginButtonPanelOffset.x + static_cast(step) * 3.1f); rect.right = step + rect.left; - rect.top = static_cast(this->unknown_04A8.y + static_cast(third) * 2.4f); + rect.top = static_cast(this->loginButtonPanelOffset.y + static_cast(third) * 2.4f); const float half = static_cast(third) * 0.5f; rect.bottom = static_cast(static_cast(rect.top) + half); g_modeMgr.GetGameMode()->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load("유저인터페이스\\\0_중력성인.tga", 0, false, true, false), region); char row = -2; - for (int column = this->unknown_049C; column < this->unknown_049C + step * 2; column += step) { + for (int column = this->loginGridX; column < this->loginGridX + step * 2; column += step) { ++row; - int y = static_cast(this->unknown_049E + static_cast(third) * 0.1f); - if (this->unknown_049E + (static_cast(third) + static_cast(third)) > static_cast(y)) { + int y = static_cast(this->loginGridY + static_cast(third) * 0.1f); + if (this->loginGridY + (static_cast(third) + static_cast(third)) > static_cast(y)) { const int left = static_cast(static_cast(step) * 0.05f + column); char index = row; do { @@ -2461,7 +2461,7 @@ void UIWindowMgr::DrawLoginOverlay() { } std::sprintf(name, "유저인터페이스\\\0_R%d.tga", index); g_modeMgr.GetGameMode()->DrawTexture(rect, 0, 0.0999f, 0xFFFFFFFF, g_texMgr.Load(name, 0, false, true, false), region); - } while (this->unknown_049E + (static_cast(third) + static_cast(third)) > static_cast(y)); + } while (this->loginGridY + (static_cast(third) + static_cast(third)) > static_cast(y)); } } } @@ -2484,7 +2484,7 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { break; } - if (this->unknown_03D0 != 0) { + if (this->autoMessageWnd != 0) { g_windowToggleFlag = false; } @@ -2520,7 +2520,7 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { } if (this->HasModalWindow()) { - this->unknown_0474 = 188; + this->modalResponse = 188; return false; } @@ -2566,10 +2566,10 @@ bool UIWindowMgr::ProcessHotkeyAction(int action, int pressed) { if (this->CloseWindow(id) == true) { return false; } - } else if (g_navigationManager.unknown_1258 == 2) { + } else if (g_navigationManager.viewMode == 2) { if (g_windowMgr.Confirm(LookupMessage(MSI_NAVIGATION_HELP2), 2, true, false, 0, "Message", 280, 120, 0) == 187) { - g_navigationManager.unknown_125C = 0; - g_navigationManager.unknown_1254 = false; + g_navigationManager.displayMode = 0; + g_navigationManager.expandedMap = false; g_navigationManager.Reset(true); g_worldViewMgr.ClearMarks(); g_worldViewMgr.ClearLevels(); @@ -2766,23 +2766,23 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_01C8); this->window_01C8 = nullptr; closed = true; - this->unknown_003C = 0; + this->chatWndVisible = 0; } break; case WID_BASICINFOWND: - if (this->unknown_01DC) { - this->Schedule(this->unknown_01DC); - this->unknown_01DC = nullptr; + if (this->basicInfoWnd) { + this->Schedule(this->basicInfoWnd); + this->basicInfoWnd = nullptr; closed = true; } break; case WID_ITEMWND: - if (this->unknown_01D4) { - static_cast(this->unknown_01D4)->ReleaseSelection(0); - this->Schedule(this->unknown_01D4); - this->unknown_01D4 = nullptr; + if (this->itemWnd) { + static_cast(this->itemWnd)->ReleaseSelection(0); + this->Schedule(this->itemWnd); + this->itemWnd = nullptr; closed = true; - this->unknown_054C = 0; + this->itemWndVisible = 0; } break; case WID_RUNESYSTEMWND: @@ -2800,29 +2800,29 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_EQUIPWND: - if (this->unknown_01E0) { - this->Schedule(this->unknown_01E0); - this->unknown_01E0 = nullptr; + if (this->equipWnd) { + this->Schedule(this->equipWnd); + this->equipWnd = nullptr; closed = true; - this->unknown_05A4 = 0; + this->equipWndVisible = 0; g_savedWindowCloseValue = g_windowCloseValue; } break; case WID_NCASHWND: - if (this->unknown_01E4) { - this->Schedule(this->unknown_01E4); - this->unknown_01E4 = nullptr; + if (this->nCashWnd) { + this->Schedule(this->nCashWnd); + this->nCashWnd = nullptr; closed = true; } break; case WID_STATUSWND: - if (this->unknown_01C4) { - if (reinterpret_cast(this->unknown_01C4) > 8) { - this->Schedule(this->unknown_01C4); + if (this->statusWnd) { + if (reinterpret_cast(this->statusWnd) > 8) { + this->Schedule(this->statusWnd); } - this->unknown_01C4 = nullptr; + this->statusWnd = nullptr; closed = true; - this->unknown_0588 = 0; + this->statusWndVisible = 0; } break; case WID_ITEMDROPCNTWND: @@ -2833,16 +2833,16 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_SAYDIALOGWND_OVERLAY: - if (this->unknown_01F4) { - this->Schedule(this->unknown_01F4); - this->unknown_01F4 = nullptr; + if (this->sayDialogOverlayWnd) { + this->Schedule(this->sayDialogOverlayWnd); + this->sayDialogOverlayWnd = nullptr; closed = true; } break; case WID_SAYDIALOGWND: - if (this->unknown_01F0) { - this->Schedule(this->unknown_01F0); - this->unknown_01F0 = nullptr; + if (this->sayDialogWnd) { + this->Schedule(this->sayDialogWnd); + this->sayDialogWnd = nullptr; closed = true; } break; @@ -2854,51 +2854,51 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CHOOSEWARPWND: - if (this->unknown_020C) { - this->Schedule(this->unknown_020C); - this->unknown_020C = nullptr; + if (this->chooseWarpWnd) { + this->Schedule(this->chooseWarpWnd); + this->chooseWarpWnd = nullptr; closed = true; } break; case WID_CHOOSEWND: - if (this->unknown_01F8) { - this->Schedule(this->unknown_01F8); - this->unknown_01F8 = nullptr; + if (this->choose3Wnd) { + this->Schedule(this->choose3Wnd); + this->choose3Wnd = nullptr; closed = true; } break; case WID_ITEMCOMPOSITIONWND: - if (this->unknown_0208) { - this->Schedule(this->unknown_0208); - this->unknown_0208 = nullptr; + if (this->itemCompositionWnd) { + this->Schedule(this->itemCompositionWnd); + this->itemCompositionWnd = nullptr; closed = true; } break; case WID_ITEMIDENTIFYWND: - if (this->unknown_01FC) { - this->Schedule(this->unknown_01FC); - this->unknown_01FC = nullptr; + if (this->itemIdentifyWnd) { + this->Schedule(this->itemIdentifyWnd); + this->itemIdentifyWnd = nullptr; closed = true; } break; case WID_COMBOBOXWND: - if (this->unknown_0214) { - this->Schedule(this->unknown_0214); - this->unknown_0214 = nullptr; + if (this->comboBoxWnd) { + this->Schedule(this->comboBoxWnd); + this->comboBoxWnd = nullptr; closed = true; } break; case WID_COMBOBOXIDWND: - if (this->unknown_021C) { - this->Schedule(this->unknown_021C); - this->unknown_021C = nullptr; + if (this->comboBoxIDWnd) { + this->Schedule(this->comboBoxIDWnd); + this->comboBoxIDWnd = nullptr; closed = true; } break; case WID_MENUWND: - if (this->unknown_0210) { - this->Schedule(this->unknown_0210); - this->unknown_0210 = nullptr; + if (this->menuWnd) { + this->Schedule(this->menuWnd); + this->menuWnd = nullptr; closed = true; } break; @@ -2917,83 +2917,83 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_CHOOSESELLBUYWND: - if (this->unknown_0264) { + if (this->chooseSellBuyWnd) { g_modeMgr.gameMode->SendMsg(MM_NPC_TRADE_QUIT, 0, 0, 0, 0); - this->Schedule(this->unknown_0264); - this->unknown_0264 = nullptr; + this->Schedule(this->chooseSellBuyWnd); + this->chooseSellBuyWnd = nullptr; closed = true; } break; case WID_ITEMSELLWND: - if (this->unknown_025C) { + if (this->itemSellWnd) { g_modeMgr.gameMode->SendMsg(MM_NPC_TRADE_QUIT, 0, 0, 0, 0); - this->Schedule(this->unknown_025C); - this->unknown_025C = nullptr; + this->Schedule(this->itemSellWnd); + this->itemSellWnd = nullptr; closed = true; } break; case WID_ITEMSELLWND2: - if (this->unknown_0260) { - this->Schedule(this->unknown_0260); - this->unknown_0260 = nullptr; + if (this->itemSellWnd2) { + this->Schedule(this->itemSellWnd2); + this->itemSellWnd2 = nullptr; closed = true; } break; case WID_MERCHANTITEMPURCHASEWND: - if (this->unknown_0308) { - this->Schedule(this->unknown_0308); - this->unknown_0308 = nullptr; + if (this->merchantItemPurchaseWnd) { + this->Schedule(this->merchantItemPurchaseWnd); + this->merchantItemPurchaseWnd = nullptr; closed = true; } break; case WID_ITEMPURCHASEWND: - if (this->unknown_0258) { + if (this->itemPurchaseWnd) { g_modeMgr.gameMode->SendMsg(MM_NPC_TRADE_QUIT, 0, 0, 0, 0); - this->Schedule(this->unknown_0258); - this->unknown_0258 = nullptr; + this->Schedule(this->itemPurchaseWnd); + this->itemPurchaseWnd = nullptr; closed = true; } break; case WID_MERCHANTITEMMYSHOPWND: - if (this->unknown_0304) { - this->Schedule(this->unknown_0304); - this->unknown_0304 = nullptr; + if (this->merchantItemMyShopWnd) { + this->Schedule(this->merchantItemMyShopWnd); + this->merchantItemMyShopWnd = nullptr; closed = true; } break; case WID_MERCHANTITEMSHOPWND: - if (this->unknown_0300) { - this->Schedule(this->unknown_0300); - this->unknown_0300 = nullptr; + if (this->merchantItemShopWnd) { + this->Schedule(this->merchantItemShopWnd); + this->merchantItemShopWnd = nullptr; closed = true; } break; case WID_ITEMSHOPWND: - if (this->unknown_0250) { - this->Schedule(this->unknown_0250); - this->unknown_0250 = nullptr; + if (this->itemShopWnd) { + this->Schedule(this->itemShopWnd); + this->itemShopWnd = nullptr; closed = true; } break; case WID_ITEMSHOPWND2: - if (this->unknown_0254) { - this->Schedule(this->unknown_0254); - this->unknown_0254 = nullptr; + if (this->itemShopWnd2) { + this->Schedule(this->itemShopWnd2); + this->itemShopWnd2 = nullptr; closed = true; } break; case WID_PARAITEMSHOPWND: - if (this->unknown_0268) { - this->Schedule(this->unknown_0268); - this->unknown_0268 = nullptr; + if (this->paraItemShopWnd) { + this->Schedule(this->paraItemShopWnd); + this->paraItemShopWnd = nullptr; closed = true; } break; case WID_PARAITEMPURCHASEWND: - if (this->unknown_026C) { + if (this->paraItemPurchaseWnd) { this->NotifyMode(); - this->Schedule(this->unknown_026C); - this->unknown_026C = nullptr; + this->Schedule(this->paraItemPurchaseWnd); + this->paraItemPurchaseWnd = nullptr; closed = true; } break; @@ -3046,58 +3046,58 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_NOTIFYJOBLEVELUPWND: - if (this->unknown_0244) { - this->Schedule(this->unknown_0244); - this->unknown_0244 = nullptr; + if (this->notifyJobLevelUpWnd) { + this->Schedule(this->notifyJobLevelUpWnd); + this->notifyJobLevelUpWnd = nullptr; closed = true; } break; case WID_NOTIFYLEVELUPWND: - if (this->unknown_0240) { - this->Schedule(this->unknown_0240); - this->unknown_0240 = nullptr; + if (this->notifyLevelUpWnd) { + this->Schedule(this->notifyLevelUpWnd); + this->notifyLevelUpWnd = nullptr; closed = true; } break; case WID_NOTIFYQUESTWND: - if (this->unknown_0248) { - this->Schedule(this->unknown_0248); - this->unknown_0248 = nullptr; + if (this->notifyQuestWnd) { + this->Schedule(this->notifyQuestWnd); + this->notifyQuestWnd = nullptr; closed = true; } break; case WID_NCASH_CALLWND: - if (this->unknown_024C) { - this->Schedule(this->unknown_024C); - this->unknown_024C = nullptr; + if (this->nCashCallWnd) { + this->Schedule(this->nCashCallWnd); + this->nCashCallWnd = nullptr; closed = true; } break; case WID_CARDITEMILLUSTWND: - if (this->unknown_023C) { - this->Schedule(this->unknown_023C); - this->unknown_023C = nullptr; + if (this->cardItemIllustWnd) { + this->Schedule(this->cardItemIllustWnd); + this->cardItemIllustWnd = nullptr; closed = true; } break; case WID_MONSTERDISPLAYWND: - if (this->unknown_0424) { - this->Schedule(this->unknown_0424); - this->unknown_0424 = nullptr; + if (this->monsterDisplayWnd) { + this->Schedule(this->monsterDisplayWnd); + this->monsterDisplayWnd = nullptr; closed = true; } break; case WID_RESTARTWND: - if (this->unknown_0238) { - this->Schedule(this->unknown_0238); - this->unknown_0238 = nullptr; + if (this->restartWnd) { + this->Schedule(this->restartWnd); + this->restartWnd = nullptr; closed = true; } break; case WID_QUITWND: - if (this->unknown_0234) { - this->Schedule(this->unknown_0234); - this->unknown_0234 = nullptr; + if (this->quitWnd) { + this->Schedule(this->quitWnd); + this->quitWnd = nullptr; closed = true; } break; @@ -3106,54 +3106,54 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_0230); this->window_0230 = nullptr; closed = true; - this->unknown_0048 = 0; + this->skillDescriptionVisible = 0; } break; case WID_ITEMPARAMCHANGEDISPLAYWND: - if (this->unknown_022C) { - this->Schedule(this->unknown_022C); - this->unknown_022C = nullptr; + if (this->itemParamChangeDisplayWnd) { + this->Schedule(this->itemParamChangeDisplayWnd); + this->itemParamChangeDisplayWnd = nullptr; closed = true; } break; case WID_COMBINEDCARDITEMCOLLECTIONWND: - if (this->unknown_0228) { - this->Schedule(this->unknown_0228); - this->unknown_0228 = nullptr; + if (this->combinedCardItemCollectionWnd) { + this->Schedule(this->combinedCardItemCollectionWnd); + this->combinedCardItemCollectionWnd = nullptr; closed = true; } break; case WID_ITEMCOLLECTIONWND: - if (this->unknown_0218) { - this->Schedule(this->unknown_0218); + if (this->itemCollectionWnd) { + this->Schedule(this->itemCollectionWnd); closed = true; - this->unknown_0218 = nullptr; - if (this->unknown_0220) { + this->itemCollectionWnd = nullptr; + if (this->itemCollectionComparisonWnd) { this->CloseWindow(WID_ITEMCOLLECTION_COMPARISONWND); } } break; case WID_ITEMCOLLECTION_COMPARISONWND: - if (this->unknown_0220) { - this->Schedule(this->unknown_0220); + if (this->itemCollectionComparisonWnd) { + this->Schedule(this->itemCollectionComparisonWnd); closed = true; - this->unknown_0220 = nullptr; - if (this->unknown_0218) { + this->itemCollectionComparisonWnd = nullptr; + if (this->itemCollectionWnd) { this->CloseWindow(WID_ITEMCOLLECTIONWND); } } break; case WID_COMBINEDCARDITEMCOLLECTION_COMPARISONWND: - if (this->unknown_0224) { - this->Schedule(this->unknown_0224); - this->unknown_0224 = nullptr; + if (this->combinedCardItemCollectionComparisonWnd) { + this->Schedule(this->combinedCardItemCollectionComparisonWnd); + this->combinedCardItemCollectionComparisonWnd = nullptr; closed = true; } break; case WID_MINIMAPZOOMWND: - if (this->unknown_01C0) { - this->Schedule(this->unknown_01C0); - this->unknown_01C0 = nullptr; + if (this->minimapZoomWnd) { + this->Schedule(this->minimapZoomWnd); + this->minimapZoomWnd = nullptr; closed = true; } break; @@ -3166,7 +3166,7 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_02C4); this->window_02C4 = nullptr; closed = true; - this->unknown_077C = 0; + this->skillListWndVisible = 0; } break; case WID_ITEMSTOREWND: @@ -3187,7 +3187,7 @@ bool UIWindowMgr::CloseWindow(int id) { if (this->window_02C8) { this->Schedule(this->window_02C8); this->window_02C8 = nullptr; - this->unknown_073C = 0; + this->messengerGroupWndVisible = 0; g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT); g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND); g_windowMgr.DismissTransient(); @@ -3196,25 +3196,25 @@ bool UIWindowMgr::CloseWindow(int id) { break; case WID_MERCHANTSHOPMAKEWND: this->CloseWindow(WID_MERCHANTMIRRORITEMWND); - if (this->unknown_02FC) { - this->Schedule(this->unknown_02FC); - this->unknown_02FC = nullptr; + if (this->merchantShopMakeWnd) { + this->Schedule(this->merchantShopMakeWnd); + this->merchantShopMakeWnd = nullptr; closed = true; } break; case WID_MERCHANTMIRRORITEMWND: - if (this->unknown_02F8) { - this->Schedule(reinterpret_cast(this->unknown_02F8)); - this->unknown_02F8 = 0; + if (this->merchantMirrorItemWnd) { + this->Schedule(reinterpret_cast(this->merchantMirrorItemWnd)); + this->merchantMirrorItemWnd = 0; closed = true; } break; case WID_MERCHANTITEMWND: - if (this->unknown_02F4) { - this->Schedule(this->unknown_02F4); - this->unknown_02F4 = nullptr; + if (this->merchantItemWnd) { + this->Schedule(this->merchantItemWnd); + this->merchantItemWnd = nullptr; closed = true; - this->unknown_0790 = 0; + this->merchantItemWndVisible = 0; } break; case WID_CANDIDATEWND: @@ -3225,66 +3225,66 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_COMPOSITIONWND: - if (this->unknown_03A8) { - this->Schedule(this->unknown_03A8); - this->unknown_03A8 = nullptr; + if (this->compositionWnd) { + this->Schedule(this->compositionWnd); + this->compositionWnd = nullptr; closed = true; } break; case WID_NOTIFYITEMOBTAINWND: - if (this->unknown_031C) { - this->Schedule(this->unknown_031C); - this->unknown_031C = nullptr; + if (this->notifyItemObtainWnd) { + this->Schedule(this->notifyItemObtainWnd); + this->notifyItemObtainWnd = nullptr; closed = true; } break; case WID_NPCEDITDIALOGWND: - if (this->unknown_0314) { - this->Schedule(this->unknown_0314); - this->unknown_0314 = nullptr; + if (this->npcEditDialogWnd) { + this->Schedule(this->npcEditDialogWnd); + this->npcEditDialogWnd = nullptr; closed = true; } break; case WID_NPCTEXTEDITDIALOGWND: - if (this->unknown_0318) { - this->Schedule(this->unknown_0318); - this->unknown_0318 = nullptr; + if (this->npcTextEditDialogWnd) { + this->Schedule(this->npcTextEditDialogWnd); + this->npcTextEditDialogWnd = nullptr; closed = true; } break; case WID_SKILLNAMECHANGEWND: - if (this->unknown_0310) { - this->Schedule(this->unknown_0310); - this->unknown_0310 = nullptr; + if (this->skillNameChangeWnd) { + this->Schedule(this->skillNameChangeWnd); + this->skillNameChangeWnd = nullptr; closed = true; } break; case WID_GUILDHELPERWND: - if (this->unknown_0430) { - this->unknown_0430->StoreInfo(); - this->Schedule(this->unknown_0430); - this->unknown_0430 = nullptr; + if (this->guildHelperWnd) { + this->guildHelperWnd->StoreInfo(); + this->Schedule(this->guildHelperWnd); + this->guildHelperWnd = nullptr; closed = true; } break; case WID_GUILDTIPWND: - if (this->unknown_0434) { - this->Schedule(this->unknown_0434); - this->unknown_0434 = nullptr; + if (this->guildTipWnd) { + this->Schedule(this->guildTipWnd); + this->guildTipWnd = nullptr; closed = true; } break; case WID_CREATEGUILDWND_MODE_0: - if (this->unknown_0438) { - this->Schedule(this->unknown_0438); - this->unknown_0438 = nullptr; + if (this->createGuildWnd) { + this->Schedule(this->createGuildWnd); + this->createGuildWnd = nullptr; closed = true; } break; case WID_CREATEGUILDWND_MODE_1: - if (this->unknown_043C) { - this->Schedule(this->unknown_043C); - this->unknown_043C = nullptr; + if (this->createGuildAlternateWnd) { + this->Schedule(this->createGuildAlternateWnd); + this->createGuildAlternateWnd = nullptr; closed = true; } break; @@ -3298,7 +3298,7 @@ bool UIWindowMgr::CloseWindow(int id) { const bool closed65 = g_windowMgr.CloseWindow(WID_GUILDNOTICEWND); const bool closed66 = g_windowMgr.CloseWindow(WID_GUILDTOTALINFOWND); closed = closed60 || closed61 || closed62 || closed63 || closed64 || closed65 || closed66; - if (g_windowMgr.unknown_0214) { + if (g_windowMgr.comboBoxWnd) { g_windowMgr.CloseWindow(WID_COMBOBOXWND); } break; @@ -3312,10 +3312,10 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_GUILDPOSITIONMANAGEWND: - if (this->unknown_0328) { - this->unknown_0328->StoreInfo(); - this->Schedule(this->unknown_0328); - this->unknown_0328 = nullptr; + if (this->guildPositionManageWnd) { + this->guildPositionManageWnd->StoreInfo(); + this->Schedule(this->guildPositionManageWnd); + this->guildPositionManageWnd = nullptr; closed = true; } break; @@ -3328,26 +3328,26 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_GUILDBANISHEDMEMBERWND: - if (this->unknown_0330) { - this->unknown_0330->StoreInfo(); - this->Schedule(this->unknown_0330); - this->unknown_0330 = nullptr; + if (this->guildBanishedMemberWnd) { + this->guildBanishedMemberWnd->StoreInfo(); + this->Schedule(this->guildBanishedMemberWnd); + this->guildBanishedMemberWnd = nullptr; closed = true; } break; case WID_GUILDNOTICEWND: - if (this->unknown_0334) { - this->unknown_0334->StoreInfo(); - this->Schedule(this->unknown_0334); - this->unknown_0334 = nullptr; + if (this->guildNoticeWnd) { + this->guildNoticeWnd->StoreInfo(); + this->Schedule(this->guildNoticeWnd); + this->guildNoticeWnd = nullptr; closed = true; } break; case WID_GUILDTOTALINFOWND: - if (this->unknown_0338) { - this->unknown_0338->StoreInfo(); - this->Schedule(this->unknown_0338); - this->unknown_0338 = nullptr; + if (this->guildTotalInfoWnd) { + this->guildTotalInfoWnd->StoreInfo(); + this->Schedule(this->guildTotalInfoWnd); + this->guildTotalInfoWnd = nullptr; closed = true; } break; @@ -3360,51 +3360,51 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_ILLUSTWND: - if (this->unknown_0348) { - this->Schedule(this->unknown_0348); - this->unknown_0348 = nullptr; + if (this->illustWnd) { + this->Schedule(this->illustWnd); + this->illustWnd = nullptr; closed = true; } break; case WID_MULTIILLUSTWND_SLOT_0: case WID_MULTIILLUSTWND_SLOT_1: case WID_MULTIILLUSTWND_SLOT_2: case WID_MULTIILLUSTWND_SLOT_3: case WID_MULTIILLUSTWND_SLOT_4: case WID_MULTIILLUSTWND_SLOT_5: case WID_MULTIILLUSTWND_SLOT_6: case WID_MULTIILLUSTWND_SLOT_7: case WID_MULTIILLUSTWND_SLOT_8: case WID_MULTIILLUSTWND_SLOT_9: - if (this->unknown_034C[id - 216]) { - this->Schedule(this->unknown_034C[id - 216]); - this->unknown_034C[id - 216] = nullptr; + if (this->multiIllustWnds[id - 216]) { + this->Schedule(this->multiIllustWnds[id - 216]); + this->multiIllustWnds[id - 216] = nullptr; closed = true; } break; case WID_GUILDBANREASONDESCWND: - if (this->unknown_0344) { - this->Schedule(this->unknown_0344); - this->unknown_0344 = nullptr; + if (this->guildBanReasonDescWnd) { + this->Schedule(this->guildBanReasonDescWnd); + this->guildBanReasonDescWnd = nullptr; closed = true; } break; case WID_GUILDLEAVEREASONDESCWND: - if (this->unknown_0340) { - this->Schedule(this->unknown_0340); - this->unknown_0340 = nullptr; + if (this->guildLeaveReasonDescWnd) { + this->Schedule(this->guildLeaveReasonDescWnd); + this->guildLeaveReasonDescWnd = nullptr; closed = true; } break; case WID_FRIENDOPTIONWND: - if (this->unknown_033C) { - this->Schedule(this->unknown_033C); - this->unknown_033C = nullptr; + if (this->friendOptionWnd) { + this->Schedule(this->friendOptionWnd); + this->friendOptionWnd = nullptr; closed = true; } break; case WID_PARTYSETTINGWND_PARTYCOUNT: - if (this->unknown_030C) { - this->Schedule(this->unknown_030C); - this->unknown_030C = nullptr; + if (this->partySettingWnd) { + this->Schedule(this->partySettingWnd); + this->partySettingWnd = nullptr; closed = true; } break; case WID_PARTYINVITATIONTOWND: - if (this->unknown_042C) { - this->Schedule(this->unknown_042C); - this->unknown_042C = nullptr; + if (this->partyInvitationToWnd) { + this->Schedule(this->partyInvitationToWnd); + this->partyInvitationToWnd = nullptr; closed = true; } break; @@ -3413,117 +3413,117 @@ bool UIWindowMgr::CloseWindow(int id) { closed = true; break; case WID_TIPOFTHEDAYWND: - if (this->unknown_02F0) { - this->Schedule(this->unknown_02F0); - this->unknown_02F0 = nullptr; + if (this->tipOfTheDayWnd) { + this->Schedule(this->tipOfTheDayWnd); + this->tipOfTheDayWnd = nullptr; closed = true; } break; case WID_JOINGUILDACCEPTWND: - if (this->unknown_02E8) { - this->Schedule(this->unknown_02E8); - this->unknown_02E8 = nullptr; + if (this->joinGuildAcceptWnd) { + this->Schedule(this->joinGuildAcceptWnd); + this->joinGuildAcceptWnd = nullptr; closed = true; } break; case WID_ALLYGUILDACCEPTWND: - if (this->unknown_02EC) { - this->Schedule(this->unknown_02EC); - this->unknown_02EC = nullptr; + if (this->allyGuildAcceptWnd) { + this->Schedule(this->allyGuildAcceptWnd); + this->allyGuildAcceptWnd = nullptr; closed = true; } break; case WID_JOINPARTYACCEPTWND: - if (this->unknown_02CC) { - this->Schedule(this->unknown_02CC); - this->unknown_02CC = nullptr; + if (this->joinPartyAcceptWnd) { + this->Schedule(this->joinPartyAcceptWnd); + this->joinPartyAcceptWnd = nullptr; closed = true; } break; case WID_COUPLEACCEPTWND: - if (this->unknown_02D0) { - this->Schedule(this->unknown_02D0); - this->unknown_02D0 = nullptr; + if (this->coupleAcceptWnd) { + this->Schedule(this->coupleAcceptWnd); + this->coupleAcceptWnd = nullptr; closed = true; } break; case WID_STARPLACEACCEPTWND: - if (this->unknown_02D4) { - this->Schedule(this->unknown_02D4); - this->unknown_02D4 = nullptr; + if (this->starPlaceAcceptWnd) { + this->Schedule(this->starPlaceAcceptWnd); + this->starPlaceAcceptWnd = nullptr; closed = true; } break; case WID_MIXACCEPTWND: - if (this->unknown_02D8) { - this->Schedule(this->unknown_02D8); - this->unknown_02D8 = nullptr; + if (this->mixAcceptWnd) { + this->Schedule(this->mixAcceptWnd); + this->mixAcceptWnd = nullptr; closed = true; } break; case WID_YOURITEMWND: - if (this->unknown_02DC) { - this->Schedule(this->unknown_02DC); - this->unknown_02DC = nullptr; + if (this->yourItemWnd) { + this->Schedule(this->yourItemWnd); + this->yourItemWnd = nullptr; closed = true; } break; case WID_BABYACCEPTWND: - if (this->unknown_02E0) { - this->Schedule(this->unknown_02E0); - this->unknown_02E0 = nullptr; + if (this->babyAcceptWnd) { + this->Schedule(this->babyAcceptWnd); + this->babyAcceptWnd = nullptr; closed = true; } break; case WID_BABYACCEPTWND2: - if (this->unknown_02E4) { - this->Schedule(this->unknown_02E4); - this->unknown_02E4 = nullptr; + if (this->babyAcceptWnd2) { + this->Schedule(this->babyAcceptWnd2); + this->babyAcceptWnd2 = nullptr; closed = true; } break; case WID_EXCHANGEACCEPTWND: - if (this->unknown_0284) { - this->Schedule(this->unknown_0284); - this->unknown_0284 = nullptr; + if (this->exchangeAcceptWnd) { + this->Schedule(this->exchangeAcceptWnd); + this->exchangeAcceptWnd = nullptr; closed = true; } break; case WID_PASSWORDWND: - if (this->unknown_0280) { - this->Schedule(this->unknown_0280); - this->unknown_0280 = nullptr; + if (this->passwordWnd) { + this->Schedule(this->passwordWnd); + this->passwordWnd = nullptr; closed = true; } break; case WID_MAKETARGETLISTWND: - if (this->unknown_0374) { - this->Schedule(this->unknown_0374); - this->unknown_0374 = nullptr; + if (this->makeTargetListWnd) { + this->Schedule(this->makeTargetListWnd); + this->makeTargetListWnd = nullptr; } break; case WID_ITEMREPAIRWND: - if (this->unknown_0200) { - this->Schedule(this->unknown_0200); - this->unknown_0200 = nullptr; + if (this->itemRepairWnd) { + this->Schedule(this->itemRepairWnd); + this->itemRepairWnd = nullptr; } break; case WID_WEAPONREFINEWND: - if (this->unknown_0204) { - this->Schedule(this->unknown_0204); - this->unknown_0204 = nullptr; + if (this->weaponRefineWnd) { + this->Schedule(this->weaponRefineWnd); + this->weaponRefineWnd = nullptr; } break; case WID_MAKETARGETPROCESSWND: - if (this->unknown_0378) { - this->Schedule(this->unknown_0378); - this->unknown_0378 = nullptr; + if (this->makeTargetProcessWnd) { + this->Schedule(this->makeTargetProcessWnd); + this->makeTargetProcessWnd = nullptr; } break; case WID_MAKETARGETRESULTWND: - if (this->unknown_037C) { - this->Schedule(this->unknown_037C); - this->unknown_037C = nullptr; + if (this->makeTargetResultWnd) { + this->Schedule(this->makeTargetResultWnd); + this->makeTargetResultWnd = nullptr; } break; case WID_KEYSTROKEWND: @@ -3533,16 +3533,16 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_EMOTIONWND: - if (this->unknown_0380) { - this->Schedule(this->unknown_0380); - this->unknown_0380 = nullptr; + if (this->emotionWnd) { + this->Schedule(this->emotionWnd); + this->emotionWnd = nullptr; closed = true; } break; case WID_CASHEMOTIONLISTWND: - if (this->unknown_0384) { - this->Schedule(this->unknown_0384); - this->unknown_0384 = nullptr; + if (this->cashEmotionListWnd) { + this->Schedule(this->cashEmotionListWnd); + this->cashEmotionListWnd = nullptr; closed = true; } break; @@ -3554,38 +3554,38 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_PETEGGLISTWND: - if (this->unknown_0390) { - this->Schedule(this->unknown_0390); - this->unknown_0390 = nullptr; + if (this->petEggListWnd) { + this->Schedule(this->petEggListWnd); + this->petEggListWnd = nullptr; closed = true; g_modeMgr.gameMode->SendMsg(MM_PETEGG_SELECT_FROM_LIST, -1, 0, 0, 0); } break; case WID_PETTAMINGDECEIVEWND: - if (this->unknown_0394) { - this->Schedule(this->unknown_0394); - this->unknown_0394 = nullptr; + if (this->petTamingDeceiveWnd) { + this->Schedule(this->petTamingDeceiveWnd); + this->petTamingDeceiveWnd = nullptr; closed = true; } break; case WID_MAKINGARROWLISTWND: - if (this->unknown_0398) { - this->Schedule(this->unknown_0398); - this->unknown_0398 = nullptr; + if (this->makingArrowListWnd) { + this->Schedule(this->makingArrowListWnd); + this->makingArrowListWnd = nullptr; closed = true; } break; case WID_SELECTCARTWND: - if (this->unknown_039C) { - this->Schedule(this->unknown_039C); - this->unknown_039C = nullptr; + if (this->selectCartWnd) { + this->Schedule(this->selectCartWnd); + this->selectCartWnd = nullptr; closed = true; } break; case WID_SPELLLISTWND: - if (this->unknown_03A0) { - this->Schedule(this->unknown_03A0); - this->unknown_03A0 = nullptr; + if (this->spellListWnd) { + this->Schedule(this->spellListWnd); + this->spellListWnd = nullptr; closed = true; } break; @@ -3597,30 +3597,30 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_BOOKWND: - if (this->unknown_03B0) { - this->Schedule(this->unknown_03B0); - this->unknown_03B0 = nullptr; + if (this->bookWnd) { + this->Schedule(this->bookWnd); + this->bookWnd = nullptr; closed = true; } break; case WID_JOINFRIENDACCEPTWND: - if (this->unknown_03B4) { - this->Schedule(this->unknown_03B4); - this->unknown_03B4 = nullptr; + if (this->joinFriendAcceptWnd) { + this->Schedule(this->joinFriendAcceptWnd); + this->joinFriendAcceptWnd = nullptr; closed = true; } break; case WID_SECONDPASSWORDINPUTWND: - if (this->unknown_03B8) { - this->Schedule(this->unknown_03B8); - this->unknown_03B8 = nullptr; + if (this->secondPasswordInputWnd) { + this->Schedule(this->secondPasswordInputWnd); + this->secondPasswordInputWnd = nullptr; closed = true; } break; case WID_SECONDPASSWORDEDITWND: - if (this->unknown_03BC) { - this->Schedule(this->unknown_03BC); - this->unknown_03BC = nullptr; + if (this->secondPasswordEditWnd) { + this->Schedule(this->secondPasswordEditWnd); + this->secondPasswordEditWnd = nullptr; closed = true; } break; @@ -3636,7 +3636,7 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_03C4); this->window_03C4 = nullptr; closed = true; - this->unknown_08EC = 0; + this->homunculusSkillWndVisible = 0; } break; case WID_MERINFOWND: @@ -3676,13 +3676,13 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_03CC); this->window_03CC = nullptr; closed = true; - this->unknown_0910 = 0; + this->mercenarySkillWndVisible = 0; } break; case WID_AUTOMESSAGEWND: - if (this->unknown_03D0) { - this->Schedule(this->unknown_03D0); - this->unknown_03D0 = nullptr; + if (this->autoMessageWnd) { + this->Schedule(this->autoMessageWnd); + this->autoMessageWnd = nullptr; closed = true; } break; @@ -3694,55 +3694,55 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_REBIRTHWND: - if (this->unknown_03E0) { - this->Schedule(this->unknown_03E0); - this->unknown_03E0 = nullptr; + if (this->rebirthWnd) { + this->Schedule(this->rebirthWnd); + this->rebirthWnd = nullptr; closed = true; } break; case WID_SUBCHATHISWND_UNKNOWN_03E4: - if (this->unknown_03E4) { - reinterpret_cast(this->unknown_03E4)->StoreInfo(); - this->Schedule(reinterpret_cast(this->unknown_03E4)); - this->unknown_03E4 = 0; + if (this->subChatHistoryWnd) { + reinterpret_cast(this->subChatHistoryWnd)->StoreInfo(); + this->Schedule(reinterpret_cast(this->subChatHistoryWnd)); + this->subChatHistoryWnd = 0; closed = true; } break; case WID_SUBCHATHISWND_UNKNOWN_03E8: - if (this->unknown_03E8) { - reinterpret_cast(this->unknown_03E8)->StoreInfo(); - this->Schedule(reinterpret_cast(this->unknown_03E8)); - this->unknown_03E8 = 0; + if (this->secondSubChatHistoryWnd) { + reinterpret_cast(this->secondSubChatHistoryWnd)->StoreInfo(); + this->Schedule(reinterpret_cast(this->secondSubChatHistoryWnd)); + this->secondSubChatHistoryWnd = 0; closed = true; } break; case WID_BATTLEMSGOPTIONWND: - if (this->unknown_03EC) { - this->Schedule(this->unknown_03EC); - this->unknown_03EC = nullptr; + if (this->battleMsgOptionWnd) { + this->Schedule(this->battleMsgOptionWnd); + this->battleMsgOptionWnd = nullptr; closed = true; } break; case WID_SUBCHATMINIWND: - if (this->unknown_03F0) { - this->Schedule(reinterpret_cast(this->unknown_03F0)); - this->unknown_03F0 = 0; + if (this->subChatMiniWnd) { + this->Schedule(reinterpret_cast(this->subChatMiniWnd)); + this->subChatMiniWnd = 0; closed = true; } break; case WID_MEMORIALDUNWND: - if (this->unknown_03F8) { - static_cast(this->unknown_03F8)->ResetDungeonInfo(); - this->Schedule(this->unknown_03F8); - this->unknown_03F8 = nullptr; + if (this->memorialDunWnd) { + static_cast(this->memorialDunWnd)->ResetDungeonInfo(); + this->Schedule(this->memorialDunWnd); + this->memorialDunWnd = nullptr; closed = true; - g_session.unknown_593C = 0; + g_session.memorialWindowOpen = 0; } break; case WID_EQUIPWND_VIEWOTHER_1: - if (this->unknown_03FC) { - this->Schedule(this->unknown_03FC); - this->unknown_03FC = nullptr; + if (this->otherEquipWnd) { + this->Schedule(this->otherEquipWnd); + this->otherEquipWnd = nullptr; closed = true; } break; @@ -3752,15 +3752,15 @@ bool UIWindowMgr::CloseWindow(int id) { this->modal = nullptr; closed = true; if (this->window_4F174) { - g_navigationManager.unknown_1248 = false; + g_navigationManager.hideWindow = false; static_cast(this->window_4F174)->RefreshLayout(); } } break; case WID_ITEMSTORESUBWND_TAB_0: case WID_ITEMSTORESUBWND_TAB_1: case WID_ITEMSTORESUBWND_TAB_2: case WID_ITEMSTORESUBWND_TAB_3: case WID_ITEMSTORESUBWND_TAB_4: case WID_ITEMSTORESUBWND_TAB_5: case WID_ITEMSTORESUBWND_TAB_6: - if (this->unknown_028C[id - 146]) { - this->Schedule(this->unknown_028C[id - 146]); - this->unknown_028C[id - 146] = nullptr; + if (this->itemStoreTabWnds[id - 146]) { + this->Schedule(this->itemStoreTabWnds[id - 146]); + this->itemStoreTabWnds[id - 146] = nullptr; closed = true; if (this->window_0288) { static_cast(this->window_0288)->SetTabChecked(id - 146, false); @@ -3768,9 +3768,9 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_ITEMSTORESUBWND_TAB_7: - if (this->unknown_02A8) { - this->Schedule(this->unknown_02A8); - this->unknown_02A8 = nullptr; + if (this->itemStoreLastTabWnd) { + this->Schedule(this->itemStoreLastTabWnd); + this->itemStoreLastTabWnd = nullptr; closed = true; if (this->window_0288) { static_cast(this->window_0288)->SetTabChecked(7, false); @@ -3778,52 +3778,52 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_ITEMSTOREFINDWND: - if (this->unknown_02AC) { - this->Schedule(this->unknown_02AC); - this->unknown_02AC = nullptr; + if (this->itemStoreFindWnd) { + this->Schedule(this->itemStoreFindWnd); + this->itemStoreFindWnd = nullptr; closed = true; } break; case WID_PARTYBOOKINGHELPWND: - if (this->unknown_02C0) { - this->Schedule(this->unknown_02C0); - this->unknown_02C0 = nullptr; + if (this->partyBookingHelpWnd) { + this->Schedule(this->partyBookingHelpWnd); + this->partyBookingHelpWnd = nullptr; closed = true; } break; case WID_JOBLISTWND: - if (this->unknown_02B8) { - this->Schedule(this->unknown_02B8); - this->unknown_02B8 = nullptr; + if (this->jobListWnd) { + this->Schedule(this->jobListWnd); + this->jobListWnd = nullptr; closed = true; } break; case WID_SEEKPARTYWND: - if (this->unknown_02B0) { - this->Schedule(this->unknown_02B0); - this->unknown_02B0 = nullptr; + if (this->seekPartyWnd) { + this->Schedule(this->seekPartyWnd); + this->seekPartyWnd = nullptr; closed = true; g_session.m_partyBooking.unknown_0000 = 0; } break; case WID_SEEKPARTYMBWND: - if (this->unknown_02B4) { - this->Schedule(this->unknown_02B4); - this->unknown_02B4 = nullptr; + if (this->seekPartyMessageWnd) { + this->Schedule(this->seekPartyMessageWnd); + this->seekPartyMessageWnd = nullptr; closed = true; } break; case WID_SEEKPARTYLISTWND: - if (this->unknown_02BC) { - this->Schedule(this->unknown_02BC); - this->unknown_02BC = nullptr; + if (this->seekPartyListWnd) { + this->Schedule(this->seekPartyListWnd); + this->seekPartyListWnd = nullptr; closed = true; } break; case WID_ESCOPTIONWND: - if (this->unknown_0408) { - this->Schedule(this->unknown_0408); - this->unknown_0408 = nullptr; + if (this->escOptionWnd) { + this->Schedule(this->escOptionWnd); + this->escOptionWnd = nullptr; closed = true; } break; @@ -3832,8 +3832,8 @@ bool UIWindowMgr::CloseWindow(int id) { if (UIWindow* found = this->LookupWindow(id)) { switch (id) { case WID_HOTKEYWND: - this->Schedule(this->unknown_0404); - this->unknown_0404 = nullptr; + this->Schedule(this->hotkeyWnd); + this->hotkeyWnd = nullptr; break; case WID_JOINTO_BATTLEFIELDWND: case WID_RELOADLUASCRIPTWND: @@ -3863,44 +3863,44 @@ bool UIWindowMgr::CloseWindow(int id) { break; case WID_MERCHANTSHOPMAKEWND_MODE_1: this->CloseWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); - if (this->unknown_040C) { - this->Schedule(this->unknown_040C); - this->unknown_040C = nullptr; + if (this->buyingShopMakeWnd) { + this->Schedule(this->buyingShopMakeWnd); + this->buyingShopMakeWnd = nullptr; closed = true; } break; case WID_MERCHANTMIRRORITEMWND_MODE_1: - if (this->unknown_0410) { - this->Schedule(reinterpret_cast(this->unknown_0410)); - this->unknown_0410 = 0; + if (this->buyingShopMirrorItemWnd) { + this->Schedule(reinterpret_cast(this->buyingShopMirrorItemWnd)); + this->buyingShopMirrorItemWnd = 0; closed = true; } break; case WID_MERCHANTITEMMYSHOPWND_MODE_1: - if (this->unknown_0414) { - this->Schedule(this->unknown_0414); - this->unknown_0414 = nullptr; + if (this->buyingShopMyItemsWnd) { + this->Schedule(this->buyingShopMyItemsWnd); + this->buyingShopMyItemsWnd = nullptr; closed = true; } break; case WID_MERCHANTITEMSHOPWND_MODE_1: - if (this->unknown_0418) { - this->Schedule(this->unknown_0418); - this->unknown_0418 = nullptr; + if (this->buyingShopItemsWnd) { + this->Schedule(this->buyingShopItemsWnd); + this->buyingShopItemsWnd = nullptr; closed = true; } break; case WID_MERCHANTITEMPURCHASEWND_MODE_1: - if (this->unknown_041C) { - this->Schedule(this->unknown_041C); - this->unknown_041C = nullptr; + if (this->buyingShopPurchaseWnd) { + this->Schedule(this->buyingShopPurchaseWnd); + this->buyingShopPurchaseWnd = nullptr; closed = true; } break; case WID_MERCHANTMIRRORITEMWND_MODE_2: - if (this->unknown_0420) { - this->Schedule(reinterpret_cast(this->unknown_0420)); - this->unknown_0420 = 0; + if (this->purchaseMirrorItemWnd) { + this->Schedule(reinterpret_cast(this->purchaseMirrorItemWnd)); + this->purchaseMirrorItemWnd = 0; closed = true; } break; @@ -3934,40 +3934,40 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_OPENMAILBOXWND: - if (this->unknown_0450) { - this->Schedule(this->unknown_0450); - this->unknown_0450 = nullptr; + if (this->openMailBoxWnd) { + this->Schedule(this->openMailBoxWnd); + this->openMailBoxWnd = nullptr; closed = true; } break; case WID_RODEXINBOXWND: - if (this->unknown_0454) { + if (this->rodexInboxWnd) { std::int16_t packet = 0x9E9; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); - this->Schedule(this->unknown_0454); - this->unknown_0454 = nullptr; + this->Schedule(this->rodexInboxWnd); + this->rodexInboxWnd = nullptr; closed = true; - if (this->unknown_0450) { + if (this->openMailBoxWnd) { this->CloseWindow(WID_OPENMAILBOXWND); } } break; case WID_RODEXCOMPOSEWND: - if (this->unknown_0458) { + if (this->rodexComposeWnd) { std::int16_t packet = 0xA03; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); g_session.RestoreItems5C68(); g_session.ClearItemQuantities(); - this->Schedule(this->unknown_0458); - this->unknown_0458 = nullptr; + this->Schedule(this->rodexComposeWnd); + this->rodexComposeWnd = nullptr; closed = true; } break; case WID_RODEXCONTENTSWND: - if (this->unknown_045C) { + if (this->rodexContentsWnd) { g_session.ClearItemQuantities(); - this->Schedule(this->unknown_045C); - this->unknown_045C = nullptr; + this->Schedule(this->rodexContentsWnd); + this->rodexContentsWnd = nullptr; closed = true; } break; @@ -3979,19 +3979,19 @@ bool UIWindowMgr::CloseWindow(int id) { } break; case WID_OPENROULLETTEWND: - if (this->unknown_0460) { - this->Schedule(this->unknown_0460); - this->unknown_0460 = nullptr; + if (this->openRoulletteWnd) { + this->Schedule(this->openRoulletteWnd); + this->openRoulletteWnd = nullptr; closed = true; } break; case WID_ROULLETTEWND: - if (this->unknown_0464) { + if (this->roulletteWnd) { std::int16_t packet = 0xA1D; GetRagConnection().Send(g_packetLengths.FixedLength(packet), &packet); g_rouletteMgr->Reset(); - this->Schedule(this->unknown_0464); - this->unknown_0464 = nullptr; + this->Schedule(this->roulletteWnd); + this->roulletteWnd = nullptr; closed = true; } break; @@ -4044,7 +4044,7 @@ bool UIWindowMgr::CloseWindow(int id) { this->Schedule(this->window_4F1F0); this->window_4F1F0 = nullptr; closed = true; - this->unknown_4F210 = false; + this->macroReporterVisible = false; } break; case WID_MACROUSERINFOWND: @@ -4087,7 +4087,7 @@ bool UIWindowMgr::CloseWindow(int id) { case WID_RENEWQUESTWND: if (UIWindow* found = this->LookupWindow(id)) { this->Schedule(found); - this->unknown_0568 = 0; + this->questWndVisible = 0; closed = true; } break; @@ -4249,7 +4249,7 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { return true; } - if (this->unknown_0474 == 0) { + if (this->modalResponse == 0) { if (this->LookupWindow(WID_SELECTPACKAGEITEMBOX) || this->LookupWindow(WID_WAITDBSAVEWND)) { return false; } @@ -4257,73 +4257,73 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { switch (hotkey) { case HK_BASICINFOWND_MINI + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } break; case HK_EQUIPWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_EQUIP, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_EQUIP, 0, 0, 0); } break; case HK_SKILLWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_SKILL, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_SKILL, 0, 0, 0); } break; case HK_QUESTWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_QUEST, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_QUEST, 0, 0, 0); } break; case HK_FRIENDWND_ONOFF + 100: - if (this->unknown_01DC) { + if (this->basicInfoWnd) { int previous; - std::memcpy(&previous, this->unknown_0740, sizeof(previous)); + std::memcpy(&previous, this->messengerPartyTabState, sizeof(previous)); int partyTab = 0; - std::memcpy(this->unknown_0740, &partyTab, sizeof(partyTab)); + std::memcpy(this->messengerPartyTabState, &partyTab, sizeof(partyTab)); const bool closed = g_windowMgr.CloseWindow(WID_MESSENGERWND); - std::memcpy(&partyTab, this->unknown_0740, sizeof(partyTab)); + std::memcpy(&partyTab, this->messengerPartyTabState, sizeof(partyTab)); if (!closed || previous != partyTab) { g_windowMgr.EnsureWindow(WID_MESSENGERWND); } } break; case HK_PARTYWND_ONOFF + 100: - if (this->unknown_01DC) { + if (this->basicInfoWnd) { int previous; - std::memcpy(&previous, this->unknown_0740, sizeof(previous)); + std::memcpy(&previous, this->messengerPartyTabState, sizeof(previous)); int partyTab = 1; - std::memcpy(this->unknown_0740, &partyTab, sizeof(partyTab)); + std::memcpy(this->messengerPartyTabState, &partyTab, sizeof(partyTab)); const bool closed = g_windowMgr.CloseWindow(WID_MESSENGERWND); - std::memcpy(&partyTab, this->unknown_0740, sizeof(partyTab)); + std::memcpy(&partyTab, this->messengerPartyTabState, sizeof(partyTab)); if (!closed || previous != partyTab) { g_windowMgr.EnsureWindow(WID_MESSENGERWND); } } break; case HK_CHATWND_MAKE + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 0xD6, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 0xD6, 0, 0, 0); } break; case HK_CARTWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 0xF7, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 0xF7, 0, 0, 0); } break; case HK_MAPWND_ONOFF + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_ROMAPWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_ROMAPWND)) { g_windowMgr.EnsureWindow(WID_ROMAPWND); } break; case HK_ITEMWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_ITEMS, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_ITEMS, 0, 0, 0); } break; case HK_GUILDWND_ONOFF + 100: - if (this->unknown_01DC) { + if (this->basicInfoWnd) { if (g_guildInfo.m_guildId != 0) { if (!g_windowMgr.CloseWindow(WID_GUILDWND)) { g_windowMgr.EnsureWindow(WID_GUILDWND); @@ -4334,12 +4334,12 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_CLANWND_ONOFF + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_CLANINFOMANAGEWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_CLANINFOMANAGEWND)) { g_windowMgr.EnsureWindow(WID_CLANINFOMANAGEWND); } break; case HK_EMOTIONWND_ONOFF + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_CASHEMOTIONLISTWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_CASHEMOTIONLISTWND)) { g_windowMgr.EnsureWindow(WID_CASHEMOTIONLISTWND); } break; @@ -4349,24 +4349,24 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_MINIMAP_ONOFF + 100: - if (g_windowMgr.modal == nullptr && static_cast(g_modeMgr.GetGameMode())->unknown_0254 != 0) { - if (this->unknown_005C == 0xFFFFFFFF) { - this->unknown_005C = 0xAAFFFFFF; + if (g_windowMgr.modal == nullptr && static_cast(g_modeMgr.GetGameMode())->canRotateView != 0) { + if (this->minimapColor == 0xFFFFFFFF) { + this->minimapColor = 0xAAFFFFFF; return true; } if (!this->CloseWindow(WID_MINIMAPZOOMWND)) { this->EnsureWindow(WID_MINIMAPZOOMWND); - this->unknown_005C = 0xFFFFFFFF; + this->minimapColor = 0xFFFFFFFF; } } break; case HK_MACROWND_ONOFF + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_EMOTIONWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_EMOTIONWND)) { g_windowMgr.EnsureWindow(WID_EMOTIONWND); } break; case HK_EXEWND_ONOFF + 100: - if (this->unknown_01DC) { + if (this->basicInfoWnd) { ToggleGameSettingsTab4(); } break; @@ -4379,15 +4379,15 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_CHATWND_ONOFF + 100: - if (this->unknown_01DC) { - this->ShowWindowById(WID_CHATWND, 1 - this->unknown_003C); + if (this->basicInfoWnd) { + this->ShowWindowById(WID_CHATWND, 1 - this->chatWndVisible); } break; case HK_CHATWND_ZOOM + 100: if (UIWindow* window = this->window_01C8) { if (window->geometry.visible != 0) { window->SendMsg(nullptr, UM_TOGGLEPUSH, 0, 0, 0, 0); - if (this->window_01C8->geometry.unknown_0030 == 0) { + if (this->window_01C8->geometry.state == 0) { this->ShowWindowById(WID_CHATWND, 0); } } else { @@ -4405,33 +4405,33 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { g_modeMgr.gameMode->SendMsg(MM_SCREENSHOT, 0, 0, 0, 0); break; case HK_MEMORIALWND_ONOFF + 100: - if (UIWindow* window = this->unknown_03F8) { + if (UIWindow* window = this->memorialDunWnd) { window->Show(window->geometry.visible == 0); } else { g_windowMgr.EnsureWindow(WID_MEMORIALDUNWND); } break; case HK_PETWND_ONOFF + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_PETINFOWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_PETINFOWND)) { g_windowMgr.EnsureWindow(WID_PETINFOWND); } break; case HK_HOMUNWND_ONOFF + 100: - if (this->unknown_01DC && g_session.unknown_5614 != 0 && !g_windowMgr.CloseWindow(WID_HOMUNINFOWND)) { + if (this->basicInfoWnd && g_session.homunAlive != 0 && !g_windowMgr.CloseWindow(WID_HOMUNINFOWND)) { g_windowMgr.EnsureWindow(WID_HOMUNINFOWND); } break; case HK_MERWND_ONOFF + 100: - if (this->unknown_01DC && g_session.unknown_56B0 != 0 && !g_windowMgr.CloseWindow(WID_MERINFOWND)) { + if (this->basicInfoWnd && g_session.mercenaryAlive != 0 && !g_windowMgr.CloseWindow(WID_MERINFOWND)) { g_windowMgr.EnsureWindow(WID_MERINFOWND); } break; case HK_HOMUN_FOLLOW + 100: - if (g_session.unknown_5614 != 0) { + if (g_session.homunAlive != 0) { g_session.ClearHomunStatus(); if (CMode* mode = g_modeMgr.GetGameMode()) { std::uint32_t aid; - std::memcpy(&aid, &g_session.unknown_5570[8], sizeof(aid)); + std::memcpy(&aid, &g_session.spAndHomunculusStats[8], sizeof(aid)); CGameActor* actor = static_cast(static_cast(mode)->scene->GetGameActorByAID(aid)); if (actor) { if (actor->HasUnknown030CEntry()) { @@ -4444,11 +4444,11 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_MER_FOLLOW + 100: - if (g_session.unknown_56B0 != 0) { + if (g_session.mercenaryAlive != 0) { g_session.ResetMercenaryStats(); if (CMode* mode = g_modeMgr.GetGameMode()) { std::uint32_t aid; - std::memcpy(&aid, &g_session.unknown_5620[8], sizeof(aid)); + std::memcpy(&aid, &g_session.companionTargetState[8], sizeof(aid)); CGameActor* actor = static_cast(static_cast(mode)->scene->GetGameActorByAID(aid)); if (actor && actor->HasUnknown0310Entry()) { AiCommand command; @@ -4459,24 +4459,24 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_FRIEND_OPTIONWND + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND)) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_FRIENDOPTIONWND)) { g_windowMgr.EnsureWindow(WID_FRIENDOPTIONWND); } break; case HK_PARTY_OPTIONWND + 100: - if (this->unknown_01DC && !g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT) && g_session.PartyCount()) { + if (this->basicInfoWnd && !g_windowMgr.CloseWindow(WID_PARTYSETTINGWND_PARTYCOUNT) && g_session.PartyCount()) { g_windowMgr.EnsureWindow(WID_PARTYSETTINGWND_PARTYCOUNT); } break; case HK_GROUND_CURSOR_ONOFF + 100: { int flag; - std::memcpy(&flag, g_session.unknown_546C, sizeof(flag)); + std::memcpy(&flag, g_session.showEffects, sizeof(flag)); flag = 1 - flag; - std::memcpy(g_session.unknown_546C, &flag, sizeof(flag)); + std::memcpy(g_session.showEffects, &flag, sizeof(flag)); break; } case HK_CHATMODE_ONOFF + 100: - if (this->unknown_01DC && this->chatModeChanged && this->window_01C8 && (this->IsHoverOnWindow01C8Button() || this->hoverWindow == nullptr)) { + if (this->basicInfoWnd && this->chatModeChanged && this->window_01C8 && (this->IsHoverOnWindow01C8Button() || this->hoverWindow == nullptr)) { static_cast(this->window_01C8)->ToggleInput(); if (this->hoverWindow) { this->hoverWindow->SendMsg(nullptr, UM_DEFPUSH, 0, 0, 0, 0); @@ -4489,7 +4489,7 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_CASHSHOPWND + 100: - if (this->unknown_01DC) { + if (this->basicInfoWnd) { if (g_windowMgr.LookupWindow(WID_CASHSHOP_WND) == nullptr) { g_modeMgr.GetGameMode()->SendMsg(MM_REQUEST_CASH_SHOP, 0, 0, 0, 0); } else { @@ -4542,8 +4542,8 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_STATUSWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, ID_STATUS, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, ID_STATUS, 0, 0, 0); } break; case HK_SHORTCUTWND_ROTATE + 100: { @@ -4554,9 +4554,9 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { packet.id = 0xB22; packet.option = static_cast(g_session.GetOption(10)); if (packet.option == 0) { - packet.state = static_cast(g_session.unknown_06FC); + packet.state = static_cast(g_session.mainShortcutRow); } else if (packet.option == 1) { - packet.state = static_cast(g_session.unknown_06A8); + packet.state = static_cast(g_session.alternateShortcutRow); } CRagConnection& connection = GetRagConnection(); GetRagConnection(); @@ -4569,7 +4569,7 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_SINGLEMAP_ONOFF + 100: - if (static_cast(g_modeMgr.GetGameMode())->unknown_0254 != 0) { + if (static_cast(g_modeMgr.GetGameMode())->canRotateView != 0) { if (!g_session.IsNavigationAllowed()) { g_windowMgr.Confirm(LookupMessage(MSI_BANK_0_MONEY), 0, true, false, 0, "Message", 280, 120, 0); } else if (!g_windowMgr.CloseWindow(WID_MINIMAPWND)) { @@ -4596,8 +4596,8 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { } break; case HK_COSEQUIPWND_ONOFF + 100: - if (this->unknown_01DC) { - this->unknown_01DC->SendMsg(nullptr, UM_COMMAND, 0x242, 0, 0, 0); + if (this->basicInfoWnd) { + this->basicInfoWnd->SendMsg(nullptr, UM_COMMAND, 0x242, 0, 0, 0); } break; case HK_PARTYBOARDWND_ONOFF + 100: @@ -4657,11 +4657,11 @@ bool UIWindowMgr::ProcessShortcutKey(int action) { // FUNCTION: fn_17207 UIWindow* UIWindowMgr::EnsureWindow(int id) { UIWindow* transient = this->window_4F250; - if (transient && static_cast(transient)->member.valid && transient->geometry.unknown_0030 == 0) { + if (transient && static_cast(transient)->member.valid && transient->geometry.state == 0) { bool behavior = false; g_session.m_hotkeyScript->Call("IsBeHaviorOfWindow", "d>b", this->GetHotkeyBehavior(), &behavior); if (behavior && this->window_4F250 && static_cast(this->window_4F250)->member.valid) { - this->window_4F250->geometry.unknown_0030 = 1; + this->window_4F250->geometry.state = 1; this->Schedule(this->window_4F250); this->window_4F250 = nullptr; } @@ -4693,19 +4693,19 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { unsigned char* const base = reinterpret_cast(this); const auto layerGreater = [](const UIWindow* left, const UIWindow* right) { - return static_cast(left->unknown_004C) > static_cast(right->unknown_004C); + return static_cast(left->renderLayer) > static_cast(right->renderLayer); }; UIWindow* window = nullptr; switch (id) { case WID_BASICINFOWND: - window = this->unknown_01DC; + window = this->basicInfoWnd; if (window == nullptr) { window = new UIBasicInfoWnd(); - this->unknown_01DC = window; + this->basicInfoWnd = window; window->SetSize(220, g_session.IsTreeGroupThree(g_session.GetDisplayJob()) == true ? 71 : 55); window->Move(0, 0); this->AddRendered(window); - this->unknown_01DC->SendMsg(this->unknown_01DC, UM_SETINFO, reinterpret_cast(this->unknown_0514), 0, 0, 0); + this->basicInfoWnd->SendMsg(this->basicInfoWnd, UM_SETINFO, reinterpret_cast(this->basicInfoPlacement), 0, 0, 0); g_snapMgr.SetRoot(window); if (UIWindow* navigation = g_windowMgr.EnsureWindow(WID_MENUICONWND)) { int x = 0; @@ -4724,42 +4724,42 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } } } else { - if (this->unknown_054C) { + if (this->itemWndVisible) { this->EnsureWindow(WID_ITEMWND); } - if (this->unknown_05A4) { + if (this->equipWndVisible) { this->EnsureWindow(WID_EQUIPWND); } - if (this->unknown_0588) { + if (this->statusWndVisible) { this->EnsureWindow(WID_STATUSWND); } - if (this->unknown_05BC) { + if (this->optionWndVisible) { this->EnsureWindow(13); } - if (this->unknown_077C) { + if (this->skillListWndVisible) { this->EnsureWindow(WID_SKILLLISTWND); } - if (this->unknown_0568) { + if (this->questWndVisible) { this->EnsureWindow(WID_RENEWQUESTWND); } - if (this->unknown_073C) { + if (this->messengerGroupWndVisible) { this->EnsureWindow(WID_MESSENGERWND); } - if (g_session.unknown_5470 == 1 && g_session.unknown_5474 == 1 && g_effectDetailLevel == 2 && g_textureDetailLevel == 2) { + if (g_session.lowMemory == 1 && g_session.performanceWarningEnabled == 1 && g_effectDetailLevel == 2 && g_textureDetailLevel == 2) { this->EnsureWindow(WID_GAMESETTINGSUI); } if (g_session.HasUnknown6178Records() == true) { this->EnsureWindow(WID_ACHTRACINGWND); } - if (this->unknown_4F210 == true) { + if (this->macroReporterVisible == true) { this->EnsureWindow(WID_MACROREPORTERWND); } this->RebuildMiniPartyWindows(); } - if (static_cast(g_modeMgr.GetGameMode())->unknown_0254) { + if (static_cast(g_modeMgr.GetGameMode())->canRotateView) { this->EnsureWindow(WID_MINIMAPZOOMWND); } - this->ShowWindowById(WID_CHATWND, this->unknown_003C); + this->ShowWindowById(WID_CHATWND, this->chatWndVisible); this->ShowWindowById(WID_SHORTCUTWND, this->m_normalItemSlotWindow.show); this->ShowWindowById(WID_ITEMDROPCNTWND, 0); break; @@ -4768,7 +4768,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (window == nullptr) { window = new UINewChatWnd(); this->window_01C8 = window; - window->SetSize(600, this->unknown_0038); + window->SetSize(600, this->chatWndHeight); this->AddRendered(window); } this->window_01C8->SendMsg(nullptr, UM_SETINFO, 0, 0, 0, 0); @@ -4852,19 +4852,19 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; } case WID_ITEMWND: - window = this->unknown_01D4; + window = this->itemWnd; if (window == nullptr) { this->RecordWindowPacket(8); window = new UIItemWnd(); - this->unknown_01D4 = window; + this->itemWnd = window; window->SetSize(280, 120); window->Move(0, 120); this->AddRendered(window); - this->unknown_01D4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x528), 0, 0, 0); + this->itemWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x528), 0, 0, 0); g_snapMgr.Add(window); } window->Show(1); - this->unknown_054C = 1; + this->itemWndVisible = 1; if (UIWindow* basicInfo = g_windowMgr.LookupWindow(WID_MENUICONWND)) { basicInfo->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 0xC2, 0, 0); } @@ -4874,8 +4874,8 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { UIQuestDisplay* display = new UIQuestDisplay(); this->window_0428 = display; display->Create(250, 400); - this->window_0428->Move(this->unknown_047C - 320, 150); - this->window_0428->unknown_004C = 5; + this->window_0428->Move(this->screenWidth - 320, 150); + this->window_0428->renderLayer = 5; this->AddRendered(this->window_0428); this->rendered.sort(layerGreater); this->window_0428->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x570), 0, 0, 0); @@ -4888,10 +4888,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_LOADINGWND: - window = this->unknown_01BC; + window = this->loadingWnd; if (window == nullptr) { window = new UILoadingWnd(); - this->unknown_01BC = window; + this->loadingWnd = window; window->SetSize(240, 15); window->Move(g_renderer->viewport.width / 2 - 100, g_renderer->viewport.height / 2 + 160); this->AddRendered(window); @@ -4917,25 +4917,25 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_EQUIPWND: - window = this->unknown_01E0; + window = this->equipWnd; if (window == nullptr) { window = new UIEquipWnd(); - this->unknown_01E0 = window; + this->equipWnd = window; static_cast(window)->m_viewOther = 0; window->SetSize(280, 167); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); - this->unknown_01E0->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x590), 0, 0, 0); + this->equipWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x590), 0, 0, 0); g_snapMgr.Add(window); } window->Show(1); - this->unknown_05A4 = 1; + this->equipWndVisible = 1; break; case WID_NCASHWND: - window = this->unknown_01E4; + window = this->nCashWnd; if (window == nullptr) { window = new UInCashWnd(); - this->unknown_01E4 = window; + this->nCashWnd = window; window->SetSize(640, 540); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(30)); this->AddRendered(window); @@ -4945,18 +4945,18 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_STATUSWND: - window = this->unknown_01C4; + window = this->statusWnd; if (window == nullptr) { window = new UIStatusWnd(); - this->unknown_01C4 = window; + this->statusWnd = window; window->SetSize(280, 141); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); - this->unknown_01C4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x574), 0, 0, 0); + this->statusWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x574), 0, 0, 0); g_snapMgr.Add(window); } window->Show(1); - this->unknown_0588 = 1; + this->statusWndVisible = 1; this->CloseWindow(WID_NOTIFYLEVELUPWND); if (UIWindow* basicInfo = g_windowMgr.LookupWindow(WID_MENUICONWND)) { basicInfo->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 0xC0, 0, 0); @@ -4973,7 +4973,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->window_02C4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x76C), 0, 0, 0); } window->Show(1); - this->unknown_077C = 1; + this->skillListWndVisible = 1; this->CloseWindow(WID_NOTIFYJOBLEVELUPWND); if (UIWindow* basicInfo = g_windowMgr.LookupWindow(WID_MENUICONWND)) { basicInfo->SendMsg(nullptr, UM_COMMAND, ID_NOTICE, 0xC4, 0, 0); @@ -4999,11 +4999,11 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_ITEMSTORESUBWND_TAB_5: case WID_ITEMSTORESUBWND_TAB_6: { const int tab = id - 146; - window = this->unknown_028C[tab]; + window = this->itemStoreTabWnds[tab]; if (window == nullptr) { UIItemStoreSubWnd* store = new UIItemStoreSubWnd(); window = store; - this->unknown_028C[tab] = window; + this->itemStoreTabWnds[tab] = window; store->SetTabIndex(tab); int message = 0; switch (id) { @@ -5022,101 +5022,101 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { break; } window->SetSize(140, 145); - static_cast(this->unknown_028C[tab])->SetTitle(LookupMessage(message)); + static_cast(this->itemStoreTabWnds[tab])->SetTitle(LookupMessage(message)); this->AddRendered(window); - this->unknown_028C[tab]->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(reinterpret_cast(base + 0x62C) + tab), 0, 0, 0); + this->itemStoreTabWnds[tab]->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(reinterpret_cast(base + 0x62C) + tab), 0, 0, 0); } window->Show(1); break; } case WID_ITEMSTORESUBWND_TAB_7: - window = this->unknown_02A8; + window = this->itemStoreLastTabWnd; if (window == nullptr) { UIItemStoreSubWnd* store = new UIItemStoreSubWnd(); window = store; - this->unknown_02A8 = window; + this->itemStoreLastTabWnd = window; store->SetTabIndex(7); window->SetSize(140, 145); - static_cast(this->unknown_02A8)->SetTitle(LookupMessage(id == WID_ITEMSTORESUBWND_TAB_7 ? 0x5BF : 0)); + static_cast(this->itemStoreLastTabWnd)->SetTitle(LookupMessage(id == WID_ITEMSTORESUBWND_TAB_7 ? 0x5BF : 0)); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02A8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x69C), 0, 0, 0); + this->itemStoreLastTabWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x69C), 0, 0, 0); } window->Show(1); break; case WID_ITEMSTOREFINDWND: - window = this->unknown_02AC; + window = this->itemStoreFindWnd; if (window == nullptr) { window = new UIItemStoreFindWnd(); - this->unknown_02AC = window; + this->itemStoreFindWnd = window; window->SetSize(140, 145); - static_cast(this->unknown_02AC)->SetTitle(LookupMessage(MSI_AUCTION_SEARCH)); + static_cast(this->itemStoreFindWnd)->SetTitle(LookupMessage(MSI_AUCTION_SEARCH)); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02AC->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6AC), 0, 0, 0); + this->itemStoreFindWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6AC), 0, 0, 0); } window->Show(1); break; case WID_PARTYBOOKINGHELPWND: - if (this->unknown_02C0 == nullptr) { + if (this->partyBookingHelpWnd == nullptr) { window = new UIPartyBookingHelpWnd(); - this->unknown_02C0 = window; + this->partyBookingHelpWnd = window; window->SetSize(320, 199); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); } break; case WID_JOBLISTWND: - if (this->unknown_02B8 == nullptr) { + if (this->jobListWnd == nullptr) { window = new UIJobListWnd(); - this->unknown_02B8 = window; + this->jobListWnd = window; window->SetSize(152, 199); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02B8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6EC), 0, 0, 0); + this->jobListWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6EC), 0, 0, 0); } break; case WID_SEEKPARTYWND: - window = this->unknown_02B0; + window = this->seekPartyWnd; if (window == nullptr) { window = new UISeekPartyWnd(); - this->unknown_02B0 = window; + this->seekPartyWnd = window; window->SetSize(152, 199); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02B0->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6DC), 0, 0, 0); + this->seekPartyWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6DC), 0, 0, 0); } window->Show(1); g_session.m_partyBooking.unknown_0000 = 1; break; case WID_SEEKPARTYMBWND: - if (this->unknown_02B0 == nullptr) { - if (this->unknown_02B4 == nullptr) { + if (this->seekPartyWnd == nullptr) { + if (this->seekPartyMessageWnd == nullptr) { window = new UISeekPartyMBWnd(); - this->unknown_02B4 = window; + this->seekPartyMessageWnd = window; window->SetSize(360, 350); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02B4->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6CC), 0, 0, 0); + this->seekPartyMessageWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6CC), 0, 0, 0); } else { g_windowMgr.CloseWindow(WID_SEEKPARTYMBWND); } } break; case WID_SEEKPARTYLISTWND: - if (this->unknown_02BC == nullptr) { + if (this->seekPartyListWnd == nullptr) { window = new UISeekPartyListWnd(); - this->unknown_02BC = window; + this->seekPartyListWnd = window; window->SetSize(550, 350); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_02BC->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6BC), 0, 0, 0); + this->seekPartyListWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x6BC), 0, 0, 0); } else { g_windowMgr.CloseWindow(WID_SEEKPARTYLISTWND); } break; case WID_MESSENGERWND: - if (*reinterpret_cast(this->unknown_0740)) { + if (*reinterpret_cast(this->messengerPartyTabState)) { this->EnsureWindow(WID_MESSENGERGROUPWND)->SendMsg(nullptr, UM_COMMAND, ID_RADIOBTN, 2, 0, 0); } else { this->EnsureWindow(WID_MESSENGERGROUPWND)->SendMsg(nullptr, UM_COMMAND, ID_RADIOBTN, 1, 0, 0); @@ -5137,13 +5137,13 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->window_02C8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x72C), 0, 0, 0); } window->Show(1); - this->unknown_073C = 1; + this->messengerGroupWndVisible = 1; break; case WID_MERCHANTSHOPMAKEWND: - window = this->unknown_02FC; + window = this->merchantShopMakeWnd; if (window == nullptr) { window = new UIMerchantShopMakeWnd(0); - this->unknown_02FC = window; + this->merchantShopMakeWnd = window; window->SetSize(400, 260); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5153,40 +5153,40 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->EnsureWindow(WID_MERCHANTMIRRORITEMWND); break; case WID_MERCHANTMIRRORITEMWND: - window = reinterpret_cast(this->unknown_02F8); + window = reinterpret_cast(this->merchantMirrorItemWnd); if (window == nullptr) { window = new UIMerchantMirrorItemWnd(0); - this->unknown_02F8 = reinterpret_cast(window); + this->merchantMirrorItemWnd = reinterpret_cast(window); window->SetSize(280, 120); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(120)); this->AddRendered(window); - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_0794), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->merchantMirrorItemPlacement), 0, 0, 0); } window->Show(1); break; case WID_MERCHANTITEMWND: - if (!g_mapPropertyMgr->GetValue(g_session.unknown_0000, 40)) { + if (!g_mapPropertyMgr->GetValue(g_session.mapPropertyId, 40)) { g_windowMgr.SendNotice(UIM_OPENCHATWND, 0, 0, 0, 0, 0); g_windowMgr.SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_RANKING_NUMBER)), 255, 0, 0, 0); break; } - window = this->unknown_02F4; + window = this->merchantItemWnd; if (window == nullptr) { window = new UIMerchantItemWnd(); - this->unknown_02F4 = window; + this->merchantItemWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_0780), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->merchantItemPlacement), 0, 0, 0); } window->Show(1); - this->unknown_0790 = 1; + this->merchantItemWndVisible = 1; break; case WID_NOTIFYITEMOBTAINWND: - window = this->unknown_031C; + window = this->notifyItemObtainWnd; if (window == nullptr) { window = new UINotifyItemObtainWnd(); - this->unknown_031C = window; + this->notifyItemObtainWnd = window; window->SetSize(180, 32); window->Move(CenterOnViewportX(220), 75); this->AddRendered(window); @@ -5194,10 +5194,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NPCEDITDIALOGWND: - window = this->unknown_0314; + window = this->npcEditDialogWnd; if (window == nullptr) { window = new UINpcEditDialogWnd(); - this->unknown_0314 = window; + this->npcEditDialogWnd = window; window->SetSize(176, 46); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5205,10 +5205,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NPCTEXTEDITDIALOGWND: - window = this->unknown_0318; + window = this->npcTextEditDialogWnd; if (window == nullptr) { window = new UINpcTextEditDialogWnd(); - this->unknown_0318 = window; + this->npcTextEditDialogWnd = window; window->SetSize(346, 46); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5216,10 +5216,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SKILLNAMECHANGEWND: - window = this->unknown_0310; + window = this->skillNameChangeWnd; if (window == nullptr) { window = new UISkillNameChangeWnd(); - this->unknown_0310 = window; + this->skillNameChangeWnd = window; window->SetSize(280, 48); window->Move(CenterOnViewportX(185), CenterOnViewportY(180)); this->AddRendered(window); @@ -5227,10 +5227,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDHELPERWND: - window = this->unknown_0430; + window = this->guildHelperWnd; if (window == nullptr) { window = new UIGuildHelperWnd(); - this->unknown_0430 = window; + this->guildHelperWnd = window; window->SetSize(200, 100); window->Move(CenterOnViewportX(220), CenterOnViewportY(120)); this->AddRendered(window); @@ -5239,20 +5239,20 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDTIPWND: - window = this->unknown_0434; + window = this->guildTipWnd; if (window == nullptr) { window = new UIGuildTipWnd(); - this->unknown_0434 = window; + this->guildTipWnd = window; window->SetSize(330, 230); this->AddRendered(window); } window->Show(1); break; case WID_CREATEGUILDWND_MODE_0: - window = this->unknown_0438; + window = this->createGuildWnd; if (window == nullptr) { window = new UICreateGuildWnd(0); - this->unknown_0438 = window; + this->createGuildWnd = window; window->SetSize(150, 100); window->Move(CenterOnViewportX(200), CenterOnViewportY(120)); this->AddRendered(window); @@ -5260,10 +5260,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CREATEGUILDWND_MODE_1: - window = this->unknown_043C; + window = this->createGuildAlternateWnd; if (window == nullptr) { window = new UICreateGuildWnd(1); - this->unknown_043C = window; + this->createGuildAlternateWnd = window; window->SetSize(150, 100); window->Move(CenterOnViewportX(200), CenterOnViewportY(120)); this->AddRendered(window); @@ -5275,7 +5275,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (!guildInfo->IsValid()) { guildInfo->Reset(); } - switch (guildInfo->unknown_0010) { + switch (guildInfo->tab) { case 0: window = g_windowMgr.EnsureWindow(WID_GUILDINFOMANAGEWND); break; @@ -5313,10 +5313,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDPOSITIONMANAGEWND: - window = this->unknown_0328; + window = this->guildPositionManageWnd; if (window == nullptr) { window = new UIGuildPositionManageWnd(); - this->unknown_0328 = window; + this->guildPositionManageWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5337,10 +5337,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDBANISHEDMEMBERWND: - window = this->unknown_0330; + window = this->guildBanishedMemberWnd; if (window == nullptr) { window = new UIGuildBanishedMemberWnd(); - this->unknown_0330 = window; + this->guildBanishedMemberWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5349,10 +5349,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDNOTICEWND: - window = this->unknown_0334; + window = this->guildNoticeWnd; if (window == nullptr) { window = new UIGuildNoticeWnd(); - this->unknown_0334 = window; + this->guildNoticeWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5361,10 +5361,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDTOTALINFOWND: - window = this->unknown_0338; + window = this->guildTotalInfoWnd; if (window == nullptr) { window = new UIGuildTotalInfoWnd(); - this->unknown_0338 = window; + this->guildTotalInfoWnd = window; window->SetSize(g_defaultPlacementWidth, g_defaultPlacementHeight); window->Move(ScaleToViewportWidth(0), 147); this->AddRendered(window); @@ -5385,10 +5385,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDLEAVEREASONDESCWND: - window = this->unknown_0340; + window = this->guildLeaveReasonDescWnd; if (window == nullptr) { window = new UIGuildLeaveReasonDescWnd(); - this->unknown_0340 = window; + this->guildLeaveReasonDescWnd = window; window->SetSize(280, 80); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5396,17 +5396,17 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ILLUSTWND: - window = this->unknown_0348; + window = this->illustWnd; if (window == nullptr) { window = new UIIllustWnd(); - this->unknown_0348 = window; + this->illustWnd = window; window->SetSize(4, 4); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->rendered.insert(this->rendered.end(), window); - this->unknown_0348->unknown_004C = 2; + this->illustWnd->renderLayer = 2; this->rendered.sort(layerGreater); } else { - this->unknown_0348->SendMsg(nullptr, UM_SETINFO, -1, 0, 0, 0); + this->illustWnd->SendMsg(nullptr, UM_SETINFO, -1, 0, 0, 0); } window->Show(1); break; @@ -5420,10 +5420,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { case WID_MULTIILLUSTWND_SLOT_7: case WID_MULTIILLUSTWND_SLOT_8: case WID_MULTIILLUSTWND_SLOT_9: - window = this->unknown_034C[id - 216]; + window = this->multiIllustWnds[id - 216]; if (window == nullptr) { window = new UIMultiIllustWnd(); - this->unknown_034C[id - 216] = window; + this->multiIllustWnds[id - 216] = window; window->SetSize(4, 4); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddOverlay(id - 216, window); @@ -5431,10 +5431,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_GUILDBANREASONDESCWND: - window = this->unknown_0344; + window = this->guildBanReasonDescWnd; if (window == nullptr) { window = new UIGuildBanReasonDescWnd(); - this->unknown_0344 = window; + this->guildBanReasonDescWnd = window; window->SetSize(280, 80); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5442,10 +5442,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_FRIENDOPTIONWND: - window = this->unknown_033C; + window = this->friendOptionWnd; if (window == nullptr) { window = new UIFriendOptionWnd(); - this->unknown_033C = window; + this->friendOptionWnd = window; window->SetSize(213, 90); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5454,10 +5454,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARTYSETTINGWND_PARTYCOUNT: - window = this->unknown_030C; + window = this->partySettingWnd; if (window == nullptr) { window = new UIPartySettingWnd(); - this->unknown_030C = window; + this->partySettingWnd = window; window->SetSize(130, g_session.PartyCount() ? 245 : 180); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5466,10 +5466,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARTYSETTINGWND_HEIGHT_220: - window = this->unknown_030C; + window = this->partySettingWnd; if (window == nullptr) { window = new UIPartySettingWnd(); - this->unknown_030C = window; + this->partySettingWnd = window; window->SetSize(130, 220); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5478,10 +5478,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARTYINVITATIONTOWND: - window = this->unknown_042C; + window = this->partyInvitationToWnd; if (window == nullptr) { window = new UIPartyInvitationToWnd(); - this->unknown_042C = window; + this->partyInvitationToWnd = window; window->SetSize(150, 100); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5489,10 +5489,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COMPOSITIONWND: - window = this->unknown_03A8; + window = this->compositionWnd; if (window == nullptr) { window = new UICompositionWnd(); - this->unknown_03A8 = window; + this->compositionWnd = window; window->SetSize(34, 34); window->Move(0, 0); this->AddRendered(window); @@ -5504,8 +5504,8 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (window == nullptr) { window = new UICandidateWnd(); this->window_03A4 = window; - const int width = this->unknown_0068 ? 120 : 292; - const int height = this->unknown_0068 ? 212 : 34; + const int width = this->compactCompositionLayout ? 120 : 292; + const int height = this->compactCompositionLayout ? 212 : 34; window->SetSize(width, height); window->Move(g_renderer->viewport.width - width, g_renderer->viewport.height - height); this->AddRendered(window); @@ -5513,10 +5513,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_TIPOFTHEDAYWND: - window = this->unknown_02F0; + window = this->tipOfTheDayWnd; if (window == nullptr) { window = new UITipOfTheDayWnd(); - this->unknown_02F0 = window; + this->tipOfTheDayWnd = window; window->SetSize(280, 180); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -5524,10 +5524,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_JOINGUILDACCEPTWND: - window = this->unknown_02E8; + window = this->joinGuildAcceptWnd; if (window == nullptr) { window = new UIJoinGuildAcceptWnd(); - this->unknown_02E8 = window; + this->joinGuildAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5535,10 +5535,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ALLYGUILDACCEPTWND: - window = this->unknown_02EC; + window = this->allyGuildAcceptWnd; if (window == nullptr) { window = new UIAllyGuildAcceptWnd(); - this->unknown_02EC = window; + this->allyGuildAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5546,10 +5546,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_JOINPARTYACCEPTWND: - window = this->unknown_02CC; + window = this->joinPartyAcceptWnd; if (window == nullptr) { window = new UIJoinPartyAcceptWnd(); - this->unknown_02CC = window; + this->joinPartyAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5557,10 +5557,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COUPLEACCEPTWND: - window = this->unknown_02D0; + window = this->coupleAcceptWnd; if (window == nullptr) { window = new UICoupleAcceptWnd(); - this->unknown_02D0 = window; + this->coupleAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5568,10 +5568,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_STARPLACEACCEPTWND: - window = this->unknown_02D4; + window = this->starPlaceAcceptWnd; if (window == nullptr) { window = new UIStarPlaceAcceptWnd(); - this->unknown_02D4 = window; + this->starPlaceAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5579,10 +5579,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MIXACCEPTWND: - window = this->unknown_02D8; + window = this->mixAcceptWnd; if (window == nullptr) { window = new UIMixAcceptWnd(); - this->unknown_02D8 = window; + this->mixAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5590,10 +5590,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_YOURITEMWND: - window = this->unknown_02DC; + window = this->yourItemWnd; if (window == nullptr) { window = new UIYourItemWnd(); - this->unknown_02DC = window; + this->yourItemWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5601,10 +5601,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_BABYACCEPTWND: - window = this->unknown_02E0; + window = this->babyAcceptWnd; if (window == nullptr) { window = new UIBabyAcceptWnd(); - this->unknown_02E0 = window; + this->babyAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5612,10 +5612,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_BABYACCEPTWND2: - window = this->unknown_02E4; + window = this->babyAcceptWnd2; if (window == nullptr) { window = new UIBabyAcceptWnd2(); - this->unknown_02E4 = window; + this->babyAcceptWnd2 = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5623,22 +5623,22 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_EXCHANGEACCEPTWND: - window = this->unknown_0284; + window = this->exchangeAcceptWnd; if (window == nullptr) { window = new UIExchangeAcceptWnd(); - this->unknown_0284 = window; + this->exchangeAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_0284->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x75C), 0, 0, 0); + this->exchangeAcceptWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x75C), 0, 0, 0); } window->Show(1); break; case WID_PASSWORDWND: - window = this->unknown_0280; + window = this->passwordWnd; if (window == nullptr) { window = new UIPasswordWnd(); - this->unknown_0280 = window; + this->passwordWnd = window; window->SetSize(176, 46); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -5656,24 +5656,24 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_SAYDIALOGWND: - window = this->unknown_01F0; + window = this->sayDialogWnd; if (window == nullptr) { window = new UISayDialogWnd(); - this->unknown_01F0 = window; + this->sayDialogWnd = window; window->SetSize(280, 180); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(100)); this->AddRendered(window); - this->unknown_01F0->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x5E4), 0, 0, 0); + this->sayDialogWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x5E4), 0, 0, 0); } window->Show(1); - this->unknown_01F0->unknown_004C = 1; + this->sayDialogWnd->renderLayer = 1; this->rendered.sort(layerGreater); break; case WID_SAYDIALOGWND_OVERLAY: - window = this->unknown_01F4; + window = this->sayDialogOverlayWnd; if (window == nullptr) { window = new UISayDialogWnd(); - this->unknown_01F4 = window; + this->sayDialogOverlayWnd = window; window->SetSize(g_renderer->viewport.width, 100); window->Move(0, g_renderer->viewport.height - 100); this->AddOverlay(WID_COMBINEDCARDITEMCOLLECTION_COMPARISONWND, window); @@ -5693,10 +5693,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHOOSEWARPWND: - window = this->unknown_020C; + window = this->chooseWarpWnd; if (window == nullptr) { window = new UIChooseWarpWnd(); - this->unknown_020C = window; + this->chooseWarpWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5704,46 +5704,46 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHOOSEWND: - window = this->unknown_01F8; + window = this->choose3Wnd; if (window == nullptr) { window = new UIChoose3Wnd(); - this->unknown_01F8 = window; + this->choose3Wnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); - this->unknown_01F8->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x5F4), 0, 0, 0); + this->choose3Wnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x5F4), 0, 0, 0); } window->Show(1); break; case WID_ITEMCOMPOSITIONWND: - window = this->unknown_0208; + window = this->itemCompositionWnd; if (window == nullptr) { window = new UIItemCompositionWnd(); - this->unknown_0208 = window; + this->itemCompositionWnd = window; window->SetSize(200, 200); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_0208->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x87C), 0, 0, 0); + this->itemCompositionWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x87C), 0, 0, 0); } window->Show(1); break; case WID_ITEMIDENTIFYWND: - window = this->unknown_01FC; + window = this->itemIdentifyWnd; if (window == nullptr) { window = new UIItemIdentifyWnd(); - this->unknown_01FC = window; + this->itemIdentifyWnd = window; window->SetSize(200, 200); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); - this->unknown_01FC->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x88C), 0, 0, 0); + this->itemIdentifyWnd->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x88C), 0, 0, 0); } window->Show(1); break; case WID_COMBOBOXWND: - window = this->unknown_0214; + window = this->comboBoxWnd; if (window == nullptr) { window = new UIComboBoxWnd(); - this->unknown_0214 = window; + this->comboBoxWnd = window; window->SetSize(16, 16); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5751,10 +5751,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COMBOBOXIDWND: - window = this->unknown_021C; + window = this->comboBoxIDWnd; if (window == nullptr) { window = new UIComboBoxIDWnd(); - this->unknown_021C = window; + this->comboBoxIDWnd = window; window->SetSize(16, 16); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5762,10 +5762,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MENUWND: - window = this->unknown_0210; + window = this->menuWnd; if (window == nullptr) { window = new UIMenuWnd(); - this->unknown_0210 = window; + this->menuWnd = window; window->SetSize(4, 4); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5773,10 +5773,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MINIMAPZOOMWND: - window = this->unknown_01C0; + window = this->minimapZoomWnd; if (window == nullptr) { window = new UIMinimapZoomWnd(); - this->unknown_01C0 = window; + this->minimapZoomWnd = window; window->SetSize(128, 140); window->Move(g_renderer->viewport.width - 145, 17); this->AddRendered(window); @@ -5806,10 +5806,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CHOOSESELLBUYWND: - window = this->unknown_0264; + window = this->chooseSellBuyWnd; if (window == nullptr) { window = new UIChooseSellBuyWnd(); - this->unknown_0264 = window; + this->chooseSellBuyWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -5817,10 +5817,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMSELLWND: - window = this->unknown_025C; + window = this->itemSellWnd; if (window == nullptr) { window = new UIItemSellWnd(); - this->unknown_025C = window; + this->itemSellWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -5829,10 +5829,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMSELLWND2: - window = this->unknown_0260; + window = this->itemSellWnd2; if (window == nullptr) { window = new UIItemSellWnd2(); - this->unknown_0260 = window; + this->itemSellWnd2 = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -5841,10 +5841,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTITEMPURCHASEWND: - window = this->unknown_0308; + window = this->merchantItemPurchaseWnd; if (window == nullptr) { window = new UIMerchantItemPurchaseWnd(0); - this->unknown_0308 = window; + this->merchantItemPurchaseWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -5853,10 +5853,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMPURCHASEWND: - window = this->unknown_0258; + window = this->itemPurchaseWnd; if (window == nullptr) { window = new UIItemPurchaseWnd(); - this->unknown_0258 = window; + this->itemPurchaseWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -5866,10 +5866,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->EnsureWindow(WID_ITEMPARAMCHANGEDISPLAYWND); break; case WID_MERCHANTITEMMYSHOPWND: - window = this->unknown_0304; + window = this->merchantItemMyShopWnd; if (window == nullptr) { window = new UIMerchantItemMyShopWnd(0); - this->unknown_0304 = window; + this->merchantItemMyShopWnd = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -5878,10 +5878,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTITEMSHOPWND: - window = this->unknown_0300; + window = this->merchantItemShopWnd; if (window == nullptr) { window = new UIMerchantItemShopWnd(0); - this->unknown_0300 = window; + this->merchantItemShopWnd = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -5890,10 +5890,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMSHOPWND: - window = this->unknown_0250; + window = this->itemShopWnd; if (window == nullptr) { window = new UIItemShopWnd(); - this->unknown_0250 = window; + this->itemShopWnd = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -5902,10 +5902,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMSHOPWND2: - window = this->unknown_0254; + window = this->itemShopWnd2; if (window == nullptr) { window = new UIItemShopWnd2(); - this->unknown_0254 = window; + this->itemShopWnd2 = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -5914,10 +5914,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARAITEMSHOPWND: - window = this->unknown_0268; + window = this->paraItemShopWnd; if (window == nullptr) { window = new UIParaItemShopWnd(); - this->unknown_0268 = window; + this->paraItemShopWnd = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -5926,10 +5926,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PARAITEMPURCHASEWND: - window = this->unknown_026C; + window = this->paraItemPurchaseWnd; if (window == nullptr) { window = new UIParaItemPurchaseWnd(); - this->unknown_026C = window; + this->paraItemPurchaseWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -5950,10 +5950,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NOTIFYJOBLEVELUPWND: - window = this->unknown_0244; + window = this->notifyJobLevelUpWnd; if (window == nullptr) { window = new UINotifyJobLevelUpWnd(); - this->unknown_0244 = window; + this->notifyJobLevelUpWnd = window; window->SetSize(43, 43); window->Move(0, g_renderer->viewport.height - 43); this->AddRendered(window); @@ -5961,10 +5961,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NOTIFYLEVELUPWND: - window = this->unknown_0240; + window = this->notifyLevelUpWnd; if (window == nullptr) { window = new UINotifyLevelUpWnd(); - this->unknown_0240 = window; + this->notifyLevelUpWnd = window; window->SetSize(43, 43); window->Move(g_renderer->viewport.width - 43, g_renderer->viewport.height - 43); this->AddRendered(window); @@ -5972,10 +5972,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NOTIFYQUESTWND: - window = this->unknown_0248; + window = this->notifyQuestWnd; if (window == nullptr) { window = new UINotifyQuestWnd(); - this->unknown_0248 = window; + this->notifyQuestWnd = window; window->SetSize(43, 43); window->Move(g_renderer->viewport.width - 43, g_renderer->viewport.height - 43); this->AddRendered(window); @@ -5983,10 +5983,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_NCASH_CALLWND: - window = this->unknown_024C; + window = this->nCashCallWnd; if (window == nullptr) { window = new UInCash_CallWnd(); - this->unknown_024C = window; + this->nCashCallWnd = window; window->SetSize(43, 43); window->Move(g_renderer->viewport.width - 187, 16); this->AddRendered(window); @@ -5994,10 +5994,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(g_serviceOptions.Get(218)); break; case WID_CARDITEMILLUSTWND: - window = this->unknown_023C; + window = this->cardItemIllustWnd; if (window == nullptr) { window = new UICardItemIllustWnd(); - this->unknown_023C = window; + this->cardItemIllustWnd = window; window->SetSize(300, 417); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(0)); this->AddRendered(window); @@ -6005,10 +6005,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MONSTERDISPLAYWND: - window = this->unknown_0424; + window = this->monsterDisplayWnd; if (window == nullptr) { window = new UIMonsterDisplayWnd(); - this->unknown_0424 = window; + this->monsterDisplayWnd = window; window->SetSize(100, 150); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(0)); this->AddRendered(window); @@ -6016,10 +6016,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_RESTARTWND: - window = this->unknown_0238; + window = this->restartWnd; if (window == nullptr) { window = new UIRestartWnd(); - this->unknown_0238 = window; + this->restartWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6027,10 +6027,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_QUITWND: - window = this->unknown_0234; + window = this->quitWnd; if (window == nullptr) { window = new UIQuitWnd(); - this->unknown_0234 = window; + this->quitWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6049,10 +6049,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMPARAMCHANGEDISPLAYWND: - window = this->unknown_022C; + window = this->itemParamChangeDisplayWnd; if (window == nullptr) { window = new UIItemParamChangeDisplayWnd(); - this->unknown_022C = window; + this->itemParamChangeDisplayWnd = window; window->SetSize(280, 34); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 34); this->AddRendered(window); @@ -6061,10 +6061,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COMBINEDCARDITEMCOLLECTIONWND: - window = this->unknown_0228; + window = this->combinedCardItemCollectionWnd; if (window == nullptr) { window = new UICombinedCardItemCollectionWnd(); - this->unknown_0228 = window; + this->combinedCardItemCollectionWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6073,10 +6073,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMCOLLECTIONWND: - window = this->unknown_0218; + window = this->itemCollectionWnd; if (window == nullptr) { window = new UIItemCollectionWnd(); - this->unknown_0218 = window; + this->itemCollectionWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6085,10 +6085,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMCOLLECTION_COMPARISONWND: - window = this->unknown_0220; + window = this->itemCollectionComparisonWnd; if (window == nullptr) { window = new UIItemCollection_ComparisonWnd(); - this->unknown_0220 = window; + this->itemCollectionComparisonWnd = window; window->SetSize(280, 120); this->AddRendered(window); } @@ -6096,10 +6096,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_COMBINEDCARDITEMCOLLECTION_COMPARISONWND: - window = this->unknown_0224; + window = this->combinedCardItemCollectionComparisonWnd; if (window == nullptr) { window = new UICombinedCardItemCollection_ComparisonWnd(); - this->unknown_0224 = window; + this->combinedCardItemCollectionComparisonWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6126,10 +6126,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); break; case WID_MAKETARGETLISTWND: - window = this->unknown_0374; + window = this->makeTargetListWnd; if (window == nullptr) { window = new UIMakeTargetListWnd(); - this->unknown_0374 = window; + this->makeTargetListWnd = window; window->SetSize(280, 150); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6137,10 +6137,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_ITEMREPAIRWND: - window = this->unknown_0200; + window = this->itemRepairWnd; if (window == nullptr) { window = new UIItemRepairWnd(); - this->unknown_0200 = window; + this->itemRepairWnd = window; window->SetSize(280, 150); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6148,10 +6148,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_WEAPONREFINEWND: - window = this->unknown_0204; + window = this->weaponRefineWnd; if (window == nullptr) { window = new UIWeaponRefineWnd(); - this->unknown_0204 = window; + this->weaponRefineWnd = window; window->SetSize(280, 150); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6159,10 +6159,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MAKETARGETPROCESSWND: - window = this->unknown_0378; + window = this->makeTargetProcessWnd; if (window == nullptr) { window = new UIMakeTargetProcessWnd(); - this->unknown_0378 = window; + this->makeTargetProcessWnd = window; window->SetSize(280, 150); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6170,10 +6170,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MAKETARGETRESULTWND: - window = this->unknown_037C; + window = this->makeTargetResultWnd; if (window == nullptr) { window = new UIMakeTargetResultWnd(); - this->unknown_037C = window; + this->makeTargetResultWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); this->AddRendered(window); @@ -6198,10 +6198,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_EMOTIONWND: - window = this->unknown_0380; + window = this->emotionWnd; if (window == nullptr) { window = new UIEmotionWnd(); - this->unknown_0380 = window; + this->emotionWnd = window; window->SetSize(375, 260); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300) - 60); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x89C), 0, 0, 0); @@ -6210,10 +6210,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_CASHEMOTIONLISTWND: - window = this->unknown_0384; + window = this->cashEmotionListWnd; if (window == nullptr) { window = new (std::nothrow) UICashEmotionListWnd(); - this->unknown_0384 = window; + this->cashEmotionListWnd = window; if (window == nullptr) { return nullptr; } @@ -6225,7 +6225,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PETINFOWND: - if (g_session.unknown_103C == -1) { + if (g_session.petJob == -1) { break; } window = this->window_038C; @@ -6240,10 +6240,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PETEGGLISTWND: - window = this->unknown_0390; + window = this->petEggListWnd; if (window == nullptr) { window = new UIPetEggListWnd(); - this->unknown_0390 = window; + this->petEggListWnd = window; window->SetSize(200, 200); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6251,10 +6251,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_PETTAMINGDECEIVEWND: - window = this->unknown_0394; + window = this->petTamingDeceiveWnd; if (window == nullptr) { window = new UIPetTamingDeceiveWnd(); - this->unknown_0394 = window; + this->petTamingDeceiveWnd = window; window->SetSize(196, 256); window->Move(g_renderer->viewport.width / 2 - 98, g_renderer->viewport.height / 2 - 128); this->AddRendered(window); @@ -6262,10 +6262,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MAKINGARROWLISTWND: - window = this->unknown_0398; + window = this->makingArrowListWnd; if (window == nullptr) { window = new UIMakingArrowListWnd(); - this->unknown_0398 = window; + this->makingArrowListWnd = window; window->SetSize(200, 200); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6273,10 +6273,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SELECTCARTWND: - window = this->unknown_039C; + window = this->selectCartWnd; if (window == nullptr) { window = new UISelectCartWnd(); - this->unknown_039C = window; + this->selectCartWnd = window; window->SetSize(385, 98); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6284,12 +6284,12 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SPELLLISTWND: - if (this->unknown_03A0) { - this->Schedule(this->unknown_03A0); - this->unknown_03A0 = nullptr; + if (this->spellListWnd) { + this->Schedule(this->spellListWnd); + this->spellListWnd = nullptr; } window = new UISpellListWnd(); - this->unknown_03A0 = window; + this->spellListWnd = window; window->SetSize(200, 200); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6313,10 +6313,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_BOOKWND: - window = this->unknown_03B0; + window = this->bookWnd; if (window == nullptr) { window = new UIBookWnd(); - this->unknown_03B0 = window; + this->bookWnd = window; window->SetSize(600, 420); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(0)); this->AddRendered(window); @@ -6324,10 +6324,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_JOINFRIENDACCEPTWND: - window = this->unknown_03B4; + window = this->joinFriendAcceptWnd; if (window == nullptr) { window = new UIJoinFriendAcceptWnd(); - this->unknown_03B4 = window; + this->joinFriendAcceptWnd = window; window->SetSize(280, 120); window->Move(CenterOnViewportX(200), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6362,7 +6362,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } static_cast(this->window_03C4)->skillTab = 0; this->window_03C4->Show(1); - this->unknown_08EC = 1; + this->homunculusSkillWndVisible = 1; break; case WID_MERINFOWND: if (g_session.m_mercenaryClass == -1) { @@ -6391,7 +6391,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->window_4F168 = window; window->SetSize(197, 138); window->Move(ScaleToViewportWidth(640) - 197, ScaleByScreenHeight(480) - 138); - window->unknown_004C = 0; + window->renderLayer = 0; this->rendered.sort(layerGreater); this->AddRendered(window); } @@ -6407,13 +6407,13 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->SetSize(194, 34); window->Move(CenterOnViewportX(259), CenterOnViewportY(230)); this->AddRendered(window); - this->window_4F164->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_4F154), 0, 0, 0); + this->window_4F164->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->navigationPlacement), 0, 0, 0); } break; case WID_NAVIGATIONV4WND: if (this->window_4F174 == nullptr) { this->RecordWindowPacket(203); - g_navigationManager.unknown_1248 = false; + g_navigationManager.hideWindow = false; window = new UINavigationV4Wnd(); this->window_4F174 = window; window->SetSize(272, 338); @@ -6470,13 +6470,13 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } static_cast(this->window_03CC)->skillTab = 1; this->window_03CC->Show(1); - this->unknown_0910 = 1; + this->mercenarySkillWndVisible = 1; break; case WID_AUTOMESSAGEWND: - window = this->unknown_03D0; + window = this->autoMessageWnd; if (window == nullptr) { window = new UIAutoMessageWnd(); - this->unknown_03D0 = window; + this->autoMessageWnd = window; window->SetSize(280, 48); window->Move(CenterOnViewportX(185), CenterOnViewportY(180)); this->AddRendered(window); @@ -6484,7 +6484,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SELCHARFORUSERVERWND: { - const int width = g_session.unknown_0E94 > 12 ? 783 : 540; + const int width = g_session.characterCount > 12 ? 783 : 540; window = new UISelCharForUServerWnd(); this->window_03D8 = window; window->SetSize(width, 400); @@ -6504,10 +6504,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_REBIRTHWND: - window = this->unknown_03E0; + window = this->rebirthWnd; if (window == nullptr) { window = new UIRebirthWnd(); - this->unknown_03E0 = window; + this->rebirthWnd = window; window->SetSize(280, 143); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6515,34 +6515,34 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SUBCHATHISWND_UNKNOWN_03E4: - window = reinterpret_cast(this->unknown_03E4); + window = reinterpret_cast(this->subChatHistoryWnd); if (window == nullptr) { window = new UISubChatHisWnd(); - this->unknown_03E4 = reinterpret_cast(window); + this->subChatHistoryWnd = reinterpret_cast(window); window->SetSize(300, 95); this->AddRendered(window); - reinterpret_cast(this->unknown_03E4)->SetId(130); - reinterpret_cast(this->unknown_03E4)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x914), 0, 0, 0); + reinterpret_cast(this->subChatHistoryWnd)->SetId(130); + reinterpret_cast(this->subChatHistoryWnd)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x914), 0, 0, 0); } window->Show(0); break; case WID_SUBCHATHISWND_UNKNOWN_03E8: - window = reinterpret_cast(this->unknown_03E8); + window = reinterpret_cast(this->secondSubChatHistoryWnd); if (window == nullptr) { window = new UISubChatHisWnd(); - this->unknown_03E8 = reinterpret_cast(window); + this->secondSubChatHistoryWnd = reinterpret_cast(window); window->SetSize(300, 95); this->AddRendered(window); - reinterpret_cast(this->unknown_03E8)->SetId(131); - reinterpret_cast(this->unknown_03E8)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x924), 0, 0, 0); + reinterpret_cast(this->secondSubChatHistoryWnd)->SetId(131); + reinterpret_cast(this->secondSubChatHistoryWnd)->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x924), 0, 0, 0); } window->Show(0); break; case WID_BATTLEMSGOPTIONWND: - window = this->unknown_03EC; + window = this->battleMsgOptionWnd; if (window == nullptr) { window = new UIBattleMsgOptionWnd(); - this->unknown_03EC = window; + this->battleMsgOptionWnd = window; window->SetSize(280, 200); window->Move(CenterOnViewportX(400), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6550,39 +6550,39 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_SUBCHATMINIWND: - window = reinterpret_cast(this->unknown_03F0); + window = reinterpret_cast(this->subChatMiniWnd); if (window == nullptr) { window = new UISubChatMiniWnd(); - this->unknown_03F0 = reinterpret_cast(window); + this->subChatMiniWnd = reinterpret_cast(window); window->SetSize(5, 5); this->AddRendered(window); } window->Show(1); break; case WID_MEMORIALDUNWND: - if (g_session.unknown_5950 == "") { + if (g_session.memorialDungeonName == "") { return nullptr; } - window = this->unknown_03F8; + window = this->memorialDunWnd; if (window == nullptr) { window = new UIMemorialDunWnd(); - this->unknown_03F8 = window; + this->memorialDunWnd = window; window->SetSize(200, 150); - if (g_session.unknown_5940 >= 0 && g_session.unknown_5944 >= 0) { - window->Move(g_session.unknown_5940, g_session.unknown_5944); + if (g_session.memorialWindowX >= 0 && g_session.memorialWindowY >= 0) { + window->Move(g_session.memorialWindowX, g_session.memorialWindowY); } else { window->Move(0, 310); } this->AddRendered(window); } window->Show(1); - g_session.unknown_593C = 1; + g_session.memorialWindowOpen = 1; break; case WID_EQUIPWND_VIEWOTHER_1: - window = this->unknown_03FC; + window = this->otherEquipWnd; if (window == nullptr) { window = new UIEquipWnd(); - this->unknown_03FC = window; + this->otherEquipWnd = window; static_cast(window)->m_viewOther = 1; window->SetSize(280, 167); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); @@ -6608,10 +6608,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (this->window_4F1EC || this->window_4F288) { break; } - window = this->unknown_0408; + window = this->escOptionWnd; if (window == nullptr) { window = new UIEscOptionWnd(); - this->unknown_0408 = window; + this->escOptionWnd = window; window->SetSize(280, 143); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(300)); this->AddRendered(window); @@ -6639,7 +6639,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window = new UIEntryQueueWnd(); window->SetSize(350, 350); this->AddRendered(window); - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_0944), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->battlefieldPlacement), 0, 0, 0); } window->Show(1); break; @@ -6673,10 +6673,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTSHOPMAKEWND_MODE_1: - window = this->unknown_040C; + window = this->buyingShopMakeWnd; if (window == nullptr) { window = new UIMerchantShopMakeWnd(1); - this->unknown_040C = window; + this->buyingShopMakeWnd = window; window->SetSize(360, 289); window->Move(CenterOnViewportX(185), ScaleByScreenHeight(200)); this->AddRendered(window); @@ -6686,10 +6686,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->EnsureWindow(WID_MERCHANTMIRRORITEMWND_MODE_1); break; case WID_MERCHANTMIRRORITEMWND_MODE_1: - window = reinterpret_cast(this->unknown_0410); + window = reinterpret_cast(this->buyingShopMirrorItemWnd); if (window == nullptr) { window = new UIMerchantMirrorItemWnd(1); - this->unknown_0410 = reinterpret_cast(window); + this->buyingShopMirrorItemWnd = reinterpret_cast(window); window->SetSize(280, 120); window->Move(CenterOnViewportX(0), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -6698,10 +6698,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTITEMMYSHOPWND_MODE_1: - window = this->unknown_0414; + window = this->buyingShopMyItemsWnd; if (window == nullptr) { window = new UIMerchantItemMyShopWnd(1); - this->unknown_0414 = window; + this->buyingShopMyItemsWnd = window; window->SetSize(280, 120); window->Move(0, 200); this->AddRendered(window); @@ -6710,10 +6710,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTITEMSHOPWND_MODE_1: - window = this->unknown_0418; + window = this->buyingShopItemsWnd; if (window == nullptr) { window = new UIMerchantItemShopWnd(1); - this->unknown_0418 = window; + this->buyingShopItemsWnd = window; window->SetSize(350, 120); window->Move(0, 200); this->AddRendered(window); @@ -6722,10 +6722,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTITEMPURCHASEWND_MODE_1: - window = this->unknown_041C; + window = this->buyingShopPurchaseWnd; if (window == nullptr) { window = new UIMerchantItemPurchaseWnd(1); - this->unknown_041C = window; + this->buyingShopPurchaseWnd = window; window->SetSize(280, 120); window->Move(300, 200); this->AddRendered(window); @@ -6734,10 +6734,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_MERCHANTMIRRORITEMWND_MODE_2: - window = reinterpret_cast(this->unknown_0420); + window = reinterpret_cast(this->purchaseMirrorItemWnd); if (window == nullptr) { window = new UIMerchantMirrorItemWnd(2); - this->unknown_0420 = reinterpret_cast(window); + this->purchaseMirrorItemWnd = reinterpret_cast(window); window->SetSize(280, 120); window->Move(300, 0); this->AddRendered(window); @@ -6761,10 +6761,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { const int minX = rangeX / 2; const int rangeY = g_renderer->viewport.height - 365; const int minY = rangeY / 2; - window = this->unknown_03B8; + window = this->secondPasswordInputWnd; if (window == nullptr) { window = new UISecondPasswordInputWnd(); - this->unknown_03B8 = window; + this->secondPasswordInputWnd = window; window->SetSize(540, 365); int x; int y; @@ -6781,8 +6781,8 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); } window->Show(1); - static_cast(this->unknown_03B8)->CreateKeypad(g_session.m_loginAccountId); - static_cast(this->unknown_03B8)->SetInputMode(0); + static_cast(this->secondPasswordInputWnd)->CreateKeypad(g_session.m_loginAccountId); + static_cast(this->secondPasswordInputWnd)->SetInputMode(0); break; } case WID_SECONDPASSWORDEDITWND: { @@ -6790,10 +6790,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { const int minX = rangeX / 2; const int rangeY = g_renderer->viewport.height - 365; const int minY = rangeY / 2; - window = this->unknown_03BC; + window = this->secondPasswordEditWnd; if (window == nullptr) { window = new UISecondPasswordEditWnd(); - this->unknown_03BC = window; + this->secondPasswordEditWnd = window; window->SetSize(540, 365); int x; int y; @@ -6810,8 +6810,8 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { this->AddRendered(window); } window->Show(1); - static_cast(this->unknown_03BC)->CreateKeypad(g_session.m_loginAccountId); - static_cast(this->unknown_03BC)->SetInputMode(1); + static_cast(this->secondPasswordEditWnd)->CreateKeypad(g_session.m_loginAccountId); + static_cast(this->secondPasswordEditWnd)->SetInputMode(1); break; } case WID_MERGEITEMWND: @@ -6907,10 +6907,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } break; case WID_OPENMAILBOXWND: - window = this->unknown_0450; + window = this->openMailBoxWnd; if (window == nullptr) { window = new UIOpenMailBoxWnd(); - this->unknown_0450 = window; + this->openMailBoxWnd = window; window->SetSize(43, 43); window->Move(g_renderer->viewport.width - 234, 16); this->AddRendered(window); @@ -6918,10 +6918,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_RODEXINBOXWND: - window = this->unknown_0454; + window = this->rodexInboxWnd; if (window == nullptr) { window = new UIRodexInboxWnd(); - this->unknown_0454 = window; + this->rodexInboxWnd = window; window->SetSize(309, 416); window->Move(CenterOnViewportX(100), ScaleByScreenHeight(100)); this->AddRendered(window); @@ -6929,10 +6929,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_RODEXCOMPOSEWND: - window = this->unknown_0458; + window = this->rodexComposeWnd; if (window == nullptr) { window = new UIRodexComposeWnd(); - this->unknown_0458 = window; + this->rodexComposeWnd = window; window->SetSize(300, 400); window->Move(CenterOnViewportX(120), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -6940,10 +6940,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(1); break; case WID_RODEXCONTENTSWND: - window = this->unknown_045C; + window = this->rodexContentsWnd; if (window == nullptr) { window = new UIRodexContentsWnd(); - this->unknown_045C = window; + this->rodexContentsWnd = window; window->SetSize(300, 400); window->Move(CenterOnViewportX(120), ScaleByScreenHeight(120)); this->AddRendered(window); @@ -6981,7 +6981,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Move(g_renderer->viewport.width - 480, 12); } else { window->SetSize(bitmap->image.width, bitmap->image.height); - if (this->unknown_024C) { + if (this->nCashCallWnd) { window->Move(g_renderer->viewport.width - 292, 11); } else { window->Move(g_renderer->viewport.width - bitmap->image.width - 340, 12); @@ -6992,10 +6992,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(g_serviceOptions.Get(219)); break; case WID_OPENROULLETTEWND: - window = this->unknown_0460; + window = this->openRoulletteWnd; if (window == nullptr) { window = new UIOpenRoulletteWnd(); - this->unknown_0460 = window; + this->openRoulletteWnd = window; window->SetSize(43, 43); window->Move(g_renderer->viewport.width - 187, 71); this->AddRendered(window); @@ -7003,11 +7003,11 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->Show(g_serviceOptions.Get(220)); break; case WID_ROULLETTEWND: - window = this->unknown_0464; + window = this->roulletteWnd; if (window == nullptr) { UIRoulletteWnd* roulette = new UIRoulletteWnd(); window = roulette; - this->unknown_0464 = roulette; + this->roulletteWnd = roulette; window->SetSize(640, 497); window->Move(static_cast(g_renderer->viewport.width * 0.5 - 320.0), static_cast(g_renderer->viewport.height * 0.5 - 240.0)); this->AddRendered(window); @@ -7034,7 +7034,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window->SetSize(300, 150); window->Move(g_renderer->viewport.width - 350, (g_renderer->viewport.height - 150) / 2); window->Show(1); - window->unknown_004C = 5; + window->renderLayer = 5; this->AddRendered(window); this->rendered.sort(layerGreater); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x4F1D8), 0, 0, 0); @@ -7045,7 +7045,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window = new UIMiniMapWnd(); this->window_4F1CC = window; MiniMapWndInfo* miniMapInfo = reinterpret_cast(base + 0x4F1A8); - window->SetSize(miniMapInfo->unknown_0010, miniMapInfo->unknown_0014); + window->SetSize(miniMapInfo->expandedWidth, miniMapInfo->expandedHeight); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(miniMapInfo), 0, 0, 0); window->Show(1); this->AddRendered(window); @@ -7118,7 +7118,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } window->Show(1); window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(base + 0x4F200), 0, 0, 0); - this->unknown_4F210 = true; + this->macroReporterVisible = true; break; case WID_MACROUSERINFOWND: window = this->window_4F1F4; @@ -7154,11 +7154,11 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { y = this->window_4F1CC->geometry.height + 20 + this->window_4F1CC->geometry.y; } window->Move(x, y); - window->unknown_004C = 1; + window->renderLayer = 1; this->AddRendered(window); this->rendered.sort(layerGreater); } - window->Show(g_session.unknown_61B1); + window->Show(g_session.showCameraInfo); break; case WID_LAPINEBOXWND: if (this->LookupWindow(WID_LAPINEBOXWND) == nullptr) { @@ -7184,7 +7184,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window = new UIPreviewEquipWnd(); window->SetSize(280, 260); window->Move(static_cast((g_renderer->viewport.width - 280) * g_depthAverageHalf), static_cast((g_renderer->viewport.height - 260) * g_depthAverageHalf)); - window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->unknown_4F220), 0, 0, 0); + window->SendMsg(nullptr, UM_SETINFO, reinterpret_cast(this->previewEquipPlacement), 0, 0, 0); this->AddRendered(window); } else { window = this->LookupWindow(WID_PREVIEWEQUIPWND); @@ -7194,13 +7194,13 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { const int x = static_cast((g_renderer->viewport.width - 264) * g_depthAverageHalf); const int y = static_cast((g_renderer->viewport.height - 346) * g_depthAverageHalf); this->EnsureWindow(WID_ITEMWND); - if (this->unknown_01D4) { - this->unknown_01D4->Move(x + 264, y - this->unknown_01D4->geometry.height + 346); + if (this->itemWnd) { + this->itemWnd->Move(x + 264, y - this->itemWnd->geometry.height + 346); } - if (this->unknown_0454) { + if (this->rodexInboxWnd) { this->CloseWindow(WID_RODEXCOMPOSEWND); this->CloseWindow(WID_RODEXCONTENTSWND); - this->unknown_0454->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_AURA_EFFECT_ON)), 255, 0, 0, 0); } if (this->window_0448) { @@ -7306,7 +7306,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { } window->Show(1); this->CloseWindow(WID_NOTIFYQUESTWND); - this->unknown_0568 = 1; + this->questWndVisible = 1; break; case WID_RENEWDETAILQUESTINFOWND: this->RecordWindowPacket(321); @@ -7391,7 +7391,7 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { if (this->LookupWindow(WID_NOTEWND) == nullptr) { window = new UINoteWnd(); window->SetSize(358, 275); - if (UIWindow* shop = this->unknown_02FC) { + if (UIWindow* shop = this->merchantShopMakeWnd) { window->Move(shop->geometry.width + shop->geometry.x + 5, shop->geometry.y); } else { window->Move(static_cast((g_renderer->viewport.width - 358) * 0.5), static_cast((g_renderer->viewport.height - 275) * 0.5)); @@ -7416,13 +7416,13 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { const int x = static_cast((g_renderer->viewport.width - 400) * g_depthAverageHalf - 100.0f); const int y = static_cast((g_renderer->viewport.height - 330) * g_depthAverageHalf); this->EnsureWindow(WID_ITEMWND); - if (this->unknown_01D4) { - this->unknown_01D4->Move(x + 400, y - this->unknown_01D4->geometry.height + 330); + if (this->itemWnd) { + this->itemWnd->Move(x + 400, y - this->itemWnd->geometry.height + 330); } - if (this->unknown_0454) { + if (this->rodexInboxWnd) { this->CloseWindow(WID_RODEXCOMPOSEWND); this->CloseWindow(WID_RODEXCONTENTSWND); - this->unknown_0454->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_CANNOT_OPEN_BANKING_DURING_GRADE_ENCHANT)), 255, 0, 0, 0); } if (this->window_0448) { @@ -7535,10 +7535,10 @@ UIWindow* UIWindowMgr::EnsureWindow(int id) { window = this->LookupWindow(WID_RUNESYSTEMWND); if (window == nullptr) { g_runeSystemMgr->SendRequest(0xBCB, nullptr, -1); - if (this->unknown_0454) { + if (this->rodexInboxWnd) { this->CloseWindow(WID_RODEXCOMPOSEWND); this->CloseWindow(WID_RODEXCONTENTSWND); - this->unknown_0454->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); + this->rodexInboxWnd->SendMsg(nullptr, UM_COMMAND, ID_CLOSE, 0, 0, 0); this->SendNotice(UIM_PUSHINTOCHATHISTORY, reinterpret_cast(LookupMessage(MSI_NOTIFY_ALLY_GUILD_ACCEPT_WND)), 255, 0, 0, 0); } if (this->window_0448) { diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index a98688dfd..5c73cd9ee 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -25,7 +25,7 @@ struct ModeDragState; struct WindowTextEntry { /* 0000 */ std::string text; - /* 0018 */ std::uint32_t unknown_0018; + /* 0018 */ std::uint32_t color; }; struct WindowTextRecord { @@ -61,25 +61,25 @@ public: /* 0018 */ std::list windowHistory; /* 0020 */ int lastWindowId; /* 0024 */ unsigned char inputSuggestionsEnabled; - /* 0025 */ unsigned char unknown_0025; + /* 0025 */ unsigned char imeInputActive; /* 0026 */ unsigned char chatModeChanged; /* 0028 */ std::map retainedWindows; - /* 0030 */ int unknown_0030; - /* 0034 */ int unknown_0034; - /* 0038 */ int unknown_0038; - /* 003C */ int unknown_003C; + /* 0030 */ int chatWndX; + /* 0034 */ int chatWndY; + /* 0038 */ int chatWndHeight; + /* 003C */ int chatWndVisible; /* 0040 */ int unknown_0040; /* 0044 */ int unknown_0044; - /* 0048 */ int unknown_0048; - /* 004C */ int unknown_004C; - /* 0050 */ float unknown_0050; - /* 0054 */ unsigned char unknown_0054; + /* 0048 */ int skillDescriptionVisible; + /* 004C */ int chatWndStatus; + /* 0050 */ float minimapZoom; + /* 0054 */ unsigned char minimapMarkersVisible; /* 0055 */ unsigned char unknown_0055[3]; - /* 0058 */ int unknown_0058; - /* 005C */ std::uint32_t unknown_005C; - /* 0060 */ int unknown_0060; - /* 0064 */ int unknown_0064; - /* 0068 */ int unknown_0068; + /* 0058 */ int itemStoreWindowCount; + /* 005C */ std::uint32_t minimapColor; + /* 0060 */ int drawCompass; + /* 0064 */ int dragAllItems; + /* 0068 */ int compactCompositionLayout; /* 006C */ int unknown_006C; /* 0070 */ int unknown_0070; /* 0074 */ int unknown_0074; @@ -155,234 +155,234 @@ public: /* 01A0 */ UIWindow* hoverWindow; /* 01A4 */ std::deque modalWindows; /* 01B8 */ UIWindow* window_01B8; - /* 01BC */ UIWindow* unknown_01BC; - /* 01C0 */ UIWindow* unknown_01C0; - /* 01C4 */ UIWindow* unknown_01C4; + /* 01BC */ UIWindow* loadingWnd; + /* 01C0 */ UIWindow* minimapZoomWnd; + /* 01C4 */ UIWindow* statusWnd; /* 01C8 */ UIWindow* window_01C8; /* 01CC */ UIWindow* window_01CC; /* 01D0 */ UIWindow* window_01D0; - /* 01D4 */ UIWindow* unknown_01D4; + /* 01D4 */ UIWindow* itemWnd; /* 01D8 */ std::uint32_t unknown_01D8; - /* 01DC */ UIWindow* unknown_01DC; - /* 01E0 */ UIWindow* unknown_01E0; - /* 01E4 */ UIWindow* unknown_01E4; + /* 01DC */ UIWindow* basicInfoWnd; + /* 01E0 */ UIWindow* equipWnd; + /* 01E4 */ UIWindow* nCashWnd; /* 01E8 */ UIWindow* window_01E8; /* 01EC */ UIWindow* window_01EC; - /* 01F0 */ UIWindow* unknown_01F0; - /* 01F4 */ UIWindow* unknown_01F4; - /* 01F8 */ UIWindow* unknown_01F8; - /* 01FC */ UIWindow* unknown_01FC; - /* 0200 */ UIWindow* unknown_0200; - /* 0204 */ UIWindow* unknown_0204; - /* 0208 */ UIWindow* unknown_0208; - /* 020C */ UIWindow* unknown_020C; - /* 0210 */ UIWindow* unknown_0210; - /* 0214 */ UIWindow* unknown_0214; - /* 0218 */ UIWindow* unknown_0218; - /* 021C */ UIWindow* unknown_021C; - /* 0220 */ UIWindow* unknown_0220; - /* 0224 */ UIWindow* unknown_0224; - /* 0228 */ UIWindow* unknown_0228; - /* 022C */ UIWindow* unknown_022C; + /* 01F0 */ UIWindow* sayDialogWnd; + /* 01F4 */ UIWindow* sayDialogOverlayWnd; + /* 01F8 */ UIWindow* choose3Wnd; + /* 01FC */ UIWindow* itemIdentifyWnd; + /* 0200 */ UIWindow* itemRepairWnd; + /* 0204 */ UIWindow* weaponRefineWnd; + /* 0208 */ UIWindow* itemCompositionWnd; + /* 020C */ UIWindow* chooseWarpWnd; + /* 0210 */ UIWindow* menuWnd; + /* 0214 */ UIWindow* comboBoxWnd; + /* 0218 */ UIWindow* itemCollectionWnd; + /* 021C */ UIWindow* comboBoxIDWnd; + /* 0220 */ UIWindow* itemCollectionComparisonWnd; + /* 0224 */ UIWindow* combinedCardItemCollectionComparisonWnd; + /* 0228 */ UIWindow* combinedCardItemCollectionWnd; + /* 022C */ UIWindow* itemParamChangeDisplayWnd; /* 0230 */ UIWindow* window_0230; - /* 0234 */ UIWindow* unknown_0234; - /* 0238 */ UIWindow* unknown_0238; - /* 023C */ UIWindow* unknown_023C; - /* 0240 */ UIWindow* unknown_0240; - /* 0244 */ UIWindow* unknown_0244; - /* 0248 */ UIWindow* unknown_0248; - /* 024C */ UIWindow* unknown_024C; - /* 0250 */ UIWindow* unknown_0250; - /* 0254 */ UIWindow* unknown_0254; - /* 0258 */ UIWindow* unknown_0258; - /* 025C */ UIWindow* unknown_025C; - /* 0260 */ UIWindow* unknown_0260; - /* 0264 */ UIWindow* unknown_0264; - /* 0268 */ UIWindow* unknown_0268; - /* 026C */ UIWindow* unknown_026C; + /* 0234 */ UIWindow* quitWnd; + /* 0238 */ UIWindow* restartWnd; + /* 023C */ UIWindow* cardItemIllustWnd; + /* 0240 */ UIWindow* notifyLevelUpWnd; + /* 0244 */ UIWindow* notifyJobLevelUpWnd; + /* 0248 */ UIWindow* notifyQuestWnd; + /* 024C */ UIWindow* nCashCallWnd; + /* 0250 */ UIWindow* itemShopWnd; + /* 0254 */ UIWindow* itemShopWnd2; + /* 0258 */ UIWindow* itemPurchaseWnd; + /* 025C */ UIWindow* itemSellWnd; + /* 0260 */ UIWindow* itemSellWnd2; + /* 0264 */ UIWindow* chooseSellBuyWnd; + /* 0268 */ UIWindow* paraItemShopWnd; + /* 026C */ UIWindow* paraItemPurchaseWnd; /* 0270 */ UIWindow* window_0270; /* 0274 */ UIWindow* window_0274; /* 0278 */ UIWindow* window_0278; /* 027C */ UIWindow* window_027C; - /* 0280 */ UIWindow* unknown_0280; - /* 0284 */ UIWindow* unknown_0284; + /* 0280 */ UIWindow* passwordWnd; + /* 0284 */ UIWindow* exchangeAcceptWnd; /* 0288 */ UIWindow* window_0288; - /* 028C */ UIWindow* unknown_028C[7]; - /* 02A8 */ UIWindow* unknown_02A8; - /* 02AC */ UIWindow* unknown_02AC; - /* 02B0 */ UIWindow* unknown_02B0; - /* 02B4 */ UIWindow* unknown_02B4; - /* 02B8 */ UIWindow* unknown_02B8; - /* 02BC */ UIWindow* unknown_02BC; - /* 02C0 */ UIWindow* unknown_02C0; + /* 028C */ UIWindow* itemStoreTabWnds[7]; + /* 02A8 */ UIWindow* itemStoreLastTabWnd; + /* 02AC */ UIWindow* itemStoreFindWnd; + /* 02B0 */ UIWindow* seekPartyWnd; + /* 02B4 */ UIWindow* seekPartyMessageWnd; + /* 02B8 */ UIWindow* jobListWnd; + /* 02BC */ UIWindow* seekPartyListWnd; + /* 02C0 */ UIWindow* partyBookingHelpWnd; /* 02C4 */ UIWindow* window_02C4; /* 02C8 */ UIWindow* window_02C8; - /* 02CC */ UIWindow* unknown_02CC; - /* 02D0 */ UIWindow* unknown_02D0; - /* 02D4 */ UIWindow* unknown_02D4; - /* 02D8 */ UIWindow* unknown_02D8; - /* 02DC */ UIWindow* unknown_02DC; - /* 02E0 */ UIWindow* unknown_02E0; - /* 02E4 */ UIWindow* unknown_02E4; - /* 02E8 */ UIWindow* unknown_02E8; - /* 02EC */ UIWindow* unknown_02EC; - /* 02F0 */ UIWindow* unknown_02F0; - /* 02F4 */ UIWindow* unknown_02F4; - /* 02F8 */ std::uint32_t unknown_02F8; - /* 02FC */ UIWindow* unknown_02FC; - /* 0300 */ UIWindow* unknown_0300; - /* 0304 */ UIWindow* unknown_0304; - /* 0308 */ UIWindow* unknown_0308; - /* 030C */ UIWindow* unknown_030C; - /* 0310 */ UIWindow* unknown_0310; - /* 0314 */ UIWindow* unknown_0314; - /* 0318 */ UIWindow* unknown_0318; - /* 031C */ UIWindow* unknown_031C; + /* 02CC */ UIWindow* joinPartyAcceptWnd; + /* 02D0 */ UIWindow* coupleAcceptWnd; + /* 02D4 */ UIWindow* starPlaceAcceptWnd; + /* 02D8 */ UIWindow* mixAcceptWnd; + /* 02DC */ UIWindow* yourItemWnd; + /* 02E0 */ UIWindow* babyAcceptWnd; + /* 02E4 */ UIWindow* babyAcceptWnd2; + /* 02E8 */ UIWindow* joinGuildAcceptWnd; + /* 02EC */ UIWindow* allyGuildAcceptWnd; + /* 02F0 */ UIWindow* tipOfTheDayWnd; + /* 02F4 */ UIWindow* merchantItemWnd; + /* 02F8 */ std::uint32_t merchantMirrorItemWnd; + /* 02FC */ UIWindow* merchantShopMakeWnd; + /* 0300 */ UIWindow* merchantItemShopWnd; + /* 0304 */ UIWindow* merchantItemMyShopWnd; + /* 0308 */ UIWindow* merchantItemPurchaseWnd; + /* 030C */ UIWindow* partySettingWnd; + /* 0310 */ UIWindow* skillNameChangeWnd; + /* 0314 */ UIWindow* npcEditDialogWnd; + /* 0318 */ UIWindow* npcTextEditDialogWnd; + /* 031C */ UIWindow* notifyItemObtainWnd; /* 0320 */ UIWindow* window_0320; /* 0324 */ UIWindow* window_0324; - /* 0328 */ UIWindow* unknown_0328; + /* 0328 */ UIWindow* guildPositionManageWnd; /* 032C */ UIWindow* window_032C; - /* 0330 */ UIWindow* unknown_0330; - /* 0334 */ UIWindow* unknown_0334; - /* 0338 */ UIWindow* unknown_0338; - /* 033C */ UIWindow* unknown_033C; - /* 0340 */ UIWindow* unknown_0340; - /* 0344 */ UIWindow* unknown_0344; - /* 0348 */ UIWindow* unknown_0348; - /* 034C */ UIWindow* unknown_034C[10]; - /* 0374 */ UIWindow* unknown_0374; - /* 0378 */ UIWindow* unknown_0378; - /* 037C */ UIWindow* unknown_037C; - /* 0380 */ UIWindow* unknown_0380; - /* 0384 */ UIWindow* unknown_0384; + /* 0330 */ UIWindow* guildBanishedMemberWnd; + /* 0334 */ UIWindow* guildNoticeWnd; + /* 0338 */ UIWindow* guildTotalInfoWnd; + /* 033C */ UIWindow* friendOptionWnd; + /* 0340 */ UIWindow* guildLeaveReasonDescWnd; + /* 0344 */ UIWindow* guildBanReasonDescWnd; + /* 0348 */ UIWindow* illustWnd; + /* 034C */ UIWindow* multiIllustWnds[10]; + /* 0374 */ UIWindow* makeTargetListWnd; + /* 0378 */ UIWindow* makeTargetProcessWnd; + /* 037C */ UIWindow* makeTargetResultWnd; + /* 0380 */ UIWindow* emotionWnd; + /* 0384 */ UIWindow* cashEmotionListWnd; /* 0388 */ UIWindow* window_0388; /* 038C */ UIWindow* window_038C; - /* 0390 */ UIWindow* unknown_0390; - /* 0394 */ UIWindow* unknown_0394; - /* 0398 */ UIWindow* unknown_0398; - /* 039C */ UIWindow* unknown_039C; - /* 03A0 */ UIWindow* unknown_03A0; + /* 0390 */ UIWindow* petEggListWnd; + /* 0394 */ UIWindow* petTamingDeceiveWnd; + /* 0398 */ UIWindow* makingArrowListWnd; + /* 039C */ UIWindow* selectCartWnd; + /* 03A0 */ UIWindow* spellListWnd; /* 03A4 */ UIWindow* window_03A4; - /* 03A8 */ UIWindow* unknown_03A8; + /* 03A8 */ UIWindow* compositionWnd; /* 03AC */ UIWindow* window_03AC; - /* 03B0 */ UIWindow* unknown_03B0; - /* 03B4 */ UIWindow* unknown_03B4; - /* 03B8 */ UIWindow* unknown_03B8; - /* 03BC */ UIWindow* unknown_03BC; + /* 03B0 */ UIWindow* bookWnd; + /* 03B4 */ UIWindow* joinFriendAcceptWnd; + /* 03B8 */ UIWindow* secondPasswordInputWnd; + /* 03BC */ UIWindow* secondPasswordEditWnd; /* 03C0 */ UIWindow* window_03C0; /* 03C4 */ UIWindow* window_03C4; /* 03C8 */ UIWindow* window_03C8; /* 03CC */ UIWindow* window_03CC; - /* 03D0 */ UIWindow* unknown_03D0; + /* 03D0 */ UIWindow* autoMessageWnd; /* 03D4 */ UIWindow* window_03D4; /* 03D8 */ UIWindow* window_03D8; /* 03DC */ UIWindow* window_03DC; - /* 03E0 */ UIWindow* unknown_03E0; - /* 03E4 */ std::uint32_t unknown_03E4; - /* 03E8 */ std::uint32_t unknown_03E8; - /* 03EC */ UIWindow* unknown_03EC; - /* 03F0 */ std::uint32_t unknown_03F0; - /* 03F4 */ unsigned short unknown_03F4; - /* 03F6 */ unsigned char unknown_03F6; + /* 03E0 */ UIWindow* rebirthWnd; + /* 03E4 */ std::uint32_t subChatHistoryWnd; + /* 03E8 */ std::uint32_t secondSubChatHistoryWnd; + /* 03EC */ UIWindow* battleMsgOptionWnd; + /* 03F0 */ std::uint32_t subChatMiniWnd; + /* 03F4 */ unsigned short chatWndStickOn; + /* 03F6 */ unsigned char battleSubChatEnabled; /* 03F7 */ unsigned char unknown_03F7; - /* 03F8 */ UIWindow* unknown_03F8; - /* 03FC */ UIWindow* unknown_03FC; + /* 03F8 */ UIWindow* memorialDunWnd; + /* 03FC */ UIWindow* otherEquipWnd; /* 0400 */ UIWindow* modal; - /* 0404 */ UIWindow* unknown_0404; - /* 0408 */ UIWindow* unknown_0408; - /* 040C */ UIWindow* unknown_040C; - /* 0410 */ std::uint32_t unknown_0410; - /* 0414 */ UIWindow* unknown_0414; - /* 0418 */ UIWindow* unknown_0418; - /* 041C */ UIWindow* unknown_041C; - /* 0420 */ std::uint32_t unknown_0420; - /* 0424 */ UIWindow* unknown_0424; + /* 0404 */ UIWindow* hotkeyWnd; + /* 0408 */ UIWindow* escOptionWnd; + /* 040C */ UIWindow* buyingShopMakeWnd; + /* 0410 */ std::uint32_t buyingShopMirrorItemWnd; + /* 0414 */ UIWindow* buyingShopMyItemsWnd; + /* 0418 */ UIWindow* buyingShopItemsWnd; + /* 041C */ UIWindow* buyingShopPurchaseWnd; + /* 0420 */ std::uint32_t purchaseMirrorItemWnd; + /* 0424 */ UIWindow* monsterDisplayWnd; /* 0428 */ UIWindow* window_0428; - /* 042C */ UIWindow* unknown_042C; - /* 0430 */ UIWindow* unknown_0430; - /* 0434 */ UIWindow* unknown_0434; - /* 0438 */ UIWindow* unknown_0438; - /* 043C */ UIWindow* unknown_043C; + /* 042C */ UIWindow* partyInvitationToWnd; + /* 0430 */ UIWindow* guildHelperWnd; + /* 0434 */ UIWindow* guildTipWnd; + /* 0438 */ UIWindow* createGuildWnd; + /* 043C */ UIWindow* createGuildAlternateWnd; /* 0440 */ std::uint32_t unknown_0440; /* 0444 */ UIWindow* window_0444; /* 0448 */ UIWindow* window_0448; /* 044C */ UIWindow* window_044C; - /* 0450 */ UIWindow* unknown_0450; - /* 0454 */ UIWindow* unknown_0454; - /* 0458 */ UIWindow* unknown_0458; - /* 045C */ UIWindow* unknown_045C; - /* 0460 */ UIWindow* unknown_0460; - /* 0464 */ UIRoulletteWnd* unknown_0464; + /* 0450 */ UIWindow* openMailBoxWnd; + /* 0454 */ UIWindow* rodexInboxWnd; + /* 0458 */ UIWindow* rodexComposeWnd; + /* 045C */ UIWindow* rodexContentsWnd; + /* 0460 */ UIWindow* openRoulletteWnd; + /* 0464 */ UIRoulletteWnd* roulletteWnd; /* 0468 */ UIWindow* window_0468; - /* 046C */ int unknown_046C; - /* 0470 */ int unknown_0470; - /* 0474 */ int unknown_0474; - /* 0478 */ UIWindow* unknown_0478; - /* 047C */ int unknown_047C; - /* 0480 */ int unknown_0480; + /* 046C */ int previousMouseX; + /* 0470 */ int previousMouseY; + /* 0474 */ int modalResponse; + /* 0478 */ UIWindow* backgroundSurface; + /* 047C */ int screenWidth; + /* 0480 */ int screenHeight; /* 0484 */ std::string unknown_0484; - /* 049C */ short unknown_049C; - /* 049E */ short unknown_049E; - /* 04A0 */ POINTS unknown_04A0; - /* 04A4 */ POINTS unknown_04A4; - /* 04A8 */ POINTS unknown_04A8; - /* 04AC */ POINTS unknown_04AC; - /* 04B0 */ unsigned char unknown_04B0; + /* 049C */ short loginGridX; + /* 049E */ short loginGridY; + /* 04A0 */ POINTS loginSidePanelOffset; + /* 04A4 */ POINTS loginBottomPanelOffset; + /* 04A8 */ POINTS loginButtonPanelOffset; + /* 04AC */ POINTS loginExtraPanelOffset; + /* 04B0 */ unsigned char loginDragRegion; /* 04B1 */ unsigned char unknown_04B1[3]; - /* 04B4 */ int unknown_04B4; - /* 04B8 */ int unknown_04B8; - /* 04BC */ int unknown_04BC; - /* 04C0 */ int unknown_04C0; - /* 04C4 */ std::list unknown_04C4; + /* 04B4 */ int gradeImageWidth; + /* 04B8 */ int gradeImageHeight; + /* 04BC */ int gradeImageX; + /* 04C0 */ int gradeImageY; + /* 04C4 */ std::list pendingNoticeLines; /* 04CC */ std::list unknown_04CC; /* 04D4 */ std::list unknown_04D4; - /* 04DC */ std::string unknown_04DC; + /* 04DC */ std::string chatInputText; /* 04F4 */ int unknown_04F4; /* 04F8 */ int unknown_04F8; - /* 04FC */ int unknown_04FC; + /* 04FC */ int framesInvalidated; /* 0500 */ std::map namedWindows; - /* 0508 */ int unknown_0508; + /* 0508 */ int windowVisibilityState; /* 050C */ std::list hiddenWindows; - /* 0514 */ unsigned char unknown_0514[0x12]; + /* 0514 */ unsigned char basicInfoPlacement[0x12]; /* 0526 */ bool unknown_0526; /* 0527 */ unsigned char unknown_0527[0x25]; - /* 054C */ int unknown_054C; + /* 054C */ int itemWndVisible; /* 0550 */ unsigned char unknown_0550[0x18]; - /* 0568 */ int unknown_0568; + /* 0568 */ int questWndVisible; /* 056C */ unsigned char unknown_056C[0x1C]; - /* 0588 */ int unknown_0588; + /* 0588 */ int statusWndVisible; /* 058C */ unsigned char unknown_058C[0x18]; - /* 05A4 */ int unknown_05A4; + /* 05A4 */ int equipWndVisible; /* 05A8 */ unsigned char unknown_05A8[0x14]; - /* 05BC */ int unknown_05BC; + /* 05BC */ int optionWndVisible; /* 05C0 */ unsigned char unknown_05C0[0x10]; - /* 05D0 */ int unknown_05D0; + /* 05D0 */ int shortenItemWndVisible; /* 05D4 */ unsigned char unknown_05D4[0x168]; - /* 073C */ int unknown_073C; - /* 0740 */ unsigned char unknown_0740[0x08]; + /* 073C */ int messengerGroupWndVisible; + /* 0740 */ unsigned char messengerPartyTabState[0x08]; /* 0748 */ NormalItemSlotWindow m_normalItemSlotWindow; /* 075C */ unsigned char unknown_075C[0x20]; - /* 077C */ int unknown_077C; - /* 0780 */ unsigned char unknown_0780[0x10]; - /* 0790 */ int unknown_0790; - /* 0794 */ unsigned char unknown_0794[0xB4]; + /* 077C */ int skillListWndVisible; + /* 0780 */ unsigned char merchantItemPlacement[0x10]; + /* 0790 */ int merchantItemWndVisible; + /* 0794 */ unsigned char merchantMirrorItemPlacement[0xB4]; /* 0848 */ WindowPlacement m_whisperPlacement; /* 0858 */ unsigned char unknown_0858[0x94]; - /* 08EC */ int unknown_08EC; + /* 08EC */ int homunculusSkillWndVisible; /* 08F0 */ unsigned char unknown_08F0[0x20]; - /* 0910 */ int unknown_0910; + /* 0910 */ int mercenarySkillWndVisible; /* 0914 */ unsigned char unknown_0914[0x20]; - /* 0934 */ unsigned char unknown_0934[0x10]; - /* 0944 */ unsigned char unknown_0944[0x80]; + /* 0934 */ unsigned char hotkeyPlacement[0x10]; + /* 0944 */ unsigned char battlefieldPlacement[0x80]; /* 09C4 */ std::map browsers; /* 09CC */ CWebBrowser* activeBrowser; /* 09D0 */ CWebBrowser* specialBrowser; - /* 09D4 */ unsigned char unknown_09D4[0x10]; + /* 09D4 */ unsigned char entryQueueStandbyPlacement[0x10]; /* 09E4 */ std::vector messageBoxes; /* 09F0 */ unsigned char unknown_09F0[0x40]; /* 0A30 */ UIWindow* window_0A30; /* 0A34 */ WindowPolicyEntry policy[10041]; - /* 4F154 */ unsigned char unknown_4F154[16]; + /* 4F154 */ unsigned char navigationPlacement[16]; /* 4F164 */ UIWindow* window_4F164; /* 4F168 */ UIWindow* window_4F168; /* 4F16C */ UIWindow* window_4F16C; @@ -415,14 +415,14 @@ public: /* 4F1F8 */ UIWindow* window_4F1F8; /* 4F1FC */ UIWindow* window_4F1FC; /* 4F200 */ unsigned char unknown_4F200[16]; - /* 4F210 */ bool unknown_4F210; + /* 4F210 */ bool macroReporterVisible; /* 4F211 */ bool unknown_4F211; /* 4F214 */ std::vector unknown_4F214; - /* 4F220 */ unsigned char unknown_4F220[0x18]; - /* 4F238 */ int unknown_4F238; - /* 4F23C */ int unknown_4F23C; + /* 4F220 */ unsigned char previewEquipPlacement[0x18]; + /* 4F238 */ int miniPartyWidth; + /* 4F23C */ int miniPartyHeight; /* 4F240 */ std::list snapExcluded; - /* 4F248 */ std::list unknown_4F248; + /* 4F248 */ std::list closedMiniPartyIds; /* 4F250 */ UIWindow* window_4F250; /* 4F254 */ UIWindow* window_4F254; /* 4F258 */ UIWindow* window_4F258; @@ -638,10 +638,10 @@ static_assert(offsetof(UIWindowMgr, window_01E8) == 0x1E8); static_assert(offsetof(UIWindowMgr, window_0230) == 0x230); static_assert(offsetof(UIWindowMgr, modal) == 0x400); static_assert(offsetof(UIWindowMgr, unknown_0484) == 0x484); -static_assert(offsetof(UIWindowMgr, unknown_04C4) == 0x4C4); +static_assert(offsetof(UIWindowMgr, pendingNoticeLines) == 0x4C4); static_assert(offsetof(UIWindowMgr, unknown_04CC) == 0x4CC); static_assert(offsetof(UIWindowMgr, unknown_04D4) == 0x4D4); -static_assert(offsetof(UIWindowMgr, unknown_04DC) == 0x4DC); +static_assert(offsetof(UIWindowMgr, chatInputText) == 0x4DC); static_assert(offsetof(UIWindowMgr, namedWindows) == 0x500); static_assert(offsetof(UIWindowMgr, hiddenWindows) == 0x50C); static_assert(offsetof(UIWindowMgr, browsers) == 0x9C4); @@ -651,7 +651,7 @@ static_assert(offsetof(UIWindowMgr, savedRectangles) == 0x4F190); static_assert(offsetof(UIWindowMgr, overlays) == 0x4F198); static_assert(offsetof(UIWindowMgr, unknown_4F214) == 0x4F214); static_assert(offsetof(UIWindowMgr, snapExcluded) == 0x4F240); -static_assert(offsetof(UIWindowMgr, unknown_4F248) == 0x4F248); +static_assert(offsetof(UIWindowMgr, closedMiniPartyIds) == 0x4F248); static_assert(offsetof(UIWindowMgr, savedWindowIds) == 0x4F280); static_assert(offsetof(UIWindowMgr, deferredDeletion) == 0x4F28C); static_assert(offsetof(UIWindowMgr, window_4F2AC) == 0x4F2AC); diff --git a/Source/UI/Window/UIWindowMgr.inl b/Source/UI/Window/UIWindowMgr.inl index ce520a1c2..b6a0e1324 100644 --- a/Source/UI/Window/UIWindowMgr.inl +++ b/Source/UI/Window/UIWindowMgr.inl @@ -8,7 +8,7 @@ // INLINED inline bool UIWindowMgr::ShowShortcutWindow(int value) { - if (g_replayAnimationScaling && !Replay::Instance().header.options.unknown_0007) { + if (g_replayAnimationScaling && !Replay::Instance().header.options.showItemSlots) { return false; } diff --git a/Source/UI/Window/UIWordDisplayWnd.cpp b/Source/UI/Window/UIWordDisplayWnd.cpp index 45f435d7e..dd9728926 100644 --- a/Source/UI/Window/UIWordDisplayWnd.cpp +++ b/Source/UI/Window/UIWordDisplayWnd.cpp @@ -40,7 +40,7 @@ void UIWordDisplayWnd::OnProcess() { this->screenY = screenY; this->screenX = screenX; - const float scale = actor->render.unknown_005C; + const float scale = actor->render.distanceScale; const int y = static_cast(screenY - static_cast(g_renderer->viewport.height * 100 / 480) * scale); const int x = static_cast(screenX - static_cast(g_renderer->viewport.width * 5 / 640) * scale); this->Move(x, y); diff --git a/Source/UI/Window/UIZeroChatWnd.cpp b/Source/UI/Window/UIZeroChatWnd.cpp index 67b6e4ba4..ccf0a02c8 100644 --- a/Source/UI/Window/UIZeroChatWnd.cpp +++ b/Source/UI/Window/UIZeroChatWnd.cpp @@ -85,11 +85,11 @@ void UIGuild_Storage_Log::OnCreate(int width, int height) { this->AddChild(button); } - this->unknown_0158 = new UITabControl(); - this->unknown_0158->Configure(1, 20, 50, 1, 0, 0, 0, 0, 0, 0, 0, 0); - this->unknown_0158->Move(0, 17); - this->AddChild(this->unknown_0158); - this->unknown_0158->AddTab(LookupMessage(MSI_GUILD_STORAGE_LOG_WND_NAME), ""); - this->unknown_0158->AddTab(LookupMessage(MSI_GUILD_STORAGE_LOG_CAUTION), ""); - this->unknown_0158->AddTab(LookupMessage(MSI_GUILD_STORAGE_CLOSE_TIMEOUT), ""); + this->m_tabs = new UITabControl(); + this->m_tabs->Configure(1, 20, 50, 1, 0, 0, 0, 0, 0, 0, 0, 0); + this->m_tabs->Move(0, 17); + this->AddChild(this->m_tabs); + this->m_tabs->AddTab(LookupMessage(MSI_GUILD_STORAGE_LOG_WND_NAME), ""); + this->m_tabs->AddTab(LookupMessage(MSI_GUILD_STORAGE_LOG_CAUTION), ""); + this->m_tabs->AddTab(LookupMessage(MSI_GUILD_STORAGE_CLOSE_TIMEOUT), ""); } diff --git a/Source/UI/Window/WindowDialogs.cpp b/Source/UI/Window/WindowDialogs.cpp index b92d939c1..679aed0f0 100644 --- a/Source/UI/Window/WindowDialogs.cpp +++ b/Source/UI/Window/WindowDialogs.cpp @@ -13,7 +13,7 @@ // OFFSET: 0x00A90950 // FUNCTION: fn_17154 bool UIWindowMgr::ProcessDialogKey(int, int key) { - if (g_session.unknown_5480 == 0 || g_session.unknown_5488 != 0) { + if (g_session.quitBlocked == 0 || g_session.quitAllowed != 0) { return false; } @@ -150,7 +150,7 @@ int UIWindowMgr::Confirm( const char* text, int type, bool defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect ) { CMode* gameMode = g_modeMgr.GetGameMode(); - if (gameMode && static_cast(gameMode)->unknown_0624[0] == 1) { + if (gameMode && static_cast(gameMode)->isInitializing[0] == 1) { return 185; } @@ -183,7 +183,7 @@ int UIWindowMgr::Confirm( } this->hoverWindow = nullptr; - this->unknown_0474 = 0; + this->modalResponse = 0; this->modalWindows.push_back(box); int response = 184; @@ -207,15 +207,15 @@ int UIWindowMgr::Confirm( break; } - if (this->unknown_0474 != 0) { + if (this->modalResponse != 0) { if (UIWindow* active = this->Top()) { active->Show(0); this->Schedule(active); this->modalWindows.pop_back(); } - response = this->unknown_0474; - this->unknown_0474 = 0; + response = this->modalResponse; + this->modalResponse = 0; break; } @@ -226,7 +226,7 @@ int UIWindowMgr::Confirm( if (g_session.GetOption(20) > 0) { this->activeWindowId = 0; - this->unknown_0474 = 0; + this->modalResponse = 0; while (!this->modalWindows.empty()) { this->Schedule(this->modalWindows.back()); @@ -291,7 +291,7 @@ int UIWindowMgr::RunModal(UIWindow* window) { } this->hoverWindow = nullptr; - this->unknown_0474 = 0; + this->modalResponse = 0; this->modalWindows.push_back(window); int response = 184; @@ -315,15 +315,15 @@ int UIWindowMgr::RunModal(UIWindow* window) { break; } - if (this->unknown_0474 != 0) { + if (this->modalResponse != 0) { if (UIWindow* active = this->Top()) { active->Show(0); this->Schedule(active); this->modalWindows.pop_back(); } - response = this->unknown_0474; - this->unknown_0474 = 0; + response = this->modalResponse; + this->modalResponse = 0; break; } @@ -334,7 +334,7 @@ int UIWindowMgr::RunModal(UIWindow* window) { if (g_session.GetOption(20) > 0) { this->activeWindowId = 0; - this->unknown_0474 = 0; + this->modalResponse = 0; while (!this->modalWindows.empty()) { this->Schedule(this->modalWindows.back()); diff --git a/Source/UI/Window/WindowMgrState.cpp b/Source/UI/Window/WindowMgrState.cpp index 5251c33cf..745739521 100644 --- a/Source/UI/Window/WindowMgrState.cpp +++ b/Source/UI/Window/WindowMgrState.cpp @@ -64,19 +64,19 @@ UIWindow* UIWindowMgr::GetGuildWindow() { if (this->window_0324) { return this->window_0324; } - if (this->unknown_0328) { - return this->unknown_0328; + if (this->guildPositionManageWnd) { + return this->guildPositionManageWnd; } if (this->window_032C) { return this->window_032C; } - if (this->unknown_0330) { - return this->unknown_0330; + if (this->guildBanishedMemberWnd) { + return this->guildBanishedMemberWnd; } - if (this->unknown_0334) { - return this->unknown_0334; + if (this->guildNoticeWnd) { + return this->guildNoticeWnd; } - return this->unknown_0338; + return this->guildTotalInfoWnd; } // OFFSET: 0x00A91670 @@ -119,14 +119,14 @@ void UIWindowMgr::HideWindow01C8() { // OFFSET: 0x00A91D90 // FUNCTION: fn_17172 bool CGameActor::HasUnknown030CEntry() { - const int* entry = reinterpret_cast(this->unknown_030C); + const int* entry = reinterpret_cast(this->homunAI); return entry && entry[1] != 0; } // OFFSET: 0x00A91F60 // FUNCTION: fn_17175 void UIWindowMgr::RestoreMiniPartyWindows() { - const int count = static_cast(g_session.unknown_0734.size()); + const int count = static_cast(g_session.miniPartyRecords.size()); for (int index = 0; index < count; ++index) { MessengerMember member = g_session.PartyAt(index); if (member.valid == 0) { @@ -136,7 +136,7 @@ void UIWindowMgr::RestoreMiniPartyWindows() { const SessionRecord0734 record = g_session.FindRecord0734(member.accountId); UIMiniPartyWnd* window = new UIMiniPartyWnd(); window->SetSize(174, 52); - window->m_cell = record.unknown_0008; + window->m_cell = record.cell; this->AddMiniPartyWindow(window); window->SendMsg(nullptr, UM_REFRESHITEM, reinterpret_cast(&member), 0, 0, 0); } @@ -166,7 +166,7 @@ void UIWindowMgr::LoadShortcutItems() { DWORD type = REG_SZ; DWORD size = 32; char name[36]; - std::sprintf(name, "SITEM%d%d%d", index, g_serviceType, g_session.unknown_0F50); + std::sprintf(name, "SITEM%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); char description[33] = {}; LSTATUS result = RegQueryValueExA(key, name, nullptr, &type, reinterpret_cast(description), &size); int hasSkillLevel = 0; @@ -183,7 +183,7 @@ void UIWindowMgr::LoadShortcutItems() { type = REG_DWORD; size = 4; - std::sprintf(name, "S_SKILL_USE_LEVEL%d%d%d", index, g_serviceType, g_session.unknown_0F50); + std::sprintf(name, "S_SKILL_USE_LEVEL%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); DWORD level = 0; if (RegQueryValueExA(key, name, nullptr, &type, reinterpret_cast(&level), &size) == ERROR_SUCCESS) { g_session.SetHotkeySkillLevel(level, index); @@ -219,21 +219,21 @@ void UIWindowMgr::LoadUIRectInfo() { DWORD size = 4; char name[256]; - RegQueryValueExA(key, "m_minimapZoomWnd", nullptr, &type, reinterpret_cast(&this->unknown_0050), &size); - if (RegQueryValueExA(key, "M_ISDRAGALL", nullptr, &type, reinterpret_cast(&this->unknown_0064), &size) != ERROR_SUCCESS || this->unknown_0064 != 0) { - this->unknown_0064 = 1; + RegQueryValueExA(key, "m_minimapZoomWnd", nullptr, &type, reinterpret_cast(&this->minimapZoom), &size); + if (RegQueryValueExA(key, "M_ISDRAGALL", nullptr, &type, reinterpret_cast(&this->dragAllItems), &size) != ERROR_SUCCESS || this->dragAllItems != 0) { + this->dragAllItems = 1; } - if (RegQueryValueExA(key, "M_ISDRAWCOMPASS", nullptr, &type, reinterpret_cast(&this->unknown_0060), &size) != ERROR_SUCCESS) { - this->unknown_0060 = 0; + if (RegQueryValueExA(key, "M_ISDRAWCOMPASS", nullptr, &type, reinterpret_cast(&this->drawCompass), &size) != ERROR_SUCCESS) { + this->drawCompass = 0; } - if (RegQueryValueExA(key, "M_MINIMAPARGB", nullptr, &type, reinterpret_cast(&this->unknown_005C), &size) != ERROR_SUCCESS || this->unknown_005C != 0xFFFFFFFF) { - this->unknown_005C = 0xAAFFFFFF; + if (RegQueryValueExA(key, "M_MINIMAPARGB", nullptr, &type, reinterpret_cast(&this->minimapColor), &size) != ERROR_SUCCESS || this->minimapColor != 0xFFFFFFFF) { + this->minimapColor = 0xAAFFFFFF; } - RegQueryValueExA(key, "M_CHATWNDSTATUS", nullptr, &type, reinterpret_cast(&this->unknown_004C), &size); - RegQueryValueExA(key, "M_CHATWNDHEIGHT", nullptr, &type, reinterpret_cast(&this->unknown_0038), &size); - RegQueryValueExA(key, "M_CHATWNDX", nullptr, &type, reinterpret_cast(&this->unknown_0030), &size); - RegQueryValueExA(key, "M_CHATWNDY", nullptr, &type, reinterpret_cast(&this->unknown_0034), &size); - RegQueryValueExA(key, "M_CHATWNDSHOW", nullptr, &type, reinterpret_cast(&this->unknown_003C), &size); + RegQueryValueExA(key, "M_CHATWNDSTATUS", nullptr, &type, reinterpret_cast(&this->chatWndStatus), &size); + RegQueryValueExA(key, "M_CHATWNDHEIGHT", nullptr, &type, reinterpret_cast(&this->chatWndHeight), &size); + RegQueryValueExA(key, "M_CHATWNDX", nullptr, &type, reinterpret_cast(&this->chatWndX), &size); + RegQueryValueExA(key, "M_CHATWNDY", nullptr, &type, reinterpret_cast(&this->chatWndY), &size); + RegQueryValueExA(key, "M_CHATWNDSHOW", nullptr, &type, reinterpret_cast(&this->chatWndVisible), &size); RegQueryValueExA(key, "SAYDIALOGWNDINFO.X", nullptr, &type, base + 0x5E4, &size); RegQueryValueExA(key, "SAYDIALOGWNDINFO.Y", nullptr, &type, base + 0x5E8, &size); RegQueryValueExA(key, "SAYDIALOGWNDINFO.W", nullptr, &type, base + 0x5EC, &size); @@ -256,45 +256,45 @@ void UIWindowMgr::LoadUIRectInfo() { RegQueryValueExA(key, "ITEMWNDINFO.CURRADIO1", nullptr, &type, base + 0x540, &size); RegQueryValueExA(key, "ITEMWNDINFO.CURRADIO2", nullptr, &type, base + 0x544, &size); RegQueryValueExA(key, "ITEMWNDINFO.CURRADIO3", nullptr, &type, base + 0x548, &size); - RegQueryValueExA(key, "ITEMWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_054C), &size); + RegQueryValueExA(key, "ITEMWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->itemWndVisible), &size); RegQueryValueExA(key, "QUESTWNDINFO.X", nullptr, &type, base + 0x550, &size); RegQueryValueExA(key, "QUESTWNDINFO.Y", nullptr, &type, base + 0x554, &size); RegQueryValueExA(key, "QUESTWNDINFO.W", nullptr, &type, base + 0x558, &size); RegQueryValueExA(key, "QUESTWNDINFO.H", nullptr, &type, base + 0x55C, &size); RegQueryValueExA(key, "QUESTWNDINFO.ORGHEIGHT", nullptr, &type, base + 0x560, &size); RegQueryValueExA(key, "QUESTWNDINFO.CURTAB", nullptr, &type, base + 0x564, &size); - RegQueryValueExA(key, "QUESTWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_0568), &size); + RegQueryValueExA(key, "QUESTWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->questWndVisible), &size); RegQueryValueExA(key, "QUESTDISPWNDINFO.QUESTDISPLAY", nullptr, &type, base + 0x570, &size); RegQueryValueExA(key, "STATUSWNDINFO.X", nullptr, &type, base + 0x574, &size); RegQueryValueExA(key, "STATUSWNDINFO.Y", nullptr, &type, base + 0x578, &size); RegQueryValueExA(key, "STATUSWNDINFO.W", nullptr, &type, base + 0x57C, &size); RegQueryValueExA(key, "STATUSWNDINFO.H", nullptr, &type, base + 0x580, &size); RegQueryValueExA(key, "STATUSWNDINFO.ORGHEIGHT", nullptr, &type, base + 0x584, &size); - if (RegQueryValueExA(key, "STATUSWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_0588), &size) != ERROR_SUCCESS) { - this->unknown_0588 = 0; + if (RegQueryValueExA(key, "STATUSWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->statusWndVisible), &size) != ERROR_SUCCESS) { + this->statusWndVisible = 0; } RegQueryValueExA(key, "EQUIPWNDINFO.X", nullptr, &type, base + 0x590, &size); RegQueryValueExA(key, "EQUIPWNDINFO.Y", nullptr, &type, base + 0x594, &size); RegQueryValueExA(key, "EQUIPWNDINFO.W", nullptr, &type, base + 0x598, &size); RegQueryValueExA(key, "EQUIPWNDINFO.H", nullptr, &type, base + 0x59C, &size); RegQueryValueExA(key, "EQUIPWNDINFO.ORGHEIGHT", nullptr, &type, base + 0x5A0, &size); - if (RegQueryValueExA(key, "EQUIPWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_05A4), &size) != ERROR_SUCCESS) { - this->unknown_05A4 = 0; + if (RegQueryValueExA(key, "EQUIPWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->equipWndVisible), &size) != ERROR_SUCCESS) { + this->equipWndVisible = 0; } RegQueryValueExA(key, "OPTIONWNDINFO.X", nullptr, &type, base + 0x5A8, &size); RegQueryValueExA(key, "OPTIONWNDINFO.Y", nullptr, &type, base + 0x5AC, &size); RegQueryValueExA(key, "OPTIONWNDINFO.W", nullptr, &type, base + 0x5B0, &size); RegQueryValueExA(key, "OPTIONWNDINFO.H", nullptr, &type, base + 0x5B4, &size); RegQueryValueExA(key, "OPTIONWNDINFO.ORGHEIGHT", nullptr, &type, base + 0x5B8, &size); - if (RegQueryValueExA(key, "OPTIONWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_05BC), &size) != ERROR_SUCCESS) { - this->unknown_05BC = 0; + if (RegQueryValueExA(key, "OPTIONWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->optionWndVisible), &size) != ERROR_SUCCESS) { + this->optionWndVisible = 0; } RegQueryValueExA(key, "SHORTENITEMWNDINFO.X", nullptr, &type, base + 0x5C0, &size); RegQueryValueExA(key, "SHORTENITEMWNDINFO.Y", nullptr, &type, base + 0x5C4, &size); RegQueryValueExA(key, "SHORTENITEMWNDINFO.W", nullptr, &type, base + 0x5C8, &size); RegQueryValueExA(key, "SHORTENITEMWNDINFO.H", nullptr, &type, base + 0x5CC, &size); - if (RegQueryValueExA(key, "SHORTENITEMWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_05D0), &size) != ERROR_SUCCESS) { - this->unknown_05D0 = 0; + if (RegQueryValueExA(key, "SHORTENITEMWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->shortenItemWndVisible), &size) != ERROR_SUCCESS) { + this->shortenItemWndVisible = 0; } RegQueryValueExA(key, "CHATROOMWNDINFO.X", nullptr, &type, base + 0x604, &size); RegQueryValueExA(key, "CHATROOMWNDINFO.Y", nullptr, &type, base + 0x608, &size); @@ -307,13 +307,13 @@ void UIWindowMgr::LoadUIRectInfo() { RegQueryValueExA(key, "ITEMSTOREWNDINFO.subWnd", nullptr, &type, base + 0x624, &size); std::memset(name, 0, sizeof(name) - 1); - RegQueryValueExA(key, "ITEMSTOREWNDNUM", nullptr, &type, reinterpret_cast(&this->unknown_0058), &size); - if (this->unknown_0058 != 8) { + RegQueryValueExA(key, "ITEMSTOREWNDNUM", nullptr, &type, reinterpret_cast(&this->itemStoreWindowCount), &size); + if (this->itemStoreWindowCount != 8) { ItemStoreFindSlotInfo* const storeSlots = reinterpret_cast(base + 0x62C); for (int index = 0; index < 8; ++index) { storeSlots[index].Reset(index); } - this->unknown_0058 = 8; + this->itemStoreWindowCount = 8; reinterpret_cast(base + 0x614)->Reset(); } else { for (int index = 0; index < 8; ++index) { @@ -364,8 +364,8 @@ void UIWindowMgr::LoadUIRectInfo() { RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.Y", nullptr, &type, base + 0x730, &size); RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.W", nullptr, &type, base + 0x734, &size); RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.H", nullptr, &type, base + 0x738, &size); - if (RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_073C), &size) != ERROR_SUCCESS) { - this->unknown_073C = 0; + if (RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->messengerGroupWndVisible), &size) != ERROR_SUCCESS) { + this->messengerGroupWndVisible = 0; } if (RegQueryValueExA(key, "MESSENGERGROUPWNDINFO.RADIO", nullptr, &type, base + 0x740, &size) != ERROR_SUCCESS) { *reinterpret_cast(base + 0x740) = 1; @@ -381,8 +381,8 @@ void UIWindowMgr::LoadUIRectInfo() { RegQueryValueExA(key, "SKILLLISTWNDINFO.Y", nullptr, &type, base + 0x770, &size); RegQueryValueExA(key, "SKILLLISTWNDINFO.W", nullptr, &type, base + 0x774, &size); RegQueryValueExA(key, "SKILLLISTWNDINFO.H", nullptr, &type, base + 0x778, &size); - if (RegQueryValueExA(key, "SKILLLISTWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->unknown_077C), &size) != ERROR_SUCCESS) { - this->unknown_077C = 0; + if (RegQueryValueExA(key, "SKILLLISTWNDINFO.SHOW", nullptr, &type, reinterpret_cast(&this->skillListWndVisible), &size) != ERROR_SUCCESS) { + this->skillListWndVisible = 0; } RegQueryValueExA(key, "MERCHANTITEMWNDINFO.X", nullptr, &type, base + 0x780, &size); RegQueryValueExA(key, "MERCHANTITEMWNDINFO.Y", nullptr, &type, base + 0x784, &size); @@ -455,11 +455,11 @@ void UIWindowMgr::LoadUIRectInfo() { RegQueryValueExA(key, "SUBCHATWNDBT.Y", nullptr, &type, base + 0x928, &size); RegQueryValueExA(key, "SUBCHATWNDBT.W", nullptr, &type, base + 0x92C, &size); RegQueryValueExA(key, "SUBCHATWNDBT.H", nullptr, &type, base + 0x930, &size); - RegQueryValueExA(key, "CHATWNDSTICKON", nullptr, &type, reinterpret_cast(&this->unknown_03F4), &size); + RegQueryValueExA(key, "CHATWNDSTICKON", nullptr, &type, reinterpret_cast(&this->chatWndStickOn), &size); RegQueryValueExA(key, "ONSTSUBCHAT", nullptr, &type, base + 0x3F5, &size); - RegQueryValueExA(key, "ONBTSUBCHAT", nullptr, &type, reinterpret_cast(&this->unknown_03F6), &size); - RegQueryValueExA(key, "MEMORIALDUNWND.X", nullptr, &type, reinterpret_cast(&g_session.unknown_5940), &size); - RegQueryValueExA(key, "MEMORIALDUNWND.Y", nullptr, &type, reinterpret_cast(&g_session.unknown_5944), &size); + RegQueryValueExA(key, "ONBTSUBCHAT", nullptr, &type, reinterpret_cast(&this->battleSubChatEnabled), &size); + RegQueryValueExA(key, "MEMORIALDUNWND.X", nullptr, &type, reinterpret_cast(&g_session.memorialWindowX), &size); + RegQueryValueExA(key, "MEMORIALDUNWND.Y", nullptr, &type, reinterpret_cast(&g_session.memorialWindowY), &size); RegQueryValueExA(key, "QUICKSLOTWNDINFO.X", nullptr, &type, base + 0x934, &size); RegQueryValueExA(key, "QUICKSLOTWNDINFO.Y", nullptr, &type, base + 0x938, &size); RegQueryValueExA(key, "QUICKSLOTWNDINFO.W", nullptr, &type, base + 0x93C, &size); @@ -569,9 +569,9 @@ int UIWindowMgr::CenterOnViewportY(int y) { // OFFSET: 0x00AAAE60 // FUNCTION: fn_17275 void UIWindowMgr::ConfirmActiveDialog() { - UIWindow* window = this->unknown_01F8; - if (window || (window = this->unknown_01F0) != nullptr || (window = this->unknown_01F4) != nullptr || (window = this->unknown_0214) != nullptr || - (window = this->unknown_021C) != nullptr || (window = this->unknown_020C) != nullptr || (window = this->unknown_0374) != nullptr || + UIWindow* window = this->choose3Wnd; + if (window || (window = this->sayDialogWnd) != nullptr || (window = this->sayDialogOverlayWnd) != nullptr || (window = this->comboBoxWnd) != nullptr || + (window = this->comboBoxIDWnd) != nullptr || (window = this->chooseWarpWnd) != nullptr || (window = this->makeTargetListWnd) != nullptr || (window = this->hoverWindow) != nullptr) { window->SendMsg(nullptr, UM_UPPUSH, 0, 0, 0, 0); return; @@ -600,49 +600,49 @@ void UIWindowMgr::SaveVisibleWindowIds() { for (UIWindow* window : this->rendered) { int id = window->geometry.id; if (id == 8) { - if (this->unknown_054C) { + if (this->itemWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 10) { - if (this->unknown_05A4) { + if (this->equipWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 11) { - if (this->unknown_0588) { + if (this->statusWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 13) { - if (this->unknown_05BC) { + if (this->optionWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 37) { - if (this->unknown_077C) { + if (this->skillListWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 321) { - if (this->unknown_0568) { + if (this->questWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 205) { - if (this->unknown_0568) { + if (this->questWndVisible) { this->savedWindowIds.push_back(id); } } else if (id == 134) { - if (this->unknown_0568) { + if (this->questWndVisible) { this->savedWindowIds.push_back(id); } - } else if ((id == 69 || id == 34) && this->unknown_073C) { + } else if ((id == 69 || id == 34) && this->messengerGroupWndVisible) { this->savedWindowIds.push_back(id); } else if (id == 271) { if (g_session.HasUnknown6178Records() == true) { this->savedWindowIds.push_back(id); } } else if (id == 286) { - if (this->unknown_4F210 == true) { + if (this->macroReporterVisible == true) { this->savedWindowIds.push_back(id); } } else if (id == 10014) { - if (g_session.unknown_5470 && g_session.unknown_5474 && g_effectDetailLevel == 2 && g_textureDetailLevel == 2) { + if (g_session.lowMemory && g_session.performanceWarningEnabled && g_effectDetailLevel == 2 && g_textureDetailLevel == 2) { this->savedWindowIds.push_back(id); } } else if (id == 301) { @@ -660,7 +660,7 @@ void UIWindowMgr::SaveVisibleWindowIds() { // OFFSET: 0x00AAB8A0 // FUNCTION: fn_17282 void UIWindowMgr::UpdateNavigationList() { - if (this->window_4F174 && !g_navigationManager.unknown_1254 && static_cast(this->window_4F174)->IsListShown()) { + if (this->window_4F174 && !g_navigationManager.expandedMap && static_cast(this->window_4F174)->IsListShown()) { this->window_4F174->SendMsg(nullptr, UM_COMMAND, ID_MINI, 0, 0, 0); } } @@ -688,11 +688,11 @@ void UIWindowMgr::SaveShortcutItems() { char name[36]; char description[33] = {}; std::strcpy(description, g_session.GetHotkeyDescription(index)); - std::sprintf(name, "SITEM%d%d%d", index, g_serviceType, g_session.unknown_0F50); + std::sprintf(name, "SITEM%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); RegSetValueExA(key, name, 0, REG_SZ, reinterpret_cast(description), 32); DWORD level = g_session.GetUnknown0420(index); - std::sprintf(name, "S_SKILL_USE_LEVEL%d%d%d", index, g_serviceType, g_session.unknown_0F50); + std::sprintf(name, "S_SKILL_USE_LEVEL%d%d%d", index, g_serviceType, g_session.selectedCharacterSlot); RegSetValueExA(key, name, 0, REG_DWORD, reinterpret_cast(&level), 4); } @@ -711,15 +711,15 @@ void UIWindowMgr::SaveUIRectInfo() { DWORD disposition = 0; if (RegCreateKeyExA(HKEY_LOCAL_MACHINE, path, 0, nullptr, 0, KEY_ALL_ACCESS, nullptr, &key, &disposition) == ERROR_SUCCESS) { char name[256]; - RegSetValueExA(key, "m_minimapZoomWnd", 0, REG_DWORD, reinterpret_cast(&this->unknown_0050), 4); - RegSetValueExA(key, "M_ISDRAGALL", 0, REG_DWORD, reinterpret_cast(&this->unknown_0064), 4); - RegSetValueExA(key, "M_ISDRAWCOMPASS", 0, REG_DWORD, reinterpret_cast(&this->unknown_0060), 4); - RegSetValueExA(key, "M_MINIMAPARGB", 0, REG_DWORD, reinterpret_cast(&this->unknown_005C), 4); - RegSetValueExA(key, "M_CHATWNDSTATUS", 0, REG_DWORD, reinterpret_cast(&this->unknown_004C), 4); - RegSetValueExA(key, "M_CHATWNDHEIGHT", 0, REG_DWORD, reinterpret_cast(&this->unknown_0038), 4); - RegSetValueExA(key, "M_CHATWNDX", 0, REG_DWORD, reinterpret_cast(&this->unknown_0030), 4); - RegSetValueExA(key, "M_CHATWNDY", 0, REG_DWORD, reinterpret_cast(&this->unknown_0034), 4); - RegSetValueExA(key, "M_CHATWNDSHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_003C), 4); + RegSetValueExA(key, "m_minimapZoomWnd", 0, REG_DWORD, reinterpret_cast(&this->minimapZoom), 4); + RegSetValueExA(key, "M_ISDRAGALL", 0, REG_DWORD, reinterpret_cast(&this->dragAllItems), 4); + RegSetValueExA(key, "M_ISDRAWCOMPASS", 0, REG_DWORD, reinterpret_cast(&this->drawCompass), 4); + RegSetValueExA(key, "M_MINIMAPARGB", 0, REG_DWORD, reinterpret_cast(&this->minimapColor), 4); + RegSetValueExA(key, "M_CHATWNDSTATUS", 0, REG_DWORD, reinterpret_cast(&this->chatWndStatus), 4); + RegSetValueExA(key, "M_CHATWNDHEIGHT", 0, REG_DWORD, reinterpret_cast(&this->chatWndHeight), 4); + RegSetValueExA(key, "M_CHATWNDX", 0, REG_DWORD, reinterpret_cast(&this->chatWndX), 4); + RegSetValueExA(key, "M_CHATWNDY", 0, REG_DWORD, reinterpret_cast(&this->chatWndY), 4); + RegSetValueExA(key, "M_CHATWNDSHOW", 0, REG_DWORD, reinterpret_cast(&this->chatWndVisible), 4); RegSetValueExA(key, "SAYDIALOGWNDINFO.X", 0, REG_DWORD, base + 0x5E4, 4); RegSetValueExA(key, "SAYDIALOGWNDINFO.Y", 0, REG_DWORD, base + 0x5E8, 4); RegSetValueExA(key, "SAYDIALOGWNDINFO.W", 0, REG_DWORD, base + 0x5EC, 4); @@ -742,38 +742,38 @@ void UIWindowMgr::SaveUIRectInfo() { RegSetValueExA(key, "ITEMWNDINFO.CURRADIO1", 0, REG_DWORD, base + 0x540, 4); RegSetValueExA(key, "ITEMWNDINFO.CURRADIO2", 0, REG_DWORD, base + 0x544, 4); RegSetValueExA(key, "ITEMWNDINFO.CURRADIO3", 0, REG_DWORD, base + 0x548, 4); - RegSetValueExA(key, "ITEMWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_054C), 4); + RegSetValueExA(key, "ITEMWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->itemWndVisible), 4); RegSetValueExA(key, "QUESTWNDINFO.X", 0, REG_DWORD, base + 0x550, 4); RegSetValueExA(key, "QUESTWNDINFO.Y", 0, REG_DWORD, base + 0x554, 4); RegSetValueExA(key, "QUESTWNDINFO.W", 0, REG_DWORD, base + 0x558, 4); RegSetValueExA(key, "QUESTWNDINFO.H", 0, REG_DWORD, base + 0x55C, 4); RegSetValueExA(key, "QUESTWNDINFO.ORGHEIGHT", 0, REG_DWORD, base + 0x560, 4); RegSetValueExA(key, "QUESTWNDINFO.CURTAB", 0, REG_DWORD, base + 0x564, 4); - RegSetValueExA(key, "QUESTWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_0568), 4); + RegSetValueExA(key, "QUESTWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->questWndVisible), 4); RegSetValueExA(key, "QUESTDISPWNDINFO.QUESTDISPLAY", 0, REG_DWORD, base + 0x570, 4); RegSetValueExA(key, "STATUSWNDINFO.X", 0, REG_DWORD, base + 0x574, 4); RegSetValueExA(key, "STATUSWNDINFO.Y", 0, REG_DWORD, base + 0x578, 4); RegSetValueExA(key, "STATUSWNDINFO.W", 0, REG_DWORD, base + 0x57C, 4); RegSetValueExA(key, "STATUSWNDINFO.H", 0, REG_DWORD, base + 0x580, 4); RegSetValueExA(key, "STATUSWNDINFO.ORGHEIGHT", 0, REG_DWORD, base + 0x584, 4); - RegSetValueExA(key, "STATUSWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_0588), 4); + RegSetValueExA(key, "STATUSWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->statusWndVisible), 4); RegSetValueExA(key, "EQUIPWNDINFO.X", 0, REG_DWORD, base + 0x590, 4); RegSetValueExA(key, "EQUIPWNDINFO.Y", 0, REG_DWORD, base + 0x594, 4); RegSetValueExA(key, "EQUIPWNDINFO.W", 0, REG_DWORD, base + 0x598, 4); RegSetValueExA(key, "EQUIPWNDINFO.H", 0, REG_DWORD, base + 0x59C, 4); RegSetValueExA(key, "EQUIPWNDINFO.ORGHEIGHT", 0, REG_DWORD, base + 0x5A0, 4); - RegSetValueExA(key, "EQUIPWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_05A4), 4); + RegSetValueExA(key, "EQUIPWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->equipWndVisible), 4); RegSetValueExA(key, "OPTIONWNDINFO.X", 0, REG_DWORD, base + 0x5A8, 4); RegSetValueExA(key, "OPTIONWNDINFO.Y", 0, REG_DWORD, base + 0x5AC, 4); RegSetValueExA(key, "OPTIONWNDINFO.W", 0, REG_DWORD, base + 0x5B0, 4); RegSetValueExA(key, "OPTIONWNDINFO.H", 0, REG_DWORD, base + 0x5B4, 4); RegSetValueExA(key, "OPTIONWNDINFO.ORGHEIGHT", 0, REG_DWORD, base + 0x5B8, 4); - RegSetValueExA(key, "OPTIONWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_05BC), 4); + RegSetValueExA(key, "OPTIONWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->optionWndVisible), 4); RegSetValueExA(key, "SHORTENITEMWNDINFO.X", 0, REG_DWORD, base + 0x5C0, 4); RegSetValueExA(key, "SHORTENITEMWNDINFO.Y", 0, REG_DWORD, base + 0x5C4, 4); RegSetValueExA(key, "SHORTENITEMWNDINFO.W", 0, REG_DWORD, base + 0x5C8, 4); RegSetValueExA(key, "SHORTENITEMWNDINFO.H", 0, REG_DWORD, base + 0x5CC, 4); - RegSetValueExA(key, "SHORTENITEMWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_05D0), 4); + RegSetValueExA(key, "SHORTENITEMWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->shortenItemWndVisible), 4); RegSetValueExA(key, "CHATROOMWNDINFO.X", 0, REG_DWORD, base + 0x604, 4); RegSetValueExA(key, "CHATROOMWNDINFO.Y", 0, REG_DWORD, base + 0x608, 4); RegSetValueExA(key, "CHATROOMWNDINFO.W", 0, REG_DWORD, base + 0x60C, 4); @@ -784,7 +784,7 @@ void UIWindowMgr::SaveUIRectInfo() { RegSetValueExA(key, "ITEMSTOREWNDINFO.H", 0, REG_DWORD, base + 0x620, 4); RegSetValueExA(key, "ITEMSTOREWNDINFO.subWnd", 0, REG_DWORD, base + 0x624, 4); std::memset(name, 0, sizeof(name) - 1); - RegSetValueExA(key, "ITEMSTOREWNDNUM", 0, REG_DWORD, reinterpret_cast(&this->unknown_0058), 4); + RegSetValueExA(key, "ITEMSTOREWNDNUM", 0, REG_DWORD, reinterpret_cast(&this->itemStoreWindowCount), 4); for (int index = 0; index < 8; ++index) { std::sprintf(name, "ITEMSTOREWNDINFO_%d.X", index); RegSetValueExA(key, name, 0, REG_DWORD, base + 0x62C + index * 0x10, 4); @@ -832,7 +832,7 @@ void UIWindowMgr::SaveUIRectInfo() { RegSetValueExA(key, "MESSENGERGROUPWNDINFO.Y", 0, REG_DWORD, base + 0x730, 4); RegSetValueExA(key, "MESSENGERGROUPWNDINFO.W", 0, REG_DWORD, base + 0x734, 4); RegSetValueExA(key, "MESSENGERGROUPWNDINFO.H", 0, REG_DWORD, base + 0x738, 4); - RegSetValueExA(key, "MESSENGERGROUPWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_073C), 4); + RegSetValueExA(key, "MESSENGERGROUPWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->messengerGroupWndVisible), 4); RegSetValueExA(key, "MESSENGERGROUPWNDINFO.RADIO", 0, REG_DWORD, base + 0x740, 4); RegSetValueExA(key, "MESSENGERGROUPWNDINFO.SIZEMODE", 0, REG_DWORD, base + 0x744, 4); RegSetValueExA(key, "EXCHANGEACCEPTWNDINFO.X", 0, REG_DWORD, base + 0x75C, 4); @@ -843,7 +843,7 @@ void UIWindowMgr::SaveUIRectInfo() { RegSetValueExA(key, "SKILLLISTWNDINFO.Y", 0, REG_DWORD, base + 0x770, 4); RegSetValueExA(key, "SKILLLISTWNDINFO.W", 0, REG_DWORD, base + 0x774, 4); RegSetValueExA(key, "SKILLLISTWNDINFO.H", 0, REG_DWORD, base + 0x778, 4); - RegSetValueExA(key, "SKILLLISTWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->unknown_077C), 4); + RegSetValueExA(key, "SKILLLISTWNDINFO.SHOW", 0, REG_DWORD, reinterpret_cast(&this->skillListWndVisible), 4); RegSetValueExA(key, "MERCHANTITEMWNDINFO.X", 0, REG_DWORD, base + 0x780, 4); RegSetValueExA(key, "MERCHANTITEMWNDINFO.Y", 0, REG_DWORD, base + 0x784, 4); RegSetValueExA(key, "MERCHANTITEMWNDINFO.W", 0, REG_DWORD, base + 0x788, 4); @@ -913,11 +913,11 @@ void UIWindowMgr::SaveUIRectInfo() { RegSetValueExA(key, "SUBCHATWNDBT.Y", 0, REG_DWORD, base + 0x928, 4); RegSetValueExA(key, "SUBCHATWNDBT.W", 0, REG_DWORD, base + 0x92C, 4); RegSetValueExA(key, "SUBCHATWNDBT.H", 0, REG_DWORD, base + 0x930, 4); - RegSetValueExA(key, "CHATWNDSTICKON", 0, REG_DWORD, reinterpret_cast(&this->unknown_03F4), 4); + RegSetValueExA(key, "CHATWNDSTICKON", 0, REG_DWORD, reinterpret_cast(&this->chatWndStickOn), 4); RegSetValueExA(key, "ONSTSUBCHAT", 0, REG_DWORD, base + 0x3F5, 4); - RegSetValueExA(key, "ONBTSUBCHAT", 0, REG_DWORD, reinterpret_cast(&this->unknown_03F6), 4); - RegSetValueExA(key, "MEMORIALDUNWND.X", 0, REG_DWORD, reinterpret_cast(&g_session.unknown_5940), 4); - RegSetValueExA(key, "MEMORIALDUNWND.Y", 0, REG_DWORD, reinterpret_cast(&g_session.unknown_5944), 4); + RegSetValueExA(key, "ONBTSUBCHAT", 0, REG_DWORD, reinterpret_cast(&this->battleSubChatEnabled), 4); + RegSetValueExA(key, "MEMORIALDUNWND.X", 0, REG_DWORD, reinterpret_cast(&g_session.memorialWindowX), 4); + RegSetValueExA(key, "MEMORIALDUNWND.Y", 0, REG_DWORD, reinterpret_cast(&g_session.memorialWindowY), 4); RegSetValueExA(key, "QUICKSLOTWNDINFO.X", 0, REG_DWORD, base + 0x934, 4); RegSetValueExA(key, "QUICKSLOTWNDINFO.Y", 0, REG_DWORD, base + 0x938, 4); RegSetValueExA(key, "QUICKSLOTWNDINFO.W", 0, REG_DWORD, base + 0x93C, 4); @@ -1023,20 +1023,20 @@ void UIWindowMgr::RefreshWindow01C8Edits() { // FUNCTION: fn_17265 void UIWindowMgr::SetSurface0478(CBitmapRes* bitmap) { if (!bitmap) { - if (this->unknown_0478) { - delete this->unknown_0478; - this->unknown_0478 = nullptr; + if (this->backgroundSurface) { + delete this->backgroundSurface; + this->backgroundSurface = nullptr; } return; } - if (!this->unknown_0478) { - this->unknown_0478 = reinterpret_cast(GetRenderSystemHolder()->CreateSurfaceOrTexture(bitmap->image.width, bitmap->image.height)); - if (!this->unknown_0478) { + if (!this->backgroundSurface) { + this->backgroundSurface = reinterpret_cast(GetRenderSystemHolder()->CreateSurfaceOrTexture(bitmap->image.width, bitmap->image.height)); + if (!this->backgroundSurface) { return; } } - reinterpret_cast(this->unknown_0478)->Upload(0, 0, bitmap->image.width, bitmap->image.height, bitmap->image.pixels, 0, 0); + reinterpret_cast(this->backgroundSurface)->Upload(0, 0, bitmap->image.width, bitmap->image.height, bitmap->image.pixels, 0, 0); } // OFFSET: 0x00AAA050 @@ -1096,7 +1096,7 @@ bool UIWindowMgr::DropAt(int x, int y, ModeDragState* drag) { const int localX = x - offsetX; const int localY = y - offsetY; window->RecordDrop(localX, localY, *drag, -1); - drag->unknown_038C = reinterpret_cast(window); + drag->sourceWindow = reinterpret_cast(window); if (this->window_01EC != window->Root()) { window->DragAndDrop(localX, localY, reinterpret_cast(drag)); } @@ -1141,12 +1141,12 @@ void UIWindowMgr::RestoreHiddenWindows() { } CGameMode* mode = static_cast(g_modeMgr.GetGameMode()); - if (mode && mode->unknown_0254 == 1) { + if (mode && mode->canRotateView == 1) { this->EnsureWindow(WID_MINIMAPZOOMWND); } static_cast(g_modeMgr.GetGameMode())->scene->player->RefreshEffect164(); - this->unknown_0508 = 1; + this->windowVisibilityState = 1; for (std::map::iterator it = this->overlays.begin(); it != this->overlays.end(); ++it) { this->CloseWindow(it->first + 216); @@ -1177,7 +1177,7 @@ int UIWindowMgr::RunEmailAddress() { } this->inputWindow = nullptr; - this->unknown_0474 = 0; + this->modalResponse = 0; this->modalWindows.push_back(window); int response = 184; @@ -1201,15 +1201,15 @@ int UIWindowMgr::RunEmailAddress() { break; } - if (this->unknown_0474 != 0) { + if (this->modalResponse != 0) { if (UIWindow* active = this->Top()) { active->Show(0); this->Schedule(active); this->modalWindows.pop_back(); } - response = this->unknown_0474; - this->unknown_0474 = 0; + response = this->modalResponse; + this->modalResponse = 0; break; } @@ -1220,7 +1220,7 @@ int UIWindowMgr::RunEmailAddress() { if (g_session.GetOption(20) > 0) { this->activeWindowId = 0; - this->unknown_0474 = 0; + this->modalResponse = 0; while (!this->modalWindows.empty()) { this->Schedule(this->modalWindows.back()); diff --git a/Source/UI/Window/WindowMouseHit.cpp b/Source/UI/Window/WindowMouseHit.cpp index fdeec52cd..eb0fa457a 100644 --- a/Source/UI/Window/WindowMouseHit.cpp +++ b/Source/UI/Window/WindowMouseHit.cpp @@ -181,7 +181,7 @@ int UIWindowMgr::ProcessMouse() { } this->deferredDeletion.clear(); - for (auto account = this->unknown_4F248.begin(); account != this->unknown_4F248.end(); ++account) { + for (auto account = this->closedMiniPartyIds.begin(); account != this->closedMiniPartyIds.end(); ++account) { const int accountId = *account; for (auto entry = this->snapExcluded.begin(); entry != this->snapExcluded.end();) { UIWindow* window = *entry; @@ -193,7 +193,7 @@ int UIWindowMgr::ProcessMouse() { } } } - this->unknown_4F248.clear(); + this->closedMiniPartyIds.clear(); if (g_mouse.buttons[0] == 1 && this->window_01C8) { UINewChatWnd* suggestions = static_cast(this->window_01C8); @@ -204,7 +204,7 @@ int UIWindowMgr::ProcessMouse() { int bottom; WindowScreenBounds(suggestions->m_suggestions, left, top, right, bottom); const bool outside = left > x || right < x || top > y || bottom < y; - WindowScreenBounds(this->unknown_0384, left, top, right, bottom); + WindowScreenBounds(this->cashEmotionListWnd, left, top, right, bottom); const bool outsideCompanion = left > x || right < x || top > y || bottom < y; if (outside && outsideCompanion) { suggestions->ShowSuggestions(0); @@ -239,7 +239,7 @@ int UIWindowMgr::ProcessMouse() { } this->inputWindow->ResetCursor(localX, localY); - if (this->unknown_046C == x && this->unknown_0470 == y) { + if (this->previousMouseX == x && this->previousMouseY == y) { this->inputWindow->OnMouseHover(localX, localY); } else { this->inputWindow->OnMouseMove(localX, localY); @@ -306,7 +306,7 @@ int UIWindowMgr::ProcessMouse() { } window->ResetCursor(localX, localY); - if (this->unknown_046C == x && this->unknown_0470 == y) { + if (this->previousMouseX == x && this->previousMouseY == y) { window->OnMouseHover(localX, localY); } else { window->OnMouseMove(localX, localY); @@ -326,15 +326,15 @@ int UIWindowMgr::ProcessMouse() { } if (g_mouse.buttons[0] == 1) { - if (this->unknown_0214 && (!window || (window != this->unknown_0214 && !window->IsDescendantOf(this->unknown_0214)))) { + if (this->comboBoxWnd && (!window || (window != this->comboBoxWnd && !window->IsDescendantOf(this->comboBoxWnd)))) { this->CloseWindow(WID_COMBOBOXWND); } - if (this->unknown_021C) { + if (this->comboBoxIDWnd) { if (!window) { this->CloseWindow(WID_COMBOBOXIDWND); this->CloseDropDown(); - } else if (window != this->unknown_021C && !window->IsDescendantOf(this->unknown_021C)) { + } else if (window != this->comboBoxIDWnd && !window->IsDescendantOf(this->comboBoxIDWnd)) { this->CloseWindow(WID_COMBOBOXIDWND); } } else if (!window) { @@ -345,14 +345,14 @@ int UIWindowMgr::ProcessMouse() { if (this->window_03D4) { this->window_03D4->Invalidate(); } - if (this->unknown_01E0) { - this->unknown_01E0->Invalidate(); + if (this->equipWnd) { + this->equipWnd->Invalidate(); } - if (this->unknown_01E4) { - this->unknown_01E4->Invalidate(); + if (this->nCashWnd) { + this->nCashWnd->Invalidate(); } - if (this->unknown_03FC) { - this->unknown_03FC->Invalidate(); + if (this->otherEquipWnd) { + this->otherEquipWnd->Invalidate(); } if (this->window_03D8) { this->window_03D8->Invalidate(); @@ -380,13 +380,13 @@ int UIWindowMgr::ProcessMouse() { if (this->hoverWindow) { this->hoverWindow->Invalidate(); UIWindow* root = this->hoverWindow->Root(); - if (root && root != this->unknown_0328) { + if (root && root != this->guildPositionManageWnd) { root->Invalidate(); } } - this->unknown_046C = x; - this->unknown_0470 = y; + this->previousMouseX = x; + this->previousMouseY = y; if (!this->modalWindows.empty() && this->modalWindows.back()) { handled = 1; diff --git a/Source/UI/Window/WindowOrdering.cpp b/Source/UI/Window/WindowOrdering.cpp index e2a72dbea..f621b0abd 100644 --- a/Source/UI/Window/WindowOrdering.cpp +++ b/Source/UI/Window/WindowOrdering.cpp @@ -33,36 +33,36 @@ void UIWindowMgr::RefreshGuildWindows() { if (this->window_0324) { this->window_0324->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->unknown_0328) { - this->unknown_0328->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildPositionManageWnd) { + this->guildPositionManageWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } if (this->window_032C) { this->window_032C->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->unknown_0330) { - this->unknown_0330->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildBanishedMemberWnd) { + this->guildBanishedMemberWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->unknown_0334) { - this->unknown_0334->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildNoticeWnd) { + this->guildNoticeWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } - if (this->unknown_0338) { - this->unknown_0338->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->guildTotalInfoWnd) { + this->guildTotalInfoWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } // OFFSET: 0x00A96810 // FUNCTION: fn_17187 void UIWindowMgr::RefreshRouletteWnd() { - if (this->unknown_0464) { - this->unknown_0464->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); + if (this->roulletteWnd) { + this->roulletteWnd->SendMsg(nullptr, UM_REFRESH, 0, 0, 0, 0); } } // OFFSET: 0x00A96830 // FUNCTION: fn_17188 void UIWindowMgr::EnableRouletteWnd() { - if (this->unknown_0464) { - this->unknown_0464->m_enabled = 1; + if (this->roulletteWnd) { + this->roulletteWnd->m_enabled = 1; } } @@ -140,11 +140,11 @@ void UIWindowMgr::Promote(UIWindow* window) { // OFFSET: 0x00A969D0 // FUNCTION: fn_17190 void UIWindowMgr::InvalidateFrames() { - if (this->unknown_04FC != 0) { + if (this->framesInvalidated != 0) { return; } - this->unknown_04FC = 1; + this->framesInvalidated = 1; for (auto it = this->rendered.begin(); it != this->rendered.end(); ++it) { if ((*it)->NeedsFrameRefresh()) { diff --git a/Source/UI/Window/WindowRetirement.cpp b/Source/UI/Window/WindowRetirement.cpp index 1f8abbd07..b43ae2f45 100644 --- a/Source/UI/Window/WindowRetirement.cpp +++ b/Source/UI/Window/WindowRetirement.cpp @@ -83,18 +83,18 @@ void UIWindowMgr::DismissTransient() { // OFFSET: 0x00A8F840 // FUNCTION: fn_17145 void UIWindowMgr::DestroyWindow0478() { - if (this->unknown_0478) { - delete this->unknown_0478; - this->unknown_0478 = nullptr; + if (this->backgroundSurface) { + delete this->backgroundSurface; + this->backgroundSurface = nullptr; } } // OFFSET: 0x00A8FB80 // FUNCTION: fn_17147 void UIWindowMgr::SubmitActiveDialog() { - UIWindow* window = this->unknown_01F8; - if (window || (window = this->unknown_01F0) != nullptr || (window = this->unknown_01F4) != nullptr || (window = this->unknown_0214) != nullptr || - (window = this->unknown_021C) != nullptr || (window = this->unknown_020C) != nullptr || (window = this->unknown_0374) != nullptr || + UIWindow* window = this->choose3Wnd; + if (window || (window = this->sayDialogWnd) != nullptr || (window = this->sayDialogOverlayWnd) != nullptr || (window = this->comboBoxWnd) != nullptr || + (window = this->comboBoxIDWnd) != nullptr || (window = this->chooseWarpWnd) != nullptr || (window = this->makeTargetListWnd) != nullptr || (window = this->hoverWindow) != nullptr) { window->SendMsg(nullptr, UM_DOWNPUSH, 0, 0, 0, 0); return; diff --git a/Source/UI/WindowBackground.cpp b/Source/UI/WindowBackground.cpp index cf16fcf89..bc7cca120 100644 --- a/Source/UI/WindowBackground.cpp +++ b/Source/UI/WindowBackground.cpp @@ -110,7 +110,7 @@ void UIWindow::DrawRobeSprite(int job, int sex, int robe, int x, int y, bool ove texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, sprite->palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); } if (overlay) { @@ -123,6 +123,6 @@ void UIWindow::DrawRobeSprite(int job, int sex, int robe, int x, int y, bool ove this->geometry.surface->DrawSurface( x + cell.x, y + cell.y, texture, static_cast(record.u0 * 256.0f), static_cast(record.v0 * 256.0f), image->width, image->height, - cell.mirrored != 0, static_cast(image->unknown_0004) + 1, static_cast(image->unknown_0006) + 1, 0, 0 + cell.mirrored != 0, static_cast(image->doubleWidth) + 1, static_cast(image->doubleHeight) + 1, 0, 0 ); } diff --git a/Source/UI/WindowOverlay.cpp b/Source/UI/WindowOverlay.cpp index 135e77550..85fd8e7d1 100644 --- a/Source/UI/WindowOverlay.cpp +++ b/Source/UI/WindowOverlay.cpp @@ -48,7 +48,7 @@ void UIEquipWnd::DrawDamageSkinPage() { int slot = 0; for (int x = 6; x < 0x116; x += 0x44) { int index = this->m_firstSlot + slot; - if (index >= g_session.unknown_80C8) { + if (index >= g_session.damageSkinCount) { break; } if (g_session.m_damageSkinIndex == index) { @@ -142,7 +142,7 @@ int UIFrameWnd::DrawFittedItemName(int x, int y, const ITEM_INFO* item, std::uin if (text == highlight) { this->DrawShadowedText(offset + x, y, text, bytes, static_cast(highlightColor), 0xE0E0E0, 0, 12, 0); - } else if (item->unknown_005D) { + } else if (item->damaged) { this->DrawShadowedText(offset + x, y, text, bytes, color, 0x5050FA, 0, 12, 0); } else { std::uint32_t card = ItemCardColor(item); diff --git a/Source/UI/WindowSprite.cpp b/Source/UI/WindowSprite.cpp index 9d5a3411f..f27b5fb57 100644 --- a/Source/UI/WindowSprite.cpp +++ b/Source/UI/WindowSprite.cpp @@ -22,9 +22,9 @@ void UIWindow::AddSpriteCellOverlay( RenderPrimitive* primitive = g_renderer->primitives.Acquire(); float left = static_cast(cell->x) * scale * cell->scaleX; - float right = static_cast((image->unknown_0004 + 1) * image->width + cell->x - 1) * scale * cell->scaleX * extentScale; + float right = static_cast((image->doubleWidth + 1) * image->width + cell->x - 1) * scale * cell->scaleX * extentScale; float top = static_cast(cell->y) * scale * cell->scaleY; - float bottom = static_cast((image->unknown_0006 + 1) * image->height - 1 + cell->y) * scale * cell->scaleY * extentScale; + float bottom = static_cast((image->doubleHeight + 1) * image->height - 1 + cell->y) * scale * cell->scaleY * extentScale; CTexture* texture; if (cell->imageType == 0) { @@ -33,7 +33,7 @@ void UIWindow::AddSpriteCellOverlay( texture = g_renderer->atlas.Insert(*GetRenderSystemHolder()->system, image, palette, record, g_serviceType, g_resourceReuseDelay); } } else { - texture = static_cast(const_cast(image->unknown_0008)); + texture = static_cast(const_cast(image->surface)); record.u1 = static_cast(image->width) / static_cast(texture->TextureWidth()); record.v1 = static_cast(image->height) / static_cast(texture->TextureHeight()); } @@ -43,11 +43,11 @@ void UIWindow::AddSpriteCellOverlay( if (angle != 0.0f) { const float cosine = ClientCosine(static_cast(angle)); const float sine = ClientSine(static_cast(angle)); - const int farX = (image->unknown_0004 + 1) * image->width + cell->x; + const int farX = (image->doubleWidth + 1) * image->width + cell->x; const float startX = static_cast((cell->mirrored & 1) ? farX : cell->x) * scale + static_cast(x); const float endX = static_cast((cell->mirrored & 1) ? cell->x : farX) * scale + static_cast(x) + 1.0f; const float upper = static_cast(cell->y) * scale + static_cast(y); - const float lower = static_cast((image->unknown_0006 + 1) * image->height + cell->y) * scale + static_cast(y) + 1.0f; + const float lower = static_cast((image->doubleHeight + 1) * image->height + cell->y) * scale + static_cast(y) + 1.0f; const float halfWidth = (endX - startX) * 0.5f; const float halfHeight = (lower - upper) * 0.5f; const float centerX = startX + halfWidth; @@ -118,7 +118,7 @@ void UIWindow::AddRotatedSpriteCellOverlay( RenderPrimitive* primitive = g_renderer->primitives.Acquire(); SpriteAtlasRecord record{}; - CTexture* texture = static_cast(const_cast(image->unknown_0008)); + CTexture* texture = static_cast(const_cast(image->surface)); if (!texture) { texture = g_renderer->atlas.Find(image, palette, record); if (!texture) { @@ -133,13 +133,13 @@ void UIWindow::AddRotatedSpriteCellOverlay( primitive->texture = texture; const int left = static_cast(cell->x * static_cast(cell->scaleX) + 1.0); - const int right = static_cast(((static_cast(image->unknown_0004) + 1) * image->width + cell->x) * static_cast(cell->scaleX)); + const int right = static_cast(((static_cast(image->doubleWidth) + 1) * image->width + cell->x) * static_cast(cell->scaleX)); const int top = static_cast(cell->y * static_cast(cell->scaleY)); const int startX = (cell->mirrored & 1) ? right : left; const int endX = (cell->mirrored & 1) ? left : right; const float halfWidth = static_cast(endX - startX) * 0.5f; const int bottom = - static_cast(((static_cast(image->unknown_0006) + 1) * image->height + cell->y) * static_cast(cell->scaleY) + 1.0); + static_cast(((static_cast(image->doubleHeight) + 1) * image->height + cell->y) * static_cast(cell->scaleY) + 1.0); const float halfHeight = static_cast(bottom - top) * 0.5f; const float corners[4][2] = { @@ -150,7 +150,7 @@ void UIWindow::AddRotatedSpriteCellOverlay( }; const float centerX = static_cast(x + startX) + halfWidth; const float centerY = static_cast(y + top) + halfHeight; - const float angle = static_cast(cell->unknown_001C) / 180.0f * 3.141592f; + const float angle = static_cast(cell->rotation) / 180.0f * 3.141592f; const unsigned char* rgba = reinterpret_cast(&cell->color); RenderVertex* vertices = primitive->quad; diff --git a/Source/Utility/Lexicon/LexiconSerializer.cpp b/Source/Utility/Lexicon/LexiconSerializer.cpp index 17e4813c3..faf7abbfc 100644 --- a/Source/Utility/Lexicon/LexiconSerializer.cpp +++ b/Source/Utility/Lexicon/LexiconSerializer.cpp @@ -87,7 +87,7 @@ bool LexiconSerializer::Load(const char* path) { result = true; this->wordCount = this->header.wordCount; this->nodeCount = this->header.nodeCount; - this->unknown_000C = this->header.size; + this->serializedSize = this->header.size; this->header.loaded = result; return result; } diff --git a/Source/Utility/Lexicon/LexiconSerializer.h b/Source/Utility/Lexicon/LexiconSerializer.h index 22bfba199..0c89be285 100644 --- a/Source/Utility/Lexicon/LexiconSerializer.h +++ b/Source/Utility/Lexicon/LexiconSerializer.h @@ -22,7 +22,7 @@ struct LexiconHeader { struct LexiconSerializer { // INLINED - LexiconSerializer() : root(nullptr), wordCount(0), nodeCount(0), unknown_000C(0), buffer(nullptr), header{} { + LexiconSerializer() : root(nullptr), wordCount(0), nodeCount(0), serializedSize(0), buffer(nullptr), header{} { } // INLINED ~LexiconSerializer() { @@ -33,7 +33,7 @@ struct LexiconSerializer { /* 0000 */ LexiconNode* root; /* 0004 */ int wordCount; /* 0008 */ int nodeCount; - /* 000C */ std::uint32_t unknown_000C; + /* 000C */ std::uint32_t serializedSize; /* 0010 */ unsigned char* buffer; /* 0014 */ LexiconHeader header;