Updated documentation about CRT simulation effects.

General updates to the documentation for people I forgot to include in
previous releases.  Also added websites where applicable.

Update AboutDialog to be more current, showing only those members
currently active in the Stella project and the other teams that have
contributed code.  For more specifics, you should now see the manual.
Basically consolidated all contribution info into one document, so it
has to be kept up-to-date in only one place.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1750 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-06-04 13:52:10 +00:00
parent 805300ceb8
commit aa2e76c4ea
9 changed files with 147 additions and 96 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -10,7 +10,7 @@
<br><br> <br><br>
<center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center> <center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center>
<center><h4><b>Release 2.7.7</b></h4></center> <center><h4><b>Release 2.8</b></h4></center>
<br><br> <br><br>
<center><h2><b>User's Guide</b></h2></center> <center><h2><b>User's Guide</b></h2></center>
@ -40,7 +40,7 @@
<br><br><br> <br><br><br>
<center><b>February 1999 - May 2009</b></center> <center><b>February 1999 - June 2009</b></center>
<center><b>The Stella Team</b></center> <center><b>The Stella Team</b></center>
<center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center> <center><b><a href="http://stella.sourceforge.net">Stella Homepage</a></b></center>
@ -256,6 +256,9 @@
some games</li> some games</li>
<li>TIA emulation supports full collision checking</li> <li>TIA emulation supports full collision checking</li>
<li>Built-in extensive debugger</li> <li>Built-in extensive debugger</li>
<li>Emulation of CRT TV systems with OpenGL shaders, including texturing,
colour bleed, RF noise, and phosphor burn-off</li>
<li>Built-in ROM database with information compiled by RomHunter</li>
</ul> </ul>
@ -280,6 +283,7 @@
<li>15 bit color minimum; 16 bit color graphics card highly recommended</li> <li>15 bit color minimum; 16 bit color graphics card highly recommended</li>
<li>SDL version 1.2.10 or greater, latest version highly recommended</li> <li>SDL version 1.2.10 or greater, latest version highly recommended</li>
<li>Latest version of the zlib library</li> <li>Latest version of the zlib library</li>
<li>CRT emulation effects require OpenGL 2.0 with GLSL (GL shading language) support</li>
<li>Joysticks or gamepads are highly recommended</li> <li>Joysticks or gamepads are highly recommended</li>
<li>Mouse or Stelladaptor with real paddles required for paddle emulation</li> <li>Mouse or Stelladaptor with real paddles required for paddle emulation</li>
<li>Some ROM images (See <a href="http://www.atariage.com">AtariAge</a> for more information)</li> <li>Some ROM images (See <a href="http://www.atariage.com">AtariAge</a> for more information)</li>
@ -639,6 +643,36 @@
video cards, in which case it should be set to false.</td> video cards, in which case it should be set to false.</td>
</tr> </tr>
--> -->
<tr>
<td><pre>-tv_tex &lt;off|normal|stag&gt;</pre></td>
<td>OpenGL 2.0 mode only. Enable TV texturing. The GL_TEXTURE_RECTANGLE
extension must be disabled for this to work correctly.</td>
</tr>
<tr>
<td><pre>-tv_bleed &lt;off|low|medium|high&gt;</pre></td>
<td>OpenGL 2.0 mode only. Enable TV colour bleed emulation. A fast
video card with at least 128MB RAM is required to use 'high'.
The GL_TEXTURE_RECTANGLE extension must be disabled for this to
work correctly.</td>
</tr>
<tr>
<td><pre>-tv_noise &lt;off|low|medium|high&gt;</pre></td>
<td>OpenGL 2.0 mode only. Enable TV radio frequency noise emulation.
A fast video card with at least 128MB RAM is required to use 'high'.
The GL_TEXTURE_RECTANGLE extension must be disabled for this to
work correctly.</td>
</tr>
<tr>
<td><pre>-tv_phos &lt;1|0&gt;</pre></td>
<td>OpenGL 2.0 mode only. Enable phosphor effect of TV image. This
is in addition to the currently emulated software phosphor
effect. The GL_TEXTURE_RECTANGLE extension must be disabled
for this to work correctly.</td>
</tr>
<tr> <tr>
<td><pre>-tia_filter &lt;filter&gt;</pre></td> <td><pre>-tia_filter &lt;filter&gt;</pre></td>
<td>Use the specified filter while in TIA/emulation mode. Currently, <td>Use the specified filter while in TIA/emulation mode. Currently,
@ -1087,6 +1121,23 @@
</tr> </tr>
</table> </table>
<br> <br>
<p><b>Video Settings</b> dialog (TV Effects):</p>
<table border="5" cellpadding="2" frame="box" rules="none">
<tr>
<td><img src="graphics/options_video_tv.png"></td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td valign="top">
<table border="1" cellpadding="4">
<tr><th>Item</th><th>Brief description</th><th>For more information,<br>see Commandline</th></tr>
<tr><td>TV Color Texture</td><td>emulate TV pixel texturing</td><td>-tv_tex</td></tr>
<tr><td>TV Color Bleed</td><td>emulate TV color bleed</td><td>-tv_bleed</td></tr>
<tr><td>TV Image Noise</td><td>emulate TV RF image noise</td><td>-tv_noise</td></tr>
<tr><td>TV Phosphor Burn-off</td><td>emulate TV phosphor mixing</td><td>-tv_phos</td></tr>
</table>
</td>
</tr>
</table>
<br>
<p><b>Audio Settings</b> dialog:</p> <p><b>Audio Settings</b> dialog:</p>
<table border="5" cellpadding="2" frame="box" rules="none"> <table border="5" cellpadding="2" frame="box" rules="none">
<tr> <tr>
@ -2788,17 +2839,27 @@ Ms Pac-Man (Stella extended codes):
then a number of people from around the world have contributed to the project. then a number of people from around the world have contributed to the project.
Some people have provided technical help while others have offered suggestions Some people have provided technical help while others have offered suggestions
and praise. The Stella Team is grateful for all the help and support it has and praise. The Stella Team is grateful for all the help and support it has
received over the years. The following is an incomplete list of the people who have received over the years. The following is an incomplete list of the people who have
played a part in bringing Stella to you:</p> played a part in bringing Stella to you. If I've missed someone, please let
me know.</p>
<table CELLSPACING="15"> <table CELLSPACING="15">
<tr> <tr>
<td VALIGN="TOP">Stephen&nbsp;Anthony</td> <td VALIGN="TOP">Ant<br>
(<a href="http://aqfl.net">http://aqfl.net</a>)</td>
<td>Provided much feedback and testing which eventually led to a fix
for the infamouse ATI OpenGL 'red screen' issue</td>
</tr>
<tr>
<td VALIGN="TOP">Stephen&nbsp;Anthony<br>
(<a href="http://minbar.org">http://minbar.org</a>)</td>
<td>Ported Stella 1.1 to SDL. Added extra command line options to X11/SDL <td>Ported Stella 1.1 to SDL. Added extra command line options to X11/SDL
versions. Added INI file support, faster startup, snapshot support, versions. Added INI file support, faster startup, snapshot support,
and pause functionality to core. Converted Stella 1.1 manual to HTML. and pause functionality to core. Converted Stella 1.1 manual to HTML.
Ported codebase to SDL for Windows/MacOSX. Added OpenGL support and Ported codebase to SDL for Windows/MacOSX. Added OpenGL support and
Stelladaptor support. Current maintainer for the Linux and Windows versions.</td> Stelladaptor support. Current maintainer for the Linux, OSX and Windows
versions.</td>
</tr> </tr>
<tr> <tr>
@ -2816,6 +2877,14 @@ Ms Pac-Man (Stella extended codes):
<td>Provided "A Brief History of the Atari 2600" for this manual</td> <td>Provided "A Brief History of the Atari 2600" for this manual</td>
</tr> </tr>
<tr>
<td VALIGN="TOP">Ian&nbsp;Bogost and the Georgia&nbsp;Tech&nbsp;Atari&nbsp;Team<br>
(<a href="http://www.bogost.com/games/a_television_simulator.shtml">CRT Simulation Project</a>)</td>
<td>Contributed code for the 'CRT simulation' OpenGL filters. The Winter 2009
team members are Edward Booth, Michael Cook, Justin Dobbs, William Rowland
and Prince Yang.</td>
</tr>
<tr> <tr>
<td VALIGN="TOP">Dan&nbsp;Boris</td> <td VALIGN="TOP">Dan&nbsp;Boris</td>
<td>Provided technical information on the Supercharger</td> <td>Provided technical information on the Supercharger</td>
@ -2852,9 +2921,10 @@ Ms Pac-Man (Stella extended codes):
</tr> </tr>
<tr> <tr>
<td VALIGN="TOP">Mark&nbsp;Grebe</td> <td VALIGN="TOP">Mark&nbsp;Grebe<br>
(<a href="http://www.atarimac.com">http://www.atarimac.com</a>)</td>
<td>Author of the Macintosh OSX version of Stella starting with the <td>Author of the Macintosh OSX version of Stella starting with the
1.4 release. Helped with Stelladaptor support.</td> 1.4 release until release 2.4. Helped with Stelladaptor support.</td>
</tr> </tr>
<tr> <tr>
@ -2883,6 +2953,11 @@ Ms Pac-Man (Stella extended codes):
<td>Provided updated NTSC palette and many ideas</td> <td>Provided updated NTSC palette and many ideas</td>
</tr> </tr>
<tr>
<td VALIGN="TOP">Andrew&nbsp;Kator<br>(<a href="http://www.katorlegaz.com">http://www.katorlegaz.com</a>)</td>
<td>Provided PHP and CSS code for a major update to the Stella website</td>
</tr>
<tr> <tr>
<td VALIGN="TOP">Kostas&nbsp;Nakos</td> <td VALIGN="TOP">Kostas&nbsp;Nakos</td>
<td>Author/maintainer of the WinCE version of Stella starting with the <td>Author/maintainer of the WinCE version of Stella starting with the
@ -2939,6 +3014,11 @@ Ms Pac-Man (Stella extended codes):
<td>Author of the "Game Menu" emulator game shell</td> <td>Author of the "Game Menu" emulator game shell</td>
</tr> </tr>
<tr>
<td VALIGN="TOP">RomHunter<br>(<a href="http://www.atarimania.com/roms-MENU-2.html">RomHunter ROMs</a>)</td>
<td>Provides an updated database of ROM information on a regular basis</td>
</tr>
<tr> <tr>
<td VALIGN="TOP">John&nbsp;Saeger</td> <td VALIGN="TOP">John&nbsp;Saeger</td>
<td>Participated in a helpful discussion on understanding the TIA's <td>Participated in a helpful discussion on understanding the TIA's
@ -2961,6 +3041,12 @@ Ms Pac-Man (Stella extended codes):
Stella; now he's helping with the web site</td> Stella; now he's helping with the web site</td>
</tr> </tr>
<tr>
<td VALIGN="TOP">Seagtgruff</td>
<td>Provided test ROMs which finally fixed all remaining issues with
ADC/SBC opcode decimal mode emulation</td>
</tr>
<tr> <tr>
<td VALIGN="TOP">David&nbsp;Shaw</td> <td VALIGN="TOP">David&nbsp;Shaw</td>
<td>Provided make targets for the BSDI platform</td> <td>Provided make targets for the BSDI platform</td>

View File

@ -310,18 +310,18 @@ void Settings::usage()
<< " -gl_vsync <1|0> Enable synchronize to vertical blank interrupt\n" << " -gl_vsync <1|0> Enable synchronize to vertical blank interrupt\n"
<< " -gl_texrect <1|0> Enable GL_TEXTURE_RECTANGLE extension\n" << " -gl_texrect <1|0> Enable GL_TEXTURE_RECTANGLE extension\n"
// << " -gl_accel <1|0> Enable SDL_GL_ACCELERATED_VISUAL\n" // << " -gl_accel <1|0> Enable SDL_GL_ACCELERATED_VISUAL\n"
<< " -tv_tex <off|type> TV texturing, type is one of the following:\n" << " -tv_tex <off|type> OpenGL TV texturing, type is one of the following:\n"
<< " normal TODO - document\n" << " normal Aligned in a grid\n"
<< " stag TODO - document\n" << " stag Aligned in a staggered grid\n"
<< " -tv_bleed <off|type> TV color bleed, type is one of the following:\n" << " -tv_bleed <off|type> OpenGL TV color bleed, type is one of the following:\n"
<< " low TODO - document\n" << " low \n"
<< " medium TODO - document\n" << " medium \n"
<< " high TODO - document\n" << " high \n"
<< " -tv_noise <off|type> TV noise, type is one of the following:\n" << " -tv_noise <off|type> OpenGL TV RF noise emulation, type is one of the following:\n"
<< " low TODO - document\n" << " low \n"
<< " medium TODO - document\n" << " medium \n"
<< " high TODO - document\n" << " high \n"
<< " -tv_phos <1|0> TV phosphor burn-off\n" << " -tv_phos <1|0> OpenGL TV phosphor burn-off\n"
<< endl << endl
#endif #endif
<< " -tia_filter <filter> Use the specified filter in emulation mode\n" << " -tia_filter <filter> Use the specified filter in emulation mode\n"

View File

@ -26,15 +26,12 @@
#include "AboutDialog.hxx" #include "AboutDialog.hxx"
#define ADD_ATEXT(d) do { dsc[i] = d; i++; } while(0)
#define ADD_ALINE ADD_ATEXT("")
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent, AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent,
const GUI::Font& font) const GUI::Font& font)
: Dialog(osystem, parent, 0, 0, 0, 0), : Dialog(osystem, parent, 0, 0, 0, 0),
myPage(1), myPage(1),
myNumPages(6) myNumPages(5)
{ {
const int lineHeight = font.getLineHeight(), const int lineHeight = font.getLineHeight(),
fontWidth = font.getMaxCharWidth(), fontWidth = font.getMaxCharWidth(),
@ -46,7 +43,7 @@ AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent,
// Set real dimensions // Set real dimensions
_w = 52 * fontWidth + 8; _w = 52 * fontWidth + 8;
_h = 12 * lineHeight + 20; _h = 10 * lineHeight + 20;
// Add Previous, Next and Close buttons // Add Previous, Next and Close buttons
xpos = 10; ypos = _h - buttonHeight - 10; xpos = 10; ypos = _h - buttonHeight - 10;
@ -75,7 +72,7 @@ AboutDialog::AboutDialog(OSystem* osystem, DialogContainer* parent,
myTitle->setTextColor(kTextColorEm); myTitle->setTextColor(kTextColorEm);
xpos = 10; ypos += lineHeight + 4; xpos = 10; ypos += lineHeight + 4;
for(int i = 0; i < LINES_PER_PAGE; i++) for(int i = 0; i < kLINES_PER_PAGE; i++)
{ {
myDesc[i] = new StaticTextWidget(this, font, xpos, ypos, _w - 20, myDesc[i] = new StaticTextWidget(this, font, xpos, ypos, _w - 20,
fontHeight, "", kTextAlignLeft); fontHeight, "", kTextAlignLeft);
@ -100,9 +97,10 @@ AboutDialog::~AboutDialog()
// 4 background (black) // 4 background (black)
// 5 emphasized text (red) // 5 emphasized text (red)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AboutDialog::updateStrings(int page, int lines, string& title, string* &dsc) void AboutDialog::updateStrings(int page, int lines, string& title)
{ {
dsc = new string[lines]; #define ADD_ATEXT(d) do { myDescStr[i] = d; i++; } while(0)
#define ADD_ALINE ADD_ATEXT("")
int i = 0; int i = 0;
switch(page) switch(page)
@ -124,55 +122,33 @@ void AboutDialog::updateStrings(int page, int lines, string& title, string* &dsc
ADD_ATEXT("\\L\\c0"" Bradford W. Mott"); ADD_ATEXT("\\L\\c0"" Bradford W. Mott");
ADD_ATEXT("\\L\\c2"" Original author, lead developer"); ADD_ATEXT("\\L\\c2"" Original author, lead developer");
ADD_ATEXT("\\L\\c0"" Stephen Anthony"); ADD_ATEXT("\\L\\c0"" Stephen Anthony");
ADD_ATEXT("\\L\\c2"" Lead developer, Linux/Win32 maintainer"); ADD_ATEXT("\\L\\c2"" Lead developer, Linux/OSX/Win32 maintainer");
ADD_ATEXT("\\L\\c0"" Mark Grebe"); ADD_ATEXT("\\L\\c0"" Mark Grebe");
ADD_ATEXT("\\L\\c2"" Author/maintainer for OSX port"); ADD_ATEXT("\\L\\c2"" Original author/maintainer for OSX port");
ADD_ATEXT("\\L\\c0"" Brian Watson"); ADD_ATEXT("\\L\\c0"" Brian Watson");
ADD_ATEXT("\\L\\c2"" Emulation core enhancement, debugger support"); ADD_ATEXT("\\L\\c2"" Emulation core enhancement, debugger support");
ADD_ATEXT("\\L\\c0"" Eckhard Stolberg");
ADD_ATEXT("\\L\\c2"" Emulation core development");
break; break;
case 3: case 3:
title = "The Stella team"; title = "The Stella team";
ADD_ATEXT("\\L\\c0"" Joe D'Andrea"); ADD_ATEXT("\\L\\c0"" Eckhard Stolberg");
ADD_ATEXT("\\L\\c2"" Maintainer for Solaris port"); ADD_ATEXT("\\L\\c2"" Emulation core development");
ADD_ATEXT("\\L\\c0"" Darrell Spice Jr. & Doodle");
ADD_ATEXT("\\L\\c2"" Authors for OS/2 port");
ADD_ATEXT("\\L\\c0"" Kostas Nakos"); ADD_ATEXT("\\L\\c0"" Kostas Nakos");
ADD_ATEXT("\\L\\c2"" Author/maintainer for WinCE port"); ADD_ATEXT("\\L\\c2"" Author/maintainer for WinCE port");
ADD_ATEXT("\\L\\c0"" Alex Zaballa");
ADD_ATEXT("\\L\\c2"" Maintainer for GP2X port");
break; break;
case 4: case 4:
title = "Retired members / Contributors"; title = "Contributors";
ADD_ATEXT("\\L\\c0""See Stella manual for contribution details"); ADD_ATEXT("\\L\\c0"" See Stella manual for contribution details");
ADD_ATEXT("\\L\\c0"" and for many other people not listed here");
ADD_ALINE; ADD_ALINE;
ADD_ATEXT("\\L\\c0"" David Aspell, Chris Bennett, Alexander Bilstein"); ADD_ATEXT("\\L\\c0"" Thanks to the ScummVM project for the GUI code");
ADD_ATEXT("\\L\\c0"" Dan Boris, Piero Cavina, Bob Colbert"); ADD_ALINE;
ADD_ATEXT("\\L\\c0"" Renato Ferreira, Ron Fries, Aaron Giles"); ADD_ATEXT("\\L\\c0"" Thanks to Ian Bogost and the Georgia Tech");
ADD_ATEXT("\\L\\c0"" Mark Hahn, Kevin Horton, Thomas Jentzsch"); ADD_ATEXT("\\L\\c0"" Atari Team for the CRT Simulation effects");
ADD_ATEXT("\\L\\c0"" Erik \"Voch\" Kovach, Daniel Marks, James Mcclain");
ADD_ATEXT("\\L\\c0"" David McEwen, Jeff Miller, Dan Mowczan");
ADD_ATEXT("\\L\\c0"" Jack Nutting, Manuel Polik, Jim Pragit");
ADD_ATEXT("\\L\\c0"" John Saeger, Chris Salomon, Jason Scott");
break; break;
case 5: case 5:
title = "Retired members / Contributors";
ADD_ATEXT("\\L\\c0""See Stella manual for contribution details");
ADD_ALINE;
ADD_ATEXT("\\L\\c0"" David Shaw, Raul Silva, Chris Snell, John Stiles");
ADD_ATEXT("\\L\\c0"" Matthew Stroup, Joel Sutton, Greg Troutman");
ADD_ATEXT("\\L\\c0"" Curt Vendel, Keith Wilkins, Jeff Wisnia");
ADD_ALINE;
ADD_ATEXT("\\L\\c0""And many others ...");
ADD_ALINE;
ADD_ATEXT("\\L\\c0""Thanks to the ScummVM project for the GUI code");
break;
case 6:
title = "Cast of thousands"; title = "Cast of thousands";
ADD_ATEXT("\\L\\c0""Special thanks to AtariAge for introducing the"); ADD_ATEXT("\\L\\c0""Special thanks to AtariAge for introducing the");
ADD_ATEXT("\\L\\c0""Atari 2600 to a whole new generation"); ADD_ATEXT("\\L\\c0""Atari 2600 to a whole new generation");
@ -191,14 +167,13 @@ void AboutDialog::updateStrings(int page, int lines, string& title, string* &dsc
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void AboutDialog::displayInfo() void AboutDialog::displayInfo()
{ {
string titleStr, *dscStr; string titleStr;
updateStrings(myPage, kLINES_PER_PAGE, titleStr);
updateStrings(myPage, LINES_PER_PAGE, titleStr, dscStr);
myTitle->setLabel(titleStr); myTitle->setLabel(titleStr);
for(int i = 0; i < LINES_PER_PAGE; i++) for(int i = 0; i < kLINES_PER_PAGE; i++)
{ {
const char *str = dscStr[i].c_str(); const char* str = myDescStr[i].c_str();
TextAlignment align = kTextAlignCenter; TextAlignment align = kTextAlignCenter;
uInt32 color = kTextColor; uInt32 color = kTextColor;
@ -256,8 +231,6 @@ void AboutDialog::displayInfo()
myDesc[i]->setLabel(str); myDesc[i]->setLabel(str);
} }
delete[] dscStr;
// Redraw entire dialog // Redraw entire dialog
_dirty = true; _dirty = true;
} }

View File

@ -22,8 +22,6 @@
#ifndef ABOUT_DIALOG_HXX #ifndef ABOUT_DIALOG_HXX
#define ABOUT_DIALOG_HXX #define ABOUT_DIALOG_HXX
#define LINES_PER_PAGE 10
class OSystem; class OSystem;
class DialogContainer; class DialogContainer;
class CommandSender; class CommandSender;
@ -39,18 +37,20 @@ class AboutDialog : public Dialog
~AboutDialog(); ~AboutDialog();
protected: protected:
enum { kLINES_PER_PAGE = 8 };
ButtonWidget* myNextButton; ButtonWidget* myNextButton;
ButtonWidget* myPrevButton; ButtonWidget* myPrevButton;
StaticTextWidget* myTitle; StaticTextWidget* myTitle;
StaticTextWidget* myDesc[LINES_PER_PAGE]; StaticTextWidget* myDesc[kLINES_PER_PAGE];
string myDescStr[kLINES_PER_PAGE];
int myPage; int myPage;
int myNumPages; int myNumPages;
private: private:
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
virtual void updateStrings(int page, int lines, string& title, string* &dsc); virtual void updateStrings(int page, int lines, string& title);
void displayInfo(); void displayInfo();
void loadConfig() { displayInfo(); } void loadConfig() { displayInfo(); }

View File

@ -73,7 +73,7 @@ HelpDialog::HelpDialog(OSystem* osystem, DialogContainer* parent,
int lwidth = 15 * fontWidth; int lwidth = 15 * fontWidth;
xpos += 5; ypos += lineHeight + 4; xpos += 5; ypos += lineHeight + 4;
for(uInt8 i = 0; i < LINES_PER_PAGE; i++) for(uInt8 i = 0; i < kLINES_PER_PAGE; i++)
{ {
myKey[i] = myKey[i] =
new StaticTextWidget(this, font, xpos, ypos, lwidth, new StaticTextWidget(this, font, xpos, ypos, lwidth,
@ -93,11 +93,11 @@ HelpDialog::~HelpDialog()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void HelpDialog::updateStrings(uInt8 page, uInt8 lines, void HelpDialog::updateStrings(uInt8 page, uInt8 lines, string& title)
string& title, string*& key, string* &dsc)
{ {
key = new string[lines]; #define ADD_BIND(k,d) do { myKeyStr[i] = k; myDescStr[i] = d; i++; } while(0)
dsc = new string[lines]; #define ADD_TEXT(d) ADD_BIND("",d)
#define ADD_LINE ADD_BIND("","")
uInt8 i = 0; uInt8 i = 0;
switch(page) switch(page)
@ -191,20 +191,16 @@ void HelpDialog::updateStrings(uInt8 page, uInt8 lines,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void HelpDialog::displayInfo() void HelpDialog::displayInfo()
{ {
string titleStr, *keyStr, *dscStr; string titleStr;
updateStrings(myPage, kLINES_PER_PAGE, titleStr);
updateStrings(myPage, LINES_PER_PAGE, titleStr, keyStr, dscStr);
myTitle->setLabel(titleStr); myTitle->setLabel(titleStr);
for(uInt8 i = 0; i < LINES_PER_PAGE; i++) for(uInt8 i = 0; i < kLINES_PER_PAGE; i++)
{ {
myKey[i]->setLabel(keyStr[i]); myKey[i]->setLabel(myKeyStr[i]);
myDesc[i]->setLabel(dscStr[i]); myDesc[i]->setLabel(myDescStr[i]);
} }
delete[] keyStr;
delete[] dscStr;
_dirty = true; _dirty = true;
} }

View File

@ -27,12 +27,6 @@ class CommandSender;
class ButtonWidget; class ButtonWidget;
class StaticTextWidget; class StaticTextWidget;
#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while(0)
#define ADD_TEXT(d) ADD_BIND("",d)
#define ADD_LINE ADD_BIND("","")
#define LINES_PER_PAGE 10
#include "OSystem.hxx" #include "OSystem.hxx"
#include "Props.hxx" #include "Props.hxx"
#include "bspf.hxx" #include "bspf.hxx"
@ -44,20 +38,22 @@ class HelpDialog : public Dialog
~HelpDialog(); ~HelpDialog();
protected: protected:
enum { kLINES_PER_PAGE = 10 };
ButtonWidget* myNextButton; ButtonWidget* myNextButton;
ButtonWidget* myPrevButton; ButtonWidget* myPrevButton;
StaticTextWidget* myTitle; StaticTextWidget* myTitle;
StaticTextWidget* myKey[LINES_PER_PAGE]; StaticTextWidget* myKey[kLINES_PER_PAGE];
StaticTextWidget* myDesc[LINES_PER_PAGE]; StaticTextWidget* myDesc[kLINES_PER_PAGE];
string myKeyStr[kLINES_PER_PAGE];
string myDescStr[kLINES_PER_PAGE];
uInt8 myPage; uInt8 myPage;
uInt8 myNumPages; uInt8 myNumPages;
private: private:
virtual void handleCommand(CommandSender* sender, int cmd, int data, int id); virtual void handleCommand(CommandSender* sender, int cmd, int data, int id);
virtual void updateStrings(uInt8 page, uInt8 lines, virtual void updateStrings(uInt8 page, uInt8 lines, string& title);
string& title, string*& key, string* &dsc);
void displayInfo(); void displayInfo();
void loadConfig() { displayInfo(); } void loadConfig() { displayInfo(); }
}; };