Some more fixes and minor changes

This commit is contained in:
George Sokianos 2022-09-10 11:57:02 +01:00
parent 6a78b47ae6
commit 43c8bd610f
6 changed files with 26 additions and 14 deletions

View File

@ -1,11 +1,8 @@
# #
# Makefile generated by:
# codebench 0.55
#
# Project: breakhack # Project: breakhack
# #
# Created on: 29-08-2022 21:00:37 # Created on: 29-08-2022 21:00:37
# # by George Sokianos
# #
################################################################### ###################################################################

View File

@ -109,7 +109,7 @@ void* linkedlist_get(LinkedList **head, unsigned int index)
return linkedlist_get(&(*head)->next, --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; LinkedList *next = *head;
@ -142,3 +142,4 @@ unsigned int linkedlist_size(LinkedList *head)
} }
return 1 + linkedlist_size(head->next); return 1 + linkedlist_size(head->next);
} }

View File

@ -37,10 +37,11 @@ void* linkedlist_poplast(LinkedList **head);
void* linkedlist_get(LinkedList **head, unsigned int index); 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); void linkedlist_destroy(LinkedList **head);
unsigned int linkedlist_size(LinkedList *head); unsigned int linkedlist_size(LinkedList *head);
#endif // LINKEDLIST_H_ #endif // LINKEDLIST_H_

View File

@ -65,6 +65,14 @@
#include "steam/steamworks_api_wrapper.h" #include "steam/steamworks_api_wrapper.h"
#endif // STEAM_BUILD #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[] = { static char *artifacts_tooltip[] = {
"CONGRATULATIONS!", "", "CONGRATULATIONS!", "",
"", "",
@ -95,8 +103,8 @@ static char *skills_tooltip[] = {
"", "",
"", "",
" SKILL INFO: SHIFT + <N>", "", " SKILL INFO: SHIFT + <N>", "",
" Where <N> is the number corresponding to the skill", "", " Where <N> is the number corresponding to", "",
" Eg. 1, 2, 3, 4, 5", "", " the skill, i.e. 1, 2, 3, 4, 5", "",
"", "",
" DISABLE TOOLTIPS: CTRL + D", "", " DISABLE TOOLTIPS: CTRL + D", "",
"", "",
@ -1468,7 +1476,7 @@ int main(int argc, char *argv[])
#endif // STEAM_BUILD #endif // STEAM_BUILD
PHYSFS_init(argv[0]); PHYSFS_init(argv[0]);
#ifndef DEBUG #if !defined(DEBUG) && !defined(__amigaos4__)
PHYSFS_mount("assets.pack", NULL, 0); PHYSFS_mount("assets.pack", NULL, 0);
PHYSFS_mount("data.pack", NULL, 0); PHYSFS_mount("data.pack", NULL, 0);
#else #else
@ -1494,3 +1502,4 @@ int main(int argc, char *argv[])
return 0; return 0;
} }

View File

@ -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)); linkedlist_push(&screen->sprites, credit_txt("liquidityc.github.io", C_WHITE, x + columnOffset, y, renderer));
y += 20; y += 20;
linkedlist_push(&screen->sprites, credit_txt("@LiquidityC", C_WHITE, x + columnOffset, y, renderer)); 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)); linkedlist_push(&screen->sprites, credit_txt(" - Graphics -", C_BLUE, x, y, renderer));
y += 30; y += 30;
linkedlist_push(&screen->sprites, credit_txt("Tileset:", C_YELLOW, x, y, renderer)); 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)); sprite_destroy(linkedlist_pop(&screen->sprites));
free(screen); free(screen);
} }

View File

@ -160,13 +160,11 @@ texture_load_from_text(Texture *t,
{ {
SDL_Surface *bg_surface = NULL; SDL_Surface *bg_surface = NULL;
SDL_Surface *fg_surface = NULL; SDL_Surface *fg_surface = NULL;
fg_surface = TTF_RenderText_Blended(t->font, text, c);
if (t->outlineFont) { if (t->outlineFont) {
bg_surface = TTF_RenderText_Blended(t->outlineFont, text, oc); 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; SDL_Surface *surface = fg_surface;
if (bg_surface) { if (bg_surface) {
int outline = TTF_GetFontOutline(t->outlineFont); int outline = TTF_GetFontOutline(t->outlineFont);