Created
August 30, 2017 03:52
-
-
Save furandon-pig/a6edb4a6c6b0a185705dcfb00f0d6699 to your computer and use it in GitHub Desktop.
Diff file for build "arduboy-for-pc" on the Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/emulate/emulate.h b/emulate/emulate.h | |
index d9a593c..279fa5e 100644 | |
--- a/emulate/emulate.h | |
+++ b/emulate/emulate.h | |
@@ -6,6 +6,15 @@ | |
#include <stdbool.h> | |
#include <time.h> | |
+typedef uint8_t byte; | |
+typedef uint16_t word; | |
+ | |
+#define boolean bool | |
+ | |
+#define max(x,y) (x > y ? x : y) | |
+#define min(x,y) (x > y ? y : x) | |
+#define abs(x) (int)(x > 0 ? x : x * -1) | |
+ | |
#include "sdl.h" | |
/* EMULATION SHEITE */ | |
@@ -25,9 +34,6 @@ | |
#define _BV(N) (1 << (N)) | |
-typedef uint8_t byte; | |
-typedef uint16_t word; | |
- | |
/* == WMATH ====================== */ | |
void randomSeed(unsigned long seed); | |
@@ -44,7 +50,7 @@ unsigned int makeWord(unsigned char h, unsigned char l); | |
void delay(unsigned int ms); | |
uint32_t millis(); | |
-void arduboy_spi(byte c8); | |
+int arduboy_spi(byte c8); | |
void set_sleep_mode(byte mode); | |
void sleep_mode(); | |
void drawSprite(int x, int y, const byte *sheet, byte w, byte h, byte index, byte color); | |
@@ -64,4 +70,4 @@ static inline word pgm_read_word(const word *wat) { | |
} | |
/* END OF SAID SHEITE */ | |
-#endif//__ARDUBOY_EMULATE_H__ | |
\ No newline at end of file | |
+#endif//__ARDUBOY_EMULATE_H__ | |
diff --git a/emulate/main.cpp b/emulate/main.cpp | |
index 9ef635e..e422d79 100644 | |
--- a/emulate/main.cpp | |
+++ b/emulate/main.cpp | |
@@ -1,2 +1,3 @@ | |
#include "emulate.h" | |
-#include SKETCH | |
+//#include SKETCH | |
+#include "../sketches/shrun/shrun.ino" | |
diff --git a/emulate/sdl.cpp b/emulate/sdl.cpp | |
index 50c125a..97fbb96 100644 | |
--- a/emulate/sdl.cpp | |
+++ b/emulate/sdl.cpp | |
@@ -122,7 +122,7 @@ byte arduboy_buttons() { | |
bool spid; | |
-void arduboy_spi(uint8_t c8) { | |
+int arduboy_spi(uint8_t c8) { | |
static uint16_t address = 0; | |
for(byte v = 0; v < 8; v++) { | |
arduboy_pixel(address & 0x7F, ((address >> 7) << 3) + v, (c8 >> v) & 1); | |
@@ -138,7 +138,7 @@ int main(int argc, char* argv[]) { | |
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) return 1; | |
// | |
- SDL_WM_SetCaption(GAMENAME, ""); | |
+ SDL_WM_SetCaption("shrun", ""); | |
if (!(screen = SDL_SetVideoMode(rect.w, rect.h, 32, SDL_SWSURFACE))) { | |
SDL_Quit(); | |
diff --git a/emulate/sdl.h b/emulate/sdl.h | |
index 9fa5c61..f139e4c 100644 | |
--- a/emulate/sdl.h | |
+++ b/emulate/sdl.h | |
@@ -7,8 +7,12 @@ | |
#include <Windows.h> | |
#endif | |
#include <stdbool.h> | |
+ | |
+#include "emulate.h" | |
+ | |
#include <math.h> | |
+ | |
void setup(); | |
void loop(); | |
diff --git a/libraries/Arglib.cpp b/libraries/Arglib.cpp | |
index 55e2213..00c2760 100644 | |
--- a/libraries/Arglib.cpp | |
+++ b/libraries/Arglib.cpp | |
@@ -576,7 +576,7 @@ void Arduboy::drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, | |
if (x + w < 0 || x > WIDTH - 1 || y + h < 0 || y > HEIGHT - 1) | |
return; | |
- int yOffset = abs(y) % 8; | |
+ int yOffset = (int)abs(y) % (int)8; | |
int sRow = y / 8; | |
if (y < 0) { | |
sRow--; | |
@@ -610,7 +610,7 @@ void Arduboy::drawSprite(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, | |
if (x + w < 0 || x > WIDTH - 1 || y + h < 0 || y > HEIGHT - 1) | |
return; | |
y = y - (frame * h); | |
- int yOffset = abs(y) % 8; | |
+ int yOffset = (int)abs(y) % (int)8; | |
int sRow = y / 8; | |
if (y < 0) { | |
sRow--; | |
@@ -644,7 +644,7 @@ void Arduboy::drawMaskedSprite(int16_t x, int16_t y, const uint8_t *bitmap, int1 | |
if (x + w < 0 || x > WIDTH - 1 || y + h < 0 || y > HEIGHT - 1) | |
return; | |
y = y - (frame * h); | |
- int yOffset = abs(y) % 8; | |
+ int yOffset = (int)abs(y) % (int)8; | |
int sRow = y / 8; | |
if (y < 0) { | |
sRow--; | |
@@ -744,7 +744,7 @@ void Arduboy::drawCompressed(int16_t sx, int16_t sy, const uint8_t *bitmap, uint | |
// sy = sy - (frame*h); | |
- int yOffset = abs(sy) % 8; | |
+ int yOffset = (int)abs(sy) % (int)8; | |
int sRow = sy / 8; | |
if (sy < 0) { | |
sRow--; | |
@@ -1400,7 +1400,7 @@ void Sprites::drawBitmap(int16_t x, int16_t y, | |
// xOffset technically doesn't need to be 16 bit but the math operations | |
// are measurably faster if it is | |
uint16_t xOffset, ofs; | |
- int8_t yOffset = abs(y) % 8; | |
+ int8_t yOffset = (int)abs(y) % (int)8; | |
int8_t sRow = y / 8; | |
uint8_t loop_h, start_h, rendered_width; | |
diff --git a/libraries/SPI.h b/libraries/SPI.h | |
index a2b267d..47dde9e 100644 | |
--- a/libraries/SPI.h | |
+++ b/libraries/SPI.h | |
@@ -21,10 +21,10 @@ class SPIClass { | |
uint8_t begin(); | |
uint8_t inline transfer(uint8_t value) { | |
if(order == LSBFIRST) value = rbit(value); | |
- arduboy_spi(value); | |
+ return arduboy_spi(value); | |
}; | |
uint8_t inline setBitOrder(uint8_t order) { | |
- this->order = order; | |
+ return this->order = order; | |
}; | |
}; | |
diff --git a/sketches/shrun/backgroundbitmaps.h b/sketches/shrun/backgroundbitmaps.h | |
index 4a12f93..c924fa8 100644 | |
--- a/sketches/shrun/backgroundbitmaps.h | |
+++ b/sketches/shrun/backgroundbitmaps.h | |
@@ -1,4 +1,4 @@ | |
-const unsigned char PROGMEM background1_bitmap[] = | |
+const unsigned char /*PROGMEM*/ background1_bitmap[] = | |
{ | |
// ################################################### ### ####################################################################### | |
// ##################### ######################### ##### ###################################################################### | |
@@ -60,7 +60,7 @@ const unsigned char PROGMEM background1_bitmap[] = | |
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, | |
}; | |
- const unsigned char PROGMEM background2_bitmap[] = | |
+ const unsigned char /*PROGMEM*/ background2_bitmap[] = | |
{ | |
// ################################################################ ### ### # # # # # # # ############# ########################### | |
// ################################################################# # # # # # # # # # # # ########### ############################ | |
@@ -122,7 +122,7 @@ const unsigned char PROGMEM background1_bitmap[] = | |
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF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, 0x0F, 0x0F, 0x0F, 0x0F, 0x0B, 0x05, 0x0A, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, | |
}; | |
- const unsigned char PROGMEM background3_bitmap[] = | |
+ const unsigned char /*PROGMEM*/ background3_bitmap[] = | |
{ | |
// ####################################################################################################### # # # # # # ##### ##### | |
// ##################################################################################################### # # # # # # # #### ##### | |
@@ -184,7 +184,7 @@ const unsigned char PROGMEM background1_bitmap[] = | |
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF5, 0xFF, 0xD5, 0xFE, 0xF5, 0xEE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xEA, 0xDD, 0xEA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFD, 0xFE, 0xFF, 0xFE, 0xFD, 0xBA, 0xD5, 0xFA, 0x55, 0xFA, 0xFD, 0xFA, 0xFD, 0xFA, 0xF5, 0xAA, 0x7D, 0xAA, 0xFF, 0xEA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF7, 0xFA, 0xFF, 0xEA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF5, 0xEF, 0xF5, 0xFF, 0xFD, 0xFF, 0xFF,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map[] = | |
+ const unsigned char /*PROGMEM*/ background4_bitmap[] = | |
{ | |
// ####################################### ##### ################################################################################ | |
// ###################################### # ##### ############################################################################# | |
@@ -246,7 +246,7 @@ const unsigned char PROGMEM background1_bitmap[] = | |
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, | |
0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, | |
}; | |
- const unsigned char PROGMEM background5_bitmap[] = | |
+ const unsigned char /*PROGMEM*/ background5_bitmap[] = | |
{ | |
// ############## # ### ########################################################################################################### | |
// ############# # # # ############################################################################################################ | |
diff --git a/sketches/shrun/candlebitmaps.h b/sketches/shrun/candlebitmaps.h | |
index af99eb5..d091475 100644 | |
--- a/sketches/shrun/candlebitmaps.h | |
+++ b/sketches/shrun/candlebitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM /* empty */ | |
+ | |
const unsigned char PROGMEM flame01_bitmap[] = | |
{ | |
// # | |
diff --git a/sketches/shrun/fencebitmap.h b/sketches/shrun/fencebitmap.h | |
index 5fce080..c6bc23f 100644 | |
--- a/sketches/shrun/fencebitmap.h | |
+++ b/sketches/shrun/fencebitmap.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM fence1_bitmap[] = | |
{ | |
// # # # # # # # | |
diff --git a/sketches/shrun/forgroundbitmaps.h b/sketches/shrun/forgroundbitmaps.h | |
index b0ff46a..80538cf 100644 | |
--- a/sketches/shrun/forgroundbitmaps.h | |
+++ b/sketches/shrun/forgroundbitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM forground1_bitmap[] = | |
{ | |
// ####### ### ############### # ### | |
diff --git a/sketches/shrun/itembitmaps.h b/sketches/shrun/itembitmaps.h | |
index db9a3ce..f7c4759 100644 | |
--- a/sketches/shrun/itembitmaps.h | |
+++ b/sketches/shrun/itembitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM heart1_bitmap[] = | |
{ | |
// | |
diff --git a/sketches/shrun/numberbitmaps.h b/sketches/shrun/numberbitmaps.h | |
index 8dde6c3..91727bc 100644 | |
--- a/sketches/shrun/numberbitmaps.h | |
+++ b/sketches/shrun/numberbitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM number0_bitmap[] = | |
{ | |
// | |
diff --git a/sketches/shrun/otherbitmaps.h b/sketches/shrun/otherbitmaps.h | |
index ec1059d..fb0da9b 100644 | |
--- a/sketches/shrun/otherbitmaps.h | |
+++ b/sketches/shrun/otherbitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM TEAMarg2[] = //128,48 | |
{ | |
// ######## ######## | |
diff --git a/sketches/shrun/runnerbitmaps.h b/sketches/shrun/runnerbitmaps.h | |
index fae94ff..29fc177 100644 | |
--- a/sketches/shrun/runnerbitmaps.h | |
+++ b/sketches/shrun/runnerbitmaps.h | |
@@ -1,3 +1,5 @@ | |
+#define PROGMEM | |
+ | |
const unsigned char PROGMEM runner_bitmap01[] = | |
{ | |
// ### | |
diff --git a/sketches/shrun/shrun.ino b/sketches/shrun/shrun.ino | |
index d45a4a2..8827ffb 100644 | |
--- a/sketches/shrun/shrun.ino | |
+++ b/sketches/shrun/shrun.ino | |
@@ -578,7 +578,7 @@ void score_draw(int scoreX, int scoreY) | |
{ | |
arduboy.drawBitmap(scoreX, scoreY, score_bitmap, 32, 8, 1); | |
char buf[8]; | |
- ltoa(score, buf, 10); // Numerical base used to represent the value as a string, between 2 and 36, where 10 means decimal base | |
+ sprintf(buf, "%d", score); // Numerical base used to represent the value as a string, between 2 and 36, where 10 means decimal base | |
char charLen = strlen(buf); | |
char pad = 8 - charLen; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment