Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/gba/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ extern uint8_t OAM[OAM_SIZE];

#define BG_VRAM VRAM
#define BG_CHAR_ADDR(n) (BG_VRAM + ((n) << 14))
#define BG_CHAR_ADDR_FROM_BGCNT(bg) (BG_VRAM + ((gBgCntRegs[bg] & BGCNT_CHARBASE(0x3)) << 12))
#define BG_CHAR_ADDR_FROM_BGCNT(bg) ((u8*)BG_VRAM + ((gBgCntRegs[bg] & BGCNT_CHARBASE(0x3)) << 12))
// TODO: Maybe rename BG_SCREEN_ADDR
#define BG_SCREEN_ADDR(n) (BG_VRAM + (0x800 * (n)))
#define BG_TILE_ADDR(n) (BG_VRAM + (0x80 * (n)))
Expand Down
5 changes: 2 additions & 3 deletions include/gba/types.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef GUARD_GBA_TYPES_H
#define GUARD_GBA_TYPES_H

#include "gba/defines.h"
#include "gba/defines.h" // for int_vcount (TODO)

#ifndef GEN_CTX
#if !GEN_CTX
#include <stdint.h>
#endif

Expand All @@ -20,7 +20,6 @@
typedef struct __attribute__((packed)) name struct_body name;
#endif


typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
Expand Down
1 change: 1 addition & 0 deletions src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ static void ClearOamBufferDma(void)
DmaFill16(3, 0x200, gOamBuffer + (OAM_ENTRY_COUNT / 4) * 1, OAM_SIZE / 4);
DmaFill16(3, 0x200, gOamBuffer + (OAM_ENTRY_COUNT / 4) * 2, OAM_SIZE / 4);
DmaFill16(3, 0x200, gOamBuffer + (OAM_ENTRY_COUNT / 4) * 3, OAM_SIZE / 4);

gNumVBlankCallbacks = 0;
gFlags &= ~FLAGS_10;
}
Expand Down
4 changes: 2 additions & 2 deletions src/game/sa1_sa2_shared/rings_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ NONMATCH("asm/non_matching/game/sa1_sa2_shared/Task_RingsMgrMain_collect_rings.i

DmaCopy16(3, oamDat, oamAllocated, sizeof(OamDataShort));

// TODO: Can these be done more explicitly?
#if !EXTENDED_OAM
// TODO: Can these be done more explicitly?
oamAllocated->all.attr1 &= 0xFE00;
oamAllocated->all.attr0 &= 0xFF00;
oamAllocated->all.attr0 += ((ry - gCamera.y) - dimensions->offsetY) & 0xFF;
Expand Down Expand Up @@ -437,8 +437,8 @@ NONMATCH("asm/non_matching/game/sa1_sa2_shared/Task_RingsMgrMain_collect_rings.i

DmaCopy16(3, oamDat, oamAllocated, sizeof(OamDataShort));

// TODO: Can these be done more explicitly?
#if !EXTENDED_OAM
// TODO: Can these be done more explicitly?
oamAllocated->all.attr1 &= 0xFE00;
oamAllocated->all.attr0 &= 0xFF00;
oamAllocated->all.attr0 += ((ry - gCamera.y) - dimensions->offsetY) & 0xFF;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/pret_sdl/sdl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1950,4 +1950,4 @@ u16 Sqrt(u32 num)
return bound;
}

int MultiBoot(struct MultiBootParam *mp) { return 0; }
int MultiBoot(struct MultiBootParam *mp) { return 0; }
Loading
Loading