Merge pull request #679 from Daft-Freak/patch-2
32blit.hpp cleanup
diff --git a/32blit/32blit.hpp b/32blit/32blit.hpp
index 84a2082..df342da 100644
--- a/32blit/32blit.hpp
+++ b/32blit/32blit.hpp
@@ -1,44 +1,36 @@
#pragma once
+#include "audio/audio.hpp"
+#include "audio/mp3-stream.hpp"
#include "engine/api.hpp"
#include "engine/engine.hpp"
#include "engine/file.hpp"
-#include "engine/output.hpp"
#include "engine/input.hpp"
-#include "audio/audio.hpp"
+#include "engine/menu.hpp"
+#include "engine/multiplayer.hpp"
+#include "engine/output.hpp"
+#include "engine/particle.hpp"
+#include "engine/profiler.hpp"
+#include "engine/running_average.hpp"
#include "engine/save.hpp"
#include "engine/timer.hpp"
#include "engine/tweening.hpp"
+#include "engine/version.hpp"
#include "graphics/blend.hpp"
-#include "graphics/surface.hpp"
-#include "graphics/sprite.hpp"
-#include "graphics/tilemap.hpp"
+#include "graphics/color.hpp"
#include "graphics/font.hpp"
+#include "graphics/jpeg.hpp"
+#include "graphics/mode7.hpp"
+#include "graphics/sprite.hpp"
+#include "graphics/surface.hpp"
+#include "graphics/tilemap.hpp"
#include "math/constants.hpp"
-#include "types/vec3.hpp"
-#include "types/mat4.hpp"
-#include "types/mat3.hpp"
-#include "types/vec2.hpp"
+#include "math/interpolation.hpp"
#include "types/map.hpp"
+#include "types/mat3.hpp"
+#include "types/mat4.hpp"
#include "types/point.hpp"
#include "types/rect.hpp"
#include "types/size.hpp"
-
-#ifdef TARGET_32BLIT_HW
-#define __SECTION__(S) __attribute__((section(S)))
-#else
-#define __SECTION__(S)
-#endif
-
-#if _WIN32
-#define __attribute__(A)
-extern const uint8_t itcm_text_start;
-extern const uint8_t itcm_text_end;
-extern const uint8_t itcm_data;
-#endif
-
-#define DTCM __SECTION__(".dtcm");
-#define ITCM __SECTION__(".itcm");
-#define SRAM1 __SECTION__(".sram1")));
-#define SRAM2 __SECTION__(".sram2")));
-#define SRAM3 __SECTION__(".sram3")));
+#include "types/vec2.hpp"
+#include "types/vec3.hpp"
diff --git a/examples/logo/logo.cpp b/examples/logo/logo.cpp
index bc7e2c7..19a6a97 100644
--- a/examples/logo/logo.cpp
+++ b/examples/logo/logo.cpp
@@ -24,14 +24,14 @@
2, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1
};
-struct Particle {
+struct LogoParticle {
Vec3 direction;
Vec3 position;
Pen color;
};
// convert the logo points into vec3
-Particle particles[63];
+LogoParticle particles[63];
/* setup */
void init() {
@@ -99,7 +99,7 @@
Mat4 t = Mat4::translation(Vec3(80, 60, 0));
for (int i = 0; i < 63; i++) {
- Particle pc = particles[i];
+ LogoParticle pc = particles[i];
pc.position *= s;
pc.position += pc.direction * td * speed;
@@ -175,4 +175,4 @@
void update(uint32_t time) {
float duration = 0.01f; // == 10ms as a float
-}
\ No newline at end of file
+}
diff --git a/examples/platformer/platformer.cpp b/examples/platformer/platformer.cpp
index ffb7442..d7ce755 100644
--- a/examples/platformer/platformer.cpp
+++ b/examples/platformer/platformer.cpp
@@ -19,7 +19,7 @@
Surface m((uint8_t *)__m, PixelFormat::M, screen_size);
const int max_light_radius = 60;
-uint8_t __mshad[(max_light_radius * 2 + 1) * (max_light_radius * 2 + 1)] __SECTION__(".m");
+uint8_t __mshad[(max_light_radius * 2 + 1) * (max_light_radius * 2 + 1)];
Surface mshad((uint8_t *)__mshad, PixelFormat::M, Size(max_light_radius * 2 + 1, max_light_radius * 2 + 1));
Point world_to_screen(const Vec2 &p);