diff --git a/assets/Extras/Controller.png b/assets/Extras/Controller.png new file mode 100644 index 0000000..8ee96de Binary files /dev/null and b/assets/Extras/Controller.png differ diff --git a/assets/Extras/README.txt b/assets/Extras/README.txt new file mode 100644 index 0000000..43d2249 --- /dev/null +++ b/assets/Extras/README.txt @@ -0,0 +1,7 @@ +The image files contained in this folder are created by Linus Probert (author +of BreakHack). + +They are either modifications of the DanwLike tileset or completely original +content. Feel free to use them as you please. The images that are combined +from DawnLike assets should be handled under the same licensing rights as the +original works. The others are completely unencumbered. diff --git a/assets/Extras/controller.aseprite b/assets/Extras/controller.aseprite new file mode 100644 index 0000000..f1fb2b9 Binary files /dev/null and b/assets/Extras/controller.aseprite differ diff --git a/assets/GUI/SDS_8x8.ttf b/assets/GUI/SDS_8x8.ttf index 08c4b91..2de25d9 100644 Binary files a/assets/GUI/SDS_8x8.ttf and b/assets/GUI/SDS_8x8.ttf differ diff --git a/assets/GUI/SDS_8x8_orig.ttf b/assets/GUI/SDS_8x8_orig.ttf deleted file mode 100644 index 2de25d9..0000000 Binary files a/assets/GUI/SDS_8x8_orig.ttf and /dev/null differ diff --git a/src/main.c b/src/main.c index 4f70c2c..cc206e4 100644 --- a/src/main.c +++ b/src/main.c @@ -87,8 +87,9 @@ static char *skills_tooltip[] = { " Skills are listed in the bar below the game screen.", "", "", "", - " SKILL INFO: SHIFT + ", "", - " Where is the skill number (1-5)", "", + " SKILL INFO: ", "SHIFT", " + ", "", + " Where is the button corresponding to the skill", + " Eg. ", "1", "2", "3", "4", "5", "", "", " DISABLE TOOLTIPS: CTRL + D", "", "", @@ -104,11 +105,11 @@ static char *how_to_play_tooltip[] = { "", " ATTACK: Walk into a monster to attack it", "", "", - " HOLD TURN: Press SPACE", "", + " HOLD TURN: Press ", "SPACE", "", "", - " THROW DAGGER: Press 4 then chose a direction (nav keys)", "", + " THROW DAGGER: Press ", "4", " then chose a direction (nav keys)", "", "", - " DRINK HEALTH: Press 5 (if you need health and have potions)", "", + " DRINK HEALTH: Press ", "5", " (if you need health and have potions)", "", "", " TOGGLE MUSIC: CTRL + M", "", "", diff --git a/src/tooltip.c b/src/tooltip.c index 6fbd51b..f70e177 100644 --- a/src/tooltip.c +++ b/src/tooltip.c @@ -26,12 +26,24 @@ static bool render_button_texture_for(const char *text, Position pos, Camera *cam) { - Texture *t = texturecache_add("Characters/Player0.png"); - SDL_Rect clip = CLIP16(0, 0); + Texture *t = texturecache_add("Extras/Controller.png"); + SDL_Rect clip; if (strcmp(text, "1") == 0) { - // no op + clip = CLIP16(0, 0); } else if (strcmp(text, "2") == 0) { clip = CLIP16(16, 0); + } else if (strcmp(text, "3") == 0) { + clip = CLIP16(32, 0); + } else if (strcmp(text, "4") == 0) { + clip = CLIP16(48, 0); + } else if (strcmp(text, "5") == 0) { + clip = CLIP16(48, 48); + } else if (strcmp(text, "ESC") == 0) { + clip = CLIP16(0, 64); + } else if (strcmp(text, "SHIFT") == 0) { + clip = CLIP16(16, 48); + } else if (strcmp(text, "SPACE") == 0) { + clip = CLIP16(16, 32); } else { return false; } @@ -81,7 +93,7 @@ tooltip_create(char **content, Camera *cam) while (*content) { if (strlen(*content) > 0) { if (render_button_texture_for(*content, POS(renderBox.x, renderBox.y - 4), cam)) { - renderBox.x += 24; + renderBox.x += 16; } else { load_texture_for(text, *content, &renderBox, cam->renderer); texture_render(text, &renderBox, cam);