Skip to content

Commit

Permalink
Disable adding faces to fix PS2 tiling in editor
Browse files Browse the repository at this point in the history
No one tries to load new levels on PS2 and I'm not sure if PS2 game variant
even knows how to load current rfl format version. Those faces only reduce
reduce performance for no real benefit.
  • Loading branch information
rafalh committed Dec 10, 2024
1 parent a00f3d6 commit a42be40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Version 1.9.0 (not released yet)
- Add level filename to "Level Initializing" console message
- Add support for bluebeard.bty (sound config file) in mods
- Properly handle WM_PAINT in dedicated server, may improve performance (DF bug)
- Disable adding faces to fix PS2 tiling in editor

[@GooberRF](https://github.com/GooberRF)
- Fix crash when `verify_level` command is run without a level being loaded
Expand Down
4 changes: 4 additions & 0 deletions editor_patch/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ extern "C" DWORD DF_DLL_EXPORT Init([[maybe_unused]] void* unused)
write_mem_ptr(0x004A72A2+3, found_faces_b);
write_mem_ptr(0x004A72F9+1, found_faces_b);

// Disable adding faces to fix PS2 tiling
AsmWriter{0x0043A081}.jmp(0x0043A0E9);
AsmWriter{0x0043A0EF}.nop(3);

return 1; // success
}

Expand Down

0 comments on commit a42be40

Please sign in to comment.