Skip to content

Commit

Permalink
Merge pull request #271 from tosuapp/lazer/offsets-20241224.1
Browse files Browse the repository at this point in the history
chore: update for 2024.1224.1
  • Loading branch information
KotRikD authored Dec 27, 2024
2 parents 7999c59 + 04bfda6 commit 8974bba
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/tosu/src/memory/lazer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

// checks <game>k__BackingField
private checkIfPlayer(address: number) {
return this.process.readIntPtr(address + 0x400) === this.gameBase();
return this.process.readIntPtr(address + 0x3f8) === this.gameBase();
}

// Checks <api>k__BackingField and <StatisticsPanel>k__BackingField (to GameBase::<Storage>k__BackingField)
Expand Down Expand Up @@ -252,7 +252,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
if (!player) {
return 0;
}
return this.process.readIntPtr(player + 0x478);
return this.process.readIntPtr(player + 0x470);
}

private scoreInfo(player: number) {
Expand Down Expand Up @@ -765,7 +765,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

const player = this.player();
if (player) {
const scoreProcessor = this.process.readIntPtr(player + 0x440);
const scoreProcessor = this.process.readIntPtr(player + 0x438);

const comboBindable = this.process.readIntPtr(
scoreProcessor + 0x250
Expand Down Expand Up @@ -962,7 +962,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
return this.readScore(
scoreInfo,
health * 200,
this.process.readInt(player + 0x38c)
this.process.readInt(player + 0x394)
);
}

Expand Down Expand Up @@ -1014,7 +1014,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
}

const player = this.player();
const hudOverlay = this.process.readIntPtr(player + 0x458);
const hudOverlay = this.process.readIntPtr(player + 0x450);

const inputController = this.process.readIntPtr(hudOverlay + 0x348);
const rulesetComponents = this.readComponents(
Expand Down Expand Up @@ -1134,7 +1134,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {

private hitEvents(): number[] {
const player = this.player();
const scoreProcessor = this.process.readIntPtr(player + 0x440);
const scoreProcessor = this.process.readIntPtr(player + 0x438);
const hitEventsList = this.process.readIntPtr(scoreProcessor + 0x288);
const hitEvents = this.readListItems(hitEventsList, true, 0x40);

Expand Down Expand Up @@ -1842,7 +1842,7 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
this.isPlayerLoading = isPlayerLoader;

if (isPlaying) {
const dependencies = this.process.readIntPtr(this.player() + 0x488);
const dependencies = this.process.readIntPtr(this.player() + 0x480);
const cache = this.process.readIntPtr(dependencies + 0x8);
const entries = this.process.readIntPtr(cache + 0x10);
const drawableRuleset = this.process.readIntPtr(entries + 0x10);
Expand Down Expand Up @@ -1913,14 +1913,14 @@ export class LazerMemory extends AbstractMemory<LazerPatternData> {
folder: '',
creator: this.process.readSharpStringPtr(author + 0x18),
difficulty: difficultyName,
mapID: this.process.readInt(beatmap.info + 0xac),
mapID: this.process.readInt(beatmap.info + 0x8c),
setID: this.process.readInt(beatmap.setInfo + 0x30),
rankedStatus: Number(
this.lazerToStableStatus[
this.process.readInt(beatmap.info + 0xa8)
this.process.readInt(beatmap.info + 0x88)
]
),
objectCount: this.process.readInt(beatmap.info + 0xb4)
objectCount: this.process.readInt(beatmap.info + 0x94)
};
}

Expand Down

0 comments on commit 8974bba

Please sign in to comment.