Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

Display_Amiga.i

Go to the documentation of this file.
00001 /*
00002  *  Display_Amiga.i - C64 graphics display, emulator window handling,
00003  *                    Amiga specific stuff
00004  *
00005  *  Frodo (C) 1994-1997 Christian Bauer
00006  */
00007 
00008 #include <exec/types.h>
00009 #include <exec/memory.h>
00010 #include <intuition/intuition.h>
00011 #include <libraries/gadtools.h>
00012 #include <libraries/asl.h>
00013 #include <proto/exec.h>
00014 #include <proto/graphics.h>
00015 #include <proto/intuition.h>
00016 #include <proto/dos.h>
00017 #include <proto/gadtools.h>
00018 #include <proto/diskfont.h>
00019 #include <proto/asl.h>
00020 
00021 #include "C64.h"
00022 #include "SAM.h"
00023 #include "Version.h"
00024 
00025 
00026 /*
00027   C64 keyboard matrix:
00028 
00029     Bit 7   6   5   4   3   2   1   0
00030   0    CUD  F5  F3  F1  F7 CLR RET DEL
00031   1    SHL  E   S   Z   4   A   W   3
00032   2     X   T   F   C   6   D   R   5
00033   3     V   U   H   B   8   G   Y   7
00034   4     N   O   K   M   0   J   I   9
00035   5     ,   @   :   .   -   L   P   +
00036   6     /   ^   =  SHR HOM  ;   *   £
00037   7    R/S  Q   C= SPC  2  CTL  <-  1
00038 */
00039 
00040 
00041 /*
00042   Tables for key translation
00043   Bit 0..2: row/column in C64 keyboard matrix
00044   Bit 3   : implicit shift
00045   Bit 5   : joystick emulation (bit 0..4: mask)
00046 */
00047 
00048 const int key_byte[128] = {
00049          7,  7,  7,  1,  1,   2,   2,   3,
00050          3,  4,  4,  5,  5,   6,  -1,0x30,
00051          7,  1,  1,  2,  2,   3,   3,   4,
00052          4,  5,  5,  6, -1,0x26,0x22,0x2a,
00053          1,  1,  2,  2,  3,   3,   4,   4,
00054          5,  5,  6,  6, -1,0x24,0x30,0x28,
00055          6,  1,  2,  2,  3,   3,   4,   4,
00056          5,  5,  6, -1, -1,0x25,0x21,0x29,
00057          7,  0, -1,  0,  0,   7,   6,  -1,
00058         -1, -1, -1, -1,8+0,   0,   0, 8+0,
00059          0,8+0,  0,8+0,  0, 8+0,   0, 8+0,
00060         -1, -1,  6,  6, -1,  -1,  -1,  -1,
00061          1,  6,  1,  7,  7,   7,   7,  -1,
00062         -1, -1, -1, -1, -1,  -1,  -1,  -1,
00063         -1, -1, -1, -1, -1,  -1,  -1,  -1,
00064         -1, -1, -1, -1, -1,  -1,  -1,  -1
00065 };
00066 
00067 const int key_bit[128] = {
00068          1,  0,  3,  0,  3,  0,  3,  0,
00069          3,  0,  3,  0,  3,  0, -1, -1,
00070          6,  1,  6,  1,  6,  1,  6,  1,
00071          6,  1,  6,  1, -1, -1, -1, -1,
00072          2,  5,  2,  5,  2,  5,  2,  5,
00073      2,  5,  2,  5, -1, -1, -1, -1,
00074          6,  4,  7,  4,  7,  4,  7,  4,
00075          7,  4,  7, -1, -1, -1, -1, -1,
00076          4,  0, -1,  1,  1,  7,  3, -1,
00077         -1, -1, -1, -1,  7,  7,  2,  2,
00078          4,  4,  5,  5,  6,  6,  3,  3,
00079         -1, -1,  6,  5, -1, -1, -1, -1,
00080          7,  4,  7,  2,  5,  5,  5, -1,
00081         -1, -1, -1, -1, -1, -1, -1, -1,
00082         -1, -1, -1, -1, -1, -1, -1, -1,
00083         -1, -1, -1, -1, -1, -1, -1, -1
00084 };
00085 
00086 
00087 /*
00088  *  Menu definitions
00089  */
00090 
00091 const struct NewMenu new_menus[] = {
00092         NM_TITLE, "Frodo", NULL, 0, 0, NULL,
00093         NM_ITEM, "About Frodo...", NULL, 0, 0, NULL,
00094         NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL,
00095         NM_ITEM, "Preferences...", "P", 0, 0, NULL,
00096         NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL,
00097         NM_ITEM, "Reset C64", NULL, 0, 0, NULL,
00098         NM_ITEM, "Insert next disk", "D", 0, 0, NULL,
00099         NM_ITEM, "SAM...", "M", 0, 0, NULL,
00100         NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL,
00101         NM_ITEM, "Load snapshot...", "O", 0, 0, NULL,
00102         NM_ITEM, "Save snapshot...", "S", 0, 0, NULL,
00103         NM_ITEM, NM_BARLABEL, NULL, 0, 0, NULL,
00104         NM_ITEM, "Quit Frodo", "Q", 0, 0, NULL,
00105         NM_END, NULL, NULL, 0, 0, NULL
00106 };
00107 
00108 
00109 /*
00110  *  Font attributes
00111  */
00112 
00113 const struct TextAttr led_font_attr = {
00114         "Helvetica.font", 11, FS_NORMAL, 0
00115 };
00116 
00117 const struct TextAttr speedo_font_attr = {
00118         "Courier.font", 11, FS_NORMAL, 0
00119 };
00120 
00121 
00122 /*
00123  *  Display constructor: Create window/screen
00124  */
00125 
00126 C64Display::C64Display(C64 *the_c64) : TheC64(the_c64)
00127 {
00128         int i;
00129 
00130         // LEDs off
00131         for (i=0; i<4; i++)
00132                 led_state[i] = old_led_state[i] = LED_OFF;
00133 
00134         // Allocate chunky buffer to draw into
00135         chunky_buf = new UBYTE[DISPLAY_X * DISPLAY_Y];
00136 
00137         // Open fonts
00138         led_font = OpenDiskFont(&led_font_attr);
00139         speedo_font = OpenDiskFont(&speedo_font_attr);
00140 
00141         // Open window on default pubscreen
00142         the_window = OpenWindowTags(NULL,
00143                 WA_Left, 0,
00144                 WA_Top, 0,
00145                 WA_InnerWidth, DISPLAY_X,
00146                 WA_InnerHeight, DISPLAY_Y + 16,
00147                 WA_Title, (ULONG)"Frodo",
00148                 WA_ScreenTitle, (ULONG)"Frodo C64 Emulator",
00149                 WA_IDCMP, IDCMP_CLOSEWINDOW | IDCMP_RAWKEY | IDCMP_MENUPICK | IDCMP_REFRESHWINDOW,
00150                 WA_DragBar, TRUE,
00151                 WA_DepthGadget, TRUE,
00152                 WA_CloseGadget, TRUE,
00153                 WA_SimpleRefresh, TRUE,
00154                 WA_Activate, TRUE,
00155                 WA_NewLookMenus, TRUE,
00156                 TAG_DONE);
00157         the_screen = the_window->WScreen;
00158         the_rp = the_window->RPort;
00159         xo = the_window->BorderLeft;
00160         yo = the_window->BorderTop;
00161 
00162         // Create menus
00163         the_visual_info = GetVisualInfo(the_screen, NULL);
00164         the_menus = CreateMenus(new_menus, GTMN_FullMenu, TRUE, TAG_DONE);
00165         LayoutMenus(the_menus, the_visual_info, GTMN_NewLookMenus, TRUE, TAG_DONE);
00166         SetMenuStrip(the_window, the_menus);
00167 
00168         // Obtain 16 pens for the C64 colors
00169         for (i=0; i<16; i++)
00170                 pens[i] = ObtainBestPen(the_screen->ViewPort.ColorMap,
00171                         palette_red[i] * 0x01010101, palette_green[i] * 0x01010101, palette_blue[i] * 0x01010101);
00172 
00173         // Allocate temporary RastPort for WritePixelArra8()
00174         temp_bm = AllocBitMap(DISPLAY_X, 1, 8, 0, NULL);
00175         InitRastPort(&temp_rp);
00176         temp_rp.BitMap = temp_bm;
00177 
00178         // Draw LED bar
00179         draw_led_bar();
00180 
00181         // Allocate file requesters
00182         open_req = (struct FileRequester *)AllocAslRequestTags(ASL_FileRequest,
00183                 ASLFR_Window, (ULONG)the_window,
00184                 ASLFR_SleepWindow, TRUE,
00185                 ASLFR_TitleText, (ULONG)"Frodo: Load snapshot...",
00186                 ASLFR_RejectIcons, TRUE,
00187                 TAG_DONE);
00188         save_req = (struct FileRequester *)AllocAslRequestTags(ASL_FileRequest,
00189                 ASLFR_Window, (ULONG)the_window,
00190                 ASLFR_SleepWindow, TRUE,
00191                 ASLFR_TitleText, (ULONG)"Frodo: Save snapshot...",
00192                 ASLFR_DoSaveMode, TRUE,
00193                 ASLFR_RejectIcons, TRUE,
00194                 TAG_DONE);
00195 }
00196 
00197 
00198 /*
00199  *  Display destructor
00200  */
00201 
00202 C64Display::~C64Display()
00203 {
00204         // Free file requesters
00205         if (open_req != NULL)
00206                 FreeAslRequest(open_req);
00207         if (save_req != NULL)
00208                 FreeAslRequest(save_req);
00209 
00210         // Free temporary RastPort
00211         if (temp_bm != NULL)
00212                 FreeBitMap(temp_bm);
00213 
00214         // Free pens
00215         for (int i=0; i<16; i++)
00216                 ReleasePen(the_screen->ViewPort.ColorMap, pens[i]);
00217 
00218         // Delete menus
00219         if (the_menus != NULL) {
00220                 if (the_window != NULL)
00221                         ClearMenuStrip(the_window);
00222                 FreeMenus(the_menus);
00223         }
00224 
00225         // Delete VisualInfo
00226         if (the_visual_info != NULL)
00227                 FreeVisualInfo(the_visual_info);
00228 
00229         // Close window
00230         if (the_window != NULL)
00231                 CloseWindow(the_window);
00232 
00233         // Close fonts
00234         CloseFont(speedo_font);
00235         CloseFont(led_font);
00236 
00237         // Free chunky buffer
00238         delete chunky_buf;
00239 }
00240 
00241 
00242 /*
00243  *  Prefs may have changed
00244  */
00245 
00246 void C64Display::NewPrefs(Prefs *prefs)
00247 {
00248 }
00249 
00250 
00251 /*
00252  *  Redraw bitmap
00253  */
00254 
00255 void C64Display::Update(void)
00256 {
00257         // Update C64 display
00258         WritePixelArray8(the_rp, xo, yo, DISPLAY_X + xo - 1, DISPLAY_Y + yo - 1,
00259                 chunky_buf, &temp_rp);
00260 
00261         // Update drive LEDs
00262         for (int i=0; i<4; i++)
00263                 if (led_state[i] != old_led_state[i]) {
00264                         draw_led(i, led_state[i]);
00265                         old_led_state[i] = led_state[i];
00266                 }
00267 }
00268 
00269 
00270 /*
00271  *  Draw LED bar at the bottom of the window
00272  */
00273 
00274 void C64Display::draw_led_bar(void)
00275 {
00276         int i;
00277         char str[16];
00278 
00279         SetAPen(the_rp, pens[15]);      // Light gray
00280         SetBPen(the_rp, pens[15]);      // Light gray
00281         RectFill(the_rp, xo, yo+DISPLAY_Y, xo+DISPLAY_X-1, yo+DISPLAY_Y+15);
00282 
00283         SetAPen(the_rp, pens[1]);       // White
00284         Move(the_rp, xo, yo+DISPLAY_Y); Draw(the_rp, xo+DISPLAY_X-1, yo+DISPLAY_Y);
00285         for (i=0; i<5; i++) {
00286                 Move(the_rp, xo+DISPLAY_X*i/5, yo+DISPLAY_Y); Draw(the_rp, xo+DISPLAY_X*i/5, yo+DISPLAY_Y+14);
00287         }
00288         for (i=2; i<6; i++) {
00289                 Move(the_rp, xo+DISPLAY_X*i/5-23, yo+DISPLAY_Y+11); Draw(the_rp, xo+DISPLAY_X*i/5-9, yo+DISPLAY_Y+11);
00290                 Move(the_rp, xo+DISPLAY_X*i/5-9, yo+DISPLAY_Y+11); Draw(the_rp, xo+DISPLAY_X*i/5-9, yo+DISPLAY_Y+5);
00291         }
00292 
00293         SetAPen(the_rp, pens[12]);      // Medium gray
00294         Move(the_rp, xo, yo+DISPLAY_Y+15); Draw(the_rp, xo+DISPLAY_X-1, yo+DISPLAY_Y+15);
00295         for (i=1; i<6; i++) {
00296                 Move(the_rp, xo+DISPLAY_X*i/5-1, yo+DISPLAY_Y+1); Draw(the_rp, xo+DISPLAY_X*i/5-1, yo+DISPLAY_Y+15);
00297         }
00298         for (i=2; i<6; i++) {
00299                 Move(the_rp, xo+DISPLAY_X*i/5-24, yo+DISPLAY_Y+11); Draw(the_rp, xo+DISPLAY_X*i/5-24, yo+DISPLAY_Y+4);
00300                 Move(the_rp, xo+DISPLAY_X*i/5-24, yo+DISPLAY_Y+4); Draw(the_rp, xo+DISPLAY_X*i/5-9, yo+DISPLAY_Y+4);
00301         }
00302 
00303         SetFont(the_rp, led_font);
00304         for (i=0; i<4; i++) {
00305                 sprintf(str, "Drive %d", i+8);
00306                 SetAPen(the_rp, pens[0]);       // Black
00307                 Move(the_rp, xo+DISPLAY_X*(i+1)/5+8, yo+DISPLAY_Y+11);
00308                 Text(the_rp, str, strlen(str));
00309                 draw_led(i, LED_OFF);
00310         }
00311 }
00312 
00313 
00314 /*
00315  *  Draw one LED
00316  */
00317 
00318 void C64Display::draw_led(int num, int state)
00319 {
00320         switch (state) {
00321                 case LED_OFF:
00322                 case LED_ERROR_OFF:
00323                         SetAPen(the_rp, pens[0]);       // Black;
00324                         break;
00325                 case LED_ON:
00326                         SetAPen(the_rp, pens[5]);       // Green
00327                         break;
00328                 case LED_ERROR_ON:
00329                         SetAPen(the_rp, pens[2]);       // Red
00330                         break;
00331         }
00332         RectFill(the_rp, xo+DISPLAY_X*(num+2)/5-23, yo+DISPLAY_Y+5, xo+DISPLAY_X*(num+2)/5-10, yo+DISPLAY_Y+10);
00333 }
00334 
00335 
00336 /*
00337  *  Update speedometer
00338  */
00339 
00340 void C64Display::Speedometer(int speed)
00341 {
00342         static int delay = 0;
00343 
00344         if (delay >= 20) {
00345                 char str[16];
00346                 sprintf(str, "%d%%", speed);
00347                 SetAPen(the_rp, pens[15]);      // Light gray
00348                 RectFill(the_rp, xo+1, yo+DISPLAY_Y+1, xo+DISPLAY_X/5-2, yo+DISPLAY_Y+14);
00349                 SetAPen(the_rp, pens[0]);       // Black
00350                 SetFont(the_rp, speedo_font);
00351                 Move(the_rp, xo+24, yo+DISPLAY_Y+10);
00352                 Text(the_rp, str, strlen(str));
00353                 delay = 0;
00354         } else
00355                 delay++;
00356 }
00357 
00358 
00359 /*
00360  *  Return pointer to bitmap data
00361  */
00362 
00363 UBYTE *C64Display::BitmapBase(void)
00364 {
00365         return chunky_buf;
00366 }
00367 
00368 
00369 /*
00370  *  Return number of bytes per row
00371  */
00372 
00373 int C64Display::BitmapXMod(void)
00374 {
00375         return DISPLAY_X;
00376 }
00377 
00378 
00379 /*
00380  *  Handle IDCMP messages
00381  */
00382 
00383 void C64Display::PollKeyboard(UBYTE *key_matrix, UBYTE *rev_matrix, UBYTE *joystick)
00384 {
00385         struct IntuiMessage *msg;
00386 
00387         // Get and analyze all pending window messages
00388         while ((msg = (struct IntuiMessage *)GetMsg(the_window->UserPort)) != NULL) {
00389 
00390                 // Extract data and reply message
00391                 ULONG iclass = msg->Class;
00392                 USHORT code = msg->Code;
00393                 ReplyMsg((struct Message *)msg);
00394 
00395                 // Action depends on message class
00396                 switch (iclass) {
00397 
00398                         case IDCMP_CLOSEWINDOW: // Closing the window quits Frodo
00399                                 TheC64->Quit();
00400                                 break;
00401 
00402                         case IDCMP_RAWKEY:
00403                                 switch (code) {
00404 
00405                                         case 0x58:      // F9: NMI (Restore)
00406                                                 TheC64->NMI();
00407                                                 break;
00408 
00409                                         case 0x59:      // F10: Reset
00410                                                 TheC64->Reset();
00411                                                 break;
00412 
00413                                         case 0x5e:      // '+' on keypad: Increase SkipFrames
00414                                                 ThePrefs.SkipFrames++;
00415                                                 break;
00416 
00417                                         case 0x4a:      // '-' on keypad: Decrease SkipFrames
00418                                                 if (ThePrefs.SkipFrames > 1)
00419                                                         ThePrefs.SkipFrames--;
00420                                                 break;
00421 
00422                                         case 0x5d:      // '*' on keypad: Toggle speed limiter
00423                                                 ThePrefs.LimitSpeed = !ThePrefs.LimitSpeed;
00424                                                 break;
00425 
00426                                         case 0x5c:{     // '/' on keypad: Toggle processor-level 1541 emulation
00427                                                 Prefs *prefs = new Prefs(ThePrefs);
00428                                                 prefs->Emul1541Proc = !prefs->Emul1541Proc;
00429                                                 TheC64->NewPrefs(prefs);
00430                                                 ThePrefs = *prefs;
00431                                                 delete prefs;
00432                                                 break;
00433                                         }
00434 
00435                                         default:{
00436                                                 // Convert Amiga keycode to C64 row/column
00437                                                 int c64_byte = key_byte[code & 0x7f];
00438                                                 int c64_bit = key_bit[code & 0x7f];
00439 
00440                                                 if (c64_byte != -1) {
00441                                                         if (!(c64_byte & 0x20)) {
00442 
00443                                                                 // Normal keys
00444                                                                 bool shifted = c64_byte & 8;
00445                                                                 c64_byte &= 7;
00446                                                                 if (!(code & 0x80)) {
00447 
00448                                                                         // Key pressed
00449                                                                         if (shifted) {
00450                                                                                 key_matrix[6] &= 0xef;
00451                                                                                 rev_matrix[4] &= 0xbf;
00452                                                                         }
00453                                                                         key_matrix[c64_byte] &= ~(1 << c64_bit);
00454                                                                         rev_matrix[c64_bit] &= ~(1 << c64_byte);
00455                                                                 } else {
00456 
00457                                                                         // Key released
00458                                                                         if (shifted) {
00459                                                                                 key_matrix[6] |= 0x10;
00460                                                                                 rev_matrix[4] |= 0x40;
00461                                                                         }
00462                                                                         key_matrix[c64_byte] |= (1 << c64_bit);
00463                                                                         rev_matrix[c64_bit] |= (1 << c64_byte);
00464                                                                 }
00465                                                         } else {
00466 
00467                                                                 // Joystick emulation
00468                                                                 c64_byte &= 0x1f;
00469                                                                 if (code & 0x80)
00470                                                                         *joystick |= c64_byte;
00471                                                                 else
00472                                                                         *joystick &= ~c64_byte;
00473                                                         }
00474                                                 }
00475                                         }
00476                                 }
00477                                 break;
00478 
00479                         case IDCMP_MENUPICK:{
00480                                 if (code == MENUNULL)
00481                                         break;
00482 
00483                                 // Get item number
00484                                 int item_number = ITEMNUM(code);
00485                                 switch (item_number) {
00486 
00487                                         case 0: {       // About Frodo
00488                                                 TheC64->Pause();
00489                                                 char str[256];
00490                                                 sprintf(str, "%s by Christian Bauer\n<cbauer@iphcip1.physik.uni-mainz.de>\nİ Copyright 1994-1997\nFreely distributable", VERSION_STRING);
00491                                                 ShowRequester(str, "OK");
00492                                                 TheC64->Resume();
00493                                                 break;
00494                                         }
00495 
00496                                         case 2:         // Preferences
00497                                                 TheC64->Pause();
00498                                                 be_app->RunPrefsEditor();
00499                                                 TheC64->Resume();
00500                                                 break;
00501 
00502                                         case 4:         // Reset C64
00503                                                 TheC64->Reset();
00504                                                 break;
00505 
00506                                         case 5:         // Insert next disk
00507                                                 if (strlen(ThePrefs.DrivePath[0]) > 4) {
00508                                                         char str[256];
00509                                                         strcpy(str, ThePrefs.DrivePath[0]);
00510                                                         char *p = str + strlen(str) - 5;
00511 
00512                                                         // If path matches "*.?64", increment character before the '.'
00513                                                         if (p[1] == '.' && p[3] == '6' && p[4] == '4') {
00514                                                                 p[0]++;
00515 
00516                                                                 // If no such file exists, set character before the '.' to '1', 'a' or 'A'
00517                                                                 FILE *file;
00518                                                                 if ((file = fopen(str, "rb")) == NULL) {
00519                                                                         if (isdigit(p[0]))
00520                                                                                 p[0] = '1';
00521                                                                         else if (isupper(p[0]))
00522                                                                                 p[0] = 'A';
00523                                                                         else
00524                                                                                 p[0] = 'a';
00525                                                                 } else
00526                                                                         fclose(file);
00527 
00528                                                                 // Set new prefs
00529                                                                 Prefs *prefs = new Prefs(ThePrefs);
00530                                                                 strcpy(prefs->DrivePath[0], str);
00531                                                                 TheC64->NewPrefs(prefs);
00532                                                                 ThePrefs = *prefs;
00533                                                                 delete prefs;
00534                                                         }
00535                                                 }
00536                                                 break;
00537 
00538                                         case 6:         // SAM
00539                                                 TheC64->Pause();
00540                                                 SAM(TheC64);
00541                                                 TheC64->Resume();
00542                                                 break;
00543 
00544                                         case 8:         // Load snapshot
00545                                                 if (open_req != NULL && AslRequest(open_req, NULL)) {
00546                                                         char path[256];
00547                                                         strncpy(path, open_req->fr_Drawer, 255);
00548                                                         AddPart(path, open_req->fr_File, 255);
00549                                                         TheC64->Pause();
00550                                                         TheC64->LoadSnapshot(path);
00551                                                         TheC64->Resume();
00552                                                 }
00553                                                 break;
00554 
00555                                         case 9:         // Save snapshot
00556                                                 if (save_req != NULL && AslRequest(save_req, NULL)) {
00557                                                         char path[256];
00558                                                         strncpy(path, save_req->fr_Drawer, 255);
00559                                                         AddPart(path, save_req->fr_File, 255);
00560                                                         TheC64->Pause();
00561                                                         TheC64->SaveSnapshot(path);
00562                                                         TheC64->Resume();
00563                                                 }
00564                                                 break;
00565 
00566                                         case 11:        // Quit Frodo
00567                                                 TheC64->Quit();
00568                                                 break;
00569                                 }
00570                                 break;
00571                         }
00572 
00573                         case IDCMP_REFRESHWINDOW:
00574                                 BeginRefresh(the_window);
00575                                 draw_led_bar();
00576                                 EndRefresh(the_window, TRUE);
00577                                 break;
00578                 }
00579         }
00580 }
00581 
00582 
00583 /*
00584  *  Check if NumLock is down (for switching the joystick keyboard emulation)
00585  */
00586 
00587 bool C64Display::NumLock(void)
00588 {
00589         return FALSE;
00590 }
00591 
00592 
00593 /*
00594  *  Allocate C64 colors
00595  */
00596 
00597 void C64Display::InitColors(UBYTE *colors)
00598 {
00599         // Spread pens into colors array
00600         for (int i=0; i<256; i++)
00601                 colors[i] = pens[i & 0x0f];
00602 }
00603 
00604 
00605 /*
00606  *  Show a requester
00607  */
00608 
00609 long ShowRequester(char *str, char *button1, char *button2)
00610 {
00611         struct EasyStruct es;
00612         char gads[256];
00613 
00614         strcpy(gads, button1);
00615         if (button2) {
00616                 strcat(gads, "|");
00617                 strcat(gads, button2);
00618         }
00619 
00620         es.es_StructSize = sizeof(struct EasyStruct);
00621         es.es_Flags = 0;
00622         es.es_Title = "Frodo";
00623         es.es_TextFormat = str;
00624         es.es_GadgetFormat = gads;
00625 
00626         return EasyRequestArgs(NULL, &es, NULL, NULL) % 1;
00627 }

Generated on Tue Feb 8 04:07:47 2005 for E32frodo by doxygen 1.3.3