Module relative pathing seems to work, managed to get out of having to have the exe where the files are,

Got rid of scope names, now unique names uses scope ids, module folder is in top folder
This commit is contained in:
Krzosa Karol
2022-06-27 10:56:17 +02:00
parent 15d452cae3
commit b4f38caabe
13 changed files with 46 additions and 40 deletions

39
modules/gdi32.kl Normal file
View File

@@ -0,0 +1,39 @@
#import "kernel32.kl"
RBGQUAD :: struct;; rgbBlue: BYTE; rgbGreen: BYTE; rgbRed: BYTE; rgbReserved: BYTE
BITMAPINFOHEADER :: struct;; biSize: DWORD; biWidth: LONG; biHeight: LONG; biPlanes: WORD; biBitCount: WORD; biCompression: DWORD; biSizeImage: DWORD; biXPelsPerMeter: LONG; biYPelsPerMeter: LONG; biClrUsed: DWORD; biClrImportant: DWORD
BITMAPINFO :: struct;; bmiHeader: BITMAPINFOHEADER; bmiColors: [1]RBGQUAD
HGDIOBJ :: HANDLE
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
DIB_RGB_COLORS :: 0x00
SRCCOPY :: 0x00CC0020 /* dest = source */
SRCPAINT :: 0x00EE0086 /* dest = source OR dest */
SRCAND :: 0x008800C6 /* dest = source AND dest */
SRCINVERT :: 0x00660046 /* dest = source XOR dest */
SRCERASE :: 0x00440328 /* dest = source AND (NOT dest ) */
NOTSRCCOPY :: 0x00330008 /* dest = (NOT source) */
NOTSRCERASE :: 0x001100A6 /* dest = (NOT src) AND (NOT dest) */
MERGECOPY :: 0x00C000CA /* dest = (source AND pattern) */
MERGEPAINT :: 0x00BB0226 /* dest = (NOT source) OR dest */
PATCOPY :: 0x00F00021 /* dest = pattern */
PATPAINT :: 0x00FB0A09 /* dest = DPSnoo */
PATINVERT :: 0x005A0049 /* dest = pattern XOR dest */
DSTINVERT :: 0x00550009 /* dest = (NOT dest) */
BLACKNESS :: 0x00000042 /* dest = BLACK */
WHITENESS :: 0x00FF0062 /* dest = WHITE */
// #import #foreign "gdi32.lib" @todo
CreateDIBSection :: #foreign (hdc: HDC, pbmi: *BITMAPINFO, usage: UINT, ppvBits: **VOID, hSection: HANDLE, offset: DWORD): HBITMAP
CreateCompatibleDC :: #foreign (hdc: HDC): HDC
SelectObject :: #foreign (hdc: HDC, h: HGDIOBJ): HGDIOBJ
BitBlt :: #foreign (hdc: HDC, x: int, y: int, cx: int, cy: int, hdcSrc: HDC, x1: int, y1: int, ro: DWORD): BOOL