Browse Source

Make place names translate

Marrub 1 year ago
parent
commit
f6abfc7b8e
6 changed files with 17 additions and 6 deletions
  1. 1
    0
      .gitignore
  2. 3
    1
      src/g_stage.c
  3. 1
    1
      src/g_stage.h
  4. 3
    4
      src/r_draw.c
  5. 5
    0
      text/place-eng.nts
  6. 4
    0
      text/place-jpn.nts

+ 1
- 0
.gitignore View File

@@ -1,6 +1,7 @@
1 1
 bin
2 2
 doc
3 3
 ir
4
+opts
4 5
 src_crap
5 6
 data*/codedefs
6 7
 data*/fonts

+ 3
- 1
src/g_stage.c View File

@@ -13,7 +13,7 @@
13 13
 
14 14
 // Extern Objects ------------------------------------------------------------|
15 15
 
16
-char const   *G_Place = u8"地球軌道・朝";
16
+__str         G_Place = s"place/default";
17 17
 unsigned long G_Time;
18 18
 
19 19
 // Static Functions ----------------------------------------------------------|
@@ -130,6 +130,8 @@ void G_Stage_Run(unsigned stagenum)
130 130
 {
131 131
    printf("Stage: Beginning stage %u.\n", stagenum);
132 132
 
133
+   G_Place = M_StrCreate(M_StrFmt("place/stage%u", stagenum));
134
+
133 135
    G_stage s = G_Stage_LoadMap(M_StrFmt("maps/stage%u.gmf0", stagenum));
134 136
    size_t i;
135 137
 

+ 1
- 1
src/g_stage.h View File

@@ -41,7 +41,7 @@ typedef struct G_stage
41 41
 
42 42
 // Extern Objects ------------------------------------------------------------|
43 43
 
44
-extern char const   *G_Place;
44
+extern __str         G_Place;
45 45
 extern long unsigned G_Time;
46 46
 
47 47
 // Extern Functions ----------------------------------------------------------|

+ 3
- 4
src/r_draw.c View File

@@ -58,7 +58,7 @@ void R_DrawPost(ulfra delta)
58 58
 
59 59
    DGE_Font_Bind(DGE_Font_Get(s"base"));
60 60
    DGE_Draw_SetTextAlign(DGE_Align_Center, DGE_Align_Top);
61
-   DGE_Draw_Text(760, 20, G_Place);
61
+   DGE_Draw_Text(760, 20, M_StrGet(G_Place));
62 62
 
63 63
    DGE_Draw_SetTextAlign(DGE_Align_Left);
64 64
    DGE_Draw_Text(585, 70, M_StrGet(s"gui/highscore"));
@@ -68,13 +68,12 @@ void R_DrawPost(ulfra delta)
68 68
    for(int i = 0; i < G_Player_Count; i++)
69 69
    {
70 70
       DGE_Draw_SetTextAlign(DGE_Align_Left);
71
-      DGE_Draw_Text(585, 120 + i * 20,
72
-         M_StrFmt(M_StrGet(s"gui/player"), i + 1));
71
+      DGE_Draw_Text(585, 120 + i * 20, M_StrFmt(M_StrGet(s"gui/player"), i+1));
73 72
       DGE_Draw_SetTextAlign(DGE_Align_Right);
74 73
       DGE_Draw_Text(945, 140 + i * 20, M_StrFmt("%.15i\n%i", 0, 5));
75 74
    }
76 75
 
77
-   //R_drawHitboxes();
76
+   R_drawHitboxes();
78 77
 }
79 78
 
80 79
 // EOF

+ 5
- 0
text/place-eng.nts View File

@@ -0,0 +1,5 @@
1
+language eng
2
+{
3
+   place/default = "Default place";
4
+   place/stage1 = "Low Earth Orbit - Morning";
5
+}

+ 4
- 0
text/place-jpn.nts View File

@@ -0,0 +1,4 @@
1
+language jpn
2
+{
3
+   place/stage1 = "地球軌道・朝";
4
+}

Loading…
Cancel
Save