Refactor project structure and remove unnecessary files
- Deleted generated CMake files and build artifacts from the cmake-build-debug directory. - Removed the Intellisense header - what was that??? - Cleaned up the melonDS.ini configuration (removed hard path)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
#include <nds.h>
|
||||
#include <bitset>
|
||||
#include <stdio.h>
|
||||
@@ -14,10 +13,10 @@
|
||||
|
||||
#include "tilemap.h"
|
||||
|
||||
#include "Intellisense.h"
|
||||
using namespace std;
|
||||
|
||||
volatile uint frame = 0;
|
||||
volatile uint ticks = 0;
|
||||
volatile uint8_t frame = 0;
|
||||
volatile uint16_t ticks = 0;
|
||||
volatile bool internals = false;
|
||||
|
||||
std::deque<std::array<int, 3>> snake;
|
||||
@@ -25,16 +24,16 @@ std::deque<std::array<int, 3>> snake;
|
||||
std::vector<std::array<int, 2>> apples;
|
||||
std::vector<std::array<int, 2>> bad_apples;
|
||||
|
||||
volatile uint snakelength;
|
||||
volatile uint16_t snakelength;
|
||||
/***
|
||||
* 0 = up
|
||||
* 1 = right
|
||||
* 2 = down
|
||||
* 3 = left
|
||||
***/
|
||||
volatile uint snakeDirection;
|
||||
volatile uint16_t snakeDirection;
|
||||
|
||||
volatile uint score;
|
||||
volatile uint16_t score;
|
||||
|
||||
bool gameOver = false;
|
||||
bool paused = false;
|
||||
@@ -63,7 +62,7 @@ u16* gfx_apple;
|
||||
u16* gfx_tail;
|
||||
u16* gfx_apple_rotten;
|
||||
|
||||
const void * get_sprite_pointer(uint spriteIndex) {
|
||||
const void * get_sprite_pointer(uint16 spriteIndex) {
|
||||
return &tilemapTiles[spriteIndex*16];
|
||||
}
|
||||
|
||||
@@ -216,7 +215,7 @@ void check_collision_apples_rotten() {
|
||||
|
||||
}
|
||||
|
||||
void draw_snake_head(uint &oamId) {
|
||||
void draw_snake_head(uint16 &oamId) {
|
||||
std::array<int, 3> dot = snake.front();
|
||||
bool hflip = false;
|
||||
bool vflip = false;
|
||||
@@ -266,7 +265,7 @@ void draw_snake_head(uint &oamId) {
|
||||
oamId++;
|
||||
}
|
||||
|
||||
void draw_snake_tail(uint &oamId) {
|
||||
void draw_snake_tail(uint16 &oamId) {
|
||||
std::array<int, 3> dot = snake.back();
|
||||
bool hflip = false;
|
||||
bool vflip = false;
|
||||
@@ -316,7 +315,7 @@ void draw_snake_tail(uint &oamId) {
|
||||
oamId++;
|
||||
}
|
||||
|
||||
void draw_snake(uint &oamId) {
|
||||
void draw_snake(uint16 &oamId) {
|
||||
draw_snake_head(oamId);
|
||||
for(size_t i = 1; i < snake.size()-1; i++)
|
||||
{
|
||||
@@ -360,7 +359,7 @@ void draw_snake(uint &oamId) {
|
||||
draw_snake_tail(oamId);
|
||||
}
|
||||
|
||||
void draw_apples(uint &oamId) {
|
||||
void draw_apples(uint16 &oamId) {
|
||||
|
||||
for(std::array<int, 2> apple : apples)
|
||||
{
|
||||
@@ -385,7 +384,7 @@ void draw_apples(uint &oamId) {
|
||||
|
||||
}
|
||||
|
||||
void draw_apples_rotten(uint &oamId) {
|
||||
void draw_apples_rotten(uint16 &oamId) {
|
||||
|
||||
for(std::array<int, 2> apple : bad_apples)
|
||||
{
|
||||
@@ -411,7 +410,7 @@ void draw_apples_rotten(uint &oamId) {
|
||||
}
|
||||
|
||||
void draw_game() {
|
||||
uint oamid = 0;
|
||||
uint16 oamid = 0;
|
||||
if (!gameOver) {
|
||||
draw_apples(oamid);
|
||||
draw_apples_rotten(oamid);
|
||||
|
||||
Reference in New Issue
Block a user