Browse Source

before merge

Philipp Auer 7 years ago
parent
commit
3eb9edc155
4 changed files with 148 additions and 139 deletions
  1. 12
    0
      .vscode/launch.json
  2. 130
    135
      assets.makefile
  3. 4
    2
      src/include/sound.h
  4. 2
    2
      src/overworld/grass_animation.c

+ 12
- 0
.vscode/launch.json View File

@@ -0,0 +1,12 @@
1
+{
2
+    "version": "0.2.0",
3
+    "configurations": [
4
+        {
5
+            "name": "Debug",
6
+            "type": "gdb",
7
+            "request": "launch",
8
+            "target": "./bin/executable",
9
+            "cwd": "${workspaceRoot}"
10
+        }
11
+    ]
12
+}

+ 130
- 135
assets.makefile View File

@@ -1,136 +1,131 @@
1
-GRIT := grit
2
-CC   := arm-none-eabi-gcc
3
-AR   := arm-none-eabi-ar
4
-
5
-CFLAGS := -mthumb -mno-thumb-interwork -mcpu=arm7tdmi -mlong-calls -march=armv4t -O3 -std=c99
6
-
7
-ASSET_ROOT := sots-private/assets
8
-GFX_BUILD := gfx_build
9
-
10
-PNG_MET_BG     := assets/meteor/bg0.png
11
-PNG_MET_SKY    := assets/meteor/bg1.png
12
-PNG_MET_FG     := assets/meteor/bg2.png
13
-PNG_MET_CLOUDS := assets/meteor/clouds.png
14
-PNG_MET_METEOR := assets/meteor/oam.png
15
-PNG_AS_T       := assets/render/ascii.png
16
-
17
-C_MET_BG     := src/assets/meteor/met_background.c
18
-C_MET_SKY    := src/assets/meteor/met_sky.c
19
-C_MET_FG     := src/assets/meteor/met_foreground.c
20
-C_MET_CLOUDS := src/assets/meteor/met_clouds.c
21
-C_MET_METEOR := src/assets/meteor/met_meteor.c
22
-C_AS_T       := src/include/assets/ascii.c
23
-
24
-PNG_MUG_00    := assets/mug/mug_00.png
25
-PNG_MUG_01    := assets/mug/mug_01.png
26
-PNG_MUG_02    := assets/mug/mug_02.png
27
-PNG_MUG_05    := assets/mug/mug_05.png
28
-PNG_MUG_06    := assets/mug/mug_06.png
29
-PNG_MUG_07    := assets/mug/mug_07.png
30
-PNG_MUG_08    := assets/mug/mug_08.png
31
-PNG_MUG_09    := assets/mug/mug_09.png
32
-PNG_MUG_10   := assets/mug/mug_10.png
33
-PNG_MUG_11   := assets/mug/mug_11.png
34
-
35
-C_MUG_00      := src/include/assets/mug/mug_00.c
36
-C_MUG_01      := src/include/assets/mug/mug_01.c
37
-C_MUG_02      := src/include/assets/mug/mug_02.c
38
-C_MUG_05      := src/include/assets/mug/mug_05.c
39
-C_MUG_06      := src/include/assets/mug/mug_06.c
40
-C_MUG_07      := src/include/assets/mug/mug_07.c
41
-C_MUG_08      := src/include/assets/mug/mug_08.c
42
-C_MUG_09      := src/include/assets/mug/mug_09.c
43
-C_MUG_10      := src/include/assets/mug/mug_10.c
44
-C_MUG_11      := src/include/assets/mug/mug_11.c
45
-
46
-PNG_EMOT      := assets/interface/emoticons.png
47
-PNG_TB        := assets/interface/text_box.png
48
-PNG_MB        := assets/interface/menu_box.png
49
-PNG_ARR       := assets/interface/arrows.png
50
-
51
-B_EMOT        := src/include/assets/interface/emoticons.img.bin
52
-B_TB          := src/include/assets/interface/text_box.img.bin
53
-B_MB          := src/include/assets/interface/menu_box.img.bin
54
-B_ARR         := src/include/assets/interface/arrows.img.bin
55
-
56
-.PHONY: all
57
-all: $(C_MET_BG) $(C_MET_SKY) $(C_MET_FG) $(C_MET_CLOUDS) $(C_MET_METEOR) $(C_AS_T) $(C_MUG_00) $(C_MUG_01) $(C_MUG_02) $(C_MUG_05) $(C_MUG_06) $(C_MUG_07) $(C_MUG_08) $(C_MUG_09) $(C_MUG_10) $(C_MUG_11) $(B_EMOT) $(B_TB) $(B_MB) $(B_ARR)
58
-
59
-
60
-
61
-# generate object files
62
-#$(O_MET_BG): $(C_MET_BG)
63
-#	$(CC) $(CFLAGS) -c -o $@ $<
64
-#
65
-#$(O_MET_SKY): $(C_MET_SKY)
66
-#	$(CC) $(CFLAGS) -c -o $@ $<
67
-#
68
-#$(O_MET_FG): $(C_MET_FG)
69
-#	$(CC) $(CFLAGS) -c -o $@ $<
70
-#
71
-#$(O_MET_CLOUDS): $(C_MET_CLOUDS)
72
-#	$(CC) $(CFLAGS) -c -o $@ $<
73
-#
74
-#$(O_MET_METEOR): $(C_MET_METEOR)
75
-#	$(CC) $(CFLAGS) -c -o $@ $<
76
-
77
-# generate C files
78
-$(C_MET_BG): $(PNG_MET_BG)
79
-	$(GRIT) $< -gu32 -gT00FF00 -gzl -gB 4 -gt -m -mu16 -mzl -mp0 -mRtpf -p -pu16 -pzl -ftc -o $@
80
-
81
-$(C_MET_SKY): $(PNG_MET_SKY)
82
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp1 -mRtpf -p -pu16 -pzl -ftc -o $@
83
-
84
-$(C_MET_FG): $(PNG_MET_FG)
85
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp3 -mRtpf -p -pu16 -pzl -ftc -o $@
86
-
87
-$(C_MET_CLOUDS): $(PNG_MET_CLOUDS)
88
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp2 -mRtpf -p -pu16 -pzl -ftc -o $@
89
-
90
-$(C_MET_METEOR): $(PNG_MET_METEOR)
91
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -ftc -o $@
92
-
93
-$(C_AS_T): $(PNG_AS_T)
94
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
95
-
96
-$(C_MUG_00): $(PNG_MUG_00)
97
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
98
-
99
-$(C_MUG_01): $(PNG_MUG_01)
100
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
101
-
102
-$(C_MUG_02): $(PNG_MUG_02)
103
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
104
-
105
-$(C_MUG_05): $(PNG_MUG_05)
106
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
107
-
108
-$(C_MUG_06): $(PNG_MUG_06)
109
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
110
-
111
-$(C_MUG_07): $(PNG_MUG_07)
112
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
113
-
114
-$(C_MUG_08): $(PNG_MUG_08)
115
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
116
-
117
-$(C_MUG_09): $(PNG_MUG_09)
118
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
119
-
120
-$(C_MUG_10): $(PNG_MUG_10)
121
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
122
-
123
-$(C_MUG_11): $(PNG_MUG_11)
124
-	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
125
-
126
-$(B_EMOT): $(PNG_EMOT)
127
-	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
128
-
129
-$(B_TB): $(PNG_TB)
130
-	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
131
-
132
-$(B_MB): $(PNG_MB)
133
-	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
134
-
135
-$(B_ARR): $(PNG_ARR)
1
+GRIT := grit
2
+CC   := arm-none-eabi-gcc
3
+AR   := arm-none-eabi-ar
4
+
5
+CFLAGS := -mthumb -mno-thumb-interwork -mcpu=arm7tdmi -mlong-calls -march=armv4t -O3 -std=c99
6
+
7
+ASSET_ROOT := sots-private/assets
8
+GFX_BUILD := gfx_build
9
+
10
+PNG_MET_BG     := assets/meteor/bg0.png
11
+PNG_MET_SKY    := assets/meteor/bg1.png
12
+PNG_MET_FG     := assets/meteor/bg2.png
13
+PNG_MET_CLOUDS := assets/meteor/clouds.png
14
+PNG_MET_METEOR := assets/meteor/oam.png
15
+PNG_AS_T       := assets/render/ascii.png
16
+
17
+C_MET_BG     := src/assets/meteor/met_background.c
18
+C_MET_SKY    := src/assets/meteor/met_sky.c
19
+C_MET_FG     := src/assets/meteor/met_foreground.c
20
+C_MET_CLOUDS := src/assets/meteor/met_clouds.c
21
+C_MET_METEOR := src/assets/meteor/met_meteor.c
22
+C_AS_T       := src/include/assets/ascii.c
23
+
24
+PNG_MUG_00    := assets/mug/mug_00.png
25
+PNG_MUG_01    := assets/mug/mug_01.png
26
+PNG_MUG_02    := assets/mug/mug_02.png
27
+PNG_MUG_03    := assets/mug/mug_03.png
28
+PNG_MUG_04    := assets/mug/mug_04.png
29
+PNG_MUG_05    := assets/mug/mug_05.png
30
+PNG_MUG_06    := assets/mug/mug_06.png
31
+PNG_MUG_07    := assets/mug/mug_07.png
32
+PNG_MUG_08    := assets/mug/mug_08.png
33
+
34
+C_MUG_00      := src/include/assets/mug/mug_00.c
35
+C_MUG_01      := src/include/assets/mug/mug_01.c
36
+C_MUG_02      := src/include/assets/mug/mug_02.c
37
+C_MUG_03      := src/include/assets/mug/mug_03.c
38
+C_MUG_04      := src/include/assets/mug/mug_04.c
39
+C_MUG_05      := src/include/assets/mug/mug_05.c
40
+C_MUG_06      := src/include/assets/mug/mug_06.c
41
+C_MUG_07      := src/include/assets/mug/mug_07.c
42
+C_MUG_08      := src/include/assets/mug/mug_08.c
43
+
44
+PNG_EMOT      := assets/interface/emoticons.png
45
+PNG_TB        := assets/interface/text_box.png
46
+PNG_MB        := assets/interface/menu_box.png
47
+PNG_ARR       := assets/interface/arrows.png
48
+
49
+B_EMOT        := src/include/assets/interface/emoticons.img.bin
50
+B_TB          := src/include/assets/interface/text_box.img.bin
51
+B_MB          := src/include/assets/interface/menu_box.img.bin
52
+B_ARR         := src/include/assets/interface/arrows.img.bin
53
+
54
+.PHONY: all
55
+all: $(C_MET_BG) $(C_MET_SKY) $(C_MET_FG) $(C_MET_CLOUDS) $(C_MET_METEOR) $(C_AS_T) $(C_MUG_00) $(C_MUG_01) $(C_MUG_02) $(C_MUG_03) $(C_MUG_04) $(C_MUG_05) $(C_MUG_06) $(C_MUG_07) $(C_MUG_08) $(B_EMOT) $(B_TB) $(B_MB) $(B_ARR)
56
+
57
+
58
+# generate object files
59
+#$(O_MET_BG): $(C_MET_BG)
60
+#	$(CC) $(CFLAGS) -c -o $@ $<
61
+#
62
+#$(O_MET_SKY): $(C_MET_SKY)
63
+#	$(CC) $(CFLAGS) -c -o $@ $<
64
+#
65
+#$(O_MET_FG): $(C_MET_FG)
66
+#	$(CC) $(CFLAGS) -c -o $@ $<
67
+#
68
+#$(O_MET_CLOUDS): $(C_MET_CLOUDS)
69
+#	$(CC) $(CFLAGS) -c -o $@ $<
70
+#
71
+#$(O_MET_METEOR): $(C_MET_METEOR)
72
+#	$(CC) $(CFLAGS) -c -o $@ $<
73
+
74
+# generate C files
75
+$(C_MET_BG): $(PNG_MET_BG)
76
+	$(GRIT) $< -gu32 -gT00FF00 -gzl -gB 4 -gt -m -mu16 -mzl -mp0 -mRtpf -p -pu16 -pzl -ftc -o $@
77
+
78
+$(C_MET_SKY): $(PNG_MET_SKY)
79
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp1 -mRtpf -p -pu16 -pzl -ftc -o $@
80
+
81
+$(C_MET_FG): $(PNG_MET_FG)
82
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp3 -mRtpf -p -pu16 -pzl -ftc -o $@
83
+
84
+$(C_MET_CLOUDS): $(PNG_MET_CLOUDS)
85
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -m -mu16 -mzl -mp2 -mRtpf -p -pu16 -pzl -ftc -o $@
86
+
87
+$(C_MET_METEOR): $(PNG_MET_METEOR)
88
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -ftc -o $@
89
+
90
+$(C_AS_T): $(PNG_AS_T)
91
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
92
+
93
+$(C_MUG_00): $(PNG_MUG_00)
94
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
95
+
96
+$(C_MUG_01): $(PNG_MUG_01)
97
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
98
+
99
+$(C_MUG_02): $(PNG_MUG_02)
100
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
101
+
102
+$(C_MUG_03): $(PNG_MUG_03)
103
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
104
+
105
+$(C_MUG_04): $(PNG_MUG_04)
106
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
107
+
108
+$(C_MUG_05): $(PNG_MUG_05)
109
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
110
+
111
+$(C_MUG_06): $(PNG_MUG_06)
112
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
113
+
114
+$(C_MUG_07): $(PNG_MUG_07)
115
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
116
+
117
+$(C_MUG_08): $(PNG_MUG_08)
118
+	$(GRIT) $< -gu32 -gzl -gB 4 -gt -p -pu16 -pz! -m! -ftc -o $@
119
+
120
+
121
+$(B_EMOT): $(PNG_EMOT)
122
+	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
123
+
124
+$(B_TB): $(PNG_TB)
125
+	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
126
+
127
+$(B_MB): $(PNG_MB)
128
+	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@
129
+
130
+$(B_ARR): $(PNG_ARR)
136 131
 	$(GRIT) $< -gu32 -gz! -gB 4 -gt -p! -m! -ftb -o $@

+ 4
- 2
src/include/sound.h View File

@@ -40,13 +40,15 @@ typedef struct music_player_area music_player_area;
40 40
 typedef struct music_player_track music_player_track;
41 41
 typedef struct song_header song_header;
42 42
 
43
-typedef struct {
43
+typedef struct
44
+{
44 45
     music_player_area *ma;
45 46
     music_player_track *ta;
46 47
     u32 tn;
47 48
 } m_play_table;
48 49
 
49
-typedef struct {
50
+typedef struct
51
+{
50 52
     song_header *so;
51 53
     u16 ms, me;
52 54
 } song_table;

+ 2
- 2
src/overworld/grass_animation.c View File

@@ -27,9 +27,9 @@ void grass_step_elastic(struct npc_state *npc)
27 27
     current_oe_state.local_id_and_mapnumber = (npc->local_id << 8) | (npc->local_mapnumber);
28 28
     current_oe_state.local_mapbank = npc->local_mapbank;
29 29
     current_oe_state.sav1_location = (((sav_one->location.map) << 8) | sav_one->location.bank);
30
-    current_oe_state.field_1C = 0;
30
+    current_oe_state.field_1C = 1;
31 31
 
32 32
     /* use variable to determine the oe animation to play */
33 33
 
34
-    (void)oe_exec(4);
34
+    (void)oe_exec(0x3A);
35 35
 }