install(FILES ${CMAKE_SOURCE_DIR}/AUTHORS
${CMAKE_SOURCE_DIR}/CONTENT-LICENSE.txt
${CMAKE_SOURCE_DIR}/COPYING.txt
- ${CMAKE_SOURCE_DIR}/DEBUG-OPTIONS.txt
+ ${CMAKE_SOURCE_DIR}/DEVTOOLS.txt
${CMAKE_SOURCE_DIR}/README.md
DESTINATION ${LUGARU_DOCDIR})
+++ /dev/null
-Lugaru
-
----------Pass --debug option to the binary for these to work----------
-
-Note: debug key must be pressed as if on a qwerty
-
-~=console (map mapname, save mapname, quit)
-tab=minimap
-
-super+z = restart level
-shift+k = win level
-
-alt+h = give 2000 health
-alt+j = toggle snow/grass/desert
-alt+c = toggle cameramode
-alt+b = slow motion (with motion blur that might work)
-alt+n = ragdoll
-alt+x = change weapon of nearby player (main player if ctrl is pressed)
-alt+f = spontaneously combust
-alt+o = change enemy's skin (main player if ctrl is pressed)
-alt+shift+o = change enemy's type (rabbit/wolf) (main player if ctrl is pressed)
-alt+i = explode nearby head
-alt+shift+i = explode nearby enemy
-
-
-Map editor:
-alt+m = toggle editor mode
-m = place object
-p = place enemy
-shift-p = place waypoint
-delete = delete most recently made object
-shift-delete = delete most recently made player
-up/down = change size of next object
-control+up/down = change tilt of next object
-left/right = change rotation of next object
-shift+left/right = change type of next object
-
-control+p = make/connect pathfind waypoint
-period/comma = select pathfind waypoints
-shift+comma = delete pathfind waypoint
-
-Console commands:
-f is floating point, i is integer, b is boolean, str is string.
-
-Map mapname where mapname is the name of a map in the maps folder
-Save mapname where mapname is an unused filename
-Cellar door, rambo, kungfu, white, brown, black = change skins
-
-Tintr f = red clothes color from 0 to 1
-Tintg f = green clothes color from 0 to 1
-Tintb f = blue clothes color from 0 to 1
-Tint f f f = r,g,b clothes colors from 0 to 1
-Noclothes = remove all clothes
-Clothes str = add clothes str.png
-
-Included clothes include:
-shirt
-longsleeve
-earwrap
-footwrap
-pants
-fancypants
-scar
-headband
-leatherwristleft
-leatherwristright
-leatherarmor
-leatherpants
-
-Skybox = toggle skybox (i.e. turn off to get fog)
-Sky Tint f f f = r,g,b colors from 0 to 1 for the sky
-Sky Light f f f = r,g,b colors from 0 to 1 for the lighting
-
-Speed f = set player speed
-Strength f = set player power
-Power f = set player power
-Protection f f f = set high,medium,low resistance to blunt attacks
-Armor f f f = set high,medium,low resistance to sharp attacks
-
-slomo f = set the slomo speed
-slofreq i = set the slomo sound frequency
-
-tutorial b = toggle tutorial mode on/off
-hostile b = toggle hostility
-
-type active/sitting/sitting wall/sleeping/dead1/dead2/dead3/dead4 = set initial state
-path keepwalking/pause = determine whether enemies walk through the next pathpoint or pause briefly
-
-mapkilleveryone = set the map objective to kill everyone
-mapgosomewhere = set the map objective to go somewhere
-mapkillsomeone = set the map objective to kill a specific enemy
-mapkillmost = set the map objective to kill everyone but one
-
-hs f i str = set the size, type, and text for a hotspot
-(type 0 = static, display text
-type 1-10 = attached to player 1-10, display text
-type 11-20 = attached to player 1-10, must kill to win
-type -1 = win if approached)
-
-dhs = delete last hotspot
-
-dialogue str = load the dialogue str.txt and enter directing mode (fly around, press numpad 1-10 to change their head target, press 1-10 for who is saying each line and to go to next line)
-
-ddialogue = delete last dialogue
-
-play i = play dialogue #i
-
-immobile = make immobile; this can increase fps
-mobile = make mobile
-
-proportion f f f f = set head, body, arm and leg proportion (1 is default)
-
-viewdistance x= set the far clipping plane (1 is default)
-fadestart x= set what fraction of the viewdistance an object must pass to begin fading (1 is default)
-
-funnybunny = set player to rabbit
-wolfieisgod = set player to wolf
-
-quit = quit
--- /dev/null
+Lugaru Developer Tools
+======================
+
+Activation
+----------
+
+- Pass --devtools option to the binary for these to work
+- Or add the following to your config.txt:
+
+ Devtools:
+ 1
+
+Key bindings
+------------
+
+Note: dev keys must be pressed as if on a QWERTY keyboard.
+
+General
+~~~~~~~
+
+~ = console (map mapname, save mapname, quit)
+tab = minimap
+
+super+z = restart level
+shift+k = win level
+
+alt+h = give 2000 health
+alt+j = toggle snow/grass/desert
+alt+c = toggle cameramode
+alt+b = slow motion (with motion blur that might work)
+alt+n = ragdoll
+alt+x = change weapon of nearby player (main player if ctrl is pressed)
+alt+f = spontaneously combust
+alt+o = change enemy's skin (main player if ctrl is pressed)
+alt+shift+o = change enemy's type (rabbit/wolf) (main player if ctrl is pressed)
+alt+i = explode nearby head
+alt+shift+i = explode nearby enemy
+
+Map editor
+~~~~~~~~~~
+
+alt+m = toggle editor mode
+m = place object
+p = place enemy
+shift-p = place waypoint
+delete = delete most recently made object
+shift-delete = delete most recently made player
+up/down = change size of next object
+control+up/down = change tilt of next object
+left/right = change rotation of next object
+shift+left/right = change type of next object
+
+control+p = make/connect pathfind waypoint
+period/comma = select pathfind waypoints
+shift+comma = delete pathfind waypoint
+
+Console commands
+----------------
+
+f is floating point, i is integer, b is boolean, str is string.
+
+Map mapname where mapname is the name of a map in the maps folder
+Save mapname where mapname is an unused filename
+Cellar door, rambo, kungfu, white, brown, black = change skins
+
+Tintr f = red clothes color from 0 to 1
+Tintg f = green clothes color from 0 to 1
+Tintb f = blue clothes color from 0 to 1
+Tint f f f = r,g,b clothes colors from 0 to 1
+Noclothes = remove all clothes
+Clothes str = add clothes str.png
+
+Included clothes include:
+Shirt
+LongSleeve
+EarWrap
+FootWrap
+Pants
+FancyPants
+Scar
+Headband
+LeatherWristLeft
+LeatherWristRight
+LeatherArmor
+LeatherPants
+
+Skybox = toggle skybox (i.e. turn off to get fog)
+Sky Tint f f f = r,g,b colors from 0 to 1 for the sky
+Sky Light f f f = r,g,b colors from 0 to 1 for the lighting
+
+Speed f = set player speed
+Strength f = set player power
+Power f = set player power
+Protection f f f = set high,medium,low resistance to blunt attacks
+Armor f f f = set high,medium,low resistance to sharp attacks
+
+slomo f = set the slomo speed
+slofreq i = set the slomo sound frequency
+
+tutorial b = toggle tutorial mode on/off
+hostile b = toggle hostility
+
+type active/sitting/sitting wall/sleeping/dead1/dead2/dead3/dead4 = set initial state
+path keepwalking/pause = determine whether enemies walk through the next pathpoint or pause briefly
+
+mapkilleveryone = set the map objective to kill everyone
+mapgosomewhere = set the map objective to go somewhere
+mapkillsomeone = set the map objective to kill a specific enemy
+mapkillmost = set the map objective to kill everyone but one
+
+hs f i str = set the size, type, and text for a hotspot
+(type 0 = static, display text
+type 1-10 = attached to player 1-10, display text
+type 11-20 = attached to player 1-10, must kill to win
+type -1 = win if approached)
+
+dhs = delete last hotspot
+
+dialogue str = load the dialogue str.txt and enter directing mode (fly around, press numpad 1-10 to change their head target, press 1-10 for who is saying each line and to go to next line)
+
+ddialogue = delete last dialogue
+
+play i = play dialogue #i
+
+immobile = make immobile; this can increase fps
+mobile = make mobile
+
+proportion f f f f = set head, body, arm and leg proportion (1 is default)
+
+viewdistance x= set the far clipping plane (1 is default)
+fadestart x= set what fraction of the viewdistance an object must pass to begin fading (1 is default)
+
+funnybunny = set player to rabbit
+wolfieisgod = set player to wolf
+
+quit = quit
using namespace std;
-extern bool debugmode;
+extern bool devtools;
vector<Account*> Account::accounts = vector<Account*>();
void Account::winLevel(int level, float score, float time)
{
- if (!debugmode) {
+ if (!devtools) {
if (score > highscore[level])
highscore[level] = score;
if (time < fasttime[level] || fasttime[level] == 0)
-enum optionIndex { UNKNOWN, HELP, FULLSCREEN, NOMOUSEGRAB, SOUND, OPENALINFO, SHOWRESOLUTIONS, DEBUG };
+enum optionIndex { UNKNOWN, HELP, FULLSCREEN, NOMOUSEGRAB, SOUND, OPENALINFO, SHOWRESOLUTIONS, DEVTOOLS };
/* Number of options + 1 */
const int commandLineOptionsNumber = 9;
extern bool isclient;
extern bool alwaysblur;
extern bool velocityblur;
-extern bool debugmode;
+extern bool devtools;
extern int mainmenu;
extern int bloodtoggle;
extern int difficulty;
glColor4f(.5, .5, .5, 1);
- if ((texttoggle || editorenabled) && debugmode && !mainmenu) {
+ if ((texttoggle || editorenabled) && devtools && !mainmenu) {
sprintf (string, "The framespersecond is %d.", (int)(fps));
text->glPrint(10, 30, string, 0, .8, 1024, 768);
extern float viewdistance;
extern bool freeze;
extern XYZ windvector;
-extern bool debugmode;
+extern bool devtools;
int leveltheme;
extern int mainmenu;
extern int oldmainmenu;
}
}
-void doDebugKeys()
+void doDevKeys()
{
float headprop, bodyprop, armprop, legprop;
- if (!debugmode) {
+ if (!devtools) {
return;
}
leveltime += multiplier;
//keys
- if (Input::isKeyDown(SDL_SCANCODE_LALT) && Input::isKeyPressed(SDL_SCANCODE_V) && debugmode) {
+ if (Input::isKeyDown(SDL_SCANCODE_LALT) && Input::isKeyPressed(SDL_SCANCODE_V) && devtools) {
freeze = !freeze;
if (freeze) {
OPENAL_SetFrequency(OPENAL_ALL);
}
}
- if (Input::isKeyPressed(consolekey) && debugmode) {
+ if (Input::isKeyPressed(consolekey) && devtools) {
console = !console;
if (console) {
OPENAL_SetFrequency(OPENAL_ALL);
hawkcalldelay = 16 + abs(Random() % 8);
}
- doDebugKeys();
+ doDevKeys();
doAttacks();
(whichlevel != -2 &&
(Input::isKeyDown(SDL_SCANCODE_Z) &&
Input::isKeyDown(SDL_SCANCODE_LGUI) &&
- debugmode) ||
+ devtools) ||
(Input::isKeyDown(jumpkey) &&
!respawnkeydown &&
!oldattackkey &&
Person::players[i]->crouchtogglekeydown = 1;
} else Person::players[i]->velocity.y = 5;
- if (mousejump && i == 0 && debugmode) {
+ if (mousejump && i == 0 && devtools) {
if (!Person::players[i]->isLanding())
Person::players[i]->tempdeltav = deltav;
if (Person::players[i]->tempdeltav < 0)
if (Person::players[i]->animTarget == jumpupanim &&
(((!floatjump &&
!editorenabled) ||
- !debugmode) ||
+ !devtools) ||
Person::players[i]->aitype != playercontrolled)) {
if (Person::players[i]->jumppower > multiplier * 6) {
Person::players[i]->velocity.y += multiplier * 6;
Person::players[i]->jumppower = 0;
}
}
- if (((floatjump || editorenabled) && debugmode) && i == 0)
+ if (((floatjump || editorenabled) && devtools) && i == 0)
Person::players[i]->velocity.y += multiplier * 30;
}
float envsoundlife[30] = {0};
int numenvsounds;
-bool debugmode = false;
+bool devtools = false;
bool gamestarted = false;
setText(6, (string)"Draw: " + (keyselect == 6 ? "_" : Input::keyToChar(drawkey)));
setText(7, (string)"Throw: " + (keyselect == 7 ? "_" : Input::keyToChar(throwkey)));
setText(8, (string)"Attack: " + (keyselect == 8 ? "_" : Input::keyToChar(attackkey)));
- if (debugmode) {
+ if (devtools) {
setText(9, (string)"Console: " + (keyselect == 9 ? "_" : Input::keyToChar(consolekey)));
}
}
addButton(6, "", 10 + 40, 160);
addButton(7, "", 10 + 30, 120);
addButton(8, "", 10 + 20, 80);
- if (debugmode) {
+ if (devtools) {
addButton(9, "", 10 + 10, 40);
}
- addButton(debugmode ? 10 : 9, "Back", 10, 10);
+ addButton(devtools ? 10 : 9, "Back", 10, 10);
updateControlsMenu();
break;
case 5: {
case 4:
if (!waiting) {
fireSound();
- if (selected < (debugmode ? 10 : 9) && keyselect == -1)
+ if (selected < (devtools ? 10 : 9) && keyselect == -1)
keyselect = selected;
if (keyselect != -1)
setKeySelected();
- if (selected == (debugmode ? 10 : 9)) {
+ if (selected == (devtools ? 10 : 9)) {
flash();
mainmenu = 3;
}
*
* USES:
* GameTick/doPlayerCollisions - spread fire between players
- * GameTick/doDebugKeys - press f to ignite
+ * GameTick/doDevKeys - press f to ignite
* Person::DoStuff - spread fire from lit campfires and bushes
*/
void Person::CatchFire()
velocityblur = 0;
volume = 0.8f;
ambientsound = 1;
- debugmode = 0;
+ devtools = 0;
crouchkey = SDL_SCANCODE_LSHIFT;
jumpkey = SDL_SCANCODE_SPACE;
ipstream >> damageeffects;
} else if ( !strncmp(setting, "Text", 4) ) {
ipstream >> texttoggle;
- } else if ( !strncmp(setting, "Debug", 5) ) {
- ipstream >> debugmode;
+ } else if ( !strncmp(setting, "Devtools", 5) ) {
+ ipstream >> devtools;
} else if ( !strncmp(setting, "Show Points", 11) ) {
ipstream >> showpoints;
} else if ( !strncmp(setting, "Always Blur", 11) ) {
extern int difficulty;
extern bool damageeffects;
extern bool texttoggle;
-extern bool debugmode;
+extern bool devtools;
extern bool showpoints;
extern bool showdamagebar;
extern bool alwaysblur;
{SOUND, OPENAL_OUTPUT_OSS, "", "force-oss", option::Arg::None, " --force-oss Force use of OSS back-end." },
{OPENALINFO, 0, "", "openal-info", option::Arg::None, " --openal-info Print info about OpenAL at launch." },
{SHOWRESOLUTIONS, 0, "", "showresolutions", option::Arg::None, " --showresolutions List the resolutions found by SDL at launch." },
- {DEBUG, 0, "d", "debug", option::Arg::None, " -d, --debug Activates console, level editor and debug information." },
+ {DEVTOOLS, 0, "d", "devtools", option::Arg::None, " -d, --devtools Activates developer tools: console, level editor and debug information." },
{0,0,0,0,0,0}
};
return 42;
}
- if (commandLineOptions[DEBUG]) {
- debugmode = true;
+ if (commandLineOptions[DEVTOOLS]) {
+ devtools = true;
}
bool gameDone = false;