parent
7dcc142a2d
commit
e2bce62a9d
|
@ -54,8 +54,10 @@ int main(void)
|
|||
change_scene(&engine, 0);
|
||||
|
||||
#if defined(PLATFORM_WEB)
|
||||
puts("Setting emscripten main loop");
|
||||
emscripten_set_main_loop(update_loop, 0, 1);
|
||||
#else
|
||||
puts("Regular main loop");
|
||||
while(true)
|
||||
{
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#ifndef TILE16_SIZE
|
||||
#define TILE_SIZE 32
|
||||
#define DEFAULT_MAP_WIDTH 48
|
||||
#define DEFAULT_MAP_HEIGHT 22
|
||||
#define DEFAULT_MAP_HEIGHT 32
|
||||
#define VIEWABLE_MAP_WIDTH 32
|
||||
#define VIEWABLE_MAP_HEIGHT 16
|
||||
#else
|
||||
|
|
|
@ -493,7 +493,7 @@ static void toggle_block_system(Scene_t* scene)
|
|||
{
|
||||
Vector2 mouse_pos = GetScreenToWorld2D(raw_mouse_pos, data->cam);
|
||||
unsigned int tile_idx = get_tile_idx(mouse_pos.x, mouse_pos.y, &tilemap);
|
||||
if (tile_idx >= MAX_N_TILES) return;
|
||||
if (tile_idx >= (tilemap.n_tiles - tilemap.width)) return;
|
||||
if (tile_idx == last_tile_idx) return;
|
||||
|
||||
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
|
||||
|
|
Loading…
Reference in New Issue