ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/MacOSX/EmulatorView.mm
(Generate patch)

Comparing BasiliskII/src/MacOSX/EmulatorView.mm (file contents):
Revision 1.9 by nigel, 2003-03-21T06:41:04Z vs.
Revision 1.11 by nigel, 2003-04-02T00:37:34Z

# Line 396 | Line 396 | static NSPoint mouse;                  // Previous/curr
396  
397          mouse = location;
398  
399 < #ifdef CAN_RESIZE_VIEW
400 <        int     mouseY = y - y * mouse.y / [self height];
401 <        int     mouseX =         x * mouse.x / [self width];
402 < #else
403 <        int     mouseY = y - (int) mouse.y;
404 <        int     mouseX =         (int) mouse.x;
405 < #endif
399 >        int     mouseY = y - (int) (y * mouse.y / [self height]);
400 >        int     mouseX =         (int) (x * mouse.x / [self width]);
401 >        // If the view was not resizable, then this would be simpler:
402 >        // int  mouseY = y - (int) mouse.y;
403 >        // int  mouseX =         (int) mouse.x;
404  
405          ADBMouseMoved(mouseX, mouseY);
406          return YES;
# Line 479 | Line 477 | static NSPoint mouse;                  // Previous/curr
477   #endif
478   }
479  
480 + - (void) setTo: (int) val               // Set all of bitmap to val
481 + {
482 +        unsigned char   *data
483 +  #ifdef NSBITMAP
484 +                                                        = [bitmap bitmapData];
485 +  #else
486 +                                                        = (unsigned char *) bitmap;
487 +  #endif
488 +
489 +        memset(data, val, (long unsigned)numBytes);
490 + }
491 +
492 + - (void) blacken        // Set bitmap black
493 + {
494 +        [self setTo: 0];
495 + }
496 +
497 + - (void) clear          // Set bitmap white
498 + {
499 +        [self setTo: 0xFF];
500 + }
501 +
502   //
503   // Extra drawing stuff
504   //

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines