Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Home button now quits to main menu from player/weapon selection screens
  • Loading branch information
insin committed Jun 8, 2009
1 parent 9a4ae1a commit b742375
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/prep.c
Expand Up @@ -2,8 +2,8 @@
C-Dogs SDL
A port of the legendary (and fun) action/arcade cdogs.
Copyright (C) 1995 Ronny Wester
Copyright (C) 2003 Jeremy Chin
Copyright (C) 2003-2007 Lucas Martin-King
Copyright (C) 2003 Jeremy Chin
Copyright (C) 2003-2007 Lucas Martin-King
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -21,13 +21,13 @@
-------------------------------------------------------------------------------
prep.c - preparation stuff
prep.c - preparation stuff
Author: $Author: lmartinking $
Rev: $Revision: 265 $
URL: $HeadURL: svn://svn.icculus.org/cdogs-sdl/trunk/src/prep.c $
ID: $Id: prep.c 265 2008-02-10 09:53:42Z lmartinking $
*/


Expand Down Expand Up @@ -355,7 +355,7 @@ static int NameSelection(int x, int index, struct PlayerData *data,

#define ENTRY_COLS 10
#define ENTRY_SPACING 12

y = CenterY(((TextHeight() * ((strlen(letters) - 1) / ENTRY_COLS) )));

if (gOptions.twoPlayers && index == CHARACTER_PLAYER1)
Expand Down Expand Up @@ -801,7 +801,7 @@ static int MainMenu(int x, int index, int cmd)
PlaySound(SND_SWITCH, 0, 255);
} else if (selection[index] == MODE_DONE) {
selection[index] = MODE_SELECTNAME;
PlaySound(SND_SWITCH, 0, 255);
PlaySound(SND_SWITCH, 0, 255);
}
}

Expand Down Expand Up @@ -887,9 +887,9 @@ int PlayerSelection(int twoPlayers, void *bkg)
while (mode1 != MODE_DONE || mode2 != MODE_DONE) {
memcpy(GetDstScreen(), bkg, SCREEN_MEMSIZE);
GetPlayerCmd(&cmd1, &cmd2);
if (KeyDown(keyEsc)) return 0; // hack to allow exit

if (KeyDown(keyEsc) || (cmd1 & CMD_ESC) != 0) return 0; // hack to allow exit

if (twoPlayers) {
if (cmd1 == prev1)
cmd1 = 0;
Expand Down Expand Up @@ -932,9 +932,9 @@ int PlayerEquip(void *bkg)
while (!done1 || !done2) {
memcpy(GetDstScreen(), bkg, SCREEN_MEMSIZE);
GetPlayerCmd(&cmd1, &cmd2);
if (KeyDown(keyEsc)) return 0; // hack to exit from menu

if (KeyDown(keyEsc) || (cmd1 & CMD_ESC) != 0) return 0; // hack to exit from menu

if (gOptions.twoPlayers) {
if (cmd1 == prev1)
cmd1 = 0;
Expand Down

0 comments on commit b742375

Please sign in to comment.