From db301471311a56f5c4f8a4c626c3fb0942929450 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Thu, 28 Nov 2024 17:50:36 -0800 Subject: [PATCH] Fixed several structure errors in windows, and one in x11. --- posix/graphics.fs | 2 +- windows/graphics.fs | 14 +++++++------- windows/windows_test.fs | 5 +---- windows/windows_user.fs | 1 + 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/posix/graphics.fs b/posix/graphics.fs index 41562a4..133de40 100644 --- a/posix/graphics.fs +++ b/posix/graphics.fs @@ -83,7 +83,7 @@ StructureNotifyMask or constant EVENT-MASK xevent [ xany ] ->type sl@ to xevent-type Expose xevent-type = if [ xexposure ] - xevent ->count @ 0= if + xevent ->count sl@ 0= if EXPOSED to event exit then diff --git a/windows/graphics.fs b/windows/graphics.fs index 79b3261..3865de3 100644 --- a/windows/graphics.fs +++ b/windows/graphics.fs @@ -35,12 +35,12 @@ cell allocate throw to backbuffer backbuffer w h * 4* resize throw to backbuffer backbuffer w h * 4* 255 fill binfo BITMAPINFO erase - BITMAPINFOHEADER binfo ->bmiHeader ->biSize ! - w binfo ->bmiHeader ->biWidth ! - h negate binfo ->bmiHeader ->biHeight ! - 1 binfo ->bmiHeader ->biPlanes ! - 32 binfo ->bmiHeader ->biBitCount ! - BI_RGB binfo ->bmiHeader ->biCompression ! + BITMAPINFOHEADER binfo ->bmiHeader ->biSize l! + w binfo ->bmiHeader ->biWidth l! + h negate binfo ->bmiHeader ->biHeight l! + 1 binfo ->bmiHeader ->biPlanes w! + 32 binfo ->bmiHeader ->biBitCount w! + BI_RGB binfo ->bmiHeader ->biCompression l! RESIZED to event ; @@ -161,7 +161,7 @@ also windows event FINISHED = if exit then IDLE to event msgbuf NULL 0 0 PM_REMOVE PeekMessageA if - WM_QUIT msgbuf ->message @ = if + WM_QUIT msgbuf ->message ul@ = if FINISHED to event exit then diff --git a/windows/windows_test.fs b/windows/windows_test.fs index c716d5f..c375696 100644 --- a/windows/windows_test.fs +++ b/windows/windows_test.fs @@ -33,10 +33,7 @@ create ps PAINTSTRUCT allot 0 255 0 RGB CreateSolidBrush constant green create side RECT allot -0 side ->left l! -0 side ->top l! -200 side ->right l! -100 side ->bottom l! +side 0 0 200 100 SetRect : MyWindowProc { hwnd msg w l } WM_DESTROY msg = if diff --git a/windows/windows_user.fs b/windows/windows_user.fs index c89c9cc..12f463f 100644 --- a/windows/windows_user.fs +++ b/windows/windows_user.fs @@ -104,6 +104,7 @@ struct RECT i32 field ->top i32 field ->right i32 field ->bottom +z" SetRect" 5 User32 SetRect z" GetMessageA" 4 User32 GetMessageA z" PeekMessageA" 5 User32 PeekMessageA