@@ -1477,9 +1477,9 @@ void dMenu_Fmap2DBack_c::setIcon2DPos(u8 param_0, u8 param_1, char const* param_
1477
1477
}
1478
1478
1479
1479
/* 801D2508-801D2658 1CCE48 0150+00 1/1 1/1 0/0 .text isShowRegion__18dMenu_Fmap2DBack_cFi */
1480
- bool dMenu_Fmap2DBack_c::isShowRegion (int param_0) {
1480
+ int dMenu_Fmap2DBack_c::isShowRegion (int param_0) {
1481
1481
if (param_0 == 7 ) {
1482
- return true ;
1482
+ return 1 ;
1483
1483
}
1484
1484
1485
1485
if (g_fmapHIO.mAllRegionsUnlocked ) {
@@ -1488,26 +1488,26 @@ bool dMenu_Fmap2DBack_c::isShowRegion(int param_0) {
1488
1488
}
1489
1489
} else {
1490
1490
if (g_fmapHIO.mDebugRegionBits [param_0] && isShowRegionFlag (param_0)) {
1491
- return true ;
1491
+ return 1 ;
1492
1492
}
1493
1493
if (param_0 == 6 ) {
1494
1494
if (isShowRegionFlag (3 ) && dComIfGs_isRegionBit (4 )) {
1495
- return true ;
1495
+ return 1 ;
1496
1496
}
1497
1497
if (dComIfGp_getNowLevel () == 4 ) {
1498
- return true ;
1498
+ return 1 ;
1499
1499
}
1500
- return false ;
1500
+ return 0 ;
1501
1501
}
1502
1502
if (isShowRegionFlag (param_0) && dComIfGs_isRegionBit (param_0 + 1 )) {
1503
- return true ;
1503
+ return 1 ;
1504
1504
}
1505
1505
if (param_0 + 1 == dComIfGp_getNowLevel ()) {
1506
- return true ;
1506
+ return 1 ;
1507
1507
}
1508
1508
}
1509
1509
1510
- return false ;
1510
+ return 0 ;
1511
1511
}
1512
1512
1513
1513
/* 801D2658-801D2668 1CCF98 0010+00 2/2 0/0 0/0 .text getMapAreaGlobalPosX__18dMenu_Fmap2DBack_cFv
@@ -1771,9 +1771,7 @@ void dMenu_Fmap2DBack_c::calcOffset(u8 param_0, char const* param_1, f32* param_
1771
1771
if (mpStages != NULL ) {
1772
1772
Stage_c::Stage_c_data* data = mpStages->field_0x4 ;
1773
1773
for (int i = 0 ; i < field_0x1225; i++) {
1774
- if (param_0 + 1 == data[i].field_0x9 &&
1775
- strcmp (param_1, data[i].mName ) == 0 )
1776
- {
1774
+ if (param_0 + 1 == data[i].field_0x9 && strcmp (param_1, data[i].mName ) == 0 ) {
1777
1775
*param_2 = field_0x1004[param_0] + data[i].field_0xc ;
1778
1776
*param_3 = field_0x1024[param_0] + data[i].field_0x10 ;
1779
1777
return ;
@@ -1783,10 +1781,72 @@ void dMenu_Fmap2DBack_c::calcOffset(u8 param_0, char const* param_1, f32* param_
1783
1781
1784
1782
*param_2 = field_0x1004[param_0];
1785
1783
*param_3 = field_0x1024[param_0];
1786
- return ;
1787
1784
}
1788
1785
1789
1786
/* 801D2DA8-801D3094 1CD6E8 02EC+00 1/1 0/0 0/0 .text regionTextureDraw__18dMenu_Fmap2DBack_cFv */
1787
+ #ifdef NONMATCHING
1788
+ // Matches with literals
1789
+ void dMenu_Fmap2DBack_c::regionTextureDraw () {
1790
+ f32 local_84, local_88;
1791
+ calcAllMapPosWorld (getMapScissorAreaCenterPosX (), getMapScissorAreaCenterPosY (), &local_84,
1792
+ &local_88);
1793
+
1794
+ f32 local_8c, local_90;
1795
+ calcAllMapPos2D (local_84 + field_0xfc8, local_88 + field_0xfcc, &local_8c, &local_90);
1796
+
1797
+ f32 dVar14 = getMapScissorAreaCenterPosX () - local_8c;
1798
+ f32 dVar13 = getMapScissorAreaCenterPosY () - local_90;
1799
+
1800
+ s32 uVar9 = field_0x1227;
1801
+
1802
+ s32 local_94;
1803
+ if (field_0xfa0 == 0 .0f ) {
1804
+ local_94 = field_0x1226;
1805
+ } else {
1806
+ local_94 = field_0x1227;
1807
+ }
1808
+
1809
+ if (g_fmapHIO.mDrawBackground == false ) {
1810
+ return ;
1811
+ }
1812
+
1813
+ for (int iVar8 = 0 ; iVar8 < 8 ; iVar8++) {
1814
+ s32 uVar10 = field_0x1230[iVar8];
1815
+ if (uVar10 != 0xff && mpAreaTex[uVar10] != NULL ) {
1816
+ f32 fVar3 ;
1817
+ if (isShowRegion (uVar10)) {
1818
+ if (uVar10 != local_94) {
1819
+ mpAreaTex[uVar10]->setBlackWhite (field_0x11f8, field_0x11fc);
1820
+ fVar3 = field_0x1214;
1821
+
1822
+ } else {
1823
+ mpAreaTex[uVar10]->setBlackWhite (field_0x11f0, field_0x11f4);
1824
+ fVar3 = field_0x1210;
1825
+ }
1826
+ } else {
1827
+ mpAreaTex[uVar10]->setBlackWhite (field_0x1200, field_0x1204);
1828
+ fVar3 = 0 .5f ;
1829
+ }
1830
+
1831
+ mpAreaTex[uVar10]->setAlpha (field_0xfc4 * 255 .0f * fVar3 * field_0xfa4);
1832
+
1833
+ if (uVar10 != uVar9) {
1834
+ mpAreaTex[uVar10]->draw (
1835
+ field_0xfbc + (dVar14 + (field_0xe8c[uVar10] + field_0xf0c[uVar10])),
1836
+ field_0xfc0 + (dVar13 + (field_0xeac[uVar10] + field_0xf2c[uVar10])),
1837
+ field_0xecc[uVar10] * field_0xf9c, field_0xeec[uVar10] * field_0xf9c, false ,
1838
+ false , false );
1839
+ } else {
1840
+ mpAreaTex[uVar9]->draw (
1841
+ field_0xfbc + (dVar14 + (field_0xe8c[uVar9] + field_0xf0c[uVar9])),
1842
+ field_0xfc0 + (dVar13 + (field_0xeac[uVar9] + field_0xf2c[uVar9])),
1843
+ field_0xecc[uVar9] * field_0xf9c, field_0xeec[uVar9] * field_0xf9c, false ,
1844
+ false , false );
1845
+ }
1846
+ }
1847
+ }
1848
+ }
1849
+ #else
1790
1850
#pragma push
1791
1851
#pragma optimization_level 0
1792
1852
#pragma optimizewithasm off
@@ -1795,8 +1855,24 @@ asm void dMenu_Fmap2DBack_c::regionTextureDraw() {
1795
1855
#include " asm/d/menu/d_menu_fmap2D/regionTextureDraw__18dMenu_Fmap2DBack_cFv.s"
1796
1856
}
1797
1857
#pragma pop
1858
+ #endif
1798
1859
1799
1860
/* 801D3094-801D31D0 1CD9D4 013C+00 1/1 0/0 0/0 .text stageTextureDraw__18dMenu_Fmap2DBack_cFv */
1861
+ #ifdef NONMATCHING
1862
+ // Matches with literals
1863
+ void dMenu_Fmap2DBack_c::stageTextureDraw () {
1864
+ if (field_0x122f) {
1865
+ mpSpotTexture->setAlpha (field_0xfc4 * 255 .0f * field_0x11d8);
1866
+ } else {
1867
+ f32 tmp = field_0xfc4 * 255 .0f * field_0xfa8;
1868
+ mpSpotTexture->setAlpha (field_0x11d8 * tmp);
1869
+ }
1870
+
1871
+ mpSpotTexture->draw (field_0xfbc + getMapScissorAreaLX (), field_0xfc0 + getMapScissorAreaLY (),
1872
+ getMapScissorAreaSizeRealX (), getMapScissorAreaSizeRealY (), false , false ,
1873
+ false );
1874
+ }
1875
+ #else
1800
1876
#pragma push
1801
1877
#pragma optimization_level 0
1802
1878
#pragma optimizewithasm off
@@ -1805,8 +1881,79 @@ asm void dMenu_Fmap2DBack_c::stageTextureDraw() {
1805
1881
#include " asm/d/menu/d_menu_fmap2D/stageTextureDraw__18dMenu_Fmap2DBack_cFv.s"
1806
1882
}
1807
1883
#pragma pop
1884
+ #endif
1808
1885
1809
1886
/* 801D31D0-801D34DC 1CDB10 030C+00 1/1 0/0 0/0 .text worldGridDraw__18dMenu_Fmap2DBack_cFv */
1887
+ #ifdef NONMATCHING
1888
+ // float regalloc
1889
+ void dMenu_Fmap2DBack_c::worldGridDraw () {
1890
+ f32 local_74, local_78;
1891
+
1892
+ f32 dVar9 = -field_0xfc8;
1893
+ f32 dVar8 = -field_0xfcc;
1894
+ calcAllMapPos2D (dVar9, dVar8, &local_74, &local_78);
1895
+
1896
+ J2DDrawLine (local_74, mDoGph_gInf_c::getMinYF (), local_74,
1897
+ mDoGph_gInf_c::getMinYF () + mDoGph_gInf_c::getHeightF (),
1898
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1899
+
1900
+ f32 xPos = dVar9 - g_fmapHIO.mWorldGridWidth ;
1901
+ while (true ) {
1902
+ calcAllMapPos2D (xPos, dVar8, &local_74, &local_78);
1903
+ if (local_74 >= getMapScissorAreaLX ()) {
1904
+ J2DDrawLine (local_74, mDoGph_gInf_c::getMinYF (), local_74,
1905
+ mDoGph_gInf_c::getMinYF () + mDoGph_gInf_c::getHeightF (),
1906
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1907
+ xPos -= g_fmapHIO.mWorldGridWidth ;
1908
+ } else {
1909
+ break ;
1910
+ }
1911
+ }
1912
+
1913
+ f32 xPos2 = dVar9 + g_fmapHIO.mWorldGridWidth ;
1914
+ while (true ) {
1915
+ calcAllMapPos2D (xPos2, dVar8, &local_74, &local_78);
1916
+ if (local_74 <= getMapScissorAreaLX () + getMapScissorAreaSizeRealX ()) {
1917
+ J2DDrawLine (local_74, mDoGph_gInf_c::getMinYF (), local_74,
1918
+ mDoGph_gInf_c::getMinYF () + mDoGph_gInf_c::getHeightF (),
1919
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1920
+ xPos2 += g_fmapHIO.mWorldGridWidth ;
1921
+ } else {
1922
+ break ;
1923
+ }
1924
+ }
1925
+
1926
+ J2DDrawLine (mDoGph_gInf_c::getMinXF (), local_78,
1927
+ mDoGph_gInf_c::getMinXF () + mDoGph_gInf_c::getWidthF (), local_78,
1928
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1929
+
1930
+ f32 yPos = dVar8 - g_fmapHIO.mWorldGridWidth ;
1931
+ while (true ) {
1932
+ calcAllMapPos2D (dVar9, yPos, &local_74, &local_78);
1933
+ if (local_78 >= getMapScissorAreaLY ()) {
1934
+ J2DDrawLine (mDoGph_gInf_c::getMinXF (), local_78,
1935
+ mDoGph_gInf_c::getMinXF () + mDoGph_gInf_c::getWidthF (), local_78,
1936
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1937
+ yPos -= g_fmapHIO.mWorldGridWidth ;
1938
+ } else {
1939
+ break ;
1940
+ }
1941
+ }
1942
+
1943
+ f32 yPos2 = dVar8 + g_fmapHIO.mWorldGridWidth ;
1944
+ while (true ) {
1945
+ calcAllMapPos2D (dVar9, yPos2, &local_74, &local_78);
1946
+ if (local_78 <= getMapScissorAreaLY () + getMapScissorAreaSizeRealY ()) {
1947
+ J2DDrawLine (mDoGph_gInf_c::getMinXF (), local_78,
1948
+ mDoGph_gInf_c::getMinXF () + mDoGph_gInf_c::getWidthF (), local_78,
1949
+ JUtility::TColor (255 , 255 , 255 , 255 ), 6 );
1950
+ yPos2 += g_fmapHIO.mWorldGridWidth ;
1951
+ }else {
1952
+ break ;
1953
+ }
1954
+ }
1955
+ }
1956
+ #else
1810
1957
#pragma push
1811
1958
#pragma optimization_level 0
1812
1959
#pragma optimizewithasm off
@@ -1815,6 +1962,7 @@ asm void dMenu_Fmap2DBack_c::worldGridDraw() {
1815
1962
#include " asm/d/menu/d_menu_fmap2D/worldGridDraw__18dMenu_Fmap2DBack_cFv.s"
1816
1963
}
1817
1964
#pragma pop
1965
+ #endif
1818
1966
1819
1967
/* 801D34DC-801D382C 1CDE1C 0350+00 1/1 0/0 0/0 .text regionGridDraw__18dMenu_Fmap2DBack_cFv */
1820
1968
#pragma push
0 commit comments