[jak2] Fix texture page dir offset for jak 2 (#2412)

Accidentally used Jak 1's tpage dir size...
This commit is contained in:
water111
2023-03-25 16:34:03 -04:00
committed by GitHub
parent 0a511da2ce
commit cbb07fb287
11 changed files with 36 additions and 18 deletions
+9 -2
View File
@@ -364,9 +364,16 @@ void TexturePool::draw_debug_for_tex(const std::string& name, GpuTexture* tex, u
ImGui::PopStyleColor();
}
PcTextureId TexturePool::allocate_pc_port_texture() {
PcTextureId TexturePool::allocate_pc_port_texture(GameVersion version) {
ASSERT(m_next_pc_texture_to_allocate < EXTRA_PC_PORT_TEXTURE_COUNT);
return PcTextureId(get_jak1_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++);
switch (version) {
case GameVersion::Jak1:
return PcTextureId(get_jak1_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++);
case GameVersion::Jak2:
return PcTextureId(get_jak2_tpage_dir().size() - 1, m_next_pc_texture_to_allocate++);
default:
ASSERT_NOT_REACHED();
}
}
std::string TexturePool::get_debug_texture_name(PcTextureId id) {