Android port (Adreno): Vulkan backend, GameActivity app, touch HUD, lifecycle, minimap quest goals

- host/android: Vulkan replay backend (nvn_vk.c) with pipeline/descriptor caching, ADPF,
  AChoreographer present link; Linux compat layer; Makefile.android (headless dmhost + APK lib)
- android/app: GameActivity shell without Gradle (build_apk.sh), AAudio output, touch HUD port
  (touch_app.c + TouchOverlay.java, three layers: body / joystick / minimap goals),
  lifecycle save-on-background like iOS, art_from_ipa.py for touch / HUD / mapgoal art
- touch: shared touch controls moved from ios/Sources to dm/touch
- patch_nso.py Android ruleset, dmsh_vk.py shader pack, DM_TOUCH_PRODUCT defaults
- hle_audio: AAudio resume waits through STARTING and reopens once on failure
- .gitignore: local resources/ (original game data) never committed

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-10-14 14:55:05 +09:00
co-authored by Claude Opus 5.5
parent 5bc5a01087
commit 4d91f80bae
106 changed files with 7009 additions and 181 deletions
+24 -24
View File
@@ -13,35 +13,35 @@ fixture_test = $(if $(HAVE_BINDING_FIXTURES),./$(1) $(BINDING_FIXTURES),@echo "
.PHONY: all run test clean
all: $(TARGET) $(BINDING_TARGETS) t_native_art t_skill_aim t_joy_travel $(METAL_CACHE_TARGET)
run: test
$(TARGET): t_touch_controls.c $(wildcard ../Sources/dm_touch_controls.[ch]) ../../host/dm_input.h
$(CC) $(CFLAGS) -I../Sources t_touch_controls.c ../Sources/dm_touch_controls.c -lm -o $@
t_native_binding: t_native_binding.c ../Sources/dm_touch_game_state.c ../Sources/dm_touch_game_state.h ../Sources/dm_touch_controls.c ../Sources/dm_touch_controls.h
$(CC) $(CFLAGS) -I../Sources t_native_binding.c ../Sources/dm_touch_game_state.c ../Sources/dm_touch_controls.c -lm -o $@
t_game_bridge: t_game_bridge.c ../Sources/dm_touch_game_bridge.c ../Sources/dm_touch_game_identity.c ../Sources/dm_touch_game_identity.h ../Sources/dm_touch_game_state.c ../Sources/dm_touch_game_state.h ../../host/dm.h
$(CC) $(CFLAGS) -DDM_TG_TEST_SYNTHETIC_IDENTITY -I../Sources t_game_bridge.c ../Sources/dm_touch_game_bridge.c ../Sources/dm_touch_game_identity.c ../Sources/dm_touch_game_state.c -lpthread -o $@
t_binding_freshness: t_binding_freshness.c ../Sources/dm_touch_game_state.c ../Sources/dm_touch_game_state.h ../Sources/dm_touch_controls.c ../Sources/dm_touch_controls.h
$(CC) $(CFLAGS) -I../Sources t_binding_freshness.c ../Sources/dm_touch_game_state.c ../Sources/dm_touch_controls.c -lm -o $@
t_portal_sequence: t_portal_sequence.c ../Sources/dm_touch_controls.c ../Sources/dm_touch_controls.h
$(CC) $(CFLAGS) -I../Sources t_portal_sequence.c ../Sources/dm_touch_controls.c -lm -o $@
t_binding_group: t_binding_group.c ../Sources/dm_touch_game_state.c ../Sources/dm_touch_game_state.h
$(CC) $(CFLAGS) -I../Sources t_binding_group.c ../Sources/dm_touch_game_state.c -o $@
t_native_hud_identity: t_native_hud_identity.c ../Sources/dm_touch_game_identity.c ../Sources/dm_touch_game_identity.h ../Sources/dm_touch_game_state.h
$(CC) $(CFLAGS) -I../Sources t_native_hud_identity.c ../Sources/dm_touch_game_identity.c -o $@
t_native_hud_bridge: t_native_hud_bridge.c ../Sources/dm_touch_game_bridge.c ../Sources/dm_touch_game_identity.c ../Sources/dm_touch_game_identity.h ../Sources/dm_touch_game_state.c ../Sources/dm_touch_game_state.h ../../host/dm.h
$(CC) $(CFLAGS) -I../Sources t_native_hud_bridge.c ../Sources/dm_touch_game_bridge.c ../Sources/dm_touch_game_identity.c ../Sources/dm_touch_game_state.c -lpthread -o $@
$(TARGET): t_touch_controls.c $(wildcard ../../touch/dm_touch_controls.[ch]) ../../host/dm_input.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_touch_controls.c ../../touch/dm_touch_controls.c -lm -o $@
t_native_binding: t_native_binding.c ../../touch/dm_touch_game_state.c ../../touch/dm_touch_game_state.h ../../touch/dm_touch_controls.c ../../touch/dm_touch_controls.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_native_binding.c ../../touch/dm_touch_game_state.c ../../touch/dm_touch_controls.c -lm -o $@
t_game_bridge: t_game_bridge.c ../../touch/dm_touch_game_bridge.c ../../touch/dm_touch_game_identity.c ../../touch/dm_touch_game_identity.h ../../touch/dm_touch_game_state.c ../../touch/dm_touch_game_state.h ../../host/dm.h
$(CC) $(CFLAGS) -DDM_TG_TEST_SYNTHETIC_IDENTITY -I../../touch -I../Sources t_game_bridge.c ../../touch/dm_touch_game_bridge.c ../../touch/dm_touch_game_identity.c ../../touch/dm_touch_game_state.c -lpthread -o $@
t_binding_freshness: t_binding_freshness.c ../../touch/dm_touch_game_state.c ../../touch/dm_touch_game_state.h ../../touch/dm_touch_controls.c ../../touch/dm_touch_controls.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_binding_freshness.c ../../touch/dm_touch_game_state.c ../../touch/dm_touch_controls.c -lm -o $@
t_portal_sequence: t_portal_sequence.c ../../touch/dm_touch_controls.c ../../touch/dm_touch_controls.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_portal_sequence.c ../../touch/dm_touch_controls.c -lm -o $@
t_binding_group: t_binding_group.c ../../touch/dm_touch_game_state.c ../../touch/dm_touch_game_state.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_binding_group.c ../../touch/dm_touch_game_state.c -o $@
t_native_hud_identity: t_native_hud_identity.c ../../touch/dm_touch_game_identity.c ../../touch/dm_touch_game_identity.h ../../touch/dm_touch_game_state.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_native_hud_identity.c ../../touch/dm_touch_game_identity.c -o $@
t_native_hud_bridge: t_native_hud_bridge.c ../../touch/dm_touch_game_bridge.c ../../touch/dm_touch_game_identity.c ../../touch/dm_touch_game_identity.h ../../touch/dm_touch_game_state.c ../../touch/dm_touch_game_state.h ../../host/dm.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_native_hud_bridge.c ../../touch/dm_touch_game_bridge.c ../../touch/dm_touch_game_identity.c ../../touch/dm_touch_game_state.c -lpthread -o $@
# 技能图集 / 技能索引由原版表生成、不进仓库(tools/native_art/generate.py;dm/README.md「从你的游戏文件生成资源」)
# The skill atlas / skill index are generated from the original game's tables and are not kept in the repository (tools/native_art/generate.py; dm/README.md 「从你的游戏文件生成资源」(Generating assets from your game files))
ROMFS?=$(or $(DM_ROMFS_SRC),$(DM_ROOT)/data/switch/3.3.94012/Update/RomFS)
../Sources/dm_touch_native_art.c: ../tools/native_art/generate.py ../tools/native_art/implementation.c.inc ../Sources/TouchArt/native_art_manifest.json
../../touch/dm_touch_native_art.c: ../tools/native_art/generate.py ../tools/native_art/implementation.c.inc ../Sources/TouchArt/native_art_manifest.json
python3 ../tools/native_art/generate.py "$(ROMFS)"
t_native_art: t_native_art.c ../Sources/dm_touch_native_art.c ../Sources/dm_touch_native_art.h
$(CC) $(CFLAGS) -I../Sources t_native_art.c ../Sources/dm_touch_native_art.c -o $@
t_skill_aim: t_skill_aim.c ../Sources/dm_touch_controls.c ../Sources/dm_touch_controls.h ../../host/dm_input.h
$(CC) $(CFLAGS) -I../Sources t_skill_aim.c ../Sources/dm_touch_controls.c -lm -o $@
t_joy_travel: t_joy_travel.c ../Sources/dm_touch_controls.c ../Sources/dm_touch_controls.h ../../host/dm_input.h
$(CC) $(CFLAGS) -I../Sources t_joy_travel.c ../Sources/dm_touch_controls.c -lm -o $@
t_native_art: t_native_art.c ../../touch/dm_touch_native_art.c ../../touch/dm_touch_native_art.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_native_art.c ../../touch/dm_touch_native_art.c -o $@
t_skill_aim: t_skill_aim.c ../../touch/dm_touch_controls.c ../../touch/dm_touch_controls.h ../../host/dm_input.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_skill_aim.c ../../touch/dm_touch_controls.c -lm -o $@
t_joy_travel: t_joy_travel.c ../../touch/dm_touch_controls.c ../../touch/dm_touch_controls.h ../../host/dm_input.h
$(CC) $(CFLAGS) -I../../touch -I../Sources t_joy_travel.c ../../touch/dm_touch_controls.c -lm -o $@
t_metal_cache_guard: t_metal_cache_guard.c ../Sources/dm_metal_cache_guard.c ../Sources/dm_metal_cache_guard.h
$(CC) $(CFLAGS) -I../Sources t_metal_cache_guard.c ../Sources/dm_metal_cache_guard.c -o $@
$(CC) $(CFLAGS) -I../../touch -I../Sources t_metal_cache_guard.c ../Sources/dm_metal_cache_guard.c -o $@
test: $(TARGET) $(BINDING_TARGETS) t_native_art t_skill_aim t_joy_travel $(METAL_CACHE_TARGET)
./$(METAL_CACHE_TARGET)
./$(TARGET)