Skip to content

Commit

Permalink
more band3 TUs (#374)
Browse files Browse the repository at this point in the history
* bandsongmgr work

* stats work

* stats work

* performer handler

* a bunch of performer work

* begin work on songdb

* songdb work

* scoring work
  • Loading branch information
rjkiv authored Oct 10, 2024
1 parent 4bc0ddf commit 8de0975
Show file tree
Hide file tree
Showing 25 changed files with 1,236 additions and 297 deletions.
32 changes: 16 additions & 16 deletions config/SZBE69/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9612,7 +9612,7 @@ __ct__14RestartGameMsgFv = .text:0x8010DD74; // type:function size:0x44
NewNetMessage__20ResumeNoScoreGameMsgFv = .text:0x8010DDB8; // type:function size:0x30
NewNetMessage__14PlayerStatsMsgFv = .text:0x8010DDE8; // type:function size:0x30
__ct__14PlayerStatsMsgFv = .text:0x8010DE18; // type:function size:0x4C
fn_8010DE64 = .text:0x8010DE64; // type:function size:0xEC
__dt__5StatsFv = .text:0x8010DE64; // type:function size:0xEC
fn_8010DF50 = .text:0x8010DF50; // type:function size:0x58
fn_8010DFA8 = .text:0x8010DFA8; // type:function size:0x80
fn_8010E028 = .text:0x8010E028; // type:function size:0x80
Expand Down Expand Up @@ -11313,7 +11313,7 @@ fn_80141D74 = .text:0x80141D74; // type:function size:0x108
fn_80141E7C = .text:0x80141E7C; // type:function size:0x5C
fn_80141ED8 = .text:0x80141ED8; // type:function size:0x10
__ct__9PerformerFP8BandUserP4Band = .text:0x80141EE8; // type:function size:0x13C
fn_80142024 = .text:0x80142024; // type:function size:0x374
__ct__5StatsFRC5Stats = .text:0x80142024; // type:function size:0x374
fn_80142398 = .text:0x80142398; // type:function size:0x30
fn_801423C8 = .text:0x801423C8; // type:function size:0x98
fn_80142460 = .text:0x80142460; // type:function size:0x70
Expand Down Expand Up @@ -12377,7 +12377,7 @@ fn_8015F13C = .text:0x8015F13C; // type:function size:0x8
fn_8015F144 = .text:0x8015F144; // type:function size:0x2C
fn_8015F170 = .text:0x8015F170; // type:function size:0x2C
fn_8015F19C = .text:0x8015F19C; // type:function size:0xC
fn_8015F1A8 = .text:0x8015F1A8; // type:function size:0x350
__ct__5StatsFv = .text:0x8015F1A8; // type:function size:0x350
fn_8015F4F8 = .text:0x8015F4F8; // type:function size:0x30
fn_8015F528 = .text:0x8015F528; // type:function size:0x30
fn_8015F558 = .text:0x8015F558; // type:function size:0x40
Expand All @@ -12396,27 +12396,27 @@ fn_8015F910 = .text:0x8015F910; // type:function size:0x5C
fn_8015F96C = .text:0x8015F96C; // type:function size:0x30
fn_8015F99C = .text:0x8015F99C; // type:function size:0x30
fn_8015F9CC = .text:0x8015F9CC; // type:function size:0x40
fn_8015FA0C = .text:0x8015FA0C; // type:function size:0x64
BuildHitStreak__5StatsFif = .text:0x8015FA0C; // type:function size:0x64
CurrentStreak__5StatsFv = .text:0x8015FA70; // type:function size:0x8
fn_8015FA78 = .text:0x8015FA78; // type:function size:0x8
SetCurrentStreak__5StatsFi = .text:0x8015FA78; // type:function size:0x8
LongestStreak__5StatsFv = .text:0x8015FA80; // type:function size:0x2C
fn_8015FAAC = .text:0x8015FAAC; // type:function size:0x38
fn_8015FAE4 = .text:0x8015FAE4; // type:function size:0x3C
fn_8015FB20 = .text:0x8015FB20; // type:function size:0x18
fn_8015FB38 = .text:0x8015FB38; // type:function size:0xC
fn_8015FB44 = .text:0x8015FB44; // type:function size:0x20
fn_8015FB64 = .text:0x8015FB64; // type:function size:0x54
SetPersistentStreak__5StatsFi = .text:0x8015FAAC; // type:function size:0x38
EndHitStreak__5StatsFv = .text:0x8015FAE4; // type:function size:0x3C
BuildMissStreak__5StatsFi = .text:0x8015FB20; // type:function size:0x18
EndMissStreak__5StatsFv = .text:0x8015FB38; // type:function size:0xC
BuildStreak__5StatsFRQ25Stats10StreakInfoi = .text:0x8015FB44; // type:function size:0x20
EndStreak__5StatsFRQ25Stats10StreakInfoRQ211stlpmtx_std83vector<Q25Stats10StreakInfo,Us,Q211stlpmtx_std34StlNodeAlloc<Q25Stats10StreakInfo>> = .text:0x8015FB64; // type:function size:0x54
fn_8015FBB8 = .text:0x8015FBB8; // type:function size:0x80
fn_8015FC38 = .text:0x8015FC38; // type:function size:0x4
fn_8015FC3C = .text:0x8015FC3C; // type:function size:0x3C
fn_8015FC78 = .text:0x8015FC78; // type:function size:0x2C
fn_8015FCA4 = .text:0x8015FCA4; // type:function size:0x68
fn_8015FD0C = .text:0x8015FD0C; // type:function size:0x50
SetFinalized__5StatsFb = .text:0x8015FCA4; // type:function size:0x68
UpdateBestSolo__5StatsFi = .text:0x8015FD0C; // type:function size:0x50
fn_8015FD5C = .text:0x8015FD5C; // type:function size:0x7C
fn_8015FDD8 = .text:0x8015FDD8; // type:function size:0x4
fn_8015FDDC = .text:0x8015FDDC; // type:function size:0x3C
fn_8015FE18 = .text:0x8015FE18; // type:function size:0x2C
fn_8015FE44 = .text:0x8015FE44; // type:function size:0x94
SetVocalSingerAndPartCounts__5StatsFii = .text:0x8015FE44; // type:function size:0x94
fn_8015FED8 = .text:0x8015FED8; // type:function size:0x4
fn_8015FEDC = .text:0x8015FEDC; // type:function size:0x88
fn_8015FF64 = .text:0x8015FF64; // type:function size:0x2C
Expand Down Expand Up @@ -12542,11 +12542,11 @@ fn_8016261C = .text:0x8016261C; // type:function size:0x18
fn_80162634 = .text:0x80162634; // type:function size:0x4
fn_80162638 = .text:0x80162638; // type:function size:0xC
fn_80162644 = .text:0x80162644; // type:function size:0x14
fn_80162658 = .text:0x80162658; // type:function size:0x14
__ct__Q25Stats10StreakInfoFv = .text:0x80162658; // type:function size:0x14
fn_8016266C = .text:0x8016266C; // type:function size:0x20
fn_8016268C = .text:0x8016268C; // type:function size:0x4C
fn_801626D8 = .text:0x801626D8; // type:function size:0x48
fn_80162720 = .text:0x80162720; // type:function size:0x2C
__ct__Q25Stats14MultiplierInfoFv = .text:0x80162720; // type:function size:0x2C
fn_8016274C = .text:0x8016274C; // type:function size:0x38
fn_80162784 = .text:0x80162784; // type:function size:0x48
fn_801627CC = .text:0x801627CC; // type:function size:0x54
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 @@ -81,7 +81,7 @@
"band3/game/Scoring.cpp": "MISSING",
"band3/game/Shuttle.cpp": "NonMatching",
"band3/game/Singer.cpp": "MISSING",
"band3/game/SongDB.cpp": "MISSING",
"band3/game/SongDB.cpp": "NonMatching",
"band3/game/StatCollector.cpp": "MISSING",
"band3/game/StatMemberTracker.cpp": "MISSING",
"band3/game/Stats.cpp": "NonMatching",
Expand Down
16 changes: 16 additions & 0 deletions src/band3/game/Band.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once
#include "obj/Object.h"

class BandUser;
class BeatMaster;

class Band : public Hmx::Object {
public:
Band(bool, int, BandUser*, BeatMaster*);
virtual ~Band();
virtual DataNode Handle(DataArray*, bool);

int EnergyMultiplier() const;
int EnergyCrowdBoost() const;
void ForceStars(int);
};
11 changes: 10 additions & 1 deletion src/band3/game/CrowdRating.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,17 @@ class CrowdRating {

void Reset();
void Configure(BandUser*, Difficulty);
float GetThreshold(ExcitementLevel) const;
float GetMinValue(){ return unk10; }
bool IsActive() const { return mActive; }
float GetValue() const { return unkc; }
void SetActive(bool);
void SetValue(float);
bool IsInWarning() const;
float GetRawValue() const { return unk8; }
void SetDisplayValue(float);

bool unk4;
bool mActive; // 0x4
float unk8;
float unkc;
float unk10;
Expand Down
1 change: 1 addition & 0 deletions src/band3/game/Game.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Game : public Hmx::Object {
virtual ~Game();

void SetPaused(bool, bool, bool);
void SetGameOver(bool);

u8 pad[0x4C];
bool mIsPaused; // 0x68 iunno
Expand Down
4 changes: 4 additions & 0 deletions src/band3/game/GameConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "obj/Object.h"
#include "beatmatch/PlayerTrackConfig.h"
#include "game/PracticeSectionProvider.h"
#include "game/Defines.h"

class GameConfig : public Hmx::Object {
public:
Expand All @@ -10,6 +11,9 @@ class GameConfig : public Hmx::Object {
virtual DataNode Handle(DataArray*, bool);
virtual bool SyncProperty(DataNode&, DataArray*, int, PropOp);

Difficulty GetAverageDifficulty() const;
bool CanEndGame() const;

PlayerTrackConfigList* mPlayerTrackConfigList; // 0x1c
PracticeSectionProvider* mPracticeSectionProvider; // 0x20
float mSongLimitMs; // 0x24
Expand Down
6 changes: 3 additions & 3 deletions src/band3/game/HeldNote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ HeldNote::HeldNote(

unk_0x20 = true;

int tailPoints = TheScoring.GetTailPoints(trackType, ticks);
int tailPoints = TheScoring->GetTailPoints(trackType, ticks);

unk_0x10 = tailPoints * bits;
unk_0x18 = tailPoints * slots;
Expand Down Expand Up @@ -98,7 +98,7 @@ double HeldNote::SetHoldTime(float time) {
}

float HeldNote::GetPointFraction() {
int headPoints = TheScoring.GetHeadPoints(mTrackType);
int headPoints = TheScoring->GetHeadPoints(mTrackType);
int pointsPlus = headPoints + unk_0x18;

if (pointsPlus) {
Expand Down Expand Up @@ -143,7 +143,7 @@ void HeldNote::ReleaseSlot(int slot) {
unk_0x1c = (unsigned int)gem;

int bits = gem->CountBitsInSlotType(mask);
int tailPoints = TheScoring.GetTailPoints(mTrackType, mGameGem->mDurationTicks);
int tailPoints = TheScoring->GetTailPoints(mTrackType, mGameGem->mDurationTicks);
unk_0x10 = tailPoints * bits;
unk_0x20 = false;
unk_0xc *= bits / (bits + 1);
Expand Down
10 changes: 5 additions & 5 deletions src/band3/game/MultiplayerAnalyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MultiplayerAnalyzer::MultiplayerAnalyzer(SongData *songData)
: mUnk_0x0(""), mSongData(songData), mUnk_0x10(), mUnk_0x18() {}

float MultiplayerAnalyzer::GetMaxPoints(const UserGuid &userGuid) const {
const MysteryType *data = GetData(userGuid);
const Data *data = GetData(userGuid);

if (data == 0) {
return 0;
Expand All @@ -14,7 +14,7 @@ float MultiplayerAnalyzer::GetMaxPoints(const UserGuid &userGuid) const {
}

float MultiplayerAnalyzer::GetMaxStreakPoints(const UserGuid &userGuid) const {
const MysteryType *data = GetData(userGuid);
const Data *data = GetData(userGuid);

if (data == 0) {
return 0;
Expand All @@ -24,7 +24,7 @@ float MultiplayerAnalyzer::GetMaxStreakPoints(const UserGuid &userGuid) const {
}

float MultiplayerAnalyzer::GetBonusPoints(const UserGuid &userGuid) const {
const MysteryType *data = GetData(userGuid);
const Data *data = GetData(userGuid);

if (data == 0) {
return 0.0f;
Expand All @@ -33,7 +33,7 @@ float MultiplayerAnalyzer::GetBonusPoints(const UserGuid &userGuid) const {
return data->unk_0x20 + data->unk_0x24;
}

const MysteryType *MultiplayerAnalyzer::GetData(const UserGuid &userGuid) const {
const MultiplayerAnalyzer::Data *MultiplayerAnalyzer::GetData(const UserGuid &userGuid) const {
for (int i = 0; i < mUnk_0x8.size(); i++) {
if (mUnk_0x8[i].mGuid == userGuid) {
return &mUnk_0x8[i];
Expand All @@ -43,7 +43,7 @@ const MysteryType *MultiplayerAnalyzer::GetData(const UserGuid &userGuid) const
return 0;
}

MysteryType *MultiplayerAnalyzer::GetData(const UserGuid &userGuid) {
MultiplayerAnalyzer::Data *MultiplayerAnalyzer::GetData(const UserGuid &userGuid) {
for (int i = 0; i < mUnk_0x8.size(); i++) {
if (mUnk_0x8[i].mGuid == userGuid) {
return &mUnk_0x8[i];
Expand Down
36 changes: 20 additions & 16 deletions src/band3/game/MultiplayerAnalyzer.h
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
#ifndef GAME_MULTIPLAYERANALYZER_H
#define GAME_MULTIPLAYERANALYZER_H

#include "beatmatch/SongData.h"
#include "system/utl/HxGuid.h"

class MysteryType {
public:
HxGuid mGuid;
char unk_pre[8];
float m_maxStreakPoints;
float m_maxPoints;
float unk_0x20;
float unk_0x24;
char unk_Stuff[24];
};

class PlayerScoreInfo {};

class MultiplayerAnalyzer {
public:
class Data {
public:
HxGuid mGuid;
char unk_pre[8];
float m_maxStreakPoints;
float m_maxPoints;
float unk_0x20;
float unk_0x24;
char unk_Stuff[24];
};

class GemScore {

};

MultiplayerAnalyzer(SongData *);

void PostLoad();
Expand All @@ -35,16 +38,17 @@ class MultiplayerAnalyzer {
void GetCodaExtents(const UserGuid &, int &, int &);
void AddGems();
void AddCodas();
void OverrideBasePoints(int, TrackType, const UserGuid&, int, int, int);

const MysteryType *GetData(const UserGuid &) const;
MysteryType *GetData(const UserGuid &);
const Data *GetData(const UserGuid &) const;
Data *GetData(const UserGuid &);

char *mUnk_0x0;
SongData *mSongData;

// Whatever type is here is 0x40 size
std::vector<MysteryType> mUnk_0x8;
std::vector<PlayerScoreInfo *> mUnk_0x10;
std::vector<Data> mUnk_0x8;
std::vector<PlayerScoreInfo *> mUnk_0x10; // 0x10 - base scores
int mUnk_0x18;
};

Expand Down
Loading

0 comments on commit 8de0975

Please sign in to comment.