diff --git a/src/defs.h b/src/defs.h index 5fa8951..ff21cfc 100644 --- a/src/defs.h +++ b/src/defs.h @@ -1,7 +1,7 @@ /* Copyright (C) 2003 Parallel Realities Copyright (C) 2011, 2012 Guus Sliepen -Copyright (C) 2012, 2015 onpon4 +Copyright (C) 2012, 2015, 2016 onpon4 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -104,7 +104,6 @@ along with this program. If not, see . #define MAX_WEAPONS 20 #define MAX_SPRITES 100 #define MAX_FONTSPRITES 6 -#define MAX_SHOPSPRITES 6 #define MAX_CARGO 20 #define MAX_INFOLINES 3 #define MAX_EVENTS 20 @@ -280,6 +279,42 @@ enum { // Sprites enum { + SP_CURSOR, + SP_START_MISSION, + SP_MAP, + SP_STATUS, + SP_SAVE, + SP_SHOP, + SP_COMM, + SP_OPTIONS, + SP_EXIT, + SP_PLASMA_MAX_OUTPUT, + SP_PLASMA_MAX_POWER, + SP_PLASMA_MAX_RATE, + SP_PLASMA_AMMO, + SP_ROCKET_AMMO, + SP_PLASMA_MIN_OUTPUT, + SP_PLASMA_MIN_POWER, + SP_PLASMA_MIN_RATE, + SP_PLASMA_MAX_AMMO, + SP_ROCKET_MAX_AMMO, + SP_DOUBLE_ROCKETS, + SP_MICRO_ROCKETS, + SP_LASER, + SP_HOMING_MISSILE, + SP_CHARGER, + SP_DOUBLE_HOMING_MISSILES, + SP_MICRO_HOMING_MISSILES, + SP_GOTO, + SP_BUY, + SP_SELL, + SP_FIREFLY, + SP_SUN, + SP_PLANET_GREEN, + SP_PLANET_BLUE, + SP_PLANET_RED, + SP_PLANET_ORANGE, + SP_MAX }; // Face sprites @@ -374,6 +409,13 @@ enum { // Shop sprites enum { + SHOP_S_PRIMARY, + SHOP_S_POWERUP, + SHOP_S_SECONDARY, + SHOP_S_CATALOG, + SHOP_S_SHIP_INFO, + SHOP_S_ITEM_INFO, + SHOP_S_MAX }; // Text sprites (main menu) @@ -494,7 +536,7 @@ enum { SHOP_CHARGER, SHOP_DOUBLE_HOMING_MISSILES, SHOP_MICRO_HOMING_MISSILES, - MAX_SHOPITEMS + SHOP_MAX }; // Font Colors diff --git a/src/gfx.cpp b/src/gfx.cpp index 06eba78..05ce520 100644 --- a/src/gfx.cpp +++ b/src/gfx.cpp @@ -26,7 +26,7 @@ SDL_Surface *gfx_sprites[MAX_SPRITES]; SDL_Surface *gfx_faceSprites[FS_MAX]; SDL_Surface *gfx_shipSprites[SS_MAX]; SDL_Surface *gfx_fontSprites[MAX_FONTSPRITES]; -SDL_Surface *gfx_shopSprites[MAX_SHOPSPRITES]; +SDL_Surface *gfx_shopSprites[SHOP_S_MAX]; textObject gfx_textSprites[TS_MAX]; SDL_Surface *gfx_messageBox; @@ -45,7 +45,7 @@ void gfx_init() for (int i = 0 ; i < TS_MAX ; i++) gfx_textSprites[i].image = NULL; - for (int i = 0 ; i < MAX_SHOPSPRITES ; i++) + for (int i = 0 ; i < SHOP_S_MAX ; i++) gfx_shopSprites[i] = NULL; for (int i = 0 ; i < MAX_FONTSPRITES ; i++) @@ -480,7 +480,7 @@ void gfx_free() } } - for (int i = 0 ; i < MAX_SHOPSPRITES ; i++) + for (int i = 0 ; i < SHOP_S_MAX ; i++) { if (gfx_shopSprites[i] != NULL) { diff --git a/src/gfx.h b/src/gfx.h index eab59ec..e2d9917 100644 --- a/src/gfx.h +++ b/src/gfx.h @@ -27,7 +27,7 @@ extern SDL_Surface *gfx_sprites[MAX_SPRITES]; extern SDL_Surface *gfx_faceSprites[FS_MAX]; extern SDL_Surface *gfx_shipSprites[SS_MAX]; extern SDL_Surface *gfx_fontSprites[MAX_FONTSPRITES]; -extern SDL_Surface *gfx_shopSprites[MAX_SHOPSPRITES]; +extern SDL_Surface *gfx_shopSprites[SHOP_S_MAX]; extern textObject gfx_textSprites[TS_MAX]; extern SDL_Surface *gfx_messageBox; diff --git a/src/intermission.cpp b/src/intermission.cpp index 91ea945..0d27572 100644 --- a/src/intermission.cpp +++ b/src/intermission.cpp @@ -26,9 +26,9 @@ static void intermission_doCursor() { getPlayerInput(); - LIMIT(engine.cursor_x, 10, screen->w - 10 - gfx_sprites[0]->w); - LIMIT(engine.cursor_y, 10, screen->h - 10 - gfx_sprites[0]->h); - screen_blit(gfx_sprites[0], engine.cursor_x, engine.cursor_y); + LIMIT(engine.cursor_x, 10, screen->w - 10 - gfx_sprites[SP_CURSOR]->w); + LIMIT(engine.cursor_y, 10, screen->h - 10 - gfx_sprites[SP_CURSOR]->h); + screen_blit(gfx_sprites[SP_CURSOR], engine.cursor_x, engine.cursor_y); } /* @@ -230,7 +230,7 @@ static bool intermission_showSystem(float x, float y, bool selectable) bool rtn = false; // Blit the sun - screen_blit(gfx_sprites[30], 370, 220); + screen_blit(gfx_sprites[SP_SUN], 370, 220); for (int i = 50 ; i < 300 ; i+= planetSpace) { @@ -575,7 +575,7 @@ int intermission() engine.cursor_x = screen->w / 2; engine.cursor_y = screen->h / 2; - gfx_sprites[0] = gfx_loadImage("gfx/cursor.png"); + gfx_sprites[SP_CURSOR] = gfx_loadImage("gfx/cursor.png"); // Icons 1 - 29 for (int i = 0 ; i < 26 ; i++) @@ -584,16 +584,16 @@ int intermission() gfx_sprites[i + 1] = gfx_loadImage(string); } - gfx_sprites[27] = gfx_loadImage("gfx/buyIcon.png"); - gfx_sprites[28] = gfx_loadImage("gfx/sellIcon.png"); - gfx_sprites[29] = gfx_loadImage("gfx/firefly1.png"); + gfx_sprites[SP_BUY] = gfx_loadImage("gfx/buyIcon.png"); + gfx_sprites[SP_SELL] = gfx_loadImage("gfx/sellIcon.png"); + gfx_sprites[SP_FIREFLY] = gfx_loadImage("gfx/firefly1.png"); // Planets 30 - 39 - gfx_sprites[30] = gfx_loadImage("gfx/planet_sun.png"); - gfx_sprites[31] = gfx_loadImage("gfx/planet_green.png"); - gfx_sprites[32] = gfx_loadImage("gfx/planet_blue.png"); - gfx_sprites[33] = gfx_loadImage("gfx/planet_red.png"); - gfx_sprites[34] = gfx_loadImage("gfx/planet_orange.png"); + gfx_sprites[SP_SUN] = gfx_loadImage("gfx/planet_sun.png"); + gfx_sprites[SP_PLANET_GREEN] = gfx_loadImage("gfx/planet_green.png"); + gfx_sprites[SP_PLANET_BLUE] = gfx_loadImage("gfx/planet_blue.png"); + gfx_sprites[SP_PLANET_RED] = gfx_loadImage("gfx/planet_red.png"); + gfx_sprites[SP_PLANET_ORANGE] = gfx_loadImage("gfx/planet_orange.png"); // Faces gfx_faceSprites[FS_CHRIS] = gfx_loadImage("gfx/face_chris.png"); @@ -888,9 +888,9 @@ int intermission() (systemPlanet[game.stationedPlanet].missionCompleted != 0)) continue; else if (game.stationedPlanet == game.destinationPlanet) - screen_blit(gfx_sprites[1], 80 + (i * 90), 500); + screen_blit(gfx_sprites[SP_START_MISSION], 80 + (i * 90), 500); else if (game.stationedPlanet != game.destinationPlanet) - screen_blit(gfx_sprites[26], 80 + (i * 90), 500); + screen_blit(gfx_sprites[SP_GOTO], 80 + (i * 90), 500); } else { diff --git a/src/resources.cpp b/src/resources.cpp index 152fc88..dd3b4b4 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -41,9 +41,6 @@ void loadGameGraphics() gfx_free(); - gfx_shipSprites[0] = gfx_loadImage("gfx/firefly1.png"); - gfx_shipSprites[1] = gfx_loadImage("gfx/firefly2.png"); - // Faces gfx_faceSprites[FS_CHRIS] = gfx_loadImage("gfx/face_chris.png"); gfx_faceSprites[FS_SID] = gfx_loadImage("gfx/face_sid.png"); diff --git a/src/shop.cpp b/src/shop.cpp index feefe9e..dcc7bfd 100644 --- a/src/shop.cpp +++ b/src/shop.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . #include "Starfighter.h" -static ShopItem shopItems[MAX_SHOPITEMS]; +static ShopItem shopItems[SHOP_MAX]; static signed char shopSelectedItem; static void sell(int i); @@ -144,7 +144,7 @@ static void drawShop() { adjustShopPrices(); - for (int i = 0 ; i < MAX_SHOPSPRITES ; i++) + for (int i = 0 ; i < SHOP_S_MAX ; i++) { if (gfx_shopSprites[i] != NULL) { @@ -152,17 +152,19 @@ static void drawShop() } } - for (int i = 0 ; i < 3 ; i++) - gfx_shopSprites[i] = gfx_createSurface(246, 91); + gfx_shopSprites[SHOP_S_PRIMARY] = gfx_createSurface(246, 91); + gfx_shopSprites[SHOP_S_POWERUP] = gfx_createSurface(246, 91); + gfx_shopSprites[SHOP_S_SECONDARY] = gfx_createSurface(246, 91); - for (int i = 0 ; i < 3 ; i++) - { - gfx_drawRect(gfx_shopSprites[i], 0, 0, 245, 90, 0x00, 0x00, 0x55); - gfx_drawRect(gfx_shopSprites[i], 0, 0, 245, 20, 0x00, 0x00, 0x99); - } + gfx_drawRect(gfx_shopSprites[SHOP_S_PRIMARY], 0, 0, 245, 90, 0x00, 0x00, 0x55); + gfx_drawRect(gfx_shopSprites[SHOP_S_PRIMARY], 0, 0, 245, 20, 0x00, 0x00, 0x99); + gfx_drawRect(gfx_shopSprites[SHOP_S_POWERUP], 0, 0, 245, 90, 0x00, 0x00, 0x55); + gfx_drawRect(gfx_shopSprites[SHOP_S_POWERUP], 0, 0, 245, 20, 0x00, 0x00, 0x99); + gfx_drawRect(gfx_shopSprites[SHOP_S_SECONDARY], 0, 0, 245, 90, 0x00, 0x00, 0x55); + gfx_drawRect(gfx_shopSprites[SHOP_S_SECONDARY], 0, 0, 245, 20, 0x00, 0x00, 0x99); - gfx_shopSprites[4] = gfx_createAlphaRect(601, 101, 0x00, 0x00, 0x00); - gfx_drawRect(gfx_shopSprites[4], 0, 0, 600, 100, 0x00, 0x00, 0x33); + gfx_shopSprites[SHOP_S_SHIP_INFO] = gfx_createAlphaRect(601, 101, 0x00, 0x00, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_SHIP_INFO], 0, 0, 600, 100, 0x00, 0x00, 0x33); switch (shopSelectedItem) { @@ -173,69 +175,69 @@ static void drawShop() case -5: case -6: break; - case 0: - case 1: - case 2: - case 8: - gfx_drawRect(gfx_shopSprites[1], 0, 0, 245, 90, 0x55, 0x00, 0x00); - gfx_drawRect(gfx_shopSprites[1], 0, 0, 245, 20, 0x99, 0x00, 0x00); + case SHOP_PLASMA_MAX_OUTPUT: + case SHOP_PLASMA_MAX_DAMAGE: + case SHOP_PLASMA_MAX_RATE: + case SHOP_PLASMA_MAX_AMMO: + gfx_drawRect(gfx_shopSprites[SHOP_S_POWERUP], 0, 0, 245, 90, 0x55, 0x00, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_POWERUP], 0, 0, 245, 20, 0x99, 0x00, 0x00); break; - case 3: - case 4: - gfx_drawRect(gfx_shopSprites[4], 0, 0, 600, 100, 0x33, 0x00, 0x00); + case SHOP_PLASMA_MIN_OUTPUT: + case SHOP_PLASMA_MIN_DAMAGE: + case SHOP_PLASMA_MIN_RATE: + gfx_drawRect(gfx_shopSprites[SHOP_S_PRIMARY], 0, 0, 245, 90, 0x55, 0x00, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_PRIMARY], 0, 0, 245, 20, 0x99, 0x00, 0x00); break; - case 5: - case 6: - case 7: - gfx_drawRect(gfx_shopSprites[0], 0, 0, 245, 90, 0x55, 0x00, 0x00); - gfx_drawRect(gfx_shopSprites[0], 0, 0, 245, 20, 0x99, 0x00, 0x00); + case SHOP_PLASMA_AMMO: + case SHOP_ROCKET_AMMO: + gfx_drawRect(gfx_shopSprites[SHOP_S_SHIP_INFO], 0, 0, 600, 100, 0x33, 0x00, 0x00); break; default: - gfx_drawRect(gfx_shopSprites[2], 0, 0, 245, 90, 0x55, 0x00, 0x00); - gfx_drawRect(gfx_shopSprites[2], 0, 0, 245, 20, 0x99, 0x00, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_SECONDARY], 0, 0, 245, 90, 0x55, 0x00, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_SECONDARY], 0, 0, 245, 20, 0x99, 0x00, 0x00); break; } char description[100]; strcpy(description, ""); - gfx_renderString("Primary Weapon", 10, 3, FONT_WHITE, 0, gfx_shopSprites[0]); + gfx_renderString("Primary Weapon", 10, 3, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_PRIMARY]); sprintf(description, "Plasma Cannons : %d", game.minPlasmaOutput); - gfx_renderString(description, 10, 22, FONT_WHITE, 0, gfx_shopSprites[0]); + gfx_renderString(description, 10, 22, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_PRIMARY]); sprintf(description, "Plasma Power : Stage %d", game.minPlasmaDamage); - gfx_renderString(description, 10, 37, FONT_WHITE, 0, gfx_shopSprites[0]); + gfx_renderString(description, 10, 37, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_PRIMARY]); sprintf(description, "Cooler : Stage %d", game.minPlasmaRate); - gfx_renderString(description, 10, 52, FONT_WHITE, 0, gfx_shopSprites[0]); + gfx_renderString(description, 10, 52, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_PRIMARY]); - gfx_renderString("Powerup Weapon", 10, 3, FONT_WHITE, 0, gfx_shopSprites[1]); + gfx_renderString("Powerup Weapon", 10, 3, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_POWERUP]); sprintf(description, "Plasma Output : Stage %d", game.maxPlasmaOutput); - gfx_renderString(description, 10, 22, FONT_WHITE, 0, gfx_shopSprites[1]); + gfx_renderString(description, 10, 22, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_POWERUP]); sprintf(description, "Plasma Condensor : Stage %d", game.maxPlasmaDamage); - gfx_renderString(description, 10, 37, FONT_WHITE, 0, gfx_shopSprites[1]); + gfx_renderString(description, 10, 37, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_POWERUP]); sprintf(description, "Liquid Nitrogen : Stage %d", game.maxPlasmaRate); - gfx_renderString(description, 10, 52, FONT_WHITE, 0, gfx_shopSprites[1]); + gfx_renderString(description, 10, 52, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_POWERUP]); sprintf(description, "Plasma Capacity : %d", game.maxPlasmaAmmo); - gfx_renderString(description, 10, 67, FONT_WHITE, 0, gfx_shopSprites[1]); + gfx_renderString(description, 10, 67, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_POWERUP]); drawSecondaryWeaponSurface(); - gfx_shopSprites[3] = gfx_createSurface(601, 121); + gfx_shopSprites[SHOP_S_CATALOG] = gfx_createSurface(601, 121); - gfx_drawRect(gfx_shopSprites[3], 0, 0, 600, 120, 0x00, 0x00, 0x22); + gfx_drawRect(gfx_shopSprites[SHOP_S_CATALOG], 0, 0, 600, 120, 0x00, 0x00, 0x22); - gfx_renderString("Temporary Weapons", 10, 2, FONT_WHITE, 0, gfx_shopSprites[3]); - gfx_renderString("Ammo and Storage", 260, 2, FONT_WHITE, 0, gfx_shopSprites[3]); + gfx_renderString("Temporary Weapons", 10, 2, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_CATALOG]); + gfx_renderString("Ammo and Storage", 260, 2, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_CATALOG]); - gfx_renderString("Primary Weapons", 10, 62, FONT_WHITE, 0, gfx_shopSprites[3]); + gfx_renderString("Primary Weapons", 10, 62, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_CATALOG]); - gfx_renderString("Secondary Weapons", 260, 62, FONT_WHITE, 0, gfx_shopSprites[3]); + gfx_renderString("Secondary Weapons", 260, 62, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_CATALOG]); - signed char icons = MAX_SHOPITEMS; + signed char icons = SHOP_MAX; if (game.system == 0) icons = SHOP_DOUBLE_ROCKETS + 1; @@ -247,21 +249,21 @@ static void drawShop() for (int i = 0 ; i < icons ; i++) { gfx_blit(gfx_sprites[shopItems[i].image], shopItems[i].x - 90, - shopItems[i].y - 178, gfx_shopSprites[3]); + shopItems[i].y - 178, gfx_shopSprites[SHOP_S_CATALOG]); } sprintf(description, "Shield Units : %d", player.maxShield); - gfx_renderString(description, 10, 4, FONT_WHITE, 0, gfx_shopSprites[4]); + gfx_renderString(description, 10, 4, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_SHIP_INFO]); sprintf(description, "Cash : $%d", game.cash); - gfx_renderString(description, 10, 80, FONT_WHITE, 0, gfx_shopSprites[4]); + gfx_renderString(description, 10, 80, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_SHIP_INFO]); sprintf(description, "Plasma Cells : %.3d", player.ammo[0]); - gfx_renderString(description, 430, 4, FONT_WHITE, 0, gfx_shopSprites[4]); + gfx_renderString(description, 430, 4, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_SHIP_INFO]); sprintf(description, "Rockets : %.3d", player.ammo[1]); - gfx_renderString(description, 475, 80, FONT_WHITE, 0, gfx_shopSprites[4]); + gfx_renderString(description, 475, 80, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_SHIP_INFO]); - gfx_shopSprites[5] = gfx_createSurface(601, 56); - gfx_drawRect(gfx_shopSprites[5], 0, 0, 600, 35, 0x00, 0x99, 0x00); - gfx_drawRect(gfx_shopSprites[5], 0, 20, 600, 35, 0x00, 0x33, 0x00); + gfx_shopSprites[SHOP_S_ITEM_INFO] = gfx_createSurface(601, 56); + gfx_drawRect(gfx_shopSprites[SHOP_S_ITEM_INFO], 0, 0, 600, 35, 0x00, 0x99, 0x00); + gfx_drawRect(gfx_shopSprites[SHOP_S_ITEM_INFO], 0, 20, 600, 35, 0x00, 0x33, 0x00); gfx_renderString("Information", 5, 4, FONT_WHITE, 0, gfx_shopSprites[5]); switch (shopSelectedItem) @@ -270,37 +272,37 @@ static void drawShop() break; case -2: gfx_renderString("You don't have enough money", 20, 30, FONT_WHITE, - 0, gfx_shopSprites[5]); + 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -3: gfx_renderString("Cannot upgrade ship", 5, 22, FONT_WHITE, 0, - gfx_shopSprites[5]); + gfx_shopSprites[SHOP_S_ITEM_INFO]); gfx_renderString("Hardware capacity has been reached", 20, 38, - FONT_CYAN, 0, gfx_shopSprites[5]); + FONT_CYAN, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -4: gfx_renderString("Ammunition limit reached", 20, 30, FONT_WHITE, 0, - gfx_shopSprites[5]); + gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -5: gfx_renderString("You cannot sell that item", 20, 30, FONT_WHITE, - 0, gfx_shopSprites[5]); + 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -6: gfx_renderString("Nothing to sell", 20, 30, FONT_WHITE, 0, - gfx_shopSprites[5]); + gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -7: gfx_renderString("Rockets cannot be bought for Laser or Charger Cannon", - 5, 30, FONT_WHITE, 0, gfx_shopSprites[5]); + 5, 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -8: gfx_renderString("You already have that weapon", 20, 30, - FONT_WHITE, 0, gfx_shopSprites[5]); + FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; case -9: gfx_renderString("This weapon's ammo limit has been reached", 20, - 30, FONT_WHITE, 0, gfx_shopSprites[5]); + 30, FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; default: if (shopItems[shopSelectedItem].price != 0) @@ -315,8 +317,8 @@ static void drawShop() shopItems[shopSelectedItem].description); } gfx_renderString(shopItems[shopSelectedItem].name, 5, 22, - FONT_WHITE, 0, gfx_shopSprites[5]); - gfx_renderString(description, 20, 38, FONT_CYAN, 0, gfx_shopSprites[5]); + FONT_WHITE, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); + gfx_renderString(description, 20, 38, FONT_CYAN, 0, gfx_shopSprites[SHOP_S_ITEM_INFO]); break; } } @@ -485,7 +487,7 @@ void initShop() shopSelectedItem = -1; - player.image[0] = gfx_sprites[0]; + player.image[0] = gfx_shipSprites[SS_FIREFLY]; player.x = 380; player.y = 95; @@ -1018,12 +1020,12 @@ static void sell(int i) void showShop() { - screen_blit(gfx_shopSprites[0], 20, 395); - screen_blit(gfx_shopSprites[1], 275, 395); - screen_blit(gfx_shopSprites[2], 530, 395); - screen_blit(gfx_shopSprites[3], 100, 180); - screen_blit(gfx_shopSprites[4], 100, 50); - screen_blit(gfx_shopSprites[5], 100, 320); + screen_blit(gfx_shopSprites[SHOP_S_PRIMARY], 20, 395); + screen_blit(gfx_shopSprites[SHOP_S_POWERUP], 275, 395); + screen_blit(gfx_shopSprites[SHOP_S_SECONDARY], 530, 395); + screen_blit(gfx_shopSprites[SHOP_S_CATALOG], 100, 180); + screen_blit(gfx_shopSprites[SHOP_S_SHIP_INFO], 100, 50); + screen_blit(gfx_shopSprites[SHOP_S_ITEM_INFO], 100, 320); if (shopSelectedItem > -1) { @@ -1033,7 +1035,7 @@ void showShop() screen_blit(gfx_sprites[29], (int)player.x, (int)player.y); - signed char icons = MAX_SHOPITEMS; + signed char icons = SHOP_MAX; if (game.system == 0) icons = SHOP_DOUBLE_ROCKETS + 1;