1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 08:50:23 +00:00

Fix misc 6 (#1148)

* Fix typo `vertexs` -> `vertices`

* Fix typo `limbMatricies` -> `limbMatrices`

* Fix some `gSPTextureRectangle` usage of fixed point constants

* Run formatter

* `ALIGN8` macro

* `object_skj` cleanup

* sholder -> shoulder

* cleanup `stdbool.h`

* Some function prototypes cleanup

* Use macros in `osVirtualToPhysical`
This commit is contained in:
Dragorn421 2022-02-20 14:22:29 +01:00 committed by GitHub
parent c3533052ca
commit a9526a3354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 128 additions and 130 deletions

View file

@ -1,12 +1,12 @@
#include "global.h"
u32 osVirtualToPhysical(void* vaddr) {
if ((u32)vaddr >= 0x80000000 && (u32)vaddr < 0xA0000000) {
return (u32)vaddr & 0x1FFFFFFF;
if (IS_KSEG0(vaddr)) {
return K0_TO_PHYS(vaddr);
}
if ((u32)vaddr >= 0xA0000000 && (u32)vaddr < 0xC0000000) {
return (u32)vaddr & 0x1FFFFFFF;
if (IS_KSEG1(vaddr)) {
return K1_TO_PHYS(vaddr);
}
return __osProbeTLB(vaddr);