Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Remove an unnecessary hook which may lead to crash
Browse files Browse the repository at this point in the history
  • Loading branch information
secsome committed Nov 20, 2021
1 parent b8750fa commit 4bcd2fd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion FA2sp/FA2sp.Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#define PRODUCT_MAJOR 1
#define PRODUCT_MINOR 2
#define PRODUCT_REVISION 1
#define PRODUCT_REVISION 2

#define PRODUCT_STR __str(PRODUCT_MAJOR) "." __str(PRODUCT_MINOR) "." __str(PRODUCT_REVISION)
#define DISPLAY_STR PRODUCT_STR
Expand Down
72 changes: 36 additions & 36 deletions FA2sp/Miscs/Hooks.TheaterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,42 +148,42 @@ DEFINE_HOOK(45E7A6, CMapData_sub_45D090_TheaterInfo_2, 7)

return 0x45E801;
}

DEFINE_HOOK(46BB36, CMapData_sub_46AB30_TheaterInfo, A)
{
GET(CTileTypeClass*, pTile, EBP);
GET(const int, nRampType, EBX);
GET(int, nRampIndex, EDI);
GET(const int, nIndex, ESI);

enum { LABEL_320 = 0x46BBC2 };

if (nRampType == -1)
{
for (auto& info : TheaterInfo::CurrentInfo)
if (info.Ramp == pTile->TileSet || info.Morphable == pTile->TileSet)
{
if (!pTile->Morphable)
return LABEL_320;
CMapData::Instance->sub_416550(nIndex, info.MorphableIndex);
break;
}
}

if (pTile->Morphable && nRampType != -1)
{
for (auto& info : TheaterInfo::CurrentInfo)
if (info.Ramp == pTile->TileSet || info.Morphable == pTile->TileSet)
{
nRampIndex = info.RampIndex;
break;
}

CMapData::Instance->sub_416550(nIndex, nRampIndex + nRampType - 1);
}

return LABEL_320;
}
//
//DEFINE_HOOK(46BB36, CMapData_sub_46AB30_TheaterInfo, A)
//{
// GET(CTileTypeClass*, pTile, EBP);
// GET(const int, nRampType, EBX);
// GET(int, nRampIndex, EDI);
// GET(const int, nIndex, ESI);
//
// enum { LABEL_320 = 0x46BBC2 };
//
// if (nRampType == -1)
// {
// for (auto& info : TheaterInfo::CurrentInfo)
// if (info.Ramp == pTile->TileSet || info.Morphable == pTile->TileSet)
// {
// if (!pTile->Morphable)
// return LABEL_320;
// CMapData::Instance->sub_416550(nIndex, info.MorphableIndex);
// break;
// }
// }
//
// if (pTile->Morphable && nRampType != -1)
// {
// for (auto& info : TheaterInfo::CurrentInfo)
// if (info.Ramp == pTile->TileSet || info.Morphable == pTile->TileSet)
// {
// nRampIndex = info.RampIndex;
// break;
// }
//
// CMapData::Instance->sub_416550(nIndex, nRampIndex + nRampType - 1);
// }
//
// return LABEL_320;
//}

DEFINE_HOOK_AGAIN(4662E8, CIsoView_OnLButtonDown_TheaterInfo, 5)
DEFINE_HOOK_AGAIN(465BBF, CIsoView_OnLButtonDown_TheaterInfo, 5)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Compile Using C++ Standard Now: C++14
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\\\\//////////////////////////////////////\\\\\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


======================= Changes (2021-11-XX RELEASE 1.2.2) ==============================================================================================
======================= Changes (2021-11-20 RELEASE 1.2.2) ==============================================================================================
+) Now you can add more ramps to be auto generated in FA2 by setting [THEATERInfo] in fadata.ini
+) Now you can specify the display name of theaters
+) Support for ExtraMixes, will be read before any other mixes
Expand Down

0 comments on commit 4bcd2fd

Please sign in to comment.