Skip to content

Commit 7c27283

Browse files
committed
Say replay, not restart
1 parent 18c5fc7 commit 7c27283

18 files changed

+32
-32
lines changed

Diff for: Changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Audio filenames can now be quoted, to support filenames with characters
66
outside the range `a-zA-Z0-9_`. Audio files can also be given including
77
their extension.
8-
* Support for the `stop` and `restart` codes (generated by default)
8+
* Support for the `stop` and `replay` codes (generated by default)
99
* The `set-language` command truncates long language names (like `ITALIAN`)
1010
automatically.
1111
* The output of `tttool export` has the YAML fields in a more sensible order

Diff for: GME-Format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Example from Puzzle Ponyhof:
186186
0x00F05E60: 00 00 00 00 00 00 00 00 01 00 66 18
187187
pp pp pp pp pp pp pp pp ff ff gg gg
188188

189-
a: OID for the Restart symbol
189+
a: OID for the Replay symbol
190190
b: OID for the Stop symbol
191191
c: unknown, seems to be the OID for Skip symbol (needs to be confirmed)
192192
d: unknown

Diff for: book/erste-schritte.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Nun brauchst du noch den zugehörigen Ausdruck mit den Punktmustern. Auch hier m
125125
126126
erstellt dir das ``tttool`` die Datei ``tic-tac-tiptoi.pdf``, die alle
127127
Punktmuster für dein Werk in einer nüchternen, aber praktischen Tabelle
128-
enthält. Du siehst dort neben dem Feld für ``feldOL`` auch eines mit der Beschriftung ``START``, dem Anschaltzeichen für dein Produkt, sowie ``RESTART`` und ``STOP``, die man erstmal ignorieren darf.
128+
enthält. Du siehst dort neben dem Feld für ``feldOL`` auch eines mit der Beschriftung ``START``, dem Anschaltzeichen für dein Produkt, sowie ``REPLAY`` und ``STOP``, die man erstmal ignorieren darf.
129129

130130
Wenn du diese Datei nun ausdruckst, mit dem Stift auf das Anschaltzeichen gehst, und danach auf das andere Feld, solltest du eine Roboterstimme hören, die „Du hast oben links hingetippt.“ sagt.
131131

Diff for: book/tttool-referenz.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Aber oft willst du einfach alle Codes eines GME-Projektes erzeugen. Dazu kannst
8484

8585
$ tttool oid-codes example.yaml
8686
Writing oid-42-START.png.. (Code 42, raw code 272)
87-
Writing oid-42-RESTART.png.. (Code 13445, raw code 9250)
87+
Writing oid-42-REPLAY.png.. (Code 13445, raw code 9250)
8888
Writing oid-42-STOP.png.. (Code 13446, raw code 9251)
8989
Writing oid-42-8065.png.. (Code 8065, raw code 3700)
9090
Writing oid-42-8066.png.. (Code 8066, raw code 3701)
@@ -94,7 +94,7 @@ Die erste Zahl im Dateinamen ist die Produkt-ID des Projekts, was dir helfen sol
9494

9595
$ tttool oid-codes example2.yaml
9696
Writing oid-42-START.png.. (Code 42, raw code 272)
97-
Writing oid-42-RESTART.png.. (Code 13445, raw code 9250)
97+
Writing oid-42-REPLAY.png.. (Code 13445, raw code 9250)
9898
Writing oid-42-STOP.png.. (Code 13446, raw code 9251)
9999
Writing oid-42-conditional.png.. (Code 13447, raw code 9252)
100100
Writing oid-42-hello.png.. (Code 13448, raw code 9253)

Diff for: book/yaml-referenz.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ eigentliche YAML-Datei zu übernehmen.
263263
die beiden Varianten nicht mischen.
264264

265265

266-
``restart``
266+
``replay``
267267
^^^^^^^^^^^
268268

269269
Format:
@@ -272,13 +272,13 @@ Format:
272272
Beispiel:
273273
.. code:: yaml
274274
275-
restart: 12159
275+
replay: 12159
276276
277277
Zweck:
278278
Beim Tippen auf diesen Code wird das zuletzt ausgegebene Audio nochmal ausgegeben.
279279

280280

281-
Auch wenn man diesen dies nicht explizit in der .yaml-Datei notiert, weist das ``tttool`` einen solchen Code zu, und erzeugt ein ``RESTART``-Muster aus.
281+
Auch wenn man diesen dies nicht explizit in der .yaml-Datei notiert, weist das ``tttool`` einen solchen Code zu, und erzeugt ein ``REPLAY``-Muster aus.
282282

283283
``stop``
284284
^^^^^^^^^^^

Diff for: src/Commands.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ codesOfFile inf = do
292292
writeTipToiCodeYaml inf tty codeMap totalMap
293293
return $ (ttProductId tt,
294294
[ ("START", fromIntegral (ttProductId tt)) ] ++
295-
[ ("RESTART", fromIntegral id) | Just id <- pure $ ttcRestart totalMap ] ++
296-
[ ("STOP", fromIntegral id) | Just id <- pure $ ttcStop totalMap ] ++
295+
[ ("REPLAY", fromIntegral id) | Just id <- pure $ ttcReplay totalMap ] ++
296+
[ ("STOP", fromIntegral id) | Just id <- pure $ ttcStop totalMap ] ++
297297
sort (M.toList (ttcScriptCodes totalMap))
298298
)
299299
where

Diff for: src/GMEWriter.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -368,8 +368,8 @@ putAudioTable x as = mapFstMapSnd
368368
putSpecialSymbols :: Maybe (Word16, Word16) -> SPut
369369
putSpecialSymbols Nothing =
370370
replicateM_ 20 $ putWord16 0
371-
putSpecialSymbols (Just (restart, stop)) = do
372-
putWord16 restart
371+
putSpecialSymbols (Just (replay, stop)) = do
372+
putWord16 replay
373373
putWord16 stop
374374
replicateM_ 20 $ putWord16 0
375375

Diff for: src/TipToiYaml.hs

+10-10
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@ data TipToiYAML = TipToiYAML
6666
, ttySpeak :: Maybe (OptArray SpeakSpec)
6767
, ttyLanguage :: Maybe Language
6868
, ttyGames :: Maybe [GameYaml]
69-
, ttyRestart :: Maybe Word16
69+
, ttyReplay :: Maybe Word16
7070
, ttyStop :: Maybe Word16
7171
}
7272
deriving Generic
7373

7474
data TipToiCodesYAML = TipToiCodesYAML
7575
{ ttcScriptCodes :: CodeMap
76-
, ttcRestart :: Maybe Word16
76+
, ttcReplay :: Maybe Word16
7777
, ttcStop :: Maybe Word16
7878
}
7979
deriving (Eq, Generic)
@@ -314,7 +314,7 @@ tt2ttYaml path TipToiFile{..} = TipToiYAML
314314
, ttySpeak = Nothing
315315
, ttyLanguage = Nothing
316316
, ttyGames = list2Maybe $ map game2gameYaml ttGames
317-
, ttyRestart = fmap fst ttSpecialOIDs
317+
, ttyReplay = fmap fst ttSpecialOIDs
318318
, ttyStop = fmap snd ttSpecialOIDs
319319
}
320320

@@ -695,15 +695,15 @@ scriptCodes codes givenCodes productId
695695
(strs, nums) = partitionEithers $ map f codes
696696
newStrs = filter (`M.notMember` ttcScriptCodes givenCodes) strs
697697
usedCodes = S.fromList $
698-
maybeToList (ttcRestart givenCodes) ++
698+
maybeToList (ttcReplay givenCodes) ++
699699
maybeToList (ttcStop givenCodes) ++
700700
M.elems (ttcScriptCodes givenCodes)
701701

702702
f s = case readMaybe s of
703703
Nothing -> Left s
704704
Just n -> Right (n::Word16)
705705

706-
restartCode : stopCode : availableCodes =
706+
replayCode : stopCode : availableCodes =
707707
filter (`S.notMember` usedCodes) $
708708
codesFor productId
709709

@@ -719,7 +719,7 @@ scriptCodes codes givenCodes productId
719719

720720
allCodes = TipToiCodesYAML
721721
{ ttcScriptCodes = totalMap
722-
, ttcRestart = ttcRestart givenCodes `mplus` Just restartCode
722+
, ttcReplay = ttcReplay givenCodes `mplus` Just replayCode
723723
, ttcStop = ttcStop givenCodes `mplus` Just stopCode
724724
}
725725

@@ -785,7 +785,7 @@ ttYaml2tt no_date dir (TipToiYAML {..}) extCodes = do
785785
let givenCodes = TipToiCodesYAML
786786
{ ttcScriptCodes =
787787
M.unionWithKey mergeOnlyEqual (ttcScriptCodes extCodes) (fromMaybe M.empty ttyScriptCodes)
788-
, ttcRestart = mergeEqualMaybe "restart" (ttcRestart extCodes) ttyRestart
788+
, ttcReplay = mergeEqualMaybe "replay" (ttcReplay extCodes) ttyReplay
789789
, ttcStop = mergeEqualMaybe "stop" (ttcStop extCodes) ttyStop
790790
}
791791

@@ -893,7 +893,7 @@ ttYaml2tt no_date dir (TipToiYAML {..}) extCodes = do
893893
, ttBinaries5 = []
894894
, ttBinaries6 = []
895895
, ttSpecialOIDs = Just
896-
( fromMaybe 0 (ttcRestart assignedCodes)
896+
( fromMaybe 0 (ttcReplay assignedCodes)
897897
, fromMaybe 0 (ttcStop assignedCodes)
898898
) -- a bit fishy, this juggling of maybes
899899
}, assignedCodes)
@@ -1109,7 +1109,7 @@ writeTipToiCodeYaml inf tty oldCodeYaml allCodes = do
11091109

11101110
let newCodeYaml = TipToiCodesYAML
11111111
{ ttcScriptCodes = newCodeMap
1112-
, ttcRestart = if isJust (ttcRestart allCodes) && ttcRestart allCodes /= ttyRestart tty then ttcRestart allCodes else Nothing
1112+
, ttcReplay = if isJust (ttcReplay allCodes) && ttcReplay allCodes /= ttyReplay tty then ttcReplay allCodes else Nothing
11131113
, ttcStop = if isJust (ttcStop allCodes) && ttcStop allCodes /= ttyStop tty then ttcStop allCodes else Nothing
11141114
}
11151115

@@ -1162,7 +1162,7 @@ debugGame productID = do
11621162
]
11631163
, ttyLanguage = Nothing
11641164
, ttyGames = Nothing
1165-
, ttyRestart = Nothing
1165+
, ttyReplay = Nothing
11661166
, ttyStop = Nothing
11671167
}
11681168
where
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0fd54c3bbb1a88b494972a2547b08f9f output/downloaded/Alle meine Tiere.gme.yaml
1+
b8d364d85b18b7af68537782f90b5dad output/downloaded/Alle meine Tiere.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e2f933effc132ed235888e4f0bf22e8f output/downloaded/Dein Koerper und Du.gme.yaml
1+
6145ef87ab3ed2c21bfdb7acff9d6554 output/downloaded/Dein Koerper und Du.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
61a09460d93d53c8c5383248973bf1a7 output/downloaded/Duell-der-Superquizzer.gme.yaml
1+
35cc30d987a9794f9f6d6af839caf457 output/downloaded/Duell-der-Superquizzer.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0a99dc6315e77ff0efb0c91928480327 output/downloaded/Expedition Wissen - Aegypten.gme.yaml
1+
3f5955cbcf2a9ab1cd08b775fc3b4698 output/downloaded/Expedition Wissen - Aegypten.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dafec43004052b310638581994076b1a output/downloaded/Leserabe Drache.gme.yaml
1+
1ecc247aa79e0f300ca3b482ef7b8a89 output/downloaded/Leserabe Drache.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d07aa7d8a23e0c44434ef65480a2cdc2 output/downloaded/Pocket Wissen - Baustellenfahrzeuge.gme.yaml
1+
15b6e65429c2880108cd12642b3a418d output/downloaded/Pocket Wissen - Baustellenfahrzeuge.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f5e67b74de9ab84284e8774c18f8676b output/downloaded/Sprichst_Du_Englisch.gme.yaml
1+
f3b669b4c86292c5d312888ada77c034 output/downloaded/Sprichst_Du_Englisch.gme.yaml
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6f5bf51d420207eab67410815c9e0040 output/downloaded/WWW Ritter.gme.yaml
1+
4f6157b8fd374361e54ff617868db893 output/downloaded/WWW Ritter.gme.yaml
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b249ea76eb99cb6871e94c560b029e54 output/downloaded/WWW Weltatlas.gme.yaml
1+
a76a350d385c46f1e835b3ba0fdd546a output/downloaded/WWW Weltatlas.gme.yaml

Diff for: testsuite/expected/example.rexport.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ scripts:
1515
- $1==2? P(5)
1616
- $1==3? P(4)
1717
- $1!=1? $1!=2? $1!=3? $1:=0 P(0)
18-
restart: 13445
18+
replay: 13445
1919
stop: 13446

0 commit comments

Comments
 (0)