fix character selection screen?
This commit is contained in:
@@ -183,7 +183,7 @@ func (gd *GameReader) getStatsList(statListPtr uintptr) stat.Stats {
|
|||||||
func (gd *GameReader) InCharacterSelectionScreen() bool {
|
func (gd *GameReader) InCharacterSelectionScreen() bool {
|
||||||
uiBase := gd.Process.moduleBaseAddressPtr + gd.offset.UI - 0xA
|
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 {
|
func (gd *GameReader) GetSelectedCharacterName() string {
|
||||||
|
|||||||
@@ -18,3 +18,17 @@ func BenchmarkDataReader(b *testing.B) {
|
|||||||
gr.GetData()
|
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()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user