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.
This commit is contained in:
parent
d7d87febd6
commit
dc3d5ce1a5
689 changed files with 29168 additions and 29165 deletions
|
|
@ -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<CharacterRenderDrawItem> CCharacterRender::BuildDrawList(unsigned char trackBounds, char* boundsUpdated) {
|
||||
CGameMode* mode = static_cast<CGameMode*>(g_modeMgr.GetGameMode());
|
||||
const float* origin = reinterpret_cast<const float*>(&this->unknown_0004);
|
||||
const float* origin = reinterpret_cast<const float*>(&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<CharacterRenderDrawItem> 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<float*>(&this->unknown_00A8);
|
||||
float& screenY = *reinterpret_cast<float*>(&this->unknown_00AC);
|
||||
float& screenX = *reinterpret_cast<float*>(&this->screenX);
|
||||
float& screenY = *reinterpret_cast<float*>(&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<RenderBounds*>(this->unknown_0094);
|
||||
RenderBounds& bounds = *reinterpret_cast<RenderBounds*>(this->renderBounds);
|
||||
bounds.Set(static_cast<float>(g_renderer->viewport.width), static_cast<float>(g_renderer->viewport.height), 0.0f, 0.0f, rhw);
|
||||
|
||||
std::list<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> CCharacterRender::BuildDrawList(unsigned char
|
|||
|
||||
int layer = 0;
|
||||
CImfRes* imf = static_cast<CImfRes*>(
|
||||
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<int, SpriteLayerQuad> quads;
|
||||
std::map<int, int>& 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<int, int>& views = this->layerViews;
|
||||
views[2] = this->lowerHeadgear;
|
||||
views[3] = this->upperHeadgear;
|
||||
views[4] = this->middleHeadgear;
|
||||
views[8] = this->robe;
|
||||
|
||||
std::vector<CActRes*> actions(9, nullptr);
|
||||
std::vector<CSprRes*> 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<CActRes*>(
|
||||
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<CSprRes*>(
|
||||
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<CActRes*>(
|
||||
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<CSprRes*>(
|
||||
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<CActRes*>(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<CSprRes*>(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<CActRes*>(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<CSprRes*>(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<CActRes*>(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<CSprRes*>(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<CActRes*>(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<CSprRes*>(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<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> CCharacterRender::BuildDrawList(unsigned char
|
|||
}
|
||||
|
||||
const int cellIndex = GetSlotLayer(g_session.IsSpecialMonsterJob(views[type]) ? 1 : type);
|
||||
if (this->unknown_0044 >= static_cast<int>(actions[type]->FrameCount(this->unknown_0040))) {
|
||||
if (this->frameIndex >= static_cast<int>(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<CharacterRenderDrawItem> 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<CActRes*>(
|
||||
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<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> 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<CPaletteRes*>(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<CPaletteRes*>(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<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> 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<CharacterRenderDrawItem> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue