Implement nost-pack tool
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
ox::std::Error init() {
|
||||
ox::Error init() {
|
||||
auto err = initGfx();
|
||||
return err;
|
||||
}
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
ox::std::Error init();
|
||||
ox::Error init();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2016-2017 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
|
||||
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
typedef struct { uint32_t data[8]; } Tile, Tile4;
|
||||
// d-tile: double-sized tile (8bpp)
|
||||
typedef struct { uint32_t data[16]; } Tile8;
|
||||
// tile block: 32x16 tiles, 16x16 d-tiles
|
||||
typedef unsigned short Pallete[256];
|
||||
typedef Tile CharBlock[512];
|
||||
typedef Tile8 CharBlock8[256];
|
||||
|
||||
struct GbaImageData {
|
||||
Pallete pal;
|
||||
uint8_t tiles[1];
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
+2
-10
@@ -10,26 +10,18 @@
|
||||
#include <ox/std/std.hpp>
|
||||
#include "addresses.hpp"
|
||||
#include "media.hpp"
|
||||
#include "gba.hpp"
|
||||
#include "dirt.h"
|
||||
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
using namespace ox::fs;
|
||||
using namespace ox::std;
|
||||
|
||||
typedef struct { uint32_t data[8]; } Tile, Tile4;
|
||||
// d-tile: double-sized tile (8bpp)
|
||||
typedef struct { uint32_t data[16]; } Tile8;
|
||||
// tile block: 32x16 tiles, 16x16 d-tiles
|
||||
typedef struct { unsigned short data[256]; } Pallete;
|
||||
typedef Tile CharBlock[512];
|
||||
typedef Tile8 CharBlock8[256];
|
||||
|
||||
#define TILE_ADDR ((CharBlock*) 0x06000000)
|
||||
#define TILE8_ADDR ((CharBlock8*) 0x06000000)
|
||||
|
||||
ox::std::Error initGfx() {
|
||||
ox::Error initGfx() {
|
||||
/* Sprite Mode ----\ */
|
||||
/* ---\| */
|
||||
/* Background 0 -\|| */
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
ox::std::Error initGfx();
|
||||
ox::Error initGfx();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
namespace nostalgia {
|
||||
namespace core {
|
||||
|
||||
ox::std::Error initGfx() {
|
||||
ox::Error initGfx() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user