Skip to content

Commit b64b4de

Browse files
为游戏场景添加了一点颜色以及微小的字符串修改
1 parent 2eff592 commit b64b4de

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

source/runtime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ int EngineNcursesInit(struct WarmRuntime *runtime)
8484
start_color();
8585
init_pair(kColorTest, COLOR_YELLOW, COLOR_BLUE);
8686
init_pair(kColorDangerRed, COLOR_RED, COLOR_BLACK);
87+
init_pair(kColorFlowerYellow, COLOR_YELLOW, COLOR_BLACK);
88+
init_pair(kColorAdminMessage, COLOR_MAGENTA, COLOR_BLACK);
8789
}
8890

8991
// maximum terminal size

source/runtime.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ enum WarmProgramExitErrorCode {
2424
enum WarmNcursesColorId {
2525
kColorTest = 1,
2626
kColorDangerRed,
27+
kColorFlowerYellow,
28+
kColorAdminMessage,
2729
};
2830

2931
int EngineRuntimeInit(struct WarmRuntime *runtime);

source/scene/shark_roulette.c

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ int SceneStart_SharkRoulette(struct WarmRuntime *runtime, WINDOW *win)
9393
}
9494
}
9595

96-
dialogue.text = "> 都是些有趣的生物呐(歪头笑) <";
96+
dialogue.text = "> 都是些有趣的生物呐(歪头笑)";
97+
dialogue.attribute = COLOR_PAIR(kColorAdminMessage);
9798
DialoguePrintCenter(runtime, win, &dialogue, cache.key_event);
9899

99100
return 0;
@@ -182,6 +183,7 @@ static int ChapterIntroduction_(struct WarmRuntime *runtime, WINDOW *win)
182183
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
183184

184185
dialogue.text = "> 所以... 游戏要开始咯";
186+
dialogue.attribute = COLOR_PAIR(kColorAdminMessage);
185187
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
186188

187189
return 0;
@@ -225,10 +227,12 @@ static int ChapterShootingFromPlayer_(struct WarmRuntime *runtime, WINDOW *win)
225227
dialogue.text = "> 作为一个从各个方面都绝对的第三者和创造者... 这样是不是有点太无情了呢";
226228
break;
227229
default:
228-
dialogue.text = "[Game: rand() Error]";
230+
dialogue.text = "[Error: Form rand()]";
231+
WarmLog_WarningLn(runtime, module_tag, "ChapterShootingFromPlayer_(): rand() Error, unexpected result");
229232
break;
230233
}
231234
dialogue.type = kDialogueTypeStatic;
235+
dialogue.attribute = COLOR_PAIR(kColorAdminMessage);
232236
dialogue.wait_key = false;
233237
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
234238

@@ -284,19 +288,16 @@ static int ChapterShootingFromPlayer_(struct WarmRuntime *runtime, WINDOW *win)
284288
break;
285289
case 1:
286290
dialogue.type = kDialogueTypeStatic;
287-
dialogue.text = "你对着小鲨鱼扣动了扳机";
288-
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
289-
290-
dialogue.type = kDialogueTypeStatic;
291-
dialogue.text = ",这一行为甚至没有让你产生任何负罪感";
291+
dialogue.text = "你对着小鲨鱼扣动了扳机,这一行为甚至没有让你产生任何负罪感";
292292
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
293293

294294
dialogue.type = kDialogueTypeWindowReset;
295295
dialogue.text = "。好吧,我猜的";
296296
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
297297

298298
if (cache.current_cycle == cache.live_ammunition) {
299-
dialogue.text = "噗";
299+
dialogue.text = "噗~";
300+
dialogue.attribute = COLOR_PAIR(kColorFlowerYellow);
300301
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
301302

302303
dialogue.text = "枪口伸出了一朵小黄花,花芯是须状的,这并不是你在外面发现的那朵花";
@@ -311,7 +312,8 @@ static int ChapterShootingFromPlayer_(struct WarmRuntime *runtime, WINDOW *win)
311312
dialogue.text = "这是弟切草";
312313
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
313314

314-
dialogue.text = "你知道弟切草的花语吗?";
315+
dialogue.text = "> 你知道弟切草的花语吗?";
316+
dialogue.attribute = COLOR_PAIR(kColorAdminMessage);
315317
Dialogue2PrintText(runtime, win, &dialogue, cache.key_event);
316318

317319
dialogue.text = "结局-2:弟切草";
@@ -372,7 +374,8 @@ static int ChapterShootingFromShark_(struct WarmRuntime *runtime, WINDOW *win)
372374
dialogue.position_y += 1;
373375

374376
dialogue.type = kDialogueTypeWindowReset;
375-
dialogue.text = "> 是的,一颗苹果 <";
377+
dialogue.text = "> 是的,一颗苹果哦";
378+
dialogue.attribute = COLOR_PAIR(kColorAdminMessage);
376379
DialoguePrintCenter(runtime, win, &dialogue, cache.key_event);
377380

378381
return 1;

0 commit comments

Comments
 (0)