Fix issue where compounds had not enough type information to typecheck
This commit is contained in:
@@ -35,10 +35,22 @@ BITMAPINFOHEADER :: struct
|
||||
biClrUsed: DWORD
|
||||
biClrImportant: DWORD
|
||||
|
||||
BI_RGB :: 0x0000
|
||||
BI_RLE8 :: 0x0001
|
||||
BI_RLE4 :: 0x0002
|
||||
BI_BITFIELDS :: 0x0003
|
||||
BI_JPEG :: 0x0004
|
||||
BI_PNG :: 0x0005
|
||||
BI_CMYK :: 0x000B
|
||||
BI_CMYKRLE8 :: 0x000C
|
||||
BI_CMYKRLE4 :: 0x000
|
||||
|
||||
BITMAPINFO :: struct
|
||||
bmiHeader :: BITMAPINFOHEADER
|
||||
bmiColors :: [1]RBGQUAD
|
||||
|
||||
|
||||
|
||||
// #import #foreign "gdi32.lib" @todo
|
||||
CreateWindowA :: #foreign (dwExStyle: DWORD, lpClassName: *char, lpWindowName: *char, dwStyle: DWORD, X: int, Y: int, nWidth: int, nHeight: int, hWndParent: HWND, hMenu: HMENU, hInstance: HINSTANCE, lpParam: *void): HWND
|
||||
GetDC :: #foreign (hWnd: HWND): HDC
|
||||
|
||||
@@ -1,10 +1,34 @@
|
||||
// #import "base.kl"
|
||||
#load "Windows.kl"
|
||||
|
||||
Vec2I :: struct ;; x: S32; y: S32
|
||||
Vec2I :: struct;; x: S32; y: S32
|
||||
Vec2 :: struct;; x: F32; y: F32
|
||||
|
||||
Windows_Bitmap :: struct
|
||||
size: Vec2I
|
||||
hdc: HDC
|
||||
dib: HBITMAP
|
||||
|
||||
create_bitmap :: (size: Vec2I, bottom_up: Bool)
|
||||
bitmap: Windows_Bitmap = {size = size}
|
||||
if bottom_up == false
|
||||
bitmap.size.y = -bitmap.size.y
|
||||
|
||||
hdc := GetDC(0)
|
||||
bminfo := BITMAPINFO{
|
||||
bmiHeader = BITMAPINFOHEADER{
|
||||
biSize = size_of(BITMAPINFOHEADER),
|
||||
biWidth = size.x->LONG,
|
||||
biHeight = size.y->LONG,
|
||||
biPlanes = 1,
|
||||
biBitCount = 32,
|
||||
biCompression = BI_RGB,
|
||||
biXPelsPerMeter = 1,
|
||||
biYPelsPerMeter = 1,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
create_bitmap :: (size: Vec2I)
|
||||
pass
|
||||
|
||||
main :: (argc: int, argv: **char): int
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user