fix character selection screen?

This commit is contained in:
Héctor Giménez
2024-05-23 00:18:55 +09:00
parent f4dc1d3689
commit b428238643
2 changed files with 15 additions and 1 deletions

View File

@@ -183,7 +183,7 @@ func (gd *GameReader) getStatsList(statListPtr uintptr) stat.Stats {
func (gd *GameReader) InCharacterSelectionScreen() bool {
uiBase := gd.Process.moduleBaseAddressPtr + gd.offset.UI - 0xA
return gd.Process.ReadUInt(uiBase, Uint8) != 1 && gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x214A5A6, Uint64) == 0
return gd.Process.ReadUInt(uiBase, Uint8) != 1 && gd.Process.ReadUInt(gd.moduleBaseAddressPtr+0x214A5A6, Uint8) == 0
}
func (gd *GameReader) GetSelectedCharacterName() string {

View File

@@ -18,3 +18,17 @@ func BenchmarkDataReader(b *testing.B) {
gr.GetData()
}
}
func BenchmarkPF(b *testing.B) {
process, err := NewProcess()
require.NoError(b, err)
gr := NewGameReader(process)
gr.GetData()
b.ResetTimer()
for n := 0; n < b.N; n++ {
gr.GetData()
}
}