mirror of
https://github.com/Lorenzooone/Pokemon-Gen3-to-Gen-X.git
synced 2026-04-29 01:56:55 -05:00
Better separate GBA and NDS
This commit is contained in:
parent
f3499c1803
commit
97bb4f0d26
|
|
@ -1,7 +1,7 @@
|
||||||
#ifndef BASE_INCLUDE__
|
#ifndef BASE_INCLUDE__
|
||||||
#define BASE_INCLUDE__
|
#define BASE_INCLUDE__
|
||||||
|
|
||||||
#ifndef __NDS__
|
#ifdef __GBA__
|
||||||
|
|
||||||
// GBA defines and all
|
// GBA defines and all
|
||||||
#include <gba.h>
|
#include <gba.h>
|
||||||
|
|
@ -15,10 +15,6 @@ ALWAYS_INLINE MAX_OPTIMIZE int __get_next_vcount_interrupt(void) {
|
||||||
u16 reg_val = REG_DISPSTAT;
|
u16 reg_val = REG_DISPSTAT;
|
||||||
return reg_val >> 8;
|
return reg_val >> 8;
|
||||||
}
|
}
|
||||||
ALWAYS_INLINE MAX_OPTIMIZE void __reset_vcount(void) {
|
|
||||||
// Does not work on GBA
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#define __set_next_vcount_interrupt(x) __set_next_vcount_interrupt_gba(x)
|
#define __set_next_vcount_interrupt(x) __set_next_vcount_interrupt_gba(x)
|
||||||
#define SCANLINE_IRQ_BIT LCDC_VCNT
|
#define SCANLINE_IRQ_BIT LCDC_VCNT
|
||||||
#define REG_WAITCNT *(vu16*)(REG_BASE + 0x204) // Wait state Control
|
#define REG_WAITCNT *(vu16*)(REG_BASE + 0x204) // Wait state Control
|
||||||
|
|
@ -40,7 +36,9 @@ ALWAYS_INLINE MAX_OPTIMIZE void __reset_vcount(void) {
|
||||||
#endif
|
#endif
|
||||||
#define CONSOLE_LETTER 'G'
|
#define CONSOLE_LETTER 'G'
|
||||||
|
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#ifdef __NDS__
|
||||||
|
|
||||||
// NDS defines and all
|
// NDS defines and all
|
||||||
#include <nds.h>
|
#include <nds.h>
|
||||||
|
|
|
||||||
|
|
@ -129,8 +129,10 @@ IWRAM_CODE void vblank_update_function() {
|
||||||
// Handle trading animation
|
// Handle trading animation
|
||||||
if(curr_state == TRADING_ANIMATION)
|
if(curr_state == TRADING_ANIMATION)
|
||||||
advance_trade_animation();
|
advance_trade_animation();
|
||||||
|
#ifdef __NDS__
|
||||||
// Increase FPS on NDS
|
// Increase FPS on NDS
|
||||||
//__reset_vcount();
|
//__reset_vcount();
|
||||||
|
#endif
|
||||||
#ifdef HAS_SIO
|
#ifdef HAS_SIO
|
||||||
// Handle slave communications
|
// Handle slave communications
|
||||||
if((REG_SIOCNT & SIO_IRQ) && (!(REG_SIOCNT & SIO_START)))
|
if((REG_SIOCNT & SIO_IRQ) && (!(REG_SIOCNT & SIO_START)))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user