Rename build-rom to gba-pkg
This commit is contained in:
parent
9f2441bc82
commit
591c738730
8
Makefile
8
Makefile
@ -15,10 +15,10 @@ endif
|
|||||||
|
|
||||||
make:
|
make:
|
||||||
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
||||||
build-rom:
|
gba-pkg:
|
||||||
${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="install" HOST_ENV=${HOST_ENV}
|
||||||
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build HOST_ENV=${HOST_ENV}
|
||||||
${ENV_RUN} ./scripts/build_rom.sh
|
${ENV_RUN} ./scripts/gba-pkg
|
||||||
preinstall:
|
preinstall:
|
||||||
${ENV_RUN} ${MAKE} -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV}
|
${ENV_RUN} ${MAKE} -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV}
|
||||||
install:
|
install:
|
||||||
@ -34,14 +34,14 @@ run: install
|
|||||||
./dist/current/bin/nostalgia -debug
|
./dist/current/bin/nostalgia -debug
|
||||||
run-studio: install
|
run-studio: install
|
||||||
./dist/current/bin/nostalgia-studio -profile dist/current/share/nostalgia-studio.json
|
./dist/current/bin/nostalgia-studio -profile dist/current/share/nostalgia-studio.json
|
||||||
gba-run: build-rom
|
gba-run: gba-pkg
|
||||||
mgba-qt nostalgia.gba
|
mgba-qt nostalgia.gba
|
||||||
gdb: make
|
gdb: make
|
||||||
gdb ./build/current/src/wombat/wombat
|
gdb ./build/current/src/wombat/wombat
|
||||||
gdb-studio: make
|
gdb-studio: make
|
||||||
gdb "./dist/current/bin/nostalgia-studio -profile dist/current/share/nostalgia-studio.json"
|
gdb "./dist/current/bin/nostalgia-studio -profile dist/current/share/nostalgia-studio.json"
|
||||||
|
|
||||||
devenv-build:
|
devenv-image:
|
||||||
docker build . -t ${DEVENV_IMAGE}
|
docker build . -t ${DEVENV_IMAGE}
|
||||||
devenv:
|
devenv:
|
||||||
docker run -d \
|
docker run -d \
|
||||||
|
@ -11,11 +11,9 @@
|
|||||||
namespace nostalgia {
|
namespace nostalgia {
|
||||||
namespace world {
|
namespace world {
|
||||||
|
|
||||||
Zone::Zone() {
|
Zone::Zone(common::Bounds bnds) {
|
||||||
m_bounds.x = -1;
|
const auto size = bnds.width * bnds.height;
|
||||||
m_bounds.y = -1;
|
m_tiles = new TileDef[size];
|
||||||
m_bounds.width = -1;
|
|
||||||
m_bounds.height = -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Zone::draw(core::Context *ctx) {
|
void Zone::draw(core::Context *ctx) {
|
||||||
@ -25,16 +23,12 @@ size_t Zone::size() {
|
|||||||
return sizeof(Zone) + m_bounds.width * m_bounds.height * sizeof(TileDef);
|
return sizeof(Zone) + m_bounds.width * m_bounds.height * sizeof(TileDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
TileDef *Zone::tiles() {
|
|
||||||
return (TileDef*) (this + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
TileDef *Zone::tile(int row, int column) {
|
TileDef *Zone::tile(int row, int column) {
|
||||||
return &tiles()[row * m_bounds.width + column];
|
return &m_tiles[row * m_bounds.width + column];
|
||||||
}
|
}
|
||||||
|
|
||||||
void Zone::setTile(int row, int column, TileDef *td) {
|
void Zone::setTile(int row, int column, TileDef *td) {
|
||||||
tiles()[row * m_bounds.width + column] = *td;
|
m_tiles[row * m_bounds.width + column] = *td;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,10 @@ ox::Error ioOp(T *io, TileDef *obj) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct RegionDef {
|
||||||
|
uint32_t tileSheetInodes[20];
|
||||||
|
};
|
||||||
|
|
||||||
struct ZoneDef {
|
struct ZoneDef {
|
||||||
int32_t width = 0;
|
int32_t width = 0;
|
||||||
int32_t height = 0;
|
int32_t height = 0;
|
||||||
@ -38,17 +42,16 @@ class Zone {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
common::Bounds m_bounds;
|
common::Bounds m_bounds;
|
||||||
|
TileDef *m_tiles = nullptr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Zone();
|
Zone(common::Bounds bnds);
|
||||||
|
|
||||||
void draw(core::Context *ctx);
|
void draw(core::Context *ctx);
|
||||||
|
|
||||||
size_t size();
|
size_t size();
|
||||||
|
|
||||||
TileDef *tiles();
|
|
||||||
|
|
||||||
TileDef *tile(int row, int column);
|
TileDef *tile(int row, int column);
|
||||||
|
|
||||||
void setTile(int row, int column, TileDef *td);
|
void setTile(int row, int column, TileDef *td);
|
||||||
|
Loading…
Reference in New Issue
Block a user