JubeatPlus 3.9.11
Loading...
Searching...
No Matches
note_timing_grade.h File Reference

The note hit-timing classifier used by the gameplay renderer. More...

Go to the source code of this file.

Functions

unsigned char ClassifyNoteTimingGrade (int nDeltaFrames)
 Classifies a note's hit timing into a judgement grade from its frame delta.

Detailed Description

The note hit-timing classifier used by the gameplay renderer.

Reconstructed from Ghidra program Jubeat (image base 0x100000000); all

Ghidra address:
values are offsets relative to that image base. This is a genuine free function: it takes no object receiver, touches no memory, and the binary carries no RTTI, embedded source path, or owning class for it, so the reconstruction rules' search for an owning class is exhausted. The basename is inferred because the shipped binary embeds no __FILE__ path. Called from -[MarkerTestView draw] at 0x80fa4.

Function Documentation

◆ ClassifyNoteTimingGrade()

unsigned char ClassifyNoteTimingGrade ( int nDeltaFrames)

Classifies a note's hit timing into a judgement grade from its frame delta.

Each grade is an unsigned in-range test of nDeltaFrames plus a bias, the standard "is x within [-bias, limit-bias)" idiom, applied tightest window first so the best matching window wins. The windows are asymmetric and grow more so as they widen: each is one frame wider on the early side, and the outermost band is markedly lopsided (115 frames early against 84 late), which is deliberate tuning rather than an off-by-one. The compiler emitted the whole function without branches, as a chain of four CSEL instructions at 0x1ab524..0x1ab540.

The two failure grades are distinct, so a caller can tell an early miss from a late one.

Parameters
nDeltaFramesThe signed hit offset in frames; negative is early, positive is late.
Returns
The judgement grade, tightest window first: 5 within [-12, +11] (best); 4 within [-24, +23]; 3 within [-48, +47]; 2 within [-115, +84]; 1 outside all windows and late; 0 outside all windows and early.
Ghidra address:
0x1ab4fc