diff --git a/Makefile.os4 b/Makefile.os4 index d869448..c50be8e 100644 --- a/Makefile.os4 +++ b/Makefile.os4 @@ -1,11 +1,8 @@ # -# Makefile generated by: -# codebench 0.55 -# # Project: breakhack # # Created on: 29-08-2022 21:00:37 -# +# by George Sokianos # ################################################################### diff --git a/src/linkedlist.c b/src/linkedlist.c index 636b884..8add872 100644 --- a/src/linkedlist.c +++ b/src/linkedlist.c @@ -109,7 +109,7 @@ void* linkedlist_get(LinkedList **head, unsigned int index) return linkedlist_get(&(*head)->next, --index); } -void linkedlist_each(const LinkedList **head, void (*fun)(void*)) +void linkedlist_each(LinkedList **head, void (*fun)(void*)) { LinkedList *next = *head; @@ -142,3 +142,4 @@ unsigned int linkedlist_size(LinkedList *head) } return 1 + linkedlist_size(head->next); } + diff --git a/src/linkedlist.h b/src/linkedlist.h index f52741a..858336d 100644 --- a/src/linkedlist.h +++ b/src/linkedlist.h @@ -37,10 +37,11 @@ void* linkedlist_poplast(LinkedList **head); void* linkedlist_get(LinkedList **head, unsigned int index); -void linkedlist_each(const LinkedList **head, void (*fun)(void*)); +void linkedlist_each(LinkedList **head, void (*fun)(void*)); void linkedlist_destroy(LinkedList **head); unsigned int linkedlist_size(LinkedList *head); #endif // LINKEDLIST_H_ + diff --git a/src/main.c b/src/main.c index 5239345..d658555 100644 --- a/src/main.c +++ b/src/main.c @@ -65,6 +65,14 @@ #include "steam/steamworks_api_wrapper.h" #endif // STEAM_BUILD +#if defined(__amigaos4__) +#define USED __attribute__((used)) +#define VSTRING "BreakHack 4.0.3r1 (18.09.2022)" +#define VERSTAG "\0$VER: " VSTRING +static const char *stack USED = "$STACK:102400"; +static const char *version USED = VERSTAG; +#endif + static char *artifacts_tooltip[] = { "CONGRATULATIONS!", "", "", @@ -95,8 +103,8 @@ static char *skills_tooltip[] = { "", "", " SKILL INFO: SHIFT + ", "", - " Where is the number corresponding to the skill", "", - " Eg. 1, 2, 3, 4, 5", "", + " Where is the number corresponding to", "", + " the skill, i.e. 1, 2, 3, 4, 5", "", "", " DISABLE TOOLTIPS: CTRL + D", "", "", @@ -1468,7 +1476,7 @@ int main(int argc, char *argv[]) #endif // STEAM_BUILD PHYSFS_init(argv[0]); -#ifndef DEBUG +#if !defined(DEBUG) && !defined(__amigaos4__) PHYSFS_mount("assets.pack", NULL, 0); PHYSFS_mount("data.pack", NULL, 0); #else @@ -1494,3 +1502,4 @@ int main(int argc, char *argv[]) return 0; } + diff --git a/src/screen.c b/src/screen.c index 8e4c2aa..c32b06d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -69,8 +69,13 @@ screen_create_credits(SDL_Renderer *renderer) linkedlist_push(&screen->sprites, credit_txt("liquidityc.github.io", C_WHITE, x + columnOffset, y, renderer)); y += 20; linkedlist_push(&screen->sprites, credit_txt("@LiquidityC", C_WHITE, x + columnOffset, y, renderer)); + y += 20; + linkedlist_push(&screen->sprites, credit_txt("AmigaOS 4", C_YELLOW, x, y, renderer)); + y += 20; + linkedlist_push(&screen->sprites, credit_txt("port:", C_YELLOW, x, y, renderer)); + linkedlist_push(&screen->sprites, credit_txt("George Sokianos", C_WHITE, x + columnOffset, y, renderer)); - y += 60; + y += 40; linkedlist_push(&screen->sprites, credit_txt(" - Graphics -", C_BLUE, x, y, renderer)); y += 30; linkedlist_push(&screen->sprites, credit_txt("Tileset:", C_YELLOW, x, y, renderer)); @@ -209,3 +214,4 @@ screen_destroy(Screen *screen) sprite_destroy(linkedlist_pop(&screen->sprites)); free(screen); } + diff --git a/src/texture.c b/src/texture.c index 57b67d8..381e78b 100644 --- a/src/texture.c +++ b/src/texture.c @@ -160,13 +160,11 @@ texture_load_from_text(Texture *t, { SDL_Surface *bg_surface = NULL; SDL_Surface *fg_surface = NULL; + fg_surface = TTF_RenderText_Blended(t->font, text, c); if (t->outlineFont) { bg_surface = TTF_RenderText_Blended(t->outlineFont, text, oc); - fg_surface = TTF_RenderText_Blended(t->font, text, c); - } - else { - fg_surface = TTF_RenderText_Blended(t->font, text, c); } + SDL_Surface *surface = fg_surface; if (bg_surface) { int outline = TTF_GetFontOutline(t->outlineFont);