From 08260b1d6c8dfe9ae88b06fed3eda69fc0c2f670 Mon Sep 17 00:00:00 2001 From: onpon4 Date: Mon, 30 Mar 2015 07:52:44 -0400 Subject: [PATCH] Minor changes --- src/resources.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/resources.cpp b/src/resources.cpp index 5f2a7b3..ac156da 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -35,9 +35,9 @@ void loadGameGraphics() int index; char string[75] = ""; FILE *fp; - uint32_t *p32; - uint16_t *p16; - uint8_t *p8; + Uint32 *p32; + Uint16 *p16; + Uint8 *p8; freeGraphics(); @@ -83,10 +83,10 @@ void loadGameGraphics() shipShape[i- SHIP_HIT_INDEX]->h); blit(shipShape[i - SHIP_HIT_INDEX], 0, 0, shipShape[i]); - switch (shipShape[i]->format->BytesPerPixel) + switch (shipShape[i]->format->BitsPerPixel) { - case 4: - p32 = (uint32_t *)shipShape[i]->pixels; + case 32: + p32 = (Uint32 *)shipShape[i]->pixels; for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++) { if (p32[j]) @@ -94,8 +94,8 @@ void loadGameGraphics() } break; - case 2: - p16 = (uint16_t *)shipShape[i]->pixels; + case 16: + p16 = (Uint16 *)shipShape[i]->pixels; for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++) { if (p16[j]) @@ -103,8 +103,8 @@ void loadGameGraphics() } break; - case 1: - p8 = (uint8_t *)shipShape[i]->pixels; + case 8: + p8 = (Uint8 *)shipShape[i]->pixels; for (int j = 0; j < shipShape[i]->w * shipShape[i]->h; j++) { if (p8[j])