mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-06-16 12:52:55 +00:00
|
Some checks are pending
Build coop / build-linux (push) Waiting to run
Build coop / build-steamos (push) Waiting to run
Build coop / build-windows-opengl (push) Waiting to run
Build coop / build-windows-directx (push) Waiting to run
Build coop / build-macos-arm (push) Waiting to run
Build coop / build-macos-intel (push) Waiting to run
Loading the scroll targets was probably the slowest parts to loading a romhack. The reason for this is that many romhacks can have thousands of calls to `add_scroll_target`. So, for 4,107 calls to `add_scroll_target`, the time went from ~4.5759 seconds to ~0.0173 seconds in total. Changes made: - Previously, simply finding the material data to scroll was rather slow due to using a linear sub string search across all vertices in all levels. To speed this up, I added a cache. The cache bypasses checking every level by storing the exact string (rather than the substring) in a hashmap, so lookups become a simple case of a string lookup as a key in the map. It falls back to the full lookup if the cache doesn't hit. - Changed the vertex buffer management in `scroll_targets.c` to behave closer to a modern dynamic array, where buffer size is doubled each time a new vertex buffer is added, to reduce the number of allocations performed. |
||
|---|---|---|
| .. | ||
| behavior_data.c | ||
| behavior_table.c | ||
| dynos.c.h | ||
| dynos.cpp.h | ||
| dynos.h | ||
| dynos_bin_actor.cpp | ||
| dynos_bin_ambient_t.cpp | ||
| dynos_bin_animation.cpp | ||
| dynos_bin_behavior.cpp | ||
| dynos_bin_col.cpp | ||
| dynos_bin_common.cpp | ||
| dynos_bin_compress.cpp | ||
| dynos_bin_geo.cpp | ||
| dynos_bin_gfx.cpp | ||
| dynos_bin_legacy.cpp | ||
| dynos_bin_light0.cpp | ||
| dynos_bin_light_t.cpp | ||
| dynos_bin_lights.cpp | ||
| dynos_bin_lvl.cpp | ||
| dynos_bin_lvl_validate.cpp | ||
| dynos_bin_macro_object.cpp | ||
| dynos_bin_movtex.cpp | ||
| dynos_bin_movtexqc.cpp | ||
| dynos_bin_pointer.cpp | ||
| dynos_bin_read.cpp | ||
| dynos_bin_rooms.cpp | ||
| dynos_bin_tex.cpp | ||
| dynos_bin_texlist.cpp | ||
| dynos_bin_trajectory.cpp | ||
| dynos_bin_utils.cpp | ||
| dynos_bin_vtx.cpp | ||
| dynos_c.cpp | ||
| dynos_cmap.cpp | ||
| dynos_cmap.cpp.h | ||
| dynos_gfx_init.cpp | ||
| dynos_level.cpp | ||
| dynos_main.cpp | ||
| dynos_mgr_actor.cpp | ||
| dynos_mgr_anim.cpp | ||
| dynos_mgr_bhv.cpp | ||
| dynos_mgr_builtin.cpp | ||
| dynos_mgr_builtin_externs.h | ||
| dynos_mgr_builtin_tex.cpp | ||
| dynos_mgr_col.cpp | ||
| dynos_mgr_gfx.cpp | ||
| dynos_mgr_lvl.cpp | ||
| dynos_mgr_moddata.cpp | ||
| dynos_mgr_moddata.hpp | ||
| dynos_mgr_models.cpp | ||
| dynos_mgr_movtexqc.cpp | ||
| dynos_mgr_pack.cpp | ||
| dynos_mgr_tex.cpp | ||
| dynos_misc.cpp | ||
| dynos_warps.cpp | ||