FIx warnings
This commit is contained in:
@@ -38,11 +38,9 @@ void player_proc(Entity e, int ft) {
|
||||
float acel = 8.0f;
|
||||
float maxVel = 30.0f;
|
||||
float jumpVel = 50.0f;
|
||||
float shootVel = 50.0f;
|
||||
|
||||
if (Input_GetKey(InputKey_Jump) == InputKey_Pressed ||
|
||||
Input_GetKey(InputKey_Up) == InputKey_Pressed) {
|
||||
vec2 jump;
|
||||
|
||||
// Apply jump
|
||||
if (e->vel[1] > (-jumpVel)) {
|
||||
|
||||
@@ -92,19 +92,17 @@ int GameMap_LoadLevel(char *filename, int res) {
|
||||
// Parse the map
|
||||
for (j = 0; j < height; j++) {
|
||||
for (i = 0; i < width; i++) {
|
||||
Entity ent;
|
||||
|
||||
if (MAP(i, j) == 'P') {
|
||||
// Player
|
||||
GameMapAux_CreateEnt(ent_Player, i, j, res);
|
||||
}
|
||||
if (MAP(i, j) == '#') {
|
||||
// Block
|
||||
ent = GameMapAux_CreateEnt(ent_Block, i, j, res);
|
||||
GameMapAux_CreateEnt(ent_Block, i, j, res);
|
||||
}
|
||||
if (MAP(i, j) == '|') {
|
||||
// Platform
|
||||
ent = GameMapAux_CreateEnt(ent_Platform, i, j, res);
|
||||
GameMapAux_CreateEnt(ent_Platform, i, j, res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,6 @@ void PreDrawGame(float f) {}
|
||||
void DrawGame(float f) { MainGame_Text(8, 8, "Hello world!"); }
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
int i, j;
|
||||
Entity *e;
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
|
||||
@@ -1011,6 +1011,8 @@ DrawFnt Draw_LoadFont(char *fichero, int min, int max) {
|
||||
font->h = font->img->h;
|
||||
font->min = min;
|
||||
font->max = max;
|
||||
font->scale[0] = 1.0f;
|
||||
font->scale[1] = 1.0f;
|
||||
|
||||
return ((DrawFnt)font);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ Entity Entity_Init(Entity e) {
|
||||
if (e->oninit) {
|
||||
e->oninit(e);
|
||||
}
|
||||
return (e);
|
||||
}
|
||||
|
||||
/////////////////////////////
|
||||
|
||||
@@ -641,8 +641,7 @@ void GameLib_EntitySetLight(Entity e, float r, float g, float b, float rad) {
|
||||
// GameLib_ConvertScreenPositionToGamePosition
|
||||
//
|
||||
//
|
||||
void GameLib_ConvertScreenPositionToGamePosition(vec2 screenPos, vec2 gamePos) {
|
||||
float f;
|
||||
void GameLib_ConvertScreenPositionToGamePosition(vec2 screenPos, vec2 gamePos, float f) {
|
||||
int game_pos[2];
|
||||
|
||||
game_pos[0] = _game_pos0[0] + f * (_game_pos1[0] - _game_pos0[0]);
|
||||
|
||||
@@ -112,7 +112,7 @@ void GameLib_EntitySetLight(Entity e, float r, float g, float b, float rad);
|
||||
// GameLib_ConvertScreenPositionToGamePosition
|
||||
//
|
||||
//
|
||||
void GameLib_ConvertScreenPositionToGamePosition(vec2 screenPos, vec2 gamePos);
|
||||
void GameLib_ConvertScreenPositionToGamePosition(vec2 screenPos, vec2 gamePos, float f);
|
||||
|
||||
/////////////////////////////
|
||||
// GameLib_AddParallaxBackground
|
||||
|
||||
@@ -53,7 +53,6 @@ void QuadArray2D_AddQuad(QuadArray2D quadArray, float x0, float y0, float u0,
|
||||
float v0, float x1, float y1, float u1, float v1,
|
||||
float color[]) {
|
||||
float v[Vertex2D_Length];
|
||||
int firstIndex = quadArray->nVertex;
|
||||
|
||||
// Set the color
|
||||
v[4] = color[0];
|
||||
|
||||
Reference in New Issue
Block a user