Skip to content
Snippets Groups Projects
Commit e2ce5985 authored by FarawayVision's avatar FarawayVision
Browse files

turn off debug mode

parent bb2dc20e
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
**********************************************************************/
/* General Constants */
var DEBUG = true;
var DEBUG = false;
var BASE_FONT_SIZE = 14;
var BASE_SCREEN_WIDTH = 100;
......@@ -138,13 +138,13 @@ function createNewPlayer (folder, first, last, label, gender, size, intelligence
},
};
initPlayerState(newPlayerObject);
return newPlayerObject;
}
/*******************************************************************
* (Re)Initialize the player properties that change during a game
* (Re)Initialize the player properties that change during a game
*******************************************************************/
function initPlayerState(player) {
player.out = player.finished = player.exposed = false;
......@@ -169,11 +169,11 @@ function initialSetup () {
/* start by creating the human player object */
var humanPlayer = createNewPlayer("", "", "", "", eGender.MALE, eSize.MEDIUM, eIntelligence.AVERAGE, 20, [], null);
players[HUMAN_PLAYER] = humanPlayer;
/* enable table opacity */
tableOpacity = 1;
$gameTable.css({opacity:1});
/* load the all content */
loadTitleScreen();
selectTitleCandy();
......@@ -192,7 +192,7 @@ function loadConfigFile () {
type: "GET",
url: "config.xml",
dataType: "text",
success: function(xml) {
success: function(xml) {
var _debug = $(xml).find('debug').text();
if (_debug === "true") {
......@@ -221,7 +221,7 @@ function screenTransition (first, second) {
first.hide();
second.show();
}
/************************************************************
* Switches to the next screen based on the screen provided.
************************************************************/
......@@ -268,22 +268,22 @@ function resetPlayers () {
************************************************************/
function restartGame () {
KEYBINDINGS_ENABLED = false;
resetPlayers();
/* enable table opacity */
tableOpacity = 1;
$gameTable.css({opacity:1});
$gamePlayerClothingArea.show();
$gamePlayerCardArea.show();
/* trigger screen refreshes */
updateSelectionVisuals();
updateAllGameVisuals();
selectTitleCandy();
forceTableVisibility(true);
/* there is only one call to this right now */
$epilogueSelectionModal.hide();
$gameScreen.hide();
......@@ -294,7 +294,7 @@ function restartGame () {
/**********************************************************************
***** Interaction Functions *****
**********************************************************************/
/************************************************************
* The player clicked the credits button. Shows the credits modal.
************************************************************/
......@@ -347,15 +347,15 @@ function getRandomNumber (min, max) {
/**********************************************************************
* Returns the width of the visible screen in pixels.
**/
function getScreenWidth ()
function getScreenWidth ()
{
/* fetch all game screens */
var screens = document.getElementsByClassName('screen');
/* figure out which screen is visible */
for (var i = 0; i < screens.length; i++)
for (var i = 0; i < screens.length; i++)
{
if (screens[i].offsetWidth > 0)
if (screens[i].offsetWidth > 0)
{
/* this screen is currently visible */
return screens[i].offsetWidth;
......@@ -366,12 +366,12 @@ function getScreenWidth ()
/**********************************************************************
* Automatically adjusts the size of all font based on screen width.
**/
function autoResizeFont ()
function autoResizeFont ()
{
/* resize font */
var screenWidth = getScreenWidth();
document.body.style.fontSize = (14*(screenWidth/1000))+'px';
/* set up future resizing */
window.onresize = autoResizeFont;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment