Commit c44948e 1 parent 1a3866e commit c44948e Copy full SHA for c44948e
File tree 7 files changed +93
-19
lines changed
7 files changed +93
-19
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ LDLIBS="$LDLIBS -lSDL2_mixer"
273
273
CONFIG_H=src/cfg.hpp
274
274
echo " #include \" my_cfg.hpp\" " > $CONFIG_H
275
275
C_FLAGS+=" -include cfg.hpp"
276
+ rm -f src/precompiled.hpp.gch
276
277
277
278
#
278
279
# for backtraces, but it doesn't help much
Original file line number Diff line number Diff line change 1
1
include ../build/Makefile.template
2
+ # CFLAGS+=-O0
2
3
3
4
NAME =yelindor
4
5
BUILD_DIR =../.o
@@ -33,12 +34,20 @@ $(OBJ_FILES): | $(BUILD_DIR)
33
34
34
35
# custom compile command for each source file needed because object file
35
36
# base names don't match source files that were in src/ subdirectories
36
- $(foreach x,$(CPP_SOURCES),\
37
- $(eval $(BUILD_DIR ) /$(call obj_name,$x) : $x ; $(CC ) $(CFLAGS ) $(DEP_FLAGS ) -c -o $$@ $$< ))
37
+
38
+ PRECOMPILED_H := precompiled.hpp
39
+ PRECOMPILED_H_OBJ := $(PRECOMPILED_H ) .gch
40
+
41
+ % .hpp.gch : $(PRECOMPILED_H )
42
+ $(CC ) $(CFLAGS ) -c -o $@ $<
38
43
39
44
$(foreach x,$(ASM_SOURCES),\
40
- $(eval $(BUILD_DIR ) /$(call obj_name,$x) : $x ; $(CC ) $(DEP_FLAGS ) -c -o $$@ $$< ))
45
+ $(eval $(BUILD_DIR ) /$(call obj_name,$x) : $x ;\
46
+ $(CC) $(CFLAGS) $(DEP_FLAGS) -c -o $$@ $$<))
41
47
48
+ $(foreach x,$(CPP_SOURCES),\
49
+ $(eval $(BUILD_DIR ) /$(call obj_name,$x) : $x | $(PRECOMPILED_H_OBJ ) ;\
50
+ $(CC) -include $(PRECOMPILED_H) $(CFLAGS) $(DEP_FLAGS) -c -o $$@ $$<))
42
51
43
52
# use file list instead of wildcard for link command so we don't accidentally
44
53
# link with old object files for removed source files
Original file line number Diff line number Diff line change @@ -45,18 +45,6 @@ std::string g_opt_seed_name;
45
45
int TILES_VISIBLE_ACROSS;
46
46
int TILES_VISIBLE_DOWN;
47
47
48
- //
49
- // Map size
50
- //
51
- int MAP_HEIGHT;
52
- int MAP_WIDTH;
53
-
54
- //
55
- // Map room cells
56
- //
57
- int LEVEL_PH2_HEIGHT;
58
- int LEVEL_PH2_WIDTH;
59
-
60
48
int g_last_logged_callframes_depth;
61
49
62
50
void reset_globals (void )
Original file line number Diff line number Diff line change 28
28
#include " my_tp.hpp"
29
29
#include " my_wid_console.hpp"
30
30
31
+ #include " my_callstack.hpp"
32
+
33
+ #ifdef USE_THREADS
34
+ #ifdef __MAIN__
35
+ thread_local struct callframe callframes[ MAXCALLFRAME ];
36
+ thread_local unsigned char g_callframes_depth;
37
+ #else
38
+ extern thread_local struct callframe callframes[ MAXCALLFRAME ];
39
+ extern thread_local unsigned char g_callframes_depth;
40
+ extern thread_local unsigned char g_callframes_indent;
41
+ #endif
42
+ #else
43
+ #ifdef __MAIN__
44
+ struct callframe callframes[ MAXCALLFRAME ];
45
+ unsigned char g_callframes_depth;
46
+ unsigned char g_callframes_indent;
47
+ #else
48
+ extern struct callframe callframes[ MAXCALLFRAME ];
49
+ extern unsigned char g_callframes_depth;
50
+ extern unsigned char g_callframes_indent;
51
+ #endif
52
+ #endif
53
+
31
54
static char **ARGV;
32
55
33
56
static std::string original_program_name;
Original file line number Diff line number Diff line change 5
5
#pragma once
6
6
7
7
#include < map>
8
- #include < string> // do not remove
8
+ #include < string>
9
9
10
10
using ramdisk_t = struct ramdisk_t_ {
11
11
const unsigned char *data;
Original file line number Diff line number Diff line change
1
+ #include < SDL.h>
2
+ #include < SDL_mixer.h>
3
+ #include < array>
4
+ #include < cstdint>
5
+ #include < cstring>
6
+ #include < ctime>
7
+ #include < ctype.h>
8
+ #include < errno.h>
9
+ #include < fstream>
10
+ #include < inttypes.h>
11
+ #include < iomanip>
12
+ #include < iostream>
13
+ #include < limits.h>
14
+ #include < list>
15
+ #include < locale.h>
16
+ #include < map>
17
+ #include < math.h>
18
+ #include < memory>
19
+ #include < signal.h>
20
+ #include < sstream>
21
+ #include < stdarg.h>
22
+ #include < stddef.h>
23
+ #include < stdint.h>
24
+ #include < stdio.h>
25
+ #include < stdlib.h>
26
+ #include < string.h>
27
+ #include < string>
28
+ #include < strings.h>
29
+ #include < sys/param.h>
30
+ #include < sys/prctl.h>
31
+ #include < sys/stat.h>
32
+ #include < sys/wait.h>
33
+ #include < time.h>
34
+ #include < unistd.h>
35
+ #include < vector>
36
+
37
+ #include " my_audio.hpp"
38
+ #include " my_command.hpp"
39
+ #include " my_dir.hpp"
40
+ #include " my_file.hpp"
41
+ #include " my_font.hpp"
42
+ #include " my_game.hpp"
43
+ #include " my_gfx.hpp"
44
+ #include " my_level.hpp"
45
+ #include " my_level_data.hpp"
46
+ #include " my_music.hpp"
47
+ #include " my_ramdisk.hpp"
48
+ #include " my_random.hpp"
49
+ #include " my_sdl_proto.hpp"
50
+ #include " my_sound.hpp"
51
+ #include " my_thing.hpp"
52
+ #include " my_thing_id.hpp"
53
+ #include " my_tp.hpp"
54
+ #include " my_tps.hpp"
55
+ #include " my_wid_console.hpp"
Original file line number Diff line number Diff line change 2
2
// Copyright Neil McGill, goblinhack@gmail.com
3
3
//
4
4
5
- #include < string.h>
6
-
7
5
#include " my_main.hpp"
8
- #include " my_ptrcheck.hpp"
9
6
#include " my_ramdisk.hpp"
7
+ #include < string.h>
10
8
11
9
std::map< std::string, ramdisk_t_ > ramdisk_data;
12
10
You can’t perform that action at this time.
0 commit comments