|
Man Over Board
|
Declares globally used constants and types. More...
#include <stdlib.h>#include <stdio.h>Data Structures | |
| struct | BitMap |
| Represents a bitmap image using a pointer to pixel data and its dimensions. More... | |
Macros | |
| #define | Pterm(rv) |
| #define | SCREEN_WIDTH 640l |
| Screen width in pixels. | |
| #define | SCREEN_HEIGHT 400l |
| Screen height in pixels. | |
| #define | SCREEN_BUFFER_SIZE (SCREEN_WIDTH / (sizeof(long) * 8)) * SCREEN_HEIGHT |
| Screen buffer size calculation. | |
| #define | L_SB_ALIGN 256 |
| #define | TODO() |
| Marks a function as not yet implemented. | |
Typedefs | |
| typedef unsigned char | u8 |
| 8-bit unsigned integer. | |
| typedef unsigned int | u16 |
| 16-bit unsigned integer. | |
| typedef unsigned long | u32 |
| 32-bit unsigned integer. | |
| typedef char | i8 |
| 8-bit signed integer. | |
| typedef int | i16 |
| 16-bit signed integer. | |
| typedef long | i32 |
| 32-bit signed integer. | |
| typedef u32 | Screen |
| Type alias for an unsigned long representing a screen. | |
Enumerations | |
| enum | Color { BLACK = 1 , WHITE = 0 } |
| Defines color constants. More... | |
| enum | Bool { True = 1 , False = 0 } |
| Boolean enumeration. More... | |
Declares globally used constants and types.
This header file contains definitions for common numeric types, screen-related type aliases, color enumerations, and global constants. It follows the Rust-style naming convention for type definitions.
| #define L_SB_ALIGN 256 |
Long alignment of screen buffer
| #define Pterm | ( | rv | ) |
| #define SCREEN_BUFFER_SIZE (SCREEN_WIDTH / (sizeof(long) * 8)) * SCREEN_HEIGHT |
Screen buffer size calculation.
The buffer size is determined by dividing the screen width by the number of bits in a long (assumed to be 32) and multiplying by the screen height.
| #define TODO | ( | ) |
Marks a function as not yet implemented.
This macro prints an error message with the filename and line number, then terminates the program with a nonzero exit code.
Type alias for an unsigned long representing a screen.
Screens are frequently passed around in the program, so this alias helps avoid simple errors.
| enum Bool |
Boolean enumeration.
Defines True as 1 and False as 0 for boolean operations.
| enum Color |
Defines color constants.
This enumeration represents black and white color values, using 1 for black and 0 for white.