Convert to 4 space indentation to try out CLion

main
Cameron Murphy Reikes 2 years ago
parent 7236b4e935
commit dc1cb80ecd

4
.gitignore vendored

@ -1,3 +1,7 @@
# Clion stuff
.idea/
cmake-build-debug/
# Tiled session
main.tiled-session
# Server builds

@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.23)
project(rpgpt C)
set(CMAKE_C_STANDARD 11)
include_directories(.)
include_directories(gen)
include_directories(thirdparty)
add_executable(rpgpt
main.c
)

@ -1,5 +1,7 @@
#pragma once
#include <stddef.h>
#define ARRLEN(x) ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
#define ARR_ITER(type, arr) for(type *it = &arr[0]; it < &arr[ARRLEN(arr)]; it++)
#define ARR_ITER_I(type, arr, i_var) ARR_ITER(type, arr) for(int i_var = (int)(it - &arr[0]); i_var != -1; i_var = -1)

@ -1,5 +1,5 @@
// you will die someday
#define CURRENT_VERSION 10 // wehenver you change Entity increment this boz
// you will die someday
#define SOKOL_IMPL
#if defined(WIN32) || defined(_WIN32)
@ -138,18 +138,6 @@ typedef struct TileSet
#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
{
bool is_tile; // in which case e will be null, naturally
@ -757,7 +745,7 @@ void reset_level()
#ifdef WEB
EMSCRIPTEN_KEEPALIVE
EMSCRIPTEN_KEEPALIVE
void dump_save_data()
{
EM_ASM({
@ -1751,7 +1739,6 @@ void draw_shadow_for(DrawParams d)
d.tint = (Color){0,0,0,0.2f};
d.sorting_key -= 1;
d.alpha_clip_threshold = 0.0f;
d;
dbgline(sheared_quad.ul, sheared_quad.ur);
dbgline(sheared_quad.ur, sheared_quad.lr);
dbgline(sheared_quad.lr, sheared_quad.ll);
@ -2663,13 +2650,13 @@ void frame(void)
Entity *targeting = player;
/*
G cost: distance from the current node to the start node
H cost: distance from the current node to the target node
G cost: distance from the current node to the start node
H cost: distance from the current node to the target node
G H
G H
SUM
F cost: G + H
*/
F cost: G + H
*/
Vec2 to = targeting->pos;
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);
Entity *e = it;
PROFILE_SCOPE("Checking neighbor positions")
ARR_ITER(Vec2, neighbor_positions)
{

@ -7,7 +7,7 @@
#include <stdlib.h> // atoi
#include "character_info.h"
#include "characters.gen.h"
NPC_MOOSE,
NPC_MOOSE,
} NpcKind;
// TODO do strings: https://pastebin.com/Kwcw2sye

Loading…
Cancel
Save