mirror of
https://github.com/zeldaret/tp
synced 2026-05-31 17:32:37 -04:00
standard compiler compatibility changes (#3040)
* move math to cmath * replace stdarg to cstdarg * change stdint to stdint.h * minor fixes * change stdio to cstdio * change stdlib to stdlib * renamed ctype to cctype * fix missing argument for UNSET_FLAG
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define J2DPRINT_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include <stdarg>
|
||||
#include <cstdarg>
|
||||
|
||||
class JUTFont;
|
||||
class J2DPrint;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
class J3DJoint;
|
||||
class J3DMaterialAnm;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DEnum.h"
|
||||
#include "dolphin/gd/GDBase.h"
|
||||
#include "dolphin/mtx.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
class J3DMatPacket;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JAISEQDATAMGR_H
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <bitset>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/JGadget/std-memory.h"
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace JGadget {
|
||||
namespace vector {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JORMCONTEXT_H
|
||||
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JSupport/JSUMemoryStream.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JKREXPHEAP_H
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jkernel
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMATRIGONOMETRIC_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include <utility>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
|
||||
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JPAEMITTER_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
#include "JSystem/JParticle/JPAList.h"
|
||||
#include "JSystem/JParticle/JPARandom.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef FUNCTIONVALUE_H
|
||||
#define FUNCTIONVALUE_H
|
||||
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include "JSystem/JGadget/std-vector.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSTUDIO_MATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
#define m_PI_D 3.141592653589793
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JStudio/JStudio/jstudio-control.h"
|
||||
#include "global.h"
|
||||
#include <limits>
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSUPPORT_H
|
||||
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include <stdarg>
|
||||
#include <cstdarg>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTDIRECTPRINT_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include <stdarg>
|
||||
#include <cstdarg>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include <stdarg>
|
||||
#include <cstdarg>
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTTEXTURE_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
class JUTPalette;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef C_M3D_H_
|
||||
#define C_M3D_H_
|
||||
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class cM3dGAab;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_XYZ_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
struct cXyz : Vec {
|
||||
static const cXyz Zero;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_resorce.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define D_MENU_D_MENU_DMAP_MAP_H
|
||||
|
||||
#include "d/d_menu_dmap.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
class dMenu_DmapMap_c {
|
||||
public:
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
|
||||
|
||||
// Fixes weak function/RTTI ordering
|
||||
#include <math> // IWYU pragma: export
|
||||
#include <cmath> // IWYU pragma: export
|
||||
#include <cstring> // IWYU pragma: export
|
||||
#include "Z2AudioLib/Z2AudioArcLoader.h" // IWYU pragma: export
|
||||
#include "JSystem/JAudio2/JAUStreamAramMgr.h" // IWYU pragma: export
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/esp.h>
|
||||
#include "global.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -185,8 +186,6 @@ typedef struct DVDGameTOC {
|
||||
DVDPartitionInfo* partitionInfos;
|
||||
} DVDGameTOC;
|
||||
|
||||
#define ROUND(n, a) (((u32)(n) + (a)-1) & ~((a)-1))
|
||||
|
||||
typedef struct DVDPartitionParams DVDPartitionParams;
|
||||
|
||||
struct DVDPartitionParams {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CONTEXT_BTE_H
|
||||
#define CONTEXT_BTE_H
|
||||
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
// taken from https://github.com/doldecomp/sdk_2009-12-11/blob/main/include/context_bte.h
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "CaptureScreen.h"
|
||||
#include "global.h"
|
||||
|
||||
CaptureScreen::CaptureScreen(const JFWDisplay* pDisplay) {
|
||||
mpDisplay = pDisplay;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JKernel/JKRExpHeap.h"
|
||||
#include "JSystem/JKernel/JKRFileCache.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
#include "m_Do/m_Do_dvd_thread.h"
|
||||
#include "m_Do/m_Do_ext.h"
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
#include "JSystem/J2DGraph/J2DPrint.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include <stdio>
|
||||
#include <stdlib>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
char* J2DPrint::mStrBuff;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "JSystem/J2DGraph/J2DTevs.h"
|
||||
#include "JSystem/J2DGraph/J2DMaterial.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include "dolphin/gx.h"
|
||||
|
||||
void J2DTexMtx::load(u32 mtxIdx) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DShapeDraw.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <string>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#include <dolphin/gx.h>
|
||||
|
||||
u32 J3DShapeDraw::countVertex(u32 stride) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/J3DU/J3DUClipper.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
void J3DUClipper::init() {
|
||||
mNear = 1.0f;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAHostIO/JAHioUtil.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
|
||||
char JAHioUtil::mStringBuffer[256];
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "dolphin/ai.h"
|
||||
#include <dolphin/os.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
s16* JASDriver::sDmaDacBuffer[3];
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "JSystem/JAudio2/JASReport.h"
|
||||
#include "JSystem/JKernel/JKRSolidHeap.h"
|
||||
#include "dolphin/dsp.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JASAudioThread::JASAudioThread(int stackSize, int msgCount, u32 threadPriority)
|
||||
:
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JAudio2/JASMutex.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JASBasicWaveBank::JASBasicWaveBank() {
|
||||
mWaveTable = NULL;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASCalc.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
void JASCalc::imixcopy(const s16* s1, const s16* s2, s16* dst, u32 n) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JAudio2/JASCalc.h"
|
||||
#include "JSystem/JAudio2/JASMutex.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
|
||||
static OSMutex sMutex;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JAudio2/JASSimpleWaveBank.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JASSimpleWaveBank::JASSimpleWaveBank() {
|
||||
mWaveTable = NULL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JKernel/JKRDvdAramRipper.h"
|
||||
#include <string>
|
||||
#include "dolphin/os.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JASHeap* JASWaveArcLoader::sAramHeap;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "dolphin/gx.h"
|
||||
#include <dolphin/vi.h>
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
void JFWDisplay::ctor_subroutine(bool enableAlpha) {
|
||||
mEnableAlpha = enableAlpha;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "JSystem/JGadget/binary.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
#if DEBUG
|
||||
static void dummyString() {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/JGadget/define.h"
|
||||
|
||||
#define MSL_USE_INLINES 1
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
|
||||
JGadget_outMessage::JGadget_outMessage(MessageFunc fn, const char* file, int line) {
|
||||
mMsgFunc = fn;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "JSystem/JGadget/std-stream.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <float.h>
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JKernel/JKRDvdFile.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
|
||||
JKRAramArchive::JKRAramArchive() {}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JKernel/JKRAramPiece.h"
|
||||
#include "JSystem/JSupport/JSUFileStream.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
#if PLATFORM_GCN
|
||||
const u32 stack_size = 0xc00;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRArchive.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
|
||||
u32 JKRArchive::sCurrentDirID;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include "JSystem/JKernel/JKRMemArchive.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JKRCompArchive::JKRCompArchive(s32 entryNum, JKRArchive::EMountDirection eMountDirection)
|
||||
: JKRArchive(entryNum, MOUNT_COMP) {
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
#include "JSystem/JKernel/JKRDvdRipper.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JKRDvdArchive::JKRDvdArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection)
|
||||
: JKRArchive(entryNum, MOUNT_DVD) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/JKernel/JKRDvdFile.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JSUList<JKRDvdFile> JKRDvdFile::sDvdList;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <string>
|
||||
#include <dolphin/os.h>
|
||||
#include "dolphin/vi.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
static int JKRDecompressFromDVD(JKRDvdFile*, void*, u32, u32, u32, u32, u32*);
|
||||
static int decompSZS_subroutine(u8*, u8*);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "JSystem/JSupport/JSupport.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <stdlib>
|
||||
#include <cstdlib>
|
||||
|
||||
JKRExpHeap* JKRExpHeap::createRoot(int maxHeaps, bool errorFlag) {
|
||||
JKRExpHeap* heap = NULL;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
#include "global.h"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#define MSL_USE_INLINES 1 // needed to inline tolower call. not inlined elsewhere in the repo
|
||||
|
||||
#include <string>
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include "global.h"
|
||||
|
||||
JKRFileLoader* JKRFileLoader::sCurrentVolume;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#if DEBUG
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include <string>
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JKRMemArchive::JKRMemArchive(s32 entryNum, JKRArchive::EMountDirection mountDirection)
|
||||
: JKRArchive(entryNum, MOUNT_MEM) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdlib>
|
||||
#include <stdint.h>
|
||||
#include <cstdlib>
|
||||
|
||||
JKRSolidHeap* JKRSolidHeap::create(u32 size, JKRHeap* heap, bool useErrorHandler) {
|
||||
if (!heap) {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JSUList<JKRThread> JKRThread::sThreadList(0);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JMath/JMATrigonometric.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include "global.h"
|
||||
|
||||
static f32 dummy() {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "JSystem/JUtility/JUTException.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include <math>
|
||||
#include <stdlib>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <limits>
|
||||
|
||||
namespace JStudio {
|
||||
@@ -291,7 +291,11 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
|
||||
}
|
||||
break;
|
||||
case 1: {
|
||||
#ifdef __MWERKS__
|
||||
div_t dt = div(index, size - 1);
|
||||
#else
|
||||
div_t dt = div((int)index, (int)size - 1);
|
||||
#endif
|
||||
index = dt.rem;
|
||||
if (index < 0) {
|
||||
index = size + index;
|
||||
@@ -304,7 +308,11 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
|
||||
index = 0;
|
||||
} else {
|
||||
u32 uVar3 = (u32)(size - 2) * 2;
|
||||
#ifdef __MWERKS__
|
||||
div_t dt2 = div(index, uVar3);
|
||||
#else
|
||||
div_t dt2 = div((int)index, (int)uVar3);
|
||||
#endif
|
||||
index = dt2.rem;
|
||||
if (index < 0) {
|
||||
index += uVar3;
|
||||
@@ -315,8 +323,12 @@ f64 TFunctionValue_composite::composite_index(TVector_pointer<TFunctionValue*> c
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __MWERKS__
|
||||
std::advance_pointer(local_148, index + 1);
|
||||
#else
|
||||
std::advance(local_148, index + 1);
|
||||
#endif
|
||||
pFront = *local_148;
|
||||
return pFront->getValue(param_3);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/JStudio/JStudio/jstudio-math.h"
|
||||
#include "JSystem/JGeometry.h"
|
||||
#include "JSystem/TPosition3.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
void JStudio::math::getRotation_xyz(MtxP param_1, f32 x, f32 y, f32 z) {
|
||||
f32 cosx = cosf(DEG_TO_RAD(x));
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/JStudio/JStudio/stb-data-parse.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "dolphin/os.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace JStudio {
|
||||
namespace stb {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDbPrint.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
#include <dolphin/vi.h>
|
||||
|
||||
namespace JUTAssertion {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include "dolphin/gx.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JUTCacheFont::JUTCacheFont(ResFONT const* p_fontRes, u32 cacheSize, JKRHeap* p_heap) {
|
||||
initialize_state();
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include <dolphin/vi.h>
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
#include "global.h"
|
||||
|
||||
JUTConsoleManager* JUTConsoleManager::sManager;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
|
||||
JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) {
|
||||
mFont = pFont;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "JSystem/JUtility/JUTDirectFile.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
int JUTDirectFile::fetch32byte() {
|
||||
mToRead = mLength - ALIGN_PREV(mPos, DVD_MIN_TRANSFER_SIZE);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include <stdio>
|
||||
#include <cstdio>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
#include "JSystem/JUtility/JUTDirectFile.h"
|
||||
#include <math>
|
||||
#include <stdio>
|
||||
#include <stdlib>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
OSMessageQueue JUTException::sMessageQueue = {0};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
u32 JUTGamePad::CRumble::sChannelMask[4] = {
|
||||
PAD_CHAN0_BIT,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTGraphFifo.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
static bool data_804514B8;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include "JSystem/JUtility/JUTVideo.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
JUTProcBar::JUTProcBar() {
|
||||
mVisible = true;
|
||||
|
||||
@@ -151,6 +151,62 @@ MSL_INLINE float tanf(float x) {
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
|
||||
namespace std {
|
||||
template<typename T>
|
||||
inline double fabs(T x) {
|
||||
return ::fabs(x);
|
||||
}
|
||||
|
||||
inline float fabs(float num) {
|
||||
return ::fabsf(num);
|
||||
}
|
||||
|
||||
inline float fabsf(float num) {
|
||||
return ::fabsf(num);
|
||||
}
|
||||
|
||||
inline float sqrt(float x) {
|
||||
return ::sqrtf(x);
|
||||
}
|
||||
|
||||
inline float abs(float x) {
|
||||
return ::fabsf(x);
|
||||
}
|
||||
|
||||
inline float fmod(float x, float y) {
|
||||
return ::fmod(x, y);
|
||||
}
|
||||
|
||||
inline float ceil(float num) {
|
||||
return ::ceilf(num);
|
||||
}
|
||||
|
||||
inline float floor(float num) {
|
||||
return ::floorf(num);
|
||||
}
|
||||
|
||||
inline float tan(float num) {
|
||||
return ::tanf(num);
|
||||
}
|
||||
|
||||
inline float tanf(float num) {
|
||||
return ::tanf(num);
|
||||
}
|
||||
|
||||
inline float acos(float num) {
|
||||
return ::acosf(num);
|
||||
}
|
||||
|
||||
inline float pow(float x, float y) {
|
||||
return ::pow(x, y);
|
||||
}
|
||||
|
||||
inline float pow(float x, int y) {
|
||||
// FIXME: Needs to use powf
|
||||
return ::pow(x, y);
|
||||
}
|
||||
} // namespace std
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,4 +13,24 @@
|
||||
#define stdout (&__files._stdout)
|
||||
#define stderr (&__files._stderr)
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <stdarg>
|
||||
|
||||
extern "C" {
|
||||
namespace std {
|
||||
using ::fputs;
|
||||
using ::fflush;
|
||||
using ::fclose;
|
||||
using ::fprintf;
|
||||
using ::printf;
|
||||
using ::sprintf;
|
||||
using ::snprintf;
|
||||
using ::vsnprintf;
|
||||
using ::vprintf;
|
||||
using ::vswprintf;
|
||||
using ::sscanf;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,4 +5,18 @@
|
||||
#include <arith.h>
|
||||
#include <strtoul.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
namespace std {
|
||||
using ::strtol;
|
||||
using ::strtoul;
|
||||
using ::div;
|
||||
using ::exit;
|
||||
using ::abort;
|
||||
using ::atoi;
|
||||
using ::atof;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
#ifndef MSL_MATH_H_
|
||||
#define MSL_MATH_H_
|
||||
|
||||
#include <cmath>
|
||||
|
||||
namespace std {
|
||||
template<typename T>
|
||||
inline double fabs(T x) {
|
||||
return ::fabs(x);
|
||||
}
|
||||
|
||||
inline float fabs(float num) {
|
||||
return ::fabsf(num);
|
||||
}
|
||||
|
||||
inline float fabsf(float num) {
|
||||
return ::fabsf(num);
|
||||
}
|
||||
|
||||
inline float sqrt(float x) {
|
||||
return ::sqrtf(x);
|
||||
}
|
||||
|
||||
inline float abs(float x) {
|
||||
return ::fabsf(x);
|
||||
}
|
||||
|
||||
inline float fmod(float x, float y) {
|
||||
return ::fmod(x, y);
|
||||
}
|
||||
|
||||
inline float ceil(float num) {
|
||||
return ::ceilf(num);
|
||||
}
|
||||
|
||||
inline float floor(float num) {
|
||||
return ::floorf(num);
|
||||
}
|
||||
|
||||
inline float tan(float num) {
|
||||
return ::tanf(num);
|
||||
}
|
||||
|
||||
inline float tanf(float num) {
|
||||
return ::tanf(num);
|
||||
}
|
||||
|
||||
inline float acos(float num) {
|
||||
return ::acosf(num);
|
||||
}
|
||||
|
||||
inline float pow(float x, float y) {
|
||||
return ::pow(x, y);
|
||||
}
|
||||
|
||||
inline float pow(float x, int y) {
|
||||
// FIXME: Needs to use powf
|
||||
return ::pow(x, y);
|
||||
}
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
@@ -7,7 +7,7 @@
|
||||
#undef MSL_INLINE
|
||||
#define MSL_INLINE __declspec(weak)
|
||||
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
|
||||
#if PLATFORM_GCN
|
||||
#define ctrl __control_char
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "extras.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
|
||||
int stricmp(const char* str1, const char* str2) {
|
||||
char a_var;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "buffer_io.h"
|
||||
#include "file_io.h"
|
||||
#include "FILE_POS.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
|
||||
int fclose(FILE* file) {
|
||||
int flush_result, close_result;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <locale>
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <wctype_api.h>
|
||||
#include <mbstring.h>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "mbstring.h"
|
||||
#include "scanf.h"
|
||||
#include "wchar_io.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "scanf.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <cstdio>
|
||||
#include "ansi_fp.h"
|
||||
#include <locale>
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include "float.h"
|
||||
#include <cmath>
|
||||
#include <climits>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "strtoul.h"
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
#include "errno.h"
|
||||
#include <climits>
|
||||
#include "scanf.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <ctype>
|
||||
#include <cctype>
|
||||
|
||||
const unsigned short __wctype_mapC[256] = {
|
||||
ctype_cntrl,
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "SSystem/SComponent/c_sxyz.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <limits>
|
||||
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
|
||||
#endif
|
||||
|
||||
const f32 G_CM3D_F_ABS_MIN = 32 * FLT_EPSILON;
|
||||
|
||||
void cM3d_InDivPos1(const Vec* pVecA, const Vec* pVecB, f32 pF, Vec* pOut) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "SSystem/SComponent/c_m3d.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
s16 cM_rad2s(f32 rad) {
|
||||
s32 s = (std::fmod(rad, 2 * M_PI) * (0x8000 / M_PI));
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <limits>
|
||||
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
|
||||
#endif
|
||||
|
||||
cXyz cXyz::operator+(const Vec& vec) const {
|
||||
Vec ret;
|
||||
PSVECAdd(this, &vec, &ret);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "TRK_MINNOW_DOLPHIN/MetroTRK/Portable/mem_TRK.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
|
||||
#pragma dont_inline on
|
||||
void TRK_fill_mem(void* dst, int val, u32 n) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "TRK_MINNOW_DOLPHIN/ppc/Generic/targimpl.h"
|
||||
#include "TRK_MINNOW_DOLPHIN/utils/common/MWTrace.h"
|
||||
#include <stdint>
|
||||
#include <stdint.h>
|
||||
#include <cstring>
|
||||
|
||||
typedef struct memRange {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "Z2AudioLib/Z2Calc.h"
|
||||
#include "JSystem/JMath/random.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
f32 Z2Calc::linearTransform(f32 inValue, f32 inMin, f32 inMax, f32 outMin, f32 outMax, bool noClamp) {
|
||||
f32 transformed = outMin + ((inValue - inMin) * ((outMax - outMin) / (inMax - inMin)));
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
#include "Z2AudioLib/Z2Audience.h"
|
||||
#include "JSystem/JAudio2/JAUSoundAnimator.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <limits>
|
||||
#define FLT_MAX std::numeric_limits<float>::max()
|
||||
#endif
|
||||
|
||||
#if PLATFORM_WII || PLATFORM_SHIELD
|
||||
#include "Z2AudioLib/Z2AudioCS.h"
|
||||
#endif
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMaterial.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "c/c_damagereaction.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
enum B_bq_RES_File_ID {
|
||||
/* BCK */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
|
||||
#include "d/actor/d_a_b_tn.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "d/actor/d_a_boomerang.h"
|
||||
#include "d/actor/d_a_nbomb.h"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include "Z2AudioLib/Z2Instances.h"
|
||||
#include "JSystem/JAudio2/JAUSectionHeap.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
enum Joint {
|
||||
/* 0x00 */ JNT_CENTER,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
int daB_ZANTM_c::draw() {
|
||||
g_env_light.settingTevStruct(0, ¤t.pos, &tevStr);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/actor/d_a_player.h"
|
||||
#include "SSystem/SComponent/c_math.h"
|
||||
#include <math>
|
||||
#include <cmath>
|
||||
|
||||
namespace {
|
||||
dCcD_SrcSph cc_zant_src = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user