mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-16 20:10:28 +00:00
libultra cleanup (#215)
* cleanup libultra * fixes - use quotes instead of <> for includes - add macros for zelda specific thread priorities - fix Makefile - properly format the remaining pfs structs * fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL * remove ULTRA_ABS * fix includes * update z_player.c/z_lib.c + run format.sh * merge upstream/master * fix include in En_Goroiwa * fix includes
This commit is contained in:
parent
6136ee6deb
commit
174af7384d
890 changed files with 2628 additions and 5625 deletions
|
@ -1,28 +0,0 @@
|
|||
#include <global.h>
|
||||
|
||||
void guS2DInitBg(uObjBg* bg) {
|
||||
u16 shift;
|
||||
u32 size;
|
||||
s32 tmem;
|
||||
|
||||
tmem = (bg->b.imageFmt == G_IM_FMT_CI) ? 0x100 : 0x200;
|
||||
|
||||
shift = (6 - bg->b.imageSiz);
|
||||
if (bg->b.imageLoad == G_BGLT_LOADBLOCK) {
|
||||
bg->b.tmemW = bg->b.imageW >> shift;
|
||||
bg->b.tmemH = (tmem / bg->b.tmemW) * 4;
|
||||
bg->b.tmemSizeW = bg->b.tmemW * 2;
|
||||
bg->b.tmemSize = bg->b.tmemH * bg->b.tmemSizeW;
|
||||
bg->b.tmemLoadSH = (bg->b.tmemSize >> 1) - 1;
|
||||
bg->b.tmemLoadTH = (0x7FF / bg->b.tmemW) + 1;
|
||||
} else { // G_BGLT_LOADTILE
|
||||
bg->b.tmemW = (bg->b.frameW >> shift) + 3;
|
||||
bg->b.tmemH = (tmem / bg->b.tmemW) * 4;
|
||||
bg->b.tmemSizeW = (bg->b.imageW >> shift) * 2;
|
||||
|
||||
size = bg->b.tmemH * bg->b.tmemSizeW;
|
||||
bg->b.tmemSize = (size >> 16);
|
||||
bg->b.tmemLoadSH = (size >> 0) & 0xFFFF;
|
||||
bg->b.tmemLoadTH = bg->b.tmemH - 1;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue