Fixed hiscore date and compiled with latest SDL
This commit is contained in:
parent
5dd814e452
commit
c076098ad9
|
@ -1,6 +1,6 @@
|
|||
# breakhack for AmigaOS 4.1 FE
|
||||
|
||||
breakhack is a small roguelike game for having some good time, while
|
||||
breakhack is a small roguelike game for having some good time, while
|
||||
you wait for your amiga to compile or render a screen. It is developed
|
||||
by Linus Probert and you can find it for various platforms on Steam.
|
||||
|
||||
|
@ -15,10 +15,8 @@ Extract the archive wherever you want and run the *breakhack* binary.
|
|||
- Roman "kas1e" Kargin and Nouvel "HunoPPC" Hugues for their help
|
||||
with libphysfs
|
||||
|
||||
Without all the above Lite XL would not be possible
|
||||
|
||||
## Known issues
|
||||
There are some issues with the Fullscreen graphics, depending which
|
||||
There are some issues with the Fullscreen graphics, depending which
|
||||
Renderer driver is used. I might fix them in the future.
|
||||
|
||||
## Support
|
||||
|
@ -29,11 +27,21 @@ https://ko-fi.com/walkero
|
|||
|
||||
## Known issues
|
||||
|
||||
You can find the known issues at
|
||||
You can find the known issues at
|
||||
https://git.walkero.gr/walkero/breakhack/issues
|
||||
|
||||
# Changelog
|
||||
|
||||
## [4.0.3r2] - 2023-07-04
|
||||
### Changed
|
||||
- Compiled with latest SDL 2.0.28 that has a better support for 16bit
|
||||
screens. Now it works under Qemu. Tested with Software rendering
|
||||
|
||||
### Fixed
|
||||
- Fixed the hiscore date. Now it is saved on UTC +8 years which is
|
||||
the Amiga epoch diff against the unix one. This doesn affect the
|
||||
old hi-scores though
|
||||
|
||||
## [4.0.3r1] - 2022-12-21
|
||||
### Added
|
||||
- First release for AmigaOS 4
|
||||
|
|
|
@ -97,7 +97,7 @@ hiscore_init(void)
|
|||
static void
|
||||
save_hiscore(double gold, int lvl, int dlvl)
|
||||
{
|
||||
const char *query = "INSERT INTO hiscore(gold, playerLevel, dungeonLevel) values (?, ?, ?)";
|
||||
const char *query = "INSERT INTO hiscore(time, gold, playerLevel, dungeonLevel) values (datetime('now','+8 years'), ?, ?, ?)";
|
||||
sqlite3_stmt *stmt = db_prepare(db, query);
|
||||
|
||||
debug("Saving high score: %dg %dpl %dl",
|
||||
|
|
12
src/main.c
12
src/main.c
|
@ -67,7 +67,7 @@
|
|||
|
||||
#if defined(__amigaos4__)
|
||||
#define USED __attribute__((used))
|
||||
#define VSTRING "BreakHack 4.0.3r1 (18.09.2022)"
|
||||
#define VSTRING "BreakHack 4.0.3r2 (04.07.2023)"
|
||||
#define VERSTAG "\0$VER: " VSTRING
|
||||
static const char *stack USED = "$STACK:102400";
|
||||
static const char *version USED = VERSTAG;
|
||||
|
@ -246,7 +246,7 @@ bool initSDL(void)
|
|||
m_sprintf(title_buffer, 100, "%s %d.%d.%d %s", GAME_TITLE, MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION, RELEASE_TYPE);
|
||||
gWindow = SDL_CreateWindow(title_buffer,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
(int)(SCREEN_WIDTH * renderScale),
|
||||
(int)(SCREEN_HEIGHT * renderScale),
|
||||
SDL_WINDOW_SHOWN);
|
||||
|
@ -281,7 +281,7 @@ bool initSDL(void)
|
|||
debug("Disabling text input");
|
||||
SDL_StopTextInput();
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -922,7 +922,7 @@ end_game_details(void)
|
|||
{
|
||||
gui_log("You earned %.2f gold", gPlayer->gold);
|
||||
gui_event_message("You earned %.2f gold", gPlayer->gold);
|
||||
|
||||
|
||||
if (hiscore_get_top_gold() < gPlayer->gold) {
|
||||
gui_event_message("NEW HIGHSCORE");
|
||||
gui_log("NEW HIGHSCORE");
|
||||
|
@ -1456,7 +1456,7 @@ validate_lib_checksum(void)
|
|||
fatal("Unable to open %s for reading\n", file);
|
||||
}
|
||||
|
||||
unsigned calculated = checksum_fp(fp);
|
||||
unsigned calculated = checksum_fp(fp);
|
||||
fclose(fp);
|
||||
|
||||
if (calculated != expected) {
|
||||
|
@ -1492,7 +1492,7 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
|
||||
if (settings_get()->fullscreen_enabled) {
|
||||
// Game starts in windowed mode so this will
|
||||
// Game starts in windowed mode so this will
|
||||
// change to fullscreen
|
||||
toggle_fullscreen();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue