Persistent arena is much bigger, add critical todo for later

main
parent 471c538162
commit 48afb43f0a

@ -53,17 +53,23 @@ typedef struct WebArena
size_t pos;
} WebArena;
static bool next_arena_big = false;
WebArena *web_arena_alloc()
{
WebArena *to_return = malloc(sizeof(to_return));
size_t this_size = ARENA_SIZE;
if(next_arena_big) this_size = BIG_ARENA_SIZE;
*to_return = (WebArena) {
.data = calloc(1, ARENA_SIZE),
.cap = ARENA_SIZE,
.data = calloc(1, this_size),
.cap = this_size,
.pos = 0,
};
next_arena_big = false;
return to_return;
}
@ -2312,6 +2318,7 @@ void init(void)
#endif
frame_arena = MD_ArenaAlloc();
next_arena_big = true;
persistent_arena = MD_ArenaAlloc();
#ifdef DEVTOOLS

@ -1,3 +1,10 @@
Very Important:
- Make sure no memory leaks in loading save data. I reuse the persistent arena, and just set the gamestate again, so all that memory allocated from loading the gamestate is leaked in the persistent arena. You need to fix this before ship.
Below is old.
DONE - rewrite to have metadesk format for speech and actions
DONE - action and item explanations in system message, along with available actions and items
DONE - remove party eavesdropping, but make clear to AI when things are heard physically or told directly. Allow AI to choose people in vicinity to target with conversation and action. I.e a `talking_to` field. Also add a required character: field in chatgpt response, and make sure it matches the character it's supposed to act as.

@ -13,6 +13,7 @@
#define SECONDS_PER_ARROW 1.3f
#define ARENA_SIZE (1024*1024)
#define BIG_ARENA_SIZE (ARENA_SIZE * 8)
#ifdef DEVTOOLS
// server url cannot have trailing slash

Loading…
Cancel
Save