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:
co-authored by
Claude Opus 5.5
parent
5bc5a01087
commit
4d91f80bae
+24
-24
@@ -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)
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ For unit tests only. The app does not read these two files at run time, and the
|
||||
|
||||
## Background
|
||||
|
||||
The skill buttons on the right need to show "which skill this button is bound to right now". In the memory of the running game this information is two tables, which the shell fetches read-only and then parses (`../../../Sources/dm_touch_game_bridge.c` does the fetching, and `dm_tg_parse` in `../../../Sources/dm_touch_game_state.c` does the parsing):
|
||||
The skill buttons on the right need to show "which skill this button is bound to right now". In the memory of the running game this information is two tables, which the shell fetches read-only and then parses (`../../../../touch/dm_touch_game_bridge.c` does the fetching, and `dm_tg_parse` in `../../../../touch/dm_touch_game_state.c` does the parsing):
|
||||
|
||||
- **Button mapping table**: for each of the six gamepad buttons (B, A, Y, X, R, ZR), which normal skill slot and which alternate skill slot it corresponds to. The alternate slots are the set used while ZL is held.
|
||||
- **Binding table**: the skill ID bound in each skill slot; an empty slot is `0xFFFFFFFF`.
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ English: [README.md](README.md)
|
||||
|
||||
## 背景
|
||||
|
||||
右侧技能钮上要显示「这个键现在绑着哪个技能」。这份信息在运行中的游戏内存里是两张表,外壳只读地取出来再解析(`../../../Sources/dm_touch_game_bridge.c` 负责取,`../../../Sources/dm_touch_game_state.c` 的 `dm_tg_parse` 负责解析):
|
||||
右侧技能钮上要显示「这个键现在绑着哪个技能」。这份信息在运行中的游戏内存里是两张表,外壳只读地取出来再解析(`../../../../touch/dm_touch_game_bridge.c` 负责取,`../../../../touch/dm_touch_game_state.c` 的 `dm_tg_parse` 负责解析):
|
||||
|
||||
- **键位表**:六个手柄键(B、A、Y、X、R、ZR)各对应哪个普通技能槽、哪个替代技能槽。替代槽是按住 ZL 时用的那一套。
|
||||
- **绑定表**:每个技能槽里绑着的技能编号,空槽是 `0xFFFFFFFF`。
|
||||
|
||||
@@ -13,7 +13,7 @@ try:
|
||||
# They guarded how the implementation is written, not behavior: who draws the bottom bar is guarded by the UI screenshots of the full regression table, and the touch-to-game protocol behavior is guarded by the C unit tests in this directory (t_native_binding / t_game_bridge / t_native_hud_bridge etc.) - deleted, not chasing the source text with edits.
|
||||
# What remains is data consistency: the three hash constants compiled into the program, the manifest, the 12 textures and the two skill tables match the actual files.
|
||||
manifest=json.loads((IOS/'Sources/TouchArt/native_art_manifest.json').read_text())
|
||||
compiled=(IOS/'Sources/dm_touch_native_art.c').read_text()
|
||||
compiled=(IOS.parent/'touch'/'dm_touch_native_art.c').read_text()
|
||||
for name,target in [('dm_ta_manifest_sha',IOS/'Sources/TouchArt/native_art_manifest.json'),
|
||||
('dm_ta_geometry_sha',IOS/'docs/native_art_v1_geometry.json'),
|
||||
('dm_ta_binding_sha',IOS/'docs/touch_layout_spec_native_binding_v5.json')]:
|
||||
|
||||
@@ -18,5 +18,5 @@ previous4=root/'docs/touch_layout_spec_native_binding_v4.json'
|
||||
assert hashlib.sha256(previous4.read_bytes()).hexdigest()=='048ee8bfffa348d6a6829feb394ce723ad6acf892447d051eb7073b863a32d2f'
|
||||
new=root/'docs/touch_layout_spec_native_binding_v5.json'
|
||||
data=json.loads(new.read_text());assert data['profile_id']=='touch_native_binding_v5'
|
||||
assert hashlib.sha256(new.read_bytes()).hexdigest() in (root/'Sources/dm_touch_native_art.c').read_text()
|
||||
assert hashlib.sha256(new.read_bytes()).hexdigest() in (root.parent/'touch'/'dm_touch_native_art.c').read_text()
|
||||
print('PASS frozen v1/v2/v3/v4 spec hashes; v5 profile/spec hash matches compiled constant')
|
||||
|
||||
@@ -13,5 +13,5 @@ assert '@"touch_native_binding_v5"' in m
|
||||
assert 's->map_cancel_active' in m and '@"right_aim"' in m
|
||||
d=ios/'docs/touch_layout_spec_native_binding_v5.json'
|
||||
assert json.loads(d.read_text())['profile_id']=='touch_native_binding_v5'
|
||||
assert hashlib.sha256(d.read_bytes()).hexdigest() in (ios/'Sources/dm_touch_native_art.c').read_text()
|
||||
assert hashlib.sha256(d.read_bytes()).hexdigest() in (ios.parent/'touch'/'dm_touch_native_art.c').read_text()
|
||||
print('PASS v5 source seam: full five-axis publish; real rx/ry receipts; navigation/cancel metadata; v5 spec SHA; runtime/phone UNRUN')
|
||||
|
||||
Reference in New Issue
Block a user