diff options
author | Slendi <slendi@socopon.com> | 2023-09-27 22:15:15 +0300 |
---|---|---|
committer | Slendi <slendi@socopon.com> | 2023-09-27 22:15:15 +0300 |
commit | 2b8ee7296e999f1d3def5a68d45bcc4fc27860b3 (patch) | |
tree | 01a3d788cd057477bb1890ae13e973518d496473 | |
parent | 528add23ba110a02d517ab248e68a522d38bafde (diff) |
Rename struct members to be snake_case.
Signed-off-by: Slendi <slendi@socopon.com>
-rw-r--r-- | efi_console.odin | 28 | ||||
-rw-r--r-- | main.odin | 12 |
2 files changed, 20 insertions, 20 deletions
diff --git a/efi_console.odin b/efi_console.odin index c1a6d26..8caaf31 100644 --- a/efi_console.odin +++ b/efi_console.odin @@ -31,31 +31,31 @@ EFI_GRAPHICS_PIXEL_FORMAT :: enum { } EFI_PIXEL_BITMASK :: struct { - RedMask: u32, - GreenMask: u32, - BlueMask: u32, - ReservedMask: u32, + red_mask: u32, + green_mask: u32, + blue_mask: u32, + reserved_mask: u32, } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION :: struct { // The version of this data structure. A value of zero represents the // EFI_GRAPHICS_OUTPUT_MODE_INFORMATION structure as defined in this // specification. - Version: u32, + version: u32, // The size of video screen in pixels in the X dimension. - HorizontalResolution: u32, + horizontal_resolution: u32, // The size of video screen in pixels in the Y dimension. - VerticalResolution: u32, + vertical_resolution: u32, // Enumeration that defines the physical format of the pixel. A value of // PixelBltOnly implies that a linear frame buffer is not available for this // mode. - PixelFormat: EFI_GRAPHICS_PIXEL_FORMAT, + pixel_format: EFI_GRAPHICS_PIXEL_FORMAT, // This bit-mask is only valid if PixelFormat is set to PixelPixelBitMask. A // bit being set defines what bits are used for what purpose such as Red, // Green, Blue, or Reserved. - PixelInformation: EFI_PIXEL_BITMASK, + pixel_information: EFI_PIXEL_BITMASK, // Defines the number of pixel elements per video memory line. - PixelsPerScanLine: u32, + pixels_per_scan_line: u32, } // Returns information for an available graphics mode that the graphics device @@ -90,10 +90,10 @@ EfiGraphicsOutputProtocolSetMode :: proc "c" ( ) -> EfiStatus EFI_GRAPHICS_OUTPUT_BLT_PIXEL :: struct { - Blue: u8, - Green: u8, - Red: u8, - Reserved: u8, + blue: u8, + green: u8, + red: u8, + reserved: u8, } EFI_GRAPHICS_OUTPUT_BLT_OPERATION :: enum { @@ -27,10 +27,10 @@ hsv2rgb::proc(H, S, V: f32) -> EFI_GRAPHICS_OUTPUT_BLT_PIXEL{ } color: EFI_GRAPHICS_OUTPUT_BLT_PIXEL - color.Red = auto_cast (r * 255) - color.Green = auto_cast (g * 255) - color.Blue = auto_cast (b * 255) - color.Reserved = 0xff + color.red = auto_cast (r * 255) + color.green = auto_cast (g * 255) + color.blue = auto_cast (b * 255) + color.reserved = 0xff return color } @@ -88,8 +88,8 @@ main_ :: proc(efi_handle: rawptr, system_table: ^EfiSystemTable) -> u64 { 0, 0, 0, - auto_cast gop.mode.info.HorizontalResolution, - auto_cast gop.mode.info.VerticalResolution, + auto_cast gop.mode.info.horizontal_resolution, + auto_cast gop.mode.info.vertical_resolution, 0, ) } |