I want to dabble in some c so I wanted to make LOA. Since there is Oiram, why not The Legend Of Adlez. Right now the world map is divided into 4 quadrants, because I had difficulty with the tilemap world height and size being displayed. At the moment, link can freely move around the world without colliding into anything.
link.8xp
Github
I have some questions:
1. Should I have everything in one file. I have my sprites and quadrants in the same program file as the game, instead of having them in Appvars?
2. Is there a better way of clearing link? I have a "buffer" using a function.
Code:
The processEvents has a long enough "buffer" to where link doesn't leave a trail. processEvents would be in main.c, while moveScreen would be in render.c; I have them flipped for the purpose of having link not leaving a trail.
3. Also how does the gfx_GetTile work. Is it possible for me to use it as a form of collision detection?
link.8xp
Github
I have some questions:
1. Should I have everything in one file. I have my sprites and quadrants in the same program file as the game, instead of having them in Appvars?
2. Is there a better way of clearing link? I have a "buffer" using a function.
Code:
#include "includes.h"
#include "render.h"
#include "animate.h"
#include "link.h"
#include "processEvents.h"
//#include "moveScreen.h"
void render(gameState *game, Link *link, gfx_tilemap_t *tilemap, unsigned *x_offset, unsigned *y_offset) {
gfx_TransparentSprite_NoClip(link->clear, link->x, link->y);
animate(game, link);
//moveScreen(link, tilemap, x_offset, y_offset);
processEvents(game, link, tilemap);
gfx_GetSprite(link->clear, link->x, link->y);
gfx_TransparentSprite_NoClip(link->sprites[link->direction], link->x, link->y);
gfx_BlitBuffer();
}
The processEvents has a long enough "buffer" to where link doesn't leave a trail. processEvents would be in main.c, while moveScreen would be in render.c; I have them flipped for the purpose of having link not leaving a trail.
3. Also how does the gfx_GetTile work. Is it possible for me to use it as a form of collision detection?