mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-05 11:33:39 -04:00
Compare commits
505 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 589c6675fe | |||
| 0be48db605 | |||
| dbb9ce2c03 | |||
| cc808ab50c | |||
| 591c38e871 | |||
| a5bc71795e | |||
| 09f087656a | |||
| 7682165478 | |||
| fe15366912 | |||
| cfadf7607a | |||
| f81d25b425 | |||
| ebf6f31719 | |||
| 590d209f76 | |||
| ed21cd4fd0 | |||
| 26d0725c76 | |||
| 1b3b493fbf | |||
| f62a70f9d0 | |||
| ec2173db9f | |||
| 563944d4a3 | |||
| b8f69e82dd | |||
| 830b560933 | |||
| 57019bea30 | |||
| c590018059 | |||
| 277538bb81 | |||
| e7eefbb0cb | |||
| 7ee39edee7 | |||
| 6592871fa2 | |||
| 5a1368b355 | |||
| 6984ae83bf | |||
| e57c952deb | |||
| 4239cea3d5 | |||
| 93479100fc | |||
| 9bd34a0d02 | |||
| cce67c1809 | |||
| 6bf0dfd92a | |||
| 4d8fcfa551 | |||
| 6366ab61d1 | |||
| 7537f1c4a8 | |||
| a3de85fb4b | |||
| 08e0645ef8 | |||
| f20cf3c24e | |||
| b2dfdf4158 | |||
| 99689258a2 | |||
| 5418b1831d | |||
| 2d4e69466b | |||
| 427dcfab82 | |||
| 08345d01ed | |||
| 56d47d475f | |||
| 8a92efbe0d | |||
| 1790ad6faf | |||
| e39c139b97 | |||
| 54b3545736 | |||
| 2428ca2efe | |||
| 05d9cf0402 | |||
| 2651640ee0 | |||
| f8c5a8988b | |||
| 544964c1a5 | |||
| 59b76f7aae | |||
| 7bd3e9cafd | |||
| 8999c4c9c5 | |||
| 917def4732 | |||
| 0516282bb6 | |||
| 4466442cfb | |||
| d6f741947a | |||
| d855efe513 | |||
| 51a25206c2 | |||
| 28733f5c15 | |||
| b2ac2d6600 | |||
| f6b86d3f38 | |||
| b118fa19e1 | |||
| 68bebfad3a | |||
| a0f5b250b4 | |||
| cb70f2c3b3 | |||
| 5851954ca1 | |||
| c65f0bb0ac | |||
| 038254db48 | |||
| c1997b3d68 | |||
| 474a7dce00 | |||
| 382f33d021 | |||
| efbf82d4c7 | |||
| b743a762b4 | |||
| 302abd6b65 | |||
| 3f6ae4324b | |||
| dccded964b | |||
| ea09dd73c6 | |||
| c426b52a15 | |||
| 41e0a81c39 | |||
| 5b6f2f6e91 | |||
| bbea07ba9e | |||
| 0f0dca5514 | |||
| 3fb86dbac8 | |||
| 83adafff82 | |||
| 7e367c1e15 | |||
| 46e81963e2 | |||
| 4f1d4cde3d | |||
| 45c8fa9f19 | |||
| 87635d3cf7 | |||
| e5324c7562 | |||
| 03593def22 | |||
| 2ae5518c81 | |||
| bc45bf27c2 | |||
| 7d2c9776ea | |||
| fbf4fcc50c | |||
| 1868d698f5 | |||
| d858626be1 | |||
| f00ad8e0ea | |||
| 7b521aef02 | |||
| 4721b8da50 | |||
| b06af0e057 | |||
| 518dea482e | |||
| daf2f18369 | |||
| 9307d8abde | |||
| b3dbf2c71b | |||
| 4bb5f320c3 | |||
| f1357f09ed | |||
| e3eb63f158 | |||
| 47c0a399e1 | |||
| dfdd5250bd | |||
| ba7211126c | |||
| ef607434dd | |||
| f12838ea3b | |||
| dc88e11115 | |||
| e671ed748b | |||
| 98633a5cb6 | |||
| 6c1aeb0d0a | |||
| a2d41bcfba | |||
| 96ed5c671b | |||
| de12d277d0 | |||
| 3b8ec9efa6 | |||
| 39b079ddb9 | |||
| e2790d922a | |||
| afed2c1774 | |||
| 46a67c658c | |||
| 351afd6686 | |||
| 485374abba | |||
| 8ecd848307 | |||
| c4a13c8c10 | |||
| 313e9be99d | |||
| d79088ba05 | |||
| 3aa7abe73f | |||
| 8e38f27602 | |||
| 7543db2222 | |||
| 32e553e38d | |||
| 089a947c30 | |||
| 83a5ccce92 | |||
| 48de086d65 | |||
| 5a61b912bb | |||
| 4e92b22c5d | |||
| ede9697dae | |||
| 580b772c3c | |||
| 143b548102 | |||
| 15742c71f3 | |||
| 40f753e18b | |||
| 65f4048a41 | |||
| e78a198adf | |||
| 75d86ab296 | |||
| 62e48984bf | |||
| deb213d07a | |||
| 484c5e8bf3 | |||
| bb67fc991d | |||
| 7326a619da | |||
| 4ce5800a33 | |||
| 66a8af31b3 | |||
| 85fe76b5be | |||
| ffa1fd5da4 | |||
| 3d2c5633cd | |||
| 08ce522edb | |||
| ab007b4c44 | |||
| 2cf2442dc8 | |||
| 7354bfc163 | |||
| 7bca56ea80 | |||
| 42eb9ef518 | |||
| be4a1d8838 | |||
| fd523a7e4d | |||
| 650b56beee | |||
| 1e3f097e63 | |||
| 9fd5678ae4 | |||
| dcf6268444 | |||
| 1f4370af85 | |||
| ed458dc2b3 | |||
| 7cebc42266 | |||
| 0d819b215d | |||
| 8113fc3088 | |||
| 78bc0216fb | |||
| b74603c883 | |||
| 9e8b451462 | |||
| d25695be0e | |||
| ba9dc8e9ba | |||
| ddb9816158 | |||
| 33e19f58e0 | |||
| ece92765c9 | |||
| c2dea2ab8f | |||
| e0dea86134 | |||
| 8409c2ab9f | |||
| 3eb4181b9c | |||
| 0d33d44e75 | |||
| 6ea50f33e4 | |||
| 769b8f02c8 | |||
| d77da3fba3 | |||
| ea0c697afa | |||
| 6321bcf0d8 | |||
| 1e7e9b3513 | |||
| 63e7fb4187 | |||
| 453accc674 | |||
| a565601849 | |||
| e92a3b4a90 | |||
| 141ddafdc8 | |||
| 007561874d | |||
| b167124a70 | |||
| 879c68f8a3 | |||
| ccaee02c2e | |||
| ff498af6e8 | |||
| 9c3420bcc7 | |||
| 23a6719e99 | |||
| 95c1a93332 | |||
| 63a91bffde | |||
| d33b3c16e1 | |||
| 33e2ffbb6e | |||
| 491a73f517 | |||
| 54efc49bd8 | |||
| f6eaa64156 | |||
| ed1f21f333 | |||
| 0a0f1e9a04 | |||
| 64720ef0e0 | |||
| b213ae2faa | |||
| d7e0c240d0 | |||
| 56de23e2e6 | |||
| 0862408ee8 | |||
| b2b74e5c4d | |||
| 39da278394 | |||
| ec2f2753a2 | |||
| 89a0702d2b | |||
| 9d94e9684f | |||
| f8d01ae6d2 | |||
| 9f400543c2 | |||
| 3861bf5506 | |||
| 5c745735d7 | |||
| 886fb7f2db | |||
| 01d0d12af0 | |||
| c0f882845d | |||
| 7225fb25dc | |||
| 5ab46c604b | |||
| f3b29d97d0 | |||
| 9447f4e89b | |||
| 7db5386885 | |||
| 9c1617d423 | |||
| 4c4e3e4b10 | |||
| 4db50d2843 | |||
| ba5a59eee2 | |||
| 5e69c7bdce | |||
| 04d9640eff | |||
| 83480110fd | |||
| 5038068905 | |||
| 7388213715 | |||
| 0e1e64fe7d | |||
| f48a3be466 | |||
| 61835c05ba | |||
| 762a597eba | |||
| 69283fc611 | |||
| b0efe464c0 | |||
| a6fda86ebf | |||
| 4b363dab06 | |||
| 77ae5fd0b3 | |||
| 2890a663f3 | |||
| f263a33db2 | |||
| 99ee9c2f48 | |||
| 1cfb22fdd9 | |||
| bf85d511a8 | |||
| dc9dce2cd7 | |||
| 8333ae35a8 | |||
| ced018794f | |||
| bfb715e11a | |||
| 9e9f36e484 | |||
| 38031e2545 | |||
| 2dea7375ef | |||
| 48bfcec0a3 | |||
| 7a4c23fa33 | |||
| 0014be0e82 | |||
| 870bd6476c | |||
| 96d9b5e7b1 | |||
| 09a73d5828 | |||
| e14d1f1f68 | |||
| 9f6c39754b | |||
| eda9991e6a | |||
| 95e699fb63 | |||
| 618d5b5733 | |||
| 2ececa3206 | |||
| 4fddaba76b | |||
| 045df82445 | |||
| b3833be529 | |||
| f45aa6040e | |||
| 25b273a726 | |||
| 3e99420527 | |||
| f6e526b187 | |||
| 23567fba42 | |||
| 255a55d4c8 | |||
| d7ca855d9a | |||
| e8318e2eb3 | |||
| f4992aa378 | |||
| 97388be8e5 | |||
| dbad1a4832 | |||
| 40949474a1 | |||
| 1166b58447 | |||
| 2c7cfa8951 | |||
| 89621dbff5 | |||
| 18f688e4b3 | |||
| 354d9b2fde | |||
| bc7faadc02 | |||
| c265207c92 | |||
| 05678f1ddc | |||
| cf015c4219 | |||
| a11427a48f | |||
| c87d7e3875 | |||
| 75f6337985 | |||
| 71f33021cc | |||
| 5b52f13f4b | |||
| 0a8cbc8f08 | |||
| 28e907aafd | |||
| 7018796b93 | |||
| b28e21fa18 | |||
| afc53ce1b2 | |||
| 4b0564779f | |||
| dc5fd98cfd | |||
| e2c51ec45c | |||
| 38640354b0 | |||
| 0393fdad6d | |||
| 5fc0340603 | |||
| 99652c01ed | |||
| 580d50ab05 | |||
| cfa680f2d8 | |||
| e4e438e1ba | |||
| 4ec1a0e52c | |||
| f251a3497d | |||
| 05734d9e93 | |||
| 30e4291f14 | |||
| 88770b90ab | |||
| 5a22ce6321 | |||
| 62b30d2dad | |||
| 5a5004793a | |||
| d0cb0c001a | |||
| 7a246941f8 | |||
| c3ad0abd37 | |||
| 91d6ec1f26 | |||
| a863ea253e | |||
| f5789aaebd | |||
| 438fd2fe71 | |||
| 040094115b | |||
| d4bc2daa89 | |||
| 622920d8c0 | |||
| 2b9dd50a8d | |||
| ff44cdfd3c | |||
| 3b0cc4c712 | |||
| 71d73a9db4 | |||
| 4ef7511336 | |||
| 9b34fd8f8f | |||
| a5cc64c2fe | |||
| ce88c237a3 | |||
| cee8101b37 | |||
| 409663711b | |||
| decf925e5d | |||
| cbead7bbb0 | |||
| 05e5023354 | |||
| 3126605cd6 | |||
| 0b932c1993 | |||
| 5ed72f4af2 | |||
| 1a3aac4d05 | |||
| 573414dc83 | |||
| 7132655d42 | |||
| 318bf293ca | |||
| 3149f929c1 | |||
| 8acdbf03bf | |||
| 11a632511f | |||
| 33941d8ede | |||
| 01d217acb5 | |||
| 7c331fdb2c | |||
| f7d3cf32fd | |||
| 95ceb1241b | |||
| 5c9ff2f5fa | |||
| 6b5e251037 | |||
| 4905718024 | |||
| 00929789a1 | |||
| 8e3306f87f | |||
| 8ea4b7747d | |||
| 02852eb586 | |||
| 7d9d398844 | |||
| dfe6d10c07 | |||
| 80f4284e82 | |||
| c7c9b664e8 | |||
| e2de904f8a | |||
| 1f593812c8 | |||
| d3d0016d16 | |||
| b7adbde0d5 | |||
| 94bfb8c9e3 | |||
| 8949a3a8ee | |||
| 80b0d11319 | |||
| 49e8058f4e | |||
| fccce91ea5 | |||
| 8b117c8ed3 | |||
| e77fe61596 | |||
| 0da8b4c6dc | |||
| 726999c476 | |||
| f774cc689c | |||
| 498db43c62 | |||
| 89f1c6c71f | |||
| c801cb2a84 | |||
| f069be5789 | |||
| b4722177ca | |||
| a36695a240 | |||
| 148a3d23eb | |||
| e7e5363c0c | |||
| 93cc3bd2ce | |||
| 52a53b64dc | |||
| fa473d48a9 | |||
| 8774cfa31b | |||
| 8270ec3050 | |||
| 6113df21e0 | |||
| dbdb4daa58 | |||
| dd04da230f | |||
| 7606998ba6 | |||
| 0f0c10d26a | |||
| 88dd4a2aae | |||
| cc75af7cce | |||
| 7520998aca | |||
| ab28ae36e3 | |||
| 88826bd5f8 | |||
| 39a9dd4029 | |||
| 23fe55fdca | |||
| a31e388b3a | |||
| 3e241da2a4 | |||
| ce80d83c00 | |||
| f62fb69a4d | |||
| 782bf4e0b3 | |||
| 727066e54e | |||
| f13ecbaec7 | |||
| be390c3645 | |||
| fdfe379824 | |||
| da2cb85aa1 | |||
| 2b4598821b | |||
| 4cd911a114 | |||
| 5484cd69b5 | |||
| 1ff9421cea | |||
| c0e83af35e | |||
| 2c6d0b11dd | |||
| bab1cda97a | |||
| da24b6a1e2 | |||
| 2bb05b0248 | |||
| 96d82c5fc2 | |||
| 5175795814 | |||
| 049758431c | |||
| 762f103991 | |||
| 66aeeb8857 | |||
| d3a9c52ec5 | |||
| dea93938e6 | |||
| 890a42b3ee | |||
| 38f591c521 | |||
| 14ec080a23 | |||
| 48da572df0 | |||
| 0cb77802be | |||
| dacfe11d95 | |||
| cc58b41901 | |||
| 04a2417f02 | |||
| 9e74ffd9be | |||
| dec4045e25 | |||
| 4daf410cce | |||
| cf604b5fb0 | |||
| 8738e5b122 | |||
| 38bea19a7b | |||
| bf70de83f1 | |||
| f478751080 | |||
| a18ce4e6dd | |||
| e77bc5c9e5 | |||
| 7e39274da2 | |||
| 4ad05a3445 | |||
| 4e25db0f20 | |||
| 98b492bd89 | |||
| 461d59984f | |||
| 796a67f207 | |||
| 2d4247f10e | |||
| d4028fefa8 | |||
| 7e5726c255 | |||
| 1873330e61 | |||
| 9c9316466b | |||
| 123c809e14 | |||
| 8172e672de | |||
| 4d1771649a | |||
| c91925f243 | |||
| 87116b871b | |||
| 3547c57de0 | |||
| 2d8a60aa75 | |||
| dd773bc261 | |||
| 535c2f53c1 | |||
| c8cde246a9 | |||
| bc66d96d8b | |||
| 6c55f42ce2 | |||
| 679044f33d | |||
| ac53fdbbff | |||
| 0b78547ba1 | |||
| 0ebab8bad3 | |||
| ab7d3a5e03 | |||
| 2f79bbe067 | |||
| b8b5b7197c | |||
| 554a461c95 | |||
| 1efb6c4a80 | |||
| 377d6a0d25 | |||
| 72bed7a1ba |
+1
-1
@@ -1,3 +1,3 @@
|
||||
[submodule "extern/aurora"]
|
||||
path = extern/aurora
|
||||
url = https://github.com/Lurs/aurora.git
|
||||
url = https://github.com/encounter/aurora.git
|
||||
|
||||
+22
-2
@@ -363,7 +363,7 @@ set(DUSK_COPYRIGHT "Copyright (C) Twilit Realm contributors")
|
||||
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
|
||||
source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
|
||||
|
||||
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1 DUSK_TPHD=1)
|
||||
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1)
|
||||
|
||||
set(GAME_INCLUDE_DIRS
|
||||
include
|
||||
@@ -378,7 +378,7 @@ set(GAME_INCLUDE_DIRS
|
||||
find_package(Threads REQUIRED)
|
||||
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd
|
||||
aurora::card freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt
|
||||
Threads::Threads zstd::libzstd ZLIB::ZLIB)
|
||||
Threads::Threads zstd::libzstd)
|
||||
|
||||
if (DUSK_ENABLE_SENTRY_NATIVE)
|
||||
list(APPEND GAME_LIBS sentry)
|
||||
@@ -437,6 +437,8 @@ if (DUSK_MOVIE_SUPPORT)
|
||||
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
|
||||
endif ()
|
||||
|
||||
include(src/dusk/randomizer/randomizer.cmake)
|
||||
|
||||
set(DUSK_ENABLE_DISCORD_DEFAULT ON)
|
||||
if (DEFINED DUSK_ENABLE_DISCORD_RPC AND NOT DEFINED DUSK_ENABLE_DISCORD)
|
||||
set(DUSK_ENABLE_DISCORD_DEFAULT ${DUSK_ENABLE_DISCORD_RPC})
|
||||
@@ -520,6 +522,24 @@ if (ENABLE_ASAN)
|
||||
target_sources(dusklight PRIVATE src/dusk/asan_options.c)
|
||||
endif ()
|
||||
|
||||
# Add embedded data to target
|
||||
|
||||
file(GLOB_RECURSE RANDOMIZER_DATA "src/dusk/randomizer/generator/data/*")
|
||||
file(GLOB_RECURSE RANDOMIZER_ASSETS "src/dusk/randomizer/assets/*")
|
||||
list(APPEND RANDOMIZER_DATA ${RANDOMIZER_ASSETS})
|
||||
set(RANDO_ROOT_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
foreach (RANDOMIZER_FILE IN LISTS RANDOMIZER_DATA)
|
||||
file(RELATIVE_PATH REL_PATH ${RANDO_ROOT_DATA_DIR} ${RANDOMIZER_FILE})
|
||||
if(REL_PATH MATCHES "^src/dusk/randomizer/generator/data/tests")
|
||||
message(STATUS "Skipping Embed: ${REL_PATH}")
|
||||
continue()
|
||||
endif ()
|
||||
|
||||
message(STATUS "Embedding File: ${REL_PATH}")
|
||||
b_embed(dusklight ${REL_PATH})
|
||||
endforeach ()
|
||||
|
||||
target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS})
|
||||
target_include_directories(dusklight PRIVATE ${GAME_INCLUDE_DIRS})
|
||||
target_link_libraries(dusklight PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES})
|
||||
|
||||
@@ -20,31 +20,17 @@ It aims to be as accurate as possible to the original while also providing new o
|
||||
> Dusklight does *not* provide any copyrighted assets. You must provide your own copy of the original game.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> At a minimum, Dusklight requires a GPU with support for either D3D12, Vulkan, or Metal. Your experience with specific hardware, operating systems, and drivers may vary. In particular, older Intel iGPUs have a high likelihood of incompatibility. We are also aware of a number of issues on devices with Adreno GPUs and are working to resolve them.
|
||||
> At a minimum, Dusklight requires a GPU with support for D3D12, Vulkan 1.1+, or Metal. For older devices, best-effort support is provided for D3D11 and OpenGL ES (Android), but will not achieve full accuracy or performance. Your experience with specific hardware, operating systems, and drivers may vary.
|
||||
|
||||
### 1. Dump your game
|
||||
|
||||
You must dump your own copy of the game, please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to a `.rvz` to save space.
|
||||
You must dump your own copy of the game. Please see [this article](https://wiki.dolphin-emu.org/index.php?title=Ripping_Games) for instructions. After dumping, you can use a program like [Dolphin](https://dolphin-emu.org/) or [nodtool](https://github.com/encounter/nod/releases) to convert the `.iso` to `.rvz` to save space.
|
||||
|
||||
Currently, only the GameCube USA and EUR releases are supported. Support for other versions of the game is planned in the future.
|
||||
|
||||
### 2. Download [Dusklight](https://github.com/TwilitRealm/dusklight/releases)
|
||||
### 2. Install Dusklight
|
||||
|
||||
### 3. Setup the game
|
||||
**Windows / macOS / Linux**
|
||||
- Extract the .zip file
|
||||
- Launch Dusklight
|
||||
- Press **Select Disc Image** and provide the path to your supported game dump
|
||||
- Press **Play**!
|
||||
|
||||
**iOS**
|
||||
- Follow the [iOS setup guide](docs/ios-install-altstore.md)
|
||||
|
||||
**Android**
|
||||
- Install the Dusklight APK
|
||||
- Launch Dusklight
|
||||
- Press **Select Disc Image** and provide the path to your supported game dump
|
||||
- Press **Play**!
|
||||
Visit the [official installation guide](https://twilitrealm.dev/install/) for full instructions.
|
||||
|
||||
# Building
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule extern/aurora updated: cc1b2e3e5a...9087a409da
+105
-10
@@ -1464,6 +1464,9 @@ set(DUSK_FILES
|
||||
src/dusk/imgui/ImGuiBloomWindow.hpp
|
||||
src/dusk/imgui/ImGuiMenuTools.cpp
|
||||
src/dusk/imgui/ImGuiMenuTools.hpp
|
||||
src/dusk/imgui/ImGuiMenuRandomizer.cpp
|
||||
src/dusk/imgui/ImGuiMenuRandomizer.hpp
|
||||
src/dusk/imgui/ImGuiArchipelagoDebug.cpp
|
||||
src/dusk/imgui/ImGuiActorSpawner.cpp
|
||||
src/dusk/imgui/ImGuiProcessOverlay.cpp
|
||||
src/dusk/imgui/ImGuiCameraOverlay.cpp
|
||||
@@ -1484,6 +1487,8 @@ set(DUSK_FILES
|
||||
src/dusk/ui/controls.hpp
|
||||
src/dusk/ui/controller_config.cpp
|
||||
src/dusk/ui/controller_config.hpp
|
||||
src/dusk/ui/cosmetics.hpp
|
||||
src/dusk/ui/cosmetics.cpp
|
||||
src/dusk/ui/document.cpp
|
||||
src/dusk/ui/document.hpp
|
||||
src/dusk/ui/editor.cpp
|
||||
@@ -1533,6 +1538,12 @@ set(DUSK_FILES
|
||||
src/dusk/ui/warp.hpp
|
||||
src/dusk/ui/window.cpp
|
||||
src/dusk/ui/window.hpp
|
||||
src/dusk/ui/rando_config.cpp
|
||||
src/dusk/ui/rando_config.hpp
|
||||
src/dusk/ui/rando_seed_generation.cpp
|
||||
src/dusk/ui/rando_seed_generation.hpp
|
||||
src/dusk/ui/archi_connect_modal.cpp
|
||||
src/dusk/ui/archi_connect_modal.hpp
|
||||
src/dusk/achievements.cpp
|
||||
src/dusk/iso_validate.cpp
|
||||
src/dusk/livesplit.cpp
|
||||
@@ -1546,16 +1557,100 @@ set(DUSK_FILES
|
||||
src/dusk/discord_presence.cpp
|
||||
src/dusk/version.cpp
|
||||
src/dusk/action_bindings.cpp
|
||||
src/dusk/tphd/TphdPack.hpp
|
||||
src/dusk/tphd/TphdPack.cpp
|
||||
src/dusk/tphd/GtxParser.hpp
|
||||
src/dusk/tphd/GtxParser.cpp
|
||||
src/dusk/tphd/AddrLib.hpp
|
||||
src/dusk/tphd/AddrLib.cpp
|
||||
src/dusk/tphd/HdAssetLayer.hpp
|
||||
src/dusk/tphd/HdAssetLayer.cpp
|
||||
src/dusk/tphd/LosTable.hpp
|
||||
src/dusk/tphd/LosTable.cpp
|
||||
src/dusk/cosmetics/color_utils.hpp
|
||||
src/dusk/cosmetics/color_utils.cpp
|
||||
src/dusk/cosmetics/texture_utils.hpp
|
||||
src/dusk/cosmetics/texture_utils.cpp
|
||||
# Randomizer files
|
||||
src/dusk/randomizer/game/flags.cpp
|
||||
src/dusk/randomizer/game/flags.h
|
||||
src/dusk/randomizer/game/messages.cpp
|
||||
src/dusk/randomizer/game/messages.hpp
|
||||
src/dusk/randomizer/game/stages.cpp
|
||||
src/dusk/randomizer/game/stages.h
|
||||
src/dusk/randomizer/game/tools.cpp
|
||||
src/dusk/randomizer/game/tools.h
|
||||
src/dusk/randomizer/game/verify_item_functions.cpp
|
||||
src/dusk/randomizer/game/verify_item_functions.h
|
||||
src/dusk/randomizer/game/randomizer_context.cpp
|
||||
src/dusk/randomizer/game/randomizer_context.hpp
|
||||
src/dusk/randomizer/generator/logic/area.cpp
|
||||
src/dusk/randomizer/generator/logic/area.hpp
|
||||
src/dusk/randomizer/generator/logic/dungeon.cpp
|
||||
src/dusk/randomizer/generator/logic/dungeon.hpp
|
||||
src/dusk/randomizer/generator/logic/entrance.cpp
|
||||
src/dusk/randomizer/generator/logic/entrance.hpp
|
||||
src/dusk/randomizer/generator/logic/entrance_shuffle.cpp
|
||||
src/dusk/randomizer/generator/logic/entrance_shuffle.hpp
|
||||
src/dusk/randomizer/generator/logic/fill.cpp
|
||||
src/dusk/randomizer/generator/logic/fill.hpp
|
||||
src/dusk/randomizer/generator/logic/flatten/bits.cpp
|
||||
src/dusk/randomizer/generator/logic/flatten/bits.hpp
|
||||
src/dusk/randomizer/generator/logic/flatten/flatten.cpp
|
||||
src/dusk/randomizer/generator/logic/flatten/flatten.hpp
|
||||
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.cpp
|
||||
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.hpp
|
||||
src/dusk/randomizer/generator/logic/hints.cpp
|
||||
src/dusk/randomizer/generator/logic/hints.hpp
|
||||
src/dusk/randomizer/generator/logic/item.cpp
|
||||
src/dusk/randomizer/generator/logic/item.hpp
|
||||
src/dusk/randomizer/generator/logic/item_pool.cpp
|
||||
src/dusk/randomizer/generator/logic/item_pool.hpp
|
||||
src/dusk/randomizer/generator/logic/location.cpp
|
||||
src/dusk/randomizer/generator/logic/location.hpp
|
||||
src/dusk/randomizer/generator/logic/plandomizer.cpp
|
||||
src/dusk/randomizer/generator/logic/plandomizer.hpp
|
||||
src/dusk/randomizer/generator/logic/requirement.cpp
|
||||
src/dusk/randomizer/generator/logic/requirement.hpp
|
||||
src/dusk/randomizer/generator/logic/search.cpp
|
||||
src/dusk/randomizer/generator/logic/search.hpp
|
||||
src/dusk/randomizer/generator/logic/spoiler_log.cpp
|
||||
src/dusk/randomizer/generator/logic/spoiler_log.hpp
|
||||
src/dusk/randomizer/generator/logic/world.cpp
|
||||
src/dusk/randomizer/generator/logic/world.hpp
|
||||
src/dusk/randomizer/generator/randomizer.cpp
|
||||
src/dusk/randomizer/generator/randomizer.hpp
|
||||
src/dusk/randomizer/generator/seedgen/config.cpp
|
||||
src/dusk/randomizer/generator/seedgen/config.hpp
|
||||
src/dusk/randomizer/generator/seedgen/packed_bits.hpp
|
||||
src/dusk/randomizer/generator/seedgen/seed.cpp
|
||||
src/dusk/randomizer/generator/seedgen/seed.hpp
|
||||
src/dusk/randomizer/generator/seedgen/settings.cpp
|
||||
src/dusk/randomizer/generator/seedgen/settings.hpp
|
||||
src/dusk/randomizer/generator/test/test.cpp
|
||||
src/dusk/randomizer/generator/test/test.hpp
|
||||
src/dusk/randomizer/generator/utility/base64pp.hpp
|
||||
src/dusk/randomizer/generator/utility/color.cpp
|
||||
src/dusk/randomizer/generator/utility/color.hpp
|
||||
src/dusk/randomizer/generator/utility/crc32.hpp
|
||||
src/dusk/randomizer/generator/utility/common.cpp
|
||||
src/dusk/randomizer/generator/utility/common.hpp
|
||||
src/dusk/randomizer/generator/utility/container.hpp
|
||||
src/dusk/randomizer/generator/utility/endian.cpp
|
||||
src/dusk/randomizer/generator/utility/endian.hpp
|
||||
src/dusk/randomizer/generator/utility/exception.hpp
|
||||
src/dusk/randomizer/generator/utility/file.cpp
|
||||
src/dusk/randomizer/generator/utility/file.hpp
|
||||
src/dusk/randomizer/generator/utility/general.hpp
|
||||
src/dusk/randomizer/generator/utility/log.cpp
|
||||
src/dusk/randomizer/generator/utility/log.hpp
|
||||
src/dusk/randomizer/generator/utility/math.hpp
|
||||
src/dusk/randomizer/generator/utility/path.cpp
|
||||
src/dusk/randomizer/generator/utility/path.hpp
|
||||
src/dusk/randomizer/generator/utility/platform.cpp
|
||||
src/dusk/randomizer/generator/utility/platform.hpp
|
||||
src/dusk/randomizer/generator/utility/random.cpp
|
||||
src/dusk/randomizer/generator/utility/random.hpp
|
||||
src/dusk/randomizer/generator/utility/string.cpp
|
||||
src/dusk/randomizer/generator/utility/string.hpp
|
||||
src/dusk/randomizer/generator/utility/text.cpp
|
||||
src/dusk/randomizer/generator/utility/text.hpp
|
||||
src/dusk/randomizer/generator/utility/thread_local.hpp
|
||||
src/dusk/randomizer/generator/utility/time.cpp
|
||||
src/dusk/randomizer/generator/utility/time.hpp
|
||||
src/dusk/randomizer/generator/utility/yaml.hpp
|
||||
# Archipelago Files
|
||||
src/dusk/archipelago/archipelago_context.cpp
|
||||
)
|
||||
|
||||
set(DUSK_HTTP_BACKEND_FILES
|
||||
|
||||
@@ -16,37 +16,37 @@
|
||||
];
|
||||
forAllSystems = lib.genAttrs supportedSystems;
|
||||
|
||||
dawnVersion = "v20260423.175430";
|
||||
nodVersion = "v2.0.0-alpha.8";
|
||||
dawnVersion = "v20260618.032059";
|
||||
nodVersion = "v2.0.0-alpha.10";
|
||||
versionSuffix = "nix-" + (self.shortRev or self.dirtyShortRev or "dirty");
|
||||
|
||||
dawnInfo = {
|
||||
"x86_64-linux" = {
|
||||
triple = "linux-x86_64";
|
||||
hash = "sha256-HXfKTLHtMPwupnFnaflCARtXVPuS/0PoCePXidjE5xs=";
|
||||
hash = "sha256-GFSd573b+VQx/VmFdNQgWDd0V9ayQlcw0Zuopke12ak=";
|
||||
};
|
||||
"aarch64-linux" = {
|
||||
triple = "linux-aarch64";
|
||||
hash = "sha256-34yyFpfqBZUwoFXQ41F0AwAU78FaNihOSY0oriwn6B0=";
|
||||
hash = "sha256-ZaoP7BAjBMnfAv2/AMRi3FNH2ZtyqASCSFyU/oB2Mzg=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
triple = "darwin-arm64";
|
||||
hash = "sha256-eQnzrBp6gjiBek1VYQ9A5W13ClYWrDDKjIqv/7eNTR4=";
|
||||
hash = "sha256-HT+qtlLaSHyoXPrUcXgcTGa877X5YfzbxRD4bJb7i1Y=";
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
triple = "darwin-x86_64";
|
||||
hash = "sha256-QGWiGdxiI9kci3NPXH6QFFirxn16851zB/w3jqhIBJ4=";
|
||||
hash = "sha256-cUNaCbA7rlKSukDVKGaVEVw0Zt1+mSbaHbmUCMvMVWc=";
|
||||
};
|
||||
};
|
||||
|
||||
nodPrebuiltInfo = {
|
||||
"x86_64-linux" = {
|
||||
triple = "linux-x86_64";
|
||||
hash = "sha256-mUqvLsbsqaZ+HAjMmHYPYO+MgtanGRTw7Gzn5uXR5rE=";
|
||||
hash = "sha256-FVQWECVA2gWdc+n5OQ/Tvwn8z0qdgjSd1WlFt5HKOec=";
|
||||
};
|
||||
"aarch64-darwin" = {
|
||||
triple = "macos-arm64";
|
||||
hash = "sha256-UPy1ywCcv0K6VJOU3uUelJuUdBh3UNaPRlyP5LOBeDw=";
|
||||
hash = "sha256-8ZEejxksVgShNKUVRCBYaLOp9x/qOC9pAeVrElQUGUk=";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
'';
|
||||
|
||||
dawn = pkgs.fetchzip {
|
||||
url = "https://github.com/encounter/dawn-build/releases/download/${dawnVersion}/dawn-${dawnInfo.${system}.triple}.tar.gz";
|
||||
url = "https://github.com/encounter/dawn/releases/download/${dawnVersion}/dawn-${dawnInfo.${system}.triple}.tar.gz";
|
||||
hash = dawnInfo.${system}.hash;
|
||||
stripRoot = false;
|
||||
};
|
||||
@@ -94,7 +94,7 @@
|
||||
owner = "encounter";
|
||||
repo = "nod";
|
||||
rev = nodVersion;
|
||||
hash = "sha256-+zrtVzjo0+X/6uMcNUn1+FaSR+jOhrcQSDNBFjw0NDs=";
|
||||
hash = "sha256-r8qDlOVxv5iKiFjJQrcBuL9HVoOM3yEjRVnQIMqaICs=";
|
||||
};
|
||||
patches = [ ./fix-cmake-paths.patch ];
|
||||
cargoDeps = pkgs.rustPlatform.importCargoLock {
|
||||
@@ -141,12 +141,12 @@
|
||||
XXHASH = pkgs.xxhash.src;
|
||||
ZSTD = pkgs.zstd.src;
|
||||
FMT = pkgs.fetchzip {
|
||||
url = "https://github.com/fmtlib/fmt/archive/refs/tags/11.1.4.tar.gz";
|
||||
hash = "sha256-sUbxlYi/Aupaox3JjWFqXIjcaQa0LFjclQAOleT+FRA=";
|
||||
url = "https://github.com/fmtlib/fmt/archive/refs/tags/12.1.0.tar.gz";
|
||||
hash = "sha256-ZmI1Dv0ZabPlxa02OpERI47jp7zFfjpeWCy1WyuPYZ0=";
|
||||
};
|
||||
TRACY = pkgs.fetchzip {
|
||||
url = "https://github.com/wolfpld/tracy/archive/a64b9a20294d59421a2f57aeca3c6383d8c48169.tar.gz";
|
||||
hash = "sha256-hbNGOsGeyGSvCJ2No8RkwOib1lX2on3vNZSzyVkZdXw=";
|
||||
url = "https://github.com/wolfpld/tracy/archive/6789e7d6f9a65ec98926b602097a33a9676d2606.tar.gz";
|
||||
hash = "sha256-Xxyd7G/mnXEPpN+ehmwl0AkAhS3CwObpJNDgcqbdUJg=";
|
||||
};
|
||||
IMGUI = pkgs.fetchFromGitHub {
|
||||
owner = "ocornut";
|
||||
@@ -269,6 +269,12 @@
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString (!isDarwin) ''
|
||||
patchelf \
|
||||
--add-needed "${pkgs.vulkan-loader}/lib/libvulkan.so" \
|
||||
$out/bin/dusklight
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -46,6 +46,11 @@ public:
|
||||
s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); }
|
||||
s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); }
|
||||
u8 getDemoSeWaveNum() { return loadedDemoWave; }
|
||||
#if TARGET_PC
|
||||
u8 getLoadedSeWave_1() { return loadedSeWave_1;}
|
||||
u8 getLoadedSeWave_2() { return loadedSeWave_2;}
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
/* 0x00 */ JAISoundID BGM_ID;
|
||||
@@ -158,10 +163,6 @@ enum Z2Scene {
|
||||
/* 0x4E */ Z2SCENE_GROTTO_ROCK_2,
|
||||
/* 0x4F */ Z2SCENE_GROTTO_POND,
|
||||
/* 0x50 */ Z2SCENE_FARON_WOODS_CAVE,
|
||||
|
||||
#if TARGET_PC
|
||||
/* 0x51 */ Z2SCENE_CAVE_OF_SHADOWS,
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* Z2SCENEMGR_H */
|
||||
|
||||
@@ -3912,6 +3912,12 @@ public:
|
||||
u16 getReadyItem() { return dComIfGp_getSelectItem(mSelectItemId); }
|
||||
|
||||
static u32 getOtherHeapSize() { return 0xF0A60; }
|
||||
|
||||
#if TARGET_PC
|
||||
u16 getEventId() { return mMsgFlow.getEventId(); }
|
||||
|
||||
bool checkSwimming() {return checkModeFlg(MODE_SWIMMING);}
|
||||
#endif
|
||||
|
||||
static daAlink_BckData const m_mainBckShield[20];
|
||||
static daAlink_BckData const m_mainBckSword[5];
|
||||
@@ -4560,8 +4566,6 @@ public:
|
||||
|
||||
void onIronBallChainInterpCallback();
|
||||
|
||||
f32 mLosStickValue;
|
||||
|
||||
static const int IRON_BALL_CHAIN_COUNT = 102;
|
||||
cXyz mIBChainInterpPrevPos[IRON_BALL_CHAIN_COUNT];
|
||||
cXyz mIBChainInterpCurrPos[IRON_BALL_CHAIN_COUNT];
|
||||
@@ -6393,7 +6397,8 @@ public:
|
||||
|
||||
class daAlinkHIO_huLight_c0 {
|
||||
public:
|
||||
static daAlinkHIO_huLight_c1 const m;
|
||||
static daAlinkHIO_huLight_c1 IF_NOT_DUSK(const) m;
|
||||
IF_DUSK(static daAlinkHIO_huLight_c1 const original;)
|
||||
};
|
||||
|
||||
class daAlinkHIO_wlLight_c1 {
|
||||
@@ -6467,7 +6472,8 @@ public:
|
||||
|
||||
class daAlinkHIO_kandelaar_c0 {
|
||||
public:
|
||||
static daAlinkHIO_kandelaar_c1 const m;
|
||||
static daAlinkHIO_kandelaar_c1 IF_NOT_DUSK(const) m;
|
||||
IF_DUSK(static daAlinkHIO_kandelaar_c1 const original;)
|
||||
};
|
||||
|
||||
class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c {
|
||||
|
||||
@@ -88,9 +88,14 @@ public:
|
||||
/* 0x396A */ u8 field_0x396A[0x399E - 0x396A];
|
||||
/* 0x399E */ s16 field_0x399e;
|
||||
/* 0x39A0 */ u8 field_0x39A0[0x39A4 - 0x39A0];
|
||||
|
||||
#if TARGET_PC
|
||||
/* 0x39A4 */ cM_rnd_c mMantRng;
|
||||
#endif
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
STATIC_ASSERT(sizeof(mant_class) == 0x39ac);
|
||||
#else
|
||||
STATIC_ASSERT(sizeof(mant_class) == 0x39a4);
|
||||
#endif
|
||||
|
||||
#endif /* D_A_MANT_H */
|
||||
|
||||
@@ -18,24 +18,16 @@ public:
|
||||
TGXTexObj& getTexObj() { return mTexObj; }
|
||||
cXyz* getQuad() { return mQuad; }
|
||||
|
||||
#if TARGET_PC
|
||||
// TP HD reflects across N floor quads (F_SP117 room 2 uses 6); GC uses 1.
|
||||
static const int MAX_QUADS = 6;
|
||||
#endif
|
||||
|
||||
/* 0x010 */ TGXTexObj mTexObj;
|
||||
/* 0x030 */ u8 mModelCount;
|
||||
/* 0x034 */ J3DModel* mModels[0x40];
|
||||
/* 0x134 */ cXyz mQuad[DUSK_IF_ELSE(MAX_QUADS*4, 4)];
|
||||
/* 0x134 */ cXyz mQuad[4];
|
||||
/* 0x164 */ cXyz mMinVal;
|
||||
/* 0x170 */ cXyz mMaxVal;
|
||||
/* 0x17C */ cXyz mViewScale;
|
||||
#if TARGET_PC
|
||||
bool mbReset = false;
|
||||
bool mbHadEntry = false;
|
||||
cXyz mQuadBoxMin[MAX_QUADS];
|
||||
cXyz mQuadBoxMax[MAX_QUADS];
|
||||
int mQuadCount = 1;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -120,7 +120,10 @@ public:
|
||||
BOOL chkAction(actionFunc action) { return action == mAction; }
|
||||
|
||||
static eventFunc mEvtSeqList[1];
|
||||
|
||||
#if TARGET_PC
|
||||
// Keep track of last given bug for rando
|
||||
static u8 mGivenInsectId;
|
||||
#endif
|
||||
private:
|
||||
/* 0xB48 */ Z2Creature mSound;
|
||||
/* 0xBD8 */ J3DModel* mpUmbrellaModel;
|
||||
|
||||
@@ -142,12 +142,12 @@ namespace daObjSwpush {
|
||||
int Mthd_Execute();
|
||||
int Mthd_Draw();
|
||||
|
||||
static s16 const M_bmd[DUSK_IF_ELSE(4, 3)];
|
||||
static s16 const M_dzb[DUSK_IF_ELSE(4, 3)];
|
||||
static u32 const M_heap_size[DUSK_IF_ELSE(4, 3)];
|
||||
static s16 const M_bmd[3];
|
||||
static s16 const M_dzb[3];
|
||||
static u32 const M_heap_size[3];
|
||||
static Hio_c::Attr_c const M_attr[5];
|
||||
static u8 const M_op_vtx[4];
|
||||
static DUSK_CONST char* M_arcname[DUSK_IF_ELSE(4, 3)];
|
||||
static DUSK_CONST char* M_arcname[3];
|
||||
|
||||
/* 0x568 */ request_of_phase_process_class mPhase;
|
||||
/* 0x570 */ dBgWSv* mpBgW;
|
||||
|
||||
@@ -64,6 +64,9 @@ public:
|
||||
virtual int Delete();
|
||||
virtual BOOL checkSmallTbox() { return true; }
|
||||
|
||||
#if TARGET_PC
|
||||
u8 getTboxNo() { return fopAcM_GetParamBit(this, 16, 8);}
|
||||
#endif
|
||||
u8 getModelType() { return fopAcM_GetParamBit(this, 8, 4); }
|
||||
u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); }
|
||||
|
||||
|
||||
@@ -114,6 +114,10 @@ public:
|
||||
|
||||
bool checkBoomWindTgTimer() { return mBoomWindTgTimer == 0; }
|
||||
|
||||
#if TARGET_PC
|
||||
void setRandomizerItem(bool setFoolishItemModel = false);
|
||||
#endif
|
||||
|
||||
static procFunc mFuncPtr[];
|
||||
static const dCcD_SrcCyl m_cyl_src;
|
||||
static s32 m_timer_max;
|
||||
|
||||
@@ -7,4 +7,9 @@ class fopAc_ac_c;
|
||||
int CheckFieldItemCreateHeap(fopAc_ac_c* actor);
|
||||
int CheckItemCreateHeap(fopAc_ac_c* i_this);
|
||||
|
||||
#if TARGET_PC
|
||||
// Used for foolish items in rando. Foolish item model id is saved to home.angle.z
|
||||
#define M_ITEMNO_MODEL_ITEM_ID (IF_DUSK(randomizer_IsActive() && m_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e && home.angle.z != 0 ? home.angle.z :) m_itemNo)
|
||||
#endif
|
||||
|
||||
#endif /* D_A_D_A_ITEMBASE_STATIC_H */
|
||||
|
||||
@@ -74,7 +74,17 @@ public:
|
||||
s16 getAngleY() const { return mAngleY; }
|
||||
void setAngleY(s16 angle) { mAngleY = angle;}
|
||||
|
||||
#if TARGET_PC
|
||||
BOOL isRandomized() const;
|
||||
#endif
|
||||
|
||||
static ResourceData const mData[23];
|
||||
#if TARGET_PC
|
||||
static ResourceData mRandoData[23];
|
||||
#define M_SHOP_DATA (isRandomized() ? mRandoData : mData)
|
||||
#else
|
||||
#define M_SHOP_DATA mData
|
||||
#endif
|
||||
static f32 const m_cullfar_max;
|
||||
|
||||
enum {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef D_COM_D_COM_INF_GAME_H
|
||||
#define D_COM_D_COM_INF_GAME_H
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#endif
|
||||
|
||||
#include "d/d_attention.h"
|
||||
#include "d/d_cc_s.h"
|
||||
#include "d/d_event.h"
|
||||
@@ -466,6 +470,9 @@ public:
|
||||
s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); }
|
||||
s8 getNextStageLayer() { return mNextStage.getLayer(); }
|
||||
BOOL isEnableNextStage() { return mNextStage.isEnable(); }
|
||||
#if TARGET_PC
|
||||
void setEnableNextStage() { return mNextStage.setEnable(); }
|
||||
#endif
|
||||
void offEnableNextStage() { mNextStage.offEnable(); }
|
||||
s8 getNextStageWipe() { return mNextStage.getWipe(); }
|
||||
u8 getNextStageWipeSpeed() { return mNextStage.getWipeSpeed(); }
|
||||
@@ -1121,6 +1128,15 @@ void dComIfGs_setWarpItemData(char const* stage, cXyz pos, s16 angle, s8 roomNo,
|
||||
u8 param_5);
|
||||
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
|
||||
BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no);
|
||||
#if TARGET_PC
|
||||
void dComIfGs_onStageTbox(int i_stageNo, int i_no);
|
||||
void dComIfGs_offStageTbox(int i_stageNo, int i_no);
|
||||
|
||||
void dComIfGs_onStageItem(int i_stageNo, int i_no);
|
||||
void dComIfGs_offStageItem(int i_stageNo, int i_no);
|
||||
|
||||
#endif
|
||||
|
||||
void dComIfGs_onStageSwitch(int i_stageNo, int i_no);
|
||||
void dComIfGs_offStageSwitch(int i_stageNo, int i_no);
|
||||
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
|
||||
@@ -1268,6 +1284,10 @@ int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3
|
||||
f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8,
|
||||
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, TGXTexObj* param_12);
|
||||
|
||||
#if TARGET_PC
|
||||
void dComIfGs_setupRandomizerSave();
|
||||
#endif
|
||||
|
||||
inline dSv_info_c* dComIfGs_getSaveInfo() {
|
||||
return &g_dComIfG_gameInfo.info;
|
||||
}
|
||||
@@ -1328,9 +1348,13 @@ inline u8 dComIfGs_getSelectEquipShield() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SHIELD);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
u8 dComIfGs_getCollectSmell();
|
||||
#else
|
||||
inline u8 dComIfGs_getCollectSmell() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SMELL);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void dComIfGs_setCollectSmell(u8 smell) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().setSelectEquip(COLLECT_SMELL, smell);
|
||||
@@ -1420,6 +1444,12 @@ inline BOOL dComIfGs_isDarkClearLV(int i_no) {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().isDarkClearLV(i_no);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline u8 dComIfGs_getDarkClearLV() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().getDarkClearLV();
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void dComIfGs_onTransformLV(int i_no) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().onTransformLV(i_no);
|
||||
}
|
||||
@@ -1497,6 +1527,12 @@ inline void dComIfGs_onRegionBit(int i_region) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().onRegionBit(i_region);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline void dComIfGs_setRegionBit(u8 i_region) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().setRegionBit(i_region);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline void dComIfGs_setPlayerFieldLastStayInfo(const char* i_stage, cXyz& i_pos, s16 i_angle,
|
||||
s8 i_point, u8 i_region) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().set(i_stage, i_pos, i_angle,
|
||||
@@ -1648,6 +1684,16 @@ inline void dComIfGs_setPachinkoNum(u8 i_num) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getItemRecord().setPachinkoNum(i_num);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline u8 dComIfGs_getAncientDocumentNum() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getAncientDocumentNum();
|
||||
}
|
||||
|
||||
inline void dComIfGs_setAncientDocumentNum(u8 i_num) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getItemRecord().setAncientDocumentNum(i_num);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline u8 dComIfGs_getPachinkoMax() {
|
||||
return 50;
|
||||
}
|
||||
@@ -1820,7 +1866,16 @@ inline u8 dComIfGs_getGetNumber(int i_no) {
|
||||
inline void dComIfGs_setGetNumber(int i_no, u8 i_value) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setGetNumber(i_no, i_value);
|
||||
}
|
||||
#if TARGET_PC
|
||||
// For rando
|
||||
inline void dComIfGs_setAllLetterGet() {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterGet();
|
||||
}
|
||||
|
||||
inline void dComIfGs_setAllLetterRead() {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterRead();
|
||||
}
|
||||
#endif
|
||||
inline void dComIfGs_addFishNum(u8 param_0) {
|
||||
g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().addFishCount(param_0);
|
||||
}
|
||||
@@ -1936,6 +1991,33 @@ inline u8 dComIfGs_getPalLanguage() {
|
||||
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPalLanguage();
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// Kinda hacky, but will do for now
|
||||
inline void dComIfGs_onRegionFlag(int i_stageNo, int i_no) {
|
||||
auto regionFlags = reinterpret_cast<u8*>(&g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit());
|
||||
const int offset = i_no / 8;
|
||||
const int shift = i_no % 8;
|
||||
regionFlags[offset] |= (0x80 >> shift);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onSaveTbox(int i_stageNo, int i_no) {
|
||||
g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().onTbox(i_no);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offSaveTbox(int i_stageNo, int i_no) {
|
||||
g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().offTbox(i_no);
|
||||
}
|
||||
|
||||
inline void dComIfGs_onSaveItem(int i_no) {
|
||||
g_dComIfG_gameInfo.info.getMemory().getBit().onItem(i_no);
|
||||
}
|
||||
|
||||
inline void dComIfGs_offSaveItem(int i_no) {
|
||||
g_dComIfG_gameInfo.info.getMemory().getBit().offItem(i_no);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
inline BOOL dComIfGs_isSaveTbox(int i_stageNo, int i_no) {
|
||||
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().isTbox(i_no);
|
||||
}
|
||||
@@ -2020,6 +2102,10 @@ inline void dComIfGs_setKeyNum(u8 i_keyNum) {
|
||||
g_dComIfG_gameInfo.info.getMemory().getBit().setKeyNum(i_keyNum);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
u8 dComIfGs_getKeyNum(int i_stageNo);
|
||||
#endif
|
||||
|
||||
inline void dComIfGs_onDungeonItemMap() {
|
||||
g_dComIfG_gameInfo.info.getMemory().getBit().onDungeonItemMap();
|
||||
}
|
||||
@@ -2396,6 +2482,12 @@ inline void dComIfGs_onItem(int i_bitNo, int i_roomNo) {
|
||||
g_dComIfG_gameInfo.info.onItem(i_bitNo, i_roomNo);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline void dComIfGs_offItem(int i_bitNo, int i_roomNo) {
|
||||
g_dComIfG_gameInfo.info.offItem(i_bitNo, i_roomNo);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline bool dComIfGs_isItem(int i_bitNo, int i_roomNo) {
|
||||
return g_dComIfG_gameInfo.info.isItem(i_bitNo, i_roomNo);
|
||||
}
|
||||
@@ -2452,6 +2544,12 @@ inline s8 dComIfGp_getStartStageRoomNo() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageRoomNo();
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline s8 dComIfGp_getLayerNo() {
|
||||
return g_dComIfG_gameInfo.play.getLayerNo(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
inline s8 dComIfGp_getStartStageLayer() {
|
||||
return g_dComIfG_gameInfo.play.getStartStageLayer();
|
||||
}
|
||||
@@ -2496,6 +2594,12 @@ inline void dComIfGp_offEnableNextStage() {
|
||||
g_dComIfG_gameInfo.play.offEnableNextStage();
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
inline void dComIfGp_setEnableNextStage() {
|
||||
g_dComIfG_gameInfo.play.setEnableNextStage();
|
||||
}
|
||||
#endif
|
||||
|
||||
inline s8 dComIfGp_getNextStageWipe() {
|
||||
return g_dComIfG_gameInfo.play.getNextStageWipe();
|
||||
}
|
||||
|
||||
@@ -203,6 +203,10 @@ public:
|
||||
DATASELPROC_DATA_SELECT_MOVE_ANIME,
|
||||
DATASELPROC_SELECT_DATA_OPEN_MOVE,
|
||||
DATASELPROC_SELECT_DATA_NAME_MOVE,
|
||||
#if TARGET_PC
|
||||
DATASELPROC_SELECT_DATA_PLAY_MOVE, // Select between vanilla or randomizer play
|
||||
DATASELPROC_MENU_ARCHIPELAGO_CONNECT, // Wait for archipelago to connect
|
||||
#endif
|
||||
DATASELPROC_SELECT_DATA_OPENERASE_MOVE,
|
||||
DATASELPROC_MENU_SELECT,
|
||||
DATASELPROC_MENU_SELECT_MOVE_ANM,
|
||||
@@ -331,6 +335,10 @@ public:
|
||||
void makeRecInfo(u8);
|
||||
void selectDataOpenMove();
|
||||
void selectDataNameMove();
|
||||
#if TARGET_PC
|
||||
void selectDataPlayTypeMove();
|
||||
void menuArchipelagoConnect();
|
||||
#endif
|
||||
void selectDataOpenEraseMove();
|
||||
void menuSelect();
|
||||
void menuSelectStart();
|
||||
@@ -732,7 +740,14 @@ public:
|
||||
/* 0x2378 */ J2DPicture* mpFadePict;
|
||||
#endif
|
||||
#ifdef TARGET_PC
|
||||
dDlst_FileSelFade_c mFadeDlst;
|
||||
struct mDusk {
|
||||
dDlst_FileSelFade_c mFadeDlst;
|
||||
bool mStartNameAnm;
|
||||
bool mBackToFileSelect;
|
||||
bool mArchipelagoBeginConnect;
|
||||
bool mArchiStartCloseFile;
|
||||
int mPendingRmlCloseFrames{0};
|
||||
} mDusk;
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
@@ -743,7 +758,7 @@ public:
|
||||
};
|
||||
|
||||
#ifdef TARGET_PC
|
||||
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dDlst_FileSelFade_c));
|
||||
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dFile_select_c::mDusk));
|
||||
#else
|
||||
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C);
|
||||
#endif
|
||||
|
||||
+135
-4
@@ -32,6 +32,11 @@ void item_func_ARROW_20();
|
||||
void item_func_ARROW_30();
|
||||
void item_func_ARROW_1();
|
||||
void item_func_PACHINKO_SHOT();
|
||||
#if TARGET_PC
|
||||
void item_func_FOOLISH_ITEM();
|
||||
void item_func_ORDON_PORTAL();
|
||||
void item_func_SOUTH_FARON_PORTAL();
|
||||
#endif
|
||||
void item_func_WATER_BOMB_5();
|
||||
void item_func_WATER_BOMB_10();
|
||||
void item_func_WATER_BOMB_20();
|
||||
@@ -65,6 +70,12 @@ void item_func_DUNGEON_EXIT_2();
|
||||
void item_func_WALLET_LV1();
|
||||
void item_func_WALLET_LV2();
|
||||
void item_func_WALLET_LV3();
|
||||
#if TARGET_PC
|
||||
void item_func_UPPER_ZORAS_RIVER_PORTAL();
|
||||
void item_func_CASTLE_TOWN_PORTAL();
|
||||
void item_func_GERUDO_DESERT_PORTAL();
|
||||
void item_func_NORTH_FARON_PORTAL();
|
||||
#endif
|
||||
void item_func_ZORAS_JEWEL();
|
||||
void item_func_HAWK_EYE();
|
||||
void item_func_WOOD_STICK();
|
||||
@@ -81,13 +92,23 @@ void item_func_LIGHT_SWORD();
|
||||
void item_func_FISHING_ROD_1();
|
||||
void item_func_PACHINKO();
|
||||
void item_func_COPY_ROD_2();
|
||||
#if TARGET_PC
|
||||
void item_func_KAKARIKO_GORGE_PORTAL();
|
||||
void item_func_KAKARIKO_VILLAGE_PORTAL();
|
||||
#endif
|
||||
void item_func_BOMB_BAG_LV2();
|
||||
void item_func_BOMB_BAG_LV1();
|
||||
void item_func_BOMB_IN_BAG();
|
||||
#if TARGET_PC
|
||||
void item_func_DEATH_MOUNTAIN_PORTAL();
|
||||
#endif
|
||||
void item_func_LIGHT_ARROW();
|
||||
void item_func_ARROW_LV1();
|
||||
void item_func_ARROW_LV2();
|
||||
void item_func_ARROW_LV3();
|
||||
#if TARGET_PC
|
||||
void item_func_ZORAS_DOMAIN_PORTAL();
|
||||
#endif
|
||||
void item_func_LURE_ROD();
|
||||
void item_func_BOMB_ARROW();
|
||||
void item_func_HAWK_ARROW();
|
||||
@@ -133,8 +154,33 @@ void item_func_BILL();
|
||||
void item_func_WOOD_STATUE();
|
||||
void item_func_IRIAS_PENDANT();
|
||||
void item_func_HORSE_FLUTE();
|
||||
#if TARGET_PC
|
||||
void item_func_FOREST_SMALL_KEY();
|
||||
void item_func_MINES_SMALL_KEY();
|
||||
void item_func_LAKEBED_SMALL_KEY();
|
||||
void item_func_ARBITERS_SMALL_KEY();
|
||||
void item_func_SNOWPEAK_SMALL_KEY();
|
||||
void item_func_TEMPLE_OF_TIME_SMALL_KEY();
|
||||
void item_func_CITY_SMALL_KEY();
|
||||
void item_func_PALACE_SMALL_KEY();
|
||||
void item_func_HYRULE_SMALL_KEY();
|
||||
void item_func_CAMP_SMALL_KEY();
|
||||
void item_func_LAKE_HYLIA_PORTAL();
|
||||
#endif
|
||||
void item_func_RAFRELS_MEMO();
|
||||
void item_func_ASHS_SCRIBBLING();
|
||||
#if TARGET_PC
|
||||
void item_func_FOREST_BOSS_KEY();
|
||||
void item_func_LAKEBED_BOSS_KEY();
|
||||
void item_func_ARBITERS_BOSS_KEY();
|
||||
void item_func_TEMPLE_OF_TIME_BOSS_KEY();
|
||||
void item_func_CITY_BOSS_KEY();
|
||||
void item_func_PALACE_BOSS_KEY();
|
||||
void item_func_HYRULE_BOSS_KEY();
|
||||
void item_func_FOREST_COMPASS();
|
||||
void item_func_MINES_COMPASS();
|
||||
void item_func_LAKEBED_COMPASS();
|
||||
#endif
|
||||
void item_func_CHUCHU_YELLOW2();
|
||||
void item_func_OIL_BOTTLE3();
|
||||
void item_func_SHOP_BEE_CHILD();
|
||||
@@ -147,12 +193,34 @@ void item_func_FILLED_CONTAINER();
|
||||
void item_func_MIRROR_PIECE_2();
|
||||
void item_func_MIRROR_PIECE_3();
|
||||
void item_func_MIRROR_PIECE_4();
|
||||
#if TARGET_PC
|
||||
void item_func_ARBITERS_COMPASS();
|
||||
void item_func_SNOWPEAK_COMPASS();
|
||||
void item_func_TEMPLE_OF_TIME_COMPASS();
|
||||
void item_func_CITY_COMPASS();
|
||||
void item_func_PALACE_COMPASS();
|
||||
void item_func_HYRULE_COMPASS();
|
||||
void item_func_MIRROR_CHAMBER_PORTAL();
|
||||
void item_func_SNOWPEAK_PORTAL();
|
||||
#endif
|
||||
void item_func_SMELL_YELIA_POUCH();
|
||||
void item_func_SMELL_PUMPKIN();
|
||||
void item_func_SMELL_POH();
|
||||
void item_func_SMELL_FISH();
|
||||
void item_func_SMELL_CHILDREN();
|
||||
void item_func_SMELL_MEDICINE();
|
||||
#if TARGET_PC
|
||||
void item_func_FOREST_MAP();
|
||||
void item_func_MINES_MAP();
|
||||
void item_func_LAKEBED_MAP();
|
||||
void item_func_ARBITERS_MAP();
|
||||
void item_func_SNOWPEAK_MAP();
|
||||
void item_func_TEMPLE_OF_TIME_MAP();
|
||||
void item_func_CITY_MAP();
|
||||
void item_func_PALACE_MAP();
|
||||
void item_func_HYRULE_MAP();
|
||||
void item_func_SACRED_GROVE_PORTAL();
|
||||
#endif
|
||||
void item_func_M_BEETLE();
|
||||
void item_func_F_BEETLE();
|
||||
void item_func_M_BUTTERFLY();
|
||||
@@ -177,7 +245,24 @@ void item_func_M_ANT();
|
||||
void item_func_F_ANT();
|
||||
void item_func_M_MAYFLY();
|
||||
void item_func_F_MAYFLY();
|
||||
#if TARGET_PC
|
||||
void item_func_FUSED_SHADOW_1();
|
||||
void item_func_FUSED_SHADOW_2();
|
||||
void item_func_FUSED_SHADOW_3();
|
||||
void item_func_MIRROR_PIECE_1();
|
||||
void item_func_ARCHIPELAGO_ITEM();
|
||||
#endif
|
||||
void item_func_POU_SPIRIT();
|
||||
#if TARGET_PC
|
||||
void item_func_ENDING_BLOW();
|
||||
void item_func_SHIELD_ATTACK();
|
||||
void item_func_BACK_SLICE();
|
||||
void item_func_HELM_SPLITTER();
|
||||
void item_func_MORTAL_DRAW();
|
||||
void item_func_JUMP_STRIKE();
|
||||
void item_func_GREAT_SPIN();
|
||||
void item_func_ELDIN_BRIDGE_PORTAL();
|
||||
#endif
|
||||
void item_func_ANCIENT_DOCUMENT();
|
||||
void item_func_AIR_LETTER();
|
||||
void item_func_ANCIENT_DOCUMENT2();
|
||||
@@ -221,6 +306,10 @@ int item_getcheck_func_ARROW_20();
|
||||
int item_getcheck_func_ARROW_30();
|
||||
int item_getcheck_func_ARROW_1();
|
||||
int item_getcheck_func_PACHINKO_SHOT();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_ORDON_PORTAL();
|
||||
int item_getcheck_func_SOUTH_FARON_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_WATER_BOMB_5();
|
||||
int item_getcheck_func_WATER_BOMB_10();
|
||||
int item_getcheck_func_WATER_BOMB_20();
|
||||
@@ -254,6 +343,12 @@ int item_getcheck_func_DUNGEON_EXIT_2();
|
||||
int item_getcheck_func_WALLET_LV1();
|
||||
int item_getcheck_func_WALLET_LV2();
|
||||
int item_getcheck_func_WALLET_LV3();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_UPPER_ZORAS_RIVER_PORTAL();
|
||||
int item_getcheck_func_CASTLE_TOWN_PORTAL();
|
||||
int item_getcheck_func_GERUDO_DESERT_PORTAL();
|
||||
int item_getcheck_func_NORTH_FARON_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_ZORAS_JEWEL();
|
||||
int item_getcheck_func_HAWK_EYE();
|
||||
int item_getcheck_func_WOOD_STICK();
|
||||
@@ -270,13 +365,23 @@ int item_getcheck_func_LIGHT_SWORD();
|
||||
int item_getcheck_func_FISHING_ROD_1();
|
||||
int item_getcheck_func_PACHINKO();
|
||||
int item_getcheck_func_COPY_ROD_2();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_KAKARIKO_GORGE_PORTAL();
|
||||
int item_getcheck_func_KAKARIKO_VILLAGE_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_BOMB_BAG_LV2();
|
||||
int item_getcheck_func_BOMB_BAG_LV1();
|
||||
int item_getcheck_func_BOMB_IN_BAG();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_DEATH_MOUNTAIN_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_LIGHT_ARROW();
|
||||
int item_getcheck_func_ARROW_LV1();
|
||||
int item_getcheck_func_ARROW_LV2();
|
||||
int item_getcheck_func_ARROW_LV3();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_ZORAS_DOMAIN_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_LURE_ROD();
|
||||
int item_getcheck_func_BOMB_ARROW();
|
||||
int item_getcheck_func_HAWK_ARROW();
|
||||
@@ -322,6 +427,10 @@ int item_getcheck_func_BILL();
|
||||
int item_getcheck_func_WOOD_STATUE();
|
||||
int item_getcheck_func_IRIAS_PENDANT();
|
||||
int item_getcheck_func_HORSE_FLUTE();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_CAMP_SMALL_KEY();
|
||||
int item_getcheck_func_LAKE_HYLIA_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_RAFRELS_MEMO();
|
||||
int item_getcheck_func_ASHS_SCRIBBLING();
|
||||
int item_getcheck_func_CHUCHU_YELLOW2();
|
||||
@@ -336,12 +445,19 @@ int item_getcheck_func_FILLED_CONTAINER();
|
||||
int item_getcheck_func_MIRROR_PIECE_2();
|
||||
int item_getcheck_func_MIRROR_PIECE_3();
|
||||
int item_getcheck_func_MIRROR_PIECE_4();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_MIRROR_CHAMBER_PORTAL();
|
||||
int item_getcheck_func_SNOWPEAK_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_SMELL_YELIA_POUCH();
|
||||
int item_getcheck_func_SMELL_PUMPKIN();
|
||||
int item_getcheck_func_SMELL_POH();
|
||||
int item_getcheck_func_SMELL_FISH();
|
||||
int item_getcheck_func_SMELL_CHILDREN();
|
||||
int item_getcheck_func_SMELL_MEDICINE();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_SACRED_GROVE_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_M_BEETLE();
|
||||
int item_getcheck_func_F_BEETLE();
|
||||
int item_getcheck_func_M_BUTTERFLY();
|
||||
@@ -366,7 +482,23 @@ int item_getcheck_func_M_ANT();
|
||||
int item_getcheck_func_F_ANT();
|
||||
int item_getcheck_func_M_MAYFLY();
|
||||
int item_getcheck_func_F_MAYFLY();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_FUSED_SHADOW_1();
|
||||
int item_getcheck_func_FUSED_SHADOW_2();
|
||||
int item_getcheck_func_FUSED_SHADOW_3();
|
||||
int item_getcheck_func_MIRROR_PIECE_1();
|
||||
#endif
|
||||
int item_getcheck_func_POU_SPIRIT();
|
||||
#if TARGET_PC
|
||||
int item_getcheck_func_ENDING_BLOW();
|
||||
int item_getcheck_func_SHIELD_ATTACK();
|
||||
int item_getcheck_func_BACK_SLICE();
|
||||
int item_getcheck_func_HELM_SPLITTER();
|
||||
int item_getcheck_func_MORTAL_DRAW();
|
||||
int item_getcheck_func_JUMP_STRIKE();
|
||||
int item_getcheck_func_GREAT_SPIN();
|
||||
int item_getcheck_func_ELDIN_BRIDGE_PORTAL();
|
||||
#endif
|
||||
int item_getcheck_func_ANCIENT_DOCUMENT();
|
||||
int item_getcheck_func_AIR_LETTER();
|
||||
int item_getcheck_func_ANCIENT_DOCUMENT2();
|
||||
@@ -395,13 +527,12 @@ int checkItemGet(u8, int);
|
||||
BOOL isHeart(u8 item_no);
|
||||
int isBomb(u8);
|
||||
int isArrow(u8);
|
||||
#if TARGET_PC
|
||||
int isRupee(u8);
|
||||
#endif
|
||||
int addBombCount(u8, u8);
|
||||
BOOL isBottleItem(u8 item_no);
|
||||
u8 check_itemno(int i_itemNo);
|
||||
BOOL isInsect(u8 i_itemNo);
|
||||
|
||||
#if TARGET_PC
|
||||
void item_func_WALLET_LV4();
|
||||
#endif
|
||||
|
||||
#endif /* D_D_ITEM_H */
|
||||
|
||||
+322
-2
@@ -35,7 +35,65 @@ struct dItem_fieldItemResource {
|
||||
/* 0xC */ u16 mHeapSize;
|
||||
}; // Size: 0x10
|
||||
|
||||
#if TARGET_PC
|
||||
// Delcared helper functions since we can't include dComIfg_isRandomizer here
|
||||
dItem_itemResource* dItem_data_getItemResource();
|
||||
dItem_fieldItemResource* dItem_data_getFieldItemResource();
|
||||
dItem_itemInfo* dItem_data_getItemInfo();
|
||||
#endif
|
||||
|
||||
struct dItem_data {
|
||||
#if TARGET_PC
|
||||
static const char* getArcName(u8 index) { return dItem_data_getItemResource()[index].mArcName; }
|
||||
|
||||
static s16 getBtpName(u8 index) { return dItem_data_getItemResource()[index].mBtpName; }
|
||||
|
||||
static s16 getBrkName(u8 index) { return dItem_data_getItemResource()[index].mBrkName; }
|
||||
|
||||
static s16 getBxaName(u8 index) { return -1; }
|
||||
|
||||
static s16 getBckName(u8 index) { return dItem_data_getItemResource()[index].mBckName; }
|
||||
|
||||
static s16 getBpkName(u8 index) { return -1; }
|
||||
|
||||
static s16 getBtkName(u8 index) { return dItem_data_getItemResource()[index].mBtkName; }
|
||||
|
||||
static s16 getBmdName(u8 index) { return dItem_data_getItemResource()[index].mBmdName; }
|
||||
|
||||
static s8 getTevFrm(u8 index) { return dItem_data_getItemResource()[index].mTevFrm; }
|
||||
|
||||
static s8 getBtpFrm(u8 index) { return dItem_data_getItemResource()[index].mBtpFrm; }
|
||||
|
||||
static s16 getTexture(u8 index) { return dItem_data_getItemResource()[index].mTexture; }
|
||||
|
||||
static u8 getTexScale (u8 index) { return dItem_data_getItemResource()[index].mTexScale; }
|
||||
|
||||
static const char* getFieldArc(u8 index) { return dItem_data_getFieldItemResource()[index].mFieldArc; }
|
||||
|
||||
static s16 getItemBmdName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBmdName; }
|
||||
|
||||
static s16 getItemBtkName(u8 index) { return -1; }
|
||||
|
||||
static s16 getItemBpkName(u8 index) { return -1; }
|
||||
|
||||
static s16 getItemBckName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBckName; }
|
||||
|
||||
static s16 getItemBxaName(u8 index) { return -1; }
|
||||
|
||||
static s16 getItemBrkName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBrkName; }
|
||||
|
||||
static s16 getItemBtpName(u8 index) { return -1; }
|
||||
|
||||
static BOOL chkFlag(u8 index, int flag) { return dItem_data_getItemInfo()[index].mFlag & flag; }
|
||||
|
||||
static u8 getShadowSize(u8 index) { return dItem_data_getItemInfo()[index].mShadowSize; }
|
||||
|
||||
static const u8 getH(u8 index) { return dItem_data_getItemInfo()[index].mH; }
|
||||
|
||||
static const u8 getR(u8 index) { return dItem_data_getItemInfo()[index].mR; }
|
||||
|
||||
static u16 getFieldHeapSize(u8 index) { return dItem_data_getFieldItemResource()[index].mHeapSize; }
|
||||
#else
|
||||
static const char* getArcName(u8 index) { return item_resource[index].mArcName; }
|
||||
|
||||
static s16 getBtpName(u8 index) { return item_resource[index].mBtpName; }
|
||||
@@ -85,10 +143,16 @@ struct dItem_data {
|
||||
static const u8 getR(u8 index) { return item_info[index].mR; }
|
||||
|
||||
static u16 getFieldHeapSize(u8 index) { return field_item_res[index].mHeapSize; }
|
||||
#endif
|
||||
|
||||
static dItem_itemResource item_resource[255];
|
||||
static dItem_fieldItemResource field_item_res[255];
|
||||
static dItem_itemInfo item_info[255];
|
||||
#if TARGET_PC
|
||||
static dItem_itemResource item_resource_randomizer[255];
|
||||
static dItem_fieldItemResource field_item_res_randomizer[255];
|
||||
static dItem_itemInfo item_info_randomizer[255];
|
||||
#endif
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -351,9 +415,265 @@ enum {
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
// HD item mappings
|
||||
// Randomizer item ids. Mostly the same, but we use most unused
|
||||
// entries for custom portals and keys
|
||||
enum {
|
||||
dItemNo_WALLET_LV4_e = 0xDA,
|
||||
/* 0x00 */ dItemNo_Randomizer_HEART_e,
|
||||
/* 0x01 */ dItemNo_Randomizer_GREEN_RUPEE_e,
|
||||
/* 0x02 */ dItemNo_Randomizer_BLUE_RUPEE_e,
|
||||
/* 0x03 */ dItemNo_Randomizer_YELLOW_RUPEE_e,
|
||||
/* 0x04 */ dItemNo_Randomizer_RED_RUPEE_e,
|
||||
/* 0x05 */ dItemNo_Randomizer_PURPLE_RUPEE_e,
|
||||
/* 0x06 */ dItemNo_Randomizer_ORANGE_RUPEE_e,
|
||||
/* 0x07 */ dItemNo_Randomizer_SILVER_RUPEE_e,
|
||||
/* 0x08 */ dItemNo_Randomizer_S_MAGIC_e,
|
||||
/* 0x09 */ dItemNo_Randomizer_L_MAGIC_e,
|
||||
/* 0x0A */ dItemNo_Randomizer_BOMB_5_e,
|
||||
/* 0x0B */ dItemNo_Randomizer_BOMB_10_e,
|
||||
/* 0x0C */ dItemNo_Randomizer_BOMB_20_e,
|
||||
/* 0x0D */ dItemNo_Randomizer_BOMB_30_e,
|
||||
/* 0x0E */ dItemNo_Randomizer_ARROW_10_e,
|
||||
/* 0x0F */ dItemNo_Randomizer_ARROW_20_e,
|
||||
/* 0x10 */ dItemNo_Randomizer_ARROW_30_e,
|
||||
/* 0x11 */ dItemNo_Randomizer_ARROW_1_e,
|
||||
/* 0x12 */ dItemNo_Randomizer_PACHINKO_SHOT_e,
|
||||
/* 0x13 */ dItemNo_Randomizer_FOOLISH_ITEM_e,
|
||||
/* 0x14 */ dItemNo_Randomizer_ORDON_PORTAL_e,
|
||||
/* 0x15 */ dItemNo_Randomizer_SOUTH_FARON_PORTAL_e,
|
||||
/* 0x16 */ dItemNo_Randomizer_WATER_BOMB_5_e,
|
||||
/* 0x17 */ dItemNo_Randomizer_WATER_BOMB_10_e,
|
||||
/* 0x18 */ dItemNo_Randomizer_WATER_BOMB_20_e,
|
||||
/* 0x19 */ dItemNo_Randomizer_WATER_BOMB_30_e,
|
||||
/* 0x1A */ dItemNo_Randomizer_BOMB_INSECT_5_e,
|
||||
/* 0x1B */ dItemNo_Randomizer_BOMB_INSECT_10_e,
|
||||
/* 0x1C */ dItemNo_Randomizer_BOMB_INSECT_20_e,
|
||||
/* 0x1D */ dItemNo_Randomizer_BOMB_INSECT_30_e,
|
||||
/* 0x1E */ dItemNo_Randomizer_RECOVERY_FAILY_e,
|
||||
/* 0x1F */ dItemNo_Randomizer_TRIPLE_HEART_e,
|
||||
/* 0x20 */ dItemNo_Randomizer_SMALL_KEY_e,
|
||||
/* 0x21 */ dItemNo_Randomizer_KAKERA_HEART_e,
|
||||
/* 0x22 */ dItemNo_Randomizer_UTAWA_HEART_e,
|
||||
/* 0x23 */ dItemNo_Randomizer_MAP_e,
|
||||
/* 0x24 */ dItemNo_Randomizer_COMPUS_e,
|
||||
/* 0x25 */ dItemNo_Randomizer_DUNGEON_EXIT_e,
|
||||
/* 0x26 */ dItemNo_Randomizer_BOSS_KEY_e,
|
||||
/* 0x27 */ dItemNo_Randomizer_DUNGEON_BACK_e,
|
||||
/* 0x28 */ dItemNo_Randomizer_SWORD_e,
|
||||
/* 0x29 */ dItemNo_Randomizer_MASTER_SWORD_e,
|
||||
/* 0x2A */ dItemNo_Randomizer_WOOD_SHIELD_e,
|
||||
/* 0x2B */ dItemNo_Randomizer_SHIELD_e,
|
||||
/* 0x2C */ dItemNo_Randomizer_HYLIA_SHIELD_e,
|
||||
/* 0x2D */ dItemNo_Randomizer_TKS_LETTER_e,
|
||||
/* 0x2E */ dItemNo_Randomizer_WEAR_CASUAL_e,
|
||||
/* 0x2F */ dItemNo_Randomizer_WEAR_KOKIRI_e,
|
||||
/* 0x30 */ dItemNo_Randomizer_ARMOR_e,
|
||||
/* 0x31 */ dItemNo_Randomizer_WEAR_ZORA_e,
|
||||
/* 0x32 */ dItemNo_Randomizer_MAGIC_LV1_e,
|
||||
/* 0x33 */ dItemNo_Randomizer_DUNGEON_EXIT_2_e,
|
||||
/* 0x34 */ dItemNo_Randomizer_WALLET_LV1_e,
|
||||
/* 0x35 */ dItemNo_Randomizer_WALLET_LV2_e,
|
||||
/* 0x36 */ dItemNo_Randomizer_WALLET_LV3_e,
|
||||
/* 0x37 */ dItemNo_Randomizer_NOENTRY_55_e,
|
||||
/* 0x38 */ dItemNo_Randomizer_NOENTRY_56_e,
|
||||
/* 0x39 */ dItemNo_Randomizer_UPPER_ZORAS_RIVER_PORTAL_e,
|
||||
/* 0x3A */ dItemNo_Randomizer_CASTLE_TOWN_PORTAL_e,
|
||||
/* 0x3B */ dItemNo_Randomizer_GERUDO_DESERT_PORTAL_e,
|
||||
/* 0x3C */ dItemNo_Randomizer_NORTH_FARON_PORTAL_e,
|
||||
/* 0x3D */ dItemNo_Randomizer_ZORAS_JEWEL_e,
|
||||
/* 0x3E */ dItemNo_Randomizer_HAWK_EYE_e,
|
||||
/* 0x3F */ dItemNo_Randomizer_WOOD_STICK_e,
|
||||
/* 0x40 */ dItemNo_Randomizer_BOOMERANG_e,
|
||||
/* 0x41 */ dItemNo_Randomizer_SPINNER_e,
|
||||
/* 0x42 */ dItemNo_Randomizer_IRONBALL_e,
|
||||
/* 0x43 */ dItemNo_Randomizer_BOW_e,
|
||||
/* 0x44 */ dItemNo_Randomizer_HOOKSHOT_e,
|
||||
/* 0x45 */ dItemNo_Randomizer_HVY_BOOTS_e,
|
||||
/* 0x46 */ dItemNo_Randomizer_COPY_ROD_e,
|
||||
/* 0x47 */ dItemNo_Randomizer_W_HOOKSHOT_e,
|
||||
/* 0x48 */ dItemNo_Randomizer_KANTERA_e,
|
||||
/* 0x49 */ dItemNo_Randomizer_LIGHT_SWORD_e,
|
||||
/* 0x4A */ dItemNo_Randomizer_FISHING_ROD_1_e,
|
||||
/* 0x4B */ dItemNo_Randomizer_PACHINKO_e,
|
||||
/* 0x4C */ dItemNo_Randomizer_COPY_ROD_2_e,
|
||||
/* 0x4D */ dItemNo_Randomizer_KAKARIKO_GORGE_PORTAL_e,
|
||||
/* 0x4E */ dItemNo_Randomizer_KAKARIKO_VILLAGE_PORTAL_e,
|
||||
/* 0x4F */ dItemNo_Randomizer_BOMB_BAG_LV2_e,
|
||||
/* 0x50 */ dItemNo_Randomizer_BOMB_BAG_LV1_e,
|
||||
/* 0x51 */ dItemNo_Randomizer_BOMB_IN_BAG_e,
|
||||
/* 0x52 */ dItemNo_Randomizer_DEATH_MOUNTAIN_PORTAL_e,
|
||||
/* 0x53 */ dItemNo_Randomizer_LIGHT_ARROW_e,
|
||||
/* 0x54 */ dItemNo_Randomizer_ARROW_LV1_e,
|
||||
/* 0x55 */ dItemNo_Randomizer_ARROW_LV2_e,
|
||||
/* 0x56 */ dItemNo_Randomizer_ARROW_LV3_e,
|
||||
/* 0x57 */ dItemNo_Randomizer_ZORAS_DOMAIN_PORTAL_e,
|
||||
/* 0x58 */ dItemNo_Randomizer_LURE_ROD_e,
|
||||
/* 0x59 */ dItemNo_Randomizer_BOMB_ARROW_e,
|
||||
/* 0x5A */ dItemNo_Randomizer_HAWK_ARROW_e,
|
||||
/* 0x5B */ dItemNo_Randomizer_BEE_ROD_e,
|
||||
/* 0x5C */ dItemNo_Randomizer_JEWEL_ROD_e,
|
||||
/* 0x5D */ dItemNo_Randomizer_WORM_ROD_e,
|
||||
/* 0x5E */ dItemNo_Randomizer_JEWEL_BEE_ROD_e,
|
||||
/* 0x5F */ dItemNo_Randomizer_JEWEL_WORM_ROD_e,
|
||||
/* 0x60 */ dItemNo_Randomizer_EMPTY_BOTTLE_e,
|
||||
/* 0x61 */ dItemNo_Randomizer_RED_BOTTLE_e,
|
||||
/* 0x62 */ dItemNo_Randomizer_GREEN_BOTTLE_e,
|
||||
/* 0x63 */ dItemNo_Randomizer_BLUE_BOTTLE_e,
|
||||
/* 0x64 */ dItemNo_Randomizer_MILK_BOTTLE_e,
|
||||
/* 0x65 */ dItemNo_Randomizer_HALF_MILK_BOTTLE_e,
|
||||
/* 0x66 */ dItemNo_Randomizer_OIL_BOTTLE_e,
|
||||
/* 0x67 */ dItemNo_Randomizer_WATER_BOTTLE_e,
|
||||
/* 0x68 */ dItemNo_Randomizer_OIL_BOTTLE_2_e,
|
||||
/* 0x69 */ dItemNo_Randomizer_RED_BOTTLE_2_e,
|
||||
/* 0x6A */ dItemNo_Randomizer_UGLY_SOUP_e,
|
||||
/* 0x6B */ dItemNo_Randomizer_HOT_SPRING_e,
|
||||
/* 0x6C */ dItemNo_Randomizer_FAIRY_e,
|
||||
/* 0x6D */ dItemNo_Randomizer_HOT_SPRING_2_e,
|
||||
/* 0x6E */ dItemNo_Randomizer_OIL2_e,
|
||||
/* 0x6F */ dItemNo_Randomizer_OIL_e,
|
||||
/* 0x70 */ dItemNo_Randomizer_NORMAL_BOMB_e,
|
||||
/* 0x71 */ dItemNo_Randomizer_WATER_BOMB_e,
|
||||
/* 0x72 */ dItemNo_Randomizer_POKE_BOMB_e,
|
||||
/* 0x73 */ dItemNo_Randomizer_FAIRY_DROP_e,
|
||||
/* 0x74 */ dItemNo_Randomizer_WORM_e,
|
||||
/* 0x75 */ dItemNo_Randomizer_DROP_BOTTLE_e,
|
||||
/* 0x76 */ dItemNo_Randomizer_BEE_CHILD_e,
|
||||
/* 0x77 */ dItemNo_Randomizer_CHUCHU_RARE_e,
|
||||
/* 0x78 */ dItemNo_Randomizer_CHUCHU_RED_e,
|
||||
/* 0x79 */ dItemNo_Randomizer_CHUCHU_BLUE_e,
|
||||
/* 0x7A */ dItemNo_Randomizer_CHUCHU_GREEN_e,
|
||||
/* 0x7B */ dItemNo_Randomizer_CHUCHU_YELLOW_e,
|
||||
/* 0x7C */ dItemNo_Randomizer_CHUCHU_PURPLE_e,
|
||||
/* 0x7D */ dItemNo_Randomizer_LV1_SOUP_e,
|
||||
/* 0x7E */ dItemNo_Randomizer_LV2_SOUP_e,
|
||||
/* 0x7F */ dItemNo_Randomizer_LV3_SOUP_e,
|
||||
/* 0x80 */ dItemNo_Randomizer_LETTER_e,
|
||||
/* 0x81 */ dItemNo_Randomizer_BILL_e,
|
||||
/* 0x82 */ dItemNo_Randomizer_WOOD_STATUE_e,
|
||||
/* 0x83 */ dItemNo_Randomizer_IRIAS_PENDANT_e,
|
||||
/* 0x84 */ dItemNo_Randomizer_HORSE_FLUTE_e,
|
||||
/* 0x85 */ dItemNo_Randomizer_FOREST_SMALL_KEY_e,
|
||||
/* 0x86 */ dItemNo_Randomizer_MINES_SMALL_KEY_e,
|
||||
/* 0x87 */ dItemNo_Randomizer_LAKEBED_SMALL_KEY_e,
|
||||
/* 0x88 */ dItemNo_Randomizer_ARBITERS_SMALL_KEY_e,
|
||||
/* 0x89 */ dItemNo_Randomizer_SNOWPEAK_SMALL_KEY_e,
|
||||
/* 0x8A */ dItemNo_Randomizer_TEMPLE_OF_TIME_SMALL_KEY_e,
|
||||
/* 0x8B */ dItemNo_Randomizer_CITY_SMALL_KEY_e,
|
||||
/* 0x8C */ dItemNo_Randomizer_PALACE_SMALL_KEY_e,
|
||||
/* 0x8D */ dItemNo_Randomizer_HYRULE_SMALL_KEY_e,
|
||||
/* 0x8E */ dItemNo_Randomizer_CAMP_SMALL_KEY_e,
|
||||
/* 0x8F */ dItemNo_Randomizer_LAKE_HYLIA_PORTAL_e,
|
||||
/* 0x90 */ dItemNo_Randomizer_RAFRELS_MEMO_e,
|
||||
/* 0x91 */ dItemNo_Randomizer_ASHS_SCRIBBLING_e,
|
||||
/* 0x92 */ dItemNo_Randomizer_FOREST_BOSS_KEY_e,
|
||||
/* 0x93 */ dItemNo_Randomizer_LAKEBED_BOSS_KEY_e,
|
||||
/* 0x94 */ dItemNo_Randomizer_ARBITERS_BOSS_KEY_e,
|
||||
/* 0x95 */ dItemNo_Randomizer_TEMPLE_OF_TIME_BOSS_KEY_e,
|
||||
/* 0x96 */ dItemNo_Randomizer_CITY_BOSS_KEY_e,
|
||||
/* 0x97 */ dItemNo_Randomizer_PALACE_BOSS_KEY_e,
|
||||
/* 0x98 */ dItemNo_Randomizer_HYRULE_BOSS_KEY_e,
|
||||
/* 0x99 */ dItemNo_Randomizer_FOREST_COMPASS_e,
|
||||
/* 0x9A */ dItemNo_Randomizer_MINES_COMPASS_e,
|
||||
/* 0x9B */ dItemNo_Randomizer_LAKEBED_COMPASS_e,
|
||||
/* 0x9C */ dItemNo_Randomizer_CHUCHU_YELLOW2_e,
|
||||
/* 0x9D */ dItemNo_Randomizer_OIL_BOTTLE3_e,
|
||||
/* 0x9E */ dItemNo_Randomizer_SHOP_BEE_CHILD_e,
|
||||
/* 0x9F */ dItemNo_Randomizer_CHUCHU_BLACK_e,
|
||||
/* 0xA0 */ dItemNo_Randomizer_LIGHT_DROP_e,
|
||||
/* 0xA1 */ dItemNo_Randomizer_DROP_CONTAINER_e,
|
||||
/* 0xA2 */ dItemNo_Randomizer_DROP_CONTAINER02_e,
|
||||
/* 0xA3 */ dItemNo_Randomizer_DROP_CONTAINER03_e,
|
||||
/* 0xA4 */ dItemNo_Randomizer_FILLED_CONTAINER_e,
|
||||
/* 0xA5 */ dItemNo_Randomizer_MIRROR_PIECE_2_e,
|
||||
/* 0xA6 */ dItemNo_Randomizer_MIRROR_PIECE_3_e,
|
||||
/* 0xA7 */ dItemNo_Randomizer_MIRROR_PIECE_4_e,
|
||||
/* 0xA8 */ dItemNo_Randomizer_ARBITERS_COMPASS_e,
|
||||
/* 0xA9 */ dItemNo_Randomizer_SNOWPEAK_COMPASS_e,
|
||||
/* 0xAA */ dItemNo_Randomizer_TEMPLE_OF_TIME_COMPASS_e,
|
||||
/* 0xAB */ dItemNo_Randomizer_CITY_COMPASS_e,
|
||||
/* 0xAC */ dItemNo_Randomizer_PALACE_COMPASS_e,
|
||||
/* 0xAD */ dItemNo_Randomizer_HYRULE_COMPASS_e,
|
||||
/* 0xAE */ dItemNo_Randomizer_MIRROR_CHAMBER_PORTAL_e,
|
||||
/* 0xAF */ dItemNo_Randomizer_SNOWPEAK_PORTAL_e,
|
||||
/* 0xB0 */ dItemNo_Randomizer_SMELL_YELIA_POUCH_e,
|
||||
/* 0xB1 */ dItemNo_Randomizer_SMELL_PUMPKIN_e,
|
||||
/* 0xB2 */ dItemNo_Randomizer_SMELL_POH_e,
|
||||
/* 0xB3 */ dItemNo_Randomizer_SMELL_FISH_e,
|
||||
/* 0xB4 */ dItemNo_Randomizer_SMELL_CHILDREN_e,
|
||||
/* 0xB5 */ dItemNo_Randomizer_SMELL_MEDICINE_e,
|
||||
/* 0xB6 */ dItemNo_Randomizer_FOREST_MAP_e,
|
||||
/* 0xB7 */ dItemNo_Randomizer_MINES_MAP_e,
|
||||
/* 0xB8 */ dItemNo_Randomizer_LAKEBED_MAP_e,
|
||||
/* 0xB9 */ dItemNo_Randomizer_ARBITERS_MAP_e,
|
||||
/* 0xBA */ dItemNo_Randomizer_SNOWPEAK_MAP_e,
|
||||
/* 0xBB */ dItemNo_Randomizer_TEMPLE_OF_TIME_MAP_e,
|
||||
/* 0xBC */ dItemNo_Randomizer_CITY_MAP_e,
|
||||
/* 0xBD */ dItemNo_Randomizer_PALACE_MAP_e,
|
||||
/* 0xBE */ dItemNo_Randomizer_HYRULE_MAP_e,
|
||||
/* 0xBF */ dItemNo_Randomizer_SACRED_GROVE_PORTAL_e,
|
||||
/* 0xC0 */ dItemNo_Randomizer_M_BEETLE_e,
|
||||
/* 0xC1 */ dItemNo_Randomizer_F_BEETLE_e,
|
||||
/* 0xC2 */ dItemNo_Randomizer_M_BUTTERFLY_e,
|
||||
/* 0xC3 */ dItemNo_Randomizer_F_BUTTERFLY_e,
|
||||
/* 0xC4 */ dItemNo_Randomizer_M_STAG_BEETLE_e,
|
||||
/* 0xC5 */ dItemNo_Randomizer_F_STAG_BEETLE_e,
|
||||
/* 0xC6 */ dItemNo_Randomizer_M_GRASSHOPPER_e,
|
||||
/* 0xC7 */ dItemNo_Randomizer_F_GRASSHOPPER_e,
|
||||
/* 0xC8 */ dItemNo_Randomizer_M_NANAFUSHI_e,
|
||||
/* 0xC9 */ dItemNo_Randomizer_F_NANAFUSHI_e,
|
||||
/* 0xCA */ dItemNo_Randomizer_M_DANGOMUSHI_e,
|
||||
/* 0xCB */ dItemNo_Randomizer_F_DANGOMUSHI_e,
|
||||
/* 0xCC */ dItemNo_Randomizer_M_MANTIS_e,
|
||||
/* 0xCD */ dItemNo_Randomizer_F_MANTIS_e,
|
||||
/* 0xCE */ dItemNo_Randomizer_M_LADYBUG_e,
|
||||
/* 0xCF */ dItemNo_Randomizer_F_LADYBUG_e,
|
||||
/* 0xD0 */ dItemNo_Randomizer_M_SNAIL_e,
|
||||
/* 0xD1 */ dItemNo_Randomizer_F_SNAIL_e,
|
||||
/* 0xD2 */ dItemNo_Randomizer_M_DRAGONFLY_e,
|
||||
/* 0xD3 */ dItemNo_Randomizer_F_DRAGONFLY_e,
|
||||
/* 0xD4 */ dItemNo_Randomizer_M_ANT_e,
|
||||
/* 0xD5 */ dItemNo_Randomizer_F_ANT_e,
|
||||
/* 0xD6 */ dItemNo_Randomizer_M_MAYFLY_e,
|
||||
/* 0xD7 */ dItemNo_Randomizer_F_MAYFLY_e,
|
||||
/* 0xD8 */ dItemNo_Randomizer_FUSED_SHADOW_1_e,
|
||||
/* 0xD9 */ dItemNo_Randomizer_FUSED_SHADOW_2_e,
|
||||
/* 0xDA */ dItemNo_Randomizer_FUSED_SHADOW_3_e,
|
||||
/* 0xDB */ dItemNo_Randomizer_MIRROR_PIECE_1_e,
|
||||
/* 0xDC */ dItemNo_Randomizer_ARCHIPELAGO_ITEM_e,
|
||||
/* 0xDD */ dItemNo_Randomizer_NOENTRY_221_e,
|
||||
/* 0xDE */ dItemNo_Randomizer_NOENTRY_222_e,
|
||||
/* 0xDF */ dItemNo_Randomizer_NOENTRY_223_e,
|
||||
/* 0xE0 */ dItemNo_Randomizer_POU_SPIRIT_e,
|
||||
/* 0xE1 */ dItemNo_Randomizer_ENDING_BLOW_e,
|
||||
/* 0xE2 */ dItemNo_Randomizer_SHIELD_ATTACK_e,
|
||||
/* 0xE3 */ dItemNo_Randomizer_BACK_SLICE_e,
|
||||
/* 0xE4 */ dItemNo_Randomizer_HELM_SPLITTER_e,
|
||||
/* 0xE5 */ dItemNo_Randomizer_MORTAL_DRAW_e,
|
||||
/* 0xE6 */ dItemNo_Randomizer_JUMP_STRIKE_e,
|
||||
/* 0xE7 */ dItemNo_Randomizer_GREAT_SPIN_e,
|
||||
/* 0xE8 */ dItemNo_Randomizer_ELDIN_BRIDGE_PORTAL_e,
|
||||
/* 0xE9 */ dItemNo_Randomizer_ANCIENT_DOCUMENT_e,
|
||||
/* 0xEA */ dItemNo_Randomizer_AIR_LETTER_e,
|
||||
/* 0xEB */ dItemNo_Randomizer_ANCIENT_DOCUMENT2_e,
|
||||
/* 0xEC */ dItemNo_Randomizer_LV7_DUNGEON_EXIT_e,
|
||||
/* 0xED */ dItemNo_Randomizer_LINKS_SAVINGS_e,
|
||||
/* 0xEE */ dItemNo_Randomizer_SMALL_KEY2_e,
|
||||
/* 0xEF */ dItemNo_Randomizer_POU_FIRE1_e,
|
||||
/* 0xF0 */ dItemNo_Randomizer_POU_FIRE2_e,
|
||||
/* 0xF1 */ dItemNo_Randomizer_POU_FIRE3_e,
|
||||
/* 0xF2 */ dItemNo_Randomizer_POU_FIRE4_e,
|
||||
/* 0xF3 */ dItemNo_Randomizer_BOSSRIDER_KEY_e,
|
||||
/* 0xF4 */ dItemNo_Randomizer_TOMATO_PUREE_e,
|
||||
/* 0xF5 */ dItemNo_Randomizer_TASTE_e,
|
||||
/* 0xF6 */ dItemNo_Randomizer_LV5_BOSS_KEY_e,
|
||||
/* 0xF7 */ dItemNo_Randomizer_SURFBOARD_e,
|
||||
/* 0xF8 */ dItemNo_Randomizer_KANTERA2_e,
|
||||
/* 0xF9 */ dItemNo_Randomizer_L2_KEY_PIECES1_e,
|
||||
/* 0xFA */ dItemNo_Randomizer_L2_KEY_PIECES2_e,
|
||||
/* 0xFB */ dItemNo_Randomizer_L2_KEY_PIECES3_e,
|
||||
/* 0xFC */ dItemNo_Randomizer_KEY_OF_CARAVAN_e,
|
||||
/* 0xFD */ dItemNo_Randomizer_LV2_BOSS_KEY_e,
|
||||
/* 0xFE */ dItemNo_Randomizer_KEY_OF_FILONE_e,
|
||||
/* 0xFF */ dItemNo_Randomizer_NONE_e,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
return &mpTypeGroupData[i_typeGroupNo];
|
||||
}
|
||||
|
||||
/* 0x0 */ fmpTresTypeGroupDataList_c mpTypeGroupData[DUSK_IF_ELSE(35, 17)];
|
||||
/* 0x0 */ fmpTresTypeGroupDataList_c mpTypeGroupData[17];
|
||||
};
|
||||
|
||||
class dMenu_Fmap_data_c {
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
bool dpdMove();
|
||||
u8 openExplain(u8);
|
||||
#if TARGET_PC
|
||||
void updateSlotImage(u8 slot);
|
||||
bool pointerMove();
|
||||
#endif
|
||||
|
||||
@@ -218,6 +219,8 @@ private:
|
||||
bool mCursorInterpPrevAngular;
|
||||
bool mCursorInterpCurrAngular;
|
||||
bool mCursorInterpInit;
|
||||
bool mPointerTouchPressHoveredCurrent;
|
||||
J2DPicture* mDpadIcon;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -129,7 +129,9 @@ public:
|
||||
bool getPlayerSubject();
|
||||
bool isBButtonShow(bool);
|
||||
s16 getButtonTimer();
|
||||
|
||||
#if TARGET_PC
|
||||
f32 getZButtonAlpha() { return mButtonZAlpha;}
|
||||
#endif
|
||||
virtual ~dMeter2Draw_c();
|
||||
|
||||
J2DScreen* getMainScreenPtr() { return mpScreen; }
|
||||
|
||||
+16
-7
@@ -58,6 +58,9 @@ public:
|
||||
int checkEventRender(int*, int*, int*, int*);
|
||||
void remove();
|
||||
u16 getEventId(int*);
|
||||
#if TARGET_PC
|
||||
u16 getEventId();
|
||||
#endif
|
||||
u32 getMsgNo();
|
||||
u32 getNowMsgNo();
|
||||
msg_class* getMsg();
|
||||
@@ -128,6 +131,9 @@ public:
|
||||
u16 query051(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
u16 query052(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
u16 query053(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
#if TARGET_PC
|
||||
u16 query054(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
#endif
|
||||
int event000(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event001(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event002(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
@@ -171,14 +177,10 @@ public:
|
||||
int event040(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event041(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event042(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
|
||||
#if TARGET_PC
|
||||
// HD additions
|
||||
u16 query054(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
u16 query055(mesg_flow_node_branch*, fopAc_ac_c*, int);
|
||||
// events for rando
|
||||
int event043(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event044(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
int event045(mesg_flow_node_event*, fopAc_ac_c*);
|
||||
#endif
|
||||
|
||||
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
|
||||
@@ -194,8 +196,15 @@ public:
|
||||
void setMsg(u32 msg) { mMsg = msg; }
|
||||
bool checkEndFlow() { return (u32)field_0x26 == 1; }
|
||||
|
||||
static queryFunc mQueryList[DUSK_IF_ELSE(55, 53)];
|
||||
static eventFunc mEventList[DUSK_IF_ELSE(46, 43)];
|
||||
static queryFunc mQueryList[DUSK_IF_ELSE(54, 53)];
|
||||
static eventFunc mEventList[DUSK_IF_ELSE(45, 43)];
|
||||
|
||||
#if TARGET_PC
|
||||
// patch funcs for rando
|
||||
void randoPatchNodeType(u8& type, u16 nodeIdx);
|
||||
void randoPatchBranchNode(mesg_flow_node_branch*& branch_node, u16 nodeIdx);
|
||||
void randoPatchEventNode(mesg_flow_node_event*& event_node, u16 nodeIdx);
|
||||
#endif
|
||||
|
||||
private:
|
||||
/* 0x04 */ u8* mFlow_p;
|
||||
|
||||
@@ -360,7 +360,12 @@ inline void dMsgObject_demoMessageGroup() {
|
||||
}
|
||||
|
||||
inline bool dMsgObject_isTalkNowCheck() {
|
||||
#if TARGET_PC
|
||||
dMsgObject_c* msgObject = dMsgObject_getMsgObjectClass();
|
||||
return msgObject != NULL && msgObject->getStatus() != 1;
|
||||
#else
|
||||
return dMsgObject_getMsgObjectClass()->getStatus() == 1 ? false : true;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool dMsgObject_isKillMessageFlag() {
|
||||
@@ -497,7 +502,12 @@ inline void dMsgObject_onMsgSend() {
|
||||
}
|
||||
|
||||
inline bool dMsgObject_isFukidashiCheck() {
|
||||
#if TARGET_PC
|
||||
dMsgObject_c* msgObject = dMsgObject_getMsgObjectClass();
|
||||
return msgObject != NULL && msgObject->getScrnDrawPtr() != NULL;
|
||||
#else
|
||||
return dMsgObject_getMsgObjectClass()->getScrnDrawPtr() == NULL ? false : true;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void* dMsgObject_getTalkHeap() {
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "dusk/endian.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
|
||||
static const int DEFAULT_SELECT_ITEM_INDEX = 0;
|
||||
static const int MAX_SELECT_ITEM = 4;
|
||||
static const int SELECT_ITEM_NUM = 2;
|
||||
@@ -199,6 +203,9 @@ public:
|
||||
void setTime(f32 i_time) { mTime = i_time; }
|
||||
u16 getDate() const { return mDate; }
|
||||
void setDate(u16 i_date) { mDate = i_date; }
|
||||
#if TARGET_PC
|
||||
u8 getDarkClearLV() const { return mDarkClearLevelFlag; }
|
||||
#endif
|
||||
|
||||
/* 0x00 */ BE(OSTime) mDateIpl;
|
||||
/* 0x08 */ u8 mTransformLevelFlag;
|
||||
@@ -272,6 +279,9 @@ public:
|
||||
bool isFieldDataExistFlag() const { return mFieldDataExistFlag ? true : false; }
|
||||
void offFieldDataExistFlag() { mFieldDataExistFlag = false; }
|
||||
void onFieldDataExistFlag() { mFieldDataExistFlag = true; }
|
||||
#if TARGET_PC
|
||||
void setRegionBit(u8 region) { mRegion |= region;}
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
/* 0x00 */ BE(Vec) mPos;
|
||||
@@ -376,12 +386,21 @@ public:
|
||||
void setArrowNum(u8 i_num) { mArrowNum = i_num; }
|
||||
u8 getPachinkoNum() const { return mPachinkoNum; }
|
||||
void setPachinkoNum(u8 i_num) { mPachinkoNum = i_num; }
|
||||
#if TARGET_PC
|
||||
u8 getAncientDocumentNum() const { return mAncientDocumentNum; }
|
||||
void setAncientDocumentNum(u8 i_num) { mAncientDocumentNum = i_num; }
|
||||
#endif
|
||||
|
||||
/* 0x0 */ u8 mArrowNum;
|
||||
/* 0x1 */ u8 mBombNum[3];
|
||||
/* 0x4 */ u8 mBottleNum[4];
|
||||
/* 0x8 */ u8 mPachinkoNum;
|
||||
#if TARGET_PC
|
||||
/* 0x9 */ u8 mAncientDocumentNum; // Custom Field for Randomizer
|
||||
/* 0x9 */ u8 unk5[2];
|
||||
#else
|
||||
/* 0x9 */ u8 unk5[3];
|
||||
#endif
|
||||
}; // Size: 0xC
|
||||
|
||||
class dSv_player_item_max_c {
|
||||
@@ -413,7 +432,11 @@ public:
|
||||
u8 getPohNum() const { return mPohNum; }
|
||||
|
||||
void addPohNum() {
|
||||
#if TARGET_PC
|
||||
if (mPohNum < 0x3D) {
|
||||
#else
|
||||
if (mPohNum < 0xFF) {
|
||||
#endif
|
||||
mPohNum++;
|
||||
}
|
||||
}
|
||||
@@ -458,6 +481,11 @@ public:
|
||||
int isLetterReadFlag(int i_no) const;
|
||||
u8 getGetNumber(int i_no) { return mGetNumber[i_no]; }
|
||||
void setGetNumber(int i_no, u8 i_value) { mGetNumber[i_no] = i_value; }
|
||||
#if TARGET_PC
|
||||
// For rando
|
||||
void setAllLetterGet() { mLetterGetFlags[0] |= 0xFFFF;}
|
||||
void setAllLetterRead() { mLetterReadFlags[0] |= 0xFFFF;}
|
||||
#endif
|
||||
|
||||
/* 0x00 */ BE(u32) mLetterGetFlags[2];
|
||||
/* 0x08 */ BE(u32) mLetterReadFlags[2];
|
||||
@@ -664,10 +692,14 @@ public:
|
||||
void onDungeonItemBossKey() { onDungeonItem(BOSS_KEY); }
|
||||
void offDungeonItemBossKey() { offDungeonItem(BOSS_KEY); }
|
||||
s32 isDungeonItemBossKey() const { return isDungeonItem(BOSS_KEY); }
|
||||
#if TARGET_PC
|
||||
void onStageBossEnemy();
|
||||
#else
|
||||
void onStageBossEnemy() {
|
||||
onDungeonItem(STAGE_BOSS_ENEMY);
|
||||
onDungeonItem(OOCCOO_NOTE);
|
||||
}
|
||||
#endif
|
||||
void offStageBossEnemy() { offDungeonItem(STAGE_BOSS_ENEMY); }
|
||||
s32 isStageBossEnemy() const { return isDungeonItem(STAGE_BOSS_ENEMY); }
|
||||
void onStageLife() { onDungeonItem(STAGE_LIFE); }
|
||||
@@ -948,6 +980,7 @@ public:
|
||||
/* 0x8 */ s8 m_no;
|
||||
};
|
||||
|
||||
|
||||
class dSv_info_c {
|
||||
public:
|
||||
void init();
|
||||
@@ -960,6 +993,9 @@ public:
|
||||
BOOL isSwitch(int i_no, int i_roomNo) const;
|
||||
BOOL revSwitch(int i_no, int i_roomNo);
|
||||
void onItem(int i_no, int i_roomNo);
|
||||
#if TARGET_PC
|
||||
void offItem(int i_no, int i_roomNo);
|
||||
#endif
|
||||
BOOL isItem(int i_no, int i_roomNo) const;
|
||||
void onActor(int i_no, int i_roomNo);
|
||||
void offActor(int i_no, int i_roomNo);
|
||||
|
||||
+3
-5
@@ -1292,6 +1292,9 @@ public:
|
||||
void set(const char*, s8, s16, s8, s8, u8);
|
||||
void offEnable() { enabled = 0; }
|
||||
BOOL isEnable() const { return enabled; }
|
||||
#if TARGET_PC
|
||||
void setEnable() { enabled |= 0x1; }
|
||||
#endif
|
||||
s8 getWipe() const { return wipe; }
|
||||
u8 getWipeSpeed() const { return wipe_speed; }
|
||||
dStage_startStage_c* getStartStage() { return this; }
|
||||
@@ -1416,11 +1419,6 @@ dStage_KeepDoorInfo* dStage_GetKeepDoorInfo();
|
||||
dStage_KeepDoorInfo* dStage_GetRoomKeepDoorInfo();
|
||||
void dStage_dt_c_fieldMapLoader(void* i_data, dStage_dt_c* i_stage);
|
||||
|
||||
#if TARGET_PC
|
||||
// TP HD Cave of Shadows (D_SB11): reveal the los next-floor when a descent gate opens.
|
||||
void dStage_showLOSNextFloor(int fromRoom);
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
void dStage_DebugDisp();
|
||||
#endif
|
||||
|
||||
@@ -28,11 +28,4 @@ bool LoadRelAsset(void* dst, const char* dvdPath, std::initializer_list<OffsetVe
|
||||
*/
|
||||
bool LoadArchivedRelAsset(void* dst, u32 memType, const char* relFileName, std::initializer_list<OffsetVersion> offset, s32 size);
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
/**
|
||||
* Load bytes from the RPX by Wii U virtual address
|
||||
*/
|
||||
bool LoadRPXAsset(void* dst, uint32_t virtualAddress, s32 size);
|
||||
#endif
|
||||
|
||||
} // namespace dusk
|
||||
|
||||
@@ -602,50 +602,6 @@ static const auto gameRegions = std::to_array({
|
||||
MapEntry("Grotto 5", "D_SB09", {
|
||||
{4, {0, 1}},
|
||||
}),
|
||||
MapEntry("HD: Cave Of Shadows", "D_SB11", {
|
||||
// ordered by floor rather than room number
|
||||
{19, {0}},
|
||||
{35, {0}},
|
||||
{21, {0}},
|
||||
{23, {0}},
|
||||
{10, {0}},
|
||||
{25, {0}},
|
||||
{26, {0}},
|
||||
{8, {0}},
|
||||
{5, {0}},
|
||||
{28, {0}},
|
||||
{47, {0}},
|
||||
{15, {0}},
|
||||
{22, {0}},
|
||||
{33, {0}},
|
||||
{31, {0}},
|
||||
{7, {0}},
|
||||
{13, {0}},
|
||||
{46, {0}},
|
||||
{48, {0}},
|
||||
{34, {0}},
|
||||
{2, {0}},
|
||||
{36, {0}},
|
||||
{27, {0}},
|
||||
{32, {0}},
|
||||
{18, {0}},
|
||||
{3, {0}},
|
||||
{44, {0}},
|
||||
{40, {0}},
|
||||
{4, {0}},
|
||||
{30, {0}},
|
||||
{29, {0}},
|
||||
{17, {0}},
|
||||
{41, {0}},
|
||||
{43, {0}},
|
||||
{16, {0}},
|
||||
{38, {0}},
|
||||
{1, {0}},
|
||||
{42, {0}},
|
||||
{45, {0}},
|
||||
{49, {0}},
|
||||
}
|
||||
),
|
||||
}),
|
||||
RegionEntry("Misc", {
|
||||
MapEntry("Title Screen / King Bulblin 1", "F_SP102", {
|
||||
|
||||
@@ -6,6 +6,9 @@ class CPaneMgr;
|
||||
|
||||
namespace dusk::menu_pointer {
|
||||
|
||||
using TargetId = u16;
|
||||
constexpr TargetId InvalidTarget = 0xffff;
|
||||
|
||||
enum class Context {
|
||||
None,
|
||||
FileSelect,
|
||||
@@ -43,12 +46,14 @@ bool active() noexcept;
|
||||
bool enabled() noexcept;
|
||||
bool mouse_capture_active() noexcept;
|
||||
const State& state() noexcept;
|
||||
void set_hover_target(TargetId target) noexcept;
|
||||
bool consume_click() noexcept;
|
||||
bool peek_click() noexcept;
|
||||
void set_dialog_choice(u8 choice, bool clicked) noexcept;
|
||||
bool get_dialog_choice(u8& choice) noexcept;
|
||||
bool consume_dialog_click(u8& choice) noexcept;
|
||||
void defer_activation(Context context, u8 target) noexcept;
|
||||
bool consume_deferred_activation(Context context, u8 target) noexcept;
|
||||
void defer_activation(Context context, TargetId target) noexcept;
|
||||
bool consume_deferred_activation(Context context, TargetId target) noexcept;
|
||||
void clear_deferred_activation(Context context) noexcept;
|
||||
u32 suppressed_pad_buttons(u32 port) noexcept;
|
||||
void finish_pad_suppression_read(u32 port) noexcept;
|
||||
|
||||
+50
-8
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <filesystem>
|
||||
|
||||
#include "dusk/config_var.hpp"
|
||||
#include "dusk/ui/controls.hpp"
|
||||
@@ -47,6 +46,12 @@ enum class FrameInterpMode : u8 {
|
||||
Unlimited = 2,
|
||||
};
|
||||
|
||||
enum class TouchTargeting : u8 {
|
||||
Hybrid = 0,
|
||||
Hold = 1,
|
||||
Switch = 2,
|
||||
};
|
||||
|
||||
enum class MenuScaling : u8 {
|
||||
GameCube = 0,
|
||||
Wii = 1,
|
||||
@@ -98,6 +103,12 @@ struct ConfigEnumRange<FrameInterpMode> {
|
||||
static constexpr auto max = FrameInterpMode::Unlimited;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ConfigEnumRange<TouchTargeting> {
|
||||
static constexpr auto min = TouchTargeting::Hybrid;
|
||||
static constexpr auto max = TouchTargeting::Switch;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ConfigEnumRange<MenuScaling> {
|
||||
static constexpr auto min = MenuScaling::GameCube;
|
||||
@@ -217,6 +228,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> invertMouseY;
|
||||
ConfigVar<bool> freeCamera;
|
||||
ConfigVar<bool> enableTouchControls;
|
||||
ConfigVar<TouchTargeting> touchTargeting;
|
||||
ConfigVar<bool> enableMenuPointer;
|
||||
ConfigVar<ui::ControlLayout> touchControlsLayout;
|
||||
ConfigVar<bool> invertCameraXAxis;
|
||||
@@ -266,6 +278,8 @@ struct UserSettings {
|
||||
ConfigVar<bool> liveSplitEnabled;
|
||||
ConfigVar<bool> showSpeedrunRTATimer;
|
||||
ConfigVar<bool> recordingMode;
|
||||
|
||||
// Misc
|
||||
ConfigVar<bool> removeQuestMapMarkers;
|
||||
ConfigVar<bool> showInputViewer;
|
||||
ConfigVar<bool> showInputViewerGyro;
|
||||
@@ -274,12 +288,8 @@ struct UserSettings {
|
||||
struct {
|
||||
ConfigVar<std::string> isoPath;
|
||||
ConfigVar<DiscVerificationState> isoVerification;
|
||||
#if DUSK_TPHD
|
||||
ConfigVar<std::string> hdContentPath;
|
||||
#endif
|
||||
ConfigVar<std::string> graphicsBackend;
|
||||
ConfigVar<bool> skipPreLaunchUI;
|
||||
ConfigVar<bool> showPipelineCompilation;
|
||||
ConfigVar<bool> wasPresetChosen;
|
||||
ConfigVar<bool> checkForUpdates;
|
||||
ConfigVar<int> cardFileType;
|
||||
@@ -295,13 +305,45 @@ struct UserSettings {
|
||||
std::array<ActionBindConfigVar, 4> openDusklightMenu;
|
||||
std::array<ActionBindConfigVar, 4> turboSpeedButton;
|
||||
} actionBindings;
|
||||
|
||||
// Randomizer seed hashes, 1 per file
|
||||
struct {
|
||||
std::array<ConfigVar<std::string>, 3> seedHashes;
|
||||
} randomizer;
|
||||
|
||||
// Archipelago Settings
|
||||
struct {
|
||||
std::array<ConfigVar<std::string>, 3> savesServerIP;
|
||||
std::array<ConfigVar<std::string>, 3> savesServerPass;
|
||||
std::array<ConfigVar<std::string>, 3> savesSlotName;
|
||||
} archipelago;
|
||||
|
||||
// Cosmetics
|
||||
struct {
|
||||
ConfigVar<std::string> herosTunicCapColor;
|
||||
ConfigVar<std::string> herosTunicTorsoColor;
|
||||
ConfigVar<std::string> herosTunicSkirtColor;
|
||||
ConfigVar<std::string> zoraArmorCapColor;
|
||||
ConfigVar<std::string> zoraArmorHelmetColor;
|
||||
ConfigVar<std::string> zoraArmorTorsoColor;
|
||||
ConfigVar<std::string> zoraArmorScalesColor;
|
||||
ConfigVar<std::string> zoraArmorFlippersColor;
|
||||
ConfigVar<std::string> lanternGlowColor;
|
||||
ConfigVar<std::string> woodenSwordColor;
|
||||
ConfigVar<std::string> msBladeColor;
|
||||
ConfigVar<std::string> msHandleColor;
|
||||
ConfigVar<std::string> lightSwordGlowColor;
|
||||
ConfigVar<std::string> boomerangColor;
|
||||
ConfigVar<std::string> ironBootsColor;
|
||||
ConfigVar<std::string> spinnerColor;
|
||||
ConfigVar<std::string> linkHairColor;
|
||||
ConfigVar<std::string> wolfLinkColor;
|
||||
ConfigVar<std::string> eponaColor;
|
||||
} cosmetics;
|
||||
};
|
||||
|
||||
UserSettings& getSettings();
|
||||
|
||||
std::filesystem::path tphd_content_path();
|
||||
bool tphd_active();
|
||||
|
||||
void registerSettings();
|
||||
|
||||
// Transient settings
|
||||
|
||||
@@ -398,4 +398,7 @@ inline int mDoAud_monsSeStart(u32 i_soundId, const Vec* i_pos, u32 i_actorId, u3
|
||||
0);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
mDoAud_zelAudio_c& mDoAud_getZelAudio();
|
||||
#endif
|
||||
#endif /* M_DO_M_DO_AUDIO_H */
|
||||
|
||||
@@ -67,6 +67,10 @@ public:
|
||||
|
||||
JKRMemArchive* getArchive() const { return mArchive; }
|
||||
JKRHeap* getHeap() const { return mHeap; }
|
||||
#if TARGET_PC
|
||||
s32 getEntryNumber() const { return mEntryNumber; }
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
/* 0x14 */ u8 mMountDirection;
|
||||
|
||||
@@ -154,6 +154,18 @@ public:
|
||||
return (J2DTextBoxHBinding)((mFlags >> 2) & 3);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
void setVBinding(J2DTextBoxVBinding vBinding) {
|
||||
mFlags &= 0b1100;
|
||||
mFlags |= (vBinding & 3);
|
||||
}
|
||||
|
||||
void setHBinding(J2DTextBoxHBinding hBinding) {
|
||||
mFlags &= 0b0011;
|
||||
mFlags |= ((hBinding & 3) << 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
JUtility::TColor getCharColor() { return mCharColor; }
|
||||
JUtility::TColor getGradColor() { return mGradientColor; }
|
||||
u16 getStringAllocByte() const { return mStringLength; }
|
||||
|
||||
@@ -1761,16 +1761,6 @@ public:
|
||||
virtual ~J3DIndBlockNull() {}
|
||||
};
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
struct PolygonOffset {
|
||||
BE(f32) mFrontOffset;
|
||||
BE(f32) mFrontScale;
|
||||
BE(f32) mBackOffset;
|
||||
BE(f32) mBackScale;
|
||||
BE(f32) mClamp;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
@@ -1803,10 +1793,6 @@ public:
|
||||
virtual void setDither(u8 const*) {}
|
||||
virtual void setDither(u8) {}
|
||||
virtual u8 getDither() const { return 0; }
|
||||
#ifdef DUSK_TPHD
|
||||
virtual void setPolygonOffset(const PolygonOffset&) {}
|
||||
virtual PolygonOffset* getPolygonOffset() { return NULL; }
|
||||
#endif
|
||||
virtual u32 getFogOffset() const { return 0; }
|
||||
virtual void setFogOffset(u32) {}
|
||||
virtual ~J3DPEBlock() {}
|
||||
@@ -1970,25 +1956,12 @@ public:
|
||||
virtual void setFogOffset(u32 fogOffset) { mFogOffset = fogOffset; }
|
||||
virtual ~J3DPEBlockFull() {}
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
virtual void setPolygonOffset(const PolygonOffset& offset) {
|
||||
mPolygonOffset = offset;
|
||||
}
|
||||
|
||||
virtual PolygonOffset* getPolygonOffset() {
|
||||
return &mPolygonOffset;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* 0x04 */ J3DFog mFog;
|
||||
/* 0x30 */ J3DAlphaComp mAlphaComp;
|
||||
/* 0x34 */ J3DBlend mBlend;
|
||||
/* 0x38 */ J3DZMode mZMode;
|
||||
/* 0x3A */ u8 mZCompLoc;
|
||||
/* 0x3B */ u8 mDither;
|
||||
#ifdef DUSK_TPHD
|
||||
PolygonOffset mPolygonOffset;
|
||||
#endif
|
||||
/* 0x3C */ u32 mFogOffset;
|
||||
}; // Size: 0x40
|
||||
|
||||
|
||||
@@ -46,13 +46,6 @@ struct J3DMaterialInitData {
|
||||
/* 0x14A */ BE(u16) mNBTScaleIdx;
|
||||
}; // size 0x14C
|
||||
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
struct J3DMaterialInitData_MAT4 : public J3DMaterialInitData {
|
||||
/* 0x14C */ BE(u16) mPolygonOffsetIdx;
|
||||
}; // size 0x14E
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
@@ -150,29 +143,10 @@ public:
|
||||
J3DNBTScale newNBTScale(int) const;
|
||||
|
||||
u16 getMaterialID(int idx) const { return mpMaterialID[idx]; }
|
||||
#ifdef DUSK_TPHD
|
||||
u8 getMaterialMode(int idx) const { return getMatInitData(idx)->mMaterialMode; }
|
||||
#else
|
||||
u8 getMaterialMode(int idx) const { return mpMaterialInitData[mpMaterialID[idx]].mMaterialMode; }
|
||||
#endif
|
||||
|
||||
#if DUSK_TPHD
|
||||
const PolygonOffset newPolygonOffset(int) const;
|
||||
|
||||
J3DMaterialInitData* getMatInitData(int idx) const {
|
||||
static const u32 sInitDataSizes[] = {0, 0, 0x138, 0x14C, 0x14E};
|
||||
|
||||
return (J3DMaterialInitData*)((u8*)mpMaterialInitData + sInitDataSizes[mBlockType] * getMaterialID(idx));
|
||||
}
|
||||
|
||||
u16 mBlockType;
|
||||
#endif
|
||||
/* 0x00 */ u16 mMaterialNum;
|
||||
#if DUSK_TPHD
|
||||
/* 0x04 */ void* mpMaterialInitData;
|
||||
#else
|
||||
/* 0x04 */ J3DMaterialInitData* mpMaterialInitData;
|
||||
#endif
|
||||
/* 0x08 */ BE(u16)* mpMaterialID;
|
||||
/* 0x0C */ J3DIndInitData* mpIndInitData;
|
||||
/* 0x10 */ GXColor* mpMatColor;
|
||||
@@ -201,9 +175,6 @@ public:
|
||||
/* 0x6C */ u8* mpZCompLoc;
|
||||
/* 0x70 */ u8* mpDither;
|
||||
/* 0x74 */ J3DNBTScaleInfo* mpNBTScaleInfo;
|
||||
#ifdef DUSK_TPHD
|
||||
PolygonOffset* mpPolygonOffsets;
|
||||
#endif
|
||||
/* 0x78 */ J3DDisplayListInit* mpDisplayListInit;
|
||||
/* 0x7C */ J3DPatchingInfo* mpPatchingInfo;
|
||||
/* 0x80 */ J3DCurrentMtxInfo* mpCurrentMtxInfo;
|
||||
|
||||
@@ -169,12 +169,6 @@ struct J3DMaterialBlock_v21 : public J3DModelBlock {
|
||||
/* 0x74 */ OFFSET_PTR_V0 mpNBTScaleInfo;
|
||||
};
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
struct J3DMaterialBlock_MAT4 : public J3DMaterialBlock {
|
||||
/* 0x84 */ OFFSET_PTR_V0 mpPolygonOffsets;
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
*
|
||||
|
||||
@@ -7,9 +7,6 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
#if TARGET_PC
|
||||
#include "dusk/settings.h"
|
||||
#endif
|
||||
|
||||
void J3DMtxCalcJ3DSysInitBasic::init(Vec const& scale, Mtx const& mtx) {
|
||||
J3DSys::mCurrentS = scale;
|
||||
@@ -181,23 +178,7 @@ void J3DJoint::entryIn() {
|
||||
matPacket->setMaterialAnmID(mesh->getMaterialAnm());
|
||||
matPacket->setShapePacket(shapePacket);
|
||||
bool isDrawModeOpaTexEdge = mesh->isDrawModeOpaTexEdge() == FALSE;
|
||||
#if TARGET_PC
|
||||
// TP HD J3DJoint::entryIn (FUN_02b57690):
|
||||
J3DDrawBuffer* drawBuffer = j3dSys.getDrawBuffer(isDrawModeOpaTexEdge);
|
||||
u8 r24;
|
||||
if (dusk::tphd_active() && (mesh->mMaterialID & 0x80000000) != 0 &&
|
||||
(mesh->getMaterialMode() & 0x20) != 0 &&
|
||||
drawBuffer->getSortMode() == J3DDrawBufSortMode_Mat)
|
||||
{
|
||||
matPacket->drawClear();
|
||||
shapePacket->drawClear();
|
||||
r24 = drawBuffer->entryImm(matPacket, 1);
|
||||
} else {
|
||||
r24 = matPacket->entry(drawBuffer);
|
||||
}
|
||||
#else
|
||||
u8 r24 = matPacket->entry(j3dSys.getDrawBuffer(isDrawModeOpaTexEdge));
|
||||
#endif
|
||||
if (r24) {
|
||||
j3dSys.setMatPacket(matPacket);
|
||||
J3DDrawBuffer::entryNum++;
|
||||
|
||||
@@ -230,13 +230,6 @@ void J3DMatPacket::draw() {
|
||||
#endif
|
||||
packet->getShape()->loadPreDrawSetting();
|
||||
|
||||
#if DUSK_TPHD
|
||||
{
|
||||
const auto* offs = mpMaterial->getPEBlock()->getPolygonOffset();
|
||||
GX2SetPolygonOffset(offs->mFrontOffset, offs->mFrontScale, offs->mBackOffset, offs->mBackScale, offs->mClamp);
|
||||
}
|
||||
#endif
|
||||
|
||||
while (packet != NULL) {
|
||||
if (packet->getDisplayListObj() != NULL) {
|
||||
packet->getDisplayListObj()->callDL();
|
||||
|
||||
@@ -12,9 +12,6 @@
|
||||
#include "dusk/logging.h"
|
||||
|
||||
J3DMaterialFactory::J3DMaterialFactory(J3DMaterialBlock const& i_block) {
|
||||
#ifdef DUSK_TPHD
|
||||
mBlockType = (i_block.mBlockType & 0xFF) - 0x30; // get number at last byte of block name
|
||||
#endif
|
||||
mMaterialNum = i_block.mMaterialNum;
|
||||
mpMaterialInitData = JSUConvertOffsetToPtr<J3DMaterialInitData>(&i_block, i_block.mpMaterialInitData);
|
||||
mpMaterialID = JSUConvertOffsetToPtr<BE(u16)>(&i_block, i_block.mpMaterialID);
|
||||
@@ -49,11 +46,6 @@ J3DMaterialFactory::J3DMaterialFactory(J3DMaterialBlock const& i_block) {
|
||||
mpZCompLoc = JSUConvertOffsetToPtr<u8>(&i_block, i_block.mpZCompLoc);
|
||||
mpDither = JSUConvertOffsetToPtr<u8>(&i_block, i_block.mpDither);
|
||||
mpNBTScaleInfo = JSUConvertOffsetToPtr<J3DNBTScaleInfo>(&i_block, i_block.mpNBTScaleInfo);
|
||||
#ifdef DUSK_TPHD
|
||||
if(mBlockType >= 4) {
|
||||
mpPolygonOffsets = JSUConvertOffsetToPtr<PolygonOffset>(&i_block, reinterpret_cast<const J3DMaterialBlock_MAT4&>(i_block).mpPolygonOffsets);
|
||||
}
|
||||
#endif
|
||||
mpDisplayListInit = NULL;
|
||||
mpPatchingInfo = NULL;
|
||||
mpCurrentMtxInfo = NULL;
|
||||
@@ -82,11 +74,7 @@ u16 J3DMaterialFactory::countUniqueMaterials() {
|
||||
}
|
||||
|
||||
u32 J3DMaterialFactory::countTexGens(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTexGenNumIdx != 0xff) {
|
||||
return mpTexGenNum[mtl_init_data->mTexGenNumIdx];
|
||||
}
|
||||
@@ -94,11 +82,7 @@ u32 J3DMaterialFactory::countTexGens(int i_idx) const {
|
||||
}
|
||||
|
||||
u32 J3DMaterialFactory::countStages(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
u32 count1 = 0;
|
||||
u32 count2 = 0;
|
||||
if (mtl_init_data->mTevStageNumIdx != 0xff) {
|
||||
@@ -173,9 +157,6 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
||||
i_material->mPEBlock->setZMode(newZMode(i_idx));
|
||||
i_material->mPEBlock->setZCompLoc(newZCompLoc(i_idx));
|
||||
i_material->mPEBlock->setDither(newDither(i_idx));
|
||||
#ifdef DUSK_TPHD
|
||||
i_material->mPEBlock->setPolygonOffset(newPolygonOffset(i_idx));
|
||||
#endif
|
||||
i_material->mTevBlock->setTevStageNum(newTevStageNum(i_idx));
|
||||
for (u8 i = 0; i < tex_num; i++) {
|
||||
i_material->mTevBlock->setTexNo(i, newTexNo(i_idx, i));
|
||||
@@ -184,11 +165,7 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
||||
i_material->mTevBlock->setTevOrder(i, newTevOrder(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* material_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
i_material->mTevBlock->setTevStage(i, newTevStage(i_idx, i));
|
||||
if (material_init_data->mTevSwapModeIdx[i] != 0xffff) {
|
||||
i_material->mTevBlock->getTevStage(i)->setTexSel(
|
||||
@@ -223,11 +200,7 @@ J3DMaterial* J3DMaterialFactory::createNormalMaterial(J3DMaterial* i_material, i
|
||||
for (u8 i = 0; i < 8; i++) {
|
||||
i_material->mTexGenBlock->setTexMtx(i, newTexMtx(i_idx, i));
|
||||
}
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* material_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
for (u8 i = 0; i < tev_stage_num_max; i++) {
|
||||
if (material_init_data->mTevKColorSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKColorSel(i, material_init_data->mTevKColorSel[i]);
|
||||
@@ -300,11 +273,7 @@ J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material,
|
||||
i_material->mTevBlock->setTevColor(i, newTevColor(i_idx, i));
|
||||
}
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* material_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* material_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
i_material->mTevBlock->setTevStage(i, newTevStage(i_idx, i));
|
||||
if (material_init_data->mTevSwapModeIdx[i] != 0xffff) {
|
||||
i_material->mTevBlock->getTevStage(i)->setTexSel(
|
||||
@@ -313,11 +282,7 @@ J3DMaterial* J3DMaterialFactory::createPatchedMaterial(J3DMaterial* i_material,
|
||||
mpTevSwapModeInfo[material_init_data->mTevSwapModeIdx[i]].mRasSel);
|
||||
}
|
||||
}
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
for (u8 i = 0; i < tev_stage_num; i++) {
|
||||
if (init_data->mTevKColorSel[i] != 0xff) {
|
||||
i_material->mTevBlock->setTevKColorSel(i, init_data->mTevKColorSel[i]);
|
||||
@@ -458,11 +423,7 @@ u32 J3DMaterialFactory::calcSizeNormalMaterial(J3DMaterial* i_material, int i_id
|
||||
size += J3DMaterial::calcSizeTevBlock((u16)tev_stage_num_max);
|
||||
size += J3DMaterial::calcSizeIndBlock(ind_flag);
|
||||
size += J3DMaterial::calcSizePEBlock(pe_flag, getMaterialMode(i_idx));
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (init_data->mTexMtxIdx[i] != 0xffff) {
|
||||
size += sizeof(J3DTexMtx);
|
||||
@@ -483,11 +444,7 @@ u32 J3DMaterialFactory::calcSizePatchedMaterial(J3DMaterial* i_material, int i_i
|
||||
size += sizeof(J3DTevBlockPatched);
|
||||
size += J3DMaterial::calcSizeIndBlock(ind_flag);
|
||||
size += J3DMaterial::calcSizePEBlock(0x10000000, getMaterialMode(i_idx));
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
for (u32 i = 0; i < 8; i++) {
|
||||
if (init_data->mTexMtxIdx[i] != 0xffff) {
|
||||
size += sizeof(J3DTexMtx);
|
||||
@@ -517,11 +474,7 @@ J3DGXColor J3DMaterialFactory::newMatColor(int i_idx, int i_no) const {
|
||||
#else
|
||||
J3DGXColor dflt = GXColor{0xff, 0xff, 0xff, 0xff};
|
||||
#endif
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mMatColorIdx[i_no] != 0xffff) {
|
||||
return (GXColor) mpMatColor[mtl_init_data->mMatColorIdx[i_no]];
|
||||
} else {
|
||||
@@ -530,11 +483,7 @@ J3DGXColor J3DMaterialFactory::newMatColor(int i_idx, int i_no) const {
|
||||
}
|
||||
|
||||
const u8 J3DMaterialFactory::newColorChanNum(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mColorChanNumIdx != 0xff) {
|
||||
return mpColorChanNum[mtl_init_data->mColorChanNumIdx];
|
||||
} else {
|
||||
@@ -544,11 +493,7 @@ const u8 J3DMaterialFactory::newColorChanNum(int i_idx) const {
|
||||
|
||||
J3DColorChan J3DMaterialFactory::newColorChan(int i_idx, int i_no) const {
|
||||
u32 r29 = 0;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (init_data->mColorChanIdx[i_no] != 0xffff) {
|
||||
return J3DColorChan(mpColorChanInfo[init_data->mColorChanIdx[i_no]]);
|
||||
} else {
|
||||
@@ -562,11 +507,7 @@ J3DGXColor J3DMaterialFactory::newAmbColor(int i_idx, int i_no) const {
|
||||
#else
|
||||
J3DGXColor dflt = GXColor{0x32, 0x32, 0x32, 0x32};
|
||||
#endif
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mAmbColorIdx[i_no] != 0xffff) {
|
||||
return (GXColor) mpAmbColor[mtl_init_data->mAmbColorIdx[i_no]];
|
||||
} else {
|
||||
@@ -576,11 +517,7 @@ J3DGXColor J3DMaterialFactory::newAmbColor(int i_idx, int i_no) const {
|
||||
|
||||
u32 J3DMaterialFactory::newTexGenNum(int i_idx) const {
|
||||
u32 r30 = 0;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTexGenNumIdx != 0xff) {
|
||||
return mpTexGenNum[mtl_init_data->mTexGenNumIdx];
|
||||
} else {
|
||||
@@ -589,11 +526,7 @@ u32 J3DMaterialFactory::newTexGenNum(int i_idx) const {
|
||||
}
|
||||
|
||||
J3DTexCoord J3DMaterialFactory::newTexCoord(int i_idx, int i_no) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTexCoordIdx[i_no] != 0xffff) {
|
||||
return J3DTexCoord(mpTexCoordInfo[mtl_init_data->mTexCoordIdx[i_no]]);
|
||||
} else {
|
||||
@@ -603,11 +536,7 @@ J3DTexCoord J3DMaterialFactory::newTexCoord(int i_idx, int i_no) const {
|
||||
|
||||
J3DTexMtx* J3DMaterialFactory::newTexMtx(int i_idx, int i_no) const {
|
||||
J3DTexMtx* tex_mtx = NULL;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTexMtxIdx[i_no] != 0xffff) {
|
||||
#if TARGET_LITTLE_ENDIAN
|
||||
auto tex_mtx_info = mpTexMtxInfo[mtl_init_data->mTexMtxIdx[i_no]];
|
||||
@@ -629,11 +558,7 @@ J3DTexMtx* J3DMaterialFactory::newTexMtx(int i_idx, int i_no) const {
|
||||
|
||||
u8 J3DMaterialFactory::newCullMode(int i_idx) const {
|
||||
u32 r30 = 0;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mCullModeIdx != 0xff) {
|
||||
return mpCullMode[mtl_init_data->mCullModeIdx];
|
||||
} else {
|
||||
@@ -642,11 +567,7 @@ u8 J3DMaterialFactory::newCullMode(int i_idx) const {
|
||||
}
|
||||
|
||||
u16 J3DMaterialFactory::newTexNo(int i_idx, int i_no) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTexNoIdx[i_no] != 0xffff) {
|
||||
return mpTexNo[mtl_init_data->mTexNoIdx[i_no]];
|
||||
} else {
|
||||
@@ -655,11 +576,7 @@ u16 J3DMaterialFactory::newTexNo(int i_idx, int i_no) const {
|
||||
}
|
||||
|
||||
J3DTevOrder J3DMaterialFactory::newTevOrder(int i_idx, int i_no) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevOrderIdx[i_no] != 0xffff) {
|
||||
return J3DTevOrder(mpTevOrderInfo[mtl_init_data->mTevOrderIdx[i_no]]);
|
||||
} else {
|
||||
@@ -670,11 +587,7 @@ J3DTevOrder J3DMaterialFactory::newTevOrder(int i_idx, int i_no) const {
|
||||
J3DGXColorS10 J3DMaterialFactory::newTevColor(int i_idx, int i_no) const {
|
||||
GXColorS10 _dflt = {0, 0, 0, 0};
|
||||
J3DGXColorS10 dflt = _dflt;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevColorIdx[i_no] != 0xffff) {
|
||||
return (GXColorS10) mpTevColor[mtl_init_data->mTevColorIdx[i_no]];
|
||||
} else {
|
||||
@@ -688,11 +601,7 @@ J3DGXColor J3DMaterialFactory::newTevKColor(int i_idx, int i_no) const {
|
||||
#else
|
||||
J3DGXColor dflt = GXColor{0xff, 0xff, 0xff, 0xff};
|
||||
#endif
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevKColorIdx[i_no] != 0xffff) {
|
||||
return (GXColor) mpTevKColor[mtl_init_data->mTevKColorIdx[i_no]];
|
||||
} else {
|
||||
@@ -701,11 +610,7 @@ J3DGXColor J3DMaterialFactory::newTevKColor(int i_idx, int i_no) const {
|
||||
}
|
||||
|
||||
const u8 J3DMaterialFactory::newTevStageNum(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevStageNumIdx != 0xff) {
|
||||
return mpTevStageNum[mtl_init_data->mTevStageNumIdx];
|
||||
} else {
|
||||
@@ -714,11 +619,7 @@ const u8 J3DMaterialFactory::newTevStageNum(int i_idx) const {
|
||||
}
|
||||
|
||||
J3DTevStage J3DMaterialFactory::newTevStage(int i_idx, int i_no) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevStageIdx[i_no] != 0xffff) {
|
||||
return J3DTevStage(mpTevStageInfo[mtl_init_data->mTevStageIdx[i_no]]);
|
||||
} else {
|
||||
@@ -727,11 +628,7 @@ J3DTevStage J3DMaterialFactory::newTevStage(int i_idx, int i_no) const {
|
||||
}
|
||||
|
||||
J3DTevSwapModeTable J3DMaterialFactory::newTevSwapModeTable(int i_idx, int i_no) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mTevSwapModeTableIdx[i_no] != 0xffff) {
|
||||
return J3DTevSwapModeTable(mpTevSwapModeTableInfo[mtl_init_data->mTevSwapModeTableIdx[i_no]]);
|
||||
} else {
|
||||
@@ -792,11 +689,7 @@ J3DIndTexCoordScale J3DMaterialFactory::newIndTexCoordScale(int i_idx, int i_no)
|
||||
|
||||
J3DFog J3DMaterialFactory::newFog(int i_idx) const {
|
||||
J3DFog fog;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mFogIdx != 0xffff) {
|
||||
#if TARGET_LITTLE_ENDIAN
|
||||
J3DFogInfo fogInfo = mpFogInfo[mtl_init_data->mFogIdx];
|
||||
@@ -816,11 +709,7 @@ J3DFog J3DMaterialFactory::newFog(int i_idx) const {
|
||||
}
|
||||
|
||||
J3DAlphaComp J3DMaterialFactory::newAlphaComp(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mAlphaCompIdx != 0xffff) {
|
||||
return J3DAlphaComp(mpAlphaCompInfo[mtl_init_data->mAlphaCompIdx]);
|
||||
} else {
|
||||
@@ -829,11 +718,7 @@ J3DAlphaComp J3DMaterialFactory::newAlphaComp(int i_idx) const {
|
||||
}
|
||||
|
||||
J3DBlend J3DMaterialFactory::newBlend(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mBlendIdx != 0xffff) {
|
||||
return J3DBlend(mpBlendInfo[mtl_init_data->mBlendIdx]);
|
||||
} else {
|
||||
@@ -843,11 +728,7 @@ J3DBlend J3DMaterialFactory::newBlend(int i_idx) const {
|
||||
|
||||
J3DZMode J3DMaterialFactory::newZMode(int i_idx) const {
|
||||
u32 r29 = 0;
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mZModeIdx != 0xff) {
|
||||
return J3DZMode(mpZModeInfo[mtl_init_data->mZModeIdx]);
|
||||
} else {
|
||||
@@ -856,11 +737,7 @@ J3DZMode J3DMaterialFactory::newZMode(int i_idx) const {
|
||||
}
|
||||
|
||||
const u8 J3DMaterialFactory::newZCompLoc(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mZCompLocIdx != 0xff){
|
||||
return mpZCompLoc[mtl_init_data->mZCompLocIdx];
|
||||
} else {
|
||||
@@ -869,11 +746,7 @@ const u8 J3DMaterialFactory::newZCompLoc(int i_idx) const {
|
||||
}
|
||||
|
||||
const u8 J3DMaterialFactory::newDither(int i_idx) const {
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mDitherIdx != 0xff){
|
||||
return mpDither[mtl_init_data->mDitherIdx];
|
||||
} else {
|
||||
@@ -881,24 +754,9 @@ const u8 J3DMaterialFactory::newDither(int i_idx) const {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DUSK_TPHD
|
||||
const PolygonOffset J3DMaterialFactory::newPolygonOffset(int i_idx) const {
|
||||
J3DMaterialInitData_MAT4* mtl_init_data = (J3DMaterialInitData_MAT4*)getMatInitData(i_idx);
|
||||
if (mBlockType >= 4 && mtl_init_data->mPolygonOffsetIdx != 0xffff){
|
||||
return mpPolygonOffsets[mtl_init_data->mPolygonOffsetIdx];
|
||||
} else {
|
||||
return PolygonOffset{0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
J3DNBTScale J3DMaterialFactory::newNBTScale(int i_idx) const {
|
||||
J3DNBTScale dflt(j3dDefaultNBTScaleInfo);
|
||||
#ifdef DUSK_TPHD
|
||||
J3DMaterialInitData* mtl_init_data = getMatInitData(i_idx);
|
||||
#else
|
||||
J3DMaterialInitData* mtl_init_data = &mpMaterialInitData[mpMaterialID[i_idx]];
|
||||
#endif
|
||||
if (mtl_init_data->mNBTScaleIdx != 0xffff) {
|
||||
return J3DNBTScale(mpNBTScaleInfo[mtl_init_data->mNBTScaleIdx]);
|
||||
} else {
|
||||
|
||||
@@ -103,9 +103,6 @@ J3DModelData* J3DModelLoader::load(void const* i_data, u32 i_flags) {
|
||||
readJoint((J3DJointBlock*)block);
|
||||
break;
|
||||
case 'MAT3':
|
||||
#if DUSK_TPHD
|
||||
case 'MAT4':
|
||||
#endif
|
||||
readMaterial((J3DMaterialBlock*)block, (s32)i_flags);
|
||||
break;
|
||||
case 'MAT2':
|
||||
@@ -150,9 +147,6 @@ J3DMaterialTable* J3DModelLoader::loadMaterialTable(void const* i_data) {
|
||||
for (u32 block_no = 0; block_no < data->mBlockNum; block_no++) {
|
||||
switch (block->mBlockType) {
|
||||
case 'MAT3':
|
||||
#if DUSK_TPHD
|
||||
case 'MAT4':
|
||||
#endif
|
||||
readMaterialTable((J3DMaterialBlock*)block, flags);
|
||||
break;
|
||||
case 'MAT2':
|
||||
@@ -218,9 +212,6 @@ J3DModelData* J3DModelLoader::loadBinaryDisplayList(void const* i_data, u32 i_fl
|
||||
modifyMaterial(i_flags);
|
||||
break;
|
||||
case 'MAT3':
|
||||
#if DUSK_TPHD
|
||||
case 'MAT4':
|
||||
#endif
|
||||
flags = 0x50100000;
|
||||
flags |= (i_flags & 0x3000000);
|
||||
mpMaterialBlock = (J3DMaterialBlock*)block;
|
||||
@@ -317,22 +308,8 @@ static GXVtxAttrFmtList getFmt(GXVtxAttrFmtList* i_fmtList, GXAttr i_attr) {
|
||||
return *i_fmtList;
|
||||
}
|
||||
}
|
||||
#if DUSK_TPHD
|
||||
// HD BMDs occasionally have vertex arrays without a format entry. Mirror
|
||||
// the GC runtime: fall back to J3DSys::initGX defaults.
|
||||
GXVtxAttrFmtList def{};
|
||||
def.attr = i_attr;
|
||||
def.frac = 0;
|
||||
if (i_attr == GX_VA_POS) { def.cnt = GX_POS_XYZ; def.type = GX_F32; }
|
||||
else if (i_attr == GX_VA_NRM) { def.cnt = GX_NRM_XYZ; def.type = GX_F32; }
|
||||
else if (i_attr == GX_VA_NBT) { def.cnt = GX_NRM_NBT; def.type = GX_F32; }
|
||||
else if (i_attr >= GX_VA_CLR0 &&
|
||||
i_attr <= GX_VA_CLR1) { def.cnt = GX_CLR_RGBA; def.type = GX_RGBA8; }
|
||||
else { def.cnt = GX_TEX_ST; def.type = GX_F32; }
|
||||
return def;
|
||||
#else
|
||||
|
||||
OSPanic(__FILE__, __LINE__, "Unable to find vertex attribute format!");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ u16 J3DModelLoader::countMaterialNum(const void* stream) {
|
||||
const J3DModelBlock* block = header->mBlocks;
|
||||
for (int i = 0; i < header->mBlockNum; i++)
|
||||
{
|
||||
if (block->mBlockType == 'MAT3' || block->mBlockType == 'MAT4') {
|
||||
if (block->mBlockType == 'MAT3') {
|
||||
const J3DMaterialBlock* materialBlock = (const J3DMaterialBlock*)block;
|
||||
return materialBlock->mMaterialNum;
|
||||
}
|
||||
@@ -45,7 +45,6 @@ u32 J3DModelLoader::calcLoadSize(void const* stream, u32 flags_) {
|
||||
size += calcSizeJoint((const J3DJointBlock*)nextBlock);
|
||||
break;
|
||||
case 'MAT3':
|
||||
case 'MAT4':
|
||||
size += calcSizeMaterial((const J3DMaterialBlock*)nextBlock, flags);
|
||||
break;
|
||||
case 'SHP1':
|
||||
@@ -87,7 +86,6 @@ u32 J3DModelLoader::calcLoadMaterialTableSize(const void* stream) {
|
||||
for (u32 i = 0; i < header->mBlockNum; i++) {
|
||||
switch (nextBlock->mBlockType) {
|
||||
case 'MAT3':
|
||||
case 'MAT4':
|
||||
size += calcSizeMaterialTable((const J3DMaterialBlock*)nextBlock, flags);
|
||||
break;
|
||||
case 'TEX1':
|
||||
@@ -137,8 +135,7 @@ u32 J3DModelLoader::calcLoadBinaryDisplayListSize(const void* stream, u32 flags)
|
||||
case 'MDL3':
|
||||
size += calcSizeMaterialDL((const J3DMaterialDLBlock*)nextBlock, flags);
|
||||
break;
|
||||
case 'MAT3':
|
||||
case 'MAT4': {
|
||||
case 'MAT3': {
|
||||
u32 flags2 = (J3DMLF_21 | J3DMLF_Material_PE_Full | J3DMLF_Material_Color_LightOn);
|
||||
flags2 |= (u32)flags & (J3DMLF_Material_UseIndirect | J3DMLF_26);
|
||||
mpMaterialBlock = (const J3DMaterialBlock*)nextBlock;
|
||||
|
||||
@@ -9,24 +9,6 @@
|
||||
#include "JSystem/JKernel/JKRMemArchive.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
#if DUSK_TPHD
|
||||
#include "dusk/tphd/HdAssetLayer.hpp"
|
||||
|
||||
namespace {
|
||||
void register_copied_hd_resource(
|
||||
JKRArchive* archive, JKRArchive::SDIFileEntry* fileEntry, void* buffer, u32 resourceSize) {
|
||||
if (archive == NULL || fileEntry == NULL || buffer == NULL || resourceSize == 0 ||
|
||||
archive->mStringTable == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
dusk::tphd::register_copied_hd_resource(archive->mEntryNum,
|
||||
archive->mStringTable + fileEntry->getNameOffset(), buffer, resourceSize);
|
||||
}
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
JKRArchive* JKRArchive::check_mount_already(s32 entryNum, JKRHeap* heap) {
|
||||
if (heap == NULL) {
|
||||
heap = JKRGetCurrentHeap();
|
||||
@@ -214,9 +196,6 @@ u32 JKRArchive::readResource(void* buffer, u32 bufferSize, u32 type, const char*
|
||||
if (fileEntry) {
|
||||
u32 resourceSize;
|
||||
fetchResource(buffer, bufferSize, fileEntry, &resourceSize);
|
||||
#if DUSK_TPHD
|
||||
register_copied_hd_resource(this, fileEntry, buffer, resourceSize);
|
||||
#endif
|
||||
return resourceSize;
|
||||
}
|
||||
|
||||
@@ -235,9 +214,6 @@ u32 JKRArchive::readResource(void* buffer, u32 bufferSize, const char* path) {
|
||||
if (fileEntry) {
|
||||
u32 resourceSize;
|
||||
fetchResource(buffer, bufferSize, fileEntry, &resourceSize);
|
||||
#if DUSK_TPHD
|
||||
register_copied_hd_resource(this, fileEntry, buffer, resourceSize);
|
||||
#endif
|
||||
return resourceSize;
|
||||
}
|
||||
|
||||
@@ -250,9 +226,6 @@ u32 JKRArchive::readIdxResource(void* buffer, u32 bufferSize, u32 index) {
|
||||
if (fileEntry) {
|
||||
u32 resourceSize;
|
||||
fetchResource(buffer, bufferSize, fileEntry, &resourceSize);
|
||||
#if DUSK_TPHD
|
||||
register_copied_hd_resource(this, fileEntry, buffer, resourceSize);
|
||||
#endif
|
||||
return resourceSize;
|
||||
}
|
||||
|
||||
@@ -265,9 +238,6 @@ u32 JKRArchive::readResource(void* buffer, u32 bufferSize, u16 id) {
|
||||
if (fileEntry) {
|
||||
u32 resourceSize;
|
||||
fetchResource(buffer, bufferSize, fileEntry, &resourceSize);
|
||||
#if DUSK_TPHD
|
||||
register_copied_hd_resource(this, fileEntry, buffer, resourceSize);
|
||||
#endif
|
||||
return resourceSize;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#include <stdint.h>
|
||||
#include "os_report.h"
|
||||
|
||||
#if DUSK_TPHD
|
||||
#include "dusk/tphd/HdAssetLayer.hpp"
|
||||
#endif
|
||||
|
||||
JKRMemArchive::JKRMemArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection)
|
||||
: JKRArchive(entryNum, MOUNT_MEM) {
|
||||
mIsMounted = false;
|
||||
@@ -71,13 +67,8 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
mIsOpen = false;
|
||||
mMountDirection = mountDirection;
|
||||
|
||||
#ifdef TARGET_PC
|
||||
u32 loadedSize = 0;
|
||||
#endif
|
||||
if (mMountDirection == JKRArchive::MOUNT_DIRECTION_HEAD) {
|
||||
#ifndef TARGET_PC
|
||||
u32 loadedSize;
|
||||
#endif
|
||||
mArcHeader = (SArcHeader *)JKRDvdToMainRam(
|
||||
entryNum, NULL, EXPAND_SWITCH_UNKNOWN1, 0, mHeap, JKRDvdRipper::ALLOC_DIRECTION_FORWARD,
|
||||
0, (int *)&mCompression, &loadedSize);
|
||||
@@ -86,9 +77,7 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
}
|
||||
}
|
||||
else {
|
||||
#ifndef TARGET_PC
|
||||
u32 loadedSize;
|
||||
#endif
|
||||
mArcHeader = (SArcHeader *)JKRDvdToMainRam(
|
||||
entryNum, NULL, EXPAND_SWITCH_UNKNOWN1, 0, mHeap,
|
||||
JKRDvdRipper::ALLOC_DIRECTION_BACKWARD, 0, (int *)&mCompression, &loadedSize);
|
||||
@@ -101,9 +90,6 @@ bool JKRMemArchive::open(s32 entryNum, JKRArchive::EMountDirection mountDirectio
|
||||
mMountMode = UNKNOWN_MOUNT_MODE;
|
||||
}
|
||||
else {
|
||||
#if DUSK_TPHD
|
||||
dusk::tphd::register_mounted_hd_archive(entryNum, mArcHeader, loadedSize);
|
||||
#endif
|
||||
JUT_ASSERT(438, mArcHeader->signature == 'RARC');
|
||||
mArcInfoBlock = (SArcDataInfo *)((u8 *)mArcHeader + mArcHeader->header_length);
|
||||
mNodes = (SDIDirEntry *)((u8 *)&mArcInfoBlock->num_nodes + mArcInfoBlock->node_offset);
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
#include "JSystem/JMessage/control.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/messages.hpp"
|
||||
#endif
|
||||
|
||||
JMessage::TControl::TControl()
|
||||
: pSequenceProcessor_(NULL),
|
||||
pRenderingProcessor_(NULL),
|
||||
@@ -90,6 +94,10 @@ bool JMessage::TControl::setMessageCode_inSequence_(JMessage::TProcessor const*
|
||||
JUT_ASSERT(155, pResourceCache_!=NULL);
|
||||
|
||||
pMessageText_begin_ = pResourceCache_->getMessageText_messageEntry(pEntry_);
|
||||
#if TARGET_PC
|
||||
// Feels kinda hacky to have to hijack this deep into JSystem, but works for now
|
||||
HandleTextOverrides(this, pProcessor, uMessageGroupID_, uMessageID_);
|
||||
#endif
|
||||
pMessageText_current_ = pMessageText_begin_;
|
||||
oStack_renderingProcessor_.clear();
|
||||
return true;
|
||||
|
||||
+52
-2
@@ -21,6 +21,7 @@ body {
|
||||
}
|
||||
|
||||
fps,
|
||||
pipeline-progress,
|
||||
toast {
|
||||
position: absolute;
|
||||
border: 1dp #92875B;
|
||||
@@ -98,7 +99,7 @@ toast message row.muted {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
toast progress {
|
||||
progress {
|
||||
height: 4dp;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -106,10 +107,50 @@ toast progress {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
toast progress fill {
|
||||
progress fill {
|
||||
background-color: rgba(194, 164, 45, 80%);
|
||||
}
|
||||
|
||||
pipeline-progress {
|
||||
left: 12dp;
|
||||
bottom: 12dp;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
z-index: 100;
|
||||
min-width: 260dp;
|
||||
max-width: 90%;
|
||||
padding: 10dp 16dp 12dp;
|
||||
border-radius: 7dp;
|
||||
overflow: hidden;
|
||||
filter: opacity(0);
|
||||
transition: filter 0.2s linear-in-out;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
pipeline-progress[open] {
|
||||
filter: opacity(1);
|
||||
}
|
||||
|
||||
pipeline-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8dp;
|
||||
font-size: 18dp;
|
||||
font-weight: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
icon.pipeline-spinner {
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
line-height: 1.2em;
|
||||
font-size: 1.2em;
|
||||
color: #C2A42D;
|
||||
text-align: center;
|
||||
transform-origin: center;
|
||||
animation: 1s linear infinite pipeline-spinner-spin;
|
||||
}
|
||||
|
||||
toast.achievement {
|
||||
border: 1dp #C2A42D;
|
||||
}
|
||||
@@ -310,6 +351,15 @@ logo img.outer {
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pipeline-spinner-spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 640dp) {
|
||||
toast {
|
||||
top: 20dp;
|
||||
|
||||
@@ -105,6 +105,18 @@ window content pane > * {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
pane.excluded-locations-pane {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
gap: 8dp;
|
||||
overflow-y: scroll;
|
||||
font-size: 20dp;
|
||||
border-top: 1dp #92875B;
|
||||
}
|
||||
|
||||
window content pane:last-of-type > div {
|
||||
line-height: 1.625;
|
||||
}
|
||||
@@ -478,6 +490,7 @@ window.modal.danger .modal-header icon {
|
||||
font-size: 20dp;
|
||||
color: #FFFFFF;
|
||||
font-weight: normal;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.modal-body span.tip {
|
||||
@@ -519,3 +532,15 @@ progress.verification-progress-bar {
|
||||
flex: 0 0 auto;
|
||||
padding-top: 4dp;
|
||||
}
|
||||
|
||||
.current-option-text {
|
||||
padding-left: 5dp;
|
||||
border: 2dp #C2A42D;
|
||||
border-radius: 14dp;
|
||||
}
|
||||
|
||||
.not-current-option-text {
|
||||
padding-left: 5dp;
|
||||
margin: 2dp; /*Used to mimic border*/
|
||||
opacity: 0.5;
|
||||
}
|
||||
@@ -15,9 +15,6 @@ static const char* sSpotName[] = {
|
||||
"D_MN08A", "D_MN08D", "D_MN09", "D_MN09A", "D_MN09B", "D_MN09C", "D_SB00", "D_SB01",
|
||||
"D_SB02", "D_SB03", "D_SB04", "D_SB05", "D_SB06", "D_SB07", "D_SB08", "D_SB09",
|
||||
"D_SB10",
|
||||
#if TARGET_PC
|
||||
"D_SB11",
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif /* SPOTNAME_H */
|
||||
|
||||
@@ -1230,7 +1230,8 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
|
||||
bgm_id = Z2BGM_DUNGEON_FOREST;
|
||||
bgm_wave1 = 0xa;
|
||||
/* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55])) {
|
||||
// In rando, check for boss defeated instead
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = 0x200005b;
|
||||
} else {
|
||||
bgm_wave1 = 0xc;
|
||||
@@ -1290,11 +1291,13 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
|
||||
break;
|
||||
case Z2SCENE_LAKEBED_TEMPLE_BOSS:
|
||||
se_wave1 = 9;
|
||||
if (dComIfGs_isStageSwitch(4, 0xe)) {
|
||||
// In rando, check for boss defeated instead
|
||||
if (dComIfGs_isStageSwitch(4, 0xe) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = Z2BGM_DUNGEON_LV3;
|
||||
bgm_wave1 = 0x15;
|
||||
/* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78])) {
|
||||
// In rando, check for boss defeated instead
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = 0x200005b;
|
||||
} else {
|
||||
bgm_wave1 = 0x1e;
|
||||
@@ -1324,11 +1327,11 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
|
||||
break;
|
||||
case Z2SCENE_ARBITERS_GROUNDS_BOSS:
|
||||
se_wave1 = 0xd;
|
||||
if (dComIfGs_isStageSwitch(0xa, 0xa)) {
|
||||
if (dComIfGs_isStageSwitch(0xa, 0xa) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = Z2BGM_DUNGEON_LV4;
|
||||
bgm_wave1 = 0x1a;
|
||||
/* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265])) {
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = 0x200005b;
|
||||
} else {
|
||||
bgm_wave1 = 0x4c;
|
||||
@@ -1389,11 +1392,11 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
|
||||
break;
|
||||
case Z2SCENE_TEMPLE_OF_TIME_BOSS:
|
||||
se_wave1 = 0x15;
|
||||
if (dComIfGs_isStageSwitch(7, 0x18)) {
|
||||
if (dComIfGs_isStageSwitch(7, 0x18) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = Z2BGM_DUNGEON_LV6;
|
||||
bgm_wave1 = 0x26;
|
||||
/* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267])) {
|
||||
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
|
||||
bgm_id = 0x200005b;
|
||||
} else {
|
||||
bgm_wave1 = 0x4e;
|
||||
@@ -1603,35 +1606,13 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
|
||||
bgm_wave1 = 0x45;
|
||||
}
|
||||
break;
|
||||
#if TARGET_PC
|
||||
case Z2SCENE_CAVE_OF_SHADOWS:
|
||||
if (room == 29) {
|
||||
se_wave2 = 0x16;
|
||||
} else if (room == 40) {
|
||||
se_wave2 = 0x12;
|
||||
} else {
|
||||
se_wave2 = 0x36;
|
||||
}
|
||||
|
||||
bgm_wave1 = 0x45;
|
||||
se_wave1 = 0x51;
|
||||
mDoAud_zelAudio_c::onBgmSet();
|
||||
bgm_id = Z2BGM_SUB_DUNGEON;
|
||||
|
||||
if (BGM_ID == Z2BGM_SUB_DUNGEON) {
|
||||
if (sceneNum == Z2SCENE_CAVE_OF_ORDEALS) {
|
||||
BGM_ID = -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*dSv_event_flag_c::M_071 - Cutscene - [cutscene: 20] Zant appears (during Midna's desperate hour) */
|
||||
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[104])
|
||||
/* dSv_event_flag_c::F_0250 - Cutscene - [cutscene: 21] reunion with Zelda / Midna revived (Hyrule Castle barrier appears) */
|
||||
&& !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[250])
|
||||
&& demo_wave == 0 && spotNo != Z2SCENE_ELDIN_BRIDGE_BATTLE IF_DUSK(&& spotNo != Z2SCENE_CAVE_OF_SHADOWS))
|
||||
&& demo_wave == 0 && spotNo != Z2SCENE_ELDIN_BRIDGE_BATTLE)
|
||||
{
|
||||
bgm_wave1 = 0x36;
|
||||
if (spotNo == Z2SCENE_CASTLE_TOWN_SHOPS && room == 5) {
|
||||
|
||||
@@ -583,12 +583,6 @@ void Z2SeqMgr::bgmStreamPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active()) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !PLATFORM_SHIELD
|
||||
else if (getStreamBgmID() == 0x2000000) {
|
||||
if (mStreamBgmHandle) {
|
||||
|
||||
+74
-30
@@ -5,53 +5,51 @@
|
||||
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "JSystem/J2DGraph/J2DAnmLoader.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/JHostIO/JORServer.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_b_mgn.h"
|
||||
#include "d/actor/d_a_canoe.h"
|
||||
#include "d/actor/d_a_cow.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/actor/d_a_crod.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "d/actor/d_a_kytag05.h"
|
||||
#include "d/actor/d_a_mg_rod.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/actor/d_a_mirror.h"
|
||||
#include "d/actor/d_a_ni.h"
|
||||
#include "d/actor/d_a_npc_bou.h"
|
||||
#include "d/actor/d_a_npc_kolin.h"
|
||||
#include "d/actor/d_a_spinner.h"
|
||||
#include "d/actor/d_a_tbox.h"
|
||||
#include "d/actor/d_a_tag_Lv6Gate.h"
|
||||
#include "d/actor/d_a_tag_kmsg.h"
|
||||
#include "d/actor/d_a_tag_magne.h"
|
||||
#include "d/actor/d_a_tag_wljump.h"
|
||||
#include "d/actor/d_a_npc_tk.h"
|
||||
#include "d/actor/d_a_cow.h"
|
||||
#include "d/actor/d_a_obj_crope.h"
|
||||
#include "d/actor/d_a_obj_wchain.h"
|
||||
#include "d/actor/d_a_scene_exit.h"
|
||||
#include "d/actor/d_a_spinner.h"
|
||||
#include "d/actor/d_a_tag_Lv6Gate.h"
|
||||
#include "d/actor/d_a_tag_hstop.h"
|
||||
#include "d/actor/d_a_tag_kmsg.h"
|
||||
#include "d/actor/d_a_tag_lantern.h"
|
||||
#include "d/actor/d_a_tag_magne.h"
|
||||
#include "d/actor/d_a_scene_exit.h"
|
||||
#include "d/actor/d_a_tag_mhint.h"
|
||||
#include "d/actor/d_a_tag_mmsg.h"
|
||||
#include "d/actor/d_a_tag_lantern.h"
|
||||
#include "d/actor/d_a_horse.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_kytag05.h"
|
||||
#include "d/actor/d_a_b_mgn.h"
|
||||
#include "d/actor/d_a_npc_bou.h"
|
||||
#include "d/actor/d_a_npc_kolin.h"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "d/actor/d_a_tag_mstop.h"
|
||||
#include "d/actor/d_a_tag_mwait.h"
|
||||
#include "d/actor/d_a_tag_wljump.h"
|
||||
#include "d/actor/d_a_tbox.h"
|
||||
#include "d/d_bomb.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "d/actor/d_a_canoe.h"
|
||||
#include "d/actor/d_a_ni.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
#include "dusk/tphd/TphdPack.hpp"
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/action_bindings.h"
|
||||
@@ -60,6 +58,10 @@
|
||||
#include "res/Object/Alink.h"
|
||||
#include <cstring>
|
||||
#include <dusk/string.hpp>
|
||||
#include "dusk/cosmetics/color_utils.hpp"
|
||||
#include "dusk/randomizer/game/flags.h"
|
||||
#include "dusk/randomizer/game/stages.h"
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#endif
|
||||
|
||||
static int daAlink_Create(fopAc_ac_c* i_this);
|
||||
@@ -4233,6 +4235,25 @@ int daAlink_c::createHeap() {
|
||||
if (mpHIO == NULL) {
|
||||
return 0;
|
||||
}
|
||||
#if TARGET_PC
|
||||
const auto& lanternColor = dusk::getSettings().cosmetics.lanternGlowColor.getValue();
|
||||
if (dusk::cosmetics::is_valid_hex_color_str(lanternColor)) {
|
||||
u8 r = std::stoi(lanternColor.substr(0, 2), nullptr, 16);
|
||||
u8 g = std::stoi(lanternColor.substr(2, 2), nullptr, 16);
|
||||
u8 b = std::stoi(lanternColor.substr(4, 2), nullptr, 16);
|
||||
auto& lanternAmbience = mpHIO->mItem.mLanternPL.m;
|
||||
auto& lanternSphere = mpHIO->mItem.mLantern.m;
|
||||
lanternAmbience.mColorR = r;
|
||||
lanternAmbience.mColorG = g;
|
||||
lanternAmbience.mColorB = b;
|
||||
lanternSphere.mColorReg1R = r;
|
||||
lanternSphere.mColorReg1G = g;
|
||||
lanternSphere.mColorReg1B = b;
|
||||
lanternSphere.mColorReg2R = r;
|
||||
lanternSphere.mColorReg2G = g;
|
||||
lanternSphere.mColorReg2B = b;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!(mpWlChangeModel = initModel(dRes_ID_ALINK_BMD_WL_CHANGE_e, 0))) {
|
||||
return 0;
|
||||
@@ -10575,9 +10596,16 @@ void daAlink_c::decideDoStatus() {
|
||||
(actor_name == fpcNm_TAG_KMSG_e &&
|
||||
static_cast<daTag_KMsg_c*>(field_0x27f4)->getType() == 3))
|
||||
{
|
||||
if (!checkEquipAnime() && checkMasterSwordEquip()) {
|
||||
// Don't check vanilla condition in randomizer
|
||||
if (!checkEquipAnime() && checkMasterSwordEquip() IF_DUSK(&& !randomizer_IsActive())) {
|
||||
setDoStatus(BUTTON_STATUS_STRIKE);
|
||||
}
|
||||
#if TARGET_PC
|
||||
// Separate check for striking sword into the pedestal for randomizer
|
||||
if (!checkEquipAnime() && randomizer_IsActive() && randomizer_checkTempleOfTimeRequirement()) {
|
||||
setDoStatus(BUTTON_STATUS_STRIKE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else if (mTargetedActor != NULL && checkGoatCatchActor(mTargetedActor) &&
|
||||
mAttention->getActionBtnB() != NULL &&
|
||||
@@ -11485,6 +11513,14 @@ int daAlink_c::orderTalk(int i_checkZTalk) {
|
||||
static void* daAlink_searchBouDoor(fopAc_ac_c* i_actor, void* i_data) {
|
||||
UNUSED(i_data);
|
||||
|
||||
#if TARGET_PC
|
||||
// In randomizer, we don't want Bo preventing us from entering his house on Day 2
|
||||
if (randomizer_IsActive() && daAlink_c::checkStageName("F_SP103"))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (fopAcM_GetName(i_actor) == fpcNm_NPC_BOU_e && ((daNpc_Bou_c*)i_actor)->speakTo()) {
|
||||
return i_actor;
|
||||
}
|
||||
@@ -12265,6 +12301,14 @@ BOOL daAlink_c::checkGroundSpecialMode() {
|
||||
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn() &&
|
||||
checkEndResetFlg0(ERFLG0_FORCE_WOLF_CHANGE))
|
||||
{
|
||||
#if TARGET_PC
|
||||
u8 stage = getStageID();
|
||||
// In rando, don't transform in twilight fog unless we have shadow crystal
|
||||
if (randomizer_IsActive() && !dComIfGs_isEventBit(TRANSFORMING_UNLOCKED) &&
|
||||
(stage == Palace_of_Twilight || stage == Phantom_Zant_1 || stage == Phantom_Zant_2)) {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
return procCoMetamorphoseInit();
|
||||
}
|
||||
|
||||
@@ -17454,7 +17498,7 @@ int daAlink_c::procCoMetamorphoseInit() {
|
||||
mProcVar2.field_0x300c = shape_angle.x;
|
||||
|
||||
daMidna_c* midna = (daMidna_c*)getMidnaActor();
|
||||
if (checkMidnaRide() && (daMidna_c::checkMidnaRealBody() IF_DUSK(|| dusk::tphd::is_los_active())) && midna->checkDemoTypeNone())
|
||||
if (checkMidnaRide() && daMidna_c::checkMidnaRealBody() && midna->checkDemoTypeNone())
|
||||
{
|
||||
midna->changeOriginalDemo();
|
||||
midna->changeDemoMode(daPy_demo_c::DEMO_UNK_15_e);
|
||||
|
||||
@@ -1624,7 +1624,7 @@ const daAlinkHIO_bomb_c1 daAlinkHIO_bomb_c0::m = {
|
||||
|
||||
#pragma push
|
||||
#pragma force_active on
|
||||
const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = {
|
||||
IF_NOT_DUSK(const) daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = {
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
@@ -1638,8 +1638,25 @@ const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = {
|
||||
0.0f,
|
||||
};
|
||||
#pragma pop
|
||||
#if TARGET_PC
|
||||
// Save original lantern colors incase player reverts to default
|
||||
const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::original = {
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
181,
|
||||
112,
|
||||
40,
|
||||
-70,
|
||||
1.0f,
|
||||
50.0f,
|
||||
350.0f,
|
||||
0.0f,
|
||||
};
|
||||
#endif
|
||||
|
||||
const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
|
||||
|
||||
IF_NOT_DUSK(const) daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
|
||||
{
|
||||
30,
|
||||
1.1f,
|
||||
@@ -1672,6 +1689,42 @@ const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
|
||||
0.5f,
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
// Save original lantern colors incase player reverts to default
|
||||
const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::original = {
|
||||
{
|
||||
30,
|
||||
1.1f,
|
||||
2.0f,
|
||||
3.0f,
|
||||
17.0f,
|
||||
},
|
||||
{
|
||||
11,
|
||||
1.0f,
|
||||
0.0f,
|
||||
3.0f,
|
||||
12.0f,
|
||||
},
|
||||
{
|
||||
17,
|
||||
1.0f,
|
||||
0.0f,
|
||||
3.0f,
|
||||
18.0f,
|
||||
},
|
||||
80,
|
||||
40,
|
||||
20,
|
||||
40,
|
||||
30,
|
||||
10,
|
||||
3,
|
||||
200,
|
||||
0.5f,
|
||||
};
|
||||
#endif
|
||||
|
||||
const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = {
|
||||
{
|
||||
20,
|
||||
|
||||
@@ -23,9 +23,14 @@
|
||||
#include "d/actor/d_a_npc_tkc.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/archipelago/archipelago_context.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/imgui/ImGuiConsole.hpp"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/speedrun.h"
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#endif
|
||||
|
||||
BOOL daAlink_c::checkEventRun() const {
|
||||
return dComIfGp_event_runCheck() || checkPlayerDemoMode();
|
||||
@@ -737,12 +742,6 @@ void daAlink_c::setDemoData() {
|
||||
} else {
|
||||
mDemo.setStick(1.0f);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd::is_los_active() && mLosStickValue > 0.0f) {
|
||||
mDemo.setStick(mLosStickValue);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((demo_mode == daPy_demo_c::DEMO_UNK_2_e || demo_mode == daPy_demo_c::DEMO_UNK_3_e) && prm1_p != NULL && *prm1_p == 1) {
|
||||
@@ -1029,13 +1028,26 @@ void daAlink_c::setGetItemFace(u16 i_itemNo) {
|
||||
|| i_itemNo == dItemNo_ANCIENT_DOCUMENT2_e
|
||||
|| i_itemNo == dItemNo_DROP_CONTAINER_e
|
||||
|| i_itemNo == dItemNo_DROP_CONTAINER02_e
|
||||
#if TARGET_PC
|
||||
// Rando items for facial expressions
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_WOOD_STICK_e)
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_SWORD_e)
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_SHIELD_e)
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_MASTER_SWORD_e)
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_LIGHT_SWORD_e)
|
||||
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_MAGIC_LV1_e)
|
||||
#endif
|
||||
|| i_itemNo == dItemNo_DROP_CONTAINER03_e)
|
||||
{
|
||||
setFaceBasicBck(dRes_ID_ALANM_BCK_FI_e);
|
||||
} else if (i_itemNo == dItemNo_DUNGEON_EXIT_e || i_itemNo == dItemNo_LV7_DUNGEON_EXIT_e) {
|
||||
setFaceBasicTexture(FTANM_K_A);
|
||||
setFaceBasicBck(dRes_ID_ALANM_BCK_FK_e);
|
||||
#if TARGET_PC
|
||||
} else if (i_itemNo == dItemNo_TOMATO_PUREE_e || i_itemNo == dItemNo_TASTE_e || (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e)) {
|
||||
#else
|
||||
} else if (i_itemNo == dItemNo_TOMATO_PUREE_e || i_itemNo == dItemNo_TASTE_e) {
|
||||
#endif
|
||||
setFaceBasicBck(dRes_ID_ALANM_BCK_FJ_e);
|
||||
}
|
||||
}
|
||||
@@ -2222,18 +2234,283 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
|
||||
/* dItemNo_KEY_OF_FILONE_e */ SETYPE_ITEM_GET_MINI,
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
// Randomizer SeType changes
|
||||
static const u8 getSeTypeRandomizer[255] = {
|
||||
/* dItemNo_Randomizer_HEART_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_GREEN_RUPEE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BLUE_RUPEE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_YELLOW_RUPEE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_RED_RUPEE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_PURPLE_RUPEE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_ORANGE_RUPEE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_SILVER_RUPEE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_S_MAGIC_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_L_MAGIC_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_BOMB_5_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_10_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_20_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_30_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_ARROW_10_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_ARROW_20_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_ARROW_30_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_ARROW_1_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_PACHINKO_SHOT_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_FOOLISH_ITEM_e_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_NOENTRY_20_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_21_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WATER_BOMB_5_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_WATER_BOMB_10_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_WATER_BOMB_20_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_WATER_BOMB_30_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_INSECT_5_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_INSECT_10_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_INSECT_20_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_BOMB_INSECT_30_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_RECOVERY_FAILY_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_TRIPLE_HEART_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_SMALL_KEY_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_KAKERA_HEART_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_UTAWA_HEART_e */ SETYPE_HEART,
|
||||
/* dItemNo_Randomizer_MAP_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_COMPUS_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_DUNGEON_EXIT_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BOSS_KEY_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_DUNGEON_BACK_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_SWORD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_MASTER_SWORD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_WOOD_SHIELD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_SHIELD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_HYLIA_SHIELD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_TKS_LETTER_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WEAR_CASUAL_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WEAR_KOKIRI_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ARMOR_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_WEAR_ZORA_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_MAGIC_LV1_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_DUNGEON_EXIT_2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WALLET_LV1_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WALLET_LV2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_WALLET_LV3_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_55_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_56_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_57_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_58_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_59_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_60_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ZORAS_JEWEL_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_HAWK_EYE_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_WOOD_STICK_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BOOMERANG_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_SPINNER_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_IRONBALL_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_BOW_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_HOOKSHOT_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_HVY_BOOTS_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_COPY_ROD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_W_HOOKSHOT_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_KANTERA_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_LIGHT_SWORD_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_FISHING_ROD_1_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_PACHINKO_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_COPY_ROD_2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_77_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_78_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BOMB_BAG_LV2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_BOMB_BAG_LV1_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_BOMB_IN_BAG_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_82_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LIGHT_ARROW_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ARROW_LV1_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ARROW_LV2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_ARROW_LV3_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_87_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LURE_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BOMB_ARROW_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_HAWK_ARROW_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BEE_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_JEWEL_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WORM_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_JEWEL_BEE_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_JEWEL_WORM_ROD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_EMPTY_BOTTLE_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_RED_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_GREEN_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BLUE_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_MILK_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_HALF_MILK_BOTTLE_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_OIL_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WATER_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_OIL_BOTTLE_2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_RED_BOTTLE_2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_UGLY_SOUP_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_HOT_SPRING_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_FAIRY_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_HOT_SPRING_2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_OIL2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_OIL_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NORMAL_BOMB_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WATER_BOMB_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_POKE_BOMB_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_FAIRY_DROP_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_WORM_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_DROP_BOTTLE_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_BEE_CHILD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_RARE_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_CHUCHU_RED_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_BLUE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_GREEN_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_YELLOW_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_PURPLE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LV1_SOUP_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LV2_SOUP_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LV3_SOUP_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LETTER_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_BILL_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_WOOD_STATUE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_IRIAS_PENDANT_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_HORSE_FLUTE_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_133_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_134_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_135_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_136_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_137_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_138_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_139_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_140_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_141_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_142_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_143_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_RAFRELS_MEMO_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ASHS_SCRIBBLING_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_146_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_147_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_148_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_149_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_150_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_151_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_152_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_153_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_154_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_155_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_YELLOW2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_OIL_BOTTLE3_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_SHOP_BEE_CHILD_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_CHUCHU_BLACK_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LIGHT_DROP_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_DROP_CONTAINER_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_DROP_CONTAINER02_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_DROP_CONTAINER03_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_FILLED_CONTAINER_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_MIRROR_PIECE_2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_MIRROR_PIECE_3_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_MIRROR_PIECE_4_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_168_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_169_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_170_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_171_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_172_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_173_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_174_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_175_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_SMELL_YELIA_POUCH_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_SMELL_PUMPKIN_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_SMELL_POH_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_SMELL_FISH_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_SMELL_CHILDREN_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_SMELL_MEDICINE_e */ SETYPE_ITEM_GET_SMELL,
|
||||
/* dItemNo_Randomizer_NOENTRY_182_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_183_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_184_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_185_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_186_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_187_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_188_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_189_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_190_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_NOENTRY_191_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_M_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_BUTTERFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_BUTTERFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_STAG_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_STAG_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_GRASSHOPPER_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_GRASSHOPPER_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_NANAFUSHI_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_NANAFUSHI_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_DANGOMUSHI_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_DANGOMUSHI_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_MANTIS_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_MANTIS_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_LADYBUG_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_LADYBUG_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_SNAIL_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_SNAIL_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_DRAGONFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_DRAGONFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_ANT_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_ANT_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_M_MAYFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_F_MAYFLY_e */ SETYPE_ITEM_GET_INSECT,
|
||||
/* dItemNo_Randomizer_NOENTRY_216_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_217_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_218_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_219_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_220_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_221_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_222_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_223_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_POU_SPIRIT_e */ SETYPE_ITEM_GET_POU,
|
||||
/* dItemNo_Randomizer_NOENTRY_225_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_226_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_227_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_228_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_229_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_230_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_231_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_NOENTRY_232_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_ANCIENT_DOCUMENT_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_AIR_LETTER_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_ANCIENT_DOCUMENT2_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_LV7_DUNGEON_EXIT_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LINKS_SAVINGS_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_SMALL_KEY2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_POU_FIRE1_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_POU_FIRE2_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_POU_FIRE3_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_POU_FIRE4_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_BOSSRIDER_KEY_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_TOMATO_PUREE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_TASTE_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_LV5_BOSS_KEY_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_SURFBOARD_e */ SETYPE_NONE,
|
||||
/* dItemNo_Randomizer_KANTERA2_e */ SETYPE_ITEM_GET_ME,
|
||||
/* dItemNo_Randomizer_L2_KEY_PIECES1_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_L2_KEY_PIECES2_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_L2_KEY_PIECES3_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_KEY_OF_CARAVAN_e */ SETYPE_ITEM_GET_MINI,
|
||||
/* dItemNo_Randomizer_LV2_BOSS_KEY_e */ SETYPE_ITEM_GET,
|
||||
/* dItemNo_Randomizer_KEY_OF_FILONE_e */ SETYPE_ITEM_GET_MINI,
|
||||
};
|
||||
#endif
|
||||
|
||||
static u32 const bgmLabel[8] = {
|
||||
Z2BGM_HEART_GET, Z2BGM_ITEM_GET, Z2BGM_ITEM_GET_MINI, Z2BGM_ITEM_GET_ME,
|
||||
Z2BGM_ITEM_GET_INSECT, Z2BGM_ITEM_GET_SMELL, Z2BGM_ITEM_GET_POU, Z2BGM_ITEM_GET_ME_S,
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
u32 se_type = randomizer_IsActive() ? getSeTypeRandomizer[i_itemNo] : getSeType[i_itemNo];
|
||||
#else
|
||||
u32 se_type = getSeType[i_itemNo];
|
||||
#endif
|
||||
|
||||
if (se_type == SETYPE_ITEM_GET_ME && mProcVar4.field_0x3010 == 0) {
|
||||
se_type = SETYPE_ITEM_GET_ME_S;
|
||||
}
|
||||
|
||||
if (se_type != SETYPE_NONE) {
|
||||
if (se_type != SETYPE_NONE IF_DUSK(|| i_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e)) {
|
||||
mDoAud_subBgmStart(bgmLabel[se_type]);
|
||||
dComIfGp_setMesgBgmOn();
|
||||
}
|
||||
@@ -2265,6 +2542,15 @@ int daAlink_c::procCoGetItemInit() {
|
||||
s16 var_r22 = 0;
|
||||
BOOL var_r31 = FALSE;
|
||||
BOOL var_r30 = FALSE;
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
// If we are giving a custom item, we want to set mParam0 to 0x100 so that instead of trying to search for an item
|
||||
// actor that doesnt exist we want the game to create one using the item id in mGtItm.
|
||||
if (g_randomizerState.getGiveItemToPlayerStatus() == RandomizerState::ITEM_IN_QUEUE) {
|
||||
mDemo.setParam0(0x100);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (mProcID == PROC_GET_ITEM || mProcID == PROC_INSECT_CATCH ||
|
||||
(mProcID == PROC_PREACTION_UNEQUIP && !checkNoUpperAnime()))
|
||||
{
|
||||
@@ -2302,6 +2588,11 @@ int daAlink_c::procCoGetItemInit() {
|
||||
} else {
|
||||
item_no = dComIfGp_event_getGtItm();
|
||||
}
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive() && g_randomizerState.getGiveItemToPlayerStatus() == RandomizerState::ITEM_IN_QUEUE) {
|
||||
g_randomizerState.setGiveItemToPlayerStatus(RandomizerState::CLEAR_QUEUE);
|
||||
}
|
||||
#endif
|
||||
|
||||
fpc_ProcID item_partner_id = fopAcM_createItemForPresentDemo(¤t.pos, item_no, 0, -1,
|
||||
fopAcM_GetRoomNo(this), NULL, NULL);
|
||||
@@ -2529,8 +2820,10 @@ int daAlink_c::procCoGetItem() {
|
||||
} else if (mProcVar2.field_0x300c == 0x23 && checkStageName("D_MN11")) {
|
||||
field_0x32cc = 0x5C0;
|
||||
} else if (mProcVar2.field_0x300c == 0xE0) {
|
||||
if (dComIfGs_getPohSpiritNum() == 20) {
|
||||
// Don't show special text in rando
|
||||
if (dComIfGs_getPohSpiritNum() == 20 IF_DUSK(&& !randomizer_IsActive())) {
|
||||
field_0x32cc = 0x4CF;
|
||||
// Rando gives poe soul after the text, so it'll never hit this
|
||||
} else if (dComIfGs_getPohSpiritNum() == 60) {
|
||||
field_0x32cc = 0x4D0;
|
||||
} else {
|
||||
@@ -3011,6 +3304,15 @@ int daAlink_c::procCoDeadInit(int param_0) {
|
||||
field_0x3080 = 0;
|
||||
mProcVar5.field_0x3012 = 0x3F;
|
||||
field_0x3198 = -1;
|
||||
|
||||
#if TARGET_PC
|
||||
// trigger archipelago death link if applicable
|
||||
if (dusk::archi::ArchipelagoContext::IsConnected()) {
|
||||
dusk::archi::ArchipelagoContext::TryHandleDeathLink();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4020,6 +4322,10 @@ int daAlink_c::procGanonFinishInit() {
|
||||
dusk::m_speedrunInfo.stopRun();
|
||||
}
|
||||
}
|
||||
|
||||
if (dusk::archi::ArchipelagoContext::IsConnected()) {
|
||||
dusk::archi::ArchipelagoContext::TryHandleGameComplete();
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
@@ -4554,6 +4860,13 @@ int daAlink_c::procCoWarpInit(int param_0, int param_1) {
|
||||
(checkItemGet(dItemNo_DUNGEON_BACK_e, 1) &&
|
||||
strcmp(stageName, dComIfGs_getWarpStageName()) == 0))
|
||||
{
|
||||
#if TARGET_PC
|
||||
// In rando, only clear the Ooccoo slot if Ooccoo is in it
|
||||
u8 ooccooSlot = dComIfGs_getItem(SLOT_18, false);
|
||||
if (!randomizer_IsActive() || ooccooSlot == dItemNo_Randomizer_DUNGEON_EXIT_e ||
|
||||
ooccooSlot == dItemNo_Randomizer_DUNGEON_EXIT_2_e ||
|
||||
ooccooSlot == dItemNo_Randomizer_LV7_DUNGEON_EXIT_e)
|
||||
#endif
|
||||
dComIfGs_setItem(SLOT_18, dItemNo_NONE_e);
|
||||
dComIfGs_resetLastWarpAcceptStage();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "d/d_meter2.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
|
||||
void daAlink_c::handleWolfHowl() {
|
||||
if (checkWolf()) {
|
||||
@@ -72,11 +71,6 @@ void daAlink_c::handleQuickTransform() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dusk::tphd::is_los_active() && !dusk::getSettings().game.canTransformAnywhere) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// Check to see if Link has the ability to transform.
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077)) {
|
||||
return;
|
||||
|
||||
@@ -1191,6 +1191,19 @@ void daAlink_c::setLightningSwordEffect() {
|
||||
emitter = setEmitter(&field_0x327c[i], effName[i], ¤t.pos, &shape_angle);
|
||||
if (emitter != NULL) {
|
||||
emitter->setGlobalRTMatrix(mSwordModel->getBaseTRMtx());
|
||||
#if TARGET_PC
|
||||
// Apply custom light sword glow if applicable
|
||||
const auto& lightSwordGlowColor = dusk::getSettings().cosmetics.lightSwordGlowColor.getValue();
|
||||
if (dusk::cosmetics::is_valid_hex_color_str(lightSwordGlowColor)) {
|
||||
GXColor color = dusk::cosmetics::hex_color_str_to_gx_color(lightSwordGlowColor);
|
||||
emitter->setGlobalEnvColor(color.r, color.g, color.b);
|
||||
emitter->setGlobalPrmColor(color.r, color.g, color.b);
|
||||
} else if (lightSwordGlowColor == "Rainbow") {
|
||||
GXColor color = dusk::cosmetics::get_rainbow_rgb(127.5f);
|
||||
emitter->setGlobalEnvColor(color.r, color.g, color.b);
|
||||
emitter->setGlobalPrmColor(color.r, color.g, color.b);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -452,8 +452,4 @@ daAlink_c::daAlink_c()
|
||||
mFaceBtkHeap(0x400),
|
||||
mFaceBckHeap(0xC00),
|
||||
mAnmHeap9(0x800)
|
||||
{
|
||||
#if TARGET_PC
|
||||
mLosStickValue = -1.0f;
|
||||
#endif
|
||||
}
|
||||
{}
|
||||
|
||||
@@ -85,17 +85,6 @@ int daAlink_c::loadModelDVD() {
|
||||
}
|
||||
cPhs_Reset(&mPhaseReq);
|
||||
mpArcHeap->freeAll();
|
||||
#if TARGET_PC
|
||||
field_0x06d0 = NULL;
|
||||
field_0x06d4 = NULL;
|
||||
field_0x06d8 = NULL;
|
||||
field_0x06dc = NULL;
|
||||
field_0x06e0 = NULL;
|
||||
field_0x06e4 = NULL;
|
||||
field_0x06e8 = NULL;
|
||||
field_0x06ec = NULL;
|
||||
field_0x06f0 = NULL;
|
||||
#endif
|
||||
|
||||
if (mProcID == PROC_METAMORPHOSE || mProcID == PROC_METAMORPHOSE_ONLY) {
|
||||
setArcName(!checkWolf());
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
#include "c/c_damagereaction.h"
|
||||
#include <cmath>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#endif
|
||||
|
||||
enum B_bq_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x07 */ BCK_BQ_APPEAR = 0x7,
|
||||
@@ -896,6 +900,11 @@ static void b_bq_end(b_bq_class* i_this) {
|
||||
i_this->mMode = 1;
|
||||
|
||||
int sw = fopAcM_GetParam(a_this) >> 0x18;
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
checkTransformFromWolf(); // If the player is wolf, they will softlock after the defeat cutscene is completed.
|
||||
}
|
||||
#endif
|
||||
dComIfGs_onSwitch(sw, fopAcM_GetRoomNo(a_this));
|
||||
// fallthrough
|
||||
}
|
||||
|
||||
@@ -4084,6 +4084,15 @@ void daB_DS_c::executeBattle2Dead() {
|
||||
camera->mCamera.SetTrimSize(0);
|
||||
dComIfGp_event_reset();
|
||||
dComIfGs_onStageBossEnemy(0x13);
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
// Give the boss item
|
||||
u8 agDungeonReward = randomizer_getItemAtLocation("Arbiters Grounds Dungeon Reward");
|
||||
g_randomizerState.addItemToEventQueue(agDungeonReward);
|
||||
// Set custom item flag
|
||||
dComIfGs_onItem(0x9E, -1);
|
||||
}
|
||||
#endif
|
||||
/* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
|
||||
dComIfGs_onEventBit(0x2010);
|
||||
fopAcM_delete(this);
|
||||
|
||||
+2
-62
@@ -13,7 +13,6 @@
|
||||
#include "d/d_bg_parts.h"
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h"
|
||||
@@ -298,25 +297,6 @@ int daBg_c::draw() {
|
||||
dComIfGd_setListBG();
|
||||
mDoLib_clipper::changeFar(1000000.0f);
|
||||
|
||||
#if TARGET_PC
|
||||
bool losClip = false;
|
||||
Mtx losBgMtx;
|
||||
if (dusk::tphd_active()) {
|
||||
// TPHD Cave of Shadows rooms have a base matrix far from identity; it gets the room translation from 'los.bin'
|
||||
// HD daBg::draw clips the shape bbox in world space, so recompute the room base matrix to transform it.
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_SB11") == 0) {
|
||||
f32 hx, hy, hz;
|
||||
s16 ha;
|
||||
if (dusk::tphd::los_get_room_trans(roomNo, &hx, &hy, &hz, &ha)) {
|
||||
mDoMtx_stack_c::transS(hx, hy, hz);
|
||||
mDoMtx_stack_c::YrotM(ha);
|
||||
mDoMtx_copy(mDoMtx_stack_c::get(), losBgMtx);
|
||||
losClip = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
J3DModelData* modelData;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
sp8 = 0;
|
||||
@@ -345,22 +325,8 @@ int daBg_c::draw() {
|
||||
for (u16 j = 0; j < modelData->getShapeNum(); j++) {
|
||||
J3DShape* shape = modelData->getShapeNodePointer(j);
|
||||
|
||||
Vec* clipMin = (Vec*)shape->getMin();
|
||||
Vec* clipMax = (Vec*)shape->getMax();
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active()) {
|
||||
Vec losClipMin, losClipMax;
|
||||
if (losClip) {
|
||||
// HD transforms the bbox min/max by the room base matrix; clip rebuilds
|
||||
// the 8 corners (exact for the room angles, which are multiples of 90).
|
||||
mDoMtx_multVec(losBgMtx, clipMin, &losClipMin);
|
||||
mDoMtx_multVec(losBgMtx, clipMax, &losClipMax);
|
||||
clipMin = &losClipMin;
|
||||
clipMax = &losClipMax;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (mDoLib_clipper::clip(j3dSys.getViewMtx(), clipMin, clipMax)) {
|
||||
if (mDoLib_clipper::clip(j3dSys.getViewMtx(), (Vec*)shape->getMin(),
|
||||
(Vec*)shape->getMax())) {
|
||||
shape->hide();
|
||||
} else {
|
||||
shape->show();
|
||||
@@ -599,43 +565,17 @@ int daBg_c::create() {
|
||||
}
|
||||
|
||||
J3DModelData* modelData;
|
||||
#if TARGET_PC
|
||||
f32 transX = 0.0f;
|
||||
f32 transY = 0.0f;
|
||||
f32 transVert = 0.0f;
|
||||
s16 angle = 0;
|
||||
bool foundMapTrans = false;
|
||||
|
||||
if (dusk::tphd_active()) {
|
||||
// TPHD positions Cave of Shadows rooms via los.bin (per-room world X/Y/Z +
|
||||
// Y-rotation, incl. the vertical Y that GC's MULT lacks). Retail gates
|
||||
// this on g_dComIfG_gameInfo.field_0x1e448; los.bin only carries
|
||||
// D_SB11's room data, so restrict it to that stage and fall back to MULT.
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_SB11") == 0) {
|
||||
foundMapTrans = dusk::tphd::los_get_room_trans(roomNo, &transX, &transVert, &transY, &angle);
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundMapTrans)
|
||||
foundMapTrans = dComIfGp_getMapTrans(roomNo, &transX, &transY, &angle);
|
||||
if (foundMapTrans) {
|
||||
#else
|
||||
f32 transX;
|
||||
f32 transY;
|
||||
s16 angle;
|
||||
if (dComIfGp_getMapTrans(roomNo, &transX, &transY, &angle)) {
|
||||
#endif
|
||||
daBg_Part* bgPart = mBgParts;
|
||||
J3DModel* model;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
model = bgPart->model;
|
||||
|
||||
if (model != NULL) {
|
||||
#if TARGET_PC
|
||||
mDoMtx_stack_c::transS(transX, transVert, transY);
|
||||
#else
|
||||
mDoMtx_stack_c::transS(transX, 0.0f, transY);
|
||||
#endif
|
||||
mDoMtx_stack_c::YrotM(angle);
|
||||
model->setBaseTRMtx(mDoMtx_stack_c::get());
|
||||
|
||||
|
||||
@@ -144,11 +144,7 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
|
||||
default:
|
||||
// Invalid data block type
|
||||
OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type);
|
||||
#if DUSK_TPHD
|
||||
return 0; // HD-port: skip actor instead of asserting.
|
||||
#else
|
||||
JUT_ASSERT(527, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (block_type == 0) {
|
||||
@@ -189,11 +185,7 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
|
||||
default:
|
||||
// Invalid data block type
|
||||
OS_REPORT_ERROR("データブロックタイプが不正です<%d>\n", block_type);
|
||||
#if DUSK_TPHD
|
||||
return 0;
|
||||
#else
|
||||
JUT_ASSERT(570, FALSE);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (block_type == 0) {
|
||||
@@ -234,12 +226,8 @@ bool daBgObj_c::spec_data_c::Set(void* i_ptr) {
|
||||
default:
|
||||
// "Data Block type invalid<%d>\n"
|
||||
OSReport_Error("データブロックタイプが不正です<%d>\n", block_type);
|
||||
#if DUSK_TPHD
|
||||
return 0;
|
||||
#else
|
||||
JUT_ASSERT(619, FALSE);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (block_type == 0) {
|
||||
|
||||
@@ -530,6 +530,33 @@ int daDitem_c::execute() {
|
||||
}
|
||||
|
||||
mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
|
||||
#if TARGET_PC
|
||||
// Certain items use field models that are too big to fit in link's hands so we want to scale them down to fit.
|
||||
if (randomizer_IsActive()) {
|
||||
switch (m_itemNo)
|
||||
{
|
||||
case dItemNo_Randomizer_MIRROR_PIECE_1_e:
|
||||
case dItemNo_Randomizer_MIRROR_PIECE_2_e:
|
||||
case dItemNo_Randomizer_MIRROR_PIECE_3_e:
|
||||
case dItemNo_Randomizer_MIRROR_PIECE_4_e:
|
||||
{
|
||||
scale.x = 0.05f;
|
||||
break;
|
||||
}
|
||||
case dItemNo_Randomizer_MASTER_SWORD_e:
|
||||
case dItemNo_Randomizer_LIGHT_SWORD_e:
|
||||
{
|
||||
scale.x = 0.001f;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/d_door_param2.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#if TARGET_PC
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#endif
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_map_path_dmap.h"
|
||||
@@ -313,7 +316,17 @@ int daDoor20_c::checkOpenMsgDoor(int* param_1) {
|
||||
return 1;
|
||||
}
|
||||
field_0x624.init(NULL, msgNo, 0, NULL);
|
||||
#if TARGET_PC
|
||||
int rv = 1;
|
||||
|
||||
// If we are in SPR, we don't want Yeta's msg flow to prevent us from opening the door if we haven't talked to her.
|
||||
if (randomizer_IsActive() && !daAlink_c::checkStageName("D_MN11"))
|
||||
{
|
||||
rv = field_0x624.checkOpenDoor(this, param_1);
|
||||
}
|
||||
#else
|
||||
int rv = field_0x624.checkOpenDoor(this, param_1);
|
||||
#endif
|
||||
dMsgObject_endFlowGroup();
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -403,10 +403,7 @@ void e_ai_class::e_ai_damage() {
|
||||
if (m_timers[1] == 0) {
|
||||
m_sound.startCreatureSound(Z2SE_EN_AI_FLASH, 0, -1);
|
||||
mpEmitter = dComIfGp_particle_set(0x81ED, ¤t.pos, &tevStr, &shape_angle, NULL);
|
||||
if (mpEmitter != NULL) {
|
||||
mpEmitter->becomeImmortalEmitter();
|
||||
}
|
||||
|
||||
mpEmitter->becomeImmortalEmitter();
|
||||
m_timers[1] = 1000;
|
||||
m_timers[2] = 56;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
#include "f_op/f_op_actor_enemy.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
class daE_HP_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daE_HP_HIO_c();
|
||||
@@ -726,11 +731,16 @@ void daE_HP_c::executeDead() {
|
||||
fopAcM_onSwitch(this, bitSw);
|
||||
}
|
||||
|
||||
dComIfGs_addPohSpiritNum();
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
g_randomizerState.handlePoeItem(bitSw);
|
||||
} else
|
||||
#endif
|
||||
dComIfGs_addPohSpiritNum();
|
||||
|
||||
field_0x784 = -1;
|
||||
|
||||
if (dComIfGs_getPohSpiritNum() == 20) {
|
||||
if (dComIfGs_getPohSpiritNum() == 20 IF_DUSK(&& !randomizer_IsActive())) {
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1c9]);
|
||||
}
|
||||
|
||||
@@ -752,7 +762,7 @@ void daE_HP_c::executeDead() {
|
||||
field_0x788 = 1;
|
||||
}
|
||||
}
|
||||
} else if (field_0x788 != 0) {
|
||||
} else if (field_0x788 != 0 IF_DUSK(|| randomizer_IsActive())) {
|
||||
fopAcM_createDisappear(this, ¤t.pos, 8, 3, 0xff);
|
||||
fopAcM_delete(this);
|
||||
} else {
|
||||
|
||||
@@ -396,7 +396,10 @@ inline int daE_MD_c::create() {
|
||||
int phase_state = dComIfG_resLoad(&mPhase, "E_MD");
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
OS_REPORT("E_MD PARAM %x\n", fopAcM_GetParam(this));
|
||||
if (cDmr_SkipInfo != 0 && current.pos.z > -1500.0f) {
|
||||
|
||||
// Always create the armor in rando (otherwise ball and chain won't spawn
|
||||
// if the player leaves and re-enters without getting it)
|
||||
if (cDmr_SkipInfo != 0 && current.pos.z > -1500.0f IF_DUSK(&& !randomizer_IsActive())) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#endif
|
||||
|
||||
class daE_MK_HIO_c : public JORReflexible {
|
||||
public:
|
||||
virtual ~daE_MK_HIO_c() {}
|
||||
@@ -1726,6 +1730,11 @@ static void demo_camera_end(e_mk_class* i_this) {
|
||||
work.z = AREG_F(2) + -20.0f;
|
||||
MtxPosition(&work, &pos);
|
||||
pos += i_this->crownPos;
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
checkTransformFromWolf(); // If the player is wolf, they will void and lose the boomerang check.
|
||||
}
|
||||
#endif
|
||||
fopAcM_createDisappear(actor, &pos, 5, 0, 0xff);
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#endif
|
||||
|
||||
static s16 mAttackNo = 3;
|
||||
|
||||
@@ -1132,11 +1136,17 @@ static void e_po_dead(e_po_class* i_this) {
|
||||
camera_player->mCamera.Start();
|
||||
camera_player->mCamera.SetTrimSize(0);
|
||||
dComIfGp_event_reset();
|
||||
dComIfGs_addPohSpiritNum();
|
||||
#if TARGET_PC
|
||||
if (!randomizer_IsActive()) {
|
||||
#endif
|
||||
dComIfGs_addPohSpiritNum();
|
||||
#if !PLATFORM_SHIELD
|
||||
if (dComIfGs_getPohSpiritNum() == 0x14) {
|
||||
/* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]);
|
||||
if (dComIfGs_getPohSpiritNum() == 0x14) {
|
||||
/* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]);
|
||||
}
|
||||
#endif
|
||||
#if TARGET_PC
|
||||
}
|
||||
#endif
|
||||
daPy_getPlayerActorClass()->cancelOriginalDemo();
|
||||
@@ -1265,6 +1275,14 @@ static void e_po_dead(e_po_class* i_this) {
|
||||
}
|
||||
} else {
|
||||
if (i_this->field_0x75C == -1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
u16 key = getStageID() << 8 | i_this->BitSW;
|
||||
u8 itemId = randomizer_GetContext().mPoeOverrides[key];
|
||||
i_this->field_0x75C = fopAcM_createItemForPresentDemo(&a_this->current.pos, itemId, 0,
|
||||
-1, -1, NULL, NULL);
|
||||
} else
|
||||
#endif
|
||||
i_this->field_0x75C = fopAcM_createItemForPresentDemo(&a_this->current.pos, 0xE0, 0,
|
||||
-1, -1, NULL, NULL);
|
||||
}
|
||||
|
||||
@@ -204,7 +204,11 @@ static void e_rb_move(e_rb_class* i_this) {
|
||||
spC.x = i_this->field_0xa10.x - enemy->current.pos.x;
|
||||
spC.z = i_this->field_0xa10.z - enemy->current.pos.z;
|
||||
|
||||
#if AVOID_UB
|
||||
f32 speed_target{};
|
||||
#else
|
||||
f32 speed_target;
|
||||
#endif
|
||||
switch (i_this->mode) {
|
||||
case 0:
|
||||
i_this->mode = 1;
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
class daE_RDB_HIO_c : public JORReflexible {
|
||||
public:
|
||||
daE_RDB_HIO_c();
|
||||
@@ -1250,6 +1254,12 @@ static void demo_camera(e_rdb_class* i_this) {
|
||||
}
|
||||
|
||||
if (iVar1 != 0) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Hyrule Castle King Bulblin Key"));
|
||||
daPy_getPlayerActorClass()->changeDemoMode(11, itemId, 0, 0);
|
||||
} else // do the next line
|
||||
#endif
|
||||
daPy_getPlayerActorClass()->changeDemoMode(11, 32, 0, 0);
|
||||
i_this->mDemoMode = 12;
|
||||
i_this->field_0x10aa = 0;
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#if TARGET_PC
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#endif
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_path.h"
|
||||
#include "d/d_s_play.h"
|
||||
@@ -1687,6 +1690,18 @@ static void demo_camera(e_s1_class* i_this) {
|
||||
if (i_this->mDemoTimer == 137) {
|
||||
if (!dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this))) {
|
||||
dComIfGs_onSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this));
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive() && daAlink_c::checkStageName("F_SP126")) {
|
||||
// We check to see if the flag being set is for the UZR portal as a safety precaution.
|
||||
if (i_this->mSwBit == 0x15 && g_dComIfG_gameInfo.info.getSavedata().getPlayer().getPlayerStatusA().getTransformStatus())
|
||||
{
|
||||
// Set the flag to make Iza 1 available and set the memory bit for having talked to her after opening the portal as human.
|
||||
dComIfGs_onEventBit(0xB02);
|
||||
dComIfGs_onSwitch(0x37, fopAcM_GetRoomNo(a_this));
|
||||
}
|
||||
// Note for the above stuff. This works for now. Eventually would like to adjust this to a FLW patch since I think we could accomplish similar results by having the conversation continue as normal regardless of form, but I haven't looked into it that much.
|
||||
}
|
||||
#endif
|
||||
OS_REPORT("S! BITSW %d\n", i_this->mSwBit);
|
||||
OS_REPORT("S! BITSW %d\n", dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this)));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
enum daE_TH_ACTION {
|
||||
ACTION_STOP,
|
||||
ACTION_SPIN,
|
||||
@@ -931,6 +933,12 @@ static void get_demo(e_th_ball_class* i_this) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Snowpeak Ruins Ball and Chain"));
|
||||
demo_id = fopAcM_createItemForTrBoxDemo(&i_this->current.pos, itemId, -1, fopAcM_GetRoomNo(i_this), NULL, NULL);
|
||||
} else
|
||||
#endif
|
||||
demo_id = fopAcM_createItemForTrBoxDemo(&i_this->current.pos, dItemNo_IRONBALL_e, -1, fopAcM_GetRoomNo(i_this), NULL, NULL);
|
||||
JUT_ASSERT(1670, demo_id != fpcM_ERROR_PROCESS_ID_e);
|
||||
i_this->mDemoMode = 2;
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
#include "dusk/tphd/TphdPack.hpp"
|
||||
|
||||
enum E_ww_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x04 */ BCK_WW_APPEAR = 0x4,
|
||||
@@ -469,7 +466,7 @@ f32 daE_WW_c::checkCreateBg(cXyz i_vector) {
|
||||
return -G_CM3D_F_INF;
|
||||
}
|
||||
|
||||
if (dComIfG_Bgsp().GetSpecialCode(gnd_chk) == 5 || dComIfG_Bgsp().GetPolyAtt0(gnd_chk) == 0xD IF_DUSK(|| dusk::tphd::is_los_active())) {
|
||||
if (dComIfG_Bgsp().GetSpecialCode(gnd_chk) == 5 || dComIfG_Bgsp().GetPolyAtt0(gnd_chk) == 0xD) {
|
||||
cXyz temp_r1 = daPy_getPlayerActorClass()->current.pos;
|
||||
temp_r1.y += 100.0f;
|
||||
sp14 = i_vector;
|
||||
@@ -669,14 +666,8 @@ void daE_WW_c::executeMaster() {
|
||||
sp30.set(0.0f, 0.0f, 3000.0f);
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd::is_los_active()) {
|
||||
sp30.z = 600.0f;
|
||||
}
|
||||
#endif
|
||||
|
||||
cLib_offsetPos(&sp3C, &sp48, fopCamM_GetAngleY(camera), &sp30);
|
||||
if ((current.pos.abs(sp3C) < field_0x6a8) IF_DUSK(|| (dusk::tphd::is_los_active() && current.pos.y - sp48.y < field_0x6a8))) {
|
||||
if (current.pos.abs(sp3C) < field_0x6a8) {
|
||||
f32 temp_f31 = checkCreateBg(sp3C);
|
||||
if (-G_CM3D_F_INF != temp_f31) {
|
||||
sp3C.y = temp_f31;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include <cstring>
|
||||
#include <dusk/ui/settings.hpp>
|
||||
|
||||
static int daKytag04_Draw(kytag04_class* i_this) {
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
@@ -261,25 +260,12 @@ static int daKytag04_Create(fopAc_ac_c* i_this) {
|
||||
|
||||
a_this->mNeedDropNum = i_this->current.angle.z & 0xFF;
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active()) {
|
||||
a_this->mNeedDropNum = 12;
|
||||
}
|
||||
#endif
|
||||
|
||||
int phase_state = dComIfG_resLoad(&a_this->mPhase, "Kytag04");
|
||||
if (phase_state == cPhs_COMPLEATE_e) {
|
||||
a_this->field_0x5b4 = (fopAcM_GetParam(i_this) >> 8) & 7;
|
||||
a_this->mStageNo = (i_this->current.angle.z >> 8) & 0xFF;
|
||||
a_this->mExitID = fopAcM_GetParam(i_this) & 0xFF;
|
||||
a_this->mNeedDropNum = i_this->current.angle.z & 0xFF;
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active()) {
|
||||
a_this->mNeedDropNum = 12;
|
||||
}
|
||||
#endif
|
||||
|
||||
a_this->field_0x5b5 = fopAcM_GetParam(i_this) >> 0x10;
|
||||
a_this->field_0x5b6 = fopAcM_GetParam(i_this) >> 0x18;
|
||||
|
||||
|
||||
@@ -88,8 +88,17 @@ static int daKytag08_Execute(kytag08_class* i_this) {
|
||||
}
|
||||
}
|
||||
|
||||
if ((daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) ||
|
||||
dComIfGs_BossLife_public_Get() == 1)
|
||||
#if TARGET_PC
|
||||
bool doFogWipe = false;
|
||||
if (randomizer_IsActive()) {
|
||||
doFogWipe = ((i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1);
|
||||
}else {
|
||||
doFogWipe = (daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1;
|
||||
}
|
||||
if (doFogWipe)
|
||||
#else
|
||||
if ((daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1)
|
||||
#endif
|
||||
{
|
||||
dComIfGs_BossLife_public_Set(0);
|
||||
i_this->mTargetAvoidPos = i_this->current.pos;
|
||||
|
||||
@@ -64,7 +64,6 @@ static dPath* get_Extent_pos_end_get(kytag10_class* i_this, dPath* i_path, cXyz*
|
||||
}
|
||||
|
||||
static void sparks_move(kytag10_class* i_this) {
|
||||
|
||||
camera_process_class* camera_p = dComIfGp_getCamera(0);
|
||||
|
||||
cXyz ratio_pos_1;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <aurora/texture.hpp>
|
||||
#include "dusk/dvd_asset.hpp"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
@@ -40,6 +41,8 @@ static f32* l_texCoord_get() { alignas(32) static f32 buf[338]; static bool _
|
||||
//#define l_pos (l_pos_get())
|
||||
#define l_normal (l_normal_get())
|
||||
#define l_texCoord (l_texCoord_get())
|
||||
|
||||
static bool l_Egnd_mantTEX_hasReplacement = false;
|
||||
#else
|
||||
#include "assets/l_Egnd_mantTEX.h"
|
||||
|
||||
@@ -223,6 +226,7 @@ void daMant_packet_c::draw() {
|
||||
GXInitTexObjCI(
|
||||
&undersideTexObj, l_Egnd_mantTEX_U, 0x80, 0x80, GX_TF_C8, GX_CLAMP, GX_CLAMP, 0, 0);
|
||||
GXInitTexObjLOD(&undersideTexObj, GX_LINEAR, GX_LINEAR, 0.0, 0.0, 0.0, 0, 0, GX_ANISO_1);
|
||||
l_Egnd_mantTEX_hasReplacement = aurora::texture::has_replacement(&mainTexObj, &tlutObj);
|
||||
textureObjsInitialized = true;
|
||||
}
|
||||
#else
|
||||
@@ -636,7 +640,11 @@ static int daMant_Execute(mant_class* i_this) {
|
||||
iVar8 = 0;
|
||||
|
||||
if (i_this->field_0x3967 != 0) {
|
||||
#if TARGET_PC
|
||||
mant_cut_type = l_Egnd_mantTEX_hasReplacement ? 1 : i_this->field_0x3967;
|
||||
#else
|
||||
mant_cut_type = i_this->field_0x3967;
|
||||
#endif
|
||||
|
||||
if (i_this->field_0x3968 < 15) {
|
||||
i_this->field_0x3968++;
|
||||
@@ -648,9 +656,18 @@ static int daMant_Execute(mant_class* i_this) {
|
||||
iVar8 = 20;
|
||||
}
|
||||
|
||||
unaff_r29 = cM_rndF(65536.0f);
|
||||
var_f31 = cM_rndFX(32.0f);
|
||||
var_f30 = cM_rndFX(32.0f);
|
||||
#if TARGET_PC
|
||||
if (l_Egnd_mantTEX_hasReplacement) {
|
||||
unaff_r29 = i_this->mMantRng.getF(65536.0f);
|
||||
var_f31 = i_this->mMantRng.getFX(32.0f);
|
||||
var_f30 = i_this->mMantRng.getFX(32.0f);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
unaff_r29 = cM_rndF(65536.0f);
|
||||
var_f31 = cM_rndFX(32.0f);
|
||||
var_f30 = cM_rndFX(32.0f);
|
||||
}
|
||||
}
|
||||
|
||||
i_this->field_0x3967 = 0;
|
||||
@@ -760,6 +777,8 @@ static int daMant_Create(fopAc_ac_c* i_this) {
|
||||
if(textureObjsInitialized) {
|
||||
GXInitTlutObjData(&tlutObj, l_Egnd_mantPAL); // make sure the cached textures are updated
|
||||
}
|
||||
|
||||
m_this->mMantRng.init(66, 16983, 855);
|
||||
#endif
|
||||
|
||||
lbl_277_bss_0 = 0;
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#endif
|
||||
|
||||
class dmg_rod_HIO_c : public JORReflexible {
|
||||
@@ -2955,6 +2956,10 @@ static void lure_heart(dmg_rod_class* i_this) {
|
||||
if (obj_life != NULL) {
|
||||
fopAcM_delete(obj_life);
|
||||
fopAcM_onItem(obj_life, 0x80);
|
||||
#if TARGET_PC
|
||||
// Don't give the item here in rando. We give it later when the FLW message happens
|
||||
if (!randomizer_IsActive())
|
||||
#endif
|
||||
execItemGet(dItemNo_KAKERA_HEART_e);
|
||||
u8 eventReg = dComIfGs_getEventReg(0xECFF);
|
||||
eventReg |= (u8)0x40;
|
||||
@@ -4090,6 +4095,10 @@ static void uki_catch(dmg_rod_class* i_this) {
|
||||
} else if (mgfish->mCaughtType == MG_CATCH_BIN) {
|
||||
i_this->msgflow.init(actor, 0x139A, 0, NULL);
|
||||
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[468]);
|
||||
#if TARGET_PC
|
||||
// Don't give the item here in rando. We give it later in the FLW Message
|
||||
if (!randomizer_IsActive())
|
||||
#endif
|
||||
dComIfGs_setEmptyBottle();
|
||||
} else if (mgfish->mCaughtType == MG_CATCH_KN) {
|
||||
i_this->msgflow.init(actor, 0x139C, 0, NULL);
|
||||
@@ -4356,7 +4365,8 @@ static void uki_main(dmg_rod_class* i_this) {
|
||||
}
|
||||
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[468])) {
|
||||
if (cM_rndF(1.0f) <= 0.5f) {
|
||||
// Always succeed the rng check in rando for fishing bottle
|
||||
if (cM_rndF(1.0f) <= 0.5f IF_DUSK(|| randomizer_IsActive())) {
|
||||
cXyz bin_pos(6800.0f, 30.0f, -270.0f);
|
||||
bin_pos -= player->current.pos;
|
||||
|
||||
|
||||
@@ -5,17 +5,16 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "JSystem/J3DGraphLoader/J3DAnmLoader.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/actor/d_a_kago.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_demo.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/tphd/LosTable.hpp"
|
||||
|
||||
static f32 dummy_lit_3777(int idx, u8 foo) {
|
||||
Vec dummy_vec = {0.0f, 0.0f, 0.0f};
|
||||
@@ -3309,14 +3308,7 @@ int daMidna_c::execute() {
|
||||
}
|
||||
}
|
||||
onStateFlg0(FLG0_UNK_8000);
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd::is_los_active() && !dusk::getSettings().game.canTransformAnywhere) {
|
||||
mMsgFlow.init(this, 0x457, 0, NULL);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
mMsgFlow.init(this, 0xbb9, 0, NULL);
|
||||
}
|
||||
mMsgFlow.init(this, 0xbb9, 0, NULL);
|
||||
} else if (mMsgFlow.doFlow(this, NULL, 0)) {
|
||||
int item_id;
|
||||
u16 event_id = mMsgFlow.getEventId(&item_id);
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#include <cstring>
|
||||
#endif
|
||||
|
||||
#ifndef __MWERKS__
|
||||
@@ -52,32 +50,6 @@ void dMirror_packet_c::calcMinMax() {
|
||||
mMinVal.set(FLT_MAX, FLT_MAX, FLT_MAX);
|
||||
mMaxVal.set(-FLT_MAX, -FLT_MAX, -FLT_MAX);
|
||||
|
||||
#if TARGET_PC
|
||||
// HD: per-quad cull box + global bbox over all mQuadCount quads.
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
cXyz& bmin = mQuadBoxMin[q];
|
||||
cXyz& bmax = mQuadBoxMax[q];
|
||||
bmin.set(FLT_MAX, FLT_MAX, FLT_MAX);
|
||||
bmax.set(-FLT_MAX, -FLT_MAX, -FLT_MAX);
|
||||
|
||||
cXyz* quad = &mQuad[q * 4];
|
||||
for (int i = 0; i < 4; i++, quad++) {
|
||||
if (quad->x < bmin.x) bmin.x = quad->x;
|
||||
if (quad->x > bmax.x) bmax.x = quad->x;
|
||||
if (quad->y < bmin.y) bmin.y = quad->y;
|
||||
if (quad->y > bmax.y) bmax.y = quad->y;
|
||||
if (quad->z < bmin.z) bmin.z = quad->z;
|
||||
if (quad->z > bmax.z) bmax.z = quad->z;
|
||||
}
|
||||
|
||||
if (bmin.x < mMinVal.x) mMinVal.x = bmin.x;
|
||||
if (bmax.x > mMaxVal.x) mMaxVal.x = bmax.x;
|
||||
if (bmin.y < mMinVal.y) mMinVal.y = bmin.y;
|
||||
if (bmax.y > mMaxVal.y) mMaxVal.y = bmax.y;
|
||||
if (bmin.z < mMinVal.z) mMinVal.z = bmin.z;
|
||||
if (bmax.z > mMaxVal.z) mMaxVal.z = bmax.z;
|
||||
}
|
||||
#else
|
||||
cXyz* quad = mQuad;
|
||||
for (int i = 0; i < 4; i++, quad++) {
|
||||
f32 val = quad->x;
|
||||
@@ -110,7 +82,6 @@ void dMirror_packet_c::calcMinMax() {
|
||||
mMaxVal.z = val;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int dMirror_packet_c::entryModel(J3DModel* i_model) {
|
||||
@@ -132,10 +103,6 @@ int dMirror_packet_c::entryModel(J3DModel* i_model) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
static f32 dMirror_quadDist(const cXyz& p, const cXyz& bmin, const cXyz& bmax);
|
||||
#endif
|
||||
|
||||
void dMirror_packet_c::mirrorZdraw(f32* param_0, f32* param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
|
||||
ZoneScoped;
|
||||
@@ -164,82 +131,11 @@ void dMirror_packet_c::mirrorZdraw(f32* param_0, f32* param_1, f32 param_2, f32
|
||||
GXLoadPosMtxImm(j3dSys.getViewMtx(), 0);
|
||||
GXSetCurrentMtx(0);
|
||||
|
||||
#if TARGET_PC
|
||||
// HD FUN_0247d9fc: with count>=2, tint only the same-height quad group nearest the camera
|
||||
u32 groupMask = 1;
|
||||
int groupCount = 1;
|
||||
if (mQuadCount >= 2) {
|
||||
const cXyz& eye = dComIfGd_getView()->lookat.eye;
|
||||
int nearest = 0;
|
||||
f32 best = FLT_MAX;
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
f32 dist = dMirror_quadDist(eye, mQuadBoxMin[q], mQuadBoxMax[q]);
|
||||
if (dist < best) {
|
||||
best = dist;
|
||||
nearest = q;
|
||||
}
|
||||
}
|
||||
groupMask = 0;
|
||||
groupCount = 0;
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
if (fabsf(mQuadBoxMin[q].y - mQuadBoxMin[nearest].y) < 0.0001f) {
|
||||
groupMask |= 1u << q;
|
||||
groupCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, groupCount * 4);
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
if (groupMask & (1u << q)) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GXPosition3f32(mQuad[q * 4 + i].x, mQuad[q * 4 + i].y, mQuad[q * 4 + i].z);
|
||||
}
|
||||
}
|
||||
}
|
||||
GXEnd();
|
||||
|
||||
if (mQuadCount >= 2 && GX2SupportsStencil()) {
|
||||
GXSetColorUpdate(GX_DISABLE);
|
||||
GXSetAlphaUpdate(GX_DISABLE);
|
||||
GXSetBlendMode(GX_BM_NONE, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR);
|
||||
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0);
|
||||
GX2SetStencilMask(0xff, 0xff, 0, 0xff, 0xff, 0);
|
||||
GX2SetDepthStencilControl(0, 0, 7, 1, 0, 7, 3, 3, 0, 0, 0, 0, 0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, groupCount * 4);
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
if (groupMask & (1u << q)) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GXPosition3f32(mQuad[q * 4 + i].x, mQuad[q * 4 + i].y, mQuad[q * 4 + i].z);
|
||||
}
|
||||
}
|
||||
}
|
||||
GXEnd();
|
||||
|
||||
GX2SetDepthStencilControl(1, 1, 7, 1, 0, 2, 1, 1, 1, 0, 0, 0, 0);
|
||||
Mtx44 proj;
|
||||
C_MTXOrtho(proj, param_1[1], param_1[1] + param_1[3], param_1[0],
|
||||
param_1[0] + param_1[2], 0, 100.0f);
|
||||
GXSetProjection(proj, GX_ORTHOGRAPHIC);
|
||||
GXLoadPosMtxImm(mDoMtx_getIdentity(), 0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(param_1[0], param_1[1], -100.0f);
|
||||
GXPosition3f32(param_1[0] + param_1[2], param_1[1], -100.0f);
|
||||
GXPosition3f32(param_1[0] + param_1[2], param_1[1] + param_1[3], -100.0f);
|
||||
GXPosition3f32(param_1[0], param_1[1] + param_1[3], -100.0f);
|
||||
GXEnd();
|
||||
GXSetProjectionv(param_0);
|
||||
GXSetColorUpdate(GX_ENABLE);
|
||||
GXSetAlphaUpdate(GX_DISABLE); // no stencil-off: the next material's zmode write disables it
|
||||
return;
|
||||
}
|
||||
#else
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
GXPosition3f32(mQuad[i].x, mQuad[i].y, mQuad[i].z);
|
||||
}
|
||||
GXEnd();
|
||||
#endif
|
||||
|
||||
if (mViewScale.y > 0.0f) {
|
||||
GXSetZMode(GX_ENABLE, GX_ALWAYS, GX_ENABLE);
|
||||
@@ -369,223 +265,10 @@ void dMirror_packet_c::modelDraw(J3DModel* i_model, Mtx param_1) {
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// FUN_0247c89c: HD multi-quad floor reflection helpers (F_SP117 room 2):
|
||||
static f32 dMirror_quadDist(const cXyz& p, const cXyz& bmin, const cXyz& bmax) {
|
||||
f32 ox = bmin.x - p.x;
|
||||
if (ox < 0.0f) ox = 0.0f;
|
||||
f32 oz = bmin.z - p.z;
|
||||
if (oz < 0.0f) oz = 0.0f;
|
||||
f32 px = p.x - bmax.x;
|
||||
if (px < 0.0f) px = 0.0f;
|
||||
f32 pz = p.z - bmax.z;
|
||||
if (pz < 0.0f) pz = 0.0f;
|
||||
return fabsf(p.y - bmin.y) + ox + oz + px + pz;
|
||||
}
|
||||
|
||||
static void dMirror_accumQuadBBox(view_class* view, view_port_class* view_port, const u32 scissor[4],
|
||||
cXyz* quad, f32& minX, f32& maxX, f32& minY, f32& maxY, f32& maxZ) {
|
||||
cXyz sp19C[5];
|
||||
int prjPosNum = 4;
|
||||
f32 nearZ = -view->near_;
|
||||
|
||||
int behind = 0;
|
||||
int lastFront = 0;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
cMtx_multVec(view->viewMtx, &quad[i], &sp19C[i]);
|
||||
if (sp19C[i].z >= nearZ) {
|
||||
behind++;
|
||||
} else {
|
||||
lastFront = i;
|
||||
}
|
||||
}
|
||||
if (behind >= 4) {
|
||||
return;
|
||||
}
|
||||
|
||||
int var_r28 = lastFront;
|
||||
if (behind != 0) {
|
||||
int var_r27 = -1;
|
||||
for (int i = 0; i < 4; i++) {
|
||||
int temp_r5 = (var_r28 + 1) % 4;
|
||||
if (var_r27 < 0) {
|
||||
if (sp19C[temp_r5].z >= nearZ) {
|
||||
var_r27 = temp_r5;
|
||||
}
|
||||
} else if (sp19C[temp_r5].z < nearZ) {
|
||||
int temp_r29 = (var_r27 + 3) % 4;
|
||||
cXyz d0 = sp19C[var_r27] - sp19C[temp_r29];
|
||||
d0 *= (nearZ - sp19C[temp_r29].z) / d0.z;
|
||||
sp19C[4] = sp19C[temp_r29] + d0;
|
||||
prjPosNum++;
|
||||
|
||||
cXyz d1 = sp19C[var_r28] - sp19C[temp_r5];
|
||||
d1 *= (nearZ - sp19C[temp_r5].z) / d1.z;
|
||||
sp19C[var_r28] = sp19C[temp_r5] + d1;
|
||||
|
||||
for (int j = var_r27; j != var_r28; j = (j + 1) % 4) {
|
||||
sp19C[j] = sp19C[var_r28];
|
||||
}
|
||||
break;
|
||||
}
|
||||
var_r28 = temp_r5;
|
||||
}
|
||||
}
|
||||
|
||||
f32 aspect = view->aspect;
|
||||
f32 tanHalf = tanf(MTXDegToRad(view->fovy * 0.5f));
|
||||
f32 vx, vy, vw, vh;
|
||||
if (view_port->x_orig != 0.0f) {
|
||||
vx = (((view_port->x_orig * 2.0f) + view_port->width) * 0.5f) - (FB_WIDTH / 2);
|
||||
vw = FB_WIDTH;
|
||||
} else {
|
||||
vx = view_port->x_orig;
|
||||
vw = view_port->width;
|
||||
}
|
||||
if (view_port->y_orig != 0.0f) {
|
||||
vy = (((view_port->y_orig * 2.0f) + view_port->height) * 0.5f) - (FB_HEIGHT / 2);
|
||||
vh = FB_HEIGHT;
|
||||
} else {
|
||||
vy = view_port->y_orig;
|
||||
vh = view_port->height;
|
||||
}
|
||||
|
||||
f32 sxMin = scissor[0];
|
||||
f32 sxMax = sxMin + scissor[2];
|
||||
f32 syMin = scissor[1];
|
||||
f32 syMax = syMin + scissor[3];
|
||||
|
||||
Vec* p = sp19C;
|
||||
for (int i = 0; i < prjPosNum; i++, p++) {
|
||||
p->y = p->y / (p->z * tanHalf);
|
||||
p->x = p->x / (aspect * (-p->z * tanHalf));
|
||||
p->x = vx + ((1.0f + p->x) * (vw * 0.5f));
|
||||
p->y = vy + ((1.0f + p->y) * (vh * 0.5f));
|
||||
p->x = cLib_minMaxLimit<f32>(p->x, sxMin, sxMax);
|
||||
p->y = cLib_minMaxLimit<f32>(p->y, syMin, syMax);
|
||||
if (p->x < minX) minX = p->x;
|
||||
if (p->x > maxX) maxX = p->x;
|
||||
if (p->y < minY) minY = p->y;
|
||||
if (p->y > maxY) maxY = p->y;
|
||||
if (p->z > maxZ) maxZ = p->z;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void dMirror_packet_c::mainDraw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
#if TARGET_PC
|
||||
f32 sp150[7];
|
||||
GXGetProjectionv(sp150);
|
||||
|
||||
f32 sp138[6];
|
||||
GXGetViewportv(sp138);
|
||||
|
||||
u32 scissor[4];
|
||||
GXGetScissor(&scissor[0], &scissor[1], &scissor[2], &scissor[3]);
|
||||
|
||||
view_class* view = dComIfGd_getView();
|
||||
view_port_class* view_port = dComIfGd_getViewport();
|
||||
|
||||
// HD mainDraw (FUN_0247e6e8):
|
||||
f32 minX = FLT_MAX, minY = FLT_MAX;
|
||||
f32 maxX = -FLT_MAX, maxY = -FLT_MAX, maxZ = -FLT_MAX;
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
dMirror_accumQuadBBox(view, view_port, scissor, &mQuad[q * 4], minX, maxX, minY, maxY, maxZ);
|
||||
}
|
||||
|
||||
if (maxX <= minX || maxY <= minY) {
|
||||
return;
|
||||
}
|
||||
if (fabsf(maxX - minX) < 8.0f || fabsf(maxY - minY) < 8.0f) {
|
||||
return;
|
||||
}
|
||||
|
||||
GXSetScissor((u32)minX, (u32)minY, (u32)(maxX - minX), (u32)(maxY - minY));
|
||||
|
||||
Mtx reflMtx[MAX_QUADS];
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
cXyz* quad = &mQuad[q * 4];
|
||||
cXyz e0 = quad[1] - quad[0];
|
||||
cXyz e1 = quad[2] - quad[1];
|
||||
cXyz n = e0.outprod(e1);
|
||||
n.normalizeZP();
|
||||
|
||||
f32 planeD = (n.x * quad[0].x) + (n.y * quad[0].y) + (n.z * quad[0].z);
|
||||
f32 dCenter = ((n.x * view->lookat.center.x) + (n.y * view->lookat.center.y) +
|
||||
(n.z * view->lookat.center.z)) -
|
||||
planeD;
|
||||
cXyz reflEye =
|
||||
view->lookat.eye -
|
||||
(n * (2.0f * (((n.x * view->lookat.eye.x) + (n.y * view->lookat.eye.y) +
|
||||
(n.z * view->lookat.eye.z)) -
|
||||
planeD)));
|
||||
cXyz reflCenter = view->lookat.center - (n * (2.0f * dCenter));
|
||||
|
||||
cXyz up(0.0f, 1.0f, 0.0f);
|
||||
if (mViewScale.y > 0.0f) {
|
||||
cXyz a = reflEye - view->lookat.eye;
|
||||
cXyz b = a.outprod(view->lookat.up);
|
||||
up = a.outprod(b);
|
||||
up.normalizeZP();
|
||||
up *= cXyz(-1.0f, -1.0f, -1.0f);
|
||||
}
|
||||
|
||||
Mtx look;
|
||||
mDoMtx_lookAt(look, &reflEye, &reflCenter, &up, view->bank);
|
||||
mDoMtx_stack_c::scaleS(mViewScale);
|
||||
mDoMtx_stack_c::concat(look);
|
||||
|
||||
f32 (*cur)[4] = mDoMtx_stack_c::get();
|
||||
for (int r = 0; r < 3; r++) {
|
||||
for (int c = 0; c < 4; c++) {
|
||||
reflMtx[q][r][c] = cur[r][c];
|
||||
}
|
||||
}
|
||||
}
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
bool wallQuad = !dusk::tphd_active() ||
|
||||
(mQuadCount <= 1 && mQuadBoxMax[0].y - mQuadBoxMin[0].y > 0.1f);
|
||||
for (int i = 0; i < mModelCount; i++) {
|
||||
Mtx& bm = mModels[i]->getBaseTRMtx();
|
||||
cXyz pos(bm[0][3], bm[1][3], bm[2][3]);
|
||||
int best = 0;
|
||||
if (!wallQuad) {
|
||||
const cXyz& eye = view->lookat.eye;
|
||||
best = -1;
|
||||
f32 bestDist = FLT_MAX;
|
||||
for (int q = 0; q < mQuadCount; q++) {
|
||||
if ((mQuadBoxMin[q].x <= pos.x || mQuadBoxMin[q].x <= eye.x) &&
|
||||
(mQuadBoxMin[q].z <= pos.z || mQuadBoxMin[q].z <= eye.z) &&
|
||||
(pos.x <= mQuadBoxMax[q].x || eye.x <= mQuadBoxMax[q].x) &&
|
||||
(pos.z <= mQuadBoxMax[q].z || eye.z <= mQuadBoxMax[q].z))
|
||||
{
|
||||
f32 dist = dMirror_quadDist(pos, mQuadBoxMin[q], mQuadBoxMax[q]);
|
||||
if (dist < bestDist) {
|
||||
bestDist = dist;
|
||||
best = q;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (best < 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
modelDraw(mModels[i], reflMtx[best]);
|
||||
}
|
||||
|
||||
j3dSys.reinitGX();
|
||||
if (dusk::tphd_active()) {
|
||||
mirrorZdraw(sp150, sp138, view->far_, minX, minY, maxX, maxY, maxZ);
|
||||
GXSetScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
|
||||
} else {
|
||||
GXSetScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
|
||||
mirrorZdraw(sp150, sp138, view->far_, minX, minY, maxX, maxY, maxZ);
|
||||
}
|
||||
#else
|
||||
cXyz sp19C[5];
|
||||
|
||||
Mtx sp16C;
|
||||
@@ -773,7 +456,6 @@ void dMirror_packet_c::mainDraw() {
|
||||
GXSetScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
|
||||
mirrorZdraw(sp150, sp138, view->far_, var_f31, var_f30, var_f29, var_f28, var_f27);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void dMirror_packet_c::draw() {
|
||||
@@ -854,36 +536,6 @@ int daMirror_c::create() {
|
||||
mPacket.getViewScale().set(-1.0f, 1.0f, 1.0f);
|
||||
} else {
|
||||
if (type == 1) {
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active() && strcmp(dComIfGp_getStartStageName(), "F_SP117") == 0 &&
|
||||
dComIfGp_getStartStageRoomNo() == 2)
|
||||
{
|
||||
// HD const DAT_1002f070 (world-space floor rects)
|
||||
static const struct {
|
||||
f32 xMin, xMax, y, zMin, zMax;
|
||||
} l_tot_quads[dMirror_packet_c::MAX_QUADS] = {
|
||||
{-1800.0f, 1800.0f, 999.0f, 747.0f, 5600.0f},
|
||||
{-670.0f, 670.0f, 999.0f, 5600.0f, 6400.0f},
|
||||
{-3530.0f, 3530.0f, 1526.0f, -8151.0f, -2014.0f},
|
||||
{-3530.0f, -1040.0f, 1526.0f, -2014.0f, -1089.0f},
|
||||
{1040.0f, 3530.0f, 1526.0f, -2014.0f, -1089.0f},
|
||||
{-700.0f, 700.0f, 2887.0f, -10700.0f, -8300.0f},
|
||||
};
|
||||
cXyz* q = mPacket.getQuad();
|
||||
for (int i = 0; i < dMirror_packet_c::MAX_QUADS; i++) {
|
||||
q[i * 4 + 0].set(l_tot_quads[i].xMin, l_tot_quads[i].y, l_tot_quads[i].zMin);
|
||||
q[i * 4 + 1].set(l_tot_quads[i].xMax, l_tot_quads[i].y, l_tot_quads[i].zMin);
|
||||
q[i * 4 + 2].set(l_tot_quads[i].xMax, l_tot_quads[i].y, l_tot_quads[i].zMax);
|
||||
q[i * 4 + 3].set(l_tot_quads[i].xMin, l_tot_quads[i].y, l_tot_quads[i].zMax);
|
||||
}
|
||||
mPacket.mQuadCount = dMirror_packet_c::MAX_QUADS;
|
||||
mPacket.getViewScale().set(1.0f, -1.0f, 1.0f);
|
||||
m_myObj = this;
|
||||
mPacket.calcMinMax();
|
||||
eyePos.set(current.pos.x, current.pos.y, current.pos.z);
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
#endif
|
||||
scale *= 10.0f;
|
||||
mPacket.getViewScale().set(1.0, -1.0, 1.0);
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/stages.h"
|
||||
#include "dusk/randomizer/game/tools.h"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
void daNpcT_cmnListenPropertyEvent(char* param_0, int* param_1, daNpcT_HIOParam* param_2) {
|
||||
sprintf(¶m_0[*param_1], "%.3ff,\t// 注目オフセット\n", param_2->attention_offset);
|
||||
@@ -2886,6 +2891,29 @@ void daNpcT_offEvtBit(u32 i_no) {
|
||||
}
|
||||
|
||||
BOOL daNpcT_chkEvtBit(u32 i_no) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
switch (i_no) {
|
||||
case 0x153: // Checking if the player has Ending Blow
|
||||
{
|
||||
if (getStageID() == Hidden_Skill) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x40: // Checking if the player has completed Goron Mines
|
||||
{
|
||||
if (getStageID() == Kakariko_Village_Interiors) {
|
||||
return true; // Return true so Barnes will sell bombs no matter what
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
|
||||
}
|
||||
|
||||
|
||||
@@ -1744,6 +1744,12 @@ int daNpc_Aru_c::cutSpeakTo(int i_staffID) {
|
||||
switch (eventId) {
|
||||
case 1:
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
itemNo = randomizer_getItemAtLocation("Herding Goats Reward");
|
||||
randomizer_setTempFlagForLocation("Herding Goats Reward");
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
const daNpcAshB_HIOParam daNpcAshB_Param_c::m = {
|
||||
205.0f, // attention_offset
|
||||
-3.0f, // gravity
|
||||
@@ -1001,6 +1005,12 @@ BOOL daNpcAshB_c::EvCut_Appear(int i_staffID) {
|
||||
case '0008':
|
||||
local_30[0] = 0;
|
||||
if (mFlow.getEventId(local_30) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
local_30[0] = verifyProgressiveItem(randomizer_getItemAtLocation("Ashei Sketch"));
|
||||
randomizer_setTempFlagForLocation("Ashei Sketch");
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, local_30[0], 0, -1, -1, 0, 0);
|
||||
dComIfGp_event_setItemPartnerId(mItemPartnerId);
|
||||
|
||||
@@ -618,6 +618,7 @@ BOOL daNpc_Bans_c::isDelete() {
|
||||
Delete if TYPE_MAKING_BOMBS and:
|
||||
Horseback Battle Not Cleared or Goron Mines Cleared
|
||||
*/
|
||||
IF_DUSK(if (randomizer_IsActive()) { return TRUE;}) // Always delete this type in randomizer
|
||||
return !daNpcT_chkEvtBit(85) || // dSv_event_flag_c::M_052 - Main Event - Horseback battle clear
|
||||
daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear
|
||||
|
||||
@@ -626,6 +627,7 @@ BOOL daNpc_Bans_c::isDelete() {
|
||||
Delete if TYPE_SHOP and:
|
||||
Goron Mines Cleared
|
||||
*/
|
||||
IF_DUSK(if (randomizer_IsActive()) { return FALSE;}) // Never delete this type in randomizer
|
||||
return !daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear
|
||||
|
||||
default:
|
||||
|
||||
@@ -1034,8 +1034,9 @@ bool daNpcBouS_c::wait(void* param_1) {
|
||||
mTurnMode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (!checkItemGet(dItemNo_HVY_BOOTS_e, 1) && dComIfGs_isTbox(2)) {
|
||||
|
||||
// In randomizer, we don't want bo to try and talk to us once the chest has been opened.
|
||||
if (IF_DUSK(!randomizer_IsActive() &&) !checkItemGet(dItemNo_HVY_BOOTS_e, 1) && dComIfGs_isTbox(2)) {
|
||||
mForcibleTalk = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1804,6 +1804,17 @@ int daNpcChin_c::_Evt_GameSucceed_CutMain(const int& param_0) {
|
||||
itemId1 = 0;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
if (itemId1 == dItemNo_ARROW_LV2_e) {
|
||||
itemId1 = randomizer_getItemAtLocation("STAR Prize 1");
|
||||
randomizer_setTempFlagForLocation("STAR Prize 1");
|
||||
} else if (itemId1 == dItemNo_ARROW_LV3_e) {
|
||||
itemId1 = randomizer_getItemAtLocation("STAR Prize 2");
|
||||
randomizer_setTempFlagForLocation("STAR Prize 2");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
fpc_ProcID itemId2 = fopAcM_createItemForPresentDemo(¤t.pos, itemId1, 0, -1, -1,
|
||||
0, 0);
|
||||
if (itemId2 != -1) {
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "JSystem/JHostIO/JORFile.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum fairy_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x09 */ BCK_FAIRY_F_SAD = 0x9,
|
||||
@@ -1269,7 +1273,7 @@ void daNpc_Fairy_c::AppearDemoCall() {
|
||||
} else {
|
||||
mEvtNo = EVT_APPEAR_50F_02;
|
||||
}
|
||||
} else if (dComIfGs_checkEmptyBottle()) {
|
||||
} else if (dComIfGs_checkEmptyBottle() IF_DUSK(|| randomizer_IsActive())) {
|
||||
mEvtNo = EVT_APPEAR_50F_01;
|
||||
} else {
|
||||
mEvtNo = EVT_APPEAR_50F_04;
|
||||
@@ -1333,6 +1337,14 @@ void daNpc_Fairy_c::PresentDemoCall() {
|
||||
item_no = 0;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// If we haven't visted this great fairy before, give the random item
|
||||
if (randomizer_IsActive() && !daNpcT_chkEvtBit(505)) {
|
||||
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Cave of Ordeals Great Fairy Reward"));
|
||||
randomizer_setTempFlagForLocation("Cave of Ordeals Great Fairy Reward");
|
||||
}
|
||||
#endif
|
||||
|
||||
fpc_ProcID id = fopAcM_createItemForPresentDemo(¤t.pos, item_no, 0, -1, -1, NULL, NULL);
|
||||
if (id != fpcM_ERROR_PROCESS_ID_e) {
|
||||
dComIfGp_event_setItemPartnerId(id);
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
#include <cstring>
|
||||
|
||||
|
||||
static DUSK_CONSTEXPR daNpcT_evtData_c l_evtList[DUSK_IF_ELSE(2, 1)] = {
|
||||
static DUSK_CONSTEXPR daNpcT_evtData_c l_evtList[1] = {
|
||||
{"", 0},
|
||||
#if TARGET_PC
|
||||
{"DEFAULT_GETITEM", 0},
|
||||
#endif
|
||||
};
|
||||
|
||||
static DUSK_CONST char* l_resNameList[2] = {
|
||||
@@ -148,7 +145,7 @@ int daNpc_FairySeirei_c::Draw() {
|
||||
|
||||
int daNpc_FairySeirei_c::isDelete() {
|
||||
int ret = 0;
|
||||
if (IF_DUSK(mType != 4 &&) daNpcT_chkEvtBit(0x1F9) == false) {
|
||||
if (daNpcT_chkEvtBit(0x1F9) == false) {
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
@@ -362,15 +359,6 @@ int daNpc_FairySeirei_c::talk(int param_0) {
|
||||
}
|
||||
if (fopAcM_IsExecuting(mItemPartnerId)) {
|
||||
mTalking = TRUE;
|
||||
|
||||
#if TARGET_PC
|
||||
if (dusk::tphd_active() && getType() == 4) {
|
||||
mEvtNo = 1;
|
||||
field_0xe33 = true;
|
||||
mSpeakEvent = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
evtChange();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
const daNpc_grA_HIOParam daNpc_grA_Param_c::m = {
|
||||
{90.0f, -4.0f, 1.0f, 850.0f, 255.0f, 280.0f, 40.0f, 100.0f, 0.0f, 0.0f, 20.0f,
|
||||
-20.0f, 40.0f, -30.0f, 40.0f, -40.0f, 0.4f, 12.0f, 4, 6, 6, 6,
|
||||
@@ -4018,6 +4022,14 @@ BOOL daNpc_grA_c::talk(void*) {
|
||||
}
|
||||
if (r26 && talkProc(NULL, TRUE, NULL)) {
|
||||
if (mFlow.getEventId(&sp8) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
// Give the randomized underwater goron item
|
||||
if (sp8 == dItemNo_Randomizer_BOMB_IN_BAG_e) {
|
||||
sp8 = verifyProgressiveItem(randomizer_getItemAtLocation("Zoras Domain Underwater Goron"));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
field_0x1480 =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, sp8, 0, -1, -1, NULL, NULL);
|
||||
if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) {
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum grO_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x07 */ BCK_GRO_F_TALK_A = 0x7,
|
||||
@@ -1681,6 +1685,12 @@ int daNpc_grO_c::talk(void* param_1) {
|
||||
if (facePlayerFlag && talkProc(NULL, TRUE, NULL)) {
|
||||
if (mType == TYPE_MINES) {
|
||||
if (mFlow.getEventId(&itemId) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Ebizo Key Shard"));
|
||||
randomizer_setTempFlagForLocation("Goron Mines Gor Ebizo Key Shard");
|
||||
}
|
||||
#endif
|
||||
mItemID = fopAcM_createItemForPresentDemo(¤t.pos, itemId, 0, -1, -1, NULL, NULL);
|
||||
if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF);
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum grR_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x06 */ BCK_GRR_AGURA_GETUP = 0x6,
|
||||
@@ -1338,6 +1342,12 @@ int daNpc_grR_c::talk(void* param_1) {
|
||||
if (bVar1 && talkProc(NULL, TRUE, NULL)) {
|
||||
if (mType == TYPE_0) {
|
||||
if (mFlow.getEventId(&i_itemNo) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
i_itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Liggs Key Shard"));
|
||||
randomizer_setTempFlagForLocation("Goron Mines Gor Liggs Key Shard");
|
||||
}
|
||||
#endif
|
||||
mItemID = fopAcM_createItemForPresentDemo(¤t.pos, i_itemNo, 0, -1, -1, NULL, NULL);
|
||||
|
||||
if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
enum Event_Cut_Nums {
|
||||
NUM_EVT_CUTS_e = 2,
|
||||
};
|
||||
@@ -1190,6 +1193,12 @@ int daNpc_grS_c::talk(void* param_0) {
|
||||
if (unkFlag1 && talkProc(NULL, 1, NULL)) {
|
||||
if (mType == 0) {
|
||||
if (mFlow.getEventId(&unkInt2) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
unkInt2 = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Amato Key Shard"));
|
||||
randomizer_setTempFlagForLocation("Goron Mines Gor Amato Key Shard");
|
||||
}
|
||||
#endif
|
||||
mPresentItemId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, unkInt2, 0, -1, -1, 0, 0);
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
daNpcImpal_HIOParam const daNpcImpal_Param_c::m = {
|
||||
135.0f, // attention_offset
|
||||
-3.0f, // gravity
|
||||
@@ -971,6 +975,12 @@ BOOL daNpcImpal_c::EvCut_ImpalAppear1(int i_cut_index) {
|
||||
if (talkProc(NULL, 1, NULL)) {
|
||||
int evt_id = 0;
|
||||
if (mFlow.getEventId(&evt_id) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Charm"));
|
||||
randomizer_setTempFlagForLocation("Ilia Charm");
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, evt_id, 0, -1, -1, 0, 0);
|
||||
if (mItemPartnerId != 0xffffffff) {
|
||||
@@ -1060,6 +1070,12 @@ BOOL daNpcImpal_c::EvCut_CopyRod(int i_cut_index) {
|
||||
case '0003':
|
||||
int evt_id = 0;
|
||||
if (mFlow.getEventId(&evt_id) == 1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Skybook From Impaz"));
|
||||
randomizer_setTempFlagForLocation("Skybook From Impaz");
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId =
|
||||
fopAcM_createItemForPresentDemo(¤t.pos, evt_id, 0, -1, -1, 0, 0);
|
||||
dComIfGp_event_setItemPartnerId(mItemPartnerId);
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
#include "d/d_msg_object.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum Ins_RES_File_ID {
|
||||
/* BCK */
|
||||
/* 0x06 */ BCK_INS_F_HAPPY = 0x6,
|
||||
@@ -292,6 +299,10 @@ daNpcIns_c::eventFunc daNpcIns_c::mEvtSeqList[1] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
u8 daNpcIns_c::mGivenInsectId = 0xFF;
|
||||
#endif
|
||||
|
||||
static insect_param_data const l_insectParams[24] = {
|
||||
{0x0191, 0x709, 0, 0},
|
||||
{0x0192, 0x709, 0, 0},
|
||||
@@ -1259,6 +1270,9 @@ int daNpcIns_c::waitPresent(void* param_1) {
|
||||
daPy_py_c* player = daPy_getPlayerActorClass();
|
||||
player->changeOriginalDemo();
|
||||
player->changeDemoMode(0x25, 2, type, 0);
|
||||
#if TARGET_PC
|
||||
mGivenInsectId = type;
|
||||
#endif
|
||||
} else {
|
||||
mInsectMsgNo = 0x719;
|
||||
}
|
||||
@@ -1487,6 +1501,14 @@ int daNpcIns_c::talk(void* param_1) {
|
||||
OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventID, itemNo);
|
||||
|
||||
if (eventID == 1) {
|
||||
#if TARGET_PC
|
||||
// In rando, get the randomzied bug reward
|
||||
if (randomizer_IsActive()) {
|
||||
itemNo = randomizer_GetContext().mBugRewardOverrides[mGivenInsectId];
|
||||
itemNo = static_cast<int>(verifyProgressiveItem(itemNo));
|
||||
mGivenInsectId = 0xFF;
|
||||
}
|
||||
#endif
|
||||
mItemID = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL);
|
||||
|
||||
if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "d/actor/d_a_e_ym.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
static DUSK_CONSTEXPR int l_bmdData[2][2] = {
|
||||
{35, 1},
|
||||
{18, 2},
|
||||
@@ -1181,6 +1185,16 @@ int daNpc_Kkri_c::talk(void*) {
|
||||
switch (eventId) {
|
||||
case 1:
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
if (item_no == dItemNo_OIL_BOTTLE3_e) {
|
||||
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Bottle"));
|
||||
randomizer_setTempFlagForLocation("Coro Bottle");
|
||||
} /*else if (item_no == dItemNo_SMALL_KEY_e) { // Might be Small Key 2
|
||||
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Gate Key"));
|
||||
}*/
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, item_no, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "d/actor/d_a_tag_push.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum Type {
|
||||
/* 0x0 */ TYPE_0,
|
||||
/* 0x1 */ TYPE_1,
|
||||
@@ -1236,6 +1240,12 @@ int daNpc_Len_c::talk(void* param_0) {
|
||||
switch (evt_id) {
|
||||
case 1:
|
||||
if (mItemPartnerId == -1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
local_18 = verifyProgressiveItem(randomizer_getItemAtLocation("Renados Letter"));
|
||||
randomizer_setTempFlagForLocation("Renados Letter");
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, local_18,
|
||||
0, -1, -1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
#include "d/d_com_static.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_timer.h"
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
#if DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include <cstring>
|
||||
@@ -2393,6 +2396,11 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
|
||||
switch (evt_ret) {
|
||||
case 1: {
|
||||
if (mItemPartnerId == -1) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Talo Sharpshooting"));
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, evt_id, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
NUM_EVT_CUTS_e = 5,
|
||||
};
|
||||
@@ -1191,6 +1195,12 @@ int daNpc_myna2_c::ECut_gameGoalSuccess(int i_staffId) {
|
||||
case 20: {
|
||||
int itemNo = 0;
|
||||
if (mFlow.getEventId(&itemNo) == 1) {
|
||||
#if TARGET_PC
|
||||
// If plumm tries giving us the heart piece, give the randomized item instead
|
||||
if (randomizer_IsActive() && itemNo == dItemNo_KAKERA_HEART_e) {
|
||||
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Plumm Fruit Balloon Minigame"));
|
||||
}
|
||||
#endif
|
||||
mItemPid = fopAcM_createItemForPresentDemo(¤t.pos, itemNo, 0, -1, -1, NULL, NULL);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
#include "d/actor/d_a_npc_pouya.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/flags.h"
|
||||
#include "dusk/randomizer/game/randomizer_context.hpp"
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
const daNpc_Pouya_HIOParam daNpc_Pouya_Param_c::m = {
|
||||
120.0f, // attention_offset
|
||||
-3.0f, // gravity
|
||||
@@ -554,7 +560,8 @@ BOOL daNpc_Pouya_c::checkChangeEvt() {
|
||||
evtChange();
|
||||
return TRUE;
|
||||
}
|
||||
if (dComIfGs_getPohSpiritNum() >= 60) {
|
||||
// In randomizer, only get the 60 reward if we've already gotten the 20 reward
|
||||
if (dComIfGs_getPohSpiritNum() >= 60 IF_DUSK(&& randomizer_IsActive() && dComIfGs_isEventBit(GOT_BOTTLE_FROM_JOVANI))) {
|
||||
/* dSv_event_flag_c::F_0458 - Coversation with Jovani after collecting 60 ghosts
|
||||
*/
|
||||
if (!daNpcT_chkEvtBit(0x1CA)) {
|
||||
@@ -958,6 +965,17 @@ int daNpc_Pouya_c::cutHaveFavorToAsk(int param_0) {
|
||||
switch (evt_id) {
|
||||
case 1:
|
||||
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
if (local_64 == dItemNo_Randomizer_DROP_BOTTLE_e) {
|
||||
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 20 Poe Soul Reward"));
|
||||
randomizer_setTempFlagForLocation("Jovani 20 Poe Soul Reward");
|
||||
} else if (local_64 == dItemNo_Randomizer_SILVER_RUPEE_e) {
|
||||
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 60 Poe Soul Reward"));
|
||||
randomizer_setTempFlagForLocation("Jovani 60 Poe Soul Reward");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
mItemPartnerId = fopAcM_createItemForPresentDemo(¤t.pos, local_64, 0,
|
||||
-1, -1, 0, 0);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
|
||||
#include "d/actor/d_a_npc_prayer.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#if TARGET_PC
|
||||
#include "dusk/randomizer/game/verify_item_functions.h"
|
||||
#endif
|
||||
|
||||
static NPC_PRAY_HIO_CLASS l_HIO;
|
||||
|
||||
@@ -720,6 +723,12 @@ fpc_ProcID daNpcPray_c::createHeart() {
|
||||
mDoMtx_stack_c::ZXYrotS(rot);
|
||||
mDoMtx_stack_c::multVec(&offset, &offset);
|
||||
pos += offset;
|
||||
#if TARGET_PC
|
||||
if (randomizer_IsActive()) {
|
||||
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Charlo Donation Blessing"));
|
||||
return fopAcM_createItemForBoss(&pos, itemId, fopAcM_GetRoomNo(this), &rot, &size, 0.0f, 0.0f, 0);
|
||||
}
|
||||
#endif
|
||||
return fopAcM_createItemForBoss(&pos, dItemNo_KAKERA_HEART_e, fopAcM_GetRoomNo(this), &rot, &size, 0.0f, 0.0f, 0);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user