blobwarsAttrition/src/world/player.c

69 lines
1.4 KiB
C
Raw Permalink Normal View History

2018-01-22 08:44:15 +01:00
/*
2019-06-02 17:13:34 +02:00
Copyright (C) 2018-2019 Parallel Realities
2018-01-22 08:44:15 +01:00
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 the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "player.h"
2018-02-05 23:06:29 +01:00
2018-02-10 19:35:56 +01:00
static void doDebugControls(void);
2018-02-05 23:06:29 +01:00
void doPlayer(void)
{
if (dev.debug)
{
2018-02-10 19:35:56 +01:00
doDebugControls();
2018-02-05 23:06:29 +01:00
}
}
2018-02-10 19:35:56 +01:00
static void doDebugControls(void)
2018-02-05 23:06:29 +01:00
{
if (app.keyboard[SDL_SCANCODE_1])
{
world.bob->weaponType = WPN_PISTOL;
}
2019-06-02 17:13:34 +02:00
2018-02-05 23:06:29 +01:00
if (app.keyboard[SDL_SCANCODE_2])
{
world.bob->weaponType = WPN_PLASMA;
}
2019-06-02 17:13:34 +02:00
2018-02-05 23:06:29 +01:00
if (app.keyboard[SDL_SCANCODE_3])
{
world.bob->weaponType = WPN_SPREAD;
}
2019-06-02 17:13:34 +02:00
2018-02-05 23:06:29 +01:00
if (app.keyboard[SDL_SCANCODE_4])
{
world.bob->weaponType = WPN_LASER;
}
2019-06-02 17:13:34 +02:00
2018-02-05 23:06:29 +01:00
if (app.keyboard[SDL_SCANCODE_5])
{
world.bob->weaponType = WPN_GRENADES;
}
2019-06-02 17:13:34 +02:00
2018-02-18 10:29:37 +01:00
if (app.keyboard[SDL_SCANCODE_0] && world.state != WS_COMPLETE)
2018-02-10 19:35:56 +01:00
{
2018-02-23 20:26:13 +01:00
quitMission();
autoCompleteMission();
app.keyboard[SDL_SCANCODE_0] = 0;
}
2018-02-05 23:06:29 +01:00
}