Browse Source

Replace ARDUINO with AVR

merge-requests/2/head
Miloslav Číž 11 months ago
parent
commit
123a32a226
5 changed files with 28 additions and 24 deletions
  1. +7
    -3
      game.h
  2. +19
    -18
      images.h
  3. +0
    -1
      main_gbmeta.ino
  4. +1
    -1
      main_sdl.c
  5. +1
    -1
      texts.h

+ 7
- 3
game.h View File

@ -60,7 +60,11 @@
your main_*.c frontend source.
- Implement the following functions in your frontend source.
- Call SFG_init() from your frontend initialization code.
- Call SFG_mainLoopBody() from within your frontend main loop. */
- Call SFG_mainLoopBody() from within your frontend main loop.
If your platform is an AVR CPU (e.g. some Arduinos) and so has Harvard
architecture, define #SFG_AVR 1 before including this file in your frontend
source. */
#ifndef SFG_LOG
#define SFG_LOG(str) {} ///< Can be redefined to log game messages.
@ -195,7 +199,7 @@ void SFG_init();
#include "settings.h"
#if SFG_ARDUINO
#if SFG_AVR
#include <avr/pgmspace.h>
#define SFG_PROGRAM_MEMORY const PROGMEM
@ -1490,7 +1494,7 @@ void SFG_setAndInitLevel(uint8_t levelNumber)
const SFG_Level *level;
#if SFG_ARDUINO
#if SFG_AVR
memcpy_P(&SFG_ramLevel,SFG_levels[levelNumber],sizeof(SFG_Level));
level = &SFG_ramLevel;
#else


+ 19
- 18
images.h View File

@ -50,24 +50,25 @@ SFG_PROGRAM_MEMORY uint8_t
SFG_wallTextures[SFG_WALL_TEXTURE_COUNT * SFG_TEXTURE_STORE_SIZE] =
{
// 0, white wooden planks
4,21,5,3,20,0,2,26,6,18,57,65,1,16,17,49,0,1,0,3,32,1,33,0,161,64,1,16,64,3,3,
32,0,17,16,9,32,1,17,1,161,65,1,16,78,132,35,32,0,17,16,7,32,1,32,17,240,49,0,
16,57,99,87,206,0,18,16,6,33,0,16,1,177,48,0,0,97,0,2,0,0,17,32,6,32,1,0,1,178,
48,0,0,48,0,2,0,0,17,32,7,32,17,1,0,178,48,1,0,49,0,1,0,0,1,16,3,32,18,0,0,194,
48,0,0,48,0,18,4,64,17,32,4,35,0,3,0,194,48,0,0,49,0,34,4,0,17,32,6,130,50,32,
40,242,48,1,0,49,0,18,0,0,2,32,12,85,85,85,85,81,48,2,0,49,0,33,3,0,2,16,3,32,0,
32,2,98,48,1,0,49,0,34,19,0,18,17,3,32,0,32,0,194,48,2,0,0,0,34,3,4,2,16,3,16,0,
32,32,226,48,2,0,48,0,33,19,0,18,33,3,0,16,32,32,178,48,1,1,50,1,34,3,4,17,16,3,
0,16,32,16,162,48,1,64,50,1,34,7,3,1,17,3,0,16,32,16,184,2,2,2,2,48,18,3,0,0,17,
3,0,17,32,16,94,93,93,89,112,0,18,3,0,0,16,3,0,2,32,16,48,48,48,3,0,0,17,4,0,0,
17,3,0,1,32,16,48,48,0,3,1,1,18,3,0,0,32,7,16,1,32,16,48,0,1,0,1,50,34,3,0,1,33,
3,16,1,20,32,112,48,0,16,1,49,34,3,64,16,33,3,4,2,4,16,48,49,0,16,0,49,34,3,64,
0,32,3,16,1,0,0,48,49,0,16,65,48,34,3,49,0,17,3,16,2,0,0,48,49,1,32,0,49,34,3,
64,0,16,19,16,2,1,0,113,49,17,16,0,48,32,3,0,0,16,19,16,1,2,0,97,66,17,32,64,48,
33,19,34,2,0,137,16,1,18,0,97,49,17,16,66,64,32,3,84,212,105,69,16,1,17,0,97,49,
18,16,50,48,16,19,51,48,51,51,16,1,16,0,98,50,1,19,66,48,32,3,0,1,0,3,32,1,33,0,
177,49,2,16,66,64,16,3,0,1,0,7,32,1,16,1,82,64,1,16,50,0,16,35,0,1,0,9,33,2,32,
0,161,64,1,20,48,0,0,32
17,105,98,18,185,19,99,178,177,184,80,2,48,106,168,0,50,34,34,0,112,0,0,0,0,32,
17,128,116,48,1,26,50,32,0,0,0,0,0,0,1,33,1,160,72,50,0,1,48,34,32,1,0,0,23,1,1,
32,1,129,68,50,0,1,54,102,54,68,34,32,0,0,0,32,16,129,20,48,2,0,54,85,85,68,0,0,
112,113,113,32,0,128,1,50,0,32,101,101,86,68,0,1,0,17,17,32,7,129,4,50,32,0,51,
102,99,16,16,17,17,16,16,32,17,161,20,50,34,1,32,0,0,1,34,34,34,34,34,33,17,200,
136,50,0,0,48,32,0,1,71,120,168,17,170,17,1,202,169,50,32,0,34,32,2,1,32,0,0,17,
68,17,68,16,4,210,50,0,51,102,86,119,112,0,32,1,1,20,129,65,26,178,34,0,54,85,
86,71,0,0,2,0,17,16,16,17,20,50,0,1,54,85,85,16,34,34,0,0,23,0,16,17,17,48,16,
17,102,101,86,71,34,34,32,17,1,1,1,1,1,48,0,20,48,34,32,0,34,0,0,1,1,17,1,1,20,
50,0,1,50,34,32,1,35,34,0,0,0,112,0,1,20,54,34,32,50,34,34,32,34,35,32,0,0,0,16,
17,1,50,34,32,98,2,178,0,2,34,32,1,20,17,17,20,116,50,32,0,50,34,34,1,2,0,0,16,
1,16,1,1,20,50,0,1,54,85,85,112,0,1,1,1,17,1,17,17,72,48,0,0,54,85,85,71,0,7,17,
17,0,17,1,1,72,50,0,20,54,101,86,71,0,0,7,17,17,17,23,113,20,48,113,4,51,86,83,
0,34,34,34,0,0,112,7,16,72,178,0,17,48,112,0,1,0,32,0,0,0,0,0,0,120,176,0,0,48,
32,0,1,238,153,153,153,153,65,16,153,153,50,32,0,34,34,34,17,17,17,1,1,1,33,17,
192,72,210,50,32,51,101,86,17,16,17,17,16,16,32,0,161,68,0,0,0,51,85,86,64,0,1,
0,17,17,32,0,129,20,50,32,1,54,101,83,16,0,0,112,113,113,36,20,129,17,48,0,17,
102,85,86,64,34,32,0,0,0,33,17,129,17,50,17,17,48,32,32,1,0,0,0,1,1,33,17,145,
20,48,16,17,34,32,32,1,0,0,0,0,0,32,17,129,17,48,7,17
, // 1, skyscraper window
4,5,3,6,2,81,0,59,48,128,138,131,66,44,137,129,16,176,208,176,44,33,0,0,1,43,1,
13,0,32,29,0,0,176,0,0,12,64,0,17,0,32,0,17,1,32,13,11,0,176,0,208,4,65,0,0,0,


+ 0
- 1
main_gbmeta.ino View File

@ -22,7 +22,6 @@
#include <Gamebuino-Meta.h>
#define SFG_ARDUINO 1
#define SFG_CAN_EXIT 0
#define SFG_FPS 22
#define SFG_TIME_MULTIPLIER 900 /* Without this the game seems too fast. This


+ 1
- 1
main_sdl.c View File

@ -24,7 +24,7 @@
#define SFG_OS_IS_MALWARE 1
#endif
// #define SFG_START_LEVEL 1
#define SFG_START_LEVEL 1
// #define SFG_QUICK_WIN 1
// #define SFG_IMMORTAL 1
// #define SFG_ALL_LEVELS 1


+ 1
- 1
texts.h View File

@ -34,7 +34,7 @@ static const char *SFG_menuItemTexts[] =
#define SFG_TEXT_SAVED "saved"
#define SFG_TEXT_LEVEL_COMPLETE "level done"
#define SFG_VERSION_STRING "1.01"
#define SFG_VERSION_STRING "1.01d"
/**<
Version numbering is following: major.minor for stable releases,
in-development unstable versions have the version of the latest stable +


Loading…
Cancel
Save