|
|
@ -1,5 +1,5 @@
|
|
|
|
// you will die someday
|
|
|
|
|
|
|
|
#define CURRENT_VERSION 10 // wehenver you change Entity increment this boz
|
|
|
|
#define CURRENT_VERSION 10 // wehenver you change Entity increment this boz
|
|
|
|
|
|
|
|
// you will die someday
|
|
|
|
|
|
|
|
|
|
|
|
#define SOKOL_IMPL
|
|
|
|
#define SOKOL_IMPL
|
|
|
|
#if defined(WIN32) || defined(_WIN32)
|
|
|
|
#if defined(WIN32) || defined(_WIN32)
|
|
|
@ -138,18 +138,6 @@ typedef struct TileSet
|
|
|
|
|
|
|
|
|
|
|
|
#include "makeprompt.h"
|
|
|
|
#include "makeprompt.h"
|
|
|
|
|
|
|
|
|
|
|
|
Sentence from_str(char *s)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Sentence to_return = {0};
|
|
|
|
|
|
|
|
while(*s != '\0')
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BUFF_APPEND(&to_return, *s);
|
|
|
|
|
|
|
|
s++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return to_return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct Overlap
|
|
|
|
typedef struct Overlap
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool is_tile; // in which case e will be null, naturally
|
|
|
|
bool is_tile; // in which case e will be null, naturally
|
|
|
@ -757,7 +745,7 @@ void reset_level()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WEB
|
|
|
|
#ifdef WEB
|
|
|
|
EMSCRIPTEN_KEEPALIVE
|
|
|
|
EMSCRIPTEN_KEEPALIVE
|
|
|
|
void dump_save_data()
|
|
|
|
void dump_save_data()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
EM_ASM({
|
|
|
|
EM_ASM({
|
|
|
@ -1751,7 +1739,6 @@ void draw_shadow_for(DrawParams d)
|
|
|
|
d.tint = (Color){0,0,0,0.2f};
|
|
|
|
d.tint = (Color){0,0,0,0.2f};
|
|
|
|
d.sorting_key -= 1;
|
|
|
|
d.sorting_key -= 1;
|
|
|
|
d.alpha_clip_threshold = 0.0f;
|
|
|
|
d.alpha_clip_threshold = 0.0f;
|
|
|
|
d;
|
|
|
|
|
|
|
|
dbgline(sheared_quad.ul, sheared_quad.ur);
|
|
|
|
dbgline(sheared_quad.ul, sheared_quad.ur);
|
|
|
|
dbgline(sheared_quad.ur, sheared_quad.lr);
|
|
|
|
dbgline(sheared_quad.ur, sheared_quad.lr);
|
|
|
|
dbgline(sheared_quad.lr, sheared_quad.ll);
|
|
|
|
dbgline(sheared_quad.lr, sheared_quad.ll);
|
|
|
@ -2663,13 +2650,13 @@ void frame(void)
|
|
|
|
Entity *targeting = player;
|
|
|
|
Entity *targeting = player;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
G cost: distance from the current node to the start node
|
|
|
|
G cost: distance from the current node to the start node
|
|
|
|
H cost: distance from the current node to the target node
|
|
|
|
H cost: distance from the current node to the target node
|
|
|
|
|
|
|
|
|
|
|
|
G H
|
|
|
|
G H
|
|
|
|
SUM
|
|
|
|
SUM
|
|
|
|
F cost: G + H
|
|
|
|
F cost: G + H
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
Vec2 to = targeting->pos;
|
|
|
|
Vec2 to = targeting->pos;
|
|
|
|
|
|
|
|
|
|
|
|
PathCache *cached = get_path_cache(elapsed_time, it->cached_path);
|
|
|
|
PathCache *cached = get_path_cache(elapsed_time, it->cached_path);
|
|
|
@ -2760,6 +2747,7 @@ F cost: G + H
|
|
|
|
ARR_ITER(Vec2, neighbor_positions) *it = AddV2(*it, current->pos);
|
|
|
|
ARR_ITER(Vec2, neighbor_positions) *it = AddV2(*it, current->pos);
|
|
|
|
|
|
|
|
|
|
|
|
Entity *e = it;
|
|
|
|
Entity *e = it;
|
|
|
|
|
|
|
|
|
|
|
|
PROFILE_SCOPE("Checking neighbor positions")
|
|
|
|
PROFILE_SCOPE("Checking neighbor positions")
|
|
|
|
ARR_ITER(Vec2, neighbor_positions)
|
|
|
|
ARR_ITER(Vec2, neighbor_positions)
|
|
|
|
{
|
|
|
|
{
|
|
|
|