@@ -0,0 +1,13 @@
+#ifndef INCLUDE_QUIRKS_H
+#define INCLUDE_QUIRKS_H
+
+namespace WalrusRPG
+{
+ namespace Quirks
+ {
+ void init();
+ void deinit();
+ }
+}
+#endif
@@ -1,7 +1,7 @@
#include "Interrupts.h"
#include "CXfb.h"
-#define INTERRUPTS WalrusRPG::Interrupts
+#define INTERRUPTS Nspire::Interrupts
#define INTERRUPT_CONTROLLER 0xDC000000
volatile uint32_t *irq_status = (uint32_t *) (INTERRUPT_CONTROLLER + 0x0);
#ifndef INCLUDE_INTERRUPTS_H
#define INCLUDE_INTERRUPTS_H
-namespace WalrusRPG
+namespace Nspire
{
namespace Interrupts
@@ -0,0 +1,15 @@
+#include "Quirks.h"
+#include "Interrupts.h"
+#define QUIRKS WalrusRPG::Quirks
+using namespace Nspire;
+void QUIRKS::init()
+ Interrupts::init();
+void QUIRKS::deinit()
+ Interrupts::off();
#include "StateMachine.h"
#include "Timing.h"
#include "Graphics.h"
-#include "Interrupts.h"
#include "map/Map.h"
#include "map/StateMap.h"
#include "render/Pixel.h"
@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
Graphics::init();
Timing::init();
- Interrupts::init();
+ Quirks::init();
uint16_t dungeonTest[] = {
21, 21, 1, 1, 1, 1, 21, 22, 21, 22, 21, 22, 21, 21, 1, 22, 21,
@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
StateMachine machine(new States::StateMap(0, 0, map));
machine.run();
- Interrupts::off();
+ Quirks::deinit();
Timing::deinit();
Graphics::deinit();
return 0;
@@ -1,5 +1,3 @@
-#include <cstdio>
#include "Map.h"
#include "render/TileRenderer.h"
@@ -42,9 +40,6 @@ void MAP::render(WalrusRPG::Camera &camera, unsigned dt)
signed offset_y = camera.get_y() % t_height * -1 - (camera.get_y() < 0) * t_height;
signed start_x = camera.get_x() / t_width - (camera.get_x() < 0);
signed start_y = camera.get_y() / t_height - (camera.get_y() < 0);
- printf("%i %i\n", start_x, start_y);
// pre-calculating variables to speed up loop condition check
signed delta_x = 320 / t_width + 1;