mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-29 08:12:52 -04:00
change ANDROID define to TARGET_ANDROID
This commit is contained in:
@@ -301,6 +301,10 @@ if (MSVC)
|
||||
add_link_options("/INCREMENTAL")
|
||||
endif ()
|
||||
|
||||
if(ANDROID)
|
||||
list(APPEND GAME_COMPILE_DEFS TARGET_ANDROID=1)
|
||||
endif ()
|
||||
|
||||
# game_debug is for game code files that we know work when compiled with DEBUG=1
|
||||
# Of course, if building a release build, this distinction is irrelevant
|
||||
add_library(game_debug OBJECT ${JSYSTEM_DEBUG_FILES} ${SSYSTEM_FILES}
|
||||
|
||||
@@ -11,13 +11,13 @@
|
||||
struct JASCalc {
|
||||
static void imixcopy(const s16*, const s16*, s16*, u32);
|
||||
static void bcopyfast(const void* src, void* dest, u32 size);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
static void _bcopy(const void* src, void* dest, u32 size);
|
||||
#else
|
||||
static void bcopy(const void* src, void* dest, u32 size);
|
||||
#endif
|
||||
static void bzerofast(void* dest, u32 size);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
static void _bzero(void* dest, u32 size);
|
||||
#else
|
||||
static void bzero(void* dest, u32 size);
|
||||
|
||||
@@ -55,7 +55,7 @@ void JASDriver::initAI(void (*param_0)(void)) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
sDmaDacBuffer[i] = JKR_NEW_ARRAY_ARGS(s16, dacSize, JASDram, 0x20);
|
||||
JUT_ASSERT(102, sDmaDacBuffer[i])
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(sDmaDacBuffer[i], size);
|
||||
#else
|
||||
JASCalc::bzero(sDmaDacBuffer[i], size);
|
||||
@@ -67,7 +67,7 @@ void JASDriver::initAI(void (*param_0)(void)) {
|
||||
for (int i = 0; i < data_804507A8; i++) {
|
||||
sDspDacBuffer[i] = JKR_NEW_ARRAY_ARGS(s16, getDacSize(), JASDram, 0x20);
|
||||
JUT_ASSERT(119, sDspDacBuffer[i]);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(sDspDacBuffer[i], size);
|
||||
#else
|
||||
JASCalc::bzero(sDspDacBuffer[i], size);
|
||||
|
||||
@@ -69,7 +69,7 @@ JASBasicBank* JASBNKParser::Ver1::createBasicBank(void const* stream, JKRHeap* h
|
||||
JUT_ASSERT(145, list_chunk);
|
||||
|
||||
u8* envt = JKR_NEW_ARRAY_ARGS(u8, envt_chunk->mSize, heap, 2);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bcopy(envt_chunk->mData, envt, envt_chunk->mSize);
|
||||
#else
|
||||
JASCalc::bcopy(envt_chunk->mData, envt, envt_chunk->mSize);
|
||||
@@ -219,7 +219,7 @@ JASBasicBank* JASBNKParser::Ver0::createBasicBank(void const* stream, JKRHeap* h
|
||||
int size = endPtr - points;
|
||||
JASOscillator::Point* table = JKR_NEW_ARRAY_ARGS(JASOscillator::Point, size, heap, 0);
|
||||
JUT_ASSERT(396, table != NULL);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
#else
|
||||
JASCalc::bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
@@ -235,7 +235,7 @@ JASBasicBank* JASBNKParser::Ver0::createBasicBank(void const* stream, JKRHeap* h
|
||||
int size = endPtr - points;
|
||||
JASOscillator::Point* table = JKR_NEW_ARRAY_ARGS(JASOscillator::Point, size, heap, 0);
|
||||
JUT_ASSERT(409, table != NULL);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
#else
|
||||
JASCalc::bcopy(points, table, size * sizeof(JASOscillator::Point));
|
||||
|
||||
@@ -13,7 +13,7 @@ void JASBasicBank::newInstTable(u8 num, JKRHeap* heap) {
|
||||
JUT_ASSERT(31, num <= JASBank::PRG_OSC);
|
||||
mInstNumMax = num;
|
||||
mInstTable = JKR_NEW_ARRAY_ARGS(JASInst*, mInstNumMax, heap, 0);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(mInstTable, mInstNumMax * 4);
|
||||
#else
|
||||
JASCalc::bzero(mInstTable, mInstNumMax * 4);
|
||||
|
||||
@@ -13,7 +13,7 @@ JASBasicInst::JASBasicInst() {
|
||||
mPitch = 1.0;
|
||||
mKeymapCount = 0;
|
||||
mKeymap = NULL;
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(field_0xc, sizeof(field_0xc));
|
||||
#else
|
||||
JASCalc::bzero(field_0xc, sizeof(field_0xc));
|
||||
|
||||
@@ -33,7 +33,7 @@ void JASCalc::bcopyfast(const void* src, void* dest, u32 size) {
|
||||
}
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
void JASCalc::_bcopy(const void* src, void* dest, u32 size) {
|
||||
#else
|
||||
void JASCalc::bcopy(const void* src, void* dest, u32 size) {
|
||||
@@ -94,7 +94,7 @@ void JASCalc::bzerofast(void* dest, u32 size) {
|
||||
}
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
void JASCalc::_bzero(void* dest, u32 size) {
|
||||
#else
|
||||
void JASCalc::bzero(void* dest, u32 size) {
|
||||
|
||||
@@ -434,7 +434,7 @@ void JASDsp::initBuffer() {
|
||||
JUT_ASSERT(354, CH_BUF);
|
||||
FX_BUF = JKR_NEW_ARRAY_ARGS(FxBuf, 4, JASDram, 0x20);
|
||||
JUT_ASSERT(356, FX_BUF);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(CH_BUF, sizeof(TChannel) * DSP_CHANNELS);
|
||||
JASCalc::_bzero(FX_BUF, sizeof(FxBuf) * 4);
|
||||
#else
|
||||
@@ -465,7 +465,7 @@ int JASDsp::setFXLine(u8 param_0, s16* buffer, JASDsp::FxlineConfig_* param_2) {
|
||||
if (buffer != NULL && param_2 != NULL) {
|
||||
u32 bufsize = param_2->field_0xc * 0xa0;
|
||||
puVar3->field_0x4 = buffer;
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(buffer, bufsize);
|
||||
#else
|
||||
JASCalc::bzero(buffer, bufsize);
|
||||
|
||||
@@ -18,7 +18,7 @@ void JASDrumSet::newPercArray(u8 num, JKRHeap* heap) {
|
||||
JUT_ASSERT(39, num <= 128);
|
||||
mPercNumMax = num;
|
||||
mPercArray = JKR_NEW_ARRAY_ARGS(TPerc*, mPercNumMax, heap, 0);
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bzero(mPercArray, mPercNumMax * sizeof(TPerc*));
|
||||
#else
|
||||
JASCalc::bzero(mPercArray, mPercNumMax * sizeof(TPerc*));
|
||||
|
||||
@@ -53,7 +53,7 @@ int JASReportCopyBuffer(char *param_1,int lines) {
|
||||
r30 = sLineMax - 1;
|
||||
}
|
||||
src = &sBuffer[r30 * 64];
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bcopy(src, dest, 64);
|
||||
#else
|
||||
JASCalc::bcopy(src, dest, 64);
|
||||
|
||||
@@ -33,7 +33,7 @@ void* JASTaskThread::allocCallStack(JASThreadCallback callback, const void* msg,
|
||||
}
|
||||
|
||||
callStack->msgType_ = 1;
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
JASCalc::_bcopy(msg, callStack->msg.buffer, msgSize);
|
||||
#else
|
||||
JASCalc::bcopy(msg, callStack->msg.buffer, msgSize);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ void *_memcpy(void* dest, void const* src, int n) {
|
||||
}
|
||||
|
||||
void DCZeroRange(void* addr, uint32_t nBytes) {
|
||||
#if defined(_MSC_VER) || ANDROID
|
||||
#if defined(_MSC_VER) || TARGET_ANDROID
|
||||
memset(addr, 0, nBytes);
|
||||
#else
|
||||
bzero(addr, nBytes);
|
||||
|
||||
@@ -47,7 +47,7 @@ void fileDialogCallback(void* userdata, const char* const* filelist, [[maybe_unu
|
||||
ImGuiPreLaunchWindow::ImGuiPreLaunchWindow() = default;
|
||||
|
||||
bool ImGuiPreLaunchWindow::isSelectedPathValid() const {
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
return !m_selectedIsoPath.empty(); // unsure why SDL_GetPathInfo doesnt work here
|
||||
#else
|
||||
return !m_selectedIsoPath.empty() && SDL_GetPathInfo(m_selectedIsoPath.c_str(), nullptr);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "tracy/Tracy.hpp"
|
||||
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
#include "android/log.h"
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
@@ -97,7 +97,7 @@ static bool IsForStubLog(const char* message) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#if ANDROID
|
||||
#if TARGET_ANDROID
|
||||
void aurora_log_callback(AuroraLogLevel level, const char* module, const char* message,
|
||||
unsigned int len) {
|
||||
ZoneScoped;
|
||||
|
||||
Reference in New Issue
Block a user