mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
d88a091fc6
Well, that took a fair bit more than it should have to get working: had to implement the protocol support in qfcc and engine-side ruamoko.
38 lines
595 B
R
38 lines
595 B
R
#include "qwaq-curses.h"
|
|
#include "qwaq-view.h"
|
|
|
|
Rect
|
|
makeRect (int xpos, int ypos, int xlen, int ylen)
|
|
{
|
|
Rect rect = {xpos, ypos, xlen, ylen};
|
|
return rect;
|
|
}
|
|
|
|
int
|
|
rectContainsPoint (Rect *rect, Point *point)
|
|
{
|
|
return ((point.x >= rect.xpos && point.x < rect.xpos + rect.xlen)
|
|
&& (point.y >= rect.ypos && point.y < rect.ypos + rect.ylen));
|
|
}
|
|
|
|
@implementation View
|
|
|
|
-initWithRect: (Rect) rect
|
|
{
|
|
if (!(self = [super init])) {
|
|
return nil;
|
|
}
|
|
self.rect = rect;
|
|
self.absRect = rect;
|
|
self.window = nil;
|
|
return self;
|
|
}
|
|
|
|
-draw
|
|
{
|
|
return self;
|
|
}
|
|
|
|
@end
|
|
|
|
Rect getwrect (window_t window) = #0;
|