Compare commits
9 Commits
16ebe4ede0
...
0a4c700bf6
Author | SHA1 | Date |
---|---|---|
|
0a4c700bf6 | |
|
ae730ce029 | |
|
b56e0e7f10 | |
|
d1d8033b77 | |
|
f8eab8acec | |
|
835b88f1f4 | |
|
064341e2eb | |
|
533e2998bc | |
|
de29201a41 |
|
@ -3,7 +3,10 @@
|
||||||
#define RRES_IMPLEMENTATION
|
#define RRES_IMPLEMENTATION
|
||||||
#include "rres.h" // Required to read rres data chunks
|
#include "rres.h" // Required to read rres data chunks
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
// Load a continuous data buffer from rresResourceChunkData struct
|
// Load a continuous data buffer from rresResourceChunkData struct
|
||||||
static unsigned char *LoadDataBuffer(rresResourceChunkData data, unsigned int rawSize)
|
static unsigned char *LoadDataBuffer(rresResourceChunkData data, unsigned int rawSize)
|
||||||
|
|
|
@ -23,7 +23,7 @@ uint8_t find_AABB_overlap(const Vector2 tl1, const Vector2 sz1, const Vector2 tl
|
||||||
// Note that we include one extra pixel for checking
|
// Note that we include one extra pixel for checking
|
||||||
// This avoid overlapping on the border
|
// This avoid overlapping on the border
|
||||||
Vector2 l1, l2;
|
Vector2 l1, l2;
|
||||||
Vector2 tmp;
|
Vector2 tmp = {0,0};
|
||||||
uint8_t overlap_x, overlap_y;
|
uint8_t overlap_x, overlap_y;
|
||||||
l1.x = tl1.x;
|
l1.x = tl1.x;
|
||||||
l1.y = tl1.x + sz1.x;
|
l1.y = tl1.x + sz1.x;
|
||||||
|
|
|
@ -1821,6 +1821,7 @@ void camera_update_system(Scene_t* scene)
|
||||||
if (p_ctransform->position.y >= data->camera.base_y)
|
if (p_ctransform->position.y >= data->camera.base_y)
|
||||||
{
|
{
|
||||||
data->camera.target_pos.y = p_ctransform->position.y;
|
data->camera.target_pos.y = p_ctransform->position.y;
|
||||||
|
data->camera.target_pos.y += p_ctransform->velocity.y * 0.2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data->camera.target_pos.x = Clamp(data->camera.target_pos.x, data->game_rec.width / 2,
|
data->camera.target_pos.x = Clamp(data->camera.target_pos.x, data->game_rec.width / 2,
|
||||||
|
|
Loading…
Reference in New Issue