When determining room visibility, the camera's frustum was previously
used for all recursive doorway checks, meaning rooms were considered
visible even if they were occluded. With the right level and camera
angle, all rooms could be considered visible at once.
Now, for each recursive check, a new frustum is created from the previous
doorway's bounds.
This helps significantly in larger levels, but there is still room for
improvement. Each new frustum is not clipped to the previous, and so it
is still possible for unseen rooms to be included.
It's important to consider performance here. Some checks may be too
expensive for realtime. At a minimum, a worthwhile improvement is to
precompute at compile time which rooms are potentially visible from a
given room. At runtime, other rooms can be quickly skipped.
* replace OSTime with Time
* replace osGetTime with timeGetTime
* replace OS_CYCLES_TO_USEC with timeMicroseconds
* replace OS_CYCLES_TO_NSEC with timeNanoseconds
also
* lastReportStart of ProfileData was used to store both cycles and microseconds, now it stores only microseconds
* fix typo: ns instead of us
* Wrap OSTimer usage into sleep function.
* Remove unused gLastTime.
This makes time.h independent from libultra, so let's rename time.c to time_libultra.c.
TODO: should we move time.h and time_libultra.c to the src/system folder?
* Add time unit to macro name.
* Move time initialization call to main function.
* Move time.h and time_libultra.c to src/system folder.
* Decouple controls interface from libultra.
* Use enums instead of defines for constant values.
* Get both controller stick axes with a single function call.
* Move controller .h\.c files to src/system folder and rename controller.c to controller_libultra.c.
* Adhere to enum and struct naming convention of the codebase.
* Fix typo: the N64 controller only has one analog stick.
Specifically:
* append all include search paths to LCINCS
* add LDDIRS to group all library search paths
* avoid link libm as math funtions are actually inside libultra
* use the shorthand -lc instead of -l:libc.a to link libc