Update yaze lib source
This commit is contained in:
16
src/yaze.cc
16
src/yaze.cc
@@ -1,15 +1,16 @@
|
|||||||
#include "yaze.h"
|
#include "yaze.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <iostream>
|
||||||
|
|
||||||
#include "app/rom.h"
|
#include "app/rom.h"
|
||||||
#include "app/zelda3/overworld/overworld.h"
|
#include "app/zelda3/overworld/overworld.h"
|
||||||
|
#include "dungeon.h"
|
||||||
|
|
||||||
void yaze_check_version(const char *version) {
|
void yaze_check_version(const char *version) {
|
||||||
printf("Yaze version: %s\n", version);
|
std::cout << "Yaze version: " << version << std::endl;
|
||||||
auto version_check = yaze::core::CheckVersion(version);
|
auto version_check = yaze::core::CheckVersion(version);
|
||||||
if (!version_check.ok()) {
|
if (!version_check.ok()) {
|
||||||
printf("%s\n", version_check.status().message().data());
|
std::cout << version_check.status().message() << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -121,3 +122,12 @@ z3_overworld* yaze_load_overworld(const z3_rom* rom) {
|
|||||||
}
|
}
|
||||||
return overworld;
|
return overworld;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
z3_dungeon_room *yaze_load_all_rooms(const z3_rom *rom) {
|
||||||
|
if (rom->impl == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
yaze::Rom *internal_rom = static_cast<yaze::Rom *>(rom->impl);
|
||||||
|
z3_dungeon_room *rooms = new z3_dungeon_room[256];
|
||||||
|
return rooms;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user