Removed choice of targeting systems.

This is silly. I can see that someone decided to restrict targeting
to one ship as a difficulty setting, but that's not a very good way
to achieve different levels of difficulty.

Also added more music and slowed down RE.ogg.
This commit is contained in:
onpon4 2015-02-26 18:46:45 -05:00
parent 9b814979f9
commit 491bb2641b
12 changed files with 14 additions and 59 deletions

Binary file not shown.

BIN
music/rise_of_spirit.ogg Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,6 @@
http://opengameart.org/content/walking-among-androids-20
walking_among_androids.ogg
http://opengameart.org/content/through-space
through_space.ogg
@ -20,4 +23,7 @@ http://opengameart.org/content/fast-high-music
RE.ogg
http://opengameart.org/content/stereotypical-90s-space-shooter-music
death.ogg
death.ogg
http://opengameart.org/content/rise-of-spirit
rise_of_spirit.ogg

View File

@ -489,10 +489,6 @@ void setTarget(int index)
engine.targetIndex = index;
engine.targetShield = 85;
engine.targetShield /= enemy[index].shield;
engine.targetArrowTimer = -1;
if (currentGame.area == 10)
engine.targetArrowTimer = 0;
}
void initAliens()

View File

@ -349,8 +349,6 @@ static void destroyAlien(object *bullet, object *theEnemy)
if (theEnemy->classDef == CD_ASTEROID)
{
theEnemy->shield = -999;
if ((currentGame.area == 10) && (theEnemy != &enemy[0]) && (currentMission.completed1[0] == 0) && (currentMission.targetValue1[1] == 1))
engine.targetArrowTimer = 120;
}
if ((theEnemy->classDef == CD_KRASS) && (bullet->owner == &player))

View File

@ -60,8 +60,6 @@ void defineGlobals()
engine.minutes = 0;
engine.paused = false;
engine.gameSection = SECTION_TITLE;
engine.targetArrowTimer = 0;
engine.cheat = false;
engine.cheatShield = false;

View File

@ -42,7 +42,7 @@ void initVars()
if (engine.useAudio)
{
Mix_Volume(-1, 25);
Mix_Volume(-1, 50);
Mix_VolumeMusic((int)engine.musicVolume);
}
}

View File

@ -117,15 +117,12 @@ static void doArrow(int i)
blit(shape[arrow], x, y);
if(i != engine.targetIndex)
if (i != engine.targetIndex)
return;
if(engine.targetArrowTimer == 0 || textShape[3].life > 0)
if (textShape[3].life > 0)
return;
if (engine.targetArrowTimer > 0)
engine.targetArrowTimer--;
if (sxy == sx) {
x -= x > screen->w / 2 ? 5 + shape[44]->w : -5 - shape[arrow]->w;
y -= (shape[44]->h - shape[arrow]->h) / 2;
@ -177,12 +174,8 @@ void doInfo()
textSurface(38, text, 90, 21, FONT_WHITE);
blitText(38);
if (engine.targetArrowTimer < -1) {
for (int i = 0; i < MAX_ALIENS; i++)
doArrow(i);
} else if (engine.targetArrowTimer != 0) {
doArrow(engine.targetIndex);
}
for (int i = 0; i < MAX_ALIENS; i++)
doArrow(i);
fontColor = FONT_WHITE;
if (player.ammo[0] > 0)

View File

@ -186,35 +186,6 @@ void doPlayer()
engine.keyState[KEY_PAUSE] = 0;
}
if ((engine.keyState[KEY_TARGET]) && (currentGame.area != 10))
{
if (engine.targetArrowTimer == -1 && currentGame.difficulty < DIFFICULTY_HARD) {
engine.targetArrowTimer = -2;
setInfoLine("Showing all targets", FONT_WHITE);
} else if (engine.targetArrowTimer < 0) {
engine.targetArrowTimer = 0;
setInfoLine("Disabled target arrows", FONT_WHITE);
} else {
engine.targetArrowTimer = -1;
setInfoLine("Showing mission target", FONT_WHITE);
}
engine.keyState[KEY_TARGET] = 0;
}
if ((engine.missionCompleteTimer == 0) && (engine.targetArrowTimer == -1))
{
if ((enemy[engine.targetIndex].shield < 1) && (currentGame.area != 10))
{
engine.targetIndex = rand() % MAX_ALIENS;
if (enemy[engine.targetIndex].flags & FL_FRIEND)
engine.targetIndex = 0;
else
setTarget(engine.targetIndex);
}
}
if (((currentGame.area == 18) && (enemy[WC_BOSS].shield > 0)) || (currentGame.area == 24))
player.face = 0;
@ -309,8 +280,6 @@ static enum keys mapkey(uint32_t code) {
return KEY_FIRE;
case SDLK_SPACE:
return KEY_ALTFIRE;
case SDLK_t:
return KEY_TARGET;
case SDLK_LSHIFT:
case SDLK_RSHIFT:
return KEY_SWITCH;
@ -373,9 +342,6 @@ void getPlayerInput()
case 2:
engine.keyState[KEY_SWITCH] = engine.event.jbutton.state;
break;
case 3:
engine.keyState[KEY_TARGET] = engine.event.jbutton.state;
break;
}
break;

View File

@ -211,7 +211,6 @@ enum keys {
KEY_RIGHT,
KEY_FIRE,
KEY_ALTFIRE,
KEY_TARGET,
KEY_SWITCH,
KEY_PAUSE,
KEY_ESCAPE,
@ -256,7 +255,6 @@ struct globalEngineVariables {
float targetShield;
signed char targetIndex;
int targetArrowTimer;
// Mission completion timer (allows for 4 seconds before leaving sector)
unsigned long missionCompleteTimer;

View File

@ -189,7 +189,7 @@ int doTitle()
signed char continueSaveSlot = initSaveSlots();
loadMusic("music/Platinum.mod");
loadMusic("music/walking_among_androids.ogg");
loadBackground("gfx/spirit.jpg");
@ -656,7 +656,7 @@ void doCredits()
freeGraphics();
if ((engine.useMusic) && (engine.useAudio))
loadMusic("music/Solace.s3m");
loadMusic("music/rise_of_spirit.ogg");
FILE *fp;
int numberOfCredits = 0;