Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downgrade STLport to 5.0.2 #368

Merged
merged 26 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a6c83d7
Replace STLport 5.1.5 with 5.0.3
TheNathannator Sep 29, 2024
5a746e5
Add .editorconfig configuration for STLport
TheNathannator Sep 29, 2024
b4bf2a4
Add readme/license files to STLport directory
TheNathannator Sep 29, 2024
8f2839f
Add configuration headers for GC/Wii MWCC
TheNathannator Sep 29, 2024
d517562
Change MSL_C++ C wrapper headers to use MSL_C/ include path
TheNathannator Sep 29, 2024
a464db1
Set MWCC defines in VS Code C/C++ properties
TheNathannator Sep 29, 2024
a2a9bfa
Restore STLport configuration
TheNathannator Sep 29, 2024
92c3241
Miscellaneous fixes/hacks
TheNathannator Sep 29, 2024
9c8ce4b
Re-introduce StlNodeAlloc
TheNathannator Sep 29, 2024
7b4eb1b
Remove explicit `unsigned short` arguments to std::vector
TheNathannator Sep 30, 2024
a8dc5fd
Start re-introducing modified vector as a separate opt-in feature
TheNathannator Sep 30, 2024
17129d3
Add helper macros for vector size parameter specification
TheNathannator Sep 30, 2024
9b0068e
Disable STLport extensions and anachronisms
TheNathannator Sep 30, 2024
a49646a
Initial sized vector modifications
TheNathannator Oct 1, 2024
d05e73c
Downgrade further to STLport 5.0.2
TheNathannator Oct 1, 2024
c430728
A few misc. fixes
TheNathannator Oct 1, 2024
cb5a8d1
(Temporarily) Disable import of <cmath> `f`/`l` versions of math func…
TheNathannator Oct 3, 2024
f69e508
Fix a couple stdlib include issues
TheNathannator Oct 2, 2024
dcd96bd
Fix error in DataNode + bonus warning fix
TheNathannator Oct 3, 2024
cbffbf8
Fix new decompctx.py STLport issues
TheNathannator Oct 3, 2024
0962a67
Disable STLport vector<bool> specialization
TheNathannator Oct 3, 2024
c216a2c
Couple minor vector fixes
TheNathannator Oct 7, 2024
24f8cae
Add VS Code tasks for generating report.json
TheNathannator Oct 7, 2024
f53b422
Adjust condition for vector size helper macros
TheNathannator Oct 8, 2024
5495d09
Missed a few explicit sizes
TheNathannator Oct 8, 2024
4009dc3
correct a comment
TheNathannator Oct 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ trim_trailing_whitespace = true
[{*.c,*.h,*.cpp,*.hpp}]
indent_style=space
indent_size=4

# info(Nate): got annoyed with having to manually undo whitespace changes and whatnot
[**/stlport/**]
indent_style = space
indent_size = 2
insert_final_newline = false
trim_trailing_whitespace = false
7 changes: 6 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
"limitSymbolsToIncludedHeaders": true
},
"defines": [
"MILO_DEBUG"
"MILO_DEBUG",
"HX_WII",
"__MWERKS__=0x4302",
"__PPCBROADWAY__",
"__PPCGECKO__",
"__VS_CODE__"
]
}
],
Expand Down
18 changes: 18 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@
],
"problemMatcher": []
},
{
"label": "ninja report SZBE69",
"type": "shell",
"command": "ninja",
"args": [
"build/SZBE69/report.json"
],
"problemMatcher": []
},
{
"label": "ninja report SZBE69_B8",
"type": "shell",
"command": "ninja",
"args": [
"build/SZBE69_B8/report.json"
],
"problemMatcher": []
},
{
"label": "all_source",
"type": "shell",
Expand Down
4 changes: 3 additions & 1 deletion config/SZBE69/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"-Cpp_exceptions off",

"-Isrc/",
"-d NDEBUG"

"-d NDEBUG",
"-d HX_WII"
]
},
"main": {
Expand Down
3 changes: 2 additions & 1 deletion config/SZBE69_B8/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"-RTTI on",
"-Cpp_exceptions off",

"-d MILO_DEBUG"
"-d MILO_DEBUG",
"-d HX_WII"
]
},
"main": {
Expand Down
2 changes: 1 addition & 1 deletion config/SZBE69_B8/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
"network/net/HarmonixGatheringDDL_Wii.cpp": "MISSING",
"network/net/Jobs_RV.cpp": "MISSING",
"network/net/Jobs_Wii.cpp": "MISSING",
"network/net/JsonUtils.cpp": "NonMatching",
"network/net/JsonUtils.cpp": "Equivalent",
"network/net/MatchmakingSettings.cpp": "MISSING",
"network/net/MessageBroker.cpp": "MISSING",
"network/net/MessageBrokerDDL_Wii.cpp": "MISSING",
Expand Down
6 changes: 3 additions & 3 deletions src/band3/meta_band/Accomplishment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "system/utl/Symbols4.h"
#include "game/Defines.h"
#include "os/Debug.h"
#include <string>
#include <string.h>
#include "Campaign.h"

#include "decomp.h"
Expand Down Expand Up @@ -231,7 +231,7 @@ Symbol Accomplishment::GetFirstUnfinishedAccomplishmentEntry(BandProfile*) const
return gNullStr;
}

bool Accomplishment::InqIncrementalSymbols(BandProfile*, std::vector<Symbol, unsigned short>&) const {
bool Accomplishment::InqIncrementalSymbols(BandProfile*, std::vector<Symbol>&) const {
return 0;
}

Expand Down Expand Up @@ -372,7 +372,7 @@ ScoreType Accomplishment::GetRequiredScoreType() const {
if ((int)scoreTypes.size() == 1) {
std::set<ScoreType>::iterator iterator = scoreTypes.begin();
return *iterator;
}
}
return (ScoreType)10;
}

Expand Down
4 changes: 2 additions & 2 deletions src/band3/meta_band/Accomplishment.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Accomplishment {
virtual bool InqRequiredScoreTypes(std::set<ScoreType>&) const;
private:
virtual Symbol GetFirstUnfinishedAccomplishmentEntry(BandProfile*) const;
virtual bool InqIncrementalSymbols(BandProfile*, std::vector<Symbol, unsigned short>&) const;
virtual bool InqIncrementalSymbols(BandProfile*, std::vector<Symbol>&) const;
virtual bool IsSymbolEntryFulfilled(BandProfile*, Symbol) const;
virtual bool CanBeLaunched() const;
virtual bool HasSpecificSongsToLaunch() const;
Expand Down Expand Up @@ -113,4 +113,4 @@ class Accomplishment {
bool mCanBeEarnedWithNoFail; // 0x72
bool mIsTrackedInLeaderboard; // 0x73
};
#endif // METABAND_ACCOMPLISHMENT_H
#endif // METABAND_ACCOMPLISHMENT_H
2 changes: 1 addition & 1 deletion src/compiler_macros.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef COMPILER_MACROS_H
#define COMPILER_MACROS_H

#ifndef __MWERKS__
#if !defined(__MWERKS__) || defined(__VS_CODE__)
#define __option(x)
#define __declspec(x)
#define __attribute__(x)
Expand Down
2 changes: 1 addition & 1 deletion src/decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
/*
* ASM macros, to prevent IDEs from complaining
*/
#if defined(__MWERKS__)
#if defined(__MWERKS__) && !defined(__VS_CODE__)
#define ASM_DECL asm
#define ASM_BLOCK asm
#else
Expand Down
2 changes: 1 addition & 1 deletion src/network/net/JsonUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ JsonConverter::JsonConverter() {
}

JsonConverter::~JsonConverter() {
if (objects.size() != 0) {
if (!objects.empty()) {
int count = objects.size() - 1;
while (count >= 0) {
JsonObject *o = objects[count];
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cassert
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef MSL_CPP_CASSERT_H
#define MSL_CPP_CASSERT_H
#include <assert.h>
#include <MSL_C/assert.h>
#endif
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cctype
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CCTYPE_H
#define MSL_CPP_CCTYPE_H
#include <ctype.h>
#include <MSL_C/ctype.h>

namespace std {
using ::isalnum;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cerrno
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef MSL_CPP_CERRNO_H
#define MSL_CPP_CERRNO_H

#include <errno.h>
#include <MSL_C/errno.h>

namespace std {
using ::errno;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cfloat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef MSL_CPP_CFLOAT_H
#define MSL_CPP_CFLOAT_H
#include <float.h>
#include <MSL_C/float.h>
#endif
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/ciso646
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef MSL_CPP_CISO646_H
#define MSL_CPP_CISO646_H
#include <iso646.h>
#include <MSL_C/iso646.h>
#endif
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/climits
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef MSL_CPP_CLIMITS_H
#define MSL_CPP_CLIMITS_H
#include <limits.h>
#include <MSL_C/limits.h>
#endif
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/clocale
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CLOCALE_H
#define MSL_CPP_CLOCALE_H
#include <locale.h>
#include <MSL_C/locale.h>

namespace std {
using ::lconv;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cmath
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CMATH_H
#define MSL_CPP_CMATH_H
#include <math.h>
#include <MSL_C/math.h>

namespace std {
using ::double_t;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/csetjmp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSETJMP_H
#define MSL_CPP_CSETJMP_H
#include <setjmp.h>
#include <MSL_C/setjmp.h>

namespace std {
using ::jmp_buf;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/csignal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSIGNAL_H
#define MSL_CPP_CSIGNAL_H
#include <signal.h>
#include <MSL_C/signal.h>

namespace std {
using ::sig_atomic_t;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cstdarg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSTDARG_H
#define MSL_CPP_CSTDARG_H
#include <stdarg.h>
#include <MSL_C/stdarg.h>

namespace std {
using ::va_list;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cstddef
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSTDDEF_H
#define MSL_CPP_CSTDDEF_H
#include <stddef.h>
#include <MSL_C/stddef.h>

namespace std {
using ::ptrdiff_t;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cstdio
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSTDIO_H
#define MSL_CPP_CSTDIO_H
#include <stdio.h>
#include <MSL_C/stdio.h>

namespace std {
using ::FILE;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cstdlib
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CSTDLIB_H
#define MSL_CPP_CSTDLIB_H
#include <stdlib.h>
#include <MSL_C/stdlib.h>

namespace std {
using ::div_t;
Expand Down
4 changes: 3 additions & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cstring
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#ifndef MSL_CPP_CSTRING_H
#define MSL_CPP_CSTRING_H
#include <string.h>
#include <MSL_C/string.h>

namespace std {
using ::size_t;

using ::memchr;
using ::memcmp;
using ::memcpy;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/ctime
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CTIME_H
#define MSL_CPP_CTIME_H
#include <time.h>
#include <MSL_C/time.h>

namespace std {
using ::clock_t;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cwchar
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CWCHAR_H
#define MSL_CPP_CWCHAR_H
#include <wchar.h>
#include <MSL_C/wchar.h>

namespace std {
using ::mbstate_t;
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/PowerPC_EABI_Support/MSL/MSL_C++/cwctype
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef MSL_CPP_CWTYPE_H
#define MSL_CPP_CWTYPE_H
#include <wctype.h>
#include <MSL_C/wctype.h>

namespace std {
using ::wctrans_t;
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/PowerPC_EABI_Support/MSL/MSL_C/math.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
extern "C" {
#endif

#ifndef __MWERKS__
#if !defined(__MWERKS__) || defined(__VS_CODE__)
/* Get clangd to shut up about __fabs being undefined. */
#define __fabs(x) (x)
#define __fabs(x) fabs(x)
#define __frsqrte(x) (x)
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/sdk/RVL_SDK/revolution/os/OSUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extern "C" {
///// USEFUL MACROS/DEFINES //////
// Macro for making clear things are addresses.
// if-def for future proofing and so VSCode doesn't yell.
#ifdef __MWERKS__
#if defined(__MWERKS__) && !defined(__VS_CODE__)
#define AT_ADDRESS(addr) : (addr)
#else
#define AT_ADDRESS(addr)
Expand Down
10 changes: 5 additions & 5 deletions src/system/bandobj/BandDirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ void BandDirector::HarvestDircuts(){
else mask = 0x200000;
}
WorldDir* wdir = mVenue.Dir();
for(std::vector<CameraManager::Category, unsigned int>::iterator it = wdir->mCameraManager.mCameraShotCategories.begin();
for(std::vector<CameraManager::Category VECTOR_SIZE_LARGE>::iterator it = wdir->mCameraManager.mCameraShotCategories.begin();
it != wdir->mCameraManager.mCameraShotCategories.end(); ++it){
for(ObjPtrList<CamShot, ObjectDir>::iterator cit = it->unk4->begin(); cit != it->unk4->end(); ++cit){
CamShot* shot = *cit;
Expand Down Expand Up @@ -658,7 +658,7 @@ void BandDirector::ClearSymbolKeysFrameRange(Symbol s, float fstart, float fend)
if(frame >= fstart && frame <= fend) keys->RemoveKey(i);
else i++;
}
}
}
}
}

Expand Down Expand Up @@ -896,7 +896,7 @@ DataNode BandDirector::OnFileLoaded(DataArray* da){
mPropAnim->SetName("song.anim", mMerger->Dir());
mPropAnim->SetType("song_anim");
mPropAnim->SetRate(RndAnimatable::k480_fpb);
mPropAnim->AddKeys(this, DataArrayPtr(DataNode(Symbol("shot_bg"))), PropKeys::kSymbol);
mPropAnim->AddKeys(this, DataArrayPtr(DataNode(Symbol("shot_bg"))), PropKeys::kSymbol);
mPropAnim->AddKeys(this, DataArrayPtr(DataNode(Symbol("bass_intensity"))), PropKeys::kSymbol);
mPropAnim->AddKeys(this, DataArrayPtr(DataNode(Symbol("drum_intensity"))), PropKeys::kSymbol);
mPropAnim->AddKeys(this, DataArrayPtr(DataNode(Symbol("guitar_intensity"))), PropKeys::kSymbol);
Expand Down Expand Up @@ -1066,7 +1066,7 @@ void BandDirector::OnMidiPresetCleanup(){
float newframe = bts * 30.0f;
if(skeys[i - 1].frame <= newframe){
local_keys.push_back(Key<Symbol>(skeys[i - 1].value, newframe));
}
}
}
else if(!lpreset){
MILO_WARN("Can't find light preset %s, %f secs", s1.mStr, skeys[i].frame / 30.0f);
Expand Down Expand Up @@ -1563,4 +1563,4 @@ BEGIN_PROPSYNCS(BandDirector)
SYNC_PROP_SET(spot_vocal, Symbol("off"), SetCharSpot(Symbol("vocal"), _val.Sym(0)))
SYNC_PROP_SET(stagekit_fog, Symbol("off"), SetFog(_val.Sym(0)))
SYNC_SUPERCLASS(RndDrawable)
END_PROPSYNCS
END_PROPSYNCS
3 changes: 2 additions & 1 deletion src/system/char/CharLipSync.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "obj/Object.h"
#include "rndobj/PropAnim.h"
#include "obj/ObjPtr_p.h"
#include "utl/STLHelpers.h"

class CharLipSync : public Hmx::Object {
public:
Expand Down Expand Up @@ -43,7 +44,7 @@ class CharLipSync : public Hmx::Object {
ObjPtr<RndPropAnim, ObjectDir> mPropAnim;
std::vector<String> mVisemes;
int mFrames;
std::vector<unsigned char, unsigned int> mData;
std::vector<unsigned char VECTOR_SIZE_LARGE> mData;
};

#endif
Loading
Loading