if (global.gameState = GAME_STATE.MAIN_MENU) {
	draw_set_color(c_black);
	draw_rectangle(0, 0, room_width, room_height, false);

	draw_set_color(c_white);
	draw_set_halign(fa_center);
	draw_set_valign(fa_middle);
	
	draw_text(room_width / 2, room_height * 0.165, "BLAST OF 8-BIT");
	
	var _fontSize = 20;
	var _menuItemCount = array_length_1d(global.menuTexts);
	var _halfMenuY = (_menuItemCount / 2) *_fontSize;
	for (var i = 0; i < _menuItemCount; ++i) {
	
		if (i == global.menuSelected) { 
			var _text = "> ";
		} else {
			var _text = "";
		}
		if (i != MENU.WINDOW_SIZE) {
			_text += global.menuTexts[i];
		}
		if (i == MENU.WINDOW_SIZE) {
			if (global.scale != 0) {
				_text += "SIZE: " + string(global.scale);
			} else {
				if (i == global.menuSelected) { 
					var _text = "> ";
				}
				_text += "FULLSCREEN";
			}
		}
		if (i == MENU.MUSIC || i == MENU.SOUND) {
			if ((i == MENU.MUSIC && global.music)
			|| (i == MENU.SOUND && global.sound)) {
				_text += " ON";
			} else {
				_text += " OFF";
			}
		}
		if (i == global.menuSelected) {
			_text += " <";
		}
	
		draw_text(room_width / 2, room_height / 2 - _halfMenuY + i * _fontSize, _text);
	}
	if (global.bestScore > 0) {
		draw_text(room_width / 2, room_height * 0.75, "BEST SCORE: " + string(global.bestScore));
	}
} else if (global.gameState == GAME_STATE.GAME_OVER) {
	if (pressTimer > 0) {
		--pressTimer;
	} else {
		if (pressShowing) {
			pressTimer = pressDelayHide;
		} else {
			pressTimer = pressDelayShow;
		}
		pressShowing = !pressShowing;
	}
	draw_set_color(c_white);
	draw_set_halign(fa_center);
	draw_set_valign(fa_top);
	var _text = "GAME OVER";
	if (global.newScore) {
		_text += "\nNEW HIGH SCORE!";
		_text += "\nYOUR SCORE: " + string(score);
	} else {
		_text += "\nYOUR SCORE: " + string(score);
		_text += "\nBEST SCORE: " + string(global.bestScore);
	}
	if (pressShowing) {
		_text += "\n\nPRESS SPACE TO CONTINUE";
	}
	draw_text(room_width / 2, room_height * 0.3, _text);
} else if (global.gameState == GAME_STATE.WAITING) {
	if (pressTimer > 0) {
		--pressTimer;
	} else {
		if (pressShowing) {
			pressTimer = pressDelayHide;
		} else {
			pressTimer = pressDelayShow;
		}
		pressShowing = !pressShowing;
	}
	if (pressShowing) {
		draw_set_color(c_white);
		draw_set_halign(fa_center);
		draw_set_valign(fa_top);
		draw_text(room_width / 2, room_height * 0.7, "PRESS SPACE TO START");
	}
} else if (global.gameState == GAME_STATE.PAUSE) {
	draw_set_color(c_black);
	draw_rectangle(0, 0, room_width, room_height, false);

	var _fontSize = 20;
	var _menuItemCount = array_length_1d(global.pauseMenuTexts);
	var _halfMenuY = (_menuItemCount / 2) *_fontSize;
	for (var i = 0; i < _menuItemCount; ++i) {
		draw_set_color(c_white);
		draw_set_halign(fa_center);
		draw_set_valign(fa_middle);
		
		if (i == global.menuSelected) {
			var _text = "> ";
		} else {
			var _text = "";
		}
		_text += global.pauseMenuTexts[i];
		if (i == global.menuSelected) {
			_text += " <";
		}
		
		draw_text(room_width / 2, room_height / 2 - _halfMenuY + i * _fontSize, _text);
	}
	
	var _text = "YOUR SCORE: " + string(score);
	_text += "\nBEST SCORE: " + string(global.bestScore);
	if (global.bestScore > 0) {
		draw_text(room_width / 2, room_height * 0.75, _text);
	}
} else if (global.gameState == GAME_STATE.PLAYING) {
	if (global.noMoved || global.noSplashed) {
		if (pressTimer > 0) {
			--pressTimer;
		} else {
			if (pressShowing) {
				pressTimer = pressDelayHide;
			} else {
				pressTimer = pressDelayShow;
			}
			pressShowing = !pressShowing;
		}
		if (pressShowing) {
			draw_set_color(c_white);
			draw_set_halign(fa_center);
			draw_set_valign(fa_top);
			if (global.noMoved) {
				draw_text(room_width / 2, room_height * 0.375, "HOLD WASD TO MOVE");
			}
			if (global.noSplashed) {
				draw_text(room_width / 2, room_height * 0.625, "PRESS J TO SPLASH");
			}
		}
	}
}