diff --git a/src/defs.h b/src/defs.h index c56186f..d448847 100644 --- a/src/defs.h +++ b/src/defs.h @@ -266,6 +266,14 @@ enum { FACE_CREW }; +// Difficulties +enum { + DIFFICULTY_EASY, + DIFFICULTY_NORMAL, + DIFFICULTY_HARD, + DIFFICULTY_NIGHTMARE +}; + #define MAX_WEAPONS 20 #define MAX_SHAPES 100 #define MAX_SHIPSHAPES 120 @@ -307,11 +315,3 @@ const int screenWidth = 800; const int screenHeight = 600; const int viewBorder = 100; - -#define DIFFICULTY_EASY -1 -#define DIFFICULTY_NORMAL 0 -#define DIFFICULTY_HARD 1 -#define DIFFICULTY_NIGHTMARE 2 - -#define GAMEPLAY_ORIGINAL 0 -#define GAMEPLAY_ONPON 1 diff --git a/src/game.cpp b/src/game.cpp index d218861..46f49a7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -67,19 +67,22 @@ void newGame() currentGame.maxPlasmaAmmo = 100; currentGame.maxRocketAmmo = 10; - if (currentGame.gamePlay == GAMEPLAY_ONPON) + switch (currentGame.difficulty) { - currentGame.shieldUnits = 2; - player.maxShield = 50; - player.shield = 50; - } - else - { - currentGame.shieldUnits = 1; - player.maxShield = 25; - player.shield = 25; + case DIFFICULTY_EASY: + player.maxShield = 100; + break; + case DIFFICULTY_HARD: + player.maxShield = 25; + break; + case DIFFICULTY_NIGHTMARE: + player.maxShield = 1; + break; + default: + player.maxShield = 50; } + player.shield = player.maxShield; player.ammo[0] = 0; player.ammo[1] = 5; player.weaponType[0] = W_PLAYER_WEAPON; diff --git a/src/intermission.cpp b/src/intermission.cpp index 3192d0b..8f7e7ac 100644 --- a/src/intermission.cpp +++ b/src/intermission.cpp @@ -582,8 +582,6 @@ int galaxyMap() bool redrawBackGround = true; - player.maxShield = (25 * currentGame.shieldUnits); - if (currentGame.distanceCovered > 0) section = 0; else @@ -833,7 +831,6 @@ int galaxyMap() for (int i = 0 ; i < 12 ; i++) SDL_FreeSurface(iconInfo[i].image); - player.maxShield = (25 * currentGame.shieldUnits); if (currentGame.distanceCovered == 0) player.shield = player.maxShield; diff --git a/src/loadSave.cpp b/src/loadSave.cpp index 4f73eea..c603f98 100644 --- a/src/loadSave.cpp +++ b/src/loadSave.cpp @@ -99,7 +99,6 @@ bool loadGame(int slot) fclose(fp); if(currentGame.saveFormat < 2) { - currentGame.gamePlay = GAMEPLAY_ORIGINAL; currentGame.difficulty = DIFFICULTY_NORMAL; } diff --git a/src/missions.cpp b/src/missions.cpp index 56c6921..c493174 100644 --- a/src/missions.cpp +++ b/src/missions.cpp @@ -156,9 +156,6 @@ void updateSystemStatus() currentGame.area = 6; strcpy(currentGame.stationedName, "Nerod"); initPlanetMissions(currentGame.system); - - if (currentGame.gamePlay != GAMEPLAY_ONPON) - currentGame.shieldUnits = 2; } else if (currentGame.area == 11) { @@ -167,9 +164,6 @@ void updateSystemStatus() currentGame.area = 12; strcpy(currentGame.stationedName, "Odeon"); initPlanetMissions(currentGame.system); - - if (currentGame.gamePlay != GAMEPLAY_ONPON) - currentGame.shieldUnits = 3; } else if (currentGame.area == 18) { @@ -178,9 +172,6 @@ void updateSystemStatus() currentGame.area = 19; strcpy(currentGame.stationedName, "Pluto"); initPlanetMissions(currentGame.system); - - if (currentGame.gamePlay != GAMEPLAY_ONPON) - currentGame.shieldUnits = 4; } else // Update the mission for the planet { diff --git a/src/player.cpp b/src/player.cpp index d60296a..ae9643c 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -28,7 +28,6 @@ void initPlayer() player.x = screen->w / 2; player.y = screen->h / 2; player.speed = 2; - player.maxShield = (25 * currentGame.shieldUnits); player.systemPower = player.maxShield; player.face = 0; @@ -110,7 +109,7 @@ void doPlayer() if (player.weaponType[1] == W_CHARGER) { - if (engine.keyState[KEY_ALTFIRE] && !(currentGame.gamePlay == GAMEPLAY_ONPON && engine.keyState[KEY_FIRE])) + if (engine.keyState[KEY_ALTFIRE] && !(engine.keyState[KEY_FIRE])) { limitCharAdd(&player.ammo[1], 1, 0, 200); } diff --git a/src/shop.cpp b/src/shop.cpp index bc79407..ca94146 100644 --- a/src/shop.cpp +++ b/src/shop.cpp @@ -199,7 +199,7 @@ static void drawShop() for (int i = 0 ; i < icons ; i++) blit(shape[shopItems[i].image], shopItems[i].x - 90, shopItems[i].y - 178, shopSurface[3]); - sprintf(description, "Shield Units : %d", currentGame.shieldUnits * 25); + sprintf(description, "Shield Units : %d", player.maxShield); drawString(description, 10, 4, FONT_WHITE, shopSurface[4]); sprintf(description, "Cash : $%d", currentGame.cash); drawString(description, 10, 80, FONT_WHITE, shopSurface[4]); diff --git a/src/structs.h b/src/structs.h index 21fc4db..0d5f090 100644 --- a/src/structs.h +++ b/src/structs.h @@ -126,7 +126,6 @@ struct Game { unsigned char sfxVolume; signed char saveFormat; - signed char gamePlay; signed char difficulty; signed char autoSaveSlot; @@ -167,7 +166,6 @@ struct Game { unsigned char maxPlasmaOutput; unsigned char maxPlasmaAmmo; unsigned char maxRocketAmmo; - unsigned char shieldUnits; }; diff --git a/src/title.cpp b/src/title.cpp index 2406593..141813d 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -67,27 +67,23 @@ static void createDifficultyMenu() if (currentGame.difficulty == DIFFICULTY_EASY) textSurface(24, "DIFFICULTY - EASY", -1, 370, FONT_WHITE); - else if(currentGame.difficulty == DIFFICULTY_HARD) + else if (currentGame.difficulty == DIFFICULTY_HARD) textSurface(24, "DIFFICULTY - HARD", -1, 370, FONT_WHITE); + else if (currentGame.difficulty == DIFFICULTY_NIGHTMARE) + textSurface(24, "DIFFICULTY - NIGHTMARE", -1, 370, FONT_WHITE); else textSurface(24, "DIFFICULTY - NORMAL", -1, 370, FONT_WHITE); - - if (currentGame.gamePlay == GAMEPLAY_ONPON) - textSurface(25, "GAMEPLAY - ONPON", -1, 390, FONT_WHITE); - else - textSurface(25, "GAMEPLAY - NORMAL", -1, 390, FONT_WHITE); } static signed char showDifficultyMenu() { - textShape[12].y = 430; + textShape[12].y = 410; blitText(23); blitText(24); - blitText(25); blitText(12); - return 4; + return 3; } static void createOptionsMenu() @@ -470,12 +466,8 @@ int doTitle() engine.done = 1; else if (selectedOption == 2) currentGame.difficulty++; - if(currentGame.difficulty > DIFFICULTY_HARD) + if (currentGame.difficulty > DIFFICULTY_NIGHTMARE) currentGame.difficulty = DIFFICULTY_EASY; - else if (selectedOption == 3) - currentGame.gamePlay++; - if(currentGame.gamePlay > GAMEPLAY_ONPON) - currentGame.gamePlay = GAMEPLAY_ORIGINAL; else if (selectedOption == listLength) {menuType = 0; selectedOption = 1;} createDifficultyMenu(); @@ -502,7 +494,10 @@ int doTitle() resetLists(); if (selectedOption == 1) + { + newGame(); selectedOption = 2; // go straight to mission 0 + } if (selectedOption == 3) { @@ -521,8 +516,7 @@ int doTitle() } /* -Scrolls the intro text up the screen and nothing else. The text will be placed -into a data file when the game is finished. +Scrolls the intro text up the screen and nothing else. */ void showStory() {