forked from e-n-f/tile-stitch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
188 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
#pragma once | ||
|
||
#include <stdint.h> | ||
|
||
typedef struct image { | ||
unsigned char *buf; | ||
uint8_t *buf; | ||
int depth; | ||
int width; | ||
int height; | ||
} image_t; | ||
Check warning on line 10 in src/formats/image.h GitHub Actions / windows-latest-hosted-ninja-vcpkg_submod-autocache
Check warning on line 10 in src/formats/image.h GitHub Actions / windows-latest-hosted-ninja-vcpkg_submod-autocache
|
||
|
||
typedef struct { | ||
uint8_t r; | ||
uint8_t g; | ||
uint8_t b; | ||
uint8_t a; | ||
} rgba_color_t; | ||
|
||
int image_create(image_t* image, int width, int height, int depth); | ||
void image_destroy(image_t* image); | ||
|
||
rgba_color_t image_get_pixel(const image_t* image, int x, int y); | ||
void image_set_pixel(image_t* image, int x, int y, rgba_color_t color); | ||
|
||
const void* image_get_row_ptr(const image_t* image, int y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.