This commit is contained in:
Miloslav Číž 2021-01-07 15:36:38 +01:00
parent 4f3c818a9c
commit 348c9dbf9a
3 changed files with 19 additions and 5 deletions

View File

@ -513,7 +513,7 @@ uint16_t SFG_monsterAttributeTable[SFG_MONSTERS_TOTAL] =
cccc: fire cooldown in frames, i.e. time after which the next shot can be cccc: fire cooldown in frames, i.e. time after which the next shot can be
shot again, ccccc has to be multiplied by 16 to get the real value shot again, ccccc has to be multiplied by 16 to get the real value
*/ */
SFG_PROGRAM_MEMORY uint8_t SFG_weaponAttributeTable[SFG_WEAPONS_TOTAL] = static const uint8_t SFG_weaponAttributeTable[SFG_WEAPONS_TOTAL] =
{ {
/* knife */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_MELEE,1,650), // DPS: 6.2 /* knife */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_MELEE,1,650), // DPS: 6.2
/* shotgun */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_BULLET,2,1250), // DPS: 12.8 /* shotgun */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_BULLET,2,1250), // DPS: 12.8
@ -523,7 +523,7 @@ SFG_PROGRAM_MEMORY uint8_t SFG_weaponAttributeTable[SFG_WEAPONS_TOTAL] =
/* solution */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_PLASMA,4,1050) // DPS: 85.7 /* solution */ SFG_WEAPON_ATTRIBUTE(SFG_WEAPON_FIRE_TYPE_PLASMA,4,1050) // DPS: 85.7
}; };
SFG_PROGRAM_MEMORY uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] = static const uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] =
{ {
/* melee */ 4, /* melee */ 4,
/* bullet */ 8, /* bullet */ 8,
@ -562,7 +562,7 @@ SFG_PROGRAM_MEMORY uint8_t SFG_attackDamageTable[SFG_WEAPON_FIRE_TYPES_TOTAL] =
#define LOW_FPS (SFG_FPS < 24) ///< low FPS needs low speeds, because collisions #define LOW_FPS (SFG_FPS < 24) ///< low FPS needs low speeds, because collisions
SFG_PROGRAM_MEMORY uint8_t SFG_projectileAttributeTable[SFG_PROJECTILES_TOTAL] = static const uint8_t SFG_projectileAttributeTable[SFG_PROJECTILES_TOTAL] =
{ {
/* explosion */ SFG_PROJECTILE_ATTRIBUTE(0,400), /* explosion */ SFG_PROJECTILE_ATTRIBUTE(0,400),
/* fireball */ SFG_PROJECTILE_ATTRIBUTE(10,1000), /* fireball */ SFG_PROJECTILE_ATTRIBUTE(10,1000),

16
game.h
View File

@ -2991,7 +2991,9 @@ void SFG_drawText(
while (pos < maxLength && text[pos] != 0) // for each character while (pos < maxLength && text[pos] != 0) // for each character
{ {
uint16_t character = SFG_font[SFG_charToFontIndex(text[pos])]; uint16_t character =
//SFG_PROGRAM_MEMORY_U8(SFG_font + SFG_charToFontIndex(text[pos]));
SFG_font[SFG_charToFontIndex(text[pos])];
for (uint8_t i = 0; i < SFG_FONT_CHARACTER_SIZE; ++i) // for each line for (uint8_t i = 0; i < SFG_FONT_CHARACTER_SIZE; ++i) // for each line
{ {
@ -4642,6 +4644,18 @@ void SFG_draw()
SFG_backgroundBlurIndex = 0; SFG_backgroundBlurIndex = 0;
#endif #endif
uint8_t aaa = 0;
/*
for (uint16_t j = 0; j < SFG_SCREEN_RESOLUTION_Y; ++j)
for (uint16_t i = 0; i < SFG_SCREEN_RESOLUTION_Y; ++i)
{
SFG_setGamePixel(i,j,2);
aaa++;
}
SFG_drawText("aaa",10,10,2,7,255,0);
return;
*/
if (SFG_game.state == SFG_GAME_STATE_MENU) if (SFG_game.state == SFG_GAME_STATE_MENU)
{ {
SFG_drawMenu(); SFG_drawMenu();

View File

@ -1344,7 +1344,7 @@ uint8_t SFG_charToFontIndex(char c)
/** /**
4x4 font, each character stored as 16 bits. 4x4 font, each character stored as 16 bits.
*/ */
uint16_t SFG_font[47] = static const uint16_t SFG_font[47] =
{ {
0xfaf0, // 0 "A" 0xfaf0, // 0 "A"
0xfd70, // 1 "B" 0xfd70, // 1 "B"