3 |
|
* |
4 |
|
* $Id$ |
5 |
|
* |
6 |
< |
* Basilisk II (C) 1997-2003 Christian Bauer |
6 |
> |
* Basilisk II (C) 1997-2004 Christian Bauer |
7 |
|
* |
8 |
|
* This program is free software; you can redistribute it and/or modify |
9 |
|
* it under the terms of the GNU General Public License as published by |
378 |
|
|
379 |
|
- (BOOL) processMouseMove: (NSEvent *) event |
380 |
|
{ |
381 |
< |
NSPoint location; |
381 |
> |
if ( ! drawView ) |
382 |
> |
{ |
383 |
> |
D(NSLog(@"Unable to process event - Emulator has not started yet")); |
384 |
> |
return NO; |
385 |
> |
} |
386 |
|
|
387 |
|
if ( fullScreen ) |
388 |
|
{ |
390 |
|
return YES; |
391 |
|
} |
392 |
|
|
393 |
< |
location = [self convertPoint: [event locationInWindow] fromView:nil]; |
393 |
> |
NSPoint location = [self convertPoint: [event locationInWindow] fromView:nil]; |
394 |
|
|
395 |
|
D(NSLog (@"%s - loc.x=%f, loc.y=%f", |
396 |
|
__PRETTY_FUNCTION__, location.x, location.y)); |
400 |
|
|
401 |
|
mouse = location; |
402 |
|
|
403 |
< |
int mouseY = y - y * mouse.y / [self height]; |
404 |
< |
int mouseX = x * mouse.x / [self width]; |
403 |
> |
int mouseY = y - (int) (y * mouse.y / [self height]); |
404 |
> |
int mouseX = (int) (x * mouse.x / [self width]); |
405 |
|
// If the view was not resizable, then this would be simpler: |
406 |
|
// int mouseY = y - (int) mouse.y; |
407 |
|
// int mouseX = (int) mouse.x; |
487 |
|
#ifdef NSBITMAP |
488 |
|
= [bitmap bitmapData]; |
489 |
|
#else |
490 |
< |
= bitmap; |
490 |
> |
= (unsigned char *) bitmap; |
491 |
|
#endif |
492 |
|
|
493 |
< |
memset(data, val, numBytes); |
493 |
> |
memset(data, val, (long unsigned)numBytes); |
494 |
|
} |
495 |
|
|
496 |
|
- (void) blacken // Set bitmap black |