aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorU-DESKTOP-MR3JJV2\niels <nielsstunnebrink1@gmail.com>2023-03-15 10:01:50 +0100
committerU-DESKTOP-MR3JJV2\niels <nielsstunnebrink1@gmail.com>2023-03-15 10:01:50 +0100
commit0ede5beef926151dd6c6ce8b0810b26225dae895 (patch)
tree5a701ca72d30270a92a095b7586bb0bdc0ba67ce /src
parent51a49f8844705ea3bff95b3c25ba3adc96f5d652 (diff)
precautions
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore14
-rw-r--r--src/engine/sprite_controller.h212
2 files changed, 113 insertions, 113 deletions
diff --git a/src/.gitignore b/src/.gitignore
index 504b995..b0126dd 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1,7 +1,7 @@
-*.o
-main.elf
-main.bin
-main
-main.exe
-static/
-*.bin
+*.o
+main.elf
+main.bin
+main
+main.exe
+static/
+*.bin
diff --git a/src/engine/sprite_controller.h b/src/engine/sprite_controller.h
index 001a459..bb7e8d1 100644
--- a/src/engine/sprite_controller.h
+++ b/src/engine/sprite_controller.h
@@ -1,106 +1,106 @@
-#pragma once
-#include <stdint.h>
-
-#include "ppu/types.h"
-
-// handles sprites
-
-// Bg sprites
-
-// Fg or entity sprites
-
-//TODO: pack data inside of sprite_palette LUT
-//HH_PPU_PALETTE_COUNT
-#define HH_SPRITE_COUNT 40
-#define HH_PAL_IDX_SKY 0
-#define HH_PAL_IDX_BRICK 1
-const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = {
- 0,1,1,1,1,1,1,1,1,1, //1+9
- 1,1,1,1,1,1,1,1,1,1, //6+4
- 1,1,1,1,1,1,1,1,1, //9
- 7,7,7,2,7,7,1,2,7
- //other palettes here:
-};
-
-
-const static hh_ppu_loc_palette_table_t hh_g_palette = {
- {//palette info here
- {0x1,0x2,0x3},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {//Bricks
- {0x1,0x2,0x3},//01
- {0xd,0x8,0xa},//24
- {0x0,0x0,0x1},//25
- {0x1,0x1,0x1},//26
- {0x1,0x1,0x2},//27
- {0x2,0x2,0x3},//28
- {0x3,0x4,0x5},//29
- {0x5,0x1,0x7}},
- {//slime
- {0x1,0x2,0x3},
- {0x1,0x3,0x2},
- {0x4,0x8,0x3},
- {0x7,0xa,0x4},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0},
- {0x0,0x0,0x0}},
- {
- {0x0,0xf,0xf},
- {0xf,0xf,0xf},
- {0xf,0x0,0xf},
- {0xf,0xf,0x0},
- {0xf,0x0,0x0},
- {0x0,0xf,0x0},
- {0x0,0x0,0xf},
- {0x0,0x0,0x0}}
-};
-
-void hh_setup_palettes();
-
-/** @brief return palette index that belongs to tilemap index */
-uint8_t hh_get_palette(uint8_t tile_idx);
-
-bool hh_colidable(uint8_t tile_idx);
+#pragma once
+#include <stdint.h>
+
+#include "ppu/types.h"
+
+// handles sprites
+
+// Bg sprites
+
+// Fg or entity sprites
+
+//TODO: pack data inside of sprite_palette LUT
+//HH_PPU_PALETTE_COUNT
+#define HH_SPRITE_COUNT 40
+#define HH_PAL_IDX_SKY 0
+#define HH_PAL_IDX_BRICK 1
+const static uint8_t hh_g_sprite_palette[HH_SPRITE_COUNT] = {
+ 0,1,1,1,1,1,1,1,1,1, //1+9
+ 1,1,1,1,1,1,1,1,1,1, //6+4
+ 1,1,1,1,1,1,1,1,1, //9
+ 7,7,7,2,7,7,1,2,7
+ //other palettes here:
+};
+
+
+const static hh_ppu_loc_palette_table_t hh_g_palette = {
+ {//palette info here
+ {0x1,0x2,0x3},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {//Bricks
+ {0x1,0x2,0x3},//01
+ {0xd,0x8,0xa},//24
+ {0x0,0x0,0x1},//25
+ {0x1,0x1,0x1},//26
+ {0x1,0x1,0x2},//27
+ {0x2,0x2,0x3},//28
+ {0x3,0x4,0x5},//29
+ {0x5,0x1,0x7}},
+ {//slime
+ {0x1,0x2,0x3},
+ {0x1,0x3,0x2},
+ {0x4,0x8,0x3},
+ {0x7,0xa,0x4},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0},
+ {0x0,0x0,0x0}},
+ {
+ {0x0,0xf,0xf},
+ {0xf,0xf,0xf},
+ {0xf,0x0,0xf},
+ {0xf,0xf,0x0},
+ {0xf,0x0,0x0},
+ {0x0,0xf,0x0},
+ {0x0,0x0,0xf},
+ {0x0,0x0,0x0}}
+};
+
+void hh_setup_palettes();
+
+/** @brief return palette index that belongs to tilemap index */
+uint8_t hh_get_palette(uint8_t tile_idx);
+
+bool hh_colidable(uint8_t tile_idx);