mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Header and cmake cleanup. (#310)
This commit is contained in:
@@ -211,6 +211,7 @@ static bool EntranceHandler(std::shared_ptr<Ship::Console> Console, const std::v
|
||||
gPlayState->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gPlayState->transitionType = TRANS_TYPE_INSTANT;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_INSTANT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool VoidHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args,
|
||||
|
||||
+80
-165
@@ -304,15 +304,9 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
VS_GLOBAL_KEYWORD "Win32Proj"
|
||||
)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||
)
|
||||
endif()
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE "TRUE"
|
||||
)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES
|
||||
XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES
|
||||
@@ -328,27 +322,15 @@ endif()
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
get_property(MSVC_RUNTIME_LIBRARY_DEFAULT TARGET ${PROJECT_NAME} PROPERTY MSVC_RUNTIME_LIBRARY)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||
$<$<CONFIG:Debug>:
|
||||
MultiThreadedDebug
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
MultiThreaded
|
||||
>
|
||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||
$<$<CONFIG:Debug>:
|
||||
MultiThreadedDebug
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
MultiThreaded
|
||||
>
|
||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||
)
|
||||
endif()
|
||||
string(CONCAT "MSVC_RUNTIME_LIBRARY_STR"
|
||||
$<$<CONFIG:Debug>:
|
||||
MultiThreadedDebug
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
MultiThreaded
|
||||
>
|
||||
$<$<NOT:$<OR:$<CONFIG:Debug>,$<CONFIG:Release>>>:${MSVC_RUNTIME_LIBRARY_DEFAULT}>
|
||||
)
|
||||
set_target_properties(${PROJECT_NAME} PROPERTIES MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR})
|
||||
endif()
|
||||
################################################################################
|
||||
@@ -428,46 +410,25 @@ target_include_directories(${PROJECT_NAME} PRIVATE assets
|
||||
.
|
||||
)
|
||||
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG;"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_DX11;"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG"
|
||||
">"
|
||||
# "$<$<BOOL:${BUILD_CROWD_CONTROL}>:ENABLE_CROWD_CONTROL>"
|
||||
"INCLUDE_GAME_PRINTF;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG;"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
NOMINMAX
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"NOINCLUDE_GAME_PRINTF;"
|
||||
"_DEBUG;"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_OPENGL"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG;"
|
||||
">"
|
||||
"INCLUDE_GAME_PRINTF;"
|
||||
"NON_EQUIVALENT;"
|
||||
"NON_MATCHING;"
|
||||
"WIN32;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
NOMINMAX
|
||||
)
|
||||
endif()
|
||||
"ENABLE_DX11;"
|
||||
">"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"NDEBUG"
|
||||
">"
|
||||
#"$<$<BOOL:${BUILD_CROWD_CONTROL}>:ENABLE_CROWD_CONTROL>"
|
||||
"INCLUDE_GAME_PRINTF;"
|
||||
#"ENABLE_CROWD_CONTROL;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
NOMINMAX
|
||||
)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:Debug>:"
|
||||
@@ -504,75 +465,44 @@ endif()
|
||||
# Compile and link options
|
||||
################################################################################
|
||||
if(MSVC)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/w;
|
||||
/Od
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/Oi;
|
||||
/Gy;
|
||||
/W3
|
||||
>
|
||||
/sdl-;
|
||||
/permissive-;
|
||||
/MP;
|
||||
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
|
||||
${DEFAULT_CXX_EXCEPTION_HANDLING}
|
||||
)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:/ZI;>)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/RTCs
|
||||
/w
|
||||
/Od
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/O2;
|
||||
/Oi;
|
||||
/Gy
|
||||
>
|
||||
/permissive-;
|
||||
/MP;
|
||||
/sdl-;
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/w;
|
||||
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
|
||||
${DEFAULT_CXX_EXCEPTION_HANDLING}
|
||||
)
|
||||
endif()
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/INCREMENTAL
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/OPT:REF;
|
||||
/OPT:ICF;
|
||||
/INCREMENTAL:NO;
|
||||
/FORCE:MULTIPLE
|
||||
>
|
||||
/MANIFEST:NO;
|
||||
/DEBUG;
|
||||
/SUBSYSTEM:WINDOWS
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/STACK:8777216
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/OPT:REF;
|
||||
/OPT:ICF;
|
||||
/INCREMENTAL:NO;
|
||||
/FORCE:MULTIPLE
|
||||
>
|
||||
/MANIFEST:NO;
|
||||
/DEBUG;
|
||||
/SUBSYSTEM:WINDOWS
|
||||
)
|
||||
endif()
|
||||
/Od
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/Oi;
|
||||
/Gy;
|
||||
/W3
|
||||
>
|
||||
|
||||
/wd4024 #different types for formal and actual parameter [x]. Usually seen along side 4047.
|
||||
/wd4047 #'uintptr_t' differs in levels of indirection from 'Gfx *'. Usually caused by passing a uintptr_t into a function expecting a pointer-types
|
||||
/wd4090 #'initializing': different 'const' qualifiers. Caused when initializing a non const struct member with a const char*.
|
||||
/wd4101 # unreferenced local variable. Things like stack pads.
|
||||
/wd4133 #incompatible types. Usually caused by passing a c string into a function that takes a pointer.
|
||||
/wd4244 #conversion from [a] to [b]. Used to warn when copying to smaller type without a cast.
|
||||
/sdl-;
|
||||
/permissive-;
|
||||
/MP;
|
||||
${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
|
||||
${DEFAULT_CXX_EXCEPTION_HANDLING}
|
||||
)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE $<$<CONFIG:Debug>:/ZI;>)
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:Debug>:
|
||||
/INCREMENTAL
|
||||
>
|
||||
$<$<CONFIG:Release>:
|
||||
/OPT:REF;
|
||||
/OPT:ICF;
|
||||
/INCREMENTAL:NO;
|
||||
/FORCE:MULTIPLE
|
||||
>
|
||||
/MANIFEST:NO;
|
||||
/DEBUG;
|
||||
/SUBSYSTEM:WINDOWS
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
|
||||
@@ -709,34 +639,19 @@ endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
find_package(glfw3 REQUIRED)
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDLib;"
|
||||
"glu32;"
|
||||
"SDL2::SDL2;"
|
||||
"SDL2::SDL2main;"
|
||||
# "$<$<BOOL:${BUILD_CROWD_CONTROL}>:SDL2_net::SDL2_net-static>"
|
||||
"glfw;"
|
||||
"winmm;"
|
||||
"imm32;"
|
||||
"version;"
|
||||
"setupapi"
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDLib;"
|
||||
"glu32;"
|
||||
"SDL2::SDL2;"
|
||||
"SDL2::SDL2main;"
|
||||
"glfw;"
|
||||
"winmm;"
|
||||
"imm32;"
|
||||
"version;"
|
||||
"setupapi"
|
||||
)
|
||||
endif()
|
||||
set(ADDITIONAL_LIBRARY_DEPENDENCIES
|
||||
"libultraship;"
|
||||
"ZAPDLib;"
|
||||
"glu32;"
|
||||
"SDL2::SDL2;"
|
||||
"SDL2::SDL2main;"
|
||||
#"$<$<BOOL:${BUILD_CROWD_CONTROL}>:SDL2_net::SDL2_net-static>"
|
||||
"glfw;"
|
||||
"winmm;"
|
||||
"imm32;"
|
||||
"version;"
|
||||
"setupapi"
|
||||
)
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||
find_package(SDL2)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
#ifndef PR_MBI_H
|
||||
#define PR_MBI_H
|
||||
|
||||
#include <libultraship/libultra/mbi.h>
|
||||
#if 0
|
||||
/**************************************************************************
|
||||
* *
|
||||
* Copyright (C) 1994, Silicon Graphics, Inc. *
|
||||
@@ -94,5 +95,5 @@
|
||||
#ifndef NULL
|
||||
#define NULL ((void*)0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* !_MBI_H_ */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef PR_OS_EXCEPTION_H
|
||||
#define PR_OS_EXCEPTION_H
|
||||
|
||||
#include <libultraship/libultra/exception.h>
|
||||
#if 0
|
||||
#include "ultratypes.h"
|
||||
|
||||
|
||||
@@ -44,6 +45,6 @@ typedef u32 OSHWIntr;
|
||||
//void __osGetHWIntrRoutine(OSHWIntr interrupt, s32 (**handler)(void), void** stackEnd);
|
||||
//void __osSetGlobalIntMask(OSHWIntr mask);
|
||||
//void __osResetGlobalIntMask(OSHWIntr mask);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
#ifndef PR_RDP_H
|
||||
#define PR_RDP_H
|
||||
|
||||
#include <libultraship/libultra/rdp.h>
|
||||
#if 0
|
||||
/* DP Command Registers */
|
||||
#define DPC_START_REG 0x04100000
|
||||
#define DPC_END_REG 0x04100004
|
||||
@@ -45,6 +47,6 @@
|
||||
|
||||
u32 osDpGetStatus(void);
|
||||
void osDpSetStatus(u32 data);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,11 +13,7 @@
|
||||
#define ALIGNED(x) __attribute__ ((aligned (x)))
|
||||
#endif
|
||||
|
||||
#ifdef __sgi /* IDO compiler */
|
||||
#define UNALIGNED __unaligned
|
||||
#else
|
||||
#define UNALIGNED
|
||||
#endif
|
||||
// 2S2H [Port] There was a macro for `UNALIGNED` here. We don't need it for PC and any file that does can include the proper header
|
||||
|
||||
#ifdef __sgi /* IDO compiler */
|
||||
#define ALIGNOF(x) __builtin_alignof(x)
|
||||
|
||||
+2
-2
@@ -278,11 +278,11 @@ extern Gfx gEmptyDL[];
|
||||
|
||||
// __gfxCtx shouldn't be used directly.
|
||||
// Use the DISP macros defined above when writing to display buffers.
|
||||
// 2S2H [Port] Augmented to use our disps helpers
|
||||
// 2S2H [Port] Augmented to use our disps helpers.
|
||||
// 2S2H [Port] There originally a `__dispPad` variable here. Removed because it has no use on PC.
|
||||
#define OPEN_DISPS(gfxCtx) \
|
||||
{ \
|
||||
GraphicsContext* __gfxCtx = gfxCtx; \
|
||||
s32 __dispPad; \
|
||||
OPEN_DISPS_PORT_HELPERS(gfxCtx)
|
||||
|
||||
#define CLOSE_DISPS(gfxCtx) \
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
#ifdef __GNUC__
|
||||
#include <math.h>
|
||||
#else
|
||||
float fabsf(float f);
|
||||
#pragma intrinsic(fabsf)
|
||||
//float fabsf(float f);
|
||||
//#pragma intrinsic(fabsf)
|
||||
#ifdef __GNUC__
|
||||
#define fabsf(f) __builtin_fabsf((float)(f))
|
||||
//#define fabsf(f) __builtin_fabsf((float)(f))
|
||||
#endif
|
||||
|
||||
double sqrt(double d);
|
||||
//double sqrt(double d);
|
||||
#pragma intrinsic(sqrt)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef LIBC_STDARG_H
|
||||
#define LIBC_STDARG_H
|
||||
|
||||
#include <stdarg.h>
|
||||
#if 0
|
||||
// When building with GCC, use the official vaarg macros to avoid warnings
|
||||
// and possibly bad codegen.
|
||||
#ifdef __GNUC__
|
||||
@@ -40,5 +41,5 @@ typedef char *va_list;
|
||||
#define va_end(__list)
|
||||
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif
|
||||
#endif /* STDARG_H */
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef LIBC_STDBOOL_H
|
||||
#define LIBC_STDBOOL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#if 0
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#ifndef __cplusplus
|
||||
@@ -10,5 +11,5 @@
|
||||
#define true 1
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif
|
||||
#endif /* STDBOOL */
|
||||
|
||||
@@ -9,7 +9,7 @@ typedef s32 intptr_t;
|
||||
typedef u32 uintptr_t;
|
||||
#endif
|
||||
// #endregion
|
||||
|
||||
#if 0
|
||||
#define INT8_MIN (-0x80)
|
||||
#define INT16_MIN (-0x8000)
|
||||
#define INT32_MIN (-0x80000000)
|
||||
@@ -28,6 +28,6 @@ typedef u32 uintptr_t;
|
||||
#define INTPTR_MIN (-0x80000000)
|
||||
#define INTPTR_MAX 0x7FFFFFFF
|
||||
#define UINTPTR_MAX 0xFFFFFFFF
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* STDINT_H */
|
||||
|
||||
@@ -4,44 +4,34 @@
|
||||
#include "libc/stddef.h"
|
||||
#include "PR/ultratypes.h"
|
||||
|
||||
#define DECLARE_SEGMENT(name) \
|
||||
// extern u8 _##name##SegmentStart[]; \
|
||||
// extern u8 _##name##SegmentEnd[];
|
||||
#define DECLARE_SEGMENT(name)
|
||||
|
||||
#define DECLARE_ROM_SEGMENT(name) \
|
||||
// extern u8 _##name##SegmentRomStart[]; \
|
||||
// extern u8 _##name##SegmentRomEnd[];
|
||||
#define DECLARE_ROM_SEGMENT(name)
|
||||
|
||||
#define DECLARE_BSS_SEGMENT(name)
|
||||
|
||||
#define DECLARE_BSS_SEGMENT(name) \
|
||||
// extern u8 _##name##SegmentBssStart[]; \
|
||||
// extern u8 _##name##SegmentBssEnd[]; \
|
||||
//
|
||||
#define DECLARE_OVERLAY_SEGMENT(name) \
|
||||
DECLARE_SEGMENT(ovl_##name) \
|
||||
DECLARE_ROM_SEGMENT(ovl_##name)
|
||||
|
||||
#define SEGMENT_START(segment) 0
|
||||
//(_ ## segment ## SegmentStart)
|
||||
|
||||
#define SEGMENT_END(segment) 0
|
||||
//(_ ## segment ## SegmentEnd)
|
||||
|
||||
#define SEGMENT_SIZE(segment) (uintptr_t) 0
|
||||
//((uintptr_t)SEGMENT_END(segment) - (uintptr_t)SEGMENT_START(segment))
|
||||
|
||||
|
||||
#define SEGMENT_ROM_START(segment) NULL
|
||||
//(_ ## segment ## SegmentRomStart)
|
||||
|
||||
#define SEGMENT_ROM_END(segment) NULL
|
||||
//(_ ## segment ## SegmentRomEnd)
|
||||
|
||||
#define SEGMENT_ROM_SIZE(segment) 0
|
||||
//((uintptr_t)SEGMENT_ROM_END(segment) - (uintptr_t)SEGMENT_ROM_START(segment))
|
||||
|
||||
#define SEGMENT_BSS_START(segment) 0
|
||||
//(_ ## segment ## SegmentBssStart)
|
||||
|
||||
#define SEGMENT_BSS_END(segment) 0
|
||||
//(_ ## segment ## SegmentBssEnd)
|
||||
|
||||
#define SEGMENT_BSS_SIZE(segment) 0
|
||||
//((uintptr_t)SEGMENT_BSS_END(segment) - (uintptr_t)SEGMENT_BSS_START(segment))
|
||||
|
||||
#define ROM_FILE(name) \
|
||||
{ (uintptr_t) SEGMENT_ROM_START(name), (uintptr_t)SEGMENT_ROM_END(name) }
|
||||
|
||||
+13
-1
@@ -3,14 +3,18 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// 2S2H [Port] We don't use any Yaz0 data. Applies to everything removed in this file.
|
||||
#if 0
|
||||
u8 sYaz0DataBuffer[0x400] ALIGNED(16);
|
||||
u8* sYaz0CurDataEnd;
|
||||
uintptr_t sYaz0CurRomStart;
|
||||
u32 sYaz0CurSize;
|
||||
u8* sYaz0MaxPtr;
|
||||
void* gYaz0DecompressDstEnd;
|
||||
#endif
|
||||
|
||||
void* Yaz0_FirstDMA() {
|
||||
#if 0
|
||||
u32 pad0;
|
||||
u32 dmaSize;
|
||||
u32 curSize;
|
||||
@@ -23,10 +27,12 @@ void* Yaz0_FirstDMA() {
|
||||
DmaMgr_DmaRomToRam(sYaz0CurRomStart, sYaz0DataBuffer, dmaSize);
|
||||
sYaz0CurRomStart += dmaSize;
|
||||
sYaz0CurSize -= dmaSize;
|
||||
return sYaz0DataBuffer;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* Yaz0_NextDMA(void* curSrcPos) {
|
||||
#if 0
|
||||
u8* dst;
|
||||
u32 restSize;
|
||||
u32 dmaSize;
|
||||
@@ -57,6 +63,7 @@ void* Yaz0_NextDMA(void* curSrcPos) {
|
||||
}
|
||||
|
||||
return dst;
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -69,6 +76,7 @@ typedef struct {
|
||||
#define YAZ0_MAGIC 0x59617A30 // "Yaz0"
|
||||
|
||||
s32 Yaz0_DecompressImpl(u8* src, u8* dst) {
|
||||
#if 0
|
||||
u32 bitIdx = 0;
|
||||
u8* dstEnd;
|
||||
u32 chunkHeader = 0;
|
||||
@@ -123,9 +131,12 @@ s32 Yaz0_DecompressImpl(u8* src, u8* dst) {
|
||||
gYaz0DecompressDstEnd = dstEnd;
|
||||
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Yaz0_Decompress(uintptr_t romStart, void* dst, size_t size) {
|
||||
|
||||
#if 0
|
||||
s32 status;
|
||||
u32 pad;
|
||||
char sp80[0x50];
|
||||
@@ -149,4 +160,5 @@ void Yaz0_Decompress(uintptr_t romStart, void* dst, size_t size) {
|
||||
}
|
||||
|
||||
sYaz0CurDataEnd = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -249,57 +249,7 @@ void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) {
|
||||
|
||||
__gSPInvalidateTexCache(pkt, texAddr);
|
||||
}
|
||||
void func_801A1290(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A1904(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A1E0C(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A2090(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A312C(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A3AC0(void) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A1FB4(u8 playerIndex, Vec3f* pos, u16 seqId, f32 maxDist) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A3A7C(s32 arg0) {
|
||||
|
||||
}
|
||||
|
||||
void func_801A3CD8(s8 param_1) {
|
||||
|
||||
}
|
||||
void func_801A3CF4(s8 arg0) {
|
||||
}
|
||||
void func_801A3D98(s8 audioSetting) {
|
||||
}
|
||||
void func_801A3E38(u8 arg0) {
|
||||
}
|
||||
void func_801A3EC0(u8 arg0) {
|
||||
}
|
||||
void func_801A4058(UNK_TYPE arg0) {
|
||||
}
|
||||
void func_801A41C8(s32 arg0) {
|
||||
}
|
||||
void func_801A41F8(UNK_TYPE arg0) {
|
||||
}
|
||||
void func_801A3000(u16 seqId, u8 ioData) {
|
||||
}
|
||||
u16 func_801A5100(void) {
|
||||
}
|
||||
void __osDispatchThread(void) {
|
||||
@@ -337,8 +287,6 @@ void osMapTLBRdb(void) {
|
||||
}
|
||||
u32 __osProbeTLB(void* param_1) {
|
||||
}
|
||||
void func_801A31EC(u16 seqId, s8 arg1, u8 arg2) {
|
||||
}
|
||||
s32 osAiSetFrequency(u32 frequency) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -86,8 +86,6 @@ void SysCfb_SetHiResMode(void) {
|
||||
s32 rightAdjust;
|
||||
s32 lowerAdjust;
|
||||
|
||||
//! FAKE:
|
||||
l1:
|
||||
rightAdjust = gCfbWidth - 610;
|
||||
lowerAdjust = gCfbHeight - 470;
|
||||
ViMode_Configure(&sNotebookViMode, -1, osTvType, 0, 1, 0, 1, gCfbWidth, gCfbHeight, 30, rightAdjust, 10,
|
||||
|
||||
@@ -99,6 +99,7 @@ void CmpDma_LoadFile(uintptr_t segmentVrom, s32 id, void* dst, size_t size) {
|
||||
|
||||
void CmpDma_LoadAllFiles(uintptr_t segmentVrom, void* dst, size_t size) {
|
||||
return;
|
||||
#if 0
|
||||
uintptr_t rom = DmaMgr_TranslateVromToRom(segmentVrom);
|
||||
u32 i;
|
||||
u32 end;
|
||||
@@ -115,4 +116,5 @@ void CmpDma_LoadAllFiles(uintptr_t segmentVrom, void* dst, size_t size) {
|
||||
CmpDma_LoadFileImpl(rom, i, nextDst, 0);
|
||||
nextDst = gYaz0DecompressDstEnd;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+11
-11
@@ -1951,17 +1951,17 @@ f32 Target_GetAdjustedDistSq(Actor* actor, Player* player, s16 playerShapeYaw) {
|
||||
{ SQ(range), (f32)(range) / (leash) }
|
||||
|
||||
TargetRangeParams gTargetRanges[TARGET_MODE_MAX] = {
|
||||
TARGET_RANGE(70, 140), // TARGET_MODE_0
|
||||
TARGET_RANGE(170, 255), // TARGET_MODE_1
|
||||
TARGET_RANGE(280, 5600), // TARGET_MODE_2
|
||||
TARGET_RANGE(350, 525), // TARGET_MODE_3
|
||||
TARGET_RANGE(700, 1050), // TARGET_MODE_4
|
||||
TARGET_RANGE(1000, 1500), // TARGET_MODE_5
|
||||
TARGET_RANGE(100, 105.36842), // TARGET_MODE_6
|
||||
TARGET_RANGE(140, 163.33333), // TARGET_MODE_7
|
||||
TARGET_RANGE(240, 576), // TARGET_MODE_8
|
||||
TARGET_RANGE(280, 280000), // TARGET_MODE_9
|
||||
TARGET_RANGE(2500, 3750), // TARGET_MODE_10
|
||||
TARGET_RANGE(70.0f, 140.0f), // TARGET_MODE_0
|
||||
TARGET_RANGE(170.0f, 255.0f), // TARGET_MODE_1
|
||||
TARGET_RANGE(280.0f, 5600.0f), // TARGET_MODE_2
|
||||
TARGET_RANGE(350.0f, 525.0f), // TARGET_MODE_3
|
||||
TARGET_RANGE(700.0f, 1050.0f), // TARGET_MODE_4
|
||||
TARGET_RANGE(1000.0f, 1500.0f), // TARGET_MODE_5
|
||||
TARGET_RANGE(100.0f, 105.36842f), // TARGET_MODE_6
|
||||
TARGET_RANGE(140.0f, 163.33333f), // TARGET_MODE_7
|
||||
TARGET_RANGE(240.0f, 576.0f), // TARGET_MODE_8
|
||||
TARGET_RANGE(280.0f, 280000.0f), // TARGET_MODE_9
|
||||
TARGET_RANGE(2500.0f, 3750.0f), // TARGET_MODE_10
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -2655,7 +2655,7 @@ s32 Camera_Normal0(Camera* camera) {
|
||||
camera->pitchUpdateRateInv = Camera_ScaledStepToCeilF(16.0f, camera->pitchUpdateRateInv, spA0, 0.1f);
|
||||
camera->yOffsetUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->yOffsetUpdateRate, spA4, 0.0001f);
|
||||
camera->xzOffsetUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->xzOffsetUpdateRate, spA0, 0.0001f);
|
||||
camera->fovUpdateRate = Camera_ScaledStepToCeilF(0.05, camera->fovUpdateRate, camera->speedRatio * 0.05f, 0.0001f);
|
||||
camera->fovUpdateRate = Camera_ScaledStepToCeilF(0.05f, camera->fovUpdateRate, camera->speedRatio * 0.05f, 0.0001f);
|
||||
|
||||
if (!(roData->interfaceFlags & NORMAL0_FLAG_7)) {
|
||||
Camera_CalcAtDefault(camera, &sp78, roData->unk_00, roData->interfaceFlags & NORMAL0_FLAG_0);
|
||||
@@ -2858,8 +2858,6 @@ s32 Camera_Parallel1(Camera* camera) {
|
||||
rwData->unk_00 = (bgCamFuncData->unk_0E == -1)
|
||||
? roData->unk_04
|
||||
: CAM_RODATA_UNSCALE(bgCamFuncData->unk_0E) * focalActorHeight * yNormal;
|
||||
//! FAKE
|
||||
dummy:;
|
||||
} else {
|
||||
rwData->unk_08 = roData->unk_14;
|
||||
rwData->unk_00 = roData->unk_04;
|
||||
@@ -4922,8 +4920,6 @@ s32 Camera_Fixed2(Camera* camera) {
|
||||
rwData->unk_00 = OLib_AddVecGeoToVec3f(new_var1, &sp70);
|
||||
} else {
|
||||
rwData->unk_00 = *eye;
|
||||
//! FAKE:
|
||||
dummy:;
|
||||
}
|
||||
} else {
|
||||
rwData->unk_00 = camera->eye;
|
||||
|
||||
@@ -59,8 +59,8 @@ void KaleidoManager_ClearOvl(KaleidoMgrOverlay* ovl) {
|
||||
}
|
||||
|
||||
void KaleidoManager_Init(PlayState* play) {
|
||||
s32 largestSize = 0;
|
||||
s32 size;
|
||||
size_t largestSize = 0;
|
||||
size_t size;
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(gKaleidoMgrOverlayTable); i++) {
|
||||
|
||||
@@ -3167,7 +3167,8 @@ void Environment_DrawSkyboxStarsImpl(PlayState* play, Gfx** gfxP) {
|
||||
{ 65, 164, 255, 255 }, { 131, 164, 230, 255 }, { 98, 205, 255, 255 }, { 82, 82, 255, 255 },
|
||||
{ 123, 164, 164, 255 }, { 98, 205, 255, 255 }, { 98, 164, 230, 255 }, { 255, 90, 0, 255 },
|
||||
};
|
||||
UNALIGNED static const Color_RGBA8_u32 D_801DD900[] = {
|
||||
// 2S2H [Port] This originally had `UNALIGNED` however we don't need that for PC and it was causing warnings in the header file
|
||||
static const Color_RGBA8_u32 D_801DD900[] = {
|
||||
{ 64, 80, 112, 255 }, { 96, 96, 128, 255 }, { 128, 112, 144, 255 }, { 160, 128, 160, 255 },
|
||||
{ 192, 144, 168, 255 }, { 224, 160, 176, 255 }, { 224, 160, 176, 255 }, { 104, 104, 136, 255 },
|
||||
{ 136, 120, 152, 255 }, { 168, 136, 168, 255 }, { 200, 152, 184, 255 }, { 232, 168, 184, 255 },
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user