Under oldstyle, mangled echoed unknown text to simulate old behavior.
This commit is contained in:
parent
c8f3289828
commit
df87c596fb
4 changed files with 31 additions and 7 deletions
|
@ -43,7 +43,8 @@ There have been no gameplay changes.
|
|||
-r:: Restore game from specified file
|
||||
|
||||
-o:: Old-style. Restores original interface, no prompt or line editing.
|
||||
Also ignores new-school one-letter commands l, x, g, z, i.
|
||||
Also ignores new-school one-letter commands l, x, g, z, i. Also
|
||||
case-smashes and truncates unrecognized text when echoed.
|
||||
|
||||
== BUGS ==
|
||||
|
||||
|
|
22
misc.c
22
misc.c
|
@ -102,6 +102,28 @@ void tokenize(char* raw, struct command_t *cmd)
|
|||
// pack the substrings
|
||||
cmd->wd1 = token_to_packed(cmd->raw1);
|
||||
cmd->wd2 = token_to_packed(cmd->raw2);
|
||||
|
||||
/* (ESR) In oldstyle mode, simulate the uppercasing and truncating
|
||||
* effect on raw tokens of packing them into sixbit characters, 5
|
||||
* to a 32-bit word. This is something the FORTRAN version did
|
||||
* becuse archaic FORTRAN had no string types. Don Wood's
|
||||
* mechanical translation of 2.5 to C retained the packing and
|
||||
* thus this misfeature.
|
||||
*
|
||||
* It's philosophically questionable whether this is the right
|
||||
* thing to do even in oldstyle mode. On one hand, the text
|
||||
* mangling was not authorial intent, but a result of limitations
|
||||
* in their tools. On the other, not simulating this misbehavior
|
||||
* goes against the goal of making oldstyle as accurate as
|
||||
* possible an emulation of the original UI.
|
||||
*/
|
||||
if (settings.oldstyle) {
|
||||
cmd->raw1[TOKLEN+TOKLEN] = cmd->raw1[TOKLEN+TOKLEN] = '\0';
|
||||
for (int i = 0; i < strlen(cmd->raw1); i++)
|
||||
cmd->raw1[i] = toupper(cmd->raw1[i]);
|
||||
for (int i = 0; i < strlen(cmd->raw2); i++)
|
||||
cmd->raw2[i] = toupper(cmd->raw2[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide the fact that wods are corrently packed longs */
|
||||
|
|
|
@ -31,7 +31,7 @@ with the BSD Games version.
|
|||
Extreme care has been taken not to make changes that would alter the
|
||||
logic of the game as we received it from Don Woods, except to fix
|
||||
glitches that were clearly bugs. By policy, all user-visible
|
||||
changes must be revertible with the -o (oldstyle) option.
|
||||
changes to gameplay must be revertible with the -o (oldstyle) option.
|
||||
|
||||
It is a goal of this project to exactly preserve the *intended
|
||||
behavior* of 430-point Adventure, but the implementation of it is fair
|
||||
|
@ -53,7 +53,8 @@ Bug fixes:
|
|||
* Attempting to extinguish an unlit urn caused it to lose its oil.
|
||||
|
||||
* Unrecognized words are no longer truncated to 5 characters and
|
||||
uppercased when they are echoed.
|
||||
uppercased when they are echoed. (This behavior is restored by the
|
||||
oldstyle switch.)
|
||||
|
||||
* "A crystal bridge now spans the fissure." (progressive present) was
|
||||
incorrect most places it appeared and has been replaced by "A crystal
|
||||
|
|
|
@ -10,19 +10,19 @@ down a gully.
|
|||
|
||||
i
|
||||
|
||||
Sorry, I don't know the word "i".
|
||||
Sorry, I don't know the word "I".
|
||||
|
||||
l
|
||||
|
||||
Sorry, I don't know the word "l".
|
||||
Sorry, I don't know the word "L".
|
||||
|
||||
x
|
||||
|
||||
Sorry, I don't know the word "x".
|
||||
Sorry, I don't know the word "X".
|
||||
|
||||
z
|
||||
|
||||
Sorry, I don't know the word "z".
|
||||
Sorry, I don't know the word "Z".
|
||||
|
||||
quit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue