ソースを参照

tileset animations begin

SBird1337 6 年 前
コミット
3d9e712488
共有5 個のファイルを変更した16 個の追加9 個の削除を含む
  1. 1
    1
      battle_engine
  2. 1
    1
      g3headers
  3. 4
    3
      makefile
  4. 1
    1
      sots-private
  5. 9
    3
      src/overworld/tileset_animation/main_animator.c

+ 1
- 1
battle_engine

@@ -1 +1 @@
1
-Subproject commit 991e2793854c10885382ad325c55ad42a0585f61
1
+Subproject commit 6d4c025273b357e9f820516bc27f385ca13c3d5b

+ 1
- 1
g3headers

@@ -1 +1 @@
1
-Subproject commit 1c9d6f8cdaaf7482b2f03b8e90d911303c251375
1
+Subproject commit 8d64b390cbaf2e1fc9a09fbf0edb339847954332

+ 4
- 3
makefile ファイルの表示

@@ -18,6 +18,7 @@ PYMAPS	:= $(PYTHON_BIN) ../tools/v_tools/pymap2s.py
18 18
 PYSETS	:= $(PYTHON_BIN) ../tools/v_tools/pyset2s.py
19 19
 
20 20
 export PATH := $(realpath ../tools):$(PATH)
21
+export GCC_COLORS := error=01;31:warning=01;35:note=01;36:range1=32:range2=34:locus=01:quote=01:fixit-insert=32:fixit-delete=31:diff-filename=01:diff-hunk=32:diff-delete=31:diff-insert=32
21 22
 
22 23
 PAGB_MAIN := g3headers
23 24
 PAGB_INCLUDE := $(PAGB_MAIN)/build/include
@@ -29,7 +30,7 @@ CHARMAP := charmap.txt
29 30
 
30 31
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0 -DLAN_DE
31 32
 ASFLAGS   := -mthumb
32
-CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fdiagnostics-show-option -mlong-calls -march=armv4t -Og -std=c11 -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -Igenerated_image -fdiagnostics-color $(DEFINES)
33
+CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fdiagnostics-show-option -mlong-calls -march=armv4t -Og -std=c11 -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -Igenerated_image -fdiagnostics-color=always $(DEFINES)
33 34
 GRITFLAGS := -ftc -fa
34 35
 LDFLAGS   := -z muldefs
35 36
 BLDPATH   := object
@@ -142,7 +143,7 @@ rom: main.asm $(MAIN_OBJ)
142 143
 	@echo "*** SUCCESSFULLY BUILT PROJECT ***"
143 144
 	@echo "*** REMOVING INTERMEDIATE FILES ***"
144 145
 	
145
-$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) $()#$(B_ENGINE)
146
+$(MAIN_OBJ): $(ALL_OBJ) $(ICONS_AR) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) #$(B_ENGINE)
146 147
 	$(MAKE) -f assets.makefile
147 148
 	@echo -e "\e[1;32mLinking ELF binary $@\e[0m"
148 149
 	@echo "INPUT($^)" > $(TMP_LD)
@@ -155,7 +156,7 @@ $(MAP_PROJ_S): $(MAP_PROJ)
155 156
 
156 157
 .PHONY: $(B_ENGINE)
157 158
 $(B_ENGINE):
158
-	$(MAKE) -C battle_engine build/linked.o
159
+	$(MAKE) -C battle_engine build/linked.o PAGB_INCLUDE=../$(PAGB_MAIN)/build
159 160
 
160 161
 .PHONY: cleansrcdatascript
161 162
 cleansrcdatascript:

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit dfea70a8db81df4268df3a91cdf0d8619c2b2afb
1
+Subproject commit b6e8c0cbbc187ba843d7d08e56bb59baf4209ff4

+ 9
- 3
src/overworld/tileset_animation/main_animator.c ファイルの表示

@@ -1,6 +1,8 @@
1 1
 #include <pokeagb/pokeagb.h>
2 2
 #include <tileset_animation/smoke.h>
3
-
3
+#include <tileset_animation/water_stone.h>
4
+#include <tileset_animation/flowers_mag.h>
5
+#include <tileset_animation/flowers_ora.h>
4 6
 struct TilesetAnimation {
5 7
     u16 tile_start;
6 8
     u16 frame_length;
@@ -10,7 +12,10 @@ struct TilesetAnimation {
10 12
 };
11 13
 
12 14
 const struct TilesetAnimation hesperia_second_animations[] = {
13
-    {.tile_start = 0x114, .frame_length = 7, .tile_length = 4, .frame_count = 5, .image = smokeTiles},
15
+    {.tile_start = 0x10C, .frame_length = 14, .tile_length = 4, .frame_count = 10, .image = flowers_magTiles},
16
+    {.tile_start = 0x110, .frame_length = 14, .tile_length = 4, .frame_count = 15, .image = flowers_oraTiles},
17
+    {.tile_start = 0x114, .frame_length = 7, .tile_length = 4, .frame_count = 8, .image = smokeTiles},
18
+    {.tile_start = 0x13C, .frame_length = 7, .tile_length = 4, .frame_count = 4, .image = water_stoneTiles},
14 19
     {.tile_start = 0, .frame_length = 0, .tile_length = 0, .frame_count = 0, .image = (void *)0xFFFFFFFF},
15 20
 };
16 21
 
@@ -22,6 +27,7 @@ void animate_from_structure(const struct TilesetAnimation *anim, u16 tile_skip,
22 27
         u16 max_frame = anim[current_animation].frame_length * anim[current_animation].frame_count;
23 28
         u16 used_frame = current_frame % max_frame;
24 29
         used_frame /= anim[current_animation].frame_length;
30
+        dprintf("using tile %d.\n",used_frame);
25 31
         memcpy(current_vram, anim[current_animation].image + (0x20 * anim[current_animation].tile_length * used_frame),
26 32
                anim[current_animation].tile_length * 0x20);
27 33
         current_animation++;
@@ -45,6 +51,6 @@ void main_animator_init(void) {
45 51
 
46 52
 void main_second_animator_init(void) {
47 53
     blockset_two_current_frame = 0;
48
-    blockset_two_max_frame = 0x100;
54
+    blockset_two_max_frame = 0x3C0;
49 55
     blockset_two_animator = main_second_animator;
50 56
 }