Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 116b58c444 | |||
| 8fa0dd559f | |||
| d331f4e5cb | |||
| 9b93be22eb | |||
| 2783e3416f | |||
| 9f39b6bf69 | |||
| 937fce9dec | |||
| 377ba80628 | |||
| 5a596e22db | |||
| 1b67b628c1 | |||
| cf486ad7d7 | |||
| b71479aeae | |||
| 7f4e38d732 | |||
| e13245c57c | |||
| a97c09db86 | |||
| cfb0e32e76 | |||
| d424ef949e | |||
| facb4d3047 | |||
| cdd25e5bf7 | |||
| d7d9a39c74 | |||
| 462471063d | |||
| dd61fa8953 | |||
| 79321e7f86 | |||
| fbe26b7a63 | |||
| c8fac11c42 | |||
| 212374cdba | |||
| 07998cb006 |
@@ -13,9 +13,6 @@
|
||||
[submodule "lib/rt64"]
|
||||
path = lib/rt64
|
||||
url = https://github.com/rt64/rt64
|
||||
[submodule "lib/slot_map"]
|
||||
path = lib/slot_map
|
||||
url = https://github.com/SergeyMakeev/slot_map
|
||||
[submodule "lib/bk-decomp"]
|
||||
path = lib/bk-decomp
|
||||
url = https://gitlab.com/banjo.decomp/banjo-kazooie
|
||||
|
||||
@@ -62,7 +62,6 @@ add_subdirectory(${CMAKE_SOURCE_DIR}/lib/RmlUi)
|
||||
target_compile_definitions(rmlui_core PRIVATE LUNASVG_BUILD_STATIC)
|
||||
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime)
|
||||
add_subdirectory(${CMAKE_SOURCE_DIR}/lib/RecompFrontend)
|
||||
|
||||
target_include_directories(rt64 PRIVATE ${CMAKE_BINARY_DIR}/rt64/src)
|
||||
|
||||
@@ -150,22 +149,63 @@ add_executable(BanjoRecompiled)
|
||||
|
||||
set (SOURCES
|
||||
${CMAKE_SOURCE_DIR}/src/main/main.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/main/support.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/main/register_overlays.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/main/register_patches.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/main/rt64_render_context.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/main/theme.cpp
|
||||
|
||||
${CMAKE_SOURCE_DIR}/src/game/input.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/controls.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/config.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/debug.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/recomp_api.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/recomp_actor_api.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/recomp_extension_api.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/recomp_data_api.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/game/rom_decompression.cpp
|
||||
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_renderer.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_state.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_launcher.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_config.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_prompt.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_config_sub_menu.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_color_hack.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_rml_hacks.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_elements.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_mod_details_panel.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_mod_installer.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_mod_menu.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_api.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_api_events.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_api_images.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/ui_utils.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/util/hsv.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/core/ui_context.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_button.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_clickable.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_container.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_element.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_image.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_label.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_radio.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_scroll_container.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_slider.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_span.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_style.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_text_input.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_theme.cpp
|
||||
${CMAKE_SOURCE_DIR}/src/ui/elements/ui_toggle.cpp
|
||||
|
||||
${CMAKE_SOURCE_DIR}/rsp/n_aspMain.cpp
|
||||
|
||||
${CMAKE_SOURCE_DIR}/lib/RmlUi/Backends/RmlUi_Platform_SDL.cpp
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
list(APPEND SOURCES ${CMAKE_SOURCE_DIR}/src/main/support_apple.mm)
|
||||
endif()
|
||||
|
||||
target_include_directories(BanjoRecompiled PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/lib/N64ModernRuntime/N64Recomp/include
|
||||
@@ -179,12 +219,9 @@ target_include_directories(BanjoRecompiled PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/lib/rt64/src
|
||||
${CMAKE_SOURCE_DIR}/lib/rt64/src/rhi
|
||||
${CMAKE_SOURCE_DIR}/lib/rt64/src/render
|
||||
${CMAKE_SOURCE_DIR}/lib/RecompFrontend/recompinput/include
|
||||
${CMAKE_SOURCE_DIR}/lib/RecompFrontend/recompui/include
|
||||
${CMAKE_SOURCE_DIR}/lib/RecompFrontend/recompui/src
|
||||
${CMAKE_SOURCE_DIR}/lib/freetype-windows-binaries/include
|
||||
${CMAKE_SOURCE_DIR}/lib/rt64/src/contrib/nativefiledialog-extended/src/include
|
||||
${CMAKE_SOURCE_DIR}/lib/slot_map/slot_map
|
||||
${CMAKE_SOURCE_DIR}/lib/SlotMap
|
||||
${CMAKE_BINARY_DIR}/shaders
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
@@ -248,12 +285,12 @@ if (WIN32)
|
||||
PROPERTIES
|
||||
LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE"
|
||||
LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
||||
LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE" # "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
||||
LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
||||
LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup"
|
||||
)
|
||||
|
||||
# target_sources(BanjoRecompiled PRIVATE ${CMAKE_SOURCE_DIR}/icons/app.rc)
|
||||
target_link_libraries(BanjoRecompiled PRIVATE SDL2)
|
||||
target_link_libraries(BanjoRecompiled PRIVATE SDL2 Winmm.lib)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
@@ -319,8 +356,6 @@ target_link_libraries(BanjoRecompiled PRIVATE
|
||||
rt64
|
||||
RmlUi::Core
|
||||
RmlUi::Debugger
|
||||
recompinput
|
||||
recompui
|
||||
nfd
|
||||
lunasvg
|
||||
)
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<svg width="1920" height="1280" viewBox="0 0 1920 1280" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_540_3892)">
|
||||
<path d="M640.284 1159.76C639.797 1155.45 450.469 1282.17 509.25 1013.98C558.275 790.302 931.74 830.287 935.414 1080.11C934.13 1082.73 817.852 1271.15 640.284 1159.76Z" fill="#F7FAFA"/>
|
||||
<path d="M840.342 1153.98C848.276 1149.28 858.618 1146.39 863.738 1139.58C889.655 1105.09 876.419 1006.88 843.177 979.092C807.939 949.633 781.195 946.456 745.196 976.366C712.989 1003.12 687.729 1001.8 654.91 977.124C608.969 942.579 573.886 949.503 534.1 992.979C530.091 997.36 525.037 1000.78 515.791 1007.7C512.957 1009.82 509.73 1012.26 506.019 1015.17C523.951 896.876 489.547 810.372 389.215 748.43C440.937 733.701 492.005 709.847 544.513 706.085C665.308 697.43 786.953 700.842 904.341 736.144C944.472 748.212 981.097 771.589 1020.21 787.649C1029.63 791.52 1044.09 790.074 1053.65 785.575C1129.56 749.85 1163.71 762.009 1200.28 845.599C1203.26 890.116 1201.35 923.722 1159.61 946.421C1141.33 956.364 1131.25 983.91 1120.83 1005.12C1108.07 1031.07 1098.32 1058.55 1088.28 1085.75C1079.27 1110.16 1071.64 1135.09 1061.45 1161.61C1038.31 1177.6 1017.14 1191.77 993.45 1204.76C982.508 1198.92 974.59 1192.22 965.556 1189.93C923.594 1179.3 881.322 1169.89 839.497 1158.53C839.833 1157.02 840.342 1153.98 840.342 1153.98ZM663.696 811.922C614.42 828.006 559.256 829.022 510.459 870.041C535.005 881.377 554.123 888.103 570.95 898.525C590.764 910.798 603.621 907.893 621.516 892.344C646.88 870.307 676.37 852.559 705.603 835.571C731.945 820.262 760.316 808.444 787.791 795.087C787.396 792.979 787.001 790.871 786.606 788.763C747.539 795.752 708.472 802.74 663.696 811.922ZM1060.89 840.786C1071.07 865.99 1081.26 891.193 1092.28 918.453C1118.02 922.553 1146.64 917.172 1153.07 886.418C1157.78 863.91 1155.74 830.123 1141.84 815.877C1120.28 793.79 1090.16 809.888 1066.52 826.569C1063.74 828.534 1062.19 832.254 1060.89 840.786Z" fill="#62300F"/>
|
||||
<path d="M995.96 1205.93C1017.14 1191.77 1038.31 1177.6 1064.05 1162.62C1099.11 1159.53 1129.99 1159.44 1160.02 1154.32C1186.05 1149.89 1211.11 1139.75 1239.34 1132.84C1279.43 1125.11 1316.77 1116.66 1356.71 1107.84C1367.44 1105.02 1375.56 1102.58 1386.68 1101.06C1417.57 1098.78 1445.46 1095.58 1476.26 1092.02C1489.79 1088.14 1500.41 1084.62 1512.05 1080.84C1513.07 1080.57 1515.17 1080.52 1515.17 1080.52C1607.17 1076.03 1699.17 1071.54 1793.59 1070.03C1795.74 1094.85 1795.44 1116.71 1793.29 1140.42C1786.58 1145.78 1782.2 1150.47 1776.81 1152.62C1717.36 1176.32 1657.39 1198.78 1598.41 1223.58C1581.3 1230.78 1566.9 1244.4 1548.45 1255.19C1456.27 1288.6 1366.76 1321.29 1259.62 1311.31C1271.98 1337.18 1280.5 1355.02 1288.93 1375.16C1290.9 1379.07 1292.97 1380.68 1294.77 1382.11C1294.5 1381.94 1293.99 1382.32 1293.4 1385.03C1361.57 1517.62 1439.36 1639.59 1575.52 1710.42C1520.53 1726.41 1479.19 1691.16 1436.71 1668.82C1390.82 1644.69 1350.75 1609.66 1307.32 1580.62C1250.71 1542.77 1193.24 1506.22 1136.26 1468.94C1113.13 1453.8 1090.32 1438.2 1063.15 1420.27C980.139 1371.54 972.652 1273.71 995.96 1205.93Z" fill="#FEE003"/>
|
||||
<path d="M473.743 1137.47C476.779 1137.08 479.815 1136.68 488.691 1136.06C498.038 1136.38 501.546 1136.92 505.055 1137.47C514.058 1137.92 523.061 1138.36 536.733 1141.44C558.37 1149.77 575.005 1156.93 592.37 1160.91C641.457 1172.15 684.637 1194.46 716.199 1233.43C729.906 1250.36 745.604 1276.19 742.184 1294.6C729.101 1365.01 701.55 1435.73 646.084 1479.14C574.848 1534.91 503.547 1599.29 403.882 1604.24C392.443 1604.81 381.314 1611.63 370.041 1615.55C361.764 1614.25 353.487 1612.95 341.848 1608.22C271.197 1515.55 272.792 1408.28 262.912 1304.01C293.108 1296.61 320.801 1291.47 347.486 1283.11C454.72 1249.5 469.282 1232.16 473.743 1137.47Z" fill="#F1AF85"/>
|
||||
<path d="M1236.59 1132.13C1211.11 1139.75 1186.05 1149.89 1160.02 1154.32C1129.99 1159.44 1099.11 1159.53 1066 1160.8C1071.64 1135.09 1079.27 1110.16 1088.28 1085.75C1098.32 1058.55 1108.07 1031.07 1120.83 1005.12C1131.25 983.91 1141.33 956.364 1159.61 946.421C1201.35 923.722 1203.26 890.116 1200.65 848.276C1229.54 780.721 1254.15 714.307 1287.66 652.732C1320.75 591.925 1361.11 534.774 1401.61 478.407C1426.62 443.594 1485.69 445.705 1519.17 474.27C1539.63 491.721 1565.11 503.276 1588.34 517.482C1599.16 524.101 1617.62 529.49 1618.94 537.652C1620.77 548.935 1611.81 563.927 1603.77 574.514C1564.05 626.791 1523.41 678.379 1482.51 729.751C1434.55 790.009 1453.6 850.044 1481.3 910.739C1489.86 929.474 1496.03 949.298 1501.48 973.875C1494.24 981.438 1488.81 983.75 1481.87 984.024C1466.62 959.458 1452.39 937.21 1439.27 914.33C1422.7 885.447 1404.33 891.008 1388.89 913.221C1372.36 936.982 1356.98 933.105 1332.79 924.059C1312.8 916.588 1276.64 914.068 1266.73 925.662C1243.63 952.713 1232.02 989.581 1215.66 1025.64C1222.58 1063.24 1229.59 1097.69 1236.59 1132.13Z" fill="#FF2904"/>
|
||||
<path d="M993.45 1204.76C972.652 1273.71 980.139 1371.54 1060.66 1419.33C1052.6 1431.2 1041.31 1440.41 1033.31 1451.92C961.96 1554.66 883.013 1650.58 773.747 1714.87C717.841 1747.76 653.326 1755.11 589.315 1747.89C529.296 1741.13 492.999 1694.78 480.317 1611.52C485.92 1604.94 490.262 1603.37 495.067 1604.41C506.742 1626.81 513.468 1652.19 529.943 1665.44C598.66 1720.72 739.644 1672.44 767.512 1584.68C805.086 1528.67 835.282 1472.97 824.279 1401.41C831.53 1374.04 842.141 1349.96 844.002 1325.23C845.721 1302.37 845.917 1272.14 832.967 1256.87C802.4 1220.85 763.609 1191.8 728.144 1159.94C728.144 1159.94 728.634 1159.86 731.981 1160.38C743.988 1160.73 752.648 1160.56 764.513 1160.12C791.532 1159.91 815.347 1159.97 839.161 1160.04C881.322 1169.89 923.594 1179.3 965.556 1189.93C974.59 1192.22 982.508 1198.92 993.45 1204.76Z" fill="#F2B085"/>
|
||||
<path d="M472.524 1135.06C469.282 1232.16 454.72 1249.5 347.486 1283.11C320.801 1291.47 293.108 1296.61 260.622 1302.34C246.885 1303.39 238.404 1305.33 227.06 1306.78C205.015 1298.55 185.833 1290.82 166.651 1283.08C114.696 1234.84 110.751 1171.2 115.315 1107.59C119.09 1054.98 194.335 999.957 264.464 991.678C374.636 978.67 444.355 1026.19 472.524 1135.06Z" fill="#030303"/>
|
||||
<path d="M725.034 1159.56C763.609 1191.81 802.4 1220.85 832.967 1256.87C845.917 1272.14 845.721 1302.37 844.002 1325.23C842.141 1349.96 831.53 1374.04 821.921 1401.64C804.038 1416.78 790.026 1430.44 773.721 1440.31C687.531 1492.49 600.763 1543.7 512.022 1595.26C504.768 1597.45 499.685 1599.63 494.603 1601.81C490.262 1603.37 485.92 1604.94 480.405 1608.58C444.759 1612.81 410.287 1614.96 372.928 1616.33C381.314 1611.63 392.443 1604.81 403.882 1604.24C503.547 1599.29 574.848 1534.91 646.084 1479.15C701.55 1435.73 729.101 1365.01 742.184 1294.6C745.604 1276.19 729.906 1250.36 716.199 1233.43C684.637 1194.46 641.457 1172.15 592.37 1160.91C575.005 1156.93 558.37 1149.77 540.102 1141.73C542.031 1138.9 545.26 1138.39 552.654 1137.76C558.036 1137.47 559.252 1137.3 563.1 1138.21C590.92 1144.08 616.109 1148.87 643.195 1154C646.36 1154.13 647.628 1153.93 648.897 1153.73C673.239 1155.55 697.582 1157.36 725.034 1159.56Z" fill="#D69A76"/>
|
||||
<path d="M1551.26 1255.07C1566.9 1244.4 1581.3 1230.78 1598.41 1223.58C1657.39 1198.78 1717.36 1176.32 1776.81 1152.62C1782.2 1150.47 1786.58 1145.78 1795.71 1141.55C1806.27 1150.46 1812.55 1160.1 1818.83 1169.74C1801.57 1184.19 1785.13 1199.77 1766.9 1212.88C1719.12 1247.22 1670.57 1280.49 1617.82 1315.33C1603.14 1319.41 1592.97 1322.34 1581.84 1322.63C1571.02 1298.35 1561.14 1276.71 1551.26 1255.07Z" fill="#684004"/>
|
||||
<path d="M839.497 1158.53C815.347 1159.97 791.532 1159.91 762.191 1158.36C749.054 1155.45 741.443 1154.03 733.832 1152.61C725.362 1122.91 713.629 1093.66 709.433 1063.37C705.937 1038.13 722.181 1023.98 749.438 1022.26C827.461 1017.34 854.162 1047.41 839.312 1125.01C837.797 1132.93 837.988 1141.17 838.864 1151.62C840.342 1153.98 839.833 1157.02 839.497 1158.53ZM760.158 1111.74C763.782 1114.96 767.883 1121.33 770.947 1120.86C785.23 1118.69 809.287 1117.55 811.275 1110.67C815.713 1095.32 812.437 1075.2 805.443 1060.23C802.308 1053.52 777.394 1048.42 771.724 1053.36C761.776 1062.01 758.401 1078.73 753.708 1092.57C752.471 1096.21 756.494 1101.64 760.158 1111.74Z" fill="#30C4FB"/>
|
||||
<path d="M641.299 1153.67C616.109 1148.87 590.92 1144.08 562.615 1136.48C558.536 1131.32 556.887 1129.63 554.55 1128.61C552.893 1125.38 550.868 1122.28 549.634 1118.89C536.146 1081.9 543.329 1045.31 568.005 1029.72C596.236 1011.87 621.649 1021.11 644.43 1040.7C666.907 1060.03 669.292 1103.25 648.149 1137.82C644.117 1145.7 642.708 1149.68 641.299 1153.67ZM638.523 1102.35C632.818 1085.45 629.577 1066.83 619.806 1052.75C617.114 1048.87 586.227 1055.35 583.587 1062.63C578.67 1076.19 579.38 1100.91 588.147 1107.85C597.74 1115.45 619.101 1108.19 638.523 1102.35Z" fill="#30C4FB"/>
|
||||
<path d="M1820.95 1168.31C1812.55 1160.1 1806.27 1150.46 1797.57 1139.69C1795.44 1116.71 1795.74 1094.85 1797.22 1070.46C1803.11 1066.88 1808.44 1063.85 1812.41 1065.11C1833.98 1071.99 1855.22 1079.92 1876.57 1087.49C1863.83 1105.44 1851.09 1123.39 1838.74 1144.12C1839.12 1146.9 1839.28 1147.28 1839.28 1147.28C1833.88 1153.81 1828.47 1160.35 1820.95 1168.31Z" fill="#A94105"/>
|
||||
<path d="M1483.38 986.062C1488.81 983.75 1494.24 981.438 1501.42 976.661C1508.08 1007.89 1512.99 1041.59 1516.54 1077.9C1515.17 1080.52 1513.07 1080.57 1510.37 1078.28C1499.58 1046.01 1491.48 1016.03 1483.38 986.062Z" fill="#FF4120"/>
|
||||
<path d="M507.013 1136.52C502.665 1139.78 499.233 1139.06 494.555 1137.98C497.34 1094.73 497.591 1058.23 505.576 1013.98C509.529 1012.62 516.598 1006.72 516.598 1006.72C513.708 1048.66 510.819 1090.6 507.013 1136.52Z" fill="#62300F"/>
|
||||
<path d="M732.275 1153.46C741.443 1154.03 749.054 1155.45 758.987 1158.63C752.648 1160.56 743.988 1160.73 732.096 1160.6C727.352 1157.64 727.969 1155.64 732.275 1153.46Z" fill="#D69A76"/>
|
||||
<path d="M1838.96 1146.77C1838.8 1146.64 1839.97 1147.65 1839.97 1147.65C1839.97 1147.65 1839.45 1145.93 1839.37 1146.61C1839.28 1147.28 1839.12 1146.9 1838.96 1146.77Z" fill="#A94105"/>
|
||||
<path d="M554.155 1130.62C556.887 1129.63 558.536 1131.32 559.984 1135.4C559.252 1137.3 558.036 1137.47 555.035 1137.17C553.421 1135.35 553.59 1133.99 554.155 1130.62Z" fill="#F7FAFA"/>
|
||||
<path d="M666.551 810.825C708.472 802.74 747.539 795.752 786.606 788.763C787.001 790.871 787.396 792.979 787.791 795.087C760.316 808.444 731.945 820.262 705.603 835.571C676.37 852.559 646.88 870.307 621.516 892.344C603.621 907.893 590.764 910.798 570.95 898.525C554.123 888.103 535.005 881.377 510.459 870.041C559.256 829.022 614.42 828.006 666.551 810.825Z" fill="#351907"/>
|
||||
<path d="M1060.48 837.973C1062.19 832.254 1063.74 828.534 1066.52 826.569C1090.16 809.888 1120.28 793.79 1141.84 815.877C1155.74 830.123 1157.78 863.91 1153.07 886.418C1146.64 917.172 1118.02 922.553 1092.28 918.453C1081.26 891.193 1071.07 865.99 1060.48 837.973Z" fill="#EEAE83"/>
|
||||
<path d="M1581.84 1322.63C1582.05 1328.39 1581.3 1331.5 1580 1336.99C1573.43 1339.03 1565.84 1336.16 1561.61 1338.76C1506.88 1372.38 1445.66 1380.68 1383.57 1384.21C1356.03 1385.78 1328.25 1383.01 1297.28 1382.26C1293.99 1382.32 1294.5 1381.94 1294.26 1380.26C1292.35 1376.68 1290.69 1374.77 1289.03 1372.86C1280.5 1355.02 1271.98 1337.18 1259.61 1311.31C1366.76 1321.29 1456.27 1288.6 1548.45 1255.19C1561.14 1276.71 1571.02 1298.35 1581.84 1322.63Z" fill="#A22986"/>
|
||||
<path d="M1239.34 1132.85C1229.59 1097.69 1222.58 1063.24 1218.09 1024.71C1227.89 1016.4 1235.14 1012.14 1242.44 1007.97C1296.64 977.059 1322.84 983.561 1357.79 1036.17C1359.41 1038.6 1363.69 1039.27 1367.07 1040.93C1371.26 988.879 1379.6 982.11 1434.52 985.249C1468.22 987.175 1488.77 1012.11 1485.84 1051.1C1484.79 1065.1 1477.69 1078.64 1473.36 1092.38C1445.46 1095.58 1417.57 1098.78 1386.23 1098.86C1373.23 1099.9 1363.67 1104.05 1354.11 1108.21C1316.77 1116.66 1279.43 1125.11 1239.34 1132.85ZM1296.93 1101.79C1317.5 1093 1343.26 1083.66 1323.77 1056.05C1314.69 1043.19 1292.53 1034.86 1275.87 1034.13C1268.13 1033.79 1253.81 1055.79 1252.26 1068.83C1249.2 1094.4 1270.71 1099.46 1296.93 1101.79ZM1400.93 1065.13C1416.53 1082.98 1434.49 1082.16 1447.13 1064.76C1453.01 1056.68 1452.77 1033.16 1447.64 1030.27C1435.53 1023.47 1417.91 1021.29 1404.46 1024.75C1399.4 1026.04 1399.68 1048.12 1400.93 1065.13ZM1369.82 1071.19C1370.64 1072.02 1371.35 1073.29 1372.32 1073.54C1372.96 1073.7 1374.68 1072.44 1374.71 1071.76C1374.92 1067.05 1374.82 1062.33 1374.82 1057.61C1373.55 1057.58 1372.29 1057.56 1371.02 1057.54C1370.4 1060.8 1369.78 1064.06 1369.82 1071.19Z" fill="#099805"/>
|
||||
<path d="M1476.26 1092.02C1477.69 1078.64 1484.79 1065.1 1485.84 1051.1C1488.77 1012.11 1468.22 987.175 1434.52 985.249C1379.6 982.11 1371.26 988.879 1367.07 1040.93C1363.69 1039.27 1359.41 1038.6 1357.79 1036.17C1322.84 983.561 1296.64 977.059 1242.44 1007.97C1235.14 1012.14 1227.89 1016.4 1218.19 1021.54C1232.02 989.581 1243.63 952.713 1266.73 925.662C1276.64 914.068 1312.8 916.588 1332.79 924.058C1356.98 933.105 1372.36 936.982 1388.89 913.22C1404.33 891.008 1422.7 885.447 1439.27 914.33C1452.39 937.21 1466.62 959.457 1481.87 984.024C1491.48 1016.03 1499.58 1046.01 1509.36 1078.54C1500.41 1084.62 1489.79 1088.14 1476.26 1092.02Z" fill="#FBF8F4"/>
|
||||
<path d="M1356.71 1107.84C1363.67 1104.05 1373.23 1099.9 1383.23 1097.94C1375.56 1102.58 1367.44 1105.02 1356.71 1107.84Z" fill="#0B9909"/>
|
||||
<path d="M759.13 1108.99C756.494 1101.64 752.471 1096.21 753.708 1092.56C758.401 1078.73 761.776 1062.01 771.724 1053.36C777.394 1048.42 802.308 1053.52 805.443 1060.23C812.437 1075.2 815.713 1095.32 811.275 1110.67C809.287 1117.55 785.23 1118.69 770.947 1120.86C767.883 1121.33 763.782 1114.96 759.13 1108.99Z" fill="#02090C"/>
|
||||
<path d="M636.928 1104.88C619.101 1108.19 597.74 1115.45 588.147 1107.85C579.38 1100.91 578.67 1076.19 583.587 1062.63C586.227 1055.35 617.114 1048.87 619.806 1052.75C629.577 1066.83 632.818 1085.44 636.928 1104.88Z" fill="#02090C"/>
|
||||
<path d="M1294.06 1101.9C1270.71 1099.46 1249.2 1094.4 1252.26 1068.83C1253.81 1055.79 1268.13 1033.79 1275.87 1034.13C1292.53 1034.86 1314.69 1043.19 1323.77 1056.05C1343.26 1083.66 1317.5 1093 1294.06 1101.9Z" fill="#010901"/>
|
||||
<path d="M1399.23 1062.93C1399.68 1048.12 1399.4 1026.04 1404.46 1024.75C1417.91 1021.29 1435.53 1023.47 1447.64 1030.27C1452.77 1033.16 1453.01 1056.68 1447.13 1064.76C1434.49 1082.16 1416.53 1082.98 1399.23 1062.93Z" fill="#010901"/>
|
||||
<path d="M1369.5 1069.25C1369.78 1064.06 1370.4 1060.8 1371.02 1057.54C1372.29 1057.56 1373.55 1057.58 1374.82 1057.61C1374.82 1062.33 1374.93 1067.05 1374.71 1071.76C1374.68 1072.44 1372.96 1073.7 1372.32 1073.54C1371.35 1073.29 1370.64 1072.02 1369.5 1069.25Z" fill="#0B9909"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_540_3892">
|
||||
<rect width="1920" height="1280" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 14 KiB |
@@ -0,0 +1,136 @@
|
||||
<rml>
|
||||
<head>
|
||||
<link type="text/rcss" href="rml.rcss"/>
|
||||
<link type="text/rcss" href="recomp.rcss"/>
|
||||
<title>Inventory</title>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Hide the window icon. */
|
||||
div#title_bar div#icon
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.flex-grid {
|
||||
display: flex;
|
||||
}
|
||||
.col {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<link type="text/template" href="config_menu/general.rml" />
|
||||
<link type="text/template" href="config_menu/controls.rml" />
|
||||
<link type="text/template" href="config_menu/graphics.rml" />
|
||||
<link type="text/template" href="config_menu/sound.rml" />
|
||||
<link type="text/template" href="config_menu/mods.rml" />
|
||||
<link type="text/template" href="config_menu/debug.rml" />
|
||||
</head>
|
||||
<body class="window">
|
||||
<!-- <handle move_target="#document"> -->
|
||||
<div id="window" class="rmlui-window" style="display:flex; flex-flow: column; background-color:rgba(0,0,0,0)" onkeydown="config_keydown">
|
||||
<div class="centered-page" onclick="close_config_menu_backdrop">
|
||||
<div class="centered-page__modal">
|
||||
<tabset class="tabs" id="config_tabset">
|
||||
<tab class="tab" autofocus id="tab_general">
|
||||
<div>General</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config" data-model="general_model">
|
||||
<template src="config-menu__general" />
|
||||
</panel>
|
||||
<tab class="tab" id="tab_controls">
|
||||
<div>Controls</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config" data-model="controls_model">
|
||||
<template src="config-menu__controls" />
|
||||
</panel>
|
||||
<tab class="tab" id="tab_graphics">
|
||||
<div>Graphics</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config" data-model="graphics_model">
|
||||
<template src="config-menu__graphics" />
|
||||
</panel>
|
||||
<tab class="tab" id="tab_sound">
|
||||
<div>Sound</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config" data-model="sound_options_model">
|
||||
<template src="config-menu__sound" />
|
||||
</panel>
|
||||
<tab class="tab" id="tab_mods">
|
||||
<div>Mods</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config">
|
||||
<template src="config-menu__mods" />
|
||||
</panel>
|
||||
<tab class="tab" data-model="debug_model" data-if="debug_enabled" id="tab_debug">
|
||||
<div>Debug</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
<panel class="config" data-model="debug_model">
|
||||
<template src="config-menu__debug" />
|
||||
</panel>
|
||||
</tabset>
|
||||
<div class="config__icon-buttons">
|
||||
<button
|
||||
class="icon-button"
|
||||
onclick="open_quit_game_prompt"
|
||||
id="config__quit-game-button"
|
||||
>
|
||||
<svg src="icons/Quit.svg" />
|
||||
</button>
|
||||
<button
|
||||
class="icon-button"
|
||||
onclick="close_config_menu"
|
||||
id="config__close-menu-button"
|
||||
>
|
||||
<svg src="icons/X.svg" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="centered-page__controls"
|
||||
data-model="nav_help_model"
|
||||
>
|
||||
<label>
|
||||
<span>Navigate</span>
|
||||
<span class="prompt-font-sm">{{nav_help__navigate}}</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Accept</span>
|
||||
<span class="prompt-font-sm">{{nav_help__accept}}</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Exit</span>
|
||||
<span class="prompt-font-sm">{{nav_help__exit}}</span>
|
||||
</label>
|
||||
<!-- <label><span style="font-family:promptfont;">⇳</span> Navigate</label>
|
||||
<label><span style="font-family:promptfont;">↧</span> Accept</label> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div
|
||||
id="prompt-root"
|
||||
data-model="prompt_model"
|
||||
data-if="prompt__open"
|
||||
data-alias-promptOpen="prompt__open"
|
||||
data-alias-promptHeader="prompt__header"
|
||||
data-alias-promptContent="prompt__content"
|
||||
data-alias-promptConfirmLabel="prompt__confirmLabel"
|
||||
data-alias-promptCancelLabel="prompt__cancelLabel"
|
||||
data-event-click="prompt__on_click"
|
||||
>
|
||||
<template src="prompt"/>
|
||||
</div> -->
|
||||
</div>
|
||||
<!-- </handle> -->
|
||||
<!-- <handle size_target="#document" style="position: absolute; width: 16dp; height: 16dp; bottom: 0px; right: 0px; cursor: resize;"></handle> -->
|
||||
</body>
|
||||
</rml>
|
||||
@@ -0,0 +1,360 @@
|
||||
<template name="config-menu__controls">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form" data-attr-cur-input="cur_input_row" data-attr-cur-binding-slot="active_binding_slot">
|
||||
<div class="config__header">
|
||||
<div class="config__header-left">
|
||||
<button
|
||||
class="toggle"
|
||||
id="cont_kb_toggle"
|
||||
data-class-toggle--checked="input_device_is_keyboard"
|
||||
onclick="toggle_input_device"
|
||||
style="nav-down: #input_row_button_0_0; nav-up: #tab_controls"
|
||||
>
|
||||
<div class="toggle__border" />
|
||||
<div class="toggle__floater" />
|
||||
<div class="toggle__icons">
|
||||
<div class="toggle__icon toggle__icon--left"><div></div></div>
|
||||
<div class="toggle__icon toggle__icon--right"><div></div></div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button
|
||||
class="button button--warning"
|
||||
style="nav-down:#input_row_button_0_0"
|
||||
data-event-click="reset_input_bindings_to_defaults"
|
||||
>
|
||||
<div class="button__label">Reset to defaults</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config__wrapper input-config">
|
||||
<div class="input-config__horizontal-split">
|
||||
<div class="input-config__mappings" data-event-mouseout="set_input_row_focus(-1)">
|
||||
<div class="input-config__mappings-scroll">
|
||||
<div class="input-config__mappings-wrapper">
|
||||
<div
|
||||
class="control-option"
|
||||
data-attr-id="'input_row_' + i"
|
||||
data-for="input_bindings, i : inputs.array"
|
||||
data-event-mouseover="set_input_row_focus(i)"
|
||||
data-class-control-option--active="get_input_enum_name(i)==cur_input_row"
|
||||
data-if="!input_device_is_keyboard || (get_input_enum_name(i) != 'TOGGLE_MENU' && get_input_enum_name(i) != 'ACCEPT_MENU' && get_input_enum_name(i) != 'APPLY_MENU')"
|
||||
>
|
||||
<label
|
||||
class="control-option__label"
|
||||
>{{get_input_name(i)}}</label>
|
||||
<div class="control-option__bindings">
|
||||
<button
|
||||
data-attr-id="'input_row_button_' + i + '_' + j"
|
||||
data-event-blur="set_input_row_focus(-1)"
|
||||
data-event-focus="set_input_row_focus(i)"
|
||||
data-for="cur_binding, j : input_bindings"
|
||||
data-event-click="set_input_binding(i,j)"
|
||||
class="prompt-font control-option__binding"
|
||||
data-attr-bind-slot="j"
|
||||
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
|
||||
>
|
||||
<div class="control-option__binding-recording">
|
||||
<div class="control-option__binding-circle" />
|
||||
<div class="control-option__binding-edge">
|
||||
<svg class="control-option__binding-edge-svg" src="icons/RecordBorder.svg" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-option__binding-icon">{{cur_binding}}</div>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
data-if="get_input_enum_name(i) != 'TOGGLE_MENU' && get_input_enum_name(i) != 'ACCEPT_MENU'"
|
||||
data-event-blur="set_input_row_focus(-1)"
|
||||
data-event-focus="set_input_row_focus(i)"
|
||||
data-event-click="clear_input_bindings(i)"
|
||||
class="icon-button icon-button--danger"
|
||||
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
|
||||
>
|
||||
<svg src="icons/Trash.svg" />
|
||||
</button>
|
||||
<button
|
||||
data-if="get_input_enum_name(i) == 'TOGGLE_MENU' || get_input_enum_name(i) == 'ACCEPT_MENU'"
|
||||
data-event-blur="set_input_row_focus(-1)"
|
||||
data-event-focus="set_input_row_focus(i)"
|
||||
data-event-click="reset_single_input_binding_to_default(i)"
|
||||
class="icon-button icon-button--danger"
|
||||
data-attr-style="i == 0 ? 'nav-up:#cont_kb_toggle' : 'nav-up:auto'"
|
||||
>
|
||||
<svg src="icons/Reset.svg" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-config__visual-wrapper">
|
||||
<div class="input-config__visual-aspect">
|
||||
<div class="input-config__visual">
|
||||
<!-- stick only -->
|
||||
<div class="input-config__visual-stick-wrapper">
|
||||
<div
|
||||
class="input-viz input-config__visual-stick"
|
||||
visual-input="X_AXIS_NEG X_AXIS_POS Y_AXIS_NEG Y_AXIS_POS"
|
||||
>
|
||||
<div class="input-viz__stick-split input-viz__stick-split--vertical">
|
||||
<div class="input-viz input-viz__mappings" visual-input="Y_AXIS_POS">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--up" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.Y_AXIS_POS"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__dpad-divider" />
|
||||
<div class="input-viz input-viz__mappings" visual-input="Y_AXIS_NEG">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--down" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.Y_AXIS_NEG"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__stick-split input-viz__stick-split--horizontal">
|
||||
<div class="input-viz input-viz__mappings" visual-input="X_AXIS_NEG">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--left" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.X_AXIS_NEG"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__dpad-divider" />
|
||||
<div class="input-viz input-viz__mappings" visual-input="X_AXIS_POS">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--right" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.X_AXIS_POS"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- top half -->
|
||||
<div class="input-config__visual-half">
|
||||
<div class="input-config__visual-quarter-left">
|
||||
<div
|
||||
class="input-viz input-viz__dpad"
|
||||
visual-input="DPAD_UP DPAD_DOWN DPAD_LEFT DPAD_RIGHT"
|
||||
>
|
||||
<svg src="icons/VizMap/DPad.svg" />
|
||||
<div class="input-viz__dpad-split input-viz__dpad-split--vertical">
|
||||
<div class="input-viz input-viz__mappings" visual-input="DPAD_UP">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--up" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.DPAD_UP"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__dpad-divider" />
|
||||
<div class="input-viz input-viz__mappings" visual-input="DPAD_DOWN">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--down" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.DPAD_DOWN"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__dpad-split input-viz__dpad-split--horizontal">
|
||||
<div class="input-viz input-viz__mappings" visual-input="DPAD_LEFT">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--left" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.DPAD_LEFT"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-viz__dpad-divider" />
|
||||
<div class="input-viz input-viz__mappings" visual-input="DPAD_RIGHT">
|
||||
<svg class="input-viz__dpad-arrow input-viz__dpad-arrow--right" src="icons/VizMap/DPadArrow.svg" />
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.DPAD_RIGHT"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-config__visual-quarter-right">
|
||||
<div class="input-config__main-buttons">
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--sm input-viz__button--Start"
|
||||
visual-input="START"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonSmall.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.START"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--lg input-viz__button--B"
|
||||
visual-input="B"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonLarge.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.B"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--lg input-viz__button--A"
|
||||
visual-input="A"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonLarge.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.A"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-config__c-buttons">
|
||||
<div class="input-config__c-buttons-lr">
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--md input-viz__button--C"
|
||||
visual-input="C_LEFT"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonMedium.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.C_LEFT"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--md input-viz__button--C"
|
||||
visual-input="C_RIGHT"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonMedium.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.C_RIGHT"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-config__c-buttons-du">
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--md input-viz__button--C"
|
||||
visual-input="C_DOWN"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonMedium.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.C_DOWN"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__button input-viz__button--sm input-viz__button--C"
|
||||
visual-input="C_UP"
|
||||
>
|
||||
<svg src="icons/VizMap/ButtonMedium.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.C_UP"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- bottom half -->
|
||||
<div class="input-config__visual-half input-config__visual-half--bottom">
|
||||
<div
|
||||
class="input-viz input-viz__Z"
|
||||
visual-input="Z"
|
||||
>
|
||||
<svg src="icons/VizMap/Target.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.Z"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__R"
|
||||
visual-input="R"
|
||||
>
|
||||
<svg src="icons/VizMap/Shield.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.R"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="input-viz input-viz__L"
|
||||
visual-input="L"
|
||||
>
|
||||
<svg src="icons/VizMap/Map.svg" />
|
||||
<div class="input-viz__mappings">
|
||||
<div
|
||||
class="input-config__visual-mapping"
|
||||
data-for="cur_binding, i : inputs.L"
|
||||
>
|
||||
<div>{{cur_binding}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
<template name="config-menu__debug">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form">
|
||||
<div class="config__wrapper">
|
||||
<div class="config-debug">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,297 @@
|
||||
<template name="config-menu__general">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form" id="conf-general__form">
|
||||
<div class="config__hz-wrapper" id="conf-general__hz-wrapper">
|
||||
<!-- Options -->
|
||||
<div class="config__wrapper" data-event-mouseout="set_cur_config_index(-1)" id="conf-general__wrapper">
|
||||
<!-- rumble strength -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(1)">
|
||||
<label class="config-option__title">Rumble Strength</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{rumble_strength}}%</label>
|
||||
<input
|
||||
class="nav-vert"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(1)"
|
||||
id="rumble_strength_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp;"
|
||||
data-value="rumble_strength"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- gyro sensitivity -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(2)">
|
||||
<label class="config-option__title">Gyro Sensitivity</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{gyro_sensitivity}}%</label>
|
||||
<input
|
||||
class="nav-vert"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(2)"
|
||||
id="gyro_sensitivity_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp;"
|
||||
data-value="gyro_sensitivity"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- mouse sensitivity -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(3)">
|
||||
<label class="config-option__title">Mouse Sensitivity</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{mouse_sensitivity}}%</label>
|
||||
<input
|
||||
class="nav-vert"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(3)"
|
||||
id="mouse_sensitivity_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp;"
|
||||
data-value="mouse_sensitivity"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- joystick deadzone -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(4)">
|
||||
<label class="config-option__title">Joystick Deadzone</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{joystick_deadzone}}%</label>
|
||||
<input
|
||||
class="nav-vert"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(4)"
|
||||
id="joystick_deadzone_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp; nav-down: #bg_input_enabled"
|
||||
data-value="joystick_deadzone"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- background input -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(5)" id="conf-general__Background-Input">
|
||||
<label class="config-option__title">Background Input</label>
|
||||
<div class="config-option__list">
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(5)"
|
||||
name="background_input_mode"
|
||||
data-checked="background_input_mode"
|
||||
value="On"
|
||||
id="bg_input_enabled"
|
||||
style="nav-up: #joystick_deadzone_input; nav-down: #camera_inversion_none"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="bg_input_enabled">On</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(5)"
|
||||
name="background_input_mode"
|
||||
data-checked="background_input_mode"
|
||||
value="Off"
|
||||
id="bg_input_disabled"
|
||||
style="nav-up: #joystick_deadzone_input; nav-down: #camera_inversion_x"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="bg_input_disabled">Off</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- camera inversion -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(7)">
|
||||
<label class="config-option__title">Aiming Camera Mode</label>
|
||||
<div class="config-option__list">
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(7)"
|
||||
name="camera_invert_mode"
|
||||
data-checked="camera_invert_mode"
|
||||
value="InvertNone"
|
||||
id="camera_inversion_none"
|
||||
style="nav-up: #bg_input_enabled; nav-down: #analog_cam_enabled"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="camera_inversion_none">None</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(7)"
|
||||
name="camera_invert_mode"
|
||||
data-checked="camera_invert_mode"
|
||||
value="InvertX"
|
||||
id="camera_inversion_x"
|
||||
style="nav-up: #bg_input_disabled; nav-down: #analog_cam_disabled"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="camera_inversion_x">Invert X</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(7)"
|
||||
name="camera_invert_mode"
|
||||
data-checked="camera_invert_mode"
|
||||
value="InvertY"
|
||||
id="camera_inversion_y"
|
||||
style="nav-up: #bg_input_disabled; nav-down: #analog_cam_disabled"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="camera_inversion_y">Invert Y</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(7)"
|
||||
name="camera_invert_mode"
|
||||
data-checked="camera_invert_mode"
|
||||
value="InvertBoth"
|
||||
id="camera_inversion_both"
|
||||
style="nav-up: #bg_input_disabled; nav-down: #analog_cam_disabled"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="camera_inversion_both">Invert Both</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- analog camera -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(8)">
|
||||
<label class="config-option__title">Analog Camera</label>
|
||||
<div class="config-option__list">
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(8)"
|
||||
name="analog_cam_mode"
|
||||
data-checked="analog_cam_mode"
|
||||
value="On"
|
||||
id="analog_cam_enabled"
|
||||
style="nav-up: #camera_inversion_none; nav-down: #analog_camera_inversion_none"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_cam_enabled">On</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(8)"
|
||||
name="analog_cam_mode"
|
||||
data-checked="analog_cam_mode"
|
||||
value="Off"
|
||||
id="analog_cam_disabled"
|
||||
style="nav-up: #camera_inversion_x; nav-down: #analog_camera_inversion_x"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_cam_disabled">Off</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- analog camera inversion -->
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(9)">
|
||||
<label class="config-option__title">Analog Camera Mode</label>
|
||||
<div class="config-option__list">
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(9)"
|
||||
name="analog_camera_invert_mode"
|
||||
data-checked="analog_camera_invert_mode"
|
||||
value="InvertNone"
|
||||
id="analog_camera_inversion_none"
|
||||
style="nav-up: #analog_cam_enabled;"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_camera_inversion_none">None</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(9)"
|
||||
name="analog_camera_invert_mode"
|
||||
data-checked="analog_camera_invert_mode"
|
||||
value="InvertX"
|
||||
id="analog_camera_inversion_x"
|
||||
style="nav-up: #analog_cam_disabled;"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_camera_inversion_x">Invert X</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(9)"
|
||||
name="analog_camera_invert_mode"
|
||||
data-checked="analog_camera_invert_mode"
|
||||
value="InvertY"
|
||||
id="analog_camera_inversion_y"
|
||||
style="nav-up: #analog_cam_disabled;"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_camera_inversion_y">Invert Y</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(9)"
|
||||
name="analog_camera_invert_mode"
|
||||
data-checked="analog_camera_invert_mode"
|
||||
value="InvertBoth"
|
||||
id="analog_camera_inversion_both"
|
||||
style="nav-up: #analog_cam_disabled;"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="analog_camera_inversion_both">Invert Both</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Descriptions -->
|
||||
<div class="config__wrapper">
|
||||
<p data-if="cur_config_index == 1">
|
||||
Controls the strength of rumble when using a controller that supports it. <b>Setting this to zero will disable rumble.</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 2">
|
||||
Controls the sensitivity of gyro aiming when using items in first person for controllers that support it. <b>Setting this to zero will disable gyro.</b>
|
||||
<br />
|
||||
<br />
|
||||
<b>Note: To recalibrate controller gyro, set the controller down on a still, flat surface for 5 seconds.</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 3">
|
||||
Controls the sensitivity of mouse aiming when using items in first person. <b>Setting this to zero will disable mouse aiming.</b>
|
||||
<br />
|
||||
<br />
|
||||
<b>Note: This option does not allow mouse buttons to activate items. Mouse aiming is intended to be used with inputs that are mapped to mouse movement, such as gyro on Steam Deck.</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 4">
|
||||
Applies a deadzone to joystick inputs.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 5">
|
||||
Allows the game to read controller input when out of focus.
|
||||
<br/>
|
||||
<b>This setting does not affect keyboard input.</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 7">
|
||||
Inverts the camera controls for first-person aiming. <b>Invert Y</b> is the default and matches the original game.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 8">
|
||||
Enables an analog "free" camera similar to later entries in the series that's mapped to the right analog stick on the controller.
|
||||
<br/>
|
||||
<br/>
|
||||
When you move the right stick, the camera will enter free mode and stop centering behind Link. Press the <b>Target</b> button at any time to go back into the normal camera mode. The camera will also return to normal mode after a cutscene plays or when you move between areas.
|
||||
<br/>
|
||||
<br/>
|
||||
This option also enables right stick control while looking and aiming.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 9">
|
||||
Inverts the camera controls for the analog camera if it's enabled. <b>None</b> is the default.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
@@ -0,0 +1,325 @@
|
||||
<template name="config-menu__graphics">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form">
|
||||
<div class="config__hz-wrapper">
|
||||
<div class="config__wrapper" data-event-mouseout="set_cur_config_index(-1)">
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(0)">
|
||||
<label class="config-option__title">Resolution</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(0)"
|
||||
name="resolution"
|
||||
data-checked="res_option"
|
||||
value="Original"
|
||||
id="res_original"
|
||||
style="nav-up:#tab_graphics; nav-down: #ds_windowed"
|
||||
data-attr-style="res_option == 'Auto' ? 'nav-up:#tab_graphics; nav-down: #ar_original' : 'nav-up:#tab_graphics; nav-down: #ds_windowed'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="res_original">Original</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(0)"
|
||||
name="resolution"
|
||||
data-checked="res_option"
|
||||
value="Original2x"
|
||||
id="res_2x"
|
||||
style="nav-up:#tab_graphics; nav-down: #ds_2x"
|
||||
data-attr-style="res_option == 'Auto' ? 'nav-up:#tab_graphics; nav-down: #ar_expand' : 'nav-up:#tab_graphics; nav-down: #ds_2x'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="res_2x">Original 2x</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(0)"
|
||||
name="resolution"
|
||||
data-checked="res_option"
|
||||
value="Auto"
|
||||
id="res_auto"
|
||||
style="nav-up:#tab_graphics; nav-down: #ds_4x"
|
||||
data-attr-style="res_option == 'Auto' ? 'nav-up:#tab_graphics; nav-down: #ar_expand' : 'nav-up:#tab_graphics; nav-down: #ds_4x'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="res_auto">Auto</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(1)">
|
||||
<label class="config-option__title">Downsampling Quality</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(1)"
|
||||
name="downsampling"
|
||||
data-attrif-disabled="res_option == 'Auto'"
|
||||
data-checked="ds_option"
|
||||
value="1"
|
||||
id="ds_windowed"
|
||||
style="nav-up: #res_original; nav-down: #ar_original"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="ds_windowed">Off</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(1)"
|
||||
name="downsampling"
|
||||
data-attrif-disabled="res_option == 'Auto'"
|
||||
data-checked="ds_option"
|
||||
value="2"
|
||||
id="ds_2x"
|
||||
style="nav-up: #res_2x; nav-down: #ar_expand"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="ds_2x">2x</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(1)"
|
||||
name="downsampling"
|
||||
data-attrif-disabled="res_option == 'Auto'"
|
||||
data-checked="ds_option"
|
||||
value="4"
|
||||
id="ds_4x"
|
||||
style="nav-up: #res_auto; nav-down: #ar_expand"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="ds_4x">4x</label>
|
||||
<div class="config-option__details">{{ds_info}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(2)">
|
||||
<label class="config-option__title">Aspect Ratio</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(2)"
|
||||
name="aspectratio"
|
||||
data-checked="ar_option"
|
||||
value="Original"
|
||||
id="ar_original"
|
||||
style="nav-up: #ds_windowed; nav-down: #wm_windowed"
|
||||
data-attr-style="res_option == 'Auto' ? 'nav-up:#res_original; nav-down: #wm_windowed' : 'nav-up:#ds_windowed; nav-down: #wm_windowed'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="ar_original">Original</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(2)"
|
||||
name="aspectratio"
|
||||
data-checked="ar_option"
|
||||
value="Expand"
|
||||
id="ar_expand"
|
||||
style="nav-up: #ds_2x; nav-down: #wm_fullscreen"
|
||||
data-attr-style="res_option == 'Auto' ? 'nav-up:#res_2x; nav-down: #wm_fullscreen' : 'nav-up:#ds_2x; nav-down: #wm_fullscreen'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="ar_expand">Expand</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(3)">
|
||||
<label class="config-option__title">Window Mode</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(3)"
|
||||
name="windowmode"
|
||||
data-checked="wm_option"
|
||||
value="Windowed"
|
||||
id="wm_windowed"
|
||||
style="nav-up: #ar_original; nav-down: #rr_original"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="wm_windowed">Windowed</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(3)"
|
||||
name="windowmode"
|
||||
data-checked="wm_option"
|
||||
value="Fullscreen"
|
||||
id="wm_fullscreen"
|
||||
style="nav-up: #ar_expand; nav-down: #rr_display"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="wm_fullscreen">Fullscreen</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(4)">
|
||||
<label class="config-option__title">Framerate</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(4)"
|
||||
name="refreshrate"
|
||||
data-checked="rr_option"
|
||||
value="Original"
|
||||
id="rr_original"
|
||||
data-attr-style="rr_option=='Manual' ? 'nav-up: #wm_windowed; nav-down: #rr_manual_input' : 'nav-up: #wm_windowed; nav-down: #msaa_none'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="rr_original">Original</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(4)"
|
||||
name="refreshrate"
|
||||
data-checked="rr_option"
|
||||
value="Display"
|
||||
id="rr_display"
|
||||
style="nav-up: #wm_fullscreen"
|
||||
data-style-nav-down="rr_option=='Manual' ? '#rr_manual_input' : (msaa2x_supported ? '#msaa_2x' : '#msaa_none')"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="rr_display">Display</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(4)"
|
||||
name="refreshrate"
|
||||
data-checked="rr_option"
|
||||
value="Manual"
|
||||
id="rr_manual"
|
||||
style="nav-up: #wm_fullscreen"
|
||||
data-style-nav-down="rr_option=='Manual' ? '#rr_manual_input' : (msaa4x_supported ? '#msaa_4x' : (msaa2x_supported ? '#msaa_2x' : '#msaa_none'))"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="rr_manual">Manual</label>
|
||||
</div>
|
||||
<div data-if="rr_option=='Manual'" class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{rr_manual_value}}</label>
|
||||
<input
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(4)"
|
||||
id="rr_manual_input"
|
||||
type="range"
|
||||
min="20"
|
||||
max="360"
|
||||
style="flex:1;margin: 0dp;nav-up:#rr_manual;nav-down:#msaa_none;"
|
||||
data-value="rr_manual_value"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(5)">
|
||||
<label class="config-option__title">MS Anti-Aliasing</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(5)"
|
||||
name="antialiasing"
|
||||
data-checked="msaa_option"
|
||||
value="None"
|
||||
id="msaa_none"
|
||||
data-attr-style="rr_option=='Manual' ? 'nav-up: #rr_manual_input; nav-down: #hr_original' : 'nav-up: #rr_original; nav-down: #hr_original'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="msaa_none">None</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(5)"
|
||||
name="antialiasing"
|
||||
data-attrif-disabled="!msaa2x_supported"
|
||||
data-checked="msaa_option"
|
||||
value="MSAA2X"
|
||||
id="msaa_2x"
|
||||
data-attr-style="rr_option=='Manual' ? 'nav-up: #rr_manual_input; nav-down: #hr_16_9' : 'nav-up: #rr_display; nav-down: #hr_16_9'"
|
||||
data-style-nav-right="msaa4x_supported ? '#msaa_4x' : 'none'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="msaa_2x">2x</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(5)"
|
||||
name="antialiasing"
|
||||
data-attrif-disabled="!msaa4x_supported"
|
||||
data-checked="msaa_option"
|
||||
value="MSAA4X"
|
||||
id="msaa_4x"
|
||||
data-attr-style="rr_option=='Manual' ? 'nav-up: #rr_manual_input; nav-down: #hr_full' : 'nav-up: #rr_manual; nav-down: #hr_full'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="msaa_4x">4x</label>
|
||||
<div class="config-option__details" data-if="!sample_positions_supported">Not available (missing sample positions support)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(6)">
|
||||
<label class="config-option__title">HUD Placement</label>
|
||||
<div class="config-option__list">
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(6)"
|
||||
name="hr-option"
|
||||
data-checked="hr_option"
|
||||
value="Original"
|
||||
id="hr_original"
|
||||
style="nav-up: #msaa_none; nav-down: #apply_button"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="hr_original">Original</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(6)"
|
||||
name="hr-option"
|
||||
data-checked="hr_option"
|
||||
value="Clamp16x9"
|
||||
id="hr_16_9"
|
||||
style="nav-up: #msaa_2x; nav-down: #apply_button"
|
||||
data-style-nav-up="msaa2x_supported ? '#msaa_2x' : '#msaa_none'"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="hr_16_9">16:9</label>
|
||||
<input type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(6)"
|
||||
name="hr-option"
|
||||
data-checked="hr_option"
|
||||
value="Full"
|
||||
id="hr_full"
|
||||
style="nav-up: #msaa_4x; nav-down: #apply_button"
|
||||
data-style-nav-up="msaa4x_supported ? '#msaa_4x' : (msaa2x_supported ? '#msaa_2x' : '#msaa_none')"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="hr_full">Expand</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="config__wrapper">
|
||||
<p data-if="cur_config_index == 0">
|
||||
Sets the output resolution of the game. <b>Original</b> matches the game's original 240p resolution. <b>Original 2x</b> will render at 480p. <b>Auto</b> will scale based on the game window's resolution.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 1">
|
||||
Renders at a higher resolution and scales it down to the output resolution for increased quality. Only available in <b>Original</b> and <b>Original 2x</b> resolution.
|
||||
<br />
|
||||
<br />
|
||||
Note: <b>4x</b> downsampling quality at <b>Original 2x</b> resolution may cause performance issues on low end devices, as it will cause the game to render <i>at almost 4k internal resolution</i>.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 2">
|
||||
Sets the horizontal aspect ratio. <b>Original</b> uses the game's original 4:3 aspect ratio. <b>Expand</b> will adjust to match the game window's aspect ratio.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 3">
|
||||
Sets whether the game should display <b>Windowed</b> or <b>Fullscreen</b>. You can also use <b>F11</b> or <b>Alt + Enter</b> to toggle this option.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 4">
|
||||
Sets the game's output framerate. This option does not affect gameplay.
|
||||
<br />
|
||||
<br />
|
||||
Note: If you have issues with <b>Display</b> mode while using an external frame limiter, use <b>Manual</b> mode instead and configure it to that same frame limit.
|
||||
<br />
|
||||
<br />
|
||||
<b>Detected display refresh rate: {{display_refresh_rate}}hz</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 5">
|
||||
Sets the multisample anti-aliasing (MSAA) quality level. This reduces jagged edges in the final image at the expense of rendering performance.
|
||||
<br />
|
||||
<br />
|
||||
<b>Note: This option won't be available if your GPU does not support programmable MSAA sample positions, as it is currently required to avoid rendering glitches.</b>
|
||||
</p>
|
||||
<p data-if="cur_config_index == 6">
|
||||
Adjusts the placement of HUD elements to fit the selected aspect ratio. <b>Expand</b> will use the aspect ratio of the game's output window.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config__footer">
|
||||
<!-- this empty div makes sure Apply button gets right aligned -->
|
||||
<div />
|
||||
<div>
|
||||
<button
|
||||
class="button button--secondary"
|
||||
nav-return="rr_manual"
|
||||
data-attrif-disabled="!options_changed"
|
||||
onclick="apply_options"
|
||||
id="apply_button"
|
||||
style="nav-up:#hr_original"
|
||||
>
|
||||
<div class="button__label">Apply<span class="prompt-font-sm">{{gfx_help__apply}}</span></div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
@@ -0,0 +1,9 @@
|
||||
<template name="config-menu__mods">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form">
|
||||
<recomp-mod-menu id="menu_mods" />
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template name="config-menu__sound">
|
||||
<head>
|
||||
</head>
|
||||
<body>
|
||||
<form class="config__form">
|
||||
<div class="config__hz-wrapper">
|
||||
<!-- Options -->
|
||||
<div class="config__wrapper" data-event-mouseout="set_cur_config_index(-1)">
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(0)">
|
||||
<label class="config-option__title">Main Volume</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{main_volume}}%</label>
|
||||
<input
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(0)"
|
||||
class="nav-vert"
|
||||
id="main_volume_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp; nav-up: #tab_sound; nav-down: #bgm_volume_input;"
|
||||
data-value="main_volume"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(1)">
|
||||
<label class="config-option__title">Background Music Volume</label>
|
||||
<div class="config-option__range-wrapper config-option__list">
|
||||
<label class="config-option__range-label">{{bgm_volume}}%</label>
|
||||
<input
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(1)"
|
||||
class="nav-vert"
|
||||
id="bgm_volume_input"
|
||||
type="range"
|
||||
min="0"
|
||||
max="100"
|
||||
style="flex: 1; margin: 0dp; nav-up: #main_volume_input; nav-down: #lhb_on;"
|
||||
data-value="bgm_volume"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="config-option" data-event-mouseover="set_cur_config_index(2)">
|
||||
<label class="config-option__title">Low Health Beeps</label>
|
||||
<div class="config-option__list">
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(2)"
|
||||
name="lhb"
|
||||
data-checked="low_health_beeps_enabled"
|
||||
value="1"
|
||||
id="lhb_on"
|
||||
style="nav-up: #bgm_volume_input"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="lhb_on">On</label>
|
||||
|
||||
<input
|
||||
type="radio"
|
||||
data-event-blur="set_cur_config_index(-1)"
|
||||
data-event-focus="set_cur_config_index(2)"
|
||||
name="lhb"
|
||||
data-checked="low_health_beeps_enabled"
|
||||
value="0"
|
||||
id="lhb_off"
|
||||
style="nav-up: #bgm_volume_input"
|
||||
/>
|
||||
<label class="config-option__tab-label" for="lhb_off">Off</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Descriptions -->
|
||||
<div class="config__wrapper">
|
||||
<p data-if="cur_config_index == 0">
|
||||
Controls the main volume of the game.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 1">
|
||||
Controls the overall volume of background music.
|
||||
</p>
|
||||
<p data-if="cur_config_index == 2">
|
||||
Toggles whether or not the low-health beeping sound plays.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<rml>
|
||||
<head>
|
||||
<link type="text/rcss" href="rml.rcss"/>
|
||||
<link type="text/rcss" href="recomp.rcss"/>
|
||||
<title>Inventory</title>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Hide the window icon. */
|
||||
div#title_bar div#icon
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.flex-grid {
|
||||
display: flex;
|
||||
}
|
||||
.col {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="window">
|
||||
<!-- <handle move_target="#document"> -->
|
||||
<div id="window" class="rmlui-window" style="display:flex; flex-flow: column; background-color:rgba(0,0,0,0)" onkeydown="config_keydown">
|
||||
<div class="centered-page" onclick="close_config_menu_backdrop">
|
||||
<div class="centered-page__modal">
|
||||
<div class="config__icon-buttons">
|
||||
<button
|
||||
class="icon-button"
|
||||
onclick="open_quit_game_prompt"
|
||||
id="config__quit-game-button"
|
||||
>
|
||||
<svg src="icons/Quit.svg" />
|
||||
</button>
|
||||
<button
|
||||
class="icon-button"
|
||||
onclick="close_config_menu"
|
||||
id="config__close-menu-button"
|
||||
>
|
||||
<svg src="icons/X.svg" />
|
||||
</button>
|
||||
</div>
|
||||
<recomp-config-sub-menu id="config_sub_menu" />
|
||||
</div>
|
||||
<div
|
||||
class="centered-page__controls"
|
||||
data-model="nav_help_model"
|
||||
>
|
||||
<label>
|
||||
<span>Navigate</span>
|
||||
<span class="prompt-font-sm">{{nav_help__navigate}}</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Accept</span>
|
||||
<span class="prompt-font-sm">{{nav_help__accept}}</span>
|
||||
</label>
|
||||
<label>
|
||||
<span>Exit</span>
|
||||
<span class="prompt-font-sm">{{nav_help__exit}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</rml>
|
||||
@@ -1,3 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 11L15.2929 22.2929C15.6834 22.6834 16.3166 22.6834 16.7071 22.2929L28 11" stroke="#FFFFFF" stroke-width="8" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 248 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.72625 23.3925C8.13475 23.0659 8.61021 22.3958 9.032 21.7129C9.78396 20.4953 11.0499 19.6669 12.4578 19.6669H19.5422C20.9501 19.6669 22.216 20.4953 22.968 21.7129C23.3898 22.3958 23.8653 23.0659 24.2738 23.3925C25.2857 24.2015 26.6008 24.2035 27.6585 23.3925C28.4268 22.8033 29 21.7232 29 20.2983C29 18.8735 28.6384 12.9609 27.6585 9.98045C26.6786 7 23.4285 7 16 7C8.57147 7 5.32145 7 4.34153 9.98045C3.36162 12.9609 3 18.8735 3 20.2983C3 21.7232 3.5732 22.8033 4.34153 23.3925C5.39916 24.2035 6.71431 24.2015 7.72625 23.3925Z" stroke="white" stroke-width="4"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 676 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27 7C29.2091 7 31 8.79086 31 11V21C31 23.2091 29.2091 25 27 25H5C2.79086 25 1 23.2091 1 21V11C1 8.79086 2.79086 7 5 7H27ZM5 19V21H7V19H5ZM9 19V21H23V19H9ZM25 19V21H27V19H25ZM5 15V17H9V15H5ZM11 15V17H13V15H11ZM15 15V17H17V15H15ZM19 15V17H21V15H19ZM23 15V17H27V15H23ZM5 11V13H7V11H5ZM9 11V13H11V11H9ZM13 11V13H15V11H13ZM17 11V13H19V11H17ZM21 11V13H23V11H21ZM25 11V13H27V11H25Z" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 504 B |
@@ -1,17 +0,0 @@
|
||||
<svg width="48" height="20" viewBox="0 0 48 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_543_3678)">
|
||||
<g clip-path="url(#clip1_543_3678)">
|
||||
<path d="M8 5V15" stroke="white" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M3 10L13 10" stroke="white" stroke-width="4" stroke-linecap="round"/>
|
||||
</g>
|
||||
<path d="M43 1C45.2091 1 47 2.79086 47 5V15C47 17.2091 45.2091 19 43 19H21C18.7909 19 17 17.2091 17 15V5C17 2.79086 18.7909 1 21 1H43ZM21 13V15H23V13H21ZM25 13V15H39V13H25ZM41 13V15H43V13H41ZM21 9V11H25V9H21ZM27 9V11H29V9H27ZM31 9V11H33V9H31ZM35 9V11H37V9H35ZM39 9V11H43V9H39ZM21 5V7H23V5H21ZM25 5V7H27V5H25ZM29 5V7H31V5H29ZM33 5V7H35V5H33ZM37 5V7H39V5H37ZM41 5V7H43V5H41Z" fill="white"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_543_3678">
|
||||
<rect width="48" height="20" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_543_3678">
|
||||
<rect width="16" height="16" fill="white" transform="translate(0 2)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 946 B |
@@ -1,6 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16 3C24.091 3.00019 28.7417 10.0042 28.9902 16.082C29.0372 17.2318 28.8162 18.5326 28.2207 19.4746C27.7079 20.2859 26.8271 21 25 21H7C5.17292 21 4.29117 20.2859 3.77832 19.4746C3.18306 18.5326 2.96285 17.2316 3.00977 16.082C3.25811 10.0041 7.90882 3 16 3Z" stroke="white" stroke-width="4" stroke-linecap="round"/>
|
||||
<circle cx="16" cy="14.5" r="2.5" fill="white"/>
|
||||
<circle cx="22.5" cy="14.5" r="2.5" fill="white"/>
|
||||
<circle cx="9.5" cy="14.5" r="2.5" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 577 B |
@@ -1,5 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M9.00008 11C9.00008 6.5 12.0002 4 16.0002 4C20.0002 4 23.0002 7 23.0002 11C23.0002 15 20.0002 18 16.0002 18" stroke="white" stroke-width="4" stroke-linecap="round"/>
|
||||
<path d="M16 22V18" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<circle cx="16" cy="28" r="2" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 424 B |
@@ -1,16 +0,0 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_541_3853)">
|
||||
<circle cx="16" cy="28" r="3" fill="white"/>
|
||||
<mask id="mask0_541_3853" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="32" height="32">
|
||||
<path d="M32 32H16C18.2091 32 20 30.2091 20 28C20 25.7909 18.2091 24 16 24C13.7909 24 12 25.7909 12 28C12 30.2091 13.7909 32 16 32H0V0H32V32Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_541_3853)">
|
||||
<circle cx="16" cy="16" r="12" stroke="white" stroke-width="4"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_541_3853">
|
||||
<rect width="32" height="32" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 673 B |
@@ -0,0 +1,70 @@
|
||||
<rml>
|
||||
<head>
|
||||
<title>Launcher</title>
|
||||
<link type="text/rcss" href="rml.rcss"/>
|
||||
<link type="text/rcss" href="recomp.rcss"/>
|
||||
<style>
|
||||
body
|
||||
{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="window" data-model="launcher_model">
|
||||
<div class="launcher">
|
||||
<!--<div class="launcher__vertical-split">
|
||||
<div class="launcher__title-quadrant">
|
||||
<button class="subtitle-title" disabled>
|
||||
<div><h3>Banjo: Recompiled</h3></div>
|
||||
<div><h1>Banjo-Tooie</h1></div>
|
||||
<div class="subtitle-title__disclaimer">Coming Soon™</div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="launcher__content-quadrant"></div>
|
||||
</div>-->
|
||||
<div class="launcher__vertical-split launcher__vertical-split--right">
|
||||
<div class="launcher__background-wrapper">
|
||||
<!-- <svg src="[changeme].svg" class="launcher__background-bk" /> -->
|
||||
</div>
|
||||
<div class="launcher__title-quadrant launcher__title-quadrant--right">
|
||||
<button class="subtitle-title subtitle-title--right" selected>
|
||||
<div><h3>Banjo: Recompiled</h3></div>
|
||||
<div><h1>Banjo-Kazooie</h1></div>
|
||||
</button>
|
||||
</div>
|
||||
<div class="launcher__content-quadrant">
|
||||
<button data-if="!bk_rom_valid" onclick="select_rom" class="menu-list-item menu-list-item--right" autofocus>
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Select ROM</div>
|
||||
</button>
|
||||
<button data-if="bk_rom_valid" onclick="start_game" class="menu-list-item menu-list-item--right" autofocus>
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Start game</div>
|
||||
</button>
|
||||
<button onclick="open_controls" class="menu-list-item menu-list-item--right">
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Setup controls</div>
|
||||
</button>
|
||||
<button onclick="open_settings" class="menu-list-item menu-list-item--right">
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Settings</div>
|
||||
</button>
|
||||
<button onclick="open_mods" class="menu-list-item menu-list-item--right">
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Mods</div>
|
||||
</button>
|
||||
<button onclick="exit_game" class="menu-list-item menu-list-item--right">
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Exit</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-left">
|
||||
<label>v{{version_number}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</rml>
|
||||
@@ -0,0 +1,335 @@
|
||||
@font-face{font-family:'promptfont'; src:url('promptfont.ttf');}
|
||||
.pf{font-family:promptfont;}
|
||||
.pf-exchange::after{content:'\u2194';}
|
||||
.pf-reverse::after{content:'\u2195';}
|
||||
.pf-left-trigger-lt::after{content:'\u2196';}
|
||||
.pf-right-trigger-rt::after{content:'\u2197';}
|
||||
.pf-left-shoulder-lb::after{content:'\u2198';}
|
||||
.pf-right-shoulder-rb::after{content:'\u2199';}
|
||||
.pf-left-trigger-zl::after{content:'\u219A';}
|
||||
.pf-right-trigger-zr::after{content:'\u219B';}
|
||||
.pf-left-shoulder-l::after{content:'\u219C';}
|
||||
.pf-right-shoulder-r::after{content:'\u219D';}
|
||||
.pf-dpad-left::after{content:'\u219E';}
|
||||
.pf-dpad-up::after{content:'\u219F';}
|
||||
.pf-dpad-right::after{content:'\u21A0';}
|
||||
.pf-dpad-down::after{content:'\u21A1';}
|
||||
.pf-dpad-left-right::after{content:'\u21A2';}
|
||||
.pf-dpad-up-down::after{content:'\u21A3';}
|
||||
.pf-button-left-x::after{content:'\u21A4';}
|
||||
.pf-button-up-y::after{content:'\u21A5';}
|
||||
.pf-button-right-b::after{content:'\u21A6';}
|
||||
.pf-button-down-a::after{content:'\u21A7';}
|
||||
.pf-left-analog-clockwise::after{content:'\u21A9';}
|
||||
.pf-left-analog-counter::after{content:'\u21AA';}
|
||||
.pf-right-analog-clockwise::after{content:'\u21AB';}
|
||||
.pf-right-analog-counter::after{content:'\u21AC';}
|
||||
.pf-both-analog-clockwise::after{content:'\u21AD';}
|
||||
.pf-both-analog-counter::after{content:'\u21AE';}
|
||||
.pf-left-shoulder-l1::after{content:'\u21B0';}
|
||||
.pf-right-shoulder-r1::after{content:'\u21B1';}
|
||||
.pf-left-trigger-l2::after{content:'\u21B2';}
|
||||
.pf-right-trigger-r2::after{content:'\u21B3';}
|
||||
.pf-dpad-left-down::after{content:'\u21B4';}
|
||||
.pf-dpad-up-right::after{content:'\u21B5';}
|
||||
.pf-analog-clockwise::after{content:'\u21B6';}
|
||||
.pf-analog-counter::after{content:'\u21B7';}
|
||||
.pf-both-analog-click::after{content:'\u21B9';}
|
||||
.pf-left-analog-click::after{content:'\u21BA';}
|
||||
.pf-right-analog-click::after{content:'\u21BB';}
|
||||
.pf-left-analog-left::after{content:'\u21BC';}
|
||||
.pf-right-analog-left::after{content:'\u21BD';}
|
||||
.pf-left-analog-up::after{content:'\u21BE';}
|
||||
.pf-right-analog-up::after{content:'\u21BF';}
|
||||
.pf-left-analog-right::after{content:'\u21C0';}
|
||||
.pf-right-analog-right::after{content:'\u21C1';}
|
||||
.pf-left-analog-down::after{content:'\u21C2';}
|
||||
.pf-right-analog-down::after{content:'\u21C3';}
|
||||
.pf-left-analog-left-right::after{content:'\u21C4';}
|
||||
.pf-left-analog-up-down::after{content:'\u21C5';}
|
||||
.pf-right-analog-left-right::after{content:'\u21C6';}
|
||||
.pf-analog-left::after{content:'\u21C7';}
|
||||
.pf-analog-up::after{content:'\u21C8';}
|
||||
.pf-analog-right::after{content:'\u21C9';}
|
||||
.pf-analog-down::after{content:'\u21CA';}
|
||||
.pf-left-analog::after{content:'\u21CB';}
|
||||
.pf-right-analog::after{content:'\u21CC';}
|
||||
.pf-dpad::after{content:'\u21CE';}
|
||||
.pf-button-x::after{content:'\u21D0';}
|
||||
.pf-button-y::after{content:'\u21D1';}
|
||||
.pf-button-b::after{content:'\u21D2';}
|
||||
.pf-button-a::after{content:'\u21D3';}
|
||||
.pf-analog-left-right::after{content:'\u21D4';}
|
||||
.pf-analog-up-down::after{content:'\u21D5';}
|
||||
.pf-analog-up-left::after{content:'\u21D6';}
|
||||
.pf-analog-up-right::after{content:'\u21D7';}
|
||||
.pf-analog-down-right::after{content:'\u21D8';}
|
||||
.pf-analog-down-left::after{content:'\u21D9';}
|
||||
.pf-left-analog-touch::after{content:'\u21DA';}
|
||||
.pf-right-analog-touch::after{content:'\u21DB';}
|
||||
.pf-left-trigger-pull::after{content:'\u21DC';}
|
||||
.pf-right-trigger-pull::after{content:'\u21DD';}
|
||||
.pf-dpad-right-down::after{content:'\u21DE';}
|
||||
.pf-dpad-left-up::after{content:'\u21DF';}
|
||||
.pf-button-square::after{content:'\u21E0';}
|
||||
.pf-button-triangle::after{content:'\u21E1';}
|
||||
.pf-button-circle::after{content:'\u21E2';}
|
||||
.pf-button-cross::after{content:'\u21E3';}
|
||||
.pf-steam-menu::after{content:'\u21E4';}
|
||||
.pf-options-menu::after{content:'\u21E5';}
|
||||
.pf-dualshock-share::after{content:'\u21E6';}
|
||||
.pf-dualshock-touchpad::after{content:'\u21E7';}
|
||||
.pf-dualshock-options::after{content:'\u21E8';}
|
||||
.pf-gamecube-z::after{content:'\u21E9';}
|
||||
.pf-back-trigger-z::after{content:'\u21EA';}
|
||||
.pf-button-c::after{content:'\u21EB';}
|
||||
.pf-button-z::after{content:'\u21EC';}
|
||||
.pf-button-alt-1::after{content:'\u21ED';}
|
||||
.pf-button-alt-2::after{content:'\u21EE';}
|
||||
.pf-left-analog-any::after{content:'\u21F1';}
|
||||
.pf-right-analog-any::after{content:'\u21F2';}
|
||||
.pf-analog-any::after{content:'\u21F3';}
|
||||
.pf-right-analog-up-down::after{content:'\u21F5';}
|
||||
.pf-select-share::after{content:'\u21F7';}
|
||||
.pf-start::after{content:'\u21F8';}
|
||||
.pf-home-menu::after{content:'\u21F9';}
|
||||
.pf-share-capture::after{content:'\u21FA';}
|
||||
.pf-burger-menu::after{content:'\u21FB';}
|
||||
.pf-minus::after{content:'\u21FD';}
|
||||
.pf-plus::after{content:'\u21FE';}
|
||||
.pf-joycon-dpad-left::after{content:'\u21FF';}
|
||||
.pf-joycon-dpad-up::after{content:'\u2200';}
|
||||
.pf-joycon-dpad-right::after{content:'\u2201';}
|
||||
.pf-joycon-dpad-down::after{content:'\u2202';}
|
||||
.pf-joycon-sl::after{content:'\u2203';}
|
||||
.pf-joycon-sr::after{content:'\u2204';}
|
||||
.pf-lenovo-legion-quick-settings::after{content:'\u2205';}
|
||||
.pf-dualsense-share::after{content:'\u2206';}
|
||||
.pf-dualsense-touchpad::after{content:'\u2207';}
|
||||
.pf-dualsense-options::after{content:'\u2208';}
|
||||
.pf-ayaneo-lc::after{content:'\u2209';}
|
||||
.pf-ayaneo-rc::after{content:'\u220A';}
|
||||
.pf-ayaneo-wave::after{content:'\u220B';}
|
||||
.pf-ayn-home::after{content:'\u220C';}
|
||||
.pf-ayn-lcc::after{content:'\u220D';}
|
||||
.pf-gpd-c1::after{content:'\u220E';}
|
||||
.pf-gpd-c2::after{content:'\u220F';}
|
||||
.pf-onexplayer-keyboard::after{content:'\u2210';}
|
||||
.pf-onexplayer-turbo::after{content:'\u2211';}
|
||||
.pf-m1::after{content:'\u2212';}
|
||||
.pf-m2::after{content:'\u2213';}
|
||||
.pf-m3::after{content:'\u2214';}
|
||||
.pf-y1::after{content:'\u2215';}
|
||||
.pf-y2::after{content:'\u2216';}
|
||||
.pf-y3::after{content:'\u2217';}
|
||||
.pf-onexplayer-function::after{content:'\u2218';}
|
||||
.pf-onexplayer-home::after{content:'\u2219';}
|
||||
.pf-left-trackpad-any::after{content:'\u2264';}
|
||||
.pf-right-trackpad-any::after{content:'\u2265';}
|
||||
.pf-left-trackpad-click::after{content:'\u2266';}
|
||||
.pf-right-trackpad-click::after{content:'\u2267';}
|
||||
.pf-left-trackpad-touch::after{content:'\u2268';}
|
||||
.pf-right-trackpad-touch::after{content:'\u2269';}
|
||||
.pf-left-trackpad-left::after{content:'\u226E';}
|
||||
.pf-right-trackpad-left::after{content:'\u226F';}
|
||||
.pf-left-trackpad-up::after{content:'\u2270';}
|
||||
.pf-right-trackpad-up::after{content:'\u2271';}
|
||||
.pf-left-trackpad-right::after{content:'\u2272';}
|
||||
.pf-right-trackpad-right::after{content:'\u2273';}
|
||||
.pf-left-trackpad-down::after{content:'\u2274';}
|
||||
.pf-right-trackpad-down::after{content:'\u2275';}
|
||||
.pf-steamdeck-l4::after{content:'\u2276';}
|
||||
.pf-steamdeck-r4::after{content:'\u2277';}
|
||||
.pf-steamdeck-l5::after{content:'\u2278';}
|
||||
.pf-steamdeck-r5::after{content:'\u2279';}
|
||||
.pf-xbox-dpad-left::after{content:'\u227A';}
|
||||
.pf-xbox-dpad-up::after{content:'\u227B';}
|
||||
.pf-xbox-dpad-right::after{content:'\u227C';}
|
||||
.pf-xbox-dpad-down::after{content:'\u227D';}
|
||||
.pf-xbox-dpad-left-right::after{content:'\u227E';}
|
||||
.pf-xbox-dpad-up-down::after{content:'\u227F';}
|
||||
.pf-xbox-dpad-left-up::after{content:'\u2280';}
|
||||
.pf-xbox-dpad-right-up::after{content:'\u2281';}
|
||||
.pf-xbox-dpad-left-down::after{content:'\u2282';}
|
||||
.pf-xbox-dpad-right-down::after{content:'\u2283';}
|
||||
.pf-xbox-dpad::after{content:'\u2284';}
|
||||
.pf-pin::after{content:'\u2316';}
|
||||
.pf-tabs::after{content:'\u23CD';}
|
||||
.pf-back::after{content:'\u23CE';}
|
||||
.pf-home-screen::after{content:'\u23CF';}
|
||||
.pf-horizontal-dots::after{content:'\u23D0';}
|
||||
.pf-vertical-dots::after{content:'\u23D1';}
|
||||
.pf-hamburger-menu::after{content:'\u23D2';}
|
||||
.pf-arrow-left::after{content:'\u23F4';}
|
||||
.pf-arrow-up::after{content:'\u23F5';}
|
||||
.pf-arrow-right::after{content:'\u23F6';}
|
||||
.pf-arrow-down::after{content:'\u23F7';}
|
||||
.pf-wasd::after{content:'\u2423';}
|
||||
.pf-arrow-keys::after{content:'\u2424';}
|
||||
.pf-ijkl::after{content:'\u2425';}
|
||||
.pf-fn::after{content:'\u2426';}
|
||||
.pf-ctrl::after{content:'\u2427';}
|
||||
.pf-alt::after{content:'\u2428';}
|
||||
.pf-shift::after{content:'\u2429';}
|
||||
.pf-super::after{content:'\u242A';}
|
||||
.pf-tab::after{content:'\u242B';}
|
||||
.pf-caps::after{content:'\u242C';}
|
||||
.pf-backspace::after{content:'\u242D';}
|
||||
.pf-enter::after{content:'\u242E';}
|
||||
.pf-esc::after{content:'\u242F';}
|
||||
.pf-prtsc::after{content:'\u2430';}
|
||||
.pf-scrlk::after{content:'\u2431';}
|
||||
.pf-pause::after{content:'\u2432';}
|
||||
.pf-numlock::after{content:'\u2433';}
|
||||
.pf-insert::after{content:'\u2434';}
|
||||
.pf-home::after{content:'\u2435';}
|
||||
.pf-page-up::after{content:'\u2436';}
|
||||
.pf-delete::after{content:'\u2437';}
|
||||
.pf-end::after{content:'\u2438';}
|
||||
.pf-page-down::after{content:'\u2439';}
|
||||
.pf-space::after{content:'\u243A';}
|
||||
.pf-gamepad::after{content:'\u243C';}
|
||||
.pf-keyboard::after{content:'\u243D';}
|
||||
.pf-mouse::after{content:'\u243E';}
|
||||
.pf-mouse-and-keyboard::after{content:'\u243F';}
|
||||
.pf-f1::after{content:'\u2460';}
|
||||
.pf-f2::after{content:'\u2461';}
|
||||
.pf-f3::after{content:'\u2462';}
|
||||
.pf-f4::after{content:'\u2463';}
|
||||
.pf-f5::after{content:'\u2464';}
|
||||
.pf-f6::after{content:'\u2465';}
|
||||
.pf-f7::after{content:'\u2466';}
|
||||
.pf-f8::after{content:'\u2467';}
|
||||
.pf-f9::after{content:'\u2468';}
|
||||
.pf-f10::after{content:'\u2469';}
|
||||
.pf-f11::after{content:'\u246A';}
|
||||
.pf-f12::after{content:'\u246B';}
|
||||
.pf-empty-keycap::after{content:'\u248F';}
|
||||
.pf-1::after{content:'\u24F5';}
|
||||
.pf-2::after{content:'\u24F6';}
|
||||
.pf-3::after{content:'\u24F7';}
|
||||
.pf-4::after{content:'\u24F8';}
|
||||
.pf-5::after{content:'\u24F9';}
|
||||
.pf-6::after{content:'\u24FA';}
|
||||
.pf-7::after{content:'\u24FB';}
|
||||
.pf-8::after{content:'\u24FC';}
|
||||
.pf-9::after{content:'\u24FD';}
|
||||
.pf-0::after{content:'\u24FF';}
|
||||
.pf-star::after{content:'\u2605';}
|
||||
.pf-skull::after{content:'\u2620';}
|
||||
.pf-frown::after{content:'\u2639';}
|
||||
.pf-smile::after{content:'\u263A';}
|
||||
.pf-empty-heart::after{content:'\u2661';}
|
||||
.pf-heart::after{content:'\u2665';}
|
||||
.pf-d4::after{content:'\u2673';}
|
||||
.pf-d6::after{content:'\u2674';}
|
||||
.pf-d8::after{content:'\u2675';}
|
||||
.pf-d10::after{content:'\u2676';}
|
||||
.pf-d12::after{content:'\u2677';}
|
||||
.pf-d20::after{content:'\u2678';}
|
||||
.pf-d6-1::after{content:'\u2680';}
|
||||
.pf-d6-2::after{content:'\u2681';}
|
||||
.pf-d6-3::after{content:'\u2682';}
|
||||
.pf-d6-4::after{content:'\u2683';}
|
||||
.pf-d6-5::after{content:'\u2684';}
|
||||
.pf-d6-6::after{content:'\u2685';}
|
||||
.pf-flag::after{content:'\u2691';}
|
||||
.pf-gears-options-settings::after{content:'\u2699';}
|
||||
.pf-cross::after{content:'\u2717';}
|
||||
.pf-question::after{content:'\u2753';}
|
||||
.pf-exclamation::after{content:'\u2757';}
|
||||
.pf-mouse-button-1::after{content:'\u278A';}
|
||||
.pf-mouse-button-2::after{content:'\u278B';}
|
||||
.pf-mouse-button-3::after{content:'\u278C';}
|
||||
.pf-mouse-button-4::after{content:'\u278D';}
|
||||
.pf-mouse-button-5::after{content:'\u278E';}
|
||||
.pf-mouse-button-6::after{content:'\u278F';}
|
||||
.pf-mouse-button-7::after{content:'\u2790';}
|
||||
.pf-mouse-button-8::after{content:'\u2791';}
|
||||
.pf-scroll-up::after{content:'\u27F0';}
|
||||
.pf-scroll-down::after{content:'\u27F1';}
|
||||
.pf-left-click::after{content:'\u27F5';}
|
||||
.pf-right-click::after{content:'\u27F6';}
|
||||
.pf-middle-click::after{content:'\u27F7';}
|
||||
.pf-mouse-left-right::after{content:'\u27FA';}
|
||||
.pf-mouse-up-down::after{content:'\u27FB';}
|
||||
.pf-mouse-any::after{content:'\u27FC';}
|
||||
.pf-box-crate::after{content:'\u2B1B';}
|
||||
.pf-playstation::after{content:'\uE000';}
|
||||
.pf-xbox::after{content:'\uE001';}
|
||||
.pf-nintendo-switch::after{content:'\uE002';}
|
||||
.pf-ayaneo::after{content:'\uE003';}
|
||||
.pf-lenovo-legion::after{content:'\uE004';}
|
||||
.pf-rog-ally-armoury::after{content:'\uE005';}
|
||||
.pf-rog-alloy-command::after{content:'\uE006';}
|
||||
.pf-apple-mac::after{content:'\uE007';}
|
||||
.pf-windows::after{content:'\uE008';}
|
||||
.pf-linux::after{content:'\uE009';}
|
||||
.pf-bsd::after{content:'\uE00A';}
|
||||
.pf-key-0::after{content:'\uFF10';}
|
||||
.pf-key-1::after{content:'\uFF11';}
|
||||
.pf-key-2::after{content:'\uFF12';}
|
||||
.pf-key-3::after{content:'\uFF13';}
|
||||
.pf-key-4::after{content:'\uFF14';}
|
||||
.pf-key-5::after{content:'\uFF15';}
|
||||
.pf-key-6::after{content:'\uFF16';}
|
||||
.pf-key-7::after{content:'\uFF17';}
|
||||
.pf-key-8::after{content:'\uFF18';}
|
||||
.pf-key-9::after{content:'\uFF19';}
|
||||
.pf-key-a::after{content:'\uFF21';}
|
||||
.pf-key-b::after{content:'\uFF22';}
|
||||
.pf-key-c::after{content:'\uFF23';}
|
||||
.pf-key-d::after{content:'\uFF24';}
|
||||
.pf-key-e::after{content:'\uFF25';}
|
||||
.pf-key-f::after{content:'\uFF26';}
|
||||
.pf-key-g::after{content:'\uFF27';}
|
||||
.pf-key-h::after{content:'\uFF28';}
|
||||
.pf-key-i::after{content:'\uFF29';}
|
||||
.pf-key-j::after{content:'\uFF2A';}
|
||||
.pf-key-k::after{content:'\uFF2B';}
|
||||
.pf-key-l::after{content:'\uFF2C';}
|
||||
.pf-key-m::after{content:'\uFF2D';}
|
||||
.pf-key-n::after{content:'\uFF2E';}
|
||||
.pf-key-o::after{content:'\uFF2F';}
|
||||
.pf-key-p::after{content:'\uFF30';}
|
||||
.pf-key-q::after{content:'\uFF31';}
|
||||
.pf-key-r::after{content:'\uFF32';}
|
||||
.pf-key-s::after{content:'\uFF33';}
|
||||
.pf-key-t::after{content:'\uFF34';}
|
||||
.pf-key-u::after{content:'\uFF35';}
|
||||
.pf-key-v::after{content:'\uFF36';}
|
||||
.pf-key-w::after{content:'\uFF37';}
|
||||
.pf-key-x::after{content:'\uFF38';}
|
||||
.pf-key-y::after{content:'\uFF39';}
|
||||
.pf-key-z::after{content:'\uFF3A';}
|
||||
.pf-headphones::after{content:'\u1F3A7';}
|
||||
.pf-music::after{content:'\u1F3B6';}
|
||||
.pf-fish::after{content:'\u1F41F';}
|
||||
.pf-dance-pad::after{content:'\u1F483';}
|
||||
.pf-laptop::after{content:'\u1F4BB';}
|
||||
.pf-diskette::after{content:'\u1F4BE';}
|
||||
.pf-write::after{content:'\u1F4DD';}
|
||||
.pf-phone::after{content:'\u1F4F1';}
|
||||
.pf-camera::after{content:'\u1F4F7';}
|
||||
.pf-speaker::after{content:'\u1F508';}
|
||||
.pf-light-gun::after{content:'\u1F52B';}
|
||||
.pf-sfx-sound-effect-noise::after{content:'\u1F56C';}
|
||||
.pf-steering-wheel::after{content:'\u1F578';}
|
||||
.pf-fight-stick-joystick::after{content:'\u1F579';}
|
||||
.pf-vr-headset::after{content:'\u1F57B';}
|
||||
.pf-vr-controller::after{content:'\u1F57C';}
|
||||
.pf-flight-stick::after{content:'\u1F57D';}
|
||||
.pf-cpu-processor::after{content:'\u1F5A5';}
|
||||
.pf-web-internet-link::after{content:'\u1F5A7';}
|
||||
.pf-gpu-graphics-card::after{content:'\u1F5A8';}
|
||||
.pf-ram-memory::after{content:'\u1F5AA';}
|
||||
.pf-usb-stick::after{content:'\u1F5AB';}
|
||||
.pf-database::after{content:'\u1F5AC';}
|
||||
.pf-hard-disk-drive::after{content:'\u1F5B4';}
|
||||
.pf-screen-video::after{content:'\u1F5B5';}
|
||||
.pf-text-entry-edit::after{content:'\u1F5B9';}
|
||||
.pf-speaking-voice::after{content:'\u1F5E3';}
|
||||
.pf-language::after{content:'\u1F5E9';}
|
||||
.pf-exit-quit-leave::after{content:'\u1F6AA';}
|
||||
.pf-information::after{content:'\u1F6C8';}
|
||||
.pf-shopping-cart::after{content:'\u1F6D2';}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Default styles for all the basic elements.
|
||||
*/
|
||||
|
||||
div
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
em
|
||||
{
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
strong
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
select
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
tabset tabs
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
|
||||
table {
|
||||
box-sizing: border-box;
|
||||
display: table;
|
||||
}
|
||||
tr {
|
||||
box-sizing: border-box;
|
||||
display: table-row;
|
||||
}
|
||||
td {
|
||||
box-sizing: border-box;
|
||||
display: table-cell;
|
||||
}
|
||||
col {
|
||||
box-sizing: border-box;
|
||||
display: table-column;
|
||||
}
|
||||
colgroup {
|
||||
display: table-column-group;
|
||||
}
|
||||
thead, tbody, tfoot {
|
||||
display: table-row-group;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
iron
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"extends": [
|
||||
"stylelint-config-recommended",
|
||||
"stylelint-config-standard",
|
||||
"stylelint-config-sass-guidelines",
|
||||
"stylelint-config-property-sort-order-smacss",
|
||||
"stylelint-config-standard-scss"
|
||||
],
|
||||
"plugins": ["stylelint-scss"],
|
||||
"overrides": [{
|
||||
"files": ["**/*.scss"],
|
||||
"customSyntax": "postcss-scss"
|
||||
}],
|
||||
"rules": {
|
||||
"no-descending-specificity": null,
|
||||
"declaration-empty-line-before": null,
|
||||
"declaration-colon-newline-after": null,
|
||||
"declaration-block-no-duplicate-properties": true,
|
||||
"declaration-block-trailing-semicolon": null,
|
||||
"declaration-no-important": true,
|
||||
"declaration-property-value-disallowed-list": {
|
||||
"/^transition/": ["/all/"]
|
||||
},
|
||||
"block-closing-brace-newline-after": null,
|
||||
"max-empty-lines": null,
|
||||
"selector-list-comma-newline-after": null,
|
||||
"at-rule-empty-line-before": null,
|
||||
"at-rule-semicolon-newline-after": null,
|
||||
"selector-pseudo-element-colon-notation": "single",
|
||||
"color-no-hex": true,
|
||||
"function-url-quotes": "always",
|
||||
"max-nesting-depth": [
|
||||
4,
|
||||
{
|
||||
"ignoreAtRules": ["each", "media", "supports", "include"],
|
||||
"severity": "warning"
|
||||
}
|
||||
],
|
||||
"number-leading-zero": null,
|
||||
"order/order": [
|
||||
[
|
||||
"custom-properties",
|
||||
"dollar-variables",
|
||||
{
|
||||
"type": "at-rule",
|
||||
"name": "extend"
|
||||
},
|
||||
{
|
||||
"type": "at-rule",
|
||||
"name": "include"
|
||||
},
|
||||
"declarations",
|
||||
"rules"
|
||||
]
|
||||
],
|
||||
"order/properties-alphabetical-order": null,
|
||||
"property-no-vendor-prefix": [
|
||||
true,
|
||||
{
|
||||
"severity": "warning"
|
||||
}
|
||||
],
|
||||
"value-no-vendor-prefix": [
|
||||
true,
|
||||
{
|
||||
"severity": "warning"
|
||||
}
|
||||
],
|
||||
"scss/selector-no-redundant-nesting-selector": null,
|
||||
"selector-class-pattern": null,
|
||||
"selector-max-compound-selectors": [
|
||||
4,
|
||||
{
|
||||
"severity": "warning"
|
||||
}
|
||||
],
|
||||
"selector-no-qualifying-type": null,
|
||||
"string-quotes": null,
|
||||
"max-line-length": null,
|
||||
"keyframes-name-pattern": null,
|
||||
"scss/double-slash-comment-empty-line-before": null,
|
||||
"scss/double-slash-comment-whitespace-inside": null,
|
||||
"scss/dollar-variable-empty-line-before": null,
|
||||
"scss/dollar-variable-pattern": "[a-z-]",
|
||||
"scss/at-import-partial-extension": null,
|
||||
"declaration-block-no-redundant-longhand-properties": null,
|
||||
"color-function-notation": null,
|
||||
"alpha-value-notation": null,
|
||||
"at-rule-no-unknown": null,
|
||||
"property-no-unknown": null,
|
||||
"scss/at-rule-no-unknown": true,
|
||||
"selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["selected"] }],
|
||||
"font-family-no-missing-generic-family-keyword": null,
|
||||
"scss/no-global-function-names": null,
|
||||
"unit-no-unknown": [true, { "ignoreUnits": ["dp"] }],
|
||||
"selector-type-no-unknown": [true, { "ignore": ["custom-elements", "default-namespace"] }],
|
||||
"value-keyword-case": null
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
@import "styles/base";
|
||||
@import "styles/global";
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "mmrecomp-ui-scss",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "npm run watch",
|
||||
"watch": "sass --no-source-map --no-charset --style=compressed main.scss ..\\recomp.rcss --watch",
|
||||
"watch:debug": "sass --no-source-map --no-charset main.scss ..\\recomp.rcss --watch",
|
||||
"build": "sass --no-source-map --no-charset --style=compressed main.scss ..\\recomp.rcss",
|
||||
"build:debug": "sass --no-source-map --no-charset main.scss ..\\recomp.rcss",
|
||||
"lint": "stylelint '.\\**\\*.scss'"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"postcss-scss": "^4.0.9",
|
||||
"stylelint": "^15.11.0",
|
||||
"stylelint-config-property-sort-order-smacss": "^9.1.0",
|
||||
"stylelint-config-sass-guidelines": "^10.0.0",
|
||||
"stylelint-config-scss": "^1.0.0-security",
|
||||
"stylelint-config-standard": "^34.0.0",
|
||||
"stylelint-config-standard-scss": "^11.1.0",
|
||||
"stylelint-scss": "^5.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"sass": "^1.75.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
@use 'sass:math';
|
||||
@import "./functions/spacing";
|
||||
@import "./vars/spacing";
|
||||
@import "./vars/colors";
|
||||
@import "./vars/borders";
|
||||
@import "./vars/gradients";
|
||||
@import "./vars/transitions";
|
||||
@import "./vars/animations";
|
||||
@import "./mixins/typography";
|
||||
@import "./mixins/transitions";
|
||||
@import "./mixins/helpers";
|
||||
@@ -0,0 +1,14 @@
|
||||
@use 'sass:math';
|
||||
|
||||
.bottom-left {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
bottom: space(4);
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
max-width: space($base-modal-max-width);
|
||||
height: auto;
|
||||
margin: 0 space(4);
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
@use 'sass:color';
|
||||
|
||||
@mixin create-button-variation($base-col, $base-col-05, $base-col-20, $base-col-30, $base-col-80) {
|
||||
border-color: $base-col-80;
|
||||
background-color: $base-col-05;
|
||||
color: $color-text-dim;
|
||||
|
||||
&:focus, &:hover {
|
||||
border-color: $base-col;
|
||||
background-color: $base-col-30;
|
||||
color: $color-text;
|
||||
}
|
||||
|
||||
&:disabled,&[disabled] {
|
||||
color: $color-text-inactive;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: $base-col-20;
|
||||
color: $color-text-active;
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
@extend %label-md;
|
||||
@extend %nav-all;
|
||||
@include create-button-variation($color-primary, $color-primary-a5, $color-primary-a20, $color-primary-a30, $color-primary-a80);
|
||||
@include trans-colors;
|
||||
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
// leave 1dp room for border expansion
|
||||
padding: space(24 - 1);
|
||||
border-width: $border-width-thickness;
|
||||
|
||||
border-radius: $border-radius-md;
|
||||
|
||||
// Setting it by default for convenience
|
||||
&--primary {
|
||||
@include create-button-variation($color-primary, $color-primary-a5, $color-primary-a20, $color-primary-a30, $color-primary-a80);
|
||||
}
|
||||
|
||||
&--large {
|
||||
@extend %label-lg;
|
||||
}
|
||||
|
||||
&--secondary {
|
||||
@include create-button-variation($color-secondary, $color-secondary-a5, $color-secondary-a20, $color-secondary-a30, $color-secondary-a80);
|
||||
}
|
||||
|
||||
&--tertiary {
|
||||
@include create-button-variation($color-text, $color-text-a5, $color-text-a20, $color-text-a30, $color-text-a80);
|
||||
}
|
||||
|
||||
&--success {
|
||||
@include create-button-variation($color-success, $color-success-a5, $color-success-a20, $color-success-a30, $color-success-a80);
|
||||
}
|
||||
|
||||
&--danger {
|
||||
@include create-button-variation($color-danger, $color-danger-a5, $color-danger-a20, $color-danger-a30, $color-danger-a80);
|
||||
}
|
||||
|
||||
&--warning {
|
||||
@include create-button-variation($color-warning, $color-warning-a5, $color-warning-a20, $color-warning-a30, $color-warning-a80);
|
||||
}
|
||||
|
||||
&:not([disabled]) {
|
||||
@extend %nav-all;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:disabled,&[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&__label {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
@use 'sass:math';
|
||||
|
||||
.centered-page {
|
||||
display: flex;
|
||||
// visibility: hidden;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: space($page-margin);
|
||||
background-color: $color-border-soft;
|
||||
}
|
||||
|
||||
.centered-page__modal {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: space($base-modal-max-width);
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
border-width: $border-width-thickness;
|
||||
border-radius: $border-radius-modal;
|
||||
border-color: $color-border;
|
||||
background: $color-modal-overlay;
|
||||
|
||||
> .tabs {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: space($base-modal-max-width);
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
panels {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.centered-page__controls {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
bottom: space(24);
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
max-width: space($base-modal-max-width);
|
||||
height: auto;
|
||||
margin: 0 auto;
|
||||
|
||||
> label {
|
||||
@extend %label-sm;
|
||||
display: inline-block;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: auto;
|
||||
height: space(24);
|
||||
|
||||
&:not(:last-child) {
|
||||
margin-right: space(40);
|
||||
}
|
||||
|
||||
> span:first-child {
|
||||
margin-right: space(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
|
||||
.config__icon-buttons {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: space(8);
|
||||
right: space(0);
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
width: auto;
|
||||
|
||||
.icon-button {
|
||||
margin: 0 space(8);
|
||||
}
|
||||
}
|
||||
|
||||
.config__form {
|
||||
@include border-top($color-border-soft);
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-bottom-right-radius: $border-radius-modal;
|
||||
border-bottom-left-radius: $border-radius-modal;
|
||||
}
|
||||
|
||||
.config__wrapper {
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: space(16);
|
||||
border-radius: 0dp;
|
||||
border-bottom-right-radius: $border-radius-modal;
|
||||
border-bottom-left-radius: $border-radius-modal;
|
||||
background-color: $color-bg-shadow;
|
||||
text-align: left;
|
||||
|
||||
p {
|
||||
@extend %body;
|
||||
padding: space(16);
|
||||
line-height: space(28);
|
||||
white-space: pre-line;
|
||||
|
||||
b {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
i {
|
||||
color: $color-warning;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.config__hz-wrapper {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 0dp;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.config__header, .config__footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
background-color: $color-bg-shadow;
|
||||
}
|
||||
|
||||
.config__header {
|
||||
@include border-bottom($color-border-soft);
|
||||
padding: space(12) space(20);
|
||||
}
|
||||
|
||||
.config__footer {
|
||||
@include border-top($color-border-soft);
|
||||
padding: space(20) space(20);
|
||||
border-bottom-right-radius: $border-radius-modal;
|
||||
border-bottom-left-radius: $border-radius-modal;
|
||||
}
|
||||
|
||||
.config__header-left {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
flex-direction: row;
|
||||
|
||||
> :not(:first-child) {
|
||||
margin-left: space(8);
|
||||
}
|
||||
}
|
||||
|
||||
.config__row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
.config-description {
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: space(16);
|
||||
border-radius: 0dp;
|
||||
border-bottom-right-radius: $border-radius-modal;
|
||||
border-bottom-left-radius: $border-radius-modal;
|
||||
background-color: $color-bg-shadow;
|
||||
text-align: left;
|
||||
|
||||
&__contents {
|
||||
@extend %body;
|
||||
padding: space(16);
|
||||
line-height: space(28);
|
||||
white-space: pre-line;
|
||||
|
||||
b {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
i {
|
||||
color: $color-warning;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
.config-group {
|
||||
position: relative;
|
||||
|
||||
&--scrollable {
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 0 0 0 space(16);
|
||||
|
||||
.config-group__wrapper {
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
@extend %label-md;
|
||||
color: $color-primary;
|
||||
|
||||
&--hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
padding: space(16) 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,413 @@
|
||||
.config-option {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
margin: space(16) space(0) space(24);
|
||||
|
||||
&--hz {
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
margin-top: space(4);
|
||||
margin-bottom: space(4);
|
||||
|
||||
.config-option__title {
|
||||
@extend %label-md;
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.config-option__list {
|
||||
flex: 1 1 auto;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.config-option__title {
|
||||
@extend %label-md;
|
||||
padding: 0 space(12);
|
||||
}
|
||||
|
||||
.config-option__radio-tabs,
|
||||
.config-option__list {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
|
||||
input:first-of-type {
|
||||
nav-left: none;
|
||||
}
|
||||
|
||||
input:last-of-type {
|
||||
nav-right: none;
|
||||
}
|
||||
|
||||
.config-option__tab-label {
|
||||
@extend %label-sm;
|
||||
@include trans-colors-opa;
|
||||
display: block;
|
||||
position: relative;
|
||||
height: auto;
|
||||
margin: space(4) space(12) 0;
|
||||
padding: space(8) 0;
|
||||
color: $color-text-inactive;
|
||||
tab-index: none;
|
||||
|
||||
&:hover {
|
||||
color: $color-text;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.config-option__checkbox-wrapper {
|
||||
@include trans-colors-opa;
|
||||
width: space(32);
|
||||
height: space(32);
|
||||
margin: space(4) space(12) 0;
|
||||
border-radius: $border-radius-sm;
|
||||
opacity: 0.5;
|
||||
background-color: $color-bg-overlay;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&[checked] {
|
||||
background-color: $color-a;
|
||||
}
|
||||
}
|
||||
|
||||
.config-option__checkbox {
|
||||
@extend %nav-all;
|
||||
@include trans-colors-opa;
|
||||
visibility: visible;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
// TODO: Remove & Replace old stylings
|
||||
input.radio {
|
||||
@extend %nav-all;
|
||||
@include trans-colors-opa;
|
||||
visibility: visible;
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
&:not(:disabled) {
|
||||
&:checked + .config-option__tab-label {
|
||||
border-bottom: 1dp;
|
||||
border-color: $color-text;
|
||||
color: $color-text;
|
||||
|
||||
&:hover {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.rmlui-window:not([mouse-active]) &:focus + .config-option__tab-label {
|
||||
transition: none;
|
||||
animation: $focus-anim-border;
|
||||
border-color: $color-secondary;
|
||||
color: $color-secondary;
|
||||
}
|
||||
|
||||
&:focus + .config-option__tab-label,
|
||||
&:hover + .config-option__tab-label {
|
||||
color: $color-text;
|
||||
}
|
||||
}
|
||||
|
||||
&:disabled + .config-option__tab-label {
|
||||
opacity: 0.5;
|
||||
|
||||
&:hover {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input.range slidertrack {
|
||||
@include trans-colors;
|
||||
height: 2dp;
|
||||
margin-top: space(8);
|
||||
background-color: $color-border;
|
||||
}
|
||||
|
||||
input.range sliderbar {
|
||||
@include trans-colors;
|
||||
width: space(16);
|
||||
height: space(16);
|
||||
margin-top: space(1);
|
||||
margin-right: space(-8);
|
||||
margin-left: space(-8);
|
||||
transition: background-color $transition-quick;
|
||||
border-radius: 8dp;
|
||||
background-color: $color-text-dim;
|
||||
|
||||
.rmlui-window:not([mouse-active]) &:focus {
|
||||
@include border($color-a);
|
||||
animation: $focus-anim-bg;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $color-text;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
input.range sliderbar:active,
|
||||
input.range slidertrack:active + sliderbar {
|
||||
background-color: $color-secondary;
|
||||
}
|
||||
|
||||
input.range sliderarrowdec,
|
||||
input.range sliderarrowinc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.config-option__details {
|
||||
@extend %label-xs;
|
||||
height: space(18);
|
||||
margin: space(14) space(12) 0;
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
.config-option-color {
|
||||
width: 100%;
|
||||
max-width: space(360);
|
||||
height: auto;
|
||||
margin-top: space(4);
|
||||
margin-left: space(12);
|
||||
padding: 0;
|
||||
|
||||
&__preview-wrapper {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: space(8 * 9);
|
||||
}
|
||||
|
||||
&__preview-block {
|
||||
display: block;
|
||||
width: space(8 * 11);
|
||||
height: 100%;
|
||||
border-width: $border-width-thickness;
|
||||
border-radius: $border-radius-lg;
|
||||
border-color: $color-border;
|
||||
}
|
||||
|
||||
&__hsv-wrapper {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding-left: space(8);
|
||||
|
||||
.config-option-range {
|
||||
flex: 1 1 auto;
|
||||
|
||||
label {
|
||||
min-width: space(72);
|
||||
}
|
||||
|
||||
input {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.config-option-range {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
max-width: space(360);
|
||||
height: auto;
|
||||
margin-top: space(4);
|
||||
padding: 0;
|
||||
|
||||
&__label {
|
||||
@extend %label-sm;
|
||||
|
||||
display: block;
|
||||
width: space(56);
|
||||
margin: 0 12dp;
|
||||
margin-right: space(16);
|
||||
padding: 0;
|
||||
color: $color-text;
|
||||
tab-index: none;
|
||||
}
|
||||
|
||||
&__range-input {
|
||||
flex: 1;
|
||||
|
||||
slidertrack {
|
||||
@include trans-colors;
|
||||
height: 2dp;
|
||||
margin-top: space(8);
|
||||
background-color: $color-border;
|
||||
}
|
||||
|
||||
sliderbar {
|
||||
@include trans-colors;
|
||||
width: space(16);
|
||||
height: space(16);
|
||||
margin-top: space(1);
|
||||
margin-right: space(-8);
|
||||
margin-left: space(-8);
|
||||
transition: background-color $transition-quick;
|
||||
border-radius: 8dp;
|
||||
background-color: $color-text-dim;
|
||||
|
||||
.rmlui-window:not([mouse-active]) &:focus {
|
||||
@include border($color-a);
|
||||
animation: $focus-anim-bg;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $color-text;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
sliderbar:active,
|
||||
slidertrack:active + sliderbar {
|
||||
background-color: $color-secondary;
|
||||
}
|
||||
|
||||
sliderarrowdec,
|
||||
sliderarrowinc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.config-option__range-wrapper {
|
||||
max-width: space(360);
|
||||
margin-top: space(4);
|
||||
}
|
||||
|
||||
.config-option__range-label {
|
||||
@extend %label-sm;
|
||||
|
||||
display: block;
|
||||
// flex: 0 0 space(32);
|
||||
width: space(56);
|
||||
margin: 0 12dp;
|
||||
margin-right: space(16);
|
||||
padding: 0;
|
||||
color: $color-text;
|
||||
tab-index: none;
|
||||
}
|
||||
|
||||
.config-option-dropdown, .config-option-textfield {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: space(8) space(24) space(8) space(12);
|
||||
|
||||
&__select {
|
||||
display: block;
|
||||
height: space(48);
|
||||
padding: space(14);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&__wrapper {
|
||||
// Cursed guess & check so that this appears to be the same height as the select
|
||||
$extra-space: 2;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: space(0 + $extra-space) 0 space(10 + $extra-space);
|
||||
cursor: text;
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
&__select, &__wrapper {
|
||||
@extend %body;
|
||||
@extend %nav-all;
|
||||
@include trans-colors-border;
|
||||
@include border($color-white-a50);
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
flex: 1 1 100%;
|
||||
|
||||
width: auto;
|
||||
border-radius: $border-radius-md;
|
||||
background-color: $color-white-a5;
|
||||
|
||||
&:hover, &:focus {
|
||||
@include border($color-white-a80);
|
||||
background-color: $color-white-a20;
|
||||
}
|
||||
|
||||
selectvalue {
|
||||
display: inline;
|
||||
height: auto;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
selectbox {
|
||||
@include border($color-border);
|
||||
margin-top: space(2);
|
||||
padding: space(4) 0;
|
||||
border-radius: $border-radius-md;
|
||||
background-color: $color-background-3;
|
||||
|
||||
option {
|
||||
@extend %nav-all;
|
||||
@include trans-colors;
|
||||
padding: space(8) space(12);
|
||||
background-color: $color-transparent;
|
||||
color: $color-text-dim;
|
||||
font-weight: 400;
|
||||
|
||||
&:hover, &:focus {
|
||||
background-color: $color-white-a20;
|
||||
}
|
||||
|
||||
&:hover:not(:checked) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:checked {
|
||||
background-color: $color-white-a5;
|
||||
color: $color-white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,170 @@
|
||||
@use 'sass:color';
|
||||
@use 'sass:math';
|
||||
|
||||
.control-option {
|
||||
@include set-color($color-text-dim);
|
||||
@include trans-colors-svg;
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: space(4) space(16) space(4) space(20);
|
||||
border-radius: $border-radius-sm;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
|
||||
&:focus-visible:not(:disabled, [disabled]),
|
||||
&:hover:not(:disabled, [disabled]) {
|
||||
@include set-color($color-text);
|
||||
background-color: $color-bg-overlay;
|
||||
}
|
||||
|
||||
&:disabled, &[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&--active {
|
||||
// while actively looking for inputs, set styles to the correct slots
|
||||
$valid-binding-slots: 0, 1;
|
||||
@each $slot in $valid-binding-slots {
|
||||
// global attr -> this active row -> binding slot
|
||||
[cur-binding-slot="#{$slot}"] & .control-option__binding[bind-slot="#{$slot}"] {
|
||||
border-color: $color-danger;
|
||||
|
||||
.control-option__binding-icon {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.control-option__binding-recording {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.control-option__label {
|
||||
@extend %label-md;
|
||||
flex: 2 1 space(300);
|
||||
height: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.control-option__bindings {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 2 1 space(400);
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: space(56);
|
||||
padding: 0 space(12) 0 space(4);
|
||||
}
|
||||
|
||||
.control-option__binding {
|
||||
@include set-color($color-text-dim);
|
||||
@include trans-colors-border;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
flex: 1 1 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: space(56);
|
||||
margin: 0 space(4);
|
||||
padding: space(8);
|
||||
border-width: $border-width-thickness;
|
||||
border-radius: $border-radius-sm;
|
||||
border-color: $color-bg-overlay;
|
||||
background-color: $color-bg-overlay;
|
||||
|
||||
&:focus, &:hover {
|
||||
@include set-color($color-text);
|
||||
border-color: $color-text;
|
||||
background-color: $color-border-soft;
|
||||
}
|
||||
|
||||
&:active {
|
||||
@include set-color($color-text-active);
|
||||
}
|
||||
|
||||
&:disabled, &[disabled] {
|
||||
@include set-color($color-text-dim);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&:not([disabled]) {
|
||||
@extend %nav-all;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.control-option__binding-icon {
|
||||
@include trans-colors-opa;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@keyframes control-option__binding-recording-scale {
|
||||
0% {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: scale(0.85);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.control-option__binding-recording {
|
||||
@include trans-colors-opa;
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
|
||||
.control-option__binding-circle {
|
||||
$rec-size: 24;
|
||||
|
||||
width: space($rec-size);
|
||||
height: space($rec-size);
|
||||
animation: 1.5s sine-in-out infinite control-option__binding-recording-scale;
|
||||
border-radius: space($rec-size);
|
||||
background-color: $color-danger;
|
||||
}
|
||||
|
||||
.control-option__binding-edge {
|
||||
$edge-size: 36;
|
||||
$h-edge-size: math.div($edge-size, 2);
|
||||
|
||||
position: absolute;
|
||||
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: space($edge-size);
|
||||
height: space($edge-size);
|
||||
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
> svg.control-option__binding-edge-svg {
|
||||
width: space($edge-size);
|
||||
height: space($edge-size);
|
||||
image-color: $color-danger;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
@use 'sass:color';
|
||||
|
||||
/*
|
||||
<button
|
||||
class="icon-button icon-button--danger"
|
||||
>
|
||||
<svg src="icons/Trash.svg" />
|
||||
</button>
|
||||
*/
|
||||
@mixin create-icon-button-variation($base-col, $base-col-05, $base-col-20, $base-col-30, $base-col-80) {
|
||||
border-color: $base-col-80;
|
||||
background-color: $base-col-05;
|
||||
|
||||
&:focus, &:hover {
|
||||
border-color: $base-col;
|
||||
background-color: $base-col-30;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: $base-col-20;
|
||||
}
|
||||
}
|
||||
|
||||
$icon-button-size: 56 - ($border-width-thickness-num * 2);
|
||||
|
||||
.icon-button {
|
||||
@include set-color($color-text-dim);
|
||||
@include trans-colors-border;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: space($icon-button-size);
|
||||
min-width: space($icon-button-size);
|
||||
max-width: space($icon-button-size);
|
||||
height: space($icon-button-size);
|
||||
min-height: space($icon-button-size);
|
||||
max-height: space($icon-button-size);
|
||||
border-width: $border-width-thickness;
|
||||
border-radius: space($icon-button-size * 0.5);
|
||||
border-color: $color-transparent;
|
||||
background-color: $color-transparent;
|
||||
|
||||
&:focus, &:hover {
|
||||
@include set-color($color-text);
|
||||
background-color: $color-border;
|
||||
}
|
||||
|
||||
&:active {
|
||||
@include set-color($color-text-active);
|
||||
background-color: $color-border-soft;
|
||||
}
|
||||
|
||||
&:disabled,&[disabled] {
|
||||
@include set-color($color-text-dim);
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
&:not([disabled]) {
|
||||
@extend %nav-all;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
svg {
|
||||
width: space(32);
|
||||
height: space(32);
|
||||
}
|
||||
|
||||
&--primary {
|
||||
@include create-icon-button-variation($color-primary, $color-primary-a5, $color-primary-a20, $color-primary-a30, $color-primary-a80);
|
||||
}
|
||||
|
||||
&--secondary {
|
||||
@include create-icon-button-variation($color-secondary, $color-secondary-a5, $color-secondary-a20, $color-secondary-a30, $color-secondary-a80);
|
||||
}
|
||||
|
||||
&--tertiary {
|
||||
@include create-icon-button-variation($color-text, $color-text-a5, $color-text-a20, $color-text-a30, $color-text-a80);
|
||||
}
|
||||
|
||||
&--success {
|
||||
@include create-icon-button-variation($color-success, $color-success-a5, $color-success-a20, $color-success-a30, $color-success-a80);
|
||||
}
|
||||
|
||||
&--danger {
|
||||
@include create-icon-button-variation($color-danger, $color-danger-a5, $color-danger-a20, $color-danger-a30, $color-danger-a80);
|
||||
}
|
||||
|
||||
&--warning {
|
||||
@include create-icon-button-variation($color-warning, $color-warning-a5, $color-warning-a20, $color-warning-a30, $color-warning-a80);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,347 @@
|
||||
@use 'sass:math';
|
||||
|
||||
// Probably will need to adjust for other langs...
|
||||
$mapping-min-width: 80 * 8;
|
||||
$visual-max-width: $base-modal-max-width - $mapping-min-width - $scrollbar-width;
|
||||
|
||||
.input-config {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.input-config__horizontal-split {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.input-config__mappings {
|
||||
display: block;
|
||||
flex: 1 1 auto;
|
||||
min-width: space($mapping-min-width);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.input-config__mappings-scroll {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.input-config__mappings-wrapper {
|
||||
padding: space(8);
|
||||
}
|
||||
|
||||
.input-config__visual-wrapper {
|
||||
display: block;
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
max-width: space($visual-max-width);
|
||||
height: auto;
|
||||
max-height: space(math.div($visual-max-width, 4) * 3);
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.input-config__visual-aspect {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: auto 0;
|
||||
padding-bottom: 75%;
|
||||
background-color: $color-bg-shadow;
|
||||
}
|
||||
|
||||
.input-config__visual {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: space(16);
|
||||
right: space(16);
|
||||
bottom: space(16);
|
||||
left: space(16);
|
||||
flex-direction: column;
|
||||
border-radius: space(108);
|
||||
background-color: $color-white-a5;
|
||||
}
|
||||
|
||||
.input-config__visual-half {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: row;
|
||||
padding: 6%;
|
||||
|
||||
&--bottom {
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.input-config__visual-quarter-left {
|
||||
display: flex;
|
||||
flex: 1 1 50%;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.input-config__visual-quarter-right {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.input-config__visual-stick-wrapper {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.input-viz {
|
||||
@include trans-colors-opa;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
> svg:not(.input-viz__dpad-arrow) {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&__mappings div {
|
||||
@extend %prompt-font-sm;
|
||||
}
|
||||
}
|
||||
|
||||
$all-inputs: A,
|
||||
B,
|
||||
Z,
|
||||
START,
|
||||
DPAD_UP,
|
||||
DPAD_DOWN,
|
||||
DPAD_LEFT,
|
||||
DPAD_RIGHT,
|
||||
L,
|
||||
R,
|
||||
C_UP,
|
||||
C_DOWN,
|
||||
C_LEFT,
|
||||
C_RIGHT,
|
||||
X_AXIS_NEG,
|
||||
X_AXIS_POS,
|
||||
Y_AXIS_NEG,
|
||||
Y_AXIS_POS;
|
||||
|
||||
// Show default state while no inputs are active
|
||||
[cur-input="NONE"] .input-viz[visual-input] {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@each $inp in $all-inputs {
|
||||
.input-viz[visual-input~="#{$inp}"] {
|
||||
opacity: 0.25;
|
||||
|
||||
[cur-input="#{$inp}"] & {
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin set-sizes($sz) {
|
||||
width: space($sz);
|
||||
height: space($sz);
|
||||
|
||||
> svg {
|
||||
width: space($sz);
|
||||
height: space($sz);
|
||||
}
|
||||
}
|
||||
|
||||
.input-viz__button {
|
||||
@include set-color($color-text);
|
||||
|
||||
&--sm {
|
||||
@include set-sizes(64);
|
||||
}
|
||||
|
||||
&--md {
|
||||
@include set-sizes(76);
|
||||
}
|
||||
|
||||
&--lg {
|
||||
@include set-sizes(84);
|
||||
}
|
||||
|
||||
&--C {
|
||||
@include set-svgs-color($color-warning);
|
||||
}
|
||||
|
||||
&--A {
|
||||
@include set-svgs-color($color-a);
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
&--B {
|
||||
@include set-svgs-color($color-success);
|
||||
}
|
||||
|
||||
&--Start {
|
||||
@include set-svgs-color($color-danger);
|
||||
}
|
||||
}
|
||||
|
||||
.input-viz__Z {
|
||||
@include set-svgs-color($color-warning);
|
||||
@include set-sizes(136);
|
||||
}
|
||||
|
||||
$dpad-size: 192;
|
||||
|
||||
.input-viz.input-viz__dpad {
|
||||
@include set-svgs-color($color-text);
|
||||
@include set-sizes($dpad-size);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
$stick-size: 200;
|
||||
|
||||
.input-config__visual-stick {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: space($stick-size);
|
||||
height: space($stick-size);
|
||||
border-radius: space(math.div($stick-size, 2));
|
||||
background-color: $color-white-a5;
|
||||
}
|
||||
|
||||
.input-viz__dpad-split,
|
||||
.input-viz__stick-split {
|
||||
@include inset-block(0);
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
&--vertical {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&--horizontal {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
> div {
|
||||
display: flex;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.input-viz__dpad-split > div {
|
||||
width: space(math.div($dpad-size, 3));
|
||||
height: space(math.div($dpad-size, 3));
|
||||
}
|
||||
|
||||
.input-viz__stick-split > div {
|
||||
width: space(math.div($stick-size, 3));
|
||||
height: space(math.div($stick-size, 3));
|
||||
}
|
||||
|
||||
.input-viz__dpad-arrow {
|
||||
$edge-dist: space(4);
|
||||
position: absolute;
|
||||
width: space(60);
|
||||
height: space(60);
|
||||
|
||||
&--up {
|
||||
top: $edge-dist;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&--down {
|
||||
bottom: $edge-dist;
|
||||
margin: 0 auto;
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
&--left {
|
||||
left: $edge-dist;
|
||||
margin: auto 0;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
&--right {
|
||||
right: $edge-dist;
|
||||
margin: auto 0;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
|
||||
.input-viz__R {
|
||||
@include set-svgs-color($color-white);
|
||||
@include set-sizes(96);
|
||||
}
|
||||
|
||||
.input-viz__L {
|
||||
@include set-svgs-color($color-secondary);
|
||||
@include set-sizes(136);
|
||||
}
|
||||
|
||||
.input-config__c-buttons {
|
||||
position: relative;
|
||||
width: space(76 + 76 + 56);
|
||||
height: space(76 + 56);
|
||||
|
||||
&-lr, &-du {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&-lr {
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
&-du {
|
||||
flex-direction: column-reverse;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.input-viz {
|
||||
&[visual-input="C_UP"] {
|
||||
margin-top: space(-32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.input-config__main-buttons {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: space(268);
|
||||
height: space(128);
|
||||
margin-right: space(10);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
// TODO: Affect all elements with launcher fade-in
|
||||
// @keyframes fade-launcher-in {
|
||||
// 0% {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// to {
|
||||
// opacity: 1;
|
||||
// }
|
||||
// }
|
||||
|
||||
.launcher {
|
||||
display: block;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: $color-background-1;
|
||||
}
|
||||
|
||||
.launcher__vertical-split {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 50%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
|
||||
&--right {
|
||||
right: 0;
|
||||
left: 50%;
|
||||
align-items: flex-end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@keyframes slide-mm-bg-over {
|
||||
0% {
|
||||
transform: translateX(space(100));
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(space(0));
|
||||
}
|
||||
}
|
||||
|
||||
.launcher__background-wrapper {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: -55vw;
|
||||
right: -100%;
|
||||
bottom: -50vw;
|
||||
left: -70vw;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
transform: translateX(space(0));
|
||||
animation: 25s cubic-out 1 slide-mm-bg-over;
|
||||
}
|
||||
|
||||
@keyframes fade-mm-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
.launcher__background-bk {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: auto;
|
||||
height: 100%;
|
||||
animation: 2.5s cubic-in-out 1 fade-mm-in;
|
||||
opacity: 0.1;
|
||||
}
|
||||
|
||||
.launcher__title-quadrant {
|
||||
flex: 1 1 auto;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding-top: space(96);
|
||||
padding-left: space(96);
|
||||
|
||||
&--right {
|
||||
padding-right: space(96);
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.launcher__content-quadrant {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: space(32);
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
|
||||
/*
|
||||
Example layout:
|
||||
<button class="menu-list-item menu-list-item--right">
|
||||
<div class="menu-list-item__bullet">•</div>
|
||||
<div class="menu-list-item__label">Setup controls</div>
|
||||
</button>
|
||||
- Variants:
|
||||
.menu-list-item--right (align to right side)
|
||||
- Optional:
|
||||
- <div class="subtitle-title__disclaimer">Coming Soon™</div>
|
||||
|
||||
*/
|
||||
|
||||
.menu-list-item {
|
||||
@include set-color($color-text-dim);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: space(16);
|
||||
border-radius: $border-radius-sm;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
cursor: pointer;
|
||||
|
||||
&--right {
|
||||
flex-direction: row-reverse;
|
||||
align-content: flex-end;
|
||||
|
||||
.menu-list-item__bullet {
|
||||
margin-left: space(12);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.menu-list-item:focus:not(:disabled, [disabled]),
|
||||
&.menu-list-item:hover:not(:disabled, [disabled]) {
|
||||
// decorator: $primary-rl-fade;
|
||||
background-color: $color-white-a5;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus:not(:disabled, [disabled]),
|
||||
&:hover:not(:disabled, [disabled]) {
|
||||
@include set-color($color-primary);
|
||||
// decorator: $primary-lr-fade;
|
||||
background-color: $color-white-a5;
|
||||
|
||||
.menu-list-item__bullet {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&:not(:disabled, [disabled]) {
|
||||
@extend %nav-all;
|
||||
}
|
||||
|
||||
&:disabled, &[disabled] {
|
||||
opacity: 0.5;
|
||||
tab-index: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.menu-list-item__label {
|
||||
@extend %label-lg;
|
||||
}
|
||||
|
||||
.menu-list-item__bullet {
|
||||
margin-right: space(12);
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
@use 'sass:math';
|
||||
|
||||
$prompt-space: 24;
|
||||
|
||||
.prompt {
|
||||
&__overlay {
|
||||
background-color: $color-bg-overlay;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
&__overlay,
|
||||
&__content-wrapper {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
&__content-wrapper {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
&__content {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex: 1 1 100%;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-width: space(700);
|
||||
height: auto;
|
||||
margin: auto;
|
||||
border-width: $border-width-thickness;
|
||||
border-radius: $border-radius-modal;
|
||||
border-color: $color-border;
|
||||
background: $color-modal-overlay;
|
||||
|
||||
h3, p {
|
||||
margin: space($prompt-space);
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&__controls {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
padding: space($prompt-space) space(math.div($prompt-space, 2));
|
||||
border-top-width: $border-width-thickness;
|
||||
border-top-color: $color-border-soft;
|
||||
|
||||
.button {
|
||||
min-width: space(math.div(700, 3));
|
||||
margin: 0 space(math.div($prompt-space, 2));
|
||||
text-align: center;
|
||||
nav-up: none;
|
||||
nav-down: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
Example layout:
|
||||
|
||||
<button class="subtitle-title" disabled>
|
||||
<h3>Zelda 64: Recompiled</h3>
|
||||
<h1>Ocarina of Time</h1>
|
||||
<div class="subtitle-title__disclaimer">Coming Soon™</div>
|
||||
</button>
|
||||
- Variants:
|
||||
.subtitle-title--right (align to right side)
|
||||
- Optional:
|
||||
- <div class="subtitle-title__disclaimer">Coming Soon™</div>
|
||||
|
||||
*/
|
||||
|
||||
.subtitle-title {
|
||||
display: block;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
align-content: flex-start;
|
||||
align-items: flex-start;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 0;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
color: $color-text-dim;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
|
||||
&--right {
|
||||
align-content: flex-end;
|
||||
}
|
||||
|
||||
&--right, &--right > * {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&[selected] {
|
||||
color: $color-text;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&:focus:not(:disabled, [disabled]),
|
||||
&:hover:not(:disabled, [disabled], [selected]) {
|
||||
color: $color-primary;
|
||||
}
|
||||
|
||||
&:not(:disabled, [disabled]) {
|
||||
@extend %nav-all;
|
||||
}
|
||||
|
||||
&:disabled, &[disabled] {
|
||||
opacity: 0.5;
|
||||
cursor: default;
|
||||
tab-index: none;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-bottom: space(6);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: space(6);
|
||||
}
|
||||
|
||||
&__disclaimer {
|
||||
@extend %label-sm;
|
||||
|
||||
margin-top: space(16);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Example:
|
||||
<tab class="tab">
|
||||
<div>Graphics</div>
|
||||
<div class="tab__indicator"></div>
|
||||
</tab>
|
||||
*/
|
||||
|
||||
.tabs tabs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.tab {
|
||||
@extend %nav-all;
|
||||
@extend %header-3;
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: space(20) space(24);
|
||||
transition: color $transition-quick;
|
||||
opacity: 0.9;
|
||||
background-color: rgba(0,0,0,0);
|
||||
color: $color-text-inactive;
|
||||
|
||||
&:selected {
|
||||
color: $color-text;
|
||||
|
||||
.tab__indicator {
|
||||
background-color: $color-border-solid;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
|
||||
.rmlui-window:not([mouse-active]) &:focus {
|
||||
transition: none;
|
||||
animation: $focus-anim-border;
|
||||
|
||||
&:selected .tab__indicator {
|
||||
animation: $focus-anim-bg;
|
||||
}
|
||||
}
|
||||
|
||||
&:focus, &:hover {
|
||||
opacity: 1;
|
||||
color: $color-text;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.tab__indicator {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 2dp;
|
||||
left: 0;
|
||||
height: 2dp;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
@use "sass:math";
|
||||
|
||||
$toggle-width: 162;
|
||||
$toggle-height: 72;
|
||||
|
||||
$toggle-floater-width: 80;
|
||||
$toggle-floater-height: 64;
|
||||
$toggle-floater-margin: 4;
|
||||
$toggle-checked-left-offset: $toggle-width - $toggle-floater-margin - $toggle-floater-width;
|
||||
|
||||
.toggle {
|
||||
@extend %nav-all;
|
||||
@include trans-colors-opa;
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: space($toggle-width);
|
||||
height: space($toggle-height);
|
||||
border-radius: space(math.div($toggle-height, 2));
|
||||
opacity: 0.9;
|
||||
background: $color-transparent;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover, &:focus-visible, &:focus {
|
||||
opacity: 1;
|
||||
background-color: $color-secondary-a30;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 1;
|
||||
background-color: $color-secondary-a5;
|
||||
}
|
||||
|
||||
.toggle__border {
|
||||
@include inner-border-block($color-secondary-l);
|
||||
border-radius: space(math.div($toggle-height, 2));
|
||||
}
|
||||
|
||||
.toggle__floater {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: space($toggle-floater-margin);
|
||||
width: space($toggle-floater-width);
|
||||
height: space($toggle-floater-height);
|
||||
transform: translateY(-50%);
|
||||
border-radius: space(math.div($toggle-floater-height, 2));
|
||||
background: $color-secondary-d;
|
||||
}
|
||||
|
||||
&--checked {
|
||||
.toggle__floater {
|
||||
left: space($toggle-checked-left-offset);
|
||||
}
|
||||
|
||||
.toggle__icon {
|
||||
&.toggle__icon--left {
|
||||
opacity: 0.9;
|
||||
color: $color-secondary-l;
|
||||
}
|
||||
|
||||
&.toggle__icon--right {
|
||||
opacity: 1.0;
|
||||
color: $color-text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toggle__icons {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: space(16);
|
||||
left: space(16);
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: space(56);
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.toggle__icon {
|
||||
@extend %prompt-font-lg;
|
||||
@include trans-colors;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: space(56);
|
||||
height: space(56);
|
||||
color: $color-text;
|
||||
|
||||
&--right {
|
||||
opacity: 1;
|
||||
color: $color-secondary-l;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
@import "./CenteredPage";
|
||||
@import "./ControlOption";
|
||||
@import "./Tabs";
|
||||
@import "./Config";
|
||||
@import "./ConfigGroup";
|
||||
@import "./ConfigOption";
|
||||
@import "./ConfigDescription";
|
||||
@import "./InputConfig";
|
||||
@import "./Button";
|
||||
@import "./IconButton";
|
||||
@import "./Launcher";
|
||||
@import "./MenuListItem";
|
||||
@import "./SubtitleTitle";
|
||||
@import "./Toggle";
|
||||
@import "./BottomLeft";
|
||||
@import "./Prompt";
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
@function space($amt) {
|
||||
@return #{$amt}dp;
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
@import "./base";
|
||||
|
||||
body
|
||||
{
|
||||
@extend %body;
|
||||
box-sizing: border-box;
|
||||
color: $color-text;
|
||||
font-family: $font-stack;
|
||||
}
|
||||
|
||||
@import "./globals/old";
|
||||
@import "./globals/scrollbars";
|
||||
@import "./components/components";
|
||||
@import "./pages/pages";
|
||||
|
||||
$font-size: 20dp;
|
||||
|
||||
|
||||
.rmlui-window {
|
||||
opacity: 1;
|
||||
|
||||
&--hidden {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:not([mouse-active]) {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-vert {
|
||||
@extend %nav-vert;
|
||||
}
|
||||
|
||||
.nav-horiz {
|
||||
@extend %nav-horiz;
|
||||
}
|
||||
|
||||
.nav-dir {
|
||||
@extend %nav-dir;
|
||||
}
|
||||
|
||||
.nav-foc {
|
||||
@extend %nav-foc;
|
||||
}
|
||||
|
||||
.nav-all {
|
||||
@extend %nav-all;
|
||||
}
|
||||
|
||||
*, *:before, *:after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1 {
|
||||
@extend %header-1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
@extend %header-2;
|
||||
}
|
||||
|
||||
h3 {
|
||||
@extend %header-3;
|
||||
}
|
||||
|
||||
.label-lg {
|
||||
@extend %label-lg;
|
||||
}
|
||||
|
||||
.label-md {
|
||||
@extend %label-md;
|
||||
}
|
||||
|
||||
.label-sm {
|
||||
@extend %label-sm;
|
||||
}
|
||||
|
||||
.prompt-font {
|
||||
@extend %prompt-font;
|
||||
}
|
||||
|
||||
.prompt-font-sm {
|
||||
@extend %prompt-font-sm;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: $color-primary-d;
|
||||
}
|
||||
|
||||
@keyframes blue-pulse {
|
||||
0% {
|
||||
color: $color-secondary;
|
||||
}
|
||||
|
||||
50% {
|
||||
color: $color-secondary-l;
|
||||
}
|
||||
|
||||
100% {
|
||||
color: $color-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blue-pulse-with-border {
|
||||
0% {
|
||||
border-color: $color-secondary;
|
||||
color: $color-secondary;
|
||||
}
|
||||
|
||||
50% {
|
||||
border-color: $color-secondary-l;
|
||||
color: $color-secondary-l;
|
||||
}
|
||||
|
||||
100% {
|
||||
border-color: $color-secondary;
|
||||
color: $color-secondary;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blue-pulse-background {
|
||||
0% {
|
||||
background-color: $color-secondary;
|
||||
}
|
||||
|
||||
50% {
|
||||
background-color: $color-secondary-l;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-color: $color-secondary;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,211 @@
|
||||
/* stylelint-disable color-no-hex */
|
||||
/* stylelint-disable selector-max-id */
|
||||
|
||||
* {
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
hr {
|
||||
display:block;
|
||||
padding:1.5dp;
|
||||
background: $color-background-1;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #fff;
|
||||
font-size: 20dp;
|
||||
font-style: normal;
|
||||
font-weight: normal
|
||||
}
|
||||
|
||||
/* div {
|
||||
focus:none;
|
||||
tab-index:none;
|
||||
} */
|
||||
|
||||
div#window {
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-color: $color-border;
|
||||
background-color: $color-background-2;
|
||||
}
|
||||
|
||||
div#content {
|
||||
z-index: 2;
|
||||
width: auto;
|
||||
height: 100%;
|
||||
overflow: hidden auto;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
input.submit {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
|
||||
input.text,
|
||||
input.password {
|
||||
box-sizing: border-box;
|
||||
height: 31dp;
|
||||
padding: 11dp 10dp 0;
|
||||
text-align: left;
|
||||
cursor: text
|
||||
}
|
||||
|
||||
textarea {
|
||||
padding: 14dp 12dp 10dp;
|
||||
text-align: left;
|
||||
cursor: text
|
||||
}
|
||||
|
||||
input.text,
|
||||
input.password,
|
||||
select,
|
||||
textarea {
|
||||
/* color: #333; */
|
||||
|
||||
/* font-size: 13dp */
|
||||
height: auto;
|
||||
}
|
||||
|
||||
table input.text {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
|
||||
/* height: 18dp; */
|
||||
margin: 0;
|
||||
border-width: $border-width-thickness;
|
||||
border-color: #000;
|
||||
background-color: #fff;
|
||||
font-size: 15dp;
|
||||
|
||||
/* padding: 0 5dp; */
|
||||
line-height: 1;
|
||||
decorator: none;
|
||||
|
||||
/* vertical-align: center; */
|
||||
}
|
||||
|
||||
select {
|
||||
// display: inline-block;
|
||||
// /* width: 175dp; */
|
||||
// /* height: 37dp; */
|
||||
// /* height: auto; */
|
||||
// text-align: left;
|
||||
// box-sizing:border-box;
|
||||
// /* padding: 4dp; */
|
||||
// vertical-align: center;
|
||||
// padding: 4dp;
|
||||
// border-radius: 5dp;
|
||||
// background-color: rgb(120, 120, 120);
|
||||
// width: 100%;
|
||||
}
|
||||
// select {
|
||||
// @extend %body;
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: flex-start;
|
||||
// box-sizing: border-box;
|
||||
// padding: space(16);
|
||||
// flex: 1 1 100%;
|
||||
// // width: auto;
|
||||
// height: space(1000);
|
||||
// border-radius: $border-radius-lg;
|
||||
// background-color: $color-white-a20;
|
||||
// }
|
||||
|
||||
// select selectvalue {
|
||||
// height: auto;
|
||||
// /* padding: 4dp; */
|
||||
// /* margin-right: 30dp; */
|
||||
// /* height: 25dp; */
|
||||
// /* padding: 4dp; */
|
||||
// /* decorator: image(selectvalue) */
|
||||
// }
|
||||
|
||||
// select:hover selectvalue {
|
||||
// /* margin-right: 30dp; */
|
||||
// /* height: 25dp; */
|
||||
// /* padding: 4dp; */
|
||||
// background-color: rgb(150, 150, 150);
|
||||
// /* decorator: image(selectvalue) */
|
||||
// }
|
||||
|
||||
// select selectarrow {
|
||||
// /* width: 30dp; */
|
||||
// /* height: 37dp; */
|
||||
// /* decorator: image(selectarrow) */
|
||||
// /* background-color: black; */
|
||||
// /* appearance: none; */
|
||||
// }
|
||||
|
||||
// select:hover selectarrow {
|
||||
// /* decorator: image(selectarrow-hover) */
|
||||
// }
|
||||
|
||||
// select:active selectarrow,
|
||||
// select selectarrow:checked {
|
||||
// /* decorator: image(selectarrow-active) */
|
||||
// }
|
||||
|
||||
// select selectbox {
|
||||
// /* margin-left: 1dp; */
|
||||
// /* margin-top: -7dp; */
|
||||
// /* margin-bottom: -10dp; */
|
||||
// /* width: 162dp; */
|
||||
// /* padding: 1dp 4dp 4dp 4dp */
|
||||
// }
|
||||
|
||||
// select selectbox,
|
||||
// tbody {
|
||||
// background-color: rgb(120,120,120);
|
||||
// /* decorator: tiled-box(selectbox-tl, selectbox-t, selectbox-tr, selectbox-l, selectbox-c, auto, selectbox-bl, selectbox-b, selectbox-br) */
|
||||
// }
|
||||
|
||||
// select selectbox option {
|
||||
// width: auto;
|
||||
// background-color: rgb(120, 120, 120)
|
||||
// }
|
||||
|
||||
// select selectbox option:nth-child(even),
|
||||
// tr:nth-child(even) {
|
||||
// background-color: rgb(100, 100, 100)
|
||||
// }
|
||||
|
||||
// select selectbox option:checked {
|
||||
// font-weight:bold;
|
||||
// color:rgb(255,255,255);
|
||||
// }
|
||||
|
||||
// select selectbox option:hover {
|
||||
// background: rgb(150,150,150)
|
||||
// }
|
||||
|
||||
input.radio {
|
||||
flex: 0;
|
||||
width:0dp;
|
||||
nav-up:auto;
|
||||
nav-right:auto;
|
||||
nav-down:auto;
|
||||
nav-left:auto;
|
||||
tab-index:auto;
|
||||
focus:auto;
|
||||
}
|
||||
|
||||
input.checkbox {
|
||||
width: space(20);
|
||||
height: space(20);
|
||||
nav-up:auto;
|
||||
nav-right:auto;
|
||||
nav-down:auto;
|
||||
nav-left:auto;
|
||||
tab-index:auto;
|
||||
focus:auto;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
@use 'sass:math';
|
||||
|
||||
$scrollbar-width: 12;
|
||||
|
||||
@mixin _set-scroll-size($size-key) {
|
||||
#{$size-key}: space($scrollbar-width);
|
||||
|
||||
slidertrack {
|
||||
#{$size-key}: space($scrollbar-width);
|
||||
}
|
||||
|
||||
sliderbar {
|
||||
#{$size-key}: space($scrollbar-width);
|
||||
}
|
||||
}
|
||||
|
||||
scrollbarvertical,scrollbarhorizontal {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
slidertrack {
|
||||
background: $color-primary-l;
|
||||
opacity: 0.05;
|
||||
}
|
||||
|
||||
sliderbar {
|
||||
border-radius: space(math.div($scrollbar-width, 2) - 1);
|
||||
background: $color-primary-l;
|
||||
opacity: 0.1;
|
||||
|
||||
&:hover:not(:active) {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
&:active {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
|
||||
sliderarrowdec, sliderarrowinc {
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
scrollbarvertical {
|
||||
@include _set-scroll-size(width);
|
||||
}
|
||||
|
||||
scrollbarhorizontal {
|
||||
@include _set-scroll-size(height);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
%nav-vert {
|
||||
nav-up: auto;
|
||||
nav-down: auto;
|
||||
}
|
||||
|
||||
%nav-horiz {
|
||||
nav-right: auto;
|
||||
nav-left: auto;
|
||||
}
|
||||
|
||||
%nav-dir {
|
||||
@extend %nav-vert;
|
||||
@extend %nav-horiz;
|
||||
}
|
||||
|
||||
%nav-foc {
|
||||
focus: auto;
|
||||
tab-index: auto;
|
||||
}
|
||||
|
||||
%nav-all {
|
||||
@extend %nav-dir;
|
||||
@extend %nav-foc;
|
||||
}
|
||||
|
||||
@mixin set-svgs-color($col) {
|
||||
svg {
|
||||
image-color: $col;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@include set-color(COLOR);
|
||||
*/
|
||||
@mixin set-color($col) {
|
||||
@include set-svgs-color($col);
|
||||
color: $col;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
/*
|
||||
@include trans-colors;
|
||||
*/
|
||||
@mixin trans-colors {
|
||||
transition: color $transition-quick, background-color $transition-quick;
|
||||
}
|
||||
|
||||
/*
|
||||
@include trans-colors-opa;
|
||||
*/
|
||||
@mixin trans-colors-opa {
|
||||
transition: color $transition-quick, background-color $transition-quick, opacity $transition-quick;
|
||||
}
|
||||
|
||||
/*
|
||||
@include trans-colors-svg;
|
||||
*/
|
||||
@mixin trans-colors-svg {
|
||||
transition: color $transition-quick, background-color $transition-quick, opacity $transition-quick;
|
||||
|
||||
svg {
|
||||
transition: image-color $transition-quick, background-color $transition-quick;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@include trans-colors-border;
|
||||
*/
|
||||
@mixin trans-colors-border {
|
||||
transition: color $transition-quick, background-color $transition-quick, opacity $transition-quick, border-color $transition-quick;
|
||||
|
||||
svg {
|
||||
transition: image-color $transition-quick, background-color $transition-quick;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
|
||||
$font-stack: 'Suplexmentary Comic NC';
|
||||
|
||||
@mixin set-font-sizing($sz, $spacing) {
|
||||
// font-family: $font-stack;
|
||||
$sz-add: $sz + 4;
|
||||
font-size: space($sz-add);
|
||||
letter-spacing: space($sz-add * $spacing);
|
||||
line-height: space($sz-add);
|
||||
}
|
||||
|
||||
%header-1 {
|
||||
@include set-font-sizing(64, 0.07);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
%header-2 {
|
||||
@include set-font-sizing(48, 0.07);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
%header-3 {
|
||||
@include set-font-sizing(32, 0.07);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
%label-lg {
|
||||
@include set-font-sizing(32, 0.11);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
%label-md {
|
||||
@include set-font-sizing(24, 0.11);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
%label-sm {
|
||||
@include set-font-sizing(16, 0.14);
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
%label-xs {
|
||||
@include set-font-sizing(14, 0.14);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
%body {
|
||||
@include set-font-sizing(16, 0.0);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
%prompt-font-lg {
|
||||
font-family: promptfont;
|
||||
font-size: space(56);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: space(56);
|
||||
}
|
||||
|
||||
%prompt-font {
|
||||
font-family: promptfont;
|
||||
font-size: space(40);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: space(40);
|
||||
}
|
||||
|
||||
%prompt-font-sm {
|
||||
font-family: promptfont;
|
||||
font-size: space(32);
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: space(32);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
@import "./config/config";
|
||||
@@ -0,0 +1 @@
|
||||
@import "./debug";
|
||||
@@ -0,0 +1,178 @@
|
||||
|
||||
.config-debug {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
padding: space(8);
|
||||
}
|
||||
|
||||
.config-debug__scroll {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.config-debug-option {
|
||||
@include set-color($color-text-dim);
|
||||
@include trans-colors-svg;
|
||||
@include border-bottom($color-border-soft);
|
||||
display: block;
|
||||
position: relative;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
padding: space(12) space(4);
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
|
||||
&:focus:not(:disabled, [disabled]),
|
||||
&:focus-visible:not(:disabled, [disabled]),
|
||||
&:hover:not(:disabled, [disabled]) {
|
||||
@include set-color($color-text);
|
||||
background-color: $color-bg-overlay;
|
||||
}
|
||||
|
||||
&:disabled, &[disabled] {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.icon-button {
|
||||
margin-left: space(8);
|
||||
}
|
||||
}
|
||||
|
||||
.config-debug__option-split {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.config-debug-option__label {
|
||||
@extend %label-md;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: space(4) space(16) space(12);
|
||||
width: auto;
|
||||
height: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.config-debug__option-controls {
|
||||
display: block;
|
||||
position: relative;
|
||||
flex: 1 1 auto;
|
||||
height: auto;
|
||||
width: auto;
|
||||
max-width: space(800);
|
||||
padding: 0 space(12);
|
||||
}
|
||||
|
||||
.config-debug__option-trigger {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.config-debug__select-wrapper {
|
||||
display: flex;
|
||||
position: relative;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
max-width: space(800);
|
||||
height: auto;
|
||||
padding: space(4);
|
||||
|
||||
.config-debug__select-label {
|
||||
@extend %label-sm;
|
||||
padding-right: space(16);
|
||||
flex: auto;
|
||||
width: space(196);
|
||||
|
||||
> div {
|
||||
display: inline;
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
input {
|
||||
@extend %body;
|
||||
@extend %nav-all;
|
||||
display: block;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
height: space(20);
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
select {
|
||||
@extend %body;
|
||||
@extend %nav-all;
|
||||
@include trans-colors-border;
|
||||
@include border($color-white-a50);
|
||||
display: block;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
flex: 1 1 100%;
|
||||
width: auto;
|
||||
height: space(48);
|
||||
border-radius: $border-radius-md;
|
||||
background-color: $color-white-a5;
|
||||
cursor: pointer;
|
||||
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
padding: space(14);
|
||||
|
||||
&:hover, &:focus {
|
||||
@include border($color-white-a80);
|
||||
background-color: $color-white-a20;
|
||||
}
|
||||
|
||||
selectvalue {
|
||||
display: inline;
|
||||
margin: auto 0;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
selectbox {
|
||||
@include border($color-white-a80);
|
||||
background-color: $color-background-3;
|
||||
padding: space(4) 0;
|
||||
margin-top: space(2);
|
||||
border-radius: $border-radius-md;
|
||||
|
||||
option {
|
||||
@extend %nav-all;
|
||||
@include trans-colors;
|
||||
padding: space(8) space(12);
|
||||
background-color: $color-transparent;
|
||||
color: $color-text-dim;
|
||||
font-weight: 400;
|
||||
|
||||
&:hover, &:focus {
|
||||
background-color: $color-white-a20;
|
||||
}
|
||||
|
||||
&:hover:not(:checked) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&:checked {
|
||||
color: $color-white;
|
||||
background-color: $color-white-a5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
$focus-anim: blue-pulse-with-border 0.75s infinite;
|
||||
$focus-anim-border: blue-pulse 0.75s infinite;
|
||||
$focus-anim-bg: blue-pulse-background 0.75s infinite;
|
||||
@@ -0,0 +1,42 @@
|
||||
|
||||
$border-radius-sm: 8dp;
|
||||
$border-radius-md: 12dp;
|
||||
// modals/pages
|
||||
$border-radius-lg: 16dp;
|
||||
|
||||
$border-radius-modal: $border-radius-lg;
|
||||
|
||||
$border-width-thickness-num: 1.1;
|
||||
// $border-width-thickness-num: 1.5;
|
||||
$border-width-thickness: space($border-width-thickness-num);
|
||||
|
||||
@mixin border($col: $color-border) {
|
||||
border-width: $border-width-thickness;
|
||||
border-color: $col;
|
||||
}
|
||||
|
||||
@mixin border-top($col: $color-border) {
|
||||
border-top-width: $border-width-thickness;
|
||||
border-top-color: $col;
|
||||
}
|
||||
|
||||
@mixin border-bottom($col: $color-border) {
|
||||
border-bottom-width: $border-width-thickness;
|
||||
border-bottom-color: $col;
|
||||
}
|
||||
|
||||
@mixin inset-block($inset-amt) {
|
||||
position: absolute;
|
||||
top: $inset-amt;
|
||||
right: $inset-amt;
|
||||
bottom: $inset-amt;
|
||||
left: $inset-amt;
|
||||
}
|
||||
|
||||
// add this to a child of the container that needs a border.
|
||||
// parent must have `position: relative`
|
||||
@mixin inner-border-block($col: $color-border) {
|
||||
@include inset-block($border-width-thickness);
|
||||
@include border($col);
|
||||
display: block;
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
/* stylelint-disable color-no-hex, color-hex-length */
|
||||
|
||||
$color-background-1: Background1;
|
||||
$color-background-2: Background2;
|
||||
$color-background-3: Background3;
|
||||
$color-bg-overlay: BGOverlay;
|
||||
$color-modal-overlay: ModalOverlay;
|
||||
$color-bg-shadow: BGShadow;
|
||||
$color-bg-shadow-2: BGShadow2;
|
||||
$color-text: Text;
|
||||
$color-text-active: TextActive;
|
||||
$color-text-dim: TextDim;
|
||||
$color-text-inactive: TextInactive;
|
||||
$color-text-a5: TextA5;
|
||||
$color-text-a20: TextA20;
|
||||
$color-text-a30: TextA30;
|
||||
$color-text-a50: TextA50;
|
||||
$color-text-a80: TextA80;
|
||||
$color-primary: Primary;
|
||||
$color-primary-l: PrimaryL;
|
||||
$color-primary-d: PrimaryD;
|
||||
$color-primary-a5: PrimaryA5;
|
||||
$color-primary-a20: PrimaryA20;
|
||||
$color-primary-a30: PrimaryA30;
|
||||
$color-primary-a50: PrimaryA50;
|
||||
$color-primary-a80: PrimaryA80;
|
||||
$color-secondary: Secondary;
|
||||
$color-secondary-l: SecondaryL;
|
||||
$color-secondary-d: SecondaryD;
|
||||
$color-secondary-a5: SecondaryA5;
|
||||
$color-secondary-a20: SecondaryA20;
|
||||
$color-secondary-a30: SecondaryA30;
|
||||
$color-secondary-a50: SecondaryA50;
|
||||
$color-secondary-a80: SecondaryA80;
|
||||
$color-warning: Warning;
|
||||
$color-warning-l: WarningL;
|
||||
$color-warning-d: WarningD;
|
||||
$color-warning-a5: WarningA5;
|
||||
$color-warning-a20: WarningA20;
|
||||
$color-warning-a30: WarningA30;
|
||||
$color-warning-a50: WarningA50;
|
||||
$color-warning-a80: WarningA80;
|
||||
$color-danger: Danger;
|
||||
$color-danger-l: DangerL;
|
||||
$color-danger-d: DangerD;
|
||||
$color-danger-a5: DangerA5;
|
||||
$color-danger-a20: DangerA20;
|
||||
$color-danger-a30: DangerA30;
|
||||
$color-danger-a50: DangerA50;
|
||||
$color-danger-a80: DangerA80;
|
||||
$color-success: Success;
|
||||
$color-success-l: SuccessL;
|
||||
$color-success-d: SuccessD;
|
||||
$color-success-a5: SuccessA5;
|
||||
$color-success-a20: SuccessA20;
|
||||
$color-success-a30: SuccessA30;
|
||||
$color-success-a50: SuccessA50;
|
||||
$color-success-a80: SuccessA80;
|
||||
$color-border: Border;
|
||||
$color-border-soft: BorderSoft;
|
||||
$color-border-hard: BorderHard;
|
||||
$color-border-solid: BorderSolid;
|
||||
$color-transparent: Transparent;
|
||||
$color-a: A;
|
||||
$color-a-l: AL;
|
||||
$color-a-d: AD;
|
||||
$color-a-a5: AA5;
|
||||
$color-a-a20: AA20;
|
||||
$color-a-a30: AA30;
|
||||
$color-a-a50: AA50;
|
||||
$color-a-a80: AA80;
|
||||
$color-white: White;
|
||||
$color-white-a5: WhiteA5;
|
||||
$color-white-a20: WhiteA20;
|
||||
$color-white-a30: WhiteA30;
|
||||
$color-white-a50: WhiteA50;
|
||||
$color-white-a80: WhiteA80;
|
||||
$color-bw-05: BW05;
|
||||
$color-bw-10: BW10;
|
||||
$color-bw-25: BW25;
|
||||
$color-bw-50: BW50;
|
||||
$color-bw-75: BW75;
|
||||
$color-bw-90: BW90;
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
// Not supported yet, need to use decorator: gradient atm
|
||||
// $primary-lr-fade: linear-gradient(90deg, rgba($color-primary-l, 0.08) 0%, rgba($color-primary-l, 0.00) 100%);
|
||||
// $primary-rl-fade: linear-gradient(90deg, rgba($color-primary-l, 0.00) 0%, rgba($color-primary-l, 0.08) 100%);
|
||||
|
||||
// $primary-lr-fade: horizontal-gradient(#{$color-primary-d}14 #{$color-primary-l}00);
|
||||
// $primary-rl-fade: horizontal-gradient(#{$color-primary-d}00 #{$color-primary-l}14);
|
||||
$primary-lr-fade: horizontal-gradient(#ff000014 #ff000000);
|
||||
$primary-rl-fade: horizontal-gradient(#ff000000 #ff000014);
|
||||
@@ -0,0 +1,7 @@
|
||||
@use 'sass:math';
|
||||
|
||||
// $page-margin: 32;
|
||||
$page-margin: 64;
|
||||
$base-height: 1080;
|
||||
$base-modal-height: $base-height - ($page-margin * 2);
|
||||
$base-modal-max-width: math.div($base-modal-height * 16, 9);
|
||||
@@ -0,0 +1,3 @@
|
||||
// see: lib/RmlUi/Source/Core/PropertyParserAnimation.cpp
|
||||
$transition-quick: 0.05s linear-in-out;
|
||||
// $transition-quick: 0.033s linear-in-out;
|
||||
@@ -4,23 +4,40 @@
|
||||
entrypoint = 0x80000400
|
||||
# Paths are relative to the location of this config file.
|
||||
output_func_path = "RecompiledFuncs"
|
||||
symbols_file_path = "BanjoRecompSyms/bk.us.rev0.syms.toml"
|
||||
rom_file_path = "banjo.us.v10.decompressed.z64"
|
||||
symbols_file_path = "BanjoRecompSyms/bk.us.rev0.syms.toml"
|
||||
# elf_path = "banjo.us.v10.elf"
|
||||
# use_mdebug = true
|
||||
# trace_mode = true
|
||||
bss_section_suffix = "_bss"
|
||||
|
||||
manual_funcs = [
|
||||
{ name = "__n_CSPVoiceHandler", section = ".core1", vram = 0x8025E438, size = 0x684 },
|
||||
{ name = "boot___osLeoAbnormalResume", section = ".boot_bk_boot", vram = 0x800037E4, size = 0xE8 },
|
||||
{ name = "boot___osLeoResume", section = ".boot_bk_boot", vram = 0x800038CC, size = 0xEC },
|
||||
]
|
||||
|
||||
mdebug_file_mappings = [
|
||||
{ filename = "src/TTC/ch/clam.c", input_section = ".text", output_section = ".TTC" },
|
||||
{ filename = "src/TTC/ch/blubber.c", input_section = ".text", output_section = ".TTC" },
|
||||
{ filename = "src/TTC/ch/lockup.c", input_section = ".text", output_section = ".TTC" },
|
||||
{ filename = "src/TTC/ch/treasure.c", input_section = ".text", output_section = ".TTC" },
|
||||
{ filename = "src/SM/ch/attacktutorial.c", input_section = ".text", output_section = ".SM" },
|
||||
{ filename = "src/SM/ch/vegetables.c", input_section = ".text", output_section = ".SM" },
|
||||
]
|
||||
|
||||
[patches]
|
||||
stubs = [
|
||||
|
||||
ignored = [
|
||||
"boot_n_aspMainTextStart",
|
||||
"boot_gSPF3DEX_fifoTextStart",
|
||||
"boot_gSPL3DEX_fifoTextStart",
|
||||
]
|
||||
|
||||
renamed = [
|
||||
"wmemcpy"
|
||||
]
|
||||
|
||||
ignored = [
|
||||
stubs = [
|
||||
# Boot segment libultra duplicates
|
||||
"boot___ll_div",
|
||||
"boot___ll_lshift",
|
||||
@@ -32,7 +49,6 @@ ignored = [
|
||||
"boot___ull_divremi",
|
||||
"boot___ull_rem",
|
||||
"boot___ull_rshift",
|
||||
"boot___osInitialize_common",
|
||||
"boot_osPiRawStartDma",
|
||||
"boot_osPiGetStatus",
|
||||
"boot___osSetSR",
|
||||
|
||||
@@ -2,40 +2,62 @@
|
||||
#define __BANJO_CONFIG_H__
|
||||
|
||||
#include <filesystem>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include "ultramodern/config.hpp"
|
||||
#include "recomp_input.h"
|
||||
|
||||
namespace banjo {
|
||||
inline const std::u8string program_id = u8"BanjoRecompiled";
|
||||
inline const std::string program_name = "Banjo: Recompiled";
|
||||
|
||||
namespace configkeys {
|
||||
namespace general {
|
||||
inline const std::string camera_invert_mode = "camera_invert_mode";
|
||||
inline const std::string analog_cam_mode = "analog_cam_mode";
|
||||
inline const std::string analog_camera_invert_mode = "analog_camera_invert_mode";
|
||||
}
|
||||
|
||||
namespace sound {
|
||||
inline const std::string bgm_volume = "bgm_volume";
|
||||
}
|
||||
}
|
||||
constexpr std::u8string_view program_id = u8"BanjoRecompiled";
|
||||
constexpr std::string_view program_name = "Banjo: Recompiled";
|
||||
|
||||
// TODO: Move loading configs to the runtime once we have a way to allow per-project customization.
|
||||
void init_config();
|
||||
void load_config();
|
||||
void save_config();
|
||||
|
||||
void reset_input_bindings();
|
||||
void reset_cont_input_bindings();
|
||||
void reset_kb_input_bindings();
|
||||
void reset_single_input_binding(recomp::InputDevice device, recomp::GameInput input);
|
||||
|
||||
std::filesystem::path get_app_folder_path();
|
||||
|
||||
bool get_debug_mode_enabled();
|
||||
void set_debug_mode_enabled(bool enabled);
|
||||
|
||||
enum class CameraInvertMode {
|
||||
InvertNone,
|
||||
InvertX,
|
||||
InvertY,
|
||||
InvertBoth
|
||||
InvertBoth,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(banjo::CameraInvertMode, {
|
||||
{banjo::CameraInvertMode::InvertNone, "InvertNone"},
|
||||
{banjo::CameraInvertMode::InvertX, "InvertX"},
|
||||
{banjo::CameraInvertMode::InvertY, "InvertY"},
|
||||
{banjo::CameraInvertMode::InvertBoth, "InvertBoth"}
|
||||
});
|
||||
|
||||
CameraInvertMode get_camera_invert_mode();
|
||||
void set_camera_invert_mode(CameraInvertMode mode);
|
||||
|
||||
CameraInvertMode get_analog_camera_invert_mode();
|
||||
void set_analog_camera_invert_mode(CameraInvertMode mode);
|
||||
|
||||
bool get_analog_cam_mode();
|
||||
enum class AnalogCamMode {
|
||||
On,
|
||||
Off,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(banjo::AnalogCamMode, {
|
||||
{banjo::AnalogCamMode::On, "On"},
|
||||
{banjo::AnalogCamMode::Off, "Off"}
|
||||
});
|
||||
|
||||
AnalogCamMode get_analog_cam_mode();
|
||||
void set_analog_cam_mode(AnalogCamMode mode);
|
||||
|
||||
void open_quit_game_prompt();
|
||||
};
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "common/rt64_user_configuration.h"
|
||||
#include "ultramodern/renderer_context.hpp"
|
||||
#include "librecomp/config.hpp"
|
||||
#include "librecomp/mods.hpp"
|
||||
|
||||
namespace RT64 {
|
||||
@@ -28,7 +27,7 @@ namespace banjo {
|
||||
|
||||
void enable_instant_present() override;
|
||||
void send_dl(const OSTask *task) override;
|
||||
void update_screen(uint32_t vi_origin) override;
|
||||
void update_screen() override;
|
||||
void shutdown() override;
|
||||
uint32_t get_display_framerate() const override;
|
||||
float get_resolution_scale() const override;
|
||||
@@ -55,7 +54,7 @@ namespace banjo {
|
||||
|
||||
// Texture pack enable option. Must be an enum with two options.
|
||||
// The first option is treated as disabled and the second option is treated as enabled.
|
||||
bool is_texture_pack_enable_config_option(const recomp::config::ConfigOption& option, bool show_errors);
|
||||
bool is_texture_pack_enable_config_option(const recomp::mods::ConfigOption& option, bool show_errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
#define __BANJO_SOUND_H__
|
||||
|
||||
namespace banjo {
|
||||
void reset_sound_settings();
|
||||
void set_main_volume(int volume);
|
||||
int get_main_volume();
|
||||
void set_bgm_volume(int volume);
|
||||
int get_bgm_volume();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#define __RECOMP_DATA_H__
|
||||
|
||||
namespace recomputil {
|
||||
void init_extended_actor_data();
|
||||
void reset_actor_data();
|
||||
void init_extended_object_data(size_t num_types);
|
||||
void clear_all_object_data(size_t type_index);
|
||||
|
||||
void register_data_api_exports();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
#ifndef __RECOMP_INPUT_H__
|
||||
#define __RECOMP_INPUT_H__
|
||||
|
||||
#include <cstdint>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
#include <type_traits>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "ultramodern/input.hpp"
|
||||
|
||||
#include "json/json.hpp"
|
||||
|
||||
namespace recomp {
|
||||
// x-macros to build input enums and arrays.
|
||||
// First parameter is the enum name, second parameter is the bit field for the input (or 0 if there is no associated one), third is the readable name.
|
||||
// TODO refactor this to allow projects to rename these, or get rid of the readable name and leave that up to individual projects to map.
|
||||
#define DEFINE_N64_BUTTON_INPUTS() \
|
||||
DEFINE_INPUT(A, 0x8000, "A") \
|
||||
DEFINE_INPUT(B, 0x4000, "B") \
|
||||
DEFINE_INPUT(Z, 0x2000, "Z") \
|
||||
DEFINE_INPUT(START, 0x1000, "Start") \
|
||||
DEFINE_INPUT(L, 0x0020, "L") \
|
||||
DEFINE_INPUT(R, 0x0010, "R") \
|
||||
DEFINE_INPUT(C_UP, 0x0008, "C Up") \
|
||||
DEFINE_INPUT(C_LEFT, 0x0002, "C Left") \
|
||||
DEFINE_INPUT(C_DOWN, 0x0004, "C Down") \
|
||||
DEFINE_INPUT(C_RIGHT, 0x0001, "C Right") \
|
||||
DEFINE_INPUT(DPAD_UP, 0x0800, "D Pad Down") \
|
||||
DEFINE_INPUT(DPAD_RIGHT, 0x0100, "D-Pad Down") \
|
||||
DEFINE_INPUT(DPAD_DOWN, 0x0400, "D-Pad Down") \
|
||||
DEFINE_INPUT(DPAD_LEFT, 0x0200, "D-Pad Down")
|
||||
|
||||
#define DEFINE_N64_AXIS_INPUTS() \
|
||||
DEFINE_INPUT(Y_AXIS_POS, 0, "Up") \
|
||||
DEFINE_INPUT(Y_AXIS_NEG, 0, "Down") \
|
||||
DEFINE_INPUT(X_AXIS_NEG, 0, "Left") \
|
||||
DEFINE_INPUT(X_AXIS_POS, 0, "Right") \
|
||||
|
||||
#define DEFINE_RECOMP_UI_INPUTS() \
|
||||
DEFINE_INPUT(TOGGLE_MENU, 0, "Toggle Menu") \
|
||||
DEFINE_INPUT(ACCEPT_MENU, 0, "Accept (Menu)") \
|
||||
DEFINE_INPUT(APPLY_MENU, 0, "Apply (Menu)")
|
||||
|
||||
#define DEFINE_ALL_INPUTS() \
|
||||
DEFINE_N64_BUTTON_INPUTS() \
|
||||
DEFINE_N64_AXIS_INPUTS() \
|
||||
DEFINE_RECOMP_UI_INPUTS()
|
||||
|
||||
// Enum containing every recomp input.
|
||||
#define DEFINE_INPUT(name, value, readable) name,
|
||||
enum class GameInput {
|
||||
DEFINE_ALL_INPUTS()
|
||||
|
||||
COUNT,
|
||||
N64_BUTTON_START = A,
|
||||
N64_BUTTON_COUNT = C_RIGHT - N64_BUTTON_START + 1,
|
||||
N64_AXIS_START = X_AXIS_NEG,
|
||||
N64_AXIS_COUNT = Y_AXIS_POS - N64_AXIS_START + 1,
|
||||
};
|
||||
#undef DEFINE_INPUT
|
||||
|
||||
struct InputField {
|
||||
uint32_t input_type;
|
||||
int32_t input_id;
|
||||
std::string to_string() const;
|
||||
auto operator<=>(const InputField& rhs) const = default;
|
||||
};
|
||||
|
||||
void poll_inputs();
|
||||
float get_input_analog(const InputField& field);
|
||||
float get_input_analog(const std::span<const recomp::InputField> fields);
|
||||
bool get_input_digital(const InputField& field);
|
||||
bool get_input_digital(const std::span<const recomp::InputField> fields);
|
||||
void get_gyro_deltas(float* x, float* y);
|
||||
void get_mouse_deltas(float* x, float* y);
|
||||
void get_right_analog(float* x, float* y);
|
||||
|
||||
enum class InputDevice {
|
||||
Controller,
|
||||
Keyboard,
|
||||
COUNT
|
||||
};
|
||||
|
||||
void start_scanning_input(InputDevice device);
|
||||
void stop_scanning_input();
|
||||
void finish_scanning_input(InputField scanned_field);
|
||||
void cancel_scanning_input();
|
||||
void config_menu_set_cont_or_kb(bool cont_interacted);
|
||||
InputField get_scanned_input();
|
||||
int get_scanned_input_index();
|
||||
|
||||
struct DefaultN64Mappings {
|
||||
std::vector<InputField> a;
|
||||
std::vector<InputField> b;
|
||||
std::vector<InputField> l;
|
||||
std::vector<InputField> r;
|
||||
std::vector<InputField> z;
|
||||
std::vector<InputField> start;
|
||||
|
||||
std::vector<InputField> c_left;
|
||||
std::vector<InputField> c_right;
|
||||
std::vector<InputField> c_up;
|
||||
std::vector<InputField> c_down;
|
||||
|
||||
std::vector<InputField> dpad_left;
|
||||
std::vector<InputField> dpad_right;
|
||||
std::vector<InputField> dpad_up;
|
||||
std::vector<InputField> dpad_down;
|
||||
|
||||
std::vector<InputField> analog_left;
|
||||
std::vector<InputField> analog_right;
|
||||
std::vector<InputField> analog_up;
|
||||
std::vector<InputField> analog_down;
|
||||
|
||||
std::vector<InputField> toggle_menu;
|
||||
std::vector<InputField> accept_menu;
|
||||
std::vector<InputField> apply_menu;
|
||||
};
|
||||
|
||||
inline const std::vector<InputField>& get_default_mapping_for_input(const DefaultN64Mappings& defaults, const GameInput input) {
|
||||
static const std::vector<InputField> empty_input_field{};
|
||||
switch (input) {
|
||||
case GameInput::A: return defaults.a;
|
||||
case GameInput::B: return defaults.b;
|
||||
case GameInput::L: return defaults.l;
|
||||
case GameInput::R: return defaults.r;
|
||||
case GameInput::Z: return defaults.z;
|
||||
case GameInput::START: return defaults.start;
|
||||
case GameInput::C_LEFT: return defaults.c_left;
|
||||
case GameInput::C_RIGHT: return defaults.c_right;
|
||||
case GameInput::C_UP: return defaults.c_up;
|
||||
case GameInput::C_DOWN: return defaults.c_down;
|
||||
case GameInput::DPAD_LEFT: return defaults.dpad_left;
|
||||
case GameInput::DPAD_RIGHT: return defaults.dpad_right;
|
||||
case GameInput::DPAD_UP: return defaults.dpad_up;
|
||||
case GameInput::DPAD_DOWN: return defaults.dpad_down;
|
||||
case GameInput::X_AXIS_NEG: return defaults.analog_left;
|
||||
case GameInput::X_AXIS_POS: return defaults.analog_right;
|
||||
case GameInput::Y_AXIS_POS: return defaults.analog_up;
|
||||
case GameInput::Y_AXIS_NEG: return defaults.analog_down;
|
||||
case GameInput::TOGGLE_MENU: return defaults.toggle_menu;
|
||||
case GameInput::ACCEPT_MENU: return defaults.accept_menu;
|
||||
case GameInput::APPLY_MENU: return defaults.apply_menu;
|
||||
default: return empty_input_field;
|
||||
}
|
||||
}
|
||||
|
||||
extern const DefaultN64Mappings default_n64_keyboard_mappings;
|
||||
extern const DefaultN64Mappings default_n64_controller_mappings;
|
||||
|
||||
constexpr size_t bindings_per_input = 2;
|
||||
|
||||
size_t get_num_inputs();
|
||||
const std::string& get_input_name(GameInput input);
|
||||
const std::string& get_input_enum_name(GameInput input);
|
||||
GameInput get_input_from_enum_name(const std::string_view name);
|
||||
InputField& get_input_binding(GameInput input, size_t binding_index, InputDevice device);
|
||||
void set_input_binding(GameInput input, size_t binding_index, InputDevice device, InputField value);
|
||||
|
||||
bool get_n64_input(int controller_num, uint16_t* buttons_out, float* x_out, float* y_out);
|
||||
void set_rumble(int controller_num, bool);
|
||||
void update_rumble();
|
||||
void handle_events();
|
||||
|
||||
ultramodern::input::connected_device_info_t get_connected_device_info(int controller_num);
|
||||
|
||||
// Rumble strength ranges from 0 to 100.
|
||||
int get_rumble_strength();
|
||||
void set_rumble_strength(int strength);
|
||||
|
||||
// Gyro and mouse sensitivities range from 0 to 100.
|
||||
int get_gyro_sensitivity();
|
||||
int get_mouse_sensitivity();
|
||||
int get_joystick_deadzone();
|
||||
void set_gyro_sensitivity(int strength);
|
||||
void set_mouse_sensitivity(int strength);
|
||||
void set_joystick_deadzone(int strength);
|
||||
void apply_joystick_deadzone(float x_in, float y_in, float* x_out, float* y_out);
|
||||
void set_right_analog_suppressed(bool suppressed);
|
||||
|
||||
enum class BackgroundInputMode {
|
||||
On,
|
||||
Off,
|
||||
OptionCount
|
||||
};
|
||||
|
||||
NLOHMANN_JSON_SERIALIZE_ENUM(recomp::BackgroundInputMode, {
|
||||
{recomp::BackgroundInputMode::On, "On"},
|
||||
{recomp::BackgroundInputMode::Off, "Off"}
|
||||
});
|
||||
|
||||
BackgroundInputMode get_background_input_mode();
|
||||
void set_background_input_mode(BackgroundInputMode mode);
|
||||
|
||||
bool game_input_disabled();
|
||||
bool all_input_disabled();
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,138 @@
|
||||
#ifndef __RECOMP_UI__
|
||||
#define __RECOMP_UI__
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <list>
|
||||
|
||||
// TODO move this file into src/ui
|
||||
|
||||
#include "SDL.h"
|
||||
#include "RmlUi/Core.h"
|
||||
|
||||
#include "../src/ui/util/hsv.h"
|
||||
#include "../src/ui/util/bem.h"
|
||||
#include "../src/ui/elements/ui_button.h"
|
||||
#include "../src/ui/elements/ui_theme.h"
|
||||
|
||||
#include "../src/ui/core/ui_context.h"
|
||||
|
||||
namespace Rml {
|
||||
class ElementDocument;
|
||||
class EventListenerInstancer;
|
||||
class Context;
|
||||
class Event;
|
||||
}
|
||||
|
||||
namespace recompui {
|
||||
class UiEventListenerInstancer;
|
||||
|
||||
// TODO remove this once the UI has been ported over to the new system.
|
||||
class MenuController {
|
||||
public:
|
||||
virtual ~MenuController() {}
|
||||
virtual void load_document() = 0;
|
||||
virtual void register_events(UiEventListenerInstancer& listener) = 0;
|
||||
virtual void make_bindings(Rml::Context* context) = 0;
|
||||
};
|
||||
|
||||
std::unique_ptr<MenuController> create_launcher_menu();
|
||||
std::unique_ptr<MenuController> create_config_menu();
|
||||
|
||||
using event_handler_t = void(const std::string& param, Rml::Event&);
|
||||
|
||||
void queue_event(const SDL_Event& event);
|
||||
bool try_deque_event(SDL_Event& out);
|
||||
|
||||
std::unique_ptr<UiEventListenerInstancer> make_event_listener_instancer();
|
||||
void register_event(UiEventListenerInstancer& listener, const std::string& name, event_handler_t* handler);
|
||||
|
||||
void show_context(ContextId context, std::string_view param);
|
||||
void hide_context(ContextId context);
|
||||
void hide_all_contexts();
|
||||
bool is_context_shown(ContextId context);
|
||||
bool is_context_capturing_input();
|
||||
bool is_context_capturing_mouse();
|
||||
bool is_any_context_shown();
|
||||
ContextId try_close_current_context();
|
||||
|
||||
ContextId get_launcher_context_id();
|
||||
ContextId get_config_context_id();
|
||||
ContextId get_config_sub_menu_context_id();
|
||||
|
||||
enum class ConfigTab {
|
||||
General,
|
||||
Controls,
|
||||
Graphics,
|
||||
Sound,
|
||||
Mods,
|
||||
Debug,
|
||||
};
|
||||
|
||||
void set_config_tab(ConfigTab tab);
|
||||
int config_tab_to_index(ConfigTab tab);
|
||||
Rml::ElementTabSet* get_config_tabset();
|
||||
Rml::Element* get_mod_tab();
|
||||
void set_config_tabset_mod_nav();
|
||||
void focus_mod_configure_button();
|
||||
|
||||
void init_styling(const std::filesystem::path& rcss_file);
|
||||
void init_prompt_context();
|
||||
void open_choice_prompt(
|
||||
const std::string& header_text,
|
||||
const std::string& content_text,
|
||||
const std::string& confirm_label_text,
|
||||
const std::string& cancel_label_text,
|
||||
std::function<void()> confirm_action,
|
||||
std::function<void()> cancel_action,
|
||||
ButtonStyle confirm_variant = ButtonStyle::Success,
|
||||
ButtonStyle cancel_variant = ButtonStyle::Danger,
|
||||
bool focus_on_cancel = true,
|
||||
const std::string& return_element_id = ""
|
||||
);
|
||||
void open_info_prompt(
|
||||
const std::string& header_text,
|
||||
const std::string& content_text,
|
||||
const std::string& okay_label_text,
|
||||
std::function<void()> okay_action,
|
||||
ButtonStyle okay_variant = ButtonStyle::Danger,
|
||||
const std::string& return_element_id = ""
|
||||
);
|
||||
void open_notification(
|
||||
const std::string& header_text,
|
||||
const std::string& content_text,
|
||||
const std::string& return_element_id = ""
|
||||
);
|
||||
void close_prompt();
|
||||
bool is_prompt_open();
|
||||
void update_mod_list(bool scan_mods = true);
|
||||
void process_game_started();
|
||||
|
||||
void apply_color_hack();
|
||||
void get_window_size(int& width, int& height);
|
||||
void set_cursor_visible(bool visible);
|
||||
void update_supported_options();
|
||||
void toggle_fullscreen();
|
||||
|
||||
bool get_cont_active(void);
|
||||
void set_cont_active(bool active);
|
||||
void activate_mouse();
|
||||
|
||||
void message_box(const char* msg);
|
||||
|
||||
void set_render_hooks();
|
||||
|
||||
Rml::ElementPtr create_custom_element(Rml::Element* parent, std::string tag);
|
||||
Rml::ElementDocument* load_document(const std::filesystem::path& path);
|
||||
Rml::ElementDocument* create_empty_document();
|
||||
Rml::Element* get_child_by_tag(Rml::Element* parent, const std::string& tag);
|
||||
|
||||
void queue_image_from_bytes_rgba32(const std::string &src, const std::vector<char> &bytes, uint32_t width, uint32_t height);
|
||||
void queue_image_from_bytes_file(const std::string &src, const std::vector<char> &bytes);
|
||||
void release_image(const std::string &src);
|
||||
|
||||
void drop_files(const std::list<std::filesystem::path> &file_list);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -7,7 +7,8 @@
|
||||
"project": "CMakeLists.txt",
|
||||
"projectTarget": "BanjoRecompiled.exe",
|
||||
"name": "BanjoRecompiled.exe",
|
||||
"currentDir": "${workspaceRoot}"
|
||||
"currentDir": "${workspaceRoot}",
|
||||
"args": ["--show-console"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,257 @@
|
||||
This file is originally from the repo: https://github.com/SergeyMakeev/SlotMap
|
||||
|
||||
The original license and README are as follows:
|
||||
```
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Sergey Makeev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
```
|
||||
# Slot Map
|
||||
|
||||
[](https://github.com/SergeyMakeev/slot_map/actions)
|
||||
[](https://ci.appveyor.com/project/SergeyMakeev/slot-map)
|
||||
[](https://codecov.io/gh/SergeyMakeev/slot_map)
|
||||

|
||||
|
||||
A Slot Map is a high-performance associative container with persistent unique keys to access stored values. Upon insertion, a key is returned that can be used to later access or remove the values. Insertion, removal, and access are all guaranteed to take `O(1)` time (best, worst, and average case)
|
||||
Great for storing collections of objects that need stable, safe references but have no clear ownership.
|
||||
|
||||
The difference between a `std::unordered_map` and a `dod::slot_map` is that the slot map generates and returns the key when inserting a value. A key is always unique and will only refer to the value that was inserted.
|
||||
|
||||
Usage example:
|
||||
```cpp
|
||||
slot_map<std::string> strings;
|
||||
auto red = strings.emplace("Red");
|
||||
auto green = strings.emplace("Green");
|
||||
auto blue = strings.emplace("Blue");
|
||||
|
||||
const std::string* val1 = strings.get(red);
|
||||
if (val1)
|
||||
{
|
||||
printf("red = '%s'\n", val1->c_str());
|
||||
}
|
||||
|
||||
strings.erase(green);
|
||||
printf("%d\n", strings.has(green));
|
||||
printf("%d\n", strings.has(blue));
|
||||
```
|
||||
|
||||
Output:
|
||||
```
|
||||
red = 'Red'
|
||||
0
|
||||
1
|
||||
```
|
||||
|
||||
# Implementation details
|
||||
|
||||
The slot map container will allocate memory in pages (default page size = 4096 elements) to avoid memory spikes during growth and be able to deallocate pages that are no longer needed.
|
||||
Also, the page-based memory allocator is very important since it guarantees "pointers stability"; hence, we never move values in memory.
|
||||
|
||||
|
||||
Keys are always uses `uint64_t/uint32_t` (configurable) and technically typless, but we "artificially" make them typed to get a few extra compile-time checks.
|
||||
i.e., the following code will produce a compiler error
|
||||
```cpp
|
||||
slot_map<std::string> strings;
|
||||
slot_map<int> numbers;
|
||||
slot_map<int>::key numKey = numbers.emplace(3);
|
||||
const std::string* value = strings.get(numKey); // <---- can not use slot_map<int>::key to index slot_map<std::string> !
|
||||
```
|
||||
|
||||
The keys can be converted to/from their numeric types if you do not need additional type checks.
|
||||
```cpp
|
||||
slot_map<int> numbers;
|
||||
slot_map<int>::key numKey = numbers.emplace(3);
|
||||
uint64_t rawKey = numKey; // convert to numeric type (like cast pointer to void*)
|
||||
...
|
||||
slot_map<int>::key numKey2{rawKey}; // create key from numeric type
|
||||
```
|
||||
|
||||
When a slot is reused, its version is automatically incremented (to invalidate all existing keys that refers to the same slot).
|
||||
But since we only use 20-bits *(10-bits for 32 bit keys)* for version counter, there is a possibility that the version counter will wrap around,
|
||||
and a new item will get the same key as a removed item.
|
||||
|
||||
To mitigate this potential issue, once the version counter overflows, we disable that slot so that no new keys are returned for this slot
|
||||
(this gives us a guarantee that there are no key collisions)
|
||||
|
||||
To prevent version overflow from happening too often, we need to ensure that we don't reuse the same slot too often.
|
||||
So we do not reuse recently freed slot-indices as long as their number is below a certain threshold (`kMinFreeIndices = 64`).
|
||||
|
||||
Keys also can carry a few extra bits of information provided by a user that we called `tag`.
|
||||
That might be handy to add application-specific data to keys.
|
||||
|
||||
For example:
|
||||
```cpp
|
||||
slot_map<std::string> strings;
|
||||
auto red = strings.emplace("Red");
|
||||
red.set_tag(13);
|
||||
|
||||
auto tag = red.get_tag();
|
||||
assert(tag == 13);
|
||||
```
|
||||
|
||||
Here is how a key structure looks like internally
|
||||
|
||||
64-bit key type
|
||||
|
||||
| Component | Number of bits |
|
||||
| ---------------|------------------------|
|
||||
| tag | 12 |
|
||||
| version | 20 (0..1,048,575 |
|
||||
| index | 32 (0..4,294,967,295) |
|
||||
|
||||
32-bit key type
|
||||
|
||||
| Component | Number of bits |
|
||||
| ---------------|---------------------|
|
||||
| tag | 2 |
|
||||
| version | 10 (0..1023) |
|
||||
| index | 20 (0..1,048,575) |
|
||||
|
||||
Note: To use your custom memory allocator define `SLOT_MAP_ALLOC`/`SLOT_MAP_FREE` before including `"slot_map.h"`
|
||||
|
||||
```cpp
|
||||
#define SLOT_MAP_ALLOC(sizeInBytes, alignment) aligned_alloc(alignment, sizeInBytes)
|
||||
#define SLOT_MAP_FREE(ptr) free(ptr)
|
||||
#include "slot_map.h"
|
||||
```
|
||||
|
||||
|
||||
# API
|
||||
|
||||
`bool has_key(key k) const noexcept`
|
||||
Returns true if the slot map contains a specific key
|
||||
|
||||
`void reset()`
|
||||
Clears the slot map and releases any allocated memory.
|
||||
Note: By calling this function, you must guarantee that no handles are in use!
|
||||
Otherwise calling this function might be dangerous and lead to key "collisions".
|
||||
You might consider using "clear()" instead.
|
||||
|
||||
`void clear()`
|
||||
Clears the slot map but keeps the allocated memory for reuse.
|
||||
Automatically increases version for all the removed elements (the same as calling "erase()" for all existing elements)
|
||||
|
||||
`const T* get(key k) const noexcept`
|
||||
If key exists returns a const pointer to the value corresponding to the given key or returns null elsewere.
|
||||
|
||||
`T* get(key k)`
|
||||
If key exists returns a pointer to the value corresponding to the given key or returns null elsewere.
|
||||
|
||||
`key emplace(Args&&... args)`
|
||||
Constructs element in-place and returns a unique key that can be used to access this value.
|
||||
|
||||
`void erase(key k)`
|
||||
Removes element (if such key exists) from the slot map.
|
||||
|
||||
`std::optional<T> pop(key k)`
|
||||
Removes element (if such key exists) from the slot map, returning the value at the key if the key was not previously removed.
|
||||
|
||||
`bool empty() const noexcept`
|
||||
Returns true if the slot map is empty.
|
||||
|
||||
`size_type size() const noexcept`
|
||||
Returns the number of elements in the slot map.
|
||||
|
||||
`void swap(slot_map& other) noexcept`
|
||||
Exchanges the content of the slot map by the content of another slot map object of the same type.
|
||||
|
||||
`slot_map(const slot_map& other)`
|
||||
Copy constructor
|
||||
|
||||
`slot_map& operator=(const slot_map& other)`
|
||||
Copy assignment
|
||||
|
||||
`slot_map(slot_map&& other) noexcept`
|
||||
Move constructor
|
||||
|
||||
`slot_map& operator=(slot_map&& other) noexcept`
|
||||
Move asignment
|
||||
|
||||
|
||||
`const_values_iterator begin() const noexcept`
|
||||
`const_values_iterator end() const noexcept`
|
||||
Const values iterator
|
||||
|
||||
```cpp
|
||||
for (const auto& value : slotMap)
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
`Items items() const noexcept`
|
||||
Const key/value iterator
|
||||
|
||||
```cpp
|
||||
for (const auto& [key, value] : slotMap.items())
|
||||
{
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
# References
|
||||
|
||||
Sean Middleditch
|
||||
Data Structures for Game Developers: The Slot Map, 2013
|
||||
https://web.archive.org/web/20180121142549/http://seanmiddleditch.com/data-structures-for-game-developers-the-slot-map/
|
||||
|
||||
Niklas Gray
|
||||
Building a Data-Oriented Entity System (part 1), 2014
|
||||
http://bitsquid.blogspot.com/2014/08/building-data-oriented-entity-system.html
|
||||
|
||||
Noel Llopis
|
||||
Managing Data Relationships, 2010
|
||||
https://gamesfromwithin.com/managing-data-relationships
|
||||
|
||||
Stefan Reinalter
|
||||
Adventures in data-oriented design - Part 3c: External References, 2013
|
||||
https://blog.molecular-matters.com/2013/07/24/adventures-in-data-oriented-design-part-3c-external-references/
|
||||
|
||||
Niklas Gray
|
||||
Managing Decoupling Part 4 - The ID Lookup Table, 2011
|
||||
https://bitsquid.blogspot.com/2011/09/managing-decoupling-part-4-id-lookup.html
|
||||
|
||||
Sander Mertens
|
||||
Making the most of ECS identifiers, 2020
|
||||
https://ajmmertens.medium.com/doing-a-lot-with-a-little-ecs-identifiers-25a72bd2647
|
||||
|
||||
Michele Caini
|
||||
ECS back and forth. Part 9 - Sparse sets and EnTT, 2020
|
||||
https://skypjack.github.io/2020-08-02-ecs-baf-part-9/
|
||||
|
||||
Andre Weissflog
|
||||
Handles are the better pointers, 2018
|
||||
https://floooh.github.io/2018/06/17/handles-vs-pointers.html
|
||||
|
||||
Allan Deutsch
|
||||
C++Now 2017: "The Slot Map Data Structure", 2017
|
||||
https://www.youtube.com/watch?v=SHaAR7XPtNU
|
||||
|
||||
Jeff Gates
|
||||
Init, Update, Draw - Data Arrays, 2012
|
||||
https://greysphere.tumblr.com/post/31601463396/data-arrays
|
||||
|
||||
Niklas Gray
|
||||
Data Structures Part 1: Bulk Data, 2019
|
||||
https://ourmachinery.com/post/data-structures-part-1-bulk-data/
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ single_file_output = true
|
||||
use_absolute_symbols = true
|
||||
# Point the recompiler at the symbol files so that it can resolve relocations during recompilation.
|
||||
func_reference_syms_file = "BanjoRecompSyms/bk.us.rev0.syms.toml"
|
||||
data_reference_syms_files = [ "BanjoRecompSyms/bk.us.rev0.datasyms.toml", "BanjoRecompSyms/bk.us.rev0.datasyms_static.toml" ]
|
||||
data_reference_syms_files = [ "BanjoRecompSyms/bk.us.rev0.datasyms.toml" ]
|
||||
# Tell the recompiler to write the output binary. Doing this instead of using objcopy allows the recompiler to patch MIPS32 relocs.
|
||||
output_binary_path = "patches/patches.bin"
|
||||
# Do not emit warnings for unpaired LO16 values, as clang produces many of them.
|
||||
|
||||
@@ -6,7 +6,7 @@ LD ?= ld.lld
|
||||
GBI_DEFINE := -DF3DEX_GBI
|
||||
CFLAGS := -target mips -mips2 -mabi=32 -O2 -G0 -mno-abicalls -mno-odd-spreg -mno-check-zero-division \
|
||||
-fomit-frame-pointer -ffast-math -fno-unsafe-math-optimizations -fno-builtin-memset \
|
||||
-Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces -Wno-unsupported-floating-point-opt
|
||||
-Wall -Wextra -Wno-incompatible-library-redeclaration -Wno-unused-parameter -Wno-unknown-pragmas -Wno-unused-variable -Wno-missing-braces -Wno-unsupported-floating-point-opt -Wno-cast-function-type-mismatch
|
||||
CPPFLAGS := -nostdinc -D_LANGUAGE_C -DMIPS -I ../lib/bk-decomp/include -I ../lib/bk-decomp/include/2.0L -I ../lib/bk-decomp/include/2.0L/PR -I../lib/rt64/include $(GBI_DEFINE)
|
||||
LDFLAGS := -nostdlib -T patches.ld -T syms.ld -Map patches.map --unresolved-symbols=ignore-all --emit-relocs
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef __MEM_FUNCS_H__
|
||||
#define __MEM_FUNCS_H__
|
||||
|
||||
#include "patch_helpers.h"
|
||||
|
||||
DECLARE_FUNC(u32, recomp_register_actor_extension, u32 actor_type, u32 size);
|
||||
DECLARE_FUNC(u32, recomp_register_actor_extension_generic, u32 size);
|
||||
DECLARE_FUNC(void, recomp_clear_all_actor_data);
|
||||
DECLARE_FUNC(u32, recomp_create_actor_data, u32 actor_type);
|
||||
DECLARE_FUNC(void, recomp_destroy_actor_data, u32 actor_handle);
|
||||
DECLARE_FUNC(void*, recomp_get_actor_data, u32 actor_handle, u32 extension_handle, u32 actor_type);
|
||||
DECLARE_FUNC(u32, recomp_get_actor_spawn_index, u32 actor_handle);
|
||||
|
||||
#endif
|
||||
@@ -1,379 +0,0 @@
|
||||
#include "patches.h"
|
||||
#include "prop.h"
|
||||
#include "actor.h"
|
||||
#include "functions.h"
|
||||
#include "mem_funcs.h"
|
||||
#include "bk_api.h"
|
||||
|
||||
extern ActorArray *suBaddieActorArray;
|
||||
extern Actor *suLastBaddie;
|
||||
|
||||
void func_803255FC(Actor *this);
|
||||
void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2);
|
||||
s32 func_80326C18(void);
|
||||
void func_8032FFD4(ActorMarker *this, s32 arg1);
|
||||
void marker_setModelId(ActorMarker *this, enum asset_e modelIndex);
|
||||
s32 func_80306DDC(s32 *position);
|
||||
s32 func_80307258(f32 arg0[3], s32 arg1, s32 arg2);
|
||||
struct5Bs *func_8034A2C8(void);
|
||||
void func_8033F738(ActorMarker *arg0);
|
||||
void func_8034BFF8(ActorMarker *marker);
|
||||
Struct83s *func_803406B0(void);
|
||||
|
||||
// @recomp Patched to create extension data for the actor.
|
||||
RECOMP_PATCH Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){
|
||||
ActorAnimationInfo * sp54;
|
||||
s32 i;
|
||||
f32 sp44[3];
|
||||
|
||||
if(suBaddieActorArray == NULL){
|
||||
// @recomp Reset actor data when suBaddieActorArray is initially allocated.
|
||||
recomp_clear_all_actor_data();
|
||||
suBaddieActorArray = (ActorArray *)malloc(sizeof(ActorArray) + 20*sizeof(Actor));
|
||||
suBaddieActorArray->cnt = 0;
|
||||
suBaddieActorArray->max_cnt = 20;
|
||||
}
|
||||
|
||||
if(suBaddieActorArray->cnt + 1 > suBaddieActorArray->max_cnt){
|
||||
suBaddieActorArray->max_cnt = suBaddieActorArray->cnt + 5;
|
||||
suBaddieActorArray = (ActorArray *)realloc(suBaddieActorArray, sizeof(ActorArray) + suBaddieActorArray->max_cnt*sizeof(Actor));
|
||||
}
|
||||
|
||||
++suBaddieActorArray->cnt;
|
||||
suLastBaddie = &suBaddieActorArray->data[suBaddieActorArray->cnt - 1];
|
||||
|
||||
suLastBaddie->actor_info = actorInfo;
|
||||
suLastBaddie->unk10_25 = 0;
|
||||
suLastBaddie->unk10_18 = 0;
|
||||
suLastBaddie->state = actorInfo->startAnimation;
|
||||
suLastBaddie->position_x = (f32)position[0];
|
||||
suLastBaddie->position_y = (f32)position[1];
|
||||
suLastBaddie->position_z = (f32)position[2];
|
||||
suLastBaddie->unkF4_8 = 0;
|
||||
suLastBaddie->yaw = (f32) yaw;
|
||||
suLastBaddie->yaw_ideal = (f32) yaw;
|
||||
suLastBaddie->pitch = 0.0f;
|
||||
suLastBaddie->roll = 0.0f;
|
||||
suLastBaddie->unk6C = 0.0f;
|
||||
suLastBaddie->actor_specific_1_f = 0.0f;
|
||||
suLastBaddie->unk10_12 = 0;
|
||||
suLastBaddie->unk38_0 = 0;
|
||||
suLastBaddie->unk38_31 = 0;
|
||||
suLastBaddie->unk58_0 = 1;
|
||||
suLastBaddie->unk40 = 0;
|
||||
suLastBaddie->unk44_31 = 0;
|
||||
suLastBaddie->despawn_flag = 0;
|
||||
suLastBaddie->unk44_14 = -1;
|
||||
suLastBaddie->unk48 = 0.0f;
|
||||
suLastBaddie->unk4C = 100.0f;
|
||||
suLastBaddie->unk10_1 = 1;
|
||||
suLastBaddie->unkF4_30 = 0;
|
||||
suLastBaddie->unkF4_29 = 0;
|
||||
suLastBaddie->scale = 1.0f;
|
||||
suLastBaddie->unk124_7 = 0;
|
||||
suLastBaddie->unk124_6 = 1;
|
||||
suLastBaddie->modelCacheIndex = actorInfo->actorId;
|
||||
suLastBaddie->unk44_2 = func_80326C18();
|
||||
suLastBaddie->marker = marker_init(position, actorInfo->draw_func, (asset_getFlag(actorInfo->modelId) == 1) ? 0 : 1, actorInfo->markerId, (flags & 0x400) ? 1 : 0);
|
||||
suLastBaddie->marker->unk3E_0 = 1;
|
||||
suLastBaddie->unk138_28 = 1;
|
||||
suLastBaddie->unk10_3 = -1;
|
||||
suLastBaddie->unk10_4 = 0;
|
||||
suLastBaddie->unk10_8 = 0;
|
||||
suLastBaddie->unk10_7 = 0;
|
||||
suLastBaddie->unk10_6 = 0;
|
||||
suLastBaddie->unk54 = 0.0f;
|
||||
suLastBaddie->anctrl_asset_id = 0;
|
||||
suLastBaddie->unk5C = 0.0f;
|
||||
suLastBaddie->unkF4_31 = 0;
|
||||
suLastBaddie->unk138_30 = 0;
|
||||
suLastBaddie->unk138_3 = 0;
|
||||
suLastBaddie->unk38_21 = 0;
|
||||
suLastBaddie->unk38_13 = 0;
|
||||
suLastBaddie->unk78_22 = 0;
|
||||
suLastBaddie->unk78_31 = 0;
|
||||
suLastBaddie->unk74 = 0.0f;
|
||||
suLastBaddie->unk70 = 0.0f;
|
||||
suLastBaddie->unkF4_24 = 0;
|
||||
suLastBaddie->unk140 = 0.0f;
|
||||
suLastBaddie->unk144 = 0.0f;
|
||||
suLastBaddie->unk44_1 = 0;
|
||||
suLastBaddie->unk44_0 = 0;
|
||||
suLastBaddie->initialized = FALSE;
|
||||
suLastBaddie->volatile_initialized = FALSE;
|
||||
suLastBaddie->lifetime_value = 0.0f;
|
||||
suLastBaddie->is_bundle = FALSE;
|
||||
suLastBaddie->unk104 = NULL;
|
||||
suLastBaddie->unk100 = NULL;
|
||||
suLastBaddie->unk158[0] = NULL;
|
||||
suLastBaddie->unk158[1] = NULL;
|
||||
suLastBaddie->unk78_13 = 0;
|
||||
suLastBaddie->unk124_31 = 0;
|
||||
suLastBaddie->unkF4_20 = 0;
|
||||
suLastBaddie->sound_timer = 0.0f;
|
||||
func_8032FFD4(suLastBaddie->marker, suBaddieActorArray->cnt - 1);
|
||||
marker_setModelId(suLastBaddie->marker, actorInfo->modelId);
|
||||
marker_setActorUpdateFunc(suLastBaddie->marker, actorInfo->update_func);
|
||||
marker_setActorUpdate2Func(suLastBaddie->marker, actorInfo->update2_func);
|
||||
ml_vec3f_clear(suLastBaddie->unk1C);
|
||||
ml_vec3f_clear(suLastBaddie->velocity);
|
||||
ml_vec3f_clear(suLastBaddie->spawn_position);
|
||||
suLastBaddie->stored_anctrl_index = 0;
|
||||
suLastBaddie->unk58_2 = 1;
|
||||
suLastBaddie->stored_anctrl_playbackType_ = 0;
|
||||
suLastBaddie->stored_anctrl_forwards = 0;
|
||||
suLastBaddie->stored_anctrl_smoothTransistion = 0;
|
||||
suLastBaddie->stored_anctrl_duration = 0.0f;
|
||||
suLastBaddie->stored_anctrl_timer = 0.0f;
|
||||
suLastBaddie->unk138_19 = 0;
|
||||
suLastBaddie->stored_anctrl_subrangeMin = 0.0f;
|
||||
suLastBaddie->stored_anctrl_subrangeMax = 1.0f;
|
||||
suLastBaddie->unkF4_22 = 0;
|
||||
suLastBaddie->unk58_1 = 0;
|
||||
suLastBaddie->unk138_29 = 0;
|
||||
suLastBaddie->unk18 = actorInfo->animations;
|
||||
suLastBaddie->anctrl = NULL;
|
||||
suLastBaddie->stored_anctrl_timer = 0.0f;
|
||||
suLastBaddie->unk130 = 0;
|
||||
suLastBaddie->unk124_5 = 0;
|
||||
suLastBaddie->unk124_3 = 0;
|
||||
suLastBaddie->unk138_9 = 0;
|
||||
suLastBaddie->unk138_8 = 0;
|
||||
suLastBaddie->unk138_25 = 0;
|
||||
suLastBaddie->unk16C_3 = 0;
|
||||
suLastBaddie->unk16C_2 = 0;
|
||||
suLastBaddie->unk16C_1 = 0;
|
||||
suLastBaddie->unk16C_0 = 0;
|
||||
suLastBaddie->unk17C_31 = 0;
|
||||
suLastBaddie->unk14C[0] = NULL;
|
||||
suLastBaddie->unk14C[1] = NULL;
|
||||
suLastBaddie->unk138_27 = 0;
|
||||
suLastBaddie->has_met_before = FALSE;
|
||||
suLastBaddie->unk138_23 = 0;
|
||||
suLastBaddie->unk138_22 = 0;
|
||||
suLastBaddie->unk138_21 = 0;
|
||||
suLastBaddie->unk138_20 = 0;
|
||||
suLastBaddie->unk174 = 0.0f;
|
||||
suLastBaddie->unk178 = 0.0f;
|
||||
if( actorInfo->animations){
|
||||
sp54 = &suLastBaddie->unk18[suLastBaddie->state];
|
||||
if(sp54->index != 0){
|
||||
suLastBaddie->anctrl = anctrl_new(0);
|
||||
anctrl_reset(suLastBaddie->anctrl);
|
||||
anctrl_setIndex(suLastBaddie->anctrl, sp54->index);
|
||||
anctrl_setDuration(suLastBaddie->anctrl, sp54->duration);
|
||||
anctrl_start(suLastBaddie->anctrl, "subaddie.c", 0x4A5);
|
||||
}
|
||||
}//L80327BA8
|
||||
suLastBaddie->unk124_11 = 0;
|
||||
suLastBaddie->alpha_124_19 = 0xff;
|
||||
suLastBaddie->depth_mode = MODEL_RENDER_DEPTH_FULL;
|
||||
suLastBaddie->unk124_0 = suLastBaddie->unk138_31 = 1;
|
||||
for(i = 0; i < 0x10; i++){
|
||||
((s32 *)suLastBaddie->unk7C)[i] = 0;
|
||||
}
|
||||
for(i = 0; i < 0x0C; i++){
|
||||
((s32 *)suLastBaddie->unkBC)[i] = 0;
|
||||
}
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_0){
|
||||
suLastBaddie->unk10_25 = func_80306DDC(position) + 1;
|
||||
if(suLastBaddie->unk10_25 == 0){
|
||||
suLastBaddie->unk10_25 = 0;
|
||||
}else{
|
||||
sp44[0] = (f32)position[0];
|
||||
sp44[1] = (f32)position[1];
|
||||
sp44[2] = (f32)position[2];
|
||||
suLastBaddie->unk10_18 = func_80307258(sp44, suLastBaddie->unk10_25 - 1, 0) + 1;
|
||||
}
|
||||
}//L80327D30
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_2){
|
||||
suLastBaddie->unk10_1 = 0;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_3){
|
||||
suLastBaddie->unkF4_30 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_1){
|
||||
suLastBaddie->marker->unk44 = (struct5Bs*)1;
|
||||
}
|
||||
else if(flags & ACTOR_FLAG_UNKNOWN_6){
|
||||
suLastBaddie->marker->unk44 = func_8034A2C8();
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_12){
|
||||
func_8033F738(suLastBaddie->marker);
|
||||
func_8034BFF8(suLastBaddie->marker);
|
||||
}
|
||||
|
||||
suLastBaddie->unk148 = 0;
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_11){
|
||||
suLastBaddie->unk148 = skeletalAnim_new();
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_14){
|
||||
suLastBaddie->marker->unk50 = (s32)func_803406B0();
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_4){
|
||||
suLastBaddie->unk124_31 = -1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_7){
|
||||
suLastBaddie->unkF4_22 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_19){
|
||||
suLastBaddie->unk58_1 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_8){
|
||||
suLastBaddie->unk130 = func_803255FC;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_9){
|
||||
suLastBaddie->marker->unk40_21 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_15){
|
||||
suLastBaddie->marker->unk40_20 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_17){
|
||||
suLastBaddie->marker->unk40_22 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_22){
|
||||
suLastBaddie->marker->unk40_19 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_16){
|
||||
suLastBaddie->unk138_9 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_18){
|
||||
suLastBaddie->unk138_8 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_21){
|
||||
suLastBaddie->unk138_25 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_23){
|
||||
suLastBaddie->unk16C_3 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_24){
|
||||
suLastBaddie->unk16C_2 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_25){
|
||||
suLastBaddie->unk16C_1 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_26){
|
||||
suLastBaddie->unk17C_31 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_13){
|
||||
suLastBaddie->unk138_29 = 1;
|
||||
}
|
||||
|
||||
if(flags & ACTOR_FLAG_UNKNOWN_20){
|
||||
suLastBaddie->unk58_2 = 0;
|
||||
}
|
||||
|
||||
suLastBaddie->unk154 = 0x005e0000;
|
||||
suLastBaddie->marker->unk54 = (void (*)(struct actorMarker_s *, struct actorMarker_s *, u16 *))func_8032B5C0;
|
||||
|
||||
|
||||
for(i = 0; i < 3; ++i){
|
||||
suLastBaddie->unk164[i] = 0x63;
|
||||
}
|
||||
|
||||
suLastBaddie->unk170 = -10.0f;
|
||||
suLastBaddie->unk138_7 = 0;
|
||||
suLastBaddie->unk3C = flags;
|
||||
|
||||
// @recomp Allocate extension data for this actor and place it in padding.
|
||||
suLastBaddie->pad17C_30 = recomp_create_actor_data(actorInfo->actorId) & 0x7FFFFFFFU;
|
||||
|
||||
return suLastBaddie;
|
||||
}
|
||||
|
||||
void func_8032BB88(Actor *this, s32 arg1, s32 arg2);
|
||||
void func_8033E7CC(ActorMarker *arg0);
|
||||
void func_8034A2A8(struct5Bs *this);
|
||||
void func_8034BF54(ActorMarker *marker);
|
||||
void func_8033F784(ActorMarker *arg0);
|
||||
void func_80340690(Struct83s *self);
|
||||
void func_8032ACA8(Actor *arg0);
|
||||
|
||||
// @recomp Patched to destroy the extended actor data.
|
||||
RECOMP_PATCH void func_80325FE8(Actor *this) {
|
||||
ActorMarker *marker;
|
||||
u8 temp_v0;
|
||||
|
||||
// @recomp Destroy the extended actor data.
|
||||
recomp_destroy_actor_data(this->pad17C_30);
|
||||
|
||||
marker = this->marker;
|
||||
marker->id = 0;
|
||||
if (this->anctrl != NULL) {
|
||||
anctrl_free(this->anctrl);
|
||||
}
|
||||
temp_v0 = this->unk44_31;
|
||||
if (temp_v0 != 0) {
|
||||
sfxsource_freeSfxsourceByIndex(temp_v0);
|
||||
}
|
||||
this->anctrl = NULL;
|
||||
this->unk44_31 = 0;
|
||||
|
||||
if (this->unk138_7 != 0) {
|
||||
func_8032BB88(this, -1, 8000);
|
||||
this->unk138_7 = 0;
|
||||
}
|
||||
if (marker->actorFreeFunc != NULL) {
|
||||
marker->actorFreeFunc(this);
|
||||
marker->actorFreeFunc = NULL;
|
||||
}
|
||||
if ((s32)marker->unk44 < 0) {
|
||||
func_8033E7CC(marker);
|
||||
func_8034A2A8(marker->unk44);
|
||||
marker->unk44 = 0;
|
||||
}
|
||||
if (marker->unk4C != 0) {
|
||||
func_8034BF54(this->marker);
|
||||
marker->unk4C = 0;
|
||||
}
|
||||
if (marker->unk48 != 0) {
|
||||
func_8033F784(marker);
|
||||
marker->unk48 = 0;
|
||||
}
|
||||
if (this->unk148 != NULL) {
|
||||
skeletalAnim_free(this->unk148);
|
||||
this->unk148 = NULL;
|
||||
}
|
||||
if (marker->unk50 != 0) {
|
||||
func_80340690((Struct83s *)marker->unk50);
|
||||
marker->unk50 = 0;
|
||||
}
|
||||
func_8032ACA8(this);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT ActorExtensionId bkrecomp_extend_actor(enum actor_e type, u32 size) {
|
||||
return recomp_register_actor_extension(type, size);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT ActorExtensionId bkrecomp_extend_actor_all(u32 size) {
|
||||
return recomp_register_actor_extension_generic(size);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT void* bkrecomp_get_extended_actor_data(Actor* actor, ActorExtensionId extension) {
|
||||
return recomp_get_actor_data(actor->pad17C_30, extension, actor->actor_info->actorId);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT u32 bkrecomp_get_actor_spawn_index(Actor* actor) {
|
||||
return recomp_get_actor_spawn_index(actor->pad17C_30);
|
||||
}
|
||||
@@ -5,12 +5,26 @@
|
||||
#include "enums.h"
|
||||
#include "prop.h"
|
||||
|
||||
typedef u32 ActorExtensionId;
|
||||
typedef enum {
|
||||
EXTENSION_TYPE_MARKER,
|
||||
EXTENSION_TYPE_PROP,
|
||||
} ExtensionType;
|
||||
|
||||
ActorExtensionId bkrecomp_extend_actor(enum actor_e type, u32 size);
|
||||
ActorExtensionId bkrecomp_extend_actor_all(u32 size);
|
||||
// ActorMarkers
|
||||
typedef u32 MarkerExtensionId;
|
||||
|
||||
void* bkrecomp_get_extended_actor_data(Actor* actor, ActorExtensionId extension);
|
||||
u32 bkrecomp_get_actor_spawn_index(Actor* actor);
|
||||
MarkerExtensionId bkrecomp_extend_marker(enum marker_e type, u32 size);
|
||||
MarkerExtensionId bkrecomp_extend_marker_all(u32 size);
|
||||
|
||||
void* bkrecomp_get_extended_marker_data(ActorMarker* marker, MarkerExtensionId extension);
|
||||
u32 bkrecomp_get_marker_spawn_index(ActorMarker* marker);
|
||||
|
||||
// Props
|
||||
typedef u32 PropExtensionId;
|
||||
|
||||
PropExtensionId bkrecomp_extend_prop_all(u32 size);
|
||||
|
||||
void *bkrecomp_get_extended_prop_data(Cube* cube, Prop* prop, PropExtensionId extension_id);
|
||||
u32 bkrecomp_get_prop_spawn_index(Cube* cube, Prop* prop);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "core1/core1.h"
|
||||
|
||||
s32 cur_perspective_projection_transform_id = 0;
|
||||
s32 backup_perspective_projection_transform_id = 0;
|
||||
|
||||
s32 cur_ortho_projection_transform_id = 0;
|
||||
s32 backup_ortho_projection_transform_id = 0;
|
||||
|
||||
void reset_projection_ids() {
|
||||
cur_perspective_projection_transform_id = 0;
|
||||
cur_ortho_projection_transform_id = 0;
|
||||
}
|
||||
|
||||
extern f32 sViewportFOVy;
|
||||
extern f32 sViewportAspect;
|
||||
extern f32 sViewportNear;
|
||||
extern f32 sViewportFar;
|
||||
extern f32 sViewportLookVector[3];
|
||||
extern f32 sViewportPosition[3];
|
||||
extern f32 sViewportRotation[3];
|
||||
extern Vp sViewportStack[];
|
||||
extern MtxF sViewportMatrix;
|
||||
extern s32 sViewportStackIndex;
|
||||
|
||||
extern f32 sViewportBackupPosition[3];
|
||||
extern f32 sViewportBackupRotation[3];
|
||||
extern f32 sViewportBackupFrustumPlanes[4][4];
|
||||
extern f32 sViewportBackupLookVector[3];
|
||||
extern MtxF sViewportBackupMatrix;
|
||||
|
||||
// @recomp Patched to specify the view matrix for better transform interpolation and set up a matrix group for the new projection.
|
||||
RECOMP_PATCH void viewport_setRenderPerspectiveMatrix(Gfx **gfx, Mtx **mtx, f32 near, f32 far) {
|
||||
u16 perspNorm;
|
||||
|
||||
near = MAX(sViewportNear, near);
|
||||
far = MIN(sViewportFar, far);
|
||||
|
||||
if(*(u32*)OS_PHYSICAL_TO_K0(0x1D8) + 0x53D4FFF0) {
|
||||
near = 750.0f;
|
||||
far = 1250.0f;
|
||||
}
|
||||
|
||||
guPerspective(*mtx, &perspNorm, sViewportFOVy, sViewportAspect, near, far, 0.5f);
|
||||
gSPPerspNormalize((*gfx)++, perspNorm);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
guRotate(*mtx, -sViewportRotation[2], 0.0f, 0.0f, -1.0f);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
|
||||
guRotate(*mtx, -sViewportRotation[0], 1.0f, 0.0f, 0.0f);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
|
||||
guRotate(*mtx, -sViewportRotation[1], 0.0f, 1.0f, 0.0f);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||
|
||||
guTranslate(*mtx, 0.0f, 0.0f, 0.0f);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
// @recomp Create an isolated view matrix for the viewport translation and provide it as the view matrix to counteract the camera translation.
|
||||
MtxF* view = (MtxF*)*mtx;
|
||||
(*mtx)++;
|
||||
guTranslateF(view->m, sViewportPosition[0], sViewportPosition[1], sViewportPosition[2]);
|
||||
gEXSetViewMatrixFloat((*gfx)++, view->m);
|
||||
|
||||
// @recomp If a perspective projection transform ID is set, apply it as the projection matrix group. Otherwise, use auto as the projection matrix group.
|
||||
if (all_interpolation_skipped()) {
|
||||
gEXMatrixGroupNoInterpolate((*gfx)++, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
else if (cur_perspective_projection_transform_id != 0) {
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, cur_perspective_projection_transform_id, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
else {
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, G_EX_ID_AUTO, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
float identity_matrix[4][4] = {
|
||||
{ 1.0f, 0.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 1.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 1.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f, 1.0f }
|
||||
};
|
||||
|
||||
// @recomp Patched to set up an identity view matrix to prevent bleeding the perspective projection's view matrix.
|
||||
RECOMP_PATCH void viewport_setRenderViewportAndOrthoMatrix(Gfx **gfx, Mtx **mtx) {
|
||||
gSPViewport((*gfx)++, &sViewportStack[sViewportStackIndex]);
|
||||
|
||||
guOrtho(*mtx, -(2*(f32)gFramebufferWidth), (2*(f32)gFramebufferWidth), -(2*(f32)gFramebufferHeight), (2*(f32)gFramebufferHeight), 1.0f, 20.0f, 1.0f);
|
||||
gSPMatrix((*gfx)++, OS_K0_TO_PHYSICAL((*mtx)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION);
|
||||
|
||||
guTranslate(*mtx, 0.0f, 0.0f, 0.0f);
|
||||
gSPMatrix((*gfx)++, OS_K0_TO_PHYSICAL((*mtx)++), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
// @recomp Set an identity view matrix.
|
||||
gEXSetViewMatrixFloat((*gfx)++, identity_matrix);
|
||||
|
||||
// @recomp If an ortho projection transform ID is set, apply it as the projection matrix group. Otherwise, use auto as the projection matrix group.
|
||||
if (all_interpolation_skipped()) {
|
||||
gEXMatrixGroupNoInterpolate((*gfx)++, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
else if (cur_ortho_projection_transform_id != 0) {
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, cur_ortho_projection_transform_id, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
else {
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, G_EX_ID_AUTO, G_EX_NOPUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to also back up the projection matrix transform ID and reset the current one.
|
||||
RECOMP_PATCH void viewport_backupState(void) {
|
||||
s32 i, j;
|
||||
|
||||
viewport_getPosition_vec3f(sViewportBackupPosition);
|
||||
viewport_getRotation_vec3f(sViewportBackupRotation);
|
||||
viewport_getFrustumPlanes(sViewportBackupFrustumPlanes[0], sViewportBackupFrustumPlanes[1], sViewportBackupFrustumPlanes[2], sViewportBackupFrustumPlanes[3]);
|
||||
viewport_getLookVector(sViewportBackupLookVector);
|
||||
|
||||
for(i = 0; i < 4; i++){
|
||||
for(j = 0; j < 4; j++){
|
||||
sViewportBackupMatrix.m[i][j] = sViewportMatrix.m[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Back up the projection transform IDs and reset them.
|
||||
backup_perspective_projection_transform_id = cur_perspective_projection_transform_id;
|
||||
cur_perspective_projection_transform_id = 0;
|
||||
backup_ortho_projection_transform_id = cur_ortho_projection_transform_id;
|
||||
cur_ortho_projection_transform_id = 0;
|
||||
}
|
||||
|
||||
// @recomp Patched to also restore the backed up projection matrix transform ID.
|
||||
RECOMP_PATCH void viewport_restoreState(void) {
|
||||
s32 i, j;
|
||||
|
||||
viewport_setPosition_vec3f(sViewportBackupPosition);
|
||||
viewport_setRotation_vec3f(sViewportBackupRotation);
|
||||
viewport_setFrustumPlanes(sViewportBackupFrustumPlanes[0], sViewportBackupFrustumPlanes[1], sViewportBackupFrustumPlanes[2], sViewportBackupFrustumPlanes[3]);
|
||||
ml_vec3f_copy(sViewportLookVector, sViewportBackupLookVector);
|
||||
|
||||
for(i = 0; i < 4; i++){
|
||||
for(j = 0; j < 4; j++){
|
||||
sViewportMatrix.m[i][j] = sViewportBackupMatrix.m[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Restore the backed up projection transform IDs.
|
||||
cur_perspective_projection_transform_id = backup_perspective_projection_transform_id;
|
||||
cur_ortho_projection_transform_id = backup_ortho_projection_transform_id;
|
||||
}
|
||||
@@ -1,5 +1,37 @@
|
||||
#include "patches.h"
|
||||
#include "core1/ml.h"
|
||||
#include "core1/mlmtx.h"
|
||||
|
||||
extern f32 sViewportPosition[3];
|
||||
extern f32 sViewportFrustumPlanes[4][4];
|
||||
|
||||
int frustum_checks_enabled = TRUE;
|
||||
void set_frustum_checks_enabled(int enabled) {
|
||||
frustum_checks_enabled = enabled;
|
||||
}
|
||||
|
||||
RECOMP_PATCH bool viewport_isBoundingBoxInFrustum(f32 arg0[3], f32 arg1[3]) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// @recomp Patched to allow globally disabling frustum checks.
|
||||
RECOMP_PATCH bool viewport_func_8024DB50(f32 pos[3], f32 distance) {
|
||||
// @recomp Return true if frustum checks are disabled (always pass the frustum check).
|
||||
if (!frustum_checks_enabled) {
|
||||
return TRUE;
|
||||
}
|
||||
f32 delta[3];
|
||||
s32 i;
|
||||
|
||||
delta[0] = pos[0] - sViewportPosition[0];
|
||||
delta[1] = pos[1] - sViewportPosition[1];
|
||||
delta[2] = pos[2] - sViewportPosition[2];
|
||||
|
||||
for(i = 0; i < 4; i++) {
|
||||
if(distance <= ml_vec3f_dot_product(delta, sViewportFrustumPlanes[i])) {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -121,4 +121,7 @@ RECOMP_PATCH void game_draw(s32 arg0){
|
||||
scissorBox_setDefault();
|
||||
}
|
||||
}
|
||||
|
||||
// Allow interpolation for the next frame.
|
||||
set_all_interpolation_skipped(FALSE);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "bk_api.h"
|
||||
#include "misc_funcs.h"
|
||||
|
||||
@@ -16,6 +17,8 @@ RECOMP_PATCH void mainThread_entry(void *arg) {
|
||||
sns_write_payload_over_heap();
|
||||
|
||||
while (1) {
|
||||
// @recomp Reset the tracked projection IDs.
|
||||
reset_projection_ids();
|
||||
mainLoop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "functions.h"
|
||||
#include "core2/anctrl.h"
|
||||
#include "core2/modelRender.h"
|
||||
|
||||
s32 func_80320708(void);
|
||||
s32 levelSpecificFlags_validateCRC2(void);
|
||||
s32 dummy_func_80320248(void);
|
||||
enum asset_e mapModel_getOpaModelId(void);
|
||||
enum map_e map_get(void);
|
||||
s32 mapSpecificFlags_get(s32 i);
|
||||
s32 levelSpecificFlags_get(s32 i);
|
||||
u32 jiggyscore_isCollected(enum jiggy_e);
|
||||
enum bsgroup_e player_movementGroup(void);
|
||||
bool jigsawPicture_isJigsawPictureComplete(s32 world);
|
||||
bool fileProgressFlag_get(enum file_progress_e index);
|
||||
void modelRender_setAnimatedTexturesCacheId(s32 arg0);
|
||||
bool mapModel_has_xlu_bin(void);
|
||||
void func_802F7BC0(Gfx **, Mtx **, Vtx **);
|
||||
|
||||
typedef struct {
|
||||
s16 map_id; //enum map_e
|
||||
s16 opa_model_id; //enum asset_e level_model_id
|
||||
s16 xlu_model_id; //enum asset_e level2_model_id
|
||||
s16 unk6[3]; // min bounds (for cubes?)
|
||||
s16 unkC[3]; // max bounds (for cubes?)
|
||||
// u8 pad12[0x2];
|
||||
f32 scale;
|
||||
}MapModelDescription;
|
||||
|
||||
extern struct {
|
||||
s32 unk0; // Changed from void* in the decomp
|
||||
s32 unk4; // Changed from void* in the decomp
|
||||
BKCollisionList *collision_opa;
|
||||
BKCollisionList *collision_xlu;
|
||||
BKModel *model_opa;
|
||||
BKModel *model_xlu;
|
||||
BKModelBin *model_bin_opa;
|
||||
BKModelBin *model_bin_xlu;
|
||||
s32 unk20;
|
||||
struct5Bs *unk24;
|
||||
MapModelDescription *description;
|
||||
u8 env_red;
|
||||
u8 env_green;
|
||||
u8 env_blue;
|
||||
f32 scale;
|
||||
}mapModel;
|
||||
|
||||
// @recomp Patched to set the transform ID when drawing the map's opaque model.
|
||||
RECOMP_PATCH void mapModel_opa_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
s32 temp_a0;
|
||||
|
||||
if (func_80320708() && levelSpecificFlags_validateCRC2() && dummy_func_80320248()) {
|
||||
if (mapModel_getOpaModelId() == ASSET_14CF_MODEL_SM_SPIRAL_MOUNTAIN_OPA) {
|
||||
func_8033A45C(1, 0);
|
||||
func_8033A45C(2, 1);
|
||||
}
|
||||
switch (map_get()) { /* irregular */
|
||||
case MAP_88_CS_SPIRAL_MOUNTAIN_6:
|
||||
if (mapSpecificFlags_get(0) != 0) {
|
||||
func_8033A45C(1, 1);
|
||||
func_8033A45C(2, 0);
|
||||
}
|
||||
break;
|
||||
|
||||
case MAP_12_GV_GOBIS_VALLEY:
|
||||
func_8033A45C(1, levelSpecificFlags_get(LEVEL_FLAG_6_GV_UNKNOWN) ? 1 : 0);
|
||||
func_8033A45C(2, jiggyscore_isCollected(JIGGY_42_GV_WATER_PYRAMID) ? 0 : 1);
|
||||
func_8033A45C(5, jiggyscore_isCollected(JIGGY_42_GV_WATER_PYRAMID) ? 1 : 0);
|
||||
break;
|
||||
|
||||
case MAP_14_GV_SANDYBUTTS_MAZE:
|
||||
func_8033A45C(5, (player_movementGroup() == BSGROUP_4_LOOK) ? 1 : 0);
|
||||
break;
|
||||
|
||||
case MAP_E_MM_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 1);
|
||||
func_8033A45C(5, 1);
|
||||
break;
|
||||
|
||||
case MAP_47_BGS_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 2);
|
||||
func_8033A45C(5, 2);
|
||||
break;
|
||||
|
||||
case MAP_48_FP_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 3);
|
||||
func_8033A45C(5, 3);
|
||||
break;
|
||||
|
||||
case MAP_30_MMM_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 4);
|
||||
func_8033A45C(5, 4);
|
||||
break;
|
||||
|
||||
case MAP_4A_CCW_SPRING_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 5);
|
||||
func_8033A45C(5, 5);
|
||||
break;
|
||||
case MAP_4B_CCW_SUMMER_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 6);
|
||||
func_8033A45C(5, 6);
|
||||
break;
|
||||
case MAP_4C_CCW_AUTUMN_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 7);
|
||||
func_8033A45C(5, 7);
|
||||
break;
|
||||
case MAP_4D_CCW_WINTER_MUMBOS_SKULL:
|
||||
func_8033A45C(1, 8);
|
||||
func_8033A45C(5, 8);
|
||||
break;
|
||||
case MAP_5E_CCW_SPRING_NABNUTS_HOUSE:
|
||||
case MAP_5F_CCW_SUMMER_NABNUTS_HOUSE:
|
||||
case MAP_60_CCW_AUTUMN_NABNUTS_HOUSE:
|
||||
func_8033A45C(1, 1);
|
||||
func_8033A45C(2, 0);
|
||||
break;
|
||||
case MAP_61_CCW_WINTER_NABNUTS_HOUSE:
|
||||
func_8033A45C(1, 0);
|
||||
func_8033A45C(2, 1);
|
||||
break;
|
||||
case MAP_1D_MMM_CELLAR:
|
||||
func_8033A45C(1, actorArray_findActorFromActorId(0x191) ? 0 : 1);
|
||||
break;
|
||||
case MAP_7C_CS_INTRO_BANJOS_HOUSE_1:
|
||||
case MAP_89_CS_INTRO_BANJOS_HOUSE_2:
|
||||
case MAP_8A_CS_INTRO_BANJOS_HOUSE_3:
|
||||
case MAP_8C_SM_BANJOS_HOUSE:
|
||||
case MAP_91_FILE_SELECT:
|
||||
func_8033A45C(5, 1);
|
||||
break;
|
||||
case MAP_7B_CS_INTRO_GL_DINGPOT_1:
|
||||
case MAP_81_CS_INTRO_GL_DINGPOT_2:
|
||||
func_8033A45C(4, 0);
|
||||
func_8033A45C(5, 0);
|
||||
func_8033A45C(6, 0);
|
||||
break;
|
||||
case MAP_82_CS_ENTERING_GL_MACHINE_ROOM:
|
||||
case MAP_83_CS_GAME_OVER_MACHINE_ROOM:
|
||||
case MAP_84_CS_UNUSED_MACHINE_ROOM:
|
||||
func_8033A45C(4, 1);
|
||||
func_8033A45C(5, 1);
|
||||
func_8033A45C(6, 1);
|
||||
break;
|
||||
case MAP_93_GL_DINGPOT:
|
||||
func_8033A45C(4, 1);
|
||||
func_8033A45C(5, 1);
|
||||
func_8033A45C(6, (jigsawPicture_isJigsawPictureComplete(0xA) || fileProgressFlag_get(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN) || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)));
|
||||
break;
|
||||
}
|
||||
func_8033A450(mapModel.unk24);
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL);
|
||||
temp_a0 = mapModel.unk0;
|
||||
if (temp_a0 != 0) {
|
||||
modelRender_setAnimatedTexturesCacheId(temp_a0);
|
||||
}
|
||||
modelRender_setEnvColor(mapModel.env_red, mapModel.env_green, mapModel.env_blue, 0xFF);
|
||||
|
||||
// @recomp Set the map opaque model transform id.
|
||||
cur_drawn_model_is_map = TRUE;
|
||||
cur_drawn_model_transform_id = MAP_MODEL_OPA_TRANSFORM_ID_START;
|
||||
|
||||
modelRender_draw(gfx, mtx, NULL, NULL, mapModel.description->scale, NULL, mapModel.model_bin_opa);
|
||||
|
||||
// @recomp Clear the current model transform id after drawing.
|
||||
cur_drawn_model_is_map = FALSE;
|
||||
cur_drawn_model_transform_id = 0;
|
||||
|
||||
if (!mapModel_has_xlu_bin()) {
|
||||
func_802F7BC0(gfx, mtx, vtx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to set the transform ID when drawing the map's translucent model.
|
||||
RECOMP_PATCH void mapModel_xlu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
s32 temp_a0;
|
||||
|
||||
if (mapModel.model_bin_xlu != NULL) {
|
||||
if (map_get() == MAP_1D_MMM_CELLAR) {
|
||||
func_8033A45C(1, (actorArray_findActorFromActorId(0x191) != NULL) ? 0 : 1);
|
||||
}
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_COMPARE);
|
||||
temp_a0 = mapModel.unk4;
|
||||
if (temp_a0 != 0) {
|
||||
modelRender_setAnimatedTexturesCacheId(temp_a0);
|
||||
}
|
||||
modelRender_setEnvColor(mapModel.env_red, mapModel.env_green, mapModel.env_blue, 0xFF);
|
||||
|
||||
// @recomp Set the map opaque model transform id.
|
||||
cur_drawn_model_is_map = TRUE;
|
||||
cur_drawn_model_transform_id = MAP_MODEL_XLU_TRANSFORM_ID_START;
|
||||
|
||||
modelRender_draw(gfx, mtx, NULL, NULL, mapModel.description->scale, NULL, mapModel.model_bin_xlu);
|
||||
|
||||
// @recomp Clear the current model transform id after drawing.
|
||||
cur_drawn_model_is_map = FALSE;
|
||||
cur_drawn_model_transform_id = 0;
|
||||
|
||||
func_802F7BC0(gfx, mtx, vtx);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
#include "patches.h"
|
||||
#include "prop.h"
|
||||
#include "actor.h"
|
||||
#include "functions.h"
|
||||
#include "object_extension_funcs.h"
|
||||
#include "bk_api.h"
|
||||
|
||||
// Array of handles for ActorMarker instances.
|
||||
// Normally the game only has at most 0xE0 ActorMarker instances, but this is larger to account for mods increasing
|
||||
// the ActorMarker count.
|
||||
u32 marker_handles[0x1000];
|
||||
|
||||
extern ActorMarker *D_8036E7C8;
|
||||
extern u8 D_80383428[0x1C];
|
||||
void func_8032F3D4(s32 arg0[3], ActorMarker *marker, s32 arg2);
|
||||
ActorMarker * func_80332A60(void);
|
||||
|
||||
// @recomp Patched to reset all extended marker data and skip interpolation for the next frame.
|
||||
RECOMP_PATCH void func_803329AC(void){
|
||||
s32 i;
|
||||
|
||||
D_8036E7C8 = (ActorMarker *)malloc(0xE0*sizeof(ActorMarker));
|
||||
|
||||
for( i = 0; i < 0x1C; i++){
|
||||
D_80383428[i] = 0;
|
||||
}
|
||||
|
||||
for(i =0; i<0xE0; i++){
|
||||
D_8036E7C8[i].unk5C = 0;
|
||||
}
|
||||
|
||||
// @recomp Reset all actor data and skip interpolation for the next frame.
|
||||
// Interpolation is skipped as the next frame will potentially reuse IDs from the previous frame,
|
||||
// as the marker ID tracking gets reset here.
|
||||
recomp_clear_all_object_data(EXTENSION_TYPE_MARKER);
|
||||
set_all_interpolation_skipped(TRUE);
|
||||
}
|
||||
|
||||
// @recomp Patched to create extension data for the marker.
|
||||
RECOMP_PATCH ActorMarker * marker_init(s32 *pos, MarkerDrawFunc draw_func, int arg2, int marker_id, int arg4){
|
||||
ActorMarker * marker = func_80332A60();
|
||||
marker->propPtr = NULL;
|
||||
marker->cubePtr = NULL;
|
||||
marker->drawFunc = draw_func;
|
||||
marker->id = marker_id;
|
||||
marker->unk40_23 = arg4;
|
||||
func_8032F3D4(pos, marker, arg2);
|
||||
marker->actrArrayIdx = 0;
|
||||
marker->unk14_10 = 0;
|
||||
marker->modelId = 0;
|
||||
marker->isBanjoOnTop = 0;
|
||||
marker->unk14_22 = 0;
|
||||
marker->unk14_21 = 0;
|
||||
marker->yaw = 0;
|
||||
marker->pitch = 0;
|
||||
marker->roll = 0;
|
||||
marker->unk2C_2 = 0;
|
||||
marker->unk2C_1 = 0;
|
||||
marker->collidable = TRUE;
|
||||
marker->unk3E_0 = 0;
|
||||
marker->unk40_22 = 0;
|
||||
marker->unk40_19 = 0;
|
||||
marker->unk40_21 = 0;
|
||||
marker->collisionFunc = NULL;
|
||||
marker->collision2Func = NULL;
|
||||
marker->dieFunc = NULL;
|
||||
marker->unk54 = NULL;
|
||||
marker->unk58 = 0;
|
||||
marker->unk18 = 0;
|
||||
marker->actorUpdateFunc = NULL;
|
||||
marker->actorFreeFunc = NULL;
|
||||
marker->commonParticleIndex = 0;
|
||||
marker->actorUpdate2Func = NULL;
|
||||
marker->unk38[0] = 0;
|
||||
marker->unk38[1] = 0;
|
||||
marker->unk38[2] = 0;
|
||||
marker->unk44 = 0;
|
||||
marker->unk20 = 0;
|
||||
marker->unk50 = 0;
|
||||
marker->unk48 = 0;
|
||||
marker->unk4C = 0;
|
||||
marker->unk40_20 = 0;
|
||||
marker->unk40_31 = 0;
|
||||
|
||||
// @recomp Set the marker's handle.
|
||||
u32 index = marker - D_8036E7C8;
|
||||
marker_handles[index] = recomp_create_object_data(EXTENSION_TYPE_MARKER, marker_id);
|
||||
|
||||
return marker;
|
||||
}
|
||||
|
||||
// @recomp Patched to destroy the marker's extended data.
|
||||
RECOMP_PATCH void func_80332B2C(ActorMarker * arg0){
|
||||
static s32 D_8036E804[8] = {(u8)~(1 << 7), (u8)~(1 << 6), (u8)~(1 << 5), (u8)~(1 << 4), (u8)~(1 << 3), (u8)~(1 << 2), (u8)~(1 << 1), (u8)~(1 << 0)};
|
||||
|
||||
s32 index = (arg0 - D_8036E7C8);
|
||||
arg0->unk5C = 0;
|
||||
D_80383428[index >> 3] = D_80383428[index >> 3] & D_8036E804[index & 7];
|
||||
|
||||
// @recomp Delete the handle for this marker.
|
||||
recomp_destroy_object_data(EXTENSION_TYPE_MARKER, marker_handles[index]);
|
||||
marker_handles[index] = 0;
|
||||
}
|
||||
|
||||
RECOMP_EXPORT MarkerExtensionId bkrecomp_extend_marker(enum marker_e type, u32 size) {
|
||||
return recomp_register_object_extension(EXTENSION_TYPE_MARKER, type, size);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT MarkerExtensionId bkrecomp_extend_marker_all(u32 size) {
|
||||
return recomp_register_object_extension_generic(EXTENSION_TYPE_MARKER, size);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT void* bkrecomp_get_extended_marker_data(ActorMarker* marker, MarkerExtensionId extension) {
|
||||
s32 index = (marker - D_8036E7C8);
|
||||
u32 handle = marker_handles[index];
|
||||
return recomp_get_object_data(EXTENSION_TYPE_MARKER, marker->id, handle, extension);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT u32 bkrecomp_get_marker_spawn_index(ActorMarker* marker) {
|
||||
s32 index = (marker - D_8036E7C8);
|
||||
u32 handle = marker_handles[index];
|
||||
return recomp_get_object_spawn_index(EXTENSION_TYPE_MARKER, handle);
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
#include "patches.h"
|
||||
#include "bk_api.h"
|
||||
#include "transform_ids.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern u8 D_8037BFB8;
|
||||
extern s32 D_8036E7B0;
|
||||
|
||||
void eggShatter_draw(Gfx **gPtr, Mtx **mPtr, Vtx **vPtr);
|
||||
void baModel_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8033A28C(bool arg0);
|
||||
void func_8033A244(f32);
|
||||
void func_8033A280(f32);
|
||||
|
||||
// @recomp Patched to set the current transform ID to banjo's when drawing the player.
|
||||
RECOMP_PATCH void player_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx) {
|
||||
if (D_8037BFB8) {
|
||||
eggShatter_draw(gfx, mtx, vtx);
|
||||
|
||||
// @recomp Set the current transform ID to banjo's.
|
||||
u32 prev_transform_id = cur_drawn_model_transform_id;
|
||||
cur_drawn_model_transform_id = BANJO_TRANSFORM_ID_START;
|
||||
|
||||
baModel_draw(gfx, mtx, vtx);
|
||||
|
||||
// @recomp Reset the current transform ID.
|
||||
cur_drawn_model_transform_id = prev_transform_id;
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to set the actor being drawn before the actor's draw func is called.
|
||||
RECOMP_PATCH void __marker_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *actor;
|
||||
u32 draw_dist;
|
||||
f32 draw_dist_f;
|
||||
f32 percentage;
|
||||
|
||||
// @recomp Calculate the current drawn marker's transform ID.
|
||||
s32 cur_drawn_marker_spawn_index = bkrecomp_get_marker_spawn_index(this);
|
||||
u32 prev_transform_id = cur_drawn_model_transform_id;
|
||||
u32 transform_id = MARKER_TRANSFORM_ID_START + cur_drawn_marker_spawn_index * MARKER_TRANSFORM_ID_COUNT;
|
||||
if(!this->unk3E_0){
|
||||
// @recomp Set the current drawn marker's transform ID.
|
||||
cur_drawn_model_transform_id = transform_id;
|
||||
this->drawFunc(this, gfx, mtx, vtx);
|
||||
// @recomp Clear the current transform ID after drawing.
|
||||
cur_drawn_model_transform_id = prev_transform_id;
|
||||
return;
|
||||
}
|
||||
actor = marker_getActor(this);
|
||||
func_8033A28C(actor->unk58_2);
|
||||
if( actor->unk58_2 && !this->unk40_23 && !this->unk40_21 && !D_8036E7B0){
|
||||
func_8033A244(3700.0f);
|
||||
}
|
||||
|
||||
if(actor->unk124_7 && !actor->despawn_flag && actor->unk58_0){
|
||||
draw_dist = actor->actor_info->draw_distance;
|
||||
if(draw_dist != 0){
|
||||
percentage = (f32)draw_dist*(1/(f64)0x400);
|
||||
}
|
||||
else if(this->unk40_21){
|
||||
percentage = 2.0f;
|
||||
}
|
||||
else{
|
||||
percentage = 1.0f;
|
||||
}
|
||||
func_8033A280(percentage);
|
||||
// @recomp Set the current drawn marker's transform ID.
|
||||
cur_drawn_model_transform_id = transform_id;
|
||||
this->drawFunc(this, gfx, mtx, vtx);
|
||||
// @recomp Set the current drawn marker to null after drawing.
|
||||
cur_drawn_model_transform_id = prev_transform_id;
|
||||
}//L8032D300
|
||||
func_8033A244(30000.0f);
|
||||
func_8033A280(1.0f);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef __MEM_FUNCS_H__
|
||||
#define __MEM_FUNCS_H__
|
||||
|
||||
#include "patch_helpers.h"
|
||||
|
||||
DECLARE_FUNC(u32, recomp_register_actor_extension, u32 actor_type, u32 size);
|
||||
DECLARE_FUNC(u32, recomp_register_actor_extension_generic, u32 size);
|
||||
DECLARE_FUNC(void, recomp_clear_all_actor_data);
|
||||
DECLARE_FUNC(u32, recomp_create_actor_data, u32 actor_type);
|
||||
DECLARE_FUNC(void, recomp_destroy_actor_data, u32 actor_handle);
|
||||
DECLARE_FUNC(void*, recomp_get_actor_data, u32 actor_handle, u32 extension_handle, u32 actor_type);
|
||||
DECLARE_FUNC(u32, recomp_get_actor_spawn_index, u32 actor_handle);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef __MEM_FUNCS_H__
|
||||
#define __MEM_FUNCS_H__
|
||||
|
||||
#include "patch_helpers.h"
|
||||
|
||||
DECLARE_FUNC(u32, recomp_register_object_extension, u32 type_index, u32 subtype_index, u32 size);
|
||||
DECLARE_FUNC(u32, recomp_register_object_extension_generic, u32 type_index, u32 size);
|
||||
DECLARE_FUNC(void, recomp_clear_all_object_data, u32 type_index);
|
||||
DECLARE_FUNC(u32, recomp_create_object_data, u32 type_index, u32 subtype_index);
|
||||
DECLARE_FUNC(void, recomp_destroy_object_data, u32 type_index, u32 object_handle);
|
||||
DECLARE_FUNC(void*, recomp_get_object_data, u32 type_index, u32 subtype_index, u32 object_handle, u32 extension_handle);
|
||||
DECLARE_FUNC(u32, recomp_get_object_spawn_index, u32 type_index, u32 object_handle);
|
||||
|
||||
#endif
|
||||
@@ -54,37 +54,8 @@ MAKE_OVERLAYS()
|
||||
#define OVERLAY_END(ovl) boot_##ovl##_rzip_ROM_END
|
||||
|
||||
// @recomp Patched to load overlays, prefixed with boot_ to account for the decomp build system.
|
||||
RECOMP_PATCH void boot_overlay_table_init(void) {
|
||||
gOverlayTable[ 0].start = OVERLAY_START(core2);
|
||||
gOverlayTable[ 0].end = OVERLAY_END(core2);
|
||||
gOverlayTable[ 1].start = OVERLAY_START(emptyLvl);
|
||||
gOverlayTable[ 1].end = OVERLAY_END(emptyLvl);
|
||||
gOverlayTable[ 2].start = OVERLAY_START(CC);
|
||||
gOverlayTable[ 2].end = OVERLAY_END(CC);
|
||||
gOverlayTable[ 3].start = OVERLAY_START(MMM);
|
||||
gOverlayTable[ 3].end = OVERLAY_END(MMM);
|
||||
gOverlayTable[ 4].start = OVERLAY_START(GV);
|
||||
gOverlayTable[ 4].end = OVERLAY_END(GV);
|
||||
gOverlayTable[ 5].start = OVERLAY_START(TTC);
|
||||
gOverlayTable[ 5].end = OVERLAY_END(TTC);
|
||||
gOverlayTable[ 6].start = OVERLAY_START(MM);
|
||||
gOverlayTable[ 6].end = OVERLAY_END(MM);
|
||||
gOverlayTable[ 7].start = OVERLAY_START(BGS);
|
||||
gOverlayTable[ 7].end = OVERLAY_END(BGS);
|
||||
gOverlayTable[ 8].start = OVERLAY_START(RBB);
|
||||
gOverlayTable[ 8].end = OVERLAY_END(RBB);
|
||||
gOverlayTable[ 9].start = OVERLAY_START(FP);
|
||||
gOverlayTable[ 9].end = OVERLAY_END(FP);
|
||||
gOverlayTable[10].start = OVERLAY_START(CCW);
|
||||
gOverlayTable[10].end = OVERLAY_END(CCW);
|
||||
gOverlayTable[11].start = OVERLAY_START(SM);
|
||||
gOverlayTable[11].end = OVERLAY_END(SM);
|
||||
gOverlayTable[12].start = OVERLAY_START(cutscenes);
|
||||
gOverlayTable[12].end = OVERLAY_END(cutscenes);
|
||||
gOverlayTable[13].start = OVERLAY_START(lair);
|
||||
gOverlayTable[13].end = OVERLAY_END(lair);
|
||||
gOverlayTable[14].start = OVERLAY_START(fight);
|
||||
gOverlayTable[14].end = OVERLAY_END(fight);
|
||||
RECOMP_PATCH void boot___osInitialize_common(void) {
|
||||
// Nothing of the original function needs to happen, so the body can be empty besides the overlay load.
|
||||
|
||||
// @recomp Load core1.
|
||||
recomp_load_overlays_by_rom((u32)core1_ROM_START, core1_VRAM, core1_ROM_END - core1_ROM_START);
|
||||
@@ -113,7 +84,7 @@ RECOMP_PATCH void overlay_load(
|
||||
u32 uncompressed_rom_start = rom_start;
|
||||
u32 uncompressed_rom_size = rom_end - rom_start;
|
||||
u32 overlay_vram_start = ram_start;
|
||||
void* sp34;
|
||||
u8* sp34;
|
||||
u32 sp30;
|
||||
u32 sp2C;
|
||||
u32 *tmp;
|
||||
@@ -137,10 +108,10 @@ RECOMP_PATCH void overlay_load(
|
||||
sp34 = &D_8002D500;
|
||||
}
|
||||
piMgr_read(sp34, rom_start, rom_end - rom_start);
|
||||
rarezip_uncompress(&sp34, &ram_start);
|
||||
rarezip_uncompress(&sp34, (u8**)&ram_start);
|
||||
sp2C = D_8027BF2C;
|
||||
sp30 = D_8027BF30;
|
||||
rarezip_uncompress(&sp34, &ram_start);
|
||||
rarezip_uncompress(&sp34, (u8**)&ram_start);
|
||||
|
||||
if(bss_start){
|
||||
bzero((void*)bss_start, bss_end - bss_start);
|
||||
|
||||
@@ -0,0 +1,295 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "functions.h"
|
||||
#include "rand.h"
|
||||
#include "core1/ml.h"
|
||||
#include "core2/anctrl.h"
|
||||
#include "core2/modelRender.h"
|
||||
#include "core2/particle.h"
|
||||
#include "core2/timedfunc.h"
|
||||
|
||||
// 2 bytes of padding between alpha and particleAccerationRange_4C. Must be at least 16-bit to fit the full range of PARTICLE_EMITTER_MAX_ID.
|
||||
#define PARTICLE_EMITTER_ID(x) (*(u16*)&((x)->pad4A))
|
||||
|
||||
// 2 bytes of padding between unk104 and unk108. Must be at least 16-bit to fit the full range of PARTICLE_EMITTER_TRANSFORM_ID_COUNT.
|
||||
#define PARTICLE_EMITTER_SPAWN_COUNT(x) (*(u16*)&((x)->pad106))
|
||||
|
||||
// 2 bytes of padding after unk5C (skipping 1 byte for alignment). Must be at least as bit as the emitter spawn count field.
|
||||
#define PARTICLE_ID(x) (*(u16*)&(&(x)->unk5C)[2])
|
||||
|
||||
u32 particle_emitter_spawn_count = 0;
|
||||
|
||||
extern ParticleEmitter **partEmitMgr;
|
||||
extern s32 partEmitMgrLength;
|
||||
|
||||
typedef struct particle{
|
||||
f32 acceleration[3];
|
||||
f32 fade;
|
||||
f32 frame; //frame
|
||||
f32 framerate; //framerate
|
||||
f32 position[3];
|
||||
f32 rotation[3];
|
||||
f32 scale; //size
|
||||
f32 initialSize_34; //initial_size
|
||||
f32 finalSizeDiff; //delta_size
|
||||
f32 angluar_velocity[3];
|
||||
f32 age_48;
|
||||
f32 lifetime_4C;
|
||||
f32 velocity_50[3];
|
||||
u8 unk5C;
|
||||
//u8 pad5D[3];
|
||||
} Particle;
|
||||
|
||||
extern Gfx D_80368978[];
|
||||
extern Gfx D_80368940[];
|
||||
|
||||
void __particleEmitter_drawOnPass(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, Vtx **vtx, u32 draw_pass);
|
||||
void func_803382E4(s32);
|
||||
void func_80338338(s32, s32, s32);
|
||||
void func_803382B4(s32 arg0, s32 arg1, s32 arg2, s32 arg3);
|
||||
void func_80338370(void);
|
||||
void func_80335D30(Gfx **);
|
||||
void func_802EED1C(ParticleEmitter *this, f32 age, f32 arg2[3]);
|
||||
void func_80344C2C(bool arg0);
|
||||
void func_80344720(BKSpriteDisplayData *arg0, s32 frame, bool mirrored, f32 position[3], f32 rotation[3], f32 scale[3], Gfx **gfx, Mtx **mtx);
|
||||
void func_80344424(BKSpriteDisplayData *arg0, s32 frame, bool mirrored, f32 position[3], f32 scale[3], f32 rotation, Gfx **gfx, Mtx **mtx);
|
||||
void func_8033687C(Gfx **);
|
||||
|
||||
// @recomp Patched to tag particles as they're drawn.
|
||||
RECOMP_PATCH void __particleEmitter_drawOnPass(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, Vtx **vtx, u32 draw_pass){
|
||||
f32 position[3];
|
||||
f32 flat_rotation[3];
|
||||
f32 scale[3];
|
||||
Particle *iPtr;
|
||||
|
||||
// @recomp Get the particle emitter's ID.
|
||||
u32 cur_particle_emitter_index = PARTICLE_EMITTER_ID(this);
|
||||
|
||||
if(reinterpret_cast(u32, draw_pass) != (this->draw_mode & 0x4) != 0)
|
||||
return;
|
||||
|
||||
if(this->model_20 != NULL){
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
position[0] = iPtr->position[0] + this->unk4[0];
|
||||
position[1] = iPtr->position[1] + this->unk4[1];
|
||||
position[2] = iPtr->position[2] + this->unk4[2];
|
||||
if( 0.0f != this->fade_in || 1.0 != this->fade_out || this->alpha != 0xff ){
|
||||
modelRender_setAlpha((s32) (iPtr->fade*this->alpha));
|
||||
}//L802EEF5C
|
||||
modelRender_setDepthMode((this->draw_mode & PART_EMIT_NO_DEPTH)? MODEL_RENDER_DEPTH_NONE : MODEL_RENDER_DEPTH_FULL);
|
||||
// @recomp Get the particle's ID. Restrict it to the model particle emitter ID count to account for the smaller number of base transform IDs for
|
||||
// model particle emitters.
|
||||
u32 particle_id = PARTICLE_ID(iPtr) % PARTICLE_EMITTER_MODEL_ID_COUNT;
|
||||
// @recomp Set the current model transform ID. Divide the total per-emitter transform ID count by the per-model transform ID count to get the
|
||||
// base transform ID for the current model particle.
|
||||
cur_drawn_model_transform_id =
|
||||
PARTICLE_TRANSFORM_ID_START +
|
||||
PARTICLE_EMITTER_TRANSFORM_ID_COUNT * cur_particle_emitter_index +
|
||||
particle_id * PARTICLE_EMITTER_MODEL_ID_COUNT;
|
||||
modelRender_draw(gfx, mtx, position, iPtr->rotation, iPtr->scale, NULL, this->model_20);
|
||||
// @recomp Reset the current model transform ID.
|
||||
cur_drawn_model_transform_id = 0;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(this->unk34){//L802EEFC4
|
||||
if( this->rgb[0] != 0xff
|
||||
|| this->rgb[1] != 0xff
|
||||
|| this->rgb[2] != 0xff
|
||||
|| this->alpha != 0xff
|
||||
){
|
||||
func_803382E4((this->draw_mode & PART_EMIT_NO_DEPTH)? 9: 0xf);
|
||||
func_80338338(this->rgb[0], this->rgb[1], this->rgb[2]);
|
||||
func_803382B4(
|
||||
(this->rgb[0] < 8)? 0 : this->rgb[0] - 8,
|
||||
(this->rgb[1] < 8)? 0 : this->rgb[1] - 8,
|
||||
(this->rgb[2] < 8)? 0 : this->rgb[2] - 8,
|
||||
(this->draw_mode & PART_EMIT_NO_OPA)? 0xff : this->alpha
|
||||
);
|
||||
func_80338370();
|
||||
func_80335D30(gfx);
|
||||
}
|
||||
else if(this->draw_mode & PART_EMIT_NO_DEPTH){//L802EF0C0
|
||||
gSPDisplayList((*gfx)++, D_80368978);
|
||||
}
|
||||
else{//L802EF0EC
|
||||
gSPDisplayList((*gfx)++, D_80368940);
|
||||
}//L802EF10C
|
||||
flat_rotation[0] = 90.0f;
|
||||
flat_rotation[1] = 0.0f;
|
||||
flat_rotation[2] = 0.0f;
|
||||
for(iPtr = this->pList_start_124; iPtr < this->pList_end_128; iPtr++){
|
||||
gDPSetPrimColor((*gfx)++, 0, 0, this->rgb[0], this->rgb[1], this->rgb[2], iPtr->fade*this->alpha);
|
||||
position[0] = iPtr->position[0] + this->unk4[0];
|
||||
position[1] = iPtr->position[1] + this->unk4[1];
|
||||
position[2] = iPtr->position[2] + this->unk4[2];
|
||||
|
||||
scale[0] = iPtr->scale;
|
||||
scale[1] = iPtr->scale;
|
||||
scale[2] = iPtr->scale;
|
||||
if(0.0f != this->unk108){
|
||||
func_802EED1C(this, iPtr->age_48, scale);
|
||||
}
|
||||
func_80344C2C(this->unk0_16);
|
||||
// @recomp Set the matrix group for this particle.
|
||||
u32 transform_id =
|
||||
PARTICLE_TRANSFORM_ID_START +
|
||||
PARTICLE_EMITTER_TRANSFORM_ID_COUNT * cur_particle_emitter_index +
|
||||
PARTICLE_ID(iPtr);
|
||||
gEXMatrixGroupDecomposedNormal((*gfx)++, transform_id, G_EX_PUSH, G_MTX_MODELVIEW, G_EX_EDIT_ALLOW);
|
||||
|
||||
if(this->draw_mode & PART_EMIT_ROTATABLE){
|
||||
func_80344720(this->unk34, (s32)iPtr->frame, 0, position, flat_rotation, scale, gfx, mtx);
|
||||
}//L802EF2F8
|
||||
else{
|
||||
func_80344424(this->unk34, (s32)iPtr->frame, 0, position, scale, iPtr->rotation[2], gfx, mtx);
|
||||
}//L802EF324
|
||||
|
||||
// @recomp Pop the particle's matrix group.
|
||||
gEXPopMatrixGroup((*gfx)++, G_MTX_MODELVIEW);
|
||||
}//L802EF338
|
||||
if( this->rgb[0] != 0xff || this->rgb[1] != 0xff || this->rgb[2] != 0xff || this->alpha != 0xff
|
||||
){
|
||||
func_8033687C(gfx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to set an incrementing ID for the emitter.
|
||||
RECOMP_PATCH ParticleEmitter *partEmitMgr_newEmitter(u32 cnt){
|
||||
partEmitMgr = realloc(partEmitMgr, (++partEmitMgrLength)*4);
|
||||
partEmitMgr[partEmitMgrLength - 1] = particleEmitter_new(cnt);
|
||||
partEmitMgr[partEmitMgrLength - 1]->auto_free = TRUE;
|
||||
// @recomp Set the particle emitter's ID based on the emitter spawn count and increment the spawn count.
|
||||
PARTICLE_EMITTER_ID(partEmitMgr[partEmitMgrLength - 1]) = particle_emitter_spawn_count;
|
||||
particle_emitter_spawn_count++;
|
||||
particle_emitter_spawn_count = particle_emitter_spawn_count % PARTICLE_EMITTER_MAX_ID;
|
||||
|
||||
return partEmitMgr[partEmitMgrLength - 1];
|
||||
}
|
||||
|
||||
// @recomp Patched to set an incrementing ID for the particle.
|
||||
RECOMP_PATCH void __particleEmitter_initParticle(ParticleEmitter *this, Particle *particle){
|
||||
particle->acceleration[0] = randf2(this->particleAccerationRange_4C_min_x, this->particleAccerationRange_4C_max_x);
|
||||
particle->acceleration[1] = randf2(this->particleAccerationRange_4C_min_y, this->particleAccerationRange_4C_max_y);
|
||||
particle->acceleration[2] = randf2(this->particleAccerationRange_4C_min_z, this->particleAccerationRange_4C_max_z);
|
||||
particle->unk5C = this->unk64;
|
||||
|
||||
particle->fade = (0.0f == this->fade_in) ? 1.0f : 0;
|
||||
particle->frame = randf2((f32)this->particleStartingFrameRange_84_min, (f32)this->particleStartingFrameRange_84_max);
|
||||
particle->framerate = randf2(this->particleFramerateRange_8C_min, this->particleFramerateRange_8C_max);
|
||||
|
||||
particle->position[0] = this->postion_28[0];
|
||||
particle->position[1] = this->postion_28[1];
|
||||
particle->position[2] = this->postion_28[2];
|
||||
|
||||
particle->position[0] = particle->position[0] + randf2(this->particleSpawnPositionRange_94_min_x, this->particleSpawnPositionRange_94_max_x);
|
||||
particle->position[1] = particle->position[1] + randf2(this->particleSpawnPositionRange_94_min_y, this->particleSpawnPositionRange_94_max_y);
|
||||
particle->position[2] = particle->position[2] + randf2(this->particleSpawnPositionRange_94_min_z, this->particleSpawnPositionRange_94_max_z);
|
||||
|
||||
particle->initialSize_34 = particle->scale = randf2(this->particleStartingScaleRange_AC_min, this->particleStartingScaleRange_AC_max);
|
||||
if(0.0f == this->particleFinalScaleRange_B4_min && 0.0f == this->particleFinalScaleRange_B4_max)
|
||||
particle->finalSizeDiff = 0.0f;
|
||||
else
|
||||
particle->finalSizeDiff = randf2(this->particleFinalScaleRange_B4_min, this->particleFinalScaleRange_B4_max)- particle->initialSize_34;
|
||||
|
||||
particle->rotation[2] = 0.0f;
|
||||
particle->rotation[1] = 0.0f;
|
||||
particle->rotation[0] = 0.0f;
|
||||
|
||||
particle->angluar_velocity[0] = randf2(this->unkBC[0], this->unkC8[0]);
|
||||
particle->angluar_velocity[1] = randf2(this->unkBC[1], this->unkC8[1]);
|
||||
particle->angluar_velocity[2] = randf2(this->unkBC[2], this->unkC8[2]);
|
||||
|
||||
particle->age_48 = 0.0f;
|
||||
particle->lifetime_4C = randf2(this->particleLifeTimeRange[0], this->particleLifeTimeRange[1]) + 0.001;
|
||||
if(!this->sphericalParticleVelocity_48){
|
||||
particle->velocity_50[0] = randf2(this->particleVelocityRange_E4.cartisian_min_x, this->particleVelocityRange_E4.cartisian_max_x);
|
||||
particle->velocity_50[1] = randf2(this->particleVelocityRange_E4.cartisian_min_y, this->particleVelocityRange_E4.cartisian_max_y);
|
||||
particle->velocity_50[2] = randf2(this->particleVelocityRange_E4.cartisian_min_z, this->particleVelocityRange_E4.cartisian_max_z);
|
||||
}
|
||||
else{
|
||||
func_80256E24(particle->velocity_50,
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.pitch_min, this->particleVelocityRange_E4.spherical.pitch_max)),
|
||||
mlNormalizeAngle(randf2(this->particleVelocityRange_E4.spherical.yaw_min, this->particleVelocityRange_E4.spherical.yaw_max)),
|
||||
0.0f,
|
||||
0.0f,
|
||||
randf2(this->particleVelocityRange_E4.spherical.radius_min, this->particleVelocityRange_E4.spherical.radius_max)
|
||||
);
|
||||
}
|
||||
|
||||
// @recomp Set the particle's ID based on the particle emitters's spawn count.
|
||||
PARTICLE_ID(particle) = PARTICLE_EMITTER_SPAWN_COUNT(this);
|
||||
// @recomp Increment the particle emitter's spawn count.
|
||||
PARTICLE_EMITTER_SPAWN_COUNT(this)++;
|
||||
}
|
||||
|
||||
extern void mlMtxRotatePYR(f32, f32, f32);
|
||||
|
||||
typedef struct {
|
||||
BKSprite *sprite_0;
|
||||
f32 position[3];
|
||||
f32 rotation[3];
|
||||
f32 unk1C;
|
||||
s16 unk20[2];
|
||||
u8 color[3];
|
||||
u8 unk27;
|
||||
u32 frame_28_31:8;
|
||||
u32 unk28_23:2;
|
||||
u32 unk28_21:8;
|
||||
u32 unk28_13:1;
|
||||
u32 unk28_12:1;
|
||||
u32 pad28_11:12;
|
||||
} Struct_B8860_0s;
|
||||
|
||||
void projectile_setRoll(u8 indx, f32 angle);
|
||||
f32 projectile_getRoll(u8 indx);
|
||||
void projectile_freeByIndex(u8 arg0);
|
||||
void func_803382FC(s32);
|
||||
void func_80338308(s32 arg0, s32 arg1);
|
||||
void func_8033837C(s32 arg0);
|
||||
void spriteRender_draw(Gfx **gfx, Vtx **vtx, BKSprite *sp, u32 frame);
|
||||
|
||||
extern Struct_B8860_0s D_80385000[0x32];
|
||||
|
||||
// @recomp Patched to tag projectiles.
|
||||
RECOMP_PATCH void func_8033F7F0(u8 indx, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Struct_B8860_0s *sp54;
|
||||
f32 sp48[3];
|
||||
f32 sp3C[3];
|
||||
f32 sp30[3];
|
||||
|
||||
sp54 = &D_80385000[indx];
|
||||
if(sp54->unk28_23 != 1){
|
||||
ml_vec3f_copy(sp48, sp54->position);
|
||||
sp48[1] += (sp54->unk1C*sp54->unk20[1])/100.0;
|
||||
viewport_getPosition_vec3f(sp3C);
|
||||
ml_vec3f_diff_copy(sp30, sp48, sp3C);
|
||||
if(sp54->unk28_12){
|
||||
mlMtxSet(viewport_getMatrix());
|
||||
}
|
||||
else{
|
||||
mlMtxIdent();
|
||||
}
|
||||
mlMtxRotatePYR(sp54->rotation[0], sp54->rotation[1], sp54->rotation[2]);
|
||||
func_80252330(sp30[0], sp30[1], sp30[2]);
|
||||
mlMtxApply(*mtx);
|
||||
gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
func_803382E4(sp54->unk28_21);
|
||||
func_80338338(sp54->color[0], sp54->color[1],sp54->color[2]);
|
||||
func_803382FC(sp54->unk27);
|
||||
func_80338308(sp54->unk20[0], sp54->unk20[1]);
|
||||
func_8033837C(1);
|
||||
func_80338370();
|
||||
|
||||
// @recomp Set a matrix group before drawing the sprite.
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, PROJECTILE_TRANSFORM_ID_START + indx, G_EX_PUSH, G_MTX_MODELVIEW, G_EX_EDIT_NONE);
|
||||
|
||||
spriteRender_draw(gfx, vtx, sp54->sprite_0, sp54->frame_28_31);
|
||||
gSPPopMatrix((*gfx)++, G_MTX_MODELVIEW);
|
||||
|
||||
// @recomp Clear the matrix group.
|
||||
gEXPopMatrixGroup((*gfx)++, G_MTX_MODELVIEW);
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,7 @@ void osWriteBackDCacheAll(void);
|
||||
#define strchr strchr_recomp
|
||||
#define strlen strlen_recomp
|
||||
#define osVirtualToPhysical osVirtualToPhysical_recomp
|
||||
#define osPiStartDma osPiStartDma_recomp
|
||||
|
||||
#include "ultra64.h"
|
||||
#pragma GCC diagnostic push
|
||||
@@ -47,29 +48,26 @@ void osWriteBackDCacheAll(void);
|
||||
)
|
||||
#endif
|
||||
|
||||
#define gEXMatrixGroupNoInterpolation(cmd, push, proj, edit) \
|
||||
gEXMatrixGroup(cmd, G_EX_ID_IGNORE, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
#define gEXMatrixGroupInterpolateOnlyTiles(cmd, push, proj, edit) \
|
||||
gEXMatrixGroup(cmd, G_EX_ID_IGNORE, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
#define gEXMatrixGroupSimpleNormal(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroup(cmd, id, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_ASPECT_AUTO, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupSimpleVerts(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroup(cmd, id, G_EX_INTERPOLATE_SIMPLE, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_ASPECT_AUTO, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupDecomposedNormal(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupDecomposedSkipRot(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupDecomposedSkipPosRot(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
|
||||
#define gEXMatrixGroupDecomposedSkipAll(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupDecomposedVerts(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit)
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_LINEAR, edit, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_AUTO)
|
||||
|
||||
#define gEXMatrixGroupDecomposedVertsOrderAuto(cmd, id, push, proj, edit) \
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_AUTO, edit)
|
||||
gEXMatrixGroupDecomposed(cmd, id, push, proj, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_ORDER_AUTO, edit, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_AUTO)
|
||||
|
||||
typedef int bool;
|
||||
|
||||
@@ -78,4 +76,9 @@ void memcpy(void * dst, void *src, int size);
|
||||
char* strchr(const char* s, int c);
|
||||
int recomp_printf(const char* fmt, ...);
|
||||
|
||||
void set_additional_model_scale(f32 x, f32 y, f32 z);
|
||||
void set_frustum_checks_enabled(int enabled);
|
||||
void set_all_interpolation_skipped(bool skipped);
|
||||
bool all_interpolation_skipped();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -17,3 +17,12 @@ RECOMP_EXPORT int recomp_printf(const char* fmt, ...) {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void rmonPrintf_recomp(const char* fmt, ...) {
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
int ret = _Printf(&proutPrintf, NULL, fmt, args);
|
||||
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,350 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "core1/core1.h"
|
||||
#include "functions.h"
|
||||
#include "../src/core2/gc/zoombox.h"
|
||||
|
||||
extern u32 D_803835E0;
|
||||
void func_802BBD2C(f32 *arg0, f32 *arg1);
|
||||
s32 func_80320708(void);
|
||||
void spawnQueue_unlock(void);
|
||||
void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
bool mapModel_has_xlu_bin(void);
|
||||
void mapModel_opa_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
int game_is_frozen(void);
|
||||
void func_80322E64(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void player_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_80302C94(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void jiggylist_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_803500D8(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_802F2ED0(Struct64s *arg0, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
Struct64s* func_8032994C(void);
|
||||
void partEmitMgr_drawPass0(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void mapModel_xlu_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_8032D3D8(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void partEmitMgr_drawPass1(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void func_8034F6F0(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void func_802D520C(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void partEmitMgr_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void func_80350818(Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void func_802BBD0C(Gfx **gdl, Mtx **mptr, Vtx **vptr);
|
||||
void spawnQueue_lock(void);
|
||||
s32 getGameMode(void);
|
||||
void sfx_rand_sync_to_rand(void);
|
||||
void func_803162B4(GcZoombox *this);
|
||||
void rand_sync_to_sfx_rand(void);
|
||||
void func_80338338(s32, s32, s32);
|
||||
void func_803382FC(s32);
|
||||
void func_803382E4(s32);
|
||||
void func_8033687C(Gfx **);
|
||||
void func_80335D30(Gfx **);
|
||||
void func_80344090(BKSpriteDisplayData *self, s32 frame, Gfx **gfx);
|
||||
|
||||
// @recomp Patched to set the projection transform ID for the main projection.
|
||||
RECOMP_PATCH void func_80334540(Gfx** gdl, Mtx **mptr, Vtx **vptr) {
|
||||
f32 sp44;
|
||||
f32 sp40;
|
||||
|
||||
if (D_803835E0 == 0) {
|
||||
drawRectangle2D(gdl, 0, 0, gFramebufferWidth, gFramebufferHeight, 0, 0, 0);
|
||||
func_802BBD2C(&sp44, &sp40);
|
||||
viewport_setNearAndFar(sp44, sp40);
|
||||
|
||||
// @recomp Set the perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = PROJECTION_GAMEPLAY_TRANSFORM_ID;
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
return;
|
||||
}
|
||||
if (func_80320708() == 0) {
|
||||
eeprom_writeBlocks(0, 0, (void*)0x80BC7230, EEPROM_MAXBLOCKS);
|
||||
}
|
||||
spawnQueue_unlock();
|
||||
sky_draw(gdl, mptr, vptr);
|
||||
func_802BBD2C(&sp44, &sp40);
|
||||
viewport_setNearAndFar(sp44, sp40);
|
||||
|
||||
// @recomp Set the perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = PROJECTION_GAMEPLAY_TRANSFORM_ID;
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
if (mapModel_has_xlu_bin() != 0) {
|
||||
mapModel_opa_draw(gdl, mptr, vptr);
|
||||
if (game_is_frozen() == 0) {
|
||||
func_80322E64(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
player_draw(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_80302C94(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
jiggylist_draw(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_803500D8(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_802F2ED0(func_8032994C(), gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
partEmitMgr_drawPass0(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
mapModel_xlu_draw(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_8032D3D8(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
partEmitMgr_drawPass1(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_8034F6F0(gdl, mptr, vptr);
|
||||
}
|
||||
func_802D520C(gdl, mptr, vptr);
|
||||
} else {
|
||||
mapModel_opa_draw(gdl, mptr, vptr);
|
||||
func_80322E64(gdl, mptr, vptr);
|
||||
func_8034F6F0(gdl, mptr, vptr);
|
||||
player_draw(gdl, mptr, vptr);
|
||||
func_80302C94(gdl, mptr, vptr);
|
||||
func_8032D3D8(gdl, mptr, vptr);
|
||||
jiggylist_draw(gdl, mptr, vptr);
|
||||
func_803500D8(gdl, mptr, vptr);
|
||||
func_802F2ED0(func_8032994C(), gdl, mptr, vptr);
|
||||
func_802D520C(gdl, mptr, vptr);
|
||||
partEmitMgr_draw(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_80350818(gdl, mptr, vptr);
|
||||
}
|
||||
if (game_is_frozen() == 0) {
|
||||
func_802BBD0C(gdl, mptr, vptr);
|
||||
}
|
||||
spawnQueue_lock();
|
||||
|
||||
// @recomp Clear the perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = 0;
|
||||
}
|
||||
|
||||
void actor_predrawMethod(Actor *);
|
||||
void actor_postdrawMethod(ActorMarker *);
|
||||
extern bool D_8037DE84;
|
||||
|
||||
// @recomp Patched to set the transform ID for the press start projection.
|
||||
RECOMP_PATCH Actor *chOverlayPressStart_draw(ActorMarker *marker, Gfx **gdl, Mtx **mptr, Vtx **vptr){
|
||||
Actor * actor;
|
||||
f32 sp58[3];
|
||||
f32 sp4C[3];
|
||||
f32 sp40[3];
|
||||
f32 sp34[3];
|
||||
|
||||
|
||||
actor = marker_getActor(marker);
|
||||
if(D_8037DE84)
|
||||
return actor;
|
||||
|
||||
modelRender_preDraw((GenFunction_1)actor_predrawMethod, (s32)actor);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
|
||||
viewport_backupState();
|
||||
{sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 1312.5f;};
|
||||
{sp4C[0] = 0.0f; sp4C[1] = 0.0f; sp4C[2] = 0.0f;};
|
||||
viewport_setPosition_vec3f(sp58);
|
||||
viewport_setRotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
|
||||
// @recomp Record the current projection transform, then set the projection transform ID for the press start projection.
|
||||
s32 prev_perspective_projection_transform = cur_perspective_projection_transform_id;
|
||||
cur_perspective_projection_transform_id = PROJECTION_PRESS_START_TRANSFORM_ID;
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
{sp40[0] = 0.0f; sp40[1] = 0.0f; sp40[2] = 0.0f;};
|
||||
{sp34[0] = 0.0f; sp34[1] = 400.0f; sp34[2] = 0.0f;};
|
||||
modelRender_draw(gdl, mptr, sp40, 0, 1.0f, sp34, marker_loadModelBin(marker));
|
||||
|
||||
// @recomp Restore the previous perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = prev_perspective_projection_transform;
|
||||
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gdl, mptr);
|
||||
|
||||
return actor;
|
||||
}
|
||||
|
||||
#define ASSET_54D_MODEL_BK_TITLE_LOGO 0x54D
|
||||
#define ASSET_56C_MODEL_THE_END 0x56C
|
||||
|
||||
// @recomp Patched to set the transform ID for the title logo and copyright text projections.
|
||||
RECOMP_PATCH Actor *func_802DC7E0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this;
|
||||
f32 sp58[3];
|
||||
f32 sp4C[3];
|
||||
f32 sp40[3];
|
||||
f32 sp34[3];
|
||||
|
||||
this = marker_getActor(marker);
|
||||
modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
|
||||
viewport_backupState();
|
||||
sp58[0] = 0.0f;
|
||||
sp58[1] = 0.0f;
|
||||
sp58[2] = 860.0f;
|
||||
sp4C[0] = 0.0f;
|
||||
sp4C[1] = 0.0f;
|
||||
sp4C[2] = 0.0f;
|
||||
viewport_setPosition_vec3f(sp58);
|
||||
viewport_setRotation_vec3f(sp4C);
|
||||
viewport_update();
|
||||
|
||||
// @recomp Record the current projection transform, then set the projection transform ID for the projection determined by the model ID.
|
||||
s32 prev_perspective_projection_transform = cur_perspective_projection_transform_id;
|
||||
if (marker->modelId == ASSET_54D_MODEL_BK_TITLE_LOGO) {
|
||||
cur_perspective_projection_transform_id = PROJECTION_BK_LOGO_TRANSFORM_ID;
|
||||
}
|
||||
else if (marker->modelId == ASSET_54E_MODEL_COPYRIGHT_OVERLAY) {
|
||||
cur_perspective_projection_transform_id = PROJECTION_COPYRIGHT_TRANSFORM_ID;
|
||||
}
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
sp40[0] = 0.0f;
|
||||
sp40[1] = 0.0f;
|
||||
sp40[2] = 0.0f;
|
||||
sp34[0] = 0.0f;
|
||||
sp34[1] = -87.0f;
|
||||
sp34[2] = 0.0f;
|
||||
modelRender_draw(gfx, mtx, sp40, NULL, 1.0f, sp34, marker_loadModelBin(marker));
|
||||
|
||||
// @recomp Restore the previous perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = prev_perspective_projection_transform;
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @recomp Patched to set the transform ID for the game over and THE END projections.
|
||||
RECOMP_PATCH Actor *func_802DC320(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Actor *this;
|
||||
f32 vp_position[3];
|
||||
f32 vp_rotation[3];
|
||||
f32 model_position[3];
|
||||
f32 sp34[3];
|
||||
|
||||
this = marker_getActor(marker);
|
||||
modelRender_preDraw( (GenFunction_1)actor_predrawMethod, (s32)this);
|
||||
modelRender_postDraw((GenFunction_1)actor_postdrawMethod, (s32)marker);
|
||||
viewport_backupState();
|
||||
vp_position[0] = 0.0f;
|
||||
vp_position[1] = 0.0f;
|
||||
vp_position[2] = 937.5f;
|
||||
vp_rotation[0] = 0.0f;
|
||||
vp_rotation[1] = 0.0f;
|
||||
vp_rotation[2] = 0.0f;
|
||||
viewport_setPosition_vec3f(vp_position);
|
||||
viewport_setRotation_vec3f(vp_rotation);
|
||||
viewport_update();
|
||||
|
||||
// @recomp Record the current projection transform, then set the projection transform ID for the projection determined by the model ID.
|
||||
s32 prev_perspective_projection_transform = cur_perspective_projection_transform_id;
|
||||
if (marker->modelId == ASSET_54C_MODEL_GAME_OVER) {
|
||||
cur_perspective_projection_transform_id = PROJECTION_GAME_OVER_TRANSFORM_ID;
|
||||
}
|
||||
else if (marker->modelId == ASSET_56C_MODEL_THE_END) {
|
||||
cur_perspective_projection_transform_id = PROJECTION_THE_END_TRANSFORM_ID;
|
||||
}
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
model_position[0] = 0.0f;
|
||||
model_position[1] = 0.0f;
|
||||
model_position[2] = 0.0f;
|
||||
sp34[0] = 0.0f;
|
||||
sp34[1] = 137.5f;
|
||||
sp34[2] = 0.0f;
|
||||
modelRender_draw(gfx, mtx, model_position, NULL, 1.0f, sp34, marker_loadModelBin(marker));
|
||||
|
||||
// @recomp Restore the previous perpsective projection transform ID.
|
||||
cur_perspective_projection_transform_id = prev_perspective_projection_transform;
|
||||
viewport_restoreState();
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
return this;
|
||||
}
|
||||
|
||||
// @recomp Patched to set the zoombox's model transform ID.
|
||||
RECOMP_PATCH void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx) {
|
||||
f32 sp5C[3];
|
||||
f32 sp50[3];
|
||||
f32 sp44[3];
|
||||
f32 sp38[3];
|
||||
f32 sp34;
|
||||
|
||||
sp34 = viewport_transformCoordinate(this->unk170, this->unk172, sp50, sp5C);
|
||||
if (this->unk1A4_24) {
|
||||
sp5C[1] += 180.0f;
|
||||
sp5C[0] -= 2*sp5C[0];
|
||||
}
|
||||
sp38[0] = 0.0f; sp38[1] = 0.0f; sp38[2] = 0.0f;
|
||||
sp44[0] = 0.0f; sp44[1] = 0.0f; sp44[2] = 0.0f;
|
||||
func_8033A308(sp44);
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
|
||||
if (this->anim_ctrl != NULL) {
|
||||
anctrl_drawSetup(this->anim_ctrl, sp50, 1);
|
||||
}
|
||||
|
||||
// @recomp Set the model transform ID.
|
||||
u32 prev_transform_id = cur_drawn_model_transform_id;
|
||||
cur_drawn_model_transform_id = ZOOMBOX_TRANSFORM_ID_START + this->portrait_id;
|
||||
|
||||
modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model);
|
||||
|
||||
// @recomp Reset the model transform ID.
|
||||
cur_drawn_model_transform_id = prev_transform_id;
|
||||
}
|
||||
|
||||
// @recomp Patched to set the zoombox portrait's model and ortho projection transform IDs.
|
||||
RECOMP_PATCH void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BKSpriteDisplayData *arg5, f32 arg6) {
|
||||
f32 sp2C[3];
|
||||
f32 temp_f12;
|
||||
|
||||
if (this->portrait_id == ZOOMBOX_SPRITE_46_TUMBLAR) {
|
||||
arg6 = 0.75f;
|
||||
}
|
||||
func_80338338(0xFF, 0xFF, 0xFF);
|
||||
func_803382FC(this->unk168 * arg6);
|
||||
func_803382E4(5);
|
||||
func_80335D30(gfx);
|
||||
|
||||
// @recomp Set the ortho projection transform ID for the portrait.
|
||||
cur_ortho_projection_transform_id = PROJECTION_PORTRAIT_TRANSFORM_ID_START + this->portrait_id;
|
||||
|
||||
viewport_setRenderViewportAndOrthoMatrix(gfx, mtx);
|
||||
|
||||
// @recomp Clear the current ortho projection transform ID.
|
||||
cur_ortho_projection_transform_id = 0;
|
||||
|
||||
mlMtxIdent();
|
||||
if (this->unk1A4_24) {
|
||||
mlMtxRotYaw(180.0f);
|
||||
sp2C[0] = (f32) this->unk170 - ((f32) arg3 * this->unk198);
|
||||
} else {
|
||||
sp2C[0] = (f32) this->unk170 + ((f32) arg3 * this->unk198);
|
||||
}
|
||||
sp2C[1] = this->unk172 + ((f32) arg4 * this->unk198);
|
||||
sp2C[2] = -10.0f;
|
||||
func_80252330((sp2C[0] * 4.0f) - ((f32)gFramebufferWidth * 2), ((f32)gFramebufferHeight * 2) - (sp2C[1] * 4.0f), sp2C[2]);
|
||||
temp_f12 = (f32) ((f64) this->unk198 * 0.8);
|
||||
mlMtxScale_xyz(temp_f12, temp_f12, 1.0f);
|
||||
mlMtxApply(*mtx);
|
||||
gSPMatrix((*gfx)++, (*mtx)++, G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
// @recomp Create a matrix group for the portrait's model matrix.
|
||||
gEXMatrixGroupDecomposedVerts((*gfx)++, ZOOMBOX_PORTRAIT_TRANSFORM_ID_START + this->portrait_id, G_EX_PUSH, G_MTX_MODELVIEW, G_EX_EDIT_NONE);
|
||||
|
||||
modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE);
|
||||
func_80344090(arg5, this->unk186, gfx);
|
||||
func_8033687C(gfx);
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
|
||||
// @recomp Pop the model matrix group.
|
||||
gEXPopMatrixGroup((*gfx)++, G_MTX_MODELVIEW);
|
||||
}
|
||||
@@ -0,0 +1,406 @@
|
||||
#include "patches.h"
|
||||
#include "prop.h"
|
||||
#include "actor.h"
|
||||
#include "functions.h"
|
||||
#include "object_extension_funcs.h"
|
||||
#include "bk_api.h"
|
||||
#include "core2/coords.h"
|
||||
#include "core2/file.h"
|
||||
|
||||
// Max props per cube, limited by cube->prop2Cnt which is only 6 bits.
|
||||
#define CUBE_MAX_PROPS 63
|
||||
// Hardcoded cube limit, TODO implement a better solution that doesn't involve dedicating this much memory and allows for larger cube counts.
|
||||
#define MAX_CUBES 4000
|
||||
|
||||
typedef struct {
|
||||
u32 prop_handles[CUBE_MAX_PROPS];
|
||||
} CubeHandle;
|
||||
|
||||
CubeHandle all_cube_handles[MAX_CUBES];
|
||||
CubeHandle cube_3C_handle;
|
||||
CubeHandle cube_40_handle;
|
||||
|
||||
extern s32 *D_8036A9E0;
|
||||
extern s32 D_80383450[0x40];
|
||||
|
||||
void vtxList_getBounds_s32(BKVertexList *, s32[3], s32[3]);
|
||||
enum map_e map_get(void);
|
||||
void code7AF80_initCubeFromFile(File *file_ptr, Cube *cube);
|
||||
bool func_80305D14(void);
|
||||
void func_80305CD8(s32 idx, s32 count);
|
||||
s32 func_803058C0(f32 arg0);
|
||||
void code_A5BC0_initCubePropActorProp(Cube*);
|
||||
void func_80332B2C(ActorMarker * arg0);
|
||||
void bitfield_free(s32 *arg0);
|
||||
|
||||
extern struct {
|
||||
Cube *cubes;
|
||||
f32 margin;
|
||||
s32 min[3];
|
||||
s32 max[3];
|
||||
s32 stride[2];
|
||||
s32 cubeCnt;
|
||||
s32 unk2C;
|
||||
s32 width[3];
|
||||
Cube *unk3C; // fallback cube?
|
||||
Cube *unk40; // some other fallback cube?
|
||||
s32 unk44; // index of some sort
|
||||
} sCubeList;
|
||||
|
||||
typedef struct {
|
||||
s16 map_id; //enum map_e
|
||||
s16 opa_model_id; //enum asset_e level_model_id
|
||||
s16 xlu_model_id; //enum asset_e level2_model_id
|
||||
s16 unk6[3]; // min bounds (for cubes?)
|
||||
s16 unkC[3]; // max bounds (for cubes?)
|
||||
// u8 pad12[0x2];
|
||||
f32 scale;
|
||||
}MapModelDescription;
|
||||
|
||||
extern struct {
|
||||
void *unk0;
|
||||
void *unk4;
|
||||
BKCollisionList *collision_opa;
|
||||
BKCollisionList *collision_xlu;
|
||||
BKModel *model_opa;
|
||||
BKModel *model_xlu;
|
||||
BKModelBin *model_bin_opa;
|
||||
BKModelBin *model_bin_xlu;
|
||||
s32 unk20;
|
||||
struct5Bs *unk24;
|
||||
MapModelDescription *description;
|
||||
u8 env_red;
|
||||
u8 env_green;
|
||||
u8 env_blue;
|
||||
f32 scale;
|
||||
}mapModel;
|
||||
|
||||
void recomp_abort(const char* msg);
|
||||
|
||||
// @recomp Patched to verify the cube count is less than the fixed amount.
|
||||
RECOMP_PATCH void mapModel_getCubeBounds(s32 min[3], s32 max[3]) {
|
||||
vtxList_getBounds_s32(model_getVtxList(mapModel.model_bin_opa), min, max);
|
||||
coords_scale(min, max, 1000);
|
||||
min[0] = min[0] + mapModel.description->unk6[0];
|
||||
min[1] = min[1] + mapModel.description->unk6[1];
|
||||
min[2] = min[2] + mapModel.description->unk6[2];
|
||||
max[0] = max[0] + mapModel.description->unkC[0];
|
||||
max[1] = max[1] + mapModel.description->unkC[1];
|
||||
max[2] = max[2] + mapModel.description->unkC[2];
|
||||
|
||||
// @recomp Calculate and validate the cube count.
|
||||
u32 width0 = max[0] - min[0] + 1;
|
||||
u32 width1 = max[1] - min[1] + 1;
|
||||
u32 width2 = max[2] - min[2] + 1;
|
||||
u32 stride0 = width0;
|
||||
u32 stride1 = stride0 * width1;
|
||||
u32 cubeCnt = stride1 * width2;
|
||||
|
||||
if (cubeCnt > MAX_CUBES) {
|
||||
recomp_abort("Cube count too high\n");
|
||||
}
|
||||
}
|
||||
|
||||
CubeHandle* get_cube_handle(Cube *cube) {
|
||||
if (cube == sCubeList.unk3C) {
|
||||
return &cube_3C_handle;
|
||||
}
|
||||
else if (cube == sCubeList.unk40) {
|
||||
return &cube_40_handle;
|
||||
}
|
||||
else {
|
||||
s32 cube_index = cube - sCubeList.cubes;
|
||||
if (cube_index < 0 || cube_index >= sCubeList.cubeCnt) {
|
||||
recomp_printf("Invalid cube index %d\n", cube_index);
|
||||
recomp_abort("Got invalid cube\n");
|
||||
}
|
||||
return &all_cube_handles[cube_index];
|
||||
}
|
||||
}
|
||||
|
||||
// Alloc prop handles:
|
||||
// __codeA5BC0_initProp2Ptr
|
||||
// code7AF80_initCubeFromFile (covered by __code7AF80_initCubeFromFile)
|
||||
|
||||
// Delete prop handles:
|
||||
// func_8032D9C0
|
||||
// cube_free
|
||||
|
||||
// Swap prop handles:
|
||||
// __cube_sort
|
||||
|
||||
// Reset all prop handles candidates:
|
||||
// cubeList_free
|
||||
|
||||
// @recomp Patched to create a handle for the new prop.
|
||||
RECOMP_PATCH Prop *__codeA5BC0_initProp2Ptr(Cube *cube) {
|
||||
Prop *sp1C;
|
||||
|
||||
if (cube->prop2Ptr != NULL) {
|
||||
cube->prop2Cnt++;
|
||||
cube->prop2Ptr = realloc(cube->prop2Ptr, cube->prop2Cnt * sizeof(Prop));
|
||||
} else {
|
||||
cube->prop2Cnt = 1;
|
||||
cube->prop2Ptr = malloc(sizeof(Prop));
|
||||
}
|
||||
sp1C = &cube->prop2Ptr[cube->prop2Cnt-1];
|
||||
sp1C->is_actor = FALSE;
|
||||
code_A5BC0_initCubePropActorProp(cube);
|
||||
|
||||
// @recomp Get the cube's prop handle list.
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
u32 prop_index = cube->prop2Cnt - 1;
|
||||
// TODO prop subtypes.
|
||||
cube_handle->prop_handles[prop_index] = recomp_create_object_data(EXTENSION_TYPE_PROP, 0);
|
||||
|
||||
return sp1C;
|
||||
}
|
||||
|
||||
// @recomp Patched to initialize prop handles after a cube has been loaded.
|
||||
RECOMP_PATCH void __code7AF80_initCubeFromFile(Cube *cube, File* file_ptr) {
|
||||
s32 pad[3];
|
||||
|
||||
// @recomp Get the cube's prop handle list.
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
|
||||
// @recomp Free any prop handles that the cube may already have, as this initialization resets the cube's prop list.
|
||||
for (u32 i = 0; i < cube->prop2Cnt; i++) {
|
||||
recomp_destroy_object_data(EXTENSION_TYPE_PROP, cube_handle->prop_handles[i]);
|
||||
cube_handle->prop_handles[i] = 0;
|
||||
}
|
||||
|
||||
while(!file_isNextByteExpected(file_ptr, 1)) {
|
||||
if (file_getNWords_ifExpected(file_ptr, 0, pad, 3)) {
|
||||
file_getNWords(file_ptr, pad, 3);
|
||||
} else if (!file_getNWords_ifExpected(file_ptr, 2, pad, 3) && file_isNextByteExpected(file_ptr, 3)
|
||||
) {
|
||||
code7AF80_initCubeFromFile(file_ptr, cube);
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Initialize prop handles after loading the cube.
|
||||
for (u32 i = 0; i < cube->prop2Cnt; i++) {
|
||||
// TODO prop subtypes.
|
||||
cube_handle->prop_handles[i] = recomp_create_object_data(EXTENSION_TYPE_PROP, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to delete the handle for the deleted prop and shift the remaining prop handles.
|
||||
RECOMP_PATCH s32 func_8032D9C0(Cube *cube, Prop* prop){
|
||||
s32 sp24;
|
||||
s32 tmp;
|
||||
|
||||
// @recomp Get the cube's prop handle list.
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
|
||||
sp24 = 0;
|
||||
if(cube->prop2Cnt != 0){
|
||||
// @recomp Delete the handle for the deleted prop.
|
||||
u32 prop_index = prop - cube->prop2Ptr;
|
||||
|
||||
sp24 = prop->is_3d;
|
||||
if(func_80305D14()){
|
||||
func_80305CD8(func_803058C0(prop->unk4[1]), -1);
|
||||
}
|
||||
|
||||
// @recomp Destroy the prop's extension data.
|
||||
recomp_destroy_object_data(EXTENSION_TYPE_PROP, cube_handle->prop_handles[prop_index]);
|
||||
|
||||
if((prop - cube->prop2Ptr) < (cube->prop2Cnt - 1)){
|
||||
memcpy(prop, prop + 1, (s32)(&cube->prop2Ptr[cube->prop2Cnt-1]) - (s32)(prop));
|
||||
// @recomp Shift the prop handles back by 1 to remove the gap.
|
||||
for (u32 cur_prop_index = prop_index; cur_prop_index < cube->prop2Cnt - 1; cur_prop_index++) {
|
||||
cube_handle->prop_handles[cur_prop_index] = cube_handle->prop_handles[cur_prop_index + 1];
|
||||
}
|
||||
// @recomp Clear the handle at the end of the list to account for the list decreasing in size.
|
||||
cube_handle->prop_handles[cube->prop2Cnt - 1] = 0;
|
||||
}
|
||||
cube->prop2Cnt--;
|
||||
if(cube->prop2Cnt){
|
||||
cube->prop2Ptr = realloc(cube->prop2Ptr, cube->prop2Cnt*sizeof(Prop));
|
||||
code_A5BC0_initCubePropActorProp(cube);
|
||||
}else{
|
||||
free(cube->prop2Ptr);
|
||||
cube->prop2Ptr = NULL;
|
||||
}
|
||||
return sp24;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @recomp Patched to clear all prop handles for a cube when freeing a cube.
|
||||
RECOMP_PATCH void cube_free(Cube *cube){
|
||||
Prop *iProp;
|
||||
|
||||
// @recomp Get the cube's prop handle list.
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
|
||||
// @recomp Delete and clear the cube's prop handles.
|
||||
for (u32 prop_index = 0; prop_index < cube->prop2Cnt; prop_index++) {
|
||||
recomp_destroy_object_data(EXTENSION_TYPE_PROP, cube_handle->prop_handles[prop_index]);
|
||||
cube_handle->prop_handles[prop_index] = 0;
|
||||
}
|
||||
|
||||
if(cube->prop2Ptr){
|
||||
for(iProp = cube->prop2Ptr; iProp < cube->prop2Ptr +cube->prop2Cnt; iProp++){
|
||||
if(iProp->is_actor){
|
||||
func_80332B2C(iProp->actorProp.marker);
|
||||
}
|
||||
}
|
||||
free(cube->prop2Ptr);
|
||||
cube->prop2Ptr = NULL;
|
||||
}
|
||||
if(cube->prop1Ptr){
|
||||
free(cube->prop1Ptr);
|
||||
cube->prop1Ptr = NULL;
|
||||
}
|
||||
cube->prop2Cnt = 0;
|
||||
cube->prop1Cnt = 0;
|
||||
cube->unk0_4 = 0;
|
||||
}
|
||||
|
||||
// @recomp Patched to swap prop handles when sorting a cube's props.
|
||||
RECOMP_PATCH void __cube_sort(Cube *cube, bool global) {
|
||||
s32 ref_position[3];
|
||||
Prop *var_v1;
|
||||
Prop *start_prop;
|
||||
s32 temp_a2;
|
||||
Prop *var_t1;
|
||||
Prop * var_a3;
|
||||
Prop * var_t0;
|
||||
s32 i;
|
||||
Prop *new_var;
|
||||
|
||||
// @recomp Get the cube's prop handle list.
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
|
||||
if (cube->prop2Cnt >= 2) {
|
||||
if (global == 0) {
|
||||
viewport_getPosition_vec3w(ref_position); //distance from viewport
|
||||
} else {
|
||||
ref_position[0] = 0;
|
||||
ref_position[1] = 0;
|
||||
ref_position[2] = 0;
|
||||
}
|
||||
|
||||
//calculate prop distances
|
||||
new_var = var_v1 = cube->prop2Ptr;
|
||||
for(i = 0; i < cube->prop2Cnt; var_v1++, i++){
|
||||
D_80383450[i] = (var_v1->actorProp.x - ref_position[0])*(var_v1->actorProp.x - ref_position[0])
|
||||
+ (var_v1->actorProp.y - ref_position[1])* (var_v1->actorProp.y - ref_position[1])
|
||||
+ (var_v1->actorProp.z - ref_position[2])* (var_v1->actorProp.z - ref_position[2]);
|
||||
}
|
||||
|
||||
//sort prop list
|
||||
start_prop = cube->prop2Ptr;
|
||||
var_t0 = cube->prop2Ptr + (cube->prop2Cnt - 1);
|
||||
do {
|
||||
new_var = start_prop;
|
||||
var_t1 = var_t0;
|
||||
start_prop = NULL;
|
||||
var_v1 = new_var;
|
||||
i = (new_var - cube->prop2Ptr);
|
||||
while(var_v1 < var_t1){
|
||||
if(D_80383450[i] < D_80383450[i + 1]){
|
||||
var_t0 = var_v1 + 1;
|
||||
if (start_prop != 0) {
|
||||
var_t0 = var_v1;
|
||||
} else {
|
||||
start_prop = (var_v1 == cube->prop2Ptr) ? var_v1 : var_v1 - 1;
|
||||
}
|
||||
|
||||
//swap_distances
|
||||
temp_a2 = D_80383450[i];
|
||||
D_80383450[i] = D_80383450[i + 1];
|
||||
D_80383450[i + 1] = temp_a2;
|
||||
|
||||
//swap_props
|
||||
temp_a2 = ((s32*)(&var_v1[0]))[0];
|
||||
((s32*)(&var_v1[0]))[0] = ((s32*)(&var_v1[1]))[0];
|
||||
((s32*)(&var_v1[1]))[0] = temp_a2;
|
||||
|
||||
temp_a2 = ((s32*)(&var_v1[0]))[1];
|
||||
((s32*)(&var_v1[0]))[1] = ((s32*)(&var_v1[1]))[1];
|
||||
((s32*)(&var_v1[1]))[1] = temp_a2;
|
||||
|
||||
temp_a2 = ((s32*)(&var_v1[0]))[2];
|
||||
((s32*)(&var_v1[0]))[2] = ((s32*)(&var_v1[1]))[2];
|
||||
((s32*)(&var_v1[1]))[2] = temp_a2;
|
||||
|
||||
// @recomp Swap prop extension data handles.
|
||||
u32 temp_handle = cube_handle->prop_handles[i];
|
||||
cube_handle->prop_handles[i] = cube_handle->prop_handles[i + 1];
|
||||
cube_handle->prop_handles[i + 1] = temp_handle;
|
||||
}
|
||||
|
||||
var_v1++;
|
||||
i++;
|
||||
}
|
||||
} while (start_prop != NULL);
|
||||
code_A5BC0_initCubePropActorProp(cube);
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Patched to reset the prop handle list.
|
||||
RECOMP_PATCH void cubeList_free(){
|
||||
Cube *iCube;
|
||||
|
||||
for(iCube = sCubeList.cubes; iCube < sCubeList.cubes + sCubeList.cubeCnt; iCube++){
|
||||
cube_free(iCube);
|
||||
}
|
||||
free(sCubeList.cubes);
|
||||
|
||||
if(sCubeList.unk3C){
|
||||
cube_free(sCubeList.unk3C);
|
||||
free(sCubeList.unk3C);
|
||||
}
|
||||
|
||||
if(sCubeList.unk40){
|
||||
cube_free(sCubeList.unk40);
|
||||
free(sCubeList.unk40);
|
||||
}
|
||||
bitfield_free(D_8036A9E0);
|
||||
D_8036A9E0 = NULL;
|
||||
|
||||
// @recomp Reset the prop handle list.
|
||||
recomp_clear_all_object_data(EXTENSION_TYPE_PROP);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT PropExtensionId bkrecomp_extend_prop_all(u32 size) {
|
||||
return recomp_register_object_extension_generic(EXTENSION_TYPE_PROP, size);
|
||||
}
|
||||
|
||||
RECOMP_EXPORT void *bkrecomp_get_extended_prop_data(Cube* cube, Prop* prop, PropExtensionId extension_id) {
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
s32 prop_index = prop - cube->prop2Ptr;
|
||||
if (prop_index < 0 || prop_index >= cube->prop2Cnt) {
|
||||
recomp_printf("bkrecomp_get_extended_prop_data: Invalid Cube/Prop pair\n");
|
||||
recomp_abort("Fatal error in mod - Invalid call to bkrecomp_get_extended_prop_data");
|
||||
}
|
||||
|
||||
// TODO prop subtypes.
|
||||
void* data = recomp_get_object_data(EXTENSION_TYPE_PROP, 0, cube_handle->prop_handles[prop_index], extension_id);
|
||||
if (data == NULL) {
|
||||
recomp_printf("bkrecomp_get_extended_prop_data: Invalid extension id 0x%08X\n", extension_id);
|
||||
recomp_abort("Fatal error in mod - Invalid call to bkrecomp_get_extended_prop_data");
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
RECOMP_EXPORT u32 bkrecomp_get_prop_spawn_index(Cube* cube, Prop* prop) {
|
||||
CubeHandle* cube_handle = get_cube_handle(cube);
|
||||
s32 prop_index = prop - cube->prop2Ptr;
|
||||
if (prop_index < 0 || prop_index >= cube->prop2Cnt) {
|
||||
recomp_printf("bkrecomp_get_prop_spawn_index: Invalid Cube/Prop pair\n");
|
||||
recomp_abort("Fatal error in mod - Invalid call to bkrecomp_get_prop_spawn_index");
|
||||
}
|
||||
|
||||
u32 spawn_index = recomp_get_object_spawn_index(EXTENSION_TYPE_PROP, cube_handle->prop_handles[prop_index]);
|
||||
if (spawn_index == 0xFFFFFFFF) {
|
||||
recomp_printf("bkrecomp_get_prop_spawn_index: Internal error\n");
|
||||
recomp_abort("Fatal error - Internal error in bkrecomp_get_prop_spawn_index");
|
||||
}
|
||||
|
||||
return spawn_index;
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
#include "patches.h"
|
||||
#include "bk_api.h"
|
||||
#include "transform_ids.h"
|
||||
#include "functions.h"
|
||||
#include "core2/vla.h"
|
||||
|
||||
typedef union{
|
||||
struct{
|
||||
u32 pad31: 27;
|
||||
u32 unk4: 1;
|
||||
u32 pad3: 1;
|
||||
u32 unk2: 1;
|
||||
u32 unk1: 1;
|
||||
u32 unk0: 1;
|
||||
};
|
||||
u32 word;
|
||||
} tmp_bitfield;
|
||||
|
||||
extern vector(ActorMarker *) *D_80383550;
|
||||
extern vector(ActorMarker *) *D_80383554;
|
||||
|
||||
void propModelList_drawSprite(Gfx **, Mtx **, Vtx **, f32[3], f32, s32, Cube*,s32 ,s32, s32, s32, s32);
|
||||
void propModelList_drawModel(Gfx **, Mtx **, Vtx **, f32[3], f32[3], f32, s32, Cube*);
|
||||
void __marker_draw(ActorMarker *this, Gfx **gfx, Mtx **mtx, Vtx **vtx);
|
||||
void __cube_sort(Cube *cube, bool global);
|
||||
void func_8032CD60(Prop *);
|
||||
|
||||
// @recomp Patched to add transform tagging when drawing sprite and model props.
|
||||
RECOMP_PATCH void func_8032D510(Cube *cube, Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
Prop *iProp;
|
||||
int i;
|
||||
f32 position[3];
|
||||
f32 rotation[3];
|
||||
tmp_bitfield tmp_v0;
|
||||
int iOffset;
|
||||
ActorMarker **markerPtr;
|
||||
|
||||
if(cube->prop2Cnt == 0 ) return;
|
||||
|
||||
__cube_sort(cube, 0);
|
||||
iOffset = 0;
|
||||
for(i = 0; i < cube->prop2Cnt; i++){//L8032D5A0
|
||||
iOffset = i * 0xC;
|
||||
iProp = (Prop *)((s32)cube->prop2Ptr + iOffset);
|
||||
tmp_v0.word = *(u32 *)((s32)iProp + 0x8);
|
||||
if(!tmp_v0.unk4){
|
||||
|
||||
}else{
|
||||
if(!tmp_v0.unk1){
|
||||
func_8032CD60(iProp);
|
||||
}
|
||||
tmp_v0.word = *(u32 *)((s32)iProp + 0x8);
|
||||
if(tmp_v0.unk0){//actorProp;
|
||||
if(iProp->actorProp.marker->unk40_22){
|
||||
markerPtr = (ActorMarker **)vector_pushBackNew(&D_80383550);
|
||||
*markerPtr = iProp->actorProp.marker;
|
||||
}
|
||||
else if(iProp->actorProp.marker->unk40_19){
|
||||
markerPtr = (ActorMarker **)vector_pushBackNew(&D_80383554);
|
||||
*markerPtr = iProp->actorProp.marker;
|
||||
}
|
||||
else{
|
||||
__marker_draw(iProp->actorProp.marker, gfx, mtx, vtx);
|
||||
}//L8032D62C
|
||||
}
|
||||
else{//L8032D640
|
||||
// @recomp Calculate the base transform ID for the prop.
|
||||
u32 spawn_index = bkrecomp_get_prop_spawn_index(cube, iProp);
|
||||
u32 base_transform_id = spawn_index * PROP_TRANSFORM_ID_COUNT + PROP_TRANSFORM_ID_START;
|
||||
|
||||
position[0] = (f32)iProp->modelProp.position[0];
|
||||
position[1] = (f32)iProp->modelProp.position[1];
|
||||
position[2] = (f32)iProp->modelProp.position[2];
|
||||
if(iProp->is_3d){
|
||||
rotation[0] = 0.0f;
|
||||
rotation[1] = (f32)((s32)iProp->modelProp.yaw*2);
|
||||
rotation[2] = (f32)((s32)iProp->modelProp.roll*2);
|
||||
|
||||
// @recomp Set the model render transform ID before drawing the model.
|
||||
cur_drawn_model_transform_id = base_transform_id;
|
||||
|
||||
propModelList_drawModel(gfx, mtx, vtx,
|
||||
position, rotation, (f32)iProp->modelProp.scale/100.0,
|
||||
iProp->modelProp.model_index, cube
|
||||
);
|
||||
|
||||
|
||||
// @recomp Clear the model render transform ID after drawing the model.
|
||||
cur_drawn_model_transform_id = 0;
|
||||
}
|
||||
else{//L8032D72C
|
||||
// @recomp Set the matrix group before drawing the sprite.
|
||||
// Skip interpolation on vertices to account for vertex lists changing between frames of the sprite.
|
||||
// Also skip interpolation on scale to account for the scale inverting when sprites are mirrored.
|
||||
// TODO track this matrix for skipping interpolation when camera interpolation is skipped.
|
||||
gEXMatrixGroupDecomposed((*gfx)++, base_transform_id, G_EX_PUSH, G_MTX_MODELVIEW,
|
||||
G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE,
|
||||
G_EX_COMPONENT_INTERPOLATE, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_INTERPOLATE,
|
||||
G_EX_ORDER_LINEAR, G_EX_EDIT_ALLOW, G_EX_COMPONENT_SKIP, G_EX_COMPONENT_AUTO);
|
||||
|
||||
// @recomp Also set the model render transform ID before drawing the sprite. This won't have any effect
|
||||
// in the unmodified game, but will allow transform tagging for mods that draw models in place of sprites.
|
||||
cur_drawn_model_transform_id = base_transform_id;
|
||||
|
||||
propModelList_drawSprite(gfx, mtx, vtx,
|
||||
position, (f32)iProp->spriteProp.scale/100.0, iProp->spriteProp.sprite_index, cube,
|
||||
iProp->spriteProp.r, iProp->spriteProp.b, iProp->spriteProp.g,
|
||||
iProp->spriteProp.mirrored, iProp->spriteProp.frame
|
||||
);
|
||||
|
||||
// @recomp Pop the sprite's matrix group.
|
||||
gEXPopMatrixGroup((*gfx)++, G_MTX_MODELVIEW);
|
||||
|
||||
// @recomp Clear the model render transform ID after drawing the sprite.
|
||||
cur_drawn_model_transform_id = 0;
|
||||
}
|
||||
}//L8032D7C4
|
||||
}
|
||||
iOffset+=0xC;
|
||||
}//L8032D7D4
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __UI_FUNCS_H__
|
||||
#define __UI_FUNCS_H__
|
||||
|
||||
// These three enums must be kept in sync with src/ui/elements/ui_types.h!
|
||||
// These two enums must be kept in sync with src/ui/elements/ui_types.h!
|
||||
typedef enum {
|
||||
UI_EVENT_NONE,
|
||||
UI_EVENT_CLICK,
|
||||
@@ -11,9 +11,6 @@ typedef enum {
|
||||
UI_EVENT_DRAG,
|
||||
UI_EVENT_RESERVED1, // Would be UI_EVENT_TEXT but text events aren't usable in mods currently
|
||||
UI_EVENT_UPDATE,
|
||||
UI_EVENT_NAVIGATE,
|
||||
UI_EVENT_MOUSE_BUTTON,
|
||||
UI_EVENT_MENU_ACTION,
|
||||
UI_EVENT_COUNT
|
||||
} RecompuiEventType;
|
||||
|
||||
@@ -24,16 +21,6 @@ typedef enum {
|
||||
UI_DRAG_END
|
||||
} RecompuiDragPhase;
|
||||
|
||||
typedef enum {
|
||||
UI_MENU_ACTION_NONE,
|
||||
UI_MENU_ACTION_ACCEPT,
|
||||
UI_MENU_ACTION_APPLY,
|
||||
UI_MENU_ACTION_BACK,
|
||||
UI_MENU_ACTION_TOGGLE,
|
||||
UI_MENU_ACTION_TAB_LEFT,
|
||||
UI_MENU_ACTION_TAB_RIGHT
|
||||
} RecompuiMenuAction;
|
||||
|
||||
typedef struct {
|
||||
RecompuiEventType type;
|
||||
union {
|
||||
@@ -59,10 +46,6 @@ typedef struct {
|
||||
float y;
|
||||
RecompuiDragPhase phase;
|
||||
} drag;
|
||||
|
||||
struct {
|
||||
RecompuiMenuAction action;
|
||||
} menu_action;
|
||||
} data;
|
||||
} RecompuiEventData;
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
#include "patches.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern vector(struct21s) *D_80383CE0[2];
|
||||
|
||||
#define PRINT_DEFRAG_CHANGES 0
|
||||
|
||||
// @recomp Patched to just use a normal DMA.
|
||||
RECOMP_PATCH s32 boot_osPiRawStartDma(s32 direction, u32 devAddr, void *dramAddr, u32 size) {
|
||||
OSMesgQueue mq;
|
||||
OSMesg buffer;
|
||||
OSIoMesg io;
|
||||
osCreateMesgQueue(&mq, &buffer, 1);
|
||||
|
||||
// Complete the DMA synchronously (the game immediately waits until it's done anyways)
|
||||
osPiStartDma(&io, OS_MESG_PRI_HIGH, direction, devAddr, dramAddr, size, &mq);
|
||||
osRecvMesg(&mq, NULL, OS_MESG_BLOCK);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @recomp Patched to not read hardware registers.
|
||||
RECOMP_PATCH s32 boot_osPiGetStatus() {
|
||||
// PI not busy
|
||||
return 0;
|
||||
}
|
||||
|
||||
// @recomp Patched to fix a bug where defrag was used instead of vector_defrag, which would break these vectors
|
||||
// if the defrag call moved the vector's memory.
|
||||
RECOMP_PATCH void func_8033B268(void) {
|
||||
#if PRINT_DEFRAG_CHANGES
|
||||
vector(struct21s) *old_0 = D_80383CE0[0];
|
||||
vector(struct21s) *old_1 = D_80383CE0[1];
|
||||
#endif
|
||||
|
||||
D_80383CE0[0] = (vector(struct21s) *)vector_defrag(D_80383CE0[0]);
|
||||
D_80383CE0[1] = (vector(struct21s) *)vector_defrag(D_80383CE0[1]);
|
||||
|
||||
#if PRINT_DEFRAG_CHANGES
|
||||
if (D_80383CE0[0] != old_0) {
|
||||
recomp_printf("vector_defrag() moved D_80383CE0[0] from 0x%08X to 0x%08X.\n", old_0, D_80383CE0[0]);
|
||||
}
|
||||
|
||||
if (D_80383CE0[1] != old_1) {
|
||||
recomp_printf("vector_defrag() moved D_80383CE0[1] from 0x%08X to 0x%08X.\n", old_1, D_80383CE0[1]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "patches.h"
|
||||
#include "transform_ids.h"
|
||||
#include "core1/core1.h"
|
||||
|
||||
typedef struct {
|
||||
s16 model_id;
|
||||
// u8 pad2[0x2];
|
||||
f32 scale;
|
||||
f32 rotation_speed;
|
||||
}SkyInfo;
|
||||
|
||||
typedef struct {
|
||||
s16 map;
|
||||
// u8 pad2[2];
|
||||
SkyInfo sky_list[3];
|
||||
}MapSkyInfo;
|
||||
|
||||
extern struct
|
||||
{
|
||||
MapSkyInfo *sky_info;
|
||||
BKModel *model[3];
|
||||
BKModelBin *model_bins[3];
|
||||
f32 timer;
|
||||
} gcSky;
|
||||
|
||||
// @recomp Patched to tag the skybox projection and skybox models.
|
||||
RECOMP_PATCH void sky_draw(Gfx **gfx, Mtx **mtx, Vtx **vtx){
|
||||
int i;
|
||||
f32 position[3];
|
||||
f32 rotation[3];
|
||||
BKModelBin *iAsset;
|
||||
|
||||
viewport_setNearAndFar(5.0f, 15000.0f);
|
||||
if(gcSky.model_bins[0]){
|
||||
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight,0, 0, 0); //fill screen with black
|
||||
// @recomp Set the skybox projection matrix group.
|
||||
gEXMatrixGroupSimpleNormal((*gfx)++, PROJECTION_SKYBOX_TRANSFORM_ID, G_EX_PUSH, G_MTX_PROJECTION, G_EX_EDIT_NONE);
|
||||
|
||||
viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx);
|
||||
viewport_getPosition_vec3f(position);
|
||||
for(i = 0; i < 3; i++){
|
||||
iAsset = gcSky.model_bins[i];
|
||||
if(iAsset){
|
||||
rotation[0] = 0.0f;
|
||||
rotation[1] = gcSky.sky_info->sky_list[i].rotation_speed * gcSky.timer;
|
||||
rotation[2] = 0.0f;
|
||||
|
||||
// @recomp Set the model transform ID before drawing the skybox.
|
||||
cur_drawn_model_transform_id = SKYBOX_TRANSFORM_ID_START + SKYBOX_MODEL_TRANSFORM_ID_COUNT * i;
|
||||
|
||||
modelRender_draw(gfx, mtx, position, rotation, gcSky.sky_info->sky_list[i].scale, NULL, iAsset);
|
||||
|
||||
// @recomp Clear the model transform ID after drawing the skybox.
|
||||
cur_drawn_model_transform_id = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// @recomp Pop the skybox projection matrix group.
|
||||
gEXPopMatrixGroup((*gfx)++, G_MTX_PROJECTION);
|
||||
}
|
||||
else{//L8030B200
|
||||
drawRectangle2D(gfx, 0, 0, (s32)(f32) gFramebufferWidth, (s32)(f32)gFramebufferHeight, 0, 0, 0);
|
||||
}//L8030B254
|
||||
}
|
||||