Greater Rift: confirm before the next-level door (#25), robust return to a finished run, top bar capped at level 100 (#29), monster life clamp; Mac: close X on the rift page
The top-bar fix (#29) was reported and diagnosed by Joe Hu, who also sent a fix along the same lines (#30). Co-authored-by: Joe Hu <12777592+hubeiqiao@users.noreply.github.com>
This commit is contained in:
@@ -197,6 +197,10 @@ static const struct { const char *k, *zh, *en; } k_dm_i18n[] = {
|
||||
{ "dmRiftSayLate", "超时未过关", "Level not cleared" },
|
||||
{ "dmRiftSayDoneNext", "本层完成,下一层之门已开启", "Rift complete! Portal opened" },
|
||||
{ "dmRiftSayDoneTown", "本层完成,回城之门已开启", "Complete! Town Portal open" },
|
||||
{ "dmRiftSayTopBoth", "最高层通关,重打与回城之门已开启", "Top level done! Portals opened" },
|
||||
{ "dmRiftSayTopNext", "最高层通关,重打之门已开启", "Top level done! Portal opened" },
|
||||
{ "dmRiftSayTopTown", "最高层通关,回城之门已开启", "Top level! Town Portal open" },
|
||||
{ "dmRiftSayTop", "最高层通关", "Top level cleared" },
|
||||
{ "dmRiftSayDone", "本层完成", "Rift complete" },
|
||||
{ "dmRiftSayErr", "秘境出错了,这次没开", "The Rift could not be opened" },
|
||||
{ "dmRiftSayStart", "第 %d 层开始,限时 15 分钟", "Level %d: 15 minute time limit" },
|
||||
@@ -215,6 +219,12 @@ static const struct { const char *k, *zh, *en; } k_dm_i18n[] = {
|
||||
{ "dmRiftCapVoidPad", "按住 X,本层放弃", "Hold X to quit level" },
|
||||
{ "dmRiftTitleDone", "本层已完成", "Rift Complete" },
|
||||
{ "dmRiftTitleLate", "超时未过关", "Time's Up" },
|
||||
{ "dmRiftTitleNext", "进入下一层?", "Next Level?" },
|
||||
{ "dmRiftTitleRetry", "重打这一层?", "Retry Level?" },
|
||||
{ "dmRiftLeaveWarn1", "会离开这一场", "Leave this Rift" },
|
||||
{ "dmRiftLeaveWarn2", "地上的东西不保留", "Drops are lost" },
|
||||
{ "dmRiftCapStay", "关闭本页:留在这里", "Close to stay here" },
|
||||
{ "dmRiftCapGo", "进入第 %d 层", "Enter Level %d" },
|
||||
{ "dmRiftTitleRun", "秘境进行中", "Rift in Progress" },
|
||||
{ "dmRiftGuardDown", "已击败守护者", "Guardian slain" },
|
||||
{ "dmRiftNextOpen", "下一层之门已开启", "Next portal open" },
|
||||
@@ -248,6 +258,7 @@ static const struct { const char *k, *zh, *en; } k_dm_i18n[] = {
|
||||
{ "dmRiftHudLate", "第 %d 层超时", "Level %d overtime" },
|
||||
{ "dmRiftHudGuard", "守护者现身", "Rift Guardian" },
|
||||
{ "dmRiftHudNext", "下次第 %d 层", "Next: Level %d" },
|
||||
{ "dmRiftHudTop", "已通关最高层", "Highest level cleared" },
|
||||
{ "dmRiftHudSame", "下次仍是这一层", "Next: same level" },
|
||||
{ "dmRiftHudKill", "击败守护者", "Slay the Rift Guardian" },
|
||||
{ "dmRiftHudGoal", "消灭秘境中的怪物 %d%%", "Slay the monsters %d%%" },
|
||||
|
||||
+68
-28
@@ -108,8 +108,8 @@ static struct {
|
||||
static struct { uint64_t G, player; uint32_t last_t; int eligible; uint32_t door, next_door, town_door, pend, pend_at; int door_tried, lv_prev, dead; int used[24], nused; int redir; int last_lv, last_x, last_y, nd_lv, nd_x, nd_y, tp_lv, tp_x, tp_y, resume, gift_due; uint32_t tp_until; } L; // used = 本局秘境用过的图(已生成过的关卡同一局里不会重新生成,下次不抽) // 本局 | used = maps used by the rift in this run (levels already generated are not regenerated in the same run, so they are not drawn next time) // This run
|
||||
// 选层页 / 继续放弃页(前端 dm_rift_menu.m 画,点按经下面的请求回到服务端拍里执行)
|
||||
// Level selection page / continue-abandon page (drawn by the front end dm_rift_menu.m; taps go back through the requests below to be executed in the server tick)
|
||||
enum { MENU_NONE, MENU_SELECT, MENU_CHOICE };
|
||||
static struct { _Atomic int menu, req_start, req_cont, req_abandon, clvl; } M;
|
||||
enum { MENU_NONE, MENU_SELECT, MENU_CHOICE, MENU_NEXT }; // MENU_NEXT:碰了守护者处「下一层」那扇门,先问一句(公开仓库 原先碰一下就开新一场,地上没捡的东西回不去) | MENU_NEXT: the "next level" door at the Guardian was touched; ask first (touching it used to start a new run at once, and uncollected items on the ground could no longer be reached)
|
||||
static struct { _Atomic int menu, req_start, req_cont, req_abandon, req_next, clvl; } M;
|
||||
|
||||
// 侧文件:<存档工作目录>/<角色名>/<角色名>.sw_rift(同刷怪积分牌的写法:写在工作目录、随存档提交)。一行一项,键在前:
|
||||
// tier N(下次进门打第 N 层)/ best N(通关过的最高层)/ clears N(通关次数);best / clears 只计 15 分钟内打倒守护者的(超时通关不算过关;旧文件里的数不回溯)/ deaths N(秘境里死亡次数)/
|
||||
@@ -278,16 +278,21 @@ int dm_rift_active(void) { return atomic_load(&K.st) == ST_RUN; }
|
||||
// ---- 界面读数(前端每帧)
|
||||
// 挑战计时一律读客体时钟 guest_ns()(hle_os.c):App 在后台 / 锁屏、系统键盘弹着的时候它不走,倒计时也就不走;
|
||||
// 回城、开面板、读取画面这些游戏照常运行的时间照常计入。开局时刻不落盘(侧文件里记的是用时秒数)。公开仓库
|
||||
// 本层完成后的下一层层号:限时内完成涨 K.inc 层(封顶 100),超时完成不涨。算下一层只有这一处——守护者处那扇门、结算日志、顶部进度条上的「下次第 N 层」都取它
|
||||
// (顶部条原先自己用 tier + inc 算、没封顶,100 层限时通关后写「下次第 103 层」,公开仓库)
|
||||
// ---- UI readouts (front end, every frame)
|
||||
// All challenge timing reads the guest clock guest_ns() (hle_os.c): it does not advance while the App is in the background / the screen is locked or while the system keyboard is up, so the countdown does not advance either;
|
||||
// time during which the game keeps running -- back in town, panels open, loading screens -- counts as usual. The start time is not written to disk (the sidecar file records elapsed seconds).
|
||||
// The challenge timer always reads the guest clock guest_ns() (hle_os.c): it does not advance while the App is in the background / the screen is locked / the system keyboard is up, so the countdown does not advance either;
|
||||
// time during which the game keeps running - in town, with a panel open, on the loading screen - counts as usual. The start moment is not persisted (the sidecar file records elapsed seconds).
|
||||
// The next level after this one is completed: completing within the time limit goes up K.inc levels (capped at 100), completing overtime does not go up. The next level is computed in this one place only - the door at the Guardian, the completion log and "next: level N" on the progress bar at the top all take it from here
|
||||
// (the top bar used to compute tier + inc by itself without the cap, and wrote "next: level 103" after a timed clear of level 100)
|
||||
static int next_tier(void) { int nt = K.inc ? K.tier + K.inc : K.tier; return nt > 100 ? 100 : nt; }
|
||||
static int g_left_done; // 结算时剩余秒数:打倒守护者后顶部条与面板都显示它,不再往下走 | Seconds left at completion: after the guardian is defeated both the top bar and the panel show it, and it no longer counts down
|
||||
int dm_rift_hud(dm_rift_hud_t *o) {
|
||||
int st = atomic_load(&K.st); if (st != ST_RUN && st != ST_DONE) return 0;
|
||||
uint64_t now = guest_ns();
|
||||
int el = K.t0_ns ? (int)((now - K.t0_ns) / 1000000000ull) : 0; int need = atomic_load(&K.need);
|
||||
o->tier = K.tier; o->progress = need > 0 ? (float)atomic_load(&K.score) / need : 0; if (o->progress > 1) o->progress = 1;
|
||||
o->secs_left = st == ST_DONE ? g_left_done : RIFT_SECS - el; o->done = st == ST_DONE; o->guardian = K.guard != 0 && !atomic_load(&K.guard_dead); o->inc = K.inc;
|
||||
o->secs_left = st == ST_DONE ? g_left_done : RIFT_SECS - el; o->done = st == ST_DONE; o->guardian = K.guard != 0 && !atomic_load(&K.guard_dead); o->inc = K.inc; o->next = next_tier();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -388,12 +393,19 @@ static _Atomic uint32_t g_mlhp[112]; // MonLvl 表的生命列(资料片地
|
||||
int dm_rift_tier_hp_x10(int tier, int clvl) { int p = tier < 8 ? tier : 8, l9 = dm_rift_tier_level(9, clvl); long long v = (long long)(p + 1) * 5; if (tier < 9) return (int)v;
|
||||
uint32_t h85 = atomic_load(&g_mlhp[85]), hl = l9 > 0 && l9 < 112 ? atomic_load(&g_mlhp[l9]) : 0; if (h85 && hl && hl > h85) v = v * hl / h85; return (int)(v * tier_total_x1000(tier, 0) / 1000); }
|
||||
static uint32_t monlvl(uint64_t G, int lvl, int grp) { uint64_t T = tables(G), a = rd(T + 0x1178), n = rd(T + 0x1180); if (!a || lvl < 0 || (uint64_t)lvl >= n) return 0; return *(uint32_t *)(uintptr_t)(a + (uint64_t)lvl * 0x78 + (grp * 6 + 5) * 4); } // 组 0 AC、2 HP、3 DM;资料片地狱列 | Group 0 AC, 2 HP, 3 DM; expansion Hell column
|
||||
// 生命上限的基础项最多能写到多少:属性上限是 0x7fffff00(8388607 点,×256 定点的 32 位有符号数上限),而游戏给的是合计 = 基础 × (合计 ÷ 基础)——
|
||||
// 单位带百分比生命加成时,基础写到上限、合计就溢出成负数、被读成 1 点(里随从回到 1 就是这么来的)。所以按现在的 合计 ÷ 基础 留出余量。
|
||||
// base / full = 此刻的基础项与合计(原始定点值);没有加成(合计不大于基础)或读不到基础项时就是属性上限本身
|
||||
// How high the base entry of maximum life may be written: the stat limit is 0x7fffff00 (8388607 points, the limit of a 32-bit signed number in x256 fixed point), while what the game presents is the total = base x (total / base) -
|
||||
// for a unit with a percentage life bonus, writing the base up to the limit makes the total overflow to a negative number, which is read as 1 point (this is how minions fell back to 1). So headroom is left according to the current total / base.
|
||||
// base / full = the base entry and the total at this moment (raw fixed-point values); with no bonus (total not greater than base) or when the base entry cannot be read, it is the stat limit itself
|
||||
static long long hp_base_limit(int base, int full) { return base > 0 && full > base ? 0x7fffff00LL * base / full : 0x7fffff00LL; }
|
||||
static void scale_monster(uint64_t G, uint64_t u, int lt, int l9) { // lt = 本层的等级(守护者 + 3)、l9 = 起算层的等级 | lt = this level's level (Guardian + 3), l9 = the baseline level's level
|
||||
int l0 = gs(u, 12); if (l0 <= 0) return; if (lt > lvl_cap()) lt = lvl_cap(); if (l9 > lt) l9 = lt;
|
||||
int tx = tier_total_x1000(K.tier, 0), lb = l0 > l9 ? l0 : l9, le = l0 > lt ? l0 : lt; // lb:「起算层那只怪」的等级;le:写进单位的等级(不降级) | lb: the level of "that monster at the baseline level"; le: the level written into the unit (never lowered)
|
||||
if (le == l0 && lb == l0 && tx == 1000) return; // 9 层、原生等级已不低于目标:什么都不用改 | level 9 and the native level is already no lower than the target: nothing to change
|
||||
uint32_t h0 = monlvl(G, l0, 2), hb = monlvl(G, lb, 2), d0 = monlvl(G, l0, 3), db = monlvl(G, lb, 3), a0 = monlvl(G, l0, 0), a1 = monlvl(G, le, 0); if (!h0 || !d0 || !a0) return;
|
||||
long long want = (long long)gs(u, 7) * hb / h0 * tx / 1000, hp = want; if (hp > 0x7fffff00LL) hp = 0x7fffff00LL; // 定点 ×256;原版上限 2²³ 点 | Fixed point ×256; the original cap is 2²³ points
|
||||
long long want = (long long)gs(u, 7) * hb / h0 * tx / 1000, hp = want, lim = hp_base_limit(gsb(u, 7), gs(u, 7)); if (hp > lim) hp = lim; // 定点 ×256;原版上限 2²³ 点,带百分比生命加成的怪按比例留余量(hp_base_limit) | fixed point x256; the original's limit is 2^23 points, and monsters with a percentage life bonus get proportional headroom (hp_base_limit)
|
||||
// 顶到上限不静默:这只怪(多半是守护者)的生命没按线涨足,只剩伤害在涨。每开一层记前 3 只
|
||||
// Hitting the cap is not silent: this monster (most likely the Guardian) did not get its full life according to the line, and only its damage keeps
|
||||
// growing. The first 3 are logged for each level opened
|
||||
@@ -509,7 +521,7 @@ static void pet_hp_pump(uint64_t G, uint64_t player, uint32_t t) {
|
||||
for (int i = 0; i < g_pfn; ) { if (g_pf[i].cls == cls && g_pf[i].base > cap) { g_pf[i] = g_pf[--g_pfn]; pf_dirty = 1; } else i++; } } }
|
||||
// 封顶按合计算:合计 = 基础 × (合计 ÷ 基础),合计不能过属性的上限(0x7fffff00 = 8388607 点;再大就溢出成负数,游戏读成 1 点)
|
||||
// The cap is computed on the total: total = base x (total / base), and the total must not exceed the stat's limit (0x7fffff00 = 8388607 points; any larger and it overflows to a negative number, which the game reads as 1 point)
|
||||
long long want = (long long)tb[k].base * mult / 1000, lim = full > cur ? 0x7fffff00LL * cur / full : 0x7fffff00LL; if (want > lim) want = lim;
|
||||
long long want = (long long)tb[k].base * mult / 1000, lim = hp_base_limit(cur, full); if (want > lim) want = lim;
|
||||
if ((int)want != cur) { int hp = gs(u, 6); long long nf = (long long)full * want / cur, nh = (long long)hp * want / cur; if (nh < 256) nh = 256; if (nh > nf) nh = nf; /* 当前生命同比例;nf = 写完后的合计 | current life in the same proportion; nf = the total after writing */
|
||||
ss(u, 7, (int)want); ss(u, 6, (int)nh);
|
||||
LOG("秘境:随从 id %u(宠物类型 %u,类号 %u)生命上限基础项 %d → %lld(基数 %d,第 %d 层 ×%d.%02d);合计 %d → %d", id, ty, cls, cur >> 8, want >> 8, tb[k].base >> 8, K.tier, mult / 1000, mult % 1000 / 10, full >> 8, gs(u, 7) >> 8); }
|
||||
@@ -909,14 +921,15 @@ static void milestone(uint64_t G, uint64_t player, int m) {
|
||||
static void finish(uint64_t G, uint64_t player, uint64_t guard) {
|
||||
uint64_t now = guest_ns();
|
||||
int left = RIFT_SECS - (int)((now - K.t0_ns) / 1000000000ull); g_left_done = left; // 结算这一拍停表 | Stop the clock on the completion tick
|
||||
K.inc = left >= 600 ? 3 : left >= 300 ? 2 : left > 0 ? 1 : 0; int next = K.tier + K.inc; if (next > 100) next = 100; if (!K.inc) next = K.tier;
|
||||
K.inc = left >= 600 ? 3 : left >= 300 ? 2 : left > 0 ? 1 : 0; int next = next_tier();
|
||||
if (K.inc) { R.clears++; if (K.tier > R.best) R.best = K.tier; } if (K.inc && (!R.fast[K.tier] || RIFT_SECS - left < R.fast[K.tier])) R.fast[K.tier] = RIFT_SECS - left;
|
||||
if (K.inc) pts_grant(player); // 通关点数:R.best 更新之后、下面 rec_save 之前。只算限时内通关(「超时通关不算过关,15 分钟内才是过关」),与上一行最高通关层同一口径 | clear points: after R.best is updated and before rec_save below. Only clears within the time limit count ("a clear after the time limit does not count as passing; only within 15 minutes does"), same rule as the highest cleared level on the previous line
|
||||
if (K.inc) for (int m = 10; m <= 100; m += 10) if (K.tier >= m && !(R.ms & (1u << (m / 10 - 1)))) milestone(G, player, m); // 限时内通关才算首通 | Only a clear within the time limit counts as a first clear
|
||||
R.tier = next; if (next > R.unlock) R.unlock = next; rec_save(); if (GB.on) gamble_apply(G);
|
||||
{ int dm_request_save(void); LOG("秘境:结算请游戏存盘 → %d", dm_request_save()); } // 层数进度(侧文件,上一行刚写进工作目录)与刚打到的东西随这次提交落盘,见 start_rift | the level progress (side file, just written into the working directory on the line above) and what was just looted go to disk with this commit, see start_rift
|
||||
if (K.inc) { char c[5] = "xa1 "; c[2] = (char)('1' + rnd(5)); give_item(G, player, c, 2, 99); }
|
||||
if (K.inc) LOG("秘境:第 %d 层完成(剩 %d:%02d)→ 下次第 %d 层", K.tier, left > 0 ? left / 60 : 0, left > 0 ? left % 60 : 0, next); else LOG("秘境:第 %d 层超时未过关 → 不涨层、不计最高层与通关数,下次仍第 %d 层", K.tier, next); // 剩余时间与下次层数在左上角任务条上(dm_rift_hud),不再单发一条提示 | Time left and next level are on the top-left quest bar (dm_rift_hud); no separate notice is sent anymore
|
||||
if (K.inc && next == K.tier) LOG("秘境:第 %d 层完成(剩 %d:%02d)→ 已是最高层,没有下一层", K.tier, left > 0 ? left / 60 : 0, left > 0 ? left % 60 : 0);
|
||||
else if (K.inc) LOG("秘境:第 %d 层完成(剩 %d:%02d)→ 下次第 %d 层", K.tier, left > 0 ? left / 60 : 0, left > 0 ? left % 60 : 0, next); else LOG("秘境:第 %d 层超时未过关 → 不涨层、不计最高层与通关数,下次仍第 %d 层", K.tier, next); // 剩余时间与下次层数在左上角任务条上(dm_rift_hud),不再单发一条提示 | Time left and next level are on the top-left quest bar (dm_rift_hud); no separate notice is sent anymore
|
||||
atomic_store(&K.st, ST_DONE); region_set(G, 1);
|
||||
pet_hp_pump(G, player, tick_of(G)); // 随从生命当拍设回基数(结算后紧跟着会存盘,放大着的值不能进角色档) | set minion life back to the base on this very tick (a save follows right after completion, and the boosted value must not go into the character save)
|
||||
if (K.players_old) dm_hud_request_players(K.players_old);
|
||||
@@ -965,36 +978,46 @@ static void finish(uint64_t G, uint64_t player, uint64_t guard) {
|
||||
LOG("秘境:结算处门位 人 %d,%d 掩码 %#x 窗口内可达 %d 格;下一层想放 %d,%d(%s,走 %d 步)→ 取 %d,%d(档 %d,走 %d 步);回城想放 %d,%d(%s,走 %d 步)→ 取 %d,%d(档 %d,走 %d 步)", x, y, mk, dg.reach,
|
||||
bx + ox, by + oy, ds_blk(&dg, bx + ox - x + DS_R, by + oy - y + DS_R) ? "挡" : "不挡", ds_dist(&dg, bx + ox - x + DS_R, by + oy - y + DS_R), x + nx, y + ny, t1, ds_dist(&dg, nx + DS_R, ny + DS_R),
|
||||
bx - ox, by - oy, ds_blk(&dg, bx - ox - x + DS_R, by - oy - y + DS_R) ? "挡" : "不挡", ds_dist(&dg, bx - ox - x + DS_R, by - oy - y + DS_R), x + tx, y + ty, t2, ds_dist(&dg, tx + DS_R, ty + DS_R));
|
||||
L.next_door = place_door(G, room_at(lvp, x + nx, y + ny), x + nx, y + ny, "结算处下一层", RIFT_OBJ, 1); if (!L.next_door) LOG("【红】秘境:下一层的门开门失败");
|
||||
L.next_door = getenv("DM_RIFT_TEST_NONEXTDOOR") ? 0 : place_door(G, room_at(lvp, x + nx, y + ny), x + nx, y + ny, "结算处下一层", RIFT_OBJ, 1) /* 测试开关 DM_RIFT_TEST_NONEXTDOOR=1:当作这扇门没开出来(造现场) | test switch DM_RIFT_TEST_NONEXTDOOR=1: act as if this door could not be placed (for staging a scene) */; if (!L.next_door) LOG("【红】秘境:下一层的门开门失败");
|
||||
L.town_door = place_door(G, room_at(lvp, x + tx, y + ty), x + tx, y + ty, "结算处回城", TOWN_OBJ, 1); if (!L.town_door) LOG("【红】秘境:回城门开门失败"); }
|
||||
{ int nt = K.inc ? K.tier + K.inc : K.tier; // 一条提示说清两扇门,长度与原先那句相当、系统提示框不多换行 | One notice explains both doors; about as long as the previous sentence, with no extra line wrap in the system notice box
|
||||
{ // 一条提示说清两扇门,长度与原先那句相当、系统提示框不多换行 | One notice explains both doors; about as long as the previous sentence, with no extra line wrap in the system notice box
|
||||
// 结算只发这一条(原先「第 N 层完成…」「门已开启」各一条,加上首通奖励那条,原版系统提示框一条一条放,连着通关时会落后一层)
|
||||
// 文字控制在 16 个字以内(加上「秘境」前缀与「初入秘境…」那句等长,提示框里是一行);层数、剩余时间、下次层数都在左上角任务条上
|
||||
// Completion sends only this one notice (previously 「第 N 层完成…」(Level N complete...) and 「门已开启」(The door is open) were one notice each, plus the first-clear reward one; the original system notice box shows them one at a time, so with back-to-back clears it would lag one level behind)
|
||||
// Text kept within 16 characters (with the 「秘境」(Rift) prefix it is as long as the 「初入秘境…」(First time in the rift...) sentence, one line in the notice box); the level, time left and next level are all on the top-left quest bar
|
||||
(void)nt; if (L.next_door && L.town_door) say(K.inc ? "dmRiftSayDoneBoth" : "dmRiftSayLateBoth");
|
||||
else if (L.next_door) say(K.inc ? "dmRiftSayDoneNext" : "dmRiftSayLateNext"); else if (L.town_door) say(K.inc ? "dmRiftSayDoneTown" : "dmRiftSayLateTown"); else say(K.inc ? "dmRiftSayDone" : "dmRiftSayLate"); } }
|
||||
// 已在最高层(限时内通关但没有下一层):那扇门是「重打」,不说「下一层」
|
||||
// Completion sends only this one message (it used to be one each for "level N complete..." and "the doors are open", plus the first-clear reward one; the original's system message box shows them one at a time, so on consecutive clears it fell a level behind)
|
||||
// The text is kept within 16 characters (with the "Rift" prefix it is as long as the "first time in a rift..." line, one line in the message box); level, time left and next level are all on the quest bar at the top left
|
||||
// Already at the highest level (cleared within the time limit but with no next level): that door is "replay", not "next level"
|
||||
int top = K.inc && next_tier() == K.tier;
|
||||
if (L.next_door && L.town_door) say(top ? "dmRiftSayTopBoth" : K.inc ? "dmRiftSayDoneBoth" : "dmRiftSayLateBoth");
|
||||
else if (L.next_door) say(top ? "dmRiftSayTopNext" : K.inc ? "dmRiftSayDoneNext" : "dmRiftSayLateNext"); else if (L.town_door) say(top ? "dmRiftSayTopTown" : K.inc ? "dmRiftSayDoneTown" : "dmRiftSayLateTown"); else say(top ? "dmRiftSayTop" : K.inc ? "dmRiftSayDone" : "dmRiftSayLate"); } }
|
||||
}
|
||||
|
||||
// 本层完成后的下一层层号:限时内完成涨 K.inc 层(封顶 100),超时完成不涨。守护者处那扇门取这个数(结算日志、任务条上的「下次第 N 层」同源)
|
||||
// Level number of the next level after this one is completed: completing within the time limit raises it by K.inc levels (capped at 100), completing
|
||||
// over time does not raise it.
|
||||
// The portal at the Guardian's spot uses this number (same source as the completion log and the "Next: level N" on the quest bar)
|
||||
static int next_tier(void) { int nt = K.inc ? K.tier + K.inc : K.tier; return nt > 100 ? 100 : nt; }
|
||||
static void menu_fill(dm_rift_menu_t *o, int m) {
|
||||
uint64_t now = guest_ns();
|
||||
int need = atomic_load(&K.need); o->menu = m; o->best = R.best; o->unlock = R.unlock < 1 ? 1 : R.unlock; o->def = R.tier; o->ms = R.ms; o->clvl = atomic_load(&M.clvl);
|
||||
o->tier = K.tier; o->done = atomic_load(&K.st) == ST_DONE; o->inc = K.inc; o->secs_left = o->done ? g_left_done : K.t0_ns ? RIFT_SECS - (int)((now - K.t0_ns) / 1000000000ull) : RIFT_SECS; if (o->secs_left < 0) o->secs_left = 0;
|
||||
o->tier = K.tier; o->done = atomic_load(&K.st) == ST_DONE; o->inc = K.inc; o->next = next_tier(); o->secs_left = o->done ? g_left_done : K.t0_ns ? RIFT_SECS - (int)((now - K.t0_ns) / 1000000000ull) : RIFT_SECS; if (o->secs_left < 0) o->secs_left = 0;
|
||||
o->progress = need > 0 ? (float)atomic_load(&K.score) / need : 0; if (o->progress > 1) o->progress = 1;
|
||||
}
|
||||
int dm_rift_menu(dm_rift_menu_t *o) { int m = atomic_load(&M.menu); if (m == MENU_NONE) return 0; menu_fill(o, m); return 1; }
|
||||
int dm_rift_stats(dm_rift_stats_t *o) { // 积分牌「秘境」页(dm_kills.c):本局角色的侧文件读数;没资格 / 没读过返回 0 | Kill board 「秘境」(Rift) page (dm_kills.c): sidecar file readout for this run's character; returns 0 if not eligible / not read yet
|
||||
if (!K.who[0]) return 0; o->best = R.best; o->clears = R.clears; o->deaths = R.deaths; o->tier = R.tier; o->unlock = R.unlock; o->ms = R.ms; memcpy(o->fast, R.fast, sizeof o->fast); return 1; }
|
||||
void dm_rift_menu_close(void) { atomic_store(&M.menu, MENU_NONE); }
|
||||
void dm_rift_menu_peek(dm_rift_menu_t *o) { int m = atomic_load(&K.st) == ST_RUN || (atomic_load(&K.st) == ST_DONE && L.next_door) ? MENU_CHOICE : MENU_SELECT; menu_fill(o, m); } // 没点门时也给页面读数(玩家自己翻到编年史「秘境」页) | Provide page readouts even when the door was not tapped (the player browsed to the chronicle 「秘境」(Rift) page themselves)
|
||||
// 城里入口该给哪一页:有一场可以回去(正在打,或打完了、旧场位置还记着)→ 继续 / 放弃,否则选层。
|
||||
// 打完那种情况按「旧场位置在不在」(L.nd_lv,结算时记、开新场 / 放弃时清)判,不按守护者处那扇门的单位号:门是开在那张图上的一个物件,
|
||||
// 没开出来(place_door 失败,有【红】日志)时单位号是 0,原先就只给选层页——玩家回不去捡地上的东西(公开仓库 里与玩法无关的那部分)
|
||||
// Which page the town entrance should give: when there is a run to go back to (in progress, or finished with the old run's position still recorded) -> Continue / Abandon, otherwise level selection.
|
||||
// The finished case is decided by "whether the old run's position is there" (L.nd_lv, recorded at completion, cleared when a new run starts / on abandon), not by the unit id of the door at the Guardian: the door is an object placed on that map,
|
||||
// and when it could not be placed (place_door failed, with a red log line) its unit id is 0, and only the level-selection page used to be given - the player could not go back to pick up what was on the ground
|
||||
static int town_menu(int st) { return st == ST_RUN || (st == ST_DONE && L.nd_lv) ? MENU_CHOICE : MENU_SELECT; }
|
||||
// 新一局开始时清掉上一局留下的页面状态与请求(开始 / 继续 / 放弃):这几个请求由界面线程置位、服务端拍里取走,上一局结束前没被取走的不能带进新局
|
||||
// When a new game starts, clear the page state and requests left by the previous game (start / continue / abandon): these requests are set by the UI thread and taken on a server tick, and any not taken before the previous game ended must not be carried into the new game
|
||||
static void menu_reset(void) { int a = atomic_exchange(&M.req_start, 0), b = atomic_exchange(&M.req_cont, 0), c = atomic_exchange(&M.req_abandon, 0), m = atomic_exchange(&M.menu, MENU_NONE);
|
||||
if (a || b || c || m) LOG("秘境:新局,清掉上一局留下的请求(开始 %d / 继续 %d / 放弃 %d / 页 %d)", a, b, c, m); }
|
||||
void dm_rift_menu_peek(dm_rift_menu_t *o) { menu_fill(o, town_menu(atomic_load(&K.st))); } // 没点门时也给页面读数(玩家自己翻到编年史「秘境」页) | Provide page readouts even when the door was not tapped (the player browsed to the chronicle 「秘境」(Rift) page themselves)
|
||||
void dm_rift_menu_start(int tier) { atomic_store(&M.req_start, tier); atomic_store(&M.menu, MENU_NONE); }
|
||||
void dm_rift_menu_continue(void) { atomic_store(&M.req_cont, 1); atomic_store(&M.menu, MENU_NONE); }
|
||||
void dm_rift_menu_abandon(void) { atomic_store(&M.req_abandon, 1); atomic_store(&M.menu, MENU_NONE); }
|
||||
void dm_rift_menu_next(void) { atomic_store(&M.req_next, 1); atomic_store(&M.menu, MENU_NONE); }
|
||||
static _Atomic int g_menu_seq; int dm_rift_menu_seq(void) { return atomic_load(&g_menu_seq); } // 点城里的门的次数(面板据此认「又点了一次」) | Number of taps on the town door (the panel uses it to recognize "tapped again")
|
||||
int dm_rift_menu_pending(void) { return atomic_load(&M.req_abandon) != 0; } // 放弃还没在服务端拍里执行(大秘境面板据此放开暂停) | Abandon has not yet been executed in the server tick (the greater rift panel releases the pause based on this)
|
||||
|
||||
@@ -1030,6 +1053,7 @@ static int start_rift(uint64_t G, uint64_t player, uint32_t t, int tier) {
|
||||
K.players_old = dm_hud_requested_players(); if (!K.players_old) K.players_old = 1;
|
||||
dm_quiet_difficulty_msg(1); // 本局原版「游戏难度设为 N」提示不弹(观测门 15,diag.c;换局关) | The original 「游戏难度设为 N」(Game difficulty set to N) notice is not shown this run (observation gate 15, diag.c; turned off on run change)
|
||||
dm_hud_request_players(K.tier < 8 ? K.tier : 8);
|
||||
L.nd_lv = 0; // 旧场位置到此作废(这一场结算时重记;结算读不到玩家位置时不记,那时不能回到更早那一场的位置) | the old run's position is void from here (recorded again when this run is completed; not recorded when the player's position cannot be read at completion, in which case returning to an even earlier run's position must not happen)
|
||||
atomic_store(&K.st, ST_RUN); say("dmRiftSayStart", K.tier); // 一行放得下(原句在提示框和聊天栏里折行,把「15 分钟」拆开;攒进度 / 打守护者在左上角任务条上有) | Fits on one line (the original sentence wrapped in the notice box and chat bar, splitting 「15 分钟」(15 minutes); building progress / fighting the guardian are on the top-left quest bar)
|
||||
LOG("秘境:拍 %u 开局 第 %d 层,图 %d → %d → %d(共 %d 张),/players %d", t, K.tier, K.maps[0], K.maps[1], K.maps[2], K.nmaps, K.tier < 8 ? K.tier : 8);
|
||||
// 进秘境 / 换层前请游戏存一次盘(dm_request_save:下一拍它走自己的定时存盘):秘境是连着换图的高风险转场,这里崩了不该回退到 5 分钟一次的定时存盘那一刻
|
||||
@@ -1052,7 +1076,12 @@ void dm_rift_tick(uint64_t G, uint64_t player, uint8_t *main_base) {
|
||||
int st = atomic_load(&K.st);
|
||||
maze_restore(G, player);
|
||||
if (st == ST_RUN || st == ST_DONE) { region_set(G, 0); if (K.players_old) dm_hud_request_players(K.players_old); atomic_store(&K.st, ST_IDLE); LOG("秘境:换局,%s", st == ST_RUN ? "本次秘境作废" : "结束"); }
|
||||
dm_quiet_difficulty_msg(0); GS.bm_on = 0; shelf_restore(); gamble_restore(); memset(&L, 0, sizeof L); L.G = G; L.player = player; L.eligible = -1; L.lv_prev = -1; L.resume = K.resume_tier; K.resume_tier = 0; // resume:图用完走的一键重开,到新局才接着开;GS.bm_on = 0:位图属于上一局(已释放),不写回 | resume: the one-tap restart taken when maps ran out continues only once in the new run; GS.bm_on = 0: the bitmap belongs to the previous run (already freed), not written back
|
||||
dm_quiet_difficulty_msg(0); GS.bm_on = 0; shelf_restore(); gamble_restore(); memset(&L, 0, sizeof L);
|
||||
// 测试开关 DM_RIFT_TEST_STALE=1(造现场):进程里第二局起,换局这一刻先置上「开始第 7 层 / 继续」两个请求,当作上一局结束前界面刚点下、没来得及被取走
|
||||
// Test switch DM_RIFT_TEST_STALE=1 (for staging a scene): from the second game in the process on, set the two requests "start level 7 / continue" at the moment of the game change, as if the UI had just pressed them before the previous game ended and they had not been taken yet
|
||||
{ static int games; if (games++ && getenv("DM_RIFT_TEST_STALE")) { atomic_store(&M.req_start, 7); atomic_store(&M.req_cont, 1); LOG("秘境:测试 DM_RIFT_TEST_STALE 换局时置上残留请求(开始 7 / 继续 1)"); } }
|
||||
if (!getenv("DM_RIFT_TEST_STALE_KEEP")) menu_reset(); // 测试开关 DM_RIFT_TEST_STALE_KEEP=1(对照):不清,重现修正前的行为 | test switch DM_RIFT_TEST_STALE_KEEP=1 (control): do not clear, reproducing the behaviour before the fix
|
||||
L.G = G; L.player = player; L.eligible = -1; L.lv_prev = -1; L.resume = K.resume_tier; K.resume_tier = 0; // resume:图用完走的一键重开,到新局才接着开;GS.bm_on = 0:位图属于上一局(已释放),不写回 | resume: the one-tap restart taken when maps ran out continues only once in the new run; GS.bm_on = 0: the bitmap belongs to the previous run (already freed), not written back
|
||||
}
|
||||
L.last_t = t; built_scan(player);
|
||||
int lv = unit_level(player); if (!lv || !unit_room(player)) return;
|
||||
@@ -1081,12 +1110,23 @@ void dm_rift_tick(uint64_t G, uint64_t player, uint8_t *main_base) {
|
||||
{ static int at = -1, tr; if (at < 0) { const char *e = getenv("DM_RIFT_TEST_START"); at = e ? atoi(e) : 0; const char *c = e ? strchr(e, ':') : NULL; tr = c ? atoi(c + 1) : 1; } // 测试开关 DM_RIFT_TEST_START=<拍>[:<层>]:人在哈洛加斯时到这一拍直接开这一层(裸宿主上选层页点不了;走的是一键重开后续局的同一句) | Test switch DM_RIFT_TEST_START=<tick>[:<floor>]: while the player is in Harrogath, start that floor directly at that tick (the floor selection page cannot be tapped on the bare host; this goes through the same statement as the follow-up run after a quick restart)
|
||||
if (at > 0 && t >= (uint32_t)at && lv == LV_TOWN && L.eligible > 0 && atomic_load(&K.st) == ST_IDLE) { at = 0; LOG("秘境:测试 DM_RIFT_TEST_START 拍 %u 直接开第 %d 层", t, tr); start_rift(G, player, t, tr); return; } }
|
||||
{ static int at = -1; if (at < 0) { const char *e = getenv("DM_RIFT_TEST_RESTART"); at = e ? atoi(e) : 0; } if (at > 0 && t >= (uint32_t)at) { at = 0; void dm_restart_request(void); LOG("秘境:测试 DM_RIFT_TEST_RESTART 拍 %u 请求一键重开", t); dm_restart_request(); } } // 测试:拍 N 替玩家一键重开 | Test: at tick N, do a one-tap restart on the player's behalf
|
||||
if (lv != LV_TOWN && atomic_load(&M.menu)) atomic_store(&M.menu, MENU_NONE); // 离城自动收起 | Closes automatically on leaving town
|
||||
// 离城自动收起;确认页例外——它开在守护者处那张图上,人离开那张图、或这一场已不是「打完待走」才收
|
||||
// Closes automatically on leaving town; the confirmation page is the exception - it opens on the Guardian's map, and closes only when the player leaves that map or this run is no longer "finished, waiting to leave"
|
||||
{ int mm = atomic_load(&M.menu); if (mm == MENU_NEXT ? (st != ST_DONE || lv != L.nd_lv || !L.next_door) : (mm && lv != LV_TOWN)) atomic_store(&M.menu, MENU_NONE); }
|
||||
// 确认页点了「继续」:到这里才真的离开这一场。条件再核一遍(面板开着时游戏是暂停的,正常不会变)
|
||||
// "Continue" was pressed on the confirmation page: only here does the player really leave this run. The conditions are checked once more (the game is paused while the panel is open, so they normally do not change)
|
||||
if (atomic_exchange(&M.req_next, 0) && st == ST_DONE && L.next_door && lv == L.nd_lv) { L.next_door = L.town_door = 0; int nt = next_tier(); LOG("秘境:确认离开这一场,开第 %d 层(此刻地上物品 %d 件,不保留)", nt, ground_items(G)); start_rift(G, player, t, nt); return; }
|
||||
// 测试开关 DM_RIFT_TEST_NEXTDOOR=<拍数>[,<拍数>…]:本层结算后过这么多拍,当作玩家碰了守护者处「下一层」那扇门(裸宿主上没法点门)。日志带此刻地上的物品数(验取消后东西还在)
|
||||
// Test switch DM_RIFT_TEST_NEXTDOOR=<ticks>[,<ticks>...]: this many ticks after this level is completed, act as if the player touched the "next level" door at the Guardian (the door cannot be clicked on the bare host). The log includes the number of items on the ground at that moment (to verify they are still there after a cancel)
|
||||
{ static uint32_t at[8]; static int n = -1; if (n < 0) { n = 0; const char *e = getenv("DM_RIFT_TEST_NEXTDOOR"); char bf[96]; if (e) { strlcpy(bf, e, sizeof bf); for (char *sv, *k = strtok_r(bf, ",", &sv); k && n < 8; k = strtok_r(NULL, ",", &sv)) at[n++] = (uint32_t)atoi(k); } }
|
||||
static uint32_t d0; if (st != ST_DONE) d0 = 0; else if (!d0) d0 = t;
|
||||
for (int i = 0; i < n; i++) if (at[i] && d0 && t - d0 >= at[i] && L.next_door && lv == L.nd_lv && !atomic_load(&M.menu)) { at[i] = 0; atomic_store(&M.menu, MENU_NEXT); atomic_fetch_add(&g_menu_seq, 1);
|
||||
LOG("秘境:测试 DM_RIFT_TEST_NEXTDOOR 拍 %u(结算后 %u 拍)当作碰了守护者处的门 → 确认页;地上物品 %d 件", t, t - d0, ground_items(G)); break; } }
|
||||
{ int tq = atomic_exchange(&M.req_start, 0); if (tq > 0 && lv == LV_TOWN && st != ST_RUN) { if (tq > R.unlock) tq = R.unlock; if (tq < 1) tq = 1; LOG("秘境:选层页开始第 %d 层", tq); L.next_door = L.town_door = 0; start_rift(G, player, t, tq); return; } }
|
||||
{ static int at = -1; if (at < 0) { const char *e = getenv("DM_RIFT_TEST_SAVE"); at = e ? atoi(e) : 0; } if (at > 0 && t >= (uint32_t)at) { at = 0; int dm_request_save(void); LOG("秘境:测试 DM_RIFT_TEST_SAVE 拍 %u 请游戏存盘 → %d", t, dm_request_save()); } } // 测试开关 DM_RIFT_TEST_SAVE=<拍>:到这一拍请游戏存一次盘(验放大着的随从生命进不进角色档) | test switch DM_RIFT_TEST_SAVE=<tick>: ask the game to save once at this tick (to check whether boosted minion life gets into the character save)
|
||||
{ static int at = -1; if (at < 0) { const char *e = getenv("DM_RIFT_TEST_ABANDON"); at = e ? atoi(e) : 0; } if (at > 0 && t >= (uint32_t)at && st == ST_RUN) { at = 0; LOG("秘境:测试 DM_RIFT_TEST_ABANDON 拍 %u 替玩家放弃本层", t); atomic_store(&M.req_abandon, 1); } } // 测试开关 DM_RIFT_TEST_ABANDON=<拍>:秘境进行中到这一拍替玩家放弃(裸宿主上点不了「放弃」) | test switch DM_RIFT_TEST_ABANDON=<tick>: during a rift run, abandon on the player's behalf at this tick ("Abandon" cannot be clicked on the bare host)
|
||||
if (atomic_exchange(&M.req_abandon, 0) && (st == ST_RUN || st == ST_DONE)) { // 放弃:本层作废(不涨层、不发奖),写回改过的表,回选层页 | Abandon: this level is void (no level increase, no rewards); write back the modified tables and return to the level selection page
|
||||
region_set(G, 0); if (K.players_old) dm_hud_request_players(K.players_old); K.guard = 0; L.next_door = L.town_door = 0; atomic_store(&K.st, ST_IDLE); st = ST_IDLE;
|
||||
region_set(G, 0); if (K.players_old) dm_hud_request_players(K.players_old); K.guard = 0; L.next_door = L.town_door = 0; L.nd_lv = 0; atomic_store(&K.st, ST_IDLE); st = ST_IDLE;
|
||||
LOG("秘境:放弃第 %d 层", K.tier); atomic_store(&M.menu, MENU_SELECT);
|
||||
pet_hp_pump(G, player, t); // 随从生命当拍设回基数,同结算处:放弃后回到选层页会走原版暂停,等下一拍的话要到玩家关掉面板才设回 | minion life is set back to base on this very tick, as at completion: after abandoning, returning to the level-selection page goes through the original's pause, and waiting for the next tick would delay it until the player closes the panel
|
||||
return; }
|
||||
@@ -1113,16 +1153,16 @@ void dm_rift_tick(uint64_t G, uint64_t player, uint8_t *main_base) {
|
||||
if ((st == ST_RUN || st == ST_DONE) && in_rift_map(lv)) { int x, y; if (unit_xy(player, &x, &y)) { L.last_lv = lv; L.last_x = x; L.last_y = y; } }
|
||||
if (L.gift_due && st == ST_RUN && in_rift_map(lv) && !R.gift) { L.gift_due = 0; R.gift = 1; rec_save(); give_item2(G, player, "jew ", 7, 99, 392 + rnd(8), 0); say("dmRiftSayGift"); }
|
||||
{ static uint32_t at[16]; static int n = -1; if (n < 0) { n = 0; const char *e = getenv("DM_RIFT_TEST_OPEN"); char b[160]; if (e) { strlcpy(b, e, sizeof b); for (char *sv, *k = strtok_r(b, ",", &sv); k && n < 16; k = strtok_r(NULL, ",", &sv)) at[n++] = (uint32_t)atoi(k); } }
|
||||
for (int i = 0; i < n; i++) if (at[i] && t >= at[i] && lv == LV_TOWN) { at[i] = 0; atomic_store(&M.menu, (st == ST_RUN || (st == ST_DONE && L.next_door)) ? MENU_CHOICE : MENU_SELECT); atomic_fetch_add(&g_menu_seq, 1); LOG("秘境:测试 DM_RIFT_TEST_OPEN 拍 %u 当作点了城里的门 → %s", t, atomic_load(&M.menu) == MENU_CHOICE ? "继续 / 放弃" : "选层页"); } } // 测试:拍 N 在城里当作点了门(脚本点门会被 NPC / 营地遮挡) | Test: at tick N in town, act as if the door was tapped (a scripted tap on the door gets blocked by NPCs / the camp)
|
||||
for (int i = 0; i < n; i++) if (at[i] && t >= at[i] && lv == LV_TOWN) { at[i] = 0; atomic_store(&M.menu, town_menu(st)); atomic_fetch_add(&g_menu_seq, 1); LOG("秘境:测试 DM_RIFT_TEST_OPEN 拍 %u 当作点了城里的门 → %s", t, atomic_load(&M.menu) == MENU_CHOICE ? "继续 / 放弃" : "选层页"); } } // 测试:拍 N 在城里当作点了门(脚本点门会被 NPC / 营地遮挡) | Test: at tick N in town, act as if the door was tapped (a scripted tap on the door gets blocked by NPCs / the camp)
|
||||
if (L.pend) { uint64_t du = find_unit(G, 2, L.pend); int px, py, dx, dy;
|
||||
if (!du || t - L.pend_at > 250) L.pend = 0;
|
||||
else if (unit_xy(player, &px, &py) && unit_xy(du, &dx, &dy) && abs(px - dx) <= 4 && abs(py - dy) <= 4) { L.pend = 0;
|
||||
int is_next = du && *(uint32_t *)(uintptr_t)(du + 8) == L.next_door;
|
||||
if (du && *(uint32_t *)(uintptr_t)(du + 8) == L.town_door) { LOG("秘境:点了守护者处的回城门 → 回哈洛加斯"); L.lv_prev = LV_TOWN; warp(G, player, LV_TOWN); return; }
|
||||
if (is_next) { L.next_door = L.town_door = 0; int nt = next_tier(); LOG("秘境:点了守护者处的门,直接开第 %d 层", nt); start_rift(G, player, t, nt); return; }
|
||||
if (is_next) { atomic_store(&M.menu, MENU_NEXT); atomic_fetch_add(&g_menu_seq, 1); LOG("秘境:点了守护者处的门 → 确认页(要进第 %d 层;门与地上的东西先不动)", next_tier()); return; }
|
||||
// 城里的门:没有进行中的秘境 → 选层页;进行中(正在打,或打完还没进下一层)→ 继续 / 放弃
|
||||
// The door in town: no rift in progress -> level selection page; in progress (fighting, or finished but not yet entered the next level) -> continue / abandon
|
||||
atomic_store(&M.menu, (st == ST_RUN || (st == ST_DONE && L.next_door)) ? MENU_CHOICE : MENU_SELECT); atomic_fetch_add(&g_menu_seq, 1); LOG("秘境:点城里的门 → %s", atomic_load(&M.menu) == MENU_CHOICE ? "继续 / 放弃" : "选层页"); return; } }
|
||||
atomic_store(&M.menu, town_menu(st)); atomic_fetch_add(&g_menu_seq, 1); LOG("秘境:点城里的门 → %s", atomic_load(&M.menu) == MENU_CHOICE ? "继续 / 放弃" : "选层页"); return; } }
|
||||
// 守护者处的两扇门按「类号 + 位置」认、并保持开着:人回城再回来,那张图的房间卸载重建,门还在但单位号变了、模式也回到关着(不可点)——
|
||||
// Mac 实测回来后点下一层的门「没有目标,不发令」,就是玩家说的「回去的门也不动」。在这张图里每拍核一遍:单位号对上、模式不是 2 就再开
|
||||
// The two doors at the guardian are identified by "class id + position" and kept open: when the player goes back to town and returns, that map's rooms are unloaded and rebuilt; the doors are still there but their unit ids have changed and their mode is back to closed (not clickable) --
|
||||
|
||||
+3
-2
@@ -2,14 +2,14 @@
|
||||
// Rift tower climb (dm_rift.c)
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
typedef struct { int tier; float progress; int secs_left, done, guardian, inc; } dm_rift_hud_t;
|
||||
typedef struct { int tier; float progress; int secs_left, done, guardian, inc, next; } dm_rift_hud_t; // next = 本层完成后下一次打第几层(封顶 100;等于 tier = 不涨:超时,或已在最高层)。显示方只读它,不自己用 tier + inc 算 | next = which level will be played after this one is completed (capped at 100; equal to tier = no increase: overtime, or already at the highest level). Display code only reads it and does not compute tier + inc itself
|
||||
void dm_rift_tick(uint64_t G, uint64_t player, uint8_t *main_base); // 服务端拍(diag.c) | Server tick (diag.c)
|
||||
void dm_rift_c2s(uint64_t G, const uint8_t *pkt, uint32_t len); // 客户端命令(点门) | Client command (door tap)
|
||||
void dm_rift_client_pump(uint8_t *main_base); // 取手柄处(dm_world.c):认击杀、新刷出的怪 | At the controller sampling point (dm_world.c): recognize kills and newly spawned monsters
|
||||
int dm_rift_hud(dm_rift_hud_t *out); // 前端每帧:秘境进行中 / 刚完成返回 1 | Front end every frame: returns 1 while a rift is in progress / just completed
|
||||
int dm_rift_active(void);
|
||||
void dm_rift_gamble_vals(int best, uint32_t *uniq, uint32_t *set); // 赌博加成:最高通关层 → 地狱暗金 / 套装值(十万分之一);best < 1 = 0(不加) | Gambling bonus: highest cleared level -> Hell unique / set values (in units of 1/100000); best < 1 = 0 (no bonus)
|
||||
typedef struct { int menu, best, unlock, def; unsigned ms; int clvl, tier, done, secs_left; float progress; int inc; } dm_rift_menu_t; // menu 1 = 选层页、2 = 继续 / 放弃;inc = 0 且 done = 超时打倒守护者(没过关) | menu 1 = level selection page, 2 = continue / quit; inc = 0 with done set = Guardian defeated after time ran out (not passed)
|
||||
typedef struct { int menu, best, unlock, def; unsigned ms; int clvl, tier, done, secs_left; float progress; int inc, next; } dm_rift_menu_t; // menu 1 = 选层页、2 = 继续 / 放弃、3 = 守护者处那扇门的确认页(next = 要进的层);inc = 0 且 done = 超时打倒守护者(没过关) | menu 1 = level-selection page, 2 = Continue / Abandon, 3 = confirmation page of the door at the Guardian (next = the level to enter); inc = 0 and done = Guardian defeated overtime (not passed)
|
||||
int dm_rift_cleared_any(void); // 这个角色打通过任意一层秘境没有(限时内过关才算:最高通关层 ≥ 1)——技能硬点上限的解锁条件(dm_actions.c) | has this character cleared any Greater Rift level (only clears within the time limit count: highest cleared level ≥ 1): the unlock condition for the hard skill point cap (dm_actions.c)
|
||||
int dm_rift_merc_unlocked(void); // 佣兵新装备位解没解锁(秘境最高通关 ≥ 10 层) | Whether the new mercenary equipment slots are unlocked (highest rift level cleared ≥ 10)
|
||||
void dm_rift_merc_locked_hint(void); // 没解锁时的提示「通关地狱后打通秘境10层解锁」 | Hint when not unlocked: 「通关地狱后打通秘境10层解锁」(Clear Greater Rift Level 10 to unlock)
|
||||
@@ -20,6 +20,7 @@ void dm_rift_menu_close(void); // 关闭(右上角 X) | Close (
|
||||
void dm_rift_menu_start(int tier); // 选层页「开始」 | Level selection page 「开始」(Enter Rift)
|
||||
void dm_rift_menu_continue(void); // 「继续」 | 「继续」(Continue)
|
||||
void dm_rift_menu_abandon(void);
|
||||
void dm_rift_menu_next(void); // 确认页「继续」:离开这一场,进下一层(或重打) | "Continue" on the confirmation page: leave this run and enter the next level (or replay)
|
||||
int dm_rift_menu_pending(void); int dm_rift_menu_seq(void); int dm_rift_swept(uint32_t id); // 「放弃」(放弃后服务端再打开选层页) | 「放弃」(Quit) (after abandoning, the server opens the level selection page again)
|
||||
void dm_rift_menu_peek(dm_rift_menu_t *out); // 没有要开的页时也取页面读数(编年史「秘境」页) | Fetch the page readout even when there is no page to open (chronicle 「秘境」(Rift) page)
|
||||
void dm_rift_ui_pump(void); // dm_rift_ui.c:游戏主线程每帧(dm_actions.c) | dm_rift_ui.c: every frame on the game main thread (dm_actions.c)
|
||||
|
||||
+24
-8
@@ -118,7 +118,7 @@ void dm_rift_ui_pump(void) {
|
||||
// Panel state trusts only on-screen facts (the panel visible byte, which the original game itself also reads to tell whether a panel is open), not frame counting (the old implementation had nobody clearing the state after the panel closed, so tapping the door again did not open it):
|
||||
// 0 not open -> send OpenPanel -> 1 requested -> (became visible) -> 2 on screen -> (became invisible: close button / tap outside the panel / closed by the game itself, whether or not there was a matching close message) -> clear "page wanted" and return to 0.
|
||||
// If the player taps the door again while stuck at 1 (the door tap count changed), send OpenPanel once more
|
||||
else if (!g_opened || (g_opened == 1 && !up && dm_rift_menu_seq() != g_seq)) { g_opened = 1; g_seq = dm_rift_menu_seq(); g_sel = -1; dm_ui_send("PanelManager", "OpenPanel", "MessageLogPanel"); LOG("大秘境面板:点了门,开面板(%s)", m.menu == 2 ? "继续 / 放弃" : "选层"); return; }
|
||||
else if (!g_opened || (g_opened == 1 && !up && dm_rift_menu_seq() != g_seq)) { g_opened = 1; g_seq = dm_rift_menu_seq(); g_sel = -1; dm_ui_send("PanelManager", "OpenPanel", "MessageLogPanel"); LOG("大秘境面板:点了门,开面板(%s)", m.menu == 3 ? "离开这一场的确认" : m.menu == 2 ? "继续 / 放弃" : "选层"); return; }
|
||||
if (g_opened == 1 && up) g_opened = 2;
|
||||
if (want && g_opened == 2 && !up) { LOG("大秘境面板:玩家关了面板"); dm_rift_menu_close(); g_opened = 0; g_sel = -1; }
|
||||
pause_set(up && !dm_rift_menu_pending()); plate_hide(up);
|
||||
@@ -126,7 +126,9 @@ void dm_rift_ui_pump(void) {
|
||||
if (!want) { m.menu = 1; dm_rift_menu_peek(&m); } // 玩家自己翻到这一页(没点门):照样显示选层,只是「开始」要在城里才执行 | The player browsed to this page themselves (no door tap): level selection is shown all the same, but 「开始」(Enter Rift) only executes while in town
|
||||
{ static const char *au = (const char *)1; static int at; if (au == (const char *)1) au = getenv("DM_RIFT_MENU_AUTO"); // 测试开关 DM_RIFT_MENU_AUTO=<层>[,cont|,abandon]:页显示 90 帧后替玩家点(脚本触点打不到被挡的门 / 按钮另用系统鼠标事件验) | Test switch DM_RIFT_MENU_AUTO=<level>[,cont|,abandon]: taps on the player's behalf 90 frames after the page is shown (scripted touch points cannot hit a blocked door / buttons are verified separately with system mouse events)
|
||||
if (au && want) { if (!at) at = (int)fr; if ((int)fr - at > 90) { at = 0; static int lg; if (lg++ < 4) LOG("秘境选层页:测试开关替玩家点 %s(页 %d)", au, m.menu);
|
||||
if (m.menu == 1 && atoi(au) > 0) { g_sel = atoi(au); if (g_sel > m.unlock) g_sel = m.unlock; atomic_store(&g_act, 1); } else if (m.menu == 2 && (strstr(au, "cont") || strstr(au, "abandon"))) atomic_store(&g_act, strstr(au, "abandon") ? 3 : 2); } } else at = 0; }
|
||||
if (m.menu == 3) { static int nth; int cancel = strstr(au, "cancel") && !nth++; // 确认页:值里带 cancel = 第一次出现时关掉(当作取消),之后带 next 的点「继续」 | confirmation page: when the value contains cancel = close it the first time it appears (treated as cancel), afterwards press "Continue" on the one carrying next
|
||||
if (cancel) dm_ui_send("PanelManager", "ClosePanel", "MessageLogPanel"); else if (strstr(au, "next")) atomic_store(&g_act, 2); }
|
||||
else if (m.menu == 1 && atoi(au) > 0) { g_sel = atoi(au); if (g_sel > m.unlock) g_sel = m.unlock; atomic_store(&g_act, 1); } else if (m.menu == 2 && (strstr(au, "cont") || strstr(au, "abandon"))) atomic_store(&g_act, strstr(au, "abandon") ? 3 : 2); } } else at = 0; }
|
||||
// 手柄模式:这一页的按钮原版焦点导航不认识,照积分牌 / 编年史仓库页的做法接管本页的键(dm_padmode_page_keys),走的还是下面同一套动作号:
|
||||
// 选层页 左 / 右 = −1 / +1、下 / 上 = −10 / +10、A = 开始;进行中 / 已完成页 A = 继续、X = 放弃 / 重新选层(放弃不可撤销,不放在 A 上);B 没接管 = 原版关面板。
|
||||
// 键位说明走原版底部提示条(动作号 0 = A、2 = X),字用按钮上的同一个串
|
||||
@@ -136,25 +138,27 @@ void dm_rift_ui_pump(void) {
|
||||
// level (quitting is irreversible, so it is not on A); B is not taken over = the original game closes the panel.
|
||||
// The key legend uses the original bottom button legend (action number 0 = A, 2 = X), with the same strings as on the buttons
|
||||
{ int dm_padmode_current(void); uint64_t dm_padmode_page_keys(uint64_t); void dm_padmode_legend(int, const char *);
|
||||
{ int kx = dm_padmode_current() ? 52 : 99999; rect(find(bw, "TouchRF_KeyA", 0), kx, 1181); rect(find(bw, "TouchRF_KeyA2", 0), kx, 1181); rect(find(bw, "TouchRF_KeyX", 0), kx, 844); } // 按钮左端的原版键帽:只在手柄模式显示 | The original button glyph at the left end of the button: shown only in controller mode
|
||||
{ int kx = dm_padmode_current() ? 52 : 99999; rect(find(bw, "TouchRF_KeyA", 0), kx, 1181); rect(find(bw, "TouchRF_KeyA2", 0), kx, 1181); rect(find(bw, "TouchRF_KeyX", 0), m.menu == 3 ? 99999 : kx, 844); } // 确认页上面那个钮不在,它的键帽也不显示 // 按钮左端的原版键帽:只在手柄模式显示 | the upper button is absent on the confirmation page, so its key cap is not shown either
|
||||
rect(find(panel(), "TouchCloseBox", 1), dm_padmode_current() ? 99999 : -998, 256); // 右上角的触屏关闭 X(布局同编年史 _chronicle_touch):手柄模式挪到屏外(按 B 关),触屏模式放回布局里的位置;同 dm_kills.c | the touch close X in the top-right corner (layout same as the Chronicle _chronicle_touch): moved off screen in controller mode (B closes), put back at its layout position in touch mode; same as dm_kills.c
|
||||
if (dm_padmode_current()) { int ch = m.menu == 2;
|
||||
if (dm_padmode_current()) { int ch = m.menu >= 2, cf = m.menu == 3; // cf:确认页,只有 A = 继续;取消 = B 关面板(原版) | cf: confirmation page, only A = continue; cancel = B closes the panel (as in the original)
|
||||
uint64_t ev = dm_padmode_page_keys(DM_BTN_A | DM_BTN_X | DM_BTN_LEFT | DM_BTN_RIGHT | DM_BTN_UP | DM_BTN_DOWN);
|
||||
dm_padmode_legend(0, dm_str(b, ch ? "dmRiftBtnCont" : "dmRiftBtnStart")); if (ch) dm_padmode_legend(2, dm_str(b, m.done ? "dmRiftBtnResel" : "dmRiftBtnAbandon"));
|
||||
dm_padmode_legend(0, dm_str(b, ch ? "dmRiftBtnCont" : "dmRiftBtnStart")); if (ch && !cf) dm_padmode_legend(2, dm_str(b, m.done ? "dmRiftBtnResel" : "dmRiftBtnAbandon"));
|
||||
if (!ch) { int st = (ev & DM_BTN_LEFT ? -1 : 0) + (ev & DM_BTN_RIGHT ? 1 : 0) + (ev & DM_BTN_DOWN ? -10 : 0) + (ev & DM_BTN_UP ? 10 : 0); if (st) atomic_fetch_add(&g_step, st); if (ev & DM_BTN_A) atomic_store(&g_act, 1); }
|
||||
else if (ev & DM_BTN_A) atomic_store(&g_act, 2);
|
||||
else if (cf) { }
|
||||
else if (m.done) { if (ev & DM_BTN_X) atomic_store(&g_act, 3); } // 已完成页的 X = 重新选层(进度已记,不丢东西):按一下 | X on the completed page = reselect the level (progress is already recorded, nothing is lost): a single press
|
||||
else { static uint64_t t0; uint64_t now_ns(void), dm_padmode_page_held(void), now = now_ns(); // 进行中页的 X = 放弃(本层作废、不可撤销):按住 0.8 秒才算,防误按 | X on the in-progress page = quit (this level is forfeited, irreversible): it only counts after being held for 0.8 seconds, to prevent accidental presses
|
||||
if (!(dm_padmode_page_held() & DM_BTN_X)) t0 = 0; else if (!t0) t0 = now; else if (t0 != 1 && now - t0 >= 800000000ull) { t0 = 1; atomic_store(&g_act, 3); LOG("大秘境面板:手柄按住 X 0.8 秒 → 放弃"); } }
|
||||
if (ev) { atomic_store(&g_dirty, 1); LOG("大秘境面板:手柄键 %#llx(%s页)", (unsigned long long)ev, ch ? "继续 / 放弃" : "选层"); } } }
|
||||
if (ev) { atomic_store(&g_dirty, 1); LOG("大秘境面板:手柄键 %#llx(%s页)", (unsigned long long)ev, cf ? "确认" : ch ? "继续 / 放弃" : "选层"); } } }
|
||||
int a = atomic_exchange(&g_act, 0);
|
||||
if (g_sel < 0) g_sel = m.def < 1 ? 1 : m.def > m.unlock ? m.unlock : m.def;
|
||||
{ int st = atomic_exchange(&g_step, 0); if (st) { g_sel += st; if (g_sel < 1) g_sel = 1; if (g_sel > m.unlock) g_sel = m.unlock; } }
|
||||
if (a == 1 && m.menu == 1) { dm_rift_menu_start(g_sel); pause_set(0); dm_ui_send("PanelManager", "ClosePanel", "MessageLogPanel"); return; }
|
||||
if (a == 2 && m.menu == 2) { dm_rift_menu_continue(); pause_set(0); dm_ui_send("PanelManager", "ClosePanel", "MessageLogPanel"); return; }
|
||||
if (a == 2 && m.menu == 3) { LOG("大秘境面板:确认页点了继续"); dm_rift_menu_next(); pause_set(0); dm_ui_send("PanelManager", "ClosePanel", "MessageLogPanel"); return; }
|
||||
if (a == 3 && m.menu == 2) { dm_rift_menu_abandon(); pause_set(0); g_sel = -1; return; } // 放弃后服务端拍里把页换回选层(面板不关;放开暂停让拍走到) | After abandon, the server tick switches the page back to level selection (the panel stays open; release the pause so the tick gets there)
|
||||
static int frame; if (!atomic_exchange(&g_dirty, 0) && ++frame % 15) return;
|
||||
rect(find(bw, "TouchRF_Sel", 0), m.menu == 2 ? 99999 : 0, 0); rect(find(bw, "TouchRF_Cho", 0), m.menu == 2 ? 0 : 99999, 0);
|
||||
rect(find(bw, "TouchRF_Sel", 0), m.menu >= 2 ? 99999 : 0, 0); rect(find(bw, "TouchRF_Cho", 0), m.menu >= 2 ? 0 : 99999, 0);
|
||||
char t[128];
|
||||
// 英文版:左栏「标签 + 右对齐的值」英文比中文宽,标签写全称用中号字会顶到数值。布局里每行另有一个小一号的标签控件 …LE(缺省在屏外):
|
||||
// 游戏语言不是中文时用它、把中号那个挪出去,数值列再右移 16(右缘 496,离右边列表 530 留 34)。中文:中号标签在原位、数值列不动,画面不变
|
||||
@@ -170,7 +174,19 @@ void dm_rift_ui_pump(void) {
|
||||
snprintf(t, sizeof t, "TouchRF_Gam%dL", i); rect(find(bw, t, 0), en ? 99999 : 0, y); snprintf(t, sizeof t, "TouchRF_Gam%dLE", i); rect(find(bw, t, 0), en ? 0 : 99999, y + (en ? 4 : 0)); } }
|
||||
rect(find(bw, "TouchRF_MsN", 0), en ? 99999 : 1030, -24); rect(find(bw, "TouchRF_MsNE", 0), en ? 930 : 99999, -24); // 右上那句:英文用更宽、字更小的那个控件;纵坐标 −24 = touch_layout.py 的 RF_T0(第一行小标题整体上抬) | the top-right sentence: English uses the wider widget with the smaller font; y coordinate −24 = RF_T0 in touch_layout.py (the first row of small headings is raised as a whole)
|
||||
rect(find(bw, "TouchRF_AbT", 0), en ? 99999 : 0, 746); rect(find(bw, "TouchRF_AbTE", 0), en ? 0 : 99999, 746); rect(find(bw, "TouchRF_ContT", 0), en ? 99999 : 0, 1083); rect(find(bw, "TouchRF_ContTE", 0), en ? 0 : 99999, 1083);
|
||||
if (m.menu == 2) {
|
||||
if (m.menu == 3) {
|
||||
// 守护者处那扇门的确认页(公开仓库):借「继续 / 放弃」那一页的控件,不加新控件——
|
||||
// 标题问一句、三行说明后果、下面那个「继续」钮 = 确认;上面那个钮(放弃 / 重新选层)两个都挪走,说明写「关闭本页 = 留在这里」。取消 = 右上角 X / 手柄 B / 点面板外
|
||||
// Confirmation page of the door at the Guardian: it borrows the widgets of the "Continue / Abandon" page and adds no new widget -
|
||||
// a title that asks the question, three lines explaining the consequence, and the lower "Continue" button = confirm; the upper button (Abandon / choose level again) is moved away in both variants, and the explanation says "closing this page = stay here". Cancel = the X at the top right / gamepad B / a tap outside the panel
|
||||
int retry = m.next <= m.tier; // 没有更高的层可去(超时未过关,或已在最高层):那扇门是重打 | no higher level to go to (overtime without passing, or already at the highest level): that door is a replay
|
||||
snprintf(t, sizeof t, dm_str(rb(), "dmRiftTierN"), m.next); text(find(bw, "TouchRF_ChTier", 0), t);
|
||||
text(find(bw, "TouchRF_ChT", 0), dm_str(rb(), retry ? "dmRiftTitleRetry" : "dmRiftTitleNext")); text(find(bw, "TouchRF_ChNote", 0), "");
|
||||
text(find(bw, "TouchRF_ChLeftL", 0), dm_str(rb(), "dmRiftLeaveWarn1")); text(find(bw, "TouchRF_ChLeft", 0), ""); text(find(bw, "TouchRF_ChProgL", 0), dm_str(rb(), "dmRiftLeaveWarn2")); text(find(bw, "TouchRF_ChProg", 0), ""); text(find(bw, "TouchRF_ChNoteL", 0), "");
|
||||
rect(find(bw, "TouchRF_Abandon", 0), 99999, 818); rect(find(bw, "TouchRF_Resel", 0), 99999, 818);
|
||||
text(find(bw, en ? "TouchRF_AbTE" : "TouchRF_AbT", 0), dm_str(rb(), "dmRiftCapStay"));
|
||||
snprintf(t, sizeof t, dm_str(rb(), "dmRiftCapGo"), m.next); text(find(bw, en ? "TouchRF_ContTE" : "TouchRF_ContT", 0), t);
|
||||
} else if (m.menu == 2) {
|
||||
snprintf(t, sizeof t, dm_str(rb(), "dmRiftTierN"), m.tier); text(find(bw, "TouchRF_ChTier", 0), t);
|
||||
// 已打倒守护者:两句话各占一整行(写进左边的标签控件、值留空);写进右对齐的值控件会压住标签(Mac 截图)
|
||||
// 「本层」三行 + 放弃上方的短句,按守护者打倒没有分两套(已打倒时放弃不丢进度:最高通关照记)。已打倒的三句各占一整行,写进左边的标签控件、值留空
|
||||
|
||||
@@ -28,6 +28,8 @@ run: \
|
||||
$(B)/t_oe \
|
||||
$(B)/t_padmap \
|
||||
$(B)/t_rift_clock \
|
||||
$(B)/t_rift_next \
|
||||
$(B)/t_rift_oldrun \
|
||||
$(B)/t_romfs_validate \
|
||||
$(B)/t_rwlv \
|
||||
$(B)/t_swkbd \
|
||||
@@ -44,6 +46,8 @@ run: \
|
||||
python3 ../../i18n/scan_literals.py
|
||||
$(B)/t_thread_leak
|
||||
$(B)/t_rift_clock
|
||||
$(B)/t_rift_next
|
||||
$(B)/t_rift_oldrun
|
||||
$(B)/t_textbox
|
||||
$(B)/t_rwlv
|
||||
$(B)/t_touch
|
||||
@@ -142,5 +146,9 @@ $(B)/t_target_rank: t_target_rank.c ../hle_target.c ../dm.h | $(B)
|
||||
clang -O1 -Wno-unused-function -I.. -o $@ t_target_rank.c ../hle_target.c
|
||||
$(B)/t_rift_clock: t_rift_clock.c ../dm_rift.c ../dm_rift.h ../hle_os.c ../hle.h ../dm.h | $(B)
|
||||
clang -O1 -Wall -Wno-unused-function -ffunction-sections -fdata-sections -Wl,-dead_strip -I.. -o $@ t_rift_clock.c ../hle_os.c
|
||||
$(B)/t_rift_next: t_rift_next.c ../dm_rift.c ../dm_rift.h ../hle_os.c ../hle.h ../dm.h | $(B)
|
||||
clang -O1 -Wall -Wno-unused-function -ffunction-sections -fdata-sections -Wl,-dead_strip -I.. -o $@ t_rift_next.c ../hle_os.c
|
||||
$(B)/t_rift_oldrun: t_rift_oldrun.c ../dm_rift.c ../dm_rift.h ../hle_os.c ../hle.h ../dm.h | $(B)
|
||||
clang -O1 -Wall -Wno-unused-function -ffunction-sections -fdata-sections -Wl,-dead_strip -I.. -o $@ t_rift_oldrun.c ../hle_os.c
|
||||
$(B)/t_thread_leak: t_thread_leak.c ../thread.c ../dm.h | $(B)
|
||||
clang -O1 -Wall -Wno-unused-function -I.. -I../../ios/Sources -o $@ t_thread_leak.c
|
||||
|
||||
@@ -41,7 +41,7 @@ else:
|
||||
|
||||
# ---- 2 ----
|
||||
PADMODE = {'host/dm_cursor.c': 9, 'host/dm_custom.c': 2, 'host/dm_kills.c': 2, 'host/dm_rift_ui.c': 4, 'host/dm_runeword.c': 3, 'host/dm_vault_ui.c': 1, 'host/dm_update.c': 2, 'host/hle_tact.c': 1}
|
||||
AUTOKEY = {'host/dm_cursor.c': 38, 'host/dm_rift_ui.c': 6, 'host/hle_hid.c': 2, 'ios/Sources/front_ios.m': 4}
|
||||
AUTOKEY = {'host/dm_cursor.c': 38, 'host/dm_rift_ui.c': 8, 'host/hle_hid.c': 2, 'ios/Sources/front_ios.m': 4}
|
||||
def count(pat, skip_defs):
|
||||
out = {}
|
||||
for f in sorted(glob.glob(os.path.join(root, 'host', '*.c')) + glob.glob(os.path.join(root, 'ios', 'Sources', '*.m')) + glob.glob(os.path.join(root, 'ios', 'Sources', '*.c'))):
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// 秘境「下一层」层号的单测(公开仓库 第 100 层限时通关后顶部条写「下次第 103 层」):直接包含真的 dm_rift.c,不调任何原版地址。
|
||||
// 要证明的事:算下一层只有宿主一处、封顶 100;顶部进度条拿到的 next 就是这个数(显示方不再自己用 tier + inc 算)。
|
||||
// 期望值手写:下一层 = min(层 + 晋级量, 100),晋级量 0(超时)时等于本层。逐格列出,不用被测公式生成。
|
||||
// 不覆盖:屏上那行字选哪一句(在 iOS 壳 dm_rift_hud.m 里:next > tier → 「下次第 N 层」;晋级了但 next = tier → 「已通关最高层」;没晋级 → 「下次仍是这一层」)。
|
||||
// Unit test for the rift "next level" number (after a timed clear of level 100 the top bar wrote "next: level 103"): includes the real dm_rift.c directly and calls no original address.
|
||||
// What is to be proved: the next level is computed in one place in the host and capped at 100; the next the top progress bar receives is that number (the display no longer computes tier + inc itself).
|
||||
// Expected values are written by hand: next level = min(level + increase, 100), equal to this level when the increase is 0 (overtime). Listed cell by cell, not generated with the formula under test.
|
||||
// Not covered: which sentence the line on screen picks (in the iOS shell's dm_rift_hud.m: next > tier -> "next: level N"; advanced but next = tier -> "highest level cleared"; not advanced -> "next: this level again").
|
||||
#include "../dm_rift.c"
|
||||
|
||||
void (*g_dm_pre_commit_hook[4])(const char *);
|
||||
uint64_t dm_fs_commit_count(void) { return 0; }
|
||||
|
||||
int main(void) {
|
||||
static const struct { int tier, inc, want; } c[] = {
|
||||
{ 1, 0, 1 }, { 1, 1, 2 }, { 1, 2, 3 }, { 1, 3, 4 },
|
||||
{ 96, 3, 99 }, { 97, 0, 97 }, { 97, 1, 98 }, { 97, 2, 99 }, { 97, 3, 100 },
|
||||
{ 98, 0, 98 }, { 98, 1, 99 }, { 98, 2, 100 }, { 98, 3, 100 },
|
||||
{ 99, 0, 99 }, { 99, 1, 100 }, { 99, 2, 100 }, { 99, 3, 100 },
|
||||
{ 100, 0, 100 }, { 100, 1, 100 }, { 100, 2, 100 }, { 100, 3, 100 },
|
||||
};
|
||||
int fails = 0, n = (int)(sizeof c / sizeof *c);
|
||||
atomic_store(&K.st, ST_DONE);
|
||||
for (int i = 0; i < n; i++) {
|
||||
K.tier = c[i].tier; K.inc = c[i].inc; dm_rift_hud_t h = {0}; int ok = dm_rift_hud(&h);
|
||||
if (!ok || next_tier() != c[i].want || h.next != c[i].want || h.next > 100 || h.tier != c[i].tier || h.inc != c[i].inc) {
|
||||
fails++; printf(" ✗ 第 %d 层 晋级 %d:下一层应为 %d,宿主 %d、顶部条 %d(取到 %d)\n", c[i].tier, c[i].inc, c[i].want, next_tier(), h.next, ok); }
|
||||
}
|
||||
// 生命基础项的可写上限(hp_base_limit):写到这个数时,合计 = 基础 × (合计 ÷ 基础) 不能过属性上限 0x7fffff00 = 2147483392。期望值手算:
|
||||
// 没加成(合计 = 基础)→ 2147483392;+77%(1000 / 1770)→ 2147483392 × 1000 ÷ 1770 = 1213267453;+100%(256 / 512)→ 1073741696;
|
||||
// 随从实例(基础 27000 点 = 6912000,合计 47790 点 = 12234240)→ 1213267453;减益(合计小于基础)与读不到基础项(0)→ 2147483392
|
||||
// The writable limit of the life base entry (hp_base_limit): when written to this number, the total = base x (total / base) must not exceed the stat limit 0x7fffff00 = 2147483392. Expected values worked out by hand:
|
||||
// no bonus (total = base) -> 2147483392; +77% (1000 / 1770) -> 2147483392 x 1000 / 1770 = 1213267453; +100% (256 / 512) -> 1073741696;
|
||||
// a minion instance (base 27000 points = 6912000, total 47790 points = 12234240) -> 1213267453; a debuff (total smaller than base) and an unreadable base entry (0) -> 2147483392
|
||||
static const struct { int base, full; long long want; } hc[] = {
|
||||
{ 2147483392, 2147483392, 2147483392LL }, { 1000, 1770, 1213267453LL }, { 256, 512, 1073741696LL },
|
||||
{ 6912000, 12234240, 1213267453LL }, { 100, 90, 2147483392LL }, { 0, 500, 2147483392LL },
|
||||
};
|
||||
int hn = (int)(sizeof hc / sizeof *hc);
|
||||
for (int i = 0; i < hn; i++) { long long got = hp_base_limit(hc[i].base, hc[i].full), tot = hc[i].base > 0 ? got * hc[i].full / hc[i].base : got;
|
||||
if (got != hc[i].want || (hc[i].full > hc[i].base && hc[i].base > 0 && tot > 2147483392LL)) { fails++; printf(" ✗ 基础 %d 合计 %d:可写上限应为 %lld,得 %lld(写满后合计 %lld)\n", hc[i].base, hc[i].full, hc[i].want, got, tot); } }
|
||||
printf("hp_base_limit %s:%d 格,带百分比加成时写满基础项合计不过属性上限\n", fails ? "失败" : "OK", hn);
|
||||
printf("t_rift_next %s:%d 格(层 × 晋级量)下一层 = 手写期望且 ≤ 100,宿主与顶部条同值\n", fails ? "失败" : "OK", n);
|
||||
return fails != 0;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// 秘境「有没有可回去的场」与新局重置的单测(公开仓库 里与玩法无关的两处):直接包含真的 dm_rift.c,不调任何原版地址。
|
||||
// 要证明的事:
|
||||
// 1. 城里入口给哪一页只看「状态 + 旧场位置」,不看守护者处那扇门的单位号:打完了、位置记着、门没开出来(单位号 0)→ 仍给「继续 / 放弃」页(原先给选层页,回不去捡东西);
|
||||
// 打完了但位置没记(结算时读不到玩家位置)→ 选层页,哪怕门的单位号非 0。
|
||||
// 2. 新局重置把上一局留下的 开始 / 继续 / 放弃 请求和待开的页都清掉。
|
||||
// 期望值按规则手写。不覆盖:真局里「继续」落回旧场位置、开新场 / 放弃时清位置(那两处在 start_rift / dm_rift_tick 里,要真局)。
|
||||
// Unit test for the rift's "is there a run to go back to" and the new-game reset: includes the real dm_rift.c directly and calls no original address.
|
||||
// What is to be proved:
|
||||
// 1. Which page the town entrance gives depends only on "state + the old run's position", not on the unit id of the door at the Guardian: finished, position recorded, door not placed (unit id 0) -> still the "Continue / Abandon" page (it used to give level selection, with no way back to pick things up);
|
||||
// finished but position not recorded (the player's position could not be read at completion) -> level selection, even if the door's unit id is non-zero.
|
||||
// 2. The new-game reset clears the start / continue / abandon requests and the pending page left by the previous game.
|
||||
// Expected values written by hand from the rules. Not covered: "Continue" landing back at the old run's position in a real game, and clearing the position when a new run starts / on abandon (those two are in start_rift / dm_rift_tick and need a real game).
|
||||
#include "../dm_rift.c"
|
||||
|
||||
void (*g_dm_pre_commit_hook[4])(const char *);
|
||||
uint64_t dm_fs_commit_count(void) { return 0; }
|
||||
|
||||
int main(void) {
|
||||
static const struct { int st, nd_lv; unsigned next_door; int want; const char *what; } c[] = {
|
||||
{ ST_IDLE, 0, 0, MENU_SELECT, "没在打" }, { ST_IDLE, 120, 5, MENU_SELECT, "没在打(位置与门号是残留)" },
|
||||
{ ST_RUN, 0, 0, MENU_CHOICE, "正在打" },
|
||||
{ ST_DONE, 120, 5, MENU_CHOICE, "打完,位置在,门在" }, { ST_DONE, 120, 0, MENU_CHOICE, "打完,位置在,门没开出来" },
|
||||
{ ST_DONE, 0, 5, MENU_SELECT, "打完,位置没记,门号非 0" }, { ST_DONE, 0, 0, MENU_SELECT, "打完,位置没记,门也没有" },
|
||||
};
|
||||
int fails = 0, n = (int)(sizeof c / sizeof *c);
|
||||
for (int i = 0; i < n; i++) { atomic_store(&K.st, c[i].st); L.nd_lv = c[i].nd_lv; L.next_door = c[i].next_door; dm_rift_menu_t m = {0}; dm_rift_menu_peek(&m);
|
||||
if (town_menu(c[i].st) != c[i].want || m.menu != c[i].want) { fails++; printf(" ✗ %s:应给页 %d,town_menu %d、peek %d\n", c[i].what, c[i].want, town_menu(c[i].st), m.menu); } }
|
||||
atomic_store(&M.req_start, 7); atomic_store(&M.req_cont, 1); atomic_store(&M.req_abandon, 1); atomic_store(&M.menu, MENU_CHOICE); menu_reset();
|
||||
if (atomic_load(&M.req_start) || atomic_load(&M.req_cont) || atomic_load(&M.req_abandon) || atomic_load(&M.menu) != MENU_NONE) { fails++; printf(" ✗ 新局重置后仍有残留:开始 %d 继续 %d 放弃 %d 页 %d\n", atomic_load(&M.req_start), atomic_load(&M.req_cont), atomic_load(&M.req_abandon), atomic_load(&M.menu)); }
|
||||
printf("t_rift_oldrun %s:%d 格城里入口给页 + 新局重置清请求\n", fails ? "失败" : "OK", n);
|
||||
return fails != 0;
|
||||
}
|
||||
+6
-4
@@ -183,13 +183,15 @@ void dm_touch_host_step(uint64_t now, uint64_t *buttons, int32_t *lx, int32_t *l
|
||||
// HUD 上没有对应键的东西(血球、魔球、经验条):吃掉。都吞到抬起为止
|
||||
// Pressed on an entry of the key-hint bar: this is not treated as a click but as pressing that key for 4 ticks (dm_padmode.c); pressed on a skill slot / belt cell / button of the in-game bottom HUD: the corresponding key is held while the mouse is down and released on mouse up (at least 3 ticks);
|
||||
// things on the HUD with no corresponding key (life orb, mana orb, experience bar): swallowed. All are swallowed until release
|
||||
{ uint64_t dm_padmode_legend_click(float, float); int dm_padmode_hud_click(float, float, uint64_t *); static int eat, hold; uint64_t lb = op == 0 ? dm_padmode_legend_click(px, py) : 0, hb = 0; int hk = op == 0 && !lb && in && !g_touch.state.navigation_mode ? dm_padmode_hud_click(px, py, &hb) : 0; /* 有面板开着:不认 HUD(面板底下那排 HUD 还画着) | a panel is open: the HUD is not recognised (the HUD row under the panel is still drawn) */
|
||||
{ uint64_t dm_padmode_legend_click(float, float); int dm_padmode_hud_click(float, float, uint64_t *), dm_game_paused(void); static int eat, hold; uint64_t lb = op == 0 ? dm_padmode_legend_click(px, py) : 0, hb = 0; int hk = op == 0 && !lb && in && !g_touch.state.navigation_mode ? dm_padmode_hud_click(px, py, &hb) : 0; /* 有面板开着:不认 HUD(面板底下那排 HUD 还画着) | a panel is open: the HUD is not recognised (the HUD row under the panel is still drawn) */
|
||||
if (lb) { eat = 1; hold = 0; g_live_btn = lb; g_live_btn_until = touch_cur_tick() + 4; }
|
||||
else if (hk == 1) { eat = 1; hold = 1; g_live_btn = hb; g_live_btn_until = touch_cur_tick() + 30 * 600; }
|
||||
else if (hk == 2) { eat = 1; hold = 0; }
|
||||
// 右上角小地图(同 iOS 壳):点它顶上区域名那一条(矩形高的 1/4)= 切到全屏地图;全屏地图开着时点 HUD 以外的任何地方 = 回到小地图。只在没有面板开着时认
|
||||
// Top-right minimap (same as the iOS shell): clicking the area-name strip at its top (1/4 of the rectangle's height) = switch to the full-screen map; with the full-screen map open, clicking anywhere outside the HUD = back to the minimap. Recognised only when no panel is open
|
||||
else if (op == 0 && in && !g_touch.state.navigation_mode) { int dm_ui_minimap_rect(float r[4]), dm_ui_map_is_full(void); void dm_ui_map_full(int on); float mr[4];
|
||||
// 右上角小地图(同 iOS 壳):点它顶上区域名那一条(矩形高的 1/4)= 切到全屏地图;全屏地图开着时点 HUD 以外的任何地方 = 回到小地图。只在没有面板开着时认:
|
||||
// 手势层按名单认面板,大秘境选层页这类借壳的面板不在名单里(它右上角的关闭 X 正落在地名条的范围内,点 X 变成了切地图),所以再加两条——游戏没停着、这一点不在任何面板里
|
||||
// Top-right minimap (same as the iOS shell): clicking the area-name strip at its top (1/4 of the rectangle's height) = switch to the full-screen map; with the full-screen map open, clicking anywhere outside the HUD = back to the minimap. Recognised only when no panel is open:
|
||||
// the gesture layer recognises panels by a list, and panels that borrow another shell, such as the Greater Rift level-selection page, are not on it (its close X at the top right falls exactly within the area-name strip, so clicking X turned into switching the map), hence two more conditions - the game is not stopped, and this point is not inside any panel
|
||||
else if (op == 0 && in && !g_touch.state.navigation_mode && !dm_game_paused() && dm_ui_item_at_now(px, py) != 0) { int dm_ui_minimap_rect(float r[4]), dm_ui_map_is_full(void); void dm_ui_map_full(int on); float mr[4];
|
||||
if (dm_ui_map_is_full()) { dm_ui_map_full(0); eat = 1; hold = 0; fprintf(stderr, "[dm] 鼠标:全屏地图开着,点一下 → 回到小地图\n"); }
|
||||
else if (dm_ui_minimap_rect(mr)) { float band = (mr[3] - mr[1]) / 4; if (band < 0.042f) band = 0.042f; if (band > (mr[3] - mr[1]) * 0.4f) band = (mr[3] - mr[1]) * 0.4f;
|
||||
if (px >= mr[0] && px <= mr[2] && py >= mr[1] && py <= mr[1] + band) { dm_ui_map_full(1); eat = 1; hold = 0; fprintf(stderr, "[dm] 鼠标:点在小地图顶上那一条 → 切到全屏地图\n"); } } }
|
||||
|
||||
@@ -195,6 +195,10 @@ dmRiftSayLateTown 超时未过关,回城之门已开启 Not cleared. Town Port
|
||||
dmRiftSayLate 超时未过关 Level not cleared 秘境系统提示(dm_rift.c);超时打倒守护者不算过关;英文:not cleared,不用 Failed(没死也没失败,只是不计)
|
||||
dmRiftSayDoneNext 本层完成,下一层之门已开启 Rift complete! Portal opened 秘境系统提示(dm_rift.c);英文:同上;暗黑 3 结算窗口标题原文「GREATER RIFT COMPLETE」/ Urshi 面板标题「RIFT COMPLETE」(游戏内截图 diablo.fandom.com/wiki/File:New_Completion_Rift.jpg、File:UrshiMenu.jpg)
|
||||
dmRiftSayDoneTown 本层完成,回城之门已开启 Complete! Town Portal open 秘境系统提示(dm_rift.c);英文:Town Portal = 暗黑 2 原版 skills[skillan219];暗黑 3 结算窗口标题原文「GREATER RIFT COMPLETE」/ Urshi 面板标题「RIFT COMPLETE」(游戏内截图 diablo.fandom.com/wiki/File:New_Completion_Rift.jpg、File:UrshiMenu.jpg)
|
||||
dmRiftSayTopBoth 最高层通关,重打与回城之门已开启 Top level done! Portals opened 秘境系统提示(dm_rift.c):第 100 层限时内通关,没有下一层,那扇门是重打(公开仓库 / #29);英文:拟
|
||||
dmRiftSayTopNext 最高层通关,重打之门已开启 Top level done! Portal opened 同上,只开出重打那扇门时
|
||||
dmRiftSayTopTown 最高层通关,回城之门已开启 Top level! Town Portal open 同上,只开出回城门时
|
||||
dmRiftSayTop 最高层通关 Top level cleared 同上,两扇门都没开出时
|
||||
dmRiftSayDone 本层完成 Rift complete 秘境系统提示(dm_rift.c);英文:同上;暗黑 3 结算窗口标题原文「GREATER RIFT COMPLETE」/ Urshi 面板标题「RIFT COMPLETE」(游戏内截图 diablo.fandom.com/wiki/File:New_Completion_Rift.jpg、File:UrshiMenu.jpg)
|
||||
dmRiftSayErr 秘境出错了,这次没开 The Rift could not be opened 秘境系统提示(dm_rift.c);英文:拟
|
||||
dmRiftSayStart 第 %d 层开始,限时 15 分钟 Level %d: 15 minute time limit 秘境系统提示(dm_rift.c);英文:Greater Rift level / time limit 取自暗黑 3 官方 2.1.0 补丁说明(news.blizzard.com/en-us/article/14569138)「complete the current Greater Rift level within the designated time limit」
|
||||
@@ -213,6 +217,12 @@ dmRiftCapVoid 本层作废 Run will be lost 大秘境面板(dm_rift_ui.c);
|
||||
dmRiftCapVoidPad 按住 X,本层放弃 Hold X to quit level 大秘境面板进行中页「放弃」钮上方的说明,手柄模式用(dm_rift_ui.c);英文:拟(按钮叫 Quit)
|
||||
dmRiftTitleDone 本层已完成 Rift Complete 大秘境面板(dm_rift_ui.c);英文:见 dmRiftSayDoneBoth;暗黑 3 结算窗口标题原文「GREATER RIFT COMPLETE」/ Urshi 面板标题「RIFT COMPLETE」(游戏内截图 diablo.fandom.com/wiki/File:New_Completion_Rift.jpg、File:UrshiMenu.jpg)
|
||||
dmRiftTitleLate 超时未过关 Time's Up 大秘境面板(dm_rift_ui.c)超时打倒守护者时的标题;英文:拟
|
||||
dmRiftTitleNext 进入下一层? Next Level? 大秘境面板(dm_rift_ui.c)守护者处那扇门的确认页标题(公开仓库);英文:拟
|
||||
dmRiftTitleRetry 重打这一层? Retry Level? 同上,没有更高的层可去时(超时未过关 / 已在最高层);英文:拟
|
||||
dmRiftLeaveWarn1 会离开这一场 Leave this Rift 确认页说明第一行;英文:拟(这一栏中号字约 16 个字符宽,同 dmRiftGuardDown)
|
||||
dmRiftLeaveWarn2 地上的东西不保留 Drops are lost 确认页说明第二行;英文:拟(同上宽度;drops 指掉落物)
|
||||
dmRiftCapStay 关闭本页:留在这里 Close to stay here 确认页上组说明(取消的办法:关面板);英文:拟
|
||||
dmRiftCapGo 进入第 %d 层 Enter Level %d 确认页下组说明(下面的「继续」钮 = 确认);英文:拟
|
||||
dmRiftTitleRun 秘境进行中 Rift in Progress 大秘境面板(dm_rift_ui.c)
|
||||
dmRiftGuardDown 已击败守护者 Guardian slain 大秘境面板(dm_rift_ui.c);英文:slain = 暗黑 2 原版 ui[sysmsg9]「was slain.」;Rift Guardian 见上(此处栏宽放不下全称)
|
||||
dmRiftNextOpen 下一层之门已开启 Next portal open 大秘境面板(dm_rift_ui.c);英文:拟
|
||||
@@ -246,6 +256,7 @@ dmRiftHudDone 第 %d 层完成 Level %d complete 秘境顶部进度条(dm_rift
|
||||
dmRiftHudLate 第 %d 层超时 Level %d overtime 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:拟
|
||||
dmRiftHudGuard 守护者现身 Rift Guardian 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:见 dmRiftSayGuardian
|
||||
dmRiftHudNext 下次第 %d 层 Next: Level %d 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:拟
|
||||
dmRiftHudTop 已通关最高层 Highest level cleared 秘境顶部进度条(dm_rift_hud.m,UIKit):第 100 层限时内通关,没有下一层了(公开仓库);英文:拟
|
||||
dmRiftHudSame 下次仍是这一层 Next: same level 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:拟
|
||||
dmRiftHudKill 击败守护者 Slay the Rift Guardian 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:拟;任务目标原句没查到
|
||||
dmRiftHudGoal 消灭秘境中的怪物 %d%% Slay the monsters %d%% 秘境顶部进度条(dm_rift_hud.m,UIKit);英文:拟;任务目标原句没查到
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 19 and column 70.
|
@@ -75,7 +75,7 @@ void dm_rift_hud_draw(UIView *host, CGRect wr, BOOL hide) {
|
||||
NSString *st = h.done ? (h.inc ? [NSString stringWithFormat:@(dm_ui("dmRiftHudDone")), h.tier] : [NSString stringWithFormat:@(dm_ui("dmRiftHudLate")), h.tier]) : g ? @(dm_ui("dmRiftHudGuard")) : [NSString stringWithFormat:@(dm_ui("dmRiftTierN")), h.tier];
|
||||
set_text(sub, st, d2font(14 * u), white, CGRectMake(48 * u, 9 * u, 130 * u, 19 * u), kCAAlignmentLeft);
|
||||
set_text(timer, [NSString stringWithFormat:@"%d:%02d", s / 60, s % 60], d2font(17 * u), (s <= 60 && !h.done) ? red : gold, CGRectMake(W - 90 * u, 6 * u, 80 * u, 22 * u), kCAAlignmentRight);
|
||||
NSString *gl = h.done ? (h.inc ? [NSString stringWithFormat:@(dm_ui("dmRiftHudNext")), h.tier + h.inc] : @(dm_ui("dmRiftHudSame"))) : g ? @(dm_ui("dmRiftHudKill")) : [NSString stringWithFormat:@(dm_ui("dmRiftHudGoal")), (int)(h.progress * 100)];
|
||||
NSString *gl = h.done ? (!h.inc ? @(dm_ui("dmRiftHudSame")) : h.next > h.tier ? [NSString stringWithFormat:@(dm_ui("dmRiftHudNext")), h.next] : @(dm_ui("dmRiftHudTop"))) : g ? @(dm_ui("dmRiftHudKill")) : [NSString stringWithFormat:@(dm_ui("dmRiftHudGoal")), (int)(h.progress * 100)];
|
||||
set_text(goal, gl, d2font(12 * u), grey, CGRectMake(10 * u, 32 * u, W - 20 * u, 17 * u), kCAAlignmentLeft);
|
||||
CGRect tr = CGRectMake(11 * u, 55 * u, W - 22 * u, 10 * u); // 含 1 单位外框(条 8 + 外框各 1) // 进度条:外框暗边 + 深底,填充金褐(守护者转暗红),每 10% 一道刻痕,两端菱形钉 | Includes the 1-unit outer frame (bar 8 + frame 1 on each side) // Progress bar: dark-edged outer frame + deep background, golden-brown fill (turns dark red for the guardian), a notch every 10%, diamond studs at both ends
|
||||
track.frame = tr; track.backgroundColor = rgb(25, 20, 14, 1).CGColor; track.borderColor = rgb(95, 78, 48, 1).CGColor; track.borderWidth = MAX(1, u);
|
||||
|
||||
+2
-1
@@ -71,7 +71,7 @@ What it can do now:
|
||||
- **Hold to keep walking**: hold the left button and the character keeps walking towards the pointer, following it as it moves. W A S D / the gamepad stick take priority: press a direction key while walking and the keyboard takes over at once.
|
||||
- **Click a target in the world** (NPC, chest, waypoint, item on the ground): the character walks over and interacts. With a panel open, a click outside it only closes the panel.
|
||||
- **Click the bottom row**: a skill icon = use that skill (the same as pressing the key shown under it), a potion cell = drink it, the middle button = open the inventory group of pages, the run / walk button = toggle.
|
||||
- **Click the interface**: buttons, checkboxes and tabs in panels (including the in-page tabs of the skill tree), the pause menu, the settings pages, "Start" on the rift level-selection page.
|
||||
- **Click the interface**: buttons, checkboxes and tabs in panels (including the in-page tabs of the skill tree), the pause menu, the settings pages, and "Start" and the close X on the rift level-selection page.
|
||||
- **Click a key hint at the bottom**: clicking an entry presses that key.
|
||||
- **Click a figure when creating a character**: the class you click is selected.
|
||||
- **Top-right minimap**: opens automatically on entering a game; Tab toggles it; clicking the area name at its top switches to the full-screen map, and another click returns.
|
||||
@@ -135,6 +135,7 @@ After a forced quit or a crash, the system's "reopen windows?" dialog no longer
|
||||
- The five things from the top have not been operated by a person: keyboard keys, a physical gamepad, the resource-folder dialog, ⌘Q and menu clicks, how it feels in the hand. The key mapping was written from the key-code table.
|
||||
- Clicking a monster does not attack; long press / double click / drag / buying on items do not take the mouse; click-to-walk was verified only in the camp (see "Mouse" above).
|
||||
- "Prompts switch back to gamepad letters when a gamepad is used" was verified by simulation; no physical gamepad has been connected.
|
||||
- On a few pages (the rift confirmation page and level-selection page) the key cap drawn inside a button is still the gamepad "A"; press J or Space.
|
||||
- The free town portal on ZR + Space of a gamepad is not there.
|
||||
- The quest bar on the left in rifts is not there.
|
||||
- An App you build yourself has no iCloud save sync; there are no update checks and no sharing of the diagnostic log.
|
||||
|
||||
+2
-1
@@ -71,7 +71,7 @@ DM_MAC_M3=1 dm/tools/mac_app.sh # macOS 15 – 25
|
||||
- **按住一直走**:左键按住不放,角色一直朝鼠标所在的地方走,鼠标挪到哪跟到哪。W A S D / 手柄摇杆优先:走着的时候按方向键,立刻听键盘的。
|
||||
- **点世界里的目标**(NPC、箱子、传送点、地上的物品):走过去交互。面板开着时点面板外只关面板。
|
||||
- **点底部那一排**:技能图标 = 放那个技能(等于按它下面标的键),药水格 = 喝那格药,中间的钮 = 打开物品栏那组页面,跑 / 走钮 = 切换。
|
||||
- **点界面**:面板里的按钮、勾选框、页签(含技能树页里的分页)、暂停菜单、设置页、秘境选层页的「开始」。
|
||||
- **点界面**:面板里的按钮、勾选框、页签(含技能树页里的分页)、暂停菜单、设置页、秘境选层页的「开始」与右上角的关闭 X。
|
||||
- **点底部的按键提示**:点哪一条,等于按那个键。
|
||||
- **建角时点人物**:点哪个职业的人物就选哪个。
|
||||
- **右上角小地图**:进局自动打开,按 Tab 开 / 关;点它顶上的地名那一条 = 切到全屏地图,再点一下回来。
|
||||
@@ -135,6 +135,7 @@ DM_MAC_M3=1 dm/tools/mac_app.sh # macOS 15 – 25
|
||||
- 开头说的五项未经真人操作:键盘按键、实体手柄、选资源文件夹的对话框、⌘Q 与菜单点击、真人手感。键位是照键码表写的。
|
||||
- 鼠标点怪攻击没有;物品的长按 / 双击 / 拖放 / 购买不认鼠标;点地走只在营地验过(见上面「鼠标」一节)。
|
||||
- 「接上手柄提示换回手柄字母」是模拟验的,实体手柄没接过。
|
||||
- 个别页面(秘境的确认页、选层页)按钮里画的键帽还是手柄的「A」,实际按 J 或空格即可。
|
||||
- 手柄上 ZR 空格的免费回城没有。
|
||||
- 秘境左侧的任务栏没有。
|
||||
- 自己构建的 App 没有 iCloud 存档同步;没有更新检查和分享诊断日志。
|
||||
|
||||
Reference in New Issue
Block a user