Skip to content

Commit

Permalink
Limit scaling for Arthur to prevent Arthur corrupting itself
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kinder committed Feb 9, 2021
1 parent ac78961 commit d1b4c54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Win/FrotzApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,15 @@ void FrotzApp::CreateMainWindow(void)
int scale = (scaleX > scaleY) ? scaleY : scaleX;
if (scale < 1)
scale = 1;
if ((story_id == ARTHUR) && (scale > 1))
{
// Arthur corrupts its internal state if the screen is too wide
int cw = theWnd->GetCharWidth('0');
if (320*scale > 140*cw)
scale = (cw*140)/320;
if (scale < 1)
scale = 1;
}
int width = (320*scale)+borderX;
int height = (200*scale)+borderY;

Expand Down
7 changes: 5 additions & 2 deletions Win/help/revision.htm
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ <h1>Revision History</h1>

<b>1.22</b>
<ul>
<li>The <b>print_table</b> opcode now interprets the string passed to it as ZSCII,
rather than ASCII.
<li>There is a flaw in the Infocom game Arthur: if the screen is too wide, then the
game corrupts its internal state. As a result, Frotz tries to limit the initial size
of its window when running Arthur to prevent this.
<li>Font substitution, which attempts to find font characters in other fonts when the
characters are not in the current font, has been turned off for fixed-width fonts, as
it caused more problems than it solved.
<li>The <b>print_table</b> opcode now interprets the string passed to it as ZSCII,
rather than ASCII.
</ul>

<b>1.21</b>
Expand Down

0 comments on commit d1b4c54

Please sign in to comment.