Skip to content

Commit

Permalink
Fix NetLog linking error
Browse files Browse the repository at this point in the history
Uncook the build

Once again

fix
  • Loading branch information
ihatecompvir committed Sep 29, 2024
1 parent 1cd3f5d commit 43f0365
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 92 deletions.
2 changes: 1 addition & 1 deletion config/SZBE69_B8/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
"network/Plugins/ConnectionManager.cpp": "MISSING",
"network/Plugins/ConnectionOrientedStream.cpp": "MISSING",
"network/Plugins/ConnectivityManager.cpp": "MISSING",
"network/Plugins/EmulationDevice.cpp": "Matching",
"network/Plugins/EmulationDevice.cpp": "NonMatching",
"network/Plugins/EncryptionAlgorithm.cpp": "MISSING",
"network/Plugins/EndPoint.cpp": "MISSING",
"network/Plugins/HighLevelStream.cpp": "MISSING",
Expand Down
6 changes: 3 additions & 3 deletions src/band3/bandtrack/TrackConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ bool TrackConfig::GetDisableHopos() const { return mDisableHopos; }
bool TrackConfig::UseLeftyGems() const { return mLefty; }

bool TrackConfig::IsDrumTrack() const { return mUser->GetTrackType() == kTrackDrum; }
bool TrackConfig::IsKeyboardTrack() const { return mUser->GetTrackType() == kTrackKeys; }
bool TrackConfig::IsKeyboardTrack() const { return mUser->GetTrackType() == kTrackKeyboard; }

bool TrackConfig::AllowsOverlappingGems() const {
bool b = 0;
if (mUser->GetTrackType() == kTrackKeys || mUser->GetTrackType() == 4) b = true;
if (mUser->GetTrackType() == kTrackKeyboard || mUser->GetTrackType() == 4) b = true;
return b;
}

Expand All @@ -38,7 +38,7 @@ bool TrackConfig::AllowsPartialHits() const { return mUser->GetControllerType()
bool TrackConfig::IsRealGuitarTrack() const {
TrackType t = mUser->GetTrackType();
bool b = 0;
if (t == kTrackRealGuitar || t == kTrackRealBass) b = true;
if (t == kTrackProGuitar || t == kTrackProBass) b = true;
return b;
}

Expand Down
2 changes: 1 addition & 1 deletion src/band3/game/BandUser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "utl/Symbols.h"

BandUser::BandUser()
: mDifficulty(DefaultDifficulty()), unk_0xC(0), mTrackType(kTrackNone),
: mDifficulty(DefaultDifficulty()), unk_0xC(0), mTrackType(kTrackDrum),
mControllerType(kControllerNone), unk_0x18(0), unk_0x19(0), unk_0x1C(10),
unk_0x20(5), mChar(0), mAutoplay(0), mLastHitFraction(0), mTrack(0), mPlayer(0),
mParticipating(0), mIsWiiRemoteController(0), mJustDisconnected(0) {
Expand Down
79 changes: 13 additions & 66 deletions src/band3/game/Defines.cpp
Original file line number Diff line number Diff line change
@@ -1,83 +1,30 @@
#include "Defines.h"
#include <os/Debug.h>
#include <obj/DataUtl.h>

TrackType ControllerTypeToTrackType(ControllerType controllerType, bool alt) {
switch (controllerType) {
case kControllerDrum:
return kTrackDrum;
case kControllerVocals:
return kTrackVocals;
case kControllerGuitar:
return alt ? kTrackBass : kTrackGuitar;
case kControllerRealGuitar:
return alt ? kTrackRealBass : kTrackRealGuitar;
case kControllerKeys:
return alt ? kTrackRealKeys : kTrackKeys;
default:
return kTrackNone;
}
}

TrackType ScoreTypeToTrackType(ScoreType scoreType) {
TrackType trackType;
switch (scoreType) {
case kScoreDrum:
trackType = kTrackDrum;
break;
case kScoreBass:
trackType = kTrackBass;
break;
case kScoreGuitar:
trackType = kTrackGuitar;
break;
case kScoreVocals:
trackType = kTrackVocals;
break;
case kScoreHarmony:
trackType = kTrackVocals;
break;
case kScoreKeys:
trackType = kTrackKeys;
case 0:
break;
case kScoreRealDrum:
trackType = kTrackDrum;
break;
case kScoreRealGuitar:
trackType = kTrackRealGuitar;
break;
case kScoreRealBass:
trackType = kTrackRealBass;
break;
case kScoreRealKeys:
trackType = kTrackRealKeys;
break;
case kScoreBand:
trackType = kTrackNone;
break;
default:
TheDebug.Fail(MakeString("no TrackType for this ScoreType!"));
trackType = kTrackNone;
}
return trackType;
}

ControllerType TrackTypeToControllerType(TrackType trackType) {
switch (trackType) {
case kTrackDrum:
case 0:
return kControllerDrum;
case kTrackGuitar:
case kTrackBass:
case 1:
case 2:
return kControllerGuitar;
case kTrackVocals:
case 3:
return kControllerVocals;
case kTrackKeys:
case kTrackRealKeys:
return kControllerKeys;
case kTrackRealGuitar:
case kTrackRealBass:
return kControllerRealGuitar;
default:
case 4:
case 5:
return kControllerNone;
case 6:
case 8:
return (ControllerType)4;
default:
return (ControllerType)5;
}
}
}
30 changes: 11 additions & 19 deletions src/band3/game/Defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ enum ControllerType {
kControllerDrum = 0,
kControllerGuitar = 1,
kControllerVocals = 2,
kControllerKeys = 3,
kControllerRealGuitar = 4,
kControllerNone = 5,
kNumControllerTypes = 5
kControllerNone = 3,
kNumControllerTypes = 3,
};

enum ScoreType {
Expand All @@ -40,23 +38,17 @@ enum ScoreType {
};

enum TrackType {
kTrackDrum,
kTrackGuitar,
kTrackBass,
kTrackVocals,
kTrackKeys,
kTrackRealKeys,
kTrackRealGuitar,
kTrackRealGuitar22Fret,
kTrackRealBass,
kTrackRealBass22Fret,
kTrackNone,
kNumTrackTypes,
kTrackPending,
kTrackPendingVocals
kTrackDrum = 0,
kTrackGuitar = 1, // guess
kTrackBass = 2, // guess

kTrack4 = 4,
kTrackKeyboard = 5,
kTrackProGuitar = 6,

kTrackProBass = 8
};

TrackType ControllerTypeToTrackType(ControllerType controllerType, bool isReal);
TrackType ScoreTypeToTrackType(ScoreType scoreType);
ControllerType TrackTypeToControllerType(TrackType trackType);
Symbol TrackTypeToSym(TrackType);
Expand Down
4 changes: 2 additions & 2 deletions src/network/net/NetLog.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "system/utl/LogFile.h"
#include "NetLog.h"

static LogFile NetLog = LogFile("netlog-%05d.txt");
LogFile NetLog = LogFile("netlog-%05d.txt");
3 changes: 3 additions & 0 deletions src/network/net/NetLog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "system/utl/LogFile.h"

extern LogFile NetLog;

0 comments on commit 43f0365

Please sign in to comment.