Update set pixel to use integers instead of floats
This commit is contained in:
@@ -13,19 +13,21 @@ typedef struct {
|
||||
} colour_t;
|
||||
|
||||
typedef struct {
|
||||
u64 width;
|
||||
u64 height;
|
||||
u32 width;
|
||||
u32 height;
|
||||
u32 half_width;
|
||||
u32 half_height;
|
||||
const char *title;
|
||||
SDL_Window *window;
|
||||
SDL_Surface *front_buffer;
|
||||
SDL_Surface *back_buffer;
|
||||
} window_t;
|
||||
|
||||
bool init_window(window_t *wnd, u64 width, u64 height, const char *title);
|
||||
bool init_window(window_t *wnd, u32 width, u32 height, const char *title);
|
||||
void close_window(window_t *wnd);
|
||||
|
||||
void clear_window(window_t *wnd, colour_t colour);
|
||||
void set_pixel(window_t *wnd, f32 x, f32 y, colour_t colour);
|
||||
void set_pixel(window_t *wnd, i32 x, i32 y, colour_t colour);
|
||||
void swap_buffers(window_t *wnd);
|
||||
|
||||
#endif // !WINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user