[nostalgia/core/gba] Remove unused header
This commit is contained in:
parent
e5a66e1160
commit
4247ac0651
@ -1,35 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2016 - 2019 gtalent2@gmail.com
|
|
||||||
*
|
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <ox/std/types.hpp>
|
|
||||||
|
|
||||||
namespace nostalgia::core {
|
|
||||||
|
|
||||||
typedef struct { uint32_t data[8]; } __attribute__((aligned(4))) Tile, Tile4;
|
|
||||||
// d-tile: double-sized tile (8bpp)
|
|
||||||
typedef struct { uint32_t data[16]; } __attribute__((aligned(4))) Tile8;
|
|
||||||
// tile block: 32x16 tiles, 16x16 d-tiles
|
|
||||||
using Palette = uint16_t[256];
|
|
||||||
using CharBlock = Tile[512];
|
|
||||||
using CharBlock8 = Tile8[256];
|
|
||||||
|
|
||||||
struct __attribute__((packed)) GbaImageDataHeader {
|
|
||||||
uint8_t bpp = 0;
|
|
||||||
uint16_t tileCount = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct __attribute__((packed)) GbaImageData {
|
|
||||||
GbaImageDataHeader header;
|
|
||||||
uint8_t colors = 0; // colors in the palette
|
|
||||||
Palette __attribute__((packed)) pal = {};
|
|
||||||
uint8_t tiles[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
@ -14,15 +14,13 @@
|
|||||||
#include <nostalgia/core/gfx.hpp>
|
#include <nostalgia/core/gfx.hpp>
|
||||||
|
|
||||||
#include "addresses.hpp"
|
#include "addresses.hpp"
|
||||||
#include "gba.hpp"
|
|
||||||
#include "panic.hpp"
|
#include "panic.hpp"
|
||||||
|
|
||||||
namespace nostalgia::core {
|
namespace nostalgia::core {
|
||||||
|
|
||||||
extern char charMap[128];
|
extern char charMap[128];
|
||||||
|
|
||||||
#define TILE_ADDR ((CharBlock*) 0x06000000)
|
#define TILE_ADDR reinterpret_cast<uint16_t*>(0x06000000)
|
||||||
#define TILE8_ADDR ((CharBlock8*) 0x06000000)
|
|
||||||
|
|
||||||
constexpr auto GBA_TILE_COLUMNS = 32;
|
constexpr auto GBA_TILE_COLUMNS = 32;
|
||||||
constexpr auto GBA_TILE_ROWS = 32;
|
constexpr auto GBA_TILE_ROWS = 32;
|
||||||
@ -134,7 +132,7 @@ ox::Error loadTileSheet(Context *ctx,
|
|||||||
GbaTileMapTarget target;
|
GbaTileMapTarget target;
|
||||||
target.pal.palette = &MEM_PALLETE_BG[section];
|
target.pal.palette = &MEM_PALLETE_BG[section];
|
||||||
target.bgCtl = &bgCtl(section);
|
target.bgCtl = &bgCtl(section);
|
||||||
target.tileMap = reinterpret_cast<uint16_t*>(&TILE_ADDR[section][0]);
|
target.tileMap = &TILE_ADDR[section];
|
||||||
oxReturnError(ox::readMC(ts, tsStat.size, &target));
|
oxReturnError(ox::readMC(ts, tsStat.size, &target));
|
||||||
// load external palette if available
|
// load external palette if available
|
||||||
if (paletteAddr) {
|
if (paletteAddr) {
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
#include <QImage>
|
#include <QImage>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
|
||||||
#include <nostalgia/core/gba/gba.hpp>
|
|
||||||
#include <nostalgia/core/core.hpp>
|
#include <nostalgia/core/core.hpp>
|
||||||
|
|
||||||
#include "imgconv.hpp"
|
#include "imgconv.hpp"
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <nostalgia/core/gba/gba.hpp>
|
|
||||||
#include <nostalgia/common/point.hpp>
|
#include <nostalgia/common/point.hpp>
|
||||||
#include <ox/clargs/clargs.hpp>
|
#include <ox/clargs/clargs.hpp>
|
||||||
#include <ox/fs/fs.hpp>
|
#include <ox/fs/fs.hpp>
|
||||||
@ -20,7 +19,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace ox;
|
using namespace ox;
|
||||||
using namespace nostalgia::core;
|
|
||||||
using namespace nostalgia::common;
|
using namespace nostalgia::common;
|
||||||
|
|
||||||
[[nodiscard]] ox::ValErr<std::vector<uint8_t>> loadFileBuff(std::string path, ::size_t *sizeOut = nullptr) {
|
[[nodiscard]] ox::ValErr<std::vector<uint8_t>> loadFileBuff(std::string path, ::size_t *sizeOut = nullptr) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
add_library(
|
add_library(
|
||||||
NostalgiaPack SHARED
|
NostalgiaPack
|
||||||
pack.cpp
|
pack.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,6 +17,6 @@ target_link_libraries(
|
|||||||
install(
|
install(
|
||||||
TARGETS
|
TARGETS
|
||||||
NostalgiaPack
|
NostalgiaPack
|
||||||
LIBRARY DESTINATION
|
ARCHIVE DESTINATION
|
||||||
${NOSTALGIA_DIST_LIB}/nostalgia
|
${NOSTALGIA_DIST_LIB}/nostalgia
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user