Fix alignment and size bug of enums; Remove #ordered and make the default #ordered.

This commit is contained in:
Ginger Bill
2017-05-02 21:16:09 +01:00
parent 206a3e093c
commit cc6282a6e3
10 changed files with 45 additions and 41 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB :: 0x00000002;
Hglrc :: Handle;
Color_Ref :: u32;
Layer_Plane_Descriptor :: struct #ordered {
Layer_Plane_Descriptor :: struct {
size: u16,
version: u16,
flags: u32,
@@ -39,11 +39,11 @@ Layer_Plane_Descriptor :: struct #ordered {
transparent: Color_Ref,
}
Point_Float :: struct #ordered {
Point_Float :: struct {
x, y: f32,
}
Glyph_Metrics_Float :: struct #ordered {
Glyph_Metrics_Float :: struct {
black_box_x: f32,
black_box_y: f32,
glyph_origin: Point_Float,
+15 -15
View File
@@ -65,11 +65,11 @@ SM_CYSCREEN :: 1;
SW_SHOW :: 5;
Point :: struct #ordered {
Point :: struct {
x, y: i32,
}
WndClassExA :: struct #ordered {
WndClassExA :: struct {
size, style: u32,
wnd_proc: Wnd_Proc,
cls_extra, wnd_extra: i32,
@@ -81,7 +81,7 @@ WndClassExA :: struct #ordered {
sm: Hicon,
}
Msg :: struct #ordered {
Msg :: struct {
hwnd: Hwnd,
message: u32,
wparam: Wparam,
@@ -90,24 +90,24 @@ Msg :: struct #ordered {
pt: Point,
}
Rect :: struct #ordered {
Rect :: struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
}
Filetime :: struct #ordered {
Filetime :: struct {
lo, hi: u32,
}
Systemtime :: struct #ordered {
Systemtime :: struct {
year, month: u16,
day_of_week, day: u16,
hour, minute, second, millisecond: u16,
}
By_Handle_File_Information :: struct #ordered {
By_Handle_File_Information :: struct {
file_attributes: u32,
creation_time,
last_access_time,
@@ -120,7 +120,7 @@ By_Handle_File_Information :: struct #ordered {
file_index_low: u32,
}
File_Attribute_Data :: struct #ordered {
File_Attribute_Data :: struct {
file_attributes: u32,
creation_time,
last_access_time,
@@ -275,7 +275,7 @@ HEAP_ZERO_MEMORY :: 0x00000008;
// Synchronization
Security_Attributes :: struct #ordered {
Security_Attributes :: struct {
length: u32,
security_descriptor: rawptr,
inherit_handle: Bool,
@@ -326,14 +326,14 @@ SWP_NOSIZE :: 0x0001;
SWP_NOMOVE :: 0x0002;
Monitor_Info :: struct #ordered {
Monitor_Info :: struct {
size: u32,
monitor: Rect,
work: Rect,
flags: u32,
}
Window_Placement :: struct #ordered {
Window_Placement :: struct {
length: u32,
flags: u32,
show_cmd: u32,
@@ -370,7 +370,7 @@ LOWORD :: proc(lParam: Lparam) -> u16 { return u16(lParam); }
Bitmap_Info_Header :: struct #ordered {
Bitmap_Info_Header :: struct {
size: u32,
width, height: i32,
planes, bit_count: i16,
@@ -381,13 +381,13 @@ Bitmap_Info_Header :: struct #ordered {
clr_used: u32,
clr_important: u32,
}
Bitmap_Info :: struct #ordered {
Bitmap_Info :: struct {
using header: Bitmap_Info_Header,
colors: [1]Rgb_Quad,
}
Rgb_Quad :: struct #ordered { blue, green, red, reserved: byte }
Rgb_Quad :: struct { blue, green, red, reserved: byte }
BI_RGB :: 0;
DIB_RGB_COLORS :: 0x00;
@@ -433,7 +433,7 @@ PFD_DOUBLEBUFFER_DONTCARE :: 0x40000000;
PFD_STEREO_DONTCARE :: 0x80000000;
PIXELFORMATDESCRIPTOR :: struct #ordered {
PIXELFORMATDESCRIPTOR :: struct {
size,
version,
flags: u32,