forked from pyrite-dev/milsko
Merge branch 'master' of ssh://forgejo.nishi.boats:2221/pyrite-dev/milsko
This commit is contained in:
commit
6277c8837a
9 changed files with 236 additions and 234 deletions
|
|
@ -52,7 +52,9 @@ static void draw(void) {
|
|||
glPopMatrix();
|
||||
}
|
||||
|
||||
static void idle(void) { deg += 1.0; }
|
||||
static void idle(void) {
|
||||
deg += 1.0;
|
||||
}
|
||||
|
||||
static void reshape(int width, int height) {
|
||||
GLfloat lpos[4];
|
||||
|
|
@ -86,4 +88,6 @@ static void init(void) {
|
|||
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
|
||||
}
|
||||
|
||||
static void key(int k) { (void)k; }
|
||||
static void key(int k) {
|
||||
(void)k;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,6 @@
|
|||
|
||||
MwBool pointerLocked;
|
||||
MwBool mouseMoved;
|
||||
|
||||
}
|
||||
|
||||
+ (MilskoCocoa*)newWithParent:(MwLL)parent
|
||||
|
|
|
|||
|
|
@ -589,8 +589,8 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
|||
int y, x, ys, xs;
|
||||
|
||||
xs = -mask->x + image->x;
|
||||
ys = MwCursorDataHeight + mask->y;
|
||||
ys = MwCursorDataHeight + image->y - ys;
|
||||
ys = mask->height + mask->y;
|
||||
ys = image->height + image->y - ys;
|
||||
|
||||
memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight);
|
||||
|
|
@ -621,7 +621,7 @@ HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) {
|
|||
}
|
||||
}
|
||||
|
||||
cursor = CreateCursor(GetModuleHandle(NULL), xs, ys, MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
|
||||
cursor = CreateCursor(GetModuleHandle(NULL), xs - image->x, ys + (MwCursorDataHeight + image->y), MwCursorDataHeight, MwCursorDataHeight, dmask, dimage);
|
||||
|
||||
free(dimage);
|
||||
free(dmask);
|
||||
|
|
|
|||
|
|
@ -811,8 +811,8 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
|
|||
XColor cfg, cbg;
|
||||
|
||||
xs = -mask->x + image->x;
|
||||
ys = MwCursorDataHeight + mask->y;
|
||||
ys = MwCursorDataHeight + image->y - ys;
|
||||
ys = mask->height + mask->y;
|
||||
ys = image->height + image->y - ys;
|
||||
|
||||
memset(cimage->data, 0, cimage->bytes_per_line * cimage->height);
|
||||
memset(cmask->data, 0, cmask->bytes_per_line * cmask->height);
|
||||
|
|
@ -849,7 +849,7 @@ Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) {
|
|||
XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
|
||||
XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight);
|
||||
|
||||
cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs, ys);
|
||||
cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs - image->x, ys + (MwCursorDataHeight + image->y));
|
||||
|
||||
XFreePixmap(display, pimage);
|
||||
XFreePixmap(display, pmask);
|
||||
|
|
|
|||
|
|
@ -70,8 +70,7 @@ void* MwFontLoad(unsigned char* data, unsigned int size) {
|
|||
}
|
||||
|
||||
void MwFontFree(void* handle) {
|
||||
if(MwFLFontFree)
|
||||
return MwFLFontFree(handle);
|
||||
if(MwFLFontFree) MwFLFontFree(handle);
|
||||
}
|
||||
|
||||
static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color) {
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ static void func_handler(MwWidget handle, const char *name, void *out,
|
|||
self->pixelFormat =
|
||||
[[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes];
|
||||
self->glc =
|
||||
[[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext:nil];
|
||||
[[NSOpenGLContext alloc] initWithFormat:pixelFormat
|
||||
shareContext:nil];
|
||||
[self->glc setView:[w getView]];
|
||||
self->_win = w;
|
||||
return self;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ l(
|
|||
l("");
|
||||
c("Requirements");
|
||||
l("");
|
||||
l(
|
||||
" Milsko requires either");
|
||||
l(" Milsko requires either");
|
||||
l(" * A Windows environment with GDI (so anything NT or 9x)");
|
||||
l(" * A MacOS environment with Cocoa (10.4 or above supported)");
|
||||
l(" * A Unix-like environment with X11 for runtime.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue