MemoryPatchRva(0xEB, 1, 0x2C15B7), // bypass CGlobal::SetStatusDataForChecking
#if !DEBUG_DISABLE_PATCH
MemoryPatchRva(0x06, 1, 0x410731), // win
MemoryPatchRva(0x06, 1, 0x410AD1), // win
MemoryPatchRva(0x01, 1, 0x40991D), // cpu
MemoryPatchRva(0x91, 1, 0x2F9EE3), // one hit
MemoryPatchRva(0x3FEB, 2, 0x452FD1), // bypass savedata checksum
MemoryPatchRva(0x20000, 4, 0x4E71B2), // chrimg max buffer size
MemoryPatchRva(CraftConditions::CraftReflect, 4, 0x7E1858), // predefined flag
// debug AT
MemoryPatchRva(0x49EB, 2, 0x5F668D), // disable orig at
MemoryPatchRva(0x81, 1, 0x5F66D9), // disable orig at
MemoryPatchRva(0x80, 1, 0x5F68A4), // force show debug at
MemoryPatchRva(0x2C, 1, 0x5F693D), // debug at pos.X advance
// tweak
MemoryPatchRva(PushActorDistance, sizeof(PushActorDistance), 0x6538EF),
MemoryPatchRva(PushActorDistance, sizeof(PushActorDistance), 0x653BBE),
MemoryPatchRva(0x00ull, 1, 0x653972), // box height
MemoryPatchRva(0x00ull, 1, 0x653C31), // monster height
MemoryPatchRva(0x00ull, 1, 0x655E64), // actor height (mini map)
MemoryPatchRva(0xEB, 1, 0x2CAA98), // enable shimmer when width > 1024
MemoryPatchRva(0xEB, 1, 0x2C33BE), // enable blur when width > 1024
MemoryPatchRva(0xEB, 1, 0x2EFBB8), // capture ?
MemoryPatchRva(0x00ull, 1, 0x55F6E1), // ±¬Áé
// monster info
MemoryPatchRva(0xEB, 1, 0x626AC8), // bypass check is enemy
// buf fix
MemoryPatchRva(0xEB, 1, 0x60CC8F), // burst energy
MemoryPatchRva(0x32, 1, 0x54FDA4), // text length of menu item created by MenuCmd(1, x, x)
// MemoryPatchRva(0x37, 1, 0x5006B8), // dead lock while exiting
//MemoryPatchRva(0x00, 1, 0x5304C9), // skip op Sleep
// iat hook
MemoryPatchRva((ULONG64)AoGetKeyState, 4, 0x9D5A00), // GetKeyState
#if !D3D9_VER
MemoryPatchRva(0x1CEB, 2, 0x64ACFE), // remove crappy mouse control @ PositionWindow
MemoryPatchRva(0x00ull, 4, 0x329851), // disable stupid get joy stick pos
MemoryPatchRva(8 * sizeof(ULONG_PTR), 4, 0x403E92), // fix WNDCLASS::cbWndExtra
MemoryPatchRva((ULONG64)CreateWindowExCenterA, 4, 0x9D59E8), // CreateWindowExA
#endif
#endif // DEBUG_DISABLE_PATCH
// crack
#if !D3D9_VER
FunctionJumpRva(0x27969D, &CBattle::SetSelectedAttack),
FunctionJumpRva(0x275DF4, &CBattle::SetSelectedCraft),
FunctionJumpRva(0x272AB9, &CBattle::SetSelectedSCraft),
FunctionJumpRva(0x279986, &CSSaveData::SaveData2SystemData),
FunctionJumpRva(0x279FA8, &CSSaveData::SystemData2SaveData),
#endif // D3D9_VER
FunctionJumpRva(0x279553, &CBattle::SetSelectedMagic),
// FunctionCallRva(0x51E1C7, xxx),
#if !DEBUG_DISABLE_PATCH
// tweak
// FunctionCallRva(0x40492A, ShowExitMessageBox),
FunctionCallRva(0x3640A1, InitWarningItpTimeStamp), // bypass show warning.itp
FunctionCallRva(0x3E2B42, EDAO::NakedLoadSaveDataThumb),
FunctionCallRva(0x465F08, EDAO::NakedSetSaveDataScrollStep),
FunctionJumpRva(0x279AA3, &EDAO::CheckItemEquipped, &EDAO::StubCheckItemEquipped),
FunctionCallRva(0x5DE1D9, &CBattle::NakedNoResistConditionUp),
FunctionCallRva(0x5F690B, CBattle::FormatBattleChrAT),
FunctionCallRva(0x5B05C6, CBattle::ShowSkipCraftAnimeButton),
FunctionJumpRva(0x46B6A0, &CSoundPlayer::GetSoundControlWindow),
FunctionJumpVa (LookupExportTable(FindLdrModuleByName(&WCS2US(L"USER32.dll"))->DllBase, USER32_SendMessageA), CSoundPlayer::StaticDispatchCtrlCode, &CSoundPlayer::StubStaticDispatchCtrlCode),
FunctionCallRva(0x328C77, &CInput::HandleMainInterfaceInputState, &CInput::StubHandleMainInterfaceInputState),
// patch max se index
MemoryPatchRva((ULONG64)0xEB, 1, 0x50EC22),
FunctionJumpRva(0x2795B2, &CSound::GetSoundPathByIndex, &CSound::StubGetSoundPathByIndex),
// bug fix
FunctionCallRva(0x5B1BE6, &CBattleATBar::LookupReplaceAtBarEntry),
FunctionJumpRva(0x275DAE, &CBattle::ExecuteActionScript, &CBattle::StubExecuteActionScript),
FunctionJumpRva(0x550C90, &CScript::ScpSaveRestoreParty, &CScript::StubScpSaveRestoreParty),
FunctionCallRva(0x6A58FF, CMiniGame::HorrorHouse_GetMonsterPosition),
// file redirection
FunctionJumpVa (NtOpenFile, AoOpenFile, &StubNtOpenFile),
FunctionJumpVa (NtCreateFile, AoCreateFile, &StubNtCreateFile),
FunctionJumpVa (NtQueryAttributesFile, AoQueryAttributesFile, &StubNtQueryAttributesFile),
FunctionCallRva(0x48C1EA, AoFindFirstFileA),
FunctionCallRva(0x48C206, NtClose),
FunctionCallRva(0x4E6A0B, EDAO::GetCampImage),
FunctionCallRva(0x5A05B4, EDAO::GetBattleFace),
FunctionCallRva(0x2F9101, EDAO::GetFieldAttackChr),
FunctionCallRva(0x4948B9, &EDAO::GetCFace),
FunctionCallRva(0x4948DF, &EDAO::GetCFace),
// custom format itp / itc
//INLINE_HOOK_JUMP_RVA(0x273D24, METHOD_PTR(&EDAOFileStream::Uncompress), EDAOFileStream::StubUncompress),
// hack for boss
FunctionCallRva(0x5D1ED5, &CBattle:: NakedAS8DDispatcher),
FunctionCallRva(0x56F7C7, &CBattle:: NakedGetChrIdForSCraft),
FunctionCallRva(0x5E027B, &CBattle:: NakedGetTurnVoiceChrId),
FunctionCallRva(0x5E1015, &CBattle:: NakedGetRunawayVoiceChrId),
FunctionCallRva(0x5E0CA3, &CBattle:: NakedGetReplySupportVoiceChrId),
FunctionCallRva(0x5E09E0, &CBattle:: NakedGetTeamRushVoiceChrId),
FunctionCallRva(0x5DFA1B, &CBattle:: NakedGetUnderAttackVoiceChrId),
FunctionCallRva(0x5E081E, &CBattle:: NakedGetUnderAttackVoiceChrId2),
FunctionCallRva(0x5E062B, &CBattle:: NakedGetSBreakVoiceChrId),
FunctionCallRva(0x5A3644, &CBattle:: NakedCopyMagicAndCraftData),
FunctionCallRva(0x5A3814, &CBattle:: NakedOverWriteBattleStatusWithChrStatus),
FunctionCallRva(0x578368, &CBattle:: NakedIsChrStatusNeedRefresh),
FunctionCallRva(0x622C83, &EDAO:: NakedGetChrSBreak),
FunctionJumpRva(0x277776, &CGlobal:: GetMagicData, &CGlobal::StubGetMagicData),
FunctionJumpRva(0x274E18, &CGlobal:: GetMagicQueryTable, &CGlobal::StubGetMagicQueryTable),
FunctionJumpRva(0x2767E0, &CGlobal:: GetMagicDescription, &CGlobal::StubGetMagicDescription),
FunctionCallRva(0x332B26, &EDAO:: GetStatusIcon),
FunctionCallRva(0x2F82B8, &EDAO:: GetLeaderChangeVoice),
FunctionCallRva(0x4A7487, &CSSaveData::GetTeamAttackMemberId),
FunctionCallRva(0x4A74A7, &CSSaveData::GetTeamAttackMemberId),
FunctionCallRva(0x5EB9E7, &CGlobal:: FixWeaponShapeAndRange, &CGlobal::StubFixWeaponShapeAndRange), // weapon shape
FunctionCallRva(0x5EC037, &CGlobal:: FixWeaponShapeAndRange), // weapon RNG
FunctionCallRva(0x5AF055, &CBattle:: NakedFindReplaceChr),
FunctionCallRva(0x58B258, &CBattle:: NakedCheckCraftTargetBits),
FunctionJumpRva(0x27A2A0, &CBattle:: GetConditionIconPosByIndex),
FunctionJumpRva(0x27AF52, &CBattle:: IsTargetCraftReflect, &CBattle::StubIsTargetCraftReflect),
FunctionJumpRva(0x276EA2, &CBattle:: OnSetChrConditionFlag, &CBattle::StubOnSetChrConditionFlag),
FunctionCallRva(0x5AA2FF, &CBattle:: NakedUpdateCraftReflectLeftTime),
// avatar
FunctionJumpRva(0x273469, &CBattle::FindEmptyPosition),
//FunctionJumpRva(0x276C81, &CBattle::IsAvatarLoaded),
MemoryPatchRva((ULONG64)0x9B2AE2, 4, 0x5B2EC0),
// inherit custom flags
FunctionCallRva(0x358457, &CScript::NakedInheritSaveData),
// enemy sbreak
//TODO: fix this on Wine
// FunctionCallRva(0x56526F, &CBattle::NakedGetBattleState),
// FunctionJumpRva(0x599100, &CBattle::SetCurrentActionChrInfo, &CBattle::StubSetCurrentActionChrInfo),
// FunctionCallRva(0x591C3A, &CBattle::NakedEnemyThinkAction),
// monster info box
FunctionCallRva(0x626AEA, &CBattleInfoBox::SetMonsterInfoBoxSize),
FunctionJumpRva(0x27AC8C, &CBattleInfoBox::DrawMonsterStatus, &CBattleInfoBox::StubDrawMonsterStatus),
// acgn
FunctionJumpRva(0x275EFD, &CBattle::LoadMSFile, &CBattle::StubLoadMSFile), //it3
FunctionJumpRva(0x5D3545, &CBattle::NakedAS_8D_5F), //ʱ¿Õ´ó±À»µ
//FunctionJumpRva(0x275755, &EDAO::Fade, &EDAO::StubFade),
//FunctionCallRva(0x601122, FadeInRate),
#endif // DEBUG_DISABLE_PATCH