#define STAGECOUNT 3
#define DIALOGUECOUNT 9
#define PLATFORMCOUNT 5
+#define DANGERCOUNT 1
#include "game.h"
//icons are 40x40
struct dialogue dialogues[DIALOGUECOUNT] = {
- {"Hello!! [press 'H' to advance dialogue]", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
- {"My name is Ai-chan, and i;m the AI of the Hyperion :3", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
+ {"Hello!! [press 'H' to advance dialogue]", "Ai-chan", "dialogue-img/aichan-smile.png", GREEN},
+ {"My name is Ai-chan, and i;m the AI of the Hyperion :3", "Ai-chan", "dialogue-img/aichan-smile.png", GREEN},
{"(for context thsi is a honkai impact 3 reference... i swear it makes sense", "context", "dialogue-img/aichan-default.png", BLACK},
- {"So there's these girls Rozaliya and Liliya who think they can become the main characters of a game...", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
- {"I'm clearly way more awesome than them so I am becoming the main character of a game >:{", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
- {"Now we have to find them and prove this!!", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
- {"Please press 'A' and 'D' to move LEFT and RIGHT; advance to the RIGHT side of the screen to finish this level!!", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
+ {"So there's these girls Rozaliya and Liliya who think they can become the main characters of a game...", "Ai-chan", "dialogue-img/aichan-neutral.png", GREEN},
+ {"I'm clearly way more awesome than them so I am becoming the main character of a game >:{", "Ai-chan", "dialogue-img/aichan-angry.png", GREEN},
+ {"Now we have to find them and prove this!!", "Ai-chan", "dialogue-img/aichan-angry.png", GREEN},
+ {"Please press 'A' and 'D' to move LEFT and RIGHT; advance to the RIGHT side of the screen to finish this level!!", "Ai-chan", "dialogue-img/aichan-smile.png", GREEN},
- {"Press 'H' to JUMP", "Ai-chan", "dialogue-img/aichan-default.png", GREEN},
+ {"Press 'H' to JUMP", "Ai-chan", "dialogue-img/aichan-smile.png", GREEN},
- {"YOU WIN!!", "Ai-chan", "dialogue-img/aichan-default.png", GREEN}
+ {"YOU WIN!!", "Ai-chan", "dialogue-img/aichan-smile.png", GREEN}
};
struct platform platforms[PLATFORMCOUNT] = {
{{320, 0, 320, 480}, GREEN}
};
+struct platform danger[DANGERCOUNT] = {
+ {{50,310,7,10}, RED}
+};
+
struct stage stages[STAGECOUNT] = {
- {"Level 0", platforms, 1, dialogues, 7},
- {"Level 1", platforms+1, 2, dialogues+7, 1},
- {"End", platforms+3, 2, dialogues+8, 1}
+ {"Level 0", platforms, 1, dialogues, 7, danger, 0},
+ {"Level 1", platforms+1, 2, dialogues+7, 1, danger, 1},
+ {"End", platforms+3, 2, dialogues+8, 1, danger, 0}
};
#include <stdio.h>
#include <math.h>
#include "game.h"
-struct character player = {{310,220,15,18},{0,0}};
+struct character player = {{0,300,6,18},{0,0}};
int inputs[3] = {KEY_A,KEY_D,KEY_H}; //left, right, jump/advance dialogue
static struct spritesheet front_sheet, walk_sheet;
{
static float time_since_switch = FRAMELENGTH;
static Rectangle croprec = {0,0,15,18};
+ static int x_offset = 0;
time_since_switch += delta_player;
if (time_since_switch >= FRAMELENGTH) {
if (IsKeyDown(inputs[1])) {
- drawframe(sheets[1], &croprec, 0);
+ drawframe(sheets[1], &croprec, 0);
+ x_offset = -9;
} else if (IsKeyDown(inputs[0])) {
drawframe(sheets[1], &croprec, 1);
+ x_offset= 0;
} else {
drawframe(sheets[0], &croprec, 0);
+ x_offset = -3;
};
time_since_switch = 0.0;
}
- DrawTexture(txtr, player.rect.x, player.rect.y, WHITE);
+ DrawTexture(txtr, player.rect.x + x_offset, player.rect.y, WHITE);
}
int spieler_bewegen(float delta) // should actually only change velocity, physics file moves player based on velocity uwu