[nostalgia/core] Replace old namespace nesting with C++17 nesting
This commit is contained in:
parent
2830eb76b6
commit
941d714630
@ -9,8 +9,7 @@
|
|||||||
#include "mem.hpp"
|
#include "mem.hpp"
|
||||||
#include "core.hpp"
|
#include "core.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
ox::Error init(Context *ctx) {
|
ox::Error init(Context *ctx) {
|
||||||
ox::Error err = 0;
|
ox::Error err = 0;
|
||||||
@ -20,4 +19,3 @@ ox::Error init(Context *ctx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -14,10 +14,8 @@
|
|||||||
#include "media.hpp"
|
#include "media.hpp"
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
ox::Error init(Context *ctx);
|
ox::Error init(Context *ctx);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
|
|
||||||
#include <ox/std/types.hpp>
|
#include <ox/std/types.hpp>
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
typedef struct { uint32_t data[8]; } __attribute__((aligned(4))) Tile, Tile4;
|
typedef struct { uint32_t data[8]; } __attribute__((aligned(4))) Tile, Tile4;
|
||||||
// d-tile: double-sized tile (8bpp)
|
// d-tile: double-sized tile (8bpp)
|
||||||
@ -33,4 +32,3 @@ struct __attribute__((packed)) GbaImageData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
|
|
||||||
#include "../gfx.hpp"
|
#include "../gfx.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
using namespace ox;
|
using namespace ox;
|
||||||
|
|
||||||
@ -249,4 +248,3 @@ void setTile(Context *ctx, int layer, int column, int row, uint8_t tile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
#include "../media.hpp"
|
#include "../media.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
uint8_t *loadRom(const char*) {
|
uint8_t *loadRom(const char*) {
|
||||||
// put the header in the wrong order to prevent mistaking this code for the
|
// put the header in the wrong order to prevent mistaking this code for the
|
||||||
@ -34,4 +33,3 @@ uint8_t *loadRom(const char*) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -9,8 +9,7 @@
|
|||||||
#include "../core.hpp"
|
#include "../core.hpp"
|
||||||
#include "panic.hpp"
|
#include "panic.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
void panic(const char *msg) {
|
void panic(const char *msg) {
|
||||||
initConsole(nullptr);
|
initConsole(nullptr);
|
||||||
@ -23,5 +22,3 @@ void panic(const char *msg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -10,11 +10,9 @@
|
|||||||
|
|
||||||
#include "panic.hpp"
|
#include "panic.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
void panic(const char *msg);
|
void panic(const char *msg);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
#include "context.hpp"
|
#include "context.hpp"
|
||||||
#include "types.hpp"
|
#include "types.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
ox::Error initGfx(Context *ctx);
|
ox::Error initGfx(Context *ctx);
|
||||||
|
|
||||||
@ -27,4 +26,3 @@ void puts(Context *ctx, int loc, const char *str);
|
|||||||
void setTile(Context *ctx, int layer, int column, int row, uint8_t tile);
|
void setTile(Context *ctx, int layer, int column, int row, uint8_t tile);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -10,10 +10,8 @@
|
|||||||
|
|
||||||
#include <ox/std/types.hpp>
|
#include <ox/std/types.hpp>
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
uint8_t *loadRom(const char *path = "");
|
uint8_t *loadRom(const char *path = "");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,10 +6,8 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
void initHeap();
|
void initHeap();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
|
|
||||||
#include "../gfx.hpp"
|
#include "../gfx.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
ox::Error initGfx(Context *ctx) {
|
ox::Error initGfx(Context *ctx) {
|
||||||
return 1;
|
return 1;
|
||||||
@ -30,4 +29,3 @@ void setTile(Context *ctx, int layer, int column, int row, uint8_t tile) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -11,8 +11,7 @@
|
|||||||
|
|
||||||
#include "import_tilesheet_wizard.hpp"
|
#include "import_tilesheet_wizard.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
const QString ImportTilesheetWizardPage::TileSheetDir = "/TileSheets/";
|
const QString ImportTilesheetWizardPage::TileSheetDir = "/TileSheets/";
|
||||||
const QString ImportTilesheetWizardPage::TileSheetName = "projectName";
|
const QString ImportTilesheetWizardPage::TileSheetName = "projectName";
|
||||||
@ -75,4 +74,3 @@ int ImportTilesheetWizardPage::importImage(QFile &srcFile, QString tilesheetName
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -10,8 +10,7 @@
|
|||||||
|
|
||||||
#include <nostalgia/studio/studio.hpp>
|
#include <nostalgia/studio/studio.hpp>
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
class ImportTilesheetWizardPage: public studio::WizardFormPage {
|
class ImportTilesheetWizardPage: public studio::WizardFormPage {
|
||||||
private:
|
private:
|
||||||
@ -31,4 +30,3 @@ class ImportTilesheetWizardPage: public studio::WizardFormPage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
using namespace nostalgia::studio;
|
using namespace nostalgia::studio;
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
Plugin::Plugin() {
|
Plugin::Plugin() {
|
||||||
}
|
}
|
||||||
@ -32,4 +31,3 @@ QVector<studio::WizardMaker> Plugin::importWizards(const studio::Context *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
|
|
||||||
#include <nostalgia/studio/studio.hpp>
|
#include <nostalgia/studio/studio.hpp>
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
class Plugin: public QObject, studio::Plugin {
|
class Plugin: public QObject, studio::Plugin {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -27,4 +26,3 @@ class Plugin: public QObject, studio::Plugin {
|
|||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -11,12 +11,10 @@
|
|||||||
|
|
||||||
#include "../media.hpp"
|
#include "../media.hpp"
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
uint8_t *loadRom(const char*) {
|
uint8_t *loadRom(const char*) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -6,11 +6,9 @@
|
|||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace nostalgia {
|
namespace nostalgia::core {
|
||||||
namespace core {
|
|
||||||
|
|
||||||
void initHeap() {
|
void initHeap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user