This commit is contained in:
2
deps/ox/deps/jsoncpp/CMakeLists.txt
vendored
2
deps/ox/deps/jsoncpp/CMakeLists.txt
vendored
@@ -193,7 +193,7 @@ endif()
|
||||
|
||||
# DrinkingTea - begin
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "-Wno-everything")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-everything")
|
||||
endif()
|
||||
# DrinkingTea - end
|
||||
|
||||
|
||||
20
deps/teagba/include/teagba/addresses.hpp
vendored
20
deps/teagba/include/teagba/addresses.hpp
vendored
@@ -99,23 +99,23 @@ volatile OffsetPair ®BgOfs(auto const bgIdx) noexcept {
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Memory Addresses
|
||||
|
||||
#define MEM_EWRAM (*reinterpret_cast<ox::Array<uint16_t, 0x0203'FFFF - 0x0200'0000>*>(0x0200'0000))
|
||||
#define MEM_EWRAM (*(reinterpret_cast<ox::Array<uint16_t, 0x0203'FFFF - 0x0200'0000>*>(0x0200'0000)))
|
||||
|
||||
#define MEM_IWRAM (*reinterpret_cast<ox::Array<uint8_t, 0x0300'7FFF - 0x0300'0000>*>(0x0300'0000))
|
||||
#define MEM_IWRAM (*(reinterpret_cast<ox::Array<uint8_t, 0x0300'7FFF - 0x0300'0000>*>(0x0300'0000)))
|
||||
|
||||
#define REG_BLNDCTL (*reinterpret_cast<uint16_t*>(0x0400'0050))
|
||||
|
||||
using Palette = ox::Array<uint16_t, 128>;
|
||||
#define MEM_BG_PALETTE (*reinterpret_cast<::Palette*>(0x0500'0000))
|
||||
#define MEM_SPRITE_PALETTE (*reinterpret_cast<::Palette*>(0x0500'0200))
|
||||
#define MEM_BG_PALETTE (*(reinterpret_cast<::Palette*>(0x0500'0000)))
|
||||
#define MEM_SPRITE_PALETTE (*(reinterpret_cast<::Palette*>(0x0500'0200)))
|
||||
|
||||
using BgMapTile = ox::Array<uint16_t, 8192>;
|
||||
#define MEM_BG_TILES (*reinterpret_cast<ox::Array<BgMapTile, 4>*>(0x0600'0000))
|
||||
#define MEM_BG_MAP (*reinterpret_cast<ox::Array<BgMapTile, 4>*>(0x0600'e000))
|
||||
#define MEM_BG_TILES (*(reinterpret_cast<ox::Array<BgMapTile, 4>*>(0x0600'0000)))
|
||||
#define MEM_BG_MAP (*(reinterpret_cast<ox::Array<BgMapTile, 4>*>(0x0600'e000)))
|
||||
|
||||
#define MEM_SPRITE_TILES (*reinterpret_cast<ox::Array<uint16_t, 32 * ox::units::KB>*>(0x0601'0000))
|
||||
#define MEM_OAM (*reinterpret_cast<ox::Array<uint64_t, 64>*>(0x0700'0000))
|
||||
#define MEM_SPRITE_TILES (*(reinterpret_cast<ox::Array<uint16_t, 32 * ox::units::KB>*>(0x0601'0000)))
|
||||
#define MEM_OAM (*(reinterpret_cast<ox::Array<uint64_t, 64>*>(0x0700'0000)))
|
||||
|
||||
#define MEM_ROM (*reinterpret_cast<ox::Array<char, 32 * ox::units::MB>*>(0x0700'0000))
|
||||
#define MEM_ROM (*(reinterpret_cast<ox::Array<char, 32 * ox::units::MB>*>(0x0700'0000)))
|
||||
|
||||
#define MEM_SRAM (*reinterpret_cast<ox::Array<char, 64 * ox::units::KB>*>(0x0e00'0000))
|
||||
#define MEM_SRAM (*(reinterpret_cast<ox::Array<char, 64 * ox::units::KB>*>(0x0e00'0000)))
|
||||
|
||||
2
deps/teagba/include/teagba/gfx.hpp
vendored
2
deps/teagba/include/teagba/gfx.hpp
vendored
@@ -43,6 +43,4 @@ void applySpriteUpdates() noexcept;
|
||||
|
||||
void setBgOffset(uint16_t bg, int16_t x, int16_t y) noexcept;
|
||||
|
||||
void scrollBgOffset(uint16_t bg, int16_t x, int16_t y) noexcept;
|
||||
|
||||
}
|
||||
|
||||
8
deps/teagba/src/gfx.cpp
vendored
8
deps/teagba/src/gfx.cpp
vendored
@@ -18,7 +18,7 @@ GbaSpriteAttrUpdate &spriteAttr(size_t const i) noexcept {
|
||||
|
||||
void addSpriteUpdate(GbaSpriteAttrUpdate const &upd) noexcept {
|
||||
const auto ie = REG_IE; // disable vblank interrupt handler
|
||||
REG_IE = REG_IE & static_cast<uint16_t>(~teagba::Int_vblank); // disable vblank interrupt handler
|
||||
REG_IE = REG_IE & static_cast<uint16_t>(~Int_vblank); // disable vblank interrupt handler
|
||||
g_spriteBuffer[upd.idx] = upd;
|
||||
REG_IE = ie; // enable vblank interrupt handler
|
||||
}
|
||||
@@ -35,10 +35,4 @@ void setBgOffset(uint16_t const bg, int16_t const x, int16_t const y) noexcept {
|
||||
o.y = y;
|
||||
}
|
||||
|
||||
void scrollBgOffset(uint16_t const bg, int16_t const x, int16_t const y) noexcept {
|
||||
auto &o = regBgOfs(bg);
|
||||
o.x = o.x + x;
|
||||
o.y = o.y + y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user