mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-08 18:42:27 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusklight into charlo-fix
This commit is contained in:
+2
-74
@@ -72,6 +72,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL Linux)
|
||||
endif ()
|
||||
set(AURORA_ENABLE_DVD ON CACHE BOOL "Enable DVD API support" FORCE)
|
||||
set(AURORA_ENABLE_CARD ON CACHE BOOL "Enable CARD API support" FORCE)
|
||||
set(AURORA_ENABLE_THP ON CACHE BOOL "Enable THP decoder" FORCE)
|
||||
set(AURORA_ENABLE_RMLUI ON CACHE BOOL "Enable RmlUi UI support" FORCE)
|
||||
add_subdirectory(extern/aurora EXCLUDE_FROM_ALL)
|
||||
target_compile_definitions(aurora_mtx PRIVATE MTX_USE_PS=1)
|
||||
@@ -88,7 +89,6 @@ endif ()
|
||||
|
||||
option(DUSK_BUILD_WARNINGS "Enable compiler warnings (off by default)")
|
||||
option(DUSK_SELECTED_OPT "If on, selected parts of the project will be compiled with optimizations on Debug, intending to make the game run at 30 FPS. Note for MSVC: you will need to remove '/RTC1' from your debug flags in CMake.")
|
||||
option(DUSK_MOVIE_SUPPORT "If on, compile against libjpeg-turbo to enable THP file decoding" ON)
|
||||
option(DUSK_PACKAGE_INSTALL "Install Dusklight with a Linux-native file structure" OFF)
|
||||
option(DUSK_GFX_DEBUG_GROUPS "Report debug groups to the native graphics API" ${DUSK_GFX_DEBUG_GROUPS_DEFAULT})
|
||||
option(DUSK_ENABLE_CODE_MODS "Enable code mods" ON)
|
||||
@@ -133,69 +133,6 @@ if (MSVC)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (DUSK_MOVIE_SUPPORT)
|
||||
find_package(libjpeg-turbo 3.0 CONFIG QUIET)
|
||||
if (libjpeg-turbo_FOUND)
|
||||
message(STATUS "dusklight: Using system libjpeg-turbo")
|
||||
else ()
|
||||
message(STATUS "dusklight: Fetching libjpeg-turbo")
|
||||
include(ExternalProject)
|
||||
set(_jpeg_install_dir ${CMAKE_BINARY_DIR}/libjpeg-turbo-install)
|
||||
if (WIN32)
|
||||
set(_jpeg_lib ${_jpeg_install_dir}/lib/turbojpeg-static.lib)
|
||||
else ()
|
||||
set(_jpeg_lib ${_jpeg_install_dir}/lib/libturbojpeg.a)
|
||||
endif ()
|
||||
set(_jpeg_cmake_args
|
||||
-DCMAKE_INSTALL_PREFIX=${_jpeg_install_dir}
|
||||
-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_SOURCE_DIR}/cmake/WindowsTargetProcessor.cmake
|
||||
-DENABLE_SHARED=OFF
|
||||
-DWITH_TURBOJPEG=ON
|
||||
-DWITH_JAVA=OFF
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
)
|
||||
if (CMAKE_TOOLCHAIN_FILE)
|
||||
get_filename_component(_jpeg_toolchain_file "${CMAKE_TOOLCHAIN_FILE}" ABSOLUTE BASE_DIR "${CMAKE_SOURCE_DIR}")
|
||||
list(APPEND _jpeg_cmake_args -DCMAKE_TOOLCHAIN_FILE=${_jpeg_toolchain_file})
|
||||
endif ()
|
||||
set(_jpeg_passthrough_vars
|
||||
ANDROID_ABI
|
||||
ANDROID_PLATFORM
|
||||
CMAKE_BUILD_TYPE
|
||||
CMAKE_C_COMPILER
|
||||
CMAKE_C_COMPILER_LAUNCHER
|
||||
CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MSVC_RUNTIME_LIBRARY
|
||||
CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
|
||||
CMAKE_OSX_ARCHITECTURES
|
||||
CMAKE_OSX_DEPLOYMENT_TARGET
|
||||
CMAKE_OSX_SYSROOT
|
||||
DEPLOYMENT_TARGET
|
||||
ENABLE_ARC
|
||||
ENABLE_BITCODE
|
||||
PLATFORM
|
||||
)
|
||||
foreach(_var IN LISTS _jpeg_passthrough_vars)
|
||||
if (DEFINED ${_var})
|
||||
list(APPEND _jpeg_cmake_args -D${_var}=${${_var}})
|
||||
endif ()
|
||||
endforeach ()
|
||||
ExternalProject_Add(libjpeg-turbo-ext
|
||||
URL https://github.com/libjpeg-turbo/libjpeg-turbo/archive/refs/tags/3.1.0.tar.gz
|
||||
URL_HASH SHA256=35fec2e1ddfb05ecf6d93e50bc57c1e54bc81c16d611ddf6eff73fff266d8285
|
||||
CMAKE_ARGS ${_jpeg_cmake_args}
|
||||
BUILD_BYPRODUCTS ${_jpeg_lib}
|
||||
)
|
||||
file(MAKE_DIRECTORY ${_jpeg_install_dir}/include)
|
||||
add_library(libjpeg-turbo::turbojpeg-static STATIC IMPORTED GLOBAL)
|
||||
set_target_properties(libjpeg-turbo::turbojpeg-static PROPERTIES
|
||||
IMPORTED_LOCATION ${_jpeg_lib}
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${_jpeg_install_dir}/include
|
||||
)
|
||||
add_dependencies(libjpeg-turbo::turbojpeg-static libjpeg-turbo-ext)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
|
||||
# -Wno-multichar: Multi-character constants ('ABCD') are implementation-defined but all compilers
|
||||
# (CW, GCC, Clang, MSVC) encode them identically in big-endian order.
|
||||
@@ -303,7 +240,7 @@ include(cmake/GameABIConfig.cmake)
|
||||
|
||||
find_package(Threads REQUIRED)
|
||||
set(GAME_COMPILE_DEFS DUSK_BUILDING_GAME=1)
|
||||
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd
|
||||
set(GAME_LIBS aurora::core aurora::gx aurora::gd aurora::si aurora::vi aurora::pad aurora::mtx aurora::os aurora::dvd aurora::thp
|
||||
aurora::card borealis::cli borealis::crash borealis::data borealis::disc borealis::discord borealis::file_select borealis::io borealis::log borealis::net borealis::presentation borealis::sentry borealis::update borealis::ws freeverb cxxopts::cxxopts absl::flat_hash_map nlohmann_json::nlohmann_json TracyClient fmt::fmt
|
||||
Threads::Threads zstd::libzstd dusklight_game_headers)
|
||||
if (DUSK_HAS_FUNCHOOK)
|
||||
@@ -314,15 +251,6 @@ if (WIN32)
|
||||
list(APPEND GAME_LIBS Ws2_32)
|
||||
endif ()
|
||||
|
||||
if (DUSK_MOVIE_SUPPORT)
|
||||
if (TARGET libjpeg-turbo::turbojpeg-static)
|
||||
list(APPEND GAME_LIBS libjpeg-turbo::turbojpeg-static)
|
||||
else ()
|
||||
list(APPEND GAME_LIBS libjpeg-turbo::turbojpeg)
|
||||
endif ()
|
||||
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
|
||||
endif ()
|
||||
|
||||
if (DUSK_ENABLE_CODE_MODS)
|
||||
list(APPEND GAME_COMPILE_DEFS DUSK_CODE_MODS=1)
|
||||
endif ()
|
||||
|
||||
Vendored
+1
-1
Submodule extern/aurora updated: f1189541e5...749d6ee7a2
Vendored
+1
-1
Submodule extern/borealis updated: c3b8014495...f55910bd79
@@ -5,7 +5,6 @@
|
||||
#include "f_pc/f_pc_base.h"
|
||||
#include "SSystem/SComponent/c_bg_s_grp_pass_chk.h"
|
||||
#include "SSystem/SComponent/c_bg_s_poly_pass_chk.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
struct cBgD_Vtx_t : public Vec {};
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define C_M3D_G_TRI_H_
|
||||
|
||||
#include "SSystem/SComponent/c_m3d_g_pla.h"
|
||||
#include "helpers/endian.h"
|
||||
|
||||
class cM3dGCyl;
|
||||
|
||||
|
||||
@@ -92,10 +92,7 @@ public:
|
||||
/* 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 */
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#if !TARGET_PC
|
||||
#include <thp.h>
|
||||
#else
|
||||
#include <dolphin/thp.h>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#endif
|
||||
@@ -17,29 +18,6 @@ struct daMP_THPReadBuffer {
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
// Copying here because thp.h is probably erroneous in the dolphin lib,
|
||||
// and it's kind of a problem being there (Aurora owns the headers).
|
||||
// TODO: Move this stuff in decomp?
|
||||
typedef struct THPAudioRecordHeader {
|
||||
BE(u32) offsetNextChannel;
|
||||
BE(u32) sampleSize;
|
||||
BE(s16) lCoef[8][2];
|
||||
BE(s16) rCoef[8][2];
|
||||
BE(s16) lYn1;
|
||||
BE(s16) lYn2;
|
||||
BE(s16) rYn1;
|
||||
BE(s16) rYn2;
|
||||
} THPAudioRecordHeader;
|
||||
|
||||
typedef struct THPAudioDecodeInfo {
|
||||
u8* encodeData;
|
||||
u32 offsetNibbles;
|
||||
u8 predictor;
|
||||
u8 scale;
|
||||
s16 yn1;
|
||||
s16 yn2;
|
||||
} THPAudioDecodeInfo;
|
||||
|
||||
typedef struct THPTextureSet {
|
||||
u8* ytexture;
|
||||
u8* utexture;
|
||||
@@ -86,10 +64,6 @@ typedef struct THPHeader {
|
||||
/* 0x2C */ BE(u32) finalFrameDataOffsets;
|
||||
} THPHeader;
|
||||
|
||||
static u32 THPAudioDecode(s16* audioBuffer, u8* audioFrame, s32 flag);
|
||||
static s32 __THPAudioGetNewSample(THPAudioDecodeInfo* info);
|
||||
static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr);
|
||||
|
||||
#define THP_AUDIO_BUFFER_COUNT 3
|
||||
#define THP_READ_BUFFER_COUNT 10
|
||||
#define THP_TEXTURE_SET_COUNT 3
|
||||
|
||||
@@ -36,5 +36,4 @@ public:
|
||||
|
||||
STATIC_ASSERT(sizeof(obj_gb_class) == 0x6bc);
|
||||
|
||||
|
||||
#endif /* D_A_OBJ_GB_H */
|
||||
|
||||
@@ -17,7 +17,6 @@ public:
|
||||
|
||||
STATIC_ASSERT(sizeof(kita_s) == 0x60);
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
* @class obj_kita_class
|
||||
|
||||
@@ -53,5 +53,4 @@ public:
|
||||
|
||||
STATIC_ASSERT(sizeof(daObjSM_DOOR_c) == 0x858);
|
||||
|
||||
|
||||
#endif /* D_A_OBJ_SM_DOOR_H */
|
||||
|
||||
+4
-1
@@ -6,9 +6,12 @@
|
||||
#include "d/d_bg_w_base.h"
|
||||
#include <mtx.h>
|
||||
#include <types.h>
|
||||
#include "helpers/offset_ptr.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/endian_ssystem.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
#endif
|
||||
|
||||
class cBgS_GrpPassChk;
|
||||
class cBgS_PolyPassChk;
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
#include "d/d_bg_plc.h"
|
||||
#include "d/d_bg_s_sph_chk.h"
|
||||
#include "d/d_bg_w_base.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/offset_ptr.h"
|
||||
#endif
|
||||
|
||||
class cBgS_GrpPassChk;
|
||||
class cBgS_PolyPassChk;
|
||||
|
||||
@@ -5,10 +5,13 @@
|
||||
#include "JSystem/J2DGraph/J2DScreen.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_pla.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "f_op/f_op_view.h"
|
||||
#include "global.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include "global.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/gx_helper.h"
|
||||
#endif
|
||||
|
||||
class J3DDrawBuffer;
|
||||
class J3DModel;
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
|
||||
#include "global.h"
|
||||
#include "f_pc/f_pc_base.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#endif
|
||||
|
||||
struct msg_class;
|
||||
|
||||
|
||||
+10
-13
@@ -706,26 +706,23 @@ public:
|
||||
/* 0x2374 */ u8 mFadeFlag;
|
||||
/* 0x2375 */ bool mHasDrawn;
|
||||
|
||||
#if PLATFORM_GCN
|
||||
#if PLATFORM_GCN
|
||||
/* 0x2378 */ J2DPicture* mpFadePict;
|
||||
#endif
|
||||
#ifdef TARGET_PC
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
/* 0x2376 */ u8 field_0x2376[SAVEFILE_SIZE];
|
||||
/* 0x4332 */ u8 field_0x4332;
|
||||
/* 0x4333 */ u8 field_0x4333;
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
dDlst_FileSelFade_c mFadeDlst;
|
||||
bool mGameModeSaveStartBuildUi = true;
|
||||
GameModeNewSaveState mGameModeNewSaveState = GAME_MODE_STATE_PENDING;
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
/* 0x2376 */ u8 field_0x2376[SAVEFILE_SIZE];
|
||||
/* 0x4332 */ u8 field_0x4332;
|
||||
/* 0x4333 */ u8 field_0x4333;
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef TARGET_PC
|
||||
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dDlst_FileSelFade_c));
|
||||
#else
|
||||
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C);
|
||||
#endif
|
||||
|
||||
#endif /* D_FILE_D_FILE_SELECT_H */
|
||||
|
||||
@@ -4,10 +4,11 @@
|
||||
#include "JSystem/JMessage/control.h"
|
||||
#include "JSystem/JMessage/JMessage.h"
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#define D_MSG_CLASS_PAGE_CNT_MAX 40
|
||||
#define D_MSG_CLASS_CHAR_CNT_MAX 0x210
|
||||
#define D_MSG_CLASS_LINE_MAX 12
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#define D_MSG_D_MSG_FLOW_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#endif
|
||||
|
||||
enum {
|
||||
NODETYPE_MESSAGE_e = 1,
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "d/d_item_data.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
#endif
|
||||
|
||||
static const int DEFAULT_SELECT_ITEM_INDEX = 0;
|
||||
static const int MAX_SELECT_ITEM = 4;
|
||||
|
||||
+5
-1
@@ -4,10 +4,14 @@
|
||||
#include "SSystem/SComponent/c_lib.h"
|
||||
#include "d/d_kankyo.h"
|
||||
#include "d/d_kankyo_data.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "global.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/offset_ptr.h"
|
||||
|
||||
#include "os_report.h"
|
||||
#endif
|
||||
|
||||
enum StageType {
|
||||
/* 0x0 */ ST_FIELD,
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#define D_D_TRESURE_H
|
||||
|
||||
#include <mtx.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/offset_ptr.h"
|
||||
#endif
|
||||
|
||||
class dTres_c {
|
||||
public:
|
||||
|
||||
@@ -12,9 +12,10 @@
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
#include "m_Do/m_Do_hostIO.h"
|
||||
#include "SSystem/SComponent/c_phase.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian_ssystem.h"
|
||||
|
||||
#if !__MWERKS__
|
||||
// mwerks compiler makes value initialization act like default initialization so we need
|
||||
// to be explicit about default initialization in modern compilers
|
||||
#define fopAcM_ct_placement(ptr, ClassName) JKR_NEW_ARGS (ptr) ClassName
|
||||
@@ -28,7 +29,6 @@
|
||||
fopAcM_OnCondition(ptr, fopAcCnd_INIT_e); \
|
||||
}
|
||||
|
||||
|
||||
#define fopAcM_RegisterDeleteID(i_this, actor_name_str) \
|
||||
("Delete -> " actor_name_str "(id=%d)\n", fopAcM_GetID(i_this))
|
||||
|
||||
|
||||
@@ -2,13 +2,10 @@
|
||||
#define M_DO_M_DO_LIB_H
|
||||
|
||||
#include "JSystem/J3DU/J3DUClipper.h"
|
||||
#include <dolphin/gx/GXStruct.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "JSystem/JGeometry.h"
|
||||
#endif
|
||||
|
||||
#include "helpers/gx_helper.h"
|
||||
#endif
|
||||
|
||||
typedef struct Vec Vec;
|
||||
struct ResTIMG;
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include <mtx.h>
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#if TARGET_PC
|
||||
#include "helpers/endian.h"
|
||||
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
#endif
|
||||
|
||||
extern u8 g_printCurrentHeapDebug;
|
||||
DUSK_GAME_EXTERN u8 g_printOtherHeapDebug;
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define M_DO_M_DO_PRINTF_H
|
||||
|
||||
#include <os.h>
|
||||
#include "helpers/endian.h"
|
||||
|
||||
void my_PutString(const char*);
|
||||
void mDoPrintf_vprintf_Interrupt(char const*, va_list);
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
void J3DDrawBuffer::calcZRatio() {
|
||||
mZRatio = (mZFar - mZNear) / (f32)mEntryTableSize;
|
||||
|
||||
@@ -6,7 +6,10 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DGD.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include <dusk/logging.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/logging.h"
|
||||
#endif
|
||||
|
||||
void J3DGDSetGenMode(u8 nTexGens, u8 nChans, u8 nTevs, u8 nInds,
|
||||
GXCullMode cm) {
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include <cstring>
|
||||
#include <os.h>
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphAnimator/J3DModel.h"
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShapeMtx.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <os.h>
|
||||
#include <cstring>
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
J3DError J3DDisplayListObj::newDisplayList(u32 maxSize) {
|
||||
mMaxSize = ALIGN_NEXT(maxSize, 0x20);
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
|
||||
#include <dolphin/gd.h>
|
||||
#include <gd.h>
|
||||
#include <gx.h>
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DVertex.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include <gd.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
void J3DGDSetVtxAttrFmtv(GXVtxFmt, GXVtxAttrFmtList const*, bool);
|
||||
void J3DFifoLoadPosMtxImm(Mtx, u32);
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA u16 J3DShapeMtx::sMtxLoadCache[10];
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
static void J3DFrameInterpConcat(MtxP lhs, MtxP rhs, Mtx out) {
|
||||
if (!dusk::frame_interp::lookup_concat_replacement(lhs, rhs, out)) {
|
||||
MTXConcat(lhs, rhs, out);
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTevs.h"
|
||||
#include "JSystem/J3DGraphBase/J3DTexture.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "JSystem/J3DGraphBase/J3DFifo.h"
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA J3DSys j3dSys;
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
#include <os.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "tracy/Tracy.hpp"
|
||||
#if TARGET_PC
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA s16* JASDriver::sDmaDacBuffer[3];
|
||||
|
||||
|
||||
@@ -12,17 +12,18 @@
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
#include "dusk/dusk.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/time.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include "SDL3/SDL_timer.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
|
||||
#include <SDL3/SDL_timer.h>
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#endif
|
||||
|
||||
@@ -11,8 +11,9 @@
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
#endif
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#define JPA_DRAW_CTX_PARAM , ParticleDrawCtx* ctx
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <gx.h>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "tracy/Tracy.hpp"
|
||||
#endif
|
||||
|
||||
JPAEmitterManager::JPAEmitterManager(u32 i_ptclNum, u32 i_emtrNum, JKRHeap* pHeap, u8 i_gidMax,
|
||||
u8 i_ridMax) {
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <gx.h>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JParticle/JPABaseShape.h"
|
||||
#include "JSystem/JParticle/JPAChildShape.h"
|
||||
@@ -15,12 +11,14 @@
|
||||
#include "JSystem/JParticle/JPAKeyBlock.h"
|
||||
#include "JSystem/JParticle/JPAParticle.h"
|
||||
#include "JSystem/JParticle/JPAResourceManager.h"
|
||||
#include <gx.h>
|
||||
#include "global.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#define JPA_DRAW_CTX_ARG , &ctx
|
||||
#else
|
||||
#define JPA_DRAW_CTX_ARG
|
||||
|
||||
@@ -365,14 +365,16 @@ ModResult runtime_deactivate(ModContext*, ModContext* subject, ModError*) {
|
||||
return MOD_OK;
|
||||
}
|
||||
|
||||
Vm& vm = *found->second;
|
||||
DeadlineScope deadline{vm, kLifecycleBudget};
|
||||
const size_t callbackCount = vm.shutdownRefs.size();
|
||||
for (size_t i = callbackCount; i > 0; --i) {
|
||||
std::string error;
|
||||
const int ref = vm.shutdownRefs[i - 1];
|
||||
if (!call_ref(vm, ref, 0, 0, kLifecycleBudget, error) && svc_log != nullptr) {
|
||||
svc_log->write(subject, LOG_LEVEL_ERROR, error.c_str());
|
||||
{
|
||||
Vm& vm = *found->second;
|
||||
DeadlineScope deadline{vm, kLifecycleBudget};
|
||||
const size_t callbackCount = vm.shutdownRefs.size();
|
||||
for (size_t i = callbackCount; i > 0; --i) {
|
||||
std::string error;
|
||||
const int ref = vm.shutdownRefs[i - 1];
|
||||
if (!call_ref(vm, ref, 0, 0, kLifecycleBudget, error) && svc_log != nullptr) {
|
||||
svc_log->write(subject, LOG_LEVEL_ERROR, error.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
s_vms.erase(found);
|
||||
|
||||
+1
-1
Submodule mods/randomizer updated: 61ba8c4058...641c9c9e0b
@@ -13,21 +13,27 @@
|
||||
* modmeta records. Each IMPORT_SERVICE/EXPORT_SERVICE/DEFINE_HOOK use places one
|
||||
* constant-initialized record object in the metadata section.
|
||||
*/
|
||||
#if defined(__has_attribute) && __has_attribute(no_sanitize)
|
||||
#define MOD_META_NO_ASAN __attribute__((no_sanitize("address")))
|
||||
#else
|
||||
#define MOD_META_NO_ASAN
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#pragma section("modmeta$a", read, write)
|
||||
#pragma section("modmeta$d", read, write)
|
||||
#pragma section("modmeta$z", read, write)
|
||||
#if defined(__clang__)
|
||||
#define MOD_META_RECORD __declspec(allocate("modmeta$d")) __attribute__((used))
|
||||
#define MOD_META_RECORD __declspec(allocate("modmeta$d")) __attribute__((used)) MOD_META_NO_ASAN
|
||||
#else
|
||||
#define MOD_META_RECORD __declspec(allocate("modmeta$d"))
|
||||
#endif
|
||||
#elif defined(__APPLE__)
|
||||
#define MOD_META_RECORD __attribute__((section("__DATA,__modmeta"), used))
|
||||
#define MOD_META_RECORD __attribute__((section("__DATA,__modmeta"), used)) MOD_META_NO_ASAN
|
||||
#elif defined(__has_attribute) && __has_attribute(retain)
|
||||
#define MOD_META_RECORD __attribute__((section("modmeta"), used, retain))
|
||||
#define MOD_META_RECORD __attribute__((section("modmeta"), used, retain)) MOD_META_NO_ASAN
|
||||
#else
|
||||
#define MOD_META_RECORD __attribute__((section("modmeta"), used))
|
||||
#define MOD_META_RECORD __attribute__((section("modmeta"), used)) MOD_META_NO_ASAN
|
||||
#endif
|
||||
|
||||
/* Section bounds for the mod_meta descriptor */
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_k_wmark.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/gx_helper.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA const EffParamProc daAlink_c::m_fEffParamProc[] = {
|
||||
&daAlink_c::setEffectFrontRollParam,
|
||||
|
||||
@@ -8,9 +8,14 @@
|
||||
#include "d/actor/d_a_obj_swhang.h"
|
||||
#include "d/actor/d_a_obj_chandelier.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
|
||||
static const int HS_CHAIN_MAX_LINKS = 600;
|
||||
#endif
|
||||
|
||||
enum {
|
||||
HS_MODE_NONE_e,
|
||||
HS_MODE_READY_e,
|
||||
@@ -19,10 +24,6 @@ enum {
|
||||
HS_MODE_RETURN_e = 6,
|
||||
};
|
||||
|
||||
#if TARGET_PC
|
||||
static const int HS_CHAIN_MAX_LINKS = 600;
|
||||
#endif
|
||||
|
||||
void daAlink_c::hsChainShape_c::draw() {
|
||||
static const int dummy = 0;
|
||||
|
||||
@@ -34,9 +35,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
j3dSys.setVtxPos(modelData->getVtxPosArray(), modelData->getVtxNum());
|
||||
j3dSys.setVtxNrm(modelData->getVtxNrmArray(), modelData->getNrmNum());
|
||||
j3dSys.setVtxCol(modelData->getVtxColorArray(0), modelData->getColNum());
|
||||
#if TARGET_PC
|
||||
j3dSys.setTexture(modelData->getTexture());
|
||||
#endif
|
||||
IF_DUSK(j3dSys.setTexture(modelData->getTexture()));
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
material->loadSharedDL();
|
||||
@@ -150,12 +149,9 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
hsInterpSubRoot = alink->getHsSubChainRootPos();
|
||||
hsInterpSubTop = alink->getHsSubChainTopPos();
|
||||
}
|
||||
const cXyz& chainRootPos = hsInterpRoot;
|
||||
const cXyz& chainTopPos = hsInterpTop;
|
||||
#else
|
||||
const cXyz& chainRootPos = alink->getHsChainRootPos();
|
||||
const cXyz& chainTopPos = alink->getHsChainTopPos();
|
||||
#endif
|
||||
const cXyz& chainRootPos = DUSK_IF_ELSE(hsInterpRoot, alink->getHsChainRootPos());
|
||||
const cXyz& chainTopPos = DUSK_IF_ELSE(hsInterpTop, alink->getHsChainTopPos());
|
||||
cXyz maxDistance = chainRootPos - chainTopPos;
|
||||
|
||||
f32 maxDistanceF = maxDistance.abs();
|
||||
@@ -185,11 +181,9 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
}
|
||||
(void)0;
|
||||
|
||||
#if TARGET_PC
|
||||
int chainLinks = 0;
|
||||
#endif
|
||||
IF_DUSK(int chainLinks = 0);
|
||||
|
||||
while (maxDistanceF > var_f30 IF_DUSK(&&chainLinks < HS_CHAIN_MAX_LINKS)) {
|
||||
while (maxDistanceF > var_f30 IF_DUSK(&& chainLinks < HS_CHAIN_MAX_LINKS)) {
|
||||
temp_f27 = var_f28 * cM_fsin(sp34 * var_f30);
|
||||
s16 spC = cM_atan2s(temp_f27 - var_f26, 5.0f);
|
||||
sp64.x = sp6C.x + spC;
|
||||
@@ -212,19 +206,12 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
var_f26 = temp_f27;
|
||||
var_f30 += fabsf(cM_scos(spC)) * 5.0f;
|
||||
|
||||
#if TARGET_PC
|
||||
chainLinks++;
|
||||
#endif
|
||||
IF_DUSK(chainLinks++);
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
const cXyz& subChainRootPos = hsInterpSubRoot;
|
||||
const cXyz& subChainTopPos = hsInterpSubTop;
|
||||
#else
|
||||
const cXyz& subChainRootPos = alink->getHsSubChainRootPos();
|
||||
const cXyz& subChainTopPos = alink->getHsSubChainTopPos();
|
||||
#endif
|
||||
const cXyz& subChainRootPos = DUSK_IF_ELSE(hsInterpSubRoot, alink->getHsSubChainRootPos());
|
||||
const cXyz& subChainTopPos = DUSK_IF_ELSE(hsInterpSubTop, alink->getHsSubChainTopPos());
|
||||
maxDistance = subChainRootPos - subChainTopPos;
|
||||
|
||||
maxDistanceF = maxDistance.abs();
|
||||
@@ -235,11 +222,9 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
sp98 = subChainTopPos;
|
||||
sp6C.set(maxDistance.atan2sY_XZ(), maxDistance.atan2sX_Z(), 0);
|
||||
|
||||
#if TARGET_PC
|
||||
int subChainLinks = 0;
|
||||
#endif
|
||||
IF_DUSK(int subChainLinks = 0);
|
||||
|
||||
while (maxDistanceF > var_f30 IF_DUSK(&&subChainLinks < HS_CHAIN_MAX_LINKS)) {
|
||||
while (maxDistanceF > var_f30 IF_DUSK(&& subChainLinks < HS_CHAIN_MAX_LINKS)) {
|
||||
mDoMtx_stack_c::copy(j3dSys.getViewMtx());
|
||||
mDoMtx_stack_c::transM(sp98);
|
||||
mDoMtx_stack_c::ZXYrotM(sp6C);
|
||||
@@ -252,9 +237,7 @@ void daAlink_c::hsChainShape_c::draw() {
|
||||
sp98 += maxDistance * 5.0f;
|
||||
ANGLE_ADD_2(sp6C.z, 0x3000);
|
||||
var_f30 += 5.0f;
|
||||
#if TARGET_PC
|
||||
subChainLinks++;
|
||||
#endif
|
||||
IF_DUSK(subChainLinks++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -624,9 +624,7 @@ int daBg_c::create() {
|
||||
dComIfGp_roomControl_onStatusFlag(roomNo, 0x10);
|
||||
OS_REPORT("<BG> room%d\n", roomNo);
|
||||
|
||||
#if TARGET_PC
|
||||
draw_interp_frame = true;
|
||||
#endif
|
||||
IF_DUSK(draw_interp_frame = true);
|
||||
|
||||
return cPhs_COMPLEATE_e;
|
||||
}
|
||||
|
||||
@@ -5,15 +5,18 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <os.h>
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_bg_obj.h"
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include <cstdio>
|
||||
#include <os.h>
|
||||
#include <cstring>
|
||||
#include "d/actor/d_a_set_bgobj.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static const char* getBmdName(int param_0, int param_1) {
|
||||
static char l_bmdName[16];
|
||||
|
||||
@@ -1103,14 +1103,8 @@ inline int daDemo00_c::execute() {
|
||||
case 2: {
|
||||
u16 sp0A = sp0E & 0x3FFF;
|
||||
if ((sp0E & 0xC000) == 0) {
|
||||
#if !MOVIE_SUPPORT
|
||||
// If movie support isn't available, automatically reset.
|
||||
// TPHD-esque. Maybe not the best solution, but it works.
|
||||
dComIfGp_event_reset();
|
||||
#else
|
||||
fopAcM_create(fpcNm_MOVIE_PLAYER_e, sp0A, NULL, fopAcM_GetRoomNo(this), NULL, NULL, 0xFF);
|
||||
mDoGph_gInf_c::fadeOut(1.0f);
|
||||
#endif
|
||||
} else {
|
||||
switch (sp0A) {
|
||||
case 0:
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include <f_ap/f_ap_game.h>
|
||||
#include <dusk/autosave.h>
|
||||
#include "dusk/autosave.h"
|
||||
|
||||
#include "f_ap/f_ap_game.h"
|
||||
#endif
|
||||
|
||||
char DUSK_CONST* daDoor20_c::getStopBmdName() {
|
||||
|
||||
@@ -4542,9 +4542,7 @@ static void demo_camera(e_wb_class* i_this) {
|
||||
i_this->demo_cam_way_spd.z = fabsf(i_this->demo_cam_way.z - i_this->demo_cam_ctr.z);
|
||||
i_this->demo_cam_morf = 0;
|
||||
pla->setPlayerPosAndAngle(&pla->current.pos, pla->shape_angle.y - 4000, 0);
|
||||
#if TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
if (i_this->demo_timer == 345) {
|
||||
daPy_getPlayerActorClass()->setThrowDamage(boss->enemy.shape_angle.y - 8000 + TREG_S(8),
|
||||
@@ -4791,9 +4789,7 @@ static void demo_camera(e_wb_class* i_this) {
|
||||
i_this->demo_cam_eye.x += 300.0f + VREG_F(8);
|
||||
i_this->demo_cam_eye.y += 150.0f + VREG_F(9);
|
||||
i_this->demo_cam_eye.z -= 1400.0f + VREG_F(10);
|
||||
#if TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
} else {
|
||||
i_this->demo_cam_eye = enemy->current.pos;
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <aurora/texture.hpp>
|
||||
#include "dusk/dvd_asset.hpp"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
#include <aurora/texture.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
using namespace dusk::version;
|
||||
|
||||
@@ -14,7 +14,10 @@
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "d/d_debug_viewer.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
static f32 dummy_lit_3777(int idx, u8 foo) {
|
||||
Vec dummy_vec = {0.0f, 0.0f, 0.0f};
|
||||
|
||||
@@ -13,14 +13,11 @@
|
||||
#include <gf/GFGeometry.h>
|
||||
#include <gf/GFLight.h>
|
||||
#include "m_Do/m_Do_lib.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include "helpers/math.h"
|
||||
#endif
|
||||
|
||||
static BOOL daMirror_c_createHeap(fopAc_ac_c* i_this) {
|
||||
return ((daMirror_c*)i_this)->createHeap();
|
||||
}
|
||||
@@ -30,7 +27,7 @@ static DUSK_CONSTEXPR char DUSK_CONST* l_arcName = "Mirror";
|
||||
static DUSK_CONSTEXPR char DUSK_CONST* l_arcName2 = "MR-Table";
|
||||
|
||||
dMirror_packet_c::dMirror_packet_c() {
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
GXInitTexObj(&mTexObj, nullptr, 0, 0, static_cast<GXTexFmt>(-1), GX_MAX_TEXWRAPMODE,
|
||||
GX_MAX_TEXWRAPMODE, GX_FALSE);
|
||||
#endif
|
||||
|
||||
@@ -14,34 +14,21 @@
|
||||
#pragma optimization_level 4
|
||||
#pragma optimize_for_size off
|
||||
|
||||
#include <cstring>
|
||||
#include <span>
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JAudio2/JASAiCtrl.h"
|
||||
#include "JSystem/JAudio2/JASDriverIF.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_movie_player.h"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/layout.hpp"
|
||||
#include "dusk/os.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include "JSystem/JAudio2/JASCriticalSection.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "dusk/os.h"
|
||||
#include "dusk/layout.hpp"
|
||||
#if MOVIE_SUPPORT
|
||||
#include "turbojpeg.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
|
||||
return *(BE(s32)*)readBuf->ptr;
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
// idk what OS_THREAD_ATTR_DETACH does, and it stops OSThreadJoin()
|
||||
// probably the difference doesn't matter since we are using OS threads anyways.
|
||||
#define OS_THREAD_ATTR 0
|
||||
@@ -49,7 +36,12 @@ inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
|
||||
#define OS_THREAD_ATTR OS_THREAD_ATTR_DETACH
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !TARGET_PC
|
||||
inline s32 daMP_NEXT_READ_SIZE(daMP_THPReadBuffer* readBuf) {
|
||||
return *(BE(s32)*)readBuf->ptr;
|
||||
}
|
||||
|
||||
#if !TARGET_PC
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -217,7 +209,6 @@ static void __THPAudioInitialize(THPAudioDecodeInfo* info, u8* ptr) {
|
||||
info->encodeData++;
|
||||
}
|
||||
|
||||
#if !TARGET_PC
|
||||
ATTRIBUTE_ALIGN(32) static u8 THPStatistics[1120];
|
||||
|
||||
ATTRIBUTE_ALIGN(32) static THPHuffmanTab* Ydchuff;
|
||||
@@ -2587,104 +2578,9 @@ static void __THPHuffDecodeDCTCompV(__REGISTER THPFileInfo* info, THPCoeff* bloc
|
||||
#else // !TARGET_PC
|
||||
|
||||
static daMP_THPPlayer daMP_ActivePlayer;
|
||||
|
||||
#if MOVIE_SUPPORT
|
||||
static std::vector<u8> FixedJpegData;
|
||||
static tjhandle JpegDecompressHandle;
|
||||
|
||||
static const std::vector<u8>& FixJpeg(const std::span<u8> data) {
|
||||
FixedJpegData.resize(0);
|
||||
FixedJpegData.reserve(data.size());
|
||||
|
||||
size_t startOfScanLocation = 0;
|
||||
for (; startOfScanLocation < data.size() - 1; startOfScanLocation++) {
|
||||
if (data[startOfScanLocation] == 0xFF && data[startOfScanLocation + 1] == 0xDA) {
|
||||
goto sosFound;
|
||||
}
|
||||
}
|
||||
|
||||
CRASH("Unable to find SOS marker!");
|
||||
|
||||
sosFound:
|
||||
|
||||
startOfScanLocation += 2; // TODO: Skip entire SOS header?
|
||||
|
||||
size_t endOfImage = data.size() - 1;
|
||||
for (; endOfImage > startOfScanLocation; endOfImage--) {
|
||||
if (data[endOfImage] == 0xFF && data[endOfImage + 1] == 0xD9) {
|
||||
goto eoiFound;
|
||||
}
|
||||
}
|
||||
|
||||
CRASH("Unable to find EOI marker!");
|
||||
eoiFound:
|
||||
|
||||
// Copy data before SOS
|
||||
for (size_t i = 0; i < startOfScanLocation; i++) {
|
||||
FixedJpegData.push_back(data[i]);
|
||||
}
|
||||
|
||||
// Copy data inside SOS, fixing up lacking of "byte shuffling"
|
||||
for (size_t i = startOfScanLocation; i < endOfImage; i++) {
|
||||
u8 value = data[i];
|
||||
FixedJpegData.push_back(value);
|
||||
if (value == 0xFF) {
|
||||
FixedJpegData.push_back(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy data after SOS.
|
||||
for (size_t i = endOfImage; i < data.size(); i++) {
|
||||
FixedJpegData.push_back(data[i]);
|
||||
}
|
||||
|
||||
return FixedJpegData;
|
||||
}
|
||||
|
||||
static s32 THPVideoDecode(void* file, size_t fileSize, void* tileY, void* tileU, void* tileV, void*) {
|
||||
assert(JpegDecompressHandle);
|
||||
|
||||
const auto handle = JpegDecompressHandle;
|
||||
const auto fixedData = FixJpeg(std::span(static_cast<u8*>(file), fileSize));
|
||||
|
||||
auto ret = tj3DecompressHeader(handle, fixedData.data(), fixedData.size());
|
||||
if (ret == -1) {
|
||||
OSReport_Error("Parsing JPEG header failed: %s", tj3GetErrorStr(handle));
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (tj3Get(handle, TJPARAM_JPEGWIDTH) != daMP_ActivePlayer.videoInfo.xSize) {
|
||||
OSReport_Error("Invalid width in video frame!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (tj3Get(handle, TJPARAM_JPEGHEIGHT) != daMP_ActivePlayer.videoInfo.ySize) {
|
||||
OSReport_Error("Invalid height in video frame!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ret = tj3Set(handle, TJPARAM_SUBSAMP, TJSAMP_420);
|
||||
if (ret != 0) {
|
||||
OSReport_Error("Failed to set subsampling mode: %s", tj3GetErrorStr(handle));
|
||||
return 1;
|
||||
}
|
||||
|
||||
u8* planes[3] = {static_cast<u8*>(tileY), static_cast<u8*>(tileU), static_cast<u8*>(tileV)};
|
||||
ret = tj3DecompressToYUVPlanes8(handle, fixedData.data(), fixedData.size(), planes, nullptr);
|
||||
if (ret != 0) {
|
||||
OSReport_Error("Image decompression failed: %s", tj3GetErrorStr(handle));
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else // MOVIE_SUPPORT
|
||||
static s32 THPVideoDecode(void*, size_t, void*, void*, void*, void*) {
|
||||
return 1; // Immediate error.
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !TARGET_PC
|
||||
static BOOL THPInit() {
|
||||
#if !TARGET_PC
|
||||
u8* base;
|
||||
@@ -2712,9 +2608,10 @@ static BOOL THPInit() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if defined(__cplusplus) && !TARGET_PC
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
#endif // !TARGET_PC
|
||||
|
||||
#if !TARGET_PC // Defined earlier in file.
|
||||
static daMP_THPPlayer daMP_ActivePlayer;
|
||||
@@ -2937,9 +2834,6 @@ static void daMP_VideoDecode(daMP_THPReadBuffer* readBuffer) {
|
||||
case 0: {
|
||||
if ((daMP_ActivePlayer.videoError = THPVideoDecode(
|
||||
tile,
|
||||
#if TARGET_PC
|
||||
*tileOffsets,
|
||||
#endif
|
||||
textureSet->ytexture, textureSet->utexture,
|
||||
textureSet->vtexture,
|
||||
daMP_ActivePlayer.thpWork))) {
|
||||
@@ -3434,26 +3328,19 @@ static void daMP_THPGXYuv2RgbDraw(u8* y_data, u8* u_data, u8* v_data, s16 x,
|
||||
TGXTexObj tobj0;
|
||||
TGXTexObj tobj1;
|
||||
TGXTexObj tobj2;
|
||||
#if TARGET_PC
|
||||
#define FMT (GXTexFmt)GX_TF_R8_PC
|
||||
#else
|
||||
#define FMT GX_TF_I8
|
||||
#endif
|
||||
|
||||
GXInitTexObj(&tobj0, y_data, textureWidth, textureHeight, FMT, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObj(&tobj0, y_data, textureWidth, textureHeight, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tobj0, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&tobj0, GX_TEXMAP0);
|
||||
|
||||
GXInitTexObj(&tobj1, u_data, textureWidth >> 1, textureHeight >> 1, FMT, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObj(&tobj1, u_data, textureWidth >> 1, textureHeight >> 1, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tobj1, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&tobj1, GX_TEXMAP1);
|
||||
|
||||
GXInitTexObj(&tobj2, v_data, textureWidth >> 1, textureHeight >> 1, FMT, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObj(&tobj2, v_data, textureWidth >> 1, textureHeight >> 1, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE);
|
||||
GXInitTexObjLOD(&tobj2, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, 0, 0, GX_ANISO_1);
|
||||
GXLoadTexObj(&tobj2, GX_TEXMAP2);
|
||||
|
||||
#undef FMT
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT7, 4);
|
||||
GXPosition3s16(x, y, 0);
|
||||
GXTexCoord2u16(0, 0);
|
||||
@@ -3774,13 +3661,6 @@ static BOOL daMP_THPPlayerOpen(char const* filename, BOOL onMemory) {
|
||||
}
|
||||
|
||||
static BOOL daMP_THPPlayerClose() {
|
||||
#if TARGET_PC && MOVIE_SUPPORT
|
||||
tj3Destroy(JpegDecompressHandle);
|
||||
JpegDecompressHandle = nullptr;
|
||||
|
||||
FixedJpegData.clear();
|
||||
#endif
|
||||
|
||||
if (daMP_ActivePlayer.open && daMP_ActivePlayer.state == 0) {
|
||||
daMP_ActivePlayer.open = 0;
|
||||
DVDClose(&daMP_ActivePlayer.fileInfo);
|
||||
@@ -3832,11 +3712,6 @@ static BOOL daMP_THPPlayerSetBuffer(u8* buffer) {
|
||||
|
||||
ysize = ALIGN_NEXT(daMP_ActivePlayer.videoInfo.xSize * daMP_ActivePlayer.videoInfo.ySize, 32);
|
||||
uvsize = ALIGN_NEXT(daMP_ActivePlayer.videoInfo.xSize * daMP_ActivePlayer.videoInfo.ySize / 4, 32);
|
||||
#if TARGET_PC
|
||||
assert(ysize >= tj3YUVPlaneSize(0, daMP_ActivePlayer.videoInfo.xSize, 0, daMP_ActivePlayer.videoInfo.ySize, TJSAMP_420));
|
||||
assert(uvsize >= tj3YUVPlaneSize(1, daMP_ActivePlayer.videoInfo.xSize, 0, daMP_ActivePlayer.videoInfo.ySize, TJSAMP_420));
|
||||
assert(uvsize >= tj3YUVPlaneSize(2, daMP_ActivePlayer.videoInfo.xSize, 0, daMP_ActivePlayer.videoInfo.ySize, TJSAMP_420));
|
||||
#endif
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(daMP_ActivePlayer.textureSet); i++) {
|
||||
daMP_ActivePlayer.textureSet[i].ytexture = ptr;
|
||||
@@ -4329,15 +4204,6 @@ static BOOL daMP_ActivePlayer_Init(char const* moviePath) {
|
||||
|
||||
daMP_THPPlayerSetBuffer((u8*)daMP_buffer);
|
||||
|
||||
#if TARGET_PC && MOVIE_SUPPORT
|
||||
assert(JpegDecompressHandle == nullptr);
|
||||
JpegDecompressHandle = tj3Init(TJINIT_DECOMPRESS);
|
||||
if (JpegDecompressHandle == nullptr) {
|
||||
OSReport_Error("Failed to create turbojpeg handle: %s", tj3GetErrorStr(nullptr));
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!daMP_THPPlayerPrepare(0, 0, daMP_audioInfo.sndNumTracks != 1 ? OSGetTick() % daMP_audioInfo.sndNumTracks : 0)) {
|
||||
OSReport("Fail to prepare\n");
|
||||
#if DEBUG
|
||||
@@ -4373,10 +4239,6 @@ static void daMP_ActivePlayer_Main() {
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC && 0
|
||||
#include "imgui.h"
|
||||
#endif
|
||||
|
||||
static void daMP_ActivePlayer_Draw() {
|
||||
#if TARGET_PC
|
||||
u16 width = JUTVideo::getManager()->getFbWidth();
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
#include "d/actor/d_a_npc_gra.h"
|
||||
#include "d/actor/d_a_tag_gra.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "mods/items.h"
|
||||
#endif
|
||||
#include <cstring>
|
||||
|
||||
DUSK_GAME_DATA 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,
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
#include "d/actor/d_a_npc_grc.h"
|
||||
#include "d/actor/d_a_npc.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "mods/items.h"
|
||||
#endif
|
||||
#include <cstring>
|
||||
|
||||
enum grC_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static DUSK_CONSTEXPR int l_bmdData[4][2] = {
|
||||
{14, 1}, {26, 2},
|
||||
|
||||
@@ -7,10 +7,11 @@
|
||||
|
||||
#include "d/actor/d_a_npc_kkri.h"
|
||||
#include "d/actor/d_a_e_ym.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "mods/items.h"
|
||||
#endif
|
||||
#include <cstring>
|
||||
|
||||
static DUSK_CONSTEXPR int l_bmdData[2][2] = {
|
||||
{35, 1},
|
||||
|
||||
+10
-19
@@ -18,9 +18,12 @@
|
||||
#include "f_op/f_op_kankyo_mng.h"
|
||||
#include "c/c_damagereaction.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
static home_path_pnt home_path[38] = {
|
||||
{0, {561.0f, 87.0f, -1110.0f}},
|
||||
{1, {306.0f, 87.0f, -849.0f}},
|
||||
@@ -2656,9 +2659,7 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
i_this->mCameraFovY = 55.0f;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
daPy_getPlayerActorClass()->changeOriginalDemo();
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
// fallthrough
|
||||
|
||||
case 2:
|
||||
@@ -2687,9 +2688,7 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
if (i_this->mDemoCounter == 0) {
|
||||
i_this->mCameraCenter1.set(387.0f, 133.0f, -866.0f);
|
||||
i_this->mCameraEye1.set(284.0f, 208.0f, -585.0f);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
|
||||
if (i_this->mDemoCounter == 12) {
|
||||
@@ -2726,9 +2725,7 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
i_this->mCameraFovY = 45.0f;
|
||||
camera->mCamera.SetTrimSize(3);
|
||||
daPy_getPlayerActorClass()->changeOriginalDemo();
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
// fallthrough
|
||||
|
||||
case 11:
|
||||
@@ -2809,14 +2806,10 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
MtxPosition(&vec, &i_this->mCameraEye2);
|
||||
i_this->mCameraEye2 += player->current.pos;
|
||||
player->changeDemoParam2(2);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
} else if (i_this->mDemoCounter == 120) {
|
||||
player->changeDemoParam2(0);
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2869,9 +2862,7 @@ static void demo_camera(npc_ne_class* i_this) {
|
||||
i_this->mCameraCenter1 = _this->current.pos;
|
||||
i_this->mCameraCenter1.y += 20.0f;
|
||||
i_this->mCameraFovY = 55.0f;
|
||||
#ifdef TARGET_PC
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
|
||||
camera->mCamera.Set(i_this->mCameraCenter1, i_this->mCameraEye1,
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include "d/actor/d_a_e_ym.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
enum saru_TW_RES_File_ID {
|
||||
/* BMDR */
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "d/actor/d_a_npc_shop0.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static int createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
return static_cast<daNpc_Shop0_c*>(i_this)->createHeap();
|
||||
|
||||
@@ -14,9 +14,12 @@
|
||||
#include "d/actor/d_a_obj_automata.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/actor/d_a_obj_scannon.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA const daNpc_Toby_HIOParam daNpc_Toby_Param_c::m = {
|
||||
160.0f,
|
||||
-3.0f,
|
||||
@@ -1399,7 +1402,7 @@ int daNpc_Toby_c::cutRepairSCannon(int arg0) {
|
||||
old.pos = current.pos;
|
||||
setAngle(cM_deg2s(5.0f * f32(mPath.getArg0())));
|
||||
mEventTimer = mPath.getArg2();
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
} else if (!mHide) {
|
||||
mHide = 1;
|
||||
|
||||
@@ -9,7 +9,9 @@
|
||||
#include "d/actor/d_a_demo_item.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static DUSK_CONSTEXPR daNpc_GetParam1 l_bmdData[3] = {
|
||||
{3, 1},
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
class daNpc_ykW_HIO_c : public mDoHIO_entry_c {
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_obj_gra2.h"
|
||||
#include "d/actor/d_a_npc4.h"
|
||||
#include "d/actor/d_a_tag_gra.h"
|
||||
#include "d/d_bg_w.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/d_com_inf_actor.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "helpers/string.hpp"
|
||||
#include "d/d_com_inf_actor.h"
|
||||
#if DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#endif
|
||||
@@ -21,6 +20,10 @@
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
class daObj_GrA_Param_c {
|
||||
public:
|
||||
virtual ~daObj_GrA_Param_c() {}
|
||||
|
||||
@@ -12,10 +12,6 @@
|
||||
#include "d/d_cc_d.h"
|
||||
#include "d/d_cc_uty.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include "helpers/math.h"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
class daObjLv4Chan_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "d/d_item.h"
|
||||
#include "dusk/mods/item.hpp"
|
||||
#include "mods/items.h"
|
||||
|
||||
#include "d/d_item.h"
|
||||
#endif
|
||||
|
||||
DUSK_GAME_DATA daObjMasterSword_Attr_c const daObjMasterSword_c::mAttr = {1.0f};
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
#include "d/actor/d_a_tag_kmsg.h"
|
||||
#include <types.h>
|
||||
#include <cstring>
|
||||
|
||||
#include "helpers/string.hpp"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "f_op/f_op_msg.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static DUSK_CONSTEXPR daNpc_GetParam1 l_bmdData[9] = {
|
||||
{36, 1}, {36, 1}, {35, 1}, {37, 1}, {38, 1}, {3, 2}, {3, 2}, {4, 2}, {5, 2},
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static DUSK_CONST char* l_evtNameList[] = {
|
||||
NULL,
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static int createHeapCallBack(fopAc_ac_c* i_this) {
|
||||
daTag_Msg_c* msg = (daTag_Msg_c*)i_this;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "d/d_pane_class_alpha.h"
|
||||
#include "d/d_s_logo.h"
|
||||
#include "d/d_s_play.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "f_op/f_op_scene_mng.h"
|
||||
@@ -19,9 +18,9 @@
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
class daTit_HIO_c : public JORReflexible {
|
||||
@@ -353,11 +352,7 @@ void daTitle_c::fastLogoDispInit() {
|
||||
mWaitTimer = 30;
|
||||
mProcID = 5;
|
||||
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::is_enabled()) {
|
||||
dusk::frame_interp::request_presentation_sync();
|
||||
}
|
||||
#endif
|
||||
IF_DUSK(dusk::frame_interp::request_presentation_sync());
|
||||
}
|
||||
|
||||
void daTitle_c::fastLogoDisp() {
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
#include "JSystem/J3DGraphBase/J3DDrawBuffer.h"
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
const u16 l_J_Ohana00_64TEX__width = 63;
|
||||
const u16 l_J_Ohana00_64TEX__height = 63;
|
||||
|
||||
@@ -11,15 +11,10 @@
|
||||
#include "d/d_camera.h"
|
||||
#include "f_op/f_op_camera_mng.h"
|
||||
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
const u16 l_M_Hijiki00TEX__width = 31;
|
||||
const u16 l_M_Hijiki00TEX__height = 31;
|
||||
const u16 l_M_kusa05_RGBATEX__width = 31;
|
||||
const u16 l_M_kusa05_RGBATEX__height = 31;
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/dvd_asset.hpp"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
|
||||
using GameVersion = dusk::version::GameVersion;
|
||||
|
||||
template <typename T, size_t N>
|
||||
@@ -61,6 +56,11 @@ DEFINE_GRASS_ASSET(l_M_Hijiki00TEX, u8, 0x800, {
|
||||
#include "assets/l_M_Hijiki00TEX.h" // ALIGN 32
|
||||
#endif
|
||||
|
||||
const u16 l_M_Hijiki00TEX__width = 31;
|
||||
const u16 l_M_Hijiki00TEX__height = 31;
|
||||
const u16 l_M_kusa05_RGBATEX__width = 31;
|
||||
const u16 l_M_kusa05_RGBATEX__height = 31;
|
||||
|
||||
static u8 l_pos[960] = {
|
||||
0x3F, 0x4A, 0x56, 0xEF, 0xC2, 0x20, 0x00, 0x00, 0x41, 0xFB, 0x17, 0xE4, 0x41, 0xAA, 0xBB, 0xEA,
|
||||
0xC2, 0x20, 0x00, 0x00, 0xC1, 0xB7, 0x03, 0x7A, 0x42, 0x55, 0x8D, 0x6F, 0x43, 0x13, 0x16, 0x3F,
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
void dBgp_c::material_c::draw() {
|
||||
material_c* material = this;
|
||||
|
||||
+3
-2
@@ -11,12 +11,14 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
|
||||
#if TARGET_PC || DEBUG
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_bg_s_capt_poly.h"
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/offset_ptr.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "helpers/offset_ptr.h"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
@@ -30,7 +32,6 @@ int g_sph_counter;
|
||||
int g_capt_poly_counter;
|
||||
#endif
|
||||
|
||||
|
||||
void dBgS_HIO::genMessage(JORMContext* mctx) {
|
||||
#if DEBUG
|
||||
mctx->genLabel("zelda地形チェック", 0);
|
||||
|
||||
@@ -11,15 +11,14 @@
|
||||
#include "d/d_msg_string.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#include <dusk/autosave.h>
|
||||
#if TARGET_PC
|
||||
#include "dusk/autosave.h"
|
||||
#include "dusk/game_mode.hpp"
|
||||
#include "dusk/imgui/ImGuiConsole.hpp"
|
||||
#include "dusk/livesplit.h"
|
||||
#include "dusk/speedrun.h"
|
||||
#endif
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
dBrightCheck_c::dBrightCheck_c(JKRArchive* i_archive) {
|
||||
mArchive = i_archive;
|
||||
|
||||
+3
-2
@@ -29,15 +29,16 @@
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/action_bindings.h"
|
||||
#include "dusk/camera_operators.hpp"
|
||||
#include "dusk/commands.hpp"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "dusk/action_bindings.h"
|
||||
#include "dusk/mouse.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/touch_camera.h"
|
||||
#include "imgui.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -19,17 +19,18 @@
|
||||
#include "d/d_timer.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "f_op/f_op_scene_mng.h"
|
||||
#include "m_Do/m_Do_MemCard.h"
|
||||
#include "m_Do/m_Do_Reset.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/settings.h"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#include "m_Do/m_Do_MemCard.h"
|
||||
#endif
|
||||
|
||||
void dComIfG_play_c::ct() {
|
||||
@@ -1245,12 +1246,12 @@ BOOL dComIfG_resetToOpening(scene_class* i_scene) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
if (!mDoMemCd_isCardCommNone()) {
|
||||
return 0;
|
||||
}
|
||||
g_mDoMemCd_control.SaveSync();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
dComIfG_changeOpeningScene(i_scene, fpcNm_OPENING_SCENE_e);
|
||||
mDoAud_bgmStop(30);
|
||||
|
||||
@@ -14,14 +14,17 @@
|
||||
#include "m_Do/m_Do_mtx.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/logging.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
|
||||
#include <absl/container/flat_hash_map.h>
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <typeindex>
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "tracy/Tracy.hpp"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "helpers/gx_helper.h"
|
||||
#include "dusk/logging.h"
|
||||
|
||||
static const void* getInterpKey(const void* base, int idx) {
|
||||
return reinterpret_cast<const void*>(reinterpret_cast<uintptr_t>(base) ^ idx);
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
#include "d/actor/d_a_alink.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#define LOAD_4BYTE_STRING_LITERAL(x) (*(u32*)(x))
|
||||
#else
|
||||
#define LOAD_4BYTE_STRING_LITERAL(x) read_big_endian_u32(x)
|
||||
#else
|
||||
#define LOAD_4BYTE_STRING_LITERAL(x) (*(u32*)(x))
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
static u8 event_debug_evnt() {
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#include "SSystem/SComponent/c_counter.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
static dEvM_HIO_c l_HIO;
|
||||
|
||||
@@ -14,8 +14,10 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "helpers/string.hpp"
|
||||
#if TARGET_PC
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
dFile_info_c::dFile_info_c(JKRArchive* i_archive, u8 param_1) {
|
||||
mArchive = i_archive;
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
#include "d/d_file_sel_warning.h"
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_pane_class.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dFile_warning_c::*procFunc)();
|
||||
static procFunc fileWarningProc[] = {&dFile_warning_c::modeWait, &dFile_warning_c::modeMove};
|
||||
|
||||
@@ -23,13 +23,12 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/utilities.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/game_mode.hpp"
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/mods/svc/save.hpp"
|
||||
#include "dusk/utilities.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
namespace {
|
||||
@@ -4432,15 +4431,15 @@ void dFile_select_c::_draw() {
|
||||
dComIfGd_set2DOpa(mSelIcon);
|
||||
dComIfGd_set2DOpa(mSelIcon2);
|
||||
|
||||
#if PLATFORM_GCN
|
||||
#if TARGET_PC
|
||||
#if PLATFORM_GCN
|
||||
#if TARGET_PC
|
||||
dComIfGd_set2DOpaTop(&mFadeDlst);
|
||||
#else
|
||||
#else
|
||||
mpFadePict->draw(mDoGph_gInf_c::getMinXF(), mDoGph_gInf_c::getMinYF(),
|
||||
mDoGph_gInf_c::getWidthF(), mDoGph_gInf_c::getHeightF(), false, false,
|
||||
false);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/gx_helper.h"
|
||||
#endif
|
||||
|
||||
class dGov_HIO_c : public mDoHIO_entry_c {
|
||||
public:
|
||||
|
||||
+1
-3
@@ -8275,9 +8275,7 @@ static int dKy_Create(void* i_this) {
|
||||
kankyo_class* kankyo = (kankyo_class*)i_this;
|
||||
BOOL next_time_set = false;
|
||||
|
||||
#if TARGET_PC
|
||||
kankyo->base.draw_interp_frame = true;
|
||||
#endif
|
||||
IF_DUSK(kankyo->base.draw_interp_frame = true);
|
||||
|
||||
stage_envr_info_class* stage_envr_p = dComIfGp_getStageEnvrInfo();
|
||||
if (stage_envr_p != NULL && dComIfGp_getStartStageRoomNo() != -1) {
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
// Need 0xC bytes of padding with no symbol between dMenu_Calibration_c::__vtable and the end of
|
||||
// .data
|
||||
@@ -25,7 +27,7 @@ public:
|
||||
virtual void virt_func_0() = 0;
|
||||
};
|
||||
class dummy_child_class : dummy_abstract_class {
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
virtual void virt_func_0() {}
|
||||
#else
|
||||
virtual void virt_func_0();
|
||||
|
||||
@@ -21,16 +21,15 @@
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_meter_haihai.h"
|
||||
#include "d/d_menu_window.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
#if (PLATFORM_WII || PLATFORM_SHIELD)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "d/d_menu_dmap_map.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include <dolphin/gx/GXExtra.h>
|
||||
#endif
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "helpers/string.hpp"
|
||||
#if TARGET_PC
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_Fishing_c::*initFunc)();
|
||||
DUSK_GAME_DATA initFunc map_init_process[] = {
|
||||
|
||||
+12
-13
@@ -1,33 +1,33 @@
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "d/d_menu_fmap.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "JSystem/JKernel/JKRAramArchive.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JKernel/JKRMemArchive.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "d/d_menu_fmap.h"
|
||||
#include "d/d_menu_fmap2D.h"
|
||||
#include "d/d_menu_fmap_map.h"
|
||||
#include "d/d_menu_window.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_meter_HIO.h"
|
||||
#include "d/d_meter_map.h"
|
||||
#include "d/d_meter2_draw.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_msg_scrn_explain.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "helpers/string.hpp"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/memory.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
static dMf_HIO_c g_fmHIO;
|
||||
@@ -783,7 +783,6 @@ void dMenu_Fmap_c::all_map_proc() {
|
||||
{
|
||||
setAreaName(mTitleName[mpDraw2DBack->getSelectRegion()]);
|
||||
mpDraw2DBack->setSpotCursor(0);
|
||||
|
||||
} else {
|
||||
setAreaNameZero();
|
||||
}
|
||||
@@ -1273,7 +1272,7 @@ void dMenu_Fmap_c::spot_map_proc() {
|
||||
f32 pos_y = mpDraw2DBack->getMapAreaGlobalCenterPosY() - mDoGph_gInf_c::getHeightF() * 0.5f;
|
||||
mpMenuFmapMap->getPointStagePathInnerNo(getNowFmapRegionData(), pos_x, pos_y,
|
||||
mStayStageNo, &stage_no, &room_no);
|
||||
|
||||
|
||||
if (mStageCursor != stage_no || mResetAreaName) {
|
||||
mStageCursor = stage_no;
|
||||
mRoomCursor = room_no;
|
||||
|
||||
@@ -17,15 +17,13 @@
|
||||
#include "d/d_msg_scrn_explain.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "d/actor/d_a_midna.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/ui/touch_controls.hpp"
|
||||
#endif
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
void dMenu_Fmap2DBack_c::fMapBackWide() {
|
||||
mpBaseScreen->scale(mDoGph_gInf_c::hudAspectScaleUp, 1.0f);
|
||||
mpBaseScreen->translate(mDoGph_gInf_c::getSafeMinXF(), 0.0f);
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
#include "d/d_debug_viewer.h"
|
||||
#include "d/d_menu_fmap_map.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include <dolphin/gx/GXExtra.h>
|
||||
#endif
|
||||
#include <cstring>
|
||||
|
||||
static u8 twoValueLineInterpolation(u8 i_value1, u8 i_value2, f32 i_param) {
|
||||
return (u8)((f32)i_value1 + i_param * ((f32)i_value2 - (f32)i_value1));
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_Insect_c::*initFunc)();
|
||||
|
||||
@@ -5,26 +5,29 @@
|
||||
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "d/d_menu_item_explain.h"
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_item.h"
|
||||
#include "d/d_kantera_icon_meter.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "d/d_menu_item_explain.h"
|
||||
#include "d/d_select_cursor.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_meter_HIO.h"
|
||||
#include "d/d_msg_scrn_3select.h"
|
||||
#include "d/d_msg_scrn_arrow.h"
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_select_cursor.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "d/d_msg_scrn_3select.h"
|
||||
#include "d/d_msg_scrn_arrow.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_ItemExplain_c::*initFunc)();
|
||||
static initFunc init_process[] = {
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "JSystem/JAudio2/JASDriverIF.h"
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/ui/touch_controls.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_Option_c::*initFunc)();
|
||||
|
||||
@@ -29,14 +29,13 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/game_clock.h"
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/ui/touch_controls.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
typedef void (dMenu_Ring_c::*initFunc)();
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "d/d_msg_scrn_explain.h"
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_select_cursor.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#include "m_Do/m_Do_MemCard.h"
|
||||
#include "m_Do/m_Do_MemCardRWmng.h"
|
||||
@@ -25,8 +24,9 @@
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/mods/svc/save.hpp"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/version.hpp"
|
||||
#endif
|
||||
|
||||
static int SelStartFrameTbl[3] = {
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "f_op/f_op_overlap_mng.h"
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -20,14 +20,14 @@
|
||||
#include "d/d_msg_class.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/ui/icon_provider.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
enum ITEMICON_RES_FILE_ID {
|
||||
ITEMICON_BTI_ARI_MESU_00=0x3,
|
||||
|
||||
+14
-24
@@ -16,18 +16,15 @@
|
||||
#include "d/d_msg_out_font.h"
|
||||
#include "d/d_msg_string.h"
|
||||
#include "d/d_pane_class.h"
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include <cstring>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/string.hpp"
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
#define STR_BUF_LEN 528
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC || VERSION == VERSION_GCN_JPN
|
||||
#define STR_BUF_LEN 528
|
||||
#else
|
||||
#define STR_BUF_LEN 512
|
||||
@@ -297,22 +294,19 @@ void dMeterButton_c::draw() {
|
||||
|
||||
s16 temp_r6 = g_drawHIO.mEmpButton.mRepeatHitFrameNum;
|
||||
s16 temp_r6_2 = g_drawHIO.mEmpButton.mRepeatHitFrameNum / 2;
|
||||
#ifdef TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending())
|
||||
#endif
|
||||
{
|
||||
field_0x4b8[i]++;
|
||||
IF_DUSK_BLOCK(dusk::frame_interp::get_ui_tick_pending())
|
||||
field_0x4b8[i]++;
|
||||
|
||||
if (field_0x4b8[i] >= temp_r6) {
|
||||
field_0x4b8[i] = 0;
|
||||
if (field_0x4b8[i] >= temp_r6) {
|
||||
field_0x4b8[i] = 0;
|
||||
|
||||
if (field_0x4bc[i] == 0) {
|
||||
field_0x4bc[i] = 1;
|
||||
} else {
|
||||
field_0x4bc[i] = 0;
|
||||
}
|
||||
if (field_0x4bc[i] == 0) {
|
||||
field_0x4bc[i] = 1;
|
||||
} else {
|
||||
field_0x4bc[i] = 0;
|
||||
}
|
||||
}
|
||||
IF_DUSK_BLOCK_END
|
||||
|
||||
f32 var_f2;
|
||||
if (temp_r6_2 < field_0x4b8[i]) {
|
||||
@@ -384,7 +378,7 @@ void dMeterButton_c::draw() {
|
||||
}
|
||||
|
||||
if (var_r3) {
|
||||
#ifdef TARGET_PC
|
||||
#if TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending()) {
|
||||
mWasListen[i] = var_r22;
|
||||
mWasRepeat[i] = var_r23;
|
||||
@@ -394,11 +388,7 @@ void dMeterButton_c::draw() {
|
||||
}
|
||||
#endif
|
||||
if (var_r22) {
|
||||
#ifdef TARGET_PC
|
||||
if (field_0x2e8[i] == 18.0f && dusk::frame_interp::get_ui_tick_pending())
|
||||
#else
|
||||
if (field_0x2e8[i] == 18.0f)
|
||||
#endif
|
||||
if (field_0x2e8[i] == 18.0f IF_DUSK(&& dusk::frame_interp::get_ui_tick_pending()))
|
||||
{
|
||||
mDoAud_seStart(Z2SE_SY_HINT_BUTTON_BLINK, NULL, 0, 0);
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
#include "d/dolzel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/d_msg_class.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_class.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_msg_out_font.h"
|
||||
#include "d/d_msg_unit.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include "d/d_msg_out_font.h"
|
||||
#include "m_Do/m_Do_graphic.h"
|
||||
#include "d/d_lib.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/menu_pointer.h"
|
||||
#include "dusk/scope_guard.hpp"
|
||||
#include "dusk/version.hpp"
|
||||
#include "helpers/bits.hpp"
|
||||
|
||||
static bool read_full_color(const void* data, u32 size, u32& ccColor, u32& gcColor) {
|
||||
@@ -31,9 +31,7 @@ static bool read_full_color(const void* data, u32 size, u32& ccColor, u32& gcCol
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if TARGET_PC
|
||||
#define CHAR_CODE_MALE_ICON (dusk::version::isRegionJpn() ? 0x8189 : 0xB2)
|
||||
#define CHAR_CODE_FEMALE_ICON (dusk::version::isRegionJpn() ? 0x818A : 0xB3)
|
||||
#define CHAR_CODE_STAR_ICON (dusk::version::isRegionJpn() ? 0x819A : 0xB1)
|
||||
|
||||
+11
-12
@@ -5,9 +5,12 @@
|
||||
#include "d/d_meter2_info.h"
|
||||
#include "d/d_msg_object.h"
|
||||
#include "d/d_msg_out_font.h"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/version.hpp"
|
||||
#include "f_op/f_op_msg_mng.h"
|
||||
#endif
|
||||
|
||||
COutFontSet_c::COutFontSet_c() {
|
||||
initialize();
|
||||
@@ -315,9 +318,8 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
|
||||
sp256[i] = field_0x1b4[i];
|
||||
}
|
||||
|
||||
#ifdef TARGET_PC
|
||||
bool uiTickPending = dusk::frame_interp::get_ui_tick_pending();
|
||||
if (!uiTickPending) {
|
||||
#if TARGET_PC
|
||||
if (dusk::frame_interp::get_ui_tick_pending()) {
|
||||
for (int i = 0; i < 70; i++) {
|
||||
sp256[i] = -1;
|
||||
}
|
||||
@@ -526,15 +528,12 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
|
||||
case 20:
|
||||
case 21:
|
||||
case 22:
|
||||
#ifdef TARGET_PC
|
||||
if (uiTickPending)
|
||||
#endif
|
||||
{
|
||||
field_0x1b4[type]++;
|
||||
if (field_0x1b4[type] >= 28) {
|
||||
field_0x1b4[type] = 0;
|
||||
}
|
||||
IF_DUSK_BLOCK(dusk::frame_interp::get_ui_tick_pending())
|
||||
field_0x1b4[type]++;
|
||||
if (field_0x1b4[type] >= 28) {
|
||||
field_0x1b4[type] = 0;
|
||||
}
|
||||
IF_DUSK_BLOCK_END
|
||||
|
||||
mpPane[type]->rotate(0.5f * sizeX, 0.5f * sizeY, ROTATE_Z,
|
||||
(360.0f * (f32)field_0x1b4[type]) / 28.0f);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user