Skip to content

Commit

Permalink
lint and only use debugsanflags on linux for mapc
Browse files Browse the repository at this point in the history
  • Loading branch information
computermouth committed Nov 5, 2023
1 parent c927b08 commit 059cfa2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ assets: tools/mapc
make -C c1k3-assets

tools/mapc: $(EXT_OBJ)
ifeq ($(OS),linux)
$(CC) $(DBGSN_CFLAGS) tools/mapc.c -o tools/mapc $(EXT_OBJ) $(LFLAGS)
else
$(CC) $(DEBUG_CFLAGS) tools/mapc.c -o tools/mapc $(EXT_OBJ) $(LFLAGS)
endif

%.o: %.c
$(CC) $(OPT_FLAGS) -c $< -o $@
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ text_surface_t * dq = NULL;
text_surface_t * dennis = NULL;
entity_t * demon = NULL;

void menu_init(){
void menu_init() {
// set level to menu
map_set_level(2);

Expand Down
4 changes: 2 additions & 2 deletions map.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,13 +521,13 @@ void map_parse() {
mpack_map_parse((char *)data_menu, data_menu_len);
}

void map_set_level(size_t i){
void map_set_level(size_t i) {
map_t * m = vector_at(map_data, i);
map = m;
}

void map_load () {

// loads from global map_t * map;
for (uint32_t i = 0; i < map->e_size; i++) {
entity_params_t * ref_ep = vector_at(map->map_entities, i);
Expand Down

0 comments on commit 059cfa2

Please sign in to comment.