Sfoglia il codice sorgente

move trainers to more reasonable c file

SBird1337 6 anni fa
parent
commit
bba37a6ca4
5 ha cambiato i file con 17 aggiunte e 8 eliminazioni
  1. 1
    0
      .gitignore
  2. 2
    2
      data/trainer/trainer_pkmn_data.s
  3. 1
    1
      g3headers
  4. 12
    4
      makefile
  5. 1
    1
      sots-private

+ 1
- 0
.gitignore Vedi File

@@ -4,6 +4,7 @@ temp
4 4
 *.ogg
5 5
 *.a
6 6
 *.i
7
+*.ci
7 8
 nbproject/private/tools/
8 9
 .vscode/*
9 10
 todo/

+ 2
- 2
data/trainer/trainer_pkmn_data.s Vedi File

@@ -1,4 +1,4 @@
1
-#include <constants/trainer.h>
1
+/*#include <constants/trainer.h>
2 2
 
3 3
 .align 2
4 4
 .text
@@ -172,4 +172,4 @@ pokemon_von_id_6:
172 172
 .hword 50 
173 173
 .hword 6 
174 174
 .hword PKMN_BISASAM 
175
-.hword ITEM_SINELBEERE
175
+.hword ITEM_SINELBEERE*/

+ 1
- 1
g3headers

@@ -1 +1 @@
1
-Subproject commit 3e36531d290bd97e7b1208526e54c8acdfe376d3
1
+Subproject commit 083c36df58968b714fdec0b76c6d7df0208d708f

+ 12
- 4
makefile Vedi File

@@ -42,6 +42,7 @@ MAPMAPS	  := $(MAPROOT)/maps
42 42
 MAPTS	  := $(MAPROOT)/tileset
43 43
 MAP_PROJ	:= $(MAPROOT)/sots.json
44 44
 SCRIPTROOT := $(MAPROOT)/script
45
+PDATAROOT := sots-private/data
45 46
 
46 47
 MAIN_OBJ  := $(BLDPATH)/linked.o
47 48
 B_ENGINE  := battle_engine/build/linked.o
@@ -73,6 +74,7 @@ DATA_SRC    := $(call rwildcard,data/,*.s)
73 74
 STRING		:= $(call rwildcard,string/$(LAN)/,*.txt)
74 75
 STRING_SRC	:= $(STRING:%.txt=%.s)
75 76
 SCRIPT_SRC	:= $(call rwildcard,$(SCRIPTROOT)/,*.s)
77
+PDATA_SRC   := $(call rwildcard,$(PDATAROOT)/,*.c)
76 78
 
77 79
 MAP_PROJ_S	:= $(MAP_PROJ:%.json=%.s)
78 80
 MAP_PROJ_O	:= $(MAP_PROJ:%.json=$(BLDPATH)/%.o)
@@ -91,7 +93,8 @@ ASM_OBJ     := $(ASM_SRC:%.s=$(BLDPATH)/%.o)
91 93
 C_OBJ       := $(C_SRC:%.c=$(BLDPATH)/%.o)
92 94
 DATA_OBJ    := $(DATA_SRC:%.s=$(BLDPATH)/%.o)
93 95
 SCRIPT_OBJ	:= $(SCRIPT_SRC:%.s=$(BLDPATH)/%.o)
94
-ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O)
96
+PDATA_OBJ   := $(PDATA_SRC:%.c=$(BLDPATH)/%.o)
97
+ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O) $(PDATA_OBJ)
95 98
 
96 99
 $(MAPMAPS)/%.s: $(MAPMAPS)/%.pmh
97 100
 	@printf "\e[1;33mGenerating map\e[0m $<\n"
@@ -101,9 +104,14 @@ $(MAPTS)/%.s: $(MAPTS)/%.pts
101 104
 	@printf "\e[1;33mGenerating tileset\e[0m $<\n"
102 105
 	$(PYSETS) -o $@ $<
103 106
 
104
-$(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
105
-	@printf "\e[1;36mGenerating strings\e[0m $<\n"
106
-	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
107
+$(BLDPATH)/sots-private/data/%.o: $(PDATAROOT)/%.c
108
+	@printf "\e[1;31mCompiling\e[0m $<\n"
109
+	$(shell mkdir -p $(dir $@))
110
+	$(CC) $(CFLAGS) -E -x c $< -o $(PDATAROOT)/$*.i
111
+	$(PREPROC) $(PDATAROOT)/$*.i $(CHARMAP) > $(PDATAROOT)/$*.ci
112
+	$(CC) $(CFLAGS) -c -x c $(PDATAROOT)/$*.ci -o $@
113
+	@rm -f $(PDATAROOT)/$*.ci  $(PDATAROOT)/$*.i
114
+	
107 115
 
108 116
 $(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h
109 117
 	@printf "\e[1;31mCompiling\e[0m $<\n"

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 5b270e614e3c0d2eda30f62bfe4818c579b3d55d
1
+Subproject commit d3593ad524f9044fe89eb686faa65eed2e24a379