mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-03 02:17:39 +00:00
updated bytepusher demo to be C++ compatible
This commit is contained in:
parent
5dd2492645
commit
b03332b68d
1 changed files with 2 additions and 2 deletions
|
@ -156,7 +156,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[]) {
|
|||
return SDL_APP_FAILURE;
|
||||
}
|
||||
|
||||
if (!(vm = SDL_calloc(1, sizeof(*vm)))) {
|
||||
if (!(vm = (BytePusher *)SDL_calloc(1, sizeof(*vm)))) {
|
||||
return SDL_APP_FAILURE;
|
||||
}
|
||||
*(BytePusher**)appstate = vm;
|
||||
|
@ -199,7 +199,7 @@ SDL_AppResult SDL_AppInit(void** appstate, int argc, char* argv[]) {
|
|||
for (r = 0; r < 6; ++r) {
|
||||
for (g = 0; g < 6; ++g) {
|
||||
for (b = 0; b < 6; ++b, ++i) {
|
||||
SDL_Color color = { r * 0x33, g * 0x33, b * 0x33, SDL_ALPHA_OPAQUE };
|
||||
SDL_Color color = { (Uint8)(r * 0x33), (Uint8)(g * 0x33), (Uint8)(b * 0x33), SDL_ALPHA_OPAQUE };
|
||||
palette->colors[i] = color;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue